/* 食序 Mise website.
   Colors, type, radii and components come from the app (agents.md, Design Direction).
   Layout follows the width of the page itself through container queries. */

/* —— Fonts ——
   Chinese: Resource Han Rounded (SIL OFL 1.1), subset to the characters on this site by tools/subset_fonts.py.
   Rules overlap on purpose: a browser checks the last rule first, so English pages load only the tiny "core"
   faces for 中文 and 食序, and never the full Chinese ones.
   Latin and numbers: SF Pro Rounded where the system has it, through ui-rounded; Nunito (SIL OFL 1.1) elsewhere. */
@font-face { font-family: "Nunito"; src: url(fonts/nunito-latin.woff2) format("woff2"); font-weight: 400 800; font-display: swap; 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: "Resource Han Rounded"; src: url(fonts/rhr-zh-400.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+3000-303F, U+4E00-9FFF, U+FF00-FFEF; }
@font-face { font-family: "Resource Han Rounded"; src: url(fonts/rhr-zh-500.woff2) format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+3000-303F, U+4E00-9FFF, U+FF00-FFEF; }
@font-face { font-family: "Resource Han Rounded"; src: url(fonts/rhr-zh-700.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+3000-303F, U+4E00-9FFF, U+FF00-FFEF; }
@font-face { font-family: "Resource Han Rounded"; src: url(fonts/rhr-core-400.woff2) format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+4E2D, U+6587, U+98DF, U+5E8F; }
@font-face { font-family: "Resource Han Rounded"; src: url(fonts/rhr-core-700.woff2) format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+4E2D, U+6587, U+98DF, U+5E8F; }

/* —— Tokens: the app's matcha palette, light and dark —— */
:root {
  color-scheme: light dark;
  --bg: #F4F2E8;
  --bg2: #E8E5D6;
  --card: #FFFDF6;
  --ink: #2A2B1F;
  --ink2: #66665A;
  --line: rgba(42, 43, 31, 0.12);
  --line2: rgba(42, 43, 31, 0.22);
  --pri: #536F30;
  --pri-fill: #536F30;
  --pri-soft: rgba(83, 111, 48, 0.13);
  --on-c: #FFFFFF;
  --ok: #4A7F57;
  --warn: #7E5210;
  --shadow: rgba(50, 50, 20, 0.13);
  --panel-shadow: rgba(50, 50, 20, 0.13);
  --c-produce: #3F6A2E;
  --c-protein: #9A3550;
  --c-pantry: #7A5218;
  --c-season: #5E4A86;
  --f: "Resource Han Rounded", "SF Pro Rounded", ui-rounded, "Nunito", "PingFang SC", "Noto Sans SC", sans-serif;
  --f-num: "SF Pro Rounded", ui-rounded, "Nunito", "PingFang SC", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13140E;
    --bg2: #24261B;
    --card: #1B1C14;
    --ink: #EEEEDF;
    --ink2: #ABAB98;
    --line: rgba(238, 238, 223, 0.12);
    --line2: rgba(238, 238, 223, 0.24);
    --pri: #A9C77F;
    --pri-fill: #5F7F37;
    --pri-soft: rgba(169, 199, 127, 0.16);
    --on-c: #13140E;
    --ok: #7FA86A;
    --warn: #E5AE62;
    --shadow: rgba(0, 0, 0, 0.45);
    --panel-shadow: rgba(0, 0, 0, 0.45);
    --c-produce: #8DBA74;
    --c-protein: #E68CA2;
    --c-pantry: #D8A65E;
    --c-season: #AC9BDC;
  }
}

html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
*, *::before, *::after { box-sizing: border-box; }
:where(h1, h2, h3, p, ul, ol) { margin: 0; padding: 0; }
:where(ul, ol) { list-style: none; }
:where(a) { color: inherit; text-decoration: none; }
:where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:where(img) { display: block; }
:focus-visible { outline: 2px solid var(--pri); outline-offset: 2px; border-radius: 8px; }

.site {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  container: site / inline-size;
  overflow: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}
.site > main { flex: 1 0 auto; }

.c-produce { --c: var(--c-produce); }
.c-protein { --c: var(--c-protein); }
.c-pantry { --c: var(--c-pantry); }
.c-season { --c: var(--c-season); }
.c-pri { --c: var(--pri); }
.c-warn { --c: var(--warn); }

/* —— Small parts, at the app's sizes —— */
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 16px; height: 16px; }
.num { font-family: var(--f-num); font-variant-numeric: lining-nums tabular-nums; }
.ib { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 22px; color: var(--ink); }
.chip { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 13px; border-radius: 18px; font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap; color: var(--c, var(--ink)); background: color-mix(in srgb, var(--c, var(--ink)) 9%, transparent); }
.chip .i { width: 15px; height: 15px; }
.chip.on { background: var(--c, var(--pri)); color: var(--on-c); }
.chip .n { font-family: var(--f-num); font-size: 12px; opacity: 0.8; }
.badge { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 8px; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; color: var(--c, var(--ink2)); background: color-mix(in srgb, var(--c, var(--ink2)) 12%, transparent); }
.badge .i { width: 12px; height: 12px; stroke-width: 2; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 19px; background: var(--bg2); }
.seg > * { position: relative; height: 32px; min-width: 40px; padding: 0 12px; border-radius: 16px; font-size: 13px; font-weight: 600; color: var(--ink2); display: inline-flex; align-items: center; justify-content: center; }
.seg > .on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px var(--shadow); }
.seg .i { width: 17px; height: 17px; }
.chk { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.chk span { width: 26px; height: 26px; border-radius: 13px; box-shadow: inset 0 0 0 1.6px var(--line2); display: inline-flex; align-items: center; justify-content: center; color: #FFFFFF; }
.chk .i { width: 15px; height: 15px; stroke-width: 2.4; opacity: 0; }
.chk.on span { background: var(--ok); box-shadow: none; }
.chk.on .i { opacity: 1; }
.cat-ic { width: 34px; height: 34px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.cat-ic .i { width: 18px; height: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px; border-radius: 25px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.btn.pri { background: var(--pri-fill); color: #FFFFFF; box-shadow: 0 6px 16px color-mix(in srgb, var(--pri-fill) 28%, transparent); }
.fine { font-size: 13px; color: var(--ink2); }

/* —— Header —— */
.wrap { width: 100%; max-width: 1184px; margin: 0 auto; padding: 0 32px; }
.top { display: flex; align-items: center; gap: 8px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; height: 44px; margin-right: auto; font-size: 20px; font-weight: 700; letter-spacing: 0.01em; }
.app-icon { border-radius: 22.37%; box-shadow: 0 0 0 1px var(--line); }
.nav { display: flex; align-items: center; }
.nav a { height: 44px; padding: 0 14px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 500; color: var(--ink2); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--pri); }
.lang { margin-left: 8px; }
.lang a::after { content: ""; position: absolute; inset: -6px 0; }

.zh h1, .zh h2, .zh h3 { letter-spacing: 0.02em; }

/* —— First screen —— */
.hero { text-align: center; padding-top: clamp(20px, 3.4cqw, 48px); }
.hero h1 { font-size: clamp(52px, 5.3cqw, 76px); line-height: 1.08; font-weight: 700; letter-spacing: -0.012em; }
.zh .hero h1 { letter-spacing: 0.02em; }
.lede { margin: clamp(14px, 1.5cqw, 22px) auto 0; max-width: 34em; font-size: clamp(17px, 1.46cqw, 21px); line-height: 1.5; color: var(--ink2); text-wrap: balance; }
.get { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: clamp(20px, 2cqw, 28px); }
.store { display: block; border-radius: 8px; }
.store img { height: 48px; width: auto; }

/* The palette: a large plate in the middle, small plates climbing an arc on both sides. */
.stage { --w: min(100cqw, 1680px); --d: clamp(170px, calc(var(--w) * .178), 296px); position: relative; height: var(--d); margin-top: clamp(28px, 3.4cqw, 52px); }
.arc { position: absolute; inset: 0; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.arc.dragging, .arc.dragging .p { cursor: grabbing; }
/* assets/site.js places the plates once it runs. These slots are where they sit before that. */
.p { --x: 0px; --y: 0px; --s: 1; position: absolute; left: 50%; top: 0; width: var(--d); margin-left: calc(var(--d) / -2); border-radius: 50%; transform: translate(var(--x), var(--y)) scale(var(--s)); will-change: transform, opacity; }
.p img { width: 100%; height: auto; -webkit-user-drag: none; }
.s0 { z-index: 6; }
.l1 { --x: calc(var(--w) * -.168); --y: calc(var(--w) * -.014); --s: .6; z-index: 5; }
.r1 { --x: calc(var(--w) * .168); --y: calc(var(--w) * -.014); --s: .6; z-index: 5; }
.l2 { --x: calc(var(--w) * -.283); --y: calc(var(--w) * -.044); --s: .5; z-index: 4; }
.r2 { --x: calc(var(--w) * .283); --y: calc(var(--w) * -.044); --s: .5; z-index: 4; }
.l3 { --x: calc(var(--w) * -.381); --y: calc(var(--w) * -.083); --s: .42; z-index: 3; }
.r3 { --x: calc(var(--w) * .381); --y: calc(var(--w) * -.083); --s: .42; z-index: 3; }
.l4 { --x: calc(var(--w) * -.465); --y: calc(var(--w) * -.128); --s: .36; z-index: 2; }
.r4 { --x: calc(var(--w) * .465); --y: calc(var(--w) * -.128); --s: .36; z-index: 2; }
.out { --x: calc(var(--w) * .53); --y: calc(var(--w) * -.17); --s: .3; z-index: 1; opacity: 0; pointer-events: none; }
.spin { position: absolute; z-index: 7; left: calc(50% + var(--d) * .31); top: calc(var(--d) * .76); background: var(--card); box-shadow: inset 0 0 0 1px var(--line2), 0 6px 14px var(--shadow); }
.spin::after { content: ""; position: absolute; inset: -4px; }
.dish { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; width: min(460px, calc(100cqw - 16px)); margin: 8px auto 0; }
.dish-name { font-size: clamp(22px, 2cqw, 28px); line-height: 1.25; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap; }
.dish .ib { color: var(--ink2); }
.dish-meta { font-size: 14px; color: var(--ink2); }

/* —— The four features —— */
.feats { padding-top: clamp(40px, 6cqw, 88px); scroll-margin-top: 8px; }
.feat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(48px, 8cqw, 112px); padding: clamp(44px, 5cqw, 72px) 0; }
.feat.flip { grid-template-columns: auto minmax(0, 1fr); }
.feat.flip .feat-text { order: 2; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; height: 20px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; color: var(--pri); }
.feat h2, .priv h2, .end h2 { font-size: clamp(32px, 3.5cqw, 48px); line-height: 1.16; font-weight: 700; letter-spacing: -0.006em; }
.zh .feat h2, .zh .priv h2, .zh .end h2 { letter-spacing: 0.02em; }
.feat h2 { margin-top: 10px; }
.sub { margin-top: 10px; font-size: clamp(16px, 1.3cqw, 18px); line-height: 1.5; color: var(--ink2); text-wrap: pretty; }
.notes { margin-top: 22px; }
.notes li { padding: 12px 0 13px; border-top: 1px solid var(--line); }
.notes b { display: block; font-size: 16px; font-weight: 600; line-height: 1.35; }
.notes span { display: block; margin-top: 2px; font-size: 15px; line-height: 1.45; color: var(--ink2); text-wrap: pretty; }
.mini { display: flex; gap: 6px; margin-top: 10px; }
.mini img { width: 34px; height: auto; }

/* The same card as the onboarding images: a piece of the app's real screen, no phone frame. */
.panel { position: relative; flex: none; width: 350px; height: 452px; border-radius: 32px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px var(--panel-shadow); overflow: hidden; zoom: 1.2; font-size: 15px; line-height: 1.45; }
.chips { position: absolute; left: 0; right: 0; top: 16px; display: flex; gap: 8px; padding: 0 16px; overflow: hidden; }
.bar { position: absolute; left: 16px; right: 16px; top: 16px; display: flex; align-items: center; justify-content: space-between; }
.chips + .bar { top: 60px; }
.count { font-size: 14px; color: var(--ink2); }
.muted { font-size: 13px; color: var(--ink2); }

/* Recipes */
.sort { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ink2); }
.sort .i { width: 14px; height: 14px; }
.grid { position: absolute; left: 16px; right: 16px; top: 112px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; text-align: center; }
.grid > div { display: flex; flex-direction: column; align-items: center; }
.grid b { margin-top: 6px; font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: 0.01em; }
.grid span { margin-top: 2px; font-size: 13px; color: var(--ink2); }

/* Kitchen */
.list { position: absolute; left: 16px; right: 16px; top: 62px; display: flex; flex-direction: column; }
.sec { display: flex; align-items: center; gap: 6px; height: 30px; color: var(--c); }
.row + .sec { margin-top: 6px; }
.sec b { font-size: 15px; font-weight: 700; }
.sec .num { font-size: 13px; color: var(--ink2); }
.sec::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.row { display: flex; align-items: center; gap: 12px; height: 62px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.row-text b { font-size: 17px; font-weight: 500; line-height: 1.2; }
.row-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 1; color: var(--ink2); white-space: nowrap; }

/* Meals */
.cal { position: absolute; left: 12px; right: 12px; top: 8px; display: flex; flex-direction: column; gap: 2px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-title { display: flex; align-items: center; margin-left: -6px; font-size: 17px; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap; }
.cal-title .ib { width: 28px; }
.cal-ctl { display: flex; align-items: center; gap: 4px; }
.cal-ctl .chip { height: 32px; padding: 0 10px; }
.cal-ctl .seg > * { min-width: 36px; padding: 0 6px; }
.wd, .week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.wd { height: 20px; align-items: center; font-size: 12px; color: var(--ink2); }
.week { position: relative; height: 56px; align-items: center; justify-items: center; }
.range { position: absolute; left: calc(100% * 3 / 7); right: 0; top: 1px; height: 54px; border-radius: 16px; background: var(--pri-soft); }
.day { position: relative; z-index: 1; width: 44px; height: 54px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-family: var(--f-num); font-size: 18px; font-weight: 600; color: var(--ink); }
.day.sel { background: var(--pri-fill); color: #FFFFFF; box-shadow: 0 4px 10px color-mix(in srgb, var(--pri-fill) 35%, transparent); }
.dot { display: block; width: 5px; height: 5px; border-radius: 3px; background: var(--pri); }
.dot.off { visibility: hidden; }
.day.sel .dot { background: #FFFFFF; }
.rule { position: absolute; left: 16px; right: 16px; top: 140px; height: 1px; background: var(--line); }
.plan { position: absolute; left: 16px; right: 6px; top: 148px; height: 32px; display: flex; align-items: center; justify-content: space-between; }
.plan-title { display: flex; align-items: baseline; gap: 10px; }
.plan-title b { font-size: 21px; font-weight: 700; letter-spacing: 0.01em; }
.plan-title span { font-size: 14px; color: var(--ink2); }
.today { position: absolute; left: 16px; right: 6px; top: 184px; display: flex; flex-direction: column; }
.today-head { display: flex; align-items: center; justify-content: space-between; height: 44px; }
.today-title { display: flex; align-items: center; gap: 8px; }
.today-title b { font-size: 17px; font-weight: 700; letter-spacing: 0.01em; }
.today-head .ib { color: var(--pri); }
.slot { display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: start; }
.slot > span { font-size: 13px; line-height: 52px; letter-spacing: 0.04em; color: var(--ink2); }
.dishes { display: flex; flex-direction: column; }
.plated { display: flex; align-items: center; gap: 12px; height: 52px; }
.plated > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.plated b { font-size: 16px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plated .serv { font-size: 13px; line-height: 1.3; color: var(--ink2); }

/* Shopping */
.buy { position: absolute; left: 16px; right: 16px; top: 62px; display: flex; flex-direction: column; gap: 6px; }
.buy-group { display: flex; flex-direction: column; }
.buy-head { display: flex; align-items: center; gap: 8px; height: 40px; }
.buy-head .i { color: var(--pri); }
.buy-head b { flex: 1; font-size: 18px; font-weight: 700; letter-spacing: 0.01em; }
.item { display: flex; align-items: center; gap: 4px; min-height: 60px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.buy-group:last-child .item:last-child { border-bottom: 0; }
.item .chk { margin-left: -10px; }
.item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.item-text b { font-size: 17px; font-weight: 500; line-height: 1.25; }
.item-text span { font-size: 13px; line-height: 1.35; color: var(--ink2); }
.item-text small { font-size: 12px; line-height: 1.35; color: var(--ink2); }
.qty { font-size: 17px; font-weight: 600; color: var(--pri); white-space: nowrap; }
.item.done .item-text, .item.done .qty { opacity: 0.45; }
.item.done .item-text b { text-decoration: line-through; }

/* —— The rest of the home page —— */
.also { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; margin-top: clamp(32px, 4cqw, 56px); padding-top: 40px; border-top: 1px solid var(--line); }
.also .i { color: var(--pri); width: 24px; height: 24px; }
.also h3 { margin-top: 10px; font-size: 17px; font-weight: 700; letter-spacing: 0.01em; line-height: 1.35; }
.also p { margin-top: 4px; font-size: 15px; line-height: 1.45; color: var(--ink2); text-wrap: pretty; }
.priv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 64px; align-items: start; padding-top: clamp(72px, 9cqw, 128px); }
.priv p { font-size: clamp(16px, 1.3cqw, 18px); line-height: 1.55; color: var(--ink2); text-wrap: pretty; }
.priv p + p { margin-top: 12px; }
.more { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: 8px; font-size: 16px; font-weight: 600; color: var(--pri); }
.more .i { width: 16px; height: 16px; stroke-width: 2.2; }
.end { display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(80px, 10cqw, 144px) 0 clamp(64px, 7cqw, 96px); }
.end .app-icon { box-shadow: 0 0 0 1px var(--line), 0 12px 28px var(--shadow); }
.end h2 { margin-top: 20px; }
.end .get { margin-top: 20px; }

/* —— Footer —— */
.foot { border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding-top: 14px; padding-bottom: 14px; font-size: 14px; color: var(--ink2); }
.foot nav { display: flex; flex-wrap: wrap; margin-right: auto; margin-left: -12px; }
.foot a { display: inline-flex; align-items: center; height: 44px; padding: 0 12px; }
.foot a:hover { color: var(--ink); }
.legal { flex-basis: 100%; padding-bottom: 8px; font-size: 12px; line-height: 1.5; color: var(--ink2); text-wrap: pretty; }

/* —— Privacy and support —— */
.doc-head { padding-top: clamp(28px, 4cqw, 56px); max-width: 800px; }
.doc-head .eyebrow { letter-spacing: 0.02em; color: var(--ink2); font-weight: 500; }
.doc-head h1 { margin-top: 8px; font-size: clamp(38px, 4.4cqw, 60px); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.zh .doc-head h1 { letter-spacing: 0.02em; }
.doc-head p { margin-top: 14px; font-size: clamp(17px, 1.46cqw, 20px); line-height: 1.5; color: var(--ink2); text-wrap: pretty; }
.short { margin-top: clamp(28px, 3cqw, 40px); padding: 8px 24px; border-radius: 24px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
.short li { display: flex; align-items: flex-start; gap: 10px; padding: 14px 0; font-size: 16px; line-height: 1.4; font-weight: 500; }
.short .i { width: 20px; height: 20px; stroke-width: 2.2; color: var(--ok); margin-top: 1px; }
.doc { display: grid; grid-template-columns: 200px minmax(0, 720px); justify-content: space-between; gap: 48px; padding-top: clamp(32px, 4cqw, 56px); padding-bottom: clamp(64px, 7cqw, 96px); }
.toc { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; }
.toc a { display: flex; align-items: center; min-height: 36px; font-size: 14px; color: var(--ink2); }
.toc a:hover { color: var(--ink); }
.prose section + section { margin-top: 36px; padding-top: 36px; border-top: 1px solid var(--line); }
.prose h2 { font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: 0.01em; scroll-margin-top: 24px; }
.prose p { margin-top: 10px; font-size: 16px; line-height: 1.65; text-wrap: pretty; }
.prose p.dim { color: var(--ink2); font-size: 15px; }
.prose a { color: var(--pri); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.steps { margin-top: 12px; display: grid; gap: 8px; }
.steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 6px; font-size: 16px; line-height: 1.5; }
.steps .n { font-family: var(--f-num); font-weight: 600; color: var(--pri); }
.where { margin-top: 16px; width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.4; }
.where th { padding: 0 0 8px; text-align: center; font-size: 13px; font-weight: 500; color: var(--ink2); white-space: nowrap; }
.where th:first-child, .where td:first-child { text-align: left; }
.where td { padding: 11px 0; border-top: 1px solid var(--line); text-align: center; vertical-align: middle; }
.where td + td, .where th + th { width: 96px; }
.where .i { width: 17px; height: 17px; stroke-width: 2.4; color: var(--ok); vertical-align: middle; }
.where .no { color: var(--ink2); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.help { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 64px; padding-top: clamp(28px, 3cqw, 40px); padding-bottom: clamp(64px, 7cqw, 96px); }
.help section { padding: 28px 0 32px; border-top: 1px solid var(--line); }
.help h2 { font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: 0.01em; }
.help p { margin-top: 8px; font-size: 16px; line-height: 1.6; color: var(--ink2); text-wrap: pretty; }
.help .steps li { color: var(--ink2); }
.help .fine { margin-top: 10px; font-size: 13px; }
/* Safari's pretty wrapping leaves Chinese paragraphs well short of the right edge. */
.zh .priv p, .zh .doc-head p, .zh .prose p, .zh .help p { text-wrap: wrap; }
.acts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 14px; }
.lost { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 70vh; padding: 48px 20px; text-align: center; }
.lost h1 { font-size: clamp(32px, 3.5cqw, 48px); line-height: 1.16; font-weight: 700; }
.lost p { color: var(--ink2); }
.lost .more { margin-top: 0; }

/* —— Narrower pages —— */
@container site (max-width: 960px) {
  .feat, .feat.flip { grid-template-columns: minmax(0, 1fr); }
  .feat-text { display: contents; }
  .feat .eyebrow { order: 1; justify-self: start; }
  .feat h2 { order: 2; }
  .sub { order: 3; }
  .panel { order: 4; justify-self: center; margin-top: 28px; zoom: 1; }
  .notes { order: 5; margin-top: 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .also { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@container site (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .top { flex-wrap: wrap; padding-top: 8px; padding-bottom: 0; }
  .brand { font-size: 19px; }
  .nav { order: 3; width: 100%; margin: 0 0 0 -14px; }
  .hero { padding-top: 16px; }
  .hero h1 { font-size: clamp(33px, 10.2cqw, 52px); }
  .stage { --d: 170px; margin-top: 44px; }
  .l1 { --x: -29cqw; --y: -14px; --s: .5; }
  .r1 { --x: 29cqw; --y: -14px; --s: .5; }
  .l2 { --x: -49cqw; --y: -56px; --s: .36; }
  .r2 { --x: 49cqw; --y: -56px; --s: .36; }
  .l3, .l4 { --x: -62cqw; --y: -110px; --s: .3; opacity: 0; pointer-events: none; }
  .r3, .r4, .out { --x: 62cqw; --y: -110px; --s: .3; opacity: 0; pointer-events: none; }
  .feat { padding: 40px 0; }
  .notes { grid-template-columns: minmax(0, 1fr); }
  .also { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 32px; }
  .priv { grid-template-columns: minmax(0, 1fr); }
  .short { grid-template-columns: minmax(0, 1fr); padding: 6px 18px; }
  .help { grid-template-columns: minmax(0, 1fr); }
  .where td + td, .where th + th { width: 72px; }
}
@container site (max-width: 359px) { .dish-name { font-size: 19px; } }
/* Phones narrower than 390: the whole card shrinks, and what's inside keeps its layout. */
@container site (max-width: 389px) { .panel { zoom: .95; } }
@container site (max-width: 371px) { .panel { zoom: .9; } }
@container site (max-width: 354px) { .panel { zoom: .8; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
