/* Fonts (self-hosted, SIL Open Font Licence; see /fonts/*-OFL.txt): the "hands" look from the Nipalong design work. */
@font-face { font-family: 'Scamps Outfit'; src: url('/fonts/outfit-var.ttf') format('truetype'); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Scamps Sans'; src: url('/fonts/dm-sans-latin.woff') format('woff'); font-style: normal; font-weight: 100 1000; font-display: swap; }
/* Nipalong v3 — one system. Plum, refreshed (13 Nov): crisp warm white, one plum, sage for good news; calm and modern. */
:root {
  color-scheme: light;
  --bg: #fbfaf8; --surface: #ffffff; --sunk: #f3f0ee; --line: rgba(34, 26, 31, .08); --line-2: rgba(34, 26, 31, .14); /* decorative only */
  --line-ui: #8c7f86; /* control borders: 3:1 on every surface */
  --ink: #221a1f; --soft: #64595f; --faint: #6b6068; --heading: #2f1726; --on-strong: #ffffff;
  --plum: #8a2f5d; --plum-deep: #2f1726; --plum-tint: #f6e9f0; --accent: var(--plum); --accent-fill: var(--plum); --positive: var(--forest);
  --forest: #2f6249; --forest-tint: #e5f0ea; --sage: #9cc4ae;
  --coral: #b4472f; --coral-ink: #a3402b; --coral-deep: #8e3523; --coral-tint: #fbe6df;
  --gold: #f2c97a; --gold-tint: #fbf0d6; --gold-ink: #7f5810; --gold-line: #a87a1f; /* gold and coral are fills; their -ink tokens are for text */
  --night: #2c2a55; --night-ink: #3d3a73; --night-tint: #e4e3f1; --on-night: #f2f0fb;
  --st-home: #9a8d93; --st-idea-line: #a8698a;
  --ch-last: #6f8467; --ch-sleep: #5b4a91; --ch-running: #7d69b8; --ch-nap: #9c7590; --ch-sun: #94690f;
  --focus: var(--plum);
  /* The system (review V-38 to V-40): 7 type sizes, a 4-point spacing scale, 4 radii. CSS is snapped to these. */
  --t-xs: 12px; --t-sm: 14px; --t-body: 16px; --t-lg: 18px; --t-h3: 20px; --t-h2: 24px; --t-h1: 32px; --t-hero: 40px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;
  --r-xs: 6px; --r-md: 20px; --r-pill: 999px;
  --r: 20px; --r-sm: 12px; --shadow: 0 1px 2px rgba(34, 26, 31, .04), 0 6px 20px -12px rgba(34, 26, 31, .12);
  --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-spring: cubic-bezier(.3, 1.6, .5, 1);
  --display: 'Scamps Outfit', 'Scamps Sans', system-ui, sans-serif; --ui: 'Scamps Sans', -apple-system, system-ui, 'Segoe UI', sans-serif; --sans: var(--ui);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 450 16px/1.5 var(--ui); letter-spacing: -.01em; font-optical-sizing: auto; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ico svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Shell */
.shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
.boot { grid-column: 1 / -1; display: grid; place-items: center; align-content: center; gap: 12px; min-height: 100vh; color: var(--soft); }
.rail { display: none; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--heading); font: 600 18px/1 var(--display); letter-spacing: -.01em; }
.top-child { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 500; min-height: 40px; }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--forest); color: #fff; font: 600 20px/1 var(--display); flex: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 16px; }
.main { padding: 20px 16px 110px; min-width: 0; }
.aside { display: none; }

/* bottom tabs on phones */
@media (max-width: 899px) {
  .rail { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .rail .brand, .rail .rail-child { display: none; }
  .rail .tab { display: grid; justify-items: center; gap: 2px; min-width: 60px; min-height: 48px; padding: 6px 4px; text-decoration: none; color: var(--faint); font-size: 12px; font-weight: 500; border-radius: 12px; }
  .rail .tab .ico { width: 22px; height: 22px; }
  .rail .tab.is-on { color: var(--accent); }
}
@media (min-width: 900px) {
  .shell { grid-template-columns: 228px minmax(0, 1fr); }
  .topbar { display: none; }
  .rail { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; padding: 22px 14px; border-right: 1px solid var(--line); }
  .rail .brand { padding: 4px 10px 22px; font-size: 20px; }
  .rail .tab, .rail-child { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-decoration: none; color: var(--soft); font-weight: 500; min-height: 44px; }
  .rail .tab:hover, .rail-child:hover { background: var(--sunk); color: var(--ink); }
  .rail .tab.is-on, .rail-child.is-on { background: var(--surface); color: var(--heading); box-shadow: var(--shadow); }
  .rail .tab.is-on .ico { color: var(--accent); }
  .rail-child { margin-top: auto; }
  .main { padding: 40px 40px 80px; max-width: 820px; }
}
@media (min-width: 1240px) {
  .shell.tab-today { grid-template-columns: 228px minmax(0, 1fr) 360px; }
  .tab-today .main { max-width: 780px; justify-self: end; width: 100%; }
  .aside { display: block; position: sticky; top: 0; height: 100vh; overflow: auto; padding: 40px 28px 40px 8px; }
  .glance { display: none !important; }
}

/* ── Type */
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-weight: 600; margin-bottom: 10px; }
.display { font: 550 clamp(30px, 5vw, 44px)/1.08 var(--display);  letter-spacing: -.02em; color: var(--heading); }
.lede { margin-top: 12px; font-size: clamp(17px, 2.2vw, 19.5px); line-height: 1.45; color: var(--soft); max-width: 38em; }
.day-head, .page-head { margin-bottom: 26px; }
.block { margin-top: 34px; }
.block-title { font: 550 24px/1.2 var(--display); letter-spacing: -.01em; color: var(--heading); }
.block-sub { margin-top: 6px; color: var(--soft); max-width: 40em; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; font-weight: 600; color: var(--gold-ink); }
.kicker .ico { width: 15px; height: 15px; }
.kicker-soft { color: var(--faint); }
.kicker-forest { color: var(--positive); }
.fine { margin-top: 14px; font-size: 14px; color: var(--faint); }
.empty { margin-top: 12px; padding: 18px; border-radius: var(--r-sm); background: var(--sunk); color: var(--soft); }
.note { margin-top: 10px; padding: 10px 14px; background: var(--gold-tint); border-radius: var(--r-sm); }
.sample-tag, .learned-tag { display: inline-block; font-style: normal; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: var(--gold-tint); color: var(--gold-ink); vertical-align: 2px; margin-left: 4px; }
.learned-tag { background: var(--plum-tint); color: var(--accent); }

/* ── Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 99px; border: 1px solid transparent; font-weight: 500; font-size: 16px; transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: scale(.98); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-primary { background: var(--plum); color: #fff; }
.btn-primary:hover { background: #742c4d; }
.btn-primary.is-on { background: var(--forest); }
.btn-primary:disabled { opacity: .4; cursor: default; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--sunk); }
.btn-ghost.is-on { background: var(--plum-tint); border-color: var(--plum); color: var(--accent); }
.btn-soft { background: var(--plum-tint); color: var(--accent); }
.btn-soft.is-on { background: var(--forest-tint); color: var(--positive); }
.btn-block { width: 100%; margin-top: 18px; }
.link { display: inline; text-align: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; min-height: 0; }
.opt { min-height: 42px; padding: 0 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2); font-weight: 500; font-size: 16px; }
.opt:hover { border-color: var(--plum); }
.opt.is-on { background: var(--plum); border-color: var(--plum); color: #fff; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 14px; font-weight: 500; background: var(--sunk); color: var(--soft); }
.tag-plus { background: var(--forest-tint); color: var(--positive); }
.tag-minus { background: var(--coral-tint); color: #8e3523; }

/* ── Hero: the one thing worth doing today */
.hero { border-radius: 20px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); }
.hero-top { padding: 26px 24px 24px; background: var(--plum); color: var(--on-strong); }
.hero-title { margin-top: 10px; font: 550 clamp(28px, 4.5vw, 38px)/1.08 var(--display); letter-spacing: -.02em;  }
.hero-when { margin-top: 8px; font-weight: 500; opacity: .9; }
.hero-desc { margin-top: 10px; opacity: .78; max-width: 40em; font-size: 16px; }
.hero-why { padding: 22px 24px 20px; }
.hero-why h3, .sheet-h { font: 600 14px/1 var(--ui); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin-bottom: 12px; }
.hero .alt, .alt { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--forest-tint); color: var(--positive); font-size: 16px; }
.hero .alt .link, .alt .link { color: var(--positive); }

.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.reasons li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.4; }
.reasons .ico { width: 20px; height: 20px; margin-top: 1px; padding: 3px; border-radius: 50%; }
.r-plus .ico { background: var(--forest-tint); color: var(--positive); }
.r-minus .ico { background: var(--coral-tint); color: var(--coral); }
.r-info .ico { background: var(--sunk); color: var(--soft); }
.r-focus .ico { background: var(--forest); color: #fff; }
.r-focus { font-weight: 500; }
.reasons .why { display: block; font-style: normal; font-size: 14px; color: var(--faint); margin-top: 2px; }

.plan { margin-top: 14px; border-radius: var(--r-sm); background: var(--gold-tint); }
.plan summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; color: var(--gold-ink); cursor: pointer; list-style: none; min-height: 44px; }
.plan summary::-webkit-details-marker { display: none; }
.plan summary::after { content: '+'; margin-left: auto; font-size: 20px; font-weight: 400; }
.plan[open] summary::after { content: '–'; }
.plan summary small { margin-left: 6px; font-weight: 500; opacity: .7; }
.plan h4 { margin: 4px 16px 4px; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; color: var(--gold-ink); }
.plan ul { margin: 0; padding: 0 16px 14px 36px; display: grid; gap: 6px; color: #4d3a14; font-size: 16px; }
.fb { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.source { margin-top: 14px; font-size: 14px; color: var(--faint); }
.source a { color: var(--faint); }

/* ── Check-in: the learning loop */
.checkin { margin-top: 22px; padding: 22px 24px; border-radius: var(--r); background: var(--surface); border: 1.5px dashed color-mix(in srgb, var(--plum) 35%, transparent); }
.checkin-q { margin-top: 8px; font: 550 24px/1.25 var(--display); color: var(--heading); }
.checkin-hint { margin-top: 6px; color: var(--soft); font-size: 16px; }
.checkin-opts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.checkin .btn { margin-top: 12px; }
.checkin-foot { margin-top: 12px; font-size: 14px; color: var(--faint); }
.checkin-done { border-style: solid; border-color: var(--forest-tint); background: var(--forest-tint); }
.reply { font: 400 18px/1.45 var(--display); color: var(--ink); }
.learned { display: flex; align-items: center; gap: 8px; margin: 14px 0 10px; font-size: 14px; color: var(--positive); }

/* ── Lists of recommendations */
.rec-list { margin-top: 14px; display: grid; gap: 10px; }
.rec-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 20px; gap: 14px; align-items: center; width: 100%; text-align: left; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.rec-row:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.rec-kind { align-self: start; margin-top: 2px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; padding: 4px 8px; border-radius: 6px; background: var(--sunk); color: var(--soft); min-width: 62px; text-align: center; }
.k-session { background: var(--forest-tint); color: var(--positive); }
.k-event { background: var(--plum-tint); color: var(--accent); }
.rec-main { display: grid; gap: 3px; min-width: 0; }
.rec-main strong { font-weight: 600; font-size: 16px; }
.rec-when { color: var(--soft); font-size: 14px; }
.rec-why { display: grid; gap: 2px; margin-top: 4px; } /* reasons as plain lines, not wrapping pills (review V-18) */
.rw { font-size: 14px; line-height: 1.35; color: var(--positive); } .rw-minus { color: var(--coral-ink); }
.rec-go { color: var(--faint); }

/* ── Moments */
.moments { margin-top: 16px; display: grid; gap: 14px; }
.moment { display: grid; grid-template-columns: 58px 1fr; gap: 16px; padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.moment-date { display: grid; justify-items: center; align-content: start; padding-top: 2px; }
.moment-date span { font: 550 32px/1 var(--display); color: var(--accent); }
.moment-date small { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 600; margin-top: 4px; }
.moment h3 { margin-top: 4px; font: 550 20px/1.2 var(--display); }
.link-title { background: none; border: 0; padding: 0; text-align: left; font: inherit; color: var(--heading); }
.link-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.moment-when { margin: 4px 0 10px; color: var(--soft); font-size: 14px; }
.moment-verdict { margin: 0 0 12px; font: 500 16px/1.4 var(--ui); color: var(--positive); }
.moment .reasons li { font-size: 16px; }
.big-one { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 16px; color: var(--soft); }
.big-one strong { color: var(--ink); }

/* ── Focus thread */
.thread { margin-top: 34px; padding: 24px; border-radius: 20px; background: var(--forest-tint); border: 1px solid rgba(31, 74, 58, .12); }
.thread .block-title { margin-top: 8px; color: var(--positive); }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 16px; }
.game { display: grid; gap: 4px; text-align: left; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid rgba(31, 74, 58, .12); transition: transform .15s, box-shadow .15s; }
.game:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.game-ico { font-size: 32px; line-height: 1; margin-bottom: 6px; }
.game strong { font-weight: 600; color: var(--positive); }
.game span { font-size: 14px; color: var(--soft); }
.game em { font-style: normal; font-size: 12px; color: var(--accent); font-weight: 500; }
.game.sm { padding: 12px 14px; }
.tips { display: grid; gap: 8px; margin-top: 14px; }
.tip { border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.tip summary { padding: 12px 14px; cursor: pointer; font-weight: 500; list-style: none; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.tip summary::-webkit-details-marker { display: none; }
.tip p, .tip ul { margin: 0 14px 12px; color: var(--soft); font-size: 16px; }
.tip ul { padding-left: 18px; }
.tip-for { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: var(--forest-tint); color: var(--positive); }
.thread-out, .thread-help { margin-top: 14px; font-size: 16px; color: var(--soft); }
.thread-out .link { color: var(--positive); }

/* ── Teasers */
.teaser { display: flex; align-items: center; gap: 16px; padding: 20px 22px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.teaser:hover { box-shadow: var(--shadow); }
.teaser .block-title { font-size: 20px; margin-top: 6px; }
.teaser-go { margin-left: auto; color: var(--accent); }

/* ── What we know */
.knows { padding: 22px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.knows-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.knows-head h2 { font: 550 24px/1.1 var(--display); color: var(--heading); }
.knows-head small { font: 400 16px var(--ui); color: var(--faint); margin-left: 4px; }
.kgroup { margin-top: 16px; }
.kgroup h3 { font: 600 12px/1 var(--ui); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.kchips { display: flex; flex-wrap: wrap; gap: 6px; }
.kchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; background: var(--sunk); font-size: 14px; font-weight: 500; }
.k-love { background: var(--plum-tint); color: var(--heading); }
.k-hard { background: var(--gold-tint); color: var(--gold-ink); }
.k-fine { background: var(--forest-tint); color: var(--positive); }
.k-focus { background: var(--forest); color: #fff; }
.prov { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }
.prov-told { background: var(--forest); }
.prov-learned { background: var(--plum); box-shadow: 0 0 0 2.5px var(--plum-tint); }
.prov-age { background: var(--line-2); }
.journal { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.journal li { display: flex; gap: 8px; font-size: 14px; }
.journal .ico { color: var(--accent); width: 16px; height: 16px; margin-top: 2px; }
.journal strong { display: block; font-weight: 600; }
.journal em { font-style: normal; color: var(--faint); font-size: 14px; }
.legend { margin-top: 18px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); flex-wrap: wrap; }
.legend .prov + * { margin-right: 8px; }
.glance { text-decoration: none; display: flex; gap: 6px; overflow-x: auto; margin: -8px -16px 6px; padding: 0 16px 6px; scrollbar-width: none; }
.glance .kchip { white-space: nowrap; }

/* ── Sheet */
.overlay { position: fixed; inset: 0; z-index: 50; }
.sheet-back { position: absolute; inset: 0; background: rgba(35, 22, 29, .5); animation: fade .2s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow: auto; padding: 26px 20px 30px; background: var(--bg); border-radius: 24px 24px 0 0; animation: up .25s cubic-bezier(.2, .8, .2, 1); }
@media (min-width: 900px) { .sheet { left: auto; top: 0; bottom: 0; width: min(560px, 100vw); max-height: none; border-radius: 24px 0 0 24px; padding: 34px 32px; animation: left .25s cubic-bezier(.2, .8, .2, 1); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes left { from { transform: translateX(40px); opacity: .4; } }
.sheet-close { position: absolute; top: 30px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--heading); display: grid; place-items: center; z-index: 4; }
.sheet-title { margin-top: 8px; font: 550 32px/1.1 var(--display); color: var(--heading); letter-spacing: -.02em; }
.sheet .hero-when { color: var(--soft); }
.sheet-desc { margin: 12px 0 22px; color: var(--soft); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 22px 0 0; }
.facts div { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.facts dt { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.facts dd { margin: 3px 0 0; font-size: 14px; }
.how { margin-top: 14px; font-size: 14px; color: var(--soft); }
.how summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-weight: 500; }
.how ul { padding-left: 18px; }
.regulars { margin-top: 14px; font-size: 16px; color: var(--soft); }

/* ── Games */
.game-sheet .deck-tabs { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.stage { margin: 18px 0; }
.bigcard { width: 100%; min-height: 300px; display: grid; place-items: center; align-content: center; gap: 8px; border-radius: 20px; border: 0; background: var(--surface); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.bc-emoji { font-size: 120px; line-height: 1; }
.bc-word { font: 550 32px/1 var(--display); color: var(--heading); }
.bc-sound { font-size: 20px; color: var(--accent); font-weight: 600; }
.bigcard.pop .bc-emoji { animation: tagPop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tagPop { 40% { transform: scale(1.25) rotate(-6deg); } }
.choose { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bigcard.half { min-height: 230px; } .half .bc-emoji { font-size: 84px; } .half .bc-word { font-size: 24px; }
.bigcard.picked { outline: 4px solid var(--forest); background: var(--forest-tint); }
.peek .bc-cover { position: absolute; inset: 0; display: grid; place-items: center; font-size: 180px; background: var(--gold-tint); transition: transform .4s cubic-bezier(.3, 1.4, .5, 1), opacity .3s; }
.peek.is-open .bc-cover { transform: translateY(-110%); opacity: 0; }
.peek .bc-word { position: relative; z-index: 1; }
.game-nav { display: flex; justify-content: space-between; gap: 10px; }
.howto ol { display: grid; gap: 8px; padding-left: 20px; font-size: 18px; }

/* ── Explore */
.lenses { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
.lenses .opt { white-space: nowrap; }
@media (min-width: 900px) { .lenses { flex-wrap: wrap; margin: 0; padding: 0; } }

/* ── Grow */
.domains { display: grid; gap: 14px; }
.domain { padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.domain.is-focus { border-color: rgba(31, 74, 58, .3); background: var(--forest-tint); }
.domain-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.domain-head h2 { font: 550 20px/1.2 var(--display); color: var(--heading); }
.domain-ico { font-size: 24px; }
.toggle { margin-left: auto; min-height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; font-weight: 500; }
.toggle.is-on { background: var(--forest); border-color: var(--forest); color: #fff; }
.domain-obs { margin-top: 10px; color: var(--soft); font-size: 16px; } .domain-obs em { font-style: normal; color: var(--faint); }
.domain-games { display: grid; gap: 8px; margin-top: 14px; }
.history { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.history span { display: inline-block; min-width: 96px; color: var(--faint); font-size: 14px; }
.help p { margin-top: 8px; }

/* ── Kitchen */
.kitchen { display: grid; gap: 18px; }
@media (min-width: 1100px) { .kitchen { grid-template-columns: 1fr 320px; align-items: start; } .main:has(.kitchen) { max-width: 1060px; } .shop { position: sticky; top: 24px; } }
.meals { display: grid; gap: 12px; align-content: start; }
.meal { padding: 18px 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.meal-head { display: flex; align-items: center; gap: 14px; }
.meal-head h2 { font: 550 20px/1.2 var(--display); color: var(--heading); }
.meal-head p { font-size: 14px; color: var(--faint); }
.meal-head .btn { margin-left: auto; }
.meal-n { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--plum-tint); color: var(--accent); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.meal-for, .meal-talk { margin-top: 12px; font-size: 16px; color: var(--soft); }
.meal-talk { display: flex; gap: 8px; color: var(--positive); } .meal-talk .ico { margin-top: 2px; }
.meal details { margin-top: 10px; font-size: 16px; } .meal summary { cursor: pointer; font-weight: 500; color: var(--accent); min-height: 36px; display: flex; align-items: center; }
.meal ol { padding-left: 20px; color: var(--soft); }
.shop { padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.shop-head h2 { font: 550 24px/1.2 var(--display); color: var(--heading); }
.shop-head p { font-size: 14px; color: var(--faint); margin: 4px 0 12px; }
.shop h3 { margin: 18px 0 6px; font: 600 12px/1 var(--ui); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.shop ul { list-style: none; margin: 0; padding: 0; }
.tick { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; background: none; border: 0; padding: 4px 0; text-align: left; font-size: 16px; }
.tick .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); flex: none; }
.tick.is-on .box { background: var(--forest); border-color: var(--forest); box-shadow: inset 0 0 0 3px var(--surface); }
.tick.is-on .what { text-decoration: line-through; color: var(--faint); }
.tick .x { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--plum-tint); padding: 2px 7px; border-radius: 99px; }

/* ── Village */
.banner-sample { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-sm); background: var(--gold-tint); color: var(--gold-ink); font-size: 14px; }
.privacy { padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.privacy-head { display: flex; gap: 14px; align-items: flex-start; }
.privacy-head > .ico { width: 28px; height: 28px; color: var(--positive); }
.privacy-head .block-title { font-size: 20px; }
.switch { position: relative; margin-left: auto; flex: none; width: 52px; height: 32px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + span { background: var(--forest); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2.5px solid var(--plum); outline-offset: 2px; }
.share, .interests { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.share p, .interests p { font-weight: 500; font-size: 16px; }
.chk { display: inline-flex; align-items: center; gap: 8px; margin: 8px 16px 0 0; font-size: 16px; min-height: 36px; }
.chk input { width: 18px; height: 18px; accent-color: var(--forest); }
.people { display: grid; gap: 12px; margin-top: 14px; }
.person { display: flex; gap: 14px; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.person .avatar { background: var(--plum); }
.person h3 { font: 550 20px/1.2 var(--display); } .person h3 small { font: 400 14px var(--ui); color: var(--faint); margin-left: 4px; }
.person-blurb { margin-top: 4px; color: var(--soft); font-style: italic; }
.person-why { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.person-act { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.waved { font-weight: 500; color: var(--positive); }

/* ── Profile & onboarding */
.profile { display: grid; gap: 0; }
@media (min-width: 1240px) { .main:has(.profile) { max-width: 1120px; } .profile { grid-template-columns: 1fr 340px; column-gap: 32px; align-items: start; } .profile > .block { grid-column: 1; } .profile-aside { grid-column: 2; grid-row: 1 / span 8; position: sticky; top: 24px; } .profile > .block:first-child { margin-top: 0; } }
.profile-aside { margin-top: 30px; }
.fields { display: grid; gap: 14px; margin-top: 14px; max-width: 520px; }
label { display: grid; gap: 6px; font-weight: 500; font-size: 16px; }
input:not([type=checkbox]), select { min-height: 46px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); font: 400 16px var(--ui); color: var(--ink); }
input:focus, select:focus { outline: 2.5px solid var(--plum); outline-offset: 0; border-color: transparent; }
.sens { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sens-label { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; column-gap: 8px; font-weight: 500; }
.sens-label small { grid-column: 1 / -1; font-weight: 400; font-size: 14px; color: var(--faint); }
.shell-onboard { display: grid; place-items: center; padding: 24px 16px; }
.ob { width: min(520px, 100%); display: grid; gap: 18px; }
.ob form { display: grid; gap: 16px; }
.ob-act { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.opt-chk { display: inline-flex; } .opt-chk input { position: absolute; opacity: 0; }
.opt-chk span { min-height: 42px; padding: 0 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2); display: inline-flex; align-items: center; font-weight: 500; cursor: pointer; }
.opt-chk input:checked + span { background: var(--plum); color: #fff; border-color: var(--plum); }
.opt-chk input:focus-visible + span { outline: 2.5px solid var(--plum); outline-offset: 2px; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); z-index: 90; display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 99px; background: var(--plum-deep); color: #fff; font-weight: 500; font-size: 16px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ico { color: var(--gold); }
@media (min-width: 900px) { .toast { bottom: 32px; } }
.error { padding: 20px; background: var(--coral-tint); border-radius: var(--r); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Ask */
.ask { display: flex; gap: 8px; margin: 0 0 18px; padding: 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.ask input { flex: 1; min-width: 0; border: 0; background: none; min-height: 44px; padding: 0 14px; }
.ask input:focus { outline: none; }
.ask:focus-within { border-color: var(--plum); }
.answer { margin: 0 0 26px; padding: 20px 22px; border-radius: var(--r); background: var(--plum-tint); }
.answer-lead { margin-top: 8px; font: 400 18px/1.45 var(--display); }
.answer .rec-list { margin-top: 14px; }
.answer-route { margin-top: 12px; }

/* What's coming: heads-ups and official dates */
.radar .off-list { margin-top: 6px; }
.off-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.off { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; }
.off .tick { width: auto; min-height: 44px; min-width: 32px; padding: 0; align-items: flex-start; padding-top: 2px; }
.off .tick:disabled { opacity: .35; }
.off-main { flex: 1; min-width: 0; }
.off-main p { margin: 0 0 4px; color: var(--soft); font-size: 16px; }
.off-top { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; color: var(--ink) !important; }
.off-when { font-size: 14px; font-weight: 600; color: var(--accent); }
.off-overdue .off-when { color: var(--coral); }
.off-done .off-top strong, .off-past .off-top strong { text-decoration: line-through; text-decoration-color: var(--line-2); }
.off-how a { color: var(--positive); font-weight: 500; }
.off-how .host { font-size: 12px; color: var(--soft); font-weight: 400; margin-left: 4px; }
.heads { border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); margin: 0 0 8px; }
.heads.tone-sun { border-left-color: var(--gold); }
.heads.tone-breeze { border-left-color: var(--forest); }
.heads.tone-mist { border-left-color: var(--plum); }
.heads summary { padding: 12px 14px; cursor: pointer; list-style: none; min-height: 44px; display: flex; flex-direction: column; gap: 2px; }
.heads summary::-webkit-details-marker { display: none; }
.heads-when { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--soft); }
.heads > p, .heads > ul, .heads > h4 { margin: 0 14px 10px; color: var(--soft); font-size: 16px; }
.heads > h4 { color: var(--ink); font-size: 14px; }
.heads > ul { padding-left: 18px; }
.heads-you { display: flex; gap: 8px; color: var(--ink) !important; background: var(--plum-tint, #f3e6ec); padding: 10px 12px; border-radius: var(--r-sm); }
.heads-ask { font-style: italic; }
h3.sub { font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); margin: 18px 0 8px; font-weight: 600; }
details.more { margin-top: 10px; }
details.more > summary { cursor: pointer; font-weight: 500; padding: 8px 0; min-height: 44px; display: flex; align-items: center; }

/* Focus on dark surfaces is gold, so keyboard users never lose their place (designer review D-05). */
.dock, .card-pick, .dt-hero, .sky-night, .wind, .card-wind, .move, .gday, .tint-night, .mini-game, .bite-safety, .toast, .season-tile, .pm, .cm { --focus: var(--gold); }

/* ── Set-up on a phone: Next stays in reach on the long steps (QA 12 Nov). */
@media (max-width: 899px) {
  .shell-onboard .ob-act { position: sticky; bottom: 0; z-index: 5; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: 0 -12px 12px -12px rgba(0, 0, 0, .18); }
}
.ob-account { margin-top: 4px; }

/* ── The tour: each step lights up the real thing on the page (a window cut in a dim layer) with its card beside it. */
.tour-spot { position: fixed; z-index: 91; border-radius: 18px; pointer-events: none; box-shadow: 0 0 0 3px var(--gold), 0 0 0 6px rgba(255, 248, 235, .35), 0 0 0 200vmax rgba(8, 6, 7, .78); }
.tour-spot.is-round { border-radius: 50%; }
@media (prefers-reduced-motion: no-preference) { .tour-spot { transition: top .25s var(--ease-out), left .25s var(--ease-out), width .25s var(--ease-out), height .25s var(--ease-out); } .tour-card.is-placed { transition: top .25s var(--ease-out), left .25s var(--ease-out); } }
.tour-scrim.is-clear { background: transparent; }
.tour-card.is-placed { right: auto; bottom: auto; margin: 0; max-width: none; }
.tour-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(8, 6, 7, .72); }
body.touring .dock { z-index: 92; }
.tour-hl { box-shadow: 0 0 0 3px var(--gold) !important; border-radius: 16px; }
.fab.tour-hl { border-radius: 50%; }
.tour-card { position: fixed; z-index: 94; left: 16px; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom)); max-width: 440px; margin-inline: auto; padding: 18px 18px 14px; border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tour-step { margin: 0 0 4px; font-size: 13px; color: var(--soft); }
.tour-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 600 21px/1.2 var(--ui); color: var(--heading); }
.tour-title .ico { width: 22px; height: 22px; color: var(--accent); }
.tour-title:focus { outline: none; }
.tour-text { margin: 0 0 14px; font-size: 16px; line-height: 1.45; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tour-dots { display: flex; gap: 6px; }
.tour-dots span { width: 7px; height: 7px; border-radius: 4px; background: var(--line-2); }
.tour-dots .is-on { width: 18px; background: var(--accent); }
.tour-acts { display: flex; gap: 8px; }
@media (min-width: 900px) { .tour-card { left: auto; right: 32px; bottom: 32px; margin: 0; } }

/* The hosted test-version note: on sign-in and set-up only. In the app it would sit over the page title, so About
   carries the same words instead (QA 12 Nov). */
.scope-note { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); text-align: center; font-size: 13px; line-height: 1.4; color: var(--soft); }
body:has(#app.shell:not(.shell-onboard)) .scope-note { display: none; }

/* How far you'll go (reach.js): a map of home with two circles, and a slider for each. No gradients. */
.reach { display: grid; gap: 12px; margin: 4px 0 8px; max-width: 620px; }
.reach-lede { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--faint); font-size: 14px; }
.reach-lede svg { width: 16px; height: 16px; flex: none; }
.reach-map { aspect-ratio: 400 / 280; }
.reach-ring { fill: none; stroke-width: 2.5; }
.reach-ring.is-daily { stroke: var(--plum); fill: color-mix(in srgb, var(--plum) 9%, transparent); }
.reach-ring.is-big { stroke: var(--coral-deep); stroke-dasharray: 7 6; fill: color-mix(in srgb, var(--coral) 5%, transparent); }
.reach-dot { fill: var(--plum); stroke: #fff; stroke-width: 1.2; }
.reach-dot.is-big { fill: var(--coral-deep); }
.reach-tag rect { fill: #fff; stroke-width: 1.5; } .reach-tag text { font: 800 11px var(--sans, system-ui); }
.reach-tag.is-daily rect { stroke: var(--plum); } .reach-tag.is-daily text { fill: var(--plum-deep); }
.reach-tag.is-big rect { stroke: var(--coral-deep); } .reach-tag.is-big text { fill: var(--coral-ink, var(--coral-deep)); }
.reach-ctl { display: grid; gap: 10px; }
.reach-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.reach-l { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; color: var(--ink); }
.reach-l small { display: block; font-weight: 400; color: var(--faint); font-size: 13px; margin-top: 2px; }
.reach-key { width: 14px; height: 14px; border-radius: 50%; margin-top: 3px; flex: none; border: 2.5px solid var(--plum); }
.reach-key.is-big { border: 2.5px dashed var(--coral-deep); }
.reach-row output { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.reach-row input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--plum); min-height: 32px; }
.reach-row.is-big input[type=range] { accent-color: var(--coral-deep); }
.reach-count { margin: 0; font-size: 14px; color: var(--ink); }
.mapx-reach { margin-bottom: 10px; }
:root[data-theme="dark"] .reach-tag rect { fill: #2a2027; } :root[data-theme="dark"] .reach-tag text { fill: #f3e9ef; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .reach-tag rect { fill: #2a2027; } :root:not([data-theme="light"]) .reach-tag text { fill: #f3e9ef; } }

/* Our own sign-in screens: quiet text links under the main button (13 Nov). */
.btn-link { background: none; border: 0; padding: .5rem 0; min-height: 44px; color: var(--accent, var(--plum)); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-link:hover { color: var(--heading); }
.native-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }

/* ── Food explorer (Kitchen, #kitchen/foods, 14 Nov): finger foods to try, ratings, palate bars. Tokens only, so night mode follows. */
nav.wk-sub { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
nav.wk-sub::-webkit-scrollbar { display: none; }
nav.wk-sub a { flex: none; white-space: nowrap; }
@media (max-width: 480px) { .wk-long { display: none; } }
.fx-key { display: flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--soft); font-size: var(--t-xs); }
.fx-key .fx-new { position: static; }
.fx-week, .fx-next, .fx-card, .fx-safe, .fx-all, .fx-src { margin-top: 24px; max-width: 760px; }
.fx-safe > summary, .fx-all > summary, .fx-src > summary { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; min-height: 44px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; list-style: none; color: var(--heading); }
.fx-all > summary, .fx-src > summary { grid-template-columns: 1fr; }
.fx-safe > summary::-webkit-details-marker, .fx-all > summary::-webkit-details-marker, .fx-src > summary::-webkit-details-marker { display: none; }
.fx-safe > summary small, .fx-all > summary small, .fx-src > summary small { grid-column: 1 / -1; font-size: var(--t-sm); color: var(--soft); }
.fx-safe > summary .ico { color: var(--accent); }
.fx-safe ul, .fx-src ul { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink); font-size: var(--t-sm); }
.fx-week .block-title, .fx-next .block-title { margin-bottom: 12px; }
.fx-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fx-day { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 56px; padding: 6px 0; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--soft); font-size: var(--t-xs); font-weight: 600; }
.fx-day b { font-size: var(--t-lg); color: var(--heading); font-weight: 600; }
.fx-day.is-today { border-color: var(--line-ui); }
.fx-day.is-on { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-strong); }
.fx-day.is-on b { color: var(--on-strong); }
.fx-done { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--forest-tint); color: var(--positive); font-style: normal; }
.fx-done .ico { width: 12px; height: 12px; }
.fx-new { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.fx-dayhead { margin: 16px 0 8px; font-weight: 600; color: var(--heading); }
.fx-note { display: flex; gap: 8px; margin: 0 0 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--gold-tint); color: var(--ink); font-size: var(--t-sm); }
.fx-note .ico, .fx-allergen .ico, .fx-again .ico { flex: none; margin-top: 2px; }
.fx-foods { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.fx-food { padding: 16px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); }
.fx-top { display: flex; align-items: center; gap: 8px; }
.fx-top h4 { margin: 0; font: 600 var(--t-lg)/1.25 var(--ui); color: var(--heading); }
.fx-tries { margin-left: auto; padding: 2px 8px; border-radius: var(--r-pill); background: var(--sunk); color: var(--soft); font-size: var(--t-xs); font-weight: 600; white-space: nowrap; }
.fx-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--dot, var(--sunk)); } /* food colours stay true at night */
.fx-c-green { --dot: #5b9a49; } .fx-c-orange { --dot: #ef8a3d; } .fx-c-yellow { --dot: #f0c15a; } .fx-c-red { --dot: #d4553a; }
.fx-c-purple { --dot: #6a4c93; } .fx-c-white { --dot: #f4efe6; } .fx-c-brown { --dot: #8a5a3c; } .fx-c-pink { --dot: #f09a7c; }
.fx-why { margin-top: 6px; color: var(--accent); font-size: var(--t-sm); font-weight: 600; }
.fx-prep { margin-top: 6px; color: var(--ink); font-size: var(--t-sm); }
.fx-again, .fx-allergen { display: flex; gap: 6px; margin-top: 8px; color: var(--soft); font-size: var(--t-sm); }
.fx-rate { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.fx-r { min-height: 44px; padding: 0 4px; border: 1px solid var(--line-ui); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-size: var(--t-sm); font-weight: 600; line-height: 1.1; }
.fx-r:hover { border-color: var(--accent); }
.fx-r.is-on { border-width: 2px; }
.fx-r.fx-love.is-on { background: var(--forest-tint); border-color: var(--positive); color: var(--positive); }
.fx-r.fx-fine.is-on { background: var(--sunk); border-color: var(--ink); color: var(--heading); }
.fx-r.fx-dislike.is-on { background: var(--gold-tint); border-color: var(--gold-ink); color: var(--gold-ink); }
.fx-r.fx-hate.is-on { background: var(--coral-tint); border-color: var(--coral-ink); color: var(--coral-ink); }
.fx-card { padding: 20px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.fx-card .block-title { margin-bottom: 10px; }
.fx-lede { color: var(--soft); margin-bottom: 12px; }
.fx-meter { height: 10px; border-radius: var(--r-pill); background: var(--sunk); overflow: hidden; }
.fx-meter span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--positive); }
.fx-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fx-lines li { display: flex; gap: 8px; color: var(--ink); }
.fx-lines .ico { flex: none; margin-top: 3px; color: var(--accent); }
.fx-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.fx-count { padding: 4px 10px; border-radius: var(--r-pill); background: var(--sunk); color: var(--soft); font-size: var(--t-xs); font-weight: 600; }
.fx-count b { color: var(--heading); }
.fx-dims { margin-top: 12px; }
.fx-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fx-bars li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); grid-template-areas: "l n" "b b"; row-gap: 4px; align-items: center; font-size: var(--t-sm); }
.fx-bl { grid-area: l; color: var(--heading); font-weight: 600; }
.fx-bl::first-letter { text-transform: uppercase; }
.fx-bn { grid-area: n; justify-self: end; color: var(--soft); }
.fx-bar { grid-area: b; height: 10px; border-radius: var(--r-pill); background: var(--sunk); overflow: hidden; }
.fx-bar span { display: block; height: 100%; min-width: 4px; border-radius: var(--r-pill); background: var(--positive); }
.fx-h3 { margin: 20px 0 10px; font: 600 var(--t-lg)/1.3 var(--ui); color: var(--heading); }
.fx-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fx-mini li { padding: 12px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); }
.fx-mn { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--heading); }
.fx-mini .fx-rate { margin-top: 8px; }
.fx-all[open] > summary, .fx-src[open] > summary, .fx-safe[open] > summary { margin-bottom: 12px; }
/* Food explorer v2: balance, their foods, add a food */
.fx-mine { margin-top: 24px; max-width: 760px; }
.fx-mine .block-title { margin-bottom: 12px; }
.fx-balline { display: flex; gap: 8px; margin: 0 0 14px; font-weight: 600; color: var(--heading); }
.fx-balline .ico { flex: none; margin-top: 3px; color: var(--accent); }
.fx-balbars li { grid-template-areas: "l n" "b b" "h h"; }
.fx-bh { grid-area: h; color: var(--soft); font-size: var(--t-xs); }
.fx-bar span.is-zero { min-width: 0; }
.fx-bal .fx-foods { margin-bottom: 4px; }
.fx-bal .fx-food { background: var(--sunk); box-shadow: none; }
.fx-bal .fine { margin-top: 12px; }
.fx-hist li { display: grid; gap: 4px; }
.fx-meta { color: var(--soft); font-size: var(--t-xs); }
.fx-tag { margin-left: auto; padding: 2px 8px; border-radius: var(--r-pill); background: var(--sunk); color: var(--soft); font-size: var(--t-xs); font-weight: 600; white-space: nowrap; }
.fx-tag.fx-love { background: var(--forest-tint); color: var(--positive); }
.fx-tag.fx-dislike { background: var(--gold-tint); color: var(--gold-ink); }
.fx-tag.fx-hate { background: var(--coral-tint); color: var(--coral-ink); }
.fx-link { justify-self: start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--accent); font-size: var(--t-sm); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.fx-unknown { margin-top: 12px; color: var(--soft); font-size: var(--t-sm); }
.fx-unknown .fx-link { min-height: 32px; }
.fx-more { margin-top: 8px; }
.fx-more > summary { min-height: 44px; display: flex; align-items: center; color: var(--accent); font-weight: 600; cursor: pointer; }
.fx-add { margin-top: 16px; }
.fx-add > summary { display: grid; min-height: 44px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; list-style: none; color: var(--heading); }
.fx-add > summary::-webkit-details-marker { display: none; }
.fx-add > summary small { font-size: var(--t-sm); color: var(--soft); }
.fx-form { display: grid; gap: 14px; margin-top: 12px; padding: 16px; border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow); }
.fx-form fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.fx-form legend { padding: 0; margin-bottom: 8px; font-weight: 500; color: var(--heading); }
.fx-form legend small { color: var(--soft); font-weight: 400; }
.fx-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-tagin { position: relative; display: inline-flex; font-weight: 600; font-size: var(--t-sm); }
.fx-tagin input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.fx-tagin span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-ui); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); }
.fx-tagin input:checked + span { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-strong); }
.fx-tagin input:focus-visible + span { outline: 2.5px solid var(--plum); outline-offset: 2px; }
.fx-form .btn { justify-self: start; }
@media (min-width: 900px) { .fx-week, .fx-next, .fx-card, .fx-safe, .fx-all, .fx-src, .fx-mine { margin-left: 28px; margin-right: 28px; } }

/* Nipalong logo above the sign-in screens */
.auth-logo img { display: block; height: 48px; width: auto; margin: 0 0 20px; }

/* "Continue with Google": Google's light button style (white, grey outline, the four-colour G) */
.or-rule { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--soft); font-size: 14px; }
.or-rule::before, .or-rule::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 48px; padding: 0 16px;
  background-color: rgb(255, 255, 255); color: #1f1f1f; border: 1px solid #747775; border-radius: 999px; font: 500 16px/1 var(--font-body, inherit); cursor: pointer; }
.btn-google:hover { background: #f8f9fa; }
.btn-google:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }
.btn-google .g-mark { flex: none; }

/* Walk-through on phones (15 Nov): a fixed sheet just above the dock, clearly lifted off the dimmed page in light and dark */
.tour-card.is-sheet { top: auto; left: 12px; right: 12px; bottom: calc(90px + env(safe-area-inset-bottom)); max-width: none; margin: 0;
  border: 1px solid var(--line-2); box-shadow: 0 -10px 40px rgba(0, 0, 0, .45); }

/* Moving the Explore map: drag and pinch go to the map, not the page; zoom buttons sit on top of it */
.mapx-svg[data-pan] { touch-action: none; cursor: grab; }
.mapx-svg[data-pan]:active { cursor: grabbing; }
.mapx-ctl { position: absolute; z-index: 2; top: 10px; right: 10px; display: grid; gap: 6px; }
.mapx-ctl button { width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--heading);
  font: 600 22px/1 var(--ui); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); cursor: pointer; }
.mapx-ctl button:focus-visible { outline: 3px solid var(--plum); outline-offset: 2px; }

/* Pull to refresh: a small round spinner that drops in from the top */
.ptr { position: fixed; z-index: 95; top: 0; left: 50%; width: 40px; height: 40px; border-radius: 50%; background: var(--surface);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25); display: grid; place-items: center; pointer-events: none; }
.ptr span { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--accent); }
.ptr.is-ready span { border-color: var(--accent); border-top-color: transparent; }
@media (prefers-reduced-motion: no-preference) { .ptr.is-spinning span { animation: ptr-spin .7s linear infinite; } }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
