/* ============================================================
   DRAKKHAK — the clean edition (formerly IceSkep)

   One idea per screen. Four places to go. Everything else is one
   tap further in, never on the first look.

   The paper, the ink and the terracotta are unchanged from the first
   edition; green and red still appear only as the verdict on an
   answer. What changed is how much is on screen at once, and how the
   screen moves: things rise into place, numbers count, bars fill,
   and a right answer is felt before it is read.
   ============================================================ */

/* ============================================================
   THE BANGLA FACES

   Noto Serif Bengali carries the reading text, Hind Siliguri the
   small mono-ish interface labels — the same division of labour the
   Latin faces already had, so the page reads the same in either
   language. Both are served from fonts/, because the interface is
   Bangla by default and it has to be legible with the wifi off.

   They sit FIRST in each stack so Bangla never falls through to a
   system face that has no conjuncts; the Latin faces behind them
   still pick up every digit and Roman word.
   ============================================================ */
@font-face{
  font-family:'Noto Serif Bengali';
  src:url('../fonts/noto-serif-bengali.woff2') format('woff2');
  font-weight:400 700; font-style:normal; font-display:swap;
  unicode-range:U+0951-0952,U+0964-0965,U+0980-09FE,U+200C-200D,U+20B9,U+25CC;
}
@font-face{
  font-family:'Hind Siliguri';
  src:url('../fonts/hind-siliguri-400.woff2') format('woff2');
  font-weight:400; font-style:normal; font-display:swap;
  unicode-range:U+0951-0952,U+0964-0965,U+0980-09FE,U+200C-200D,U+20B9,U+25CC;
}
@font-face{
  font-family:'Hind Siliguri';
  src:url('../fonts/hind-siliguri-500.woff2') format('woff2');
  font-weight:500; font-style:normal; font-display:swap;
  unicode-range:U+0951-0952,U+0964-0965,U+0980-09FE,U+200C-200D,U+20B9,U+25CC;
}
@font-face{
  font-family:'Hind Siliguri';
  src:url('../fonts/hind-siliguri-600.woff2') format('woff2');
  font-weight:600; font-style:normal; font-display:swap;
  unicode-range:U+0951-0952,U+0964-0965,U+0980-09FE,U+200C-200D,U+20B9,U+25CC;
}
@font-face{
  font-family:'Hind Siliguri';
  src:url('../fonts/hind-siliguri-700.woff2') format('woff2');
  font-weight:700; font-style:normal; font-display:swap;
  unicode-range:U+0951-0952,U+0964-0965,U+0980-09FE,U+200C-200D,U+20B9,U+25CC;
}

/* ---------- day: parchment ---------- */
:root{
  --page:#F5F4ED;
  --card:#FAF9F5;
  --quiet:#F0EEE6;
  --warm:#E8E6DC;
  --rule:#E0DDD2;
  --rule-2:#CFCBBE;

  --ink:#141413;
  --ink-2:#5E5D59;
  --ink-3:#87867F;

  --accent:#D97757;
  --accent-press:#C6613F;
  --accent-soft:#F6E6DE;

  --ok:#4C7A4E;
  --ok-soft:#E3EBDD;
  --ok-line:#8FAE86;

  --no:#B04A38;
  --no-soft:#F5E3DD;
  --no-line:#D3A091;

  --gold:#9A6B18;
  --star:#E2A12B;

  /* the seven subjects, muted to sit on paper */
  --s-bangla:#B5523B; --s-english:#3E6A8A; --s-ict:#2F7F86; --s-phy:#6E55A0;
  --s-chem:#3F8559;   --s-bio:#7F8E2E;     --s-hmath:#B8832A; --s-math:#9A5C8C; --s-bgs:#4F7A4A;

  /* the logo: a back card in ink, a terracotta front card, the দ্র in ink */
  --logo-back:#1B1714; --logo-card:#D98A68; --logo-ink:#1B1714;

  --scene-top:#E4EAE4; --scene-bot:#F2EDDF;
  --road-edge:#BDB191; --road-top:#E6DCC1; --road-line:#FBF7EC;

  --serif:'Noto Serif Bengali','Newsreader',Georgia,'Times New Roman',serif;
  --ui:'Hind Siliguri','Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  /* the mono stack keeps its figures monospaced but needs a Bangla face
     behind them, because the little labels are Bangla words now */
  --mono:'IBM Plex Mono',ui-monospace,'SF Mono',Menlo,'Hind Siliguri',monospace;

  --radius:8px;
  --side-w:264px;
  --ease:cubic-bezier(.2,.8,.2,1);
  --spring:cubic-bezier(.34,1.56,.64,1);
  --measure:66ch;
}

/* ---------- night: a lamp-lit desk ---------- */
html[data-theme="night"]{
  --page:#16150F;
  --card:#1D1C16;
  --quiet:#1A1913;
  --warm:#2A2820;
  --rule:#332F26;
  --rule-2:#453F33;

  --ink:#EDE9DC;
  --ink-2:#A9A395;
  --ink-3:#7C7668;

  --accent:#E08B6B;
  --accent-press:#EFA184;
  --accent-soft:#2F241D;

  --ok:#8FBE86;
  --ok-soft:#1E2A1B;
  --ok-line:#4F6B49;

  --no:#E08A76;
  --no-soft:#2E1D18;
  --no-line:#6E4136;

  --gold:#E7BE74;
  --star:#E9B654;
  --s-bangla:#E0876F; --s-english:#7FA7C6; --s-ict:#6FB9BF; --s-phy:#A690D2;
  --s-chem:#7FBF94;   --s-bio:#B7C464;     --s-hmath:#E3B561; --s-math:#C98BBB; --s-bgs:#86B77F;
  --logo-back:#F1EAD8; --logo-card:#E08B6B; --logo-ink:#16150F;
  --scene-top:#12161A; --scene-bot:#1C1A13;
  --road-edge:#3A3426; --road-top:#4A4232; --road-line:#857A60;
  color-scheme:dark;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--page); color:var(--ink);
  /* Bangla conjuncts stack, so the line needs a touch more room than the
     Latin edition used, and the little mono labels lose their tracking:
     letter-spacing on Bangla pulls conjuncts apart. */
  font-family:var(--serif); font-size:18px; line-height:1.75;
  -webkit-font-smoothing:antialiased; -webkit-text-size-adjust:100%;
  transition:background .35s ease,color .35s ease;
}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0;padding:0;font-family:var(--ui)}
a{color:var(--accent);text-decoration:none}
a:hover{color:var(--accent-press)}
::selection{background:var(--accent-soft)}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
h1,h2,h3{font-family:var(--serif);font-weight:600;line-height:1.2;margin:0;letter-spacing:-.011em}
p{margin:0}
[hidden]{display:none!important}

/* ---------- the little mono labels that hold it all together ---------- */
.kicker{font-family:var(--ui);font-size:11.5px;letter-spacing:.02em;font-weight:600;color:var(--ink-3)}
.kicker.acc{color:var(--accent)}
.label{font-family:var(--ui);font-size:11px;letter-spacing:.02em;font-weight:600;color:var(--ink-3)}
.seclabel{font-family:var(--ui);font-size:11.5px;letter-spacing:.02em;font-weight:600;color:var(--ink-3);
  padding-bottom:8px;border-bottom:1px solid var(--rule);margin:0 0 4px}
.mono{font-family:var(--mono);font-variant-numeric:tabular-nums lining-nums}
.muted{color:var(--ink-2)}
.faint{color:var(--ink-3)}
.small{font-family:var(--ui);font-size:13px;line-height:1.5;color:var(--ink-3)}
.ui{font-family:var(--ui)}
.ok{color:var(--ok)} .no{color:var(--no)} .acc{color:var(--accent)}

/* ============================================================
   THE SHELL
   ============================================================ */
.app{display:flex;min-height:100vh}

/* ---------- the sidebar ---------- */
.side{
  width:var(--side-w);flex:none;position:sticky;top:0;height:100vh;
  background:var(--quiet);border-right:1px solid var(--rule);
  padding:24px 16px 26px;display:flex;flex-direction:column;overflow-y:auto;
}
.brand{display:flex;align-items:center;gap:10px;padding-bottom:16px;margin-bottom:16px;
  border-bottom:1px solid var(--rule);text-align:left;width:100%}
.brand-mark{width:76px;height:19px;flex:none;color:var(--ink);transition:transform .5s var(--spring)}
.brand:hover .brand-mark{transform:scale(1.05)}
.brand-name{display:block;font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.05}
.brand-sub{display:block;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;
  color:var(--ink-3);margin-top:3px}

.side-label{font-family:var(--ui);font-size:11px;letter-spacing:.02em;font-weight:600;color:var(--ink-3);
  padding-bottom:6px;margin-bottom:6px;border-bottom:1px solid var(--rule)}

/* the four places, with an accent bar that slides to the one you are on */
.nav{position:relative;display:flex;flex-direction:column}
.nav .ind{position:absolute;left:-16px;top:0;width:3px;height:24px;border-radius:0 3px 3px 0;background:var(--accent);
  transition:transform .5s var(--spring),opacity .2s;opacity:0}
.nav a{display:flex;align-items:center;gap:9px;min-height:40px;font-family:var(--ui);font-size:14.5px;color:var(--ink-2);
  border-radius:5px;transition:color .2s,transform .25s var(--ease)}
.nav a:hover{color:var(--ink);transform:translateX(3px)}
.nav a .code{width:22px;flex:none;font-family:var(--mono);font-size:10px;letter-spacing:.06em;color:var(--ink-3);transition:color .2s}
.nav a .nm{flex:1}
.nav a .tk{font-family:var(--mono);font-size:10px;letter-spacing:.04em;color:var(--ink-3)}
.nav a .tk.acc{color:var(--accent)}
.nav a.on{color:var(--accent);font-weight:600}
.nav a.on .code{color:var(--accent)}
.side-foot{margin-top:auto;padding-top:16px;border-top:1px solid var(--rule);font-family:var(--ui);font-size:12.5px;
  line-height:1.6;color:var(--ink-3)}

/* ---------- the main column and its header ---------- */
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.top{
  height:52px;flex:none;position:sticky;top:0;z-index:60;
  display:flex;align-items:center;gap:10px;padding:0 24px;
  background:var(--quiet);border-bottom:1px solid var(--rule);
}
@supports (backdrop-filter:blur(8px)){
  .top{background:color-mix(in srgb,var(--quiet) 86%,transparent);backdrop-filter:blur(10px)}
}
.top .grow{flex:1}
.top .phone-only{display:none}

.clock{display:inline-flex;align-items:center;gap:7px;font-family:var(--mono);font-size:11px;letter-spacing:.06em;color:var(--ink-3)}
.clock b{color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}
.clock .live{width:6px;height:6px;border-radius:50%;background:var(--ok);animation:pulse 2.4s ease-in-out infinite}
.clock.idle .live{background:var(--ink-3);animation:none}
.clock .ringlet{width:18px;height:18px;flex:none}
.clock .ringlet circle{fill:none;stroke-width:3}
.clock .ringlet .bg{stroke:var(--warm)}
.clock .ringlet .fg{stroke:var(--accent);stroke-linecap:round;transition:stroke-dashoffset .8s var(--ease)}

.chip{display:inline-flex;align-items:center;gap:8px;height:30px;padding:0 10px;border:1px solid var(--rule);
  border-radius:4px;background:var(--card);font-family:var(--mono);font-size:11px;letter-spacing:.06em;color:var(--ink-3);
  white-space:nowrap;transition:border-color .2s,transform .25s var(--ease)}
button.chip:hover{border-color:var(--accent);transform:translateY(-1px)}
.chip b{color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}
.chip b.acc{color:var(--accent)}
.chip .mbar{display:flex;width:30px;height:3px;border-radius:2px;background:var(--warm);overflow:hidden}
.chip .mbar i{display:block;height:3px;background:var(--accent);border-radius:2px;transition:width .8s var(--ease)}
.chip .dot{position:relative;top:-7px;margin-left:-4px;min-width:15px;height:15px;border-radius:8px;background:var(--accent);
  color:#FAF9F5;font-size:9px;line-height:15px;text-align:center;padding:0 3px;animation:bob 2.2s ease-in-out infinite}
.chip .cd{padding-left:8px;border-left:1px solid var(--rule-2);color:var(--ink-3)}
.chip .cd.behind{color:var(--no)}

/* sound / timer / night: small switches that say what they are */
.tog{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 10px;border:1px solid var(--rule);
  border-radius:4px;background:var(--card);color:var(--ink-2);font-family:var(--mono);font-size:11px;letter-spacing:.08em;
  text-transform:uppercase;transition:all .25s var(--ease)}
.tog:hover{transform:translateY(-1px);border-color:var(--rule-2)}
.tog .d{width:6px;height:6px;border-radius:50%;background:var(--ink-3);transition:background .25s,transform .35s var(--spring)}
.tog.on{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.tog.on .d{background:var(--accent);transform:scale(1.25)}

/* ---------- the view ---------- */
.view{width:100%;max-width:1008px;margin:0 auto;padding:48px 48px 120px;flex:1}
.view.narrow{max-width:760px}

/* ---------- the phone tab bar ---------- */
.tabbar{display:none}

/* ---------- focus mode: a question, and nothing else ---------- */
body.focus .side, body.focus .tabbar{display:none!important}
body.focus .view{max-width:780px;padding:0 24px 140px}
body.focus .view.rc{max-width:1240px}

@media (max-width:900px){
  .side{display:none}
  .top{height:auto;flex-wrap:wrap;padding:10px 16px 8px;gap:8px 10px}
  .top .phone-only{display:flex}
  .top .desk-only{display:none}
  .top .prow{width:100%;display:flex;align-items:center;gap:10px}
  .view{padding:28px 16px 110px}
  .tabbar{
    display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:70;
    background:var(--quiet);border-top:1px solid var(--rule);padding:6px 0 calc(6px + env(safe-area-inset-bottom));
  }
  @supports (backdrop-filter:blur(8px)){
    .tabbar{background:color-mix(in srgb,var(--quiet) 88%,transparent);backdrop-filter:blur(12px)}
  }
  .tabbar a{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 0;
    font-family:var(--ui);font-size:11.5px;color:var(--ink-3);transition:color .2s}
  .tabbar a .code{font-family:var(--mono);font-size:9.5px;letter-spacing:.06em}
  .tabbar a.on{color:var(--accent);font-weight:600}
  .tabbar .ind{position:absolute;top:-1px;left:0;height:2px;width:20%;background:var(--accent);
    transition:transform .5s var(--spring)}
  .tabbar .ind::after{content:'';display:block;margin:0 auto;width:28px;height:2px;background:var(--accent)}
  .tabbar .ind{background:transparent}
  .tabbar .tk{position:absolute;top:2px;left:calc(50% + 10px);min-width:14px;height:14px;border-radius:7px;
    background:var(--accent);color:#FAF9F5;font-family:var(--mono);font-size:8.5px;line-height:14px;text-align:center;padding:0 3px}
}
@media (max-width:420px){
  .chip .lbl-long{display:none}
}

/* ============================================================
   BUILDING BLOCKS
   ============================================================ */

/* ---------- buttons: one filled, one outlined, and that is all ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  height:46px;padding:0 22px;border-radius:5px;border:1px solid var(--accent);
  background:var(--accent);color:#FAF9F5;font-family:var(--ui);font-size:15px;font-weight:600;
  transition:transform .2s var(--ease),background .2s,box-shadow .25s,border-color .2s;
  position:relative;overflow:hidden;white-space:nowrap;
}
html[data-theme="night"] .btn:not(.ghost){color:#16150F}
.btn:hover{background:var(--accent-press);border-color:var(--accent-press);transform:translateY(-1px);
  box-shadow:0 6px 18px -8px color-mix(in srgb,var(--accent) 70%,transparent)}
.btn:active{transform:translateY(0) scale(.98)}
.btn.ghost{background:transparent;border-color:var(--rule-2);color:var(--ink)}
.btn.ghost:hover{background:var(--card);border-color:var(--ink-3);box-shadow:none}
.btn.sm{height:36px;padding:0 14px;font-size:13.5px}
.btn.xs{height:30px;padding:0 11px;font-size:12.5px}
.btn.wide{width:100%}
.btn[disabled]{opacity:.45;pointer-events:none}
.btn kbd{font-family:var(--mono);font-size:10px;font-weight:400;opacity:.75;border:1px solid currentColor;
  border-radius:3px;padding:0 4px;line-height:15px}
.btns{display:flex;gap:12px;flex-wrap:wrap}
.btns.two>.btn{flex:1 1 0}
.link{font-family:var(--ui);font-size:14px;font-weight:600;color:var(--accent);display:inline-flex;align-items:center;gap:4px}
.link:hover{gap:7px}
.link.quiet{color:var(--ink-3);font-weight:500}
.link.quiet:hover{color:var(--ink)}
.link{transition:gap .25s var(--ease),color .2s}

/* ---------- cards and boxes ---------- */
.card{border:1px solid var(--rule);border-radius:var(--radius);background:var(--card);padding:24px}
.card.pad-s{padding:16px}
.card.accent{border-color:var(--accent);background:var(--accent-soft)}
.card.hover{transition:transform .3s var(--ease),border-color .2s,box-shadow .3s}
.card.hover:hover{transform:translateY(-2px);border-color:var(--rule-2);box-shadow:0 10px 26px -18px rgba(20,20,19,.35)}

.stat{border:1px solid var(--rule);border-radius:var(--radius);background:var(--card);padding:16px}
.stat .v{font-family:var(--mono);font-size:25px;line-height:1.15;margin-top:6px;font-variant-numeric:tabular-nums lining-nums}
.stat .v small{font-size:14px;color:var(--ink-3)}
.stat .s{font-family:var(--ui);font-size:12.5px;line-height:1.4;color:var(--ink-3);margin-top:3px}
.stat.acc{border-color:var(--accent);background:var(--accent-soft)}
.stat.acc .label{color:var(--accent)}
.stat .t{font-family:var(--serif);font-size:16.5px;line-height:1.55;margin-top:6px}

.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.grid4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.stack{display:flex;flex-direction:column;gap:32px}
.stack.s{gap:16px}
.row{display:flex;align-items:center;gap:12px}
.spread{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.grow{flex:1;min-width:0}

/* ---------- page heads ---------- */
.phead{display:flex;flex-direction:column;gap:10px}
.phead h1{font-size:34px}
.phead .lede{font-size:18px;line-height:1.6;color:var(--ink-2);max-width:62ch}
.back{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:11px;letter-spacing:.08em;
  text-transform:uppercase;color:var(--ink-3);margin-bottom:6px;transition:color .2s,gap .25s var(--ease)}
.back:hover{color:var(--accent);gap:9px}

/* ---------- lists of places to go: the "more" behind every tab ---------- */
.links{display:flex;flex-direction:column;border-top:1px solid var(--rule)}
.links>a,.links>button{display:flex;align-items:center;gap:14px;width:100%;padding:15px 6px;border-bottom:1px solid var(--rule);
  text-align:left;color:var(--ink);transition:padding .3s var(--ease),background .2s}
.links>a:hover,.links>button:hover{padding-left:12px;background:color-mix(in srgb,var(--card) 60%,transparent)}
.links .lt{display:block;font-family:var(--ui);font-size:15px;font-weight:600}
.links .ls{display:block;font-family:var(--ui);font-size:13px;color:var(--ink-3);margin-top:2px}
.links .lv{font-family:var(--mono);font-size:11px;letter-spacing:.06em;color:var(--ink-3);white-space:nowrap}
.links .lv.acc{color:var(--accent)}
.links .chev{color:var(--ink-3);font-family:var(--ui);font-size:18px;transition:transform .3s var(--ease),color .2s}
.links>a:hover .chev,.links>button:hover .chev{transform:translateX(4px);color:var(--accent)}
.links .locked{opacity:.55}

/* ---------- bars that fill themselves ---------- */
.bar{height:4px;border-radius:2px;background:var(--warm);overflow:hidden}
.bar>i{display:block;height:100%;border-radius:2px;background:var(--accent);transition:width .6s var(--ease)}
.view.enter .bar>i,.res .bar>i{animation:growW 1s var(--ease) both}
.bar>i.ok{background:var(--ok)}
.bar>i.no{background:var(--no)}
.bar>i.ink{background:var(--ink-2)}
.bar.thick{height:8px;border-radius:4px}
.bar.thin{height:3px}

/* ---------- empty states ---------- */
.empty{font-family:var(--ui);font-size:14px;color:var(--ink-3);padding:20px 0;text-align:center}

/* ============================================================
   TODAY
   ============================================================ */
.hero{display:flex;justify-content:space-between;align-items:flex-start;gap:48px;padding-bottom:32px;border-bottom:1px solid var(--rule)}
.hero .left{display:flex;flex-direction:column;gap:18px;min-width:0}
.bigrow{display:flex;align-items:flex-end;gap:20px;flex-wrap:wrap}
.bignum{font-size:150px;font-weight:600;line-height:.8;letter-spacing:-.035em;font-variant-numeric:lining-nums tabular-nums}
.bigunit{font-size:30px;font-weight:600;line-height:1.1;letter-spacing:-.011em}
.bigsub{font-size:18px;line-height:1.5;color:var(--ink-2)}
.bigtext{display:flex;flex-direction:column;gap:6px;padding-bottom:2px}

/* one tick for every day of content left; days cut this week shrink and turn terracotta */
.ticks{display:flex;align-items:flex-end;gap:6px;height:30px;margin-top:6px;flex-wrap:nowrap;overflow:hidden}
.ticks i{display:block;flex:none;width:6px;height:30px;border-radius:2px;background:var(--ink-2);
  transform-origin:bottom}
.view.enter .ticks i{animation:tickUp .6s var(--spring) both;animation-delay:calc(var(--i,0)*14ms + 250ms)}
.ticks i.cut{height:12px;background:var(--accent)}
.ticks i.done{height:6px;background:var(--rule-2)}
.metas{display:flex;gap:22px;flex-wrap:wrap;font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3)}
.metas .acc{color:var(--accent);font-weight:600}
.hero aside{width:250px;flex:none;display:flex;flex-direction:column;gap:12px}
.hero aside .stat .v{font-size:25px}
.weekdots{display:flex;gap:5px;margin-top:9px}
.weekdots i{width:14px;height:14px;border-radius:3px;background:var(--warm);border:1px solid var(--rule)}
.view.enter .weekdots i{animation:popIn .5s var(--spring) both;animation-delay:calc(var(--i,0)*50ms + 300ms)}
.weekdots i.hit{background:var(--accent);border-color:var(--accent)}
.weekdots i.freeze{background:var(--accent-soft);border-color:var(--accent)}
.weekdots i.today{outline:1px solid var(--ink-3);outline-offset:1px}

/* the one thing to do next */
.next{display:flex;flex-direction:column;gap:12px}
.next h2{font-size:34px;line-height:1.25}
.next .meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-family:var(--ui);font-size:14px;color:var(--ink-2)}
.next .why{font-size:18px;line-height:1.6}
.next .btns{padding-top:6px}

.stars{display:inline-flex;gap:2px;font-size:15px;letter-spacing:1px;color:var(--rule-2);line-height:1}
.stars i{font-style:normal}
.stars i.on{color:var(--star);display:inline-block}
.view.enter .stars i.on{animation:starPop .6s var(--spring) both;animation-delay:calc(var(--i,0)*140ms + 350ms)}
.stars.big{font-size:30px;gap:6px}

/* one gentle nudge at a time */
.nudge{display:flex;align-items:center;gap:16px;padding:14px 16px 14px 18px;border:1px solid var(--rule);border-left:3px solid var(--accent);
  border-radius:var(--radius);background:var(--card)}
.nudge .nb{flex:1;min-width:0}
.nudge .nt{font-size:16.5px;line-height:1.5}
.nudge .nx{color:var(--ink-3);font-size:20px;line-height:1;padding:4px 6px;border-radius:4px;transition:color .2s,transform .3s var(--spring)}
.nudge .nx:hover{color:var(--ink);transform:rotate(90deg)}
.nudge.gold{border-left-color:var(--gold)}
.nudge.ok{border-left-color:var(--ok)}

/* ============================================================
   PRACTICE
   ============================================================ */
.ways{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.way{display:flex;flex-direction:column;gap:6px;text-align:left;padding:14px 16px;border:1px solid var(--rule);border-radius:var(--radius);
  background:var(--card);min-height:112px;transition:transform .3s var(--ease),border-color .2s,box-shadow .3s}
.way:hover{transform:translateY(-3px);border-color:var(--accent);box-shadow:0 12px 26px -18px rgba(20,20,19,.4)}
.way .wt{font-family:var(--serif);font-size:18px;font-weight:600;line-height:1.2}
.way .ws{font-family:var(--ui);font-size:13px;line-height:1.45;color:var(--ink-3)}
.way.locked{opacity:.6}
.way.locked:hover{border-color:var(--rule-2)}

.srow{display:grid;grid-template-columns:28px minmax(0,1.3fr) minmax(0,1fr) minmax(0,2fr) 40px 70px;align-items:center;gap:14px;
  padding:14px 4px;border-bottom:1px solid var(--rule)}
.srow .code{font-family:var(--mono);font-size:10px;color:var(--ink-3)}
.srow .nm{font-family:var(--serif);font-size:18px;font-weight:600;text-align:left;color:var(--ink);transition:color .2s}
.srow .nm:hover{color:var(--accent)}
.srow .sub{font-family:var(--ui);font-size:13px;color:var(--ink-3)}
.srow .sc{font-family:var(--mono);font-size:14px;font-weight:600;text-align:right}
.srow .go{text-align:right}

/* ============================================================
   PROGRESS
   ============================================================ */
.pgrid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:16px;align-items:start}
.pred .pn{display:flex;align-items:baseline;gap:8px;margin-top:6px}
.pred .pn b{font-size:52px;font-weight:600;line-height:1;letter-spacing:-.02em;font-variant-numeric:lining-nums}
.pred .pn span{font-size:18px;color:var(--ink-2)}
.pred .t{font-size:15.5px;line-height:1.55;margin:10px 0 12px;color:var(--ink-2)}
.pred .charge{display:flex;justify-content:space-between;gap:10px;font-family:var(--mono);font-size:11px;color:var(--ink-3);
  padding:5px 0;border-top:1px solid var(--rule)}
.pred .charge b{color:var(--no);font-weight:600}

/* ---------- charts ---------- */
.chart{width:100%;height:auto;display:block;overflow:visible}
.chart text{font-family:var(--mono);font-size:10px;fill:var(--ink-3);letter-spacing:.04em}
.chart .grid{stroke:var(--rule);stroke-width:1}
.chart .axis{stroke:var(--rule-2);stroke-width:1}
.view.enter .chart .draw{stroke-dasharray:1;stroke-dashoffset:1;animation:draw 1.4s var(--ease) .25s forwards}
.view.enter .chart .area{opacity:0;animation:fadeIn .9s ease .9s forwards}
.chart .dot{transform-box:fill-box;transform-origin:center}
.view.enter .chart .dot{animation:popIn .5s var(--spring) both}
.chart rect.b{transform-box:fill-box;transform-origin:bottom}
.view.enter .chart rect.b{animation:tickUp .7s var(--ease) both;animation-delay:calc(var(--i,0)*12ms)}

/* ============================================================
   SETTINGS
   ============================================================ */
.setlist{border:1px solid var(--rule);border-radius:var(--radius);background:var(--card);overflow:hidden}
.setrow{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px;border-bottom:1px solid var(--rule)}
.setrow:last-child{border-bottom:0}
.setrow .st{font-family:var(--ui);font-size:14.5px;font-weight:600}
.setrow .ss{font-family:var(--ui);font-size:13px;color:var(--ink-3);margin-top:2px;line-height:1.45}
.setrow .ctl{flex:none;display:flex;align-items:center;gap:8px}
.onoff{display:inline-flex;align-items:center;gap:6px;height:30px;min-width:62px;justify-content:center;padding:0 10px;border-radius:4px;
  border:1px solid var(--rule-2);background:var(--card);font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink-3);transition:all .3s var(--ease)}
.onoff::before{content:'';width:6px;height:6px;border-radius:50%;background:var(--ink-3);transition:background .3s,transform .4s var(--spring)}
.onoff.on{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.onoff.on::before{background:var(--accent);transform:scale(1.3)}
.stepper{display:inline-flex;align-items:center;gap:10px}
.stepper button{width:30px;height:30px;border:1px solid var(--rule-2);border-radius:4px;font-size:16px;color:var(--ink-2);
  transition:all .2s var(--ease)}
.stepper button:hover{border-color:var(--accent);color:var(--accent)}
.stepper button:active{transform:scale(.92)}
.stepper b{font-family:var(--mono);font-size:14px;min-width:64px;text-align:center;font-variant-numeric:tabular-nums}
.seg2{display:inline-flex;border:1px solid var(--rule-2);border-radius:5px;overflow:hidden;flex-wrap:wrap}
.seg2 button{padding:7px 12px;font-family:var(--ui);font-size:13px;color:var(--ink-2);border-right:1px solid var(--rule);transition:background .2s,color .2s}
.seg2 button:last-child{border-right:0}
.seg2 button.on{background:var(--accent-soft);color:var(--accent);font-weight:600}
input.field,select.field{height:32px;border:1px solid var(--rule-2);border-radius:4px;background:var(--card);padding:0 9px;
  font-family:var(--mono);font-size:12.5px;color:var(--ink)}
input.field:focus,select.field:focus,textarea.field:focus{outline:none;border-color:var(--accent)}
input.field.num{width:78px;text-align:right}
textarea.field{width:100%;border:1px solid var(--rule-2);border-radius:5px;background:var(--card);padding:9px 11px;
  font-family:var(--ui);font-size:14px;resize:vertical}

/* ---------- the "more" drawer ---------- */
details.more{border-top:1px solid var(--rule)}
details.more>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:10px;padding:16px 4px;
  font-family:var(--ui);font-size:14.5px;font-weight:600;color:var(--ink-2);transition:color .2s}
details.more>summary::-webkit-details-marker{display:none}
details.more>summary::after{content:'+';margin-left:auto;font-family:var(--mono);font-size:18px;color:var(--ink-3);
  transition:transform .35s var(--spring)}
details.more[open]>summary::after{transform:rotate(45deg)}
details.more>summary:hover{color:var(--accent)}
details.more>.inner{padding:4px 0 20px;animation:rise .45s var(--ease) both}
.subhead{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3);margin:22px 0 8px}
.subhead:first-child{margin-top:4px}

/* ============================================================
   THE QUESTION LOOP — focus mode
   ============================================================ */
.fbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:14px;height:56px;margin:0 -24px 22px;padding:0 24px;
  background:var(--page);border-bottom:1px solid var(--rule)}
@supports (backdrop-filter:blur(8px)){ .fbar{background:color-mix(in srgb,var(--page) 88%,transparent);backdrop-filter:blur(10px)} }
.fbar .x{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border-radius:5px;color:var(--ink-2);
  font-size:20px;transition:background .2s,transform .35s var(--spring)}
.fbar .x:hover{background:var(--quiet);transform:rotate(90deg)}
.fbar .cnt{font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);white-space:nowrap}
.fbar .cnt b{color:var(--ink);font-weight:600}
.segs{display:flex;gap:3px;flex:1;min-width:0;max-width:340px}
.segs i{flex:1;height:3px;border-radius:2px;background:var(--warm);transition:background .4s}
.segs i.ok{background:var(--ok)}
.segs i.no{background:var(--no)}
.segs i.new{transform-origin:left;animation:segIn .5s var(--spring) both}
.segs i.now{background:var(--accent)}
.fbar .grow{flex:1}
.delta{display:inline-flex;align-items:center;height:24px;padding:0 8px;border:1px solid var(--ok-line);border-radius:4px;
  font-family:var(--mono);font-size:10.5px;letter-spacing:.06em;color:var(--ok);background:var(--ok-soft);white-space:nowrap}
.delta.fx-pop{animation:deltaPop .7s var(--spring)}
.work{font-family:var(--mono);font-size:11px;letter-spacing:.04em;color:var(--ink);font-weight:600;white-space:nowrap}
.work small{color:var(--ink-3);font-weight:400}
.fbar .tog{height:28px}

/* ---------- the brief: what this set is, before it starts ---------- */
.brief{max-width:560px;margin:9vh auto 0;display:flex;flex-direction:column;gap:18px}
.brief h1{font-size:34px}
.brief .rules{font-size:17px;line-height:1.6;color:var(--ink-2)}
.brief .grid3 .v{font-size:22px}

/* ---------- the question ---------- */
.qmeta{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.qmeta .l{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0}
.qtopic{font-family:var(--mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3)}
.tier{font-family:var(--mono);font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3)}
.tier.t-exam{color:var(--ok)} .tier.t-hard{color:var(--accent)} .tier.t-beast{color:var(--no);font-weight:600}
.tag{font-family:var(--mono);font-size:9.5px;letter-spacing:.1em;text-transform:uppercase;padding:2px 6px;border-radius:3px;
  border:1px solid var(--rule-2);color:var(--ink-3)}
.tag.gold{border-color:var(--gold);color:var(--gold);animation:shimmer 2.4s ease-in-out infinite}
.tag.combo{border-color:var(--accent);color:var(--accent);font-weight:600}
.tag.combo.fx-pop{animation:comboPop .5s var(--spring)}
.qtime{font-family:var(--mono);font-size:11px;letter-spacing:.06em;color:var(--ink-3);white-space:nowrap}
.qtime b{font-size:15px;color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums;margin-left:4px}
.qtime.warn b{color:var(--accent)}
.qtime.over b{color:var(--no);animation:blink 1s steps(2) infinite}
.pace{height:2px;background:var(--warm);border-radius:1px;overflow:hidden;margin-bottom:18px}
.pace>i{display:block;height:100%;background:var(--ok-line);transition:width .95s linear,background .3s}
.pace>i.warn{background:var(--accent)} .pace>i.over{background:var(--no)}
.alarm{display:flex;align-items:center;gap:12px;padding:10px 14px;margin:-6px 0 16px;border:1px solid var(--no-line);border-radius:6px;
  background:var(--no-soft);font-family:var(--ui);font-size:13.5px;color:var(--no);animation:rise .35s var(--ease) both}
.alarm .al{flex:1}
.alarm .d{width:8px;height:8px;border-radius:50%;background:var(--no);animation:pulse 1s ease-in-out infinite}

.qcard{position:relative;border:1px solid var(--rule);border-radius:var(--radius);background:var(--card);padding:22px 22px 18px}
.qcard.enter{animation:qIn .5s var(--ease) both}
.qcard.settled .opt{animation:none}
.qcard.settled .tick path{animation:none;stroke-dashoffset:0}
.settled>.vrow,.settled>.xpline,.actions.settled .btn{animation:none}
.qstem{font-family:var(--serif);font-size:20px;line-height:1.6;margin:0 0 18px}
.qstem b{font-weight:600}
/* a Boolean complement: the bar over x in x̄ */
.ov{text-decoration:overline;text-decoration-thickness:1px}
.qstem .blank{border-bottom:1.5px solid var(--accent);padding:0 22px 1px;color:var(--accent);font-family:var(--mono);font-size:11px}
.qstem u.span{text-decoration:none;border-bottom:1px solid var(--ink-3);padding-bottom:1px}
table.qtbl{border-collapse:collapse;font-family:var(--mono);font-size:13px;margin:12px 0;width:auto;min-width:60%}
.qtbl th,.qtbl td{border:1px solid var(--rule);padding:6px 12px;text-align:right}
.qtbl th{background:var(--quiet);color:var(--ink-2);font-weight:600;text-align:center;font-size:10.5px;letter-spacing:.06em;text-transform:uppercase}
.qtbl td:first-child,.qtbl th:first-child{text-align:left}

/* options */
.opt{position:relative;display:flex;gap:14px;align-items:flex-start;width:100%;text-align:left;
  border:1px solid var(--rule);border-radius:6px;background:var(--card);padding:12px 16px;margin-bottom:9px;
  font-family:var(--serif);font-size:17.5px;line-height:1.5;color:var(--ink);
  transition:border-color .18s,background .18s,transform .25s var(--ease),opacity .3s;
  animation:optIn .45s var(--ease) both;animation-delay:calc(var(--i,0)*45ms + 80ms)}
.opt:hover:not([disabled]){border-color:var(--ink-3);transform:translateX(3px)}
.opt:active:not([disabled]){transform:scale(.99)}
.opt .key{font-family:var(--mono);font-size:10.5px;color:var(--ink-3);padding-top:5px;width:12px;flex:none}
.opt .txt{flex:1;min-width:0}
.opt .key{font-family:var(--serif);font-size:16px;font-weight:600}
.opt.picked{border-color:var(--accent);background:var(--accent-soft)}
.opt.picked .key{color:var(--accent)}
.opt.picked .box{background:var(--accent);border-color:var(--accent)}
.opt.right{border-color:var(--ok-line);background:var(--ok-soft);padding-bottom:26px;animation:optRight .55s var(--spring) both}
.opt.right .key{color:var(--ok)}
.opt.right .box{background:var(--ok);border-color:var(--ok)}
.opt.wrong{border-color:var(--no-line);background:var(--no-soft);padding-bottom:26px;animation:shakeX .45s cubic-bezier(.36,.07,.19,.97) both}
.opt.wrong .key{color:var(--no)}
.opt.wrong .txt{text-decoration:line-through;text-decoration-color:var(--no-line);color:var(--ink-2)}
.opt.faded{opacity:.45;animation:none}
.opt[disabled]{cursor:default}
.opt-mark{position:absolute;right:12px;bottom:7px;font-family:var(--mono);font-size:9.5px;letter-spacing:.1em;text-transform:uppercase}
.opt.right .opt-mark{color:var(--ok)} .opt.wrong .opt-mark{color:var(--no)}
.opt .tick{position:absolute;right:14px;top:12px;width:18px;height:18px}
.opt .tick path{fill:none;stroke:var(--ok);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;
  stroke-dasharray:24;stroke-dashoffset:24;animation:drawTick .45s var(--ease) .15s forwards}

/* quantitative comparison, data sufficiency, text completion, numeric entry */
.qcpre{border-left:2px solid var(--rule);padding:2px 0 2px 14px;margin:0 0 16px;font-size:17px;color:var(--ink-2)}
/* multiple-completion: the three statements, then the fixed question.
   They are numbered i, ii, iii exactly as the board prints them, and the
   four combinations below never move, so the eye can learn the shape. */
.stlist{margin:0 0 14px;padding:0;list-style:none;counter-reset:none}
.stlist li{display:flex;gap:12px;padding:9px 14px;border:1px solid var(--rule);border-radius:6px;
  background:var(--quiet);margin-bottom:7px;font-size:17px;line-height:1.7}
.stlist li b{font-family:var(--mono);font-size:12px;color:var(--accent);flex:none;padding-top:5px;min-width:22px}
.stlist.mini li{font-size:15px;padding:6px 10px;margin-bottom:5px}
.stask{font-size:17px;font-weight:600;margin:0 0 14px;color:var(--ink)}
/* once it is marked, each statement says whether it held: the type is about
   the three statements, and the option letter on its own does not say which */
.stlist li .stm{margin-left:auto;flex:none;font-family:var(--ui);font-size:11.5px;font-weight:600;
  font-style:normal;padding-top:5px;white-space:nowrap}
.stlist.marked li.yes{border-color:var(--ok-line);background:var(--ok-soft)}
.stlist.marked li.yes .stm,.stlist.marked li.yes b{color:var(--ok)}
.stlist.marked li.no{opacity:.75}
.stlist.marked li.no .stm{color:var(--no)}

/* উদ্দীপক: the short scenario two questions share. It keeps the passage
   panel from the first edition — beside the question on a wide screen,
   above it on a phone — because that is exactly the job. */
.rcsplit{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}
.rcpassage{border:1px solid var(--rule);border-radius:var(--radius);background:var(--quiet);padding:22px;font-size:16.5px;line-height:1.75;
  position:sticky;top:76px;max-height:calc(100vh - 100px);overflow-y:auto}
.rcpassage p{margin:0 0 14px}
.rcpassage .plbl{display:block;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3);
  margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--rule)}

/* help: the confidence call and the lifelines, tucked under the question */
.qhelp{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:6px}
.qhelp .life{font-family:var(--mono);font-size:10.5px;letter-spacing:.06em;text-transform:uppercase;padding:6px 10px;border:1px solid var(--rule);
  border-radius:4px;color:var(--ink-3);transition:all .2s var(--ease)}
.qhelp .life:hover:not([disabled]){border-color:var(--accent);color:var(--accent);transform:translateY(-1px)}
.qhelp .life[disabled]{opacity:.4;cursor:not-allowed}
.qhelp .life i{font-style:normal;margin-left:3px;opacity:.8}
.qhelp .grow{flex:1}
.qhelp .hint{font-family:var(--mono);font-size:10px;letter-spacing:.05em;color:var(--ink-3)}
.hintbox{margin-top:10px;padding:12px 14px;border-left:2px solid var(--accent);background:var(--accent-soft);border-radius:0 5px 5px 0;
  font-size:15.5px;line-height:1.55;animation:rise .4s var(--ease) both}
.hintbox .k{display:block;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--accent);margin-bottom:4px}
.bet{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding-top:12px;margin-top:6px;border-top:1px dashed var(--rule);
  font-family:var(--ui);font-size:13.5px;color:var(--ink-2)}

/* after answering */
.vrow{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:14px 2px 0;font-family:var(--mono);font-size:11px;
  letter-spacing:.08em;text-transform:uppercase;animation:rise .35s var(--ease) both}
.vrow .v.good{color:var(--ok);font-weight:600}
.vrow .v.bad{color:var(--no);font-weight:600}
.vrow .v span{text-transform:none;letter-spacing:0;font-family:var(--ui);font-size:14px;font-weight:500;color:var(--ink-2);margin-left:6px}
.vrow .t{color:var(--ink-3)}
.xpline{margin:8px 2px 0;font-family:var(--ui);font-size:12.5px;color:var(--ink-3);animation:rise .4s var(--ease) .1s both}
.xpline b{font-family:var(--mono);color:var(--ok);font-weight:600;margin-right:6px}
.xpline b.neg{color:var(--no)}
.xpline .coins{font-family:var(--mono);color:var(--accent);margin-left:6px}
.redeem{margin:8px 2px 0;font-family:var(--ui);font-size:13px;font-style:italic;color:var(--ink-3)}

.actions{position:sticky;bottom:0;z-index:30;display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:16px 0 18px;margin-top:16px;
  background:linear-gradient(to bottom,transparent,var(--page) 26%)}
.actions.one{grid-template-columns:1fr}
.actions .btn{animation:rise .35s var(--ease) both}
.actions .btn+.btn{animation-delay:.06s}

.whybox{margin-top:14px;border:1px solid var(--rule);border-radius:var(--radius);background:var(--card);padding:18px 20px;font-size:16.5px;line-height:1.65;
  animation:rise .4s var(--ease) both}
.whybox .wa{font-weight:600;padding-bottom:10px;margin-bottom:10px;border-bottom:1px solid var(--rule)}
.whybox .wa .label{display:block;margin-bottom:4px}
.whybox p{margin:0 0 10px}
.fastbox{border:1px solid var(--accent);border-radius:6px;background:var(--accent-soft);padding:12px 14px;margin-top:12px}
.fastbox .k{display:block;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--accent);margin-bottom:6px}
.fastbox a{display:inline-block;margin-top:8px;font-family:var(--mono);font-size:10.5px;letter-spacing:.08em;text-transform:uppercase}
.flagrow{display:flex;justify-content:space-between;gap:12px;margin-top:14px;padding-top:12px;border-top:1px dashed var(--rule)}
.flagrow a{font-family:var(--ui);font-size:12.5px;color:var(--ink-3)}
.flagrow a:hover{color:var(--no)}

/* the mode furniture: hearts, a boss's health, a ghost, an answer sheet */
.hearts{display:inline-flex;gap:3px}
.hearts i{font-style:normal;font-size:14px;color:var(--no);transition:transform .3s var(--spring),color .3s}
.hearts i.gone{color:var(--rule-2);transform:scale(.8)}
.bossbar{display:flex;align-items:center;gap:10px;margin:0 0 16px}
.bossbar .hp{flex:1;height:10px;border:1px solid var(--rule-2);border-radius:5px;background:var(--quiet);overflow:hidden}
.bossbar .hp i{display:block;height:100%;background:var(--no);transition:width .6s var(--spring)}
.bossbar .bn{font-family:var(--mono);font-size:12px;color:var(--ink-2);width:34px;text-align:right}
.ghostbar{position:relative;margin:0 0 16px;padding:7px 12px;border:1px dashed var(--rule-2);border-radius:5px;font-family:var(--ui);font-size:13px;
  color:var(--ink-2);overflow:hidden}
.ghostbar i{position:absolute;left:0;top:0;bottom:0;background:var(--accent-soft);z-index:0;transition:width .5s var(--ease)}
.ghostbar span{position:relative;z-index:1}
.ghostbar.ahead{border-color:var(--ok-line);color:var(--ok)} .ghostbar.behind{border-color:var(--no-line);color:var(--no)}
.omr{margin-top:18px;padding:14px 16px;border:1px solid var(--rule);border-radius:var(--radius);background:var(--quiet)}
.osheet{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:6px 12px;margin-top:10px}
.orow{display:flex;align-items:center;gap:3px}
.orow b{font-family:var(--mono);font-size:10px;color:var(--ink-3);width:18px;text-align:right;margin-right:3px;font-weight:400}
.orow.now b{color:var(--accent);font-weight:700}
.obub{width:15px;height:15px;border-radius:50%;border:1px solid var(--rule-2);font-family:var(--mono);font-size:8px;line-height:13px;
  text-align:center;color:var(--ink-3);font-style:normal;transition:all .3s var(--spring)}
.obub.on{background:var(--ink);border-color:var(--ink);color:var(--page);transform:scale(1.08)}

/* ---------- results ---------- */
.res{max-width:620px;margin:7vh auto 0;display:flex;flex-direction:column;gap:22px}
.res .score{display:flex;align-items:flex-end;gap:14px}
.res .score b{font-size:96px;font-weight:600;line-height:.85;letter-spacing:-.03em;font-variant-numeric:lining-nums tabular-nums}
.res .score span{font-size:26px;color:var(--ink-2);padding-bottom:6px}
.res .verdict{font-size:19px;line-height:1.55;color:var(--ink-2)}
.xpcard{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.xpcard .xpv{font-family:var(--mono);font-size:30px;color:var(--ok);font-variant-numeric:tabular-nums}
.xpcard .xpv small{font-size:14px;color:var(--ink-3)}
.xpcard .lvl{flex:1;min-width:180px}
.missed{border-top:1px solid var(--rule)}
.missed details{border-bottom:1px solid var(--rule)}
.missed summary{cursor:pointer;list-style:none;padding:12px 4px;font-family:var(--ui);font-size:14px;color:var(--ink-2);display:flex;gap:10px}
.missed summary::-webkit-details-marker{display:none}
.missed summary::before{content:'›';color:var(--ink-3);transition:transform .3s var(--ease);display:inline-block}
.missed details[open] summary::before{transform:rotate(90deg)}
.missed .mbody{padding:0 4px 14px 18px;font-size:16px}

/* ============================================================
   SHEETS, TOASTS, CELEBRATIONS
   ============================================================ */
.sheet{position:fixed;inset:0;z-index:300;display:flex;align-items:center;justify-content:center;padding:20px;
  background:rgba(20,20,19,.32);animation:fadeIn .25s ease both}
@supports (backdrop-filter:blur(4px)){ .sheet{backdrop-filter:blur(4px)} }
.sheet.out{animation:fadeOut .22s ease both}
.sheet .panel{width:100%;max-width:440px;max-height:calc(100vh - 40px);overflow-y:auto;border:1px solid var(--rule);border-radius:12px;
  background:var(--card);padding:26px;box-shadow:0 30px 70px -30px rgba(20,20,19,.5);animation:sheetIn .5s var(--spring) both;position:relative}
.sheet.out .panel{animation:sheetOut .22s ease both}
.sheet .panel h2{font-size:26px;margin:6px 0 8px}
.sheet .panel .close{position:absolute;right:14px;top:12px;font-size:22px;color:var(--ink-3);transition:transform .35s var(--spring),color .2s}
.sheet .panel .close:hover{transform:rotate(90deg);color:var(--ink)}
.sheet .celebrate{text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px}
.sheet .celebrate .ring{width:140px;height:140px;position:relative;margin:6px 0}
.sheet .celebrate .ring svg{width:140px;height:140px;transform:rotate(-90deg)}
.sheet .celebrate .ring circle{fill:none;stroke-width:6}
.sheet .celebrate .ring .bg{stroke:var(--warm)}
.sheet .celebrate .ring .fg{stroke:var(--accent);stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;animation:draw 1.2s var(--ease) .2s forwards}
.sheet .celebrate .ring b{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:52px;font-weight:600;
  animation:popIn .7s var(--spring) .5s both}
.sheet .celebrate .unl{border:1px solid var(--accent);background:var(--accent-soft);border-radius:6px;padding:10px 14px;font-family:var(--ui);
  font-size:14px;animation:rise .5s var(--ease) .8s both}
.sheet .chest{font-size:64px;line-height:1;margin:10px 0;display:inline-block}
.sheet .chest.shake{animation:chestShake .9s ease-in-out both}
.sheet .chest.open{animation:chestOpen .6s var(--spring) both}
.sheet .reward{font-size:22px;font-weight:600;animation:popIn .6s var(--spring) both}
.kbdlist{display:grid;grid-template-columns:auto 1fr;gap:8px 16px;font-family:var(--ui);font-size:14px;margin-top:10px}
.kbdlist kbd,.kbd{font-family:var(--mono);font-size:11px;border:1px solid var(--rule-2);border-radius:3px;padding:1px 6px;background:var(--quiet);
  color:var(--ink-2);white-space:nowrap}

.toast{position:fixed;left:50%;bottom:26px;z-index:400;max-width:min(520px,calc(100vw - 32px));transform:translateX(-50%);
  padding:11px 16px;border:1px solid var(--rule-2);border-radius:8px;background:var(--ink);color:var(--page);
  font-family:var(--ui);font-size:13.5px;line-height:1.5;box-shadow:0 14px 34px -14px rgba(20,20,19,.5);animation:toastIn .45s var(--spring) both}
.toast b{color:inherit}
.toast.out{animation:toastOut .25s ease both}
html[data-theme="night"] .toast{background:var(--card);color:var(--ink)}

/* ---------- effects layer ---------- */
.fxlayer{position:fixed;inset:0;pointer-events:none;z-index:500;overflow:hidden}
.confetti{position:fixed;top:0;left:0;border-radius:1px;pointer-events:none;will-change:transform}
.spark{position:fixed;border-radius:50%;pointer-events:none;will-change:transform;margin:-3px 0 0 -3px}
.floatpt{position:fixed;font-family:var(--mono);font-size:14px;font-weight:600;pointer-events:none;white-space:nowrap}
.edgeflash{position:fixed;inset:0;pointer-events:none;z-index:250;opacity:0}
.edgeflash.on{animation:edgeGlow .9s ease-out}
.edgeflash.ok{background:radial-gradient(ellipse at center,transparent 55%,var(--ok-soft) 100%)}
.edgeflash.no{background:radial-gradient(ellipse at center,transparent 55%,var(--no-soft) 100%)}
.qcard.fx-ok{animation:okGlow 1.1s var(--ease)}
.qcard.fx-no{animation:noGlow 1.1s var(--ease)}
.fx-pop{animation:popIn .5s var(--spring)}

/* ============================================================
   THE PAGES ONE TAP IN
   ============================================================ */
.tbl{width:100%;border-collapse:collapse;font-family:var(--ui);font-size:13.5px}
.tbl th{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3);font-weight:400;text-align:left;
  padding:8px 8px;border-bottom:1px solid var(--rule)}
.tbl td{padding:10px 8px;border-bottom:1px solid var(--rule);vertical-align:top}
.tbl .n{text-align:right;font-family:var(--mono);font-variant-numeric:tabular-nums}
.tbl tr.click{cursor:pointer;transition:background .15s}
.tbl tr.click:hover{background:var(--quiet)}
.scrollx{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* the path through the syllabus */
.step{display:grid;grid-template-columns:34px minmax(0,1fr) 110px 70px;align-items:center;gap:14px;width:100%;text-align:left;padding:13px 4px;
  border-bottom:1px solid var(--rule);color:var(--ink);transition:background .2s,padding .3s var(--ease)}
.step:hover{background:color-mix(in srgb,var(--card) 70%,transparent);padding-left:10px}
.step .n{width:26px;height:26px;border-radius:50%;border:1px solid var(--rule-2);display:flex;align-items:center;justify-content:center;
  font-family:var(--mono);font-size:10.5px;color:var(--ink-3)}
.step.now .n{border-color:var(--accent);background:var(--accent);color:#FAF9F5;animation:pulseRing 2.4s ease-out infinite}
.step.done .n{border-color:var(--ok-line);color:var(--ok)}
.step .t{font-family:var(--ui);font-size:14.5px;font-weight:600}
.step .s{font-family:var(--ui);font-size:12.5px;color:var(--ink-3);margin-top:2px}
.step .d{font-family:var(--mono);font-size:11px;color:var(--ink-3);text-align:right}

/* score bar with a pass line and a goal line */
.sbar{position:relative;height:6px;border-radius:3px;background:var(--warm)}
.sbar>i{position:absolute;left:0;top:0;bottom:0;border-radius:3px;background:var(--accent)}
.view.enter .sbar>i{animation:growW 1s var(--ease) both}
.sbar>i.pass{background:var(--ok-line)} .sbar>i.goal{background:var(--ok)}
.sbar>u,.sbar>s{position:absolute;top:-3px;width:2px;height:12px;border-radius:1px;text-decoration:none}
.sbar>u{background:var(--accent)} .sbar>s{background:var(--ok)}
.sbar.mini{height:4px}
.sbar.mini>u,.sbar.mini>s{top:-2px;height:8px}
.sbarlbl{display:flex;justify-content:space-between;font-family:var(--mono);font-size:10px;letter-spacing:.06em;color:var(--ink-3);margin-top:6px}

.gauge{position:relative;height:8px;border-radius:4px;background:var(--warm)}
.gauge>i{position:absolute;top:0;bottom:0;border-radius:4px;background:var(--ok-line);opacity:.55}
.gauge>b{position:absolute;top:-4px;width:3px;height:16px;background:var(--ink);border-radius:2px}
.gauge>u{position:absolute;top:-4px;width:3px;height:16px;background:var(--accent);border-radius:2px;text-decoration:none}
.gaugelbl{display:flex;justify-content:space-between;font-family:var(--mono);font-size:10px;color:var(--ink-3);margin-top:4px}

.ledger{width:100%;border-collapse:collapse;font-family:var(--ui);font-size:13.5px}
.ledger td{padding:9px 4px;border-bottom:1px solid var(--rule);vertical-align:top}
.ledger td:last-child{text-align:right;font-family:var(--mono);white-space:nowrap}
.ledger .sub{display:block;font-size:12px;color:var(--ink-3);margin-top:2px;line-height:1.45}
.ledger .minus{color:var(--no)}
.ledger tr.sum td{font-weight:600;border-bottom:0}
.ledger tr.head td{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3)}

.cal{display:grid;grid-template-rows:repeat(7,1fr);grid-auto-flow:column;gap:3px;overflow-x:auto;padding-bottom:4px}
.cal i{width:12px;height:12px;border-radius:3px;background:var(--warm)}
.cal i.l1{background:var(--accent-soft)} .cal i.l2{background:#EEBFA9} .cal i.l3{background:var(--accent)} .cal i.l4{background:var(--accent-press)}
html[data-theme="night"] .cal i.l2{background:#7A4A36}
.cal i.today{outline:1px solid var(--ink-2);outline-offset:1px}
.heat24{display:grid;grid-template-columns:repeat(24,1fr);gap:3px}
.heat24 i{aspect-ratio:1;background:var(--warm);border-radius:3px}
.heat24 i.l1{background:var(--accent-soft)} .heat24 i.l2{background:#EEBFA9} .heat24 i.l3{background:var(--accent)} .heat24 i.l4{background:var(--accent-press)}
html[data-theme="night"] .heat24 i.l2{background:#7A4A36}
.legend{display:flex;gap:16px;flex-wrap:wrap;font-family:var(--mono);font-size:10px;letter-spacing:.06em;color:var(--ink-3);margin-top:10px}
.legend i{display:inline-block;width:9px;height:9px;border-radius:2px;margin-right:5px;vertical-align:-1px}
.insights{list-style:none;margin:0;padding:0}
.insights li{position:relative;padding:0 0 12px 20px;font-size:16.5px;line-height:1.6}
.insights li::before{content:'';position:absolute;left:0;top:.8em;width:9px;height:1px;background:var(--ink-3)}

/* tricks */
.trick{border:1px solid var(--rule);border-radius:var(--radius);background:var(--card);padding:20px 22px;margin-bottom:14px}
.trick .th{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.trick h3{font-size:21px;flex:1;min-width:0}
.trick .saves{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ok)}
.trick .one{font-size:18px;line-height:1.55;border-left:2px solid var(--accent);padding-left:14px;margin:4px 0 12px}
.trick ul{margin:0 0 12px;padding-left:20px;font-size:16.5px;line-height:1.6}
.trick ul li{margin-bottom:4px}
.trick .ex{border:1px solid var(--rule);border-radius:6px;background:var(--quiet);padding:12px 14px;font-size:16px}
.trick .ex .q{margin-bottom:6px} .trick .ex .a{color:var(--ink-2)}
.trick.compact .one{margin-bottom:0}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chips button{padding:5px 10px;border:1px solid var(--rule);border-radius:14px;font-family:var(--ui);font-size:12.5px;color:var(--ink-2);
  background:var(--card);transition:all .2s var(--ease)}
.chips button:hover{border-color:var(--ink-3);transform:translateY(-1px)}
.chips button.on{border-color:var(--accent);background:var(--accent-soft);color:var(--accent);font-weight:600}

/* the game layer */
.crest{display:flex;align-items:center;gap:16px;padding:16px 20px;border:1px solid var(--rule);border-radius:var(--radius);background:var(--card)}
.crest .ava{font-size:34px;line-height:1;animation:bob 3s ease-in-out infinite}
.crest .coins{font-family:var(--mono);font-size:20px;color:var(--accent);text-align:right;white-space:nowrap}
.crest .coins i{display:block;font-style:normal;font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3)}
.crest.frame-brass{border-color:#B79350;box-shadow:inset 0 0 0 1px #E6D6AE}
.crest.frame-jade{border-color:#6E9B7C;box-shadow:inset 0 0 0 1px #CBE0D0}
.crest.frame-ember{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent-soft)}
html[data-theme="night"] .crest.frame-brass{box-shadow:none} html[data-theme="night"] .crest.frame-jade{box-shadow:none}
.tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.tile{display:flex;flex-direction:column;gap:4px;text-align:left;padding:16px;border:1px solid var(--rule);border-radius:var(--radius);background:var(--card);
  transition:transform .3s var(--ease),border-color .2s,box-shadow .3s}
.tile:hover{transform:translateY(-3px);border-color:var(--accent);box-shadow:0 12px 26px -18px rgba(20,20,19,.4)}
.tile .tt{font-family:var(--serif);font-size:18px;font-weight:600}
.tile .ts{font-family:var(--ui);font-size:12.5px;color:var(--ink-3)}
.grid-auto{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}
.badge{padding:14px;border:1px solid var(--rule);border-radius:var(--radius);text-align:center;opacity:.5;background:var(--card);
}
.view.enter .badge{animation:popIn .45s var(--spring) both;animation-delay:calc(var(--i,0)*25ms)}
.badge.got{opacity:1;border-color:var(--rule-2)}
.badge.got.rare{border-color:var(--ok-line)} .badge.got.epic{border-color:var(--accent)} .badge.got.legend{border-color:var(--gold)}
.badge .bi{display:block;font-size:22px;color:var(--accent);margin-bottom:6px}
.badge b{display:block;font-family:var(--serif);font-size:15px;margin-bottom:4px}
.badge.secret{border-style:dashed}
.rar{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-3);margin:0 0 12px}
.rar.rare{color:var(--ok)} .rar.epic{color:var(--accent)} .rar.legend{color:var(--gold)}
.ccard{padding:13px;border:1px solid var(--rule);border-radius:var(--radius);opacity:.45;background:var(--card);text-align:left;
  transition:transform .3s var(--ease),border-color .2s}
.view.enter .ccard{animation:popIn .45s var(--spring) both;animation-delay:calc(min(var(--i,0),40)*18ms)}
.ccard.got{opacity:1;cursor:pointer;border-color:var(--rule-2)}
.ccard.got:hover{transform:translateY(-2px);border-color:var(--accent)}
.ccard .ck{display:block;font-family:var(--mono);font-size:9px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3);margin-bottom:5px}
.ccard b{display:block;font-family:var(--serif);font-size:15px;margin-bottom:4px}
.shopitem{padding:14px;border:1px solid var(--rule);border-radius:var(--radius);text-align:center;background:var(--card);transition:transform .3s var(--ease),border-color .2s}
.shopitem:hover{transform:translateY(-2px)}
.shopitem.on{border-color:var(--accent)}
.shopitem .art{display:block;font-size:28px;margin-bottom:6px}
.shopitem b{display:block;font-family:var(--ui);font-size:14px;margin-bottom:10px}
.plant{font-size:46px;line-height:1;display:inline-block;animation:sway 4s ease-in-out infinite;transform-origin:bottom center}
.plant.dry{opacity:.45;filter:grayscale(.6);animation:none}
.qrow{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--rule);flex-wrap:wrap}
.qrow:last-child{border-bottom:0}
.qrow .qt{flex:1 1 220px;font-family:var(--ui);font-size:14.5px}
.qrow .qb{flex:0 0 110px}
.qrow .qn{font-family:var(--mono);font-size:11.5px;color:var(--ink-3);width:54px;text-align:right}
.qrow.done .qt{color:var(--ok)}
.sq{display:inline-block;width:11px;height:11px;border-radius:2px;border:1px solid var(--rule-2);background:var(--quiet);margin-right:2px}
.sq.s2{background:var(--ok);border-color:var(--ok-line)} .sq.s1{background:var(--no-soft);border-color:var(--no-line)}
.season{display:flex;gap:10px;overflow-x:auto;padding:4px 0}
.sstep{flex:0 0 124px;padding:12px;border:1px solid var(--rule);border-radius:6px;text-align:center;background:var(--card)}
.sstep b{display:block;font-family:var(--mono);font-size:15px;color:var(--ink-3)}
.sstep span{display:block;font-family:var(--ui);font-size:12px;color:var(--ink-2);margin:4px 0 8px;min-height:32px}
.sstep.got{border-color:var(--accent)} .sstep.got b{color:var(--accent)}
.sstep.taken{border-color:var(--ok-line);opacity:.7}
.codebox{font-family:var(--mono);font-size:22px;letter-spacing:.14em;padding:12px 16px;border:1px dashed var(--rule-2);border-radius:6px;display:inline-block;user-select:all}
.flagbox{max-height:220px;overflow:auto;font-family:var(--mono);font-size:11.5px;white-space:pre-wrap;background:var(--quiet);padding:12px;border-radius:6px;color:var(--ink-2)}
.welcome{max-width:640px;margin:0 auto;padding:0 0 60px}
.welcome .wbar{display:flex;align-items:center;justify-content:space-between;padding:22px 0;border-bottom:1px solid var(--rule);margin-bottom:12vh}
.welcome h1{font-size:64px;line-height:1.02;letter-spacing:-.025em}

/* ============================================================
   MOTION
   ============================================================ */
/* every screen rises into place, one block after another */
.view.enter>*{animation:rise .42s var(--ease) both}
.view.enter>.stack>*,.view.enter>.brief>*,.view.enter>.welcome .stack>*{animation:rise .42s var(--ease) both}
.view.enter>*:nth-child(2),.view.enter>.stack>*:nth-child(2),.view.enter>.brief>*:nth-child(2){animation-delay:40ms}
.view.enter>*:nth-child(3),.view.enter>.stack>*:nth-child(3),.view.enter>.brief>*:nth-child(3){animation-delay:80ms}
.view.enter>*:nth-child(4),.view.enter>.stack>*:nth-child(4),.view.enter>.brief>*:nth-child(4){animation-delay:120ms}
.view.enter>*:nth-child(5),.view.enter>.stack>*:nth-child(5),.view.enter>.brief>*:nth-child(5){animation-delay:160ms}
.view.enter>*:nth-child(n+6),.view.enter>.stack>*:nth-child(n+6),.view.enter>.brief>*:nth-child(n+6){animation-delay:200ms}
.view.enter>.stack,.view.enter>.brief{animation:none}
.stagger>*{animation:rise .42s var(--ease) both}
.stagger>*:nth-child(2){animation-delay:40ms} .stagger>*:nth-child(3){animation-delay:80ms}
.stagger>*:nth-child(4){animation-delay:120ms} .stagger>*:nth-child(5){animation-delay:160ms}
.stagger>*:nth-child(n+6){animation-delay:200ms}

@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
@keyframes fadeOut{from{opacity:1}to{opacity:0}}
@keyframes popIn{0%{opacity:0;transform:scale(.6)}100%{opacity:1;transform:scale(1)}}
@keyframes growW{from{width:0}}
@keyframes tickUp{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@keyframes draw{to{stroke-dashoffset:0}}
@keyframes drawTick{to{stroke-dashoffset:0}}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.25}}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@keyframes sway{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(3deg)}}
@keyframes blink{50%{opacity:.35}}
@keyframes shimmer{0%,100%{box-shadow:0 0 0 0 transparent}50%{box-shadow:0 0 0 3px color-mix(in srgb,var(--gold) 25%,transparent)}}
@keyframes starPop{0%{opacity:0;transform:scale(0) rotate(-40deg)}100%{opacity:1;transform:scale(1) rotate(0)}}
@keyframes optIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes qIn{from{opacity:0;transform:translateX(26px)}to{opacity:1;transform:none}}
@keyframes optRight{0%{transform:scale(1)}40%{transform:scale(1.025)}100%{transform:scale(1)}}
@keyframes shakeX{0%,100%{transform:translateX(0)}15%{transform:translateX(-7px)}30%{transform:translateX(6px)}45%{transform:translateX(-4px)}
  60%{transform:translateX(3px)}75%{transform:translateX(-2px)}}
@keyframes segIn{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes deltaPop{0%{transform:scale(.6);opacity:0}60%{transform:scale(1.12);opacity:1}100%{transform:scale(1)}}
@keyframes comboPop{0%{transform:scale(1)}40%{transform:scale(1.25)}100%{transform:scale(1)}}
@keyframes edgeGlow{0%{opacity:0}15%{opacity:1}100%{opacity:0}}
@keyframes okGlow{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--ok) 45%,transparent)}100%{box-shadow:0 0 0 14px transparent}}
@keyframes noGlow{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--no) 40%,transparent)}100%{box-shadow:0 0 0 14px transparent}}
@keyframes sheetIn{from{opacity:0;transform:translateY(24px) scale(.96)}to{opacity:1;transform:none}}
@keyframes sheetOut{to{opacity:0;transform:translateY(12px) scale(.98)}}
@keyframes toastIn{from{opacity:0;transform:translate(-50%,24px) scale(.95)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes toastOut{to{opacity:0;transform:translate(-50%,12px)}}
@keyframes chestShake{0%,100%{transform:rotate(0)}15%{transform:rotate(-9deg)}30%{transform:rotate(8deg)}45%{transform:rotate(-7deg)}
  60%{transform:rotate(6deg)}75%{transform:rotate(-3deg)}}
@keyframes chestOpen{0%{transform:scale(1)}40%{transform:scale(1.3)}100%{transform:scale(1)}}
@keyframes pulseRing{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 45%,transparent)}100%{box-shadow:0 0 0 10px transparent}}

/* calm: when animations are switched off, or the system asks for less motion */
html.still *,html.still *::before,html.still *::after{animation:none!important;transition:none!important}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;animation-delay:0ms!important;
    transition-duration:.001ms!important;scroll-behavior:auto!important}
}

/* ============================================================
   SMALLER SCREENS
   ============================================================ */
@media (max-width:1100px){
  .rcsplit{grid-template-columns:1fr}
  .rcpassage{position:static;max-height:none}
}
@media (max-width:900px){
  .hero{flex-direction:column;gap:24px}
  .hero aside{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:12px}
  .hero aside .stat.acc{grid-column:1/-1}
  .bignum{font-size:112px}
  .bigunit{font-size:24px}
  .ways{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pgrid{grid-template-columns:1fr}
  .grid4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .srow{grid-template-columns:24px minmax(0,1fr) minmax(0,1.2fr) 34px 62px}
  .srow .sub{display:none}
  body.focus .view{padding:0 16px 150px}
  .fbar{margin:0 -16px 18px;padding:0 12px;gap:10px}
  .fbar .desk-only{display:none}
  .actions{position:fixed;left:0;right:0;bottom:0;padding:12px 16px calc(12px + env(safe-area-inset-bottom));margin:0;
    background:var(--quiet);border-top:1px solid var(--rule)}
  .toast{bottom:88px}
  body.focus .toast{bottom:96px}
  .welcome h1{font-size:46px}
  .welcome .wbar{margin-bottom:7vh}
  .step{grid-template-columns:30px minmax(0,1fr) 60px}
  .step .bar{display:none}
}
@media (max-width:560px){
  .phead h1,.brief h1{font-size:28px}
  .next h2{font-size:27px}
  .bignum{font-size:92px}
  .grid3{grid-template-columns:1fr}
  .brief .grid3{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .brief .grid3 .stat{padding:12px}
  .brief .grid3 .v{font-size:18px}
  .stlist li{padding:8px 11px}
  .res .score b{font-size:76px}
  .nudge{flex-wrap:wrap}
  .card{padding:18px}
  .qcard{padding:18px 16px 14px}
  .qstem{font-size:18.5px}
  .opt{font-size:16.5px;padding:11px 13px}
  .segs{max-width:none}
}

/* the header keeps to one line on a narrow laptop: the days chip goes first
   (the same number is in the sidebar and on Today), then the word COINS */
@media (max-width:1180px) and (min-width:901px){
  .daysbox .lbl-long, .daysbox .cd{display:none}
}
@media (max-width:1040px) and (min-width:901px){
  .xpbox .xpn{display:none}
  .top{gap:8px;padding:0 16px}
}

/* phones: paired buttons stack, and a nudge gives its words the full width */
.nudge .nb{flex:1 1 220px}
@media (max-width:560px){
  .btns.two{flex-direction:column}
  .btns.two>.btn{flex:none;width:100%}
  .nudge{padding:14px 12px 14px 16px;gap:10px;flex-wrap:wrap;align-items:flex-start}
  .nudge .nb{flex:1 1 calc(100% - 44px)}
  .nudge .nx{order:2}
  .nudge .btn{order:3;flex:1 0 100%}
}
@media (max-width:420px){
  .actions .btn{padding:0 10px;font-size:14px}
}

/* ============================================================
   DRAKKHAK ADDITIONS
   The sidebar's subjects and research link, the top bar's XP, coin
   and days boxes, the reward flight, the map, the chapter page
   (Learn, then Drill) and the research plates.
   ============================================================ */

/* ---------- small shared utilities ---------- */
@media (min-width:901px){ .phone-only{display:none!important} }
@media (max-width:900px){ .desk-only{display:none!important} }
.soon-tag{font-style:normal;font-family:var(--mono);font-size:9.5px;letter-spacing:.06em;text-transform:uppercase;
  padding:1px 6px;border-radius:4px;background:var(--warm);color:var(--ink-3);vertical-align:1px}
.donut circle{fill:none;stroke-width:3.2}
.donut .bg{stroke:var(--warm)}
.donut .fg{stroke:var(--sc,var(--accent));stroke-linecap:round;transition:stroke-dashoffset .9s var(--ease)}
.donut.mini circle{stroke-width:3}
.fx-bump{animation:bump .42s var(--spring)}
@keyframes bump{0%{transform:scale(1)}35%{transform:scale(1.14)}100%{transform:scale(1)}}

/* ---------- the sidebar: subjects and research ---------- */
.brand-name{letter-spacing:-.01em}
.subjbox{margin-top:18px;padding-top:4px}
.subjbox .side-label{display:flex;justify-content:space-between;align-items:baseline}
.subjbox .side-label span{font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;font-weight:400}
.subj{display:grid;grid-template-columns:30px minmax(0,1fr);grid-template-rows:auto auto;column-gap:10px;align-items:center;
  width:100%;padding:5px 6px;margin:1px 0;border-radius:7px;text-align:left;transition:background .2s,transform .25s var(--ease)}
.subj:hover{background:var(--card);transform:translateX(2px)}
.subj .donut{grid-row:1/3}
.subj .sn{font-family:var(--ui);font-size:13.5px;font-weight:600;color:var(--ink);line-height:1.25}
.subj .sd{font-family:var(--mono);font-size:10.5px;color:var(--ink-3);line-height:1.3}
.subj .sd b{color:var(--sc);font-weight:600}
.side-end{margin-top:auto;padding-top:16px}
.research-link{display:flex;gap:10px;align-items:center;padding:10px 11px;border:1px solid var(--rule);border-radius:9px;
  background:var(--card);color:var(--ink-2);transition:border-color .2s,transform .25s var(--ease)}
.research-link:hover{border-color:var(--accent);transform:translateY(-1px);color:var(--ink-2)}
.research-link.on{border-color:var(--accent);background:var(--accent-soft)}
.research-link b{display:block;font-family:var(--ui);font-size:13.5px;color:var(--ink);line-height:1.25}
.research-link small{display:block;font-family:var(--ui);font-size:11.5px;color:var(--ink-3);line-height:1.35}
.rl-ico{width:28px;height:28px;flex:none;fill:none;stroke:var(--accent);stroke-width:1.6;stroke-linejoin:round}
.side-end .side-foot{margin-top:12px}

/* ---------- the top bar ---------- */
.top{height:56px}
.top .clock{background:none;border:0;padding:0;cursor:pointer}
.togs{display:inline-flex;gap:6px}
.xpbox,.coinbox,.daysbox{display:inline-flex;align-items:center;gap:8px;height:36px;border-radius:18px;border:1px solid var(--rule);
  background:var(--card);font-family:var(--mono);font-size:11px;color:var(--ink-3);white-space:nowrap;
  transition:border-color .2s,transform .25s var(--ease)}
.xpbox:hover,.coinbox:hover,.daysbox:hover{transform:translateY(-1px)}
.xpbox{padding:0 12px 0 4px}
.xpbox:hover{border-color:var(--accent)}
.xpbox .lvl{position:relative;width:30px;height:30px;display:flex;align-items:center;justify-content:center;flex:none}
.xpbox .lvl svg{position:absolute;inset:0;width:30px;height:30px;fill:var(--accent);filter:drop-shadow(0 1px 0 var(--accent-press))}
.xpbox .lvl b{position:relative;color:#FFF8F2;font-size:12px;font-weight:600}
html[data-theme="night"] .xpbox .lvl b{color:#16150F}
.xpcol{display:flex;flex-direction:column;gap:3px;min-width:74px}
.xpbar{display:block;height:5px;border-radius:3px;background:var(--warm);overflow:hidden}
.xpbar i{display:block;height:5px;border-radius:3px;background:linear-gradient(90deg,var(--accent),var(--star));transition:width .8s var(--ease)}
.xpn{font-size:10px;letter-spacing:.02em;line-height:1}
.xpn b{color:var(--ink);font-weight:600}
.coinbox{position:relative;padding:0 12px 0 5px;border-color:#E3BC55;
  background:linear-gradient(180deg,#FFF7DE,#FBE8AE);color:#7A5306}
html[data-theme="night"] .coinbox{border-color:#8F6B1E;background:linear-gradient(180deg,#3A2D12,#2A200C);color:#F5D27A}
.coinbox:hover{border-color:#C9951F}
.coinbox b{font-size:13px;font-weight:600;color:inherit;font-variant-numeric:tabular-nums}
.coinbox .coin{width:26px;height:26px;display:block;perspective:120px}
.coin svg{width:100%;height:100%;display:block;animation:coinSpin 6s ease-in-out infinite;transform-origin:50% 50%}
@keyframes coinSpin{0%,78%{transform:rotateY(0)}88%{transform:rotateY(180deg) scale(1.06)}100%{transform:rotateY(360deg)}}
.coinbox .dot{position:absolute;top:-6px;right:-6px;min-width:17px;height:17px;border-radius:9px;background:var(--accent);color:#FAF9F5;
  font-size:9.5px;line-height:17px;text-align:center;padding:0 4px;animation:bob 2.2s ease-in-out infinite}
.daysbox{padding:0 12px 0 8px}
.daysbox:hover{border-color:var(--accent)}
.daysbox b{color:var(--ink);font-size:13px;font-weight:600}
.daysbox .cd{padding-left:8px;border-left:1px solid var(--rule-2);color:var(--ink-3)}
.daysbox .cd.behind{color:var(--no)}
.daysbox .donut{--sc:var(--accent)}
html.still .coin svg{animation:none}

/* in a set the top bar stays: the switches are always in reach, and the rewards need somewhere to land */
body.focus .fbar{top:56px}
body.welcoming .xpbox, body.welcoming .coinbox, body.welcoming .daysbox, body.welcoming .top .clock{display:none}

/* ---------- the reward flight ---------- */
.fly-coin{position:fixed;left:0;top:0;width:20px;height:20px;border-radius:50%;z-index:620;pointer-events:none;will-change:transform;
  background:radial-gradient(circle at 36% 30%,#FFF4C2 0,#F6C744 45%,#B9800F 100%);
  box-shadow:inset 0 0 0 2px #D9A628,0 2px 4px rgba(0,0,0,.28)}
.fly-coin::after{content:'\2605';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:11px;color:#9A6508}
.fly-xp{position:fixed;left:0;top:0;z-index:621;pointer-events:none;will-change:transform;white-space:nowrap;
  padding:3px 9px;border-radius:11px;background:var(--accent);color:#FFF8F2;font-family:var(--mono);font-size:12px;font-weight:600;
  box-shadow:0 3px 8px -2px color-mix(in srgb,var(--accent) 70%,transparent)}
html[data-theme="night"] .fly-xp{color:#16150F}
.fly-gem{position:fixed;left:0;top:0;width:9px;height:9px;z-index:619;pointer-events:none;will-change:transform;
  background:var(--star);border-radius:2px;box-shadow:0 0 0 1px color-mix(in srgb,var(--star) 60%,#000)}
.xpline .coins{display:inline-flex;align-items:center;gap:4px}
.ci{width:15px;height:15px;vertical-align:-2px}
.coinv{display:inline-flex;align-items:center;gap:5px;color:var(--gold)}
.coinv .ci{width:22px;height:22px}
.crest .coins .coin{display:inline-block;width:22px;height:22px;vertical-align:-4px;margin-right:4px}

/* ---------- Start: the plain count, and the subjects on a phone ---------- */
.qcount{display:flex;flex-direction:column;gap:7px;max-width:560px}
.qc-line{display:flex;align-items:baseline;gap:6px 10px;flex-wrap:wrap;font-family:var(--ui)}
.qc-done{font-family:var(--mono);font-size:26px;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.qc-of{font-size:15px;color:var(--ink-2)}
.qc-left{margin-left:auto;font-size:14px;color:var(--ink-3)}
.qc-left b{font-family:var(--mono);color:var(--accent);font-weight:600}
.qc-bar{height:6px!important;border-radius:3px}
.qc-bar i{border-radius:3px}
.qc-note{font-family:var(--ui);font-size:12.5px;color:var(--ink-3)}
.subjstrip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 10px;padding:10px;border:1px solid var(--rule);
  border-radius:12px;background:var(--quiet)}

/* ---------- Progress: days left by subject ---------- */
.sdrow{display:grid;grid-template-columns:10px minmax(90px,150px) minmax(0,1fr) 84px;gap:12px;align-items:center;width:100%;
  padding:9px 2px;border-bottom:1px solid var(--rule);text-align:left}
.sdrow:last-child{border-bottom:0}
.sdrow .sw{width:10px;height:10px;border-radius:3px;background:var(--sc)}
.sdrow .sn{font-family:var(--ui);font-size:14.5px;color:var(--ink)}
.sdrow .sd{font-family:var(--mono);font-size:12px;color:var(--ink-2);text-align:right}
.sdrow:hover .sn{color:var(--sc)}

/* ---------- Settings ---------- */
.timeset{display:inline-flex;align-items:center;gap:6px;font-family:var(--ui);font-size:13px;color:var(--ink-2)}
.timeset .field.num{width:64px;text-align:center}
.research-card{display:flex;flex-direction:column;gap:4px;color:var(--ink);transition:border-color .2s,transform .25s var(--ease)}
.research-card:hover{border-color:var(--accent);transform:translateY(-1px);color:var(--ink)}
.research-card b{font-family:var(--ui);font-size:16.5px}

/* ============================================================
   THE MAP
   ============================================================ */
.view.wide{max-width:none;padding:18px 22px 80px}
.mapwrap{display:block}
/* the head stays under the top bar while the road scrolls past */
.mhead{position:sticky;top:calc(var(--bar-h,64px) + 8px);z-index:20;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px 18px;
  padding:10px 14px 10px 18px;border:1px solid var(--rule);border-radius:16px;
  background:color-mix(in srgb,var(--card) 92%,transparent);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  box-shadow:0 10px 30px -22px rgba(20,20,19,.45)}
.mh-t{display:flex;flex-direction:column;gap:1px;min-width:0}
.mh-t h1{font-size:23px;line-height:1.1}
.mh-facts{font-size:11.5px;color:var(--ink-3);white-space:nowrap}
.mh-facts b{color:var(--ink);font-weight:600}
.mh-facts b.gold{color:var(--gold)}
.mh-subj{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:0}
.mh-hint{font-family:var(--ui);font-size:11px;font-weight:600;color:var(--ink-3);margin-right:2px;flex-basis:100%;line-height:1}
.mh-tools{display:flex;gap:6px;flex:none}
.mchip{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 11px 0 7px;border:1px solid var(--rule);border-radius:16px;
  background:var(--card);font-family:var(--ui);font-size:13px;font-weight:600;color:var(--ink);white-space:nowrap;
  transition:border-color .2s,transform .2s var(--ease),background .2s}
.mchip .donut{width:18px;height:18px}
.mchip .donut .fg{stroke:var(--sc)}
.mchip i{width:9px;height:9px;border-radius:50%;background:var(--sc)}
.mchip:hover{border-color:var(--sc,var(--accent));background:color-mix(in srgb,var(--sc,var(--accent)) 10%,var(--card));transform:translateY(-1px)}
.mchip.here{padding:0 12px;border-color:var(--accent);color:var(--accent)}
.mchip.rules-btn{padding:0 12px;border-color:var(--star);color:var(--gold)}
.scene{position:relative;margin-top:16px;border-radius:26px;overflow:hidden;
  background:
    radial-gradient(circle,color-mix(in srgb,var(--ink) 7%,transparent) 1px,transparent 1.4px) 0 0/22px 22px,
    linear-gradient(180deg,var(--scene-top),var(--scene-bot));
  box-shadow:inset 0 0 0 1px var(--rule)}
.mband{position:absolute;left:2%;right:2%;border-radius:44px;
  background:linear-gradient(180deg,color-mix(in srgb,var(--sc) 16%,var(--card)),color-mix(in srgb,var(--sc) 9%,var(--card)));
  box-shadow:0 14px 0 color-mix(in srgb,var(--sc) 34%,var(--rule-2)),0 30px 34px -20px rgba(0,0,0,.4),
    inset 0 2px 0 color-mix(in srgb,#fff 45%,transparent)}
html[data-theme="night"] .mband{box-shadow:0 14px 0 color-mix(in srgb,var(--sc) 30%,#000),0 30px 34px -20px rgba(0,0,0,.7),
    inset 0 1px 0 color-mix(in srgb,#fff 10%,transparent)}
.road{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:1}
.road path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.r-shadow{stroke:rgba(0,0,0,.16);stroke-width:30}
.r-edge{stroke:var(--road-edge);stroke-width:30}
.r-top{stroke:var(--road-top);stroke-width:23}
.r-line{stroke:var(--road-line);stroke-width:2.5;stroke-dasharray:10 13}
.decor{position:absolute;width:calc(30px * var(--s));transform:translate(-50%,-50%)}
.decor svg{display:block;width:100%;height:auto;overflow:visible}
.decor.d-rock{width:calc(34px * var(--s))}
.decor.d-flag{width:calc(22px * var(--s))}
.decor .shd{fill:rgba(0,0,0,.14)}
.decor .trunk{fill:#7A5A3A}
.decor .leaf{fill:color-mix(in srgb,var(--sc) 30%,#5B8A4E)}
.decor .leaf2{fill:color-mix(in srgb,var(--sc) 22%,#44703C)}
.decor .rock{fill:#B7AF9E}
.decor .rockhi{fill:#D7D0C1}
.decor .pennant{fill:var(--sc)}
html[data-theme="night"] .decor .leaf{fill:color-mix(in srgb,var(--sc) 30%,#3E5E36)}
html[data-theme="night"] .decor .leaf2{fill:color-mix(in srgb,var(--sc) 22%,#2F4A29)}
html[data-theme="night"] .decor .rock{fill:#5A5446}
html[data-theme="night"] .decor .rockhi{fill:#6E6755}

/* a stop: stars on top, a raised disc, the name and time beside it */
.mnode{position:absolute;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:5px;z-index:3}
.mnode .disc{width:56px;height:56px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:radial-gradient(circle at 35% 28%,color-mix(in srgb,var(--sc) 45%,#fff),var(--sc) 72%);
  box-shadow:0 6px 0 color-mix(in srgb,var(--sc) 55%,#000),0 13px 16px -6px rgba(0,0,0,.42),inset 0 2px 0 rgba(255,255,255,.45);
  color:#fff;font-family:var(--mono);font-weight:600;font-size:18px;transition:transform .22s var(--spring),box-shadow .22s}
.mnode .disc b{text-shadow:0 1px 0 rgba(0,0,0,.25)}
.mnode:hover .disc{transform:translateY(-3px)}
.mnode:active .disc{transform:translateY(5px);box-shadow:0 1px 0 color-mix(in srgb,var(--sc) 55%,#000),0 4px 8px -4px rgba(0,0,0,.4)}
.mnode.st-done .disc{background:radial-gradient(circle at 35% 28%,#FFF0BE,#E8AA2E 72%);
  box-shadow:0 6px 0 #97640A,0 13px 16px -6px rgba(0,0,0,.42),inset 0 2px 0 rgba(255,255,255,.55);color:#5A3A02}
.mnode.st-done .disc b{text-shadow:none}
.mnode.st-soon .disc{background:var(--card);color:var(--ink-3);border:2px dashed var(--rule-2);
  box-shadow:0 5px 0 var(--rule-2),0 10px 14px -8px rgba(0,0,0,.28)}
.mnode.st-soon .disc b{text-shadow:none}
.mnode.st-now .disc{animation:nodePulse 1.9s ease-out infinite}
@keyframes nodePulse{0%{box-shadow:0 6px 0 color-mix(in srgb,var(--sc) 55%,#000),0 0 0 0 color-mix(in srgb,var(--accent) 55%,transparent)}
  100%{box-shadow:0 6px 0 color-mix(in srgb,var(--sc) 55%,#000),0 0 0 18px transparent}}
.mnode .here{position:absolute;top:-40px;white-space:nowrap;background:var(--accent);color:#FFF8F2;font-family:var(--ui);font-size:11.5px;
  font-weight:600;padding:3px 10px;border-radius:12px;box-shadow:0 4px 10px -4px rgba(0,0,0,.4);animation:bob 2.2s ease-in-out infinite}
html[data-theme="night"] .mnode .here{color:#16150F}
.mnode .here::after{content:'';position:absolute;left:50%;bottom:-5px;margin-left:-5px;border:5px solid transparent;border-bottom:0;border-top-color:var(--accent)}
.mstars{display:inline-flex;gap:1px;font-size:15px;line-height:1;color:var(--rule-2)}
.mstars i{font-style:normal}
.mstars i.on{color:var(--star);text-shadow:0 1px 0 color-mix(in srgb,var(--star) 55%,#000)}
.mstars.soon{opacity:.5}
.view.enter .mnode .mstars i.on{animation:starPop .6s var(--spring) both;animation-delay:calc(var(--i,0)*120ms + 300ms)}
.mlabel{position:absolute;top:50%;width:min(240px,24vw);display:flex;flex-direction:column;gap:2px;pointer-events:none}
.side-r .mlabel{left:calc(50% + 40px);text-align:left}
.side-l .mlabel{right:calc(50% + 40px);text-align:right;align-items:flex-end}
.mt{font-family:var(--ui);font-size:13px;font-weight:600;color:var(--ink);line-height:1.25;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  text-shadow:0 0 6px var(--card),0 0 3px var(--card)}
.mtime{font-family:var(--mono);font-size:11px;color:var(--ink-2)}
.mnode.st-soon .mt{color:var(--ink-2);font-weight:500}

/* a milestone: the paper, and the days left for all of its chapters */
.mgate{position:absolute;transform:translate(-50%,-50%);z-index:4;display:flex;flex-direction:column;align-items:center;gap:12px}
.gpractise{position:relative;z-index:2;height:30px;padding:0 14px;border-radius:15px;background:var(--card);border:1px solid color-mix(in srgb,var(--sc) 55%,var(--rule));
  font-family:var(--ui);font-size:12.5px;font-weight:600;color:color-mix(in srgb,var(--sc) 70%,var(--ink));
  box-shadow:0 3px 0 color-mix(in srgb,var(--sc) 35%,var(--rule-2));transition:transform .2s var(--spring)}
.gpractise:hover{transform:translateY(-2px)}
.gpractise:active{transform:translateY(2px);box-shadow:0 1px 0 color-mix(in srgb,var(--sc) 35%,var(--rule-2))}
.gflag{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;padding:12px 26px 14px;min-width:270px;max-width:92vw;
  background:linear-gradient(180deg,color-mix(in srgb,var(--sc) 82%,#fff),var(--sc));color:#fff;border-radius:14px;text-align:center;
  box-shadow:0 8px 0 color-mix(in srgb,var(--sc) 50%,#000),0 18px 24px -12px rgba(0,0,0,.5),inset 0 2px 0 rgba(255,255,255,.35);
  transition:transform .25s var(--spring)}
.mgate:hover .gflag{transform:translateY(-3px)}
.gpost{position:absolute;bottom:4px;width:190px;height:34px;border-left:5px solid color-mix(in srgb,var(--sc) 45%,#000);
  border-right:5px solid color-mix(in srgb,var(--sc) 45%,#000)}
.gk{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;opacity:.88}
.gn{font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.2}
.gs{font-family:var(--ui);font-size:12.5px;opacity:.95}
.gs b{font-family:var(--mono);font-size:14px;font-weight:600}
.gs2{font-family:var(--mono);font-size:11px;opacity:.9}
html[data-theme="night"] .gflag{color:#16150F}
.mend{position:absolute;left:50%;transform:translateX(-50%);z-index:2;font-family:var(--mono);font-size:11px;letter-spacing:.14em;
  text-transform:uppercase;color:var(--ink-3);white-space:nowrap}
.mend span{display:inline-block;padding:5px 14px;border:1px dashed var(--rule-2);border-radius:15px;background:var(--card)}
.mend.top span{border-style:solid;border-color:var(--ink-3);color:var(--ink)}

/* the rules, always in view */
.maprules{position:sticky;top:76px;display:flex;flex-direction:column;gap:14px;max-height:calc(100vh - 92px);overflow:auto;padding-bottom:4px}
.maprules .card{padding:18px}
.rulelist{list-style:none;margin:10px 0 12px;padding:0;display:flex;flex-direction:column;gap:9px}
.rulelist li{display:flex;gap:10px;align-items:center;font-family:var(--ui);font-size:14px;color:var(--ink-2)}
.rulelist .mstars{font-size:16px;flex:none}
.maprules p.small{margin-top:8px;line-height:1.6}
.mlegend .lg{display:flex;align-items:center;gap:10px;font-family:var(--ui);font-size:13px;color:var(--ink-2);padding:4px 0}
.mini{width:18px;height:18px;border-radius:50%;display:inline-block;flex:none}
.mini.st-now{background:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.mini.st-open{background:var(--s-ict);box-shadow:0 3px 0 color-mix(in srgb,var(--s-ict) 55%,#000)}
.mini.st-done{background:#E8AA2E;box-shadow:0 3px 0 #97640A}
.mini.st-soon{border:2px dashed var(--rule-2)}
.mini.gate{border-radius:5px;background:var(--s-phy)}
.maprules.in-sheet{position:static;max-height:none;overflow:visible}

@media (max-width:900px){
  .view.wide{padding:12px 0 110px}
  .mhead{top:0;position:relative;margin:0 12px;padding:10px 12px;gap:8px;grid-template-columns:minmax(0,1fr) auto}
  .mh-subj{grid-column:1/-1;grid-row:2}
  .mh-t h1{font-size:22px}
  .mh-subj{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -12px;padding:2px 12px}
  .mh-subj::-webkit-scrollbar{display:none}
  .mh-hint{display:none}
  .scene{margin-left:0;margin-right:0;border-radius:0}
  .mlabel{width:118px}
  .side-r .mlabel{left:calc(50% + 34px)}
  .side-l .mlabel{right:calc(50% + 34px)}
  .mt{font-size:12px}
  .mnode .disc{width:48px;height:48px;font-size:16px}
  .gflag{min-width:230px;padding:10px 18px 12px}
  .gn{font-size:17px}
}

/* ============================================================
   A CHAPTER: Learn, then Drill
   ============================================================ */
.ch-bn{font-family:var(--serif);font-size:18px;color:var(--ink-2);margin-top:-8px}
.chsum{display:flex;flex-direction:column;gap:4px}
.chsum-top{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap}
.chsum-facts{display:flex;gap:10px 22px;flex-wrap:wrap;font-family:var(--ui);font-size:14px;color:var(--ink-2)}
.chsum-facts b{font-family:var(--mono);font-size:18px;color:var(--ink);font-weight:600}
.startrack{position:relative;height:8px;border-radius:4px;background:var(--warm);margin:20px 10px 8px}
.startrack i{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(90deg,var(--accent),var(--star));transition:width .9s var(--ease)}
.startrack .mk{position:absolute;top:50%;transform:translate(-50%,-52%);font-size:22px;line-height:1;color:var(--rule-2);
  text-shadow:0 0 0 var(--card),0 0 4px var(--card)}
.startrack .mk.on{color:var(--star)}
.chtabs{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.chtabs button{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:14px 18px;border:1px solid var(--rule);
  border-radius:11px;background:var(--card);font-family:var(--ui);font-size:18px;font-weight:600;color:var(--ink-2);text-align:left;
  transition:border-color .2s,background .2s,transform .2s var(--ease)}
.chtabs button:hover{transform:translateY(-1px);border-color:var(--rule-2)}
.chtabs button i{font-style:normal;font-family:var(--mono);font-size:10.5px;letter-spacing:.08em;color:var(--ink-3)}
.chtabs button small{font-size:12.5px;font-weight:400;color:var(--ink-3)}
.chtabs button.on{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.chtabs button.on i{color:var(--accent)}
.learnhead{padding:2px}
.lgroups{display:flex;flex-direction:column;gap:10px}
.lgroup{border:1px solid var(--rule);border-radius:11px;background:var(--card);overflow:hidden;transition:border-color .2s}
.lgroup[open]{border-color:var(--rule-2)}
.lgroup summary{list-style:none;display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px 16px;cursor:pointer}
.lgroup summary::-webkit-details-marker{display:none}
.lgroup .ln{width:28px;height:28px;border-radius:50%;border:1px solid var(--rule-2);display:flex;align-items:center;justify-content:center;
  font-family:var(--mono);font-size:12px;color:var(--ink-3)}
.lgroup.done .ln{background:var(--ok);border-color:var(--ok);color:#fff}
.lgroup .lt{font-family:var(--serif);font-size:17px;font-weight:600;color:var(--ink);line-height:1.35}
.lgroup .lm{font-family:var(--mono);font-size:11px;color:var(--ink-3);white-space:nowrap}
.lbody{padding:0 18px 18px 58px}
.lpoints{margin:0;padding-left:18px;display:flex;flex-direction:column;gap:7px;font-size:16.5px;line-height:1.7}
.lpoints li::marker{color:var(--accent)}
.lex{margin-top:16px;padding:14px 16px;border-left:3px solid var(--accent);background:var(--quiet);border-radius:0 9px 9px 0;font-size:16px}
.lex .lq{margin-top:4px}
.lex .la{margin-top:8px}
.lex .lw{margin-top:6px;color:var(--ink-2);font-size:15.5px}
.next-step{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.next-step.ready{border-color:var(--ok);background:var(--ok-soft)}
.next-step .nt{font-size:16.5px;margin-top:4px}
.drillcard{display:flex;flex-direction:column;gap:12px;border-color:var(--accent)}
.drillstats{display:flex;flex-wrap:wrap;gap:8px 22px;font-family:var(--ui);font-size:13.5px;color:var(--ink-2)}
.drillstats b{font-family:var(--mono);font-size:16px;color:var(--ink);font-weight:600;margin-right:2px}
.soon-card{display:flex;flex-direction:column;gap:10px}
@media (max-width:560px){
  .lbody{padding:0 14px 16px}
  .chtabs button{font-size:15.5px;padding:12px 13px}
  .lgroup summary{grid-template-columns:28px minmax(0,1fr);}
  .lgroup .lm{grid-column:2}
}

/* ============================================================
   RESEARCH: a specification with plates
   ============================================================ */
.view.paper{max-width:1120px}
.caution{position:relative;border:2px solid #B04A38;background:#FBEDE6;color:#3E170E;padding:20px 24px 18px;border-radius:12px;overflow:hidden}
.caution::before{content:'';position:absolute;left:0;right:0;top:0;height:8px;
  background:repeating-linear-gradient(-45deg,#B04A38 0 10px,#F5D9CF 10px 20px)}
.c-head{display:flex;align-items:center;gap:10px;margin-top:6px;font-family:var(--ui);font-size:15px;letter-spacing:.14em;text-transform:uppercase}
.c-mark{width:28px;height:28px;border-radius:50%;background:#B04A38;color:#fff;display:flex;align-items:center;justify-content:center;
  font-weight:700;letter-spacing:0;font-family:var(--serif)}
.caution p{margin:9px 0 0;font-family:var(--serif);font-size:17.5px;line-height:1.6}
.caution p:first-of-type{font-size:20px;font-weight:600}
html[data-theme="night"] .caution{background:#2E1D18;border-color:#E08A76;color:#F3DAD0}
html[data-theme="night"] .caution::before{background:repeating-linear-gradient(-45deg,#E08A76 0 10px,#3A241D 10px 20px)}
html[data-theme="night"] .c-mark{background:#E08A76;color:#16150F}
.rs-head{margin-top:34px;padding-bottom:26px;border-bottom:1px solid var(--rule)}
.rs-meta{display:flex;justify-content:space-between;font-family:var(--mono);font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--ink-3);border-bottom:1px solid var(--rule);padding-bottom:8px;margin-bottom:24px}
.rs-head h1{font-size:44px;line-height:1.1;margin:8px 0 12px;letter-spacing:-.015em}
.rs-toc{columns:2;column-gap:36px;margin:20px 0 0;padding-left:22px;font-family:var(--ui);font-size:14px;color:var(--ink-3)}
.rs-toc li{margin:4px 0;break-inside:avoid}
.rs-toc a{color:var(--ink-2)}
.rs-toc a:hover{color:var(--accent)}
.rs-sec{padding:44px 0;border-bottom:1px solid var(--rule)}
.rs-num{font-family:var(--mono);font-size:12px;letter-spacing:.12em;color:var(--accent);margin-bottom:12px}
.rs-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);gap:38px;align-items:start}
.rs-body.flip .rs-fig{order:-1}
.rs-text h2{font-size:28px;line-height:1.2;margin:0 0 12px}
.rs-what,.rs-why{margin-top:14px}
.rs-what p,.rs-why p{margin:5px 0 0;font-size:17px;line-height:1.72}
.rs-src{margin-top:16px}
.rs-src summary{font-family:var(--ui);font-size:13px;font-weight:600;color:var(--accent);cursor:pointer}
.rs-src ul{margin:10px 0 0;padding-left:18px;font-family:var(--ui);font-size:13.5px;line-height:1.55;color:var(--ink-2)}
.rs-src li{margin:7px 0}
.rs-limits{padding:44px 0 10px}
.rs-limits h2{font-size:28px;margin:0 0 12px}
.rs-limits ul{font-size:17px;line-height:1.7;padding-left:20px}
.rs-limits li{margin:6px 0}
.plate{margin:0;border-radius:6px;overflow:hidden;box-shadow:0 1px 0 var(--rule),0 22px 34px -24px rgba(0,0,0,.5);transform:rotate(-.35deg)}
.rs-body.flip .plate{transform:rotate(.35deg)}
.plate svg{display:block;width:100%;height:auto}
.plate.patent svg{background:#FCFBF6}
.plate .pframe{fill:none;stroke:#111;stroke-width:1.2}
.plate .pl{fill:none;stroke:#111;stroke-width:1.4;stroke-linejoin:round;stroke-linecap:round}
.plate .pl.thick{stroke-width:3.2}
.plate .pl.fillh{fill:#111;fill-opacity:.14}
.plate .teeth{fill:none;stroke:#111;stroke-width:6}
.plate .hl{stroke:#111;stroke-width:.8}
.plate .lead{fill:none;stroke:#111;stroke-width:.8}
.plate .dot{fill:#111}
.plate .pnum{font-family:'Times New Roman',Georgia,serif;font-size:15px;font-style:italic;fill:#111}
.plate .plab{font-family:'IBM Plex Mono',ui-monospace,monospace;font-size:10.5px;fill:#333}
.plate .pfig{font-family:'Times New Roman',Georgia,serif;font-size:18px;font-weight:700;fill:#111;letter-spacing:.14em}
.plate .psheet{font-family:'Times New Roman',Georgia,serif;font-size:13px;font-style:italic;fill:#444}
.plate .pbig{font-family:'IBM Plex Mono',ui-monospace,monospace;font-size:24px;fill:#111}
.plate.sketch svg{background:radial-gradient(ellipse at 30% 22%,#F4E8CB 0,#E6D2A6 62%,#D6BC88 100%)}
.plate .sbg{fill:transparent}
.plate .sframe{fill:none;stroke:#8A6A44;stroke-width:.8;stroke-dasharray:2 4;opacity:.55}
.plate .ink{fill:none;stroke:#6B4423;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.plate .ink.bold{stroke-width:2.5}
.plate .ink.faint{stroke-width:1;opacity:.55}
.plate .ink.dash{stroke-dasharray:5 6}
.plate .strand{stroke-width:10;opacity:.82}
.plate .strand.s0{stroke:#6B4423}
.plate .strand.s1{stroke:#94693A}
.plate .strand.s2{stroke:#BC8C58}
.plate .hand{font-family:'Caveat','Segoe Script','Bradley Hand',cursive;font-size:21px;fill:#5A3A1E}
.plate .hand.sm{font-size:17.5px}
.plate .hand.mirror{opacity:.62}
@media (max-width:900px){
  .rs-body{grid-template-columns:1fr;gap:22px}
  .rs-body.flip .rs-fig{order:0}
  .rs-toc{columns:1}
  .rs-head h1{font-size:34px}
}

/* ---------- the top bar on a phone ---------- */
@media (max-width:900px){
  .top{height:auto;padding:8px 12px 8px;gap:8px}
  .top .prow .brand-mark{width:64px;height:16px}
  .togs{gap:4px}
  .tog{height:30px;padding:0 8px;font-size:10px;letter-spacing:.05em}
  .xpbox,.coinbox,.daysbox{height:32px}
  .xpcol{min-width:56px}
  body.focus .top .prow, body.focus .top .clock, body.focus .daysbox{display:none}
  body.focus .top{height:52px;flex-wrap:nowrap}
  body.focus .fbar{top:52px}
}
@media (max-width:560px){
  .xpn{display:none}
  .daysbox .lbl-long,.daysbox .cd{display:none}
  .xpbox{padding:0 8px 0 3px}
  .coinbox{padding:0 9px 0 4px}
}
@media (max-width:380px){
  .tog .d{display:none}
  .tog{padding:0 6px}
}
.plate .hand-cap{font-family:'Caveat','Segoe Script',cursive;font-size:18px;color:#5A3A1E;text-align:right;padding:0 16px 10px;margin-top:-6px;
  background:linear-gradient(180deg,transparent,#D8BF8C 10%,#D6BC88)}
.plate.sketch{background:#D6BC88}
html[data-theme="night"] .plate .hand-cap{color:#4A2F17}
/* numbers and names break the lines they sit on, as on a real patent sheet */
.plate .pnum,.plate .plab{paint-order:stroke fill;stroke:#FCFBF6;stroke-width:4px;stroke-linejoin:round}
.plate .hand{paint-order:stroke fill;stroke:rgba(236,220,182,.9);stroke-width:3px;stroke-linejoin:round}

/* the tick row shrinks rather than pushing the page sideways */
.ticks{max-width:100%}
.ticks i{flex:0 1 6px;min-width:2px}
@media (max-width:900px){
  .hero .left{align-self:stretch;width:100%}
  .qc-left{margin-left:0}
}

/* ============================================================
   E2 — ONE TOP BAR, SHARED WITH THE COMMUNITY SIDE

   The bar below is drawn the same way on /social/ (the WoWonder
   theme in drakkhak/). Height, colours, logo, the Learn/Community
   switch, the search pill and the profile disc must stay in step
   with drakkhak/stylesheet/drakkhak-bar.css.
   ============================================================ */
:root{--bar-h:64px;--r-lg:20px;--r-md:16px;--pill:#EBE9E0}
html[data-theme="night"]{--pill:#24231C}
.app{display:block}
.main{min-height:100vh}
.top{
  height:var(--bar-h);display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;
  padding:0 28px;background:var(--page);border-bottom:1px solid var(--rule);position:sticky;top:0;z-index:60;
}
@supports (backdrop-filter:blur(8px)){
  .top{background:color-mix(in srgb,var(--page) 88%,transparent);backdrop-filter:blur(12px)}
}
.tb-l,.tb-r{display:flex;align-items:center;gap:10px;min-width:0}
.tb-r{justify-content:flex-end;position:relative}
.top .brand{width:auto;padding:0;margin:0;border:0;gap:9px;flex:none}
.top .brand-mark{width:68px;height:17px}
.top .brand-name{font-family:'Newsreader',Georgia,serif;font-size:21px;font-weight:600;letter-spacing:-.01em}

/* Learn | Community — the jump between the two halves of the site */
.worlds{display:inline-flex;align-items:center;gap:2px;padding:3px;border-radius:999px;border:1px solid var(--rule);background:var(--card);flex:none}
.worlds a{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:999px;
  font-family:'Inter',var(--ui);font-size:13px;font-weight:500;color:var(--ink-2);transition:background .2s,color .2s}
.worlds a svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.worlds a:hover{color:var(--ink);background:var(--quiet)}
.worlds a.on{background:var(--ink);color:var(--page);font-weight:600}
.worlds a.on:hover{background:var(--ink);color:var(--page)}

/* the four places, a pill with a white thumb that slides */
.top .nav{justify-self:center;position:relative;flex-direction:row;align-items:center;gap:2px;padding:4px;border-radius:999px;background:var(--pill)}
.top .nav .ind{position:absolute;left:0;top:4px;bottom:4px;height:auto;width:0;border-radius:999px;background:var(--card);
  box-shadow:0 1px 2px rgba(20,20,19,.08),0 0 0 1px var(--rule);transition:transform .45s var(--spring),width .45s var(--spring),opacity .2s;opacity:0}
.top .nav a{position:relative;z-index:1;min-height:0;height:34px;padding:0 18px;border-radius:999px;gap:6px;
  font-family:'Inter',var(--ui);font-size:14.5px;color:var(--ink-2);transform:none!important}
.top .nav a:hover{color:var(--ink)}
.top .nav a.on{color:var(--ink);font-weight:600}
.top .nav a .tk{font-family:var(--mono);font-size:10px;min-width:17px;height:17px;line-height:17px;border-radius:9px;text-align:center;padding:0 4px}
.top .nav a .tk:empty{display:none}
.top .nav a .tk.acc{background:var(--accent);color:#FFF8F2}
html[data-theme="night"] .top .nav a .tk.acc{color:#16150F}

/* find a chapter */
.tsearch{position:relative;display:flex;align-items:center;gap:8px;height:38px;padding:0 14px;border-radius:999px;
  border:1px solid var(--rule);background:var(--card);color:var(--ink-3);min-width:0;flex:0 1 210px;transition:border-color .2s,box-shadow .2s}
.tsearch:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.tsearch svg{width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.tsearch input{border:0;background:transparent;outline:none;min-width:0;width:100%;font-family:'Inter',var(--ui);font-size:14px;color:var(--ink)}
.tsearch input::placeholder{color:var(--ink-3)}
.tsearch input::-webkit-search-cancel-button{display:none}
.tsres{position:absolute;top:44px;right:0;width:360px;max-width:80vw;padding:6px;border-radius:14px;border:1px solid var(--rule);
  background:var(--card);box-shadow:0 18px 40px -18px rgba(20,20,19,.4);z-index:80}
.tsres a{display:flex;flex-direction:column;gap:1px;padding:8px 10px;border-radius:9px;color:var(--ink)}
.tsres a:hover,.tsres a.hi{background:var(--quiet);color:var(--ink)}
.tsres b{font-family:var(--ui);font-size:14.5px;font-weight:600;line-height:1.35}
.tsres small{font-family:var(--ui);font-size:12px;color:var(--ink-3)}
.tsres .none{padding:10px;font-family:var(--ui);font-size:13.5px;color:var(--ink-3)}

/* coins, XP, days: E2 pills */
.xpbox,.coinbox,.daysbox{height:38px;border-radius:999px}
.xpbox .xpcol{min-width:62px}
.tog{height:30px;border-radius:999px;padding:0 10px;font-size:10px;letter-spacing:.07em}
.togs{gap:4px}

/* the profile disc and its menu */
.avatar{width:38px;height:38px;flex:none;border-radius:50%;background:var(--ink);color:var(--page);display:flex;align-items:center;justify-content:center;
  font-family:'Inter',var(--ui);font-size:15px;font-weight:600;transition:transform .25s var(--spring),box-shadow .2s}
.avatar svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}
.avatar:hover,.avatar.on{transform:scale(1.05);box-shadow:0 0 0 3px var(--accent-soft)}
.pmenu{position:absolute;top:50px;right:0;width:300px;padding:8px;border-radius:16px;border:1px solid var(--rule);background:var(--card);
  box-shadow:0 24px 50px -22px rgba(20,20,19,.45);z-index:90;animation:pmIn .22s var(--ease)}
html[data-theme="night"] .pmenu,html[data-theme="night"] .tsres{box-shadow:0 24px 50px -22px rgba(0,0,0,.8)}
@keyframes pmIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.pm-head{display:flex;flex-direction:column;gap:2px;padding:8px 10px 10px;border-bottom:1px solid var(--rule);margin-bottom:4px}
.pm-sub{font-size:11px;color:var(--ink-3)}
.pmenu a{display:flex;flex-direction:column;padding:9px 10px;border-radius:10px;color:var(--ink)}
.pmenu a:hover{background:var(--quiet);color:var(--ink)}
.pmenu a b{font-family:var(--ui);font-size:14.5px;font-weight:600;line-height:1.3}
.pmenu a small{font-family:var(--ui);font-size:12px;color:var(--ink-3);line-height:1.35}
.pm-foot{margin-top:4px;padding:10px 10px 4px;border-top:1px solid var(--rule);font-family:var(--ui);font-size:12px;line-height:1.5;color:var(--ink-3)}

/* in a set the pill and the search step back; the switches stay */
body.focus .top .nav, body.focus .tsearch{display:none}
body.focus .top{grid-template-columns:auto minmax(0,1fr)}
body.focus .fbar{top:var(--bar-h)}
body.welcoming .top .nav, body.welcoming .tsearch, body.welcoming .avatar{display:none}

/* the page itself: wider, softer cards */
.view{max-width:1232px;padding:32px 40px 120px}
.view.narrow{max-width:800px}
.card,.stat{border-radius:var(--r-md)}
.btn{border-radius:10px}
.btn.lg{height:56px;padding:0 34px;font-size:16px;border-radius:12px;box-shadow:0 10px 24px -12px color-mix(in srgb,var(--accent) 80%,transparent)}
.pill{display:inline-flex;align-items:center;gap:5px;font-family:var(--mono);font-size:10.5px;letter-spacing:.08em;text-transform:uppercase;
  color:var(--ink-2);border:1px solid var(--rule);border-radius:4px;padding:3px 8px;background:transparent;line-height:1.5}
a.pill:hover{border-color:var(--accent);color:var(--accent)}
.pill.no{background:var(--no-soft);border-color:var(--no-line);color:var(--no)}

/* ---------- Start (E2): the set, the road, three cards, the subjects ---------- */
.t-page{display:flex;flex-direction:column;gap:24px}
.t-top{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:24px}
.t-hero{padding:40px 44px;border-radius:var(--r-lg);background:var(--card);border:1px solid var(--rule);display:flex;flex-direction:column;gap:18px;min-width:0}
.t-where{font-family:var(--ui);font-size:15px;color:var(--ink-2)}
.t-title{font-family:var(--serif);font-size:56px;font-weight:600;line-height:1.12;letter-spacing:-.02em;margin-top:4px;overflow-wrap:anywhere}
.t-title.xl2{font-size:44px}
.t-title.xl3{font-size:36px}
.t-set{display:flex;flex-direction:column;gap:9px}
.pips{display:grid;grid-template-columns:repeat(var(--n),1fr);gap:5px;max-width:480px}
.pips i{height:22px;border-radius:4px;animation:pipIn .5s var(--spring) both;animation-delay:calc(var(--i)*25ms)}
.pips i.n,.t-legend i.n{background:var(--accent-soft);border:1px solid color-mix(in srgb,var(--accent) 45%,transparent)}
.pips i.b,.t-legend i.b{background:var(--ink)}
@keyframes pipIn{from{opacity:0;transform:scaleY(.3)}to{opacity:1;transform:none}}
.t-legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 18px;font-family:var(--ui);font-size:14px;color:var(--ink-2)}
.t-legend>span{display:inline-flex;align-items:center;gap:6px}
.t-legend i{display:inline-block;width:10px;height:10px;border-radius:2px}
.t-legend .stars{margin-left:auto}
.t-why{font-size:16.5px;line-height:1.6;color:var(--ink-2);max-width:60ch}
.t-go{display:flex;align-items:center;flex-wrap:wrap;gap:12px 22px;margin-top:4px}
.t-alt{font-family:var(--ui);font-size:15px;font-weight:600;color:var(--ink);border-bottom:1.5px solid var(--rule-2);padding-bottom:1px;transition:border-color .2s,color .2s}
.t-alt:hover{color:var(--accent-press);border-color:var(--accent)}

/* the road card is dark in both themes: a lamp on the desk */
.t-road{padding:30px 32px;border-radius:var(--r-lg);background:#141413;color:#FAF9F5;display:flex;flex-direction:column;gap:14px;min-width:0}
html[data-theme="night"] .t-road{background:#0E0D09;border:1px solid var(--rule)}
.t-road .kicker{color:#BAB8AE}
.t-maplink{font-family:var(--ui);font-size:14px;color:#F0B49C}
.t-maplink:hover{color:#FAF9F5}
.t-roadsvg{width:100%;height:auto;max-height:300px;display:block}
.t-roadsvg .rw{fill:none;stroke:#3A3935;stroke-width:16;stroke-linecap:round}
.t-roadsvg .rw.done{stroke:#D97757}
.t-roadsvg .rn{fill:#141413;stroke:#5E5D59;stroke-width:3}
.t-roadsvg .rn.soon{stroke-dasharray:4 4}
.t-roadsvg .rn.now{fill:#D97757;stroke:#F6E6DE;stroke-width:4}
.t-roadsvg .rt{font-family:'IBM Plex Mono',monospace;font-size:13px;fill:#BAB8AE}
.t-roadsvg .rt.now{font-size:17px;fill:#FFFFFF}
.t-roadsvg .rh{font-family:'IBM Plex Mono',monospace;font-size:11px;letter-spacing:1px;fill:#F0B49C}
.t-roadsvg .lm{fill:#3B2E14;stroke:#E2A12B;stroke-width:2}
.t-roadsvg .lmi{fill:none;stroke:#E2A12B;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.t-roadsvg .rn.now{animation:nowPulse 2.4s ease-in-out infinite;transform-origin:40px 260px}
@keyframes nowPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.07)}}
html.still .t-roadsvg .rn.now{animation:none}
.t-roadend{margin-top:auto;padding-top:16px;border-top:1px solid #2E2D2A}
.t-roadend h3{color:#FAF9F5;font-size:20px}
.t-roadsub{font-family:var(--ui);font-size:14px;color:#BAB8AE;margin-top:2px}

.t-three{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.t-card{padding:26px 28px;display:flex;flex-direction:column;gap:14px;min-width:0}
.t-card h3{font-size:20px}
.t-card>.btn{margin-top:auto}
.mrows{display:flex;flex-direction:column;gap:9px}
.mrow{display:grid;grid-template-columns:76px minmax(0,1fr) 28px;align-items:center;gap:10px}
.mrow .mono{font-size:13px;text-align:right;color:var(--ink)}
.mbar{height:8px;border-radius:999px;background:var(--warm);overflow:hidden}
.mbar i{display:block;height:8px;border-radius:999px;transition:width .9s var(--ease)}
.mbar i.a{background:var(--accent-press)}
.mbar i.b{background:color-mix(in srgb,var(--accent) 55%,var(--warm))}
.mbar i.c{background:color-mix(in srgb,var(--accent) 28%,var(--warm))}
.t-list{display:flex;flex-direction:column}
.t-item{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid var(--rule);color:var(--ink)}
.t-item:last-child{border-bottom:0}
.t-item:hover{color:var(--accent-press)}
.t-item .ino{font-family:var(--mono);font-size:12px;color:var(--ink-3);width:20px;flex:none}
.t-item .iname{flex:1;min-width:0;font-family:var(--ui);font-size:15px;line-height:1.35}
.t-item .sub{display:block;font-size:12.5px;color:var(--ink-3);margin-top:2px}
.t-item .chev{color:var(--ink-3);transition:transform .25s var(--ease)}
.t-item:hover .chev{transform:translateX(3px);color:var(--accent)}
.heat{display:grid;grid-template-rows:repeat(7,13px);grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px}
.heat span{border-radius:3px;background:var(--pill)}
.heat span.pad{background:transparent}
.heat .l1{background:color-mix(in srgb,var(--accent) 35%,var(--warm))}
.heat .l2{background:color-mix(in srgb,var(--accent) 65%,var(--warm))}
.heat .l3{background:var(--accent-press)}
.heat .td{box-shadow:inset 0 0 0 2px var(--accent-press)}
.t-card .small{margin-top:auto}

.t-subj{display:grid;grid-template-columns:repeat(7,minmax(0,1fr)) minmax(0,1.5fr);gap:20px;align-items:end;
  padding:22px 28px;border-radius:var(--r-md);border:1px solid var(--rule)}
.ts{display:grid;grid-template-columns:1fr auto;gap:2px 6px;text-align:left;min-width:0;padding:4px;margin:-4px;border-radius:8px;transition:background .2s}
.ts:hover{background:var(--card)}
.ts .label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ts .mono{font-size:13px;color:var(--ink)}
.ts .bar{grid-column:1/3;margin-top:4px}
.ts .bar i{background:var(--sc)}
.ts .sd{grid-column:1/3;font-family:var(--mono);font-size:10.5px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ts-all{display:flex;flex-direction:column;align-items:flex-end;text-align:right;gap:2px;min-width:0}
.ts-all .mono{font-size:22px;line-height:1.2;color:var(--ink);white-space:nowrap}
.ts-all .sd{font-family:var(--ui);font-size:12.5px;color:var(--ink-3)}

/* ---------- narrower screens ---------- */
@media (max-width:1640px){
  .tsearch{flex:0 0 38px;padding:0;justify-content:center;cursor:text}
  .tsearch input{position:absolute;opacity:0;width:1px}
  .tsearch:focus-within{flex:0 1 200px;padding:0 14px;justify-content:flex-start}
  .tsearch:focus-within input{position:static;opacity:1;width:100%}
  .xpbox .xpcol{display:none}
  .xpbox{padding:0 4px}
  .daysbox .cd{display:none}
}
@media (max-width:1360px) and (min-width:901px){
  .daysbox .lbl-long{display:none}
  .top .brand-name{display:none}
}
@media (max-width:1180px){
  .top .brand-name{display:none}
  .daysbox .lbl-long,.daysbox .cd{display:none}
  .t-three{grid-template-columns:repeat(2,minmax(0,1fr))}
  .t-three .t-card:last-child{grid-column:1/3}
  .t-subj{grid-template-columns:repeat(4,minmax(0,1fr))}
  .ts-all{grid-column:1/-1;flex-direction:row;align-items:baseline;justify-content:space-between;gap:12px;width:100%}
}
@media (max-width:1100px) and (min-width:901px){
  .top{padding:0 16px;gap:10px}
  .worlds a span{display:none}
  .worlds a{padding:0 9px}
  .top .nav a{padding:0 12px;font-size:14px}
  .xpbox{display:none}
}
@media (max-width:900px){
  :root{--bar-h:auto}
  .top{display:flex;flex-wrap:wrap;height:auto;padding:8px 12px;gap:8px}
  .tb-l{flex:1 1 auto}
  .tb-r{flex:1 1 100%;justify-content:space-between;gap:6px}
  .tsearch,.top .nav{display:none}
  .worlds a{padding:0 10px;height:30px}
  .top .brand-name{font-size:19px}
  .view{padding:20px 16px 110px}
  .t-top,.t-three{grid-template-columns:1fr}
  .t-three .t-card:last-child{grid-column:auto}
  .t-hero{padding:26px 22px}
  .t-title{font-size:38px}.t-title.xl2{font-size:32px}.t-title.xl3{font-size:27px}
  .t-road{padding:24px}
  .t-subj{grid-template-columns:repeat(2,minmax(0,1fr));padding:18px}
  .pmenu{position:fixed;top:auto;bottom:calc(64px + env(safe-area-inset-bottom));left:12px;right:12px;width:auto}
  body.focus .top{display:flex;flex-wrap:nowrap}
  body.focus .tb-l .worlds{display:none}
}
@media (max-width:560px){
  .worlds a span{display:none}
  .worlds a{padding:0 9px}
  .tb-r .avatar{position:absolute;right:0;top:-44px;width:36px;height:36px}
  .tb-r{gap:5px}
  .daysbox .donut{display:none}
  .daysbox{padding:0 10px}
  .tog .d{display:none}
  .tog{padding:0 8px}
  body.focus .tb-r .avatar{position:static}
  .t-go .btn{width:100%}
}

/* ---------- Practice (E2): the recommended set beside a chapter picker ---------- */
.p-top{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:24px}
.p-rec{padding:34px 36px;border-radius:var(--r-lg);background:var(--card);border:1.5px solid var(--accent);display:flex;flex-direction:column;gap:12px;min-width:0}
.p-rec h2{font-size:32px;line-height:1.2}
.p-note{font-size:15.5px;line-height:1.6;color:var(--ink-2)}
.p-pick{padding:28px;border-radius:var(--r-lg);display:flex;flex-direction:column;gap:14px;min-width:0}
.fld{display:flex;flex-direction:column;gap:6px;font-family:var(--ui);font-size:13px;color:var(--ink-2)}
.fld select{height:46px;border-radius:10px;border:1px solid var(--rule-2);background:var(--card);padding:0 12px;
  font-family:var(--ui);font-size:15px;color:var(--ink);width:100%;min-width:0}
.fld select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.p-pickgo{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:auto}
.p-pickgo .small{flex:1 1 100%}
.p-pickgo .small:empty{display:none}
.way{border-radius:var(--r-md)!important;padding:22px!important}
@media (max-width:900px){
  .p-top{grid-template-columns:1fr}
  .p-rec{padding:24px 22px}
  .p-rec h2{font-size:26px}
}


/* ============================================================
   OWNER'S SWITCHES — set in the admin panel, applied by js/site.js
   through attributes on <html>. With nothing set, nothing here changes
   the page.
   ============================================================ */
.view{zoom:var(--view-zoom,1)}
html[data-width="wide"] body:not(.focus) .view:not(.narrow){max-width:1520px}
html[data-width="full"] body:not(.focus) .view:not(.narrow){max-width:none}
html[data-density="compact"] .view{padding-top:20px}
html[data-density="compact"] .t-page{gap:14px}
html[data-density="compact"] .t-top,html[data-density="compact"] .t-three{gap:14px}
html[data-density="compact"] .t-hero{padding:26px 30px;gap:12px}
html[data-density="compact"] .t-road{padding:20px 24px}
html[data-density="compact"] .t-card{padding:18px 20px;gap:10px}
html[data-density="roomy"] .t-page{gap:36px}
html[data-density="roomy"] .t-top,html[data-density="roomy"] .t-three{gap:36px}
html[data-density="roomy"] .t-hero{padding:56px 60px;gap:24px}
html[data-corners="sharp"]{--r-lg:6px;--r-md:4px;--radius:3px}
html[data-corners="sharp"] .btn{border-radius:4px}
html[data-corners="round"]{--r-lg:34px;--r-md:26px;--radius:16px}
html[data-corners="round"] .btn{border-radius:999px}

html[data-hide~="community"] .worlds,
html[data-hide~="search"] .tsearch,
html[data-hide~="xp"] .xpbox,
html[data-hide~="coins"] .coinbox,
html[data-hide~="days"] .daysbox,
html[data-hide~="sound"] #soundBtn,
html[data-hide~="timer"] #timerBtn,
html[data-hide~="night"] #nightBtn{display:none!important}

/* a message from the owner, and the closed sign */
.snotice{display:flex;align-items:center;gap:14px;padding:11px 28px;font-family:var(--ui);font-size:15px;line-height:1.45;color:var(--ink);
  background:var(--accent-soft);border-bottom:1px solid color-mix(in srgb,var(--accent) 35%,transparent)}
.snotice.tone-info{background:var(--quiet);border-bottom-color:var(--rule)}
.snotice.tone-warn{background:var(--no-soft);border-bottom-color:var(--no-line)}
.sn-t{flex:1;min-width:0}
.sn-a{font-weight:600;color:var(--ink);border-bottom:1.5px solid currentColor;flex:none}
.sn-x{font-size:20px;line-height:1;color:var(--ink-2);padding:2px 6px;flex:none}
.sn-x:hover{color:var(--ink)}
body.focus .snotice{display:none}
#siteClosed{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--page);color:var(--ink);text-align:center}
.sc-in{max-width:520px;display:flex;flex-direction:column;align-items:center;gap:14px}
.sc-in h1{font-family:'Newsreader',var(--serif);font-size:42px;font-weight:600;line-height:1.15;letter-spacing:-.01em}
.sc-in p{font-family:var(--ui);font-size:17px;line-height:1.6;color:var(--ink-2)}
body.site-closed{overflow:hidden}

/* ---------- where the places sit (phones always keep the bottom tab bar) ---------- */
.tabbar .tico{display:none;width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media (max-width:900px){
  .tabbar{grid-template-columns:repeat(var(--tabs,5),1fr)}
  .tabbar .ind{width:calc(100%/var(--tabs,5))}
}
@media (min-width:901px){
  html[data-nav="left"] .top .nav,html[data-nav="mini"] .top .nav,html[data-nav="right"] .top .nav,html[data-nav="dock"] .top .nav{display:none}
  html:not([data-nav="top"]):not([data-nav=""]) .top{grid-template-columns:auto minmax(0,1fr)}
  html[data-nav="left"],html[data-nav="right"]{--rail:216px}
  html[data-nav="mini"]{--rail:84px}
  html[data-nav="left"] .tabbar,html[data-nav="mini"] .tabbar,html[data-nav="right"] .tabbar{
    display:flex;flex-direction:column;gap:4px;position:fixed;top:64px;bottom:0;width:var(--rail);padding:18px 12px;background:var(--page);z-index:50}
  html[data-nav="left"] .tabbar,html[data-nav="mini"] .tabbar{left:0;border-right:1px solid var(--rule)}
  html[data-nav="right"] .tabbar{right:0;border-left:1px solid var(--rule)}
  html[data-nav="left"] body:not(.focus) .main,html[data-nav="mini"] body:not(.focus) .main{margin-left:var(--rail)}
  html[data-nav="right"] body:not(.focus) .main{margin-right:var(--rail)}
  /* the bar still runs the whole width, over the rail */
  html[data-nav="left"] body:not(.focus) .top,html[data-nav="mini"] body:not(.focus) .top{margin-left:calc(var(--rail)*-1)}
  html[data-nav="right"] body:not(.focus) .top{margin-right:calc(var(--rail)*-1)}
  html[data-nav] .tabbar .ind,html[data-nav] .tabbar .code{display:none}
  html[data-nav] .tabbar a{position:relative;display:flex;align-items:center;gap:12px;font-family:'Inter',var(--ui);font-size:14.5px;color:var(--ink-2);transition:background .2s,color .2s}
  html[data-nav] .tabbar a .tico{display:block}
  html[data-nav] .tabbar a:hover{color:var(--ink);background:var(--quiet)}
  html[data-nav] .tabbar .tk{margin-left:auto;min-width:18px;height:18px;line-height:18px;padding:0 5px;border-radius:9px;text-align:center;background:var(--accent);color:#FFF8F2;font-family:var(--mono);font-size:10px}
  html[data-nav="left"] .tabbar a,html[data-nav="right"] .tabbar a{height:46px;padding:0 14px;border-radius:12px}
  html[data-nav="left"] .tabbar a.on,html[data-nav="right"] .tabbar a.on,html[data-nav="mini"] .tabbar a.on{background:var(--card);box-shadow:0 0 0 1px var(--rule);color:var(--ink);font-weight:600}
  html[data-nav="mini"] .tabbar a{flex-direction:column;justify-content:center;gap:4px;height:62px;padding:0;border-radius:14px;font-size:11px}
  html[data-nav="mini"] .tabbar .tk{position:absolute;top:4px;right:6px;margin:0}
  html[data-nav="dock"] .tabbar{display:flex;gap:2px;position:fixed;left:50%;bottom:18px;transform:translateX(-50%);padding:6px;border-radius:999px;
    background:var(--card);border:1px solid var(--rule);box-shadow:0 18px 40px -16px rgba(20,20,19,.45);z-index:70}
  html[data-nav="dock"] .tabbar a{height:44px;padding:0 20px;border-radius:999px;gap:9px}
  html[data-nav="dock"] .tabbar a.on,html[data-nav="dock"] .tabbar a.on:hover{background:var(--ink);color:var(--page);font-weight:600}
  html[data-nav="top"] .tabbar{display:none}
}

/* ---------- how Start is arranged ---------- */
.t-top.n1,.t-three.n1{grid-template-columns:minmax(0,1fr)}
.t-top.even{grid-template-columns:repeat(2,minmax(0,1fr))}
.t-three.n2{grid-template-columns:repeat(2,minmax(0,1fr))}
.t-three.n1 .t-card:last-child,.t-three.n2 .t-card:last-child{grid-column:auto}
/* the road laid out wide, for the arrangements that give it a whole row */
.l-road>.t-road,.l-custom>.t-road{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);align-items:center;gap:8px 28px}
.l-road>.t-road>.spread,.l-custom>.t-road>.spread{grid-column:1/-1}
.l-road>.t-road .t-roadsvg,.l-custom>.t-road .t-roadsvg{max-height:210px}
.l-road>.t-road .t-roadend,.l-custom>.t-road .t-roadend{margin:0;border:0;padding:0}
.l-custom .t-hero{align-items:flex-start}
/* a list: three things in order, numbered */
.l-list{max-width:900px;margin:0 auto;width:100%}
.l-step{display:grid;grid-template-columns:44px minmax(0,1fr);gap:18px}
.l-no{width:44px;height:44px;border-radius:50%;background:var(--ink);color:var(--page);display:flex;align-items:center;justify-content:center;font-family:var(--mono);font-size:16px;margin-top:6px}
.l-body{min-width:0}
.l-list .t-title{font-size:42px}.l-list .t-title.xl2{font-size:36px}.l-list .t-title.xl3{font-size:30px}
.l-list .t-subj{grid-template-columns:repeat(3,minmax(0,1fr))}
.l-list .ts-all{grid-column:1/-1;flex-direction:row;align-items:baseline;justify-content:space-between;gap:12px;width:100%}
/* subjects first: the seven get the room */
.l-subjects>.t-subj{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px 28px;padding:26px 30px;background:var(--card)}
.l-subjects>.t-subj .ts-all{align-items:flex-start;text-align:left}
/* three columns, the set in the middle */
.l-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.55fr) minmax(0,1fr);gap:24px;align-items:start}
.l-col{display:flex;flex-direction:column;gap:24px;min-width:0}
.l-columns>.t-subj{grid-column:1/-1}
.l-columns .t-hero{padding:32px}
.l-columns .t-title{font-size:40px}.l-columns .t-title.xl2{font-size:34px}.l-columns .t-title.xl3{font-size:28px}
/* split screen: the set stays put while the rest scrolls */
.l-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:start}
.l-left{position:sticky;top:88px;min-width:0}
.l-left .t-hero{min-height:calc(100vh - 150px);justify-content:center}
.l-right{display:flex;flex-direction:column;gap:24px;min-width:0}
.l-right .t-subj{grid-template-columns:repeat(2,minmax(0,1fr))}
.l-right .ts-all{grid-column:1/-1;flex-direction:row;align-items:baseline;justify-content:space-between;gap:12px;width:100%}
/* tabs: one thing under the set at a time */
.l-tabs-bar{display:flex;flex-wrap:wrap;gap:4px;padding:4px;border-radius:14px;background:var(--pill);width:fit-content;max-width:100%}
.l-tabs-bar button{height:38px;padding:0 18px;border-radius:10px;font-family:'Inter',var(--ui);font-size:14.5px;color:var(--ink-2);transition:background .2s,color .2s}
.l-tabs-bar button:hover{color:var(--ink)}
.l-tabs-bar button.on{background:var(--card);color:var(--ink);font-weight:600;box-shadow:0 1px 2px rgba(20,20,19,.08),0 0 0 1px var(--rule)}
.l-panel>.t-road{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);align-items:center;gap:8px 28px}
.l-panel>.t-road>.spread{grid-column:1/-1}
.l-panel>.t-road .t-roadsvg{max-height:230px}
.l-panel>.t-road .t-roadend{margin:0;border:0;padding:0}
/* the number strip */
.l-numstrip{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border:1px solid var(--rule);border-radius:var(--r-md);background:var(--card);overflow:hidden}
.ns{display:flex;flex-direction:column;gap:3px;padding:18px 20px;border-left:1px solid var(--rule);min-width:0}
.ns:first-child{border-left:0}
.ns b{font-family:var(--mono);font-size:30px;font-weight:500;line-height:1.1;color:var(--ink)}
.ns span{font-family:var(--ui);font-size:13px;line-height:1.3;color:var(--ink-3)}
/* one thing only */
.l-focus{max-width:860px;margin:7vh auto 0;width:100%}
.l-focus .t-hero{padding:56px 60px;align-items:center;text-align:center}
.l-focus .pips,.l-focus .t-why{margin-left:auto;margin-right:auto}
.l-focus .t-legend,.l-focus .t-go{justify-content:center}
.l-focus .t-legend .stars{margin-left:0}
@media (max-width:1180px) and (min-width:901px){
  .l-columns{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr)}
  .l-columns .l-col:last-of-type{grid-column:1/-1;flex-direction:row}
  .l-columns .l-col:last-of-type>*{flex:1 1 0;min-width:0}
  .l-numstrip{grid-template-columns:repeat(3,minmax(0,1fr))}
  .ns:nth-child(4){border-left:0}
}
@media (max-width:900px){
  .snotice{padding:10px 14px;font-size:14px}
  .t-top.even,.t-three.n2,.l-columns,.l-split,.l-road>.t-road,.l-custom>.t-road,.l-panel>.t-road{grid-template-columns:minmax(0,1fr)}
  .l-left{position:static}
  .l-left .t-hero{min-height:0}
  .l-step{grid-template-columns:minmax(0,1fr);gap:8px}
  .l-no{width:32px;height:32px;font-size:13px;margin:0}
  .l-subjects>.t-subj,.l-list .t-subj{grid-template-columns:repeat(2,minmax(0,1fr))}
  .l-numstrip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ns:nth-child(odd){border-left:0}
  .ns{border-top:1px solid var(--rule);padding:14px 16px}
  .ns:nth-child(-n+2){border-top:0}
  .ns b{font-size:24px}
  .l-focus{margin-top:12px}
  .l-focus .t-hero{padding:30px 22px}
}


/* ============================================================
   LOVE AND COMMENTS, THE SHOP, CAPTIVATING MODE
   ============================================================ */
/* the line under each option, after it has been answered */
.osoc{display:flex;align-items:center;gap:8px;margin:-4px 2px 10px;min-height:30px;flex-wrap:wrap}
.osgrow{flex:1}
.oslove,.oscom{display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 10px;border-radius:999px;border:1px solid var(--rule);background:var(--card);
  font-family:var(--mono);font-size:12px;color:var(--ink-2);transition:border-color .15s,color .15s,background .15s}
.oslove:hover,.oscom:hover{border-color:var(--ink-3);color:var(--ink)}
.oslove svg,.oscom svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linejoin:round}
.oslove b,.oscom b{font-weight:500}
.oslove.on{color:var(--no);border-color:var(--no-line);background:var(--no-soft)}
.oslove.on svg{fill:currentColor}
.oscrowd{position:relative;flex:1 1 150px;max-width:260px;height:24px;border-radius:7px;background:var(--quiet);overflow:hidden;display:flex;align-items:center;padding:0 9px}
.oscrowd i{position:absolute;left:0;top:0;bottom:0;background:var(--accent-soft);transition:width .9s var(--ease)}
.oscrowd b{position:relative;font-family:var(--ui);font-size:12.5px;font-weight:500;color:var(--ink-2);white-space:nowrap}
/* a thread */
.sc{display:flex;flex-direction:column;gap:12px;text-align:left}
.sc-tabs{display:flex;gap:6px;padding-right:34px}
.sc-tabs button{width:38px;height:34px;border-radius:9px;border:1px solid var(--rule);font-family:var(--serif);font-size:15px;color:var(--ink-2)}
.sc-tabs button.on{background:var(--ink);border-color:var(--ink);color:var(--page)}
.sc-opt{display:flex;gap:10px;padding:10px 12px;border-radius:10px;background:var(--quiet);font-size:15.5px;line-height:1.5}
.sc-opt .key{font-weight:700;color:var(--accent-press)}
.sc-list{max-height:44vh;overflow:auto;display:flex;flex-direction:column;gap:14px;padding:2px}
.scm{display:flex;gap:10px;align-items:flex-start}
.scav{flex:none;width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:19px;background:var(--quiet);box-shadow:0 0 0 1px var(--rule)}
.scb{flex:1;min-width:0}
.scw{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;font-family:var(--ui);font-size:13px}
.scw b{font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.scw i{font-style:normal;font-size:11.5px;padding:0 6px;border-radius:4px;background:var(--accent-soft);color:var(--accent-press)}
.scw span{font-size:12px;color:var(--ink-3)}
.scw em{font-style:normal;font-size:12px;color:var(--gold)}
.scb p{font-family:var(--ui);font-size:15px;line-height:1.5;margin-top:2px;white-space:pre-wrap;overflow-wrap:anywhere}
.sca{font-family:var(--ui);font-size:12px;color:var(--ink-3);margin-top:2px}
.sca:hover{color:var(--no)}
.sc-form{display:flex;flex-direction:column;gap:8px;padding-top:10px;border-top:1px solid var(--rule)}
.sc-form textarea{width:100%;padding:10px 12px;border-radius:10px;border:1px solid var(--rule-2);background:var(--page);color:var(--ink);font-family:var(--ui);font-size:15px;line-height:1.45;resize:vertical}
.sc-form textarea:focus,.sc-send input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.sc-send{display:flex;gap:8px;align-items:center}
.sc-send input{flex:1;min-width:0;height:36px;padding:0 11px;border-radius:9px;border:1px solid var(--rule-2);background:var(--page);color:var(--ink);font-family:var(--ui);font-size:14px}
.sc-err{font-family:var(--ui);font-size:13px;color:var(--no);background:var(--no-soft);border-radius:8px;padding:8px 11px}

/* the shop's new shelves */
.shopitem.locked{opacity:.72}
.lvtag{display:block;font-family:var(--mono);font-size:11px;color:var(--ink-3);line-height:1.5}
.skinchip{display:inline-block;width:30px;height:30px;border-radius:50%;box-shadow:inset 0 0 0 2px rgba(255,255,255,.35)}
.framechip{display:inline-block;width:30px;height:30px;border-radius:50%;background:var(--quiet);box-shadow:0 0 0 2px var(--rule-2)}
.framechip.frame-brass{box-shadow:0 0 0 2px #B79350}.framechip.frame-jade{box-shadow:0 0 0 2px #6E9B7C}.framechip.frame-ember{box-shadow:0 0 0 2px var(--accent)}
.framechip.frame-gold{box-shadow:0 0 0 3px #D6A520}.framechip.frame-royal{box-shadow:0 0 0 3px #7A4B94,0 0 0 5px #D6A520}
.crest.frame-gold{border-color:#D6A520;box-shadow:inset 0 0 0 1px #F0DC97}
.crest.frame-royal{border-color:#7A4B94;box-shadow:inset 0 0 0 2px #D6A520}
.ring-brass{box-shadow:0 0 0 2px #B79350}.ring-jade{box-shadow:0 0 0 2px #6E9B7C}.ring-ember{box-shadow:0 0 0 2px var(--accent)}
.ring-gold{box-shadow:0 0 0 3px #D6A520}.ring-royal{box-shadow:0 0 0 2px #7A4B94,0 0 0 4px #D6A520}
.avatar .av-art{font-size:21px;line-height:1}
.avatar[class*="ring-"]:not(.ring-plain){background:var(--card)}
.funbit{position:fixed;font-size:20px;pointer-events:none;z-index:95}
html[data-skin="emerald"][data-skin]{--accent:#2F7F6B;--accent-press:#256655;--accent-soft:color-mix(in srgb,#2F7F6B 16%,var(--card))}
html[data-skin="river"][data-skin]{--accent:#2B6CA3;--accent-press:#235887;--accent-soft:color-mix(in srgb,#2B6CA3 16%,var(--card))}
html[data-skin="plum"][data-skin]{--accent:#7A4B94;--accent-press:#633B79;--accent-soft:color-mix(in srgb,#7A4B94 16%,var(--card))}
html[data-skin="marigold"][data-skin]{--accent:#B8741A;--accent-press:#965E14;--accent-soft:color-mix(in srgb,#B8741A 16%,var(--card))}
html[data-skin="rose"][data-skin]{--accent:#B8456B;--accent-press:#973757;--accent-soft:color-mix(in srgb,#B8456B 16%,var(--card))}

/* ---------- Captivating: today's strip ---------- */
.fstrip{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px}
.fs-cell{flex:1 1 170px;min-width:0;display:flex;align-items:center;gap:11px;min-height:66px;padding:10px 15px;border-radius:var(--r-md);border:1px solid var(--rule);background:var(--card);
  text-align:left;color:var(--ink);transition:transform .25s var(--spring),border-color .15s}
a.fs-cell:hover,button.fs-cell:not(:disabled):hover{transform:translateY(-2px);border-color:var(--ink-3);color:var(--ink)}
.fs-cell b{display:block;font-family:var(--ui);font-size:14.5px;font-weight:600;line-height:1.3}
.fs-cell small{display:block;font-family:var(--ui);font-size:12.5px;color:var(--ink-3);line-height:1.35}
.fs-cell.ready{border-color:var(--accent);background:var(--accent-soft)}
.fs-cell.ready small{color:var(--accent-press);font-weight:500}
.fs-cell:disabled{cursor:default}
.fs-spin svg{width:30px;height:30px;flex:none;fill:none;stroke:var(--accent-press);stroke-width:1.5}
.fs-spin.done svg,.fs-spin:disabled svg{stroke:var(--ink-3)}
.fs-art,.fs-flame{font-size:27px;line-height:1;flex:none}
.fs-flame:not(.lit){filter:grayscale(1);opacity:.45}
.fs-dots{display:flex;gap:3px;margin-top:4px}
.fs-dots i{width:13px;height:6px;border-radius:2px;background:var(--pill)}
.fs-dots i.on{background:var(--accent-press)}
.fs-dots i.now:not(.on){box-shadow:inset 0 0 0 1.5px var(--accent-press);background:transparent}
.fs-rings{display:flex;gap:2px;flex:none}
.fs-rings .donut{width:22px;height:22px}
.fs-pulse{width:11px;height:11px;margin:0 7px;border-radius:50%;background:var(--ok);flex:none;animation:fsPulse 2s infinite}
@keyframes fsPulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--ok) 55%,transparent)}70%{box-shadow:0 0 0 10px transparent}100%{box-shadow:0 0 0 0 transparent}}
.fres{margin:6px 0 2px}

/* the wheel */
.spinsheet{align-items:center}
.spinwrap{position:relative;width:min(320px,76vw);margin:8px auto 4px}
.spinwheel{display:block;width:100%;height:auto;transition:transform 3.5s cubic-bezier(.16,.86,.2,1);filter:drop-shadow(0 12px 22px rgba(20,20,19,.24))}
.spinwheel path{stroke:var(--card);stroke-width:2}
.spinwheel .w0{fill:var(--accent-soft)}.spinwheel .w1{fill:var(--warm)}.spinwheel .wr{fill:var(--accent)}
.spinwheel text{font-family:'Inter',var(--ui);font-size:12.5px;font-weight:600;fill:var(--ink)}
.spinwheel .wc{fill:var(--ink);stroke:var(--card);stroke-width:4}
.spinpin{position:absolute;left:50%;top:-6px;z-index:1;margin-left:-11px;width:0;height:0;border-left:11px solid transparent;border-right:11px solid transparent;border-top:20px solid var(--ink)}

/* a run of right answers */
.funbanner{position:fixed;left:50%;top:26%;z-index:96;pointer-events:none;padding:10px 26px;border-radius:999px;background:var(--ink);color:var(--page);
  font-family:'Newsreader',var(--serif);font-size:27px;font-weight:600;white-space:nowrap;animation:funBanner 1.5s var(--spring) both}
.funbanner.big{font-size:42px;padding:14px 38px;background:var(--accent-press);color:#FFF8F2}
@keyframes funBanner{0%{opacity:0;transform:translate(-50%,16px) scale(.7)}18%{opacity:1;transform:translate(-50%,0) scale(1)}78%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,-14px) scale(.96)}}
html[data-fun] body[data-heat="1"].focus .qcard{box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 45%,transparent)}
html[data-fun] body[data-heat="2"].focus .qcard{box-shadow:0 0 0 2px var(--accent),0 12px 34px -12px var(--accent)}
html[data-fun] body[data-heat="3"].focus .qcard{box-shadow:0 0 0 3px var(--accent),0 0 46px -6px var(--accent);animation:funHeat 1.6s ease-in-out infinite}
@keyframes funHeat{50%{box-shadow:0 0 0 3px var(--star),0 0 56px -4px var(--star)}}

/* the league */
.lgjoin{display:flex;flex-direction:column;gap:12px;max-width:520px}
.lgbox{padding:8px 16px}
.lgr{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--rule)}
.lgr:last-child{border-bottom:0}
.lgr.me{background:var(--accent-soft);margin:0 -16px;padding-left:16px;padding-right:16px}
.lgn{width:30px;text-align:center;font-family:var(--mono);font-size:14px;color:var(--ink-2);flex:none}
.lgr.podium .lgn{font-size:22px}
.lgw{flex:1;min-width:0;font-family:var(--ui)}
.lgw b{display:block;font-size:15px;font-weight:600;overflow-wrap:anywhere}
.lgw i{font-style:normal;font-size:12px;color:var(--accent-press)}
.lgx{font-family:var(--mono);font-size:13.5px;white-space:nowrap}
.lggap{height:10px;border-bottom:1px dashed var(--rule-2)}

/* ---------- Captivating: the page comes alive ---------- */
html[data-fun="motion"] .t-hero{position:relative;overflow:hidden;isolation:isolate}
html[data-fun="motion"] .t-hero::before{content:'';position:absolute;z-index:-1;width:60%;aspect-ratio:1;right:-16%;top:-34%;border-radius:50%;
  background:radial-gradient(circle,color-mix(in srgb,var(--accent) 24%,transparent),transparent 68%);animation:funGlow 7s ease-in-out infinite alternate}
@keyframes funGlow{to{transform:translate(-26%,22%) scale(1.25)}}
html[data-fun="motion"] .t-go .btn.lg{position:relative;overflow:hidden}
html[data-fun="motion"] .t-go .btn.lg::after{content:'';position:absolute;top:0;bottom:0;left:-40%;width:30%;transform:skewX(-20deg);background:rgba(255,255,255,.34);animation:funShine 3.6s ease-in-out infinite}
@keyframes funShine{0%,55%{left:-40%}100%{left:130%}}
html[data-fun="motion"] .t-card,html[data-fun="motion"] .ts,html[data-fun="motion"] .t-road{transition:transform .3s var(--spring),box-shadow .3s}
html[data-fun="motion"] .t-card:hover,html[data-fun="motion"] .t-road:hover{transform:translateY(-4px);box-shadow:0 18px 36px -22px rgba(20,20,19,.45)}
html[data-fun="motion"] .pips i.n{animation:pipIn .5s var(--spring) both,funPip 3.2s ease-in-out infinite;animation-delay:calc(var(--i)*25ms),calc(var(--i)*130ms)}
@keyframes funPip{0%,88%,100%{transform:none}94%{transform:translateY(-3px)}}
html[data-fun="motion"] .fs-cell.ready{animation:funReady 2.4s ease-in-out infinite}
@keyframes funReady{50%{box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 22%,transparent)}}
html[data-fun="motion"] .fs-flame.lit{animation:funFlame 1.4s ease-in-out infinite;transform-origin:50% 85%}
@keyframes funFlame{50%{transform:scale(1.13) rotate(-3deg)}}
html[data-fun="motion"] .coinbox .coin{animation:funCoin 5s ease-in-out infinite}
@keyframes funCoin{0%,86%,100%{transform:none}93%{transform:rotateY(180deg)}}
html.still .funbanner,html.still[data-fun] *,html.still[data-fun] *::before,html.still[data-fun] *::after{animation:none!important}
@media (prefers-reduced-motion:reduce){
  html[data-fun] *,html[data-fun] *::before,html[data-fun] *::after{animation:none!important}
  .spinwheel{transition:none}
}
@media (max-width:900px){
  .fstrip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:14px}
  .fs-cell{padding:9px 11px;gap:8px;min-height:60px}
  .fs-rings .donut:nth-child(n+2){display:none}
  .funbanner{font-size:22px}.funbanner.big{font-size:30px;padding:11px 26px}
  .oscrowd{flex-basis:100%;max-width:none;order:-1}
}

/* ============================================================
   THE LEFT SIDEBAR (Learn): the places, the subjects, the research
   page. Drawn like the community side's sidebar, so the two halves of
   the site feel like one. Phones keep the bottom tab bar instead.
   ============================================================ */
.lside{display:none}
@media (min-width:901px){
  html[data-nav="left"]{--rail:244px}
  html[data-nav="left"] .tabbar{display:none!important}
  html[data-nav="left"] body:not(.focus):not(.welcoming) .lside{
    display:flex;flex-direction:column;gap:14px;position:fixed;left:0;top:var(--bar-h,64px);bottom:0;width:var(--rail);
    padding:16px 12px 18px;background:var(--page);border-right:1px solid var(--rule);overflow-y:auto;z-index:50;scrollbar-width:thin}
  html[data-nav="left"] body.welcoming .main{margin-left:0}
  html[data-nav="left"] body.welcoming .top{margin-left:0}
  /* the four places stay in the sidebar, not in a pill in the bar */
  html[data-nav="left"] .top .nav{display:none}
}
.ls-nav{display:flex;flex-direction:column;gap:2px}
.ls-nav a{display:flex;align-items:center;gap:12px;height:42px;padding:0 12px;border-radius:10px;
  font-family:'Inter',var(--ui);font-size:14.5px;color:var(--ink-2);transition:background .2s,color .2s}
.ls-nav a svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ls-nav a:hover{background:var(--quiet);color:var(--ink)}
.ls-nav a.on{background:var(--accent-soft);color:var(--accent-press);font-weight:600}
html[data-theme="night"] .ls-nav a.on{color:var(--accent)}
.ls-nav .nm{flex:1;min-width:0}
.ls-nav .tk{font-family:var(--mono);font-size:10.5px;color:var(--ink-3)}
.ls-nav .tk:empty{display:none}
.ls-nav .tk.acc{min-width:20px;height:20px;line-height:20px;padding:0 6px;border-radius:10px;text-align:center;background:var(--accent);color:#FFF8F2}
html[data-theme="night"] .ls-nav .tk.acc{color:#16150F}
.ls-nav .tk.coin{color:var(--gold);font-weight:600}
.ls-subj{display:flex;flex-direction:column;gap:2px;padding-top:12px;border-top:1px solid var(--rule)}
.ls-subj .side-label{display:flex;justify-content:space-between;border:0;padding:0 10px 4px;margin:0}
.ls-subj .side-label span{font-weight:500}
.ls-subj .subj{padding:6px 10px;border-radius:10px;width:100%;text-align:left}
.ls-foot{margin-top:auto;display:flex;align-items:center;gap:11px;padding:12px;border-radius:12px;border:1px solid var(--rule);
  background:var(--card);color:var(--ink-2);transition:border-color .2s}
.ls-foot svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.ls-foot b{display:block;font-family:var(--ui);font-size:13.5px;color:var(--ink)}
.ls-foot small{display:block;font-family:var(--ui);font-size:11.5px;color:var(--ink-3)}
.ls-foot:hover,.ls-foot.on{border-color:var(--accent);color:var(--accent)}

/* the mixed set on Start: each subject and the chapter it is on */
.t-mixes{display:flex;flex-direction:column;border-top:1px solid var(--rule)}
.t-mix{display:grid;grid-template-columns:10px 96px minmax(0,1fr);align-items:center;gap:10px;padding:7px 2px;border-bottom:1px solid var(--rule);
  font-family:var(--ui);font-size:13.5px;color:var(--ink-2);transition:background .2s}
.t-mix:hover{background:var(--quiet);color:var(--ink)}
.t-mix i{width:9px;height:9px;border-radius:50%;background:var(--sc)}
.t-mix b{color:var(--ink);font-weight:600}
.t-mix span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.t-mix .stars{font-size:12px}
@media (max-width:600px){ .t-mix{grid-template-columns:10px 80px minmax(0,1fr)} .t-mix .stars{display:none} }

/* ============================================================
   BADGES, MISTAKES, SHOP
   ============================================================ */
.bdg-sum{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.bdg-sum .bs{padding:16px 18px;border:1px solid var(--rule);border-radius:var(--r-md,16px);background:var(--card);display:flex;flex-direction:column;gap:2px}
.bdg-sum .bs b{font-family:var(--mono);font-size:26px;font-weight:600;color:var(--ink)}
.bdg-sum .bs b small{font-size:13px;color:var(--ink-3)}
.bdg-sum .bs span{font-family:var(--ui);font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-3)}
.bdg-sum .bs.rare span{color:var(--ok)} .bdg-sum .bs.epic span{color:var(--accent)} .bdg-sum .bs.legend span{color:var(--gold)}
.bdg-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin-top:12px}
.medal{display:flex;gap:12px;align-items:center;padding:14px 16px;border-radius:var(--r-md,16px);border:1px solid var(--rule);background:var(--card)}
.medal .mi{width:44px;height:44px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;color:#fff;
  background:radial-gradient(circle at 35% 30%,#FFE9A8,#D89A1E 70%);box-shadow:0 3px 0 #97640A;animation:medalShine 3.2s ease-in-out infinite}
.medal.rare .mi{background:radial-gradient(circle at 35% 30%,#CFE6CB,#4C7A4E 70%);box-shadow:0 3px 0 #2F5531}
.medal.epic .mi{background:radial-gradient(circle at 35% 30%,#F6D2C2,#D97757 70%);box-shadow:0 3px 0 #9C4A2E}
.medal.common .mi{background:radial-gradient(circle at 35% 30%,#EFEDE6,#9C978A 70%);box-shadow:0 3px 0 #6E6A5F}
.medal b{display:block;font-family:var(--serif);font-size:16px}
.medal small{display:block;font-family:var(--ui);font-size:12.5px;color:var(--ink-3)}
@keyframes medalShine{0%,100%{filter:brightness(1)}50%{filter:brightness(1.12)}}
.shelf{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-top:12px;padding:16px;border-radius:18px;
  background:linear-gradient(180deg,var(--quiet),var(--warm));box-shadow:inset 0 -10px 0 color-mix(in srgb,var(--ink) 8%,transparent)}
.shelfitem{display:flex;flex-direction:column;align-items:center;gap:4px;text-align:center;padding:12px 10px;border-radius:14px;background:var(--card);border:1px solid var(--rule)}
.shelfitem .art{font-size:34px;line-height:1.1}
.shelfitem b{font-family:var(--ui);font-size:13.5px}
.shelfitem small{font-family:var(--ui);font-size:11.5px;color:var(--ink-3);line-height:1.4}
.shelfitem.card{border-color:color-mix(in srgb,var(--gold) 45%,var(--rule))}

.mx-filter{display:flex;flex-wrap:wrap;gap:6px}
.mx-filter .mchip{padding:0 12px}
.mx-filter .mchip b{font-family:var(--mono);font-size:11px;color:var(--ink-3)}
.mchip.on{border-color:var(--ink);background:var(--ink);color:var(--page)}
.mchip.on b{color:var(--page)}
.mx-list{display:flex;flex-direction:column;gap:10px}
.mx{padding:14px 16px 12px 18px;border:1px solid var(--rule);border-left:4px solid var(--sc,var(--accent));border-radius:14px;background:var(--card);display:flex;flex-direction:column;gap:6px}
.mx-top{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-family:var(--ui);font-size:12px;color:var(--ink-3)}
.mx-where{font-weight:600;color:var(--ink-2)}
.mx-stem{font-family:var(--serif);font-size:17px;line-height:1.55;color:var(--ink);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.mx-ans{font-family:var(--serif);font-size:15px;color:var(--ok)}
.mx-ans .label{color:var(--ink-3);margin-right:4px}
.mx-act{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:2px}
.mx-act .link{margin-left:auto;font-family:var(--ui);font-size:13px}
.mx-sheet{display:flex;flex-direction:column;gap:10px;max-width:640px}
.mx-sheet .rcpassage{font-size:15.5px;padding:12px 14px;border-radius:12px;background:var(--quiet)}
.mx-opts{display:flex;flex-direction:column;gap:6px}
.mx-opt{display:flex;gap:10px;align-items:baseline;padding:8px 12px;border-radius:10px;border:1px solid var(--rule);font-family:var(--serif);font-size:16px}
.mx-opt b{font-family:var(--mono);font-size:13px;color:var(--ink-3)}
.mx-opt.right{border-color:var(--ok);background:var(--ok-soft,#E3EBDD);color:var(--ink)}
.mx-opt.right b{color:var(--ok)}
.mx-why{font-family:var(--serif);font-size:16px;line-height:1.6;color:var(--ink-2)}

.shop-nav{display:flex;gap:6px;flex-wrap:wrap;position:sticky;top:calc(var(--bar-h,64px) + 6px);z-index:10;padding:8px;border-radius:14px;
  background:color-mix(in srgb,var(--page) 90%,transparent);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid var(--rule)}
.shop-nav .mchip{padding:0 12px;font-weight:500}
.shelfsec{scroll-margin-top:calc(var(--bar-h,64px) + 70px)}
.shopitem{display:flex;flex-direction:column;align-items:center;gap:6px}
.shopitem .art{font-size:30px;line-height:1.2;min-height:36px;display:flex;align-items:center;justify-content:center}
.shopitem b{font-family:var(--ui);font-size:14px}
.shopitem .note,.shopitem .fact{line-height:1.45;font-size:12px}
.shopitem .ci,.kicker .ci{width:14px;height:14px;vertical-align:-2px;margin-right:3px}
.shopitem.rare{border-color:color-mix(in srgb,var(--gold) 55%,var(--rule));background:linear-gradient(180deg,color-mix(in srgb,var(--gold) 8%,var(--card)),var(--card))}
.shopitem.seasonal:not(.locked){border-color:var(--ok)}
.shopitem.locked{opacity:.62}
.skinchip.wide{width:54px;border-radius:9px}
.barchip{display:block;width:64px;height:8px;border-radius:4px;background:var(--warm);overflow:hidden}
.barchip i{display:block;height:100%;width:68%;border-radius:4px;background:var(--accent)}
.bar-striped i,html[data-bar="striped"] .xpbar i,html[data-bar="striped"] .bar i{background-image:repeating-linear-gradient(45deg,rgba(255,255,255,.35) 0 6px,transparent 6px 12px)!important}
.bar-glow i,html[data-bar="glow"] .xpbar i,html[data-bar="glow"] .bar i{box-shadow:0 0 10px color-mix(in srgb,var(--accent) 70%,transparent)}
.bar-rainbow i,html[data-bar="rainbow"] .xpbar i,html[data-bar="rainbow"] .bar i{background:linear-gradient(90deg,#D97757,#E2A12B,#4C7A4E,#2B6CA3,#7A4B94)!important;background-size:200% 100%!important;animation:rainbowBar 4s linear infinite}
@keyframes rainbowBar{to{background-position:200% 0}}
html[data-streak="flamerun"] .tag.combo{background:linear-gradient(90deg,#E2A12B,#D9483B);color:#fff;border-color:transparent;animation:flameRun 1s ease-in-out infinite alternate}
html[data-streak="flamerun"] .tag.combo::before{content:'\1F525  '}
html[data-streak="zaprun"] .tag.combo{background:#2B3A67;color:#FFE66B;border-color:transparent;box-shadow:0 0 12px #6C8CFF;animation:zapRun .9s steps(2) infinite}
html[data-streak="zaprun"] .tag.combo::before{content:'\26A1  '}
@keyframes flameRun{to{filter:brightness(1.15);transform:translateY(-1px)}}
@keyframes zapRun{50%{box-shadow:0 0 2px #6C8CFF}}
.framechip.frame-platinum,.ring-platinum{box-shadow:0 0 0 3px #CFD6DB,0 0 0 5px #8E9AA3}
.framechip.frame-legendary,.ring-legendary{box-shadow:0 0 0 3px #E2A12B,0 0 14px 2px rgba(226,161,43,.65);animation:legendRing 2.4s ease-in-out infinite}
@keyframes legendRing{50%{box-shadow:0 0 0 3px #D97757,0 0 18px 4px rgba(217,119,87,.6)}}
.framechip.frame-victory,.ring-victory{box-shadow:0 0 0 3px #006A4E,0 0 0 6px #F42A41}
.framechip.frame-basanta,.ring-basanta{box-shadow:0 0 0 3px #F2C230,0 0 0 5px #E57A2C}
.avatar{position:relative}
.av-acc{position:absolute;right:-6px;bottom:-5px;font-size:15px;line-height:1;filter:drop-shadow(0 1px 1px rgba(0,0,0,.3))}
.flairchip{display:inline-block;font-size:14px;line-height:1;animation:flairBob 2.2s ease-in-out infinite}
.fl-comet{animation:flairSpin 3s linear infinite}
.fl-diamond{animation:flairGlint 1.8s ease-in-out infinite}
@keyframes flairBob{50%{transform:translateY(-2px) scale(1.1)}}
@keyframes flairSpin{to{transform:rotate(360deg)}}
@keyframes flairGlint{50%{filter:brightness(1.5) drop-shadow(0 0 4px #9FE3FF)}}
.pm-head.themed{color:#fff;border-radius:12px;padding:12px 14px;margin:-4px -4px 6px}
.pm-head.themed .kicker,.pm-head.themed .pm-sub{color:#fff}
.pm-title{display:block;font-family:var(--serif);font-size:14px;font-style:italic;color:var(--accent);margin-top:2px}
.pm-head.themed .pm-title{color:#FFE9C8}
.hintbox.peek{border-color:var(--gold)}
.life.item{border-style:dashed}
@media (max-width:600px){ .bdg-sum{grid-template-columns:repeat(2,minmax(0,1fr))} }
html.still .medal .mi,html.still .flairchip,html.still .ring-legendary{animation:none}

/* the bar under every question: comment, share, report */
.qbar{display:flex;gap:6px;margin:10px 0 4px;padding-top:10px;border-top:1px dashed var(--rule)}
.qb{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;border-radius:17px;border:1px solid var(--rule);background:var(--card);
  font-family:var(--ui);font-size:13px;font-weight:600;color:var(--ink-2);transition:border-color .2s,color .2s,background .2s}
.qb svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.qb b{font-family:var(--mono);font-size:11px;color:var(--ink-3)}
.qb b:empty{display:none}
.qb:hover:not([disabled]){border-color:var(--accent);color:var(--accent)}
.qb[disabled]{opacity:.5;cursor:not-allowed}
@media (max-width:600px){ .qbar{justify-content:space-between} .qb{flex:1;justify-content:center;padding:0 8px} }
.esttag{font-family:var(--ui);font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;padding:2px 8px;border-radius:10px;
  border:1px dashed var(--ink-3);color:var(--ink-2)}
@media (max-width:600px){
  .grid3.mx-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .mx-stats .stat{padding:12px}
  .mx-stats .v{font-size:22px}
  .mx-stats .s{display:none}
}
.cathatpic{width:96px;height:auto}
.tsres .tsres-people{border-top:1px solid var(--rule);margin-top:4px}
.tsres .tsres-people b{color:var(--accent-press)}

/* ============================================================
   INSIDE THE SITE (/learn): the site's own header is the top bar.
   Learn's bar goes; its level, coins, days left, Sound and Timer
   are chips in the site's header (drakkhak-learn.js). Phones keep
   a thin bar with Sound and Timer, since the site hides them there.
   ============================================================ */
html.embedded{--bar-h:0px}
html.embedded .top{display:none}
html.embedded .main{min-height:100vh}
@media (max-width:900px){
  html.embedded{--bar-h:44px}
  html.embedded .top{display:flex;align-items:center;justify-content:flex-end;height:44px;padding:0 12px;gap:8px;position:sticky;top:0}
  html.embedded .top .tb-l,html.embedded .top .nav,html.embedded .tsearch,html.embedded #nightBtn,html.embedded .avatar,html.embedded .pmenu,
  html.embedded .xpbox,html.embedded .coinbox{display:none!important}
  html.embedded .tb-r{gap:8px}
  html.embedded .top .clock{display:inline-flex!important;margin-right:auto;order:-1}
}
@media (max-width:600px){ html.embedded .daysbox{display:none} }

/* the account: your photo, the card in Settings */
.avatar.photo{padding:0;overflow:hidden;background:var(--quiet)}
.avatar.photo img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.acc-card{display:flex;flex-direction:column;gap:12px;margin-bottom:18px}
.acc-head{display:flex;align-items:center;gap:12px}
.acc-head img{width:48px;height:48px;border-radius:50%;object-fit:cover;flex:none;box-shadow:0 0 0 1px var(--rule)}
.acc-head div{flex:1;min-width:0;display:flex;flex-direction:column}
.acc-head b{font-family:var(--serif);font-size:19px;color:var(--ink)}
.acc-head small{font-family:var(--ui);font-size:12.5px;color:var(--ink-3)}
.acc-row{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}
.acc-row label,.acc-par label{display:flex;flex-direction:column;gap:5px;font-family:var(--ui);font-size:13px;font-weight:600;color:var(--ink-2);flex:1 1 240px;min-width:0}
.acc-par{display:flex;flex-direction:column;gap:10px}
.acc-par label{flex:none}
.acc-par label.acc-ok{flex-direction:row;align-items:flex-start;gap:9px;font-weight:400;font-size:13.5px;line-height:1.5;color:var(--ink-2)}
.acc-ok input{margin-top:3px;flex:none}

/* ============================================================
   RANKS: students, colleges, today's duel, the contest
   ============================================================ */
.rk-tabs{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.rk-tabs .mchip{padding:0 14px;height:34px;font-size:13.5px}
.rk-refresh{margin-left:auto;font-size:13px}
.rk-box{padding:6px 14px}
.rk-row{display:grid;grid-template-columns:34px 40px minmax(0,1fr) auto auto;align-items:center;gap:12px;padding:10px 4px;border-bottom:1px solid var(--rule)}
.rk-row:last-child{border-bottom:0}
.rk-row.me{background:var(--accent-soft);border-radius:12px;padding:10px 10px;margin:4px -6px;border-bottom:0}
.rk-row.spot{background:linear-gradient(90deg,color-mix(in srgb,var(--gold) 22%,transparent),transparent 70%);border-radius:12px}
.rk-row.spot .rk-name{color:var(--ink);font-weight:700}
.rk-n{font-family:var(--mono);font-size:14px;font-weight:600;color:var(--ink-3);text-align:center}
.rk-row.podium .rk-n{font-size:20px}
.rk-av{width:40px;height:40px;border-radius:50%;object-fit:cover;background:var(--quiet);flex:none}
.rk-av:not([class*="ring-"]),.rk-av.ring-plain,.rk-av.ring-{box-shadow:0 0 0 1px var(--rule)}
.rk-who{min-width:0;display:flex;flex-direction:column;gap:1px}
.rk-name{font-family:var(--ui);font-size:15px;font-weight:600;color:var(--ink);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
a.rk-name:hover{color:var(--accent)}
.rk-ver{font-style:normal;color:var(--accent);font-size:12px}
.rk-who small{font-family:var(--ui);font-size:12px;color:var(--ink-3);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.rk-tag{font-weight:600;color:var(--gold)}
.rk-tag.sh{color:var(--ok)}
.rk-v{display:flex;flex-direction:column;align-items:flex-end;text-align:right}
.rk-v b{font-family:var(--mono);font-size:15px;font-weight:600;color:var(--ink)}
.rk-v small{font-family:var(--ui);font-size:11px;color:var(--ink-3)}
.rk-me{font-family:var(--mono);font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--accent-press);min-width:62px;text-align:center}
html[data-theme="night"] .rk-me{color:var(--accent)}
.rk-gap{height:1px;margin:6px 0;border-top:1px dashed var(--rule-2)}
.rk-foot{padding:10px 4px}
.rk-col{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:var(--quiet);
  font-family:var(--serif);font-size:19px;font-weight:600;color:var(--ink-2);box-shadow:0 0 0 1px var(--rule)}
.rk-cta{display:flex;align-items:center;gap:14px;margin-bottom:14px;flex-wrap:wrap}
.rk-cta .art{font-size:34px}
.rk-cta div{flex:1 1 220px;min-width:0}
.rk-cta b{font-family:var(--serif);font-size:18px}
.dl-card{display:flex;flex-direction:column;gap:14px}
.dl-wait{display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:12px;background:var(--quiet);font-family:var(--ui);font-size:14.5px;color:var(--ink-2)}
.dl-pulse{width:10px;height:10px;border-radius:50%;background:var(--accent);flex:none;animation:dlPulse 1.4s ease-in-out infinite}
@keyframes dlPulse{0%,100%{opacity:.35;transform:scale(.8)}50%{opacity:1;transform:scale(1.15)}}
.dl-board{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:14px;align-items:start}
.dl-side{display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:14px;border:1px solid var(--rule);background:var(--card)}
.dl-side.us{border-color:color-mix(in srgb,var(--accent) 45%,var(--rule))}
.dl-tot{font-family:var(--mono);font-size:26px;font-weight:600;color:var(--ink)}
.dl-vs{align-self:center;font-family:var(--serif);font-style:italic;font-size:18px;color:var(--ink-3)}
.dl-p{display:flex;align-items:center;gap:10px;min-width:0}
.dl-p .rk-av{width:32px;height:32px}
.dl-p .rk-who{flex:1}
.dl-bar{height:8px;border-radius:4px;background:var(--warm);overflow:hidden}
.dl-bar i{display:block;height:100%;background:var(--accent);border-radius:4px;transition:width .6s}
.rk-friends{display:flex;flex-direction:column;gap:6px;max-height:50vh;overflow-y:auto}
.rk-fr{display:flex;align-items:center;gap:12px;padding:8px 10px;border-radius:12px;border:1px solid var(--rule);background:var(--card);text-align:left;width:100%}
.rk-fr:hover{border-color:var(--accent)}
.rk-fr .rk-av{width:34px;height:34px}
.rk-fr .rk-who{flex:1}
@media (max-width:600px){
  .rk-row{grid-template-columns:26px 34px minmax(0,1fr) auto;gap:9px}
  .rk-row .btn,.rk-row .rk-me{display:none}
  .rk-av{width:34px;height:34px}
  .dl-board{grid-template-columns:minmax(0,1fr)}
  .dl-vs{display:none}
}
/* the thin bar inside the site on phones: one line; on a narrow phone it also carries
   the level and coins, since the site's header has no room for them there */
@media (max-width:900px){
  html.embedded .top{flex-wrap:nowrap!important;height:44px!important;min-height:0}
  html.embedded .top .clock{white-space:nowrap;flex:none}
  html.embedded .tb-r{flex:1 1 auto;justify-content:flex-end;min-width:0;flex-wrap:nowrap}
}
@media (max-width:600px){
  html.embedded .top .xpbox,html.embedded .top .coinbox{display:flex!important;flex:none}
  html.embedded .top .clock{display:none!important}
  html.embedded .tb-r{justify-content:flex-start}
  html.embedded .tb-r .togs{margin-left:auto}
}

/* ============================================================
   THE OWNER'S DESIGN (Drakkhak home canvas and mobile canvas).
   Colours from the boards, Inter with Hind Siliguri for Bangla.
   The Map page keeps its own colours and type: see .view.wide.
   ============================================================ */
:root{
  --page:#F5F4ED;--card:#FAF9F5;--quiet:#EBE9E0;--warm:#E0DDD2;--rule:#E0DDD2;--rule-2:#D6D2C4;
  --ink:#141413;--ink-2:#5E5D59;--ink-3:#5E5D59;--body:#3D3D3A;--track:#EBE9E0;
  --accent:#C6613F;--accent-press:#A8492A;--accent-soft:#F6E6DE;--btn:#B4532A;--btn-ink:#FFFFFF;--link:#A8492A;
  --serif:'Hind Siliguri','Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  --ui:'Hind Siliguri','Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  --mono:'Inter','Hind Siliguri',system-ui,sans-serif;
  --logo-back:#141413;
}
html[data-theme="night"]{
  --page:#1F1E1D;--card:#262624;--quiet:#30302D;--warm:#3A3936;--rule:#3A3936;--rule-2:#4A4945;
  --ink:#F2F1EC;--ink-2:#A6A39A;--ink-3:#A6A39A;--body:#D4D1C7;--track:#30302D;
  --accent:#D97757;--accent-press:#E08A6C;--accent-soft:#3A2A22;--btn:#C6613F;--btn-ink:#FFFFFF;--link:#E08A6C;
}
html[data-look="blue"]{
  --page:#F6F7F9;--card:#FFFFFF;--quiet:#EAECEF;--warm:#E5E7EB;--rule:#E5E7EB;--rule-2:#D0D7DE;
  --ink:#1F2328;--ink-2:#656D76;--ink-3:#656D76;--body:#424A53;--track:#EAECEF;
  --accent:#2563EB;--accent-press:#1D4ED8;--accent-soft:#E3ECFD;--btn:#1D4ED8;--link:#1D4ED8;
}
html[data-look="blue"][data-theme="night"]{
  --page:#0F1115;--card:#171A20;--quiet:#222730;--warm:#2A2F37;--rule:#2A2F37;--rule-2:#3A414B;
  --ink:#E6E8EB;--ink-2:#9BA3AE;--ink-3:#9BA3AE;--body:#C9CED6;--track:#222730;
  --accent:#4F8CF7;--accent-press:#7AA7FF;--accent-soft:#1B2740;--btn:#2563EB;--link:#7AA7FF;
}
/* the road keeps its own colours and type */
.view.wide .scene,.view.wide .mhead{
  --quiet:#F0EEE6;--warm:#E8E6DC;--rule:#E0DDD2;--rule-2:#CFCBBE;--ink-3:#87867F;
  --accent:#D97757;--accent-press:#C6613F;--btn:#D97757;
  --serif:'Noto Serif Bengali','Newsreader',Georgia,'Times New Roman',serif;
  --ui:'Hind Siliguri','Inter',system-ui,-apple-system,'Segoe UI',sans-serif;
  --mono:'IBM Plex Mono',ui-monospace,'SF Mono',Menlo,'Hind Siliguri',monospace;
}
html[data-theme="night"] .view.wide .scene,html[data-theme="night"] .view.wide .mhead{
  --page:#16150F;--card:#1D1C16;--quiet:#1A1913;--warm:#2A2820;--rule:#332F26;--rule-2:#453F33;
  --ink:#EDE9DC;--ink-2:#A9A395;--ink-3:#7C7668;--accent:#E08B6B;--accent-press:#EFA184;--accent-soft:#2F241D;--btn:#E08B6B;
}
body{font-family:var(--ui);font-size:14px;line-height:1.5;color:var(--ink);background:var(--page)}
.view.wide .scene,.view.wide .mhead{font-family:var(--serif);font-size:18px;line-height:1.75}
body::before,body::after{display:none}
.view:not(.wide) h1,.view:not(.wide) h2,.view:not(.wide) h3{font-family:var(--ui);letter-spacing:-.01em}
.view:not(.wide) .kicker,.view:not(.wide) .label,.view:not(.wide) .seclabel{letter-spacing:.02em}
html[data-coin="pixel"] .ci{image-rendering:pixelated}
.view:not(.wide) .ci{width:18px;height:18px;vertical-align:-4px}

/* ---------- buttons ---------- */
.btn{background:var(--btn);color:var(--btn-ink);border-radius:8px;font-family:var(--ui);font-weight:600;box-shadow:none;min-height:44px;height:auto;padding:0 20px;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn:hover:not([disabled]){background:var(--accent-press);transform:none;box-shadow:none}
.btn.ghost,.btn.ghost:hover:not([disabled]){background:var(--card);color:var(--ink);border:1px solid var(--rule-2);box-shadow:none}
.btn.ghost:hover:not([disabled]){background:var(--quiet)}
.btn.lg{min-height:48px}.btn.sm{min-height:36px;padding:0 14px;font-size:13px}.btn.xs{min-height:32px;padding:0 12px;font-size:13px}
.view.wide .scene .btn,.view.wide .scene .btn.ghost{min-height:revert;padding:revert;border-radius:revert;display:revert}

/* ---------- the top bar ---------- */
.top{display:flex!important;align-items:center;gap:12px 28px;min-height:64px;height:64px;padding:0 28px;background:var(--card);border-bottom:1px solid var(--rule);box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.top .tb-l{display:flex;align-items:center;gap:28px;align-self:stretch;flex:none}
.top .brand{display:flex;align-items:center;gap:10px;width:auto;padding:0;margin:0;border:0;background:none}
.top .brand-mark{width:28px;height:28px;flex:none}
.top .brand-name{font-family:var(--ui);font-weight:700;font-size:18px;letter-spacing:-.01em;color:var(--ink)}
.top .worlds{display:flex;gap:4px;align-self:stretch;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
.top .worlds a{display:flex;align-items:center;gap:0;height:auto;padding:0 14px;border-radius:0;border-bottom:2px solid transparent;background:none!important;color:var(--ink-2);font-family:var(--ui);font-size:14px;font-weight:500;box-shadow:none}
.top .worlds a svg{display:none}
.top .worlds a.on{color:var(--ink)!important;font-weight:600;border-bottom-color:var(--accent)}
.top .tb-r{display:flex;align-items:center;gap:4px;flex:1 1 auto;min-width:0}
.top .tsearch{order:0;flex:1 1 240px;max-width:420px;margin-right:auto;display:flex;align-items:center;gap:8px;height:38px;width:auto;padding:0 12px;background:var(--page);border:1px solid var(--rule);border-radius:8px;box-shadow:none;position:relative}
.top .tsearch svg{position:static;transform:none;width:16px;height:16px;flex:none;stroke:var(--ink-2);fill:none;stroke-width:2;stroke-linecap:round}
.top .tsearch input{position:static;height:auto;flex:1;min-width:0;width:auto;opacity:1;text-align:left;border:0;background:transparent;font:inherit;font-family:var(--ui);color:var(--ink);outline:none;padding:0}
.top .tsearch input::placeholder{color:var(--ink-2)}
.top .togs{order:1;display:flex;gap:0}
.top .tog{width:44px;height:44px;padding:0;border:0;background:transparent!important;border-radius:8px;display:flex;align-items:center;justify-content:center;box-shadow:none}
.top .tog svg{width:18px;height:18px;fill:none;stroke:var(--ink-2);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.top .tog:hover{background:var(--quiet)!important}
.top .tog.on svg{stroke:var(--accent)}
.top #nightBtn.on svg{fill:var(--accent)}
.top .coinbox{order:2;display:flex;align-items:center;gap:7px;height:44px;padding:0 10px;border:0;background:transparent!important;box-shadow:none;border-radius:8px;font-family:var(--ui);font-size:14px;font-weight:700;color:var(--ink)}
.top .coinbox b{font-weight:700;color:var(--ink);font-family:var(--ui)}
.top .coinbox .coin{display:inline-flex;width:20px;height:20px;background:none;border:0;box-shadow:none;animation:dkspin 3.2s steps(1,end) infinite;transform-origin:center}
.top .coinbox .coin svg{width:20px;height:20px;filter:none}
html[data-coin="pixel"] .top .coinbox .coin svg{image-rendering:pixelated}
.top .xpbox{order:3;display:flex;align-items:center;gap:8px;height:44px;padding:0 8px;border:0;background:transparent!important;box-shadow:none;width:auto;color:var(--ink);font-family:var(--ui)}
.top .xpbox .lvl{position:relative;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:none;border:0}
.top .xpbox .lvl .lvring{position:absolute;inset:0;width:30px;height:30px;display:none}
.top .xpbox .lvl b{position:relative;width:28px;height:28px;border-radius:999px;background:var(--btn);color:#fff;font:700 12px/28px var(--ui);text-align:center}
.lvring .bg,.lvring .fg{fill:none;stroke-width:3}.lvring .bg{stroke:var(--track)}.lvring .fg{stroke:var(--accent);stroke-linecap:round}
.top .xpcol{display:flex;flex-direction:column;gap:4px;width:auto}
.top .xpn{font:600 11px/1 var(--ui);color:var(--ink-2);white-space:nowrap}.top .xpn b{font-weight:600;color:var(--ink-2)}
.top .xpbar{display:block;width:76px;height:4px;border-radius:999px;background:var(--track);overflow:hidden}
.top .xpbar i{display:block;height:100%;background:var(--accent);border-radius:999px}
.top .daysbox{display:none!important}
.top .avatar{order:4;width:36px;height:36px;margin-left:4px;border-radius:999px;background:var(--warm);color:var(--ink);font:600 14px/36px var(--ui);box-shadow:none;border:0}
.top .clock{display:none!important}
@keyframes dkspin{0%,64%{transform:scaleX(1)}68%{transform:scaleX(.66)}72%{transform:scaleX(.33)}76%{transform:scaleX(.08)}80%{transform:scaleX(.33)}84%{transform:scaleX(.66)}88%,100%{transform:scaleX(1)}}
@media (prefers-reduced-motion:reduce){.top .coinbox .coin{animation:none}}
html.still .top .coinbox .coin{animation:none}

/* ---------- the sidebar ---------- */
.ls-nav a{height:40px;gap:12px;padding:0 12px;border-radius:8px;font-family:var(--ui);font-size:14px;color:var(--body)}
.ls-nav a svg{width:18px;height:18px;stroke-width:2}
.ls-nav a.on{background:var(--quiet);color:var(--ink);font-weight:600}
html[data-theme="night"] .ls-nav a.on{color:var(--ink)}
.ls-nav a:hover{background:var(--quiet)}
.ls-nav .tk{font:400 12px var(--ui);color:var(--ink-2)}
.ls-rule{height:1px;background:var(--rule);margin:10px 12px}
@media (min-width:901px){
  html[data-nav="left"] body:not(.focus):not(.welcoming) .lside{border-right:0;padding:24px 12px 18px 28px}
}

/* ---------- the page ---------- */
.view:not(.wide){max-width:1140px;margin-left:auto;margin-right:auto}
.view:not(.wide) .card{background:var(--card);border:1px solid var(--rule);border-radius:12px;box-shadow:none}
.lk-3col{display:flex;flex-wrap:wrap;gap:28px;align-items:flex-start}
.lk-main{flex:999 1 480px;min-width:0;display:flex;flex-direction:column;gap:20px}
.lk-rail{flex:1 1 280px;max-width:320px;display:flex;flex-direction:column;gap:16px}
.lk-title h1{margin:0;font-size:24px;font-weight:700;letter-spacing:-.01em;line-height:1.3}
.lk-title p{margin:4px 0 0;color:var(--ink-2);font-size:14px}
.lk-card{background:var(--card);border:1px solid var(--rule);border-radius:12px;display:flex;flex-direction:column}
.lk-card h2{margin:0;font-size:16px;font-weight:600;line-height:1.35}
.lk-pad{padding:20px;gap:12px}
.lk-set{flex-direction:row;flex-wrap:wrap;align-items:center;gap:20px;padding:24px}
.lk-grow{flex:1 1 260px;min-width:0;display:flex;flex-direction:column;gap:6px}
.lk-eyebrow{font-size:12px;font-weight:600;color:var(--ink-2);text-transform:uppercase;letter-spacing:.06em}
.lk-eyebrow2{font-size:12px;color:var(--ink-2)}
.lk-settitle{font-size:18px;font-weight:600}
.lk-sub{color:var(--ink-2);font-size:13px;line-height:1.5}
.lk-coinline{display:inline-flex;align-items:center;gap:6px;font-size:14px;color:var(--ink-2)}
.lk-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.lk-flush{padding:0}
.lk-head{display:flex;justify-content:space-between;align-items:center;padding:16px 24px;border-bottom:1px solid var(--rule)}
.lk-head a{font-weight:500;color:var(--ink-2)}
.lk-head2{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.lk-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px 24px;padding:14px 24px;border-bottom:1px solid var(--track)}
.lk-row:last-child{border-bottom:0}
.lk-rowname{flex:1 1 220px;min-width:0;display:flex;flex-direction:column;gap:2px;color:var(--ink);text-decoration:none}
.lk-rowname b{font-weight:600}.lk-rowname span{color:var(--ink-2);font-size:13px}
.lk-rowbar{flex:0 1 200px;display:flex;flex-direction:column;gap:6px}.lk-rowbar small{color:var(--ink-2);font-size:12px}
.lk-bar{display:block;height:6px;border-radius:999px;background:var(--track);overflow:hidden}
.lk-bar i{display:block;height:100%;border-radius:999px;background:var(--accent)}
.lk-stars{width:56px;color:var(--ink-2);letter-spacing:2px}
.lk-empty{padding:18px 24px;margin:0;color:var(--ink-2)}
.lk-mist{flex-direction:row;flex-wrap:wrap;align-items:center;gap:16px;padding:18px 24px}.lk-mist .lk-grow{gap:2px}.lk-mist b{font-weight:600}.lk-mist .lk-sub{font-size:14px}
.lk-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.lk-week>div{display:flex;flex-direction:column;align-items:center;gap:4px}.lk-week small{font-size:11px;color:var(--ink-2)}
.lk-dot{width:16px;height:16px;border-radius:999px;box-sizing:border-box;border:2px solid var(--rule-2)}.lk-dot.on{background:var(--accent);border:0}
.lk-rule{height:1px;background:var(--rule)}
.lk-kv{display:flex;justify-content:space-between;gap:12px}.lk-kv span{color:var(--ink-2)}.lk-kv b{font-weight:600}
.lk-levelline{display:flex;justify-content:space-between;font-size:13px;color:var(--ink-2);margin-bottom:-6px}
.lk-big{display:flex;align-items:baseline;gap:6px}.lk-big b{font-size:32px;font-weight:700;letter-spacing:-.02em;line-height:1.2}.lk-big span{color:var(--ink-2)}
.lk-link{font-weight:500;font-size:13px;color:var(--link);text-decoration:none}.lk-link:hover{text-decoration:underline}
.lk-duel{display:flex;flex-direction:column;gap:4px}.lk-duel div{display:flex;justify-content:space-between;font-size:13px;font-weight:600}.lk-duel.other div{color:var(--ink-2);font-weight:400}.lk-duel.other .lk-bar i{background:#A3A096}
.lk-league b{font-weight:700}
.lk-phone-only,.lk-phone-pair{display:none}

/* Practice */
.lk-section{margin:4px 0 -6px;font-size:16px;font-weight:600}
.lk-ways{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.lk-way{padding:18px;gap:12px}
.lk-wayicon{width:36px;height:36px;border-radius:8px;background:var(--quiet);display:flex;align-items:center;justify-content:center}
.lk-wayicon svg{width:18px;height:18px;fill:none;stroke:var(--ink);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.lk-waytext{display:flex;flex-direction:column;gap:3px}.lk-waytext b{font-weight:600;font-size:15px}.lk-waytext span{color:var(--ink-2);font-size:13px;line-height:1.5}
.lk-wayfoot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto}.lk-wayfoot small{color:var(--ink-2);font-size:12px}
.lk-weak{display:flex;flex-direction:column;gap:4px}.lk-weak div{display:flex;justify-content:space-between;gap:8px;font-size:13px}.lk-weak b{font-weight:600}
.lk-custom{gap:16px}
.lk-field{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}.lk-field>span{flex:0 0 90px;font-weight:500}
.lk-chips{display:flex;flex-wrap:wrap;gap:8px;flex:1}
.lk-chip{height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--rule);background:var(--card);color:var(--body);font:500 13px var(--ui)}
.lk-chip.on{background:var(--accent-soft);border:1.5px solid var(--accent);color:var(--ink);font-weight:600}
.lk-seg{display:flex;border:1px solid var(--rule);border-radius:8px;overflow:hidden}
.lk-seg button{min-width:48px;height:36px;font:500 13px var(--ui);color:var(--body);border-right:1px solid var(--rule)}.lk-seg button:last-child{border-right:0}
.lk-seg button.on{background:var(--accent-soft);color:var(--ink);font-weight:600}
.lk-inline{display:flex;align-items:center;gap:10px}.lk-inline small{color:var(--ink-2);font-size:13px}
.view:not(.wide) .onoff::before{display:none}
.lk-switch,.view:not(.wide) .onoff{display:block;min-width:0;position:relative;width:44px;height:24px;border-radius:999px;background:var(--rule-2);border:0;padding:0;color:transparent;font-size:0;flex:none;box-shadow:none;min-height:0}
.lk-switch i,.view:not(.wide) .onoff::after{content:'';position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:999px;background:#fff;transition:transform .15s}
.lk-switch.on,.view:not(.wide) .onoff.on{background:var(--btn)}
.lk-switch.on i,.view:not(.wide) .onoff.on::after{transform:translateX(20px)}
.lk-customfoot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--rule);padding-top:16px}

/* Profile */
.lk-profile{padding:24px;gap:20px}
.lk-ptop{display:flex;flex-wrap:wrap;align-items:center;gap:16px}
.lk-ptop h1{margin:0;font-size:22px;font-weight:700}
.lk-pdisc{width:72px;height:72px;border-radius:999px;background:var(--warm);display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:600;overflow:hidden;flex:none}
.lk-pdisc img{width:100%;height:100%;object-fit:cover}.lk-pdisc svg{width:32px;height:32px;fill:none;stroke:var(--ink-2);stroke-width:2}
.lk-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.lk-stat{display:flex;flex-direction:column;gap:2px}.lk-stat small{color:var(--ink-2);font-size:13px}.lk-stat b{font-size:20px;font-weight:700}
.lk-heat{display:grid;grid-template-rows:repeat(7,1fr);grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px}
.lk-heat span{height:16px;border-radius:3px}
.lk-heat .l0,.lk-heatkey .l0{background:var(--track)}
.lk-heat .l1,.lk-heatkey .l1{background:color-mix(in srgb,var(--accent) 30%,var(--track))}
.lk-heat .l2,.lk-heatkey .l2{background:color-mix(in srgb,var(--accent) 55%,var(--track))}
.lk-heat .l3,.lk-heatkey .l3{background:color-mix(in srgb,var(--accent) 80%,var(--track))}
.lk-heat .l4,.lk-heatkey .l4{background:var(--accent)}
.lk-heatkey{display:flex;align-items:center;justify-content:flex-end;gap:4px;font-size:12px;color:var(--ink-2)}.lk-heatkey i{width:12px;height:12px;border-radius:3px}
.lk-badges{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.lk-badge{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;opacity:.55}.lk-badge.on{opacity:1}
.lk-badge span{width:48px;height:48px;border-radius:999px;background:var(--quiet);display:flex;align-items:center;justify-content:center;font-size:20px;color:var(--ink-2)}
.lk-badge.on span{background:var(--accent-soft);color:var(--accent)}
.lk-badge small{font-size:12px;line-height:1.3}
.lk-morelinks{flex-direction:column;background:var(--card);border:1px solid var(--rule);border-radius:14px}
.lk-morelinks a{display:flex;justify-content:space-between;align-items:center;min-height:48px;padding:0 16px;color:var(--ink);border-bottom:1px solid var(--track);text-decoration:none}.lk-morelinks a:last-child{border-bottom:0}.lk-morelinks b{font-weight:600}

/* Settings */
.lk-themes{display:flex;gap:12px;flex-wrap:wrap}
.lk-theme{display:flex;align-items:center;gap:6px;height:56px;padding:0 16px;border-radius:10px;border:1px solid var(--rule);background:var(--card);color:var(--ink);font:600 14px var(--ui);flex:1 1 180px}
.lk-theme.on{border:1.5px solid var(--accent);background:var(--accent-soft)}
.lk-theme i{width:14px;height:14px;border-radius:999px;border:1px solid var(--rule-2)}.lk-theme b{margin-left:6px}
.t-drakkhak i:nth-child(1){background:#F5F4ED}.t-drakkhak i:nth-child(2){background:#C6613F}.t-drakkhak i:nth-child(3){background:#141413}
.t-blue i:nth-child(1){background:#F6F7F9}.t-blue i:nth-child(2){background:#2563EB}.t-blue i:nth-child(3){background:#1F2328}
.view:not(.wide) .setlist{background:var(--card);border:1px solid var(--rule);border-radius:12px;padding:4px 20px}
.view:not(.wide) .setrow{border-bottom:1px solid var(--track);padding:14px 0}.view:not(.wide) .setrow:last-child{border-bottom:0}
.view:not(.wide) .setrow .st{font:500 14px var(--ui)}.view:not(.wide) .setrow .ss{font:400 13px/1.5 var(--ui);color:var(--ink-2)}

/* the first visit */
body.welcoming .top{display:none!important}
.lk-welcome{max-width:390px;margin:0 auto;padding:16px 4px 24px;display:flex;flex-direction:column;gap:18px}
.lk-wtop{display:flex;flex-direction:column;align-items:center;gap:10px;padding:18px 0 6px;text-align:center}
.lk-wlogo{width:44px;height:44px}
.lk-wtop h1{margin:6px 0 0;font-size:26px;font-weight:800;letter-spacing:-.01em}
.lk-wtop p{margin:0;color:var(--ink-2);font-size:15px;line-height:1.5;max-width:300px}
.lk-q{display:flex;flex-direction:column;gap:8px}.lk-q>span{font-weight:600}.lk-q>div{display:flex;gap:8px}
.lk-pick{flex:1;height:48px;border-radius:10px;border:1px solid var(--rule);background:var(--card);color:var(--body);font:600 14px var(--ui)}
.lk-pick.on{border:1.5px solid var(--accent);background:var(--accent-soft);color:var(--ink)}
.lk-wcoin{flex-direction:row;align-items:center;gap:12px;padding:14px;border-radius:14px;line-height:1.45}
.lk-wcoinart .ci{width:40px;height:40px}
.lk-wgo{width:100%;min-height:48px;font-size:15px;border-radius:10px}
.lk-wlink{align-self:center;min-height:44px;display:flex;align-items:center;color:var(--ink-2);font:400 14px var(--ui);text-decoration:none}
.lk-wmore{justify-content:center}

/* ---------- a question ---------- */
body.focus .view{max-width:808px}
.fbar{background:transparent;border:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.fbar .cnt{font:600 14px var(--ui);color:var(--ink)}.fbar .cnt b{font-weight:600}
.fbar .segs{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:4px;flex:1}
.fbar .segs i,.fbar .segs span{height:6px;border-radius:999px;background:var(--track)}
.fbar .segs i.ok{background:var(--accent)}.fbar .segs i.no{background:var(--no)}.fbar .segs i.now{background:color-mix(in srgb,var(--accent) 65%,var(--track))}
.qcard{background:var(--card);border:1px solid var(--rule);border-radius:12px;padding:28px;box-shadow:none}
.qstem{font-family:var(--ui);font-size:21px;font-weight:600;line-height:1.5;color:var(--ink)}
.qstem:lang(bn),.qcard[lang="bn"] .qstem{line-height:1.6}
.qmeta .qtopic{font:400 13px var(--ui);letter-spacing:0;text-transform:none;color:var(--ink-2)}
.opt,.opt.right,.opt.wrong,.opt.picked,.opt.faded{display:flex;align-items:center;gap:14px;min-height:56px;padding:10px 16px;border-radius:10px;border:1px solid var(--rule);background:var(--card);color:var(--body);font-family:var(--ui);font-size:16px;box-shadow:none;margin-top:10px}
.opt:hover:not([disabled]){background:var(--page);border-color:var(--rule-2);transform:none;box-shadow:none}
.opt .key{width:30px;height:30px;flex:none;border-radius:999px;display:flex;align-items:center;justify-content:center;font:700 13px var(--ui);color:var(--ink-2);border:1px solid var(--rule-2);background:transparent}
.opt.picked,.opt.right{border:1.5px solid var(--accent);background:var(--accent-soft);color:var(--ink);font-weight:600}
.opt.picked .key,.opt.right .key{background:var(--accent);color:#fff;border:0}
.opt .tick{position:static;width:18px;height:18px;flex:none;fill:none;stroke:var(--accent);stroke-width:2.4}
.opt.right .opt-mark{display:none}
.opt.wrong{border:1.5px solid var(--no-line);background:var(--no-soft);color:var(--ink)}
.opt.wrong .txt{text-decoration:none}
.opt.wrong .key{background:var(--no);color:#fff;border:0}
.opt.faded{opacity:1;color:var(--body)}
.opt .opt-mark{font:500 12px var(--ui);letter-spacing:0;text-transform:none;color:var(--ink-2);margin-left:auto;position:static}
.vrow .v{font:600 14px var(--ui);letter-spacing:0;text-transform:none}
.whybox{background:var(--page);border:1px solid var(--rule);border-radius:10px;box-shadow:none}
.actions .btn{flex:1}
.actions .btn:first-child{order:2}

/* ---------- pages that keep their own contents ---------- */
.mx,.rk-box,.shopitem{border-radius:12px;box-shadow:none}
.mx{background:var(--card);border:1px solid var(--rule)}
.mx::before{display:none}
.mx-stem{font-family:var(--ui);font-size:16px;font-weight:600}
.view:not(.wide) .mchip{height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--rule);background:var(--card);color:var(--body);font:500 13px var(--ui);display:inline-flex;align-items:center;gap:6px}
.view:not(.wide) .mchip.on{background:var(--quiet);color:var(--ink);font-weight:600;border-color:var(--rule-2)}
.view:not(.wide) .mchip i{display:none}.view:not(.wide) .mchip b{font-weight:500;color:var(--ink-2)}
.rk-row{border-bottom:1px solid var(--track);padding:12px 4px;background:none}
.rk-row.me{background:var(--accent-soft);border-radius:8px}
.rk-n{font:600 14px var(--ui)}
.rk-v b{font:600 14px var(--ui)}
.phead h1{font-size:24px;font-weight:700;line-height:1.3}.phead .lede{font:400 14px/1.5 var(--ui);color:var(--ink-2);margin-top:4px}.phead .kicker{display:none}

/* ---------- phones ---------- */
@media (max-width:900px){
  .top{height:56px;min-height:56px;padding:0 12px 0 16px;gap:8px;flex-wrap:nowrap!important}
  .top .tb-l{gap:8px}
  .top .worlds,.top .tsearch,.top #soundBtn,.top #timerBtn,.top .avatar,.top .xpcol{display:none!important}
  .top .tb-r{justify-content:flex-end;gap:2px;flex-wrap:nowrap}
  .top .brand-name{font-size:17px}
  .top .togs{order:3}.top .xpbox{order:1;padding:0 6px}.top .coinbox{order:2;padding:0 8px}
  .top .xpbox .lvl .lvring{display:block}
  .top .xpbox .lvl b{background:none;color:var(--ink);width:auto;height:auto;line-height:1}
  .tabbar{display:flex!important;height:auto;padding:4px 6px calc(10px + env(safe-area-inset-bottom));background:var(--card);border-top:1px solid var(--rule);box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
  .tabbar .ind,.tabbar .code,.tabbar .tk{display:none!important}
  .tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:56px;color:var(--ink-2);font:500 11px var(--ui)}
  .tabbar a .tico{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .tabbar a.on{color:var(--btn);font-weight:700}
  html[data-theme="night"] .tabbar a.on{color:var(--link)}
  .view:not(.wide){padding-left:16px;padding-right:16px}
  .lk-3col{gap:14px}.lk-main{flex-basis:100%;gap:14px}
  .lk-rail{display:none}
  .lk-title h1{font-size:22px}.lk-title p{margin-top:2px}
  .lk-phone-only{display:flex;flex-direction:column}
  .lk-phone-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .lk-phone-pair .lk-card{padding:14px;gap:6px;border-radius:14px}
  .lk-phone-pair .lk-big b{font-size:20px}.lk-phone-pair .lk-big span{font-size:12px}
  .lk-card{border-radius:14px}
  .lk-set{flex-direction:column;align-items:stretch;gap:12px;padding:18px}.lk-set .lk-grow{flex:none}
  .lk-phone-pair>:only-child{grid-column:1 / -1}
  .lk-mini{padding:16px}
  .top .brand-name{display:block!important}
  .lk-set .lk-actions>.ghost{display:none}.lk-set .btn{width:100%;min-height:48px;border-radius:10px;font-size:15px}
  .lk-flush .lk-head{padding:12px 14px}
  .lk-row{padding:12px 14px;gap:6px 12px}.lk-row .btn{display:none}.lk-rowname{flex:1 1 60%}.lk-rowbar{order:3;flex:1 1 100%}.lk-rowbar small{display:none}.lk-rowbar .lk-bar{height:4px}.lk-stars{width:auto;color:var(--accent);letter-spacing:1px;font-size:13px}
  .lk-mist{padding:14px}
  .lk-week>div .lk-dot{width:22px;height:22px}
  .lk-ways{grid-template-columns:1fr;gap:0;background:var(--card);border:1px solid var(--rule);border-radius:14px}
  .lk-way{flex-direction:row;align-items:center;border:0;border-bottom:1px solid var(--track);border-radius:0;background:none;padding:12px 14px;gap:12px}.lk-way:last-child{border-bottom:0}
  .lk-way .lk-weak,.lk-wayfoot small{display:none}.lk-waytext{flex:1;min-width:0}.lk-wayfoot{margin:0;flex:none}
  .lk-custom{padding:16px}
  .lk-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lk-badges{grid-template-columns:repeat(4,minmax(0,1fr))}.lk-badges .lk-badge:nth-child(n+5){display:none}
  .lk-profile{padding:18px}.lk-ptop .lk-actions{width:100%}.lk-ptop .lk-actions .btn{flex:1}.lk-pdisc{width:60px;height:60px;font-size:22px}
  /* a question: its own header, the buttons held at the foot */
  body.focus .top{display:none!important}
  body.focus .fbar{top:0;background:var(--card);border-bottom:1px solid var(--rule);margin:0 -16px;padding:8px 16px 12px}
  body.focus .view{padding:0 16px 96px}
  .qcard{background:transparent;border:0;padding:12px 0 0}
  .qstem{font-size:21px}
  .opt{font-size:17px;gap:12px;padding:0 14px;border-radius:12px;min-height:56px}
  .actions{position:fixed;left:0;right:0;bottom:0;z-index:60;display:flex;gap:10px;padding:12px 16px calc(18px + env(safe-area-inset-bottom));margin:0;background:var(--card);border-top:1px solid var(--rule)}
  .actions .btn{min-height:48px;border-radius:10px;font-size:15px}
  .actions .btn.ghost{flex:0 0 118px}
}

/* inside the site at /learn the site's own header is the only bar */
html.embedded{--bar-h:0px!important}
html.embedded .top{display:none!important}

/* ---------- the Map: the road at a sensible width, the rail beside it ---------- */
.mapcols{display:grid;grid-template-columns:minmax(0,880px) 330px;justify-content:center;gap:24px;align-items:start}
.mapmain{min-width:0}
.maprail{position:sticky;top:calc(var(--bar-h,64px) + 18px);display:flex;flex-direction:column;gap:14px;max-height:calc(100vh - var(--bar-h,64px) - 118px);overflow-y:auto;scrollbar-width:none}
.maprail::-webkit-scrollbar{display:none}
.mr-head h1{margin:0;font-size:22px;font-weight:700;letter-spacing:-.01em;line-height:1.3}
.mr-head p{margin:0}
.mr-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;border-top:1px solid var(--rule);padding-top:12px}
.mr-facts div{display:flex;flex-direction:column;gap:1px}.mr-facts b{font-size:18px;font-weight:700;line-height:1.2}.mr-facts small{font-size:12px;color:var(--ink-2)}
.mr-now .mr-chap{font-size:16px;font-weight:600;line-height:1.35}.mr-now{gap:6px}.mr-now .lk-actions{margin-top:8px;gap:8px}
.mr-subj{padding:6px 0}
.mr-subjhead{display:flex;justify-content:space-between;align-items:center;padding:12px 20px 8px}
.mr-subjhead button{font-family:var(--ui)}
.mr-row{display:flex;align-items:center;gap:8px;padding:1px 14px 1px 12px}
.mr-jump{flex:1;min-width:0;display:flex;align-items:center;gap:10px;padding:4px 8px;border-radius:8px;text-align:left;color:var(--ink);font-family:var(--ui)}
.mr-jump:hover{background:var(--quiet)}
.mr-jump span{display:flex;flex-direction:column;min-width:0}.mr-jump b{font-size:14px;font-weight:600;line-height:1.3}.mr-jump small{font-size:12px;color:var(--ink-2)}
@media (min-width:1101px){ .view.wide .mhead{display:none} }
@media (min-width:1700px){ .mapcols{grid-template-columns:minmax(0,1040px) 400px} }
@media (max-width:1100px){
  .mapcols{grid-template-columns:minmax(0,760px)}
  .maprail{display:none}
}

/* ---------- the shop: a shop front, aisles, and things on shelves ---------- */
.sh-front{position:relative;background:var(--card);border:1px solid var(--rule);border-radius:14px;overflow:hidden;margin-bottom:18px}
.sh-awning{height:30px;background:repeating-linear-gradient(90deg,var(--accent) 0 40px,color-mix(in srgb,var(--accent) 14%,var(--card)) 40px 80px);
  -webkit-mask:radial-gradient(20px at 20px 10px,#000 98%,transparent) 0 0/40px 100% repeat-x,linear-gradient(#000 0 0) 0 0/100% 10px no-repeat;
  mask:radial-gradient(20px at 20px 10px,#000 98%,transparent) 0 0/40px 100% repeat-x,linear-gradient(#000 0 0) 0 0/100% 10px no-repeat}
.sh-sign{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px 24px;padding:14px 26px 20px}
.sh-title h1{margin:0;font-size:30px;font-weight:800;letter-spacing:-.02em;line-height:1.15}
.sh-title p{margin:4px 0 0;color:var(--ink-2);font-size:14px}
.sh-purse{display:flex;align-items:center;gap:12px;padding:10px 18px 10px 12px;background:var(--page);border:1px solid var(--rule);border-radius:12px}
.sh-coin{display:inline-flex;width:42px;height:42px;animation:dkspin 3.2s steps(1,end) infinite;transform-origin:center}
.sh-coin svg{width:42px;height:42px}
html[data-coin="pixel"] .sh-coin svg{image-rendering:pixelated}
.sh-purse b{display:block;font-size:22px;font-weight:800;line-height:1.1}.sh-purse small{font-size:12px;color:var(--ink-2)}
.sh-window{display:flex;align-items:center;gap:16px;margin:0 26px 22px;padding:12px 16px;border-radius:12px;background:var(--accent-soft)}
.sh-pickart{width:56px;height:56px;flex:none;display:flex;align-items:center;justify-content:center;font-size:36px;line-height:1}
.sh-picktext{flex:1;min-width:0;display:flex;flex-direction:column}.sh-picktext small{font-size:12px;color:var(--ink-2)}.sh-picktext b{font-size:16px;font-weight:700}
.sh-aisles{display:flex;gap:4px;border-bottom:1px solid var(--rule);margin-bottom:20px;overflow-x:auto;scrollbar-width:none}
.sh-aisles::-webkit-scrollbar{display:none}
.sh-aisles button{height:44px;padding:0 16px;white-space:nowrap;font:500 14px var(--ui);color:var(--ink-2);border-bottom:2px solid transparent;margin-bottom:-1px}
.sh-aisles button.on{color:var(--ink);font-weight:600;border-bottom-color:var(--accent)}
.shelfsec{margin-bottom:26px}
.sh-shelf{margin:0 0 12px;font-size:16px;font-weight:600}.sh-shelf .faint{font-weight:400;font-size:13px;color:var(--ink-2)}
.sh-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(186px,1fr));gap:14px}
.view:not(.wide) .shopitem{position:relative;display:flex;flex-direction:column;align-items:stretch;gap:4px;text-align:left;padding:0 0 12px;background:var(--card);border:1px solid var(--rule);border-radius:14px;overflow:hidden;min-height:0;transition:transform .15s,border-color .15s}
.view:not(.wide) .shopitem:hover{transform:translateY(-2px);border-color:var(--rule-2)}
.view:not(.wide) .shopitem .art{position:relative;display:flex;align-items:center;justify-content:center;height:112px;margin:0 0 8px;background:var(--page);border:0;border-radius:0;border-bottom:3px solid var(--rule);font-size:48px;line-height:1;width:auto}
.view:not(.wide) .shopitem .art>*{transform:scale(1.5)}
.view:not(.wide) .shopitem .art>.cathatpic,.view:not(.wide) .shopitem .art>img{image-rendering:pixelated}
.view:not(.wide) .shopitem>b{padding:0 14px;font:600 14px/1.35 var(--ui)}
.view:not(.wide) .shopitem>.small{padding:0 14px;font:400 12.5px/1.45 var(--ui);color:var(--ink-2)}
.view:not(.wide) .shopitem>.note,.view:not(.wide) .shopitem>.fact{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.view:not(.wide) .shopitem>.btn,.view:not(.wide) .shopitem>.lvtag,.view:not(.wide) .shopitem>.sh-state{margin:auto 14px 0;padding-top:0}
.view:not(.wide) .shopitem>.btn{margin-top:auto;min-height:36px;width:auto;background:var(--card);color:var(--ink);border:1px solid var(--rule-2);font-size:13px}
.view:not(.wide) .shopitem>.btn:hover:not([disabled]){background:var(--btn);border-color:var(--btn);color:var(--btn-ink)}
.view:not(.wide) .shopitem>*:nth-last-child(1){margin-top:auto}
.view:not(.wide) .shopitem.locked .art>*{filter:grayscale(1);opacity:.45}
.view:not(.wide) .shopitem.on{border:1.5px solid var(--accent)}
.view:not(.wide) .shopitem.on .art{background:var(--accent-soft);border-bottom-color:var(--accent)}
.lvtag{display:flex;align-items:center;justify-content:center;gap:5px;min-height:36px;font:500 12.5px var(--ui);color:var(--ink-2);background:none;border:0}
.sh-state{display:flex;align-items:center;justify-content:center;min-height:36px;font:600 13px var(--ui);color:var(--ink-2)}
.sh-state.on{color:var(--link)}
.sh-foot{margin-top:6px}
@media (max-width:900px){
  .sh-sign{padding:10px 16px 16px}.sh-title h1{font-size:26px}.sh-purse{width:100%}
  .sh-window{margin:0 16px 16px}
  .sh-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
}
html.still .sh-coin{animation:none}
@media (prefers-reduced-motion:reduce){.sh-coin{animation:none}}

/* ============================================================
   NOVEMBER 2026 — Start, the duel, the chest, the question screen

   Home is one decision. The duel and the chest are drawn on a dark
   stage over the page. On the question, comments sit under the
   explanation and the lifelines wait behind one button.
   ============================================================ */

/* ---------- the coin: a pixel drawing is only sharp at whole multiples ---------- */
.ci,.view:not(.wide) .ci,.shopitem .ci,.kicker .ci{width:16px;height:16px;vertical-align:-3px}
.coinv .ci,.view:not(.wide) .coinv .ci{width:32px;height:32px;vertical-align:-7px}
.crest .coins .coin{width:32px;height:32px;vertical-align:-8px}
.lk-wcoinart .ci,.view:not(.wide) .lk-wcoinart .ci{width:48px;height:48px}
.sh-coin,.sh-coin svg{width:48px;height:48px}
.ci,.coin,.sh-coin svg{shape-rendering:crispEdges}

/* ---------- Home ---------- */
.hm{display:flex;flex-direction:column;gap:20px}
.hm-top{align-items:stretch}
.hm-hero{justify-content:space-between;gap:26px;min-height:440px;position:relative;overflow:hidden;isolation:isolate}
.hm-hero::before{content:'';position:absolute;z-index:-1;width:70%;aspect-ratio:1;right:-22%;top:-40%;border-radius:50%;
  background:radial-gradient(closest-side,color-mix(in srgb,var(--accent) 16%,transparent),transparent)}
.hm-hero .t-title{font-size:68px;font-weight:700;line-height:1.02;letter-spacing:-.03em;margin:0}
.hm-sub{font-family:var(--ui);font-size:19px;color:var(--ink-2);margin:10px 0 0}
.btn.lg.hm-start{width:100%;height:104px;display:flex;align-items:center;padding:0 36px;border-radius:22px;font-size:34px;font-weight:700;letter-spacing:-.01em;justify-content:space-between;
  box-shadow:0 18px 36px -18px color-mix(in srgb,var(--btn) 90%,transparent);position:relative;transition:transform .18s var(--ease),box-shadow .18s}
.hm-start svg{width:38px;height:38px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;transition:transform .25s var(--ease)}
.hm-start:hover{transform:translateY(-2px);box-shadow:0 24px 40px -18px color-mix(in srgb,var(--btn) 95%,transparent)}
.hm-start:hover svg{transform:translateX(8px)}
.hm-start:active{transform:translateY(1px) scale(.99)}
.hm-start::after{content:'';position:absolute;inset:-1px;border-radius:inherit;border:2px solid var(--btn);opacity:0;animation:hmRing 2.6s ease-out infinite;pointer-events:none}
@keyframes hmRing{0%{opacity:.55;transform:scale(1)}70%,100%{opacity:0;transform:scale(1.045,1.22)}}
.hm-foot{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 18px;font-family:var(--ui);font-size:14.5px;color:var(--ink-2)}
.hm-duel{display:inline-flex;align-items:center;gap:8px}
.hm-duel svg{width:18px;height:18px;fill:none;stroke:var(--accent);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}
.hm-alt{color:var(--ink-2);border-bottom:1px solid var(--rule-2);margin-left:auto}
.hm-alt:hover{color:var(--link);border-color:var(--link)}
.hm-left{margin-top:14px;display:flex;flex-direction:column;gap:8px}
.hm-leftline{display:flex;align-items:baseline;gap:6px;font-family:var(--ui);font-size:14px;color:#BAB8AE}
.hm-leftline b{font-size:18px;color:#FAF9F5}
.hm-leftline span{margin-left:auto;font-size:13px}
.hm-leftbar{display:block;height:8px;border-radius:4px;background:#2E2D2A;overflow:hidden}
.hm-leftbar i{display:block;height:100%;border-radius:4px;background:#D97757}
.hm-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;align-items:start}
html[data-look="blue"] .t-roadsvg .rw.done,html[data-look="blue"] .hm-leftbar i{stroke:#5B8DEF;background:#5B8DEF}
html[data-look="blue"] .t-roadsvg .rn.now{fill:#2563EB;stroke:#DCE7FD}
html[data-look="blue"] .t-roadsvg .rh{fill:#A9C4FA}
html.still .hm-start::after{animation:none}
@media (max-width:900px){
  .hm{gap:14px}
  .hm-hero{min-height:0;gap:20px}
  .hm-hero .t-title{font-size:44px}
  .hm-sub{font-size:16px}
  .btn.lg.hm-start{height:84px;font-size:28px;border-radius:18px;padding:0 26px}
  .hm-cards{display:none}
  .hm-alt{margin-left:0}
}

/* ---------- lifelines: one button, and they fan out ---------- */
.lifes{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-height:42px}
.lifebtn{position:relative;flex:none;width:42px;height:42px;border-radius:50%;border:1px solid var(--rule-2);background:var(--card);color:var(--accent);
  display:grid;place-items:center;transition:transform .3s cubic-bezier(.2,1.6,.4,1),background .2s,color .2s,border-color .2s}
.lifebtn svg{width:20px;height:20px;fill:currentColor}
.lifebtn i{position:absolute;top:-5px;right:-6px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--btn);color:var(--btn-ink);
  font:600 11px/19px var(--mono);font-style:normal;text-align:center;box-shadow:0 0 0 2px var(--page)}
.lifebtn.none{color:var(--ink-3)}.lifebtn.none i{background:var(--ink-3)}
.lifebtn:hover{border-color:var(--accent);transform:scale(1.07)}
.lifes.open .lifebtn{background:var(--btn);border-color:var(--btn);color:var(--btn-ink);transform:rotate(-14deg) scale(1.04)}
.lifes.open .lifebtn i{opacity:0}
.lifetray{display:none;align-items:center;gap:8px;flex-wrap:wrap}
.lifes.open .lifetray{display:flex}
.qhelp .lifetray .life{font-size:11.5px;padding:9px 13px;border-radius:21px;background:var(--card)}
.lifes.fan .lifetray .life{animation:lifeFan .46s cubic-bezier(.2,1.55,.4,1) both;animation-delay:calc(var(--i)*70ms)}
@keyframes lifeFan{0%{opacity:0;transform:translateX(-34px) scale(.3) rotate(-18deg)}60%{opacity:1}100%{opacity:1;transform:none}}
html.still .lifes.fan .lifetray .life{animation:none}

/* ---------- comments, under the explanation ---------- */
.osoc{margin:-4px 2px 10px;min-height:0}
.qcm{margin-top:16px;padding:16px 18px;border:1px solid var(--rule);border-radius:14px;background:var(--card);display:flex;flex-direction:column;gap:12px;cursor:auto}
.qc-head{display:flex;align-items:baseline;gap:8px;font-family:var(--ui);font-size:14px}
.qc-head b{font-weight:600}
.qc-head span{font-family:var(--mono);font-size:12px;color:var(--ink-3)}
.qc-list{display:flex;flex-direction:column;gap:14px;max-height:360px;overflow:auto}
.qc-none{font-family:var(--ui);font-size:14px;color:var(--ink-3);margin:0}
.qc-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}
.qc-form textarea{resize:none;min-height:40px;max-height:140px;border:1px solid var(--rule-2);border-radius:10px;padding:9px 12px;font:15px/1.4 var(--ui);background:var(--page);color:var(--ink);width:100%}
.qc-form textarea:focus{outline:none;border-color:var(--accent)}
.qc-form .btn{min-height:40px}
.qc-more{grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;font:12.5px var(--ui);color:var(--ink-3)}
.qc-more[hidden]{display:none}
.qc-more input{border:0;border-bottom:1px solid var(--rule-2);background:none;font:inherit;color:var(--ink);width:150px;padding:2px 0}
.qc-form .sc-err{grid-column:1 / -1;margin:0}

/* ---------- the dark stage: finding an opponent, VS, the chest ---------- */
html.dov-on,html.dov-on body{overflow:hidden}
.dov{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;padding:24px 20px;overflow:auto;color:#FAF9F5;
  background:radial-gradient(120% 90% at 50% 0%,#2B2219 0%,#141413 62%);animation:dovIn .26s ease both}
@keyframes dovIn{from{opacity:0}to{opacity:1}}
.dov .btn.ghost{background:transparent;color:#FAF9F5;border:1px solid rgba(255,255,255,.28)}
.dov .btn.ghost:hover{border-color:#FAF9F5}
.dv-face{position:relative;flex:none;width:44px;height:44px;border-radius:50%;background:#D97757;color:#fff;display:grid;place-items:center;overflow:hidden;
  font:700 18px var(--ui)}
.dv-face b{font-weight:700}
.dv-face img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.dv-face.big{width:92px;height:92px;font-size:38px;box-shadow:0 0 0 4px rgba(255,255,255,.14)}

.dv-find{display:flex;flex-direction:column;align-items:center;gap:14px;width:100%;max-width:470px;text-align:center}
.dv-find h2{font:700 28px/1.2 var(--ui);letter-spacing:-.01em;margin:8px 0 0;color:#FAF9F5}
.dv-sub{font:15px var(--ui);color:#BAB8AE;margin:0}
.dv-radar{position:relative;width:170px;height:170px;display:grid;place-items:center}
.dv-radar .dv-face{width:72px;height:72px;font-size:30px;z-index:1;box-shadow:0 0 0 4px #141413}
.dv-radar i{position:absolute;inset:0;border-radius:50%;border:2px solid #D97757;opacity:0;animation:dvPing 2.4s ease-out infinite}
.dv-radar i:nth-child(2){animation-delay:.8s}.dv-radar i:nth-child(3){animation-delay:1.6s}
@keyframes dvPing{0%{transform:scale(.42);opacity:.9}100%{transform:scale(1);opacity:0}}
.dv-tip{width:100%;min-height:128px;margin-top:10px;padding:16px 20px;border-radius:16px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);text-align:left}
.dv-tip span{font:600 11px var(--mono);letter-spacing:.14em;text-transform:uppercase;color:#F0B49C}
.dv-tip p{font:17px/1.45 var(--ui);color:#FAF9F5;margin:6px 0 0}
.dv-tip p.in{animation:dvTip .5s ease both}
@keyframes dvTip{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.dv-cancel{font:14px var(--ui);color:#BAB8AE;padding:10px 16px;border-bottom:0;background:none}
.dv-cancel:hover{color:#FAF9F5}

.dv-vs{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:18px 16px;width:100%;max-width:640px;text-align:center}
.dv-card{display:flex;flex-direction:column;align-items:center;gap:8px;padding:26px 14px;border-radius:20px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);min-width:0}
.dv-card b{font:600 17px var(--ui);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#FAF9F5}
.dv-card span{font:13px var(--ui);color:#BAB8AE}
.dv-card.l{animation:dvL .55s cubic-bezier(.2,1.3,.4,1) both}
.dv-card.r{animation:dvR .55s cubic-bezier(.2,1.3,.4,1) both}
.dv-card.r .dv-face{background:#5E5D59}
@keyframes dvL{from{opacity:0;transform:translateX(-90px) rotate(-4deg)}to{opacity:1;transform:none}}
@keyframes dvR{from{opacity:0;transform:translateX(90px) rotate(4deg)}to{opacity:1;transform:none}}
.dv-mid em{display:block;font:italic 800 58px var(--ui);color:#F3BF28;text-shadow:0 6px 24px rgba(243,191,40,.45);animation:dvPop .5s cubic-bezier(.2,1.9,.4,1) .35s both}
@keyframes dvPop{from{opacity:0;transform:scale(.2) rotate(-18deg)}to{opacity:1;transform:none}}
.dv-rules{grid-column:1 / -1;display:flex;justify-content:center;flex-wrap:wrap;gap:8px}
.dv-rules span{font:13px var(--ui);padding:6px 12px;border-radius:16px;background:rgba(243,191,40,.12);color:#F6D77A}
.dv-same{grid-column:1 / -1;font:14.5px var(--ui);color:#BAB8AE;margin:0}
.dv-count{grid-column:1 / -1;font:800 76px/1 var(--mono);color:#FAF9F5;animation:dvPop .4s cubic-bezier(.2,1.9,.4,1) both}
.dv-count.in{animation:dvPop2 .4s cubic-bezier(.2,1.9,.4,1) both}
@keyframes dvPop2{from{opacity:0;transform:scale(1.9)}to{opacity:1;transform:none}}

/* ---------- the race, above the question ---------- */
.dhud{display:flex;flex-direction:column;gap:4px;margin:0 0 14px;padding:10px 16px;border-radius:14px;background:#141413;color:#FAF9F5}
html[data-theme="night"] .dhud{border:1px solid var(--rule)}
.dh-lane{display:grid;grid-template-columns:74px minmax(0,1fr) auto;align-items:center;gap:14px;font:13px var(--ui)}
.dh-who{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dh-track{position:relative;height:8px;border-radius:4px;background:#2E2D2A;margin:11px 14px}
.dh-track>i{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:#D97757;transition:width .6s var(--ease)}
.dh-lane.them .dh-track>i{background:#8E8C84}
.dh-track em{position:absolute;top:50%;transform:translate(-50%,-50%);transition:left .6s var(--ease);font-style:normal}
.dh-track .dv-face{width:26px;height:26px;font-size:12px;box-shadow:0 0 0 2px #141413}
.dh-lane.them .dv-face{background:#5E5D59}
.dh-n{font:12px var(--mono);color:#BAB8AE;min-width:64px;text-align:right;white-space:nowrap}
.dh-n b{font-size:14px;color:#FAF9F5}
.dh-solo{font:13.5px var(--ui);color:#BAB8AE;padding:3px 0}
html[data-look="blue"] .dh-track>i{background:#5B8DEF}
html[data-look="blue"] .dv-face{background:#2563EB}

/* ---------- how the duel ended ---------- */
.dres{position:relative;overflow:hidden;display:flex;flex-direction:column;align-items:center;gap:18px;padding:28px 22px;border-radius:20px;background:#141413;color:#FAF9F5;text-align:center}
.dres.won{background:radial-gradient(120% 100% at 50% 0%,#40300F 0%,#141413 68%)}
html[data-theme="night"] .dres{border:1px solid var(--rule)}
.dr-banner{font:800 50px/1 var(--ui);letter-spacing:-.02em;animation:dvPop .55s cubic-bezier(.2,1.7,.4,1) both}
.dr-banner.sm{font-size:24px;font-weight:700;animation:none}
.dres.won .dr-banner{color:#F3BF28;text-shadow:0 8px 30px rgba(243,191,40,.4)}
.dres.lost .dr-banner{color:#BAB8AE}
.dr-sides{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:14px;width:100%;max-width:540px}
.dr-side{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0}
.dr-side .dv-face.big{width:68px;height:68px;font-size:28px}
.dr-side.them .dv-face{background:#5E5D59}
.dr-side>b{font:600 15px var(--ui);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dr-side>span{font:12px var(--ui);color:#BAB8AE}
.dr-stars{display:flex;gap:4px;margin-top:6px}
.dr-stars i{font-style:normal;font-size:28px;line-height:1;color:#3A3935}
.dr-stars i.on{color:#F3BF28;text-shadow:0 0 16px rgba(243,191,40,.65);animation:drStar .5s cubic-bezier(.2,2,.4,1) both;animation-delay:calc(.45s + var(--i)*.42s)}
@keyframes drStar{from{opacity:0;transform:scale(3) rotate(-40deg)}to{opacity:1;transform:none}}
.dr-score{display:flex;align-items:center;gap:8px;font:800 36px var(--mono)}
.dr-score i{font-style:normal;color:#5E5D59}
.dr-rows{display:flex;flex-direction:column;gap:6px;width:100%;max-width:540px}
.dr-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px;padding:10px 14px;border-radius:10px;background:rgba(255,255,255,.06);font:14px var(--ui)}
.dr-row em{font:600 10.5px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:#BAB8AE;font-style:normal}
.dr-row .a{text-align:left}.dr-row .b{text-align:right}
.dr-row .won{color:#F6D77A;font-weight:600}
.dr-row i{font-style:normal;margin:0 6px;color:#F3BF28}
.dr-note{font:14px/1.5 var(--ui);color:#BAB8AE;max-width:460px;margin:0}
.dr-foot{display:flex;justify-content:center}
.dr-chest{gap:12px;min-height:60px;padding:0 26px 0 16px;background:#F3BF28;color:#2A1D00;animation:drChest 1.6s ease-in-out infinite}
.dr-chest .chx{width:46px;height:auto}
@keyframes drChest{0%,100%{transform:none}50%{transform:translateY(-3px) scale(1.02)}}
.dr-dots{display:flex;gap:6px}
.dr-dots i{width:8px;height:8px;border-radius:50%;background:#BAB8AE;animation:drDot 1.1s ease-in-out infinite}
.dr-dots i:nth-child(2){animation-delay:.18s}.dr-dots i:nth-child(3){animation-delay:.36s}
@keyframes drDot{0%,100%{opacity:.25;transform:none}40%{opacity:1;transform:translateY(-5px)}}
.dres .btn.ghost{background:transparent;color:#FAF9F5;border:1px solid rgba(255,255,255,.28)}

/* ---------- the chest ---------- */
.dov.cho{background:radial-gradient(80% 60% at 50% 58%,#4A3413 0%,#1B1610 55%,#141413 100%)}
.ch-stage{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:12px;width:100%;max-width:560px;min-height:min(600px,calc(100vh - 60px))}
.ch-kick{font:600 12px var(--mono);letter-spacing:.2em;text-transform:uppercase;color:#F0B49C;position:absolute;top:6px;left:0;right:0;text-align:center}
.ch-rays{position:absolute;left:50%;bottom:120px;width:720px;height:720px;margin-left:-360px;margin-bottom:-300px;border-radius:50%;pointer-events:none;opacity:0;
  background:repeating-conic-gradient(from 0deg,rgba(255,221,128,.2) 0 9deg,transparent 9deg 22deg);
  -webkit-mask:radial-gradient(closest-side,#000 18%,transparent 72%);mask:radial-gradient(closest-side,#000 18%,transparent 72%);transition:opacity .6s}
.ch-stage.open .ch-rays{opacity:1;animation:chSpin 22s linear infinite}
@keyframes chSpin{to{transform:rotate(360deg)}}
.ch-slot{position:relative;z-index:2;height:214px;width:100%;display:grid;place-items:end center}
.ch-box{position:relative;z-index:1;width:230px;padding:0;background:none;border:0;cursor:pointer;animation:chDrop .75s cubic-bezier(.35,1.45,.5,1) both;-webkit-tap-highlight-color:transparent}
@keyframes chDrop{0%{opacity:0;transform:translateY(-520px) rotate(-10deg)}55%{opacity:1;transform:translateY(0) scale(1.08,.9)}75%{transform:translateY(-22px) scale(.97,1.04)}100%{transform:none}}
.chx{display:block;width:100%;height:auto;overflow:visible}
.ch-box .chx{animation:chWobble 1.9s ease-in-out .9s infinite;transform-origin:50% 92%}
@keyframes chWobble{0%,58%,100%{transform:none}64%{transform:rotate(-5deg) translateY(-4px)}70%{transform:rotate(5deg) translateY(-6px)}76%{transform:rotate(-4deg) translateY(-3px)}82%{transform:rotate(3deg)}88%{transform:none}}
.cx-lid{transform-box:fill-box;transform-origin:50% 100%;transition:transform .5s cubic-bezier(.3,1.6,.5,1)}
.cx-lock{transform-box:fill-box;transform-origin:50% 50%;transition:transform .45s ease-in,opacity .45s}
.cx-glow{opacity:0;transition:opacity .4s .15s}
.ch-stage.open .ch-box .chx{animation:chOpen .5s ease both}
@keyframes chOpen{0%{transform:scale(1.1,.86)}45%{transform:scale(.95,1.1) translateY(-10px)}100%{transform:none}}
.ch-stage.open .cx-lid{transform:translateY(-44px) rotate(-9deg) scaleY(.86)}
.ch-stage.open .cx-lock{transform:translateY(70px) rotate(40deg);opacity:0}
.ch-stage.open .cx-glow{opacity:1;animation:chGlow 1.5s ease-in-out infinite}
@keyframes chGlow{0%,100%{opacity:.8}50%{opacity:1}}
.ch-left{position:absolute;right:6px;top:34px;min-width:34px;height:34px;padding:0 9px;border-radius:17px;background:#D97757;color:#fff;font:700 17px/34px var(--mono);font-style:normal;text-align:center;box-shadow:0 0 0 3px #1B1610}
.ch-left[hidden]{display:none}
.ch-hint{font:15px var(--ui);color:#BAB8AE;margin:0;animation:chHint 1.6s ease-in-out infinite}
.ch-hint[hidden]{display:none}
@keyframes chHint{0%,100%{opacity:.55}50%{opacity:1}}
.ch-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:180px;min-height:204px;padding:18px 14px;border-radius:18px;
  background:#FAF9F5;color:#141413;text-align:center;box-shadow:0 18px 40px -14px rgba(0,0,0,.7);animation:chCard .55s cubic-bezier(.2,1.5,.4,1) both}
@keyframes chCard{0%{opacity:0;transform:translateY(170px) scale(.15) rotate(-12deg)}60%{opacity:1}100%{opacity:1;transform:none}}
.ch-ic{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;background:#F0EEE6;color:#C6613F}
.ch-ic svg{width:38px;height:38px}
.ch-ic svg.px{width:48px;height:48px;shape-rendering:crispEdges}
.ch-card b{font:700 16px/1.25 var(--ui)}
.ch-card em{font:600 10.5px var(--mono);letter-spacing:.14em;text-transform:uppercase;font-style:normal;color:#8A5A00}
.ch-card small{font:11.5px var(--mono);color:#87867F}
.ch-card.r1,.ch-card.r2{background:linear-gradient(160deg,#FFF6D6,#FFE08A);box-shadow:0 0 0 3px #F3BF28,0 0 46px rgba(243,191,40,.55)}
.ch-card.r1 .ch-ic,.ch-card.r2 .ch-ic{background:#fff;color:#B4532A}
.ch-end{display:flex;flex-direction:column;align-items:center;gap:18px;width:100%;position:relative;z-index:2}
.ch-end[hidden]{display:none}
.ch-all{display:flex;justify-content:center;flex-wrap:wrap;gap:12px}
.ch-all .ch-card{width:150px;min-height:170px;animation-delay:calc(var(--i)*90ms)}
.ch-all .ch-card .ch-ic{width:58px;height:58px}
.ch-all .ch-card small{display:none}
.ch-btns{display:flex;justify-content:center;flex-wrap:wrap;gap:10px}
.ch-stage.done{justify-content:center}
.ch-stage.done .ch-slot{display:none}
.ch-stage.done .ch-box{width:120px;order:-1;pointer-events:none;animation:none}
.ch-stage.done .ch-rays{bottom:auto;top:40px;margin-bottom:0}
@media (max-width:560px){
  .dv-vs{gap:14px 8px}.dv-card{padding:18px 8px}.dv-face.big{width:68px;height:68px;font-size:28px}.dv-mid em{font-size:40px}
  .dh-lane{grid-template-columns:54px minmax(0,1fr) auto;gap:8px}.dh-n{min-width:0}
  .dr-banner{font-size:40px}.dr-row{font-size:13px;padding:9px 10px}
  .ch-all .ch-card{width:104px;min-height:140px;padding:12px 8px}.ch-all .ch-card b{font-size:13px}.ch-all .ch-card .ch-ic{width:46px;height:46px}
  .ch-all .ch-card .ch-ic svg{width:28px;height:28px}.ch-all .ch-card .ch-ic svg.px{width:32px;height:32px}
}
html.still .dov *,html.still .dres *{animation-duration:.01s!important;animation-iteration-count:1!important}
@media (prefers-reduced-motion:reduce){.dov *,.dres *,.hm-start::after{animation-duration:.01s!important;animation-iteration-count:1!important}}

/* ============================================================
   QUESTS — a path of three, a bonus chest, a weekly boss
   ============================================================ */
.qx{display:flex;flex-direction:column;gap:18px}
.qx-hero{position:relative;overflow:hidden;display:flex;align-items:center;gap:28px;flex-wrap:wrap;padding:30px 32px;border-radius:22px;
  background:radial-gradient(120% 140% at 100% 0%,color-mix(in srgb,var(--accent) 30%,transparent),transparent 60%),#1d1b19;color:#F4F1EA}
.qx-hero .kicker{color:#E8C98A;letter-spacing:.08em}
.qx-hl{flex:1 1 300px;min-width:0}
.qx-h{font-family:var(--ui);font-size:36px;line-height:1.08;font-weight:800;letter-spacing:-.02em;margin:8px 0 8px;color:#fff}
.qx-sub{margin:0;color:#C9C4B8;font-size:15px;max-width:460px}
.qx-path{display:flex;align-items:center;flex:0 1 auto}
.qx-pip{flex:none;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;font:700 16px var(--mono);
  background:#2c2a27;color:#A8A397;border:2px solid #45423d}
.qx-pip.ready{border-color:#F3BF28;color:#F3BF28;animation:qxPulse 1.4s ease-in-out infinite}
.qx-pip.on{background:var(--accent);border-color:var(--accent);color:#fff}
.qx-pip svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.qx-link{flex:none;width:28px;height:4px;background:#45423d;border-radius:2px}
.qx-link.on{background:var(--accent)}
.qx-goal{flex:none;width:86px;height:82px;display:grid;place-items:center;filter:grayscale(.55) brightness(.8);transition:filter .4s}
.qx-goal .chx{width:86px;height:auto}
.qx-goal.open{filter:none;animation:qxBob 2.4s ease-in-out infinite}
.qx-goal.open .chx{filter:drop-shadow(0 0 18px rgba(255,214,102,.55))}
@keyframes qxPulse{0%,100%{box-shadow:0 0 0 0 rgba(243,191,40,.45)}50%{box-shadow:0 0 0 9px rgba(243,191,40,0)}}
@keyframes qxBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}

.qx-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.qx-card{position:relative;display:flex;flex-direction:column;gap:10px;padding:20px;border-radius:18px;background:var(--card);border:1px solid var(--rule);
  box-shadow:0 1px 0 var(--rule-2);transition:transform .18s var(--ease),box-shadow .18s}
.qx-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(20,20,19,.08)}
.qx-top{display:flex;align-items:center;justify-content:space-between}
.qx-ic{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent)}
.qx-ic svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.qx-chip{font:700 11px var(--mono);letter-spacing:.06em;text-transform:uppercase;padding:5px 9px;border-radius:999px;background:#FFF1C9;color:#7A5410}
.qx-t{font-family:var(--ui);font-size:17px;line-height:1.3;font-weight:650;margin:2px 0 0;color:var(--ink);min-height:44px}
.qx-num{display:flex;align-items:baseline;gap:6px}
.qx-num b{font:800 30px var(--ui);letter-spacing:-.02em;color:var(--ink)}
.qx-num span{font:600 14px var(--mono);color:var(--ink-3)}
.qx-bar{height:12px;border-radius:6px;background:var(--track);overflow:hidden}
.qx-bar i{display:block;height:100%;border-radius:6px;background:linear-gradient(90deg,var(--accent),color-mix(in srgb,var(--accent) 60%,#F3BF28));
  position:relative;overflow:hidden;transition:width .6s var(--ease)}
.qx-bar i::after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.45) 50%,transparent 70%);animation:qxShine 2.6s linear infinite}
@keyframes qxShine{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
.qx-foot{display:flex;align-items:center;gap:12px;min-height:40px;margin-top:2px}
.qx-rw{display:inline-flex;align-items:center;gap:4px;font:600 13px var(--mono);color:var(--ink-2)}
.qx-rw b{color:var(--ink)}
.qx-rw .ci{width:16px;height:16px}
.qx-claim{height:42px;padding:0 22px;font-size:15px;font-weight:700;border-radius:12px;width:100%;
  background:linear-gradient(180deg,#F6C744,#E2A12B)!important;color:#3A2600!important;border:0!important;box-shadow:0 3px 0 #A8740F;animation:qxPulse 1.4s ease-in-out infinite}
.qx-claim:active{transform:translateY(2px);box-shadow:0 1px 0 #A8740F}
.qx-card.ready{border-color:#E2A12B;box-shadow:0 0 0 3px rgba(226,161,43,.22)}
.qx-card.claimed{opacity:.72}
.qx-card.claimed .qx-bar i{background:var(--ok)}
.qx-card.claimed .qx-bar i::after{display:none}
.qx-stamp{display:inline-flex;align-items:center;gap:6px;font:800 13px var(--mono);letter-spacing:.1em;text-transform:uppercase;color:var(--ok);
  border:2px solid var(--ok);border-radius:8px;padding:4px 10px;transform:rotate(-4deg)}

.qx-week{display:flex;align-items:center;gap:24px;flex-wrap:wrap;padding:24px 28px;border-radius:20px;color:#F4F1EA;
  background:linear-gradient(120deg,#2a1f3d,#1d1b19 70%)}
.qx-week .kicker{color:#C9B6F0}
.qx-week h2{font-family:var(--ui);font-size:22px;font-weight:750;margin:6px 0 12px;color:#fff}
.qx-wl{flex:1 1 320px;min-width:0}
.qx-wbar{position:relative;height:22px;border-radius:11px;background:#3a3445;overflow:hidden}
.qx-wbar i{display:block;height:100%;background:linear-gradient(90deg,#8B6CF0,#C9A2FF)}
.qx-wbar b{position:absolute;inset:0;display:grid;place-items:center;font:700 12px var(--mono);color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.5)}
.qx-days{display:flex;gap:8px;margin-top:12px}
.qx-days span{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font:700 12px var(--mono);background:#35303e;color:#9d97a8}
.qx-days span.on{background:#8B6CF0;color:#fff}
.qx-days span.now{outline:2px solid #C9A2FF;outline-offset:2px}
.qx-wr{display:flex;flex-direction:column;align-items:center;gap:10px;flex:0 0 auto}
.qx-two{display:flex}
.qx-two .chx{width:74px;height:auto}
.qx-two .chx+.chx{margin-left:-18px;transform:translateY(6px)}
.qx-rw.light{color:#C9C4B8}.qx-rw.light b{color:#fff}
.qx-week.claimed{opacity:.8}
.qx-week .qx-stamp{color:#9fd49a;border-color:#9fd49a}

.qx-flame{display:flex;align-items:baseline;gap:8px;margin:10px 0 6px}
.qx-flame svg{width:34px;height:34px;align-self:center;fill:var(--rule-2)}
.qx-flame.lit svg{fill:#F08A24;filter:drop-shadow(0 0 8px rgba(240,138,36,.5));animation:qxBob 2s ease-in-out infinite}
.qx-flame b{font:800 34px var(--ui);color:var(--ink)}
.qx-flame span{font-size:15px;color:var(--ink-2)}

html[data-look="blue"] .qx-hero{background:radial-gradient(120% 140% at 100% 0%,rgba(37,99,235,.38),transparent 60%),#111827}
html[data-look="blue"] .qx-week{background:linear-gradient(120deg,#1e2a4a,#111827 70%)}
@media (max-width:900px){.qx-grid{grid-template-columns:1fr 1fr}}
@media (max-width:620px){
  .qx-hero{padding:22px 18px;gap:18px}.qx-h{font-size:27px}
  .qx-grid{grid-template-columns:1fr;gap:12px}.qx-t{min-height:0;font-size:16px}.qx-card{padding:16px;gap:8px}.qx-num b{font-size:24px}
  .qx-wr{flex-direction:row;width:100%;justify-content:space-between}.qx-two .chx{width:58px}
  .qx-pip{width:36px;height:36px;font-size:14px}.qx-link{width:16px}.qx-goal,.qx-goal .chx{width:68px}
  .qx-week{padding:20px 18px}
}
html.still .qx *,html.still .qx{animation:none!important}
@media (prefers-reduced-motion:reduce){.qx *{animation:none!important}}

/* ============================================================
   BADGES — medals by rarity, progress on the locked ones
   ============================================================ */
.bx-page{display:flex;flex-direction:column;gap:22px}
.bx-hero{display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;padding:28px 30px;border-radius:22px;color:#F4F1EA;
  background:radial-gradient(90% 120% at 0% 0%,rgba(243,191,40,.22),transparent 60%),#1d1b19}
.bx-hero .kicker{color:#E8C98A}
.bx-hero h1{font:800 54px var(--ui);letter-spacing:-.03em;margin:4px 0;color:#fff}
.bx-hero h1 small{font-size:22px;color:#A8A397;font-weight:600}
.bx-hero p{margin:0;color:#C9C4B8;max-width:380px}
.bx-sum{display:flex;gap:14px;flex-wrap:wrap}
.bx-sum .bs{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:74px}
.bx-sum .bs .md{width:52px;height:54px}
.bx-sum .bs b{font:700 18px var(--mono);color:#fff}.bx-sum .bs b small{font-size:12px;color:#A8A397}
.bx-sum .bs span{font:700 10.5px var(--ui);letter-spacing:.08em;text-transform:uppercase;color:#A8A397}

.md{display:block;overflow:visible}
.md .md-body{fill:#C9C5BA}.md .md-inner{fill:#DCD8CE}.md .md-gl{fill:none;stroke:#8E8A80;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.md .md-rib{fill:#B9B5AA}
.md.on.md-common .md-body{fill:#A8693A}.md.on.md-common .md-inner{fill:#D99A5E}.md.on.md-common .md-gl{stroke:#5E3414}
.md.on.md-rare .md-body{fill:#3E79A8}.md.on.md-rare .md-inner{fill:#7FB6E0}.md.on.md-rare .md-gl{stroke:#123B5C}
.md.on.md-epic .md-body{fill:#6B45C9}.md.on.md-epic .md-inner{fill:#A98BF2}.md.on.md-epic .md-gl{stroke:#2C1766}.md.on.md-epic .md-rib{fill:#4A2D99}
.md.on.md-legend .md-body{fill:#D69A12}.md.on.md-legend .md-inner{fill:#FFD666}.md.on.md-legend .md-gl{stroke:#6B4500}.md.on.md-legend .md-rib{fill:#B5331E}
.md .md-shine{fill:none;stroke:rgba(255,255,255,.55);stroke-width:3;stroke-linecap:round}
.md.on.md-legend,.md.on.md-epic{filter:drop-shadow(0 4px 10px rgba(214,154,18,.35))}
.md.on.md-epic{filter:drop-shadow(0 4px 10px rgba(107,69,201,.35))}

.bx-near{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:12px}
.bx-n{display:flex;gap:14px;align-items:center;padding:16px;border-radius:16px;background:var(--card);border:1px solid var(--rule)}
.bx-n .md{width:58px;height:60px;flex:none}
.bx-n>div{min-width:0;flex:1}
.bx-n b{display:block;font-size:15px;color:var(--ink)}
.bx-n small{display:block;font-size:12.5px;color:var(--ink-3);margin:2px 0 8px}
.bx-bar{height:8px;border-radius:4px;background:var(--track);overflow:hidden}
.bx-bar i{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,var(--accent),#E2A12B)}
.bx-c{display:block;font:600 11.5px var(--mono);color:var(--ink-3);margin-top:5px}
.medal .md{width:44px;height:46px;flex:none}

.rar small{font:600 12px var(--mono);color:var(--ink-3);margin-left:6px;letter-spacing:0;text-transform:none}
.bx-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px;margin-top:10px}
.bx{display:flex;flex-direction:column;align-items:center;text-align:center;gap:4px;padding:18px 14px 16px;border-radius:16px;background:var(--card);
  border:1px solid var(--rule);transition:transform .18s var(--ease),box-shadow .18s;animation:bxIn .4s var(--ease) both;animation-delay:calc(var(--i)*25ms)}
.bx:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(20,20,19,.08)}
.bx .md{width:72px;height:75px;margin-bottom:6px}
.bx:not(.got) .md{opacity:.75}
.bx b{font-size:14.5px;color:var(--ink)}
.bx .small{font-size:12.5px;line-height:1.4}
.bx .bx-bar{width:100%;margin-top:8px}
.bx-when{font:600 11px var(--mono);color:var(--ok);margin-top:6px}
.bx.got.legend{background:linear-gradient(180deg,#FFF6DA,var(--card) 60%);border-color:#E9C15C}
.bx.got.epic{background:linear-gradient(180deg,#F1EAFF,var(--card) 60%);border-color:#BFA8F5}
.bx.got.legend .md,.bx.got.epic .md{animation:bxGlow 3s ease-in-out infinite}
.bx-q{width:72px;height:75px;display:grid;place-items:center;font:800 34px var(--ui);color:var(--ink-3);border:2px dashed var(--rule-2);border-radius:50%;margin-bottom:6px}
@keyframes bxIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes bxGlow{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
html[data-theme="night"] .bx.got.legend{background:linear-gradient(180deg,#3a2f12,var(--card) 60%)}
html[data-theme="night"] .bx.got.epic{background:linear-gradient(180deg,#2a2140,var(--card) 60%)}
html[data-look="blue"] .bx-hero{background:radial-gradient(90% 120% at 0% 0%,rgba(37,99,235,.35),transparent 60%),#111827}
@media (max-width:900px){.bx-near{grid-template-columns:1fr}}
@media (max-width:600px){.bx-hero{padding:22px 18px}.bx-hero h1{font-size:42px}.bx-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bx .md{width:60px;height:62px}}
html.still .bx,html.still .bx .md{animation:none!important}
@media (prefers-reduced-motion:reduce){.bx,.bx .md{animation:none!important}}
.shopitem .skinchip.arenachip{width:88%;height:74px;border-radius:12px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 4px 12px rgba(0,0,0,.18)}
.shopitem.locked .skinchip.arenachip{filter:grayscale(.6);opacity:.75}

/* ============================================================
   RIGHT IS GREEN, WRONG IS RED — on every look, day and night
   (the restyled question screen had given right answers the accent)
   ============================================================ */
:root{--right:#2F9E44;--right-soft:#E7F5EA;--right-line:#7CC68B;--wrong:#D93025;--wrong-soft:#FDECEA;--wrong-line:#EE9A92}
html[data-theme="night"]{--right:#5CCB75;--right-soft:#16301D;--right-line:#2F7A43;--wrong:#FF6B5E;--wrong-soft:#3A1714;--wrong-line:#8E3A32}
.opt.right{border:1.5px solid var(--right)!important;background:var(--right-soft)!important;color:var(--ink)}
.opt.right .key{background:var(--right)!important;color:#fff!important;border:0}
.opt.right .tick{stroke:var(--right)}
.opt.wrong{border:1.5px solid var(--wrong)!important;background:var(--wrong-soft)!important;color:var(--ink)}
.opt.wrong .key{background:var(--wrong)!important;color:#fff!important;border:0}
.opt.right .opt-mark{display:inline;color:var(--right);font-weight:700}
.opt.wrong .opt-mark{color:var(--wrong);font-weight:700}
.vrow .v.good{color:var(--right)!important}.vrow .v.bad{color:var(--wrong)!important}
.fbar .segs i.ok{background:var(--right)}.fbar .segs i.no{background:var(--wrong)}
.stlist.marked li.yes{border-color:var(--right-line)}.stlist.marked li.no{border-color:var(--wrong-line)}
.whybtn .whycost{display:inline-flex;align-items:center;gap:3px;margin-left:6px;font:700 12px var(--mono);color:var(--ink-2)}
.whybtn .whycost .ci{width:14px;height:14px}

/* the lifeline dock sits above the question, outside the answer box */
.lifedock{display:flex;justify-content:flex-end;margin:0 0 12px}
.lifedock .lifes{flex-direction:row;justify-content:flex-end;gap:10px;min-height:46px}
.lifedock .lifebtn{width:46px;height:46px;box-shadow:0 2px 10px rgba(20,20,19,.08)}
.lifedock .lifename{font:600 13px var(--ui);color:var(--ink-2)}
.lifedock .lifes.open .lifename{display:none}
.lifedock .lifetray{justify-content:flex-end;gap:8px}
.lifedock .life{display:inline-flex;align-items:center;gap:7px;height:40px;padding:0 12px 0 10px;border-radius:21px;border:1px solid var(--rule-2);background:var(--card);
  color:var(--ink);font:600 13px var(--ui);letter-spacing:0;text-transform:none;cursor:pointer;box-shadow:0 2px 8px rgba(20,20,19,.06)}
.lifedock .life svg{width:18px;height:18px;fill:none;stroke:var(--accent);stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;color:var(--accent)}
.lifedock .life i{font:700 11px var(--mono);font-style:normal;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center}
.lifedock .life:hover:not([disabled]){border-color:var(--accent)}
.lifedock .life[disabled]{opacity:.45;cursor:not-allowed}
.lifedock .lifes.fan .lifetray .life{animation:lifeFanL .46s cubic-bezier(.2,1.55,.4,1) both;animation-delay:calc(var(--i)*70ms)}
@keyframes lifeFanL{0%{opacity:0;transform:translateX(34px) scale(.3) rotate(18deg)}60%{opacity:1}100%{opacity:1;transform:none}}
@media (max-width:620px){.lifedock .lifetray{flex-wrap:wrap}.lifedock .life{height:36px;font-size:12px}}

/* ============================================================
   HOME — the owner's layout: main column + a rail on the right
   ============================================================ */
.hm.hm3{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px;align-items:start}
.hm3 .hm-main{display:flex;flex-direction:column;gap:20px;min-width:0}
.hm3 .hm-rail{display:flex;flex-direction:column;gap:16px;min-width:0}
.hm-pair{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.hm-pair .lk-card{display:flex;flex-direction:column;gap:12px;margin:0}
.hm-lastrow{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.hm-score{font:800 34px var(--ui);letter-spacing:-.02em;color:var(--ink)}
.hm-score small{font:600 18px var(--ui);color:var(--ink-2)}
.hm-dots{display:flex;flex-wrap:wrap;gap:4px;flex:1;min-width:0}
.hm-dots i{width:13px;height:9px;border-radius:3px;background:var(--rule-2)}
.hm-dots i.ok{background:var(--accent)}.hm-dots i.no{background:var(--track)}
.hm-lastfoot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto}
.hm-lastfoot .lk-link{background:none;border:0;padding:0;cursor:pointer;font:600 14px var(--ui);color:var(--link,var(--accent))}
.hm-wname{font:700 16px var(--ui);color:var(--ink)}
.hm-weak .btn{align-self:flex-start;margin-top:auto}
.hm-qline{font:500 14px var(--ui);color:#C9C4B8;margin:2px 0 10px}
.hm-qline b{color:#fff;font-weight:800}
@media (max-width:1180px){.hm.hm3{grid-template-columns:1fr}.hm3 .hm-rail{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}}
@media (max-width:620px){.hm-pair{grid-template-columns:1fr}}
/* practice: three ways in a row */
.lk-ways{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:1100px) and (min-width:901px){.lk-ways{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:900px){.lk-ways{grid-template-columns:1fr}}
/* the duel lanes: right and wrong, question by question, as they happen */
.dh-n b.ok{color:var(--right)}.dh-n b.no{color:var(--wrong)}
.dh-dots{display:flex;gap:3px;flex-wrap:wrap;grid-column:1/-1;margin-top:4px}
.dh-dots i{width:10px;height:10px;border-radius:3px;background:var(--track)}
.dh-dots i.ok{background:var(--right)}.dh-dots i.no{background:var(--wrong)}

/* Start: the one thing to press — a light sweep, a breathing glow, an arrow that wants to go */
.btn.lg.hm-start{position:relative;overflow:hidden;isolation:isolate;
  background:linear-gradient(135deg,color-mix(in srgb,var(--btn) 82%,#fff) 0%,var(--btn) 55%,color-mix(in srgb,var(--btn) 80%,#000) 100%)!important;
  box-shadow:0 14px 34px color-mix(in srgb,var(--btn) 42%,transparent),0 0 0 0 color-mix(in srgb,var(--btn) 40%,transparent);
  animation:hmBreath 2.4s ease-in-out infinite;transition:transform .18s var(--ease)}
.btn.lg.hm-start:hover{transform:translateY(-3px) scale(1.01)}
.btn.lg.hm-start:active{transform:translateY(1px) scale(.99)}
.hm-shine{position:absolute;top:0;left:-40%;width:35%;height:100%;z-index:-1;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.38),transparent);transform:skewX(-18deg);animation:hmShine 3.2s ease-in-out infinite}
.hm-stxt{position:relative}
.hm-sgo{position:relative;display:grid;place-items:center;width:64px;height:64px;border-radius:50%;background:rgba(255,255,255,.18)}
.hm-sgo svg{width:34px;height:34px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;animation:hmNudge 1.2s ease-in-out infinite}
@keyframes hmShine{0%,55%{left:-40%}100%{left:120%}}
@keyframes hmBreath{0%,100%{box-shadow:0 14px 34px color-mix(in srgb,var(--btn) 40%,transparent),0 0 0 0 color-mix(in srgb,var(--btn) 34%,transparent)}
  50%{box-shadow:0 18px 44px color-mix(in srgb,var(--btn) 55%,transparent),0 0 0 10px color-mix(in srgb,var(--btn) 0%,transparent)}}
@keyframes hmNudge{0%,100%{transform:translateX(0)}50%{transform:translateX(6px)}}
@media (max-width:620px){.hm-sgo{width:52px;height:52px}.hm-sgo svg{width:28px;height:28px}}
html.still .btn.lg.hm-start,html.still .hm-shine,html.still .hm-sgo svg{animation:none}
@media (prefers-reduced-motion:reduce){.btn.lg.hm-start,.hm-shine,.hm-sgo svg{animation:none}}

/* ============================================================
   THE MAP WITHOUT WRITING: numbers, stars and paper names only;
   a chapter's name shows when you point at it or tab to it
   ============================================================ */
/* chapter names stay on the road (the owner wants them visible) */
.mnode .here{top:-18px;width:14px;height:14px;padding:0;border-radius:50%;font-size:0;box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 55%,transparent);animation:mHere 1.6s ease-out infinite}
.mnode .here::after{display:none}
@keyframes mHere{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 55%,transparent)}100%{box-shadow:0 0 0 14px transparent}}
.mgate .gflag .gk,.mgate .gflag .gs,.mgate .gflag .gs2{display:none}
.gpractise{width:36px;height:36px;padding:0;display:grid;place-items:center;border-radius:50%}
.gpractise svg{width:16px;height:16px;fill:var(--sc,var(--accent))}
.mend span.mflag{display:grid;place-items:center;width:40px;height:40px;padding:0;border-radius:50%}
.mend .mflag svg{width:20px;height:20px;fill:none;stroke:var(--ink);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.view.wide .mhead{display:none!important}
/* the second map style: the road across the whole width, no rail */
.mapwide{max-width:1200px;margin:0 auto}
html.still .mnode .here{animation:none}

/* ============================================================
   ONE LEFT MENU POSITION: inside the site, Learn's menu sits in the
   same centred 1280px column as the community's, at the same height
   ============================================================ */
@media (min-width:901px){
  html.embedded[data-nav="left"]{--col:max(0px,calc((100vw - 1280px) / 2));--rail:calc(var(--col) + 251px)}
  html.embedded[data-nav="left"] body:not(.focus):not(.welcoming) .lside{left:var(--col);width:251px;padding:34px 12px 18px 15px}
  html.embedded[data-nav="left"] body:not(.focus):not(.welcoming) .ls-nav a{height:40px}
  html.embedded[data-nav="left"] body:not(.focus) .main{margin-left:var(--rail);max-width:calc(1280px - 251px)}
}
@media (min-width:901px) and (max-width:1350px){
  html.embedded[data-nav="left"] body:not(.focus):not(.welcoming) .lside{width:237px}
  html.embedded[data-nav="left"]{--rail:calc(var(--col) + 237px)}
}
.scene .mend{display:none!important}
.mapwide{max-width:none}
.mapwide .mapmain{max-width:none}
/* Home: the hero gets the wider half so "Today's set" stays on one line */
.hm3 .hm-top{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:20px}
.hm3 .hm-hero .t-title{font-size:clamp(40px,3.7vw,58px);white-space:nowrap}
@media (max-width:760px){.hm3 .hm-top{grid-template-columns:1fr}.hm3 .hm-hero .t-title{white-space:normal}}

/* the map with no boxes beside it: one centred road */
.mapcols{grid-template-columns:minmax(0,900px)!important}
@media (min-width:1700px){.mapcols{grid-template-columns:minmax(0,1040px)!important}}
.lifedock{margin:12px 0 0!important}

/* where a test-paper question was set */
.qsrc{font-size:12.5px;color:var(--ink-2);opacity:.8;margin:0 0 8px;line-height:1.4}
/* tables and matrices inside test-paper questions */
.qcard table{border-collapse:collapse;margin:6px 0;font-size:.95em}
.qcard table td,.qcard table th{border:1px solid var(--rule);padding:3px 8px;text-align:center}
.qcard table.mx{display:inline-table;vertical-align:middle;margin:2px 4px;position:relative}
.qcard table.mx td{border:0;padding:1px 7px}
.qcard table.mx.b{border-left:2px solid currentColor;border-right:2px solid currentColor;border-radius:1px}
.qcard table.mx.v{border-left:1.5px solid currentColor;border-right:1.5px solid currentColor}
.qcard table.mx.p{border-left:1.5px solid currentColor;border-right:1.5px solid currentColor;border-radius:10px}
.qcard table.mx.c{border-left:2px solid currentColor;border-radius:8px 0 0 8px}
.qcard table.mx.c td{text-align:left}

/* Practice: recent results this week */
.lk-recent{margin-top:14px}
.lk-res{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-top:1px solid var(--line)}
.lk-res:first-of-type{border-top:0}
.lk-res b{display:block;font-weight:600;font-size:14px;line-height:1.3}
.lk-res small{color:var(--ink-2);font-size:12.5px}
.lk-respct{font-weight:700;font-variant-numeric:tabular-nums;min-width:44px;text-align:right}
.lk-respct.ok{color:var(--ok)}.lk-respct.no{color:var(--no)}
.gflag .gsoon{display:block;font-size:11.5px;font-weight:600;letter-spacing:.02em;opacity:.85;margin-top:2px}
.subj .sd.soon{font-size:11.5px;color:var(--ink-3,#888)}

/* Start ripple (owner, 2026-11-18): soft rings spread out from behind the button,
   and a press sends a wave out from where the finger landed (FX in look.js). */
.hm-swrap{position:relative;isolation:isolate}
.hm-swrap .hm-start{z-index:1}
.hm-rip{position:absolute;inset:0;border-radius:22px;z-index:0;pointer-events:none;
  background:color-mix(in srgb,var(--btn) 30%,transparent);animation:hmRip 3s cubic-bezier(.2,.6,.3,1) infinite}
.hm-rip.r2{animation-delay:1s}.hm-rip.r3{animation-delay:2s}
@keyframes hmRip{0%{opacity:.7;transform:scale(1)}100%{opacity:0;transform:scale(1.08,1.5)}}
.hm-start .hm-wave{position:absolute;z-index:-1;border-radius:50%;width:20px;height:20px;margin:-10px 0 0 -10px;
  background:rgba(255,255,255,.45);pointer-events:none;animation:hmWave .7s ease-out forwards}
@keyframes hmWave{to{transform:scale(40);opacity:0}}
@media (max-width:900px){.hm-rip{border-radius:18px}}
html.still .hm-rip{animation:none;opacity:0}
@media (prefers-reduced-motion:reduce){.hm-rip{animation:none;opacity:0}}
.whybtn.whynone{opacity:.55;cursor:not-allowed}
.whybtn .whyfree{color:var(--ok,#2f8a4f);text-transform:uppercase;letter-spacing:.04em}
.hc-skel{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.hc-skel i{display:block;height:12px;border-radius:6px;background:var(--quiet);animation:hcPulse 1.4s ease-in-out infinite}
.hc-skel i:nth-child(2){width:80%}.hc-skel i:nth-child(3){width:55%}
@keyframes hcPulse{50%{opacity:.45}}
.hc-streak{min-height:262px}.hc-est{min-height:214px}.hc-duel{min-height:150px}.hc-league{min-height:130px}
/* duel tips (owner, 2026-11-19): while finding an opponent, at the bottom of the
   screen in ordinary weight and a little see-through; while playing, faint at the bottom */
.dv-tip.low{position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 26px);transform:translateX(-50%);
  width:min(620px,calc(100vw - 32px));min-height:0;margin:0;padding:0;background:none;border:0;text-align:center;opacity:.62}
.dv-tip.low span{font:500 11px var(--mono);letter-spacing:.14em;color:#F0B49C}
.dv-tip.low p{font:400 15px/1.5 var(--ui);color:#FAF9F5;margin:4px 0 0}
.dgtip{position:fixed;left:50%;bottom:12px;transform:translateX(-50%);z-index:40;max-width:min(560px,calc(100vw - 32px));
  font:12.5px/1.4 var(--ui);color:var(--ink-2);opacity:.55;text-align:center;pointer-events:none;transition:opacity .45s}
.dgtip::before{content:'Tip · ';font-weight:600}
.dgtip.out{opacity:0}
@media (max-width:900px){.dgtip{bottom:calc(env(safe-area-inset-bottom,0px) + 70px)}}
.btn.lg.hm-start.hm-wait{font-size:24px;gap:14px}
.hm-start.hm-wait .hm-stxt{min-width:0;overflow:hidden;text-overflow:ellipsis}
.hm-start.hm-wait .hm-stxt{display:flex;flex-direction:column;align-items:flex-start;text-align:left;line-height:1.2}
.hm-start.hm-wait small{font-size:14px;font-weight:500;opacity:.85;margin-top:4px}
.hm-dots{display:flex!important;gap:6px;background:none!important}
.hm-dots i{width:10px;height:10px;border-radius:50%;background:currentColor;animation:hcPulse 1s ease-in-out infinite}
.hm-dots i:nth-child(2){animation-delay:.2s}.hm-dots i:nth-child(3){animation-delay:.4s}
@media (max-width:900px){.btn.lg.hm-start.hm-wait{font-size:19px}}

.tsres-h{display:block;padding:8px 12px 4px;font:700 11px var(--ui);letter-spacing:.05em;text-transform:uppercase;color:var(--ink-3)}
.tsres-people .tsres-h{padding:0 0 4px}
/* the duel result, brought up on its own when the opponent finishes (2026-11-19) */
.dov-res{display:flex;align-items:center;justify-content:center;padding:16px;overflow:auto}
.dres-pop{width:min(560px,100%);display:flex;flex-direction:column;gap:12px;align-items:stretch}
.dres-pop-k{margin:0;text-align:center;font:600 12px var(--mono);letter-spacing:.14em;text-transform:uppercase;color:#F0B49C}
.dres-pop-x{align-self:center;color:#FAF9F5;border-color:rgba(255,255,255,.3)}
/* the "Row of rings" logo is wide, not square (2026-11-19) */
html[data-logo="row"] .brand-mark,html[data-logo="row"] .top .brand-mark{width:72px;height:18px}
html[data-logo="row"] .top .prow .brand-mark{width:64px;height:16px}
html[data-logo="row"] .lk-wlogo{width:128px;height:32px}
/* Home on a computer (owner, 2026-11-19): the right column ends on the same line as
   the left one. The rail takes the height of the main column and its four cards share
   it, so they are full size before any data arrives and never run longer. */
@media (min-width:1181px){
  .hm.hm3{align-items:stretch}
  .hm3 .hm-rail{height:0;min-height:100%}
  .hm3 .hm-rail>.lk-card{flex:1 1 0;min-height:min-content}
  .hm3 .hm-rail>.hc-streak,.hm3 .hm-rail>.hc-est,.hm3 .hm-rail>.hc-duel,.hm3 .hm-rail>.hc-league{min-height:min-content}
}

/* review fixes (2026-11-26)
   1. the sticky "1 / 16" bar on a computer had no background, so options showed through it
   2. the faint duel tip lay over Comment/Share/Report and the bottom buttons: the page now
      keeps room for it, it gets a soft backing, and it steps aside once the question is answered
   3. on a phone "Hide explanation" was cut off in its fixed 118px button
   4. the A–D keyboard hint is hidden on touch screens, which have no keys */
@media (min-width:901px){ body.focus .fbar{background:var(--page)} }
body.dg-tipon main.view{padding-bottom:84px}
.dgtip{background:color-mix(in srgb,var(--page) 92%,transparent);padding:5px 14px;border-radius:999px;opacity:.8}
.dgtip.out{opacity:0}
/* after an answer the tip would sit on the result, comments and explanation: hide it */
body:has(#view .vrow) .dgtip{opacity:0;visibility:hidden}
@media (max-width:900px){
  body.dg-tipon main.view{padding-bottom:150px}
  body.dg-tipon:has(#view .vrow) main.view{padding-bottom:110px}
  .actions .btn.ghost{flex:0 0 auto;padding:0 14px;white-space:nowrap}
}
@media (hover:none) and (pointer:coarse){ .qhelp .hint{display:none} }
