:root{--font:"Lexend", "Lexend Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--bg:#161b24;--bg-elev:#1d2330;--surface:#232a39;--surface-2:#2b3345;--surface-hover:#323b50;--border:#343d52;--flag-edge:#ffffff38;--text:#e8ecf3;--text-2:#aab3c5;--text-3:#7a859b;--accent:#e8a33d;--accent-strong:#f2b555;--accent-ink:#231703;--accent-soft:#e8a33d24;--good:#5fbf7f;--good-soft:#5fbf7f29;--bad:#e5675c;--bad-soft:#e5675c29;--info:#6aa7e8;--c-brilliant:#22b8b0;--c-great:#5c8fd6;--c-best:#74b84a;--c-excellent:#8cbf5a;--c-good:#95ad79;--c-book:#a88865;--c-inaccuracy:#e6bb3a;--c-mistake:#e58a3a;--c-blunder:#d9483b;--c-miss:#d96a5c;--fog-base:#2a3140;--fog-cloud:#96a2ba38;--fog-edge:#080b128c;--fp-red:#e0524d;--fp-blue:#4b80e6;--fp-yellow:#ecc53b;--fp-green:#3dae5f;--fp-grey:#9aa1ab;--fp-dot-ink:#10141c;--fp-dot-edge:#00000059;--fp-tag-ink:#10141c;--fp-tag-halo:#ffffffe6;--fp-last:#e8a33d61;--fp-selected:#e8a33d99;--fp-check:#e5483cd9;--fp-hint:#141e2d59;--radius-s:6px;--radius:10px;--radius-l:16px;--shadow:0 6px 24px #00000059;--sidebar-w:212px;--topbar-h:0px;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}:root[data-theme=light]{--brand-yo:#e08a00;--bg:#eef1f5;--bg-elev:#f6f8fb;--surface:#fff;--surface-2:#f1f4f8;--surface-hover:#e7ecf3;--border:#d9dfe8;--flag-edge:#0003;--text:#18202c;--text-2:#4a5568;--text-3:#7b8597;--accent:#d48b1f;--accent-strong:#c27c12;--accent-ink:#fff;--accent-soft:#d48b1f21;--shadow:0 6px 24px #141e321f;--fog-base:#59637a;--fog-cloud:#e1e7f147;--fog-edge:#141a2659;--fp-red:#d9433e;--fp-blue:#3a6fd8;--fp-yellow:#e6b923;--fp-green:#2f9d50;--fp-grey:#a3a9b2;--fp-dot-edge:#0000004d;--fp-last:#d48b1f59;--fp-selected:#d48b1f8c;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}:root,:root[data-board=porcelain]{--sq-light:#dfe5ec;--sq-dark:#7593b1;--sq-coord-light:#7593b1;--sq-coord-dark:#dfe5ec}:root[data-board=walnut]{--sq-light:#edd6b0;--sq-dark:#b58863;--sq-coord-light:#b58863;--sq-coord-dark:#edd6b0}:root[data-board=meadow]{--sq-light:#eeeed2;--sq-dark:#769656;--sq-coord-light:#769656;--sq-coord-dark:#eeeed2}:root[data-board=coral]{--sq-light:#f1dcd2;--sq-dark:#c47a6b;--sq-coord-light:#c47a6b;--sq-coord-dark:#f1dcd2}:root[data-board=midnight]{--sq-light:#9aa6b8;--sq-dark:#4a5468;--sq-coord-light:#4a5468;--sq-coord-dark:#9aa6b8}:root[data-board=mint]{--sq-light:#e3efe8;--sq-dark:#6fa58c;--sq-coord-light:#6fa58c;--sq-coord-dark:#e3efe8}:root[data-board=oak]{--sq-light:#e8c99b;--sq-dark:#a4713f;--sq-coord-light:#a4713f;--sq-coord-dark:#e8c99b;--sq-texture:repeating-linear-gradient(97deg, #5a320a0f 0 2px, transparent 2px 7px), repeating-linear-gradient(83deg, #ffffff0d 0 1px, transparent 1px 11px)}:root[data-board=marble]{--sq-light:#e9e7e1;--sq-dark:#8b8f96;--sq-coord-light:#6f737a;--sq-coord-dark:#e9e7e1;--sq-texture:radial-gradient(ellipse at 20% 30%, #ffffff40, transparent 40%), radial-gradient(ellipse at 70% 80%, #0000000f, transparent 45%), repeating-linear-gradient(130deg, #00000009 0 1px, transparent 1px 23px)}:root[data-board=ocean]{--sq-light:#d6e9f2;--sq-dark:#4f8db3;--sq-coord-light:#4f8db3;--sq-coord-dark:#d6e9f2}:root[data-board=sand]{--sq-light:#f3e7cf;--sq-dark:#c9a66b;--sq-coord-light:#a8864d;--sq-coord-dark:#f3e7cf}:root[data-board=amethyst]{--sq-light:#ece4f4;--sq-dark:#8a6fae;--sq-coord-light:#8a6fae;--sq-coord-dark:#ece4f4}:root[data-board=tournament]{--sq-light:#f4f4f0;--sq-dark:#4e8f5a;--sq-coord-light:#4e8f5a;--sq-coord-dark:#f4f4f0}:root{--avatar-ink:#fff;--avatar-1:#3b82c4;--avatar-2:#2f9e6e;--avatar-3:#c2563a;--avatar-4:#8a5cc2;--avatar-5:#c2447a;--avatar-6:#b07d14;--sticker-1:#ff6f91;--sticker-2:#ffc93c;--sticker-3:#5ab0f0;--sticker-4:#4cc38a;--sticker-5:#a685f0;--sticker-6:#ff9a5a;--sticker-edge:#fff;--sticker-shadow:#00000047;--sticker-slot:#7f7fa024;--cert-paper:#fffaf0;--cert-ink:#2b2240;--cert-ink-2:#6b6380;--cert-frame:#f0623d;--cert-frame-2:#ffc93c}:root[data-theme=light]{--sticker-slot:#78643c14}:root{--botav-ink:#1f2a3a;--botav-metal:#e4ebf3;--botav-metal-2:#93a7bd;--botav-glow:#7ef0ff;--botav-gold:#f2c230;--botav-white:#fffaf3;--botav-ring:#ffffff29}:root[data-theme=light]{--botav-ring:#281e3c1f}:root{--mascot-body:#f7e3c1;--mascot-mane:#8a5cc2;--mascot-crown:#ffc93c;--mascot-cheek:#ff9fb5;--mascot-ink:#2b2240;--mascot-eye:#fff;--mascot-stand:#5ab0f0;--mascot-shadow:#0000002e}:root[data-theme=light]{--mascot-shadow:#3c280024}:root{--side-white:#f4f4f4;--side-black:#222;--sheet-paper:#fff;--sheet-ink:#000;--sheet-rule:#6b6b6b;--sheet-shade:#ececec;--pcb-paper:#fff;--pcb-ink:#000;--pcb-grey:#c9c9c9;--pcb-tab:#ededed;--pcb-light:#f0d9b5;--pcb-dark:#b58863}:root[data-board=peach],[data-board-preview=peach]{--sq-light:#fbe6c2;--sq-dark:#c0392b;--sq-coord-light:#c0392b;--sq-coord-dark:#fbe6c2;--sq-texture:radial-gradient(circle at 25% 25%, #ffc2d4 0 3%, #e86f8f 3.4% 5%, transparent 5.5%) 0 0 / 25% 25%, radial-gradient(circle at 75% 70%, #ffd84d 0 2.6%, #f0a500 3% 4.4%, transparent 5%) 0 0 / 25% 25%, linear-gradient(135deg, #ffd7782e, transparent 40%)}:root[data-board=peach] .piece[data-piece$=K]:after{content:"";pointer-events:none;background:radial-gradient(circle,#ffd84d 0 22%,#ff8fb1 24% 60%,#0000 62%);border-radius:50%;width:26%;height:26%;position:absolute;top:4%;right:6%}:root[data-board=lantern],[data-board-preview=lantern]{--sq-light:#f3d9a4;--sq-dark:#2c3a6b;--sq-coord-light:#2c3a6b;--sq-coord-dark:#f3d9a4;--sq-texture:radial-gradient(circle at 80% 12%, #fff4c48c, transparent 22%), radial-gradient(ellipse at 20% 85%, #ff962847, transparent 35%)}:root[data-board=pumpkin],[data-board-preview=pumpkin]{--sq-light:#f6b26b;--sq-dark:#3b1f4f;--sq-coord-light:#3b1f4f;--sq-coord-dark:#f6b26b;--sq-texture:radial-gradient(circle at 50% 50%, #ff78142e, transparent 60%), repeating-linear-gradient(45deg, #0000000d 0 2px, transparent 2px 12px)}:root[data-board=snow],[data-board-preview=snow]{--sq-light:#f4f9f4;--sq-dark:#2f7d4f;--sq-coord-light:#2f7d4f;--sq-coord-dark:#f4f9f4;--sq-texture:radial-gradient(circle at 20% 30%, #ffffffd9 0 1.2%, transparent 1.5%) 0 0 / 18% 18%, radial-gradient(circle at 70% 80%, #ffffffb3 0 0.9%, transparent 1.2%) 0 0 / 22% 22%}:root[data-board=pitch],[data-board-preview=pitch]{--sq-light:#8fd16a;--sq-dark:#3f9142;--sq-coord-light:#2f6e31;--sq-coord-dark:#e9f7df;--sq-texture:repeating-linear-gradient(90deg, #ffffff0f 0 12.5%, transparent 12.5% 25%), radial-gradient(circle at 50% 50%, transparent 0 14%, #ffffff73 14.4% 15%, transparent 15.4%)}.frame-lixi{background:linear-gradient(135deg,#ffd84d,#e0313a 35%,#9b1b22 70%,#ffd84d);box-shadow:0 0 8px #e0313a73}.frame-lantern{background:radial-gradient(circle at 50% 0,#fff3c4,#0000 50%),linear-gradient(135deg,#ff9f2e,#c2410c 55%,#2c3a6b);box-shadow:0 0 10px #ff9f2e80}.frame-pumpkin{background:repeating-conic-gradient(#ff7a1a 0 30deg, #3b1f4f 30deg 60deg)}.frame-holly{background:radial-gradient(circle at 15% 15%,#dc2626 0 12%,#0000 13%),linear-gradient(135deg,#16a34a,#14532d 60%,#f4f9f4)}.frame-cup{background:linear-gradient(135deg,#fff2a8,#facc15 35%,#166534 65%,#fff2a8);box-shadow:0 0 8px #facc1573}.frame-kingdom{background:conic-gradient(#ffe27a,#e8b923,#9b7bf0,#5ab0f0,#6cc3a0,#e8b923,#ffe27a);box-shadow:0 0 0 1px #a8820f99,0 0 10px #e8b9238c}.frame-kingdom:before{content:"";clip-path:polygon(0 100%,0 20%,25% 60%,50% 0,75% 60%,100% 20%,100% 100%);filter:drop-shadow(0 1px 1px #00000059);background:#e8b923;width:14px;height:8px;position:absolute;top:-7px;left:50%;transform:translate(-50%)}*,:before,:after{box-sizing:border-box}html,body,#root{height:100%}body{font-family:var(--font);background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;margin:0;font-size:15px;line-height:1.5}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,h4{letter-spacing:-.01em;margin:0;font-weight:700;line-height:1.2}button,input,select,textarea{font:inherit;color:inherit}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.tabular{font-variant-numeric:tabular-nums}.muted{color:var(--text-2)}.faint{color:var(--text-3)}.visually-hidden{clip:rect(0 0 0 0);white-space:nowrap;width:1px;height:1px;overflow:hidden;position:absolute!important}.btn{border-radius:var(--radius-s);border:1px solid var(--border);background:var(--surface-2);min-height:40px;color:var(--text);cursor:pointer;white-space:nowrap;justify-content:center;align-items:center;gap:8px;padding:0 16px;font-weight:500;text-decoration:none;transition:background .12s,border-color .12s,transform 60ms;display:inline-flex}.btn:hover{background:var(--surface-hover);text-decoration:none}.btn:active{transform:translateY(1px)}.btn:disabled{opacity:.45;cursor:not-allowed;transform:none}.btn-primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:600}.btn-primary:hover{background:var(--accent-strong)}.btn-ghost{background:0 0;border-color:#0000}.btn-ghost:hover{background:var(--surface-2)}.btn-danger{color:var(--bad)}.btn-lg{border-radius:var(--radius);min-height:52px;padding:0 22px;font-size:1.05rem}.btn-sm{min-height:32px;padding:0 10px;font-size:.875rem}.btn-icon{width:40px;padding:0}.btn-block{width:100%}.field{flex-direction:column;gap:6px;display:flex}.field label{color:var(--text-2);font-size:.875rem}.input,.select,.textarea{border-radius:var(--radius-s);border:1px solid var(--border);background:var(--bg-elev);min-height:42px;color:var(--text);width:100%;padding:8px 12px}.textarea{resize:vertical;min-height:90px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.85rem}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent);outline:none}.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius)}.panel-pad{padding:16px}.segmented{background:var(--bg-elev);border-radius:var(--radius-s);border:1px solid var(--border);gap:4px;padding:4px;display:flex}.segmented button{cursor:pointer;min-height:34px;color:var(--text-2);background:0 0;border:0;border-radius:4px;flex:1;font-weight:500}.segmented button[aria-pressed=true]{background:var(--surface-hover);color:var(--text)}.chip{background:var(--surface-2);color:var(--text-2);border-radius:999px;align-items:center;gap:6px;padding:3px 10px;font-size:.8rem;display:inline-flex}.error-text{color:var(--bad);font-size:.9rem}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.001ms!important;animation-duration:.001ms!important}}.form-row-2{grid-template-columns:1fr 1fr;gap:10px;display:grid}.details summary{cursor:pointer;color:var(--text-2)}.toggle-row{border-top:1px solid var(--border);cursor:pointer;color:var(--text-2);align-items:center;gap:10px;padding:10px 14px;display:flex}.toggle-row input{width:18px;height:18px;accent-color:var(--accent)}.fen-row{gap:6px;display:flex}.fen-row .input{font-size:.78rem}@media (pointer:coarse){.btn-sm,.segmented button{min-height:40px}.legal-footer a,.legal-footer .linklike{padding-block:10px;display:inline-block}.legal-footer nav{row-gap:0}.topbar .brand{min-height:44px}}.flag{vertical-align:middle;border-radius:3px;flex:none;width:20px;height:15px;line-height:0;display:inline-block;position:relative;overflow:hidden}.flag svg{width:100%;height:100%;display:block}.flag:after{content:"";border-radius:inherit;box-shadow:inset 0 0 0 1px var(--flag-edge);pointer-events:none;position:absolute;inset:0}.offline-strip{border-radius:var(--radius-s);background:var(--surface);border:1px solid var(--border);max-width:1400px;color:var(--text-2);align-items:center;gap:8px;margin:0 auto 12px;padding:8px 12px;font-size:.85rem;display:flex}.offline-strip svg{color:var(--text-3);flex:none}.offline-page{align-items:flex-start;padding-top:32px}.offline-icon{background:var(--surface);border:1px solid var(--border);width:64px;height:64px;color:var(--text-3);border-radius:50%;justify-content:center;align-items:center;display:inline-flex}.offline-actions{flex-wrap:wrap;gap:8px;display:flex}.pwa-toast{z-index:90;border-radius:var(--radius);background:var(--surface-2);border:1px solid var(--border);max-width:calc(100vw - 32px);box-shadow:var(--shadow);align-items:center;gap:10px;padding:10px 10px 10px 14px;font-weight:600;display:flex;position:fixed;bottom:16px;right:16px}.pwa-toast>svg{color:var(--accent);flex:none}.pwa-toast-text{flex:1}.install-banner{display:none}@media (width<=860px){.pwa-toast{left:12px;right:12px;bottom:calc(78px + env(safe-area-inset-bottom))}.install-banner{z-index:55;left:8px;right:8px;bottom:calc(74px + env(safe-area-inset-bottom));border-radius:var(--radius);background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);align-items:center;gap:10px;padding:8px 6px 8px 10px;display:flex;position:fixed}.install-banner img{border-radius:8px;flex:none}.install-banner-text{flex-direction:column;flex:1;min-width:0;font-size:.85rem;line-height:1.3;display:flex}}.install-app{align-items:flex-start;gap:16px;display:flex}.install-app img{border-radius:12px;flex:none}.install-app-text{flex-direction:column;align-items:flex-start;gap:8px;display:flex}.install-app-text p{margin:0}.install-state{color:var(--text-2);align-items:center;gap:6px;display:flex}.install-state svg{color:var(--good)}.save-prompt{z-index:99;left:calc(var(--sidebar-w,0px) + 20px);background:var(--surface);width:min(380px,100vw - 40px);color:var(--text);border:1px solid var(--border);border-left:3px solid var(--accent);border-radius:var(--radius);box-shadow:var(--shadow);align-items:flex-start;gap:12px;padding:14px 10px 14px 14px;animation:.25s ease-out save-prompt-in;display:flex;position:fixed;bottom:20px}.save-prompt-icon{background:var(--accent-soft);width:34px;height:34px;color:var(--accent-strong);border-radius:50%;flex:none;place-items:center;display:grid}.save-prompt-body{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.save-prompt-body .faint{font-size:.9rem}.save-prompt-actions{flex-wrap:wrap;gap:8px;margin-top:6px;display:flex}@keyframes save-prompt-in{0%{opacity:0;transform:translateY(12px)}}@media (prefers-reduced-motion:reduce){.save-prompt{animation:none}}@media (width<=860px){.save-prompt{width:auto;left:10px;right:10px;bottom:calc(76px + env(safe-area-inset-bottom));max-height:calc(100dvh - 56px - var(--safe-top,0px) - 76px - env(safe-area-inset-bottom) - 16px);overscroll-behavior:contain;overflow-y:auto}body:has(.achievement-toast,.challenge-toast,.mission-toast,.pwa-toast,.install-banner,.cookie-banner) .save-prompt{top:calc(56px + var(--safe-top,0px) + 8px);bottom:auto}}@media (width>=861px){body:has(.cookie-banner) .save-prompt{top:16px;bottom:auto}}@media (height<=640px){.save-prompt{gap:8px;padding:10px 6px 10px 12px}.save-prompt-icon{display:none}.save-prompt-body{gap:2px}.save-prompt-body .faint{-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:.85rem;line-height:1.35;display:-webkit-box;overflow:hidden}.save-prompt-actions{margin-top:4px}}@media (width<=860px) and (orientation:landscape) and (height<=500px){.save-prompt{width:min(440px,100vw - 20px);right:auto}}.guest-keep{border-radius:var(--radius-s);background:var(--accent-soft);border:1px solid color-mix(in srgb, var(--accent) 35%, transparent);color:var(--text);align-items:flex-start;gap:8px;margin:0;padding:10px 12px;font-size:.9rem;line-height:1.4;display:flex}.guest-keep>svg{color:var(--accent-strong);flex:none;margin-top:2px}.legal-footer{border-top:1px solid var(--border);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 16px;margin-top:40px;padding-top:16px;font-size:.85rem;display:flex}.legal-footer nav{flex-wrap:wrap;gap:4px 16px;display:flex}.legal-footer a,.legal-footer .linklike{color:var(--text-2)}.linklike{font:inherit;cursor:pointer;text-underline-offset:2px;background:0 0;border:0;padding:0;text-decoration:underline}.legal-footer a:hover,.legal-footer .linklike:hover{color:var(--text)}.account-notice{border-radius:var(--radius);background:var(--accent-soft);color:var(--text);flex-wrap:wrap;align-items:center;gap:8px 12px;margin:0 0 16px;padding:10px 14px;font-size:.92rem;display:flex}.account-notice>span{flex:240px}.account-notice.bad{background:var(--bad-soft)}.cookie-banner{z-index:60;background:var(--bg-elev);width:min(720px,100vw - 32px);color:var(--text);border:1px solid var(--border);border-radius:var(--radius-l);box-shadow:var(--shadow);flex-wrap:wrap;align-items:center;gap:12px 16px;padding:16px;display:flex;position:fixed;bottom:16px;left:50%;transform:translate(-50%)}.cookie-banner-text{flex:300px}.cookie-banner-text p{color:var(--text-2);margin:4px 0 0;font-size:.9rem}.cookie-banner-actions{flex-wrap:wrap;gap:8px;display:flex}@media (width<=860px){.cookie-banner{bottom:calc(78px + env(safe-area-inset-bottom,0px));max-height:calc(100dvh - 56px - 78px - env(safe-area-inset-bottom,0px) - 16px);overflow-y:auto}}@media (width<=760px){.cookie-banner-actions,.cookie-banner-actions .btn{flex:auto}}.cookie-dialog{width:min(520px,100vw - 32px);color:var(--text);background:var(--bg-elev);border:1px solid var(--border);border-radius:var(--radius-l);padding:20px}.cookie-dialog::backdrop{background:#00000073}.cookie-dialog-head{justify-content:space-between;align-items:center;gap:8px;display:flex}.cookie-dialog-head h2{margin:0;font-size:1.2rem}.cookie-cats{margin:12px 0;padding:0;list-style:none}.cookie-cats li{border-top:1px solid var(--border);justify-content:space-between;align-items:center;gap:12px;padding:10px 0;display:flex}.cookie-cats p{margin:2px 0 0;font-size:.85rem}.cookie-cats label{cursor:pointer}.cookie-switch{width:20px;height:20px;accent-color:var(--accent);flex:none}.cookie-dialog-actions{justify-content:space-between;gap:8px;display:flex}.achievements{flex-direction:column;gap:20px;max-width:1000px;margin:0 auto;display:flex}.ach-summary{grid-template-columns:1fr 1fr 1.3fr;gap:12px;display:grid}.ach-stat{color:var(--accent);align-items:center;gap:14px;display:flex}.ach-stat div{color:var(--text);flex-direction:column;display:flex}.ach-stat strong{font-size:1.4rem}.activity{grid-template-columns:repeat(7,1fr);gap:4px;display:grid}.activity span{aspect-ratio:1;background:var(--surface-2);border-radius:3px}.activity span.on{background:var(--accent)}.ach-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px;display:grid}.ach-card{border-radius:var(--radius);background:var(--surface);border:1px solid var(--border);opacity:.6;gap:12px;padding:14px;display:flex}.ach-card.unlocked{opacity:1;border-color:var(--accent)}.ach-card p{margin:2px 0 0;font-size:.85rem}.ach-date{color:var(--accent);font-size:.75rem}.achievement-medal{background:var(--accent-soft);width:40px;height:40px;color:var(--accent);border-radius:50%;flex:none;justify-content:center;align-items:center;display:inline-flex}.achievement-toast{z-index:100;background:var(--surface);border:1px solid var(--accent);border-radius:var(--radius);box-shadow:var(--shadow);align-items:center;gap:12px;padding:12px 12px 12px 14px;animation:.3s ease-out toast-in;display:flex;position:fixed;bottom:20px;right:20px}.achievement-toast a{color:var(--text);flex-direction:column;text-decoration:none;display:flex}@keyframes toast-in{0%{opacity:0;transform:translateY(20px)}}@media (width<=860px){.achievement-toast{bottom:calc(82px + env(safe-area-inset-bottom));left:10px;right:10px}.ach-summary{grid-template-columns:1fr 1fr}.activity{grid-column:span 2}}:root{--safe-top:var(--safe-area-inset-top,env(safe-area-inset-top,0px))}html.native-app{-webkit-tap-highlight-color:transparent}.app{grid-template-columns:var(--sidebar-w) 1fr;min-height:100%;display:grid}.sidebar{z-index:20;height:100dvh;padding:calc(16px + var(--safe-top)) 12px 16px;background:var(--bg-elev);border-right:1px solid var(--border);flex-direction:column;gap:4px;display:flex;position:sticky;top:0;overflow-y:auto}.brand{color:var(--text);align-items:center;gap:10px;padding:6px 10px 18px;display:flex;text-decoration:none!important}.brand-mark{background-position:50%;background-repeat:no-repeat;background-size:contain;display:inline-block}.brand-name{color:var(--text);flex:none;display:block}.nav{flex-direction:column;gap:2px;display:flex}.nav-item{border-radius:var(--radius-s);min-height:44px;color:var(--text-2);align-items:center;gap:12px;padding:0 12px;font-weight:600;display:flex;text-decoration:none!important}.nav-item:hover{background:var(--surface);color:var(--text)}.nav-item.active{background:var(--surface-2);color:var(--text);box-shadow:inset 3px 0 0 var(--accent)}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.sidebar-spacer{flex:1}.sidebar-bottom{flex-direction:column;gap:4px;display:flex}.auth-buttons{flex-direction:column;gap:8px;padding:0 4px 8px;display:flex}.sidebar-tools{border-top:1px solid var(--border);align-items:center;gap:6px;margin-top:6px;padding:8px 4px 0;display:flex;position:relative}.lang-menu{flex:1;min-width:0}.lang-select{border-radius:var(--radius-s);width:100%;min-height:44px;color:var(--text);background:var(--surface);border:1px solid var(--border);font:inherit;cursor:pointer;text-align:start;align-items:center;gap:8px;padding:0 10px;font-weight:600;display:flex}.lang-select:hover{background:var(--surface-hover)}.lang-select-name{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.lang-select-caret{color:var(--text-2);flex:none;transition:transform .15s;transform:rotate(-90deg)}.lang-select[aria-expanded=true] .lang-select-caret{transform:rotate(90deg)}.lang-pop{z-index:5;overscroll-behavior:contain;background:var(--bg-elev);border:1px solid var(--border);max-height:min(60vh,520px);box-shadow:var(--shadow);border-radius:12px;flex-direction:column;gap:2px;padding:6px;display:flex;position:absolute;bottom:calc(100% + 6px);left:0;right:0;overflow-y:auto}.lang-pop-item{min-height:44px;color:var(--text);font:inherit;text-align:start;cursor:pointer;background:0 0;border:0;border-radius:8px;align-items:center;gap:10px;padding:0 10px;font-size:.98rem;font-weight:500;display:flex}.lang-pop-item:hover,.lang-pop-item:focus-visible{background:var(--surface)}.lang-pop-item.selected{background:var(--accent-soft);font-weight:700}.lang-pop-name{flex:1;min-width:0}.lang-pop-check{color:var(--accent);flex:none}.main{min-width:0;padding:24px clamp(12px,3vw,36px) 40px}.topbar,.tabbar,.scrim{display:none}.page-spinner{justify-content:center;min-height:100svh;padding:80px 0;display:flex}#root.ssr-pending{visibility:hidden;pointer-events:none;position:fixed;inset:0;overflow:hidden}.spinner{border:3px solid var(--surface-2);border-top-color:var(--accent);border-radius:50%;width:32px;height:32px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}@media (width<=860px){.app{padding-bottom:calc(68px + env(safe-area-inset-bottom));display:block}.topbar{z-index:50;height:calc(56px + var(--safe-top));padding:var(--safe-top) 8px 0 4px;background:var(--bg-elev);border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;display:flex;position:sticky;top:0}.topbar .brand{padding:0 10px}.sidebar{z-index:70;width:min(280px,82vw);transition:transform .2s;position:fixed;top:0;left:0;transform:translate(-100%)}.sidebar.open{box-shadow:var(--shadow);transform:none}.scrim{z-index:60;background:#00000073;display:block;position:fixed;inset:0}.main{padding:12px 10px 24px}.tabbar{z-index:50;padding-bottom:env(safe-area-inset-bottom);background:var(--bg-elev);border-top:1px solid var(--border);grid-template-columns:repeat(4,1fr);display:grid;position:fixed;bottom:0;left:0;right:0}.tab{min-width:0;height:66px;color:var(--text-2);flex-direction:column;justify-content:center;align-items:center;gap:3px;padding:0 2px;font-size:.8125rem;font-weight:650;line-height:1.15;display:flex;text-decoration:none!important}.tab span{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}.tab.active{color:var(--accent)}.sidebar .nav-item{min-height:48px;color:var(--text);gap:14px;font-size:1.125rem}.sidebar .nav-item>svg{flex:none;width:26px;height:26px}.sidebar .nav-item.nav-sub{min-height:44px;color:var(--text-2);font-size:1rem}.sidebar .nav-toggle{border-radius:var(--radius-s);width:44px;height:44px}.sidebar .nav-children{margin-left:26px}}.nav-row{align-items:center;display:flex}.nav-row .nav-item{flex:1;min-width:0}.nav-toggle{width:28px;height:28px;color:var(--text-3);cursor:pointer;background:0 0;border:0;border-radius:6px;flex:none;justify-content:center;align-items:center;transition:transform .15s;display:inline-flex}.nav-toggle:hover{background:var(--surface);color:var(--text)}.nav-toggle.open{transform:rotate(90deg)}.nav-children{border-left:1px solid var(--border);flex-direction:column;margin:0 0 4px 22px;padding-left:12px;display:flex}.nav-item.nav-sub{min-height:34px;font-size:.92rem;font-weight:500}.nav-flyout{z-index:80;background:var(--bg-elev);border:1px solid var(--border);min-width:220px;box-shadow:var(--shadow);border-radius:12px;flex-direction:column;gap:2px;padding:6px;animation:.12s ease-out nav-flyout-in;display:flex;position:fixed}.nav-flyout:before{content:"";width:14px;position:absolute;top:0;bottom:0;left:-14px}.nav-flyout-head,.nav-flyout-item{min-height:36px;color:var(--text-2);border-radius:8px;align-items:center;gap:10px;padding:0 12px;font-weight:500;display:flex;text-decoration:none!important}.nav-flyout-head{color:var(--text);border-bottom:1px solid var(--border);border-radius:8px 8px 0 0;margin-bottom:4px;font-weight:700}.nav-flyout-head:hover,.nav-flyout-item:hover{background:var(--surface);color:var(--text)}.nav-flyout-item.active{color:var(--accent)}@keyframes nav-flyout-in{0%{opacity:0;transform:translate(-4px)}}@media (prefers-reduced-motion:reduce){.nav-flyout{animation:none}}.b3d{touch-action:manipulation;cursor:pointer;position:absolute;inset:0;overflow:visible}.b3d-svg{position:absolute;inset:0;overflow:visible}.b3d-sq.light{fill:var(--sq-light)}.b3d-sq.dark{fill:var(--sq-dark)}.b3d-sq{stroke:var(--sq-dark);stroke-width:.3px}.b3d-edge{fill:var(--sq-dark);filter:brightness(.55)}.b3d-edge.side{filter:brightness(.4)}.b3d-hl.last-move{fill:#ffd64f6b}.b3d-hl.selected{fill:#ffd64f9e}.b3d-check{fill:#e6141499}.b3d-mark{fill:var(--mark);opacity:.55}.b3d-mark.ring{fill:none;stroke:var(--mark);stroke-width:3px;opacity:1}.b3d-dest{fill:#141e284d}.b3d-dest.capture{fill:none;stroke:#141e2859;stroke-width:4px}.b3d-coord text{fill:var(--text-2);font-weight:700}.b3d-piece{pointer-events:none;will-change:left, top;position:absolute}.b3d-piece img{-webkit-user-select:none;user-select:none;-webkit-user-drag:none;width:100%;height:100%;position:absolute;inset:0}.b3d-extrude{filter:brightness(.45)saturate(.8)}.b3d-face{filter:drop-shadow(0 1px #00000040)}.b3d-shadow{background:radial-gradient(#00000061,#0000 70%);border-radius:50%;height:26%;position:absolute;bottom:-6%;left:15%;right:15%}.b3d-promo{z-index:80;background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);align-items:center;gap:4px;padding:6px;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.b3d-promo-choice{border-radius:var(--radius-s);cursor:pointer;background:0 0;border:0;width:52px;height:52px}.b3d-promo-choice:hover{background:var(--accent-soft)}.b3d-promo-choice img{width:100%;height:100%}.b3d-tilt{align-items:center;gap:8px;font-size:.85rem;display:flex}@media (prefers-reduced-motion:reduce){.b3d-piece{transition:none!important}}html[data-xp-piece] .board .piece{background-size:var(--xp-piece,100%) var(--xp-piece,100%);background-position:50%}html[data-xp-coords=outside] .board-wrap:has(>.board>.coords)>.board{inset:0 0 4.2% 4.2%;overflow:visible}html[data-xp-coords=outside] .board-wrap:has(>.board>.coords)>.board>.board-squares{border-radius:4px;overflow:hidden}html[data-xp-coords=outside] .board .coord.rank{text-align:center;width:3cqw;height:12.5%;padding-top:0;line-height:12.5cqh;left:-3.6cqw}html[data-xp-coords=outside] .board .coord.file{text-align:center;padding-right:0;bottom:-3.8cqw}html[data-xp-coords=outside] .board .coord.on-light,html[data-xp-coords=outside] .board .coord.on-dark{color:var(--text-3)}html[data-xp-highlight=subtle] .board .last-move{background:#ffd64f38}html[data-xp-highlight=subtle] .board .selected{background:#ffd64f5c}html[data-xp-highlight=outline] .board .last-move{background:0 0;box-shadow:inset 0 0 0 .55cqw #ffc428d9}html[data-xp-highlight=outline] .board .selected{background:0 0;box-shadow:inset 0 0 0 .75cqw #ffc428}html[data-xp-highlight=vivid] .board .last-move{background:#40a0ff80}html[data-xp-highlight=vivid] .board .selected{background:#40a0ffb3}html[data-xp-highlight=vivid] .board .dest:after{background:#1e6edc8c}@media (width>=1000px){html[data-xp-board-size] .game-shell{grid-template-columns:minmax(0, calc((100dvh - 150px) * var(--xp-board-size,1))) minmax(300px, 400px)}html[data-xp-board-size] .game-shell:has(.game-aside){grid-template-columns:26px minmax(0, calc((100dvh - 150px) * var(--xp-board-size,1))) minmax(300px, 400px)}}.xp-help-backdrop{z-index:1000;background:#080c128c;justify-content:center;align-items:center;padding:16px;display:flex;position:fixed;inset:0}.xp-help{background:var(--surface);width:min(560px,100%);max-height:calc(100dvh - 32px);color:var(--text);border-radius:var(--radius-l);box-shadow:var(--shadow);padding:18px 20px;overflow:auto}.xp-help h2{justify-content:space-between;align-items:center;margin:0 0 4px;font-size:1.15rem;display:flex}.xp-help h3{text-transform:uppercase;letter-spacing:.04em;color:var(--text-3);margin:14px 0 6px;font-size:.8rem}.xp-keys{grid-template-columns:1fr auto;gap:6px 12px;margin:0;display:grid}.xp-keys dt{color:var(--text-2)}.xp-keys dd{flex-wrap:wrap;justify-content:flex-end;gap:4px;margin:0;display:flex}kbd.xp-kbd{border:1px solid var(--border);background:var(--surface-2);min-width:1.6em;font:600 .8rem/1.5 var(--font);text-align:center;white-space:nowrap;border-bottom-width:2px;border-radius:5px;padding:1px 6px;display:inline-block}.xp-toast{z-index:1001;background:var(--surface);color:var(--text);border:1px solid var(--border);box-shadow:var(--shadow);pointer-events:none;border-radius:999px;padding:6px 14px;font-size:.9rem;position:fixed;bottom:24px;left:50%;transform:translate(-50%)}.xp-settings{flex-direction:column;gap:4px;display:flex}.xp-packs{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;margin:6px 0 4px;display:grid}.xp-pack{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2);cursor:pointer;justify-content:space-between;align-items:center;gap:6px;padding:8px 10px;display:flex}.xp-pack.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.xp-pack input{accent-color:var(--accent)}.xp-row{border-top:1px solid var(--border);flex-wrap:wrap;align-items:center;gap:10px;padding:10px 0;display:flex}.xp-row>label:first-child,.xp-row>.xp-label{flex:180px;min-width:0}.xp-row select,.xp-row input[type=range]{max-width:100%}.xp-row input[type=range]{flex:160px}.xp-value{text-align:end;font-variant-numeric:tabular-nums;min-width:3.5em}.xp-hint{margin:0;font-size:.82rem}.xp-shortcuts{flex-direction:column;gap:14px;max-width:760px;margin:0 auto;display:flex}.xp-sc-table{border-collapse:collapse;table-layout:fixed;width:100%}.xp-sc-table th:first-child{width:46%}.xp-sc-table th:nth-child(3){width:130px}.xp-sc-table td,.xp-sc-table th{border-top:1px solid var(--border);text-align:start;vertical-align:middle;padding:8px 6px}.xp-sc-table th{color:var(--text-3);font-size:.8rem;font-weight:600}.xp-sc-keys{flex-wrap:wrap;gap:4px;display:flex}.xp-sc-actions{flex-wrap:wrap;justify-content:flex-end;gap:4px;display:flex}.xp-sc-conflict{color:var(--bad);font-size:.82rem}.xp-capture{outline:2px solid var(--accent)}@media (width<=560px){.xp-sc-table thead{display:none}.xp-sc-table tr{border-top:1px solid var(--border);grid-template-columns:1fr auto;padding:6px 0;display:grid}.xp-sc-table td{border:0;padding:4px 2px}.xp-sc-table td:first-child{grid-column:1/-1}}.xp-analysis-board{max-width:min(100%,360px);margin:0 auto}.xp-analysis-lines{flex-direction:column;gap:2px;padding:6px 12px;font-size:.85rem;display:flex}.xp-analysis-lines .line{white-space:nowrap;text-overflow:ellipsis;gap:8px;display:flex;overflow:hidden}.xp-analysis-lines .score{font-variant-numeric:tabular-nums;min-width:3.4em;font-weight:700}.xp-analysis-bar{flex-wrap:wrap;align-items:center;gap:6px;padding:6px 12px;display:flex}.xp-analysis-moves{color:var(--text-2);overflow-wrap:anywhere;padding:0 12px 8px;font-size:.85rem}.xp-live-badge{color:var(--bad);align-items:center;gap:4px;font-size:.78rem;font-weight:700;display:inline-flex}.xp-live-badge:before{content:"";background:currentColor;border-radius:50%;width:7px;height:7px}.xp-spec-chat .chat-messages{max-height:220px}.xp-spec-msg{align-items:baseline;gap:6px;display:flex}.xp-spec-msg .text{overflow-wrap:anywhere;flex:1;min-width:0}.xp-spec-msg button{opacity:0}.xp-spec-msg:hover button,.xp-spec-msg button:focus-visible{opacity:1}.xp-multi{flex-direction:column;gap:14px;max-width:1400px;margin:0 auto;display:flex}.xp-multi-head{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px;display:flex}.xp-multi-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:14px;max-width:1100px;display:grid}.xp-multi-grid.n1{grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),360px))}.xp-slot{flex-direction:column;gap:6px;padding:10px;display:flex}.xp-slot-head{justify-content:space-between;align-items:center;gap:6px;font-size:.85rem;display:flex}.xp-slot-empty{border:2px dashed var(--border);border-radius:var(--radius);min-height:200px;color:var(--text-3);flex-direction:column;justify-content:center;align-items:center;gap:8px;display:flex}.xp-picker{gap:10px;display:grid}.xp-picker-list{flex-direction:column;gap:4px;max-height:260px;display:flex;overflow:auto}.xp-picker-list button{text-align:start;justify-content:space-between;gap:8px;display:flex}.xp-url-form{gap:6px;display:flex}.xp-url-form input{flex:1;min-width:0}@media (width<=999px){.xp-desktop-only{display:none!important}}html.embed-mode,html.embed-mode body{background:var(--bg);min-height:0}.embed{flex-direction:column;gap:6px;min-height:100dvh;padding:8px;display:flex}.embed-main{flex:1;justify-content:center;min-width:0;display:flex}.embed-widget{flex-direction:column;gap:6px;width:100%;min-width:0;max-width:min(560px,100dvh - 150px);display:flex}.embed-widget .board{box-shadow:0 4px 14px #00000040}.embed-head{justify-content:space-between;align-items:center;gap:8px;min-width:0;min-height:34px;font-size:.92rem;display:flex}.embed-head .faint{font-size:.8rem}.embed-head-actions{flex:none;gap:4px;display:flex}.embed-level{flex:auto;min-width:0;max-width:180px}.embed-level .select{width:100%;min-height:32px;padding:4px 8px;font-size:.85rem}.embed-status{align-items:center;gap:8px;min-height:28px;font-size:.9rem;font-weight:600;display:flex}.embed-status .faint{margin-left:auto;font-weight:400}.embed-status.tone-good{color:var(--good)}.embed-status.tone-bad{color:var(--bad)}.embed-status .turn-dot{width:12px;height:12px}.embed-actions{gap:6px;display:flex}.embed-actions .btn{flex:1}.embed-widget .history-nav{border:0;padding:0}.embed-msg{text-align:center;padding:24px 8px}.embed-foot{justify-content:center;display:flex}.embed-foot a{color:var(--text-3);align-items:center;gap:6px;font-size:.78rem;font-weight:600;text-decoration:none;display:inline-flex}.embed-foot a:hover{color:var(--accent)}@media (width<=360px){.embed{padding:4px}.embed-head-actions .btn:not(.btn-icon){padding-inline:8px}}.hub.embed-page{max-width:1100px}.embed-builder{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:20px;display:grid}.embed-options{flex-direction:column;gap:14px;display:flex}.embed-options .form-row-2{grid-template-columns:1fr 1fr;gap:10px;display:grid}.embed-code{white-space:pre-wrap;word-break:break-all;min-height:96px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.8rem}.embed-preview{flex-direction:column;align-items:center;gap:8px;display:flex}.embed-preview iframe{border:1px solid var(--border);border-radius:var(--radius);background:var(--bg);max-width:100%}@media (width<=860px){.embed-builder{grid-template-columns:minmax(0,1fr)}}.embed-copy-row{flex-wrap:wrap;gap:8px;display:flex}.embed-head .chip{white-space:nowrap;flex:none}
