:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#0c1119;--panel:#151c28;--border:#2d3645;--text:#edf1ef;--muted:#9ca8b3;--accent:#b7deb0;--accent-weak:#263d38}*{box-sizing:border-box}body{background:radial-gradient(ellipse at 60% -20%, #263d3f 0%, transparent 45%), var(--bg);color:var(--text);margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.52}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.app-shell{flex-direction:column;min-height:100vh;display:flex}.app-header{border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;gap:20px;padding:22px max(24px,50vw - 610px);display:flex}.brand{align-items:center;gap:14px;display:flex}.brand-icon{width:48px;height:48px;color:var(--accent);background:#223e36;border-radius:14px;place-items:center;font-size:31px;display:grid}.brand strong{letter-spacing:.1em;font-size:18px}.brand strong span{color:var(--accent)}.brand p{color:var(--muted);margin:4px 0 0;font-size:12px}.header-status{border:1px solid var(--border);color:#cbd5d8;white-space:nowrap;border-radius:30px;padding:9px 14px;font-size:13px}.status-light{background:#91db9d;border-radius:50%;width:7px;height:7px;margin-right:8px;display:inline-block;box-shadow:0 0 12px #91db9d}.page-content{flex:1;width:min(1220px,100% - 36px);margin:0 auto;padding:38px 0 64px}.hero{justify-content:space-between;align-items:flex-end;gap:40px;padding:38px 4px 46px;display:flex}.hero-copy{max-width:700px}.eyebrow{letter-spacing:.23em;color:var(--accent);font-size:11px;font-weight:800}.hero h1{letter-spacing:-.065em;margin:19px 0 14px;font-size:clamp(38px,5vw,69px);line-height:1.08}.hero h1 em{color:var(--accent);font-style:normal}.hero p{max-width:580px;color:var(--muted);margin:0 0 24px;line-height:1.75}.hero-actions,.action-row{flex-wrap:wrap;gap:12px;display:flex}.hero-stats{gap:30px;padding:0 0 9px;display:flex}.hero-stats>div{flex-direction:column;gap:8px;display:flex}.hero-stats b{font-size:25px}.hero-stats span{color:var(--muted);white-space:nowrap;text-transform:uppercase;letter-spacing:.08em;font-size:11px}.lobby-layout,.match-layout,.editor-layout{grid-template-columns:minmax(0,1.4fr) minmax(300px,.8fr);align-items:start;gap:22px;display:grid}.editor-layout{grid-template-columns:minmax(300px,.8fr) minmax(0,1.4fr)}.panel{border:1px solid var(--border);background:linear-gradient(145deg,#192231,#121a26);border-radius:20px;padding:26px;box-shadow:0 14px 60px #0002}.panel h2{letter-spacing:-.025em;margin:0 0 14px;font-size:20px}.panel h3{margin:24px 0 12px;font-size:14px}.panel-heading{justify-content:space-between;align-items:center;gap:12px;margin-bottom:23px;display:flex}.panel-heading h2{margin:0}.panel-heading span{color:var(--muted);font-size:13px}.board-panel{min-width:0}.board-scroll{width:100%;padding-bottom:2px;overflow-x:auto}.chess-board{aspect-ratio:auto;border:2px solid #424b56;border-radius:12px;display:grid;overflow:hidden;box-shadow:0 4px 30px #0005}.square{aspect-ratio:1;border:0;border-radius:0;place-items:center;min-width:0;padding:0;transition:box-shadow .15s;display:grid;position:relative}.square.light{background:#d7e4da}.square.dark{background:#72938b}.square:hover{box-shadow:inset 0 0 0 3px #b1dec9}.square.selected{box-shadow:inset 0 0 0 4px #ffdf85}.square.legal{box-shadow:inset 0 0 0 3px #c1dca0}.chess-piece-image{object-fit:contain;-webkit-user-select:none;user-select:none;pointer-events:none;filter:drop-shadow(0 1px 1px #07121966);width:96%;height:96%;display:block}.coin{z-index:1;color:#e5d69e;background:#283c3b;border:3px double #f1d89c;border-radius:50%;place-items:center;width:65%;height:65%;font-size:clamp(12px,2vw,24px);font-weight:800;display:grid;position:relative;box-shadow:0 2px 4px #0007}.legal-dot{aspect-ratio:1;z-index:0;background:#203b2c88;border-radius:50%;width:22%;position:absolute}.muted{color:var(--muted);font-size:14px;line-height:1.7}.side-panel>.muted{margin-bottom:22px}.templates{flex-direction:column;gap:10px;margin:20px 0;display:flex}.template-option{border:1px solid var(--border);width:100%;color:var(--text);text-align:left;background:#192330;border-radius:13px;align-items:center;gap:13px;padding:14px;transition:background .15s;display:flex}.template-option.active,.template-option:hover{background:#243830;border-color:#739a8d}.template-symbol{width:42px;height:42px;color:var(--accent);background:#293744;border-radius:9px;flex-shrink:0;place-items:center;font-size:24px;display:grid}.template-option>span:nth-child(2){flex:1;min-width:0}.template-option strong{font-size:13px;display:block}.template-option small{color:var(--muted);margin-top:5px;display:block}.tip{background:#193029;border:1px solid #315b4e;border-radius:14px;gap:12px;margin-top:22px;padding:18px;display:flex}.tip>span{color:var(--accent);font-size:22px}.tip strong{font-size:13px}.tip p{color:#afc6bd;margin:8px 0 0;font-size:13px;line-height:1.6}.field-label{color:#c4d1d0;flex-direction:column;gap:8px;margin-bottom:16px;font-size:12px;font-weight:650;display:flex}.field-label input,.field-label select{width:100%;color:var(--text);background:#0d1720;border:1px solid #3c4b55;border-radius:9px;padding:11px 12px}.pair{grid-template-columns:1fr 1fr;gap:12px;display:grid}.section-separator{background:var(--border);height:1px;margin:24px 0}.segmented,.palette,.chip-group,.custom-options{flex-wrap:wrap;gap:8px;display:flex}.segmented{margin-bottom:14px}.segmented button,.palette button,.chip-group button{color:#e5eded;background:#23303f;border:1px solid #39495b;border-radius:9px;padding:9px 12px}.segmented button[aria-pressed=true],.palette button.active,.chip-group button.active{color:var(--accent);background:#2c4f45;border-color:#b7deb0}.palette button{min-width:39px}.custom-options{color:var(--muted);margin-top:12px;font-size:12px}.custom-options label{align-items:center;gap:4px;display:flex}.board-footer{color:var(--muted);justify-content:space-between;gap:15px;margin-top:17px;font-size:13px;display:flex}.ready-status,.match-info{color:#c4ded4;background:#1e3035;border-radius:10px;margin:17px 0;padding:15px;font-size:14px}.match-info{flex-direction:column;gap:13px;display:flex}.match-info>div{justify-content:space-between;display:flex}.match-info span{color:var(--muted)}.hint-text{color:#d1bb89;font-size:13px}.coin-choice{background:#1d2b38;border:1px solid #334757;border-radius:13px;margin-bottom:17px;padding:15px}.coin-choice h3{margin:0 0 14px}.pulsing-icon{color:var(--accent);text-align:center;font-size:76px;animation:2s infinite pulse}@keyframes pulse{50%{opacity:.35;transform:scale(.95)}}.error-banner{color:#f7cbd2;background:#543037;border:1px solid #a65d65;border-radius:11px;justify-content:space-between;margin-bottom:18px;padding:13px 18px;display:flex}.error-banner button{color:inherit;background:0 0;border:0}.modal-backdrop{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:20;background:#05080bd9;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.result-modal{text-align:center;background:#182431;border:1px solid #3b5355;border-radius:22px;flex-direction:column;gap:14px;width:min(430px,100%);padding:34px;display:flex;box-shadow:0 30px 90px #0009}.result-modal h2{margin:0;font-size:27px}.result-modal p{color:var(--muted);margin:0 0 10px}.result-symbol{color:var(--accent);font-size:65px}footer{border-top:1px solid var(--border);color:#70808b;letter-spacing:.15em;justify-content:space-between;gap:10px;padding:23px max(24px,50vw - 610px);font-size:10px;display:flex}footer span{letter-spacing:normal}@media (max-width:920px){.hero{flex-direction:column;align-items:start;padding:10px 4px 30px}.lobby-layout,.match-layout,.editor-layout{grid-template-columns:1fr}.editor-controls{order:2}.board-panel{order:1}.side-panel{order:2}.hero-stats{gap:35px}}@media (max-width:540px){.app-header{padding:14px 18px}.header-status{padding:11px;font-size:0}.header-status .status-light{margin:0}.page-content{width:min(100% - 24px,1220px);padding:24px 0 50px}.panel{border-radius:14px;padding:16px}.hero h1{font-size:40px}.hero-stats b{font-size:19px}.hero-stats{gap:20px}.board-footer{font-size:11px}}.header-controls{flex-wrap:wrap;align-items:center;gap:12px;display:flex}.piece-set-select{color:var(--muted);align-items:center;gap:8px;font-size:12px;display:flex}.piece-set-select select{border:1px solid var(--border);background:var(--panel);color:var(--text);border-radius:8px;padding:8px}.coin-modal{width:min(520px,100%)}.coin-option-grid{grid-template-columns:repeat(auto-fit,minmax(108px,1fr));gap:10px;display:grid}.coin-option{color:var(--text);background:#233341;border:1px solid #445766;border-radius:12px;flex-direction:column;align-items:center;gap:7px;padding:10px;display:flex}.coin-option .chess-piece-image{width:66px;height:66px}.coin-option:hover,.coin-option:focus-visible{border-color:var(--accent);background:#314a46}@media (max-width:540px){.app-header{flex-wrap:wrap}.header-controls{justify-content:space-between;width:100%}.coin-modal{padding:22px}}.open-matches{margin-bottom:24px}.open-matches-heading{justify-content:space-between;align-items:baseline;gap:12px;display:flex}.open-matches-heading span{color:var(--muted);font-size:13px}.open-matches-list{grid-template-columns:repeat(auto-fill,minmax(min(280px,100%),1fr));gap:12px;display:grid}.open-match{border:1px solid var(--border);background:#1a2732;border-radius:12px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;padding:16px;display:flex}.open-match strong{overflow-wrap:anywhere;display:block}.open-match small{color:var(--muted);margin-top:6px;display:block}.match-tabs{scrollbar-width:thin;gap:8px;margin-bottom:16px;padding:4px 0 16px;display:flex;overflow-x:auto}.match-tab{border:1px solid var(--border);max-width:220px;min-height:50px;color:var(--text);text-align:left;background:#182431;border-radius:11px;flex-direction:column;flex:none;justify-content:center;align-items:flex-start;gap:3px;padding:9px 15px;display:flex}.match-tab.active{border-color:var(--accent);background:#244239}.match-tab-name{text-overflow:ellipsis;white-space:nowrap;max-width:180px;font-size:13px;font-weight:700;overflow:hidden}.match-tab-info{color:var(--muted);font-size:11px}.match-tab.active .match-tab-info{color:#c5e7d3}.match-tab-heading{justify-content:space-between;align-items:flex-start;gap:8px;width:100%;display:flex}.match-tab-heading .match-tab-name{flex:1;min-width:0}.match-tab-alerts{flex-direction:column;flex:none;align-items:flex-end;gap:3px;display:flex}.match-tab-badge{color:#d2ffe0;white-space:nowrap;background:#234a37;border:1px solid #8ac79d;border-radius:7px;padding:3px 5px;font-size:10px;font-weight:800;line-height:1.2}.match-tab-badge.check{color:#ffe7e7;background:#642836;border-color:#f199a1}.match-tab:has(.match-tab-alerts){max-width:260px}.square.in-check,.square.in-check.light,.square.in-check.dark{background:radial-gradient(circle,#ff8686 0%,#d94e59 64%,#8b2638 100%);box-shadow:inset 0 0 0 4px #ff303d}.square.in-check.selected{box-shadow:inset 0 0 0 4px #ff303d,inset 0 0 0 7px #ffdf85}.square.in-check:after{content:"!";z-index:2;color:#fff;text-shadow:0 1px 2px #4a0a17;pointer-events:none;font-size:13px;font-weight:900;position:absolute;top:2px;right:5px}.player-name button,.player-name input{border:1px solid var(--border);background:var(--panel);color:var(--text);border-radius:9px;max-width:160px;padding:8px 10px}.player-name button{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.player-name button span{color:var(--accent)}.player-name input{width:150px}.editor-preset-row{justify-content:flex-end;max-width:544px;margin:0 0 8px;display:flex}.editor-preset-select{min-width:140px;max-width:100%;color:var(--text);text-align:right;background:0 0;border:0;border-radius:6px;padding:4px 8px}.editor-interactive{touch-action:none;-webkit-user-select:none;user-select:none;--board-light:#d7e4da;--board-dark:#72938b}.editor-interactive .square.light{background:var(--board-light)}.editor-interactive .square.dark{background:var(--board-dark)}.editor-interactive.board-style-1{--board-light:#f0d9b5;--board-dark:#b58863}.editor-interactive.board-style-2{--board-light:#eeeed2;--board-dark:#769656}.editor-interactive.board-style-3{--board-light:#f5f5f5;--board-dark:#888e99}.editor-interactive.board-style-4{--board-light:#d9ebf3;--board-dark:#4d7791}.editor-interactive.board-style-5{--board-light:#e9d8d1;--board-dark:#956e78}.editor-interactive.board-style-6{--board-light:#fff1d6;--board-dark:#ae8556}.editor-interactive.board-style-7{--board-light:#dfdddd;--board-dark:#5e5e5e}.editor-interactive.board-style-8{--board-light:#d6e6e2;--board-dark:#397c83}.editor-interactive.board-style-9{--board-light:#f3e6ef;--board-dark:#a6759b}.editor-interactive.board-style-10{--board-light:#f5dfa3;--board-dark:#966f38}.editor-interactive.board-style-11{--board-light:#d3e4f0;--board-dark:#4974a2}.editor-interactive.board-style-12{--board-light:#e7e0ff;--board-dark:#665d9e}.editor-interactive.board-style-13{--board-light:#d6f0d0;--board-dark:#468e58}.editor-interactive.board-style-14{--board-light:#ffe3da;--board-dark:#a55947}.editor-interactive.board-style-15{--board-light:#c4d0d4;--board-dark:#36474f}.editor-interactive.multi-touch .square{pointer-events:none}.editor-turn-row{justify-content:center;max-width:544px;padding-top:10px;display:flex}.editor-turn{color:var(--text);background:0 0;border:0;border-radius:50%;padding:5px;font-size:27px;line-height:1}.editor-save-dialog{border:1px solid var(--border);background:var(--panel);border-radius:18px;flex-direction:column;gap:12px;width:min(430px,100%);padding:25px;display:flex}.editor-save-dialog input{width:100%;color:var(--text);background:#101823;border:1px solid #5d7576;border-radius:9px;padding:13px}.editor-delete-template{color:#eab0ae;background:0 0;border:0;align-self:flex-end}.editor-turn-row{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:stretch;width:100%;min-height:52px;display:grid}.editor-invisible-zone{appearance:none;touch-action:manipulation;background:0 0;border:0;width:100%;min-height:52px;padding:0;display:block}.command-trigger{border:1px solid var(--border);color:var(--text);background:0 0;border-radius:8px;padding:6px 11px;font-weight:800}.command-overlay{border:1px solid var(--border);background:var(--panel);border-radius:16px;width:min(560px,100%);max-height:min(82vh,720px);padding:24px;overflow-y:auto;box-shadow:0 20px 70px #0009}.command-overlay input{width:100%;color:var(--text);background:#0d1720;border:1px solid #637c80;border-radius:9px;padding:12px 14px;font-size:19px}.command-overlay p{margin:12px 0 0}.command-help h3{margin:18px 0 8px}.command-help dl{gap:0;margin:0;display:grid}.command-help dl>div{border-bottom:1px solid var(--border);grid-template-columns:minmax(145px,.8fr) minmax(0,1.2fr);gap:18px;padding:9px 0;display:grid}.command-help dd{color:var(--muted);margin:0}.command-help code{white-space:normal}@media (max-width:540px){.command-help dl>div{grid-template-columns:minmax(0,1fr);gap:3px}}
.app-shell{--tile-light:#ffedf1;--tile-dark:#af3958;--glow:#6c183a55;--control:#281821;--surface:#211823;--surface-raised:#321d2c;--text:#fff7f8;--muted:#c9adb7;--border:#633b4c;--accent:#ce1344;--accent-contrast:#fff;background:radial-gradient(ellipse at 20% -6%, var(--glow), transparent 42%), var(--bg);color:var(--text);transition:background-color .18s,color .18s}.app-shell[data-brand-theme=ruby]{--bg:#160d15;--panel:#261824;--tile-light:#ffe9ef;--tile-dark:#a3395c;--glow:#ac164455}.app-shell[data-brand-theme=gold]{--bg:#19140b;--panel:#2a2315;--surface:#2b2419;--surface-raised:#3a3020;--text:#fff8e9;--muted:#d4c7ab;--border:#6e5833;--accent:#d8a641;--tile-light:#fff3d3;--tile-dark:#b48c40;--control:#282013;--glow:#d8a64133;--accent-contrast:#211808}.app-shell[data-brand-theme=ember]{--bg:#180f0b;--panel:#2c1d16;--surface:#2c1b17;--surface-raised:#3c251c;--text:#fff3ec;--muted:#e0b6a5;--border:#79452e;--accent:#ff501a;--tile-light:#ffe9d5;--tile-dark:#c66b46;--control:#29190f;--glow:#ff501a38;--accent-contrast:#1c100b}.app-shell[data-brand-theme=emerald]{--bg:#0c1710;--panel:#17291c;--surface:#1b2c20;--surface-raised:#25432a;--text:#f2fff1;--muted:#b5d0b8;--border:#365d40;--accent:#39b54a;--tile-light:#e4f5df;--tile-dark:#449254;--control:#142219;--glow:#39b54a30;--accent-contrast:#071909}.app-shell[data-brand-theme=amethyst]{--bg:#150f1e;--panel:#241b31;--surface:#271d34;--surface-raised:#37244a;--text:#faf4ff;--muted:#cfbbdb;--border:#5b4470;--accent:#8f55bd;--tile-light:#f3e8fa;--tile-dark:#8860a3;--control:#24192e;--glow:#662d915c;--accent-contrast:#fff}.app-shell[data-brand-theme=navy]{--bg:#eef1f8;--panel:#fff;--surface:#fff;--surface-raised:#e7ebf8;--text:#171a49;--muted:#586082;--border:#c7cfe3;--accent:#171a49;--tile-light:#eef1fb;--tile-dark:#7487b0;--control:#e3e8f5;--glow:#a4b3d666;--accent-contrast:#fff}.app-shell[data-brand-theme=navy],.app-shell[data-brand-theme=rose-noir]{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}.app-shell[data-brand-theme=rose-noir]{--bg:#fbf3f5;--panel:#fff;--surface:#fff;--surface-raised:#ffe8ef;--text:#171a49;--muted:#725668;--border:#e7bcc9;--accent:#ce1344;--tile-light:#ffeff1;--tile-dark:#ac466b;--control:#fff1f4;--glow:#f5c1d166;--accent-contrast:#fff}.app-shell .app-header,.app-shell .brand-footer{background:var(--surface);border-color:var(--border);color:var(--muted)}.app-shell .app-header{min-height:84px;padding-top:9px;padding-bottom:9px}.app-shell .brand{color:var(--accent);gap:14px;text-decoration:none}.app-shell .brand-wordmark{object-fit:contain;flex-shrink:0;width:120px;height:79px;display:block}.app-shell .brand-theme-name{color:var(--muted);letter-spacing:.08em;text-transform:uppercase;font-size:12px}.app-shell .header-status,.app-shell .piece-set-select select,.app-shell .player-name button,.app-shell .player-name input,.app-shell .command-trigger,.app-shell .match-tab,.app-shell .template-option,.app-shell .editor-save-dialog,.app-shell .command-overlay{color:var(--text);background:var(--control);border-color:var(--border)}.app-shell .status-light{background:var(--accent);box-shadow:0 0 9px var(--accent)}.app-shell .page-content{width:min(1320px,100% - 32px);padding-top:14px}.app-shell .match-tabs{margin-bottom:4px;padding-bottom:10px}.app-shell .match-tab.active,.app-shell .template-option.active{border-color:var(--accent);background:var(--surface-raised)}.app-shell .match-tab.active .match-tab-info{color:var(--muted)}.app-shell .panel,.app-shell .lobby-create-panel{background:var(--surface);border-color:var(--border);color:var(--text);box-shadow:0 18px 60px #00000012}.app-shell .panel-heading span,.app-shell .open-matches-heading span,.app-shell .muted,.app-shell .board-footer,.app-shell .open-match small,.app-shell .piece-set-select,.app-shell .editor-preset-select{color:var(--muted)}.app-shell .eyebrow{color:var(--accent)}.app-shell .lobby-layout{grid-template-columns:minmax(0,1.5fr) minmax(315px,.9fr);align-items:start;gap:18px;display:grid}.app-shell .lobby-board-column{min-width:0}.app-shell .lobby-board-column .editor-board{padding:16px}.app-shell .lobby-rail{align-content:start;gap:16px;min-width:0;display:grid}.app-shell .lobby-create-panel{gap:12px;display:grid}.app-shell .lobby-create-panel h1{letter-spacing:-.04em;margin:0;font-size:clamp(22px,2.4vw,32px);line-height:1.2}.app-shell .lobby-create-panel p{margin:0 0 6px}.app-shell .lobby-create-panel button{background:var(--accent);color:var(--accent-contrast);border-color:var(--accent);justify-self:stretch}.app-shell .open-matches{margin:0}.app-shell .open-matches-list{grid-template-columns:1fr}.app-shell .open-match{background:var(--control);border-color:var(--border)}.app-shell .editor-preset-row{padding-top:0}.app-shell .editor-interactive{--board-light:var(--tile-light);--board-dark:var(--tile-dark)}.app-shell .square.light,.app-shell .editor-interactive .square.light{background:var(--tile-light)}.app-shell .square.dark,.app-shell .editor-interactive .square.dark{background:var(--tile-dark)}.app-shell .chess-board{border-color:var(--border);border-radius:6px;box-shadow:0 12px 38px #00000025}.app-shell .square:hover{box-shadow:inset 0 0 0 3px var(--accent)}.app-shell .square.selected{box-shadow:inset 0 0 0 4px var(--accent)}.app-shell .square.in-check{background:radial-gradient(circle,#ff8686,#ba273f)}.app-shell .editor-turn{color:var(--text)}.app-shell .brand-footer{letter-spacing:normal;align-items:center;padding-top:14px;padding-bottom:14px}.app-shell .footer-brand{color:var(--text);align-items:center;gap:10px;font-size:13px;font-weight:700;display:flex}.app-shell .footer-brand img{object-fit:contain}@media (max-width:980px){.app-shell .lobby-layout{grid-template-columns:1fr}.app-shell .lobby-rail{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}.app-shell .lobby-board-column{order:0}.app-shell .lobby-rail{order:1}}@media (max-width:640px){.app-shell .app-header{padding:10px 16px}.app-shell .brand-wordmark{width:100px;height:66px}.app-shell .brand-theme-name{font-size:10px}.app-shell .page-content{width:min(100% - 20px,1320px);padding-top:8px}.app-shell .lobby-rail{grid-template-columns:1fr}.app-shell .lobby-board-column .editor-board{padding:10px}.app-shell .open-matches{margin:0}.app-shell .brand-footer{flex-direction:column;align-items:flex-start;gap:8px}}@media (prefers-reduced-motion:reduce){.app-shell{transition:none}}
