/* One calm phone-width column; big type, big targets, no pressure. Brand language (2026-11-23, shared with the marketing page): warm paper, indigo ink-accent, serif headings, amber reward. */
:root{
  --bg:#FBF8F1; --card:#FFFFFF; --ink:#1B2430; --muted:#475262; --line:#D9D3C4;
  --accent:#2E268C; --accent-ink:#FFFFFF; --reward:#E3A22F; --good:#1F7A4D; --soft:#EDE7D6; --warn:#A8522F;
  --f-head:'Frank Ruhl Libre','Heebo',Georgia,serif; --f-body:'Heebo',system-ui,sans-serif;
}
/* Light by design: the app stays light even when the phone is in dark mode (decision: Guy, 2026-11-21). */
:root{color-scheme:light}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:19px;line-height:1.5;
  padding-bottom:calc(16px + env(safe-area-inset-bottom,0px));padding-inline:max(16px,env(safe-area-inset-left,0px)) max(16px,env(safe-area-inset-right,0px))}
#app{max-width:440px;margin:0 auto;display:flex;flex-direction:column;gap:16px;padding-top:calc(12px + env(safe-area-inset-top,0px))}
h1,h2,h3{font-family:var(--f-head);margin:0;text-wrap:balance;line-height:1.25}
h1{font-size:30px}h2{font-size:25px}h3{font-size:21px}
p{margin:0}
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px}
.brand{font-family:var(--f-head);font-weight:700;font-size:26px;letter-spacing:.5px;color:var(--accent)}
.btn{font:inherit;font-weight:700;font-size:20px;min-height:60px;padding:12px 22px;border-radius:16px;border:2px solid var(--accent);
  background:var(--accent);color:var(--accent-ink);cursor:pointer;width:100%;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn.ghost{background:transparent;color:var(--accent)}
.btn.small{min-height:48px;font-size:17px;width:auto;padding:8px 16px}
.btn:disabled{opacity:.5;cursor:default}
.btn.mt{margin-top:12px}
.btn:focus-visible,.opt:focus-visible,.card:focus-visible,.sw:focus-visible,.ib-btn:focus-visible,.ib-x:focus-visible{outline:3px solid var(--reward);outline-offset:2px}
.card{background:var(--card);border:1.5px solid var(--line);border-radius:18px;padding:16px;display:flex;gap:14px;align-items:center;text-align:start;
  width:100%;font:inherit;color:inherit;cursor:pointer}
.card.locked{opacity:.62}
.card .ic{flex:0 0 64px;height:64px;border-radius:14px;background:var(--soft);display:grid;place-items:center;color:var(--accent)}
.card .t{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.tag{font-size:15px;color:var(--muted)}
.daily{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.daily .ic{background:rgba(255,255,255,.18);color:var(--accent-ink)}
.daily .tag{color:var(--accent-ink);opacity:.85}
.bar{height:10px;background:var(--soft);border-radius:6px;overflow:hidden}
.bar i{display:block;height:100%;width:0;background:var(--accent);border-radius:6px}
.dots{display:flex;gap:8px;justify-content:center}
.dots b{width:12px;height:12px;border-radius:50%;background:var(--line)}
.dots b.on{background:var(--accent)}
.panel{background:var(--card);border:1.5px solid var(--line);border-radius:18px;padding:18px;display:flex;flex-direction:column;gap:14px}
.panel.center{text-align:center}
.faces{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.fc{background:var(--soft);border-radius:16px;padding:8px 8px 12px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:2px}
.fc svg{width:100%;max-width:130px;height:auto}
.fc .nm{font-family:var(--f-head);font-weight:600;font-size:24px}
.fc .cue{font-size:14px;color:var(--muted);line-height:1.3}
.big{display:flex;justify-content:center}
.big svg{width:170px;height:auto;background:var(--soft);border-radius:20px}
.opts{display:grid;gap:12px}
.opt{font:inherit;font-weight:600;font-size:22px;min-height:64px;border-radius:16px;border:2px solid var(--line);background:var(--card);color:var(--ink);cursor:pointer;
  display:flex;align-items:center;justify-content:center;gap:12px;padding:8px 14px}
.opt.right{border-color:var(--good);background:color-mix(in srgb,var(--good) 16%,var(--card))}
.opt.wrong{border-color:var(--warn);background:color-mix(in srgb,var(--warn) 14%,var(--card))}
.opt.gone{opacity:.3;text-decoration:line-through}
.hintrow{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.fb{padding:12px 14px;border-radius:14px;background:var(--soft);font-size:18px}
.fb strong{font-family:var(--f-head)}
.rooms{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.room{background:var(--soft);border:1.5px solid var(--line);border-radius:16px;padding:12px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:6px;min-height:128px;justify-content:center}
.room .rn{font-family:var(--f-head);font-weight:600;font-size:19px}
.room svg{width:56px;height:56px;color:var(--accent)}
.room.hid{background:var(--card);border-style:dashed}
.q{font-family:var(--f-head);font-size:24px;text-align:center}
.stars{display:flex;gap:8px;justify-content:center;color:var(--reward)}
.stars svg{width:44px;height:44px}
.sw{font:inherit;font-size:17px;display:flex;align-items:center;gap:10px;background:none;border:none;color:var(--ink);cursor:pointer;padding:6px 0;min-height:48px;text-align:start}
.sw .trk{width:52px;height:30px;border-radius:15px;background:var(--line);position:relative;flex:0 0 auto;transition:background .2s}
.sw .trk::after{content:"";position:absolute;top:3px;inset-inline-start:3px;width:24px;height:24px;border-radius:50%;background:#fff;transition:inset-inline-start .2s}
.sw[aria-checked="true"] .trk{background:var(--accent)}
.sw[aria-checked="true"] .trk::after{inset-inline-start:25px}
.note{font-size:16px;color:var(--muted)}
.hook{font-size:17px;color:var(--muted)}
/* stats, satisfaction, coach */
.row2{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.row2 .btn:not(.small){flex:1 1 140px}
.coach{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,var(--card))}
.coach h3{display:flex;align-items:center;gap:8px}
.sat{margin-top:6px;display:flex;flex-direction:column;gap:10px;align-items:center}
.satrow{display:flex;gap:6px;justify-content:center}
.satbtn{width:60px;height:60px;border-radius:16px;border:2px solid var(--line);background:var(--card);color:var(--muted);cursor:pointer;display:grid;place-items:center;padding:0}
.satbtn.on{border-color:var(--reward);color:var(--reward);background:color-mix(in srgb,var(--reward) 14%,var(--card))}
.satbtn:focus-visible{outline:3px solid var(--reward);outline-offset:2px}
.week{display:flex;gap:8px;align-items:flex-end;height:150px}
.wcol{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;height:100%;min-width:0}
.wbar{flex:1;width:100%;max-width:36px;background:var(--soft);border-radius:8px;display:flex;align-items:flex-end;overflow:hidden}
.wbar i{display:block;width:100%;background:var(--accent);border-radius:8px 8px 0 0;min-height:0}
.wmin{font-size:12px;color:var(--muted);height:16px}
.wday{font-size:15px;color:var(--muted)}
.hl{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:4px 0}
.hl strong{font-family:var(--f-head);text-align:end}
/* forms */
.form{display:flex;flex-direction:column;gap:16px}
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-weight:600}
.field input{font:inherit;font-size:20px;min-height:56px;padding:10px 14px;border-radius:14px;border:2px solid var(--line);background:var(--card);color:var(--ink);width:100%}
.field input:focus-visible,.check input:focus-visible{outline:3px solid var(--reward);outline-offset:2px}
.field input[aria-invalid="true"]{border-color:var(--warn)}
.err{color:var(--warn);font-size:16px}
.check{display:flex;gap:12px;align-items:flex-start;font-size:17px;cursor:pointer}
.check input{width:28px;height:28px;flex:0 0 28px;margin:0;accent-color:var(--accent)}
.sub{color:var(--muted)}
a.btn{text-decoration:none}
/* compact study grid + enlarged popup */
.h-small{font-size:21px}
.peekscreen{display:flex;flex-direction:column;gap:10px}
.peeknote{padding:10px 12px;gap:6px;font-size:16px}
.peeknote p{line-height:1.35}
.inote{font-size:15px}
.why{font-size:15px}
.why summary{cursor:pointer;color:var(--accent);min-height:32px;display:flex;align-items:center;font-weight:600}
.peekgrid{display:grid;grid-template-columns:repeat(var(--cols,3),minmax(0,1fr));gap:6px}
.peekscreen .btn{min-height:54px}
.tile{aspect-ratio:1;background:var(--soft);border:2px solid var(--line);border-radius:12px;padding:2px;cursor:pointer;display:grid;place-items:center;min-width:0;color:var(--ink);font:inherit}
.tile svg{width:100%;height:100%}
.tile.seen{border-color:var(--accent);box-shadow:inset 0 0 0 2px var(--accent)}
.tile:focus-visible{outline:3px solid var(--reward);outline-offset:2px}
.roomtile{font-family:var(--f-head);font-weight:600;font-size:15px;line-height:1.2;padding:4px}
#peek{position:fixed;inset:0;z-index:60;background:rgba(10,25,30,.72);display:grid;place-items:center;padding:16px}
.peek-card{background:var(--card);color:var(--ink);border-radius:22px;padding:18px;width:min(360px,100%);display:flex;flex-direction:column;gap:12px;align-items:center;text-align:center}
.peek-card .big svg{width:230px}
.peek-name{font-family:var(--f-head);font-size:34px;font-weight:700}
.peek-room{font-family:var(--f-head);font-size:24px;color:var(--muted)}
.peek-ico{display:grid;place-items:center;width:170px;height:170px;background:var(--soft);border-radius:20px;color:var(--accent)}
.peek-cue{font-size:17px;color:var(--muted)}
.peek-card .bar{width:100%}
.peek-card .bar i{width:100%}
.goal{font-family:var(--f-head);font-size:22px;font-weight:600}
.steps{margin:0;padding-inline-start:26px;display:flex;flex-direction:column;gap:8px}
.exfc{align-self:center;width:170px}
.notice{border-color:var(--reward);background:color-mix(in srgb,var(--reward) 12%,var(--card))}
.starfield{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;color:var(--reward)}
/* accessibility widget, legal dialog, high-contrast / reduced-motion / reading-spacing modes */
[hidden]{display:none!important}
.link{font:inherit;background:none;border:none;color:var(--accent);text-decoration:underline;cursor:pointer;padding:8px 4px;min-height:44px}
.link:focus-visible{outline:3px solid var(--reward);outline-offset:2px}
.legal-links{display:flex;flex-wrap:wrap;gap:4px 14px;justify-content:center;font-size:16px}
#a11y-wrap{position:fixed;z-index:30;inset-block-end:calc(14px + env(safe-area-inset-bottom,0px));inset-inline-start:max(14px,env(safe-area-inset-left,0px));width:52px;height:52px}
#a11y-btn{width:52px;height:52px;border-radius:50%;border:3px solid #fff;background:var(--accent);color:var(--accent-ink);cursor:pointer;display:grid;place-items:center;
  box-shadow:0 2px 10px rgba(0,0,0,.3);padding:0;opacity:.92}
#a11y-btn:focus-visible,#a11y-x:focus-visible{outline:3px solid var(--reward);outline-offset:3px}
#a11y-x{position:absolute;inset-block-start:-12px;inset-inline-end:-12px;width:32px;height:32px;border-radius:50%;border:2px solid #fff;background:#333;color:#fff;
  font:700 20px/1 var(--f-body);cursor:pointer;padding:0;display:grid;place-items:center}
#a11y-toast{position:fixed;z-index:50;inset-inline:16px;inset-block-end:calc(16px + env(safe-area-inset-bottom,0px));max-width:420px;margin-inline:auto;background:#222;color:#fff;
  padding:12px 16px;border-radius:14px;font-size:17px;text-align:center}
html.a11y-on body{padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))}
#a11y-panel{position:fixed;z-index:40;inset-block-end:calc(84px + env(safe-area-inset-bottom,0px));inset-inline-start:max(12px,env(safe-area-inset-left,0px));
  width:min(380px,calc(100vw - 24px));max-height:calc(100dvh - 120px);overflow:auto;background:var(--card);color:var(--ink);border:2px solid var(--accent);
  border-radius:18px;padding:16px;display:flex;flex-direction:column;gap:12px;box-shadow:0 6px 24px rgba(0,0,0,.3)}
.a11y-head,.legal-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.a11y-size{display:flex;flex-direction:column;gap:6px}
.a11y-size .row2{justify-content:space-between}
#legal{border:2px solid var(--accent);border-radius:18px;max-width:560px;width:calc(100% - 24px);max-height:86dvh;padding:0;background:var(--card);color:var(--ink)}
#legal::backdrop{background:rgba(0,0,0,.5)}
#gatepw{border:2px solid var(--accent);border-radius:18px;max-width:420px;width:calc(100% - 24px);padding:0;background:var(--card);color:var(--ink)}
#gatepw::backdrop{background:rgba(0,0,0,.5)}
.gatepw-in{padding:22px;display:flex;flex-direction:column;gap:14px}
.gatepw-in h2{font-size:22px;margin:0}
.legal-in{padding:18px;display:flex;flex-direction:column;gap:10px;font-size:18px}
.legal-in ul{margin:0;padding-inline-start:22px;display:flex;flex-direction:column;gap:6px}
.legal-in .draft{color:var(--muted,#766);font-size:15px;border-inline-start:3px solid var(--accent);padding-inline-start:8px}
.legal-head{position:sticky;top:0;background:var(--card);padding-bottom:8px}
.legal-in h3{font-size:20px;margin-top:6px}
.draft{background:var(--soft);border-radius:10px;padding:8px 12px;font-size:15px}
html.hc{--bg:#FFFFFF;--card:#FFFFFF;--ink:#000000;--muted:#1A1A1A;--line:#000000;--accent:#00383D;--accent-ink:#FFFFFF;--soft:#EDEDED;--reward:#7A4E00;--good:#0B5A33;--warn:#8A2F00}
html.hc .card,html.hc .opt,html.hc .panel,html.hc .btn,html.hc .field input{border-width:3px}
html.hc .tag,html.hc .note,html.hc .hook,html.hc .sub{color:#1A1A1A}
html.nomo *,html.nomo *::before,html.nomo *::after{transition:none!important;animation:none!important}
html.rd body{line-height:1.85;letter-spacing:.03em;word-spacing:.08em}
/* login */
.login{display:flex;flex-direction:column;gap:18px;align-items:stretch;text-align:center;padding-top:6vh}
.logo-mark{width:84px;height:84px;margin:0 auto;border-radius:24px;background:var(--accent);color:var(--accent-ink);font:700 52px/84px var(--f-head);position:relative}
.logo-mark::after{content:"";position:absolute;width:20px;height:20px;border-radius:50%;background:var(--reward);inset-block-start:10px;inset-inline-end:10px}
.sub{color:var(--muted)}
.gbtn{display:flex;flex-direction:column;align-items:center;gap:8px;min-height:48px}
/* install banner: slim, in-flow & sticky so it never covers the game, but clearly visible */
.install-bar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  background:var(--reward);color:#2a1d00;padding:6px 12px;padding-top:calc(6px + env(safe-area-inset-top,0px));
  margin-inline:calc(-1 * max(16px,env(safe-area-inset-left,0px)));font-size:15px;line-height:1.25;font-weight:600;box-shadow:0 2px 8px rgba(0,0,0,.18)}
.ib-text{flex:1 1 150px}
.ib-btn{font:inherit;font-weight:700;min-height:44px;padding:4px 16px;border-radius:12px;border:2px solid #2a1d00;background:#2a1d00;color:#fff;cursor:pointer}
.ib-x{font:inherit;font-size:14px;min-height:44px;padding:4px 8px;border:none;background:none;color:#2a1d00;text-decoration:underline;cursor:pointer}
.ib-help{flex:1 1 100%;font-weight:500}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
html.study-peek.a11y-on body{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}
.tile{position:relative}
.tnum{position:absolute;inset-block-start:2px;inset-inline-start:3px;font:700 12px/1 var(--f-body);background:var(--accent);color:var(--accent-ink);border-radius:8px;padding:2px 5px;min-width:18px;text-align:center}
.logo-img{display:block;margin:0 auto;border-radius:22px;box-shadow:0 4px 14px rgba(0,0,0,.18)}

/* lists world */
.lgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.lcat{background:var(--soft);border-radius:12px;padding:8px;display:flex;flex-direction:column;gap:6px}
.lcat b{font-family:var(--f-head);font-size:16px}
.chips{display:flex;flex-wrap:wrap;gap:4px}
.chip{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:2px 8px;font-size:15px;line-height:1.5}
/* melody world */
.pad{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
.pad5,.pad6{grid-template-columns:repeat(3,minmax(0,1fr))}
.padbtn{min-height:110px;border-radius:18px;border:3px solid transparent;background:var(--c);color:#fff;font:700 24px var(--f-head);cursor:pointer;display:grid;place-items:center;opacity:.78;transition:filter .08s,transform .08s}
.padbtn[disabled]{cursor:default}
.padbtn.on{opacity:1;filter:brightness(1.35);transform:scale(1.04);border-color:#fff;box-shadow:0 0 0 4px var(--ink)}
.padbtn:focus-visible{outline:3px solid var(--reward);outline-offset:3px}

/* focus world */
.fcv{display:block;width:100%;aspect-ratio:3/4;max-height:62dvh;background:#000;border-radius:18px;touch-action:manipulation;cursor:pointer}

/* answer mark: a check or a cross for half a second, in every world */
#mark{position:fixed;inset:0;z-index:70;display:grid;place-items:center;pointer-events:none}
#mark .mk{width:140px;height:140px;border-radius:50%;display:grid;place-items:center;color:#fff;box-shadow:0 10px 34px rgba(0,0,0,.4);animation:mkpop .16s ease-out}
#mark.ok .mk{background:var(--good)}
#mark.bad .mk{background:var(--warn)}
@keyframes mkpop{from{transform:scale(.55);opacity:0}to{transform:scale(1);opacity:1}}
html.nomo #mark .mk{animation:none}
/* the shopping list is shown larger: 1 column and big type for short lists, then smaller steps for longer ones */
.lgrid.lg-xl{grid-template-columns:1fr;gap:12px}
.lgrid.lg-xl .lcat{padding:14px;gap:10px}
.lgrid.lg-xl .lcat b{font-size:26px}
.lgrid.lg-xl .chip{font-size:28px;padding:6px 16px;border-radius:12px}
.lgrid.lg-l .lcat b{font-size:20px}
.lgrid.lg-l .chip{font-size:22px;padding:4px 12px;border-radius:10px}

/* ---- gamefit: every game screen fits one phone screen, no scrolling. Sizes follow the viewport height (dvh). ---- */
html.gamefit .install-bar{display:none}
html.gamefit #app{gap:10px;padding-top:calc(6px + env(safe-area-inset-top,0px))}
html.gamefit body{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}
html.gamefit.a11y-on body{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
html.gamefit .top{min-height:40px}
html.gamefit .top .btn.small{min-height:40px;padding:4px 14px}
html.gamefit .dots b{width:9px;height:9px}
html.gamefit .dots{gap:6px}
html.gamefit h2{font-size:21px}
html.gamefit .hook{font-size:15px;line-height:1.3}
html.gamefit .btn{min-height:clamp(48px,7dvh,58px);font-size:19px}
html.gamefit .btn.small{min-height:44px;font-size:16px}
html.gamefit .panel{padding:12px;gap:8px}
html.gamefit .q{font-size:21px;line-height:1.3}
html.gamefit .big svg{width:auto;height:calc(clamp(84px,18dvh,160px) * var(--k,1));border-radius:16px}
html.gamefit .opts{gap:8px}
html.gamefit .opts.many{grid-template-columns:repeat(2,minmax(0,1fr))}
html.gamefit .opt{min-height:calc(clamp(46px,7dvh,60px) * var(--k,1));font-size:20px;padding:4px 10px}
html.gamefit .opts.many .opt{font-size:18px}
html.gamefit .hintrow{gap:8px}
html.gamefit .fb{padding:8px 12px;font-size:16px}
html.gamefit #fb{display:flex;flex-direction:column;gap:8px}
html.gamefit .faces{gap:8px}
html.gamefit .fc{padding:6px 6px 8px;gap:0}
html.gamefit .fc svg{width:auto;height:calc(clamp(64px,12dvh,104px) * var(--k,1));max-width:100%}
html.gamefit .fc .nm{font-size:21px}
html.gamefit .fc .cue{font-size:12.5px;line-height:1.25}
html.gamefit .rooms{gap:8px}
html.gamefit .room{min-height:calc(clamp(78px,12dvh,104px) * var(--k,1));padding:8px;gap:4px}
html.gamefit .room svg{width:calc(clamp(36px,6dvh,52px) * var(--k,1));height:calc(clamp(36px,6dvh,52px) * var(--k,1))}
html.gamefit .room .rn{font-size:17px}
html.gamefit .peeknote,html.gamefit .notice{padding:8px 10px;gap:4px}
html.gamefit .inote{font-size:14px;line-height:1.3}
html.gamefit .stars svg{width:36px;height:36px}
html.gamefit .satbtn{width:54px;height:54px}
html.gamefit .starfield svg{width:28px;height:28px}
html.gamefit .pad{gap:10px}
html.gamefit .padbtn{min-height:clamp(78px,14dvh,110px)}
html.gamefit .fcv{max-height:56dvh}
html.study-peek.a11y-on body{padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}

/* long shopping lists: three columns and smaller type so 30 items still fit one screen */
.lgrid.lg-s{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.lgrid.lg-s .lcat{padding:6px;gap:3px}
.lgrid.lg-s .lcat b{font-size:14px}
.lgrid.lg-s .chip{font-size:13.5px;line-height:1.3;padding:1px 6px;border-radius:7px}
html.gamefit .h-small{font-size:19px}
html.gamefit .peeknote strong,html.gamefit .notice strong{font-weight:600}
html.gamefit .why summary{min-height:26px}

html.gamefit .notice.compact{padding:6px 8px;gap:2px}
html.gamefit .notice.compact .inote{font-size:12.5px;line-height:1.25}
html.gamefit .notice.compact .why summary{font-size:12.5px;min-height:20px}
.lgrid.lg-s .chip{font-size:13px;padding:0 5px}
.lgrid.lg-s .chips{gap:3px}

/* the whole focus game is black */
html.blackmode{--bg:#000;--card:#0e0e0e;--ink:#fff;--muted:#bdbdbd;--line:#333;--soft:#161616;--accent:#5CC0C8;--accent-ink:#06151a;--warn:#ffb454}
html.blackmode body{background:#000;color:#fff}
html.blackmode .fcv{max-height:68dvh;border:1px solid #222}
html.blackmode .notice{background:#111;border-color:#444}
.panel.warn{border:2px solid var(--warn);background:color-mix(in srgb,var(--warn) 10%,var(--card))}
.panel.warn h3{color:var(--warn)}
/* melody: sound kits and a bigger pad */
.kits{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.chipbtn{font:inherit;font-size:16px;font-weight:600;min-height:40px;padding:4px 14px;border-radius:20px;border:2px solid var(--line);background:var(--card);color:var(--ink);cursor:pointer}
.chipbtn.on{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,var(--card));color:var(--accent)}
.chipbtn:focus-visible{outline:3px solid var(--reward);outline-offset:2px}
.pad7,.pad9{grid-template-columns:repeat(3,minmax(0,1fr))}
.pad8{grid-template-columns:repeat(4,minmax(0,1fr))}
.pad7 .padbtn,.pad8 .padbtn,.pad9 .padbtn{font-size:19px}
html.gamefit .pad7 .padbtn,html.gamefit .pad8 .padbtn,html.gamefit .pad9 .padbtn{min-height:clamp(56px,10dvh,84px)}

/* faces study grid: big cards that fill the screen (sizes are set by JS from the free space) */
.fgrid{display:grid;gap:8px;width:100%;align-content:center;justify-content:stretch}
.fcard{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:var(--soft);border:2px solid var(--line);border-radius:18px;padding:4px;cursor:pointer;color:var(--ink);font:inherit;min-width:0;min-height:0}
.fcard svg{height:var(--fh,120px);width:auto;max-width:100%}
.fcard .nm{font-family:var(--f-head);font-weight:700;font-size:26px;line-height:1.15}
.fcard.seen{border-color:var(--accent);box-shadow:inset 0 0 0 2px var(--accent)}
.fcard:focus-visible{outline:3px solid var(--reward);outline-offset:2px}
/* the enlarged picture covers the whole screen */
#peek{position:fixed;inset:0;z-index:60;background:var(--bg);display:block;padding:0}
.peek-full{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;gap:8px;padding:calc(10px + env(safe-area-inset-top,0px)) 16px calc(14px + env(safe-area-inset-bottom,0px));text-align:center}
.pk-count{font:700 clamp(72px,16dvh,130px)/1 var(--f-head);color:var(--accent);min-width:1.2em}
.pk-pic{display:grid;place-items:center;background:var(--soft);border-radius:24px;padding:10px;max-width:100%}
.pk-pic svg{height:min(46dvh,380px);width:auto;max-width:86vw}
.pk-name{font:700 clamp(40px,9dvh,68px)/1.1 var(--f-head)}
.peek-full .peek-cue{font-size:clamp(17px,2.6dvh,22px)}
.peek-full .peek-room{font-family:var(--f-head);font-size:clamp(26px,4dvh,34px);color:var(--muted)}
.peek-full .peek-ico{display:grid;place-items:center;width:min(46dvh,300px);height:min(46dvh,300px);color:var(--accent)}
.peek-full .peek-ico svg{width:80%;height:80%}

/* ---- session 2: melody pad fills the free screen, sound bar, full-screen windows, different-format practice ---- */
.padbtn,html.gamefit .padbtn,.pad7 .padbtn,.pad8 .padbtn,.pad9 .padbtn,html.gamefit .pad7 .padbtn,html.gamefit .pad8 .padbtn,html.gamefit .pad9 .padbtn{min-height:0;height:100%;font-size:inherit}
.pad{font-size:28px;align-content:stretch}
html.gamefit .pad{gap:10px}
.soundbar{display:flex;flex-direction:column;gap:6px}
.kits{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.chipbtn{font-size:16px;min-height:44px;padding:2px 4px;border-radius:14px;white-space:nowrap}
.chipbtn.on{border-width:3px}
.vol{display:grid;grid-template-columns:56px 1fr 56px;gap:8px;align-items:center}
.volbtn{font:700 30px/1 var(--f-body);min-height:48px;border-radius:14px;border:2px solid var(--accent);background:var(--card);color:var(--accent);cursor:pointer;padding:0}
.volbtn:active{background:var(--accent);color:var(--accent-ink)}
.volbtn:focus-visible{outline:3px solid var(--reward);outline-offset:2px}
.volmid{display:flex;flex-direction:column;align-items:center;gap:3px}
.volbars{display:flex;gap:6px;align-items:flex-end;height:22px}
.volbars b{width:16px;background:var(--line);border-radius:3px}
.volbars b:nth-child(1){height:6px}.volbars b:nth-child(2){height:10px}.volbars b:nth-child(3){height:14px}.volbars b:nth-child(4){height:18px}.volbars b:nth-child(5){height:22px}
.volbars b.on{background:var(--accent)}
.mbtns{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.mbtns.wait{visibility:hidden}
.mfoot{min-height:56px;display:flex;flex-direction:column;justify-content:center}
.mfoot #fb{display:flex;flex-direction:column}
html.gamefit .mfoot .btn{min-height:56px}
/* different-format practice */
.btn.alt{background:var(--card);color:var(--accent);border-width:3px}
.res-foot{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.bigico svg{width:84px;height:84px;color:var(--accent)}
.opts.yn{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.opts.yn .opt,html.gamefit .opts.yn .opt{min-height:clamp(70px,14dvh,120px);font-size:34px}
.opts.faceopts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.faceopt .optface svg{height:calc(clamp(60px,11dvh,110px) * var(--k,1));width:auto}
html.gamefit .opt.faceopt{min-height:0;padding:4px}
/* every window covers the whole screen, big controls */
#legal{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;border:0;border-radius:0;background:var(--card);color:var(--ink)}
#legal[open]{display:flex;flex-direction:column}
#gatepw{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;border:0;border-radius:0;background:var(--card);color:var(--ink)}
#gatepw[open]{display:flex;flex-direction:column;justify-content:center}
.gatepw-in{max-width:420px;margin:0 auto;width:100%;padding:24px max(16px,env(safe-area-inset-right,0px)) calc(24px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px))}
.gatepw-in h2{font-size:26px}
.gatepw-in .field input{font-size:22px}
.legal-in{flex:1;min-height:0;overflow-y:auto;font-size:20px;padding:calc(12px + env(safe-area-inset-top,0px)) max(16px,calc((100vw - 640px)/2)) calc(18px + env(safe-area-inset-bottom,0px))}
.legal-head{position:sticky;top:calc(-12px - env(safe-area-inset-top,0px));z-index:2;margin-top:calc(-12px - env(safe-area-inset-top,0px));padding-top:calc(12px + env(safe-area-inset-top,0px))}
.legal-head .btn.small{min-height:56px;font-size:20px;padding:8px 22px}
#a11y-panel{inset:0;inset-block-end:0;inset-inline-start:0;width:auto;max-height:none;z-index:70;border:0;border-radius:0;box-shadow:none;overflow-y:auto;justify-content:space-evenly;gap:clamp(8px,1.6dvh,16px);
  padding:calc(12px + env(safe-area-inset-top,0px)) max(16px,calc((100vw - 440px)/2)) calc(14px + env(safe-area-inset-bottom,0px))}
#a11y-panel .btn.small{min-height:clamp(52px,8dvh,72px);font-size:20px}
#a11y-panel .sw{min-height:clamp(52px,8dvh,72px);font-size:21px}
#a11y-panel .a11y-size .btn.small{font-size:26px}
#a11y-panel h2{font-size:26px}
.lgrid.lg-m{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.lgrid.lg-m .lcat{padding:8px;gap:4px}
.lgrid.lg-m .lcat b{font-size:16px}
.lgrid.lg-m .chip{font-size:17px;padding:1px 8px;border-radius:8px}
.gone2{display:none}

/* melody retry row */
.mretry{display:grid;grid-template-columns:1.1fr 1fr .8fr;gap:6px}
.mretry .btn,html.gamefit .mretry .btn{font-size:17px;padding:4px 6px;min-height:56px}
/* the focus warning is LIGHT (dark text on a pale panel) so it reads on the black game screen */
html.blackmode .panel.warnlight{background:#FFF3D6;border:3px solid #E3A22F;color:#2a1d00}
html.blackmode .panel.warnlight h3{color:#7A3E00}
html.blackmode .panel.warnlight p,html.blackmode .panel.warnlight span{color:#2a1d00}
html.blackmode .panel.warnlight input[type=checkbox]{accent-color:#2E268C}

/* focus world: instructions fill the screen in big text; the warning is a full-screen pop-up */
.focus-howto{display:flex;flex-direction:column;gap:12px;min-height:0}
.focus-howto h2{font-size:clamp(26px,4dvh,36px);text-align:center}
.howto-text{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:space-evenly;gap:8px;font-size:28px;line-height:1.4;font-weight:600;overflow:hidden}
.howto-text p{margin:0}
.howto-eye{font-size:22px;font-weight:700;color:var(--accent);text-align:center;margin:0}
#focus-warn{position:fixed;inset:0;z-index:90;background:rgba(15,40,45,.92);display:grid;place-items:center;padding:16px}
.fw-in{background:#FFF3D6;color:#2a1d00;border:4px solid #E3A22F;border-radius:22px;padding:22px;width:min(440px,100%);display:flex;flex-direction:column;gap:18px}
.fw-in h2{color:#7A3E00;font-size:30px;text-align:center}
.fw-text{font-size:clamp(22px,3.6dvh,28px);line-height:1.45;margin:0}
.fw-check{display:flex;align-items:center;gap:12px;font-size:22px;font-weight:600}
.fw-check input{width:34px;height:34px;flex:none;accent-color:#2E268C}
html.blackmode .fcv{border:0;border-radius:0}

.eyepick{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.eyecard{font:inherit;display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 6px;border-radius:18px;border:3px solid var(--accent);background:var(--card);color:var(--ink);cursor:pointer;text-align:center}
.eyecard strong{font-size:19px;line-height:1.2}
.eyecard:focus-visible{outline:3px solid var(--reward);outline-offset:3px}
.eyereset{display:flex;flex-direction:column;gap:8px}
.handic{font-size:46px;line-height:1}

.tune{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.tunerow{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.tunerow .btn.on{background:var(--accent,#2E268C);color:#fff}

.roomtile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.roomtile .rt-ico{display:flex;line-height:0;min-height:0}
.roomtile .rt-ico svg{max-height:42%;width:auto}
.roomtile .rt-obj{font-size:14px;font-weight:500;color:var(--muted,#4B6468)}

.ftune{display:grid;grid-template-columns:repeat(2,1fr);gap:6px;margin-top:6px}
.ftune button{font:inherit;background:#0e0e0e;color:#fff;border:2px solid #5CC0C8;border-radius:14px;min-height:48px;padding:4px 6px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;cursor:pointer}
.ftune small{font-size:13px;color:#bdbdbd}.ftune strong{font-size:16px;line-height:1.15}
.btn.wa{display:flex;align-items:center;justify-content:center;gap:10px;background:#1F8A4C;border-color:#1F8A4C;color:#fff;text-decoration:none}
.fcv,#ftune,#ftune button{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
html.blackmode,html.blackmode *{-webkit-tap-highlight-color:transparent}
.eyecard.on{box-shadow:0 0 0 4px #E3A22F}

/* Home pass (from the design trial session): the recommended game is the peak, memory worlds are tiles with a progress track, press has a springy release. */
.card.hero,.card.world{transition:transform .38s cubic-bezier(.34,1.56,.64,1),border-color .2s,box-shadow .2s}
.card.hero:active,.card.world:active{transform:scale(.965);transition-duration:.08s}
.card.hero{min-height:132px;padding:22px;border-radius:24px;gap:18px;box-shadow:0 14px 26px -14px rgba(15,92,99,.65)}
.card.hero .ic{flex:0 0 88px;height:88px;border-radius:50%;background:var(--reward);color:var(--ink)}
.card.hero h3{font-size:29px}
.card.hero .tag{font-size:17px}
.worlds{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.card.world{flex-direction:column;align-items:stretch;gap:12px;padding:16px;min-height:196px;border-radius:20px}
.card.world:hover{border-color:var(--accent)}
.card.world .ic{flex:none;width:56px;height:56px}
.card.world .t{flex:0 0 auto}
.card.world h3{font-size:22px}
.card.world .lvl{margin-top:auto;display:flex;flex-direction:column;gap:8px}
.card.world .bar{height:8px}
.card.world .bar i{animation:barfill .8s cubic-bezier(.16,1,.3,1) both}
@keyframes barfill{from{width:0}}
@media (prefers-reduced-motion:reduce){.card.hero,.card.world{transition:none}.card.world .bar i{animation:none}}
/* the end-of-round score: one big smiley + a scale of five */
.gface{display:flex;justify-content:center}
.gface svg{width:clamp(56px,10dvh,140px);height:auto;animation:gpop .6s cubic-bezier(.2,1.6,.4,1)}
@keyframes gpop{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}
html.nomo .gface svg{animation:none}
@media (prefers-reduced-motion:reduce){.gface svg{animation:none}}
.gscale{display:flex;justify-content:center;gap:6px}
.gscale i{width:32px;height:32px;opacity:.35;display:grid;place-items:center}
.gscale i.on{opacity:1}
.gscale svg{width:32px;height:32px}
.gnum{font-weight:700;font-size:19px}
/* age question */
.agein{display:flex;align-items:center;justify-content:center;gap:12px}
.agein input{width:130px;height:76px;font:800 44px var(--f-head);text-align:center;border-radius:16px;border:3px solid var(--accent);background:var(--card);color:var(--ink)}
.agebtn{width:62px;height:62px;border-radius:50%;border:2px solid var(--accent);background:var(--card);color:var(--accent);font-size:34px;font-weight:700;cursor:pointer}
.agebtn:focus-visible,.agein input:focus-visible{outline:3px solid var(--reward);outline-offset:2px}

/* front page for visitors (landing). Brand language shared with the marketing page: warm paper, indigo, serif headings, outcome-only copy. */
.lp{--g:max(16px,env(safe-area-inset-left,0px));display:flex;flex-direction:column;gap:0}
.lp p{margin:0}
.lp h2{margin:0}
.lp-bar,.lp-hero,.lp-gain,.lp-sci,.lp-band,.lp-way,.lp-end{margin-inline:calc(-1 * var(--g));padding-inline:var(--g)}
.lp-bar{display:flex;align-items:center;gap:10px;min-height:64px;margin-top:-12px;border-bottom:1px solid var(--line);background:var(--bg)}
.lp-bar img{border-radius:10px}
.lp-brand{font-family:var(--f-head);font-weight:900;font-size:27px;color:var(--accent)}
.lp-hero{background:linear-gradient(160deg,#2E268C,#0E8C96);color:#fff;padding-block:36px 40px;display:flex;flex-direction:column;gap:18px}
.lp-hero h1{font-size:clamp(40px,11.5vw,56px);font-weight:900;line-height:1.08;color:#fff}
.lp-lead{font-size:22px;line-height:1.5;max-width:28ch}
.lp-proof{align-self:center;display:inline-flex;gap:10px;align-items:center;padding:10px 18px;border-radius:999px;background:rgba(255,255,255,.18);border:2px solid rgba(255,255,255,.7);font-weight:700;font-size:20px}
.lp-cta{font:inherit;font-weight:700;font-size:22px;min-height:64px;width:100%;border-radius:16px;border:0;background:var(--reward);color:#2a1d00;cursor:pointer}
.lp-cta.dark{background:var(--accent);color:#fff}
.lp-cta:focus-visible{outline:3px solid #fff;outline-offset:2px}
.lp-cta.dark:focus-visible{outline-color:var(--reward)}
.lp-gain h2,.lp-way h2,.lp-end h2{color:var(--accent)}
.lp-gain h2,.lp-sci h2,.lp-way h2,.lp-end h2{font-weight:900;line-height:1.15;font-size:clamp(30px,8vw,40px)}
.lp-gain{padding-block:44px 36px}
.lp-g{display:flex;gap:14px;align-items:center;padding-block:14px;border-top:1px solid var(--line)}
.lp-gain h2+.lp-g{margin-top:12px}
.lp-g i{flex:none;width:42px;height:42px;border-radius:50%;background:#0B7480;color:#fff;font-style:normal;font-weight:900;font-size:24px;display:grid;place-items:center}
.lp-g b{font-family:var(--f-head);font-weight:700;font-size:25px;line-height:1.25}
.lp-gain>p{margin-top:16px;color:var(--muted)}
.lp-sci{background:var(--accent);color:#fff;padding-block:40px}
.lp-sci ul{list-style:none;margin:14px 0 0;padding:0}
.lp-sci li{padding-block:13px;border-top:1px solid rgba(255,255,255,.35)}
.lp-band{padding-block:40px 44px}
.lp-band h2{font-weight:900;font-size:clamp(34px,9vw,46px);line-height:1.1;margin-top:22px}
.lp-band>p{margin-top:10px;max-width:32ch}
.lp-b1{background:#F6E2DC}.lp-b2{background:#DCE7F3}.lp-b3{background:#DDEEDF}.lp-b4{background:#F6E8C6}.lp-b5{background:#E4DEF1}
.lp-scene{display:flex;justify-content:center;align-items:center;gap:14px;min-height:150px}
.lp-person{text-align:center}
.lp-person svg{width:84px;height:84px;display:block;margin:0 auto}
.lp-tag{display:inline-block;margin-top:10px;background:#fff;border-radius:10px;padding:2px 14px;font-weight:700;font-size:20px;animation:lpHi 12s infinite}
.lp-person:nth-child(2) .lp-tag{animation-delay:4s}.lp-person:nth-child(3) .lp-tag{animation-delay:8s}
.lp-house{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;width:240px}
.lp-room{aspect-ratio:1.3;background:#fff;border:2px solid var(--ink);border-radius:12px;display:grid;place-items:center;font-size:38px;animation:lpHi 14s infinite}
.lp-room:nth-child(2){animation-delay:3.5s}.lp-room:nth-child(3){animation-delay:7s}.lp-room:nth-child(4){animation-delay:10.5s}
.lp-items{display:flex;gap:12px}
.lp-item{background:#fff;border-radius:16px;padding:14px 16px;font-size:36px;line-height:1.2;animation:lpHi 12s infinite}
.lp-item:nth-child(2){animation-delay:4s}.lp-item:nth-child(3){animation-delay:8s}
.lp-keys{display:flex;gap:12px}
.lp-key{width:66px;height:112px;border-radius:14px;opacity:.5;animation:lpKey 8s infinite}
.lp-key:nth-child(1){background:#C8504F}.lp-key:nth-child(2){background:#D9A12A;animation-delay:2s}.lp-key:nth-child(3){background:#3E9C71;animation-delay:4s}.lp-key:nth-child(4){background:#4A6FCB;animation-delay:6s}
.lp-g9{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;width:216px}
.lp-cell{aspect-ratio:1;border-radius:14px;background:#fff;position:relative}
.lp-cell::after{content:"";position:absolute;inset:20%;background:var(--accent);clip-path:polygon(50% 0,62% 36%,100% 50%,62% 64%,50% 100%,38% 64%,0 50%,38% 36%);opacity:0;transform:scale(.6);transition:opacity .15s,transform .15s}
.lp-cell.on::after{opacity:1;transform:scale(1)}
@keyframes lpHi{0%,25%{background:#FFD98A}35%,100%{background:#fff}}
@keyframes lpKey{0%,18%{opacity:1}30%,100%{opacity:.5}}
@media (prefers-reduced-motion:reduce){.lp *{animation:none!important}}
.lp-way{padding-block:44px}
.lp-way h2{margin-bottom:12px}
.lp-row{display:flex;gap:16px;align-items:flex-start;padding-block:18px;border-top:1px solid var(--line)}
.lp-row:last-child{border-bottom:1px solid var(--line)}
.lp-ic{flex:none;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;font-size:28px;background:var(--soft)}
.lp-row b{display:block;font-family:var(--f-head);font-size:24px;line-height:1.2;margin-bottom:2px}
.lp-row span:not(.lp-ic){color:var(--muted);font-size:18px}
.lp-end{background:#F6E8C6;padding-block:44px 48px;text-align:center;display:flex;flex-direction:column;gap:18px}
.lp-end>p{color:var(--muted);font-size:17px}
.lp-sign{margin-top:16px;text-align:center}
.lp-signin{margin-inline-start:auto;min-height:48px;padding:0 20px;border-radius:12px;border:2px solid var(--accent);background:transparent;color:var(--accent);font:700 19px var(--f-body);cursor:pointer}
.lp-have{margin:16px 0 0;color:#fff;font-size:19px;text-align:center}
.lp-link{background:none;border:0;padding:0 4px;min-height:44px;color:#fff;font:700 19px var(--f-body);text-decoration:underline;cursor:pointer}
.lp-sign.flash{animation:lpFlash 1.6s ease-out}
@keyframes lpFlash{0%,60%{box-shadow:0 0 0 6px var(--reward)}100%{box-shadow:0 0 0 0 rgba(227,162,47,0)}}
/* mandatory e-mail consent before Google (onboarding.js) */
.check.must{border:3px solid var(--reward);background:#FFF6DD;border-radius:16px;padding:14px;font-weight:700;font-size:19px}
.check.must.nudge{animation:mustShake .45s}
@keyframes mustShake{0%,100%{transform:none}20%{transform:translateX(-8px)}40%{transform:translateX(8px)}60%{transform:translateX(-6px)}80%{transform:translateX(6px)}}
.must-hint{font-weight:700;font-size:18px;line-height:1.5;color:var(--warn);margin:0;min-height:56px}
.must-hint.ok{color:var(--good)}
.gwrap{position:relative}
.gwrap.locked .gbtn{opacity:.3;filter:grayscale(1)}
.gblock{display:none;position:absolute;inset:0;z-index:2;cursor:not-allowed}
.gwrap.locked .gblock{display:block}
@media (prefers-reduced-motion:reduce){.check.must.nudge{animation:none}}
.lp-reg{display:flex;flex-direction:column;gap:14px;padding-top:4vh;text-align:center}
.lp-step{align-self:center;background:var(--soft);color:var(--accent);font-weight:700;font-size:15px;border-radius:999px;padding:4px 14px}

.rowbtns{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.rowbtns .btn{min-height:56px;padding:6px 8px;font-size:19px}
.rowbtns .btn:only-child{grid-column:1/-1}
html.gamefit .panel.center{gap:6px}
.gscale i,.gscale svg{width:clamp(22px,4dvh,32px);height:clamp(22px,4dvh,32px)}
.mbtns.one{grid-template-columns:1fr}
.rowbtns.n3{grid-template-columns:repeat(3,1fr)}
.rowbtns.n3 .btn{font-size:16px;padding:4px 4px;line-height:1.2}
.rowbtns.n1 .btn{grid-column:1/-1}
.resetlink{align-self:center;font-size:15px;min-height:36px;padding:2px 6px}
@media (max-height:700px){html.gamefit .panel.center{gap:4px;padding:10px}html.gamefit .panel.center h2{font-size:20px}.resetlink{min-height:30px;padding:0 6px}html.gamefit .btn.wa{min-height:46px}}
.lesson-big{font-size:22px;line-height:1.45}
.lesson-big .goal{font-size:25px}
.lesson-big .steps{gap:10px}
.lesson-big .note{font-size:19px}
.lesson-big .room .tag{font-size:17px}
.mnav .btn{min-height:48px}
.top .gname{font-family:var(--f-head);font-size:18px;color:var(--ink)}
html.blackmode .top .gname{color:#fff}

.howto-text{text-align:center;align-items:center}
.vt{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.vt .vol{grid-template-columns:44px 1fr 44px;gap:4px}
.vt .volbtn{min-height:44px;font-size:26px}
.vt .volmid strong{font-size:15px;line-height:1.1}
.pnav .btn{min-height:46px}
.lookagain{justify-content:flex-start;overflow-y:auto}
.lookagain .rooms{width:100%}
.topbtns{display:flex;gap:6px;flex:none}
.top .tag{text-align:end}

/* shopping lists: use the whole screen height (study list and answers spread out, bigger) */
html.gamefit[data-game=lists] .lgrid{flex:1;align-content:flex-start}
html.gamefit[data-game=lists] .opts{flex:1;align-content:space-evenly}
html.gamefit[data-game=lists] .opt{min-height:clamp(60px,11dvh,96px);font-size:25px}
html.gamefit[data-game=lists] .panel.center .q{font-size:26px}
html.gamefit[data-game=lists] .lgrid.lg-xl .chip{font-size:32px;padding:8px 18px}
.topbtns .btn.small{padding:4px 10px}
.top:has(.topbtns){flex-wrap:wrap;row-gap:4px}
.top:has(.topbtns) .tag{flex-basis:100%;text-align:start}
/* short shopping lists: one product per row, the rows spread down the whole screen */
html.gamefit[data-game=lists] .lgrid.lg-xl{display:flex;flex-direction:column;gap:12px}
html.gamefit[data-game=lists] .lgrid.lg-xl .lcat{flex:none;display:flex;flex-direction:column}
html.gamefit[data-game=lists] .lgrid.lg-xl .chips{display:flex;flex-direction:column;gap:8px}
html.gamefit[data-game=lists] .lgrid.lg-xl .chip{text-align:center;font-size:clamp(22px,3.4dvh,30px);line-height:1.15;padding:3px 12px}
html.gamefit[data-game=lists] .lgrid.lg-xl .lcat{padding:10px;gap:6px}

/* bug report: a small red floating button, a form, a 3-second "fixed" note */
#bug-btn{position:fixed;z-index:35;inset-block-end:calc(16px + env(safe-area-inset-bottom,0px));inset-inline-end:max(12px,env(safe-area-inset-right,0px));width:40px;height:40px;border-radius:50%;border:2px solid #fff;background:#C62828;color:#fff;display:grid;place-items:center;padding:0;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.3);opacity:.85}
#bug-btn:focus-visible{outline:3px solid var(--reward);outline-offset:3px}
#bug-modal{position:fixed;inset:0;z-index:95;background:rgba(15,40,45,.85);display:grid;place-items:center;padding:12px}
.bug-in{background:var(--card);color:var(--ink);border-radius:20px;padding:16px;width:min(440px,100%);max-height:100%;overflow:auto;display:flex;flex-direction:column;gap:10px}
.bug-l{display:flex;flex-direction:column;gap:4px;font-weight:600}
.bug-l input,.bug-l textarea{font:inherit;font-size:18px;padding:8px 10px;border-radius:12px;border:2px solid var(--line);background:var(--card);color:var(--ink)}
.bug-img{max-height:28dvh;width:auto;align-self:center;border:1px solid var(--line);border-radius:8px}
.bug-toast{position:fixed;z-index:96;inset-inline:16px;top:calc(16px + env(safe-area-inset-top,0px));margin:auto;max-width:420px;background:#1F7A4D;color:#fff;border-radius:16px;padding:14px 16px;display:flex;flex-direction:column;gap:4px;font-size:17px;box-shadow:0 6px 20px rgba(0,0,0,.3)}
.hl strong.ok{color:var(--good)}
html.blackmode #bug-btn{opacity:.5}
/* palace study screen: stretch to the full height, the "ready" button sits at the bottom */
html.gamefit[data-game=palace] .peekscreen{flex:1}
html.gamefit[data-game=palace] [data-act=recall]{margin-top:auto}
html.gamefit[data-game=palace] .rooms{flex:1;align-content:space-evenly}
.btn.eyeswap{background:#E3A22F;border-color:#E3A22F;color:#2a1d00;font-size:20px}
.note.center{text-align:center}

.tipbtn{align-self:center}
#tipbox{position:fixed;inset:0;z-index:90;background:rgba(15,40,45,.8);display:grid;place-items:center;padding:16px}
.tip-in{background:#FFF8E6;color:#2a1d00;border:3px solid #E3A22F;border-radius:20px;padding:20px;width:min(420px,100%);display:flex;flex-direction:column;gap:16px}
.tip-t{font-size:22px;line-height:1.45;margin:0;font-weight:600}

/* who said what */
.speaker{background:var(--card);border:1.5px solid var(--line);border-radius:22px;padding:12px;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
.speaker svg{height:calc(clamp(90px,22dvh,170px) * var(--k,1));width:auto}
.speaker b{font-family:var(--f-head);font-size:30px}
.vbubble{background:var(--soft);border-radius:18px;padding:10px 14px;font-size:22px;font-weight:600;margin:0}
.vq{gap:8px}
.opts.textopts .opt{font-size:19px;line-height:1.3;text-align:center}

/* inside the noise (dev) */
.opts.nwait .opt{opacity:.3;pointer-events:none}
.nkind{text-align:center;margin:0}
.nbig svg{height:calc(clamp(80px,20dvh,150px) * var(--k,1))}
.devtag{font-size:13px;font-weight:700;background:var(--warm);color:#2a1d00;border-radius:8px;padding:1px 6px;vertical-align:middle}

.npair{display:flex;justify-content:center;gap:14px}

.npair svg{height:calc(clamp(50px,11dvh,100px) * var(--k,1));width:auto}
.npair b{font-size:20px}

.nface{font:inherit;color:var(--ink);background:var(--card);display:flex;flex-direction:column;align-items:center;border:2px solid var(--line);border-radius:16px;padding:4px 10px;cursor:pointer;opacity:.6}
.nface.on{opacity:1;border-color:var(--accent)}
.nface.nbig{margin:0 auto}
.nface b{font-size:19px}
.ndiff{display:flex;gap:6px;align-items:center;justify-content:center;flex-wrap:wrap;margin-top:0}
.ndiff span{font-weight:700;color:var(--muted)}
.ndiff .btn.small{min-height:40px;padding:2px 10px;font-size:16px;width:auto}
.ndiff .btn.on{background:var(--accent);color:var(--accent-ink)}

.nbtns{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.nbtns .btn.small{width:auto;font-size:16px;min-height:40px;padding:2px 12px}

/* the test page (?lab=1) */
.labgame{background:var(--card);border:1.5px solid var(--line);border-radius:16px;margin:6px 0;padding:6px 10px}
.labgame summary{cursor:pointer;font-size:20px;padding:6px 0;list-style-position:inside}
.labgrid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;padding:6px 0}
.labbtn{font:inherit;color:var(--ink);background:var(--bg);border:1.5px solid var(--line);border-radius:10px;padding:4px 2px;display:flex;flex-direction:column;align-items:center;line-height:1.15;min-height:46px;cursor:pointer}
.labbtn b{font-size:17px;color:var(--accent)}
.labbtn span{font-size:11px;color:var(--muted)}

/* day-30 paywall -- variables only, so it follows the active palette */
.pw{--g:max(16px,env(safe-area-inset-left,0px));margin-top:-12px;margin-inline:calc(-1 * var(--g));display:flex;flex-direction:column;text-align:start}
.pw-bar{display:flex;align-items:center;gap:10px;min-height:64px;padding-inline:var(--g);border-bottom:1px solid var(--line);background:var(--bg)}
.pw-bar img{border-radius:10px}.pw-brand{font-family:var(--f-head);font-weight:900;font-size:27px;color:var(--accent)}
.pw-hero{background:#2E268C linear-gradient(160deg,#2E268C,#0E8C96);color:#fff;padding:34px var(--g) 38px}
.pw-title{font-family:var(--f-head);color:#fff;font-weight:900;font-size:clamp(32px,9vw,44px);line-height:1.15;margin:0}
.pw-hero .pw-body{margin:14px 0 0;color:#fff;font-size:22px;line-height:1.5}
.pw-act{display:flex;flex-direction:column;gap:18px;padding:26px var(--g) 32px}
.pw-payb{background:var(--reward);color:#2a1d00}
.pw-later{margin:0;color:var(--muted);font-size:17px}
.btn.wa{background:#25D366;color:#0b2a14;display:flex;align-items:center;justify-content:center;gap:10px;text-decoration:none}
.pw-later{color:var(--muted);font-size:17px}
.pw-form{background:var(--card);border:1.5px solid var(--line);border-radius:18px;padding:18px;display:flex;flex-direction:column;gap:12px}
.pw-form label{font-weight:700}
.pw-form input{font:inherit;font-size:22px;min-height:56px;padding:8px 14px;border:2px solid var(--line);border-radius:14px;background:var(--bg);color:var(--ink);letter-spacing:2px;text-transform:uppercase}
.pw-msg{margin:0;padding:10px 14px;border-radius:12px;background:var(--soft);color:var(--ink);font-size:18px}

/* ---- home (signed-in) in the landing design language; large type for 60-80 (Guy 2026-11-24) ---- */
.hm{--g:max(16px,env(safe-area-inset-left,0px));display:flex;flex-direction:column;margin-top:-12px}
.hm-bar,.hm-hi{margin-inline:calc(-1 * var(--g));padding-inline:var(--g)}
.hm-bar{display:flex;align-items:center;gap:10px;min-height:64px;border-bottom:1px solid var(--line);background:var(--bg)}
.hm-bar img{border-radius:10px}
.hm-brand{font-family:var(--f-head);font-weight:900;font-size:27px;color:var(--accent)}
.hm-btns{margin-inline-start:auto;display:flex;gap:8px}
.hm-btns .btn{width:auto;min-height:46px;padding:0 14px;font-size:18px}
.hm-hi{background:#2E268C linear-gradient(160deg,#2E268C,#0E8C96);color:#fff;padding-block:16px 52px}
.hm-hi p{margin:0;font-size:22px;color:#fff}
.hm-hi h1{margin:4px 0 0;font-family:var(--f-head);font-weight:900;font-size:clamp(30px,8.5vw,38px);line-height:1.15;color:#fff}
.hm-daily{display:flex;align-items:center;gap:14px;margin:-38px 0 0;padding:14px 16px;border:0;border-radius:20px;background:var(--reward);color:#2a1d00;text-align:start;font:inherit;cursor:pointer;box-shadow:0 8px 20px rgba(120,80,0,.25);position:relative;width:100%}
.hm-dic{flex:none;width:56px;height:56px;border-radius:50%;background:#fff;display:grid;place-items:center}
.hm-dt h3{margin:0;font-family:var(--f-head);font-weight:900;font-size:26px;line-height:1.15;color:#2a1d00}
.hm-dt span{display:block;font-size:19px;line-height:1.35;margin-top:2px}
.hm-worlds{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}
.hm-tile{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:4px;text-align:center;border:0;border-radius:20px;padding:12px 8px 14px;min-height:164px;color:var(--ink);font:inherit;cursor:pointer;transition:transform .15s}
.hm-tile:active{transform:scale(.97)}
.hm-art{height:58px;display:flex;align-items:center;justify-content:center}
.hm-art svg{height:100%;width:auto;max-width:100%}
.hm-tile h3{margin:2px 0 0;font-family:var(--f-head);font-weight:900;font-size:25px;line-height:1.15;color:var(--ink)}
.hm-lv{font-size:18px;font-weight:700;color:var(--muted);margin-top:auto}
.hm-bar2{display:block;width:100%;height:10px;border-radius:99px;background:rgba(255,255,255,.8);overflow:hidden}
.hm-bar2 i{display:block;height:100%;border-radius:99px;background:var(--accent)}
.hb-faces{background:#F6E2DC}.hb-palace{background:#DCE7F3}.hb-lists{background:#DDEEDF}.hb-melody{background:#F6E8C6}.hb-voices{background:#D6EEF0}.hb-focus{background:#E4DEF1}.hb-noise{background:#EDE7D6}
.hm-opt{margin-top:14px;padding:12px 16px;border-radius:16px;background:var(--card);border:1px solid var(--line)}
.hm-opt .note{margin:6px 0 0;font-size:17px}
.hm-tile{min-height:136px;padding:10px 6px 12px;gap:2px}
.hm-art{height:46px}
.hm-tile h3{font-size:24px}
.hm-lv{font-size:17px;line-height:1.25;text-wrap:balance}
.hm-opt .note{display:none}
.hm-opt{padding:8px 16px}
.hm-hi{padding-block:12px 48px}

#try-reg{position:fixed;inset-inline:0;bottom:0;z-index:30;padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px));background:var(--bg);border-top:1px solid var(--line);box-shadow:0 -6px 16px rgba(27,36,48,.12)}
#try-reg .btn{background:var(--reward);color:#2a1d00;min-height:58px;font-size:20px;max-width:440px;margin:0 auto;display:block;width:100%}
#app:has(~ #try-reg){padding-bottom:84px}

/* ---- questionnaire in the landing design language (Guy 2026-11-24) ---- */
.qz{--g:max(16px,env(safe-area-inset-left,0px));display:flex;flex-direction:column;margin-top:-12px}
.qz-bar,.qz-hero{margin-inline:calc(-1 * var(--g));padding-inline:var(--g)}
.qz-bar{display:flex;align-items:center;gap:10px;min-height:64px;border-bottom:1px solid var(--line);background:var(--bg)}
.qz-bar img{border-radius:10px}.qz-brand{font-family:var(--f-head);font-weight:900;font-size:27px;color:var(--accent)}
.qz-n{margin-inline-start:auto;color:var(--muted);font-size:18px}
.qz-bar .btn.small{width:auto;min-height:46px;padding:0 14px;font-size:18px}
.qz-hero{background:#2E268C linear-gradient(160deg,#2E268C,#0E8C96);color:#fff;padding-block:18px 26px}
.qz-hero h2{margin:12px 0 0;font-family:var(--f-head);font-weight:900;font-size:clamp(28px,8vw,36px);line-height:1.2;color:#fff}
.qz-hero .sub{margin:8px 0 0;color:#fff;font-size:19px}
.qz-hero .dots{justify-content:flex-start}
.qz-hero .dots b{background:rgba(255,255,255,.35)}.qz-hero .dots b.on{background:var(--reward)}
.qz-body{display:flex;flex-direction:column;gap:14px;padding-top:18px}
.qz-body .sub{margin:0;color:var(--muted);font-size:19px}
.qz .opt{border:0;color:var(--ink);font-family:var(--f-head);font-weight:700;font-size:25px;min-height:68px}
.qz .qo1{background:#F6E2DC}.qz .qo2{background:#DCE7F3}.qz .qo3{background:#DDEEDF}.qz .qo4{background:#F6E8C6}.qz .qo5{background:#E4DEF1}
.qz .opt.right{outline:4px solid var(--accent);outline-offset:-4px}
