:root{--bg:#f7f6f2;--surface:#fff;--surface-2:#efeee9;--text:#15181d;--muted:#5d6571;--line:#15181d;--cell:#fff;--block:#15181d;--word:#cde4fa;--word-text:#15181d;--cur:#ffd94a;--cur-text:#15181d;--pencil:#8a919b;--cur-pencil:#6b6450;--wrong:#d1301a;--reveal:#1f6fd1;--accent:#073e56;--accent-text:#fff;--btn:#e9e8e2;--btn-active:#dcdbd4;--key:#1f2937;--key-active:#111827;--key-text:#fff;--sheet-shadow:0 -8px 30px #15181d2e;--pop-shadow:0 10px 30px #15181d2e, 0 1px 3px #15181d1f;--scrim:#15181d61;--toast-bg:#15181d;--toast-text:#f4f0e7;--danger:#b3261e;--danger-soft:#fbe4e1;--focus:#1f6fd1;--done:#1b7a46}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#0e1013;--surface:#181b20;--surface-2:#1f232a;--text:#f4f0e7;--muted:#a2a9b3;--line:#050607;--cell:#262a31;--block:#050607;--word:#294868;--word-text:#f4f0e7;--cur:#e6b93c;--cur-text:#15181d;--pencil:#8f98a5;--cur-pencil:#5a4a1c;--wrong:#ff6b4f;--reveal:#6eaaff;--accent:#e3dec4;--accent-text:#0e1013;--btn:#23272e;--btn-active:#2e333b;--key:#6b7280;--key-active:#4b5563;--key-text:#fff;--sheet-shadow:0 -8px 30px #00000080;--pop-shadow:0 10px 30px #0000008c, 0 0 0 1px #f4f0e714;--scrim:#0009;--toast-bg:#f4f0e7;--toast-text:#15181d;--danger:#ff8a75;--danger-soft:#3a1d19;--focus:#8cbcff;--done:#6fd39a}}:root[data-theme=dark]{--bg:#0e1013;--surface:#181b20;--surface-2:#1f232a;--text:#f4f0e7;--muted:#a2a9b3;--line:#050607;--cell:#262a31;--block:#050607;--word:#294868;--word-text:#f4f0e7;--cur:#e6b93c;--cur-text:#15181d;--pencil:#8f98a5;--cur-pencil:#5a4a1c;--wrong:#ff6b4f;--reveal:#6eaaff;--accent:#e3dec4;--accent-text:#0e1013;--btn:#23272e;--btn-active:#2e333b;--key:#6b7280;--key-active:#4b5563;--key-text:#fff;--sheet-shadow:0 -8px 30px #00000080;--pop-shadow:0 10px 30px #0000008c, 0 0 0 1px #f4f0e714;--scrim:#0009;--toast-bg:#f4f0e7;--toast-text:#15181d;--danger:#ff8a75;--danger-soft:#3a1d19;--focus:#8cbcff;--done:#6fd39a}*{box-sizing:border-box;margin:0;padding:0}html,body{background:var(--bg);height:100%;color:var(--text);-webkit-text-size-adjust:100%;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}body{overscroll-behavior:none;touch-action:manipulation;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;position:fixed;inset:0;overflow:hidden}button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;background:0 0;border:0}button:disabled,button[aria-disabled=true]{cursor:default;opacity:.4}:focus{outline:none}:focus-visible{outline:2px solid var(--focus);outline-offset:2px}[hidden]{display:none!important}.sr-only{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}svg.icon{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;flex:none;width:22px;height:22px}:root{--outline:#374151;--serif:ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;--lit:#1a7f4b;--lit-text:#fff;--tap:#c6ead4;--tap-text:#15181d;--miss:#9f2a1e;--miss-text:#f4f0e7;--check:#10b981;--check-mark:#04301f;--dot-empty:#d1d5db;--tile-edge:#15181d}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--outline:#fff;--lit:#3fb871;--lit-text:#0e1013;--tap:#24503a;--tap-text:#f4f0e7;--miss:#e2735f;--miss-text:#0e1013;--dot-empty:#374151;--tile-edge:#3a3f47}}:root[data-theme=dark]{--outline:#fff;--lit:#3fb871;--lit-text:#0e1013;--tap:#24503a;--tap-text:#f4f0e7;--miss:#e2735f;--miss-text:#0e1013;--dot-empty:#374151;--tile-edge:#3a3f47}.app{width:100%;height:var(--vh,100%);padding-top:var(--st,0px);padding-bottom:var(--sb,0px);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);flex-direction:column;display:flex;position:fixed;top:0;left:0}.topbar{width:100%;max-width:440px;height:44px;padding:0 var(--m);flex:none;align-items:center;gap:6px;margin:0 auto;display:flex}.brand{font-family:var(--serif);letter-spacing:-.01em;font-size:23px;font-weight:700}.brand-date{color:var(--muted);margin-left:4px;font-size:15px;font-weight:500}.spacer{flex:1}.score-pill{background:var(--btn);font-variant-numeric:tabular-nums;border-radius:999px;align-items:center;height:30px;padding:0 12px;font-size:15px;font-weight:700;display:flex}.attempts{align-items:center;gap:7px;margin-right:6px;display:flex}.check-dot{border:1.5px solid var(--dot-empty);border-radius:50%;flex:none;justify-content:center;align-items:center;width:22px;height:22px;display:inline-flex}.check-dot.done{background:var(--check);border-color:var(--check)}.check-dot.current{box-shadow:0 0 0 2px var(--bg), 0 0 0 4px var(--check)}.check-dot svg{width:64.6%;height:64.6%;stroke:var(--check-mark)}.check-dot.pop{animation:.7s cubic-bezier(.34,1.56,.64,1) backwards dot-pop}.check-dot.pop path{stroke-dasharray:11;stroke-dashoffset:11px;animation:.5s ease-out .35s forwards check-draw}@keyframes dot-pop{0%{transform:scale(.4)}60%{transform:scale(1.15)}to{transform:scale(1)}}@keyframes check-draw{to{stroke-dashoffset:0}}.main{min-height:0;padding:0 var(--m) 8px;flex-direction:column;flex:1;justify-content:center;align-items:center;display:flex}.status{width:var(--bw);text-align:center;flex-direction:column;justify-content:flex-end;min-height:84px;padding-bottom:10px;display:flex}.status-title{font-family:var(--serif);letter-spacing:-.005em;font-size:26px;font-weight:600}.status-sub{color:var(--muted);font-size:15px;line-height:1.3}.status-line{justify-content:center;align-items:center;gap:12px;min-height:32px;margin-top:4px;display:flex}.btn-replay{border:1.5px solid var(--outline);height:32px;color:var(--text);border-radius:999px;padding:0 14px;font-size:14px;font-weight:600;animation:.3s fresh}.btn-replay:active{background:var(--btn)}.board{width:var(--bw);grid-auto-rows:var(--cs);gap:var(--gap,8px);touch-action:manipulation;flex:none;display:grid}.cell{background:var(--cell);color:var(--text);border:1.5px solid var(--tile-edge);cursor:default;border-radius:7px;justify-content:center;align-items:center;transition:background-color .12s,color .12s;display:flex;position:relative;overflow:hidden}.board.live .cell{cursor:pointer}.sym{font-size:calc(var(--cs) * .715);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,Noto Sans Devanagari,Noto Sans Gurmukhi,Noto Sans Thai,PingFang SC,Hiragino Sans,Apple SD Gothic Neo,Microsoft YaHei,Nirmala UI,Leelawadee UI,Noto Sans Egyptian Hieroglyphs,Segoe UI Historic,sans-serif;font-weight:600;line-height:1}.cell.lit{background:var(--lit);border-color:var(--lit);color:var(--lit-text);transition:none}.cell.tap{background:var(--tap);border-color:var(--tap);color:var(--tap-text);transition:none}.cell.miss{background:var(--miss);border-color:var(--miss);color:var(--miss-text)}.cell.pulse{animation:.9s ease-in-out infinite alternate pulse}@keyframes pulse{0%{box-shadow:0 0 0 0 var(--lit)}to{box-shadow:0 0 0 4px var(--lit)}}.foot{width:var(--bw);height:var(--fh,120px);flex-direction:column;flex:none;align-items:center;gap:10px;padding-top:12px;display:flex}.foot>*{flex:none}.foot-actions{gap:10px;width:100%;display:flex}.foot-actions>*{flex:1;padding:0 12px}.entry{scrollbar-width:none;flex-wrap:wrap;flex:0 auto;justify-content:center;gap:5px;width:100%;min-height:0;display:flex;position:relative;overflow-y:auto}.entry::-webkit-scrollbar{display:none}.foot.ended .entry{max-height:min(48.96px, calc((var(--bw) - 45px) / 10 * 1.44))}.slot{width:calc((var(--bw) - 45px) / 10 * 1.2);aspect-ratio:5/6;background:var(--surface-2);border-radius:6px;flex:none;justify-content:center;align-items:center;max-width:40.8px;display:flex}.slot .sym{font-size:min(25.2px, calc((var(--bw) - 45px) / 10 * 1.2 * .62))}.slot.filled{background:var(--tap);color:var(--tap-text);animation:.18s slot-in}.slot.miss{background:var(--miss);color:var(--miss-text);animation:.4s shake}.slot.miss .sym{text-decoration:line-through;text-decoration-thickness:2.5px}.slot.answer{color:var(--lit);box-shadow:inset 0 0 0 2.5px var(--lit);background:0 0;animation:.3s .25s backwards slot-in}@keyframes shake{0%,to{transform:none}25%{transform:translate(-4px)}75%{transform:translate(4px)}}@keyframes slot-in{0%{opacity:0}to{opacity:1}}.btn-primary{background:var(--accent);min-height:48px;color:var(--accent-text);border-radius:999px;padding:0 28px;font-size:17px;font-weight:700}.foot .btn-primary{width:100%}.btn-outline{width:100%;min-height:48px;color:var(--text);border:2px solid var(--outline);white-space:nowrap;background:0 0;border-radius:8px;padding:0 20px;font-size:16px;font-weight:600}.level-meter{flex-direction:column;align-items:center;gap:5px;width:100%;display:flex}.ladder{align-items:flex-end;gap:3px;width:100%;height:24px;display:flex}.rung{background:var(--btn-active);border-radius:2px;flex:1;align-items:flex-end;display:flex;position:relative;overflow:hidden}.rung>span{background:var(--check);width:100%;transition:height .4s}.rung.current{box-shadow:inset 0 0 0 1.5px var(--check)}.level-caption{color:var(--muted);font-variant-numeric:tabular-nums;font-size:13px}.level-caption b{color:var(--text);font-weight:600}.modal{z-index:50;padding:calc(var(--st,0px) + 12px) 12px calc(var(--sb,0px) + 12px);background:var(--scrim);justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.card{background:var(--surface);width:100%;max-width:420px;max-height:100%;box-shadow:var(--pop-shadow);text-align:center;border-radius:20px;padding:22px 20px 18px;animation:.28s cubic-bezier(.2,.8,.2,1) rise;overflow-y:auto}@keyframes rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}.card-kicker{letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-size:13px;font-weight:700}.big-score{font-family:var(--serif);letter-spacing:-.02em;font-variant-numeric:tabular-nums;margin:8px 0 6px;font-size:76px;font-weight:600;line-height:1}.card-line{font-size:17px;font-weight:500}.card-note{color:var(--muted);margin-top:6px;font-size:14px}.card-attempts{justify-content:center;gap:22px;margin-top:16px;display:flex}.card-attempts div{flex-direction:column;align-items:center;gap:4px;display:flex}.card-attempts b{font-family:var(--serif);font-variant-numeric:tabular-nums;color:var(--muted);font-size:22px;font-weight:600;line-height:1.1}.card-attempts .best b{color:var(--text)}.card-attempts span:not(.check-dot){color:var(--muted);font-size:12px}.card-level{background:var(--surface-2);border-radius:12px;margin-top:16px;padding:12px 12px 10px}.card-level-head{margin-bottom:10px;font-size:15px;font-weight:600}.card-level .rung{background:var(--surface)}.stats{grid-template-columns:repeat(3,1fr);gap:8px;margin-top:18px;display:grid}.stats div{background:var(--surface-2);border-radius:12px;flex-direction:column;gap:2px;padding:10px 4px;display:flex}.stats b{font-variant-numeric:tabular-nums;font-size:22px}.stats span{color:var(--muted);font-size:13px}.next{color:var(--muted);margin-top:16px;font-size:15px}.next b{color:var(--text);font-variant-numeric:tabular-nums}.card .btn-primary{width:100%;margin-top:16px}.card .card-secondary{margin-top:10px}.iconbtn{width:44px;height:44px;color:var(--text);border-radius:10px;justify-content:center;align-items:center;margin-right:-10px;display:flex}.iconbtn:active{background:var(--btn)}.menu-wrap{position:relative}.menu{z-index:30;background:var(--surface);width:248px;box-shadow:var(--pop-shadow);max-height:calc(var(--vh,100dvh) - var(--st,0px) - var(--sb,0px) - 56px);overscroll-behavior:contain;border-radius:14px;flex-direction:column;gap:10px;padding:14px 14px 16px;animation:.18s rise;display:flex;position:absolute;top:46px;right:-6px;overflow-y:auto}.menu>*{flex-shrink:0}.games{flex-direction:column;gap:4px;display:flex}.games ul{margin:0 -8px;list-style:none}.game-link{min-height:44px;color:var(--text);border-radius:10px;flex-direction:column;justify-content:center;padding:5px 8px;text-decoration:none;display:flex}.game-link:active{background:var(--btn)}@media (hover:hover){.game-link:hover{background:var(--btn)}}.game-name{font-size:15px;font-weight:500;line-height:1.25}.game-tag{color:var(--muted);font-size:13px;line-height:1.25}.menu-divider{border:0;border-top:1px solid var(--btn-active);flex:none}.menu-label{color:var(--muted);letter-spacing:.02em;font-size:13px;font-weight:500}.seg{background:var(--btn);border:1.5px solid var(--btn-active);border-radius:100px;grid-template-columns:1fr 1fr 1fr;padding:3px;display:grid;position:relative}.seg-thumb{background:#fff;border-radius:100px;width:calc(33.3333% - 2px);height:calc(100% - 6px);transition:left .25s cubic-bezier(.4,0,.2,1);position:absolute;top:3px;box-shadow:0 1px 4px #00000026}.seg button{z-index:1;color:var(--muted);border-radius:100px;padding:7px 0;font-size:13px;font-weight:450;transition:color .2s;position:relative}.seg button[aria-checked=true]{color:#111827;font-weight:600}.toast{left:50%;top:calc(var(--st,0px) + 54px);z-index:60;background:var(--toast-bg);width:max-content;max-width:min(360px,100% - 32px);color:var(--toast-text);font-family:var(--serif);text-align:center;box-shadow:var(--pop-shadow);pointer-events:none;border-radius:14px;padding:11px 18px;font-size:17px;font-weight:500;line-height:1.35;animation:2s forwards toast;position:fixed;transform:translate(-50%,-6px)}@keyframes toast{0%{opacity:0;transform:translate(-50%,-6px)}10%,85%{opacity:1;transform:translate(-50%)}to{opacity:0;transform:translate(-50%)}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition:none!important;animation:none!important}.check-dot.pop path{stroke-dashoffset:0}}@keyframes fresh{0%{opacity:0}to{opacity:1}}
