/* ─────────────────────────────────────────────────────────────
   Kubrd · styles.css
   LESSON: CSS is the "paint and furniture." The block below is
   the palette — every color is a named variable (--tomato, etc.)
   so changing one line recolors the whole app. Try changing
   --tomato to #2E86DE and watch Kubrd become a blueberry.
   ───────────────────────────────────────────────────────────── */
:root {
  --cream: #FFF7EC;
  --paper: #FFFDF9;
  --tomato: #E2553A;
  --tomato-dark: #BF3E25;
  --tomato-soft: #FDE4DA;
  --butter: #F7C548;
  --butter-soft: #FFF1C9;
  --basil: #3F8F4E;
  --basil-soft: #E1F1E1;
  --plum: #8E3B6B;
  --cocoa: #3A2A22;
  --cocoa-2: #6F5749;
  --cocoa-3: #A08A7B;
  --line: #EEDFCC;
  --shadow: 0 1px 2px rgba(80, 45, 20, .06), 0 6px 18px rgba(80, 45, 20, .08);
  --radius: 18px;
  --tabbar-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --head: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  color: var(--cocoa);
  /* The WhatsApp-style food doodle wallpaper (pattern.jpg) tiled over cream.
     background-size sets how big one tile looks; smaller = tinier doodles.
     The see-through cream layer on top fades the doodles so text stays easy to read.
     Change .65 to .45 for stronger doodles, or .8 for fainter ones. */
  background:
    linear-gradient(rgba(255, 247, 236, .65), rgba(255, 247, 236, .65)) fixed,
    var(--cream) url("/pattern.jpg") repeat;
  background-size: auto, 520px 520px;
  min-height: 100vh;
  min-height: 100dvh;
  font-size: 16px;
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; margin: 0; line-height: 1.15; }

/* ── Header ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: rgba(255, 247, 236, .86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(238, 223, 204, .7);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand .wordmark { height: 52px; width: auto; flex: none; }
.brand-name { font-family: var(--head); font-weight: 700; font-size: 22px; letter-spacing: .2px; color: var(--tomato-dark); line-height: 1; }
.brand-tag { font-size: 12.5px; color: var(--cocoa-2); line-height: 1.25; max-width: 170px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: transparent; color: var(--cocoa-2);
}
.icon-btn:active { background: var(--tomato-soft); }

/* ── Main area ──────────────────────────────────────────── */
main {
  max-width: 680px; margin: 0 auto;
  padding: 14px 16px calc(var(--tabbar-h) + var(--safe-b) + 96px);
}
.boot { text-align: center; padding: 80px 0; color: var(--cocoa-2); }
.boot img { margin: 0 auto 12px; animation: wobble 1.4s ease-in-out infinite; }
@keyframes wobble { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) scale(1.04); } }

.page-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 2px 12px; }
.page-title h1 { font-size: 28px; }
.page-title .sub { color: var(--cocoa-2); font-size: 14px; }

.section-h {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--head); font-weight: 600; font-size: 18px;
  margin: 22px 2px 10px;
}
.section-h .count { font-family: var(--body); font-size: 13px; font-weight: 700; color: var(--cocoa-3); }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ── Search & chips ─────────────────────────────────────── */
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 0 12px; height: 48px; box-shadow: var(--shadow);
}
.search:focus-within { border-color: var(--tomato); }
.search svg { flex: none; color: var(--cocoa-3); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; height: 100%; min-width: 0; font-size: 16px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1.5px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 14px; white-space: nowrap;
}
.chip.on { background: var(--tomato); border-color: var(--tomato); color: #fff; }
.chip.small { padding: 4px 10px; font-size: 12.5px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 14px; padding: 12px 18px; min-height: 46px;
  font-weight: 800; font-size: 15.5px; background: var(--tomato); color: #fff;
  box-shadow: 0 3px 0 var(--tomato-dark);
  transition: transform .08s;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--tomato-dark); }
.btn.ghost { background: var(--paper); color: var(--cocoa); border: 1.5px solid var(--line); box-shadow: none; }
.btn.green { background: var(--basil); box-shadow: 0 3px 0 #2D6B39; }
.btn.butter { background: var(--butter); color: var(--cocoa); box-shadow: 0 3px 0 #C99A1E; }
.btn.danger { background: var(--paper); color: var(--tomato-dark); border: 1.5px solid var(--tomato-soft); box-shadow: none; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 11px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1; }

/* ── Floating buttons (add + talk) ──────────────────────── */
.fab {
  position: fixed; z-index: 25; right: max(16px, calc(50% - 324px));
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 16px);
  width: 62px; height: 62px; border-radius: 50%; border: 0;
  background: var(--tomato); color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 0 var(--tomato-dark), 0 10px 24px rgba(191, 62, 37, .35);
}
.fab:active { transform: translateY(2px); }
.fab svg { width: 28px; height: 28px; }
.fab.talk { background: var(--basil); box-shadow: 0 4px 0 #2D6B39, 0 10px 24px rgba(63, 143, 78, .35); }
.fab-label {
  position: fixed; z-index: 25; right: calc(max(16px, calc(50% - 324px)) + 72px);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 33px);
  background: var(--cocoa); color: #fff; font-size: 13px; font-weight: 700;
  padding: 5px 10px; border-radius: 10px; pointer-events: none;
}

/* ── Tab bar ────────────────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(255, 253, 249, .94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tabbar button {
  position: relative; border: 0; background: transparent; color: var(--cocoa-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 12px; font-weight: 800;
}
.tabbar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.active { color: var(--tomato); }
.tabbar button.active svg { stroke-width: 2.2; }
.tabbar button.active::before {
  content: ""; position: absolute; top: 0; width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--tomato);
}
.badge {
  position: absolute; top: 8px; left: calc(50% + 8px);
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--tomato); color: #fff; font-size: 11px; font-style: normal; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--paper);
}

/* ── Recipes ────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.rcard { overflow: hidden; text-align: left; padding: 0; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.rcard .ph { aspect-ratio: 4 / 3; background: var(--butter-soft); display: grid; place-items: center; font-size: 44px; overflow: hidden; position: relative; }
.rcard .ph img { width: 100%; height: 100%; object-fit: cover; }
/* The heart on each recipe card. Tap it without opening the recipe. */
.rcard .fav { position: absolute; top: 6px; right: 6px; font-size: 17px; background: rgba(255,255,255,.92); border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.12); cursor: pointer; transition: transform .12s; }
.rcard .fav:active { transform: scale(1.25); }
.rcard .fav:not(.on) { opacity: .85; }
.hero { position: relative; }
.hero-fav { position: absolute; top: 12px; right: 14px; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.94); font-size: 22px; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.hero-fav:active { transform: scale(1.2); }
.rcard .meta { padding: 10px 12px 12px; }
.rcard .name { font-family: var(--head); font-weight: 600; font-size: 16px; line-height: 1.2; }
.rcard .time { font-size: 12.5px; color: var(--cocoa-2); margin-top: 3px; }

.hero { margin: -6px -20px 14px; aspect-ratio: 16 / 10; background: var(--butter-soft); display: grid; place-items: center; font-size: 72px; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; }

.ing-list { list-style: none; padding: 0; margin: 0; }
.ing-list li { padding: 9px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 10px; }
.ing-list li b { min-width: 70px; color: var(--tomato-dark); font-weight: 800; }
.ing-list li .note { color: var(--cocoa-2); }
.steps { padding-left: 0; margin: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 6px 0 12px 40px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 4px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--butter); color: var(--cocoa);
  font-weight: 800; display: grid; place-items: center; font-size: 14px;
}
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); }
.stepper button { width: 40px; height: 40px; border: 0; background: transparent; font-size: 20px; font-weight: 800; color: var(--tomato-dark); }
.stepper span { min-width: 44px; text-align: center; font-weight: 800; }

/* ── Plan ───────────────────────────────────────────────── */
.weeknav { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 12px; }
.weeknav h2 { font-size: 19px; }
.day { padding: 12px 14px; margin-bottom: 10px; }
.day.today { border-color: var(--tomato); box-shadow: 0 0 0 2px var(--tomato-soft), var(--shadow); }
.day-h { display: flex; justify-content: space-between; align-items: center; }
.day-h .dname { font-family: var(--head); font-weight: 600; font-size: 17px; }
.day-h .ddate { color: var(--cocoa-3); font-size: 13px; font-weight: 700; }
.day-empty { color: var(--cocoa-3); font-size: 14px; padding: 6px 0 2px; }
.meal { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-top: 8px; border-radius: 12px; background: var(--cream); border: 0; width: 100%; text-align: left; }
.meal .emo { font-size: 22px; }
.meal .mname { font-weight: 800; }
.meal .mmeta { font-size: 12.5px; color: var(--cocoa-2); }
.meal.cooked { opacity: .55; }
.meal.cooked .mname { text-decoration: line-through; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--butter-soft); color: #8A6410; }
.tag.green { background: var(--basil-soft); color: var(--basil); }
.tag.red { background: var(--tomato-soft); color: var(--tomato-dark); }
.tag.plum { background: #F4E1EC; color: var(--plum); }

/* ── Shopping list ──────────────────────────────────────── */
.adder { display: flex; gap: 8px; align-items: stretch; position: relative; }
.adder .search { flex: 1; min-width: 0; }
.adder .search input::placeholder { text-overflow: ellipsis; }
.qty-in { width: 58px; flex: none; text-align: center; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); font-weight: 800; box-shadow: var(--shadow); }
.adder .btn { flex: none; min-width: 48px; padding: 0 12px; }
.suggest { position: absolute; left: 0; right: 0; top: 54px; z-index: 15; padding: 6px; max-height: 260px; overflow: auto; }
.suggest button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 10px; font-weight: 700; }
.suggest button:active, .suggest button:hover { background: var(--cream); }
.suggest small { color: var(--cocoa-3); font-weight: 600; }
.toolbar { display: flex; gap: 8px; align-items: center; margin: 12px 0 2px; flex-wrap: wrap; }
.select {
  appearance: none; -webkit-appearance: none;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236F5749' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  padding: 9px 34px 9px 12px; font-weight: 700; font-size: 14.5px; min-height: 40px;
}
.items { padding: 4px 0; overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.check {
  flex: none; width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--cocoa-3);
  display: grid; place-items: center; background: var(--paper);
}
.check svg { width: 18px; height: 18px; opacity: 0; stroke: #fff; }
.item.done .check { background: var(--basil); border-color: var(--basil); }
.item.done .check svg { opacity: 1; }
.item .iname { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; padding: 0; }
.item .iname b { font-weight: 800; display: block; }
.item .iname small { color: var(--cocoa-2); font-size: 12.5px; }
.item.done .iname b { text-decoration: line-through; color: var(--cocoa-3); }
.item .q { font-weight: 800; color: var(--tomato-dark); white-space: nowrap; font-size: 14.5px; }
.stop-h { display: flex; align-items: center; gap: 10px; }
.stop-n { width: 30px; height: 30px; border-radius: 50%; background: var(--tomato); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }

/* ── Kitchen ────────────────────────────────────────────── */
.walk { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.walk button {
  border: 0; border-radius: var(--radius); padding: 16px 12px; text-align: left; color: #fff;
  min-height: 104px; display: flex; flex-direction: column; justify-content: space-between;
}
.walk .w1 { background: linear-gradient(160deg, #EE6A4A, #CF4429); box-shadow: 0 4px 0 #A9341E; }
.walk .w2 { background: linear-gradient(160deg, #55A864, #3A8347); box-shadow: 0 4px 0 #2A6334; }
.walk .big { font-size: 28px; }
.walk b { font-family: var(--head); font-weight: 600; font-size: 17px; }
.walk small { opacity: .9; font-size: 12.5px; display: block; }
.lvl { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.lvl-Full, .lvl-Plenty { background: var(--basil-soft); color: var(--basil); }
.lvl-Half { background: var(--butter-soft); color: #8A6410; }
.lvl-Low { background: #FFE2C7; color: #B4561A; }
.lvl-Out { background: var(--tomato-soft); color: var(--tomato-dark); }
.mini-add { border: 1.5px solid var(--tomato-soft); background: var(--paper); color: var(--tomato-dark); border-radius: 10px; padding: 4px 9px; font-weight: 800; font-size: 13px; }
.store-row { display: flex; align-items: center; gap: 12px; padding: 14px; border: 0; background: transparent; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.store-row:last-child { border-bottom: 0; }
.store-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--butter-soft); display: grid; place-items: center; font-size: 22px; flex: none; }

/* ── Empty states (where the jokes live) ────────────────── */
.empty { text-align: center; padding: 34px 20px; }
.empty .e-emoji { font-size: 54px; }
.empty h3 { font-size: 20px; margin: 10px 0 6px; }
.empty p { color: var(--cocoa-2); margin: 0 auto 16px; max-width: 340px; }

/* ── Bottom sheets (the pop-up panels) ──────────────────── */
.sheet-wrap {
  position: fixed; inset: 0; z-index: 60; background: rgba(58, 42, 34, .42);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .18s ease;
}
.sheet {
  width: 100%; max-width: 680px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(24px + var(--safe-b));
  animation: up .24s cubic-bezier(.2, .9, .3, 1.1);
}
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sheet-h h2 { font-size: 22px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 800; font-size: 13.5px; margin: 0 0 6px 2px; color: var(--cocoa-2); }
.input, .textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
  padding: 11px 12px; font-size: 16px; outline: 0;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--tomato); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
.hint { font-size: 13px; color: var(--cocoa-2); }

.option-btn {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  border: 1.5px solid var(--line); background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 10px;
}
.option-btn .oi { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--butter-soft); flex: none; }
.option-btn b { display: block; font-size: 16px; }
.option-btn small { color: var(--cocoa-2); }

.review-row { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 8px; background: #fff; }
.review-row.off { opacity: .45; }
.review-row .row { margin-top: 8px; gap: 6px; }
.review-row .input, .review-row .select { padding: 8px 10px; min-height: 38px; font-size: 15px; }
.review-top { display: flex; gap: 10px; align-items: center; }
.review-top .input { flex: 1; font-weight: 700; }

/* ── Busy overlay, recorder, toasts ──────────────────────── */
.busy {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(255, 247, 236, .94); backdrop-filter: blur(4px); text-align: center; padding: 24px;
}
.busy .food { font-size: 58px; animation: bounce 1s ease-in-out infinite; }
.busy h3 { font-size: 21px; margin: 14px 0 6px; }
.busy p { color: var(--cocoa-2); margin: 0; min-height: 24px; }
@keyframes bounce { 0%,100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-14px) rotate(8deg); } }

.rec {
  position: fixed; inset: 0; z-index: 85; background: rgba(58, 42, 34, .6);
  display: flex; align-items: flex-end; justify-content: center;
}
.rec-card { width: 100%; max-width: 680px; background: var(--paper); border-radius: 26px 26px 0 0; padding: 26px 22px calc(26px + var(--safe-b)); text-align: center; }
.rec-card h3 { font-size: 21px; }
.rec-card p { color: var(--cocoa-2); margin: 6px 0 18px; }
.mic {
  width: 104px; height: 104px; border-radius: 50%; border: 0; margin: 0 auto;
  background: var(--tomato); color: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 0 rgba(226, 85, 58, .5); animation: pulse 1.4s infinite;
}
.mic svg { width: 44px; height: 44px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(226, 85, 58, .55); } 70% { box-shadow: 0 0 0 26px rgba(226, 85, 58, 0); } 100% { box-shadow: 0 0 0 0 rgba(226, 85, 58, 0); } }
.timer { font-family: var(--head); font-size: 26px; margin: 14px 0 4px; }
.link-btn { border: 0; background: transparent; color: var(--tomato-dark); font-weight: 800; text-decoration: underline; padding: 10px; }

#toasts { position: fixed; left: 0; right: 0; top: calc(70px + env(safe-area-inset-top, 0px)); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast {
  max-width: 520px; background: var(--cocoa); color: #fff; padding: 12px 16px; border-radius: 14px;
  font-weight: 700; font-size: 14.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); animation: up .25s ease; pointer-events: auto;
}
.toast.err { background: var(--tomato-dark); }
.toast.ok { background: var(--basil); }

.footer { text-align: center; font-size: 12.5px; color: var(--cocoa-3); margin: 34px 0 0; }
.footer a { color: var(--cocoa-2); font-weight: 800; text-decoration: none; }

.lock { max-width: 360px; margin: 50px auto; text-align: center; padding: 28px 22px; }
.lock img { margin: 0 auto 12px; }
.demo-banner { background: var(--butter); color: var(--cocoa); text-align: center; font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 12px; margin-bottom: 10px; }
.muted { color: var(--cocoa-2); }
.center { text-align: center; }
.mt { margin-top: 14px; }
.spacer { height: 10px; }
.review-row .select { padding-right: 26px; background-position: right 8px center; }

/* ── Recipe developers, category picker, settings switches ── */
/* LESSON: .seg is a "segmented control", two buttons that act like one switch. */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 12px; padding: 4px; background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; }
.seg button { border: 0; background: transparent; border-radius: 10px; padding: 8px 6px; font-weight: 800; font-size: 14px; color: var(--cocoa-2); }
.seg button.on { background: var(--tomato); color: #fff; box-shadow: 0 2px 0 var(--tomato-dark); }
.rcard .by { font-size: 12.5px; color: var(--tomato-dark); font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-line { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 4px 2px; font-size: 15px; color: var(--cocoa-2); }
.dev-line b { color: var(--cocoa); }
.dev-line.need { background: var(--butter-soft); border-radius: 12px; padding: 10px 12px; color: #8A6410; }
.picker-btn { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px; font-size: 15.5px; }
.picker-btn .chev { margin-left: auto; color: var(--tomato-dark); font-weight: 800; font-size: 13.5px; }
.picker-btn.need { border: 2px dashed var(--butter); background: var(--butter-soft); color: #8A6410; font-weight: 700; }
.pick { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 13px 14px; font-weight: 700; font-size: 15.5px; }
.pick:last-child { border-bottom: 0; }
.pick small { color: var(--cocoa-3); font-weight: 600; margin-left: 4px; }
.pick.on { background: var(--tomato-soft); color: var(--tomato-dark); }
.pick.on::after { content: " ✓"; }
.pick.add { color: var(--basil); }
.group-h { font-family: var(--head); font-weight: 600; font-size: 15px; color: var(--cocoa-2); margin: 16px 2px 8px; }
.sticky-done { position: sticky; bottom: calc(-24px - var(--safe-b)); background: var(--paper); padding: 12px 0 4px; margin-top: 12px; }
.mrow.off .iname b { color: var(--cocoa-3); }
/* An on/off switch, drawn entirely with CSS. The <i> is the little knob. */
.switch { flex: none; width: 48px; height: 28px; border-radius: 14px; border: 0; background: #DCCFC2; position: relative; transition: background .15s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .15s; }
.switch.on { background: var(--basil); }
.switch.on i { left: 23px; }
.switch[disabled] { opacity: .5; }

[hidden] { display: none !important; }
.recipe-quip { margin: -2px 2px 6px; font-style: italic; color: var(--cocoa-2); font-size: 14px; }

/* ── Printable week ── */
#printSheet { display: none; }
@page { margin: 0.6in; }
@media print {
  body.printing > *:not(#printSheet) { display: none !important; }
  body.printing { background: #fff !important; }
  body.printing #printSheet { display: block; font-family: var(--body); color: #000; }
  #printSheet .ph-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
  #printSheet .ph-head img { height: 60px; }
  #printSheet h1 { font-size: 26px; margin: 0; }
  #printSheet .ph-head p { margin: 2px 0 0; color: #555; }
  #printSheet table { width: 100%; border-collapse: collapse; }
  #printSheet th, #printSheet td { border: 1.5px solid #bbb; padding: 10px 12px; vertical-align: top; text-align: left; }
  #printSheet th { width: 26%; font-family: var(--head); font-size: 17px; background: #FFF4E6; }
  #printSheet th small { display: block; font-family: var(--body); font-size: 12px; color: #666; font-weight: 600; }
  #printSheet .pm { padding: 3px 0; font-size: 15px; }
  #printSheet .pm span { color: #666; }
  #printSheet .pm.empty { color: #888; font-style: italic; }
  #printSheet tr { break-inside: avoid; }
  #printSheet td { height: 64px; }
  #printSheet .ph-foot { margin-top: 14px; font-size: 12px; color: #777; text-align: center; }
}
/* Amounts written into recipe steps */
.steps .amt { color: var(--tomato-dark); font-weight: 800; background: var(--tomato-soft); border-radius: 6px; padding: 0 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Recipe page: "add a photo of the finished dish" button sitting on the picture */
.hero-emoji { font-size: 72px; }
.hero-photo { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); border: 0; border-radius: 999px; background: rgba(58, 42, 34, .82); color: #fff; font-weight: 800; font-size: 14px; padding: 9px 16px; white-space: nowrap; }
.hero-photo.small { left: auto; right: 14px; transform: none; font-size: 12.5px; padding: 6px 12px; background: rgba(58, 42, 34, .65); }

/* ── Accounts, test families ── */
.beta-banner { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 2px dashed var(--plum); background: #F4E1EC; color: var(--plum); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.me-card { background: var(--cream); border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.me-card b { display: block; font-family: var(--head); font-weight: 600; font-size: 17px; }
.me-card small { color: var(--cocoa-2); }
.lock .input { text-align: left; }
a.btn { text-decoration: none; }
