:root {
  /* Doa. Quiet and board-first: bone paper, pine ink, one green. Surfaces are flat; rules and space do the grouping.
     Layout: the board is always the largest thing on screen; everything else is a plain list or a line of type beside it. */
  --bg: #f1f2ec; --surface: #ffffff; --sunk: #e7e9e1; --line: #d9dcd1; --line-2: #c6cabd;
  --ink: #151b17; --ink-2: #4f5a53; --ink-3: #89928a;
  --accent: #1f7a4d; --accent-hi: #24905a; --accent-ink: #ffffff; --accent-soft: #dcebdf;
  --pos: #23834f; --warn: #b87a12; --neg: #c0423c; --info: #2c6fb5; --gold: #c98f12;
  --r-common: #7d8780; --r-rare: #2f7fd1; --r-epic: #7a57d6; --r-legendary: #cf9412;
  --font: 'Instrument Sans', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1); --spring: cubic-bezier(.3, 1.5, .5, 1);
  --shadow: 0 1px 2px rgba(20, 30, 24, .06), 0 8px 24px rgba(20, 30, 24, .08);
  --sq-hi: rgba(246, 214, 78, .5); --sq-sel: rgba(31, 122, 77, .45);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151715; --surface: #1e211e; --sunk: #101210; --line: #2c302c; --line-2: #3b403b;
    --ink: #eceee8; --ink-2: #a9b1a9; --ink-3: #717a72;
    --accent: #4fae79; --accent-hi: #5fbd88; --accent-ink: #0b1a11; --accent-soft: #1d3226;
    --pos: #56b983; --warn: #dba63c; --neg: #e2716a; --info: #6aa5e2; --gold: #e0ad3a;
    --r-common: #8d968f; --r-rare: #5aa2ec; --r-epic: #9d82ee; --r-legendary: #e3b03c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151715; --surface: #1e211e; --sunk: #101210; --line: #2c302c; --line-2: #3b403b;
  --ink: #eceee8; --ink-2: #a9b1a9; --ink-3: #717a72;
  --accent: #4fae79; --accent-hi: #5fbd88; --accent-ink: #0b1a11; --accent-soft: #1d3226;
  --pos: #56b983; --warn: #dba63c; --neg: #e2716a; --info: #6aa5e2; --gold: #e0ad3a;
  --r-common: #8d968f; --r-rare: #5aa2ec; --r-epic: #9d82ee; --r-legendary: #e3b03c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 450 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden; font-optical-sizing: auto; }
h1, h2, h3, p { margin: 0; } ul, ol { margin: 0; padding: 0; list-style: none; }
h1 { font-size: 28px; line-height: 1.1; font-weight: 700; font-stretch: 88%; letter-spacing: -.015em; text-wrap: balance; }
h2 { font-size: 19px; line-height: 1.2; font-weight: 650; letter-spacing: -.01em; text-wrap: balance; }
h3 { font-size: 15px; font-weight: 650; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; text-align: inherit; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.ic { width: 20px; height: 20px; fill: currentColor; flex: none; display: block; }
.dim { color: var(--ink-2); } .faint { color: var(--ink-3); } .sm { font-size: 13px; } .xs { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; font-stretch: 82%; font-weight: 650; letter-spacing: -.01em; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.hstack { display: flex; align-items: center; gap: 10px; } .hstack.tight { gap: 6px; } .hstack.wrap { flex-wrap: wrap; } .spread { justify-content: space-between; } .grow { flex: 1; min-width: 0; }
.vstack { display: grid; gap: 14px; align-content: start; } .vstack.tight { gap: 6px; } .vstack.loose { gap: 24px; } .mid { justify-items: center; text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- shell */
.app { height: 100%; display: grid; grid-template-columns: 216px minmax(0, 1fr); }
.boot { height: 100%; display: grid; place-items: center; }
.side { display: flex; flex-direction: column; gap: 2px; padding: 22px 12px 16px; border-right: 1px solid var(--line); min-height: 0; }
.brand { display: inline-flex; align-items: center; gap: 9px; padding: 4px 10px 20px; }
.mark { width: 15px; height: 23px; display: grid; grid-template: repeat(3, 1fr) / repeat(2, 1fr); gap: 2px; }
.mark i { background: var(--ink); border-radius: 1.5px; } .mark i:nth-child(1), .mark i:nth-child(3) { grid-column: 1; } .mark i:nth-child(5) { grid-column: 1; } .mark i:nth-child(6) { background: var(--accent); }
.mark i:nth-child(2), .mark i:nth-child(4) { visibility: hidden; }
.word { font-size: 22px; font-weight: 700; font-stretch: 80%; letter-spacing: -.01em; line-height: 1; }
.navlink { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); font-weight: 550; transition: background .12s, color .12s; }
.navlink:hover { background: var(--sunk); color: var(--ink); } .navlink.on { color: var(--ink); background: var(--sunk); }
.navlink.on .ic { color: var(--accent); }
.side-foot { margin-top: auto; display: grid; gap: 2px; }
.main { min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.tabs { display: none; }
.page { max-width: 1020px; margin: 0 auto; padding: 34px 32px 56px; display: grid; gap: 28px; align-content: start; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head p { margin-top: 6px; max-width: 58ch; color: var(--ink-2); } .page-head > :last-child:not(:first-child) { white-space: nowrap; flex: none; }
.mobile-only { display: none; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.section { display: grid; gap: 12px; align-content: start; }
.section > h2 + .dim { margin-top: -6px; }

/* ---------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 600; white-space: nowrap; background: var(--sunk); color: var(--ink); transition: transform .08s var(--ease), background .12s, opacity .12s; user-select: none; -webkit-user-select: none; }
.btn:hover:not(:disabled) { background: var(--line); } .btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); } .btn.primary:hover:not(:disabled) { background: var(--accent-hi); }
.btn.text { background: none; padding: 0 10px; color: var(--ink-2); } .btn.text:hover:not(:disabled) { background: var(--sunk); color: var(--ink); }
.btn.outline { background: none; box-shadow: inset 0 0 0 1px var(--line-2); } .btn.outline:hover:not(:disabled) { background: var(--sunk); }
.btn.lg { height: 52px; font-size: 16.5px; border-radius: 14px; padding: 0 24px; } .btn.sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn.block { width: 100%; } .btn:disabled { opacity: .4; } .btn .ic { width: 18px; height: 18px; }
.btn.danger { color: var(--neg); }
.iconbtn { width: 40px; height: 40px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--ink-2); transition: background .12s, transform .08s; flex: none; }
.iconbtn:hover { background: var(--sunk); color: var(--ink); } .iconbtn:active { transform: scale(.94); }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--sunk); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { height: 34px; padding: 0 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--ink-2); white-space: nowrap; text-align: center; transition: background .14s, color .14s; position: relative; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 30, 24, .12); }
.seg.block { display: grid; width: 100%; }
.seg .pip { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.utabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); }
.utabs button { padding: 10px 0 11px; font-weight: 600; color: var(--ink-3); position: relative; }
.utabs button.on { color: var(--ink); } .utabs button.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; }
.utabs .pip { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: 2px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; } .game-side > .chips { flex-wrap: wrap; } .chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 32px; padding: 0 13px; border-radius: 999px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); transition: background .12s, color .12s; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--ink); color: var(--bg); box-shadow: none; } .chip small { opacity: .6; font-weight: 500; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--sunk); font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: var(--accent-soft); color: var(--accent); } .tag .ic { width: 13px; height: 13px; }
.field { height: 44px; border-radius: 12px; border: 0; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--surface); color: var(--ink); padding: 0 14px; font: inherit; font-weight: 600; min-width: 0; width: 100%; }
.field:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.field.code { letter-spacing: .28em; text-transform: uppercase; text-align: center; font-stretch: 85%; }
.field.bare { box-shadow: none; background: none; padding: 0; height: auto; font-size: 26px; font-weight: 700; font-stretch: 88%; letter-spacing: -.015em; } .field.bare:focus { box-shadow: 0 2px 0 var(--accent); border-radius: 0; }
.switch { width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .16s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .18s var(--spring); }
.switch.on { background: var(--accent); } .switch.on::after { transform: translateX(18px); }
.meter { height: 4px; border-radius: 4px; background: var(--sunk); overflow: hidden; } .meter i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s var(--ease); }
.coin { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.coin .ic { width: 17px; height: 17px; color: var(--gold); } .coin.lg { font-size: 18px; } .coin.lg .ic { width: 21px; height: 21px; }
.btn.primary .coin .ic { color: inherit; }

/* list rows: the workhorse. No boxes, a rule between rows. */
.list { display: grid; }
.li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 60px; padding: 10px 0; border-top: 1px solid var(--line); width: 100%; }
.list > .li:first-child { border-top: 0; }
button.li { transition: background .12s; border-radius: 0; } button.li:hover { background: color-mix(in srgb, var(--sunk) 55%, transparent); box-shadow: -12px 0 0 color-mix(in srgb, var(--sunk) 55%, transparent), 12px 0 0 color-mix(in srgb, var(--sunk) 55%, transparent); }
.li-lead { width: 36px; height: 36px; display: grid; place-items: center; color: var(--ink-2); } .li-lead .ic { width: 22px; height: 22px; }
.li-body { display: grid; min-width: 0; } .li-body b { font-weight: 600; } .li-body small { color: var(--ink-2); font-size: 13px; }
.li-trail { display: flex; align-items: center; gap: 8px; color: var(--ink-3); }
.li.nolead { grid-template-columns: minmax(0, 1fr) auto; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 52px; border-top: 1px solid var(--line); flex-wrap: wrap; padding: 6px 0; } .kv:first-child { border-top: 0; } .kv > span:first-child { font-weight: 600; }

/* ---------- overlays */
.toasts { position: fixed; left: 50%; top: 18px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 80; justify-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { pointer-events: auto; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: toast-in .22s var(--spring); display: flex; align-items: center; gap: 10px; max-width: 92vw; }
.toast.out { opacity: 0; transform: translateY(-6px); transition: .25s; } .toast.bad { background: var(--neg); color: #fff; }
.toast .btn { background: var(--bg); color: var(--ink); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.97); } }
.scrim { position: fixed; inset: 0; background: rgba(12, 16, 13, .5); display: grid; place-items: center; padding: 20px; z-index: 60; animation: fade .16s; overflow: auto; }
.scrim.out { opacity: 0; transition: opacity .16s; } .scrim.dark { background: rgba(8, 10, 9, .86); }
.sheet { width: min(400px, 100%); background: var(--surface); border-radius: 22px; padding: 26px 24px 22px; box-shadow: var(--shadow); animation: sheet-in .24s var(--spring); }
.sheet.wide { width: min(620px, 100%); } .sheet.stage.wide { width: min(720px, 100%); }
.sheet.stage { background: #141714; color: #eceee8; overflow: hidden; --ink: #eceee8; --ink-2: #a9b1a9; --ink-3: #717a72; --surface: #1e211e; --sunk: #101210; --line: #2c302c; --line-2: #3b403b; --bg: #151715; --accent: #4fae79; --accent-hi: #5fbd88; --accent-ink: #0b1a11; }
@keyframes fade { from { opacity: 0; } } @keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }
.result-title { font-size: 44px; font-weight: 700; font-stretch: 80%; letter-spacing: -.02em; line-height: 1; }
.bigfig { font-size: 76px; line-height: .95; font-weight: 700; font-stretch: 76%; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* ---------- board */
.board { position: relative; width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden; touch-action: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; --sq-light: #e9eddf; --sq-dark: #7ba188; --aura: brightness(1); container-type: inline-size; outline: none; }
.board.static { touch-action: auto; }
.board > * { position: absolute; inset: 0; }
.bd-squares { background: repeating-conic-gradient(var(--sq-dark) 0 25%, var(--sq-light) 0 50%) 0 0 / 25% 25%; }
.bd-squares::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.board[data-tex="wood"] .bd-squares::after { background: repeating-linear-gradient(91deg, rgba(70, 35, 10, .14) 0 1px, transparent 1px 5px), repeating-linear-gradient(88deg, rgba(255, 235, 200, .08) 0 2px, transparent 2px 13px), repeating-linear-gradient(93deg, rgba(60, 30, 10, .07) 0 6px, transparent 6px 31px); }
.board[data-tex="marble"] .bd-squares::after { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .03' numOctaves='4' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .25 0 0 0 0 .3 0 0 0 -1.6 1.05'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23m)'/%3E%3C/svg%3E") 0 0 / 60% 60%; opacity: .45; }
.board[data-tex="grid"] .bd-squares::after { background: linear-gradient(rgba(190, 250, 255, .55) 1px, transparent 1px) 0 0 / 12.5% 12.5%, linear-gradient(90deg, rgba(255, 150, 235, .5) 1px, transparent 1px) 0 0 / 12.5% 12.5%; box-shadow: inset 0 0 40px rgba(124, 247, 255, .25); }
.board[data-tex="lava"] .bd-squares::after { background: radial-gradient(circle at 22% 78%, rgba(255, 210, 90, .3), transparent 36%), radial-gradient(circle at 78% 24%, rgba(255, 230, 140, .24), transparent 32%); mix-blend-mode: overlay; animation: breathe 6s ease-in-out infinite; }
.board[data-tex="ice"] .bd-squares::after { background: linear-gradient(135deg, rgba(255, 255, 255, .45) 0 6%, transparent 6% 40%, rgba(255, 255, 255, .24) 40% 43%, transparent 43% 70%, rgba(255, 255, 255, .18) 70% 72%, transparent 72%) 0 0 / 25% 25%; }
.board[data-tex="aurora"] .bd-squares::after { background: linear-gradient(120deg, rgba(0, 255, 170, .5), rgba(140, 90, 255, .5), rgba(0, 200, 255, .5), rgba(0, 255, 170, .5)); background-size: 300% 300%; mix-blend-mode: soft-light; animation: aurora 10s linear infinite; }
.board[data-tex="gold"] .bd-squares::after { background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .5) 50%, transparent 60%); background-size: 250% 250%; animation: sheen 5s ease-in-out infinite; }
@keyframes aurora { to { background-position: 300% 0; } } @keyframes sheen { 0%, 20% { background-position: 120% 0; } 80%, 100% { background-position: -40% 0; } } @keyframes breathe { 50% { opacity: .55; } }
.bd-coords span { position: absolute; font-size: clamp(8px, 2.5cqw, 12px); font-weight: 650; line-height: 1; pointer-events: none; opacity: .8; }
.bd-coords .cr { left: 3px; margin-top: 3px; } .bd-coords .cf { bottom: 3px; margin-left: calc(12.5% - 1em); }
.bd-coords .l { color: var(--coord-l, var(--sq-dark)); } .bd-coords .d { color: var(--coord-d, var(--sq-light)); }
.bd-marks, .bd-pieces, .bd-arrows, .bd-fx, .bd-coords { pointer-events: none; }
.mk { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; }
.mk.last { background: var(--sq-hi); } .mk.sel { background: var(--sq-sel); }
.mk.good { background: rgba(48, 164, 108, .55); } .mk.bad { background: rgba(214, 78, 70, .5); }
.mk.check { background: radial-gradient(circle, rgba(226, 52, 44, .95) 0, rgba(226, 52, 44, .5) 45%, transparent 74%); animation: check-in .5s var(--ease); }
@keyframes check-in { from { transform-origin: center; opacity: 0; } }
.mk.hint { box-shadow: inset 0 0 0 .5cqw #2c6fb5; animation: hint 1.2s ease-in-out infinite; }
@keyframes hint { 50% { box-shadow: inset 0 0 0 .5cqw rgba(44, 111, 181, .25); } }
.mk.over { box-shadow: inset 0 0 0 .6cqw rgba(255, 255, 255, .85); }
.mk.over.touch::before { content: ''; position: absolute; inset: -55%; border-radius: 50%; background: rgba(18, 26, 21, .16); }
.mk.dot::after { content: ''; position: absolute; inset: 36.5%; border-radius: 50%; background: rgba(18, 26, 21, .2); transition: inset .1s; }
.mk.dot.cap::after { inset: 5%; background: none; box-shadow: inset 0 0 0 .75cqw rgba(18, 26, 21, .2); }
.badgebox .gbadge { position: absolute; right: 3%; top: 3%; width: 40%; height: 40%; font-size: clamp(8px, 3.6cqw, 17px); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); animation: badge .28s var(--spring); }
@keyframes badge { from { transform: scale(0); } }
.gbadge { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-weight: 700; font-size: 11.5px; color: #fff; background: #7d8780; flex: none; line-height: 1; font-stretch: 85%; }
.g-brilliant { --g: #129fb4; } .g-best { --g: #23834f; } .g-good { --g: #4f9a4a; } .g-ok { --g: #7d8780; } .g-book { --g: #9a7a55; } .g-inacc { --g: #c99a1b; } .g-mistake { --g: #d9772b; } .g-blunder { --g: #c93c3c; }
.gbadge[class*="g-"] { background: var(--g); }
.piece { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; background: calc(50% + var(--px, 0px)) calc(50% + var(--py, 0px)) / var(--pz, 100%) var(--pz, 100%) no-repeat; transition: transform var(--t, 170ms) var(--ease), opacity .14s, scale .14s var(--ease); will-change: transform; }
.piece.aura { filter: var(--aura); }
.board[data-aura="prism"] .piece.aura { animation: prism 6s linear infinite; }
@keyframes prism { from { filter: var(--aura) hue-rotate(0deg); } to { filter: var(--aura) hue-rotate(360deg); } }
.piece.noanim { transition: none; } .piece.gone { opacity: 0; scale: .55; } .piece.fadein { opacity: 0; scale: .8; }
.piece.moving { z-index: 6; }
.piece.drag { transition: none; z-index: 20 !important; filter: drop-shadow(0 .9cqw .7cqw rgba(0, 0, 0, .3)); cursor: grabbing; }
.piece.aura.drag { filter: var(--aura) drop-shadow(0 .9cqw .7cqw rgba(0, 0, 0, .3)); }
.piece.ghost { opacity: .32; transition: none; }
.piece.pop { animation: piecepop .24s var(--ease); } @keyframes piecepop { 40% { scale: 1.08; } }
.arrow { --c: #1f8a55; opacity: .86; fill: var(--c); transition: opacity .18s; animation: arrow-in .2s; } @keyframes arrow-in { from { opacity: 0; } } .arrow .shaft { fill: none; stroke: var(--c); stroke-linecap: round; stroke-linejoin: round; }
.arrow.alt { --c: #2c6fb5; opacity: .6; } .arrow.teach { --c: #d9772b; } .arrow.user { --c: #e0a020; opacity: .8; } .arrow.draft { opacity: .5; animation: none; } .arrow.out { opacity: 0; }
.mk.ring { box-shadow: inset 0 0 0 .7cqw rgba(224, 160, 32, .85); border-radius: 50%; } .mk.pre { background: rgba(62, 92, 150, .5); }
.bd-fx { width: 100%; height: 100%; }
.bd-promo { background: rgba(10, 14, 11, .45); z-index: 30; pointer-events: auto; }
.promo-opt { position: absolute; width: 12.5%; height: 12.5%; border-radius: 50%; background: #fff center / 82% no-repeat; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); animation: sheet-in .16s both; }
.promo-opt:hover { scale: 1.08; }
.board.mini { border-radius: 4px; touch-action: auto; }

/* ---------- game */
.game { display: grid; grid-template-columns: minmax(0, min(680px, calc(100vh - 150px))) minmax(300px, 372px); gap: 36px; justify-content: center; padding: 28px 32px 40px; align-items: start; }
.game-main { display: grid; gap: 10px; min-width: 0; } .game-side { display: grid; gap: 22px; min-width: 0; align-content: start; grid-template-columns: minmax(0, 1fr); } .game-side > *, .coach > * { min-width: 0; }
.strip { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--sunk); flex: none; display: grid; place-items: center; overflow: hidden; font-weight: 700; font-stretch: 85%; }
.avatar i { width: 78%; height: 78%; background: center / contain no-repeat; display: block; }
.avatar.w { background: #f4f5ef; box-shadow: inset 0 0 0 1px var(--line-2); } .avatar.b { background: #262a26; }
.avatar.lg { width: 64px; height: 64px; font-size: 26px; } .avatar.me { background: var(--ink); color: var(--bg); }
.strip-meta { min-width: 0; display: grid; line-height: 1.2; } .strip-name { font-weight: 600; } .strip-name small { color: var(--ink-3); font-weight: 500; margin-left: 6px; font-variant-numeric: tabular-nums; }
.caps { display: flex; align-items: center; height: 16px; } .caps:empty { display: none; } .cap { width: 16px; height: 16px; background: center / contain no-repeat; margin-right: -6px; display: inline-block; opacity: .9; }
.capdiff { margin-left: 10px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.clock { margin-left: auto; font-size: 22px; line-height: 1; font-weight: 650; font-stretch: 80%; font-variant-numeric: tabular-nums; padding: 8px 12px; border-radius: 9px; background: var(--sunk); color: var(--ink-3); min-width: 78px; text-align: center; transition: background .15s, color .15s; }
.clock.on { background: var(--ink); color: var(--bg); } .clock.low.on { background: var(--neg); color: #fff; }
.bubble { background: var(--ink); color: var(--bg); border-radius: 14px 14px 14px 3px; padding: 5px 11px; font-weight: 650; font-size: 13.5px; white-space: nowrap; }
.bubble.show { animation: bubble 2.8s both; }
@keyframes bubble { 0% { opacity: 0; transform: scale(.6) translateY(4px); } 7% { opacity: 1; transform: scale(1.05); } 12% { transform: scale(1); } 88% { opacity: 1; } 100% { opacity: 0; } }
.evalline { height: 6px; border-radius: 6px; background: #2b2f2b; overflow: hidden; position: relative; box-shadow: 0 0 0 1px var(--line-2); }
.evalline i { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; background: #fff; transition: width .55s var(--ease); box-shadow: 1px 0 0 rgba(0, 0, 0, .15); }
.board-wrap { min-width: 0; display: grid; gap: 6px; }
.toolbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.tool { display: grid; justify-items: center; gap: 3px; padding: 8px 2px 6px; border-radius: 10px; color: var(--ink-2); font-size: 11.5px; font-weight: 550; transition: background .12s, transform .08s; }
.tool:hover:not(:disabled) { background: var(--sunk); color: var(--ink); } .tool:active:not(:disabled) { transform: scale(.95); } .tool:disabled { opacity: .35; } .tool .ic { width: 22px; height: 22px; }
.notice { background: var(--accent-soft); border-radius: 14px; padding: 14px 16px; font-weight: 550; }
.roomcode { font-size: 44px; line-height: 1; font-weight: 700; font-stretch: 78%; letter-spacing: .14em; }
/* coach: a caption under the board, not a panel */
.coach { display: grid; gap: 14px; }
.coach-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.coach-fb { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; }
.coach-fb .gbadge { margin-top: 1px; } .coach-fb p { grid-column: 2; color: var(--ink-2); font-size: 14px; } .coach-fb .ttl { font-weight: 600; } .coach-fb .ttl small { color: var(--ink-3); font-weight: 500; margin-left: 6px; }
.coach-best { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.coach-best .top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bestsan { font-size: 40px; line-height: 1; font-weight: 700; font-stretch: 78%; letter-spacing: -.02em; }
.evalnum { font-variant-numeric: tabular-nums; font-weight: 650; font-stretch: 85%; color: var(--ink-2); }
.reasons { display: grid; gap: 6px; } .reasons li { color: var(--ink); max-width: 46ch; }
.pvline { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.alts { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); } .alts b { font-weight: 600; color: var(--ink); margin-right: 4px; }
.quietnote { color: var(--ink-2); font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dots { display: inline-flex; gap: 4px; } .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-3); animation: dots 1s infinite; } .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.moves-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.moves { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 1px 4px; max-height: 232px; overflow: auto; font-variant-numeric: tabular-nums; font-size: 14.5px; scrollbar-width: thin; align-content: start; }
.mvpair { display: contents; } .mvno { color: var(--ink-3); padding: 4px 0; }
.mv { padding: 4px 8px; border-radius: 6px; font-weight: 550; text-align: left; } button.mv:hover { background: var(--sunk); }
.mv.cur { background: var(--sunk); font-weight: 700; }
.mv.g-inacc, .mv.g-mistake, .mv.g-blunder, .mv.g-brilliant { color: var(--g); }

/* review */
.acc b { display: block; font-size: 34px; line-height: 1; font-weight: 700; font-stretch: 78%; font-variant-numeric: tabular-nums; }
.graph svg { width: 100%; height: 64px; display: block; border-radius: 6px; cursor: pointer; }
.gr-bg { fill: #2b2f2b; } .gr-area { fill: #f4f5ef; } .gr-mid { stroke: rgba(128, 128, 128, .7); stroke-width: 1; vector-effect: non-scaling-stroke; } .gr-cur { stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.gr-dot { fill: var(--g); stroke: #fff; stroke-width: 1; vector-effect: non-scaling-stroke; }
.gcounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; } .gcount { display: flex; align-items: center; gap: 8px; font-size: 14px; } .gcount b { margin-left: auto; font-variant-numeric: tabular-nums; }

/* lesson + puzzle */
.steps { display: flex; gap: 4px; flex: 1; max-width: 220px; } .steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); } .steps i.done { background: var(--accent); } .steps i.cur { background: var(--ink); }
.lesson-text { font-size: 18px; line-height: 1.45; max-width: 46ch; }
.fbline { font-weight: 550; display: flex; gap: 8px; align-items: flex-start; } .fbline .ic { margin-top: 2px; width: 18px; height: 18px; } .fbline.pos { color: var(--pos); } .fbline.neg { color: var(--neg); }
.quiz { display: grid; gap: 8px; } .quiz:empty, .fbslot:empty { display: none; }
.opt { display: block; width: 100%; text-align: left; padding: 13px 16px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 550; transition: background .12s, box-shadow .12s; }
.opt:hover:not(:disabled) { background: var(--sunk); } .opt.right { box-shadow: inset 0 0 0 2px var(--pos); background: var(--accent-soft); } .opt.wrong { box-shadow: inset 0 0 0 1px var(--neg); color: var(--ink-3); }
.tomove { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; } .tomove i { width: 14px; height: 14px; border-radius: 50%; background: #f4f5ef; box-shadow: inset 0 0 0 1px #9aa39b; } .tomove.b i { background: #1c1f1c; box-shadow: inset 0 0 0 1px #6c756d; }
.courses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 56px; }
.course-head { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: end; padding-bottom: 12px; }
.course-head .lvl { color: var(--ink-3); font-size: 13px; font-weight: 550; } .course-head p { grid-column: 1 / -1; color: var(--ink-2); font-size: 14px; }
.lnum { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 650; color: var(--ink-3); box-shadow: inset 0 0 0 1.5px var(--line-2); font-variant-numeric: tabular-nums; }
.done .lnum { background: var(--accent); color: var(--accent-ink); box-shadow: none; } .lnum .ic { width: 14px; height: 14px; }
.li.lesson { min-height: 50px; padding: 6px 0; }

/* ---------- home */
.home { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); grid-template-areas: 'board panel' 'extras panel'; gap: 28px 56px; align-items: start; }
.home-board { grid-area: board; } .play-panel { grid-area: panel; } .home-extras { grid-area: extras; display: grid; gap: 22px; }
.home-board { display: grid; gap: 14px; }
.home-cap { display: grid; gap: 4px; } .home-cap > p { min-height: 2.9em; } .home-cap .ttl { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.play-panel { display: grid; gap: 22px; align-content: start; }
.botrow { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 4px; } .botrow::-webkit-scrollbar { display: none; }
.botpick { flex: none; width: 54px; display: grid; justify-items: center; gap: 4px; padding: 4px 0; border-radius: 12px; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 550; }
.botpick .avatar { width: 46px; height: 46px; transition: box-shadow .14s, transform .14s var(--spring); }
.botpick.on { color: var(--ink); } .botpick.on .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); transform: scale(1.04); }
.botinfo { display: grid; gap: 2px; min-height: 46px; } .botinfo b { font-size: 17px; font-weight: 650; } .botinfo b small { color: var(--ink-3); font-weight: 550; margin-left: 8px; font-variant-numeric: tabular-nums; }
.elo-big { font-size: 64px; line-height: .95; font-weight: 700; font-stretch: 76%; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tierline { display: flex; align-items: center; gap: 8px; font-weight: 600; } .tierline i { width: 10px; height: 10px; border-radius: 50%; background: var(--tier); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { display: grid; justify-items: center; gap: 4px; padding: 8px 0 7px; border-radius: 10px; font-size: 11.5px; color: var(--ink-3); font-weight: 550; box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.day b { color: var(--ink); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 650; } .day .ic { width: 16px; height: 16px; color: var(--gold); }
.day.got { background: var(--sunk); box-shadow: none; } .day.got b, .day.got .ic { color: var(--ink-3); } .day.cur { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); }

/* ---------- collection */
.locker { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 44px; align-items: start; }
.locker-preview { position: sticky; top: 24px; display: grid; gap: 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
.tile { display: grid; gap: 10px; padding: 10px 10px 12px; border-radius: 16px; background: var(--surface); text-align: left; align-content: start; position: relative; min-width: 0; transition: transform .14s var(--ease), box-shadow .14s; box-shadow: inset 0 0 0 1px var(--line); }
button.tile:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow); } button.tile:active { transform: scale(.98); }
.tile.equipped { box-shadow: inset 0 0 0 2px var(--accent); }
.tile.locked .thumb { opacity: .5; } .tile.locked .tile-name { color: var(--ink-2); }
.tile-meta { display: grid; gap: 2px; min-width: 0; padding: 0 2px; } .tile-name { font-weight: 600; }
.rar { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 550; } .rar i { width: 8px; height: 8px; border-radius: 50%; background: var(--rar); flex: none; }
.r-common { --rar: var(--r-common); } .r-rare { --rar: var(--r-rare); } .r-epic { --rar: var(--r-epic); } .r-legendary { --rar: var(--r-legendary); }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 22px; padding: 0 2px; font-size: 12.5px; color: var(--ink-3); font-weight: 550; flex-wrap: wrap; }
.tile-foot .ic { width: 13px; height: 13px; } .tile-foot .on { color: var(--accent); display: inline-flex; gap: 4px; align-items: center; } .tile-foot .lock { display: inline-flex; gap: 4px; align-items: center; }
.thumb { height: 92px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--sunk); overflow: hidden; }
.thumb .pc { width: 60px; height: 60px; background: center / contain no-repeat; display: block; } .thumb .pc + .pc { margin-left: -10px; }
.thumb.t-pieces { background: linear-gradient(90deg, #e9eddf 50%, #7ba188 50%); }
.thumb .pc.prism { animation: prism 6s linear infinite; }
.thumb.t-board .board { width: 68px; } .thumb.t-board .bd-squares { background-size: 100% 100%; }
.thumb.t-aura { background: #262a26; } .thumb.t-fx { background: #262a26; }
.sticker { display: inline-block; background: var(--ink); color: var(--bg); border-radius: 14px 14px 14px 3px; padding: 6px 12px; font-weight: 650; font-size: 14px; white-space: nowrap; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.thumb.big { height: 170px; width: 170px; background: none; border-radius: 0; } .thumb.big .pc { width: 112px; height: 112px; } .thumb.big.t-board .board { width: 128px; } .thumb.big .sticker { font-size: 22px; padding: 10px 18px; background: #eceee8; color: #141714; } .thumb.big .fxglyph { scale: 2; }
.fxglyph { width: 44px; height: 44px; display: block; border-radius: 50%; }
.fx-puff { background: radial-gradient(circle at 35% 35%, #fff, #a9b6c7 70%); filter: blur(1.5px); }
.fx-sparks { background: conic-gradient(#ffd27a 0 8%, transparent 0 17%, #ff7a3d 0 25%, transparent 0 33%, #ffd27a 0 42%, transparent 0 50%, #ff7a3d 0 58%, transparent 0 67%, #ffd27a 0 75%, transparent 0 83%, #ff7a3d 0 92%, transparent 0); -webkit-mask: radial-gradient(circle, transparent 22%, #000 24%); mask: radial-gradient(circle, transparent 22%, #000 24%); }
.fx-confetti { background: conic-gradient(#e9606d 0 20%, #e9b548 0 40%, #4fbf96 0 60%, #5a9be6 0 80%, #a985ea 0); border-radius: 30% 60% 40% 70%; rotate: 20deg; }
.fx-shatter { background: linear-gradient(135deg, #e9f1ff, #8fa4c4); border-radius: 0; clip-path: polygon(50% 0, 64% 34%, 100% 20%, 74% 52%, 96% 90%, 56% 70%, 30% 100%, 34% 62%, 0 56%, 30% 38%); }
.fx-stars { background: linear-gradient(#fff3b0, #e9b548); border-radius: 0; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.fx-thunder { background: linear-gradient(#fff, #6ec3ff); border-radius: 0; clip-path: polygon(58% 0, 18% 56%, 46% 56%, 36% 100%, 84% 40%, 54% 40%); }
.fx-nova { background: radial-gradient(circle, #fff 0 14%, #ffd27a 16% 30%, transparent 32% 44%, #ff8ad8 46% 56%, transparent 58% 72%, #8ab4ff 74% 82%, transparent 84%); }
.crates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cratecard { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 26px 18px 18px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.crate { width: 112px; height: 96px; display: block; flex: none; } .crate.sm { width: 26px; height: 22px; }
.crate .c-seam { opacity: 0; transition: opacity .7s ease-in; } .bigcrate.charging .c-seam { opacity: .95; } .cratecard:hover .c-seam { opacity: .5; }
.odds { display: grid; gap: 6px; width: 100%; font-size: 13px; } .odds div { display: flex; justify-content: space-between; align-items: center; } .odds b { font-variant-numeric: tabular-nums; font-weight: 600; }
.reel { position: relative; width: 100%; height: 138px; overflow: hidden; border-radius: 14px; background: #0c0e0c; -webkit-mask: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent); mask: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent); }
.reel-strip { display: flex; gap: 10px; padding: 14px 0; will-change: transform; }
.reel-card { flex: 0 0 104px; height: 110px; border-radius: 12px; background: #1e211e; display: grid; align-content: center; justify-items: center; gap: 4px; padding: 8px 6px 6px; box-shadow: inset 0 -3px 0 var(--rar); }
.reel-card .thumb { height: 62px; width: 100%; background: none !important; } .reel-card .thumb .pc { width: 46px; height: 46px; } .reel-card .thumb.t-board .board { width: 46px; } .reel-card .sticker { font-size: 11.5px; padding: 4px 8px; background: #eceee8; color: #141714; } .reel-card .fxglyph { scale: .8; }
.reel-card small { font-size: 11px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; color: #a9b1a9; }
.reel-card.won { box-shadow: inset 0 0 0 2px var(--rar), 0 0 28px color-mix(in srgb, var(--rar) 60%, transparent); transition: box-shadow .3s; }
.reel-pin { position: absolute; left: 50%; top: 6px; bottom: 6px; width: 2px; margin-left: -1px; background: #eceee8; border-radius: 2px; }
.stage-wrap { position: relative; } .stage-body { min-height: 460px; align-content: center; position: relative; } .stage-skip { margin-top: 6px; }
.stage-flash { position: fixed; inset: 0; opacity: 0; pointer-events: none; z-index: 70; } .stage-flash.go { animation: flash .7s ease-out; } @keyframes flash { 0% { opacity: .9; } 100% { opacity: 0; } }
.stage-body.quake { animation: quake .45s; } @keyframes quake { 15% { translate: -6px 3px; } 30% { translate: 5px -4px; } 45% { translate: -4px 2px; } 60% { translate: 3px -2px; } 80% { translate: -1px 1px; } }
.bigcrate { position: relative; width: 230px; height: 220px; display: grid; place-items: center; margin-bottom: 8px; }
.bigcrate .crate { width: 210px; height: 180px; position: relative; overflow: visible; }
.bigcrate::before { content: ''; position: absolute; inset: -45%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tint) 75%, transparent) 0, transparent 60%); opacity: 0; scale: .6; transition: opacity .8s ease-in, scale .8s ease-in; }
.bigcrate.charging::before { opacity: .85; scale: 1; }
.bigcrate.charging .crate { animation: rumble .8s linear forwards; }
@keyframes rumble { 0% { transform: none; } 12% { transform: translate(-1px, 0) rotate(-.6deg); } 24% { transform: translate(1px, 0) rotate(.6deg); } 36% { transform: translate(-2px, 1px) rotate(-1.2deg); } 46% { transform: translate(2px, -1px) rotate(1.2deg); } 56% { transform: translate(-3px, 1px) rotate(-2deg) scale(1.02); } 64% { transform: translate(3px, -1px) rotate(2deg) scale(1.03); } 72% { transform: translate(-4px, 2px) rotate(-3deg) scale(1.04); } 79% { transform: translate(4px, -2px) rotate(3deg) scale(1.05); } 85% { transform: translate(-5px, 2px) rotate(-3.5deg) scale(1.06); } 90% { transform: translate(5px, -2px) rotate(3.5deg) scale(1.07); } 95% { transform: translate(-5px, 1px) rotate(-3deg) scale(1.08); } 100% { transform: scale(1.1); } }
.crate .c-lid { transform-box: fill-box; transform-origin: center; transition: transform .5s cubic-bezier(.15, .9, .3, 1), opacity .5s; }
.bigcrate.open .crate { animation: none; transform: scale(1.1); } .bigcrate.open .c-lid { transform: translateY(-150%) rotate(-24deg); opacity: 0; }
.bigcrate.open::after { content: ''; position: absolute; left: 50%; bottom: 52%; width: 260px; height: 340px; translate: -50% 0; background: linear-gradient(to top, color-mix(in srgb, var(--tint) 60%, #fff), transparent 85%); clip-path: polygon(36% 100%, 64% 100%, 100% 0, 0 0); animation: beam .7s ease-out both; }
@keyframes beam { from { opacity: 0; scale: .6 .2; transform-origin: bottom; } 40% { opacity: .9; } to { opacity: .55; } }
.reel-card.at { background: #2a2e2a; } .reel.hush .reel-card:not(.won) { opacity: .18; transition: opacity .5s; } .reel.hush .reel-card.won { animation: wonpulse .45s ease-in-out infinite alternate; } @keyframes wonpulse { to { scale: 1.07; box-shadow: inset 0 0 0 2px var(--rar), 0 0 44px var(--rar); } }
.reel-pin { box-shadow: 0 0 12px rgba(255, 255, 255, .7); }
.reveal { position: relative; width: 200px; height: 200px; display: grid; place-items: center; margin: 30px 0 18px; }
.reveal .halo { position: absolute; inset: -45%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--rar) 60%, transparent) 0, transparent 62%); animation: halo 2.4s ease-in-out infinite; }
@keyframes halo { 50% { transform: scale(1.1); opacity: .8; } }
.reveal .rays { position: absolute; inset: -110%; border-radius: 50%; background: repeating-conic-gradient(color-mix(in srgb, var(--rar) 55%, transparent) 0 7deg, transparent 7deg 20deg); -webkit-mask: radial-gradient(circle, #000 8%, transparent 60%); mask: radial-gradient(circle, #000 8%, transparent 60%); opacity: .5; animation: spin 16s linear infinite, rays-in .8s var(--ease) backwards; }
.reveal .rays.two { background: repeating-conic-gradient(rgba(255, 255, 255, .35) 0 3deg, transparent 3deg 26deg); animation: spin 22s linear infinite reverse, rays-in 1s var(--ease) backwards; }
@keyframes spin { to { rotate: 360deg; } } @keyframes rays-in { from { opacity: 0; scale: .2; } }
.reveal .thumb { position: relative; animation: drop-in .65s var(--spring) backwards; } @keyframes drop-in { from { opacity: 0; scale: .15; rotate: -14deg; } }
.reveal-text { animation: rise .45s .3s var(--ease) backwards; position: relative; } @keyframes rise { from { opacity: 0; translate: 0 14px; } }
.emote-grid { display: flex; flex-wrap: wrap; gap: 8px; } .emote-btn .sticker { max-width: none; font-size: 15px; padding: 9px 14px; } .emote-btn { transition: transform .1s var(--spring); } .emote-btn:hover { transform: scale(1.05); } .emote-btn:active { transform: scale(.95); }

/* ---------- profile */
.me-head { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.figs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px 12px; } .fig b { display: block; font-size: 30px; line-height: 1.05; font-weight: 700; font-stretch: 78%; font-variant-numeric: tabular-nums; letter-spacing: -.02em; } .fig small { color: var(--ink-2); font-size: 13px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 44px 56px; align-items: start; }
.res { font-weight: 650; width: 44px; } .res.win { color: var(--pos); } .res.loss { color: var(--neg); } .res.draw { color: var(--ink-3); }
.lvl-n { font-size: 20px; font-weight: 700; font-stretch: 80%; width: 36px; text-align: center; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.credits { color: var(--ink-3); font-size: 12.5px; max-width: 80ch; display: grid; gap: 6px; }

/* ---------- small screens */
@media (max-width: 920px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .side { display: none; }
  .tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-top: 1px solid var(--line); background: var(--bg); padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0px)); }
  .tab { display: grid; justify-items: center; gap: 2px; padding: 7px 0 5px; font-size: 11px; font-weight: 600; color: var(--ink-3); border-radius: 10px; } .tab .ic { width: 24px; height: 24px; }
  .tab.on { color: var(--ink); } .tab.on .ic { color: var(--accent); } .tab:active { transform: scale(.95); }
  .app.immersive .tabs { display: none; }
  .mobile-only { display: flex; } .desktop-only { display: none !important; }
  .page { padding: 14px 18px 36px; gap: 24px; }
  .topline { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
  .home { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'board' 'panel' 'extras'; gap: 26px; } .home-board { max-width: 520px; width: 100%; justify-self: center; }
  .home-board .board { border-radius: 0; margin: 0 -18px; width: calc(100% + 36px); }
  .courses, .cols { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .locker { grid-template-columns: minmax(0, 1fr); gap: 20px; } .locker-preview { position: static; max-width: 240px; width: 100%; justify-self: center; }
  .crates { grid-template-columns: minmax(0, 1fr); } .cratecard { grid-template-columns: auto 1fr; text-align: left; justify-items: start; padding: 18px; column-gap: 18px; align-items: center; } .cratecard > .crate { grid-row: span 2; } .cratecard > .cc-actions { grid-column: 1 / -1; width: 100%; }
  .figs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game { grid-template-columns: minmax(0, 1fr); padding: 0 0 20px; gap: 14px; max-width: 620px; margin: 0 auto; }
  .game-main { gap: 6px; padding-top: 6px; } .game-main > .strip, .game-main > .toolbar, .game-main > .barrow { padding: 0 12px; } .game-main > .barrow h1 { font-size: 22px; } .game-side { padding: 0 16px; gap: 18px; }
  .game .board { border-radius: 0; } .game .evalline { border-radius: 0; }
  .strip { min-height: 44px; } .clock { font-size: 20px; padding: 7px 10px; min-width: 70px; }
  .moves { display: flex; max-height: none; overflow-x: auto; gap: 2px; scrollbar-width: none; } .moves::-webkit-scrollbar { display: none; } .mvpair { display: inline-flex; flex: none; align-items: center; } .mvno { padding: 4px 2px 4px 6px; }
  .review .moves { flex-wrap: wrap; max-height: 120px; overflow-y: auto; }
  .bestsan { font-size: 34px; } .lesson-text { font-size: 17px; } .game-side > .chips { flex-wrap: nowrap; }
  .coach-head { order: 0; } .coach-best { order: 1; border-top: 0; padding-top: 0; } .coach-fb { order: 2; padding-top: 14px; border-top: 1px solid var(--line); } .coach > .quietnote { order: 1; }
  .game .evalline { box-shadow: none; }
  .scrim { align-items: end; padding: 0; } .sheet { width: 100%; border-radius: 22px 22px 0 0; padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px)); animation: sheet-up .26s var(--ease); max-height: 92vh; overflow: auto; } .sheet.stage { min-height: 100dvh; max-height: none; border-radius: 0; display: grid; align-content: center; animation: fade .2s; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
  .toasts { top: 10px; }
}
@media (max-width: 420px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .seg button { padding: 0 10px; } .week { gap: 4px; } .day { font-size: 10.5px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
.reveal .thumb.big.t-pieces, .reveal .thumb.big.t-aura { background: linear-gradient(90deg, #e9eddf 50%, #7ba188 50%); border-radius: 26px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.reel-card .thumb.t-pieces .pc:last-child { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .8)) drop-shadow(0 0 1px rgba(255, 255, 255, .8)); }

.og-san { font-weight: 700; font-size: 17px; min-width: 52px; font-stretch: 90%; } .og-move { min-height: 52px; text-align: left; } .og-line { display: flex; flex-wrap: wrap; max-height: none; gap: 2px; }
.kv .li-body small { max-width: 34ch; }
.piece.lift { filter: drop-shadow(0 .25cqw .2cqw rgba(0, 0, 0, .5)); } .piece.aura.lift { filter: var(--aura) drop-shadow(0 .25cqw .2cqw rgba(0, 0, 0, .5)); } .piece.lift.drag { filter: drop-shadow(0 .9cqw .7cqw rgba(0, 0, 0, .35)); }
/* piece skins: a finish laid over the piece through its own shape. Light pieces are tinted (multiply), dark pieces are lit (screen), so the two sides stay easy to tell apart */
[data-skin] { isolation: isolate; }
.piece[data-skin]::after, .pc[data-skin]::after { content: ''; position: absolute; inset: 0; background: var(--fin-d); background-size: 220% 220%; -webkit-mask: var(--img) no-repeat; mask: var(--img) no-repeat; mix-blend-mode: screen; animation: finish 7s ease-in-out infinite alternate; pointer-events: none; }
.piece[data-skin]::after { -webkit-mask-position: calc(50% + var(--px, 0px)) calc(50% + var(--py, 0px)); mask-position: calc(50% + var(--px, 0px)) calc(50% + var(--py, 0px)); -webkit-mask-size: var(--pz, 100%) var(--pz, 100%); mask-size: var(--pz, 100%) var(--pz, 100%); }
.pc[data-skin] { position: relative; } .pc[data-skin]::after { -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
[data-skin].w::after { background-image: var(--fin-l); mix-blend-mode: multiply; }
@keyframes finish { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
[data-skin="galaxy"] { --fin-l: radial-gradient(circle at 20% 30%, #fff 0 1.5%, transparent 2.5%), radial-gradient(circle at 70% 60%, #fff 0 1.2%, transparent 2.2%), radial-gradient(circle at 45% 80%, #fff 0 1%, transparent 2%), linear-gradient(135deg, #b9a4ff, #8e7bff 30%, #79c7ff 60%, #ff9be6); --fin-d: radial-gradient(circle at 20% 30%, #fff 0 1.5%, transparent 2.5%), radial-gradient(circle at 70% 60%, #fff 0 1.2%, transparent 2.2%), radial-gradient(circle at 45% 80%, #fff 0 1%, transparent 2%), linear-gradient(135deg, #2c1672, #5a2fc0 35%, #1d6fc4 65%, #a02a8e); }
[data-skin="gold"] { --fin-l: linear-gradient(120deg, #fff1b8, #f6cf5a 30%, #fff7d6 50%, #e8b63a 70%, #ffe9a0); --fin-d: linear-gradient(120deg, #6b4a06, #b8860b 30%, #e6c14d 50%, #8a6408 70%, #c79a1e); }
[data-skin="ember"] { --fin-l: linear-gradient(160deg, #ffe2a8, #ffae6b 45%, #ff8a5c 75%, #ffd08a); --fin-d: linear-gradient(160deg, #7a1408, #c43a14 45%, #f07a1e 75%, #8e1c0a); }
[data-skin="frost"] { --fin-l: linear-gradient(140deg, #f2fcff, #b6e6ff 40%, #8fc8ff 70%, #e6f8ff); --fin-d: linear-gradient(140deg, #0e3a66, #1f6fb0 40%, #4aa6dc 70%, #124a80); }
[data-skin="emerald"] { --fin-l: linear-gradient(140deg, #dcffe9, #8ee6b6 40%, #5fd39a 70%, #c9ffe0); --fin-d: linear-gradient(140deg, #06402c, #0f7a55 40%, #2fb07c 70%, #085038); }
[data-skin="rose"] { --fin-l: linear-gradient(140deg, #ffe6ef, #ffb3cc 40%, #ff8fb3 70%, #ffd9e6); --fin-d: linear-gradient(140deg, #5e1233, #a52a5c 40%, #d6457a 70%, #6e163c); }
.thumb.t-skin { background: linear-gradient(90deg, #e9eddf 50%, #7ba188 50%); } .thumb.t-skin .pc { width: 68px; height: 68px; }
.reveal .thumb.big.t-skin { background: linear-gradient(90deg, #e9eddf 50%, #7ba188 50%); border-radius: 26px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.piece.ghost::after { display: none; }
[data-skin="blackout"] { --fin-l: linear-gradient(135deg, #2b2e35, #0c0d10 45%, #23262c 70%, #08090b); --fin-d: linear-gradient(135deg, #2b2e35, #0c0d10 45%, #23262c 70%, #08090b); filter: drop-shadow(0 0 1px rgba(255, 255, 255, .95)) drop-shadow(0 0 1px rgba(255, 255, 255, .6)); }
[data-skin="blackout"]::after, [data-skin="blackout"].w::after { mix-blend-mode: multiply; }
/* a piece under a finger: no shadow filter and no skin animation while it moves, so every frame is cheap */
.piece.drag.touch { filter: none !important; animation: none !important; } .piece.drag.touch::after { animation: none; }
.mk.over.touch { box-shadow: none; background: rgba(255, 255, 255, .28); } .mk.over.touch::before { inset: -60%; background: rgba(18, 26, 21, .2); box-shadow: 0 0 0 .5cqw rgba(255, 255, 255, .55); }

.rush-hud { display: flex; align-items: center; gap: 12px; } .rush-score { font-size: 26px; font-weight: 700; min-width: 1.4em; text-align: right; } .rush-miss { display: flex; gap: 4px; } .rush-miss i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); } .rush-miss i.on { background: var(--neg, #c0392b); }
.chip.rushchip { background: var(--ink); color: var(--bg); border-color: var(--ink); } .chip.rushchip svg { width: 14px; height: 14px; }
.li.quest .meter, .li.ach .meter { margin-top: 6px; max-width: 220px; } .li.quest.done b { color: var(--ink-2); } .li.quest.done .li-lead, .li.ach.got .li-lead { color: var(--accent); } .li.ach:not(.got) b { color: var(--ink-2); }
.li.friend { align-items: center; gap: 10px; } .li.friend .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; } .li.friend .dot.on { background: var(--accent); }
.achs { max-height: none; }
[data-skin="ruby"] { --fin-l: linear-gradient(135deg, #ffd9de, #ff8fa0 40%, #f25c78 70%, #ffc2cc); --fin-d: linear-gradient(135deg, #5c0a1c, #a3142f 40%, #e03a56 70%, #6e0e22); }
[data-skin="chrome"] { --fin-l: linear-gradient(115deg, #ffffff, #c9d1d9 25%, #f4f7fa 45%, #a9b4bf 65%, #eef2f5 85%, #b8c2cc); --fin-d: linear-gradient(115deg, #2a3038, #7d8894 25%, #3a424c 45%, #9aa6b2 65%, #2f363f 85%, #6b7682); }
[data-skin="neon"] { --fin-l: linear-gradient(135deg, #b8fff4, #7df9ff 30%, #ff9cf5 65%, #fff7a8); --fin-d: linear-gradient(135deg, #00b3a4, #00e5ff 30%, #ff3bd4 65%, #c8e600); }
[data-skin="sunset"] { --fin-l: linear-gradient(160deg, #fff0b8, #ffc48a 35%, #ff9aa8 65%, #c9a0ff); --fin-d: linear-gradient(160deg, #b8860b, #e0621c 35%, #c2325a 65%, #5b2a9c); }
[data-skin="ocean"] { --fin-l: linear-gradient(150deg, #dffbff, #9ee6f2 40%, #6fb8f0 70%, #c7f3ff); --fin-d: linear-gradient(150deg, #04364a, #0b6f8f 40%, #1aa3c4 70%, #06495f); }
[data-skin="void"] { --fin-l: radial-gradient(circle at 30% 30%, #b08cff 0 6%, transparent 30%), linear-gradient(135deg, #5a4a8a, #2a2146 50%, #6a4fc0); --fin-d: radial-gradient(circle at 30% 30%, #b08cff 0 6%, transparent 30%), linear-gradient(135deg, #1a1030, #3b2470 50%, #0f0a1e); filter: drop-shadow(0 0 1.5px rgba(176, 140, 255, .95)); }
[data-skin="candy"] { --fin-l: repeating-linear-gradient(45deg, #ffd1e8 0 12%, #fff 12% 24%, #c9ecff 24% 36%); --fin-d: repeating-linear-gradient(45deg, #c2408a 0 12%, #7a2a5c 12% 24%, #2f7fb5 24% 36%); }
[data-skin="toxic"] { --fin-l: linear-gradient(140deg, #f2ffb8, #c6f25c 40%, #7fe04a 70%, #e6ff9c); --fin-d: linear-gradient(140deg, #2f4d00, #5c9a0a 40%, #9ad61e 70%, #3a6000); }
[data-skin="pearl"] { --fin-l: linear-gradient(125deg, #ffffff, #ffe9f3 25%, #e6f4ff 50%, #f3ffe9 75%, #fff4e0); --fin-d: linear-gradient(125deg, #6a5a66, #8a7f96 25%, #6f8494 50%, #7f917a 75%, #94866c); }
[data-skin="amethyst"] { --fin-l: linear-gradient(140deg, #f1e4ff, #cfa8ff 40%, #a97bf0 70%, #e6d2ff); --fin-d: linear-gradient(140deg, #2e0f5c, #5a2aa8 40%, #8a52e0 70%, #3a1570); }
.crate { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .18)); } .crate.sm { filter: none; }

/* installed app: room for the notch and home bar, no rubber-band bounce, no long-press callouts on controls */
html.standalone, html.standalone body { overscroll-behavior: none; }
html.standalone .app { padding-top: env(safe-area-inset-top, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
html.standalone button, html.standalone .tab, html.standalone .navlink { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.navlink.install { color: var(--accent); } .navlink.install svg { color: var(--accent); }
.btn.install-pill { min-height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; } .btn.install-pill svg { width: 15px; height: 15px; }
.inst { display: grid; gap: 12px; margin: 4px 0 0; padding: 0; list-style: none; } .inst-step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; } .inst-step svg { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin: 0 2px; }
.inst-n { width: 26px; height: 26px; border-radius: 50%; background: var(--sunk); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
