/* Math Stats 1 Drill: the night-sky course map look. Change the colors here and the whole app follows. */
:root {
  --bg: #080c18; --node: rgba(22, 31, 56, .82); --glass: rgba(16, 22, 42, .78); --line: rgba(140, 170, 255, .14);
  --text: #e7ecff; --muted: #8b96b8; --faint: #56607f;
  --cyan: #5eead4; --cyan-soft: rgba(94, 234, 212, .13); --gold: #fcd34d; --violet: #a78bfa;
  --right: #4ade80; --wrong: #fb7185; --warn: #fbbf24;
  --ease: cubic-bezier(.22, .8, .24, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { color: var(--text); background: var(--bg); overflow: hidden; user-select: none;
       font: 14px/1.45 "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
[hidden] { display: none !important; }
.sky { position: fixed; inset: 0; pointer-events: none;
       background: radial-gradient(1200px 700px at 70% -10%, #1a2350 0%, transparent 60%), radial-gradient(900px 600px at 0% 110%, #131b3d 0%, transparent 60%); }
.sky::before { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(1px 1px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 33% 72%, #cfd8ff, transparent),
    radial-gradient(1px 1px at 58% 22%, #fff, transparent), radial-gradient(1.5px 1.5px at 81% 64%, #dfe6ff, transparent),
    radial-gradient(1px 1px at 92% 12%, #fff, transparent), radial-gradient(1px 1px at 5% 88%, #cfd8ff, transparent),
    radial-gradient(1px 1px at 46% 93%, #fff, transparent), radial-gradient(1px 1px at 70% 40%, #cfd8ff, transparent);
  animation: twinkle 7s ease-in-out infinite alternate; }
@keyframes twinkle { to { opacity: .2; } }

.screen { position: relative; height: 100vh; display: flex; flex-direction: column; animation: enter .55s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
.loading { align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 0 16px; }
.loading h1 { font-size: 34px; font-weight: 600; }
.loading em { color: var(--cyan); font-style: normal; }
.loading p { font-size: 17px; animation: twinkle 1.6s ease-in-out infinite alternate; }
.loading small { opacity: .6; }
.webonly { display: none; }
[data-web] .webonly { display: block; }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; backdrop-filter: blur(16px); }
.ghost, .small { padding: 9px 15px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--text);
                 cursor: pointer; transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease); white-space: nowrap; }
.ghost:hover, .small:hover { border-color: rgba(140,170,255,.4); background: rgba(140,170,255,.06); }
.small { padding: 6px 12px; border-radius: 10px; font-size: 13px; }
.small.warn { color: var(--warn); border-color: rgba(251,191,36,.25); }
.small:disabled { opacity: .45; cursor: default; }
.go { padding: 12px 24px; border: 0; border-radius: 14px; font-weight: 700; font-size: 15px; color: #06121a; cursor: pointer; white-space: nowrap;
      background: linear-gradient(90deg, var(--cyan), #a5b4fc); box-shadow: 0 8px 26px -8px rgba(94,234,212,.7); transition: transform .3s var(--ease), filter .3s var(--ease); }
.go:hover { transform: translateY(-1px); filter: brightness(1.06); }
.go:disabled { filter: grayscale(.7) brightness(.7); cursor: default; transform: none; }
kbd { font-family: inherit; font-size: 11px; opacity: .6; margin-left: 6px; }
.spacer { flex: 1; }

/* ---------------------------------------------------------------- home */
#home { padding: 24px 30px 0; }
.homehead { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.trackpick { display: flex; width: max-content; gap: 4px; padding: 3px; margin-bottom: 8px; border-radius: 12px; background: var(--node); border: 1px solid var(--line); }
.trackpick button { all: unset; cursor: pointer; padding: 5px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: background .3s var(--ease), color .3s var(--ease); }
.trackpick button:hover { color: var(--text); }
.trackpick button.on { background: var(--cyan-soft); color: var(--cyan); }
.hello small { color: var(--muted); font-size: 13px; }
.hello h1 { margin: 2px 0 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.hello h1 em { font-style: normal; background: linear-gradient(90deg, var(--cyan), var(--violet)); -webkit-background-clip: text; color: transparent; }
.tiles { display: flex; gap: 10px; margin-left: auto; }
.tile { padding: 9px 15px; border-radius: 14px; background: var(--node); border: 1px solid var(--line); min-width: 118px; backdrop-filter: blur(10px);
        animation: enter .6s var(--ease) both; }
.tile b { display: block; font-size: 19px; font-weight: 700; }
.tile span { color: var(--muted); font-size: 12px; }
.tile.click { cursor: pointer; transition: border-color .3s var(--ease); }
.tile.click:hover { border-color: rgba(140,170,255,.4); }
.tile.upd { border-color: rgba(252,211,77,.35); } .tile.upd b { color: var(--gold); font-size: 15px; padding: 3px 0; }
.tile.off b { color: var(--warn); font-size: 15px; padding: 3px 0; }

.map { position: relative; flex: 1; margin-top: 18px; overflow: auto; padding-bottom: 150px; }
.map::-webkit-scrollbar { width: 8px; height: 8px; } .map::-webkit-scrollbar-thumb { background: #27304d; border-radius: 8px; }
.cols { position: relative; display: grid; grid-template-columns: repeat(7, minmax(170px, 1fr)); gap: 26px; min-width: 1330px; }
svg.edges { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.edges path { fill: none; stroke: var(--line); stroke-width: 1.3; transition: stroke .6s var(--ease), stroke-width .6s var(--ease), opacity .6s var(--ease); }
.edges path.warm { stroke: rgba(94,234,212,.28); }
.edges path.hot { stroke: rgba(94,234,212,.62); stroke-width: 1.8; filter: drop-shadow(0 0 3px rgba(94,234,212,.45)); }
.edges path.dim { opacity: .45; }
.col { display: flex; flex-direction: column; gap: 9px; animation: enter .7s var(--ease) both; }
.colhead { margin-bottom: 6px; }
.colhead .n { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.colhead .t { font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.25; min-height: 36px; }
.node { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 8px 10px 8px 8px; border-radius: 14px; cursor: pointer;
        background: var(--node); border: 1px solid var(--line); backdrop-filter: blur(8px);
        transition: border-color .45s var(--ease), background .45s var(--ease), box-shadow .45s var(--ease), transform .45s var(--ease); }
.node:hover { transform: translateX(2px); border-color: rgba(140,170,255,.35); }
.node.on { border-color: var(--cyan); background: linear-gradient(135deg, rgba(94,234,212,.18), rgba(167,139,250,.12)); box-shadow: 0 0 24px -6px rgba(94,234,212,.55); }
.node.feeds { border-style: dashed; border-color: rgba(94,234,212,.42); }
.node.nudge { animation: nudge 2.4s var(--ease) 2; }
@keyframes nudge { 40% { box-shadow: 0 0 0 4px rgba(94,234,212,.14), 0 0 22px -4px rgba(94,234,212,.5); } }
.node .ring { position: relative; width: 34px; height: 34px; }
.node .ring svg { transform: rotate(-90deg); }
.node .ring em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); }
.node.on .ring em { color: var(--cyan); }
.node .t { font-size: 13px; line-height: 1.25; }
.node.fresh .t { color: var(--muted); }
.maptip { position: fixed; z-index: 20; max-width: 300px; padding: 10px 12px; border-radius: 12px; background: rgba(12,17,34,.96); border: 1px solid var(--line);
       font-size: 12px; color: var(--muted); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.maptip.show { opacity: 1; transform: none; }
.maptip b { color: var(--text); font-size: 13px; }
.maptip .c { display: flex; justify-content: space-between; gap: 12px; margin-top: 3px; }

/* the quiet suggestion after picking a section */
.suggest { position: fixed; left: 50%; bottom: 104px; transform: translate(-50%, 10px); z-index: 5; max-width: min(980px, calc(100vw - 64px));
           display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px;
           background: rgba(16, 22, 42, .7); border: 1px solid rgba(94,234,212,.18); backdrop-filter: blur(14px);
           color: var(--muted); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.suggest.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.suggest b { color: var(--text); font-weight: 600; }
.suggest .add { padding: 4px 10px; border-radius: 9px; border: 1px dashed rgba(94,234,212,.45); background: transparent; color: var(--cyan); cursor: pointer;
                font-size: 12px; transition: background .3s var(--ease); }
.suggest .add:hover { background: var(--cyan-soft); }
.suggest .add small { color: var(--muted); margin-left: 4px; }
.suggest .x { margin-left: 4px; color: var(--faint); cursor: pointer; padding: 2px 6px; }

.dock { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 16px; padding: 12px 12px 12px 22px;
        border-radius: 20px; background: rgba(16, 22, 42, .86); border: 1px solid rgba(140,170,255,.2); backdrop-filter: blur(18px);
        box-shadow: 0 24px 60px -18px rgba(0,0,0,.8); animation: dock .7s .2s var(--ease) both; white-space: nowrap; }
@keyframes dock { from { opacity: 0; transform: translate(-50%, 20px); } }
.dock .what b { font-size: 15px; } .dock .what div { color: var(--muted); font-size: 12px; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 12px; border-left: 1px solid var(--line); padding-left: 16px; }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; border: 1px solid var(--cyan); }
.legend i.d { border-style: dashed; border-color: rgba(94,234,212,.6); }
.opt { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; cursor: pointer; border-left: 1px solid var(--line); padding-left: 16px; }
.sw { flex: none; display: inline-block; width: 30px; height: 17px; border-radius: 999px; background: #27304d; position: relative; transition: background .3s var(--ease); }
.sw::after { content: ""; position: absolute; top: 2.5px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.opt.on .sw { background: var(--cyan); } .opt.on .sw::after { transform: translateX(12px); }
.more { position: relative; }
.pop { position: absolute; bottom: calc(100% + 12px); left: 0; min-width: 300px; padding: 8px; border-radius: 14px; background: rgba(12,17,34,.97);
       border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; white-space: normal;
       opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
.pop.show { opacity: 1; transform: none; pointer-events: auto; }
.pop button { text-align: left; padding: 9px 12px; border-radius: 9px; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.pop button:hover { background: rgba(140,170,255,.08); }
.pop p { margin: 6px 12px; color: var(--faint); font-size: 12px; }
.toast { position: fixed; left: 50%; top: 18px; transform: translate(-50%, -10px); z-index: 30; padding: 10px 16px; border-radius: 12px; background: rgba(12,17,34,.96);
         border: 1px solid var(--line); opacity: 0; pointer-events: none; transition: opacity .4s var(--ease), transform .4s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { color: var(--warn); }

/* ---------------------------------------------------------------- drilling */
#drill, #progress { padding: 18px 24px 20px; }
.drillhead { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.drillhead h2 { margin: 0 0 0 6px; font-size: 22px; }
.crumb { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; min-width: 0; flex: 1; }
.crumb .sec { color: var(--cyan); }
.tierpill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tierpill.t2 { color: var(--warn); border-color: rgba(251,191,36,.35); } .tierpill.t3 { color: var(--violet); border-color: rgba(167,139,250,.4); }
.score { color: var(--muted); font-size: 13px; }
.clock { position: relative; width: 44px; height: 44px; display: grid; place-items: center; }
.clock svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.clock .track { fill: none; stroke: rgba(140,170,255,.12); stroke-width: 3; }
.clock .arc { fill: none; stroke: var(--cyan); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; transition: stroke-dashoffset 1s linear, stroke .6s; }
.clock .arc.late { stroke: var(--warn); }
.clock span { font-size: 11px; font-weight: 700; color: var(--muted); }
.drillbody { flex: 1; min-height: 0; display: grid; grid-template-columns: 270px minmax(420px, 40%) 1fr; gap: 18px; }

.side { padding: 16px 14px; overflow-y: auto; }
.side h4 { margin: 0 0 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.side .sec { margin: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.side .sec.here { color: var(--cyan); }
.meter { margin: 0 0 7px; padding: 6px 8px; border-radius: 10px; transition: background .5s var(--ease); }
.meter.current { background: var(--cyan-soft); }
.meter.pick { cursor: pointer; }
.meter.pick:hover { background: rgba(140,170,255,.07); }
.meter.pinned { box-shadow: inset 0 0 0 1px var(--gold); }
.meter .lbl { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.meter .lbl span:last-child { color: var(--faint); font-size: 11px; }
.meter .bar { height: 4px; border-radius: 4px; background: rgba(140,170,255,.1); margin-top: 5px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--cyan), #a3e635); transition: width .9s var(--ease); }
.meter.passed .bar i { box-shadow: 0 0 8px rgba(163,230,53,.7); }
.meter .piece { margin: 6px 0 0 10px; font-size: 12px; color: var(--warn); }
.meter .piece.warmup { color: var(--cyan); }
.side .foot { margin-top: 14px; font-size: 11.5px; color: var(--faint); }

.qcol { overflow-y: auto; padding-right: 6px; display: flex; flex-direction: column; gap: 12px; }
.qcol > * { flex-shrink: 0; }
.qcol::-webkit-scrollbar, .side::-webkit-scrollbar { width: 7px; } .qcol::-webkit-scrollbar-thumb, .side::-webkit-scrollbar-thumb { background: #27304d; border-radius: 7px; }
.card { padding: 12px 14px; border-radius: 14px; background: var(--node); border: 1px solid var(--line); }
.card.new { border-color: rgba(167,139,250,.45); background: linear-gradient(135deg, rgba(167,139,250,.12), rgba(22,31,56,.82)); }
.cardtitle { font-size: 12px; font-weight: 700; color: var(--cyan); margin-bottom: 4px; }
.card.new .cardtitle { color: var(--violet); } .card.back .cardtitle { color: var(--muted); }
.cardbody { font-size: 14px; color: #cdd5f3; }
.watch { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .watch:empty { display: none; }
.watchbtn { font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer; color: var(--cyan); background: var(--cyan-soft); border: 1px solid rgba(94,234,212,.35); }
.watchbtn:hover { background: rgba(94,234,212,.24); }
.source { margin-top: -4px; font-size: 11.5px; letter-spacing: .02em; color: var(--muted, #8a93a6); opacity: .7; }
.why { font-size: 13.5px; padding: 8px 12px; border-radius: 10px; border-left: 3px solid var(--warn); background: rgba(251,191,36,.06); color: #f6deb0; }
.why.warmup { border-color: var(--cyan); background: var(--cyan-soft); color: #c9f7ee; }
.why.reattempt { border-color: var(--violet); background: rgba(167,139,250,.08); color: #ddd3ff; }
.prompt { font-size: 18px; line-height: 1.65; }
.math .katex { font-size: 1.12em; }
.math p { margin: 0 0 6px; }
.math table { border-collapse: collapse; margin: 6px 0 10px; font-size: 15px; }
.math td { border: 1px solid var(--line); padding: 5px 12px; text-align: center; }
.math tr:first-child td { background: rgba(140,170,255,.07); }
.hinthead { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; }

/* hints: the space opens first, then the card fades and focuses in */
.hint { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .65s var(--ease), margin .65s var(--ease); }
.hint > div { overflow: hidden; }
.hint.in { grid-template-rows: 1fr; margin-bottom: 10px; }
.hcard { padding: 11px 14px; border-radius: 14px; border: 1px solid rgba(94,234,212,.22); background: rgba(94,234,212,.05);
         opacity: 0; transform: translateY(8px) scale(.985); filter: blur(6px);
         transition: opacity .75s .15s var(--ease), transform .75s .15s var(--ease), filter .75s .15s var(--ease); }
.hint.in .hcard { opacity: 1; transform: none; filter: none; }
.hcard.tip { border-color: rgba(251,191,36,.25); background: rgba(251,191,36,.05); }
.hcard.calc { border-color: rgba(167,139,250,.3); background: rgba(167,139,250,.06); }
.hcard .title { font-size: 12px; font-weight: 700; color: var(--cyan); cursor: pointer; display: flex; justify-content: space-between; }
.hcard.tip .title { color: var(--warn); } .hcard.calc .title { color: var(--violet); }
.hcard .body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .5s var(--ease), opacity .4s var(--ease); }
.hcard .body > div { overflow: hidden; padding-top: 6px; }
.hcard.folded .body { grid-template-rows: 0fr; opacity: 0; }
.hcard .chev { transition: transform .4s var(--ease); color: var(--faint); }
.hcard.folded .chev { transform: rotate(-90deg); }
.hchoices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hchoices button { padding: 5px 12px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text); cursor: pointer;
                   transition: border-color .3s var(--ease), background .3s var(--ease); }
.hchoices button:hover:not(:disabled) { border-color: var(--cyan); }
.hchoices button.right { border-color: var(--right); background: rgba(74,222,128,.1); }
.hchoices button.wrong { border-color: var(--wrong); background: rgba(251,113,133,.1); }
.hresult { margin-top: 8px; font-size: 13px; animation: enter .5s var(--ease) both; }
.hresult.right { color: #bbf7d0; } .hresult.wrong { color: #fde68a; }

.verdict { font-size: 19px; font-weight: 700; min-height: 0; }
.verdict:empty { display: none; }
.verdict.right { color: var(--right); } .verdict.wrong { color: var(--wrong); } .verdict.warn { color: var(--warn); } .verdict.muted { color: var(--muted); font-size: 14px; font-weight: 500; }
.verdict:not(:empty) { animation: enter .45s var(--ease) both; }
.feedback { font-size: 15px; }
.feedback:not(:empty) { padding: 12px 14px; border-radius: 14px; background: var(--node); border: 1px solid var(--line); animation: enter .5s .05s var(--ease) both; }
.feedback .slip { margin: 8px 0 2px; padding: 8px 10px; border-radius: 10px; background: rgba(251,191,36,.08); border-left: 3px solid var(--warn); font-size: 14px; }
.feedback h5 { margin: 14px 0 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.feedback ol { margin: 0; padding-left: 22px; }
.feedback ol li { margin: 3px 0; }
.feedback ol li p { margin: 0; }
.feedback .built li { color: var(--muted); font-size: 13.5px; padding: 2px 6px; border-radius: 8px; }
.feedback .built li b { color: var(--text); font-weight: 600; }
.feedback .built li em { font-style: normal; font-size: 12px; color: var(--faint); }
.feedback .built li.passed em { color: var(--right); }
.feedback .built li.here { background: var(--cyan-soft); }
.feedback .built li.flag { background: rgba(251,191,36,.12); box-shadow: inset 3px 0 0 var(--warn); }
.feedback .built .about { display: block; font-size: 12.5px; }
.feedback .figure { margin-top: 10px; color: var(--muted); }
.feedback .figure svg { max-width: 100%; height: auto; }
.feedback .cost { color: var(--faint); font-size: 12px; margin-top: 8px; }
.messages p { margin: 0 0 6px; color: #c9f7ee; animation: enter .5s .1s var(--ease) both; }
.messages p.ai { color: #ddd3ff; }
.actions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.actions > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions .label { color: var(--faint); font-size: 12px; width: 60px; }

.answer { min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.padwrap { position: relative; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
canvas#pad { flex: 1; width: 100%; min-height: 0; cursor: crosshair; touch-action: none;
             background-image: repeating-linear-gradient(transparent 0 89px, rgba(140,170,255,.07) 89px 90px); }
.padnote { position: absolute; left: 18px; top: 14px; color: var(--faint); font-size: 12px; pointer-events: none; }
.padbar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: rgba(8,12,24,.4); }
.typed { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12px; }
.typed input { flex: 1; min-width: 120px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(8,12,24,.6); color: var(--text);
               font-family: "Cascadia Mono", Consolas, "JetBrains Mono", monospace; font-size: 14px; outline: none; user-select: text; transition: border-color .3s var(--ease); }
.typed input:focus { border-color: var(--cyan); }
.padwrap.busy canvas { opacity: .6; transition: opacity .4s; }
.choices { order: -1; flex: none; max-height: 45%; display: flex; flex-wrap: wrap; gap: 10px; overflow-y: auto; }
.choices .hint-line { flex-basis: 100%; }
.choices .choice { flex: 1 1 calc(50% - 10px); min-width: 240px; }
.choices .hint-line { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.choice { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--node); color: var(--text);
          cursor: pointer; text-align: left; font-size: 17px; transition: border-color .35s var(--ease), background .35s var(--ease), transform .35s var(--ease);
          animation: enter .5s var(--ease) both; }
.choice:hover:not(:disabled) { border-color: rgba(94,234,212,.5); transform: translateX(3px); }
.choice .letter { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(140,170,255,.1); font-weight: 700; font-size: 14px; }
.choice.right { border-color: var(--right); background: rgba(74,222,128,.1); } .choice.right .letter { background: var(--right); color: #052e16; }
.choice.wrong { border-color: var(--wrong); background: rgba(251,113,133,.1); } .choice.wrong .letter { background: var(--wrong); color: #3f0712; }
.choice:disabled { cursor: default; }

/* ---------------------------------------------------------------- progress */
.progbody { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 16px; align-content: start; padding-bottom: 20px; }
.progbody .glass { padding: 16px 18px; animation: enter .6s var(--ease) both; }
.progbody h3 { margin: 0 0 10px; font-size: 15px; } .progbody h3 span { color: var(--cyan); margin-right: 8px; }
.progbody .wide { grid-column: 1 / -1; }
.ptiles { display: flex; gap: 12px; flex-wrap: wrap; }
.prow { display: grid; grid-template-columns: 1fr 90px 60px 110px; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid rgba(140,170,255,.07); font-size: 13px; }
.prow .bar { height: 4px; border-radius: 4px; background: rgba(140,170,255,.1); overflow: hidden; }
.prow .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), #a3e635); }
.prow .weak { color: var(--warn); }
.prow span:nth-child(3), .prow span:nth-child(4) { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.progbody p { color: var(--muted); margin: 6px 0 0; font-size: 13px; }
.progbody p b { color: var(--text); font-weight: 600; } .progbody p .small { margin-left: 8px; padding: 5px 11px; }
.clabel { color: var(--muted); font-size: 12px; margin: 10px 0 4px; }
.bars { display: flex; gap: 2px; height: 74px; padding-top: 12px; align-items: stretch; }
.bars .col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bars .col i { display: block; width: 100%; max-width: 26px; border-radius: 4px 4px 0 0; background: var(--cyan); opacity: .85; transition: opacity .2s; }
.bars.acc .col i { background: var(--right); } .bars.spd .col i { background: var(--violet); }
.bars .col.thin i { opacity: .3; }
.bars .col:hover i { opacity: 1; }
.bars .col b { position: absolute; top: -12px; font-size: 10px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .2s; }
.bars .col:hover b, .bars.labeled .col b { opacity: 1; }
.bars.labeled { height: 86px; }
.bars .col span { font-size: 10px; color: var(--faint); white-space: nowrap; overflow: visible; height: 14px; line-height: 14px; margin-top: 3px; }

/* ---------------------------------------------------------------- dialog */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(4,6,14,.6); animation: fadein .35s var(--ease) both; }
@keyframes fadein { from { opacity: 0; } }
.dialog { width: min(560px, calc(100vw - 40px)); padding: 24px; animation: enter .45s var(--ease) both; }
.dialog h3 { margin: 0 0 8px; } .dialog p { color: var(--muted); margin: 0 0 14px; }
.dialog input { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(8,12,24,.7); color: var(--text); outline: none; user-select: text; }
.dialog input:focus { border-color: var(--cyan); }
.dialog .row { display: flex; gap: 10px; margin-top: 14px; }
.reportbtn { color: var(--muted); }
.reportbtn:hover { color: var(--warn); border-color: rgba(251,191,36,.4); }
.dialog.report { width: min(1100px, calc(100vw - 40px)); max-height: calc(100vh - 30px); overflow: auto; padding: 18px 20px; }
.rhead { display: flex; align-items: baseline; gap: 14px; } .rhead span { color: var(--muted); font-size: 13px; }
.shotwrap { position: relative; margin-top: 6px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); line-height: 0; }
.shotwrap img { width: 100%; display: block; }
.shotwrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.rtools { display: flex; align-items: center; gap: 8px; margin-top: 8px; } .rinfo { color: var(--faint); font-size: 12px; margin-left: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 10px; }
.tags button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 13px;
               transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease); }
.tags button.on { color: var(--warn); border-color: rgba(251,191,36,.55); background: rgba(251,191,36,.1); }
.dialog textarea { width: 100%; min-height: 70px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(8,12,24,.7);
                   color: var(--text); outline: none; resize: vertical; font: inherit; user-select: text; }
.dialog textarea:focus { border-color: var(--cyan); }
.rsend { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 13px; cursor: pointer; }
.rsend input { width: auto; accent-color: var(--cyan); }
.rpreview { margin-top: 8px; color: var(--muted); font-size: 12px; }
.rpreview summary { cursor: pointer; color: var(--muted); } .rpreview p { font-size: 12px; margin: 6px 0; }
.rpreview table { border-collapse: collapse; width: 100%; user-select: text; }
.rpreview td { padding: 3px 8px; border-top: 1px solid var(--line); vertical-align: top; word-break: break-word; }
.rpreview td:first-child { color: var(--faint); white-space: nowrap; width: 1%; }
.keymsg { color: var(--warn); font-size: 13px; margin-top: 8px; min-height: 18px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }
.snapping, .snapping * { cursor: progress !important; }
