@font-face{font-family:GeistSans;src:url(../media/Geist_Variable-s.p.2hh2rqmrrgs5n.woff2)format("woff2");font-display:swap;font-weight:100 900}@font-face{font-family:GeistSans Fallback;src:local(Arial);ascent-override:94.56%;descent-override:27.76%;line-gap-override:0.0%;size-adjust:106.28%}.Ur3q_a_className{font-family:GeistSans,GeistSans Fallback}.Ur3q_a_variable{--font-geist-sans:"GeistSans", "GeistSans Fallback"}
@font-face{font-family:GeistMono;src:url(../media/GeistMono_Variable.p.1fz3wige2_h0o.woff2)format("woff2");font-display:swap;font-weight:100 900}.iaM1Ya_className{font-family:GeistMono,ui-monospace,SFMono-Regular,Roboto Mono,Menlo,Monaco,Liberation Mono,DejaVu Sans Mono,Courier New,monospace}.iaM1Ya_variable{--font-geist-mono:"GeistMono", ui-monospace, SFMono-Regular, Roboto Mono, Menlo, Monaco, Liberation Mono, DejaVu Sans Mono, Courier New, monospace}
:root,:root[data-theme=midnight]{--bg:#080f1d;--surface:#101a2b;--surface-2:#18253a;--surface-3:#1e2d45;--text:#f7f9fc;--muted:#a9b5c8;--border:#29364b;--primary:#4f86ff;--primary-strong:#346bd9;--primary-soft:#1c345b;--danger:#ff6b7a;--success:#3dd6a7;--warning:#f7c66d;--board-light:#eef3f7;--board-dark:#4f7699;--piece-white:#fffef8;--piece-black:#111827;--piece-outline-dark:#182033;--piece-highlight:#dbe4f0;--piece-shadow:drop-shadow(0 2px 1px #00000052);--shadow:#00000057;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}:root[data-theme=classic_wood]{--bg:#17120d;--surface:#261c14;--surface-2:#33241a;--surface-3:#44301f;--text:#fffaf2;--muted:#d8cabc;--border:#574636;--primary:#d79a52;--primary-strong:#bd7d35;--primary-soft:#523a28;--danger:#ef7c70;--success:#76c995;--warning:#f1ca73;--board-light:#f0d9b5;--board-dark:#8b5a33;--piece-white:#fffaf2;--piece-black:#24180f;--shadow:#0a05026b;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}:root[data-theme=emerald]{--bg:#061712;--surface:#0d2520;--surface-2:#15352d;--surface-3:#1d453b;--text:#f4fff9;--muted:#b8d3c9;--border:#30554a;--primary:#39c794;--primary-strong:#249875;--primary-soft:#17483d;--danger:#ff8088;--success:#65e1b4;--warning:#f1cb72;--board-light:#eeeed2;--board-dark:#769656;--piece-white:#fbfffd;--piece-black:#071711;--shadow:#000f0a6b;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}:root[data-theme=royal]{--bg:#100d20;--surface:#1b1730;--surface-2:#292346;--surface-3:#342b59;--text:#fbfaff;--muted:#c5c1d9;--border:#47406a;--primary:#9b7cf7;--primary-strong:#7b56df;--primary-soft:#3b3272;--danger:#ff7d91;--success:#55dcb1;--warning:#f3cd71;--board-light:#e5dcf6;--board-dark:#7461a8;--piece-white:#fff;--piece-black:#16122a;--shadow:#07051473;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}:root[data-theme=light]{--bg:#edf2f8;--surface:#fff;--surface-2:#f4f7fb;--surface-3:#e6edf7;--text:#172033;--muted:#5d6980;--border:#d7dfeb;--primary:#315ed8;--primary-strong:#244aaf;--primary-soft:#dce6ff;--danger:#c72e43;--success:#087c61;--warning:#9a6700;--board-light:#f5f7fa;--board-dark:#91a8c7;--piece-white:#fff;--piece-black:#172033;--shadow:#23325024;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}:root[data-theme=high_contrast]{--bg:#000;--surface:#111;--surface-2:#1b1b1b;--surface-3:#292929;--text:#fff;--muted:#ddd;--border:#fff;--primary:#00a3ff;--primary-strong:#0079bd;--primary-soft:#003d61;--danger:#ff4d5f;--success:#00efad;--warning:#ffdc00;--board-light:#fff;--board-dark:#555;--piece-white:#fff;--piece-black:#000;--shadow:#000000b3;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}html{background:var(--bg);min-height:100%}body{background:var(--bg);min-height:100vh;color:var(--text);font-family:var(--font-geist-sans),Inter,system-ui,sans-serif;margin:0}button,input,select{font:inherit}button,a,input,select{outline:none}button,a{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.48}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid color-mix(in srgb,var(--primary) 72%,white);outline-offset:2px}button:active:not(:disabled){transform:translateY(1px)}.app-shell{min-height:100vh;display:flex}.sidebar{background:var(--surface);border-right:1px solid var(--border);z-index:40;flex-direction:column;flex:none;width:248px;height:100vh;padding:20px 14px;display:flex;position:sticky;top:0}.sidebar-brand{border-bottom:1px solid var(--border);align-items:center;gap:12px;padding:4px 8px 18px;display:flex}.sidebar-brand strong,.sidebar-brand small{display:block}.sidebar-brand strong{letter-spacing:.09em;font-size:.95rem}.sidebar-brand small{color:var(--muted);margin-top:2px}.brand-orbit{background:var(--primary);color:#fff;width:40px;height:40px;box-shadow:0 8px 25px color-mix(in srgb,var(--primary) 30%,transparent);border-radius:14px;place-items:center;display:grid}.close-nav{margin-left:auto;display:none}.nav-list{flex-direction:column;gap:5px;margin-top:18px;display:flex}.nav-item{width:100%;color:var(--muted);text-align:left;background:0 0;border:1px solid #0000;border-radius:12px;align-items:center;gap:12px;padding:11px 12px;font-weight:650;transition:all .16s;display:flex}.nav-item svg{width:19px}.nav-item svg:last-child{width:16px;margin-left:auto}.nav-item:hover{background:var(--surface-2);color:var(--text)}.nav-item.active{background:var(--primary-soft);border-color:color-mix(in srgb,var(--primary) 48%,var(--border));color:var(--text)}.sidebar-footer{margin-top:auto;padding:14px 10px}.security{color:var(--muted);align-items:center;gap:8px;font-size:.78rem;display:flex}.security svg{width:16px;color:var(--success)}.content-shell{flex:1;min-width:0}.topbar{z-index:30;background:color-mix(in srgb,var(--surface) 94%,transparent);border-bottom:1px solid var(--border);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);align-items:center;gap:16px;height:76px;padding:12px 28px;display:flex;position:sticky;top:0}.search-wrap{border:1px solid var(--border);background:var(--surface-2);border-radius:13px;align-items:center;gap:10px;width:min(520px,43vw);padding:0 13px;display:flex;position:relative}.search-wrap>svg{width:19px;color:var(--muted)}.search-wrap input{width:100%;height:42px;color:var(--text);background:0 0;border:0}.search-results,.topbar-menu{background:var(--surface);border:1px solid var(--border);box-shadow:0 18px 55px var(--shadow);border-radius:15px;position:absolute;top:calc(100% + 8px);overflow:hidden}.search-results{width:min(520px,90vw);padding:6px;left:0}.search-results>button{width:100%;color:var(--text);text-align:left;background:0 0;border:0;border-radius:10px;align-items:center;gap:10px;padding:10px;display:flex}.search-results>button:hover{background:var(--surface-2)}.search-results p{color:var(--muted);padding:12px}.topbar-actions{align-items:center;gap:8px;margin-left:auto;display:flex}.icon-button{border:1px solid var(--border);background:var(--surface-2);width:40px;height:40px;color:var(--text);border-radius:11px;place-items:center;transition:all .16s;display:grid;position:relative}.icon-button:hover{background:var(--surface-3)}.icon-button svg{width:19px}.profile-chip{border:1px solid var(--border);background:var(--surface-2);color:var(--text);border-radius:13px;align-items:center;gap:9px;padding:6px 9px;display:flex}.profile-chip>span:nth-child(2){text-align:left}.profile-chip strong,.profile-chip small{display:block}.profile-chip strong{font-size:.86rem}.profile-chip small{color:var(--muted);font-size:.72rem}.profile-chip svg{width:15px}.avatar{background:var(--primary);color:#fff;border-radius:50%;place-items:center;width:34px;height:34px;font-size:.72rem;font-weight:800;display:grid}.topbar-menu{width:220px;padding:8px;right:28px}.topbar-menu button{width:100%;color:var(--text);text-align:left;background:0 0;border:0;border-radius:9px;align-items:center;gap:10px;padding:11px;display:flex}.topbar-menu button:hover{background:var(--surface-2)}.topbar-menu button svg{width:18px}.topbar-menu hr{border:0;border-top:1px solid var(--border)}.danger-text{color:var(--danger)!important}.empty-menu{text-align:center;padding:18px 10px}.empty-menu svg{color:var(--muted)}.empty-menu p{color:var(--muted);margin:5px}.notification-dot{border:2px solid var(--surface);background:var(--danger);border-radius:50%;width:7px;height:7px;position:absolute;top:7px;right:8px}.menu-button{display:none}.main-panel{min-height:calc(100vh - 76px);padding:28px}.page-enter{max-width:1380px;margin:auto}.page-stack{flex-direction:column;gap:22px;display:flex}.page-header,.welcome-card,.panel,.stat-card,.tournament-card,.wallet-balance,.mini-wallet,.profile-hero{background:var(--surface);border:1px solid var(--border);border-radius:18px}.page-header{justify-content:space-between;align-items:center;gap:20px;padding:24px;display:flex}.page-header h1,.welcome-card h1{margin:4px 0 8px;font-size:clamp(1.7rem,3vw,2.45rem);line-height:1.08}.page-header p:last-child,.welcome-card p:last-child{color:var(--muted);margin:0}.eyebrow{text-transform:uppercase;letter-spacing:.16em;margin:0;font-size:.72rem;font-weight:800;color:var(--primary)!important}.panel{padding:20px}.panel-heading{justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px;display:flex}.panel-heading h2{margin:4px 0 0;font-size:1.25rem}.button-row{align-items:center;gap:10px;display:flex}.button{border:1px solid #0000;border-radius:11px;justify-content:center;align-items:center;gap:8px;min-height:42px;padding:10px 15px;font-weight:750;transition:all .16s;display:inline-flex}.button svg{width:18px}.button.primary{background:var(--primary);color:#fff}.button.primary:hover{background:var(--primary-strong)}.button.secondary{background:var(--surface-2);border-color:var(--border);color:var(--text)}.button.secondary:hover{background:var(--surface-3)}.button.ghost{color:var(--muted);background:0 0}.button.ghost:hover{background:var(--surface-2);color:var(--text)}.button.danger{border-color:color-mix(in srgb,var(--danger) 55%,var(--border));color:var(--danger);background:0 0}.button.full{width:100%}.icon-only{width:42px;padding:0}.welcome-card{background:linear-gradient(135deg,var(--surface),var(--surface-2));justify-content:space-between;align-items:center;gap:20px;padding:28px;display:flex}.stat-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;display:grid}.stat-card{border:1px solid var(--border);width:100%;color:var(--text);text-align:left;border-radius:16px;align-items:center;gap:13px;padding:17px;display:flex}.stat-card>span{background:var(--primary-soft);width:43px;height:43px;color:var(--primary);border-radius:12px;place-items:center;display:grid}.stat-card>svg{width:17px;color:var(--muted);margin-left:auto}.stat-card small,.stat-card strong{display:block}.stat-card small{color:var(--muted);font-size:.78rem}.stat-card strong{margin-top:5px;font-size:1.22rem}.stat-card:not(.static):hover,.stat-card.static:hover{border-color:var(--primary);box-shadow:0 12px 35px var(--shadow)}.dashboard-grid{grid-template-columns:minmax(0,1.55fr) minmax(280px,.45fr);gap:18px;display:grid}.activity-list{flex-direction:column;display:flex}.activity-row{border:0;border-top:1px solid var(--border);width:100%;color:var(--text);text-align:left;background:0 0;align-items:center;gap:12px;padding:13px 2px;display:flex}.activity-row:first-child{border-top:0}.activity-row:hover{background:var(--surface-2)}.activity-row div{flex-direction:column;display:flex}.activity-row small{color:var(--muted)}.activity-row>svg{width:16px;color:var(--muted);margin-left:auto}.opponent-avatar{background:var(--surface-3);border-radius:11px;place-items:center;width:37px;height:37px;display:grid}.rating-line{align-items:center;gap:12px;display:flex}.rating-line>strong{font-size:3.2rem}.rating-panel>p:last-of-type{color:var(--muted)}.mini-progress{background:var(--surface-3);border-radius:99px;height:7px;overflow:hidden}.mini-progress span{background:var(--primary);height:100%;display:block}.record-row{grid-template-columns:repeat(3,1fr);gap:8px;margin-top:20px;display:grid}.record-row span{border-right:1px solid var(--border);text-align:center}.record-row span:last-child{border:0}.record-row small,.record-row strong{display:block}.record-row small{color:var(--muted)}.badge{border:1px solid var(--border);background:var(--surface-2);width:max-content;color:var(--muted);border-radius:99px;align-items:center;gap:5px;padding:5px 9px;font-size:.72rem;font-weight:750;display:inline-flex}.badge.provisional{background:var(--warning);color:#302000;border-color:#0000}.badge.warn{color:var(--warning)}.inline-badge{color:var(--warning);margin-left:8px;font-size:.64rem}.empty-state{text-align:center;flex-direction:column;justify-content:center;align-items:center;min-height:220px;padding:32px;display:flex}.empty-icon{background:var(--primary-soft);width:58px;height:58px;color:var(--primary);border-radius:18px;place-items:center;display:grid}.empty-icon svg{width:27px}.empty-state h3{margin:14px 0 5px}.empty-state p{max-width:440px;color:var(--muted);margin:0 0 16px}.play-layout{grid-template-columns:minmax(460px,820px) minmax(280px,380px);align-items:start;gap:18px;display:grid}.board-panel{min-width:0}.game-controls{gap:8px;margin-bottom:14px;display:flex}.board-frame{width:min(100%,640px);margin:12px auto}.board-grid{aspect-ratio:1;width:100%;box-shadow:0 14px 35px var(--shadow);border:0;border-radius:3px;grid-template-columns:repeat(8,minmax(0,1fr));display:grid;overflow:hidden}.board-square{aspect-ratio:1;border:0;border-radius:0;place-items:center;width:100%;min-width:0;padding:0;transition:filter .12s,box-shadow .12s;display:grid;position:relative}.board-square.light{background:var(--board-light);color:var(--board-dark)}.board-square.dark{background:var(--board-dark);color:var(--board-light)}.board-square:hover{filter:brightness(1.045)}.board-square.selected{box-shadow:inset 0 0 0 5px #ffe15cd1}.board-square.last-move{box-shadow:inset 0 0 0 999px #f7c66d57}.board-square.check{box-shadow:inset 0 0 0 999px #dc35457a}.board-square.legal:after{content:"";z-index:3;pointer-events:none;background:#23363247;border-radius:50%;width:27%;height:27%;position:absolute}.board-square.legal:has(.chess-piece):after{background:0 0;border:5px solid #23363257;width:86%;height:86%}.chess-piece{z-index:2;object-fit:contain;filter:drop-shadow(0 1px 1px #00000047);pointer-events:none;-webkit-user-select:none;user-select:none;width:94%;height:94%;position:relative}.coordinate-file,.coordinate-rank{z-index:4;font-family:var(--font-geist-sans),Inter,sans-serif;opacity:.95;text-transform:lowercase;pointer-events:none;font-size:clamp(.56rem,1.35vw,.72rem);font-weight:850;line-height:1;position:absolute}.coordinate-file{bottom:3px;right:3.5px}.coordinate-rank{top:3px;left:3.5px}.clock-row{grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;display:grid}.clock-card{border:1px solid var(--border);border-radius:12px;justify-content:space-between;align-items:baseline;padding:9px 12px;display:flex}.clock-card.active{border-color:var(--primary);background:var(--primary-soft)}.clock-card small{color:var(--muted)}.clock-card strong{font-family:var(--font-geist-mono),monospace;font-size:1.25rem}.captured{text-align:center;justify-content:center;align-items:center;min-height:26px;display:flex}.captured-piece{object-fit:contain;filter:drop-shadow(0 1px 1px #0000003d);margin-left:-4px;width:20px!important;height:20px!important}.captured-piece:first-child{margin-left:0}.captured-bottom{text-align:center;margin:-3px auto 8px}.game-status{border-top:1px solid var(--border);color:var(--muted);align-items:center;gap:8px;padding-top:14px;display:flex}.game-status .button{margin-left:auto}.status-dot{background:var(--success);border-radius:50%;width:8px;height:8px}.waiting-panel{position:sticky;top:94px}.waiting-row{border-top:1px solid var(--border);justify-content:space-between;align-items:center;gap:12px;padding:14px 0;display:flex}.waiting-row:first-child{border-top:0}.waiting-row strong,.waiting-row small{display:block}.waiting-row small{color:var(--muted)}.tournament-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;display:grid}.tournament-card{padding:19px}.card-top{justify-content:space-between;display:flex}.tournament-status{color:var(--muted);font-size:.78rem}.tournament-card h2{margin:15px 0 7px}.tournament-card>p{min-height:52px;color:var(--muted)}.tournament-meta{grid-template-columns:repeat(3,1fr);gap:8px;margin:16px 0;display:grid}.tournament-meta span{border-right:1px solid var(--border)}.tournament-meta span:last-child{border:0}.tournament-meta small,.tournament-meta strong{display:block}.tournament-meta small{color:var(--muted)}.tournament-meta strong{margin-top:4px;font-size:.78rem}.full-empty{grid-column:1/-1}.form-panel{flex-direction:column;display:flex}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;display:grid}.form-grid label,.form-stack label{color:var(--text);flex-direction:column;gap:7px;font-weight:650;display:flex}.form-grid input,.form-grid select,.form-stack input{border:1px solid var(--border);background:var(--surface-2);width:100%;color:var(--text);border-radius:10px;padding:11px 12px}.form-panel>.button-row{margin-top:16px}.leaderboard-table{overflow:hidden}.leaderboard-head,.leaderboard-row{grid-template-columns:70px minmax(180px,1fr) 160px 100px;align-items:center;display:grid}.leaderboard-head{color:var(--muted);text-transform:uppercase;letter-spacing:.12em;border-bottom:1px solid var(--border);padding:10px;font-size:.72rem}.leaderboard-row{border:0;border-bottom:1px solid var(--border);width:100%;color:var(--text);text-align:left;background:0 0;padding:10px}.leaderboard-row:last-child{border:0}.leaderboard-row:hover{background:var(--surface-2)}.player-cell{align-items:center;gap:10px;display:flex}.table-panel{padding:10px}.wallet-grid{grid-template-columns:2fr repeat(3,1fr);gap:14px;display:grid}.wallet-balance,.mini-wallet{padding:20px}.wallet-balance{background:linear-gradient(135deg,var(--primary),var(--primary-strong));color:#fff;border:0}.wallet-balance>span,.mini-wallet>span{color:inherit;opacity:.82;display:block}.wallet-balance>strong{margin:10px 0 3px;font-size:clamp(2.1rem,4vw,3.5rem);display:block}.wallet-balance small{align-items:center;gap:6px;display:flex}.wallet-balance small svg{width:16px}.mini-wallet strong{margin-top:12px;font-size:1.55rem;display:block}.wallet-actions{display:grid}.wallet-form{grid-template-columns:repeat(2,minmax(0,1fr))}.wallet-form .full{grid-column:1/-1}.transactions{flex-direction:column;display:flex}.transaction-row{border-top:1px solid var(--border);grid-template-columns:40px 1fr auto auto;align-items:center;gap:12px;padding:12px 0;display:grid}.transaction-row:first-child{border-top:0}.transaction-row>div{flex-direction:column;display:flex}.transaction-row small{color:var(--muted)}.transaction-amount{font-weight:800}.profile-hero{grid-template-columns:auto 1fr auto;align-items:center;gap:18px;padding:24px;display:grid}.avatar.large{width:74px;height:74px;font-size:1.35rem}.profile-hero h2{margin:0}.profile-hero p{color:var(--muted)}.profile-rating{text-align:right}.profile-rating small,.profile-rating strong{display:block}.profile-rating strong{font-size:2.5rem}.profile-rating .badge{margin-left:auto}.back-button{width:max-content}.profile-stats .stat-card{display:block}.theme-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;display:grid}.theme-card{border:1px solid var(--border);background:var(--surface-2);color:var(--text);text-align:left;border-radius:14px;padding:12px;position:relative}.theme-card:hover,.theme-card.selected{border-color:var(--primary);box-shadow:0 8px 24px var(--shadow)}.theme-preview{border-radius:9px;grid-template-columns:repeat(2,1fr);gap:0;height:72px;margin-bottom:10px;display:grid;overflow:hidden}.theme-preview i:first-child,.theme-preview i:nth-child(4){background:#cfd9e8}.theme-preview i:nth-child(2),.theme-preview i:nth-child(3){background:#6f89b2}.theme-classic_wood .theme-preview i:first-child,.theme-classic_wood .theme-preview i:nth-child(4){background:#f0d9b5}.theme-classic_wood .theme-preview i:nth-child(2),.theme-classic_wood .theme-preview i:nth-child(3){background:#8b5a33}.theme-emerald .theme-preview i:first-child,.theme-emerald .theme-preview i:nth-child(4){background:#d7e5d2}.theme-emerald .theme-preview i:nth-child(2),.theme-emerald .theme-preview i:nth-child(3){background:#5b946c}.theme-royal .theme-preview i:first-child,.theme-royal .theme-preview i:nth-child(4){background:#e5dcf6}.theme-royal .theme-preview i:nth-child(2),.theme-royal .theme-preview i:nth-child(3){background:#7461a8}.theme-light .theme-preview i:first-child,.theme-light .theme-preview i:nth-child(4){background:#fff}.theme-light .theme-preview i:nth-child(2),.theme-light .theme-preview i:nth-child(3){background:#91a8c7}.theme-high_contrast .theme-preview i:first-child,.theme-high_contrast .theme-preview i:nth-child(4){background:#fff}.theme-high_contrast .theme-preview i:nth-child(2),.theme-high_contrast .theme-preview i:nth-child(3){background:#555}.selected-mark{background:var(--surface);border-radius:99px;align-items:center;gap:5px;padding:4px 7px;font-size:.68rem;display:flex;position:absolute;top:10px;right:10px}.selected-mark svg{width:13px;color:var(--success)}.auth-viewport{background:radial-gradient(circle at top,var(--primary-soft),transparent 42%),var(--bg);flex-direction:column;justify-content:center;align-items:center;gap:24px;min-height:100vh;padding:24px;display:flex}.auth-brand{align-items:center;gap:12px;display:flex}.auth-brand p{letter-spacing:.12em;margin:0;font-weight:850}.auth-brand span{color:var(--muted);font-size:.82rem}.auth-card{border:1px solid var(--border);background:var(--surface);width:min(540px,100%);box-shadow:0 30px 70px var(--shadow);border-radius:22px;padding:24px}.segmented{border:1px solid var(--border);background:var(--surface-2);border-radius:12px;grid-template-columns:1fr 1fr;padding:4px;display:grid}.segmented button{color:var(--muted);background:0 0;border:0;border-radius:9px;padding:9px;font-weight:700}.segmented button.active{background:var(--primary);color:#fff}.form-stack{flex-direction:column;gap:13px;margin-top:18px;display:flex}.skill-fieldset{border:0;margin:0;padding:0}.skill-fieldset legend{margin-bottom:8px;font-weight:700}.skill-grid{grid-template-columns:repeat(3,1fr);gap:9px;display:grid}.skill-card{border:1px solid var(--border);background:var(--surface-2);color:var(--text);border-radius:13px;padding:15px 8px}.skill-card strong,.skill-card span{display:block}.skill-card span{color:var(--muted);margin-top:4px}.skill-card.selected{border-color:var(--primary);background:var(--primary-soft);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 20%,transparent)}.check-row{align-items:center;font-size:.82rem;grid-template-columns:18px 1fr!important;display:grid!important}.check-row input{width:18px}.alert{border-radius:11px;align-items:center;margin-top:12px;padding:11px 13px;font-size:.88rem;display:flex}.alert.error{background:color-mix(in srgb,var(--danger) 12%,var(--surface));border:1px solid color-mix(in srgb,var(--danger) 38%,var(--border));color:var(--text)}.alert.success{background:color-mix(in srgb,var(--success) 12%,var(--surface));border:1px solid color-mix(in srgb,var(--success) 38%,var(--border));color:var(--text)}.alert.warning{background:color-mix(in srgb,#f59e0b 12%,var(--surface));border:1px solid color-mix(in srgb,#f59e0b 42%,var(--border));color:var(--text)}.alert.warning strong,.alert.warning p{display:block}.alert.warning p{color:var(--muted);margin:3px 0 0}.alert.warning code{overflow-wrap:anywhere}.global-error{max-width:1380px;margin:0 auto 16px}.global-error .icon-button{margin-left:auto}.toast{z-index:80;border:1px solid var(--border);background:var(--surface);box-shadow:0 18px 55px var(--shadow);border-radius:12px;align-items:center;gap:9px;padding:13px 16px;display:flex;position:fixed;bottom:24px;right:24px}.toast svg{width:18px;color:var(--success)}.modal-backdrop{z-index:70;background:#03070fb8;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.modal{border:1px solid var(--border);background:var(--surface);border-radius:20px;width:min(620px,100%);padding:26px;box-shadow:0 30px 80px #000}.modal>svg{color:var(--primary)}.modal h2{margin:6px 0}.modal>p:not(.eyebrow){color:var(--muted)}.modal .skill-grid{margin:18px 0}.skeleton-shell{grid-template-columns:240px 1fr;gap:18px;width:min(1180px,92vw);height:70vh;display:grid}.skeleton{background:linear-gradient(90deg,var(--surface),var(--surface-3),var(--surface));background-size:200% 100%;border-radius:18px;animation:1.4s infinite shine}@keyframes shine{to{background-position:-200% 0}}.nav-backdrop{display:none}@media (max-width:1100px){.sidebar{width:220px}.stat-grid{grid-template-columns:repeat(2,1fr)}.play-layout{grid-template-columns:1fr}.waiting-panel{position:static}.tournament-grid,.wallet-grid{grid-template-columns:repeat(2,1fr)}}@media (max-width:780px){.app-shell{padding-bottom:68px}.sidebar{width:min(290px,86vw);box-shadow:20px 0 60px var(--shadow);transition:all .22s;position:fixed;top:0;bottom:68px;left:0;transform:translate(-105%)}.sidebar.open{transform:translate(0)}.close-nav{display:grid}.nav-backdrop{z-index:35;background:#0000008c;border:0;display:block;position:fixed;inset:0}.content-shell{width:100%}.topbar{height:auto;min-height:68px;padding:10px 14px}.menu-button{display:grid}.search-wrap{flex:1;width:auto}.profile-chip>span:nth-child(2),.profile-chip svg{display:none}.profile-chip{padding:3px}.topbar-actions{gap:5px}.topbar-actions .theme-quick{display:none}.main-panel{padding:16px}.welcome-card{flex-direction:column;align-items:flex-start}.dashboard-grid,.tournament-grid{grid-template-columns:1fr}.theme-grid,.wallet-grid{grid-template-columns:repeat(2,1fr)}.wallet-balance{grid-column:1/-1}.page-header{align-items:flex-start}.profile-hero{grid-template-columns:auto 1fr}.profile-rating{text-align:left;grid-column:1/-1}.profile-rating .badge{margin:0}.topbar-menu{right:14px}.search-results{width:min(500px,100vw - 28px)}}.piece-style-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;display:grid}.piece-style-card{border:1px solid var(--border);background:var(--surface-2);color:var(--text);cursor:pointer;border-radius:14px;padding:14px}.piece-style-card.selected{border-color:var(--primary);box-shadow:0 0 0 2px var(--primary-soft)}.piece-style-preview{justify-content:center;align-items:center;height:78px;display:flex}.piece-style-preview svg{width:66px;height:66px;filter:var(--piece-shadow)}.chess-piece,.captured-piece{filter:var(--piece-shadow);pointer-events:none;transition:transform .16s,filter .16s;width:84%!important;height:84%!important}.board-square:hover .chess-piece{transform:translateY(-1px)}.challenge-page,.legal-page{max-width:1180px;min-height:100vh;margin:0 auto;padding:28px}.test-banner{background:var(--warning);color:#1e1605;border-radius:999px;align-items:center;gap:8px;padding:9px 13px;font-weight:800;display:flex}.challenge-tabs{gap:8px;margin:20px 0;display:flex}.challenge-tabs button{border:1px solid var(--border);background:var(--surface);color:var(--text);cursor:pointer;border-radius:999px;padding:10px 16px}.challenge-tabs button.active{background:var(--primary);color:#fff}.challenge-layout{grid-template-columns:minmax(0,1fr) 340px;gap:20px;display:grid}.challenge-form,.challenge-summary,.challenge-preview{flex-direction:column;gap:14px;display:flex}.time-control-grid,.stake-presets{flex-wrap:wrap;gap:8px;display:flex}.time-control-grid button,.stake-presets button{border:1px solid var(--border);background:var(--surface-2);color:var(--text);cursor:pointer;border-radius:10px;padding:10px 12px}.time-control-grid button.selected,.stake-presets button.selected{border-color:var(--primary);background:var(--primary-soft)}.time-control-grid small{color:var(--muted);display:block}.field-row,.option-row{gap:12px;display:flex}.field-row>*{flex:1;min-width:0}.challenge-summary dl,.preview-numbers{margin:0}.challenge-summary dl div,.preview-numbers div{border-bottom:1px solid var(--border);justify-content:space-between;padding:10px 0;display:flex}.challenge-summary dd,.preview-numbers dd{font-weight:800}.summary-total{color:var(--primary)}.challenge-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;display:grid}.challenge-card{flex-direction:column;justify-content:space-between;gap:16px;display:flex}.challenge-card strong{font-size:1.35rem}.challenge-share{border:1px solid var(--border);background:var(--surface);width:min(560px,100vw - 32px);color:var(--text);border-radius:18px;padding:24px;position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);box-shadow:0 24px 80px #00000080}.challenge-share input{width:100%;margin:12px 0}.dialog-close{float:right;color:var(--text);cursor:pointer;background:0 0;border:0;font-size:24px}.challenge-hero{background:var(--surface-2);border-radius:14px;grid-template-columns:80px repeat(2,1fr);align-items:center;padding:18px;display:grid}.challenge-hero>svg{width:48px;height:48px;color:var(--primary)}.challenge-hero div{flex-direction:column;display:flex}.challenge-hero strong{font-size:1.8rem}.terms-copy{color:var(--muted);font-size:.85rem}.challenge-skeleton{background:linear-gradient(90deg,var(--surface),var(--surface-3),var(--surface));border-radius:18px;height:250px;animation:1.2s infinite pulse}.responsible-form{max-width:680px}.responsible-form label{gap:8px;display:grid}.status-finished{color:var(--success)}.status-waiting{color:var(--warning)}@media (max-width:780px){.challenge-layout{grid-template-columns:1fr}.challenge-grid{grid-template-columns:repeat(2,1fr)}.challenge-page,.legal-page{padding:16px}.challenge-hero{grid-template-columns:60px 1fr 1fr}.test-banner{align-self:flex-start}}@media (max-width:520px){.challenge-grid,.piece-style-grid{grid-template-columns:1fr}.option-row,.field-row{flex-direction:column}.challenge-tabs{overflow-x:auto}.challenge-tabs button{white-space:nowrap}.challenge-hero{grid-template-columns:50px 1fr}.challenge-hero div:last-child{grid-column:2}.challenge-share .button-row{flex-direction:column}}.challenge-route-content{flex:1;min-width:0}.challenge-mobile-topbar{display:none}.challenge-shell .sidebar{z-index:50}.challenge-shell .nav-item{text-decoration:none}@media (max-width:780px){.challenge-shell{padding-bottom:68px}.challenge-shell .sidebar{height:100vh;bottom:0}.challenge-mobile-topbar{border-bottom:1px solid var(--border);background:var(--surface);justify-content:space-between;align-items:center;gap:12px;height:68px;padding:10px 14px;display:flex}.challenge-mobile-topbar strong{letter-spacing:.1em}.challenge-shell .challenge-page{min-height:calc(100vh - 68px)}}body{font-size:15px}.topbar .search-wrap{max-width:150px}.topbar-actions .icon-button{width:38px}.page-header{flex-direction:column}.stat-grid,.form-grid,.wallet-grid,.wallet-form,.theme-grid{grid-template-columns:1fr}.wallet-balance{grid-column:auto}.welcome-card,.panel,.page-header{padding:16px}.button-row{flex-wrap:wrap;width:100%}.welcome-card .button-row .button{flex:1}.play-layout{display:block}.board-panel{padding:10px}.board-frame{width:100%}.board-grid{border-width:3px}.chess-piece{font-size:13.2vw}.clock-card strong{font-size:1.05rem}.clock-row{gap:5px}.game-controls{display:grid}.waiting-panel{margin-top:14px}.leaderboard-head,.leaderboard-row{grid-template-columns:50px minmax(130px,1fr) 70px 55px}.leaderboard-head{font-size:.62rem}.leaderboard-row{font-size:.82rem}.profile-hero{text-align:center;grid-template-columns:1fr}.profile-hero .avatar{margin:auto}.tournament-meta{grid-template-columns:1fr}.tournament-meta span{border-right:0;border-bottom:1px solid var(--border);padding:6px 0}.transaction-row{grid-template-columns:36px 1fr auto}.transaction-row .badge{grid-column:2}.skill-grid{grid-template-columns:1fr}.modal{padding:18px}.toast{left:14px;right:14px}.skeleton-shell{grid-template-columns:1fr}.skeleton.sk-side{display:none}button:not(.board-square),.button{min-height:44px}.icon-button{min-width:44px;min-height:44px}.nav-item{min-height:44px}.board-frame{overflow-x:auto}.board-grid{min-width:352px}.resume-games .panel-heading{margin-bottom:10px}.resume-game-list{gap:8px;display:grid}.resume-game-row{border-top:1px solid var(--border);justify-content:space-between;align-items:center;gap:12px;padding-top:10px;display:flex}.resume-game-row>div{flex-direction:column;min-width:0;display:flex}.resume-game-row small,.game-load-state p{color:var(--muted)}.game-load-state .button{margin-top:8px}.game-end-backdrop{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background:#0009}.game-end-modal{text-align:center;background:linear-gradient(#2c2b28 0%,#252421 100%);border:1px solid #494741;border-bottom:4px solid #171615;border-radius:20px;flex-direction:column;align-items:center;width:min(440px,92vw);max-height:92dvh;padding:30px 28px 28px;animation:.2s ease-out both game-end-pop-in;display:flex;position:relative;overflow-y:auto;box-shadow:inset 0 1px #ffffff21,0 28px 75px #00000094,0 7px 18px #0000008c}.game-end-close{color:#e8e7e3;background:linear-gradient(#41403c,#302f2c);border:1px solid #ffffff1f;border-radius:11px;place-items:center;width:40px;height:40px;display:grid;position:absolute;top:14px;right:14px}.game-end-close svg{width:20px;height:20px}.game-end-close:hover{filter:brightness(1.16)}.game-end-trophy{color:#e5bd62;filter:drop-shadow(0 3px 4px #00000059);width:42px;height:42px;margin:4px 0 6px}.game-end-modal h2{color:#f7f5ef;text-shadow:0 2px 6px #00000073;margin:0;font-size:clamp(30px,8vw,36px);font-weight:850;line-height:1.12}.game-end-modal .game-end-reason{color:#c3c0b9;margin:10px 0 0;font-size:1rem}.game-end-modal .game-end-rating{justify-content:center;align-items:baseline;gap:12px;margin:24px 0 28px;display:flex}.game-end-modal .game-end-rating strong{color:#fff;text-shadow:0 2px 5px #00000059;margin:0;font-size:40px;font-weight:850;line-height:1}.game-end-modal .game-end-rating span{color:#c3c0b9;font-size:20px;font-weight:800}.game-end-modal .game-end-rating .positive{color:#59d28c}.game-end-modal .game-end-rating .negative,.game-end-modal .game-end-error{color:#f77}.game-end-actions,.game-end-offer-actions{justify-content:center;align-items:center;gap:12px;width:100%;display:flex}.game-end-modal .game-end-actions .button,.game-end-modal .game-end-offer-actions .button{text-align:center;border:0;border-bottom:4px solid #0000;border-radius:12px;flex:1;justify-content:center;align-items:center;min-width:0;min-height:56px;padding:10px 12px;font-size:1rem;font-weight:800;transition:filter .15s,transform .15s,border-width .15s;display:flex}.game-end-modal .game-end-actions .button.primary,.game-end-modal .game-end-offer-actions .button.primary{color:#fff;background:linear-gradient(#36b86d,#218d50);border-bottom-color:#197343}.game-end-modal .game-end-actions .button.secondary,.game-end-modal .game-end-offer-actions .button.secondary{color:#f1f0eb;background:linear-gradient(#4a4945,#363532);border:0;border-bottom:4px solid #171716}.game-end-modal .game-end-actions .button:hover:not(:disabled),.game-end-modal .game-end-offer-actions .button:hover:not(:disabled){filter:brightness(1.12)}.game-end-modal .game-end-actions .button:active:not(:disabled),.game-end-modal .game-end-offer-actions .button:active:not(:disabled){border-bottom-width:2px;transform:translateY(2px)}.game-end-modal .game-end-error,.game-end-notice{text-align:center;width:100%;margin:0 0 12px}.game-end-notice{color:#dedbd3}.game-end-offer{text-align:center;flex-direction:column;align-items:center;gap:14px;width:100%;margin:12px 0 4px;display:flex}.game-end-offer h3{color:#f1f0eb;text-align:center;margin:0;font-size:1.15rem;line-height:1.35}.game-end-offer-actions{gap:10px}.game-end-actions:has(.game-end-cancel){flex-wrap:wrap}.game-end-cancel{color:#c3c0b9;text-align:center;text-underline-offset:3px;background:0 0;border:0;flex:0 0 100%;min-height:32px;padding:4px 12px;font-size:.88rem;text-decoration:underline}.game-end-cancel:hover:not(:disabled){color:#fff}.game-end-cancel:disabled{opacity:.55}@keyframes game-end-pop-in{0%{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}@media (max-width:420px){.game-end-modal{padding:28px 18px 20px}.game-end-actions,.game-end-offer-actions{gap:8px}.game-end-modal .game-end-actions .button,.game-end-modal .game-end-offer-actions .button{padding-inline:8px;font-size:.92rem}}@media (prefers-reduced-motion:reduce){.game-end-modal{animation:none}.game-end-modal .game-end-actions .button,.game-end-modal .game-end-offer-actions .button{transition:none}}.quick-play-panel{flex-direction:column;gap:12px;display:flex}.quick-play-panel>.panel-heading{margin-bottom:0}.quick-play-panel>.panel-heading>svg{width:24px;color:var(--primary)}.quick-play-copy{color:var(--muted);margin:0}.quick-play-controls,.quick-play-actions{flex-wrap:wrap;gap:8px;display:flex}.quick-play-controls .button{min-height:38px;padding:8px 12px}.quick-play-actions .button{min-width:120px}.quick-play-status,.quick-play-error{text-align:center;margin:0}.quick-play-status{color:var(--warning);font-weight:700}.quick-play-status strong{font-variant-numeric:tabular-nums}.quick-play-error{color:var(--danger)}.quick-play-mode{gap:8px;display:flex}.quick-play-mode .button{flex:1}.quick-play-staked-settings{border:1px solid var(--border);background:var(--surface-2);border-radius:12px;gap:10px;padding:14px;display:grid}.quick-play-balance{justify-content:space-between;align-items:center;gap:12px;display:flex}.quick-play-balance span,.quick-play-staked-settings>label{color:var(--muted);font-size:.9rem;font-weight:700}.quick-play-balance strong{font-size:1.05rem}.quick-play-stake-presets{flex-wrap:wrap;gap:8px;display:flex}.quick-play-stake-presets .button{min-height:38px;padding:7px 12px}.quick-play-custom-stake{gap:6px;display:grid}.quick-play-custom-stake input{border:1px solid var(--border);background:var(--surface);width:100%;min-height:42px;color:var(--text);font:inherit;border-radius:9px;padding:8px 10px}.quick-play-confirmation{color:var(--muted);margin:0;font-size:.9rem;line-height:1.5}.quick-play-confirmation strong{color:var(--text)}@media (max-width:520px){.quick-play-controls .button{flex:calc(33.333% - 8px);padding-inline:6px}.quick-play-actions{grid-template-columns:1fr;display:grid}.quick-play-actions .button{width:100%}}.board-square.selected,.board-square.last-move,.board-square.check{box-shadow:none}.board-square:before{content:"";z-index:1;pointer-events:none;position:absolute;inset:0}.board-square.last-move:before{background:#bedb5c6b}.board-square.selected:before{background:#ffda4c66;box-shadow:inset 0 0 0 4px #ffeb7ee0}.board-square.last-move.selected:before{background:#dcda537a}.board-square.check:before{background:radial-gradient(circle,#ec3d4866 10%,#ec3d4838 58%,#0000 100%)}.board-square.legal:after{content:"";z-index:1;pointer-events:none;background:#1627207a;border-radius:50%;width:27%;height:27%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 2px #ffffff8c}.board-square.legal-capture:after{background:0 0;border:4px solid #162720b8;width:82%;height:82%;box-shadow:0 0 0 2px #ffffffad}.board-square.legal.legal-capture:after{z-index:1}.board-grid{position:relative}.board-square.premove-origin:before,.board-square.premove-destination:before{background:#f2653175}.board-square.premove-origin.premove-destination:before{background:#e64b2f8f}.board-square.premove-selected:before{background:#f2653194;box-shadow:inset 0 0 0 3px #ffd199f2}.board-square.premove-hint.legal:after{background:#a93919b8;box-shadow:0 0 0 2px #ffebd5db}.board-square.premove-hint.legal-capture:after{background:0 0;border-color:#a93919e6;box-shadow:0 0 0 2px #ffebd5e6}.board-square.check.premove-origin:before,.board-square.check.premove-destination:before{background:radial-gradient(circle,#ec3d4866 10%,#ec3d4838 58%,#0000 100%),linear-gradient(#f2653166,#f2653166)}.board-square.last-move.premove-origin:before,.board-square.last-move.premove-destination:before{background:linear-gradient(#f265316b,#f265316b),linear-gradient(#bedb5c6b,#bedb5c6b)}.premove-piece{opacity:.62}.board-premoves{z-index:5;pointer-events:none;width:100%;height:100%;position:absolute;inset:0;overflow:visible}.premove-arrow{pointer-events:none}.premove-arrow line{stroke:#b63d20;stroke-width:.075px;stroke-linecap:round;opacity:.88}.premove-arrow marker path{fill:#b63d20}.premove-arrow circle{fill:#a9371c;stroke:#fff1df;stroke-width:.045px}.premove-arrow text{fill:#fff;text-anchor:middle;dominant-baseline:central;font-size:.23px;font-weight:800}.premove-status{color:var(--muted);text-align:center;margin:8px 0 0;font-size:.82rem}.draw-offer-prompt{border:1px solid var(--border);background:var(--primary-soft);border-radius:12px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin:14px 0;padding:12px 14px;display:flex}.draw-offer-prompt p{color:var(--text);margin:0;line-height:1.45}.draw-offer-prompt .button-row{width:auto;margin:0}.draw-offer-sent{color:var(--muted);margin:-6px 0 12px;font-size:.88rem}@media (max-width:420px){.draw-offer-prompt{align-items:flex-start}.draw-offer-prompt .button-row{width:100%}.draw-offer-prompt .button{flex:1}}.pwa-install-panel{gap:14px;display:grid}.install-hint{color:var(--muted);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;line-height:1.5;display:flex}.install-hint .button{flex:none}@media (max-width:420px){.install-hint{align-items:flex-start}.install-hint .button{width:100%}}.nav-badge{background:var(--danger);color:#fff;border-radius:999px;place-items:center;min-width:20px;height:20px;margin-left:auto;padding:0 6px;font-size:.72rem;font-weight:800;display:grid}.nav-item .nav-badge+svg{margin-left:0}.friends-search-form{gap:8px;display:grid}.friends-search-form label,.friend-challenge-modal label{color:var(--muted);font-size:.88rem;font-weight:650}.friends-search-controls{gap:10px;min-width:0;display:flex}.friends-search-controls input,.friend-challenge-modal select{border:1px solid var(--border);background:var(--surface-2);width:100%;min-width:0;min-height:44px;color:var(--text);border-radius:11px;padding:10px 12px}.friend-search-result,.friend-row{border-top:1px solid var(--border);align-items:center;gap:12px;padding:12px 0;display:flex}.friend-search-result{justify-content:space-between;margin-top:12px}.friend-search-result>div,.friend-details{flex-direction:column;gap:4px;min-width:0;display:flex}.friend-search-result small,.friend-details small,.friends-empty-copy{color:var(--muted)}.friend-list{display:grid}.friend-row:first-child{border-top:0}.friend-details{overflow-wrap:anywhere;flex:1}.friend-actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.friend-feedback{color:var(--success);margin:12px 0 0}.friend-feedback.error-text,.error-text{color:var(--danger)}.friends-empty-copy{margin:0}.direct-challenge-banner{border:1px solid color-mix(in srgb,var(--primary) 55%,var(--border));background:var(--primary-soft);border-radius:14px;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:14px;margin-bottom:14px;padding:14px 16px;display:flex}.direct-challenge-banner>div:first-child{gap:5px;min-width:0;display:grid}.direct-challenge-banner small{color:var(--muted);line-height:1.4}.direct-challenge-banner .friend-actions{width:auto}.direct-challenge-banner.outgoing{border-color:var(--border);background:var(--surface)}.friend-dialog-backdrop{z-index:60}.friend-challenge-modal{gap:12px;width:min(460px,100vw - 28px);max-height:calc(100dvh - 32px);display:grid;position:relative;overflow:auto}.friend-challenge-modal h2{margin:0 30px 4px 0}.friend-challenge-modal .game-end-close{position:absolute;top:12px;right:12px}.friend-challenge-modal .button-row{margin-top:8px}@media (max-width:520px){.friends-search-controls{flex-direction:column;align-items:stretch}.friend-search-result,.friend-row{flex-wrap:wrap;align-items:flex-start}.friend-details{flex:calc(100% - 60px)}.friend-row>.button{margin-left:46px}.friend-actions{width:100%}.friend-actions .button{flex:1}.friend-search-result>.button{width:100%}.direct-challenge-banner{align-items:flex-start}.direct-challenge-banner .friend-actions,.direct-challenge-banner>.button{width:100%}.friend-challenge-modal .button-row{flex-direction:column}.friend-challenge-modal .button{width:100%}}.history-nav-link{text-decoration:none}.history-route{min-height:100vh;color:var(--text);padding:20px 24px 40px}.history-route-header{justify-content:space-between;align-items:center;width:min(1180px,100%);margin:0 auto 22px;display:flex}.history-back{width:max-content;text-decoration:none}.history-brand{letter-spacing:.12em;font-weight:850}.history-content{max-width:1180px;margin:0 auto}.history-heading-icon{width:32px;height:32px;color:var(--primary)}.history-filters{gap:8px;margin-bottom:16px;display:flex;overflow-x:auto}.history-filter{border:1px solid var(--border);background:var(--surface-2);min-height:40px;color:var(--muted);white-space:nowrap;border-radius:999px;padding:8px 15px;font-weight:700}.history-filter.active{border-color:var(--primary);background:var(--primary-soft);color:var(--text)}.history-list{display:grid}.history-row{border-top:1px solid var(--border);min-width:0;color:var(--text);grid-template-columns:72px minmax(0,1fr) 100px 120px 18px;align-items:center;gap:14px;padding:15px 4px;text-decoration:none;display:grid}.history-row:hover{background:var(--surface-2)}.history-opponent,.history-game-meta{gap:4px;min-width:0;display:grid}.history-opponent strong{overflow-wrap:anywhere}.history-row small,.history-date{color:var(--muted);font-size:.82rem}.history-game-meta{text-align:right}.history-outcome{border-radius:999px;width:max-content;padding:5px 9px;font-size:.75rem;font-weight:800}.history-outcome.win{background:color-mix(in srgb,var(--success) 16%,var(--surface));color:var(--success)}.history-outcome.loss{background:color-mix(in srgb,var(--danger) 14%,var(--surface));color:var(--danger)}.history-outcome.draw{background:var(--surface-3);color:var(--muted)}.history-row-chevron{width:18px;color:var(--muted)}.history-load-more{margin:18px auto 0;display:flex}.history-message{color:var(--muted);text-align:center;padding:24px}.history-empty{min-height:300px}.history-not-found{text-align:center;width:min(560px,100%);margin:10vh auto}.history-not-found p{color:var(--muted)}.replay-header{flex-direction:row;align-items:center}.replay-header h1{overflow-wrap:anywhere}.replay-header h1 span{color:var(--muted);font-size:.65em}.replay-layout{grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr);align-items:start;gap:18px;display:grid}.replay-board-panel{min-width:0}.replay-board-frame{width:min(100%,680px)}.replay-board{min-width:0}.replay-controls{flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;margin:14px auto 10px;display:flex}.replay-controls .button{flex:0 0 44px}.replay-ply{min-width:65px;color:var(--muted);text-align:center;font-variant-numeric:tabular-nums}.replay-copy{margin:0 auto;display:flex}.replay-moves-panel{min-width:0}.replay-move-list{overscroll-behavior:contain;max-height:620px;overflow:auto}.replay-move-row{border-top:1px solid var(--border);grid-template-columns:36px minmax(0,1fr) minmax(0,1fr);align-items:center;gap:5px;padding:4px 2px;display:grid}.replay-move-number{color:var(--muted);text-align:right;font-size:.82rem}.replay-move-row button{min-width:0;min-height:38px;color:var(--text);text-align:left;background:0 0;border:0;border-radius:7px;padding:6px 8px}.replay-move-row button:hover{background:var(--surface-2)}.replay-move-row button.current{background:var(--primary-soft);color:var(--primary);font-weight:800}.replay-keyboard-hint{color:var(--muted);margin:14px 0 0;font-size:.8rem;line-height:1.5}@media (max-width:900px){.replay-layout{grid-template-columns:1fr}.replay-board-frame{width:min(100%,640px)}.replay-move-list{max-height:360px}}@media (max-width:520px){.history-route{padding:12px 12px 28px}.history-route-header{margin-bottom:14px}.history-content{gap:14px}.history-row{grid-template-columns:58px minmax(0,1fr) 18px;gap:8px;padding:12px 2px}.history-outcome{padding:4px 7px;font-size:.68rem}.history-game-meta{text-align:left;grid-column:2;gap:8px;display:flex}.history-date{grid-area:3/2}.history-row-chevron{grid-area:1/3/span 3}.replay-header{flex-direction:column;align-items:flex-start}.replay-header .button{width:100%}.replay-header h1{font-size:1.45rem}.replay-board-panel{padding:10px}.replay-board-frame{width:100%;margin:8px auto}.replay-controls{gap:5px}.replay-controls .button{flex-basis:40px;width:40px;padding:0}.replay-ply{min-width:50px}.replay-moves-panel{padding:14px}}.live-game-only .live-game-layout{grid-template-columns:minmax(0,1fr) minmax(250px,320px)}.live-game-only .board-panel{min-width:0}.live-game-only .board-frame{overflow:visible}.live-game-only .board-grid{min-width:0}.game-player-panel{margin:8px 0}.live-side-moves{max-height:70vh;margin:0;padding:0;list-style:none;overflow-y:auto}.live-side-moves li{border-top:1px solid var(--border);font-variant-numeric:tabular-nums;grid-template-columns:30px minmax(0,1fr) minmax(0,1fr);gap:8px;padding:7px 5px;display:grid}.live-side-moves li span:first-child{color:var(--muted);text-align:right}.live-side-moves li span:not(:first-child){font-weight:700}@media (max-width:1100px){.live-game-only .live-game-layout{grid-template-columns:1fr}}@media (max-width:780px){.live-game-only .board-panel{padding:8px}.live-game-only .board-frame{width:100%;margin:8px auto}.live-game-only .play-layout{display:block}.live-game-only .game-controls{flex-wrap:wrap;display:flex}.live-game-only .waiting-panel{margin-top:12px}}.clock-card{flex-direction:row!important;align-items:center!important;height:62px!important;min-height:62px!important;max-height:62px!important;display:flex!important;overflow:hidden!important}.clock-card [aria-label=Captured\ pieces]{flex-flow:row!important;justify-content:flex-start!important;align-items:center!important;min-width:0!important;height:40px!important;min-height:40px!important;max-height:40px!important;display:flex!important;overflow:hidden!important}.clock-card [aria-label=Captured\ pieces] *{flex-flow:row!important;align-items:center!important;display:inline-flex!important}.clock-card [aria-label=Captured\ pieces] svg,.clock-card [aria-label=Captured\ pieces] img,.clock-card [aria-label=Captured\ pieces] image{flex:0 0 36px!important;width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;max-height:36px!important;margin-left:-10px!important}@media (max-width:480px){.clock-card [aria-label=Captured\ pieces]{height:34px!important;min-height:34px!important;max-height:34px!important}.clock-card [aria-label=Captured\ pieces] svg,.clock-card [aria-label=Captured\ pieces] img,.clock-card [aria-label=Captured\ pieces] image{flex:0 0 32px!important;width:32px!important;min-width:32px!important;max-width:32px!important;height:32px!important;min-height:32px!important;max-height:32px!important;margin-left:-9px!important}}body[data-has-board] .site-footer{display:none}.live-game-only .board-panel{box-sizing:border-box;width:100%;min-width:0}.live-game-only .board-frame{box-sizing:border-box;width:min(100%,640px);max-width:100%;overflow:visible}.live-game-only .board-grid{aspect-ratio:1;box-sizing:border-box;width:100%;min-width:0;max-width:100%}.app-shell:has(.live-game-only){width:100%;height:100dvh;min-height:0;overflow:hidden}:is(.app-shell:has(.live-game-only)>.sidebar,.app-shell:has(.live-game-only) .topbar){display:none}.app-shell:has(.live-game-only) .content-shell{width:100%;height:100dvh;min-height:0;overflow:hidden}.app-shell:has(.live-game-only) .main-panel{width:100%;height:100dvh;min-height:0;padding:12px;overflow:hidden}.app-shell:has(.live-game-only) .page-enter{width:100%;max-width:none;height:100%;min-height:0;overflow:hidden}.live-game-only{gap:0;width:100%;height:100%;min-height:0;overflow:hidden}.live-game-only .live-game-layout{grid-template-columns:minmax(0,1fr) minmax(250px,320px);align-items:stretch;gap:12px;width:100%;height:100%;min-height:0;display:grid;overflow:hidden}.live-game-only .board-panel{flex-direction:column;align-items:stretch;min-width:0;height:100%;min-height:0;padding:10px;display:flex;overflow:hidden}.live-game-only .panel-heading{flex:none;margin-bottom:6px}.live-game-only .game-controls,.live-game-only .game-player-panel,.live-game-only .game-status,.live-game-only .board-panel>.button-row{flex:none}.live-game-only .game-controls{margin-bottom:6px}.live-game-only .game-player-panel{margin:4px 0}.live-game-only .board-frame{flex:auto;justify-content:center;align-items:center;width:100%;min-width:0;min-height:0;max-height:none;margin:4px auto;display:flex;overflow:visible}.live-game-only .board-grid{aspect-ratio:1;width:min(100%,100dvh - 340px);min-width:0;max-width:100%;max-height:100%}.live-game-only .premove-status{flex:none;margin:3px 0}.live-game-only .game-status{margin-top:5px}.live-game-only .waiting-panel{flex-direction:column;min-width:0;height:100%;min-height:0;margin:0;display:flex;position:static;overflow:hidden}.live-game-only .waiting-panel .panel-heading{flex:none}.live-game-only .live-side-moves{overscroll-behavior:contain;flex:auto;min-height:0;max-height:none;overflow-y:auto}@media (max-width:780px){.app-shell:has(.live-game-only) .main-panel{padding:6px}.live-game-only .live-game-layout{grid-template-rows:minmax(0,1fr) minmax(90px,22%);grid-template-columns:minmax(0,1fr);gap:6px}.live-game-only .board-panel{padding:6px}.live-game-only .board-grid{width:min(100%,100dvh - 330px)}.live-game-only .waiting-panel{min-height:0;padding:6px 10px}.live-game-only .live-side-moves{max-height:none}}@media (max-width:520px){.live-game-only .live-game-layout{grid-template-rows:minmax(0,1fr) minmax(76px,18%)}.live-game-only .panel-heading{margin-bottom:3px}.live-game-only .panel-heading h1{font-size:1rem}.live-game-only .game-controls{gap:5px;margin-bottom:3px}.live-game-only .game-player-panel{margin:2px 0}.live-game-only .board-grid{width:min(100%,100dvh - 300px)}.live-game-only .waiting-panel .panel-heading{margin-bottom:2px}}
