/* Kitchen School: the Garage School's light theme in kitchen colours (paprika
   accent #d9480f, a soft cream page), phone-only, big type: body 19-21px,
   headings 30-34px, 64px+ buttons. Photos instead of 3D (see .scene, .photo). */
:root {
  --bg: #fbf7f2; --bg-2: #f4ede4; --surface: #ffffff; --surface-2: #f7f2ec; --surface-3: #ece4d9;
  --line: #e8dfd4; --text: #1f1a16; --muted: #6b5f56; --dim: #9a8c80;
  --primary: #d9480f; --primary-2: #e0561f; --primary-d: #b23a0c;
  --amber: #f59e0b; --amber-2: #b45309; --amber-d: #c27803;
  --ok: #16a34a; --ok-d: #15803d; --ok-bg: #dcfce7; --ok-text: #15803d;
  --bad: #dc2626; --bad-d: #991b1b; --bad-bg: #fee2e2; --bad-text: #b91c1c;
  --graphite: #2a211c; --graphite-2: #3b2f27;
  --steel: #e6ddd2; --steel-d: #c9bdb0; --steel-ico: #8f8275;
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, 'Segoe UI', sans-serif;
  --maxw: 520px;
  --side: 20px;
  --tabs-h: 74px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 600 19px/1.45 var(--font-body); -webkit-font-smoothing: antialiased; }
body.with-tabs { padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); }
body.has-sheet { overflow: hidden; }
img { max-width: 100%; }
a { color: var(--primary); }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -80px; z-index: 100; padding: 12px 16px; border-radius: 12px; background: var(--text); color: #fff; font-weight: 700; text-decoration: none; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.ico { width: 26px; height: 26px; flex: none; }
.noscript { padding: 24px; text-align: center; }

.app { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--side); min-height: 100vh; min-height: 100dvh; }
#main { outline: none; }

.boot { display: flex; gap: 12px; align-items: center; justify-content: center; min-height: 70vh; color: var(--muted); font-weight: 700; font-size: 20px; }
.boot__spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── buttons ─────────────────────────────────────────────────────────── */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 66px; padding: 0 20px; border-radius: 18px; border: 0;
  font: 700 22px/1.1 var(--font-head); letter-spacing: .01em; text-decoration: none; cursor: pointer; text-align: center; transition: transform .08s ease, box-shadow .08s ease; }
.btn:active { transform: translateY(3px); }
.btn .ico { width: 26px; height: 26px; }
.btn--primary { background: var(--primary); color: #fff; box-shadow: 0 5px 0 var(--primary-d); }
.btn--primary:active { box-shadow: 0 2px 0 var(--primary-d); }
.btn--pro { background: linear-gradient(180deg, #fbbf24, var(--amber)); color: #2a1a00; box-shadow: 0 5px 0 var(--amber-d); }
.btn--pro:active { box-shadow: 0 2px 0 var(--amber-d); }
.btn--ghost { background: var(--surface); border: 2px solid var(--line); color: var(--primary); }
.btn--danger { color: var(--bad); }
.btn[disabled] { background: var(--surface-3); color: var(--dim); box-shadow: 0 5px 0 #d9cfc4; cursor: default; transform: none; }
.icon-btn { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; border: 0; background: transparent; color: #8a90a3; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .ico { width: 32px; height: 32px; }

/* ── top bar ─────────────────────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; margin: 0 calc(-1 * var(--side)); padding: 12px var(--side) 12px; background: linear-gradient(var(--bg) 84%, rgba(251,247,242,0)); }
.top__brand { display: inline-flex; align-items: center; height: 52px; padding: 0 4px; margin-left: -4px; border-radius: 12px; flex: none; }
.top__brand img { width: 74px; height: auto; display: block; }
.course-chip { display: inline-flex; align-items: center; height: 42px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); box-shadow: 0 1px 2px rgba(42,33,28,.06); font: 700 17px/1 var(--font-head); white-space: nowrap; }
.top__stats { margin-left: auto; display: flex; gap: 12px; }
.stat { display: inline-flex; align-items: center; gap: 4px; font: 700 24px/1 var(--font-head); }
.stat .ico { width: 28px; height: 28px; }
.stat--streak { color: #f97316; } .stat--xp { color: var(--primary); } .stat--fuel { color: var(--bad); }
.stat--pro { color: var(--amber-2); }
.stat.bump { animation: bump .45s ease; }
@keyframes bump { 30% { transform: scale(1.3); } 100% { transform: none; } }

/* ── today's goal ───────────────────────────────────────────────────── */
.path-page { padding-bottom: 32px; }
.goal { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); margin-top: 4px; box-shadow: 0 1px 2px rgba(42,33,28,.05); }
.ring { position: relative; width: 62px; height: 62px; flex: none; }
.ring svg { width: 62px; height: 62px; transform: rotate(-90deg); }
.ring__bar { transition: stroke-dashoffset .6s ease; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 17px/1 var(--font-head); color: var(--text); }
.ring b .ico { width: 26px; height: 26px; color: var(--ok); }
.goal__text { min-width: 0; flex: 1; }
.goal h2 { margin: 0; font: 700 22px/1.15 var(--font-head); }
.goal p { margin: 4px 0 0; font-size: 17px; line-height: 1.3; color: var(--muted); }
/* the week gets its own row: beside the ring and the text it squeezed them into a narrow column */
.week { flex: 1 0 100%; margin: 0; padding: 0; list-style: none; display: flex; gap: 6px; }
.week li { flex: 1; height: 36px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; font: 700 15px/1 var(--font-head); color: var(--dim); }
.week li.on { background: linear-gradient(#fb923c, #f97316); color: #fff; }
.week li.today { outline: 2.5px solid var(--primary-2); outline-offset: 1px; }

/* ── units ──────────────────────────────────────────────────────────── */
.unit { margin: 28px 0 10px; padding: 18px 20px; border-radius: 20px; display: flex; align-items: center; gap: 14px; color: #fff; }
.unit .eyebrow { font: 700 15px/1.1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; opacity: .88; color: inherit; }
.unit h2 { margin: 6px 0 0; font: 700 27px/1.12 var(--font-head); }
.guide { margin-left: auto; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.2); color: #fff; flex: none; }
.guide .ico { width: 34px; height: 34px; }
.guide--ok { background: var(--ok); }
.guide--muted { background: var(--surface-2); color: var(--steel-ico); }
.unit--done { background: linear-gradient(135deg, var(--graphite), var(--graphite-2)); }
.unit--now { background: linear-gradient(135deg, #9e3209, var(--primary)); }
.unit--next { background: var(--surface); border: 1.5px solid var(--line); color: var(--text); }
.unit--next .eyebrow { color: var(--muted); opacity: 1; }
.unit--pro, .unit--soon { background: var(--surface); border: 2px solid #fcd34d; color: var(--text); }
.unit--pro .eyebrow, .unit--soon .eyebrow { color: var(--amber-2); opacity: 1; }
.unit--soon { border-style: dashed; }
.pro-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 999px; background: #fef3c7; color: var(--amber-2); font: 700 15px/1 var(--font-head); letter-spacing: .04em; flex: none; }
.pro-chip .ico { width: 15px; height: 15px; }
.soon-chip { margin-left: auto; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font: 700 15px/34px var(--font-head); flex: none; }

/* ── the path ───────────────────────────────────────────────────────── */
.path { list-style: none; margin: 0; padding: 16px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.node-row { position: relative; transform: translateX(var(--x, 0)); }
.node-row--now { margin-top: 128px; }
.node { position: relative; width: 92px; height: 84px; border-radius: 50%; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; text-decoration: none; transition: transform .08s ease; }
.node:active { transform: translateY(5px); }
.node > .ico { width: 46px; height: 46px; }
.n-done { background: var(--ok); color: #fff; box-shadow: 0 8px 0 #14532d; }
.n-done:active { box-shadow: 0 3px 0 #14532d; }
.tick { position: absolute; right: -5px; top: -5px; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--ok); display: grid; place-items: center; box-shadow: 0 1px 3px rgba(17,24,39,.25); }
.tick .ico { width: 20px; height: 20px; }
.n-now, .n-pro { width: 106px; height: 96px; }
.n-now { background: var(--primary); color: #fff; box-shadow: 0 8px 0 var(--primary-d), 0 0 0 11px rgba(217,72,15,.14), 0 0 0 22px rgba(217,72,15,.06); animation: heartbeat 1.5s ease-in-out infinite, pulse 1.5s ease-in-out infinite; }
.n-pro { background: linear-gradient(#fbbf24, var(--amber)); color: #3b2400; box-shadow: 0 8px 0 var(--amber-2), 0 0 0 11px rgba(245,158,11,.16), 0 0 0 22px rgba(245,158,11,.07); animation: heartbeat 1.5s ease-in-out infinite, pulse-amber 1.5s ease-in-out infinite; }
/* The next lesson beats like a heart (Michael 15.10.26: players didn't see
   where to tap): a lub-dub on the button and a ring going out from it. The
   press still sinks the button (the beat stops while it is held). */
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.12); } 24% { transform: scale(1); } 36% { transform: scale(1.08); } 52% { transform: scale(1); } }
.n-now::after, .n-pro::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--primary); opacity: 0; pointer-events: none; animation: beat-ring 1.5s ease-out infinite; }
.n-pro::after { border-color: var(--amber); }
@keyframes beat-ring { 0% { transform: scale(1); opacity: .55; } 60% { transform: scale(1.55); opacity: 0; } 100% { transform: scale(1.55); opacity: 0; } }
.n-now:active, .n-pro:active { animation: none; transform: translateY(5px); }
.n-now .node__ico, .n-pro .node__ico { width: 52px; height: 52px; }
@keyframes pulse { 0%, 100% { box-shadow: 0 8px 0 var(--primary-d), 0 0 0 11px rgba(217,72,15,.14), 0 0 0 22px rgba(217,72,15,.06); }
  50% { box-shadow: 0 8px 0 var(--primary-d), 0 0 0 15px rgba(217,72,15,.18), 0 0 0 29px rgba(217,72,15,.05); } }
@keyframes pulse-amber { 0%, 100% { box-shadow: 0 8px 0 var(--amber-2), 0 0 0 11px rgba(245,158,11,.16), 0 0 0 22px rgba(245,158,11,.07); }
  50% { box-shadow: 0 8px 0 var(--amber-2), 0 0 0 15px rgba(245,158,11,.22), 0 0 0 29px rgba(245,158,11,.06); } }
.n-lock { background: var(--steel); color: var(--steel-ico); box-shadow: 0 8px 0 var(--steel-d); }
.n-lock--pro { background: #eceff5; }
.n-soon { opacity: .62; }
.lockbadge { position: absolute; right: -4px; top: -4px; width: 30px; height: 30px; border-radius: 50%; background: #fef3c7; color: var(--amber-2); display: grid; place-items: center; box-shadow: 0 1px 3px rgba(17,24,39,.2); }
.lockbadge .ico { width: 16px; height: 16px; }
.n-wait { width: 106px; height: 96px; background: #fde4d6; color: var(--primary); box-shadow: 0 8px 0 #f3bfa4; }
.n-wait .node__ico { width: 52px; height: 52px; }
.lockbadge--wait { background: #fff; color: var(--primary); }
.bubble__wait { display: block; margin: 0 auto 6px; width: max-content; padding: 4px 10px; border-radius: 8px; background: #fff; color: var(--text); font: 700 13px/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase; }
.n-check { background: var(--graphite-2); color: #fff; box-shadow: 0 8px 0 #0b1220; }
.n-chest { background: linear-gradient(#fbbf24, var(--amber)); color: #3b2400; box-shadow: 0 8px 0 var(--amber-2); }
.label { position: absolute; top: 50%; transform: translateY(-50%); width: max-content; font: 600 16px/1.25 var(--font-head); color: var(--muted); pointer-events: none; }
/* long titles wrap at the room left beside the node, never past the screen edge */
.label--r { left: calc(100% + 16px); max-width: calc(min(50vw, 260px) - 82px - var(--x, 0px)); }
.label--l { right: calc(100% + 16px); max-width: calc(min(50vw, 260px) - 82px + var(--x, 0px)); text-align: right; }
.label b { display: block; color: var(--text); font-size: 18px; line-height: 1.2; }
.bubble { position: absolute; bottom: calc(100% + 22px); left: 50%; transform: translateX(calc(-50% - var(--x, 0px) * .7)); width: max-content; max-width: calc(100vw - 2 * var(--side)); padding: 12px 18px; border-radius: 16px; background: var(--text); color: #fff; font: 700 19px/1.2 var(--font-head); text-align: center; box-shadow: 0 10px 28px rgba(42,33,28,.3); }
.bubble small { display: block; font: 600 15px/1.2 var(--font-body); color: #c3c8d6; margin-top: 4px; }
.bubble::after { content: ''; position: absolute; top: 100%; left: calc(50% + var(--x, 0px) * .7); margin-left: -9px; border: 9px solid transparent; border-top-color: var(--text); }
.bubble__go, .bubble__pro { display: block; margin: 0 auto 6px; width: max-content; padding: 4px 10px; border-radius: 8px; background: var(--primary); font: 700 13px/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase; }
.bubble__pro { background: #fef3c7; color: var(--amber-2); display: flex; align-items: center; gap: 4px; }
.bubble__pro .ico { width: 13px; height: 13px; }
.path-end { margin: 22px 0 8px; text-align: center; color: var(--dim); font: 700 17px/1.3 var(--font-head); }

/* ── bottom tabs ─────────────────────────────────────────────────────── */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,255,255,.97); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1.5px solid var(--line); padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); }
.tabs__in { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.tabs__in--3 { grid-template-columns: repeat(3, 1fr); }
.tab { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 66px; border: 0; background: none; font: 700 14px/1 var(--font-head); color: var(--dim); text-decoration: none; cursor: pointer; border-radius: 14px; }
.tab .ico { width: 30px; height: 30px; }
.tab.on { color: var(--text); }
.tab.on .ico { color: var(--primary); }

/* ── pages (practice, profile) ──────────────────────────────────────── */
.page { padding: 4px 0 32px; }
.page__title { margin: 10px 0 8px; font: 700 34px/1.12 var(--font-head); }
.page__lead { margin: 0 0 18px; color: var(--muted); font-size: 19px; }
.page__fine { margin: 26px 0 0; text-align: center; font-size: 16px; color: var(--dim); }
.page__fine a { color: var(--muted); display: inline-block; padding: 12px 4px; }
.plist { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.plist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 12px 18px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 700; font-size: 19px; }
.plist b { color: var(--bad); font-family: var(--font-head); white-space: nowrap; }
.empty { text-align: center; padding: 32px 8px; }
.empty > .ico { width: 56px; height: 56px; color: var(--ok); }
.empty h2 { margin: 10px 0 8px; font: 700 28px/1.2 var(--font-head); }
.empty p { color: var(--muted); margin: 0 0 22px; font-size: 19px; }
.pstats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0 16px; }
.pstats div { padding: 16px 8px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); text-align: center; }
.pstats b { display: block; font: 700 30px/1.1 var(--font-head); }
.pstats small { display: block; margin-top: 6px; font: 700 13px/1.15 var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pcard { margin-top: 12px; padding: 18px; border-radius: 20px; background: var(--surface); border: 1.5px solid var(--line); }
.pcard h2 { margin: 0 0 6px; font: 700 22px/1.2 var(--font-head); display: flex; gap: 8px; align-items: center; }
.pcard h2 .ico { width: 24px; height: 24px; color: var(--ok); }
.pcard p { margin: 0 0 14px; color: var(--muted); font-size: 18px; }
.pcard .prow p { margin: 0; }
.pcard--qa { border-style: dashed; }
.prow { display: flex; align-items: center; gap: 14px; }
/* a 66×50 button; the 62×38 track and the knob are drawn inside it */
.toggle { position: relative; width: 66px; height: 50px; border: 0; padding: 0; background: none; flex: none; cursor: pointer; margin-left: auto; border-radius: 19px; }
.toggle::before { content: ''; position: absolute; left: 2px; right: 2px; top: 6px; bottom: 6px; border-radius: 19px; background: var(--surface-3); transition: background .15s ease; }
.toggle::after { content: ''; position: absolute; top: 10px; left: 6px; width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s ease; }
.toggle[aria-checked="true"]::before { background: var(--primary); }
.toggle[aria-checked="true"]::after { transform: translateX(24px); }

/* ── lesson ─────────────────────────────────────────────────────────── */
.app[data-screen="lesson"] { padding: 0; }
.lesson { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.lesson__top { display: flex; align-items: center; gap: 12px; padding: 10px 14px 6px; flex: none; }
.bar { flex: 1; height: 18px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar__fill { height: 100%; width: 4%; border-radius: 999px; background: linear-gradient(180deg, #22c55e, var(--ok)); box-shadow: inset 0 -5px 0 rgba(0,0,0,.1), inset 0 4px 0 rgba(255,255,255,.25); transition: width .35s ease; }
.lesson__top .stat { min-width: 52px; justify-content: center; }
/* the read-aloud voice (voice.js): on/off in the header, a speaker at the end of the heading */
.voice-btn { width: 48px; height: 48px; color: var(--primary); }
.voice-btn .ico { width: 30px; height: 30px; }
.lesson[data-voice="off"] .voice-btn { color: #8a90a3; }
.say { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; margin: -8px 0 -8px 10px; padding: 0; border: 0; border-radius: 50%; background: #fbe9df; color: var(--primary); vertical-align: middle; cursor: pointer; }
.say::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; }   /* a 48px tap target */
.say .ico { width: 22px; height: 22px; }
.say.is-playing .ico { animation: say-pulse .9s ease-in-out infinite; }
@keyframes say-pulse { 50% { transform: scale(1.18); } }
.lesson[data-voice="on"] .has-say { cursor: pointer; }
.lesson[data-voice="off"] .say { display: none; }
.practice-chip { height: 36px; padding: 0 14px; border-radius: 999px; background: #fbe9df; color: var(--primary); font: 700 16px/36px var(--font-head); }
.lesson__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; padding: 6px var(--side) 18px; }

.card { display: flex; flex-direction: column; flex: 1 0 auto; }
.card--in { animation: card-in .28s ease both; }
@keyframes card-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.card__kicker { display: flex; align-items: center; gap: 8px; margin: 6px 0 6px; font: 700 15px/1.2 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.card__kicker .ico { width: 20px; height: 20px; color: var(--primary); }
.card__q { margin: 0 0 16px; font: 700 32px/1.14 var(--font-head); letter-spacing: -.01em; outline: none; }
.card__q--xl { font-size: 36px; line-height: 1.1; }
.card__head .card__q { margin-bottom: 6px; }
.card__sub { margin: 0 0 12px; font-size: 20px; line-height: 1.35; color: var(--muted); }
.card__img { display: block; width: 100%; border-radius: 16px; margin: 0 0 16px; }

.opts { display: grid; gap: 12px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 14px 16px; border-radius: 18px; border: 2px solid var(--line); border-bottom-width: 5px; background: var(--surface); text-align: left; font: 600 20px/1.3 var(--font-body); cursor: pointer; }
.opt:hover { background: #fffaf6; }
.opt__key { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line); display: grid; place-items: center; font: 700 17px/1 var(--font-head); color: var(--muted); flex: none; }
.opt.is-sel { border-color: #f0a27e; background: #fdf0e8; }
.opt.is-sel .opt__key { border-color: var(--primary); color: var(--primary); }
.opt.is-right { border-color: #86efac; background: var(--ok-bg); }
.opt.is-right .opt__key { border-color: var(--ok); background: var(--ok); color: #fff; }
.opt.is-wrong { border-color: #fca5a5; background: var(--bad-bg); }
.opt.is-wrong .opt__key { border-color: var(--bad); background: var(--bad); color: #fff; }
.is-locked .opt, .is-locked .gb__btn { cursor: default; }

/* good or bad: the photo in the rounded box where the Garage School's 3D viewer was */
.viewer { position: relative; height: clamp(240px, 40dvh, 440px); border-radius: 22px; overflow: hidden; margin: 0 0 16px; flex: none;
  background: var(--surface-2); border: 1.5px solid var(--line); }
.viewer .photo { position: absolute; inset: 0; margin: 0; border: 0; border-radius: 0; }
.viewer .photo img { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; object-fit: cover; display: block; }
.gb { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: none; }
.gb__btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 78px; border-radius: 20px; border: 2px solid var(--line); border-bottom-width: 5px; background: var(--surface); font: 700 24px/1 var(--font-head); cursor: pointer; }
.gb__btn .ico { width: 32px; height: 32px; }
.gb__btn--good .ico { color: var(--ok); } .gb__btn--bad .ico { color: var(--bad); }
.gb__btn.is-sel { border-color: #f0a27e; background: #fdf0e8; }
.gb__btn.is-right { border-color: #86efac; background: var(--ok-bg); }
.gb__btn.is-wrong { border-color: #fca5a5; background: var(--bad-bg); }
.gb--done { display: flex; gap: 8px; margin: -4px 0 14px; }
.gb--done .gb__btn { min-height: 0; padding: 8px 14px; font-size: 17px; border-width: 2px; flex: none; }
.gb--done .gb__btn:not(.is-right) { display: none; }
.gb--done .gb__btn .ico { width: 20px; height: 20px; }
/* stage 2 (what's going on?): a shorter view, the Good/Bad answer becomes a chip on it */
.card--goodbad.is-stage2 .viewer { height: clamp(170px, 25dvh, 300px); }
.viewer > .gb--done { position: absolute; z-index: 3; top: 12px; right: 12px; margin: 0; }
.card--goodbad.is-stage2 .card__q { margin-bottom: 12px; }

/* step */
.watch { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 20px; background: var(--graphite); color: #e5e7eb; margin: 6px 0 12px; }
.watch__ico { width: 38px; height: 38px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; flex: none; color: #fff; }
.watch__ico .ico { width: 22px; height: 22px; }
.watch__k { font: 700 14px/1 var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: #f6b08f; }
.watch p { margin: 6px 0 0; font-size: 20px; line-height: 1.4; }
.card--step .card__kicker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.card--step .card__kicker .ico { vertical-align: -4px; margin-right: 8px; }
.dots { display: flex; gap: 6px; margin: 0 0 16px; }
.dots i { height: 8px; flex: 1; border-radius: 4px; background: var(--surface-3); }
.dots i.on { background: var(--ok); } .dots i.now { background: var(--primary); }

/* fact */
.card--fact { padding-top: 24px; }
.fact { padding: 26px 22px; border-radius: 22px; background: linear-gradient(160deg, #fdf0e8, #ffffff); border: 2px solid #f5cdb8; }
.fact__badge { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--primary); color: #fff; font: 700 15px/1 var(--font-head); letter-spacing: .04em; }
.fact__badge .ico { width: 18px; height: 18px; }
.fact__text { margin: 18px 0 14px; font: 700 27px/1.28 var(--font-head); outline: none; }
.fact__src { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; font-size: 17px; font-weight: 700; text-decoration: none; }
.fact__src .ico { width: 20px; height: 20px; }

.hint-pill { position: absolute; z-index: 3; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 10px; height: 58px; padding: 0 22px; border-radius: 29px; background: var(--surface); border: 2px solid var(--line); font: 700 20px/1 var(--font-head); color: var(--text); box-shadow: 0 4px 12px rgba(42,33,28,.1); cursor: pointer; }
.hint-pill .ico { width: 28px; height: 28px; color: var(--amber); }
.hint-pill[hidden], .hint-btn[hidden] { display: none; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px; border-radius: 23px; background: var(--surface); border: 2px solid var(--line); font: 700 17px/1 var(--font-head); }
.chip i { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }

.hint-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 18px; margin: -6px 0 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--amber-2); font: 700 19px/1 var(--font-head); cursor: pointer; align-self: flex-start; }
.hint-btn .ico { width: 22px; height: 22px; }
.hint { margin: -4px 0 12px; padding: 12px 14px; border-radius: 14px; background: #fffbeb; border: 1.5px solid #fde68a; color: #78350f; font-size: 19px; }

/* ── the check sheet (in the lesson's column, under the card) ───────── */
.check { flex: none; padding: 16px var(--side) calc(18px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 2px solid var(--line); }
.check[data-state="hidden"] { display: none; }
.check[data-state="intro"] { border-top: 0; }
.check__panel:empty { display: none; }
.check__panel { max-height: 48vh; overflow-y: auto; margin-bottom: 16px; }
.check[data-state="right"] { background: var(--ok-bg); border-top-color: #bbf7d0; }
.check[data-state="wrong"] { background: var(--bad-bg); border-top-color: #fecaca; }
.check[data-state="right"] .btn--check { background: var(--ok); color: #fff; box-shadow: 0 5px 0 var(--ok-d); }
.check[data-state="wrong"] .btn--check { background: var(--bad); color: #fff; box-shadow: 0 5px 0 var(--bad-d); }
.btn--check { background: var(--primary); color: #fff; box-shadow: 0 5px 0 var(--primary-d); }
.result { display: flex; gap: 12px; align-items: flex-start; animation: rise .22s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.result__ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; margin-top: 1px; }
.result__ico .ico { width: 24px; height: 24px; }
.check[data-state="right"] .result__ico { background: var(--ok); }
.check[data-state="wrong"] .result__ico { background: var(--bad); }
.result__body { min-width: 0; }
.result h3 { margin: 2px 0 8px; font: 700 28px/1.12 var(--font-head); }
.check[data-state="right"] .result h3 { color: var(--ok-text); }
.check[data-state="wrong"] .result h3 { color: var(--bad-text); }
.result p { margin: 0 0 8px; font-size: 20px; line-height: 1.4; color: #1f2937; }
.todo { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.75); font-size: 19px; line-height: 1.4; }
.todo__label { align-self: flex-start; padding: 5px 10px; border-radius: 8px; background: var(--graphite); color: #fff; font: 700 14px/1.2 var(--font-head); letter-spacing: .06em; text-transform: uppercase; }
.todo--keep { background: var(--ok); } .todo--see_mechanic { background: var(--bad); } .todo--replace { background: var(--amber-2); }
.todo--adjust { background: var(--primary); } .todo--clean { background: #0e7490; }

/* ── done ──────────────────────────────────────────────────────────── */
.app[data-screen="done"] { padding-top: 26px; padding-bottom: 32px; }
.done { display: flex; flex-direction: column; gap: 18px; }
.done__flame { width: 104px; height: 104px; margin: 4px auto 0; color: #f97316; filter: drop-shadow(0 8px 20px rgba(249,115,22,.3)); }
.done__flame .ico { width: 104px; height: 104px; }
.done__flame.is-up { animation: pop .6s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.done h1 { margin: 0; text-align: center; font: 700 34px/1.12 var(--font-head); }
.done__sub { margin: -8px 0 0; text-align: center; color: var(--muted); font-size: 20px; }
.dstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dstat { padding: 14px 6px; border-radius: 18px; text-align: center; border: 2.5px solid; background: var(--surface); }
.dstat b { display: block; font: 700 26px/1.1 var(--font-head); }
.dstat small { display: block; margin-top: 4px; font: 700 13px/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; }
.dstat--xp { border-color: #f2b08e; color: var(--primary); } .dstat--acc { border-color: #86efac; color: var(--ok); } .dstat--time { border-color: #e3d8cc; color: var(--text); }
.learned { padding: 16px 18px; border-radius: 18px; background: var(--graphite); color: #e5e7eb; }
.eyebrow { font: 700 15px/1.2 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.learned .eyebrow { color: #f6b08f; }
.eyebrow--amber { color: var(--amber-2); }
.learned p { margin: 8px 0 0; font-size: 20px; line-height: 1.4; }
.btn--next .ico { width: 28px; height: 28px; }
.tomorrow { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); }
.tomorrow > .ico { width: 28px; height: 28px; color: var(--primary-2); }
.tomorrow b { display: block; font: 700 19px/1.2 var(--font-head); } .tomorrow small { display: block; color: var(--muted); font-size: 16px; margin-top: 4px; }
[data-install-slot]:empty { display: none; }

/* ── daily reminder + Home Screen (push.js, install.js) ───────────────── */
.remind { display: grid; gap: 14px; padding: 20px; border-radius: 22px; background: linear-gradient(160deg, #fdece2, #ffffff 70%); border: 2px solid #f3c3a9; }
.remind--muted { background: var(--surface); border-color: var(--line); }
.remind__head { display: flex; align-items: center; gap: 14px; }
.remind__ico { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--primary); color: #fff; flex: none; box-shadow: 0 4px 0 var(--primary-d); }
.remind__ico .ico { width: 32px; height: 32px; }
.remind--muted .remind__ico { background: var(--surface-3); color: var(--muted); box-shadow: none; }
.remind__app { width: 60px; height: 60px; border-radius: 15px; flex: none; box-shadow: 0 2px 8px rgba(42,33,28,.18); }
.remind h2 { margin: 0; font: 700 24px/1.15 var(--font-head); }
.remind p { margin: 6px 0 0; color: var(--muted); font-size: 19px; line-height: 1.35; }
.remind p b { color: var(--text); }
.remind__fine { margin: 0 !important; text-align: center; font-size: 16px !important; }
.tomorrow > div { flex: 1 1 auto; min-width: 0; }
.minibtn { flex: none; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--primary); font: 700 18px/1 var(--font-head); cursor: pointer; }
.toggle[aria-busy="true"] { opacity: .6; }
.install { display: grid; gap: 14px; padding: 16px 18px 18px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); }
.install__row { display: flex; align-items: center; gap: 14px; }
.install__row b { display: block; font: 700 19px/1.2 var(--font-head); }
.install__row small { display: block; color: var(--muted); font-size: 16px; margin-top: 4px; }
.install__app { width: 56px; height: 56px; border-radius: 14px; flex: none; box-shadow: 0 2px 8px rgba(42,33,28,.16); }
.pcard .prow + .btn { margin-top: 14px; }
.howto { margin: 4px 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.howto li { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 18px; background: var(--surface-2); }
.howto__n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; font: 700 19px/1 var(--font-head); flex: none; }
.howto b { display: block; font: 700 20px/1.35 var(--font-head); }
.howto small { display: block; margin-top: 4px; color: var(--muted); font-size: 17px; line-height: 1.35; }
.howto__key { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-left: 4px; vertical-align: middle; border-radius: 11px; background: #fff; border: 1.5px solid var(--line); color: #0a7aff; }
.howto__key .ico { width: 26px; height: 26px; }
.howto__chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 6px 12px; border-radius: 12px; background: #fff; border: 1.5px solid var(--line); font-weight: 700; white-space: nowrap; }
.howto__chip .ico { width: 24px; height: 24px; color: var(--text); }
.howto__chip--app img { width: 30px; height: 30px; border-radius: 8px; }
.sheet__app { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 4px 14px rgba(42,33,28,.2); }
.sheet__x ~ .sheet__title { padding-right: 44px; }
.remind--stack .remind__head { flex-direction: column; align-items: flex-start; gap: 12px; }

/* ── email reminders (js/email.js): the done-screen card and the quit sheet ── */
.mailform { display: grid; gap: 14px; }
.field { display: block; width: 100%; min-height: 64px; padding: 0 18px; border-radius: 16px; border: 2px solid var(--steel-d); background: #fff; color: var(--text); font: 600 20px/1.2 var(--font-body); -webkit-appearance: none; appearance: none; }
.field::placeholder { color: var(--dim); opacity: 1; }
.field:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(217,72,15,.16); }
.field[aria-invalid="true"] { border-color: var(--bad); }
.mailform__err { margin: -4px 0 0 !important; color: var(--bad-text) !important; font-size: 17px !important; font-weight: 700; line-height: 1.35; }
.mailform__fine { margin: 0; text-align: center; color: var(--muted); font-size: 16px; line-height: 1.4; }
.mailform .btn[aria-busy="true"] { cursor: progress; }
.linkbtn { justify-self: center; display: block; margin: 0 auto; min-height: 48px; padding: 0 14px; border: 0; background: none; color: var(--primary); font: 700 18px/1.2 var(--font-head); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.remind--ok { background: linear-gradient(160deg, var(--ok-bg), #ffffff 75%); border-color: #86efac; }
.remind--ok .remind__ico { background: var(--ok); box-shadow: 0 4px 0 var(--ok-d); }
.remind--ok h2 { font-size: 23px; }
.done__remind { display: grid; gap: 14px; }   /* the email form + the iPhone Home Screen card */
.sheet__x ~ .mailform .sheet__title { padding-right: 44px; }

.sources { font-size: 17px; color: var(--muted); }
.sources summary { min-height: 52px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; list-style: none; }
.sources summary::-webkit-details-marker { display: none; }
.sources summary::before { content: '+'; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); color: var(--muted); font: 700 18px/1 var(--font-head); }
.sources[open] summary::before { content: '−'; }
.sources ul { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.sources a { display: inline-block; padding: 12px 0; }
.done__badge { width: 112px; height: 112px; margin: 8px auto 0; border-radius: 32px; display: grid; place-items: center; background: linear-gradient(160deg, #fde68a, var(--amber)); color: #3b2400; box-shadow: 0 10px 30px rgba(245,158,11,.35); }
.done__badge .ico { width: 64px; height: 64px; }
.thanks { padding: 20px; border-radius: 20px; background: linear-gradient(160deg, #fff7e0, #fffdf6); border: 2px solid #fcd34d; }
.thanks p { margin: 0; font: 700 20px/1.45 var(--font-body); }

/* ── Pro card / paywall ───────────────────────────────────────────── */
.pro-card { padding: 20px; border-radius: 22px; background: linear-gradient(160deg, #fff7e0, #fffdf6); border: 2px solid #fcd34d; }
.pw__title { margin: 6px 0 6px; font: 700 30px/1.15 var(--font-head); }
.pw__early { margin: 0 0 14px; font-size: 19px; line-height: 1.35; color: var(--amber-2); font-weight: 800; }
.pw__lesson { margin: 4px 0 0; font: 700 19px/1.3 var(--font-head); color: var(--muted); }
.pw__list { margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 20px; line-height: 1.3; }
.pw__list li { display: flex; gap: 10px; }
.pw__list .ico { width: 24px; height: 24px; color: #d97706; margin-top: 1px; }
.fine { margin: 10px 0 0; text-align: center; font-size: 16px; color: var(--muted); }
.pw__inapp { display: flex; align-items: center; gap: 12px; margin: 0; padding: 16px; border-radius: 16px; background: #fff; border: 2px dashed #fcd34d; font-weight: 800; font-size: 19px; }
.pw__inapp .ico { color: var(--amber-2); }

/* ── sheets ─────────────────────────────────────────────────────────── */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-wrap:not(.on) { pointer-events: none; }   /* closing (or not yet open): never in the way of a tap */
.sheet-dim { position: absolute; inset: 0; background: rgba(42,33,28,.45); opacity: 0; transition: opacity .2s ease; }
.sheet { position: relative; width: 100%; max-width: var(--maxw); max-height: calc(100% - 24px); overflow-y: auto; padding: 26px var(--side) calc(22px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--surface); box-shadow: 0 -10px 40px rgba(42,33,28,.25); transform: translateY(100%); transition: transform .24s ease; display: flex; flex-direction: column; gap: 12px; outline: none; }
.sheet-wrap.on .sheet-dim { opacity: 1; }
.sheet-wrap.on .sheet { transform: none; }
.sheet--pro { background: linear-gradient(170deg, #fff7e0, #ffffff 45%); }
.sheet__x { position: absolute; right: 8px; top: 8px; width: 52px; height: 52px; border-radius: 14px; border: 0; background: transparent; color: var(--dim); display: grid; place-items: center; cursor: pointer; }
.sheet__x .ico { width: 30px; height: 30px; }
.sheet__title { margin: 2px 0 0; font: 700 30px/1.15 var(--font-head); }
.sheet__text { margin: 0; color: var(--muted); font-size: 20px; line-height: 1.4; }
.sheet .pw__title { margin-top: 2px; }
.sheet .eyebrow { padding-right: 48px; }
.fuel-empty { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--bad); font: 700 42px/1 var(--font-head); }
.fuel-empty .ico { width: 64px; height: 64px; }
.soon-badge { width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center; background: var(--surface-2); color: var(--steel-ico); }
.soon-badge .ico { width: 42px; height: 42px; }

/* ── toast ─────────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; top: 14px; z-index: 60; transform: translate(-50%, -20px); width: max-content; max-width: calc(100% - 2 * var(--side)); padding: 14px 18px; border-radius: 16px; background: var(--text); color: #fff; font: 700 18px/1.3 var(--font-head); box-shadow: 0 10px 30px rgba(42,33,28,.3); opacity: 0; transition: opacity .2s ease, transform .2s ease; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ── made for your phone (desktop / tablet landscape) ──────────────── */
.app[data-screen="gate"] { display: grid; place-items: center; max-width: 560px; }
.gate { text-align: center; padding: 40px 0; }
.gate__logo { width: 120px; height: auto; }
.gate h1 { margin: 18px 0 10px; font: 700 34px/1.15 var(--font-head); }
.gate p { margin: 0 auto 22px; max-width: 420px; color: var(--muted); font-size: 19px; }
.gate__qr { width: 220px; height: 220px; margin: 0 auto; padding: 14px; border-radius: 22px; background: #fff; border: 1.5px solid var(--line); box-shadow: 0 8px 30px rgba(42,33,28,.08); }
.gate__qr svg { display: block; width: 100%; height: 100%; }
.gate__url { margin: 16px 0 0; font: 700 16px/1.3 var(--font-head); color: var(--muted); word-break: break-all; }
/* Desktop / tablet: the app in a phone frame + the QR code beside it (app.js showGate) */
html.is-desk, html.is-desk body { height: 100%; }
html.is-desk .app { max-width: none; padding: 0; }
.desk { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 56px; padding: 24px; box-sizing: border-box; }
.desk__phone { flex: none; width: 390px; height: min(844px, calc(100vh - 48px)); border-radius: 44px; border: 10px solid #111827; background: #111827; box-shadow: 0 24px 60px rgba(42,33,28,.22); overflow: hidden; }
.desk__frame { display: block; width: 100%; height: 100%; border: 0; border-radius: 34px; background: var(--bg, #f5f7fb); }
.desk__side { max-width: 360px; text-align: center; }
.desk__side h1 { margin: 14px 0 10px; font: 700 40px/1.1 var(--font-head); }
.desk__side p { margin: 0 auto 18px; color: var(--muted); font-size: 19px; }
.desk__try { font-weight: 700; color: var(--text) !important; }
@media (max-width: 860px) { .desk { flex-direction: column; gap: 28px; } .desk__side { order: -1; } }

/* ── onboarding (js/onboarding.js): Mia asks a few quick questions before lesson 1 ── */
.app[data-screen="welcome"] { padding: 0; }
.ob { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.ob__top { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; gap: 8px; padding: 10px 10px 6px; background: var(--bg); }
.ob__back { width: 52px; height: 52px; flex: none; color: var(--muted); }
.ob__back .ico { width: 30px; height: 30px; }
.ob__bar { height: 16px; }
.ob__skip { flex: none; min-width: 66px; min-height: 52px; padding: 0 10px; border: 0; border-radius: 14px; background: none; color: var(--dim); font: 700 18px/1 var(--font-head); letter-spacing: .02em; cursor: pointer; }
button.ob__skip:hover { background: var(--surface-2); color: var(--muted); }
/* the page colour on the body itself: Mia is multiplied into whatever is under
   her, and while the body slides in it is its own layer */
.ob__body { flex: 1 0 auto; display: flex; flex-direction: column; padding: 6px var(--side) 24px; background: var(--bg); }
.ob__foot { position: sticky; bottom: 0; z-index: 3; padding: 12px var(--side) calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(251,247,242,0), var(--bg) 18px); }

/* Mia: white-background renders; multiply leaves only her and her floor shadow */
.ob-max { position: relative; flex: none; }
.ob-max img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.ob-say { display: flex; }
.ob-say--side { align-items: flex-start; gap: 6px; margin: 0 0 16px; }
.ob-say--side .ob-max { width: clamp(106px, 32vw, 140px); margin: -6px 0 -12px -12px; }
.ob-say--side .ob-bubble { flex: 1 1 auto; min-width: 0; margin-top: 12px; }
.ob-say--center { flex: 1 0 auto; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 4px 0 0; }
.ob-say--center .ob-max { margin-top: -14px; }
.ob-say--center .ob-max img { width: auto; height: clamp(200px, 37dvh, 330px); }

/* the speech bubble: a white card with a tail pointing at Mia */
.ob-bubble { position: relative; padding: 14px 18px 16px; border-radius: 20px; background: var(--surface); border: 2px solid var(--line); }
.ob-bubble::before { content: ''; position: absolute; width: 18px; height: 18px; background: var(--surface); transform: rotate(45deg); }
.ob-say--side .ob-bubble::before { left: -11px; top: 26px; border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.ob-say--center .ob-bubble { max-width: 360px; margin: 0 6px; padding: 18px 22px 20px; }
.ob-say--center .ob-bubble::before { left: 50%; bottom: -11px; margin-left: -9px; border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.ob-bubble__lead { margin: 0 0 6px; font: 600 19px/1.35 var(--font-body); color: var(--muted); }
.ob-bubble__q { margin: 0; font: 700 26px/1.16 var(--font-head); letter-spacing: -.01em; color: var(--text); outline: none; }
.ob-say--center .ob-bubble__q { font-size: 32px; }
.ob-bubble__sub { margin: 8px 0 0; font: 600 20px/1.4 var(--font-body); color: var(--text); }

/* one-tap answers */
.ob-opts { display: grid; gap: 12px; }
.ob-opt { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 10px 14px 10px 12px; border-radius: 18px; border: 2px solid var(--line); border-bottom-width: 5px;
  background: var(--surface); color: var(--text); text-align: left; font: 700 20px/1.25 var(--font-body); cursor: pointer; transition: transform .08s ease, background-color .15s ease, border-color .15s ease; }
@media (hover: hover) { .ob-opt:hover { background: #fffaf6; } }
.ob-opt:active { transform: translateY(2px); }
.ob-opt__ico { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 14px; background: #fdf0e8; color: var(--primary); flex: none; transition: background-color .15s ease, color .15s ease; }
.ob-opt__ico .ico { width: 30px; height: 30px; }
.ob-opt__t { flex: 1 1 auto; min-width: 0; }
.ob-opt__tick { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--steel-d); color: transparent; flex: none; transition: background-color .15s ease, border-color .15s ease; }
.ob-opt__tick .ico { width: 18px; height: 18px; }
.ob-opt.is-sel { border-color: #f0a27e; background: #fdf0e8; }
.ob-opt.is-sel .ob-opt__ico { background: var(--primary); color: #fff; }
.ob-opt.is-sel .ob-opt__tick { background: var(--primary); border-color: var(--primary); color: #fff; }
.ob-opt.is-picked { animation: ob-picked .3s ease; }
@keyframes ob-picked { 40% { transform: scale(1.025); } }

/* the goal screen: minutes a day + the reminder time */
.ob-group + .ob-group { margin-top: 18px; }
.ob-group__h { margin: 0 0 10px; font: 700 15px/1.2 var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ob-opt--goal { min-height: 66px; }
.ob-goal { flex: none; min-width: 80px; font: 700 18px/1 var(--font-head); color: var(--muted); }
.ob-goal b { font-size: 28px; color: var(--text); }
.ob-opt--goal .ob-opt__t { font-size: 19px; font-weight: 600; color: var(--muted); }
.ob-opt--goal.is-sel .ob-goal b { color: var(--primary); }
.ob-opt--goal.is-sel .ob-opt__t { color: var(--text); }
.ob-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ob-time { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 104px; padding: 10px 4px; border-radius: 18px; border: 2px solid var(--line); border-bottom-width: 5px;
  background: var(--surface); color: var(--text); cursor: pointer; transition: transform .08s ease, background-color .15s ease, border-color .15s ease; }
.ob-time:active { transform: translateY(2px); }
.ob-time .ico { width: 32px; height: 32px; margin-bottom: 2px; color: var(--amber); }
.ob-time[data-at="19:00"] .ico { color: #6366f1; }
.ob-time b { font: 700 19px/1.1 var(--font-head); }
.ob-time small { font: 700 17px/1.1 var(--font-body); color: var(--muted); }
.ob-time.is-sel { border-color: #f0a27e; background: #fdf0e8; }
.ob-time.is-sel small { color: var(--primary); }

/* the last screen: the plan they picked */
.ob-plan { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 0; padding: 0; }
.ob-plan li { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 22px; background: var(--surface); border: 2px solid var(--line); font: 700 17px/1 var(--font-head); color: var(--text); }
.ob-plan .ico { width: 22px; height: 22px; color: var(--primary); }

/* motion: the body slides in (from the left going back), Mia pops up, her
   bubble after her, then the answers; Mia sways on the welcome and the last screen */
.ob__body { animation: ob-in .3s ease both; }
.ob[data-dir="back"] .ob__body { animation-name: ob-in-back; }
@keyframes ob-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes ob-in-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.ob-max img { transform-origin: 50% 92%; animation: ob-max-in .5s .04s cubic-bezier(.2,1.3,.4,1) both; }
.ob--welcome .ob-max img, .ob--ready .ob-max img { animation: ob-max-in .5s .04s cubic-bezier(.2,1.3,.4,1) both, ob-sway 3.6s 1s ease-in-out infinite; }
@keyframes ob-max-in { from { opacity: 0; transform: translateY(18px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes ob-sway { 0%, 100% { transform: none; } 50% { transform: rotate(-1.6deg); } }
.ob-bubble { transform-origin: 0 36px; animation: ob-pop .36s .16s cubic-bezier(.2,1.4,.4,1) both; }
.ob-say--center .ob-bubble { transform-origin: 50% 100%; }
@keyframes ob-pop { from { opacity: 0; transform: scale(.84); } to { opacity: 1; transform: none; } }
.ob-opts > *, .ob-group, .ob-plan { animation: rise .3s ease both; animation-delay: .24s; }
.ob-opts > :nth-child(2) { animation-delay: .29s; }
.ob-opts > :nth-child(3) { animation-delay: .34s; }
.ob-opts > :nth-child(4) { animation-delay: .39s; }
.ob-group .ob-opts > * { animation: none; }
.ob-group + .ob-group { animation-delay: .32s; }
.ob.is-still *, .ob.is-still *::before { animation: none !important; transition: none !important; }

@media (max-width: 374px) {
  .ob-bubble__q { font-size: 24px; }
  .ob-say--center .ob-bubble__q { font-size: 29px; }
  .ob-opt { gap: 12px; font-size: 19px; }
  .ob-opt__ico { width: 46px; height: 46px; }
  .ob-goal { min-width: 70px; }
  .ob-time { min-height: 96px; }
}
@media (max-height: 700px) {
  .ob-say--center .ob-max img { height: clamp(170px, 32dvh, 300px); }
  .ob-time { min-height: 92px; }
}

/* lesson 1's done screen: one line from Mia (done.js) */
.maxline { display: flex; align-items: center; gap: 14px; }
.maxline__face { width: 64px; height: 64px; flex: none; border-radius: 50%; object-fit: cover; background: #fff; border: 2px solid var(--line); }
.maxline__say { position: relative; flex: 1 1 auto; min-width: 0; margin: 0; padding: 12px 16px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); font: 700 19px/1.3 var(--font-head); color: var(--text); }
.maxline__say::before { content: ''; position: absolute; left: -10px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: var(--surface); border-left: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: rotate(45deg); }

/* the course chip only where the big counters leave room for it */
.course-line { margin: 2px 0 10px; color: var(--primary); }
@media (max-width: 469px) { .course-chip { display: none; } }
@media (min-width: 470px) { .course-line { display: none; } }
@media (max-width: 374px), (max-height: 800px) {
  .chips { gap: 8px; margin-top: 8px; }
  .chip { height: 42px; padding: 0 13px; font-size: 16px; }
  .card__q--xl { font-size: 32px; }
}
@media (max-width: 374px) {
  :root { --side: 16px; }
  .card__q { font-size: 29px; }
  .card__q--xl { font-size: 32px; }
  .week li { width: 19px; }
  .stat { font-size: 22px; }
  .top__stats { gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Developer mode (?dev=<key>): a chip in the top bar and the Profile panel */
.dev-chip { position: relative; display: inline-flex; align-items: center; height: 32px; padding: 0 10px; border-radius: 8px; background: #111827; color: #facc15; font: 700 14px/1 var(--font-head); letter-spacing: .08em; text-decoration: none; }
.dev-chip::before { content: ''; position: absolute; inset: -6px -2px; }   /* a 48px tap target */
.pcard--qa > .btn + .btn { margin-top: 10px; }
.devlist { display: grid; gap: 8px; margin-top: 12px; }
.devlist .btn { justify-content: flex-start; text-align: left; }

/* ── Kitchen School: the text logo ───────────────────────────────────── */
.logo { display: inline-flex; align-items: center; gap: 8px; font: 800 20px/1 var(--font-head); letter-spacing: -.01em; color: var(--text); white-space: nowrap; }
.logo__ico { width: 34px; height: 34px; padding: 6px; border-radius: 10px; background: var(--primary); color: #fff; box-sizing: border-box; }
.logo--big { font-size: 28px; gap: 10px; }
.logo--big .logo__ico { width: 44px; height: 44px; padding: 8px; border-radius: 13px; }
.top__brand { text-decoration: none; }
@media (max-width: 400px) { .top .logo__t { display: none; } }

/* ── photos on cards (cards.js photoHTML) ─────────────────────────────── */
.photo { position: relative; margin: 0 0 16px; border-radius: 18px; overflow: hidden; background: var(--surface-2); border: 1.5px solid var(--line); flex: none; }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.photo--sm img, .photo--step img { max-height: clamp(180px, 30dvh, 300px); }
.photo--fact { margin: -8px -4px 16px; border-radius: 16px; }
.photo--missing img { opacity: .9; }
.photo figcaption { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.92); border: 1.5px solid var(--line); font: 700 14px/1 var(--font-head); color: var(--muted); }
.card--fact .fact .photo { margin-bottom: 14px; }

/* ── find it on the photo (scene.js) ──────────────────────────────────── */
.card--find, .card--intro { flex: 1 1 auto; min-height: 0; }
/* the stage hugs the photo (4:3, the course's photos): no letterbox bars, the
   hint pill sits on the photo; on a short screen the photo gives way in height
   and letterboxes left and right instead */
.stage { position: relative; flex: 0 0 auto; display: flex; }
.scene { position: relative; flex: none; width: 100%; aspect-ratio: 4 / 3; min-height: 200px; max-height: 52dvh; border-radius: 20px; overflow: hidden; background: var(--surface-2); border: 1.5px solid var(--line); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.stage--intro .scene { max-height: 40dvh; }
.scene__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; opacity: 0; transition: opacity .25s ease; }
.scene.is-ready .scene__img { opacity: 1; }
.scene:not(.is-ready)::before { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; pointer-events: none; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.scene--broken::after { content: 'Photo coming'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font: 700 18px/1 var(--font-head); }
.scene__hots { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.scene--live .scene__hots { cursor: pointer; }
/* a hotspot: a circle in % of the drawn photo, at least 44 px, invisible until marked */
.hot { position: absolute; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; background: transparent; border-radius: 50%; transform: translate(-50%, -50%); cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.hot__ring { position: absolute; inset: 0; border-radius: 50%; border: 4px solid transparent; transition: border-color .15s ease, background-color .15s ease; }
.scene--live .hot:focus-visible .hot__ring { border-color: #fff; box-shadow: 0 0 0 3px var(--primary); }
.hot.is-ok .hot__ring { border-color: var(--ok); background: rgba(22,163,74,.14); box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(22,163,74,.35), inset 0 0 0 3px rgba(255,255,255,.85); animation: hot-pop .35s cubic-bezier(.2,1.6,.4,1) both; }
.hot.is-bad .hot__ring { border-color: var(--bad); background: rgba(220,38,38,.12); box-shadow: 0 0 0 3px #fff, inset 0 0 0 2px rgba(255,255,255,.8); animation: hot-pop .3s ease both; }
.hot.is-pulse .hot__ring { border-color: var(--amber); box-shadow: 0 0 0 6px rgba(245,158,11,.28), inset 0 0 0 2px rgba(255,255,255,.8); animation: hintpulse .66s ease-in-out 3; }
@keyframes hot-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hintpulse { 0%, 100% { transform: scale(.75); opacity: .5; } 50% { transform: scale(1.1); opacity: 1; } }
.scene__tag { position: absolute; left: 50%; z-index: 4; width: max-content; max-width: 220px; padding: 9px 14px; border-radius: 14px; font: 700 18px/1.15 var(--font-head); color: #fff; text-align: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); pointer-events: none; transform: translateX(calc(-50% + var(--dx, 0px))); }
.scene__tag[data-side="above"] { bottom: calc(100% + 10px); }
.scene__tag[data-side="below"] { top: calc(100% + 10px); }
.scene__tag::after { content: ''; position: absolute; left: calc(50% - var(--dx, 0px)); margin-left: -9px; border: 9px solid transparent; }
.scene__tag[data-side="above"]::after { top: 100%; }
.scene__tag[data-side="below"]::after { bottom: 100%; }
.hot.is-ok .scene__tag { background: var(--ok); } .hot.is-ok .scene__tag[data-side="above"]::after { border-top-color: var(--ok); } .hot.is-ok .scene__tag[data-side="below"]::after { border-bottom-color: var(--ok); }
.hot.is-bad .scene__tag { background: var(--bad); } .hot.is-bad .scene__tag[data-side="above"]::after { border-top-color: var(--bad); } .hot.is-bad .scene__tag[data-side="below"]::after { border-bottom-color: var(--bad); }
.scene__ripple { position: absolute; z-index: 3; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 3px var(--primary); pointer-events: none; animation: ripple .55s ease-out forwards; }
.scene__ripple--hit { box-shadow: 0 0 0 3px var(--text); }
@keyframes ripple { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.15); opacity: 0; } }
.scene__msg { position: absolute; z-index: 5; left: 50%; top: 14px; transform: translate(-50%, -8px); width: max-content; max-width: calc(100% - 24px); padding: 10px 16px; border-radius: 999px; background: var(--text); color: #fff; font: 700 17px/1.2 var(--font-head); box-shadow: 0 8px 24px rgba(42,33,28,.3); opacity: 0; transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
.scene__msg.on { opacity: 1; transform: translate(-50%, 0); }
.scene__msg[hidden] { display: none; }
.card--find.is-locked .hint-pill { display: none; }
.card--find .hint { margin: 8px 0 2px; }
.result .pointer b { color: var(--text); }
/* ?debug=hotspots: every hotspot with its id, for placing them */
.scene--debug .hot__ring { border-color: rgba(217,72,15,.9); border-style: dashed; background: rgba(217,72,15,.12); }
.hot__debug { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 2px 6px; border-radius: 6px; background: rgba(31,26,22,.85); color: #fff; font: 700 11px/1.2 var(--font-head); white-space: nowrap; pointer-events: none; }

/* ── the fake door: the reserve sheet's thank-you, the goal screen's fine print ── */
.reserved { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--ok-bg); border: 2px solid #86efac; }
.reserved > .ico { width: 32px; height: 32px; color: var(--ok); flex: none; }
.reserved b { display: block; font: 700 20px/1.25 var(--font-head); color: var(--ok-text); }
.reserved small { display: block; margin-top: 4px; font-size: 16px; color: var(--muted); }
.ob-fine { margin: 12px 0 0; text-align: center; color: var(--dim); font-size: 16px; line-height: 1.35; }
.pcard .mailform { margin-top: 4px; }
.stat--fuel, .fuel-empty { color: #e11d48; }
