@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/instrument-serif-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/instrument-serif-italic-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(/fonts/figtree-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url(/fonts/figtree-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f4f1e8;
  --paper-2: #ebe6d6;
  --card: #fbfaf5;
  --ink: #17271f;
  --ink-2: #4d5d54;
  --muted: #7a857d;
  --forest: #2f5d42;
  --forest-2: #376b4c;
  --night: #0f1a14;
  --sage: #e3ecdb;
  --lemon: #f1d65c;
  --tomato: #c94b31;
  --amber: #b7791f;
  --line: rgba(23, 39, 31, 0.09);
  /* Recipe titles and names can be Bulgarian; the system serif carries Cyrillic. */
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino", Georgia, serif;
  --sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --radius: 26px;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(60vw 50vh at 100% 0%, rgba(207, 224, 195, 0.45), transparent 70%),
    radial-gradient(40vw 40vh at 0% 100%, rgba(241, 214, 92, 0.12), transparent 70%),
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll {
  overflow: hidden;
}
a {
  color: inherit;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
:focus-visible {
  outline: 2.5px solid var(--forest-2);
  outline-offset: 2px;
  border-radius: 8px;
}
em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--forest-2);
}
h1,
h2 {
  margin: 0;
  font-weight: 400;
  font-family: var(--serif);
  letter-spacing: -0.02em;
  line-height: 1;
}
h1 {
  font-size: clamp(46px, 6vw, 76px);
}
.kicker {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--forest-2);
}
.muted {
  color: var(--ink-2);
}
.lede {
  font-size: 18px;
  margin: 14px 0 0;
  max-width: 36em;
}
.fine {
  font-size: 13.5px;
  color: var(--muted);
}
.center {
  text-align: center;
  margin-top: 40px;
}
.pad {
  padding: 4px 22px 22px;
  margin: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s;
}
.btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -14px rgba(15, 26, 20, 0.5);
}
.btn-primary {
  background: var(--forest-2);
  border-color: transparent;
  color: #fff;
}
.btn-lemon {
  background: var(--lemon);
  border-color: transparent;
  color: var(--ink);
}
.btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.25);
  color: #eef1ea;
}
.btn-block {
  width: 100%;
  padding: 16px;
  font-size: 16.5px;
}
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--forest-2);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  flex: none;
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover {
  background: rgba(201, 75, 49, 0.1);
  color: var(--tomato);
}
.icon-btn.light {
  color: #eef1ea;
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- wordmark ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--serif);
  font-size: 30px;
  font-style: italic;
  letter-spacing: -0.03em;
  text-decoration: none;
  line-height: 1;
}
.leaf {
  width: 21px;
  height: 21px;
  border-radius: 2px 14px 2px 14px;
  background: linear-gradient(135deg, var(--forest-2), #5f9a6d);
  rotate: -8deg;
}

/* ---------- loading & empty ---------- */
.loading {
  min-height: 60vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}
.loading-leaf {
  width: 34px;
  height: 34px;
  border-radius: 3px 22px 3px 22px;
  background: linear-gradient(135deg, var(--forest-2), #8fbf8a);
  animation: sway 1.4s ease-in-out infinite;
}
@keyframes sway {
  50% {
    rotate: 25deg;
    scale: 0.85;
  }
}
.empty {
  text-align: center;
  padding: 70px 20px;
  max-width: 460px;
  margin: 0 auto;
}
.empty.full {
  min-height: 100vh;
  display: grid;
  place-content: center;
}
.empty-icon {
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  background: var(--sage);
  font-size: 40px;
}
.empty h2 {
  font-size: 34px;
}
.empty p {
  color: var(--ink-2);
}

/* ---------- sign in ---------- */
.signin {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.signin-art {
  position: relative;
  overflow: hidden;
  margin: 14px;
  border-radius: 34px;
  background:
    radial-gradient(70% 60% at 20% 10%, rgba(169, 210, 154, 0.35), transparent 60%),
    radial-gradient(60% 60% at 90% 100%, rgba(241, 214, 92, 0.3), transparent 60%),
    var(--night);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 60px;
}
.signin-quote {
  position: relative;
  font-family: var(--serif);
  font-style: italic;
  color: #eef1ea;
  font-size: clamp(34px, 3.6vw, 56px);
  line-height: 1.05;
  max-width: 13em;
  margin: 0;
}
.signin-emoji {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.signin-emoji span {
  position: absolute;
  font-size: 54px;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.35));
  animation: bob 7s ease-in-out infinite;
}
.signin-emoji span:nth-child(1) { left: 12%; top: 12%; animation-delay: -1s; }
.signin-emoji span:nth-child(2) { left: 46%; top: 20%; font-size: 70px; animation-delay: -3s; }
.signin-emoji span:nth-child(3) { left: 74%; top: 9%; animation-delay: -2s; }
.signin-emoji span:nth-child(4) { left: 24%; top: 38%; font-size: 42px; animation-delay: -4s; }
.signin-emoji span:nth-child(5) { left: 66%; top: 40%; animation-delay: -5s; }
.signin-emoji span:nth-child(6) { left: 84%; top: 28%; font-size: 40px; animation-delay: -6s; }
@keyframes bob {
  50% {
    transform: translateY(-16px) rotate(6deg);
  }
}
.signin-panel {
  display: flex;
  flex-direction: column;
  padding: 40px clamp(24px, 6vw, 90px);
}
.signin-form {
  margin: auto 0;
  max-width: 420px;
  width: 100%;
  padding: 40px 0;
  animation: rise 0.6s var(--ease) both;
}
.signin-form h1 {
  font-size: clamp(52px, 5vw, 72px);
}
.signin-form > .muted {
  margin: 16px 0 30px;
}
.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}
.field span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.field input {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 17px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus {
  outline: none;
  border-color: var(--forest-2);
  box-shadow: 0 0 0 4px rgba(55, 107, 76, 0.14);
}
.code-input {
  font-size: 30px !important;
  letter-spacing: 0.3em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.form-error {
  color: var(--tomato);
  font-size: 14.5px;
  margin: 0 0 16px;
}
.signin-links {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 14.5px;
}
.signin-foot {
  display: flex;
  gap: 20px;
  font-size: 13.5px;
  color: var(--muted);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* ---------- shell ---------- */
.shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 28px 18px 18px;
}
.sidebar .wordmark {
  padding-left: 10px;
}
.sidebar nav {
  display: grid;
  gap: 4px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 550;
  color: var(--ink-2);
  transition: background 0.2s, color 0.2s;
}
.sidebar nav a:hover {
  background: rgba(23, 39, 31, 0.05);
}
.sidebar nav a.is-on {
  background: var(--card);
  color: var(--forest);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 6px 18px -10px rgba(15, 26, 20, 0.35);
}
.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 12px;
}
.sidebar-link {
  font-size: 14px;
  color: var(--forest-2);
  font-weight: 600;
  text-decoration: none;
  padding: 0 14px;
}
.account {
  position: relative;
}
.account-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(251, 250, 245, 0.7);
  text-align: left;
}
.avatar {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sage);
  font-size: 19px;
  font-weight: 700;
  color: var(--forest);
}
.account-name {
  display: grid;
  min-width: 0;
}
.account-name b,
.account-name small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-name small {
  color: var(--muted);
  font-size: 12.5px;
}
.account-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  padding: 8px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -20px rgba(15, 26, 20, 0.4);
  animation: rise 0.25s var(--ease) both;
  z-index: 20;
}
.account-menu .fine {
  margin: 4px 10px 6px;
}
.account-menu a,
.account-menu button {
  text-align: left;
  padding: 10px;
  border-radius: 10px;
  border: 0;
  background: none;
  text-decoration: none;
  font-size: 14.5px;
}
.account-menu a:hover,
.account-menu button:hover {
  background: var(--paper);
}
.content {
  min-width: 0;
  padding: 40px clamp(20px, 4vw, 56px) 80px;
}
.page {
  max-width: 1180px;
  margin: 0 auto;
  animation: rise 0.45s var(--ease) both;
}
.page.narrow {
  max-width: 760px;
}
.page-head {
  margin: 20px 0 32px;
}

/* ---------- cards & rows ---------- */
.card {
  background: rgba(251, 250, 245, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 20px 50px -36px rgba(15, 26, 20, 0.45);
  overflow: hidden;
}
.card + .card {
  margin-top: 18px;
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 10px;
}
.card-head h2 {
  font-size: 28px;
}
.card-head a,
.card-head small {
  font-size: 14px;
  color: var(--forest-2);
  font-weight: 600;
  text-decoration: none;
}
.card-head small {
  color: var(--muted);
  font-weight: 500;
}
.rows {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
}
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  transition: background 0.2s, opacity 0.3s;
}
.card-head + .rows .row:first-child,
.rows .row:first-child {
  border-top: 0;
}
.row:hover {
  background: rgba(23, 39, 31, 0.025);
}
.row.more a {
  color: var(--forest-2);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.row-main {
  flex: 1;
  min-width: 0;
  display: grid;
}
.row-main b {
  font-weight: 600;
}
.row-main small {
  color: var(--muted);
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-main small.ok {
  color: var(--forest-2);
  font-weight: 600;
}
.row.is-done .row-main b {
  text-decoration: line-through;
  text-decoration-color: rgba(23, 39, 31, 0.35);
  color: var(--muted);
}
.amount {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.emoji-badge {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: var(--sage);
  position: relative;
}
.emoji-badge[data-state="past"] {
  background: #f8e2db;
  box-shadow: 0 0 0 2px #f1c4b7;
}
.emoji-badge[data-state="soon"] {
  background: #fbefcf;
}
.emoji-badge[data-state="unset"] {
  background: transparent;
  outline: 2px dashed rgba(23, 39, 31, 0.2);
  outline-offset: -2px;
}
.pill {
  flex: none;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--paper);
  color: var(--ink-2);
  white-space: nowrap;
}
.pill[data-state="past"] {
  background: #f8e2db;
  color: var(--tomato);
}
.pill[data-state="soon"] {
  background: #fbefcf;
  color: var(--amber);
}
.pill[data-state="week"] {
  background: var(--sage);
  color: var(--forest);
}
.pill[data-state="unset"],
.pill[data-state="none"] {
  background: transparent;
  color: var(--muted);
  font-weight: 500;
}
.check {
  position: relative;
  flex: none;
  width: 26px;
  height: 26px;
}
.check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.check span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(23, 39, 31, 0.28);
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.check input:checked + span {
  background: var(--forest-2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 80% no-repeat;
  border-color: var(--forest-2);
  transform: scale(1.06);
}
.check input:focus-visible + span {
  outline: 2.5px solid var(--forest-2);
  outline-offset: 2px;
}

/* ---------- kitchen ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat {
  display: grid;
  padding: 18px 20px;
  border-radius: 22px;
  text-decoration: none;
  transition: transform 0.3s var(--ease);
}
.stat:hover {
  transform: translateY(-3px);
}
.stat small {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.75;
}
.stat b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 58px;
  line-height: 1;
  margin: 8px 0 4px;
}
.stat span {
  font-size: 13px;
  opacity: 0.7;
}
.stat-forest {
  background: var(--forest-2);
  color: #f2f6ee;
}
.stat-tomato {
  background: #f6dfd6;
  color: #7c2a19;
}
.stat-lemon {
  background: #f8eab0;
  color: #574511;
}
.stat-sage {
  background: var(--sage);
  color: var(--forest);
}
.kitchen-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.kitchen-grid .card + .card {
  margin-top: 0;
}
.shelves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 6px 16px 18px;
}
.shelf {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: var(--paper);
  text-decoration: none;
  transition: background 0.2s, transform 0.3s var(--ease);
}
.shelf:hover {
  background: var(--sage);
  transform: translateY(-2px);
}
.shelf-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.shelf-emoji {
  font-size: 18px;
}
.shelf-count {
  margin-left: auto;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
}
.bar {
  height: 6px;
  border-radius: 6px;
  background: rgba(23, 39, 31, 0.08);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--forest-2);
  transition: width 0.8s var(--ease);
}
.shelf-peek {
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.mini-recipes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 6px 16px 18px;
}
.mini-recipe {
  display: grid;
  gap: 2px;
  padding: 14px;
  border-radius: 18px;
  text-decoration: none;
  background: var(--tone-bg, var(--sage));
  transition: transform 0.3s var(--ease);
}
.mini-recipe:hover {
  transform: translateY(-2px) rotate(-0.5deg);
}
.mini-recipe-emoji {
  font-size: 26px;
  margin-bottom: 6px;
}
.mini-recipe b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.05;
}
.mini-recipe small {
  color: var(--ink-2);
  font-size: 12.5px;
}
[data-tone="sage"] { --tone-bg: #e3ecdb; --tone-ink: #2f5d42; }
[data-tone="forest"] { --tone-bg: #d6e6d0; --tone-ink: #234a33; }
[data-tone="wheat"] { --tone-bg: #f1e6cc; --tone-ink: #6b5222; }
[data-tone="clay"] { --tone-bg: #f3dccf; --tone-ink: #7c3a22; }
[data-tone="lemon"] { --tone-bg: #f8edbd; --tone-ink: #5f4c10; }
[data-tone="sky"] { --tone-bg: #dbe7ee; --tone-ink: #2b4a5c; }

/* ---------- toolbar ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--paper-2);
}
.segmented a {
  padding: 9px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink-2);
  transition: background 0.25s, color 0.25s;
}
.segmented a.is-on {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 4px 14px -8px rgba(15, 26, 20, 0.4);
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  min-width: min(320px, 100%);
  color: var(--muted);
}
.search input {
  border: 0;
  background: transparent;
  padding: 12px 0;
  flex: 1;
  min-width: 0;
}
.search input:focus {
  outline: none;
}
.search:focus-within {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 4px rgba(55, 107, 76, 0.12);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.toolbar .chips {
  margin: 0;
}
.chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(251, 250, 245, 0.7);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}
.chip span {
  margin-left: 4px;
  opacity: 0.6;
}
.chip.is-on {
  background: var(--forest-2);
  border-color: transparent;
  color: #fff;
}
.groups {
  columns: 2 420px;
  column-gap: 18px;
}
.group {
  break-inside: avoid;
  margin-bottom: 18px;
}
.groups .card + .card {
  margin-top: 0;
}
.group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px 8px;
}
.group-head h2 {
  font-size: 26px;
}
.group-emoji {
  font-size: 20px;
}
.count {
  margin-left: auto;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- shopping ---------- */
.add-bar {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 50px -34px rgba(15, 26, 20, 0.5);
  margin-bottom: 22px;
}
.add-bar input {
  flex: 1.4;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0 16px;
  font-size: 17px;
}
.add-bar .add-amount {
  flex: 1;
  border-left: 1px solid var(--line);
  font-size: 15px;
}
.add-bar input:focus {
  outline: none;
}
.done-card {
  opacity: 0.85;
}

/* ---------- cookbook ---------- */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.recipe-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 50px -36px rgba(15, 26, 20, 0.5);
  text-decoration: none;
  animation: rise 0.5s var(--ease) both;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -34px rgba(15, 26, 20, 0.55);
}
.recipe-card-art {
  height: 130px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.6), transparent 50%),
    var(--tone-bg);
}
.recipe-card-art span {
  font-size: 58px;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.18));
  transition: transform 0.5s var(--ease);
}
.recipe-card:hover .recipe-card-art span {
  transform: scale(1.1) rotate(-6deg);
}
.recipe-card-body {
  display: grid;
  gap: 6px;
  padding: 18px 20px 20px;
  flex: 1;
  align-content: start;
}
.recipe-course {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tone-ink);
}
.recipe-card b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.05;
}
.recipe-desc {
  color: var(--ink-2);
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}
.recipe-meta .have {
  color: var(--forest-2);
  font-weight: 600;
}

/* ---------- recipe ---------- */
.back {
  display: inline-block;
  margin: 6px 0 18px;
  font-weight: 600;
  color: var(--forest-2);
  text-decoration: none;
}
.recipe-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 30px;
  align-items: stretch;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 34px;
  background:
    radial-gradient(80% 90% at 0% 0%, rgba(255, 255, 255, 0.55), transparent 60%),
    var(--tone-bg);
  margin-bottom: 26px;
}
.recipe-hero .kicker {
  color: var(--tone-ink);
}
.recipe-hero h1 {
  font-size: clamp(44px, 5.4vw, 74px);
}
.recipe-hero .lede {
  color: var(--ink-2);
}
.recipe-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}
.recipe-facts span {
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(251, 250, 245, 0.7);
  font-size: 14px;
  color: var(--ink-2);
}
.recipe-facts b {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  color: var(--ink);
}
.recipe-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.notice {
  margin: 14px 0 0;
  font-weight: 600;
  color: var(--forest);
}
.recipe-hero-art {
  border-radius: 26px;
  overflow: hidden;
  min-height: 240px;
  display: grid;
  place-items: center;
  background: rgba(251, 250, 245, 0.5);
}
.recipe-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recipe-hero-art span {
  font-size: clamp(90px, 12vw, 150px);
  filter: drop-shadow(0 24px 24px rgba(0, 0, 0, 0.2));
  animation: bob 8s ease-in-out infinite;
}
.recipe-body {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 26px;
  align-items: start;
}
.ingredients {
  position: sticky;
  top: 24px;
}
.section-title {
  font-size: 34px;
  margin: 10px 0 18px;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}
.steps li {
  display: flex;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  transition: background 0.2s;
}
.steps li:hover {
  background: rgba(251, 250, 245, 0.75);
}
.step-num {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sage);
  color: var(--forest);
  font-family: var(--serif);
  font-size: 22px;
}
.steps p {
  margin: 6px 0 0;
  font-size: 17.5px;
  line-height: 1.55;
}
.step-ings {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- cook mode ---------- */
.cook {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60% 60% at 10% 0%, rgba(169, 210, 154, 0.22), transparent 60%),
    radial-gradient(50% 60% at 100% 100%, rgba(241, 214, 92, 0.16), transparent 60%),
    var(--night);
  color: #eef1ea;
  animation: fade 0.35s ease both;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.cook-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px clamp(20px, 4vw, 48px);
}
.cook-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40%;
}
.cook-progress {
  flex: 1;
  display: flex;
  gap: 5px;
}
.cook-progress i {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.4s;
}
.cook-progress i.is-on {
  background: var(--lemon);
}
.cook-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 20px clamp(20px, 4vw, 48px);
  animation: rise 0.5s var(--ease) both;
}
.cook-step {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a9d29a;
  margin: 0 0 22px;
}
.cook-step span {
  opacity: 0.6;
}
.cook-text {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.12;
  margin: 0;
}
.cook-ings {
  margin-top: 28px;
  font-size: 18px;
  color: #b9c4bc;
}
.cook-foot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 22px clamp(20px, 4vw, 48px) 32px;
}
.cook-foot .btn-lemon {
  min-width: 200px;
  padding: 16px 26px;
  font-size: 17px;
}

/* ---------- mobile top bar ---------- */
.mobile-top {
  display: none;
}
.account.compact .account-btn {
  width: auto;
  padding: 4px;
  border-radius: 999px;
}
.account.compact .account-name {
  display: none;
}
.account.compact .account-menu {
  bottom: auto;
  top: calc(100% + 8px);
  left: auto;
  right: 0;
  width: 240px;
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .kitchen-grid,
  .recipe-body {
    grid-template-columns: 1fr;
  }
  .ingredients {
    position: static;
  }
}
@media (max-width: 860px) {
  .signin {
    grid-template-columns: 1fr;
  }
  .signin-art {
    min-height: 220px;
    padding: 30px;
  }
  .signin-emoji span {
    font-size: 36px !important;
  }
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    top: auto;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
    height: auto;
    z-index: 30;
    padding: 6px;
    border-radius: 999px;
    background: rgba(251, 250, 245, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 50px -20px rgba(15, 26, 20, 0.45);
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
  }
  .sidebar > .wordmark,
  .sidebar-foot {
    display: none;
  }
  .sidebar nav {
    grid-template-columns: repeat(4, 1fr);
  }
  .sidebar nav a {
    flex-direction: column;
    gap: 2px;
    padding: 8px 4px;
    border-radius: 999px;
    font-size: 11.5px;
  }
  .content {
    padding: 8px 16px 120px;
  }
  .mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 0;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat b {
    font-size: 46px;
  }
  .recipe-hero {
    grid-template-columns: 1fr;
  }
  .recipe-hero-art {
    min-height: 160px;
    order: -1;
  }
  .add-bar {
    flex-wrap: wrap;
    border-radius: 24px;
  }
  .add-bar input {
    flex-basis: 100%;
    padding: 12px;
  }
  .add-bar .add-amount {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .add-bar .btn {
    width: 100%;
  }
  .segmented {
    overflow-x: auto;
    max-width: 100%;
  }
  .cook-foot .btn {
    flex: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
