/* ==========================================================================
   GlutenWise — "Calm Futurism"
   Rule #1: the four verdict colours (--ok, --check, --avoid, --unsure) are
   reserved for verdicts. Never use them for decoration.
   ========================================================================== */

:root {
  --ink: #F6F5FC;
  --ink-2: #EFEDF9;
  --surface: #FFFFFF;
  --surface-2: #F9F8FE;
  --line: rgba(21, 18, 43, 0.10);
  --line-2: rgba(21, 18, 43, 0.18);
  --text: #15122B;
  --muted: #5B5677;
  --brand: #5B47E0;
  --brand-2: #7B61FF;
  --brand-ink: #FFFFFF;
  --brand-soft: rgba(91, 71, 224, 0.10);
  --beam: #0A8FBF;
  --beam-soft: rgba(10, 143, 191, 0.14);
  --glass: rgba(255, 255, 255, 0.72);
  --glow-a: rgba(123, 97, 255, 0.20);
  --glow-b: rgba(95, 216, 255, 0.18);
  --shadow: 0 1px 2px rgba(21, 18, 43, .06), 0 12px 32px -12px rgba(21, 18, 43, .18);
  --paper: #FBF4E6;
  --paper-2: #F5EAD3;
  --paper-ink: #3A2E1F;
  --paper-line: rgba(58, 46, 31, 0.10);

  --ok: #157A4A;      --ok-bg: #E2F4EA;
  --check: #8F5C00;   --check-bg: #FFF1D2;
  --avoid: #BF262C;   --avoid-bg: #FDE5E6;
  --unsure: #575C70;  --unsure-bg: #ECEDF2;

  --f-display: "Anek Latin", "Anek Devanagari", system-ui, sans-serif;
  --f-body: "Plus Jakarta Sans", "Anek Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-hi: "Anek Devanagari", "Plus Jakarta Sans", sans-serif;
  --f-hand: "Caveat", "Segoe Print", cursive;

  --r-sm: 10px;
  --r: 18px;
  --r-lg: 26px;
  --gutter: 16px;
  --nav-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #0D0B1E; --ink-2: #110E26; --surface: #17142E; --surface-2: #1C1837;
    --line: rgba(237, 235, 250, 0.09); --line-2: rgba(237, 235, 250, 0.16);
    --text: #EDEBFA; --muted: #A9A4C7;
    --brand: #8B7BFF; --brand-2: #A99BFF; --brand-ink: #0D0B1E; --brand-soft: rgba(139, 123, 255, 0.14);
    --beam: #5FD8FF; --beam-soft: rgba(95, 216, 255, 0.12);
    --glass: rgba(23, 20, 46, 0.62);
    --glow-a: rgba(139, 123, 255, 0.22); --glow-b: rgba(95, 216, 255, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -16px rgba(0, 0, 0, .6);
    --ok: #3FCB87; --ok-bg: rgba(47, 191, 122, 0.15);
    --check: #F2B544; --check-bg: rgba(242, 181, 68, 0.15);
    --avoid: #F6696E; --avoid-bg: rgba(240, 86, 92, 0.16);
    --unsure: #A8ADC2; --unsure-bg: rgba(154, 159, 181, 0.15);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #0D0B1E; --ink-2: #110E26; --surface: #17142E; --surface-2: #1C1837;
  --line: rgba(237, 235, 250, 0.09); --line-2: rgba(237, 235, 250, 0.16);
  --text: #EDEBFA; --muted: #A9A4C7;
  --brand: #8B7BFF; --brand-2: #A99BFF; --brand-ink: #0D0B1E; --brand-soft: rgba(139, 123, 255, 0.14);
  --beam: #5FD8FF; --beam-soft: rgba(95, 216, 255, 0.12);
  --glass: rgba(23, 20, 46, 0.62);
  --glow-a: rgba(139, 123, 255, 0.22); --glow-b: rgba(95, 216, 255, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -16px rgba(0, 0, 0, .6);
  --ok: #3FCB87; --ok-bg: rgba(47, 191, 122, 0.15);
  --check: #F2B544; --check-bg: rgba(242, 181, 68, 0.15);
  --avoid: #F6696E; --avoid-bg: rgba(240, 86, 92, 0.16);
  --unsure: #A8ADC2; --unsure-bg: rgba(154, 159, 181, 0.15);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
:lang(hi), :lang(mr) { font-family: var(--f-hi); }
/* Card languages. Each font is loaded by main.js only when that language is picked. */
:lang(bn), :lang(as) { font-family: "Anek Bangla", "Nirmala UI", "Noto Sans Bengali", sans-serif; }
:lang(pa) { font-family: "Anek Gurmukhi", "Nirmala UI", "Noto Sans Gurmukhi", sans-serif; }
:lang(ta) { font-family: "Anek Tamil", "Nirmala UI", "Noto Sans Tamil", sans-serif; }
:lang(te) { font-family: "Anek Telugu", "Nirmala UI", "Noto Sans Telugu", sans-serif; }
:lang(kn) { font-family: "Anek Kannada", "Nirmala UI", "Noto Sans Kannada", sans-serif; }
:lang(ml) { font-family: "Anek Malayalam", "Nirmala UI", "Noto Sans Malayalam", sans-serif; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--beam); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--brand); color: var(--brand-ink); }
.sprite { position: absolute; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: var(--brand-ink); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.ico { width: 20px; height: 20px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 28px; } }
/* Single-column grids must never grow wider than the screen. */
.hero__grid, .risks__demo, .explain__grid, .join, .mark, .notebook__grid, .suggest, .footer__grid, .lib-tools, .food-tools, .form--inline { grid-template-columns: minmax(0, 1fr); }
.hero__grid > *, .risks__demo > *, .explain__grid > *, .join > *, .mark > *, .notebook__grid > *, .suggest > *, .footer__grid > * { min-width: 0; }
.dials { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* ---------- Preview bar ---------- */
.preview-bar {
  font-size: 13px; line-height: 1.4; padding: 8px var(--gutter); text-align: center;
  background: var(--surface-2); color: var(--muted); border-bottom: 1px dashed var(--line-2);
}
.preview-bar b {
  display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 99px;
  background: var(--beam-soft); color: var(--beam); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
html[data-preview="false"] .preview-bar,
html[data-preview="false"] .review-pill,
html[data-preview="false"] .draft-ribbon { display: none; }

/* ---------- Type ---------- */
.display, .h2, .h3, .letter__h {
  font-family: var(--f-display);
  font-stretch: 125%;
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
}
.display { font-size: clamp(2.6rem, 8.4vw, 5.6rem); }
.h2 { font-size: clamp(1.75rem, 4.2vw, 3rem); line-height: 1.08; }
.h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 700; line-height: 1.2; }
.glow {
  background: linear-gradient(100deg, var(--brand) 10%, var(--beam) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--muted); max-width: 62ch; margin: 14px 0 0; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand);
}
.kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--brand), var(--beam)); }
.head { margin-bottom: 32px; }
.head--center { text-align: center; }
.head--center .lede { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 650; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn--primary {
  background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 8px 24px -10px var(--brand), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn--primary:hover { background: var(--brand-2); color: var(--brand-ink); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--brand); color: var(--text); }
.btn--sm { min-height: 38px; padding: 7px 14px; font-size: 14px; }
.btn--lg { min-height: 52px; padding: 12px 24px; font-size: 16.5px; }
.btn .ico { width: 18px; height: 18px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  background: transparent; border: 1px solid var(--line); cursor: pointer;
}
.icon-btn:hover { border-color: var(--brand); }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 14px; justify-self: start; }

/* ---------- Verdict chips ---------- */
.vchip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 8px;
  border-radius: 999px; font-weight: 700; font-size: 13.5px; line-height: 1.3; white-space: nowrap;
}
.vchip .ico { width: 16px; height: 16px; }
.vchip--ok { color: var(--ok); background: var(--ok-bg); }
.vchip--check { color: var(--check); background: var(--check-bg); }
.vchip--avoid { color: var(--avoid); background: var(--avoid-bg); }
.vchip--unsure { color: var(--unsure); background: var(--unsure-bg); }
.vchip--none { color: var(--muted); background: transparent; border: 1px dashed var(--line-2); font-weight: 600; white-space: normal; }

/* ---------- Brand mark ---------- */
.m-ring, .m-handle { fill: none; stroke: var(--brand); stroke-linecap: round; }
.m-ring { stroke-width: 4; }
.m-handle { stroke-width: 5; }
.m-stem { fill: none; stroke: var(--text); stroke-width: 2.4; stroke-linecap: round; }
.m-kernels { fill: var(--text); }
.m-pixels { fill: var(--beam); }
.m-beam { stroke: var(--beam); stroke-width: 1.6; stroke-linecap: round; fill: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--f-display); font-stretch: 112%; font-weight: 650; font-size: 20px; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand b { font-weight: 800; color: var(--brand); }
.brand__mark { width: 34px; height: 34px; }
.nav__links { display: none; gap: 4px; margin-left: auto; }
.nav__links a { padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.nav__links a:hover { color: var(--text); background: var(--brand-soft); }
.nav__end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav__links + .nav__end { margin-left: 8px; }
.ico--sun { display: none; }
:root[data-theme="dark"] .ico--sun { display: block; }
:root[data-theme="dark"] .ico--moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ico--sun { display: block; }
  :root:not([data-theme="light"]) .ico--moon { display: none; }
}
.nav__toggle { flex-direction: column; gap: 5px; display: inline-flex; align-items: center; justify-content: center; }
.nav__toggle span { display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s ease; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.nav__cta { display: none; }
@media (max-width: 979px) {
  .nav__links.is-open {
    display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0;
    padding: 12px var(--gutter) 20px; background: var(--ink); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav__links.is-open a { padding: 12px; font-size: 16px; }
}
@media (min-width: 980px) {
  .nav__links { display: flex; }
  .nav__toggle { display: none; }
  .nav__cta { display: inline-flex; }
  .nav__end { margin-left: 8px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.section--alt { background: var(--ink-2); border-block: 1px solid var(--line); }
.section--glow { background: radial-gradient(55% 70% at 80% 40%, var(--glow-a), transparent 65%), radial-gradient(50% 60% at 10% 100%, var(--glow-b), transparent 60%), var(--ink); }
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; padding: clamp(36px, 6vw, 72px) 0 32px;
  background:
    radial-gradient(48% 60% at 85% 18%, var(--glow-a), transparent 62%),
    radial-gradient(40% 50% at 8% 8%, var(--glow-b), transparent 60%),
    var(--ink);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 60% at 60% 30%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(70% 60% at 60% 30%, #000 10%, transparent 70%);
}
.hero__grain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero__grid { position: relative; z-index: 1; display: grid; gap: 40px; align-items: start; }
@media (min-width: 1040px) { .hero__grid { grid-template-columns: 1.02fr 1fr; gap: 48px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 6px 14px 6px 10px; border-radius: 99px; background: var(--glass); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--muted); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--beam); box-shadow: 0 0 0 0 var(--beam); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--beam) 60%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Card maker */
.maker {
  margin-top: 28px; padding: 22px; border-radius: var(--r-lg);
  background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.maker__sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 10px; margin: 0 0 18px; font-size: clamp(1.1rem, 2.2vw, 1.3rem); font-weight: 600; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button {
  min-height: 40px; padding: 6px 16px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font-weight: 650; color: var(--muted); transition: background .2s ease, color .2s ease;
}
.seg button[aria-checked="true"] { background: var(--brand); color: var(--brand-ink); }
.seg--block { display: flex; width: max-content; }
.select--block { display: flex; width: 100%; max-width: 340px; margin-bottom: 4px; }
.select--block select { width: 100%; }
.select { position: relative; display: inline-flex; align-items: center; }
.select select {
  appearance: none; -webkit-appearance: none; min-height: 48px; padding: 8px 40px 8px 16px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-weight: 650; cursor: pointer;
}
.select .ico { position: absolute; right: 14px; width: 16px; height: 16px; pointer-events: none; color: var(--muted); }
.maker__row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14.5px; color: var(--muted); }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle__ui { width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s ease; flex: none; }
.toggle__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s ease; }
.toggle input:checked + .toggle__ui { background: var(--brand); }
.toggle input:checked + .toggle__ui::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle__ui { outline: 2.5px solid var(--beam); outline-offset: 3px; }
.maker__more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.maker__more summary { cursor: pointer; font-weight: 650; font-size: 14.5px; list-style: none; }
.maker__more summary::-webkit-details-marker { display: none; }
.maker__more summary::before { content: "+ "; color: var(--brand); font-weight: 800; }
.maker__more[open] summary::before { content: "− "; }
.maker__more summary span { color: var(--muted); font-weight: 500; }
.maker__fields { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 560px) { .maker__fields { grid-template-columns: 1fr 1fr; } .maker__fields label:nth-child(3) { grid-column: 1 / -1; } }
.maker__start { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 650; text-decoration: none; }
.maker__start .ico { width: 16px; height: 16px; transition: transform .2s ease; }
.maker__start:hover .ico { transform: translateX(3px); }

/* Inputs */
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
label small { font-weight: 500; color: var(--muted); }
input[type="text"], input[type="search"], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 500; font-size: 16px;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- Label X-Ray ---------- */
.xray {
  position: relative; padding: 18px; border-radius: var(--r-lg);
  background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.xray::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, color-mix(in srgb, var(--brand) 60%, transparent), transparent 40%, transparent 60%, color-mix(in srgb, var(--beam) 60%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.xray__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.xray__title { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-family: var(--f-display); font-stretch: 118%; font-weight: 700; font-size: 17px; }
.xray__title .ico { color: var(--beam); }
.xray__tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.xray__tabs button {
  min-height: 36px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  font-size: 13.5px; font-weight: 650; color: var(--muted); cursor: pointer;
}
.xray__tabs button[aria-selected="true"] { background: var(--text); color: var(--ink); border-color: var(--text); }
.xray__stage {
  position: relative; border-radius: var(--r); overflow: hidden; touch-action: pan-y;
  background: repeating-linear-gradient(135deg, #e8e4d9 0 12px, #e2ddd0 12px 24px);
  padding: 18px; cursor: crosshair; user-select: none; -webkit-user-select: none;
}
.xray__pack {
  position: relative; background: #FFFDF7; color: #3B3A36; border-radius: 10px; padding: 16px 18px 18px;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 10px 24px -14px rgba(0,0,0,.45); transform: rotate(-.6deg);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}
.pack__brand { margin: 0; font-family: var(--f-display); font-stretch: 120%; font-weight: 800; font-size: 17px; color: #26233a; letter-spacing: -.01em; }
.pack__sub { margin: 0 0 10px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #8b8676; }
.pack__text { margin: 0; font-size: 13.4px; line-height: 1.62; color: #55524a; }
.pack__text .tok { border-radius: 4px; transition: color .25s ease, background .25s ease, box-shadow .25s ease; }
.pack__text .tok.seen[data-v="ok"] { box-shadow: inset 0 -2px 0 #2FBF7A; }
.pack__text .tok.seen[data-v="check"] { box-shadow: inset 0 -2px 0 #E0A12C; }
.pack__text .tok.seen[data-v="avoid"] { box-shadow: inset 0 -2px 0 #E5484D; color: #8d1c20; }
.pack__text .tok.seen[data-v="unsure"] { box-shadow: inset 0 -2px 0 #8A8FA3; }
.xray__mag .pack__text .tok[data-v="ok"] { background: #DDF3E7; color: #0F6B40; }
.xray__mag .pack__text .tok[data-v="check"] { background: #FFEBC2; color: #7A4E00; }
.xray__mag .pack__text .tok[data-v="avoid"] { background: #FDDCDD; color: #A51D22; font-weight: 700; }
.xray__mag .pack__text .tok[data-v="unsure"] { background: #E6E7EE; color: #4C5163; }
.xray__lens {
  --size: 132px;
  position: absolute; left: 0; top: 0; width: var(--size); height: var(--size); border-radius: 50%;
  overflow: hidden; cursor: grab; touch-action: none; z-index: 3;
  border: 2px solid #5FD8FF;
  box-shadow: 0 0 0 6px rgba(95, 216, 255, .16), 0 0 34px rgba(95, 216, 255, .55), 0 18px 34px -12px rgba(0,0,0,.55), inset 0 0 22px rgba(95, 216, 255, .35);
  background: #FFFDF7;
  will-change: transform;
}
.xray__lens:active { cursor: grabbing; }
.xray__lens:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
@media (max-width: 560px) { .xray__lens { --size: 104px; } }
.xray__mag { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.xray__mag .xray__pack { box-shadow: none; }
.xray__reticle { position: absolute; inset: 0; pointer-events: none; border-radius: 50%;
  background:
    linear-gradient(#5FD8FF, #5FD8FF) center 6px / 2px 10px no-repeat,
    linear-gradient(#5FD8FF, #5FD8FF) center calc(100% - 6px) / 2px 10px no-repeat,
    linear-gradient(#5FD8FF, #5FD8FF) 6px center / 10px 2px no-repeat,
    linear-gradient(#5FD8FF, #5FD8FF) calc(100% - 6px) center / 10px 2px no-repeat,
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.55), transparent 36%);
}
.xray__beam {
  position: absolute; left: 0; right: 0; top: 0; height: 3px; opacity: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, transparent, #5FD8FF 20%, #fff 50%, #5FD8FF 80%, transparent);
  box-shadow: 0 0 18px 4px rgba(95, 216, 255, .6);
}
.xray__beam.is-on { opacity: 1; }
.xray__controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.xray__paste { display: grid; gap: 10px; margin-top: 12px; }
.xray__paste label { font-weight: 500; color: var(--muted); font-size: 13.5px; }
.xray__paste .btn { justify-self: start; }
.xray__panel { margin-top: 14px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.axis { display: grid; grid-template-columns: minmax(92px, 132px) minmax(0, 1fr); align-items: start; gap: 10px; padding: 6px 0; }
.axis__k { font-size: 13px; font-weight: 700; color: var(--muted); padding-top: 4px; }
.axis__v { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13.5px; color: var(--muted); }
.axis--overall { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.axis--overall .axis__k { color: var(--text); }
.axis__note { font-size: 13px; color: var(--muted); }
.xray__progress { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; font-size: 12.5px; color: var(--muted); }
.xray__progress i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.xray__progress b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--beam)); transition: width .25s ease; }
.found { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; max-height: 190px; overflow: auto; }
.found li { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; font-size: 13.5px; padding: 6px 0; border-top: 1px dashed var(--line); }
.found li:first-child { border-top: 0; }
.found b { font-weight: 700; }
.found span.why { grid-column: 2; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.ask { color: var(--muted); }
.ask b { color: var(--text); font-weight: 700; }
.found .ask { grid-column: 2; font-size: 12.5px; line-height: 1.45; }
.ask--block { display: block; font-size: 14px; }
.xray__caption { margin: 10px 2px 0; font-size: 12.5px; color: var(--muted); }

/* Trust row */
.trust-row { list-style: none; margin: 40px 0 0; padding: 18px 0 0; display: flex; flex-wrap: wrap; gap: 12px 28px; border-top: 1px solid var(--line); position: relative; z-index: 1; }
.trust-row li { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.trust-row .ico { color: var(--brand); }

/* ---------- Start here ---------- */
.week { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); counter-reset: d; }
.week a {
  display: grid; gap: 4px; align-content: start; height: 100%; padding: 18px; border-radius: var(--r); text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.week a:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); }
.week i { font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--beam); }
.week b { font-family: var(--f-display); font-stretch: 112%; font-size: 18px; font-weight: 700; line-height: 1.2; }
.week span { color: var(--muted); font-size: 14.5px; }
.hand-note { font-family: var(--f-hand); font-size: 27px; line-height: 1.2; color: var(--brand); margin: 28px 0 0; transform: rotate(-1.2deg); }
.hand-note span { white-space: nowrap; }
.hand-note--sm { font-size: 23px; margin-top: 16px; }

/* ---------- Library ---------- */
.lib-tools, .food-tools { display: grid; gap: 14px; margin-bottom: 18px; }
@media (min-width: 900px) { .lib-tools, .food-tools { grid-template-columns: minmax(280px, 380px) 1fr; align-items: center; } .lib-count { grid-column: 1 / -1; } }
.search { position: relative; display: block; }
.search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.search input { padding-left: 42px; min-height: 50px; border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 14px; font-weight: 650; color: var(--muted); cursor: pointer; transition: all .15s ease;
}
.chip:hover { border-color: var(--brand); color: var(--text); }
.chip.is-on, .chip[aria-checked="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.lib-count { margin: 0; font-size: 13.5px; color: var(--muted); }
.guides { display: grid; gap: 12px; }
@media (min-width: 900px) { .guides { grid-template-columns: 1fr 1fr; } .guide:has(details[open]) { grid-column: 1 / -1; } }
.guide { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); transition: border-color .2s ease, box-shadow .2s ease; scroll-margin-top: calc(var(--nav-h) + 16px); }
.guide:hover { border-color: var(--line-2); }
.guide:has(details[open]) { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: var(--shadow); }
.guide.is-hidden { display: none; }
.guide summary { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 18px 18px; cursor: pointer; list-style: none; }
.guide summary::-webkit-details-marker { display: none; }
.guide__n { font-style: normal; font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 14px; color: var(--brand); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-soft); }
.guide__head { display: grid; gap: 2px; }
.guide__title { font-weight: 750; font-size: 16.5px; line-height: 1.3; }
.guide__sum { color: var(--muted); font-size: 14px; line-height: 1.45; }
.guide__chev { width: 20px; height: 20px; color: var(--muted); transition: transform .2s ease; }
.guide details[open] .guide__chev { transform: rotate(180deg); }
.guide__body { padding: 0 18px 20px; max-width: 78ch; margin-left: 52px; }
@media (max-width: 600px) { .guide__body { margin-left: 0; } }
.guide__body p, .guide__body ul, .guide__body ol { margin: 0 0 12px; }
.guide__body ul, .guide__body ol { padding-left: 1.2em; }
.guide__body li { margin-bottom: 6px; }
.guide__body li::marker { color: var(--brand); }
.guide__body h4 { margin: 18px 0 6px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 28px; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--brand); }
.checklist li::after { content: ""; position: absolute; left: 7px; top: 7px; width: 5px; height: 8px; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.callout { padding: 12px 14px; border-radius: 12px; background: var(--beam-soft); border-left: 3px solid var(--beam); }
.compare { display: grid; gap: 10px; margin-bottom: 12px; }
@media (min-width: 720px) { .compare { grid-template-columns: repeat(3, 1fr); } }
.compare > div { padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.compare h4 { margin-top: 0 !important; }
.compare p { margin: 0 !important; font-size: 14.5px; }
.takeaway { padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); }
.takeaway b { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); margin-bottom: 2px; }
.guide__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); margin-top: 14px !important; }
.review-pill { display: inline-block; padding: 2px 10px; border-radius: 99px; border: 1px dashed var(--line-2); font-weight: 650; }
.lib-empty { margin-top: 16px; color: var(--muted); }

/* ---------- Two risks ---------- */
.risks__demo { display: grid; gap: 24px; align-items: center; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (min-width: 900px) { .risks__demo { grid-template-columns: 1fr 1.1fr; padding: 32px; } }
.tawa { border-radius: var(--r); background: radial-gradient(70% 70% at 50% 40%, var(--brand-soft), transparent 70%); padding: 8px; }
.tawa__svg { width: 100%; height: auto; }
.tawa__svg .tw-crumbs, .tawa__svg .tw-wipe, .tawa__svg .tw-sep, .tawa__svg .tw-unknown { opacity: 0; transition: opacity .4s ease; }
.tawa__svg.st-shared .tw-crumbs { opacity: 1; }
.tawa__svg.st-wiped .tw-wipe { opacity: 1; }
.tawa__svg.st-wiped .tw-crumbs { opacity: .25; }
.tawa__svg.st-separate .tw-sep { opacity: 1; }
.tawa__svg.st-unknown .tw-unknown { opacity: 1; }
.cond { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cond button { min-height: 40px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 650; font-size: 14px; color: var(--muted); cursor: pointer; }
.cond button[aria-checked="true"] { background: var(--text); color: var(--ink); border-color: var(--text); }
.dials { display: grid; gap: 14px; }
.dial { padding: 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.dial svg { width: 100%; max-width: 180px; margin: 0 auto; overflow: visible; }
.dial__track { fill: none; stroke: var(--line); stroke-width: 10; stroke-linecap: round; }
.dial__z { fill: none; stroke-width: 10; opacity: .3; }
.dial__z--ok { stroke: var(--ok); stroke-linecap: round; }
.dial__z--check { stroke: var(--check); }
.dial__z--avoid { stroke: var(--avoid); stroke-linecap: round; }
.dial__needle { transform-origin: 60px 64px; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.dial__needle path { stroke: var(--text); stroke-width: 3; stroke-linecap: round; }
.dial__needle circle { fill: var(--text); }
.dial__k { margin: 6px 0 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.dial__v { margin: 0; min-height: 30px; }
.overall { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.overall__k { font-family: var(--f-display); font-stretch: 118%; font-weight: 750; }
.overall .vchip { font-size: 15px; padding: 6px 14px 6px 10px; }
.risks__why { margin: 10px 2px 0; color: var(--muted); font-size: 15px; }
.minis { display: grid; gap: 12px; margin-top: 18px; }
@media (min-width: 760px) { .minis { grid-template-columns: repeat(3, 1fr); } }
.mini { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.mini h4 { margin: 0 0 10px; font-family: var(--f-display); font-stretch: 115%; font-size: 17px; }
.mini dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; font-size: 13.5px; }
.mini dt { color: var(--muted); font-weight: 650; }
.mini dd { margin: 0; }
.mini dd.mini__why { grid-column: 2; margin: -4px 0 4px; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.mini__tip { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.mini__tip b { color: var(--text); }

/* ---------- Food explorer ---------- */
.dishes { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.dish { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.dish__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.dish__n { margin: 0; font-family: var(--f-display); font-stretch: 112%; font-weight: 750; font-size: 18px; line-height: 1.2; }
.dish__hi { display: block; font-family: var(--f-hi); font-weight: 500; font-size: 14px; color: var(--muted); margin-top: 2px; }
.dish__r { flex: none; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line); }
.drow { display: grid; grid-template-columns: 92px 1fr; gap: 4px 10px; align-items: start; font-size: 13.5px; }
.drow__k { color: var(--muted); font-weight: 650; padding-top: 4px; }
.drow__why { grid-column: 2; color: var(--muted); line-height: 1.45; }
.dish__overall { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.dish__ask, .dish__swap { margin: 0; font-size: 13.5px; color: var(--muted); }
.dish__ask b, .dish__swap b { color: var(--text); }
.more-row { display: flex; justify-content: center; margin-top: 18px; }
.decoder { margin-top: 48px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); scroll-margin-top: calc(var(--nav-h) + 16px); }
.decoder__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 14px; }
.decoder__head p { margin: 0; color: var(--muted); }
.decoded { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
@media (min-width: 760px) { .decoded { grid-template-columns: 1fr 1fr; } }
.decoded li { display: grid; gap: 6px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.decoded li > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.decoded b { font-size: 15px; }
.decoded p { margin: 0; color: var(--muted); font-size: 14px; }
.decoded small { color: var(--muted); font-size: 12px; }
.staples { margin-top: 32px; }
.staples p { color: var(--muted); margin: 6px 0 14px; }
.staples__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.staples__list li { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 650; font-size: 14px; }
.staples__list li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 8px; background: linear-gradient(135deg, var(--brand), var(--beam)); transform: rotate(45deg) translateY(-2px); }

/* ---------- Trust Promise ---------- */
.promise { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); perspective: 1200px; }
.pcard { position: relative; min-height: 270px; border: 0; padding: 0; background: none; cursor: pointer; text-align: left; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, .8, .3, 1); }
.pcard.is-flipped { transform: rotateY(180deg); }
.pcard__face, .pcard__back {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.pcard__back { transform: rotateY(180deg); justify-content: center; background: var(--surface-2); }
.pcard .ico { width: 34px; height: 34px; }
.pcard b { font-family: var(--f-display); font-stretch: 118%; font-size: 22px; font-weight: 760; line-height: 1.1; }
.pcard span span, .pcard__back span { color: var(--muted); font-size: 15px; }
.pcard i { margin-top: auto; font-style: normal; font-size: 13px; color: var(--muted); }
.pcard--ok .pcard__face { border-top: 4px solid var(--ok); } .pcard--ok .ico, .pcard--ok b { color: var(--ok); }
.pcard--check .pcard__face { border-top: 4px solid var(--check); } .pcard--check .ico, .pcard--check b { color: var(--check); }
.pcard--avoid .pcard__face { border-top: 4px solid var(--avoid); } .pcard--avoid .ico, .pcard--avoid b { color: var(--avoid); }
.pcard--unsure .pcard__face { border-top: 4px solid var(--unsure); } .pcard--unsure .ico, .pcard--unsure b { color: var(--unsure); }
.pcard__back b { color: var(--text) !important; font-size: 17px; }

/* ---------- Kavya's notebook (always paper, both themes) ---------- */
.notebook-sec { background: radial-gradient(60% 60% at 50% 0%, var(--glow-a), transparent 70%), var(--ink); }
.notebook {
  position: relative; padding: clamp(22px, 4vw, 48px); border-radius: 22px; color: var(--paper-ink);
  background:
    linear-gradient(90deg, transparent 52px, rgba(229, 72, 77, .18) 52px 54px, transparent 54px),
    repeating-linear-gradient(transparent 0 31px, var(--paper-line) 31px 32px),
    var(--paper);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.5), 0 2px 0 rgba(0,0,0,.04);
}
.notebook ::selection { background: #3A2E1F; color: var(--paper); }
.notebook a { color: #6b4a1f; }
.draft-ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap; background-color: #FBF4E6 !important; padding: 4px 10px; border-radius: 99px; background: rgba(58,46,31,.08); border: 1px dashed rgba(58,46,31,.35); font-size: 12px; font-weight: 700; color: #6b5a44; }
.notebook__grid { display: grid; gap: 28px; }
@media (min-width: 980px) { .notebook__grid { grid-template-columns: 220px 1fr 260px; align-items: start; } }
.polaroid { margin: 0; padding: 10px 10px 30px; background: #fff; border-radius: 4px; box-shadow: 0 10px 24px -12px rgba(0,0,0,.35); transform: rotate(-3deg); max-width: 240px; }
.polaroid__img { aspect-ratio: 4 / 5; display: grid; place-items: center; align-content: center; gap: 8px; background: linear-gradient(160deg, #EDE7FF, #E3F7FD); color: #5B47E0; border-radius: 2px; }
.polaroid__img svg { width: 60%; }
.polaroid__img img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; display: block; }
.polaroid__img span { font-size: 12px; font-weight: 700; color: #6b6386; }
.polaroid figcaption { font-family: var(--f-hand); font-size: 21px; text-align: center; margin-top: 8px; color: #3A2E1F; }
.kicker--paper { color: #8a5a1a; }
.kicker--paper::before { background: #8a5a1a; }
.letter__h { color: #2a2116; font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 14px; }
.letter p { font-size: 16.5px; line-height: 32px; margin: 0 0 32px; }
.letter em { font-style: italic; }
.sign { font-family: var(--f-hand); font-size: 44px !important; line-height: 1 !important; color: #3d2bb8; margin: 0 0 6px !important; transform: rotate(-3deg); transform-origin: left; }
.sign__t { font-size: 14px !important; color: #6b5a44; line-height: 1.4 !important; margin: 0 !important; }
.notes { display: grid; gap: 18px; }
.sticky { padding: 16px 18px; background: #FFF6B8; border-radius: 4px; box-shadow: 0 10px 20px -12px rgba(0,0,0,.4); transform: rotate(1.6deg); font-family: var(--f-hand); color: #2f2a1c; }
.sticky--b { background: #E6F7FF; transform: rotate(-1.4deg); }
.sticky--c { background: #F0E9FF; transform: rotate(1deg); }
.sticky__h { margin: 0 0 6px; font-weight: 700; font-size: 23px; line-height: 1.1; }
.sticky ul { margin: 0; padding-left: 18px; font-size: 21px; line-height: 1.25; }
.sticky p { margin: 0; font-size: 21px; line-height: 1.25; }

/* ---------- Explain-It ---------- */
.explain__grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 940px) { .explain__grid { grid-template-columns: 1fr 1.05fr; } }
.field-label { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.explain__controls .chips { margin-bottom: 18px; }
.explain__opts { display: grid; gap: 12px; margin-bottom: 18px; }
.explain__opts:empty { display: none; }
.explain__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.parent-tips { list-style: none; padding: 16px 0 0; margin: 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.parent-tips a { font-weight: 650; text-decoration: none; }
.parent-tips a::before { content: "→ "; }
.excard {
  position: relative; padding: 28px; border-radius: var(--r-lg); color: #15122B;
  background: linear-gradient(160deg, #FFFFFF 0%, #F5F2FF 100%); border: 1px solid rgba(91,71,224,.18);
  box-shadow: 0 30px 60px -32px rgba(91, 71, 224, .55);
}
.excard__brand { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #5B47E0; }
.excard__brand::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, #5B47E0, #0A8FBF); transform: rotate(45deg); }
.excard__title { margin: 0 0 14px; font-family: var(--f-display); font-stretch: 112%; font-weight: 760; font-size: 26px; line-height: 1.15; }
.excard p { margin: 0 0 10px; font-size: 16.5px; line-height: 1.55; color: #2b2846; }
.excard .bullet { margin: 0 0 6px; }
/* Card titles take the script font of their language. */
.ccard__title:not(:lang(en)), .excard__title:not(:lang(en)) { font-family: inherit; }
.excard__foot { margin-top: 16px !important; font-size: 12px !important; color: #6b6786 !important; }

/* ---------- Myths ---------- */
.myth { max-width: 640px; margin: 0 auto; text-align: center; }
.myth__card {
  min-height: 240px; display: grid; align-content: center; gap: 14px; padding: 32px 26px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .4s ease;
}
.myth__card.bump { animation: bump .45s ease; }
@keyframes bump { 0% { transform: scale(.97) rotate(-.6deg); } 100% { transform: none; } }
.myth__n { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--beam); }
.myth__q { margin: 0; font-family: var(--f-display); font-stretch: 112%; font-weight: 720; font-size: clamp(1.35rem, 3vw, 1.9rem); line-height: 1.2; }
.myth__verdict { margin: 0; font-weight: 800; font-size: 15px; color: var(--brand); }
.myth__x { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.myth__btns { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.myth__btns .btn--lg { min-width: 140px; }
.myth__score { font-family: var(--f-display); font-stretch: 115%; font-size: 22px; font-weight: 750; margin: 18px 0 0; }

/* ---------- Doors / suggest ---------- */
.doors { list-style: none; margin: 0 0 40px; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.door { padding: 20px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.door b { display: block; font-family: var(--f-display); font-stretch: 120%; font-size: 24px; font-weight: 780; margin: 8px 0 6px; }
.door p { margin: 0; color: var(--muted); font-size: 14.5px; }
.door__st { font-size: 12px; font-weight: 700; color: var(--muted); }
.door--live { border-color: var(--brand); background: linear-gradient(160deg, var(--brand-soft), var(--surface) 70%); }
.door--live .door__st { color: var(--brand); }
.door--live .door__st::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--beam); margin-right: 6px; box-shadow: 0 0 10px var(--beam); }
.suggest { display: grid; gap: 20px; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
@media (min-width: 940px) { .suggest { grid-template-columns: .8fr 1.2fr; align-items: start; } }
.suggest p { color: var(--muted); margin: 8px 0 0; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.form--inline { grid-template-columns: 1fr; }
@media (min-width: 640px) { .form--inline { grid-template-columns: 1fr 1fr; } .form--inline .span-2 { grid-column: 1 / -1; } .form--inline .btn { justify-self: start; } }
.form .check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--muted); cursor: pointer; }
.form .check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.form__msg { margin: 0; font-size: 14.5px; font-weight: 600; min-height: 1em; }
.form__msg.ok { color: var(--brand); }
.form__msg.err { color: var(--avoid); }
.join { display: grid; gap: 32px; align-items: start; }
@media (min-width: 940px) { .join { grid-template-columns: 1fr 1fr; } }
.join .form { padding: 24px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.join__teen { margin-top: 18px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.join__teen b { color: var(--text); }
.thanks { padding: 8px 0; }
.thanks h3 { margin: 0 0 8px; }
.thanks p { margin: 0 0 8px; color: var(--muted); }
.thanks .hand-note { margin-top: 12px; }

/* ---------- Mark ---------- */
.mark { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .mark { grid-template-columns: 1fr 1fr; } }
.mark__stage { display: grid; place-items: center; aspect-ratio: 1; max-width: 420px; width: 100%; margin: 0 auto; border-radius: 32px; background: radial-gradient(60% 60% at 50% 45%, var(--brand-soft), transparent 70%), var(--surface); border: 1px solid var(--line); }
.mark__svg { width: 72%; overflow: visible; }
.mark__svg [data-part] { transition: opacity .3s ease, filter .3s ease; }
.mark__svg.has-focus [data-part] { opacity: .16; }
.mark__svg.has-focus [data-part].is-on { opacity: 1; filter: drop-shadow(0 0 3px var(--beam)); }
.parts { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.parts button { display: grid; grid-template-columns: auto 1fr; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.parts button[aria-pressed="true"] { border-color: var(--brand); box-shadow: var(--shadow); }
.parts i { font-style: normal; font-family: var(--f-display); font-stretch: 125%; font-weight: 800; color: var(--beam); }
.parts b { display: block; font-size: 16px; }
.parts span { color: var(--muted); font-size: 14.5px; }

/* ---------- FAQ ---------- */
.faq__list { display: grid; gap: 10px; max-width: 860px; }
.faq__list details { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.faq__list summary { padding: 16px 18px; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; color: var(--brand); font-weight: 800; font-size: 20px; line-height: 1; }
.faq__list details[open] summary::after { content: "−"; }
.faq__list p { margin: 0; padding: 0 18px 18px; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { padding: 48px 0 calc(48px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--ink-2); }
.footer__grid { display: grid; gap: 28px; }
@media (min-width: 860px) { .footer__grid { grid-template-columns: 1fr 1.6fr; } }
.footer__line { font-family: var(--f-display); font-stretch: 118%; font-weight: 700; font-size: 18px; margin: 12px 0 6px; }
.footer__small { font-size: 13.5px; color: var(--muted); }
.footer__legal p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.footer__legal b { color: var(--text); }

/* ---------- Mobile bottom bar ---------- */
.mbar { display: none; }
@media (max-width: 760px) {
  .mbar {
    display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60;
    padding: 6px; border-radius: 20px; background: color-mix(in srgb, var(--surface) 86%, transparent); border: 1px solid var(--line-2);
    box-shadow: var(--shadow); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  .mbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: 14px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-decoration: none; }
  .mbar a:active, .mbar a:hover { background: var(--brand-soft); color: var(--brand); }
  .mbar .ico { width: 20px; height: 20px; }
  body { padding-bottom: 84px; }
}

/* ---------- Sheet (dialog) ---------- */
.sheet {
  width: min(560px, calc(100% - 20px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: var(--surface); color: var(--text); box-shadow: 0 40px 90px -30px rgba(0,0,0,.6); overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheetIn .28s ease; }
@keyframes sheetIn { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet::backdrop { background: rgba(8, 6, 20, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px 20px; border-bottom: 1px solid var(--line); }
.sheet__head h2 { margin: 0; font-family: var(--f-display); font-stretch: 118%; font-size: 20px; }
.sheet__body { overflow: auto; padding: 16px 20px; flex: 1; }
.sheet__preview img, .sheet__preview canvas { width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.sheet__preview:empty { display: none; }
.sheet__notek { margin: 0 0 8px; font-weight: 700; }
.sheet__notetext { margin: 0; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 17px; line-height: 1.5; }
.sheet__count { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.sheet__warn { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.sheet__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.sheet__actions .btn { width: 100%; }
.sheet__actions .btn[hidden] { display: none; }
.sheet__foot { margin: 0; padding: 0 20px 14px; font-size: 12px; color: var(--muted); }

/* ---------- Cook card (HTML version: show-the-cook + print) ---------- */
.ccard { color: #111; background: #fff; font-family: var(--f-body); }
.ccard__brand { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 12px; border-radius: 99px; background: #5B47E0; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ccard__title { margin: 0 0 10px; font-family: var(--f-display); font-stretch: 112%; font-weight: 800; font-size: clamp(2rem, 7vw, 3.4rem); line-height: 1.05; color: #000; }
.ccard__intro { margin: 0 0 18px; font-size: clamp(1.15rem, 3.6vw, 1.5rem); font-weight: 600; }
.ccard__h { margin: 18px 0 6px; font-size: clamp(.95rem, 2.6vw, 1.1rem); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #3d2bb8; }
.ccard p, .ccard li { font-size: clamp(1.1rem, 3.4vw, 1.4rem); line-height: 1.45; }
.ccard p { margin: 0; }
.ccard ul { margin: 0; padding-left: 1.2em; }
.ccard__sit { margin-top: 18px !important; padding: 14px 16px; border-radius: 14px; background: #F1EEFF; border-left: 5px solid #5B47E0; }
.ccard__close { margin-top: 18px !important; font-weight: 700; }
.ccard__div { margin: 28px 0 8px; padding-top: 18px; border-top: 3px dashed #c9c3e8; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #6b6786; }
.ccard__personal { margin-top: 18px; padding: 12px 14px; border-radius: 12px; border: 2px solid #111; }
.ccard__personal p { font-size: clamp(1rem, 3vw, 1.2rem); }
.ccard__foot { margin-top: 18px !important; font-size: 13px !important; color: #666; }
.ccard--inverted { color: #fff; background: #000; }
.ccard--inverted .ccard__title { color: #fff; }
.ccard--inverted .ccard__h { color: #B8ADFF; }
.ccard--inverted .ccard__sit { background: #1d1838; }
.ccard--inverted .ccard__personal { border-color: #fff; }

.showcook { position: fixed; inset: 0; z-index: 200; overflow: auto; background: #fff; }
.showcook[hidden] { display: none; }
.showcook__card { max-width: 860px; margin: 0 auto; padding: 64px 22px 40px; }
.showcook__close { position: fixed; top: 12px; right: 12px; z-index: 2; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #111; color: #fff; display: grid; place-items: center; cursor: pointer; }
.showcook__close .ico { width: 24px; height: 24px; }
.showcook__tip { max-width: 860px; margin: 0 auto; padding: 0 22px 40px; color: #666; font-size: 14px; }
.showcook__tip:empty { display: none; }

.print-area { display: none; }

/* ==========================================================================
   PLAY & LEARN: Today band, 30-day path, games, passport, toast
   ========================================================================== */

/* ---------- Passport button in the nav ---------- */
.pass-btn { position: relative; }
.pass-btn__n {
  position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px;
  display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-size: 11.5px; font-weight: 800; line-height: 1;
}

/* ---------- Today band ---------- */
.today { padding: 36px 0 40px; background: var(--ink-2); border-block: 1px solid var(--line); }
.today__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 16px; }
.today__head .kicker { margin: 0; }
.today__date { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.today__pass {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); font-size: 14px; font-weight: 650; color: var(--text); cursor: pointer;
}
.today__pass:hover { border-color: var(--brand); }
.today__pass .ico { color: var(--brand); width: 18px; height: 18px; }
.today__pass b { color: var(--brand); }
.today__grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .today__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.tile__k { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--beam); }
.tile__k .ico { width: 16px; height: 16px; }
.tile__h { margin: 0; font-family: var(--f-display); font-stretch: 112%; font-weight: 750; font-size: 20px; line-height: 1.2; }
.tile__chip { margin: 0; }
.tile__p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.tile__small { margin: 0; color: var(--muted); font-size: 12.5px; }
.tile__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.tile__link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.tile__link .ico { width: 16px; height: 16px; }
.today__visits { margin: 14px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- 30-day path ---------- */
.path { margin-top: 24px; display: grid; gap: 18px; padding: 22px; border-radius: var(--r-lg); background: linear-gradient(160deg, var(--brand-soft), var(--surface) 60%); border: 1px solid var(--line); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .path { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; padding: 28px; } }
.path__intro p { margin: 8px 0 0; color: var(--muted); }
.path__body { display: grid; gap: 14px; min-width: 0; }
.path__start { display: flex; flex-wrap: wrap; gap: 10px; }
.path__note { margin: 0; font-size: 13.5px; color: var(--muted); }
.path__fin { margin: 0; font-weight: 700; color: var(--brand); }
.path__today { display: grid; gap: 10px; justify-items: start; }
.path__k { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--beam); }
.path__step {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; width: 100%; padding: 14px 16px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .2s ease;
}
.path__step:hover { border-color: var(--brand); color: var(--text); }
.path__step b { font-family: var(--f-display); font-stretch: 112%; font-size: 18px; }
.path__step span { grid-column: 1; color: var(--muted); font-size: 14.5px; }
.path__step .ico { grid-column: 2; grid-row: 1 / span 2; color: var(--brand); }
.path__track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.path__track button {
  width: 100%; aspect-ratio: 1; min-height: 28px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; padding: 0;
}
.path__track button:disabled { opacity: .45; cursor: default; border-style: dashed; }
.path__track button.is-done { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.path__track button.is-today { border: 1.5px solid var(--beam); color: var(--text); }
.path__track button.is-view:not(.is-done) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.path__track button.is-view.is-done { box-shadow: 0 0 0 3px var(--brand-soft); }
.path__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 13.5px; color: var(--muted); }

/* ---------- Games hub ---------- */
.games { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.games__tabs { display: flex; gap: 6px; padding: 10px; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--line); background: var(--surface-2); scroll-margin-top: calc(var(--nav-h) + 12px); }
.games__tabs button {
  flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent;
  background: transparent; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.games__tabs button .ico { width: 18px; height: 18px; }
.games__tabs button:hover { color: var(--text); }
.games__tabs button[aria-selected="true"] { background: var(--surface); border-color: var(--brand); color: var(--brand); box-shadow: 0 4px 14px -8px var(--brand); }
.badge { padding: 1px 7px; border-radius: 99px; background: var(--beam-soft); color: var(--beam); font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.game { display: grid; gap: 22px; padding: 22px 18px; grid-template-columns: minmax(0, 1fr); }
.game:focus-visible { outline-offset: -4px; }
@media (min-width: 980px) { .game { grid-template-columns: minmax(0, 1fr) 260px; padding: 28px; gap: 32px; } }
.game__main { min-width: 0; display: grid; gap: 14px; align-content: start; }
.game__how { padding: 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); align-self: start; font-size: 14.5px; }
.game__how ol { margin: 0; padding-left: 1.2em; color: var(--muted); display: grid; gap: 6px; }
.game__how li::marker { color: var(--brand); font-weight: 800; }
.game__how b { color: var(--text); }
.game__howh { margin: 0 0 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.game__how .hand-note { font-size: 21px; margin-top: 14px; }
.game__how .game__small { margin-top: 10px; }
.game__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.game__n { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--beam); }
.game__goal { margin: 0; font-family: var(--f-display); font-stretch: 112%; font-weight: 720; font-size: clamp(1.1rem, 2.4vw, 1.35rem); line-height: 1.25; }
.game__msg { margin: 0; min-height: 1.6em; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.game__msg b { color: var(--text); }
.game__msg .vchip { vertical-align: middle; margin: 0 2px; }
.game__btns { display: flex; flex-wrap: wrap; gap: 10px; }
.game__score { margin: 0; font-family: var(--f-display); font-stretch: 115%; font-size: 22px; font-weight: 750; line-height: 1.2; }
.game__p { margin: 0; color: var(--muted); }
.game__small { margin: 0; font-size: 13px; color: var(--muted); }
.game__end { display: grid; gap: 12px; padding: 18px; border-radius: var(--r); background: linear-gradient(160deg, var(--brand-soft), var(--surface-2) 70%); border: 1px solid var(--line); }
.pip { display: inline-block; width: 10px; height: 10px; margin-left: 4px; border-radius: 50%; background: var(--brand); vertical-align: middle; }
.pip--used { background: transparent; border: 2px solid var(--line-2); }
.det__slips, .buffet__asks { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }

/* Label Detective */
.det__stage { border-radius: var(--r); padding: 18px; background: repeating-linear-gradient(135deg, #e8e4d9 0 12px, #e2ddd0 12px 24px); }
.det__pack { transform: rotate(-.4deg); }
.det__pack .pack__text { font-size: 15px; line-height: 2.05; }
.dtok {
  display: inline; padding: 1px 3px; margin: 0 -1px; border: 0; border-radius: 5px; background: transparent; color: inherit; font: inherit;
  cursor: pointer; box-shadow: inset 0 -1.5px 0 rgba(85, 82, 74, .28); transition: background .2s ease, color .2s ease, box-shadow .2s ease;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.dtok:hover { background: rgba(91, 71, 224, .10); }
.dtok:focus-visible { outline: 2px solid #5B47E0; outline-offset: 1px; }
.dtok.is-found[data-v="avoid"] { background: #FDDCDD; color: #A51D22; font-weight: 700; box-shadow: none; }
.dtok.is-found[data-v="check"] { background: #FFEBC2; color: #7A4E00; font-weight: 700; box-shadow: none; }
.dtok.is-slip { background: #DDF3E7; color: #0F6B40; box-shadow: none; text-decoration: line-through; text-decoration-thickness: 1.5px; }
.dtok.is-unsure { background: #E6E7EE; color: #4C5163; box-shadow: none; }
.dtok.is-missed { box-shadow: none; outline: 2px dashed #8d1c20; outline-offset: 1px; }
.dtok.is-missed[data-v="check"] { outline-color: #8F5C00; }
.dtok.shake { animation: shake .4s ease; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.det__bar { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--muted); }
.det__bar i { flex: 1; height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; }
.det__bar b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--beam)); transition: width .3s ease; }
.det__end { display: grid; gap: 12px; padding: 18px; border-radius: var(--r); background: linear-gradient(160deg, var(--brand-soft), var(--surface-2) 70%); border: 1px solid var(--line); }
.det__grid { margin: 0; font-size: 24px; letter-spacing: 3px; line-height: 1.2; }
.det__archive .chips { gap: 6px; }
.det__archive .chip { min-height: 34px; padding: 4px 12px; font-size: 13px; }
.det__log { max-height: none; }
.det__log:empty { display: none; }
.dtw { white-space: nowrap; }
.det__log li.is-missed b small { font-weight: 600; color: var(--muted); }

/* Atta or Not? */
.atta__deck { display: grid; place-items: center; padding: 6px 0; }
.atta__card {
  position: relative; width: min(100%, 420px); min-height: 220px; display: grid; align-content: center; justify-items: center; gap: 10px; text-align: center;
  padding: 34px 22px 26px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .3s cubic-bezier(.3, 1.3, .5, 1), border-color .2s ease;
}
.atta__card.is-drag { transition: none; cursor: grabbing; }
.atta__card.is-answered { touch-action: auto; user-select: text; -webkit-user-select: text; border-color: var(--brand); }
.atta__k { margin: 0; font-size: 13px; font-weight: 700; color: var(--muted); }
.atta__w { margin: 0; font-family: var(--f-display); font-stretch: 118%; font-weight: 780; font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1.05; }
.atta__ans { display: grid; gap: 6px; justify-items: center; }
.atta__ans p { margin: 0; }
.atta__res { font-weight: 800; color: var(--brand); }
.atta__why { color: var(--muted); font-size: 15px; max-width: 34ch; }
.atta__hint { position: absolute; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; background: var(--text); color: var(--ink); opacity: 0; transition: opacity .15s ease; pointer-events: none; }
.atta__hint--l { left: 14px; top: 12px; }
.atta__hint--r { right: 14px; top: 12px; }
.atta__hint--u { left: 50%; top: 12px; transform: translateX(-50%); }
.atta__card[data-dir="l"] .atta__hint--l, .atta__card[data-dir="r"] .atta__hint--r, .atta__card[data-dir="u"] .atta__hint--u { opacity: 1; }
.atta__btns { justify-content: center; }
.atta__btns .btn { min-width: 128px; }
.ico--ok { color: var(--ok); }
.ico--check { color: var(--check); }
.ico--avoid { color: var(--avoid); }
.atta__swipe { text-align: center; }
#attaNextWrap { justify-content: center; }
@media (hover: hover) and (pointer: fine) { .atta__swipe { display: none; } }

/* Buffet Run */
.buffet__lamps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.buffet__lamps li { height: 6px; border-radius: 6px; background: var(--line); }
.buffet__lamps li.is-done { background: var(--brand); }
.buffet__lamps li.is-now { background: linear-gradient(90deg, var(--brand), var(--beam)); box-shadow: 0 0 10px var(--beam); }
.buffet__counter {
  display: grid; justify-items: center; gap: 4px; text-align: center; padding: 26px 18px 20px; border-radius: var(--r-lg);
  background: radial-gradient(70% 90% at 50% 0%, var(--glow-a), transparent 70%), var(--surface-2); border: 1px solid var(--line);
}
.buffet__counter.slide { animation: slideIn .4s ease; }
@keyframes slideIn { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
.chafing { position: relative; width: 150px; height: 74px; margin-bottom: 8px; }
.chafing__lid { position: absolute; left: 22px; right: 22px; top: 6px; height: 26px; border-radius: 75px 75px 8px 8px; background: linear-gradient(180deg, #E7EAF0, #AEB6C4); }
.chafing__lid::before { content: ""; position: absolute; left: 50%; top: -8px; width: 22px; height: 10px; margin-left: -11px; border-radius: 6px 6px 2px 2px; background: #8D95A6; }
.chafing__pan { position: absolute; left: 8px; right: 8px; top: 32px; height: 22px; border-radius: 4px 4px 14px 14px; background: linear-gradient(180deg, #C9CED8, #8D95A6); }
.chafing__flame { position: absolute; left: 50%; bottom: 0; width: 14px; height: 18px; margin-left: -7px; border-radius: 50% 50% 40% 40%; background: radial-gradient(circle at 50% 70%, #fff 0 20%, var(--beam) 50%, transparent 72%); }
.buffet__dish { margin: 0; font-family: var(--f-display); font-stretch: 115%; font-weight: 780; font-size: clamp(1.6rem, 4.6vw, 2.2rem); line-height: 1.1; }
.buffet__hi { margin: 0; color: var(--muted); font-size: 16px; }
.buffet__bubble { margin: 0; padding: 14px 16px; border-radius: 16px 16px 16px 4px; background: var(--beam-soft); border: 1px solid color-mix(in srgb, var(--beam) 35%, transparent); font-size: 15px; line-height: 1.55; }
.buffet__reveal { display: grid; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.buffet__verdict { margin: 0; font-size: 15px; color: var(--muted); }
.bv { display: inline-block; margin-right: 6px; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 800; border: 1px solid var(--line-2); color: var(--text); }
.bv--good { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.bv--fine { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.bv--risky, .bv--ouch { background: var(--surface); border-color: var(--text); }
.buffet__plate { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.buffet__plate li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }

/* Crumb Hunt (an illustration: same colours in both themes, like the label stage) */
.kitchen { border-radius: var(--r); overflow-x: auto; overscroll-behavior-x: contain; border: 1px solid var(--line-2); background: #F5ECDD; }
.kitchen__svg { width: 100%; min-width: 640px; height: auto; }
.kitchen__scroll { margin-top: -6px; }
@media (min-width: 700px) { .kitchen__scroll { display: none; } }
.kh { cursor: pointer; outline: none; }
.kh__hit { fill: transparent; }
.kh:hover > :not(.kh__hit), .kh:focus-visible > :not(.kh__hit) { filter: brightness(1.06) drop-shadow(0 0 4px rgba(91, 71, 224, .55)); }
.kh:focus-visible .kh__hit { stroke: #5B47E0; stroke-width: 3; stroke-dasharray: 6 5; }
.kring { fill: none; pointer-events: none; }
.kring--trap { stroke: #5B47E0; stroke-width: 5; animation: ringIn .35s ease; }
.kring--fine { stroke: #0A8FBF; stroke-width: 3.5; stroke-dasharray: 8 7; animation: ringIn .35s ease; }
@keyframes ringIn { from { opacity: 0; } to { opacity: 1; } }
.kh.is-hint > :not(.kh__hit) { animation: hintPulse .8s ease 3; }
@keyframes hintPulse { 50% { filter: drop-shadow(0 0 10px #5FD8FF) brightness(1.15); } }

/* Party story (paper, both themes, like the notebook) */
.story {
  position: relative; display: grid; gap: 14px; padding: 30px 22px 22px; border-radius: 22px; color: var(--paper-ink);
  background: repeating-linear-gradient(transparent 0 31px, var(--paper-line) 31px 32px), var(--paper);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .5);
}
.story.bump { animation: bump .45s ease; }
.draft-ribbon--story { top: -12px; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.story__k { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #8a5a1a; }
.story__t { margin: 0; font-size: 17.5px; line-height: 1.6; color: #2a2116; }
.story[data-mood="oops"] .story__t { padding-left: 14px; border-left: 3px solid #8a5a1a; }
.story[data-mood="good"] .story__k::after { content: " · nicely done"; color: #3d2bb8; }
.story[data-mood="end"] .story__t { font-family: var(--f-hand); font-size: 27px; line-height: 1.25; color: #3d2bb8; }
.story__c { display: grid; gap: 8px; }
.story__c .btn { justify-self: start; }
.story__opt {
  text-align: left; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(58, 46, 31, .22); background: #FFFDF7; color: #2a2116;
  font-size: 15.5px; font-weight: 600; line-height: 1.4; cursor: pointer; transition: border-color .15s ease, transform .15s ease;
}
.story__opt:hover { border-color: #3d2bb8; transform: translateX(3px); }
.story__opt:focus-visible { outline-color: #3d2bb8; }
.story__trail { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.story__trail:empty { display: none; }
.story__trail li { padding: 3px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* Play footer */
.play-foot { display: grid; gap: 14px; margin-top: 18px; padding: 20px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .play-foot { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.play-foot p { margin: 6px 0 0; color: var(--muted); }
.play-foot__btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Passport ---------- */
.passport__sum { margin: 0 0 14px; color: var(--muted); }
.stamps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.stamp { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 14px 10px; border-radius: var(--r); text-align: center; border: 1.5px dashed var(--line-2); color: var(--muted); }
.stamp b { color: var(--text); font-size: 14px; }
.stamp span:last-child { font-size: 12px; line-height: 1.35; }
.stamp__seal { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 2px dashed var(--line-2); opacity: .55; }
.stamp__seal .ico { width: 24px; height: 24px; }
.stamp.is-on { border-style: solid; border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: var(--brand-soft); }
.stamp.is-on .stamp__seal { opacity: 1; border: 3px double var(--brand); color: var(--brand); transform: rotate(-8deg); background: var(--surface); }
.stamp.is-on span:last-child { color: var(--brand); font-weight: 700; }

/* ---------- Keep progress safe: backup and install ---------- */
.keep { display: grid; gap: 10px; margin-top: 20px; padding: 16px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.keep__h { margin: 0; font-family: var(--f-display); font-stretch: 112%; font-size: 17px; font-weight: 750; }
.keep p { margin: 0; color: var(--muted); font-size: 14px; }
.keep__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.keep__small { font-size: 12.5px !important; }
.keep__msg { font-weight: 600; color: var(--brand) !important; }
.keep__msg:empty { display: none; }
.keep__msg.err { color: var(--avoid) !important; }
.install-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.install-hint p { flex: 1 1 260px; margin: 0; font-size: 14px; color: var(--muted); }
.install-hint b { color: var(--text); }
.keep .install-hint { padding-top: 12px; border-top: 1px dashed var(--line-2); }
.ios-share { display: inline-grid; place-items: center; width: 26px; height: 26px; margin: 0 2px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface); color: var(--beam); vertical-align: middle; }
.ios-share .ico { width: 16px; height: 16px; }
.install-bar { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 14px 10px 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--line)); }
.install-bar .install-hint { flex: 1; }
.install-bar__x { width: 36px; height: 36px; flex: none; border: 0; }
.install-bar__x .ico { width: 16px; height: 16px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 120; width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: var(--text); color: var(--ink);
  box-shadow: var(--shadow); font-size: 14.5px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .3s ease, opacity .3s ease;
}
.toast:empty { display: none; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast .ico { color: var(--brand-2); flex: none; }
.toast .link-btn { color: inherit; font-size: 13.5px; margin-left: 4px; }
@media (max-width: 760px) { .toast { bottom: calc(96px + env(safe-area-inset-bottom)); } }

/* ---------- Kids' sheet (print only) ---------- */
.kidsheet { color: #000; font-family: var(--f-body); }
.kidsheet__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-bottom: 2px solid #000; padding-bottom: 8px; }
.kidsheet__brand { margin: 0; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 11pt; }
.kidsheet__name { margin: 0; font-size: 11pt; }
.kidsheet h2 { font-family: var(--f-display); font-stretch: 112%; font-size: 24pt; margin: 12px 0 6px; }
.kidsheet h3 { font-size: 12.5pt; margin: 14px 0 8px; }
.kidsheet section { break-inside: avoid; }
.kidsheet__label { margin: 0; padding: 12px 14px; border: 2px solid #000; border-radius: 10px; font-size: 14pt; line-height: 1.8; }
.kidsheet__plate { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kidsheet__plate li { display: grid; justify-items: center; gap: 4px; font-size: 12pt; font-weight: 700; }
.kidsheet__plate span { width: 64px; height: 64px; border-radius: 50%; border: 2px solid #000; }
.kidsheet__match { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.kidsheet__match ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13pt; }
.kidsheet__match ol:first-child { text-align: right; }
.kidsheet__say { margin: 0; font-family: var(--f-hand); font-size: 22pt; }
.kidsheet__lines { height: 64px; margin: 6px 0 0; background: repeating-linear-gradient(transparent 0 30px, #999 30px 31px); }
.kidsheet__key { margin: 16px 0 0; font-size: 8.5pt; color: #444; border-top: 1px dashed #999; padding-top: 6px; }
.kidsheet__foot { margin: 6px 0 0; font-size: 8.5pt; color: #444; }

/* ---------- Reduced motion / transparency / low-end ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .pulse { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .maker, .xray, .join .form, .nav, .mbar, .eyebrow { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
}
html.low-end .maker, html.low-end .xray, html.low-end .join .form, html.low-end .mbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }

/* ---------- Print: only the card ---------- */
@media print {
  @page { margin: 12mm; }
  body > *:not(.print-area) { display: none !important; }
  body { background: #fff !important; padding: 0 !important; }
  .print-area { display: block !important; }
  .print-area .ccard { padding: 0; }
  .print-area .ccard__brand { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-area .ccard__sit { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-area .ccard__title { font-size: 30pt; }
  .print-area .kidsheet, .print-area .kidsheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-area .ccard p, .print-area .ccard li { font-size: 13pt; }
}
