/* Fish Sauce First — editorial food-magazine system.
   Layout: cinematic full-bleed photo bands for hero and recipe headers, an asymmetric photo mosaic, a menu board with
   dotted leaders, and quiet cream pages between. Dark photo bands stay dark in both themes; the page body follows the theme.
   Type: Fraunces (soft high-contrast serif) for display, Archivo for UI and body, Kanit for Thai. */
:root {
  --bg: #15100C; --bg2: #1C1611; --surface: #241C16; --surface2: #30261E; --fg: #F5EBDB; --muted: #B9A78F; --line: #3A2F26;
  --chili: #FF5A3C; --chili-ink: #15100C; --amber: #E9A23B; --amber-ink: #15100C; --leaf: #A9D47E; --cream: #F5EBDB;
  --ink: #15100C; --paper: #F5EBDB;
  --t-stirfries: #B8321D; --t-curries: #3D6B3A; --t-soups: #C9701E; --t-noodles: #B98617; --t-salads: #7A8E2A; --t-desserts: #D08A2C;
  --shadow: 0 30px 60px -30px rgba(0,0,0,.8); --shadow-sm: 0 12px 30px -16px rgba(0,0,0,.6);
  --display: 'Fraunces', 'Kanit', Georgia, serif;
  --serif: 'Fraunces', 'Instrument Serif', Georgia, serif;
  --body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --thai: 'Kanit', 'Noto Sans Thai', 'Leelawadee UI', sans-serif;
  --radius: 18px; --radius-sm: 10px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F6EFE3; --bg2: #EFE6D6; --surface: #FCF8F0; --surface2: #F1E8D8; --fg: #1B130E; --muted: #6E5E4C; --line: #DACCB6;
    --chili: #D93A1C; --chili-ink: #FCF8F0; --amber: #B8761A; --amber-ink: #FCF8F0; --leaf: #3E7A3A; --cream: #FCF8F0;
    --t-stirfries: #F0C1B4; --t-curries: #C8DDB6; --t-soups: #F4CFA0; --t-noodles: #F1DB9E; --t-salads: #DEE3AC; --t-desserts: #F6D8A8;
    --shadow: 0 30px 60px -34px rgba(60,40,20,.45); --shadow-sm: 0 12px 30px -18px rgba(60,40,20,.35);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F6EFE3; --bg2: #EFE6D6; --surface: #FCF8F0; --surface2: #F1E8D8; --fg: #1B130E; --muted: #6E5E4C; --line: #DACCB6;
  --chili: #D93A1C; --chili-ink: #FCF8F0; --amber: #B8761A; --amber-ink: #FCF8F0; --leaf: #3E7A3A; --cream: #FCF8F0;
  --t-stirfries: #F0C1B4; --t-curries: #C8DDB6; --t-soups: #F4CFA0; --t-noodles: #F1DB9E; --t-salads: #DEE3AC; --t-desserts: #F6D8A8;
  --shadow: 0 30px 60px -34px rgba(60,40,20,.45); --shadow-sm: 0 12px 30px -18px rgba(60,40,20,.35);
  color-scheme: light;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
a { color: inherit; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; text-wrap: balance; }
.display { font-family: var(--display); font-weight: 600; font-variation-settings: "opsz" 144, "SOFT" 40; letter-spacing: -.025em; line-height: .96; font-size: clamp(2.8rem, 7.2vw, 6.4rem); }
.display em { font-style: italic; font-weight: 400; color: var(--chili); letter-spacing: -.02em; }
.display.md { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.02; letter-spacing: -.02em; }
.display .thai { font-family: var(--thai); font-weight: 500; font-size: .45em; color: var(--muted); vertical-align: middle; margin-left: .4em; letter-spacing: 0; }
h2:not(.display) { font-family: var(--display); font-weight: 600; font-size: 1.6rem; letter-spacing: -.02em; font-variation-settings: "opsz" 72; }
h3 { font-family: var(--display); font-weight: 600; font-size: 1.35rem; letter-spacing: -.015em; font-variation-settings: "opsz" 48; }
h4 { font-size: .7rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-weight: 600; margin-bottom: .7rem; }
p { margin: 0; }
p + p { margin-top: 1em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; line-height: 1.55; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.fine { font-size: .8rem; color: var(--muted); }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 700; color: var(--amber); margin-bottom: .9rem; }
.thai { font-family: var(--thai); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.section { padding-block: 5rem; }
.page-head { padding-block: 4.5rem 2rem; display: grid; gap: 1rem; }
.page-head .display { max-width: 18ch; }
.section-head { margin-bottom: 2.2rem; display: grid; gap: .5rem; }
.section-head.row { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; }
.section-head.row .muted { max-width: 34ch; font-size: .95rem; }
.link { font-weight: 700; color: var(--chili); text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: .1em; font-size: .95rem; letter-spacing: .01em; }
.link:hover { color: var(--fg); }

/* reveal: visible at rest, slides up a touch when it enters */
.reveal { transition: transform .9s cubic-bezier(.2,.7,.2,1); transform: translateY(14px); }
.reveal.in { transform: none; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.bar { display: flex; align-items: center; gap: 1.6rem; padding-block: .85rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand-mark { width: 13px; height: 26px; border-radius: 4px 4px 7px 7px; background: linear-gradient(180deg, var(--chili) 0 28%, var(--amber) 28%); flex: none; }
.brand-word { font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; white-space: nowrap; font-variation-settings: "opsz" 48; }
.brand-word em { font-style: italic; font-weight: 400; color: var(--chili); }
.brand-word.large { font-size: 2rem; }
.bar nav { display: flex; gap: 1.4rem; margin-left: auto; flex-wrap: wrap; }
.bar nav a { text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--muted); padding-block: .2rem; border-bottom: 2px solid transparent; letter-spacing: .01em; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--fg); border-color: var(--chili); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; gap: 2px; }
.lang a { text-decoration: none; font-size: .7rem; font-weight: 700; letter-spacing: .1em; padding: .32rem .55rem; border-radius: 999px; color: var(--muted); }
.lang a:hover { color: var(--fg); }
.lang a[aria-current] { background: var(--fg); color: var(--bg); }
@media (max-width: 760px) { .bar { flex-wrap: wrap; gap: .6rem .9rem; } .bar nav { width: 100%; order: 3; gap: 1rem; margin-left: 0; } .lang { margin-left: auto; } }

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; gap: .4rem; background: var(--chili); color: var(--chili-ink); font-weight: 700; text-decoration: none; padding: .85rem 1.4rem; border-radius: 999px; border: 2px solid var(--chili); font-family: var(--body); font-size: .95rem; cursor: pointer; line-height: 1.2; letter-spacing: .01em; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.btn:hover { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--fg); background: transparent; color: var(--fg); }
.btn.small { padding: .5rem 1rem; font-size: .85rem; }
.cta-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; background: var(--surface); border: 1px solid var(--line); color: var(--fg); font: inherit; font-size: .88rem; font-weight: 600; padding: .5rem 1rem; border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--fg); }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip.on .heat svg.on { fill: var(--chili); }
.chip-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filters { display: grid; gap: .8rem; padding-block: .5rem 1.4rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; }
.search input { font: inherit; font-size: .9rem; padding: .55rem 1.1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); min-width: 250px; }
.count { font-size: .85rem; margin-bottom: 1.4rem; font-variant-numeric: tabular-nums; }
.empty { padding: 3rem 0; text-align: center; color: var(--muted); }

/* ---------- heat ---------- */
.heat { display: inline-flex; gap: 2px; vertical-align: middle; }
.heat svg { width: 15px; height: 15px; fill: var(--line); }
.heat.big svg { width: 22px; height: 22px; }
.heat svg.on { fill: var(--chili); }
.legend { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--muted); padding-block: .15rem; }

/* ---------- photos: real image with the illustration as fallback ---------- */
.photo { position: relative; margin: 0; overflow: hidden; background: var(--surface2); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo .dish, .photo .hero-art, .photo .about-art { display: none; }
.photo.nophoto .dish { display: block; width: 70%; height: auto; margin: auto; }
.photo.nophoto .about-art { display: grid; }
.dish { display: block; width: 100%; height: auto; }
.c-stirfries { --tile: var(--t-stirfries) } .c-curries { --tile: var(--t-curries) } .c-soups { --tile: var(--t-soups) } .c-noodles { --tile: var(--t-noodles) } .c-salads { --tile: var(--t-salads) } .c-desserts { --tile: var(--t-desserts) }

/* ---------- hero ---------- */
.hero-bleed { position: relative; padding: 0; background: #15100C; color: #F5EBDB; overflow: hidden; min-height: min(88vh, 860px); display: grid; align-items: end; }
.hero-bleed .photo.hero-bg { position: absolute; inset: 0; margin: 0; background: #15100C; }
.hero-bleed .photo.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .85; animation: kenburns 28s ease-in-out infinite alternate; transform-origin: 60% 40%; }
@keyframes kenburns { from { transform: scale(1) } to { transform: scale(1.1) } }
.hero-bleed .photo.hero-bg.nophoto { background: radial-gradient(900px 600px at 78% 18%, #5a3214 0%, #2a1a0d 45%, #15100C 75%); }
.hero-bleed::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21,16,12,.1) 0%, rgba(21,16,12,.35) 45%, rgba(21,16,12,.95) 100%), linear-gradient(90deg, rgba(21,16,12,.7) 0%, rgba(21,16,12,.15) 65%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; width: 100%; padding-block: 7rem 3.5rem; }
.hero-bleed .hero-copy .display { max-width: 11ch; color: #F5EBDB; font-size: clamp(3rem, 8.4vw, 7.6rem); }
.hero-bleed .display em { color: #FF8A6E; }
.hero-bleed .eyebrow { color: #F3BC45; }
.hero-bleed .lede { color: #E9DFCC; margin-top: 1.6rem; max-width: 52ch; font-size: 1.2rem; }
.hero-bleed .btn.ghost { color: #F5EBDB; border-color: rgba(245,235,219,.45); backdrop-filter: blur(6px); }
.hero-bleed .btn.ghost:hover { border-color: #F5EBDB; }
.hero-stats { display: flex; gap: 2.6rem; margin: 2.6rem 0 0; padding-top: 1.6rem; border-top: 1px solid rgba(245,235,219,.22); }
.hero-stats div { display: grid; }
.hero-stats dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: #B9A78F; font-weight: 600; }
.hero-stats dd { margin: 0; font-family: var(--display); font-weight: 600; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; color: #F5EBDB; }
@media (max-width: 720px) { .hero-bleed { min-height: 82vh; } .hero-inner { padding-block: 4.5rem 2.2rem; } .hero-stats { gap: 1.6rem; } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; background: var(--chili); color: var(--chili-ink); }
.mq-track { display: flex; width: max-content; animation: mq 46s linear infinite; }
.marquee:hover .mq-track { animation-play-state: paused; }
.mq-item { display: inline-flex; align-items: baseline; gap: .9rem; padding: .75rem 1.8rem; font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.05rem; white-space: nowrap; border-right: 1px solid color-mix(in srgb, var(--chili-ink) 25%, transparent); }
.mq-item .thai { font-family: var(--thai); font-style: normal; font-weight: 500; font-size: 1rem; opacity: .85; }
@keyframes mq { to { transform: translateX(-50%) } }

/* ---------- feature ---------- */
.feature { display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); border-radius: var(--radius); overflow: hidden; text-decoration: none; box-shadow: var(--shadow); }
.photo.feature-art { aspect-ratio: 5/4; }
.photo.feature-art img { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.feature:hover .photo.feature-art img { transform: scale(1.04); }
.photo.feature-art.nophoto { background: var(--tile); display: grid; place-items: center; }
.feature-copy { padding: 3rem; display: grid; gap: 1.1rem; align-content: center; }
.feature-copy p { color: var(--muted); max-width: 48ch; font-size: 1.02rem; }
.meta.big { display: flex; gap: 1.1rem; align-items: center; font-size: .9rem; color: var(--muted); font-weight: 600; }
@media (max-width: 820px) { .feature { grid-template-columns: 1fr; } .feature-copy { padding: 1.8rem; } }

/* ---------- cards: photo with the title set on the image ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.mosaic { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; }
.grid.mosaic .card.big { grid-column: span 2; grid-row: span 2; }
@media (max-width: 980px) { .grid, .grid.three, .grid.mosaic { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid, .grid.three, .grid.mosaic { grid-template-columns: 1fr; } .grid.mosaic .card.big { grid-column: auto; grid-row: auto; } }
.card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; text-decoration: none; min-width: 0; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease; isolation: isolate; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .photo.tile { aspect-ratio: 4/5; }
.card.big .photo.tile { aspect-ratio: auto; height: 100%; min-height: 520px; }
.card .photo.tile img { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.card:hover .photo.tile img { transform: scale(1.05); }
.card .photo.tile.nophoto { background: var(--tile); display: grid; place-items: center; }
.card .photo.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21,16,12,0) 35%, rgba(21,16,12,.55) 70%, rgba(21,16,12,.92) 100%); }
.card-body { position: absolute; inset: auto 0 0 0; padding: 1.3rem 1.4rem 1.4rem; display: grid; gap: .45rem; color: #F5EBDB; z-index: 1; }
.card.big .card-body { padding: 2rem; gap: .6rem; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.cat { font-size: .66rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; color: #F3BC45; }
.card h3 { color: #F5EBDB; font-size: 1.45rem; }
.card.big h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.card h3 .thai { font-weight: 500; color: rgba(245,235,219,.7); font-size: .72em; margin-left: .25em; }
.card .blurb { display: none; font-size: .95rem; color: rgba(245,235,219,.8); max-width: 44ch; }
.card.big .blurb { display: block; }
.card .heat svg { fill: rgba(245,235,219,.25); } .card .heat svg.on { fill: #FF8A6E; }
.meta { display: flex; gap: .9rem; font-size: .78rem; color: rgba(245,235,219,.75); font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .02em; }
.meta span + span::before { content: "\00b7"; margin-right: .9rem; opacity: .6; }
.feature .meta.big { color: var(--muted); }

/* ---------- board ---------- */
.board-band { background: var(--bg2); padding-block: 5rem; border-block: 1px solid var(--line); }
.board { display: grid; border-top: 1px solid var(--line); }
.board-row { display: grid; grid-template-columns: 64px auto 1fr auto; gap: 1.3rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); text-decoration: none; min-width: 0; transition: background .2s ease; }
.board-row:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.board-row:hover .board-name strong { color: var(--chili); }
.photo.board-art { width: 64px; height: 64px; border-radius: 50%; }
.photo.board-art.nophoto { background: var(--tile); display: grid; place-items: center; }
.board-name { display: flex; gap: .8rem; align-items: baseline; white-space: nowrap; min-width: 0; }
.board-name strong { font-family: var(--display); font-weight: 600; font-size: 1.35rem; letter-spacing: -.015em; }
.board-name .thai { color: var(--muted); font-size: .95rem; }
.board-dots { border-bottom: 2px dotted var(--line); height: 1px; margin-bottom: .4rem; min-width: 1rem; }
.board-meta { display: flex; gap: 1.1rem; align-items: center; font-size: .85rem; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) { .board-row { grid-template-columns: 52px 1fr; } .board-dots { display: none; } .board-meta { grid-column: 2; } .photo.board-art { width: 52px; height: 52px; } .board-name { white-space: normal; flex-wrap: wrap; gap: .2rem .6rem; } }

/* ---------- pantry band: photo background, glass cards ---------- */
.pantry-band { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: 3rem; border-radius: var(--radius); padding: 3.5rem; align-items: center; overflow: hidden; color: #F5EBDB; background: #2a1a0d; box-shadow: var(--shadow); }
.pantry-band .photo.pb-bg { position: absolute; inset: 0; margin: 0; }
.pantry-band .photo.pb-bg img { opacity: .55; }
.pantry-band .photo.pb-bg.nophoto { background: radial-gradient(700px 400px at 20% 30%, #7a4a1c, #2a1a0d 70%); }
.pantry-band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(21,16,12,.92) 0%, rgba(21,16,12,.65) 50%, rgba(21,16,12,.35) 100%); }
.pb-copy, .pb-items { position: relative; z-index: 1; }
.pantry-band .eyebrow { color: #F3BC45; }
.pantry-band .display em { color: #FF8A6E; }
.pb-copy { display: grid; gap: 1.1rem; justify-items: start; }
.pb-copy p { color: #E9DFCC; max-width: 44ch; }
.pb-items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.pb-items li { display: flex; gap: .8rem; align-items: center; background: rgba(245,235,219,.1); border: 1px solid rgba(245,235,219,.18); backdrop-filter: blur(10px); border-radius: var(--radius-sm); padding: .85rem 1rem; min-width: 0; }
.pb-items li .muted { color: #CDBFA8; display: block; font-size: .85rem; }
.pb-items li .thai { color: #CDBFA8; font-size: .9rem; }
.pb-items .ico { width: 44px; height: 44px; flex: none; }
@media (max-width: 900px) { .pantry-band { grid-template-columns: 1fr; padding: 2rem; } }
@media (max-width: 520px) { .pb-items { grid-template-columns: 1fr; } }

/* ---------- flavor ---------- */
.flavor { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: center; }
.flavor-copy { display: grid; gap: 1.1rem; justify-items: start; }
.flavor-copy p { color: var(--muted); max-width: 46ch; }
.flavor-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.ft { aspect-ratio: 1.1; border-radius: var(--radius); display: grid; align-content: end; padding: 1.4rem; font-family: var(--display); font-weight: 600; font-size: 1.9rem; letter-spacing: -.02em; line-height: 1; gap: .35rem; position: relative; box-shadow: var(--shadow-sm); }
.ft .thai { position: absolute; top: 1.1rem; left: 1.4rem; font-family: var(--thai); font-weight: 500; font-size: 1.1rem; opacity: .75; }
.ft small { font-family: var(--body); font-weight: 500; font-size: .8rem; opacity: .8; letter-spacing: .02em; }
.ft.salty { background: var(--surface2); color: var(--fg); }
.ft.sour { background: var(--leaf); color: #15100C; }
.ft.sweet { background: var(--amber); color: var(--amber-ink); }
.ft.hot { background: var(--chili); color: var(--chili-ink); }
@media (max-width: 820px) { .flavor { grid-template-columns: 1fr; } }

/* ---------- newsletter ---------- */
.newsletter { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; padding: 3rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
@media (max-width: 820px) { .newsletter { grid-template-columns: 1fr; padding: 1.8rem; } }
.nl-form { display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
.nl-form input, .contact-form input, .contact-form select, .contact-form textarea { font: inherit; padding: .85rem 1.1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); width: 100%; min-width: 0; }
.form-note { grid-column: 1 / -1; font-size: .88rem; color: var(--muted); min-height: 1.2em; }

/* ---------- recipe page ---------- */
.recipe-hero { position: relative; overflow: hidden; background: #15100C; color: #F5EBDB; min-height: min(72vh, 680px); display: grid; align-items: end; }
.recipe-hero .photo.recipe-bg { position: absolute; inset: 0; margin: 0; background: var(--tile); }
.recipe-hero .photo.recipe-bg img { opacity: .9; }
.recipe-hero .photo.recipe-bg.nophoto { display: grid; place-items: center; }
.recipe-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21,16,12,.05) 0%, rgba(21,16,12,.45) 50%, rgba(21,16,12,.95) 100%); pointer-events: none; }
.recipe-head { position: relative; z-index: 1; display: grid; gap: .9rem; padding-block: 6rem 2.5rem; }
.rh-copy { display: grid; gap: .9rem; }
.recipe-hero .display { color: #F5EBDB; }
.recipe-hero .display em, .recipe-hero .thai-line .thai { color: #F5EBDB; }
.recipe-hero .lede, .recipe-hero .crumbs, .recipe-hero .say { color: #E9DFCC; }
.recipe-hero .crumbs a { color: #F3BC45; }
.crumbs { font-size: .85rem; }
.crumbs a { text-decoration: none; font-weight: 600; }
.thai-line { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; }
.thai-line .thai { font-size: 1.5rem; font-weight: 500; }
.say { font-size: .95rem; }
.recipe-hero .rh-copy .lede { max-width: 56ch; }
.recipe-hero .facts { background: rgba(21,16,12,.5); border-color: rgba(245,235,219,.18); backdrop-filter: blur(10px); max-width: 680px; margin-top: .5rem; }
.recipe-hero .facts > div { background: transparent; }
.recipe-hero dt { color: #B9A78F; }
.recipe-hero dd { color: #F5EBDB; }
.recipe-hero .heat svg { fill: rgba(245,235,219,.25); } .recipe-hero .heat svg.on { fill: #FF8A6E; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin: 0; }
.facts > div { background: var(--surface); padding: .9rem 1rem; min-width: 0; }
.facts.stack { grid-template-columns: 1fr; }
dt { font-size: .66rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); font-weight: 700; }
dd { margin: .3rem 0 0; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.recipe-grid { display: grid; grid-template-columns: 1fr 1.7fr; gap: 3.5rem; padding-block: 3.5rem; }
@media (max-width: 820px) { .recipe-grid { grid-template-columns: 1fr; gap: 2rem; } }
.ingredients { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 5.2rem); align-self: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
@media (max-width: 820px) { .ingredients { position: static; } }
.method h2 { margin-top: 2.6rem; margin-bottom: 1rem; }
.method h2:first-child { margin-top: 0; }
.ingredients h2 { margin-bottom: 1rem; }
.why { font-size: 1.12rem; line-height: 1.6; font-family: var(--serif); font-variation-settings: "opsz" 18; }
.ing-list { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; }
.ing-list li { display: flex; gap: .7rem; align-items: start; padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.ing-list input { margin-top: .35rem; accent-color: var(--chili); flex: none; width: 16px; height: 16px; }
.ing-list label { font-size: .95rem; cursor: pointer; }
.ing-list input:checked + label { color: var(--muted); text-decoration: line-through; }
.ing-list b { font-variant-numeric: tabular-nums; font-weight: 700; }
.steps { padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 1.3rem; margin: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3.2rem 1fr; gap: 1rem; align-items: start; font-size: 1.02rem; }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--display); font-weight: 600; font-size: 1.9rem; color: var(--chili); line-height: 1; font-variant-settings: "opsz" 72; }
.notes { margin: 0; padding-left: 1.2rem; display: grid; gap: .6rem; color: var(--muted); }
.video-cta { margin-top: 2.8rem; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.2rem; padding: 1.3rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.video-cta > div:nth-child(2) { display: grid; }
@media (max-width: 560px) { .video-cta { grid-template-columns: auto 1fr; } .video-cta .btn { grid-column: 1 / -1; justify-self: start; } }
.play { width: 3.2rem; height: 3.2rem; border-radius: 50%; background: var(--chili); display: grid; place-items: center; flex: none; }
.play svg { width: 1.4rem; height: 1.4rem; fill: var(--chili-ink); }

/* ---------- pantry page ---------- */
.jump { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; }
.jump a { font-size: .85rem; font-weight: 600; text-decoration: none; padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.jump a:hover { border-color: var(--fg); }
.photo.banner { aspect-ratio: 21/8; border-radius: var(--radius); margin-block: .5rem 1rem; box-shadow: var(--shadow); }
.photo.banner.nophoto { display: none; }
.pantry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 1.6rem; }
@media (max-width: 980px) { .pantry-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pantry-grid { grid-template-columns: 1fr; } }
.pantry-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 1rem; align-content: start; min-width: 0; }
.pi-head { display: flex; gap: 1rem; align-items: center; }
.pi-head .ico { width: 56px; height: 56px; flex: none; }
.pi-head .thai { font-size: 1rem; color: var(--chili); font-weight: 500; }
.pi-head .say { font-size: .85rem; color: var(--muted); }
.pantry-item > p { font-size: .95rem; }
.pi-facts { margin: 0; display: grid; gap: .6rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.pi-facts dd { font-weight: 400; font-size: .9rem; color: var(--muted); display: block; }
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 3rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center; }
.callout > div:first-child { display: grid; gap: 1rem; }
.callout a { color: var(--chili); font-weight: 700; }
.callout-icons { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.callout-icons .ico { width: 64px; height: 64px; }
.callout-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.photo.mini { aspect-ratio: 1; border-radius: var(--radius-sm); }
.photo.mini.nophoto { background: var(--surface2); display: grid; place-items: center; }
@media (max-width: 820px) { .callout { grid-template-columns: 1fr; padding: 1.8rem; } }

/* ---------- thai 101 ---------- */
.two-col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; margin-top: 1.4rem; align-items: start; }
.two-col p { font-size: 1.02rem; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.tbl th, .tbl td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .66rem; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.heat-table { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin-top: 1.6rem; }
.heat-row { display: grid; grid-template-columns: 6rem 12rem 1fr; gap: 1rem; align-items: center; padding: 1.1rem 1.3rem; background: var(--surface); }
.heat-row strong { font-family: var(--display); font-weight: 600; font-size: 1.2rem; }
@media (max-width: 560px) { .heat-row { grid-template-columns: 6rem 1fr; } .heat-row > div:last-child { grid-column: 2; } }
#rice .lede { margin-top: 1rem; max-width: 70ch; }
.paths { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 1.6rem; }
@media (max-width: 720px) { .paths { grid-template-columns: 1fr; } }
.path { display: grid; gap: .6rem; align-content: start; padding: 1.8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.path-k { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; color: var(--chili); }
.path p { color: var(--muted); font-size: .95rem; }

/* ---------- videos ---------- */
.series { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 980px) { .series { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .series { grid-template-columns: 1fr; } }
.series-card { display: grid; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; min-width: 0; overflow: hidden; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.series-card:hover { transform: translateY(-4px); }
.photo.series-art { aspect-ratio: 16/10; }
.photo.series-art.nophoto { background: var(--surface2); display: grid; place-items: center; }
.photo.series-art::after { content: ""; position: absolute; inset: 0; background: rgba(21,16,12,.25); }
.photo.series-art .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 3.6rem; height: 3.6rem; box-shadow: var(--shadow); z-index: 1; }
.series-card > div:last-child { display: grid; gap: .4rem; padding: .2rem 1.4rem 1.4rem; }
.series-card p { color: var(--muted); font-size: .92rem; }

/* ---------- about, contact ---------- */
.about-grid, .contact-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3.5rem; align-items: start; }
@media (max-width: 820px) { .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; } }
.about-copy { display: grid; gap: .9rem; max-width: 65ch; font-size: 1.02rem; }
.about-copy h2 { margin-top: 1.4rem; }
.about-side { display: grid; gap: 1.2rem; }
.photo.about-photo { aspect-ratio: 4/5; border-radius: var(--radius); box-shadow: var(--shadow); }
.photo.about-photo.nophoto { aspect-ratio: auto; background: var(--amber); display: grid; place-items: center; padding: 2rem; }
.about-art { display: grid; place-items: center; }
.about-art .bottle { height: 240px; width: auto; }
.placeholder { background: color-mix(in srgb, var(--amber) 18%, var(--surface)); border-left: 3px solid var(--amber); padding: .7rem 1rem; border-radius: 6px; color: var(--muted); font-style: italic; font-weight: 400; }
.contact-form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .85rem; font-weight: 700; }
.contact-side { display: grid; gap: .8rem; align-content: start; }
.copy-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.copy-row code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface); border: 1px solid var(--line); padding: .6rem 1rem; border-radius: 10px; user-select: all; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 4rem; background: var(--bg2); }
.foot { padding-block: 4rem 2rem; display: grid; grid-template-columns: 1.2fr 2fr; gap: 3rem; }
@media (max-width: 820px) { .foot { grid-template-columns: 1fr; } }
.foot-brand { display: grid; gap: 1rem; justify-items: start; }
.foot-brand p { color: var(--muted); max-width: 38ch; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 560px) { .foot-cols { grid-template-columns: 1fr 1fr; } }
.foot-cols a { display: block; text-decoration: none; font-size: .92rem; color: var(--muted); padding-block: .15rem; font-weight: 500; }
.foot-cols a:hover { color: var(--fg); }
.foot-langs { display: flex; gap: .8rem; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.foot-langs a { display: inline; }
.foot .fine { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1rem; }

/* ---------- root language picker ---------- */
.root-pick { min-height: 70vh; display: grid; align-items: center; padding-block: 3rem; }
.root-inner { display: grid; grid-template-columns: 1fr 1.3fr; gap: 3rem; align-items: center; }
.root-art { position: relative; aspect-ratio: 1; max-width: 360px; width: 100%; display: grid; place-items: center; }
.root-art .sun { position: absolute; inset: 6%; border-radius: 50%; background: var(--amber); box-shadow: var(--shadow); }
.root-art .bottle { position: relative; height: 74%; width: auto; filter: drop-shadow(0 24px 30px rgba(0,0,0,.35)); }
.hero-art { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.hero-art .sun { position: absolute; inset: 8%; border-radius: 50%; background: var(--amber); }
.hero-art .bottle { position: relative; height: 72%; width: auto; }
.root-tag { margin-top: 1rem; font-size: 1.1rem; color: var(--muted); }
.root-tag span { display: block; }
.root-pick .muted { margin-top: 1.2rem; font-size: .9rem; }
.lang-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: 1rem; }
.lang-btn { display: grid; gap: .2rem; padding: 1.2rem 1.3rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; }
.lang-btn:hover { border-color: var(--chili); }
.lang-code { font-family: var(--display); font-weight: 700; font-size: 1.5rem; color: var(--chili); }
.lang-name { font-family: 'Kanit', var(--body); font-weight: 500; }
@media (max-width: 820px) { .root-inner { grid-template-columns: 1fr; } .root-art { max-width: 240px; } .lang-grid { grid-template-columns: 1fr; } }
.credits { list-style: none; padding: 0; margin: 1.5rem 0 3rem; display: grid; gap: 1rem; }
.credits li { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; align-items: center; font-size: .95rem; }
.credits img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; }

/* ---------- Thai typography ---------- */
html[lang="th"] { --body: 'Kanit', 'Noto Sans Thai', sans-serif; --display: 'Kanit', 'Fraunces', sans-serif; --serif: 'Kanit', sans-serif; }
html[lang="th"] .display { font-weight: 600; letter-spacing: 0; line-height: 1.15; font-size: clamp(2.3rem, 5.8vw, 4.6rem); font-variation-settings: normal; }
html[lang="th"] .hero-bleed .hero-copy .display { font-size: clamp(2.5rem, 6.4vw, 5.4rem); }
html[lang="th"] .display.md { font-size: clamp(1.6rem, 3.1vw, 2.4rem); line-height: 1.25; }
html[lang="th"] .display em { font-style: normal; font-weight: 400; }
html[lang="th"] .mq-item { font-style: normal; }
html[lang="th"] body, html[lang="th"] .lede, html[lang="th"] p { line-height: 1.75; }
html[lang="th"] h2:not(.display), html[lang="th"] h3, html[lang="th"] .board-name strong, html[lang="th"] .card h3 { line-height: 1.35; font-variation-settings: normal; }
html[lang="th"] .why { font-family: var(--body); }
html[lang="de"] .display { font-size: clamp(2.5rem, 6.4vw, 5.6rem); }
html[lang="de"] .hero-bleed .hero-copy .display { font-size: clamp(2.7rem, 7.2vw, 6.6rem); }
@media (max-width: 760px) { .bar .btn { display: none; } }
/* pantry item photos */
.pantry-item { padding: 0; overflow: hidden; }
.pantry-item > .pi-head, .pantry-item > p, .pantry-item > .pi-facts { margin-inline: 1.5rem; }
.pantry-item > .pi-facts { margin-bottom: 1.5rem; }
.photo.pi-photo { aspect-ratio: 4/3; }
.photo.pi-photo.nophoto { background: var(--surface2); display: grid; place-items: center; }
.photo.pi-photo.nophoto .ico { width: 40%; height: auto; }
.photo.pi-photo img { transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.pantry-item:hover .photo.pi-photo img { transform: scale(1.04); }

/* ---------- app ---------- */
.app-band { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: center; padding: 3.5rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%); border: 1px solid var(--line); overflow: hidden; }
.app-copy { display: grid; gap: 1.1rem; justify-items: start; }
.app-copy p { color: var(--muted); max-width: 48ch; }
.store-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: .4rem; }
.store { display: inline-flex; align-items: center; gap: .7rem; background: var(--fg); color: var(--bg); text-decoration: none; padding: .6rem 1.1rem .6rem .9rem; border-radius: 12px; border: 2px solid var(--fg); font-family: var(--body); cursor: pointer; line-height: 1.1; transition: transform .2s ease; }
.store:hover { transform: translateY(-2px); }
.store svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.store span { display: grid; font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.store small { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; opacity: .7; }
.store.install { background: var(--chili); border-color: var(--chili); color: var(--chili-ink); }
.app-phone { display: grid; place-items: center; }
.phone { width: 230px; aspect-ratio: 9/18.5; border-radius: 34px; background: #0e0a08; padding: 10px; box-shadow: var(--shadow), inset 0 0 0 2px #3a2f26; transform: rotate(-6deg); }
.phone-screen { height: 100%; border-radius: 26px; background: radial-gradient(240px 200px at 70% 10%, #3a2210, #15100C 70%); color: #F5EBDB; display: grid; align-content: start; gap: .6rem; padding: 2.2rem 1.1rem 1.1rem; }
.phone-icon { width: 54px; height: 54px; border-radius: 14px; }
.phone-title { font-family: var(--display); font-weight: 600; font-size: 1.4rem; letter-spacing: -.02em; line-height: 1; }
.phone-title em { color: #FF5A3C; font-style: italic; font-weight: 400; }
.phone-tag { font-size: .7rem; color: #B9A78F; }
.phone-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .6rem; }
.phone-cards span { aspect-ratio: 1; border-radius: 10px; background: var(--tile); opacity: .9; }
@media (max-width: 820px) { .app-band { grid-template-columns: 1fr; padding: 2rem; } .app-phone { order: -1; } .phone { width: 180px; } }
.app-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
@media (max-width: 900px) { .app-steps { grid-template-columns: 1fr; } }
.path.highlight { border-color: var(--chili); box-shadow: 0 0 0 3px color-mix(in srgb, var(--chili) 25%, transparent); }
.how { margin: 0; padding-left: 1.3rem; display: grid; gap: .5rem; color: var(--muted); font-size: .95rem; }
.store.apk { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.apk-meta { font-size: .7rem; font-weight: 500; opacity: .75; }
.store.ipa { background: var(--surface2); border-color: var(--line); color: var(--fg); }
/* consent banner */
.consent { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: grid; justify-items: center; }
.consent-inner { max-width: 720px; width: 100%; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.2rem; display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; font-size: .9rem; }
.consent-inner p { color: var(--muted); }
.consent-inner p strong { color: var(--fg); }
.consent-inner a { color: var(--chili); }
.consent-actions { display: flex; gap: .5rem; }
@media (max-width: 640px) { .consent-inner { grid-template-columns: 1fr; } }
