:root{font-synthesis:none;text-rendering:optimizelegibility;--preview-inset:0px;--app-height:var(--tg-viewport-stable-height,100dvh);--safe-top:max(env(safe-area-inset-top,0px), var(--tg-safe-top,0px), var(--tg-content-safe-top,0px), var(--tg-safe-area-inset-top,0px), var(--tg-content-safe-area-inset-top,0px));--safe-right:max(env(safe-area-inset-right,0px), var(--tg-safe-right,0px), var(--tg-content-safe-right,0px), var(--tg-safe-area-inset-right,0px), var(--tg-content-safe-area-inset-right,0px));--safe-bottom:max(env(safe-area-inset-bottom,0px), var(--tg-safe-bottom,0px), var(--tg-content-safe-bottom,0px), var(--tg-safe-area-inset-bottom,0px), var(--tg-content-safe-area-inset-bottom,0px));--safe-left:max(env(safe-area-inset-left,0px), var(--tg-safe-left,0px), var(--tg-content-safe-left,0px), var(--tg-safe-area-inset-left,0px), var(--tg-content-safe-area-inset-left,0px));--canvas:#171b1b;--bg:#171b1b;--surface:#202626;--surface-2:#2b3331;--raised:#252c2a;--text:#f2f3ef;--secondary:#b4bcb6;--muted:#a0aca5;--accent:#b8d5bc;--accent-pressed:#a3c6a8;--accent-text:#0b1714;--line:#f2f3ef16;--line-strong:#f2f3ef26;--focus:#b8d5bc;--success:#88bca4;--warning:#d2b06c;--danger:#d9857d;--king-check-core:#e55247eb;--king-check-halo:#c92a2675;--king-mate-core:#ff483cfa;--board-light:#cbd5cf;--board-dark:#546964;--board-frame:#181d20;--board-highlight:#a8cfc475;--piece-light:#f7f5ef;--piece-dark:#101615;--shadow-board:0 4px 16px #0000002e;--shadow-sheet:0 -18px 54px #00000057;color:var(--text);background:var(--canvas);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Inter,Arial,sans-serif}:root[data-theme=light]{--canvas:#f4f3ee;--bg:#f4f3ee;--surface:#fff;--surface-2:#e8ece5;--raised:#fff;--text:#121714;--secondary:#566258;--muted:#5f6b62;--accent:#315e40;--accent-pressed:#244c31;--accent-text:#f4fffb;--line:#12171417;--line-strong:#12171429;--focus:#315e40;--success:#315e40;--warning:#9d6b22;--danger:#a84d45;--king-check-core:#c7312be0;--king-check-halo:#9d1c1a5c;--king-mate-core:#d32621f5;--board-frame:#d3dad6;--shadow-board:0 4px 16px #2030291a;--shadow-sheet:0 -18px 54px #2a363126}*{box-sizing:border-box}html,body,#root{min-width:320px;min-height:100%;margin:0}body{background:var(--canvas);color:var(--text);overflow:hidden}button,input{font:inherit;caret-color:var(--accent)}::selection{color:var(--accent-text);background:var(--accent)}button{color:inherit;-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible,a:focus-visible,[role=tabpanel]:focus-visible{outline:3px solid var(--focus);outline-offset:2px}button:not(:disabled){cursor:pointer}button:disabled{cursor:default}.preview-canvas{background:var(--canvas);place-items:start center;width:100%;height:100dvh;display:grid;overflow:hidden}.telegram-app{width:min(100%,960px);height:var(--app-height);overscroll-behavior:contain;scrollbar-width:none;background:var(--bg);min-height:0;color:var(--text);isolation:isolate;position:relative;overflow:hidden auto}.telegram-app::-webkit-scrollbar{display:none}.skip-link{z-index:100;color:var(--accent-text);background:var(--accent);border-radius:10px;padding:10px 14px;position:fixed;top:8px;left:8px;transform:translateY(-150%)}.skip-link:focus{transform:translateY(0)}.app-topbar{z-index:20;min-height:calc(56px + var(--safe-top));padding:var(--safe-top) calc(16px + var(--safe-right)) 8px calc(16px + var(--safe-left));border-bottom:1px solid var(--line);background:var(--bg);justify-content:space-between;align-items:flex-end;display:flex;position:sticky;top:0}.app-topbar.section-titlebar{border-bottom:1px solid var(--line)}.section-titlebar .topbar-leading h1{letter-spacing:-.02em;font-size:20px;font-weight:630}.topbar-leading{align-items:center;gap:10px;min-width:0;min-height:44px;display:flex}.topbar-leading h1{letter-spacing:-.025em;text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:22px;font-weight:650;line-height:1.2;overflow:hidden}.topbar-title{min-width:0}.topbar-mark{width:28px;height:36px;color:var(--accent);place-items:center;display:grid}.topbar-mark svg{width:23px;height:23px}.icon-button,.settings-button{background:0 0;border:0;border-radius:8px;flex:none;place-items:center;width:44px;height:44px;transition:background-color .12s,transform 90ms;display:grid}.icon-button:active,.settings-button:active,.action-group button:active,.game-row:active,.current-game-row:active,.bottom-nav button:active,.primary-button:active,.secondary-button:active{transform:scale(.985)}.icon-button:hover,.settings-button:hover{background:var(--surface-2)}.icon-button svg{width:22px;height:22px}.settings-button{width:auto;color:var(--secondary);gap:6px;padding:0 8px;font-size:13px;font-weight:550;display:flex}.settings-button svg{width:18px;height:18px}.connection-banner{z-index:18;top:calc(56px + var(--safe-top));min-height:44px;padding:8px calc(16px + var(--safe-right)) 8px calc(16px + var(--safe-left));color:var(--text);background:color-mix(in srgb, var(--warning) 18%, var(--surface));align-items:center;gap:9px;font-size:13px;line-height:18px;display:flex;position:sticky}.connection-banner.error{background:color-mix(in srgb, var(--danger) 17%, var(--surface))}.connection-dot{background:var(--warning);border-radius:50%;flex:none;width:7px;height:7px}.connection-banner.error .connection-dot{background:var(--danger)}.connection-banner>span:nth-child(2){flex:1}.connection-banner button{min-height:44px;color:var(--text);background:var(--surface-2);border:0;border-radius:10px;align-items:center;gap:5px;padding:0 10px;font-size:12px;font-weight:650;display:flex}.connection-banner button svg{width:15px;height:15px}.view-stage{max-width:960px;margin:0 auto;animation:.22s cubic-bezier(.2,.8,.2,1) both screen-in}@keyframes screen-in{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:translate(0)}}#root .screen{width:100%;padding-right:calc(16px + var(--safe-right));padding-left:calc(16px + var(--safe-left))}#root .games-screen,#root .profile-screen{max-width:680px;margin-inline:auto}.play-screen{flex-direction:column;gap:28px;display:flex}.screen-section{min-width:0}.play-screen,.games-screen{padding-top:22px;padding-bottom:calc(86px + var(--safe-bottom))}.screen-section+.screen-section{margin-top:0}.screen-section h2,.settings-section h3{color:var(--text);letter-spacing:-.015em;margin:0 0 12px;font-size:17px;font-weight:650;line-height:20px}.action-group{border:1px solid var(--line);background:var(--surface);border-radius:8px;overflow:hidden}.action-group button{text-align:left;background:0 0;border:0;grid-template-columns:40px minmax(0,1fr) 18px;align-items:center;gap:12px;width:100%;min-height:80px;padding:9px 14px;transition:background-color .12s,transform 90ms;display:grid;position:relative}.action-group button+button:before{content:"";background:var(--line);height:1px;position:absolute;top:0;left:68px;right:14px}.action-group button:hover{background:var(--surface-2)}.action-icon{width:40px;height:40px;color:var(--secondary);background:var(--surface-2);border-radius:8px;place-items:center;display:grid}.action-icon.accent{color:var(--accent-text);background:var(--accent)}.action-icon svg{width:21px;height:21px}.action-group button>span:nth-child(2),.game-row-copy,.current-game-copy{flex-direction:column;gap:3px;min-width:0;display:flex}.action-group strong,.game-row strong,.current-game-row strong,.player-name{letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:620;line-height:20px;overflow:hidden}.action-group small,.game-row small,.current-game-row small{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:450;line-height:17px;overflow:hidden}.row-chevron{width:18px;height:18px;color:var(--muted)}.section-heading-row{justify-content:space-between;align-items:center;min-height:24px;margin-bottom:10px;display:flex}.section-heading-row h2{margin:0}.text-button{min-height:44px;color:var(--accent);background:0 0;border:0;align-items:center;gap:2px;padding:0 0 0 12px;font-size:13px;font-weight:600;display:flex}.text-button svg{width:16px;height:16px}.current-game-row{border:1px solid var(--line);text-align:left;background:var(--surface);border-radius:8px;grid-template-columns:112px minmax(0,1fr);align-items:center;gap:16px;width:100%;min-height:148px;padding:16px;transition:background-color .12s,transform 90ms;display:grid}.current-game-row:hover{background:var(--surface-2)}.current-game-row .mini-board{width:112px}.current-game-row strong{font-size:17px;line-height:23px}.attention-status{color:var(--accent);align-items:center;gap:6px;margin-bottom:3px;font-size:12px;font-weight:650;line-height:14px;display:flex}.attention-status i{background:currentColor;border-radius:50%;width:7px;height:7px}.attention-status.muted{color:var(--secondary)}.attention-status.warning{color:var(--warning)}.resume-action{color:var(--accent);align-items:center;gap:6px;margin-top:8px;font-size:14px;font-weight:650;display:flex}.resume-action svg{width:14px;height:14px}.mini-board{aspect-ratio:1;flex:none;width:88px;display:block}.mini-board text{text-anchor:middle;dominant-baseline:middle;font-family:Segoe UI Symbol,Noto Sans Symbols,serif;font-size:8px}.mini-board .mini-white-piece{fill:var(--piece-light);stroke:#090f0dbf;stroke-width:.35px;paint-order:stroke fill}.mini-board .mini-black-piece{fill:var(--piece-dark)}.plain-list{margin-top:8px}.game-row{border:0;border-bottom:1px solid var(--line);text-align:left;background:0 0;grid-template-columns:58px minmax(0,1fr) 18px;align-items:center;gap:11px;width:100%;min-height:82px;padding:10px 0;transition:background-color .12s,transform 90ms;display:grid;position:relative}.game-row.compact{grid-template-columns:52px minmax(0,1fr) 18px;min-height:74px}.game-row:hover{background:color-mix(in srgb, var(--surface) 52%, transparent)}.game-row .game-thumbnail{border-radius:4px;width:58px}.game-row.compact .game-thumbnail{width:52px}.game-row-with-action{position:relative}.game-row-with-action .game-row{grid-template-columns:58px minmax(0,1fr);padding-inline-end:56px}.game-row-with-action .row-chevron{display:none}.game-row-quick-close{z-index:2;top:50%;width:44px;height:44px;color:var(--secondary);background:var(--surface-2);border:0;border-radius:12px;place-items:center;padding:0;transition:color .12s,background-color .12s,transform 90ms;display:grid;position:absolute;inset-inline-end:0;transform:translateY(-50%)}.game-row-quick-close:hover:not(:disabled){color:var(--danger);background:color-mix(in srgb, var(--danger) 10%, var(--surface-2))}.game-row-quick-close:active:not(:disabled){transform:translateY(-50%)scale(.96)}.game-row-quick-close:focus-visible{outline:2px solid var(--focus);outline-offset:2px}.game-row-quick-close:disabled{opacity:.45}.game-row-quick-close svg{width:19px;height:19px}.game-status{white-space:nowrap;font-size:12px;font-weight:650;line-height:16px}.game-status.accent{color:var(--accent)}.game-status.muted{color:var(--muted)}.game-status.warning{color:var(--warning)}.bottom-nav{z-index:25;right:0;bottom:var(--preview-inset);width:min(100%,960px);min-height:calc(62px + var(--safe-bottom));padding:5px calc(12px + var(--safe-right)) var(--safe-bottom) calc(12px + var(--safe-left));border-top:1px solid var(--line);background:var(--bg);grid-template-columns:repeat(2,minmax(0,1fr));margin:0 auto;display:grid;position:fixed;left:0}.bottom-nav button{min-width:0;min-height:54px;color:var(--muted);background:0 0;border:0;justify-content:center;align-items:center;gap:8px;font-size:14px;font-weight:600;transition:color .16s,transform 90ms;display:flex;position:relative}.bottom-nav button:after{content:"";background:var(--accent);opacity:0;border-radius:2px;width:22px;height:2px;transition:opacity .18s,transform .18s cubic-bezier(.2,.8,.2,1);position:absolute;bottom:3px;left:50%;transform:translate(-50%)scaleX(.4)}.bottom-nav button.active{color:var(--accent)}.bottom-nav button.active:after{opacity:1;transform:translate(-50%)scaleX(1)}.bottom-nav svg{width:21px;height:21px}.segmented-control{background:var(--surface);border-radius:8px;grid-template-columns:repeat(2,1fr);padding:3px;display:grid}.segmented-control button{min-height:44px;color:var(--secondary);background:0 0;border:0;border-radius:6px;font-size:13px;font-weight:620}.segmented-control button.active{color:var(--text);background:var(--surface-2)}.filter-row{scrollbar-width:none;gap:8px;margin-top:16px;display:flex;overflow-x:auto}.filter-row::-webkit-scrollbar{display:none}.filter-row button{border:1px solid var(--line);min-height:44px;color:var(--secondary);white-space:nowrap;background:0 0;border-radius:8px;padding:0 14px;font-size:12px;font-weight:600}.filter-row button.active{border-color:var(--accent);color:var(--accent-text);background:var(--accent)}.list-state{color:var(--secondary);align-items:center;gap:10px;padding:20px 0;font-size:14px;line-height:1.5;display:flex}.list-state p{margin:0}.list-error{flex-wrap:wrap}.list-error p{flex:180px}.list-error .text-button{flex:none}.empty-state{padding:24px 0;display:block}.empty-state h3{color:var(--text);margin:0 0 8px;font-size:16px;font-weight:620}.empty-state .secondary-button{margin-top:16px}.games-list-section{margin-top:24px}.list-count{color:var(--muted);margin:0 0 4px;font-size:12px;line-height:18px}.plain-list.roomy .game-row{min-height:84px}.game-screen{min-height:calc(var(--app-height) - 57px - var(--safe-top));padding-top:8px;padding-bottom:calc(18px + var(--safe-bottom));grid-template-columns:minmax(0,1fr);align-content:start;justify-items:center;display:grid}.game-table,.game-controls{width:100%;min-width:0;max-width:560px}.game-controls{border-top:1px solid var(--line-strong);padding-top:12px}.player-bar{align-items:center;gap:8px;width:100%;min-height:44px;padding:8px 0;display:flex}.player-bar .player-name{flex:1;min-width:0;font-size:13px}.player-side{color:var(--secondary);flex:none;font-size:12px}.player-color{border:1px solid #858e84;border-radius:50%;flex:none;width:14px;height:14px}.player-color.white{background:#faf8ef}.player-color.black{background:#242824}.next-game-button{margin:12px 0}.board-frame{background:var(--board-frame);width:100%;box-shadow:var(--shadow-board);border-radius:6px;padding:4px;position:relative}.board-frame.board-disabled:after{content:"";z-index:5;background:color-mix(in srgb, var(--bg) 12%, transparent);pointer-events:none;border-radius:3px;position:absolute;inset:4px}.chess-board{aspect-ratio:1;border-radius:3px;grid-template-columns:repeat(8,1fr);width:100%;display:grid;overflow:hidden}.chess-board>button{aspect-ratio:1;min-width:0;color:var(--piece-dark);border:0;border-radius:0;place-items:center;padding:0;display:grid;position:relative}.chess-board>button:disabled{cursor:not-allowed}.chess-board>button.draggable-piece{cursor:grab;touch-action:none}.chess-board.is-dragging>button.draggable-piece{cursor:grabbing}.chess-board>button.drag-source .piece{opacity:.28}.chess-board>button.drag-target{z-index:4;outline:3px solid color-mix(in srgb, var(--accent) 82%, white);outline-offset:-3px}.drag-piece-ghost{z-index:120;object-fit:contain;pointer-events:none;-webkit-user-select:none;user-select:none;will-change:left, top;position:fixed;transform:translate(-50%,-54%)}.chess-board>button.light{background:var(--board-light)}.chess-board>button.dark{background:var(--board-dark)}.chess-board>button.in-check:before{content:"";z-index:1;background:radial-gradient(circle at 50% 56%, var(--king-check-core) 0 18%, var(--king-check-halo) 46%, transparent 74%);box-shadow:0 3px 8px color-mix(in srgb, var(--danger) 32%, transparent);pointer-events:none;border-radius:50%;position:absolute;inset:4%}.chess-board>button.in-check.checkmate:before{background:radial-gradient(circle at 50% 54%, var(--king-mate-core) 0 16%, var(--king-check-core) 37%, var(--king-check-halo) 58%, transparent 78%);box-shadow:0 3px 9px color-mix(in srgb, var(--danger) 46%, transparent), 0 0 14px color-mix(in srgb, var(--danger) 24%, transparent);inset:1%}.chess-board>button.last-move{box-shadow:inset 0 0 0 999px var(--board-highlight)}.chess-board>button.selected{z-index:1;box-shadow:inset 0 0 0 3px #d8fff4}.chess-board>button:focus-visible{z-index:3;outline-offset:-3px;outline:3px solid #d8fff4}.piece{z-index:2;object-fit:contain;pointer-events:none;-webkit-user-drag:none;-webkit-user-select:none;user-select:none;width:88%;height:88%;display:block;position:relative;transform:translateY(-1px)}.white-piece{filter:drop-shadow(0 1px 1px #090f0d6b)}.black-piece{filter:drop-shadow(0 1px 1px #f7f5ef29)}.legal-marker{z-index:3;aspect-ratio:1;background:#0a110f61;border-radius:50%;width:23%;position:absolute}.legal-marker.capture{background:0 0;border:3px solid #0a110f61;width:76%}.rank-label,.file-label{z-index:4;color:#0a141194;pointer-events:none;font-size:clamp(7px,2vw,10px);font-weight:700;line-height:1;position:absolute}.rank-label{top:3px;left:3px}.file-label{bottom:3px;right:3px}.replay-dock{border:1px solid var(--line);background:var(--surface);border-radius:14px;grid-template-rows:44px 44px;grid-template-columns:44px 44px minmax(0,1fr) 44px 44px;width:100%;min-height:76px;margin-top:8px;display:grid;overflow:hidden}.replay-dock button{width:44px;height:44px;color:var(--secondary);background:0 0;border:0;place-items:center;padding:0;display:grid}.replay-dock button:first-of-type,.replay-dock button:nth-of-type(2){border-right:1px solid var(--line)}.replay-dock button:nth-of-type(3),.replay-dock button:nth-of-type(4){border-left:1px solid var(--line)}.replay-dock button:disabled{color:var(--muted);opacity:.38}.replay-dock button:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}.replay-dock svg{width:19px;height:19px}.replay-position{min-width:0;color:var(--text);font-variant-numeric:tabular-nums;white-space:nowrap;justify-content:center;align-items:center;gap:7px;padding:0 8px;display:flex}.replay-position strong{text-overflow:ellipsis;font-size:11px;font-weight:680;line-height:14px;overflow:hidden}.replay-position small{color:var(--muted);font-size:10px;line-height:12px}.replay-position>.replay-play{width:44px;height:44px;color:var(--accent-text);background:var(--accent);border:0;border-radius:50%;flex:0 0 44px;font-size:13px}.replay-current{flex-direction:column;justify-content:center;min-width:0;display:flex}.replay-timeline{border-top:1px solid var(--line);grid-column:1/-1;align-items:center;min-width:0;padding:0 11px;display:flex}.replay-timeline input{width:100%;height:44px;accent-color:var(--accent);cursor:pointer;touch-action:pan-y;margin:0}.visually-hidden{clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;position:absolute!important;overflow:hidden!important}.turn-status{min-height:52px;color:var(--text);text-align:left;flex-wrap:wrap;justify-content:flex-start;align-items:center;gap:8px;font-size:13px;line-height:18px;display:flex}.turn-copy{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}.turn-copy strong{font-size:15px;font-weight:650;line-height:21px}.turn-copy small{min-height:18px;color:var(--secondary);font-size:12px;line-height:18px}.turn-status.in-check{color:var(--danger)}.turn-status.in-check .turn-dot{background:var(--danger)}.turn-dot{background:var(--accent);border-radius:50%;flex:0 0 7px;width:7px;height:7px}.turn-dot.waiting{background:var(--warning)}.evaluation-badge{color:var(--accent);background:var(--surface);font-variant-numeric:tabular-nums;border-radius:7px;padding:2px 6px;font-size:11px;font-weight:650}.evaluation-badge.pending{color:var(--secondary)}.game-toolbar{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;margin-top:12px;display:grid}.game-toolbar.single-action{grid-template-columns:1fr}.game-toolbar button{border:1px solid var(--line);min-width:0;min-height:46px;color:var(--text);background:var(--surface);border-radius:8px;justify-content:center;align-items:center;gap:6px;padding:8px;font-size:13px;font-weight:620;display:flex}.game-toolbar button:hover:not(:disabled){background:var(--surface-2)}.game-toolbar button:disabled{color:var(--muted);opacity:.5}.game-toolbar svg{flex:none;width:19px;height:19px}.profile-screen{padding-top:16px;padding-bottom:calc(32px + var(--safe-bottom))}.profile-summary{align-items:center;gap:12px;display:flex}.profile-avatar{width:48px;height:48px;color:var(--accent-text);background:var(--accent);border-radius:8px;flex-shrink:0;place-items:center;font-size:18px;font-weight:700;display:grid}.profile-summary>div:last-child{min-width:0}.profile-summary h2{letter-spacing:-.02em;overflow-wrap:anywhere;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:16px;font-weight:650;line-height:21px;display:-webkit-box;overflow:hidden}.profile-summary p{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;margin:2px 0 0;font-size:12px;overflow:hidden}.profile-stats{border-top:1px solid var(--line);border-bottom:1px solid var(--line);grid-template-columns:repeat(2,minmax(0,1fr));margin:14px 0 22px;padding:4px 0;display:grid}.profile-stats button{text-align:left;background:0 0;border:0;grid-template-columns:minmax(0,1fr) auto 12px;align-items:center;gap:5px;min-height:44px;padding:6px 8px;display:grid}.profile-stats button+button{border-left:1px solid var(--line)}.profile-stats strong{font-variant-numeric:tabular-nums;font-size:15px;font-weight:650}.profile-stats span{min-width:0;color:var(--secondary);font-size:13px}.profile-stats svg{width:12px;height:12px}.profile-stats button:hover{background:var(--surface)}.settings-section+.settings-section{margin-top:22px}.settings-group{border:1px solid var(--line);background:var(--surface);border-radius:8px;overflow:hidden}.settings-row{text-align:left;background:0 0;border:0;grid-template-columns:24px minmax(0,1fr) auto 16px;align-items:center;gap:10px;width:100%;min-height:54px;padding:8px 14px;display:grid;position:relative}.settings-row:focus-visible{z-index:2;outline:2px solid var(--focus);outline-offset:-2px}button.settings-row{transition:background-color .14s,transform 90ms}button.settings-row:hover{background:color-mix(in srgb, var(--surface-2) 56%, transparent)}button.settings-row:active{transform:scale(.992)}button.settings-row+.settings-row:before,.settings-row+.settings-row:before{content:"";background:var(--line);height:1px;position:absolute;top:0;left:58px;right:14px}.settings-icon{width:24px;height:24px;color:var(--accent);place-items:center;display:grid}.settings-icon svg{width:18px;height:18px}.settings-label{min-width:0;font-size:14px;font-weight:560}.settings-value{max-width:min(155px,28vw);color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.settings-value.static-value{grid-column:3/5;padding-right:2px}.switch{background:0 0;border:0;border-radius:15px;grid-column:3/5;width:46px;height:44px;padding:0;position:relative}.switch:before{content:"";background:var(--surface-2);border-radius:15px;transition:background-color .16s;position:absolute;inset:8px 0}.switch span{background:var(--secondary);border-radius:50%;width:22px;height:22px;transition:transform .18s cubic-bezier(.2,.8,.2,1),background-color .16s;position:absolute;top:11px;left:3px}.switch.on:before{background:var(--accent)}.switch.on span{background:var(--accent-text);transform:translate(18px)}.storage-section{gap:10px;display:grid}.storage-error{color:var(--danger);align-items:center;gap:8px;margin:0;font-size:12px;line-height:17px;display:flex}.storage-error svg{width:16px;height:16px;color:var(--danger);flex:none}.reset-settings-button{flex-direction:column;align-items:flex-start;gap:2px;min-width:0;display:flex}.reset-settings-button span{font-size:13px;font-weight:620}.reset-settings-button small{color:var(--muted);font-size:11px;line-height:16px}.reset-settings-button{border:1px solid color-mix(in srgb, var(--danger) 32%, var(--line));min-height:54px;color:var(--danger);text-align:left;background:0 0;border-radius:8px;padding:8px 14px;transition:background-color .14s,transform 90ms}.reset-settings-button:hover{background:color-mix(in srgb, var(--danger) 8%, transparent)}.reset-settings-button:active{transform:scale(.992)}.reset-settings-button small{color:color-mix(in srgb, var(--danger) 62%, var(--muted))}.settings-board-preview{border:1px solid var(--line);background:var(--surface);border-radius:8px;align-items:center;gap:14px;margin:22px 0;padding:12px;display:flex}.settings-board-preview .mini-board{flex:none;width:64px}.settings-board-preview>span{flex-direction:column;gap:4px;min-width:0;display:flex}.settings-board-preview strong{font-size:15px;font-weight:650}.settings-board-preview small{color:var(--muted);font-size:13px}.final-settings{margin-bottom:16px}.sheet-open{overflow:hidden}.sheet-layer{border-radius:inherit}.sheet-backdrop{border-radius:inherit;cursor:default;background:#0204049e;border:0}.bottom-sheet{background:var(--raised);width:100%;box-shadow:var(--shadow-sheet);box-sizing:border-box;border-radius:16px 16px 0 0;overflow:hidden;height:auto!important;max-height:min(86%,760px)!important}.sheet-drag-region{z-index:11;box-sizing:border-box;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;place-items:start center;height:48px;padding-top:10px;display:grid;top:0;left:50%;transform:translate(-50%);width:120px!important;position:absolute!important}.sheet-drag-region:active{cursor:grabbing}.sheet-handle{background:var(--line-strong);pointer-events:none;border-radius:2px;width:36px;height:4px;display:block}.sheet-header{z-index:10;min-height:68px;padding:30px calc(16px + var(--safe-right)) 12px calc(16px + var(--safe-left));background:var(--raised);box-sizing:border-box;flex-shrink:0;justify-content:space-between;align-items:flex-start;gap:12px;display:flex;position:relative}.sheet-header>div{min-width:0;padding-top:4px}.sheet-header h2{letter-spacing:-.02em;margin:0;font-size:21px;font-weight:650;line-height:28px}.sheet-header p{color:var(--muted);margin:4px 0 0;font-size:13px;line-height:18px}.sheet-content-shell{z-index:0;min-height:0;position:relative;overflow:hidden}.sheet-content{min-width:0;padding:12px calc(16px + var(--safe-right)) calc(18px + var(--safe-bottom)) calc(16px + var(--safe-left));overscroll-behavior:contain;box-sizing:border-box;-webkit-overflow-scrolling:touch}.sheet-content:focus-visible{outline:none}.preference-fieldset{min-width:0;border:0;min-inline-size:0;margin:0;padding:0}.preference-fieldset+.preference-fieldset,.preference-fieldset+.sheet-setting-group,.sheet-setting-group+.preference-fieldset{margin-top:24px}.preference-fieldset legend{color:var(--secondary);margin-bottom:10px;font-size:14px;font-weight:620}.preference-help{max-width:44ch;color:var(--muted);margin:-4px 0 10px;font-size:11px;line-height:16px}.preference-choice-grid{gap:8px;display:grid}.preference-choice-grid.columns-2{grid-template-columns:repeat(2,minmax(0,1fr))}.preference-choice-grid.columns-3{grid-template-columns:repeat(3,minmax(0,1fr))}.preference-choice-grid.columns-4{grid-template-columns:repeat(4,minmax(0,1fr))}.preference-choice-grid.columns-3 button{padding-inline:8px}.preference-choice-grid.columns-3 strong{font-size:12px}.preference-choice-grid button,.piece-choice-strip button,.palette-choice-grid button{border:1px solid var(--line);min-width:0;min-height:58px;color:var(--secondary);background:var(--surface);text-align:left;border-radius:8px;flex-direction:column;justify-content:center;align-items:flex-start;gap:3px;padding:10px 12px;transition:border-color .14s,background-color .14s,transform 90ms;display:flex;position:relative}.preference-choice-grid button:hover:not(:disabled),.piece-choice-strip button:hover:not(:disabled),.palette-choice-grid button:hover:not(:disabled){background:var(--surface-2)}.preference-choice-grid button:active:not(:disabled),.piece-choice-strip button:active:not(:disabled),.palette-choice-grid button:active:not(:disabled){transform:scale(.985)}.preference-choice-grid button.active,.piece-choice-strip button.active,.palette-choice-grid button.active{border-color:color-mix(in srgb, var(--accent) 76%, var(--line));color:var(--text);background:color-mix(in srgb, var(--accent) 9%, var(--surface))}.preference-choice-grid button:disabled{opacity:.5}.preference-choice-grid strong,.piece-choice-strip strong,.palette-choice-grid strong{text-overflow:ellipsis;max-width:100%;font-size:13px;font-weight:620;line-height:16px;overflow:hidden}.preference-choice-grid small{color:var(--muted);font-size:11px;line-height:15px}.piece-choice-strip strong,.palette-choice-grid strong{font-size:12px}.preference-choice-grid button>svg,.piece-choice-strip button>svg,.palette-choice-grid button>svg{width:15px;height:15px;color:var(--accent);position:absolute;top:9px;right:9px}.piece-choice-strip{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%;min-width:0;max-width:100%;padding:0;display:grid}.piece-choice-strip button{min-height:88px}@media (min-width:480px){.piece-choice-strip{grid-template-columns:repeat(4,minmax(0,1fr))}}.piece-choice-sample{align-items:flex-end;width:52px;height:31px;display:flex}.piece-choice-sample img{object-fit:contain;filter:drop-shadow(0 1px 1px #0000002e);pointer-events:none;-webkit-user-select:none;user-select:none;width:31px;height:31px;display:block}.piece-choice-sample img:first-child{z-index:1}.piece-choice-sample img+img{margin-left:-8px}.palette-choice-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;display:grid}.palette-choice-grid button{justify-content:flex-start;gap:6px;min-height:76px;padding:8px}.palette-swatch{border-radius:8px;grid-template-rows:repeat(2,1fr);grid-template-columns:repeat(2,1fr);width:100%;height:32px;display:grid;overflow:hidden}.palette-swatch i:first-child,.palette-swatch i:nth-child(4){background:var(--swatch-light)}.palette-swatch i:nth-child(2),.palette-swatch i:nth-child(3){background:var(--swatch-dark)}.palette-green{--swatch-light:#eadfc7;--swatch-dark:#688666}.palette-wood{--swatch-light:#e9d3ad;--swatch-dark:#9c6b43}.palette-light{--swatch-light:#f0eadb;--swatch-dark:#b8c1ad}.palette-dark{--swatch-light:#aeb7ab;--swatch-dark:#44534c}.palette-gray{--swatch-light:#d9ddd3;--swatch-dark:#7b8780}.palette-contrast{--swatch-light:#f3e9ca;--swatch-dark:#56735d}.sheet-setting-group{border:1px solid var(--line);background:var(--surface);border-radius:8px;overflow:hidden}.sheet-switch-row{justify-content:space-between;align-items:center;gap:14px;min-height:62px;padding:9px 12px 9px 14px;display:flex}.sheet-switch-row>span:first-child{flex-direction:column;gap:3px;min-width:0;display:flex}.sheet-switch-row strong{font-size:13px;font-weight:620}.sheet-switch-row small{max-width:34ch;color:var(--muted);font-size:11px;line-height:15px}.sheet-switch-row .switch{flex:none}.level-summary{background:var(--surface);border-radius:8px;grid-template-columns:1fr auto;align-items:center;gap:2px 12px;padding:14px 16px;display:grid}.sheet-slot-usage{color:var(--secondary);justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;font-size:12px;line-height:18px;display:flex}.sheet-slot-usage strong{color:var(--text);font-variant-numeric:tabular-nums}.sheet-slot-usage.full strong{color:var(--danger)}.slot-limit-explanation{color:var(--muted);margin:0 0 12px;font-size:12px;line-height:18px}.level-summary span{color:var(--secondary);font-size:13px}.level-summary strong{color:var(--accent);grid-area:1/2/3;font-size:32px;font-weight:650;line-height:38px}.level-summary em{color:var(--text);font-size:15px;font-style:normal;font-weight:620}.level-range{width:100%;height:34px;accent-color:var(--accent);margin-top:18px}.level-range::-webkit-slider-runnable-track{background:var(--surface-2);border-radius:2px;height:4px}.level-range::-webkit-slider-thumb{border:4px solid var(--raised);background:var(--accent);width:24px;height:24px;box-shadow:0 0 0 1px var(--line-strong);-webkit-appearance:none;border-radius:50%;margin-top:-10px}.range-labels{color:var(--muted);justify-content:space-between;margin:-4px 0 18px;font-size:11px;display:flex}.primary-button,.secondary-button{border-radius:8px;justify-content:center;align-items:center;gap:9px;width:100%;min-height:50px;padding:12px 18px;font-size:14px;font-weight:650;transition:background-color .12s,transform 90ms;display:flex}.primary-button{color:var(--accent-text);background:var(--accent);border:0}.primary-button:hover{background:var(--accent-pressed)}.primary-button:disabled{opacity:.55}.primary-button.destructive-button{background:var(--danger)}.primary-button.destructive-button:hover:not(:disabled){background:color-mix(in srgb, var(--danger) 86%, var(--text))}.confirm-error{color:var(--danger);background:color-mix(in srgb, var(--danger) 10%, var(--surface));text-wrap:pretty;border-radius:12px;margin:0 0 10px;padding:10px 12px;font-size:12px;line-height:18px}.secondary-button{border:1px solid var(--line-strong);color:var(--text);background:var(--surface);margin-top:10px}.primary-button svg,.secondary-button svg{width:20px;height:20px}.invite-code{background:var(--surface);border-radius:8px;justify-content:space-between;align-items:center;gap:12px;min-height:72px;margin-bottom:18px;padding:12px 16px;display:flex}.invite-code span{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.invite-code strong{color:var(--accent);letter-spacing:.08em;font-size:19px}.coach-answer{background:var(--surface);border-radius:8px;align-items:flex-start;gap:12px;padding:16px;display:flex}.coach-mark{width:36px;height:36px;color:var(--accent-text);background:var(--accent);border-radius:12px;flex:none;place-items:center;display:grid}.coach-mark svg{width:20px;height:20px}.coach-answer p{color:var(--secondary);margin:0;font-size:14px;line-height:21px}.coach-answer.is-ready{background:0 0;border-radius:0;padding:2px 2px 6px;display:block}.coach-answer.is-ready p{color:var(--text);overflow-wrap:anywhere;text-wrap:pretty;white-space:pre-line;font-size:15px;line-height:23px}.coach-line{border-bottom:1px solid var(--line);color:var(--secondary);font-variant-numeric:tabular-nums;align-items:center;gap:12px;margin:12px 0 18px;padding:12px 16px;font-size:13px;display:flex}.coach-line strong{color:var(--text)}.menu-actions,.choice-list{border:1px solid var(--line);background:var(--surface);border-radius:8px;overflow:hidden}.menu-actions button,.choice-list button{text-align:left;background:0 0;border:0;grid-template-columns:24px 1fr 18px;align-items:center;gap:12px;width:100%;min-height:58px;padding:8px 14px;display:grid;position:relative}.menu-actions button+button:before,.choice-list button+button:before{content:"";background:var(--line);height:1px;position:absolute;top:0;left:50px;right:14px}.menu-actions button>svg:first-child,.choice-list button>svg:first-child{width:21px;height:21px;color:var(--accent)}.menu-actions button>svg:last-child,.choice-list button>svg:last-child{width:17px;height:17px;color:var(--muted)}.menu-actions strong{font-size:14px;font-weight:580}.menu-actions button:disabled{opacity:.48}.menu-actions .destructive,.menu-actions .destructive>svg:first-child{color:var(--danger)}.choice-list button{grid-template-columns:1fr 20px;min-height:54px;font-size:14px;font-weight:560}.choice-list button.active,.choice-list button>svg:last-child{color:var(--accent)}.theme-choices{grid-template-columns:repeat(3,1fr);gap:10px;display:grid}.theme-choices button{border:1px solid var(--line);min-width:0;color:var(--secondary);background:var(--surface);border-radius:8px;flex-direction:column;align-items:flex-start;gap:9px;padding:8px;display:flex;position:relative}.theme-choices button.active{border-color:var(--accent);color:var(--text)}.theme-choices button>svg{width:18px;height:18px;color:var(--accent);position:absolute;top:12px;right:12px}.theme-preview{aspect-ratio:1.25;background:#171b1b;border-radius:10px;grid-template-columns:1fr 1.7fr;width:100%;display:grid;overflow:hidden}.theme-preview i:first-child{background:#202626}.theme-preview i:last-child{background:#b8d5bc;border-radius:5px;margin:9px}.theme-preview.light{background:#f4f3ee}.theme-preview.light i:first-child{background:#fff}.theme-preview.light i:last-child{background:#315e40}.theme-preview.system{background:linear-gradient(90deg,#171b1b 50%,#f4f3ee 50%)}.theme-preview.system i:first-child{background:#ffffff14}.theme-choices strong{text-overflow:ellipsis;width:100%;font-size:12px;font-weight:600;overflow:hidden}.promotion-grid{grid-template-columns:repeat(4,1fr);gap:8px;display:grid}.promotion-grid button{border:1px solid var(--line);min-width:0;min-height:94px;color:var(--text);background:var(--surface);border-radius:8px;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:8px 4px;display:flex}.promotion-grid button span{color:var(--piece-light);text-shadow:0 1px #090f0de6;font-family:Segoe UI Symbol,serif;font-size:38px;line-height:1}.promotion-grid button strong{font-size:10px;font-weight:600}.toast{z-index:80;right:16px;bottom:calc(80px + var(--safe-bottom) + var(--preview-inset));border:1px solid var(--line-strong);width:-moz-fit-content;width:fit-content;max-width:calc(min(100vw,520px) - 32px);color:var(--text);background:var(--raised);opacity:0;pointer-events:none;border-radius:12px;margin:0 auto;padding:10px 14px;font-size:13px;font-weight:560;line-height:18px;transition:opacity .16s,transform .16s;position:fixed;left:16px;transform:translateY(8px);box-shadow:0 12px 30px #0003}.toast.warning{align-items:flex-start;gap:9px;display:flex}.toast-warning-mark{color:#2a2108;background:#efbd3b;border-radius:50%;flex:0 0 20px;place-items:center;width:20px;height:20px;font-size:13px;font-weight:800;line-height:1;display:grid}.toast.visible{opacity:1;transform:translateY(0)}@media (max-width:359px){#root .screen,.app-topbar{padding-right:calc(12px + var(--safe-right));padding-left:calc(12px + var(--safe-left))}.current-game-row{grid-template-columns:96px minmax(0,1fr);gap:12px;padding:12px}.current-game-row .mini-board{width:96px}.game-row{grid-template-columns:52px minmax(0,1fr) 18px;gap:9px}.game-row-with-action .game-row{grid-template-columns:52px minmax(0,1fr)}.game-row .game-thumbnail{width:52px}.game-row.compact{grid-template-columns:48px minmax(0,1fr) 18px}.game-row.compact .game-thumbnail{width:48px}.promotion-grid{gap:5px}.promotion-grid button strong{font-size:9px}}@media (min-width:620px){#root .screen,.app-topbar{padding-left:28px;padding-right:28px}.play-screen{max-width:680px;margin-inline:auto}.bottom-sheet{border-radius:16px;width:520px!important;bottom:16px!important;left:calc(50% - 260px)!important}}@media (min-width:800px){.play-screen{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);align-items:start;gap:32px;max-width:none;padding-top:32px;display:grid}.start-section:only-child{grid-column:1/-1;justify-self:center;width:min(100%,520px)}.start-section{padding-top:11px}.game-screen{grid-template-columns:minmax(0,560px) minmax(0,1fr);align-items:start;gap:28px;padding-top:16px}.game-controls{border-top:0;margin-top:44px;padding-top:0}.game-toolbar{grid-template-columns:1fr}.turn-status{align-items:flex-start}.turn-dot{margin-top:7px}.evaluation-badge{margin-left:15px}.replay-dock{margin-block:16px}}@media (max-height:660px){.game-screen{padding-top:2px}.player-bar{min-height:40px;padding-top:4px;padding-bottom:4px}.game-toolbar button{min-height:44px}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}.chess-board-3d-host{aspect-ratio:1;background:color-mix(in srgb, var(--board-frame) 82%, #071011);width:100%;display:block;position:relative}.chess-board-3d-host canvas{display:block}.chess-3d-controls{gap:4px;display:flex;position:absolute;inset:auto 8px 8px auto}.chess-3d-controls button{width:44px;height:44px;color:var(--secondary);background:var(--raised);cursor:pointer;border:0;border-radius:6px;place-items:center;padding:0;display:grid}.chess-3d-controls button:hover,.chess-3d-controls button:focus-visible{color:var(--text);background:var(--surface)}.chess-3d-controls button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chess-3d-controls svg{fill:none;stroke:currentColor;stroke-width:1.6px;stroke-linecap:round;stroke-linejoin:round;width:20px;height:20px}.archive-load-more{width:100%;margin-top:12px}.archive-delete-button{color:var(--secondary)}.archive-delete-game{color:var(--secondary);margin:0 0 14px;font-weight:700}.updates-state{color:var(--secondary);margin:4px 0 14px}.updates-list{gap:12px;display:grid}.update-card{border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:16px}.update-card time{color:var(--secondary);font-size:12px;font-weight:700}.update-card h3{margin:7px 0 9px;font-size:17px}.update-card p{color:var(--secondary);margin:0 0 9px;line-height:1.55}.toast.error{border-color:color-mix(in srgb, #c84646 36%, var(--line))}.launch-status{max-width:28rem;color:var(--text);margin:32px auto;padding:24px;font:16px/1.5 system-ui}.launch-status a{color:var(--accent)}.app-upgrade{z-index:1000;background:var(--bg);color:var(--text);place-content:center;display:grid;position:fixed;inset:0}
/*$vite$:1*/