:root {
  --ink:#182521; --muted:#777e75; --green:#294c3d; --green-soft:#e8eee0;
  --coral:#ff754a; --coral-dark:#e95c31; --paper:#f6f4ed; --white:#fffef9;
  --line:#e5e5dc; --board-light:#e6ebd9; --board-dark:#7b9a81;
  font-family:"Avenir Next",Avenir,"Segoe UI",ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
  color:var(--ink); background:var(--paper); font-synthesis:none; -webkit-font-smoothing:antialiased;
}
* { box-sizing:border-box; }
body { margin:0; }
button,input { font:inherit; }
button { color:inherit; cursor:pointer; touch-action:manipulation; }
button:disabled { cursor:default; opacity:.44; }
button:focus-visible { outline:3px solid #c47f24; outline-offset:4px; }
button:active:not(:disabled) { transform:translateY(1px); }
[hidden] { display:none!important; }
h1,h2,h3,p { margin-top:0; }
svg { display:block; }
.navigation-rail { position:fixed; inset:0 auto 0 0; width:104px; z-index:30; background:var(--ink); color:#fff8e8; display:flex; flex-direction:column; align-items:center; padding:29px 12px 24px; }
.brand { border:0; background:none; color:#f3e8c8; padding:0; display:flex; flex-direction:column; align-items:center; gap:4px; }
.brand-mark { width:43px; height:43px; }
.brand-word { font-size:18px; font-weight:800; letter-spacing:-1px; }
.brand-word>span { color:var(--coral); }
.navigation-rail nav { display:flex; flex-direction:column; gap:11px; width:100%; margin-top:61px; }
.nav-button { position:relative; border:0; padding:15px 3px 13px; border-radius:15px; background:none; color:#8d9c91; display:flex; flex-direction:column; align-items:center; gap:9px; font-size:10px; font-weight:600; transition:background .18s,color .18s; }
.nav-button svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.nav-button:hover { color:#fff7dd; background:#ffffff08; }
.nav-button.active { background:#304338; color:#e8efc9; }
.nav-button.active:before { content:""; position:absolute; width:3px; height:18px; border-radius:3px; background:#d9eaa0; left:-12px; top:31px; }
.rail-bottom { margin-top:auto; text-align:center; color:#7f9383; font-size:9px; line-height:1.5; letter-spacing:.3px; }
.rail-spark { display:block; font-size:25px; color:#a0b28a; margin-bottom:12px; }
.app-shell { margin-left:104px; padding:0 48px; max-width:1600px; }
.header { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:91px; border-bottom:1px solid var(--line); }
.header-title { display:flex; align-items:center; gap:9px; font-size:10px; letter-spacing:1.75px; font-weight:700; color:#7c8478; }
.status-dot,.caption-dot { width:5px; height:5px; border-radius:50%; background:#94a872; flex-shrink:0; }
.player-bar { display:flex; align-items:center; gap:22px; }
.rank-badge { display:flex; align-items:center; gap:9px; }
.rank-glyph { width:31px; height:35px; display:grid; place-items:center; background:#e8eadb; border-radius:9px; color:#8b9c5d; font-size:22px; }
.rank-badge strong { font-size:11px; font-weight:700; }
.level-track { width:79px; background:#e1e4d7; height:3px; margin-top:6px; border-radius:2px; overflow:hidden; }
#level-progress { display:block; width:0; height:100%; background:#7f955f; transition:width .5s; }
.header-metric { display:flex; align-items:center; gap:5px; font-size:12px; font-variant-numeric:tabular-nums; }
.header-metric strong { font-weight:750; }
.header-metric small { font-size:9px; color:#8b8f81; }
.xp-metric>span { color:#d3a247; font-size:20px; }
.streak-metric svg { width:15px; height:20px; fill:var(--coral); margin-right:2px; }
.icon-button { display:grid; place-items:center; width:31px; height:31px; padding:0; border:0; border-radius:9px; background:#eef0e7; color:#65735d; font-size:22px; line-height:1; }
.icon-button:hover { background:#e2e7d7; }
.sound-button { background:transparent; color:#86907d; }
.sound-button svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
main { max-width:1160px; margin:auto; }
.page-heading { display:flex; justify-content:space-between; align-items:center; gap:24px; margin:38px 0 28px; }
.eyebrow { font-size:9px; font-weight:750; letter-spacing:1.7px; color:#8c947d; line-height:1.6; margin:0 0 9px; }
.game-heading .eyebrow { display:flex; align-items:center; gap:7px; }
.game-heading .eyebrow>span { width:12px; height:1px; background:#9da880; }
h1 { font-size:38px; line-height:1.15; font-weight:650; letter-spacing:-1.6px; margin:0; }
h1 em, .wardrobe-dialog h2 em { font-family:Georgia,"Times New Roman",serif; font-weight:400; color:#748362; }
.intro { color:var(--muted); line-height:1.7; font-size:13px; margin:12px 0 0; }
.wardrobe-trigger { display:flex; gap:9px; align-items:center; border:1px solid #dedfd3; background:#faf9f2; border-radius:10px; padding:10px 12px; font-size:11px; color:#66765b; }
.wardrobe-trigger:hover { border-color:#9fae8c; }
.mini-board { width:24px; height:24px; border:2px solid #d7dfc5; border-radius:4px; background:conic-gradient(#7b9a81 25%,#e6ebd9 0 50%,#7b9a81 0 75%,#e6ebd9 0) 0 0/12px 12px; }
.button-arrow { margin-left:8px; font-size:15px; }
.run-bar { display:flex; align-items:center; justify-content:space-between; gap:25px; padding:17px 21px; border:1px solid var(--line); background:#fdfcf6; border-radius:14px; margin-bottom:20px; }
.run-heading { display:flex; gap:12px; align-items:center; }
.run-icon { height:34px; width:34px; border-radius:10px; background:#f4ead8; color:#ac8649; display:grid; place-items:center; font-size:23px; }
.run-heading h2 { font-size:13px; font-weight:750; letter-spacing:-.15px; margin:0 0 3px; }
.run-heading p { margin:0; color:#969a8e; font-size:10px; }
.run-progress-wrap { display:flex; align-items:center; gap:13px; margin-left:auto; }
#run-position { font-size:10px; font-weight:600; color:#7e8a72; white-space:nowrap; font-variant-numeric:tabular-nums; }
.run-progress { display:flex; align-items:center; gap:6px; }
.run-progress>span { display:grid; place-items:center; height:8px; width:33px; border-radius:6px; background:#e8ebdf; font-size:9px; color:transparent; }
.run-progress>span.current { background:#f3c78b; box-shadow:0 0 0 3px #f7ecda; }
.run-progress>span.done { background:#789264; }
.run-progress>span.assisted { background:#c5b478; }
.run-progress>span.skipped { background:#c4c7bc; }
.run-score { display:flex; align-items:center; gap:5px; padding-left:24px; border-left:1px solid var(--line); white-space:nowrap; }
.run-score>span { font-size:20px; color:#d0aa5e; }
.run-score strong { font-size:11px; color:#6b795c; }
.training-layout { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:25px; align-items:start; }
.board-column { min-width:0; }
.board-card { position:relative; background:var(--white); border:1px solid #e1e4d7; border-radius:16px; padding:0 17px; box-shadow:0 8px 30px #293c2110,0 1px 2px #293c2105; min-width:0; overflow:hidden; }
.board-heading { min-height:55px; display:flex; justify-content:space-between; gap:12px; align-items:center; padding-left:22px; }
.turn-line { display:flex; align-items:center; gap:8px; font-size:11px; font-weight:700; }
.turn-dot { width:11px; height:11px; border-radius:50%; background:#fffef6; border:1px solid #b8beac; box-shadow:0 1px 2px #26341b1a; }
.turn-dot.black { background:#273a34; border-color:#273a34; }
.puzzle-meta { display:flex; align-items:center; gap:9px; font-size:9px; color:#9a9f90; }
.meta-divider { height:10px; width:1px; background:var(--line); }
.board-surround { display:grid; grid-template-columns:15px minmax(0,1fr); grid-template-rows:minmax(0,1fr) 21px; column-gap:7px; }
.board { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); aspect-ratio:1; width:100%; overflow:hidden; border:1px solid #647c6838; border-radius:5px; background:var(--board-light); box-shadow:0 2px 8px #233d2212; user-select:none; -webkit-user-select:none; touch-action:manipulation; }
.square { position:relative; display:flex; align-items:center; justify-content:center; min-width:0; aspect-ratio:1; padding:0; border:0; border-radius:0; background:var(--board-light); -webkit-tap-highlight-color:transparent; }
.square.dark { background:var(--board-dark); }
.square.last:before { content:""; position:absolute; inset:0; background:#e6df6f45; pointer-events:none; }
.square.selected { box-shadow:inset 0 0 0 3px #b3a04c; }
.square.selected:before { content:""; position:absolute; inset:0; background:#e8ca5b65; }
.square.hint { box-shadow:inset 0 0 0 4px #efab46; }
.square.wrong { box-shadow:inset 0 0 0 4px #d46851; animation:wrong-shake .23s; }
.square:focus-visible { z-index:3; outline:3px solid #263e2b; outline-offset:-3px; }
.square.legal:after { content:""; position:absolute; width:22%; height:22%; border-radius:50%; background:#173e3b45; pointer-events:none; }
.square.legal.occupied:after { width:88%; height:88%; border:5px solid #21473c55; background:transparent; }
.piece { display:block; width:87%; height:87%; position:relative; z-index:1; filter:drop-shadow(0 2px 1px #172b2435); pointer-events:none; }
.square[draggable=true] { cursor:grab; }
.rank-labels { display:grid; grid-template-rows:repeat(8,minmax(0,1fr)); font-size:9px; font-weight:600; color:#9ba38d; text-align:center; }
.rank-labels span { align-self:center; }
.file-labels { grid-column:2; display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); align-items:center; text-align:center; font-size:9px; font-weight:600; color:#9ba38d; }
.board-footer { min-height:41px; display:flex; justify-content:space-between; align-items:center; gap:8px; padding:0 0 8px 22px; color:#919987; font-size:10px; }
.board-footer>div { display:flex; gap:5px; }
.board-caption { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:13px 4px 0; color:#9aa18f; font-size:9px; }
.board-caption>span:first-child { display:flex; align-items:center; gap:6px; }
.caption-dot { width:4px; height:4px; }
.training-sidebar { display:grid; gap:18px; }
.task-card { border:1px solid var(--line); background:var(--white); border-radius:16px; padding:24px 23px 18px; }
.card-eyebrow { display:flex; align-items:center; gap:6px; font-size:8px; font-weight:750; letter-spacing:1.35px; color:#92a074; margin-bottom:14px; }
.tiny-icon { font-size:18px; color:#93a174; }
.task-card h2 { font-size:26px; font-weight:650; letter-spacing:-.8px; line-height:1.15; margin:0 0 13px; }
.task-card>p { font-size:11px; line-height:1.8; color:#8a927f; margin:0 0 18px; }
.feedback { padding:12px 11px; display:flex; gap:9px; align-items:flex-start; min-height:60px; border-radius:9px; font-size:11px; line-height:1.65; transition:background .15s; }
.feedback.neutral { background:#f0f3e9; color:#7a8868; }
.feedback.good { background:#e9f1dd; color:#4c7140; }
.feedback.bad { background:#fff0e9; color:#a1634b; }
.feedback.help { background:#f7f0dc; color:#967d45; }
.feedback-icon { flex-shrink:0; font-size:18px; line-height:1.2; }
.move-list { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.move-list:empty { display:none; }
.move-token { padding:5px 8px; font-size:11px; font-variant-numeric:tabular-nums; border-radius:5px; background:#edf1e6; }
.move-token.opponent { color:#939b84; background:#f6f6ee; }
.help-actions { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:19px 0; }
.help-actions button { border:0; background:none; font-size:10px; padding:2px 0; color:#929783; }
.help-actions button:first-child { display:flex; align-items:center; gap:5px; color:#7d8d59; }
.help-actions button:first-child>span:first-child { font-size:18px; line-height:1; }
.help-actions button:hover:not(:disabled) { color:#3f5a37; }
.primary { width:100%; display:flex; align-items:center; justify-content:space-between; gap:14px; border:0; border-radius:9px; background:var(--coral); padding:14px 17px; color:#fffaf0; font-size:12px; font-weight:750; box-shadow:0 3px 0 #cf582a16; transition:background .16s,box-shadow .16s; }
.primary:hover:not(:disabled) { background:var(--coral-dark); box-shadow:0 5px 14px #ec744626; }
.primary>span { font-size:20px; font-weight:400; }
.task-card .under-button { color:#a1a58f; font-size:8px; text-align:center; margin:10px 0 0; line-height:1.6; }
.reward-button { display:flex; align-items:center; justify-content:center; gap:7px; width:100%; padding:10px 8px; margin:0 0 10px; border:1px solid #e2d7b6; border-radius:8px; background:#fcf7e7; color:#8d783e; font-size:10px; }
.reward-button>span { font-size:17px; }
.solution-note { font-size:11px; color:#718060; line-height:1.8; padding-top:12px; }
.solution-note>p { margin-bottom:8px; }
.replay-controls { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:5px 0; font-size:10px; color:#7d8a6f; }
.daily-challenge { position:relative; overflow:hidden; min-height:211px; border-radius:16px; background:#2a4236; color:#f1eddb; padding:23px; }
.daily-challenge-copy { position:relative; z-index:1; }
.daily-challenge .eyebrow { font-size:7px; letter-spacing:1.1px; color:#aab99c; margin-bottom:12px; }
.daily-challenge h2 { font-size:25px; letter-spacing:-.7px; font-weight:500; line-height:1.05; margin-bottom:10px; }
.daily-challenge-copy>p:not(.eyebrow) { color:#aab7a0; font-size:9px; line-height:1.6; max-width:155px; margin-bottom:16px; }
.daily-challenge button { display:flex; justify-content:space-between; align-items:center; gap:14px; background:#edf0d5; color:#3e5840; border:0; border-radius:7px; font-size:10px; font-weight:700; padding:10px 12px; }
.daily-challenge button:hover { background:#fff9d6; }
.challenge-art { position:absolute; width:146px; height:auto; right:-16px; bottom:-3px; }
.practice-summary { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-top:28px; padding:21px 23px; border:1px solid var(--line); border-radius:13px; background:#fdfcf6; }
.practice-summary-title { min-width:190px; }
.card-title { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.card-title h3 { font-size:11px; font-weight:700; margin:0; }
.card-title>span { font-size:9px; color:#8a937d; font-variant-numeric:tabular-nums; }
.daily-dots { display:flex; gap:5px; margin:10px 0 8px; }
.daily-dots>span { flex:1; height:4px; border-radius:3px; background:#e9eddf; }
.daily-dots>span.done { background:#9aaf76; }
.practice-summary-title>p { font-size:8px; color:#9aa18c; line-height:1.6; margin:0; }
.daily-metrics { display:flex; align-items:center; gap:26px; }
.daily-metrics>div { display:flex; flex-direction:column; gap:5px; }
.daily-metrics strong { font-size:25px; font-weight:550; letter-spacing:-.8px; }
.daily-metrics span { font-size:8px; color:#9aa18c; white-space:nowrap; }
.review-link { display:flex; align-items:center; justify-content:space-between; gap:12px; border:0; background:none; color:#788864; font-size:10px; padding:8px 0; white-space:nowrap; }
.review-link>span { font-size:16px; }
.outline-button { display:flex; align-items:center; justify-content:space-between; gap:12px; border:1px solid #dde2d0; background:#fafbf3; color:#6b8057; border-radius:9px; font-size:11px; font-weight:600; padding:12px 15px; white-space:nowrap; }
.outline-button:hover { border-color:#acbd93; background:#f4f7e9; }
.quiet-note { display:flex; align-items:center; justify-content:center; gap:6px; color:#a1a895; font-size:8px; margin:13px 0 24px; }
.quiet-note>span { font-size:12px; }
.mode-banner { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 15px; padding:11px 16px; border:1px solid #d9e2c8; border-radius:10px; background:#eff3e5; font-size:11px; color:#72855e; }
.mode-banner button { border:0; background:none; color:#72855e; font-size:10px; }
.empty-state { max-width:680px; margin:20px auto; padding:60px 25px; border:1px solid var(--line); border-radius:18px; background:var(--white); text-align:center; }
.empty-state h2 { font-size:27px; font-weight:600; letter-spacing:-.8px; }
.empty-state p { max-width:400px; margin:0 auto 25px; color:var(--muted); font-size:13px; line-height:1.8; }
.empty-state .primary { max-width:280px; margin:auto; }
.empty-symbol { display:grid; place-items:center; width:58px; height:58px; border-radius:50%; background:#e9efdb; color:#81975e; font-size:30px; margin:0 auto 18px; }
.theme-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.theme-card { text-align:left; border:1px solid var(--line); border-radius:15px; background:var(--white); padding:24px; min-height:225px; transition:border-color .2s,transform .2s,box-shadow .2s; }
.theme-card:hover { border-color:#a4b18d; transform:translateY(-3px); box-shadow:0 10px 20px #334a2710; }
.theme-card-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.theme-card-icon { width:49px; height:49px; display:grid; place-items:center; border-radius:12px; background:#edf1e3; font-size:33px; color:#779366; }
.theme-card:nth-child(2n) .theme-card-icon { background:#f8ecda; color:#b7955d; }
.theme-card:nth-child(3n) .theme-card-icon { background:#e7eeeb; color:#7d9a8e; }
.theme-card-count { font-size:9px; color:#9ea58f; }
.theme-card h2 { font-size:20px; font-weight:650; letter-spacing:-.5px; margin:0 0 10px; }
.theme-card p { color:#8b947e; font-size:11px; line-height:1.8; margin-bottom:18px; }
.theme-card-bottom { display:flex; justify-content:space-between; align-items:center; color:#77915f; font-size:10px; }
.theme-card-bottom>span:last-child { font-size:17px; }
.section-footnote { font-size:10px; color:#9ca58b; margin:24px 0 40px; }
.stat-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:22px; }
.stat-card { background:var(--white); border:1px solid var(--line); border-radius:14px; padding:24px; }
.stat-card strong { display:block; font-size:37px; font-weight:550; letter-spacing:-1.5px; margin-bottom:8px; }
.stat-card span { font-size:10px; color:#8d9780; }
.stats-layout { display:grid; grid-template-columns:1fr 1fr; gap:22px; }
.stats-panel { border:1px solid var(--line); border-radius:14px; background:var(--white); padding:25px; }
.stats-panel>h2 { font-size:17px; font-weight:650; letter-spacing:-.3px; margin-bottom:25px; }
.theme-stat { margin-bottom:22px; }
.theme-stat:last-child { margin-bottom:0; }
.theme-stat-head { display:flex; justify-content:space-between; gap:10px; font-size:11px; margin-bottom:9px; }
.theme-stat-head>span:last-child { font-size:9px; color:#919d81; }
.stat-track { height:5px; background:#edf1e3; border-radius:4px; overflow:hidden; }
.stat-track>span { display:block; height:100%; border-radius:4px; background:#9eb77d; }
.recent-item { display:flex; justify-content:space-between; align-items:center; gap:12px; border-top:1px solid var(--line); padding:12px 0; font-size:11px; }
.recent-item>div>span { display:block; font-size:9px; color:#9ba78d; margin-top:5px; }
.result-label { font-size:8px; padding:6px 8px; border-radius:5px; background:#ecf2df; color:#6c8752; white-space:nowrap; }
.result-label.review { background:#f7f0da; color:#a48b4f; }
.stats-empty { font-size:12px; line-height:1.8; color:#8e9980; }
.stats-foot { display:flex; align-items:center; justify-content:space-between; gap:30px; margin:24px 0 40px; }
.stats-foot p { max-width:600px; font-size:10px; line-height:1.8; color:#939d84; margin:0; }
.text-button { padding:8px 0; background:none; border:0; color:#8c967d; font-size:10px; text-decoration:underline; text-underline-offset:4px; white-space:nowrap; }
footer { display:flex; align-items:center; gap:18px; max-width:1160px; margin:auto; border-top:1px solid var(--line); padding:20px 0 25px; color:#a3a993; font-size:9px; }
.footer-brand { font-weight:800; font-size:16px; letter-spacing:-.8px; color:#8d9b7a; }
footer>span:nth-child(2) { margin-right:auto; }
footer button { border:0; background:none; color:#8e9d7d; font-size:10px; padding:3px 0; }
.storage-warning { margin:20px 0; padding:15px 18px; border:1px solid #e8d8ae; background:#fff5de; color:#967640; border-radius:10px; font-size:12px; line-height:1.8; }
dialog { position:fixed; max-width:min(520px,calc(100% - 30px)); max-height:calc(100dvh - 40px); overflow:auto; border:1px solid #dfe3d0; border-radius:22px; padding:36px; color:var(--ink); background:var(--white); box-shadow:0 25px 120px #142c3a40; }
dialog::backdrop { background:#172d2b70; backdrop-filter:blur(7px); }
dialog h2 { font-size:27px; font-weight:600; line-height:1.2; letter-spacing:-.8px; margin-bottom:16px; }
dialog p { color:#869178; font-size:12px; line-height:1.8; }
.dialog-close { position:absolute; right:15px; top:12px; width:28px; height:28px; border:0; background:#f0f2e7; border-radius:50%; color:#88997a; font-size:22px; line-height:1; }
.dialog-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:25px; }
.dialog-actions .primary { width:auto; min-width:110px; }
.promotion-options { display:flex; gap:10px; margin:20px 0; }
.promotion-options button { width:70px; height:70px; border:1px solid #dbe2ca; border-radius:10px; background:#e8efda; padding:4px; }
.promotion-options .piece { width:100%; height:100%; }
.license-note { padding-top:14px; border-top:1px solid var(--line); font-size:10px; }
.run-dialog { width:410px; text-align:center; padding:36px 35px 25px; }
.result-emblem { position:relative; width:87px; height:87px; display:grid; place-items:center; border:1px solid #dce6c6; border-radius:50%; background:#ecf3de; color:#708b54; font-size:53px; margin:0 auto 22px; }
.result-emblem>span { position:absolute; right:-5px; top:5px; color:#dbb35d; font-size:26px; }
.run-dialog h2 { font-size:30px; margin-bottom:10px; }
.run-dialog>p:not(.eyebrow) { font-size:11px; max-width:290px; margin-left:auto; margin-right:auto; }
.run-result-stars { display:flex; align-items:center; justify-content:center; gap:5px; color:#d0ac56; font-size:25px; margin:22px 0 8px; min-height:30px; }
.run-result-stars>span { display:inline-block; }
.run-result-stars .empty { color:#e4e6da; }
.run-result-xp { color:#6c8950; font-size:34px; letter-spacing:-1px; font-weight:600; margin:8px 0; }
#run-result-detail { margin-bottom:23px; }
.result-daily-button { display:flex; align-items:center; justify-content:center; gap:15px; border:0; background:none; color:#849472; font-size:11px; padding:16px 0 3px; width:100%; }
.wardrobe-dialog { width:570px; max-width:calc(100% - 30px); }
.wardrobe-dialog h2 { line-height:1.25; }
.board-themes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; margin-top:24px; }
.board-theme { position:relative; display:flex; flex-direction:column; gap:10px; padding:15px; border:1px solid var(--line); border-radius:12px; background:#fbfcf6; text-align:left; }
.board-theme.selected { border-color:#7e9e66; box-shadow:0 0 0 2px #8fae7020; }
.board-theme.locked { opacity:.65; }
.board-theme strong { font-size:12px; }
.board-theme small,.board-theme>span { font-size:9px; color:#91a07e; }
.board-theme .theme-preview,.board-theme .board-preview { display:grid; grid-template-columns:repeat(4,1fr); aspect-ratio:2; width:100%; border-radius:5px; overflow:hidden; }
.board-theme .swatch { height:65px; border-radius:6px; width:100%; }
.pause-overlay { position:absolute; inset:0; z-index:12; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:25px; background:#f7f8edeb; backdrop-filter:blur(9px); }
.pause-overlay>span { color:#8aa06d; font-size:48px; margin-bottom:18px; }
.pause-overlay h2 { font-size:29px; font-weight:600; letter-spacing:-.7px; margin-bottom:8px; }
.pause-overlay p { color:#929d80; font-size:12px; }
.pause-overlay .primary { max-width:210px; margin-top:10px; }
.celebration { position:absolute; inset:0; z-index:10; pointer-events:none; overflow:hidden; }
.celebration>span { position:absolute; left:50%; top:50%; color:#edb64e; font-size:30px; opacity:0; animation:celebrate 1s ease-out forwards; --dx:-170px; --dy:-160px; }
.celebration>span:nth-child(2) { --dx:180px; --dy:-120px; animation-delay:.05s; }
.celebration>span:nth-child(3) { --dx:100px; --dy:-210px; animation-delay:.1s; color:#8ca965; }
.celebration>span:nth-child(4) { --dx:-120px; --dy:110px; animation-delay:.12s; color:var(--coral); }
.celebration>span:nth-child(5) { --dx:155px; --dy:130px; animation-delay:.03s; }
.toast { position:fixed; left:calc(50% + 52px); bottom:24px; transform:translateX(-50%); z-index:80; background:#253c30; color:#f5f0db; border:1px solid #4e6250; border-radius:11px; box-shadow:0 6px 30px #18262125; max-width:calc(100% - 40px); padding:13px 20px; font-size:12px; line-height:1.5; }
.view { animation:appear .22s ease-out; }
@keyframes appear { from{opacity:.3;transform:translateY(5px)}to{opacity:1;transform:translateY(0)} }
@keyframes wrong-shake { 0%,100%{transform:translateX(0)}25%{transform:translateX(-2px)}75%{transform:translateX(2px)} }
@keyframes celebrate { 0%{transform:translate(0,20px) scale(.5);opacity:1}70%{opacity:1}100%{transform:translate(var(--dx),var(--dy)) rotate(80deg) scale(.6);opacity:0} }
@media(min-width:1500px) { .app-shell{margin-right:auto;padding:0 64px}main,footer{max-width:1200px}.training-layout{grid-template-columns:minmax(0,1fr) 340px;gap:30px}.task-card{padding:29px}.task-card h2{font-size:29px}.daily-challenge{padding:27px;min-height:230px}.challenge-art{width:166px}.header{max-width:1200px;margin:auto}.board-card{padding:0 21px}.page-heading{margin:42px 0 30px} }
@media(max-width:1190px) { .app-shell{padding:0 30px}.navigation-rail{width:90px}.app-shell{margin-left:90px}.training-layout{grid-template-columns:minmax(0,1fr) 285px;gap:20px}.header-title{font-size:8px;letter-spacing:1.4px}.player-bar{gap:16px}.task-card{padding:21px 20px 16px}.task-card h2{font-size:24px}.daily-challenge{padding:21px;min-height:210px}.challenge-art{width:135px;right:-23px}.daily-challenge-copy>p:not(.eyebrow){max-width:145px}.practice-summary{gap:20px;padding:18px}.practice-summary-title{min-width:165px}.daily-metrics{gap:20px}.practice-summary .outline-button{font-size:9px;padding:10px}.run-bar{gap:18px}.run-progress>span{width:26px}.toast{left:calc(50% + 45px)} }
@media(max-width:1000px) { .app-shell{padding:0 23px}.training-layout{grid-template-columns:minmax(0,1fr) 252px;gap:17px}.header{min-height:78px}.header-title{font-size:7px;letter-spacing:1px}.player-bar{gap:12px}.rank-badge strong{font-size:10px}.rank-glyph{width:26px;height:31px;font-size:18px}.header-metric{font-size:11px}.page-heading{margin:28px 0 23px}h1{font-size:33px}.eyebrow{font-size:8px;letter-spacing:1.25px}.task-card{padding:19px 17px 15px}.task-card h2{font-size:22px}.task-card>p{font-size:10px}.card-eyebrow{font-size:7px;letter-spacing:1px}.feedback{font-size:10px;padding:10px;gap:7px}.help-actions button{font-size:9px}.primary{font-size:11px;padding:12px 13px}.daily-challenge{padding:19px;min-height:200px}.daily-challenge h2{font-size:24px}.daily-challenge .eyebrow{font-size:6px;letter-spacing:.7px}.challenge-art{width:125px;right:-27px;bottom:-5px}.board-card{padding:0 11px}.board-heading{min-height:49px;padding-left:17px}.board-footer{padding-left:18px;font-size:9px}.board-surround{grid-template-columns:12px minmax(0,1fr);column-gap:6px}.puzzle-meta{font-size:8px;gap:6px}.turn-line{font-size:10px}.run-bar{padding:14px 16px}.run-score{padding-left:14px}.run-heading{gap:9px}.run-heading h2{font-size:12px}.run-heading p{font-size:9px}.run-icon{width:30px;height:30px}.run-progress-wrap{gap:9px}.run-progress{gap:4px}.run-progress>span{width:22px}.practice-summary{flex-wrap:wrap;gap:15px 24px}.practice-summary-title{flex:1}.daily-metrics{gap:30px}.practice-summary .review-link{margin-left:auto}.practice-summary .outline-button{display:none}.board-caption{font-size:8px}.theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.stat-cards{gap:12px}.stat-card{padding:18px}.stat-card strong{font-size:31px}.stats-layout{gap:15px}.stats-panel{padding:20px}.recent-item{font-size:10px;gap:8px}.result-label{font-size:7px;padding:5px}.theme-stat-head{font-size:10px}.theme-stat-head>span:last-child{font-size:8px} }
@media(max-width:790px) { .navigation-rail{width:77px;padding:24px 8px}.brand-mark{width:37px;height:37px}.brand-word{font-size:16px}.navigation-rail nav{margin-top:48px}.nav-button{font-size:9px;padding:13px 2px}.nav-button.active:before{left:-8px}.rail-bottom{font-size:8px}.app-shell{margin-left:77px;padding:0 20px}.header-title{display:none}.header{justify-content:flex-end;min-height:70px}.player-bar{width:100%;justify-content:flex-end;gap:17px}.rank-badge{margin-right:auto}.training-layout{grid-template-columns:minmax(0,1fr);gap:18px}.board-card{padding:0 17px}.board-heading{min-height:51px;padding-left:20px}.board-surround{grid-template-columns:14px minmax(0,1fr)}.turn-line{font-size:12px}.puzzle-meta{font-size:9px}.board-footer{font-size:10px;min-height:43px;padding-left:21px}.board-caption{display:none}.training-sidebar{grid-template-columns:minmax(0,1fr) 220px;gap:15px}.task-card{padding:22px}.task-card h2{font-size:25px}.task-card>p{font-size:11px}.feedback{font-size:11px}.help-actions button{font-size:10px}.primary{font-size:12px;padding:13px 15px}.daily-challenge{padding:22px 20px;min-height:100%}.daily-challenge h2{font-size:26px}.daily-challenge-copy>p:not(.eyebrow){font-size:10px;max-width:160px}.daily-challenge .eyebrow{font-size:6px}.challenge-art{width:138px;right:-10px;bottom:0;opacity:.85}.daily-challenge button{position:relative;z-index:1}.run-bar{gap:12px}.run-progress>span{width:23px}.run-score{font-size:10px}.practice-summary{margin-top:18px}.practice-summary .review-link{font-size:10px}.stats-layout{grid-template-columns:1fr}.toast{left:calc(50% + 38px)} }
@media(max-width:620px) { .navigation-rail{position:fixed;top:auto;inset:auto 0 0;width:100%;height:calc(62px + env(safe-area-inset-bottom));padding:0 12px env(safe-area-inset-bottom);border-radius:19px 19px 0 0;box-shadow:0 -5px 25px #13231c16;background:#192c23f5;backdrop-filter:blur(12px)}.navigation-rail .brand,.rail-bottom{display:none}.navigation-rail nav{flex-direction:row;justify-content:space-around;gap:8px;margin:0;height:62px;max-width:430px}.nav-button{flex:1;border-radius:0;background:transparent!important;font-size:9px;padding:10px 8px 8px;gap:4px;color:#8a9d8d}.nav-button svg{width:21px;height:21px}.nav-button.active{color:#e4edbf}.nav-button.active:before{width:23px;height:3px;top:0;left:calc(50% - 11px);border-radius:0 0 3px 3px;background:#cddda0}.app-shell{margin-left:0;padding:0 17px 75px}.header{min-height:62px}.player-bar{gap:17px}.rank-badge strong{font-size:11px}.rank-glyph{width:28px;height:30px}.level-track{width:70px}.header-metric{font-size:12px}.header-metric small{font-size:8px}.sound-button{width:28px;height:28px}.page-heading{margin:23px 0 18px;gap:12px}.game-heading .eyebrow{font-size:6px;letter-spacing:1.2px;margin-bottom:8px}.game-heading .eyebrow>span{display:none}h1{font-size:30px;letter-spacing:-1.25px}.wardrobe-trigger{padding:7px 8px;font-size:9px;border-radius:9px;gap:7px}.mini-board{width:22px;height:22px;background-size:11px 11px}.button-arrow{display:none}.run-bar{margin-bottom:14px;padding:12px 13px;border-radius:11px;gap:12px}.run-heading{gap:9px}.run-icon{width:28px;height:28px;border-radius:8px;font-size:20px}.run-heading h2{font-size:11px}.run-heading p{font-size:8px;max-width:130px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.run-progress-wrap{gap:0;flex-direction:column-reverse;align-items:flex-end}.run-progress>span{width:18px;height:6px}.run-progress{gap:4px}#run-position{font-size:8px;margin-top:5px}.run-score{display:none}.training-layout{gap:14px}.board-card{padding:0 9px;border-radius:12px}.board-heading{min-height:45px;padding-left:16px}.board-surround{grid-template-columns:11px minmax(0,1fr);column-gap:5px;grid-template-rows:minmax(0,1fr) 18px}.rank-labels,.file-labels{font-size:8px}.turn-line{font-size:10px;gap:6px}.turn-dot{width:10px;height:10px}.puzzle-meta{font-size:8px;gap:7px}.board-footer{min-height:36px;font-size:9px;padding:0 0 6px 16px}.board-footer .icon-button{width:27px;height:27px;font-size:21px;border-radius:7px}.board{border-radius:4px}.training-sidebar{display:flex;flex-direction:column;gap:14px}.task-card{padding:20px;border-radius:13px}.card-eyebrow{font-size:7px;margin-bottom:10px}.task-card h2{font-size:25px;margin-bottom:10px}.task-card>p{font-size:11px;margin-bottom:13px;line-height:1.7}.feedback{min-height:48px;padding:11px 12px;font-size:11px}.help-actions{margin:16px 0}.help-actions button{font-size:11px}.task-card .under-button{font-size:8px}.primary{padding:14px 16px;font-size:12px}.daily-challenge{min-height:184px;padding:23px;border-radius:13px}.daily-challenge h2{font-size:28px}.daily-challenge .eyebrow{font-size:7px;letter-spacing:1px}.daily-challenge-copy>p:not(.eyebrow){max-width:180px}.daily-challenge button{font-size:11px;padding:10px 12px}.challenge-art{width:163px;right:1px;bottom:-2px;opacity:1}.practice-summary{margin-top:16px;gap:17px;display:grid;grid-template-columns:1fr auto;padding:19px}.practice-summary-title{min-width:0}.daily-metrics{gap:18px}.daily-metrics strong{font-size:23px}.daily-metrics span{font-size:7px}.practice-summary .review-link{margin:0;font-size:10px;grid-column:1/-1;border-top:1px solid var(--line);padding:13px 0 0}.quiet-note{margin-bottom:20px}.theme-grid{gap:12px}.theme-card{padding:18px;min-height:228px}.theme-card-icon{width:40px;height:40px;font-size:29px}.theme-card-count{font-size:8px}.theme-card-top{margin-bottom:17px}.theme-card h2{font-size:18px;line-height:1.2}.theme-card p{font-size:10px;line-height:1.7}.theme-card-bottom{font-size:9px}.page-heading>.outline-button{display:none}.intro{font-size:11px}.stat-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.stat-card{padding:20px}.stat-card strong{font-size:32px}.stat-card span{font-size:9px}.stats-panel{padding:22px}.stats-panel>h2{font-size:18px}.theme-stat-head{font-size:11px}.theme-stat-head>span:last-child{font-size:9px}.recent-item{font-size:11px}.result-label{font-size:8px}.stats-foot{display:block;margin-bottom:25px}.stats-foot .text-button{margin-top:12px}.stats-foot p{font-size:9px}footer{font-size:8px;gap:12px;padding:18px 0 12px}.footer-brand{font-size:15px}footer button{font-size:9px}.toast{left:50%;bottom:calc(77px + env(safe-area-inset-bottom));font-size:11px;width:max-content;max-width:calc(100% - 36px);padding:12px 17px}.run-dialog{padding:31px 25px 22px}.run-dialog h2{font-size:28px}.run-result-stars{font-size:23px}.result-emblem{width:78px;height:78px;font-size:47px;margin-bottom:19px}dialog{padding:29px 25px;max-height:calc(100dvh - 32px);border-radius:18px}dialog h2{font-size:25px}dialog p{font-size:11px}.promotion-options{gap:8px}.promotion-options button{width:56px;height:56px}.board-themes{gap:10px}.board-theme{padding:12px}.wardrobe-dialog h2{font-size:26px}.empty-state{padding:35px 20px}.empty-state p{font-size:12px}.storage-warning{font-size:11px;padding:12px 14px} }
@media(max-width:360px) { .app-shell{padding:0 12px 75px}.player-bar{gap:12px}.game-heading h1{font-size:27px}.game-heading .eyebrow{font-size:5.5px;letter-spacing:.8px}.wardrobe-trigger{font-size:8px;padding:7px;gap:5px}.mini-board{width:20px;height:20px;background-size:10px 10px}.run-icon{display:none}.run-progress>span{width:17px}.task-card{padding:18px}.theme-grid{grid-template-columns:1fr}.theme-card{min-height:0}.theme-card-top{margin-bottom:13px}.theme-card h2{font-size:21px}.theme-card p{font-size:12px}.theme-card-count{font-size:10px}.challenge-art{width:142px;right:-12px}.daily-challenge .eyebrow{font-size:6px}.daily-challenge h2{font-size:26px}.daily-challenge-copy>p:not(.eyebrow){max-width:158px}.practice-summary{gap:12px;padding:16px}.daily-metrics{gap:12px}.daily-metrics span{font-size:6px}footer>span:nth-child(2){font-size:7px}.promotion-options button{width:50px;height:50px}.run-result-stars{gap:3px;font-size:21px} }
@media(prefers-reduced-motion:reduce) { *,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.celebration{display:none!important} }

/* Readable game controls and viewport-aware desktop arena. */
.square:active:not(:disabled) { transform:none; }
.sound-button .sound-off { display:none; }
.sound-button.muted .sound-off { display:block; }
.sound-button.muted .sound-on { display:none; }
.task-card>p { font-size:12px; color:#717d64; }
.feedback { font-size:12px; }
.feedback.neutral { color:#647553; }
.help-actions button { font-size:12px; color:#758165; }
.task-card .under-button { font-size:10px; color:#7f8c70; }
.reward-button { font-size:11px; }
.daily-challenge-copy>p:not(.eyebrow) { font-size:10px; color:#bec8b5; }
.daily-challenge .eyebrow { color:#b9c6a9; }
.theme-card p { font-size:12px; color:#748066; }
.theme-card-count { color:#7d8c6b; }
.card-eyebrow { color:#7e8b66; }
.puzzle-meta { color:#7c896e; }
.board-footer { color:#75856a; }
.practice-summary-title>p,.quiet-note { color:#7f8c70; }
.daily-metrics span { font-size:9px; color:#7d8a6b; }
.run-heading p { color:#7f8c73; }
.primary { min-height:47px; }
.theme-swatch { display:grid; grid-template-columns:repeat(4,1fr); aspect-ratio:2; width:100%; border-radius:6px; overflow:hidden; --swatch-light:#e8eddf; --swatch-dark:#839f8b; }
.theme-swatch i { background:var(--swatch-light); }
.theme-swatch i:nth-child(8n+2),.theme-swatch i:nth-child(8n+4),.theme-swatch i:nth-child(8n+5),.theme-swatch i:nth-child(8n+7) { background:var(--swatch-dark); }
.swatch-sand { --swatch-light:#f3e5cd; --swatch-dark:#bd9471; }
.swatch-midnight { --swatch-light:#c3cedb; --swatch-dark:#65778e; }
[data-board-theme="sage"] { --board-light:#e8eddf; --board-dark:#839f8b; }
[data-board-theme="sand"] { --board-light:#f3e5cd; --board-dark:#bd9471; }
[data-board-theme="midnight"] { --board-light:#c3cedb; --board-dark:#65778e; }
@media(min-width:1001px) {
  #train-view { max-width:min(100%,max(810px,calc(100dvh - 10px))); margin-inline:auto; }
  .header { min-height:76px; }
  .game-heading { margin:26px 0 22px; }
  .game-heading h1 { font-size:36px; }
  .run-bar { padding-block:14px; margin-bottom:18px; }
  .board-heading { min-height:45px; }
  .board-footer { min-height:35px; }
  .board-caption { font-size:9px; }
}
@media(max-width:1000px) {
  .task-card>p { font-size:12px; }
  .feedback { font-size:12px; }
  .help-actions { flex-wrap:wrap; row-gap:12px; }
  .help-actions button { font-size:12px; }
  .task-card .under-button { font-size:9px; }
}
@media(max-width:620px) {
  .task-card>p { font-size:12px; }
  .feedback { font-size:12px; }
  .help-actions button { min-height:28px; }
  .daily-metrics span { font-size:8px; }
  .practice-summary-title>p { font-size:9px; }
  .quiet-note { font-size:9px; }
  .theme-card p { font-size:12px; }
}

/* VK native clients may report safe areas through Bridge instead of CSS env. */
html[data-vk-viewport] {
  --vk-safe-top:max(env(safe-area-inset-top,0px),var(--vk-inset-top,0px));
  --vk-safe-right:max(env(safe-area-inset-right,0px),var(--vk-inset-right,0px));
  --vk-safe-bottom:max(env(safe-area-inset-bottom,0px),var(--vk-inset-bottom,0px));
  --vk-safe-left:max(env(safe-area-inset-left,0px),var(--vk-inset-left,0px));
}
html[data-vk-viewport] body { padding:var(--vk-safe-top) var(--vk-safe-right) 0 var(--vk-safe-left); }
html[data-vk-viewport] .navigation-rail { top:var(--vk-safe-top); bottom:var(--vk-safe-bottom); left:var(--vk-safe-left); }
html[data-vk-viewport] dialog {
  inset-block-start:var(--vk-safe-top); inset-block-end:var(--vk-safe-bottom);
  max-height:calc(100dvh - 40px - var(--vk-safe-top) - var(--vk-safe-bottom));
  max-width:min(520px,calc(100% - 30px - var(--vk-safe-left) - var(--vk-safe-right)));
}
@media(max-width:620px) {
  html[data-vk-viewport] .navigation-rail {
    top:auto; bottom:0; left:0;
    height:calc(62px + var(--vk-safe-bottom));
    padding:0 calc(12px + var(--vk-safe-right)) var(--vk-safe-bottom) calc(12px + var(--vk-safe-left));
  }
  html[data-vk-viewport] .app-shell { padding-bottom:calc(75px + var(--vk-safe-bottom)); }
  html[data-vk-viewport] .toast { bottom:calc(77px + var(--vk-safe-bottom)); }
}
