:root {
  --lime: #96c93d;
  --lime-deep: #6fa22b;
  --lime-soft: #eef6dd;
  --green: #0e5e3a;
  --green-ink: #0a3d27;
  --cream: #f7f5ee;
  --card: #ffffff;
  --ink: #1d2a22;
  --muted: #66705f;
  --line: #e4e7dc;
  --tomato: #e4573d;
  --tomato-soft: #fde9e4;
  --sun: #ffd84d;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(14 61 39 / 6%), 0 6px 20px rgb(14 61 39 / 7%);
  --tabbar-h: 72px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 500 16px/1.45 Nunito, ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100dvh;
}
body.signed-in { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); }
img { max-width: 100%; display: block; }
a { color: var(--green); }
h1, h2, h3 { font-weight: 900; letter-spacing: -0.02em; color: var(--green-ink); margin: 0; line-height: 1.15; }
h1 { font-size: clamp(26px, 7vw, 34px); }
h2 { font-size: 20px; }
p { margin: 0; }

/* ---- Top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: rgb(247 245 238 / 92%);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; text-decoration: none; }
.logo { height: 34px; width: auto; }
.icon-link { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--green); }
.icon-link:hover, .icon-link.active { background: var(--lime-soft); }

.page { max-width: 720px; margin: 0 auto; padding: 20px 16px 24px; }
.page-head { margin-bottom: 18px; }
.page-head .lede { margin-top: 6px; }
.lede { color: var(--muted); font-size: 17px; }
.fine { color: var(--muted); font-size: 14px; margin-top: 10px; }
.muted { color: var(--muted); }
.back { display: inline-block; margin-bottom: 12px; font-weight: 800; text-decoration: none; }

.icon { width: 24px; height: 24px; flex: none; }
.icon-sm { width: 16px; height: 16px; flex: none; vertical-align: -3px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border: 0; border-radius: 999px;
  background: var(--lime); color: var(--green-ink);
  font: 900 17px/1 Nunito, system-ui, sans-serif;
  text-decoration: none; cursor: pointer;
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 12%);
  transition: transform .12s ease, background .15s ease;
}
.btn:hover { background: #a3d34c; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn.wide { width: 100%; margin-top: 18px; }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 15px; }
.btn.ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { background: var(--lime-soft); }
.btn.danger { color: var(--tomato); }
.btn.google { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line), var(--shadow); width: 100%; max-width: 360px; }
.link-button { background: none; border: 0; padding: 6px 0; color: var(--green); font: 800 15px Nunito, system-ui, sans-serif; cursor: pointer; }

/* htmx indicators: CSP blocks htmx's inline styles. */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-flex; align-items: center; gap: 10px; }
.htmx-request .when-idle { display: none; }
.spinner {
  display: inline-block; width: 18px; height: 18px; flex: none;
  border: 3px solid rgb(14 94 58 / 20%); border-top-color: var(--green);
  border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Panels ---- */
.panel { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-top: 16px; }
.panel.center { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 32px 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.alert { background: var(--tomato-soft); color: #9b2c17; padding: 12px 14px; border-radius: 12px; font-weight: 700; margin: 12px 0; }
.alert-inline { color: #b33a22; font-weight: 800; margin-top: 12px; min-height: 0; }
.alert-inline:empty { display: none; }
.toast { background: var(--lime-soft); color: var(--green); font-weight: 800; padding: 10px 14px; border-radius: 12px; }

/* ---- Login hero ---- */
.hero { display: grid; gap: 16px; justify-items: center; text-align: center; padding: 12px 4px 24px; }
.hero h1 { font-size: clamp(32px, 9vw, 44px); max-width: 12ch; }
.hero .hl { color: var(--lime-deep); }
.hero .lede { max-width: 34ch; }
.hero-art { position: relative; width: 220px; height: 170px; margin-bottom: 4px; }
.blob { position: absolute; border-radius: 50%; }
.b1 { width: 150px; height: 150px; left: 35px; top: 10px; background: var(--lime); }
.b2 { width: 70px; height: 70px; left: 6px; top: 86px; background: var(--green); }
.b3 { width: 46px; height: 46px; right: 10px; top: 2px; background: var(--sun); }
.price-tag {
  position: absolute; right: 0; bottom: 14px; padding: 8px 14px;
  background: #fff; color: var(--tomato); font-weight: 900; font-size: 22px;
  border-radius: 12px; box-shadow: var(--shadow); transform: rotate(-6deg);
}

/* ---- Recipes ---- */
.promo {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--green); color: #fff; text-decoration: none; margin-bottom: 16px;
}
.promo.muted { background: var(--lime-soft); color: var(--green-ink); }
.promo strong { display: block; font-weight: 900; font-size: 17px; }
.recipe-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.recipe-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; }
.recipe-card .card-link { display: flex; flex: 1; color: inherit; text-decoration: none; min-width: 0; }
.recipe-card .thumb { width: 108px; flex: none; background: var(--lime-soft); }
.recipe-card .thumb img { width: 100%; height: 100%; object-fit: cover; min-height: 108px; }
.recipe-card .body { padding: 12px 14px; display: grid; gap: 4px; align-content: center; min-width: 0; }
.recipe-card .title { font-weight: 900; font-size: 17px; color: var(--green-ink); line-height: 1.2; }
.recipe-card .subtitle { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 14px; font-weight: 700; }
.meta span { display: inline-flex; align-items: center; gap: 4px; }
.recipe-card.processing .thumb img { filter: saturate(.3) opacity(.7); }
.recipe-card.failed { box-shadow: inset 0 0 0 2px var(--tomato-soft), var(--shadow); }
.row-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }

.empty { text-align: center; display: grid; justify-items: center; gap: 10px; padding: 36px 16px; }
.empty p { color: var(--muted); max-width: 32ch; }
.empty-art { width: 88px; height: 88px; border-radius: 28px; background: var(--lime); color: var(--green-ink); display: grid; place-items: center; margin-bottom: 6px; }
.empty-art .icon { width: 44px; height: 44px; }

/* ---- Snap ---- */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shot {
  position: relative; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--card); box-shadow: inset 0 0 0 2px dashed var(--line), var(--shadow);
  border: 2px dashed #c9d3b4;
}
.shot input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.shot-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center; padding: 12px; color: var(--green); pointer-events: none; }
.shot-empty .icon { width: 40px; height: 40px; margin: 6px 0; }
.shot-empty strong { font-size: 18px; font-weight: 900; color: var(--green-ink); }
.shot-empty small { color: var(--muted); font-weight: 700; }
.shot-step { width: 28px; height: 28px; border-radius: 50%; background: var(--lime); color: var(--green-ink); font-weight: 900; display: grid; place-items: center; }
.shot-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; pointer-events: none; }
.shot-retake { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgb(10 61 39 / 85%); color: #fff; font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 999px; display: none; pointer-events: none; }
.shot.has-photo { border-style: solid; border-color: var(--lime); }
.shot.has-photo .shot-preview, .shot.has-photo .shot-retake { display: block; }
.shot.has-photo .shot-empty { display: none; }

/* ---- Recipe detail ---- */
.recipe-hero { margin: 0 -16px; }
.recipe-hero img { width: 100%; max-height: 360px; object-fit: cover; }
@media (min-width: 752px) { .recipe-hero { margin: 0; } .recipe-hero img { border-radius: var(--radius); } }
.recipe-head { padding-top: 16px; display: grid; gap: 6px; }
.recipe-head .subtitle { color: var(--muted); font-size: 18px; font-weight: 700; }
.tag { background: var(--lime-soft); color: var(--green); padding: 2px 10px; border-radius: 999px; }
.segmented { display: inline-flex; background: var(--cream); border-radius: 999px; padding: 4px; gap: 2px; }
.segmented a, .segmented span { padding: 6px 12px; border-radius: 999px; font-weight: 800; font-size: 14px; text-decoration: none; color: var(--muted); }
.segmented a.on, .segmented input:checked + span { background: var(--card); color: var(--green-ink); box-shadow: var(--shadow); }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; }
.segmented.big span { display: block; padding: 10px 18px; font-size: 16px; cursor: pointer; }
.ingredients { list-style: none; padding: 0; margin: 0; }
.ingredients li { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.ingredients li:first-child { border-top: 0; }
.ing-name { font-weight: 700; }
.ing-qty { color: var(--muted); font-weight: 800; font-size: 14px; white-space: nowrap; }
.pantry .ing-name { color: var(--muted); }
.chip { border: 0; border-radius: 999px; padding: 4px 10px; font: 800 12px Nunito, system-ui, sans-serif; background: var(--lime-soft); color: var(--green); cursor: pointer; }
.pantry .chip { background: #f1efe6; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #c5c9bc; }
.cat-produce { background: var(--lime); }
.cat-protein { background: var(--tomato); }
.cat-dairy { background: #8ec5e8; }
.cat-grains { background: #e8c27a; }
.cat-sauces { background: #b5815a; }
.cat-spices { background: #e6913a; }
.cat-pantry { background: #c5c9bc; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.step-n { width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 900; display: grid; place-items: center; }
.steps strong { display: block; color: var(--green-ink); font-weight: 900; }
.steps p { color: #3a463d; }
details.panel summary { font-weight: 900; color: var(--green-ink); cursor: pointer; }
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.photo-pair img { border-radius: 12px; aspect-ratio: 3/4; object-fit: cover; width: 100%; }
.danger-row { display: flex; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* ---- Plan ---- */
.pick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pick-list label { display: grid; grid-template-columns: 24px 52px 1fr; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; cursor: pointer; }
.pick-list label:has(input:checked) { background: var(--lime-soft); }
.pick-list input { width: 22px; height: 22px; accent-color: var(--green); }
.pick-list img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.pick-list strong { display: block; font-weight: 900; color: var(--green-ink); line-height: 1.2; }
.pick-list small { color: var(--muted); font-size: 13px; }
.past { margin-top: 28px; }
.plan-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.plan-list a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); text-decoration: none; color: inherit; }
.plan-when { grid-column: 1 / -1; color: var(--muted); font-size: 13px; font-weight: 800; }
.plan-what { font-weight: 800; color: var(--green-ink); }
.save-pill { align-self: center; background: var(--sun); color: var(--green-ink); font-weight: 900; font-size: 13px; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.save-pill.no { background: #f1efe6; color: var(--muted); }

.thinking { text-align: center; padding: 40px 12px; display: grid; gap: 12px; justify-items: center; }
.thinking p { color: var(--muted); max-width: 36ch; }
.thinking-art { display: flex; gap: 10px; margin-bottom: 8px; }
.thinking-art span { width: 22px; height: 22px; border-radius: 50%; background: var(--lime); animation: bounce 1.1s ease-in-out infinite; }
.thinking-art span:nth-child(2) { background: var(--green); animation-delay: .15s; }
.thinking-art span:nth-child(3) { background: var(--sun); animation-delay: .3s; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px); } }

.verdict { border-radius: 24px; padding: 22px 20px; color: #fff; background: var(--green); display: grid; gap: 8px; position: relative; overflow: hidden; }
.verdict::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: var(--lime); opacity: .35; }
.verdict.lose { background: #5b6157; }
.verdict h1 { color: #fff; font-size: clamp(32px, 9vw, 42px); position: relative; z-index: 1; }
.verdict h1 small { font-size: .5em; opacity: .85; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 900; color: var(--lime); position: relative; z-index: 1; }
.verdict .headline { font-weight: 800; font-size: 18px; position: relative; z-index: 1; }
.compare { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; position: relative; z-index: 1; }
.compare div { background: rgb(255 255 255 / 12%); border-radius: 14px; padding: 10px; display: grid; gap: 2px; }
.compare span { font-size: 12px; font-weight: 800; opacity: .85; }
.compare strong { font-size: 19px; font-weight: 900; }
.strike { text-decoration: line-through; text-decoration-color: var(--sun); text-decoration-thickness: 2px; }

.meal-row { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.meal-row a { display: grid; gap: 6px; text-decoration: none; color: var(--green-ink); font-weight: 800; font-size: 14px; line-height: 1.2; }
.meal-row img { aspect-ratio: 1; object-fit: cover; border-radius: 14px; width: 100%; box-shadow: var(--shadow); }
.why { margin-top: 14px; font-size: 16px; }
.shared { margin-top: 8px; color: var(--muted); font-size: 15px; }
.shared strong { color: var(--green-ink); }
.shopping .total { font-weight: 900; font-size: 20px; color: var(--green-ink); }
.section-name { text-transform: capitalize; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--lime-deep); margin: 14px 0 4px; }
.shop-items { list-style: none; padding: 0; margin: 0; }
.shop-items li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.shop-items li:first-child { border-top: 0; }
.shop-check { position: relative; width: 24px; height: 24px; }
.shop-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.shop-check span { display: block; width: 24px; height: 24px; border-radius: 8px; box-shadow: inset 0 0 0 2px #c9d3b4; pointer-events: none; }
.shop-check input:checked + span { background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%230a3d27' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat; box-shadow: none; }
li:has(.shop-check input:checked) .shop-main { opacity: .45; text-decoration: line-through; }
.shop-main { display: grid; min-width: 0; }
.shop-name { font-weight: 800; }
.shop-pack { color: var(--muted); font-size: 13px; }
.shop-price { font-weight: 900; color: var(--green-ink); }
.swaps { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.others { margin-top: 28px; }
.other summary { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; list-style: none; }
.other summary::-webkit-details-marker { display: none; }
.other-price { font-weight: 900; color: var(--green-ink); }
.notes { text-align: center; }

/* ---- Settings ---- */
.form { display: grid; gap: 16px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.form legend, .field > span:first-child { font-weight: 900; color: var(--green-ink); font-size: 15px; margin-bottom: 6px; }
.field { display: grid; gap: 0; }
.field input, .field textarea {
  width: 100%; font: 700 17px Nunito, system-ui, sans-serif; color: var(--ink);
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--lime); }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.money-input { position: relative; display: block; }
.money-input > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 900; color: var(--muted); }
.money-input input { padding-left: 30px; }
.form .fine { margin-top: -8px; }
.signout-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.signout-row .fine { margin: 0; }

/* ---- Tab bar ---- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end;
  padding: 8px max(16px, calc(50% - 300px)) calc(8px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgb(14 61 39 / 6%);
}
.tab { display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-weight: 800; font-size: 12px; padding: 4px 12px; }
.tab.active { color: var(--green); }
.tab.snap { margin-top: -30px; color: var(--green-ink); }
.snap-bubble { width: 62px; height: 62px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; box-shadow: 0 0 0 5px #fff, 0 8px 18px rgb(111 162 43 / 45%); transition: transform .15s ease; }
.tab.snap:active .snap-bubble { transform: scale(.94); }
.snap-bubble .icon { width: 30px; height: 30px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Small fixes ---- */
.promo .btn { white-space: nowrap; flex: none; }
.field-pair { align-items: end; }
.hero .hl { white-space: nowrap; }
.hero h1 { max-width: 14ch; }
.recipe-card .meta { overflow-wrap: anywhere; }

/* ---- Must-have stars ---- */
.pick-row { display: flex; align-items: center; gap: 4px; }
.pick-row > label:first-child { flex: 1; min-width: 0; }
.star { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; cursor: pointer; border-radius: 50%; }
.star input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.star svg { width: 26px; height: 26px; fill: none; stroke: #a3ab97; stroke-width: 1.8; stroke-linejoin: round; pointer-events: none; transition: transform .15s ease; }
.star input:checked + svg { fill: var(--sun); stroke: #b38b00; transform: scale(1.08); }
.star input:focus-visible + svg { outline: 2px solid var(--green); border-radius: 6px; }
.pick-row:has(.star input:checked) > label:first-child { background: #fff6d1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Swaps ---- */
.swap-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--lime-soft); color: var(--green-ink); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-weight: 700; }
.swap-banner a { font-weight: 900; white-space: nowrap; }
.swap-banner .up { color: #9b2c17; font-weight: 900; }
.swap-banner .down { color: #3f6b12; font-weight: 900; }
.must-line { color: var(--muted); font-weight: 800; font-size: 14px; margin: 0 0 12px; }
.meal-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.meal-list li { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 16px; padding: 8px 10px 8px 8px; box-shadow: var(--shadow); }
.meal-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--green-ink); text-decoration: none; font-weight: 900; line-height: 1.2; }
.meal-link img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; }
.btn.soft { background: var(--lime-soft); color: var(--green); box-shadow: none; }
.btn.soft:hover { background: #e2efc9; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgb(10 61 39 / 38%); display: flex; flex-direction: column; justify-content: flex-end; animation: fade .18s ease; }
.sheet-dismiss { flex: 1; border: 0; background: transparent; cursor: pointer; }
.sheet { background: #fff; border-radius: 24px 24px 0 0; padding: 10px 16px calc(24px + env(safe-area-inset-bottom)); max-height: 82dvh; overflow-y: auto; width: 100%; max-width: 720px; margin: 0 auto; animation: rise .22s ease; }
.sheet h2 { font-size: 22px; margin-top: 6px; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: #dce0d3; margin: 0 auto 6px; }
.sheet-claude .btn.wide { margin-top: 14px; }
.swap-options { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.swap-option { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 16px; padding: 8px 10px; cursor: pointer; font: inherit; color: inherit; }
.swap-option:hover { border-color: var(--lime); }
.swap-option img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex: none; }
.swap-text { flex: 1; min-width: 0; display: grid; }
.swap-text strong { color: var(--green-ink); font-weight: 900; }
.swap-text small { color: var(--muted); font-size: 13px; }
.swap-go { font-weight: 900; color: var(--green); font-size: 14px; white-space: nowrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: .6; } }
.compare.two { grid-template-columns: repeat(2, 1fr); }
.recipe-card.manual { box-shadow: inset 0 0 0 2px var(--lime-soft), var(--shadow); }
.recipe-card.manual .btn { justify-self: start; margin-top: 4px; }
.edit-photos { margin-bottom: 4px; }
.edit-photos img { aspect-ratio: 4/3; max-height: 180px; }

/* ---- OCR and comparing readings ---- */
.ocr-panel { display: grid; gap: 12px; }
.ocr-stage { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 18px; color: var(--green-ink); }
.ocr-bar { height: 10px; border-radius: 5px; background: var(--lime-soft); overflow: hidden; }
.ocr-bar div { height: 100%; width: 3%; background: var(--lime); border-radius: 5px; transition: width .3s ease; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.stat-row div { background: var(--card); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); display: grid; }
.stat-row span { font-size: 12px; font-weight: 800; color: var(--muted); }
.stat-row strong { font-size: 24px; font-weight: 900; color: var(--green-ink); }
.compare-table { padding: 6px 14px; }
.compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 9px 4px; border-top: 1px solid var(--line); }
.compare-row.head { border-top: 0; font-size: 12px; font-weight: 900; letter-spacing: .08em; color: var(--lime-deep); }
.compare-row.differs { background: #fffbea; }
.compare-row div { display: grid; min-width: 0; }
.compare-row strong { font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
.compare-row small { color: var(--muted); font-size: 12px; }
.compare-row .missing { color: #a3ab97; }
.use-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.use-row .btn { width: 100%; }
.plain-list { margin: 8px 0 0; padding-left: 18px; }
.link-panel { display: block; font-weight: 900; text-decoration: none; color: var(--green); }
