.board-wrap{aspect-ratio:1;width:100%;box-shadow:var(--shadow);border-radius:6px;transition:box-shadow .4s ease-out;position:relative}.board-wrap.glow-success{box-shadow:0 0 0 4px color-mix(in srgb, var(--success) 55%, transparent), 0 0 32px color-mix(in srgb, var(--success) 45%, transparent)}.board-wrap.glow-error{box-shadow:0 0 0 3px color-mix(in srgb, var(--error) 35%, transparent)}.board{touch-action:none;-webkit-user-select:none;user-select:none;border-radius:6px;width:100%;height:100%;display:block}.board .sq.light{fill:var(--sq-light)}.board .sq.dark{fill:var(--sq-dark)}.board .sq.last{fill:var(--accent-soft)}.board .sq.selected{fill:color-mix(in srgb, var(--accent) 45%, transparent)}.board .coord{font:600 18px var(--font);fill:color-mix(in srgb, var(--sq-light) 70%, transparent);pointer-events:none}.board .piece{transition:none}.board.interactive .piece.movable{cursor:grab}.board .piece.dragging{cursor:grabbing}.board .piece.dragging .piece-body{transform:scale(1.08)}.board .piece-body{transform-box:fill-box;transform-origin:50%;transition:transform .12s cubic-bezier(.25,.8,.25,1)}.board .piece.dragging{will-change:transform}.board .piece-body.dying{animation:.18s ease-in forwards capture-out}.board .piece.dragging{filter:drop-shadow(0 6px 6px #00000040)}@keyframes capture-out{to{opacity:0;transform:scale(.55)}}.board .piece-shadow{fill:#00000040}.board .pw{stroke:var(--piece-white-edge);stroke-width:2.5px}.board .pb{stroke:var(--piece-black-edge);stroke-width:2.5px}.board .ring-w{stroke:#0000001a;stroke-width:3px}.board .ring-b{stroke:#ffffff17;stroke-width:3px}.board .crown-w{fill:#b38b2e;stroke:#8c6a1f;stroke-width:2px;stroke-linejoin:round}.board .crown-b{fill:#e3c46e;stroke:#b8973e;stroke-width:2px;stroke-linejoin:round}.board .target{fill:color-mix(in srgb, var(--accent) 22%, transparent);stroke:color-mix(in srgb, var(--accent) 45%, transparent);stroke-width:2px;pointer-events:none;transition:fill 90ms,stroke 90ms}.board .target.dest{fill:color-mix(in srgb, var(--accent) 28%, transparent);stroke:color-mix(in srgb, var(--accent) 80%, transparent);stroke-width:5px}.board .target.hover{fill:color-mix(in srgb, var(--accent) 45%, transparent);stroke:var(--accent)}.board .hint{fill:none;stroke:var(--accent);stroke-width:5px;opacity:.85;pointer-events:none;animation:.7s ease-out forwards hint}@keyframes hint{0%{opacity:1}to{opacity:0}}.board .route{fill:none;stroke:var(--accent);stroke-width:7px;stroke-linecap:round;stroke-linejoin:round;opacity:.7;pointer-events:none}.board .route.alt{stroke:var(--piece-white-edge,#8a7f6c);stroke-dasharray:18 12}.board .outline{fill:none;stroke:var(--accent);stroke-width:5px;pointer-events:none;animation:1.1s ease-in-out infinite outline-pulse}@keyframes outline-pulse{0%,to{opacity:.35}50%{opacity:.95}}.board .piece-body.faded{opacity:.35;transition:opacity .12s}.board .piece.shake-0 .piece-body{animation:.2s shake-a}.board .piece.shake-1 .piece-body{animation:.2s shake-b}@keyframes shake-a{25%{translate:-2px}75%{translate:2px}}@keyframes shake-b{25%{translate:2px}75%{translate:-2px}}.board-outer{flex-direction:column;gap:6px;display:flex}.board-wrap:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.board-wrap .typed{background:var(--surface);color:var(--text);box-shadow:var(--shadow);border-radius:6px;padding:2px 8px;font-weight:600;position:absolute;top:8px;right:8px}.board-hint{text-align:center;min-height:1.5em;color:var(--muted)}.board .arrow{fill:none;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}@media (prefers-reduced-motion:reduce){.board .outline{opacity:.8;animation:none}.board .piece-body.dying{animation:80ms linear forwards capture-fade}@keyframes capture-fade{to{opacity:0}}}:root{--bg:#f7f5f0;--surface:#fff;--surface-2:#f0ede6;--text:#1c1e21;--muted:#6b6f76;--accent:#2f6b4f;--accent-ink:#fff;--accent-soft:#2f6b4f59;--success:#3a9d5d;--error:#c2453d;--sq-light:#efe3cf;--sq-dark:#7a5a3a;--line:#1c1e2114;--shadow:0 1px 2px #1c1e210f, 0 8px 24px #1c1e2114;--radius-card:12px;--radius-btn:8px;--piece-white:#f6f2ea;--piece-white-edge:#c9c1b2;--piece-black:#2b2623;--piece-black-edge:#0f0d0c;--series-1:#2a78d6;--series-2:#eb6834;--seq-0:#ece9e2;--seq-1:#b7d3f6;--seq-2:#6da7ec;--seq-3:#2a78d6;--seq-4:#184f95;--font:"Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--font-display:"InterDisplay", "Inter", system-ui, sans-serif;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#15171a;--surface:#1e2125;--surface-2:#262a2f;--text:#e8e6e1;--muted:#9a9ea5;--accent:#58b08a;--accent-ink:#0d1a14;--accent-soft:#58b08a59;--success:#5cc27f;--error:#e0645b;--sq-light:#c9b99c;--sq-dark:#5e4630;--line:#e8e6e114;--shadow:0 1px 2px #0000004d, 0 8px 24px #00000059;--series-1:#3987e5;--series-2:#d95926;--seq-0:#262a2f;--seq-1:#104281;--seq-2:#1c5cab;--seq-3:#3987e5;--seq-4:#86b6ef;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}:root[data-theme=dark]{--bg:#15171a;--surface:#1e2125;--surface-2:#262a2f;--text:#e8e6e1;--muted:#9a9ea5;--accent:#58b08a;--accent-ink:#0d1a14;--accent-soft:#58b08a59;--success:#5cc27f;--error:#e0645b;--sq-light:#c9b99c;--sq-dark:#5e4630;--line:#e8e6e114;--shadow:0 1px 2px #0000004d, 0 8px 24px #00000059;--series-1:#3987e5;--series-2:#d95926;--seq-0:#262a2f;--seq-1:#104281;--seq-2:#1c5cab;--seq-3:#3987e5;--seq-4:#86b6ef;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}:root[data-board=green]{--sq-light:#e6e9d8;--sq-dark:#5f7a55}:root[data-board=blue]{--sq-light:#dfe6ee;--sq-dark:#4f6a86}*{box-sizing:border-box}html,body,#root{height:100%}body{background:var(--bg);color:var(--text);font-family:var(--font);font-feature-settings:"cv11", "ss01";-webkit-font-smoothing:antialiased;margin:0;line-height:1.45}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3{letter-spacing:-.01em;margin:0 0 .5em;line-height:1.2}h1{font-size:1.6rem}h2{font-size:1.15rem}.num{font-variant-numeric:tabular-nums}.display{font-family:var(--font-display);font-variant-numeric:tabular-nums;letter-spacing:-.02em;font-weight:600}.muted{color:var(--muted)}.small{font-size:.85rem}.err{color:var(--error)}.ok{color:var(--success)}.app{flex-direction:column;min-height:100%;display:flex}.topbar{background:var(--surface);box-shadow:0 1px 0 var(--line);z-index:20;align-items:center;gap:4px;padding:10px 20px;display:flex;position:sticky;top:0}.brand{color:var(--text);align-items:center;gap:8px;margin-right:18px;font-size:1.05rem;font-weight:700;display:flex}.brand:hover{text-decoration:none}.nav a{color:var(--muted);border-radius:var(--radius-btn);padding:6px 10px;font-weight:500}.nav a.active,.nav a:hover{color:var(--text);background:var(--surface-2);text-decoration:none}.spacer{flex:1}.page{width:100%;max-width:1080px;margin:0 auto;padding:24px 20px 64px}.page.narrow{max-width:440px}.grid{gap:16px;display:grid}.cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.row{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.stack{flex-direction:column;gap:10px;display:flex}.card{background:var(--surface);border-radius:var(--radius-card);box-shadow:var(--shadow);padding:18px}.card h2{color:var(--muted);font-size:.95rem;font-weight:600}.tile .big{font-size:2rem}.pill{background:var(--surface-2);color:var(--muted);border-radius:999px;padding:2px 8px;font-size:.8rem;display:inline-block}.pill.ok{background:color-mix(in srgb, var(--success) 15%, transparent);color:var(--success)}.pill.err{background:color-mix(in srgb, var(--error) 15%, transparent);color:var(--error)}button,.btn{font:inherit;cursor:pointer;border-radius:var(--radius-btn);background:var(--surface-2);color:var(--text);border:0;align-items:center;gap:6px;padding:9px 14px;font-weight:600;transition:background .12s,transform 80ms;display:inline-flex}button:hover,.btn:hover{background:color-mix(in srgb, var(--surface-2) 70%, var(--text) 8%);text-decoration:none}button:active{transform:translateY(1px)}button:disabled{opacity:.5;cursor:default}button.primary,.btn.primary{background:var(--accent);color:var(--accent-ink)}button.primary:hover,.btn.primary:hover{background:color-mix(in srgb, var(--accent) 88%, black)}button.ghost{background:0 0}button.ghost:hover{background:var(--surface-2)}button.big{padding:13px 22px;font-size:1.05rem}kbd{font:600 .75rem var(--font);background:var(--surface-2);color:var(--muted);border-radius:4px;padding:1px 5px}input,select,textarea{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-btn);width:100%;padding:9px 11px}input:focus,select:focus,textarea:focus,button:focus-visible{outline:2px solid var(--accent-soft);outline-offset:1px}label{flex-direction:column;gap:4px;font-size:.9rem;font-weight:500;display:flex}label.check{flex-direction:row;align-items:center;gap:8px}label.check input{width:auto}table{border-collapse:collapse;width:100%}th,td{text-align:left;border-bottom:1px solid var(--line);padding:8px 6px}th{color:var(--muted);font-size:.8rem;font-weight:600}.tabs{flex-wrap:wrap;gap:4px;margin-bottom:14px;display:flex}.tabs button{color:var(--muted);background:0 0}.tabs button.on{background:var(--surface);color:var(--text);box-shadow:var(--shadow)}.train{flex-direction:column;align-items:center;gap:12px;padding:16px 16px 40px;display:flex}.train-col{flex-direction:column;gap:10px;width:min(640px,100%,100vh - 210px);min-width:min(320px,100%);display:flex}.toolbar{align-items:center;gap:8px;min-height:40px;display:flex}.toolbar .title{font-weight:600}.toolbar select{width:auto;padding:6px 8px}.banner{background:var(--surface);border-radius:var(--radius-btn);text-align:center;box-shadow:var(--shadow);padding:8px 12px;font-weight:600}.strip{color:var(--muted);justify-content:center;align-items:center;gap:10px;font-size:.9rem;display:flex}.strip .dots{gap:5px;display:flex}.strip .dot{background:var(--surface-2);width:9px;height:9px;box-shadow:inset 0 0 0 1px var(--line);border-radius:50%}.strip .dot.done{background:var(--accent);box-shadow:none}.strip .dot.now{background:var(--accent-soft)}.result{background:var(--surface);border-radius:var(--radius-card);box-shadow:var(--shadow);padding:16px 18px}.result .head{align-items:baseline;gap:10px;display:flex}.result .head .mark{font-size:1.3rem}.result .head .what{font-size:1.2rem;font-weight:700}.result .delta{margin-left:auto;font-size:1.3rem}.result .sub{color:var(--muted);flex-wrap:wrap;justify-content:space-between;gap:8px;margin-top:2px;display:flex}.result .feedback{margin:10px 0 12px}.result .actions{flex-wrap:wrap;gap:8px;display:flex}.result .actions .primary{margin-left:auto}.badge{background:color-mix(in srgb, var(--accent) 14%, transparent);color:var(--accent);border-radius:999px;align-items:center;gap:6px;margin:0 6px 6px 0;padding:3px 10px;font-size:.85rem;font-weight:600;display:inline-flex}.reveal{text-align:center;padding:8px 0}.reveal .display{color:var(--accent);font-size:3.2rem}.diagrams{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px;display:grid}.diagram-card{background:var(--surface);border-radius:var(--radius-card);box-shadow:var(--shadow);color:var(--text);flex-direction:column;gap:6px;padding:8px;display:flex}.diagram-card:hover{text-decoration:none;transform:translateY(-1px)}.modules{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px;display:grid}.module-card{color:var(--text);align-items:center;gap:12px;display:flex}.module-card:hover{text-decoration:none}.locked{opacity:.6}.progress{background:var(--surface-2);border-radius:3px;height:6px;overflow:hidden}.progress>div{background:var(--accent);border-radius:3px;height:100%}.overlay{z-index:50;background:#00000059;justify-content:center;align-items:center;padding:16px;display:flex;position:fixed;inset:0}.dialog{background:var(--surface);border-radius:var(--radius-card);box-shadow:var(--shadow);width:min(460px,100%);padding:20px}.chart-head{justify-content:space-between;align-items:center;margin-bottom:8px;display:flex}.seg button{color:var(--muted);background:0 0;padding:4px 9px;font-size:.8rem}.seg button.on{background:var(--surface-2);color:var(--text)}.uplot{font-family:var(--font)!important}.u-legend{display:none}.bars-row{grid-template-columns:120px 1fr 44px auto;align-items:center;gap:8px;margin:5px 0;font-size:.9rem;display:grid}.bar{background:var(--surface-2);border-radius:5px;height:10px;overflow:hidden}.bar>div{background:var(--accent);height:100%}.hero{grid-template-columns:1.1fr 1fr;align-items:center;gap:40px;padding:32px 0;display:grid}.hero h1{letter-spacing:-.03em;font-size:2.4rem}.hero p{color:var(--muted);font-size:1.1rem}.toast{background:var(--text);color:var(--bg);border-radius:var(--radius-btn);z-index:60;padding:10px 16px;position:fixed;bottom:20px;left:50%;transform:translate(-50%)}@media (max-width:760px){.topbar{gap:2px;padding:8px 10px}.topbar .nav{scrollbar-width:none;flex-wrap:nowrap;flex:1;min-width:0;overflow-x:auto}.topbar .spacer{display:none}.hide-mobile{display:none!important}.brand{margin-right:6px}.brand span.word{display:none}.nav a{padding:6px 7px;font-size:.92rem}.cols-2,.cols-4{grid-template-columns:1fr 1fr}.hero{grid-template-columns:1fr;gap:16px}.train{padding:0 0 24px}.train-col{width:100%}.toolbar{padding:0 12px}.toolbar .label{display:none}.result{border-radius:16px 16px 0 0;position:sticky;bottom:0}.page{padding:16px 12px 48px}.bars-row{grid-template-columns:90px 1fr 40px auto}}@media (max-width:480px){.cols-2,.cols-4{grid-template-columns:1fr}}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:80ms!important;animation-duration:80ms!important}}.tooltip{pointer-events:none;z-index:70;background:var(--surface);color:var(--text);box-shadow:var(--shadow);white-space:nowrap;border-radius:8px;padding:6px 9px;font-size:.82rem;position:fixed;transform:translate(-50%,calc(-100% - 10px))}.legend{color:var(--muted);gap:14px;font-size:.82rem;display:flex}.legend i{vertical-align:-1px;border-radius:3px;width:10px;height:10px;margin-right:5px;display:inline-block}.result .autonext{background:var(--accent);transform-origin:0;border-radius:3px 3px 0 0;width:100%;height:3px;animation:linear forwards autonext;position:absolute;top:0;left:0}@keyframes autonext{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@media (prefers-reduced-motion:reduce){.result .autonext{opacity:.5;animation:none}}.labelpick{position:relative}.labelpick-pill{background:var(--surface-2);border-radius:999px;gap:8px;max-width:260px;padding:6px 10px 6px 12px;font-weight:600}.labelpick-pill .name{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.labelpick-pill .count{color:var(--muted);font-size:.78rem;font-weight:500}.labelpick-pill .chev{color:var(--muted);font-size:.7rem}.labelpick-pill.on{background:color-mix(in srgb, var(--accent) 16%, var(--surface-2));color:var(--accent)}.labelpick-panel{z-index:30;flex-direction:column;gap:10px;width:min(420px,100vw - 32px);padding:12px;display:flex;position:absolute;top:calc(100% + 6px);right:0}.labelpick-search{width:100%}.labelpick-chips{flex-wrap:wrap;gap:6px;max-height:320px;display:flex;overflow:auto}.chip{background:var(--surface-2);border-radius:999px;gap:6px;padding:5px 10px;font-size:.88rem;font-weight:500}.chip .num{color:var(--muted);font-size:.75rem}.chip.on{background:var(--accent);color:var(--accent-ink)}.chip.on .num{color:color-mix(in srgb, var(--accent-ink) 75%, transparent)}
