@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-latin-wght-normal-BgDaEnEv.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2) format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2) format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2) format("woff2-variations");unicode-range:U+2000-2001,U+2004-2008,U+200A,U+23B8-23BD,U+2500-259F}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2) format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2) format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Geist Mono Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url(/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2) format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--bg: #eceef2;--surface: #ffffff;--surface-2: #f5f6f8;--text: #15181d;--muted: #687080;--border: #e0e3e8;--accent: #e2553a;--accent-soft: #fbe6e1;--ink: #15181d;--ink-text: #ffffff;--light-square: #e2e7ee;--dark-square: #8396b0;--shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 6px 20px rgba(16, 24, 40, .06);--shadow-lg: 0 2px 4px rgba(16, 24, 40, .08), 0 18px 48px rgba(16, 24, 40, .14);--radius: 14px;--mono: "Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, monospace;font-family:Geist Variable,system-ui,-apple-system,Segoe UI,sans-serif;font-size:15px;line-height:1.45;color:var(--text);background:var(--bg);-webkit-font-smoothing:antialiased}@media(prefers-color-scheme:dark){:root{--bg: #111317;--surface: #1a1d22;--surface-2: #22262c;--text: #eceef2;--muted: #8c94a3;--border: #2b3037;--accent: #f06a4d;--accent-soft: #3a221d;--ink: #eceef2;--ink-text: #111317;--light-square: #c8d1dd;--dark-square: #6c809b;--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);--shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 48px rgba(0, 0, 0, .45)}}*{box-sizing:border-box}body{margin:0;background:var(--bg)}h1,h2,h3,p{margin:0}h1{font-size:1.5rem;font-weight:650;letter-spacing:-.02em}h2{font-size:1.05rem;font-weight:600;letter-spacing:-.01em;margin-top:32px}h3{font-size:1.1rem;font-weight:650;letter-spacing:-.01em}code{font-family:var(--mono);font-size:.86em}a{color:inherit}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:7px 14px;font-weight:500;transition:background .15s,border-color .15s,color .15s,transform .1s,box-shadow .15s}button:hover:not(:disabled){background:var(--surface-2)}button:active:not(:disabled){transform:translateY(1px)}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}button.primary{background:var(--ink);border-color:var(--ink);color:var(--ink-text);font-weight:600}button.primary:hover:not(:disabled){background:var(--ink);opacity:.88}button.wide{width:100%}button.big{padding:13px 16px;font-size:1rem;border-radius:12px}button.link{background:none;border:0;padding:0;color:var(--accent);font-weight:500}button.link:hover{background:none;text-decoration:underline}.icon{display:inline-flex;align-items:center;justify-content:center;padding:7px;background:none;border:0;border-radius:8px;color:var(--muted)}.icon:hover{color:var(--text);background:var(--surface-2)!important}input,select,textarea{width:100%;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:9px 11px}textarea{resize:vertical}.muted{color:var(--muted)}.hint{color:var(--muted);font-size:.9rem}.tag{font-size:.72rem;font-weight:600;color:var(--muted);background:var(--surface-2);border-radius:6px;padding:1px 6px;margin-left:8px}.right{text-align:right}.nowrap{white-space:nowrap}.header{position:sticky;top:0;z-index:10;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:0 24px;height:64px;background:color-mix(in srgb,var(--bg) 82%,transparent);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}.logo{display:flex;align-items:center;gap:10px;justify-self:start;border:0;background:none!important;padding:0;font-weight:700;font-size:1.12rem;letter-spacing:-.02em}.logo-mark{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:var(--ink)}.logo-mark .piece{width:24px;height:24px}.header nav{display:flex;gap:2px;padding:4px;background:var(--surface);border-radius:12px;box-shadow:var(--shadow)}.header nav button{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border:0;background:none;padding:6px 14px;border-radius:9px;color:var(--muted)}.header nav button:hover{color:var(--text)}.header nav button.active{color:var(--ink-text);background:var(--ink)}.count{display:inline-grid;place-items:center;min-width:18px;height:18px;margin-left:6px;padding:0 5px;font-size:.7rem;font-weight:700;border-radius:9px;background:var(--accent);color:#fff}.header-end{justify-self:end;display:flex;align-items:center;gap:14px}.account{display:flex;align-items:center;gap:8px;border:0;box-shadow:var(--shadow)}.offline{color:var(--accent);font-size:.85rem;font-weight:500}main{max-width:1120px;margin:0 auto;padding:16px 24px 64px}.play{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:28px;align-items:start}.board-column{display:flex;flex-direction:column;gap:10px;width:100%;max-width:min(640px,calc(100vh - 220px));min-width:280px;margin:0 auto}.player-row{display:flex;align-items:center;gap:12px;padding:4px 2px}.avatar{display:grid;place-items:center;width:38px;height:38px;flex:none;border-radius:11px;font-weight:650;box-shadow:inset 0 0 0 1px #00000014}.avatar{background:var(--avatar, var(--surface-2));color:#fff}.avatar.empty{color:var(--muted);box-shadow:inset 0 0 0 1.5px var(--border);background:none}.avatar.small{width:24px;height:24px;border-radius:7px;font-size:.75rem}.avatar.large{width:56px;height:56px;border-radius:16px;font-size:1.5rem}.avatar .piece{width:72%;height:72%}.avatar .piece g,.emblems .piece g{fill:#fff;stroke:none}.avatar .piece .line{stroke:var(--avatar)}.seat{position:relative;flex:none;display:grid}.seat-side{position:absolute;right:-3px;bottom:-3px;width:13px;height:13px;border-radius:50%;border:2px solid var(--bg)}.seat-side.w{background:#fff;box-shadow:inset 0 0 0 1px #00000040}.seat-side.b{background:#23272e}.player-detail.tagline{font-style:italic;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player-name .tag{vertical-align:1px}.player-text{display:flex;flex-direction:column;min-width:0}.player-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.player-detail{font-size:.8rem;color:var(--muted)}.clock{margin-left:auto;font-family:var(--mono);font-size:1.3rem;font-weight:500;padding:5px 14px;border-radius:10px;background:var(--surface);color:var(--muted);box-shadow:var(--shadow);font-variant-numeric:tabular-nums;transition:background .2s,color .2s}.clock.running{background:var(--ink);color:var(--ink-text)}.clock.low{background:var(--accent);color:#fff}.board-tools{display:flex;gap:2px;justify-content:flex-end}.board-wrap{position:relative;border-radius:12px;overflow:hidden;box-shadow:var(--shadow-lg)}.board{display:grid;grid-template-columns:repeat(8,1fr);aspect-ratio:1;width:100%;user-select:none;-webkit-user-select:none}.square{position:relative;border:0;border-radius:0;padding:0;aspect-ratio:1;display:block;transition:none}.square:active:not(:disabled){transform:none}.board{--sq-light: var(--light-square);--sq-dark: var(--dark-square)}.board.tinted,.themes button{--w-light: color-mix(in oklab, var(--w) 13%, #f3f4f6);--w-dark: color-mix(in oklab, var(--w) 58%, #d9dde3);--b-light: color-mix(in oklab, var(--b) 13%, #f3f4f6);--b-dark: color-mix(in oklab, var(--b) 58%, #d9dde3)}.board.tinted .half-w{--sq-light: var(--w-light);--sq-dark: var(--w-dark)}.board.tinted .half-b{--sq-light: var(--b-light);--sq-dark: var(--b-dark)}.square.light,.square.light:hover{background:var(--sq-light)!important;transition:background .4s}.square.dark,.square.dark:hover{background:var(--sq-dark)!important;transition:background .4s}.square.last-move:before,.square.selected:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0}.square.last-move:before{background:#ffcd5073}.square.selected:before{background:#e2553a6b}.square.check:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:radial-gradient(circle,#e2321ef2,#e2321e80 35%,#e2321e00 72%)}.square.target:after{content:"";position:absolute;top:38%;right:38%;bottom:38%;left:38%;border-radius:50%;background:#15181d47;z-index:2}.square.capture:after{content:"";position:absolute;top:3%;right:3%;bottom:3%;left:3%;border-radius:50%;box-shadow:inset 0 0 0 4px #15181d4d;z-index:2}.square.target:hover:after{top:0;right:0;bottom:0;left:0;border-radius:0;background:#15181d24}.square .piece,.square .arrive{position:absolute;top:5%;right:5%;bottom:5%;left:5%;width:90%;height:90%;z-index:1}.square .arrive .piece{top:0;right:0;bottom:0;left:0;width:100%;height:100%}.arrive{z-index:3!important;animation:arrive .18s cubic-bezier(.2,.7,.3,1)}@keyframes arrive{0%{transform:translate(calc(var(--dx) * 111%),calc(var(--dy) * 111%))}to{transform:none}}.square:focus-visible{outline-offset:-3px;z-index:4}.coord{position:absolute;font-size:.68rem;font-weight:650;line-height:1;z-index:1}.coord.rank{top:4px;left:4px}.coord.file{bottom:4px;right:5px}.square.light .coord{color:var(--sq-dark)}.square.dark .coord{color:var(--sq-light)}.piece{overflow:visible;filter:drop-shadow(0 1.5px 1px rgba(0,0,0,.22))}.piece g{stroke:#15181d}.piece-w g{fill:#fff}.piece-b g{fill:#23272e;stroke:#0c0e11}.piece .line{fill:none}.piece-b .line{stroke:#d7dce4}.logo-mark .piece,.avatar .piece{filter:none}.logo-mark .piece g{stroke:none}@media(prefers-color-scheme:dark){.logo-mark .piece-w g{fill:#111317}.logo-mark .piece .line{stroke:#eceef2}}.result-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:grid;place-items:center;background:#0f121759;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:5;animation:fade .25s ease-out}.result-card{display:flex;flex-direction:column;align-items:center;gap:6px;padding:24px 28px;background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow-lg);text-align:center;animation:rise .3s cubic-bezier(.2,.7,.3,1)}.result-score{font-family:var(--mono);font-size:2.2rem;font-weight:600;letter-spacing:-.02em}.result-actions{display:flex;gap:8px;margin-top:12px}@keyframes fade{0%{opacity:0}}@keyframes rise{0%{opacity:0;transform:translateY(8px) scale(.98)}}.panel{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px;display:flex;flex-direction:column;gap:18px}fieldset{border:0;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;min-width:0}legend{font-weight:600;font-size:.78rem;color:var(--muted);margin-bottom:8px;padding:0;text-transform:uppercase;letter-spacing:.06em}.field{display:flex;flex-direction:column;gap:6px;font-size:.9rem;font-weight:500}.segmented{display:flex;padding:4px;gap:2px;background:var(--surface-2);border-radius:12px}.segmented button{flex:1;border:0;background:none;padding:7px 8px;border-radius:9px;color:var(--muted);white-space:nowrap}.segmented button:hover:not(:disabled){background:none;color:var(--text)}.segmented button[aria-pressed=true]{background:var(--surface);color:var(--text);box-shadow:var(--shadow);font-weight:600}.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.tile{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:12px;border-radius:12px;text-align:left;background:var(--surface-2);border-color:transparent}.tile strong{margin-top:10px;font-weight:650}.tile>span:last-child{font-size:.8rem;color:var(--muted)}.tile[aria-pressed=true]{background:var(--surface);border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}.strength{display:inline-flex;gap:3px}.strength i{width:14px;height:4px;border-radius:2px;background:var(--border)}.strength i.on{background:var(--accent)}.pills{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.pills button{display:flex;flex-direction:column;align-items:center;gap:0;padding:8px 4px;border-radius:12px;background:var(--surface-2);border-color:transparent;color:var(--muted);font-size:.72rem;line-height:1.2;white-space:nowrap}.pills button b{color:var(--text);font-size:1.1rem;font-weight:650}.pills button[aria-pressed=true]{background:var(--ink);color:var(--ink-text);opacity:1}.pills button[aria-pressed=true] b{color:var(--ink-text)}.sides{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.sides button{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 6px 8px;border-radius:12px;background:var(--surface-2);border-color:transparent;font-size:.85rem;color:var(--muted)}.sides button .piece{width:34px;height:34px}.sides button[aria-pressed=true]{background:var(--surface);color:var(--text);font-weight:600;box-shadow:inset 0 0 0 1px var(--ink);border-color:var(--ink)}.random-king{position:relative;width:34px;height:34px}.random-king .piece{position:absolute;top:0;right:0;bottom:0;left:0}.random-king .piece-w{clip-path:inset(0 50% 0 0)}.random-king .piece-b{clip-path:inset(0 0 0 50%)}.friend-hint{padding:12px 14px;background:var(--surface-2);border-radius:12px}.game-head h1{font-size:1.15rem}.status{font-weight:600;padding:10px 14px;background:var(--surface-2);border-radius:12px}.status.mine{background:var(--accent-soft);color:var(--accent)}.status.done{background:var(--ink);color:var(--ink-text)}.moves{list-style:none;margin:0;padding:4px;max-height:340px;min-height:140px;overflow-y:auto;background:var(--surface-2);border-radius:12px;font-family:var(--mono);font-size:.9rem}.moves li{display:grid;grid-template-columns:36px 1fr 1fr;align-items:center}.moves li.empty{display:block;padding:10px;font-family:inherit}.move-number{color:var(--muted);padding-left:8px;font-size:.82rem}.moves button{border:0;background:none;text-align:left;padding:5px 10px;border-radius:7px;font-weight:500}.moves button:hover:not(:disabled){background:var(--surface)}.moves button.current{background:var(--ink)!important;color:var(--ink-text)}.move-nav{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;margin-top:-8px}.actions{display:flex;flex-wrap:wrap;gap:8px}.actions button{flex:1;white-space:nowrap;padding:8px 10px}.copy-field{display:flex;gap:4px;align-items:center}.copy-field input{font-family:var(--mono);font-size:.82rem}.invite{display:flex;flex-direction:column;gap:14px}.page{max-width:880px;margin:16px auto 0}.page>p{margin-top:8px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.filters{margin:20px 0;max-width:440px}.game-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:16px}.game-card{display:flex;flex-direction:column;gap:4px;text-align:left;padding:10px 10px 12px;border:0;border-radius:var(--radius);box-shadow:var(--shadow)}.game-card:hover:not(:disabled){background:var(--surface);box-shadow:var(--shadow-lg);transform:translateY(-2px)}.game-card .board{border-radius:8px;overflow:hidden;margin-bottom:8px}.game-card strong{font-size:.85rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.card-players{display:flex;align-items:center;gap:6px;min-width:0}.card-players .muted{font-size:.75rem}.bot-name{display:flex;align-items:center;gap:8px}.bot-table .tagline{display:block;margin-top:4px;font-style:italic;color:var(--muted)}.bot-table code{display:block;margin-top:4px}.game-card .muted{font-size:.8rem}.board.mini .square .piece{top:2%;right:2%;bottom:2%;left:2%;width:96%;height:96%;filter:none}.bot-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;margin-top:14px}.bot-card{display:flex;flex-direction:column;gap:4px;padding:20px;background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow)}.bot-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.bot-card p{margin:8px 0 16px;color:var(--muted);font-size:.92rem;flex:1}.bot-table,.endpoints{width:100%;border-collapse:collapse;margin-top:12px;background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}.bot-table td,.endpoints td{border-top:1px solid var(--border);padding:12px 14px;vertical-align:top}.bot-table tr:first-child td,.endpoints tr:first-child td{border-top:0}.bot-table td:first-child{width:200px}.bot-table td.right button{margin-left:4px}.endpoints td{padding:8px 14px}.endpoints td:first-child{width:70px;color:var(--accent);font-weight:600}.docs>p{max-width:68ch}.docs h2+p,.docs .code+p{margin-top:8px}.code{position:relative;margin-top:12px;background:#15181d;color:#e6e9ee;border-radius:12px}.code pre{margin:0;padding:16px 44px 16px 16px;overflow-x:auto;font-size:.85rem;line-height:1.6}.code .icon{position:absolute;top:8px;right:8px;color:#8c94a3}.code .icon:hover{color:#fff;background:#2b3037!important}.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%);display:flex;align-items:center;gap:10px;padding:10px 10px 10px 16px;background:var(--ink);color:var(--ink-text);border-radius:12px;box-shadow:var(--shadow-lg);z-index:30;max-width:calc(100% - 32px);animation:rise .25s cubic-bezier(.2,.7,.3,1)}.toast .icon{color:inherit}.toast .icon:hover{background:none!important}.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0a0c1073;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:grid;place-items:center;padding:16px;z-index:20;animation:fade .2s ease-out}.modal{background:var(--surface);border-radius:18px;box-shadow:var(--shadow-lg);padding:22px;width:100%;max-width:400px;max-height:calc(100vh - 32px);overflow-y:auto;display:flex;flex-direction:column;gap:14px;animation:rise .25s cubic-bezier(.2,.7,.3,1)}.modal-head{display:flex;align-items:center;justify-content:space-between}.modal-head h2{margin:0;font-size:1.15rem}.modal-actions{display:flex;justify-content:flex-end;gap:8px}.form{display:flex;flex-direction:column;gap:14px}.promotion{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.promotion button{aspect-ratio:1;padding:8px;background:var(--light-square)!important;border:0;border-radius:12px}.promotion button:hover{background:var(--dark-square)!important}.promotion .piece{width:100%;height:100%}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}@media(max-width:860px){main{padding:8px 16px 96px}.header{grid-template-columns:auto 1fr;padding:0 16px;height:56px}.header nav{grid-row:2;grid-column:1 / -1;justify-self:stretch;margin-bottom:10px}.header nav button{flex:1;padding:6px 8px}.header{height:auto;padding-top:10px;row-gap:10px;position:static}.play{grid-template-columns:1fr;gap:20px}.board-column{max-width:none;min-width:0}.panel{padding:18px}.play.setup .panel{order:-1}.play.setup .board-column{display:none}.bot-table td:first-child{width:auto}.bot-table tr{display:grid;grid-template-columns:1fr auto;border-top:1px solid var(--border);padding:6px 0}.bot-table tr:first-child{border-top:0}.bot-table td{border-top:0;padding:4px 14px}.bot-table td:nth-child(2){grid-column:1 / -1;grid-row:2}}@media(max-width:400px){.avatar{width:34px;height:34px}.clock{font-size:1.15rem;padding:4px 11px}.tile{padding:10px}}.modal.wide{max-width:440px}.profile-editor{display:flex;flex-direction:column;gap:18px}.profile-preview{display:flex;align-items:center;gap:14px;padding:14px;background:var(--surface-2);border-radius:14px}.profile-preview div{display:flex;flex-direction:column;min-width:0}.profile-preview strong{font-size:1.05rem}.profile-preview span:not(.avatar){font-style:italic;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.swatches{display:grid;grid-template-columns:repeat(8,1fr);gap:8px}.swatch{aspect-ratio:1;padding:0;border:0;border-radius:50%;background:var(--swatch)!important}.swatch[aria-pressed=true]{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--swatch)}.emblems{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.emblems button{aspect-ratio:1;display:grid;place-items:center;padding:6px;border:0;border-radius:10px;background:var(--surface-2)}.emblems button .piece{width:100%;height:100%;filter:none}.emblems button .piece g{fill:var(--muted)}.emblem-initial{font-weight:700;font-size:1.1rem;color:var(--muted)}.emblems button[aria-pressed=true]{background:var(--ink)}.emblems button[aria-pressed=true] .piece g{fill:var(--ink-text)}.emblems button[aria-pressed=true] .emblem-initial{color:var(--ink-text)}.field-head{display:flex;justify-content:space-between}.field-head .muted{font-weight:400;font-size:.8rem;font-variant-numeric:tabular-nums}.modal-section{border-top:1px solid var(--border);padding-top:14px;display:flex;flex-direction:column;gap:6px}.modal-section h3{font-size:.95rem}.account-row{flex-direction:row;align-items:center;justify-content:space-between}.themes{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-top:6px}.themes button{display:flex;flex-direction:column;align-items:center;gap:6px;padding:6px 4px;border:0;border-radius:12px;background:none;font-size:.78rem;color:var(--muted)}.themes button[aria-pressed=true]{color:var(--text);font-weight:600;background:var(--surface-2)}.theme-sample{width:100%;aspect-ratio:1;border-radius:8px;background:conic-gradient(var(--dark) 0 25%,var(--light) 0 50%,var(--dark) 0 75%,var(--light) 0) 0 0 / 50% 50%;box-shadow:inset 0 0 0 1px #00000014}.theme-sample.split{display:flex;flex-direction:column;overflow:hidden;background:none}.theme-sample.split span{flex:1;background:conic-gradient(var(--sq-dark) 0 25%,var(--sq-light) 0 50%,var(--sq-dark) 0 75%,var(--sq-light) 0) 0 0 / 50% 100%}.theme-sample.split .half-w{--sq-light: var(--w-light);--sq-dark: var(--w-dark)}.theme-sample.split .half-b{--sq-light: var(--b-light);--sq-dark: var(--b-dark)}.themes button[aria-pressed=true] .theme-sample{box-shadow:0 0 0 2px var(--ink)}.side{display:flex;flex-direction:column;gap:16px;min-width:0}.chat{background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden}.chat-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:16px 18px 10px}.chat-head h2{margin:0;font-size:1rem}.chat-head .muted{font-size:.78rem}.chat-log{list-style:none;margin:0;padding:4px 12px 8px;height:260px;overflow-y:auto;display:flex;flex-direction:column;gap:2px;overscroll-behavior:contain}.chat-log li{display:grid;grid-template-columns:24px 1fr;gap:10px;padding:6px 6px 2px;border-radius:10px}.chat-log li.grouped{padding-top:0}.chat-log li.mine .chat-body p{color:var(--text)}.chat-empty{display:block!important;margin:auto;color:var(--muted);font-size:.9rem;text-align:center}.chat-body{min-width:0}.chat-meta{display:flex;align-items:baseline;gap:6px;font-size:.82rem;line-height:1.3}.chat-meta strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-meta time{margin-left:auto;color:var(--muted);font-size:.72rem;font-variant-numeric:tabular-nums}.chat-role{font-size:.68rem;font-weight:600;color:var(--muted)}.chat-role.spectator{background:var(--surface-2);border-radius:5px;padding:0 5px}.chat-body p{font-size:.9rem;color:var(--text);overflow-wrap:anywhere;white-space:pre-wrap;margin-top:1px}.chat-form{display:flex;gap:6px;padding:10px 12px 12px;border-top:1px solid var(--border)}.chat-form input{flex:1;min-width:0}.chat-form button{flex:none}@media(max-width:860px){.chat-log{height:220px}}.chat-close{margin-left:4px;margin-right:-8px;align-self:center}.chat-head .muted{margin-left:auto}.chat-fab{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:15;display:grid;place-items:center;width:56px;height:56px;padding:0;border:0;border-radius:50%;background:var(--ink)!important;color:var(--ink-text);box-shadow:var(--shadow-lg);animation:rise .25s cubic-bezier(.2,.7,.3,1)}.chat-badge{position:absolute;top:-2px;right:-2px;min-width:22px;height:22px;padding:0 6px;display:grid;place-items:center;border-radius:11px;border:2px solid var(--bg);background:var(--accent);color:#fff;font-size:.72rem;font-weight:700}.sheet-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:25;background:#0a0c101f;display:flex;align-items:flex-end;animation:fade .2s ease-out}.sheet{width:100%;height:min(48dvh,480px);min-height:300px;display:flex;background:var(--surface);border-radius:20px 20px 0 0;box-shadow:var(--shadow-lg);padding-bottom:env(safe-area-inset-bottom);animation:sheet-up .28s cubic-bezier(.2,.7,.3,1)}.sheet .chat{flex:1;box-shadow:none;border-radius:inherit;min-height:0}.sheet .chat-log{flex:1;height:auto;min-height:0}.sheet .chat-form input{font-size:16px}@keyframes sheet-up{0%{transform:translateY(100%)}}.player-rating{margin-left:8px;font-family:var(--mono);font-size:.82rem;font-weight:500;color:var(--muted)}.name-link{background:none!important;border:0;padding:0;font-weight:600;border-radius:4px}.name-link:hover{text-decoration:underline;text-underline-offset:3px}.rating-changes{display:flex;flex-direction:column;gap:2px;margin-top:6px;font-size:.85rem;color:var(--muted)}.rating-changes b{font-family:var(--mono);font-weight:600;color:var(--text);margin-left:4px}.rating-changes .up,.rating-changes .down{font-family:var(--mono);font-weight:600;margin-left:4px}.rating-changes .up{color:#2f8a4c}.rating-changes .down{color:var(--accent)}.rankings{list-style:none;margin:0;padding:6px;background:var(--surface);border-radius:var(--radius);box-shadow:var(--shadow)}.rankings button{width:100%;display:grid;grid-template-columns:28px 38px minmax(0,1fr) 72px 70px 56px;align-items:center;gap:12px;padding:10px 12px;border:0;border-radius:10px;background:none;text-align:left}.rankings li+li button{border-top:1px solid var(--border);border-radius:0}.rankings li+li button:hover,.rankings button:hover{border-radius:10px}.rank{font-family:var(--mono);color:var(--muted);font-size:.9rem;text-align:right}.rankings li:nth-child(-n+3) .rank{color:var(--text);font-weight:700}.rank-name{display:flex;flex-direction:column;min-width:0}.rank-name strong,.rank-name span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rank-name span{font-size:.8rem;color:var(--muted)}.rank-name .tagline{font-style:italic}.rank-rating{font-family:var(--mono);font-size:1.15rem;font-weight:600;text-align:right;font-variant-numeric:tabular-nums}.record{font-family:var(--mono);font-size:.82rem;color:var(--muted);text-align:right;font-variant-numeric:tabular-nums}.sparkline{display:block}.sparkline polyline{stroke:var(--muted)}.sparkline circle{fill:var(--text)}.sparkline.empty{width:72px;height:22px}.rating-card{display:flex;flex-direction:column;gap:16px}.stat-tiles{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.stat-tiles div{display:flex;flex-direction:column;gap:2px;padding:10px 12px;background:var(--surface-2);border-radius:12px}.stat-tiles span{font-size:.72rem;color:var(--muted)}.stat-tiles strong{font-family:var(--mono);font-size:1.1rem;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}.rating-chart{position:relative;border-radius:12px;outline-offset:4px;touch-action:pan-y}.rating-chart svg{display:block;overflow:visible}.rating-chart .grid{stroke:var(--border);stroke-width:1}.rating-chart .axis{fill:var(--muted);font-size:11px;font-family:var(--mono)}.rating-chart .crosshair{stroke:var(--muted);stroke-width:1;stroke-dasharray:3 3}.rating-chart .marker{stroke:var(--surface);stroke-width:2}.chart-tip{position:absolute;top:-8px;transform:translate(-50%,-100%);display:flex;flex-direction:column;gap:1px;padding:8px 10px;background:var(--surface);border-radius:10px;box-shadow:var(--shadow-lg);font-size:.8rem;white-space:nowrap;pointer-events:none;z-index:2}.chart-tip strong{font-family:var(--mono);font-size:1.05rem}.chart-empty{padding:24px 0;text-align:center}.recent-games{width:100%;border-collapse:collapse;font-size:.88rem}.recent-games caption{text-align:left;font-weight:600;font-size:.78rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;padding-bottom:6px}.recent-games tr{cursor:pointer}.recent-games tr:hover td{background:var(--surface-2)}.recent-games td{padding:6px 8px;border-top:1px solid var(--border)}.recent-games .opponent{display:flex;align-items:center;gap:8px}.recent-games .num{text-align:right;font-family:var(--mono);font-variant-numeric:tabular-nums}.recent-games .result{font-weight:600}.recent-games .result.r2{color:#2f8a4c}.recent-games .result.r0{color:var(--accent)}@media(prefers-color-scheme:dark){.rating-changes .up,.recent-games .result.r2{color:#5cc07a}}@media(max-width:860px){.rankings button{grid-template-columns:22px 34px minmax(0,1fr) 52px;gap:10px;padding:10px 6px}.rankings .sparkline,.rankings .record{display:none}.stat-tiles{grid-template-columns:repeat(2,1fr)}.header nav button{padding:6px 4px;font-size:.9rem}}.toggles{display:flex;flex-direction:column;margin:4px 0}.toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;font-size:.92rem;cursor:pointer}.toggle+.toggle{border-top:1px solid var(--border)}.toggle input{-moz-appearance:none;appearance:none;-webkit-appearance:none;flex:none;width:40px;height:24px;padding:0;margin:0;border:0;border-radius:12px;background:var(--border);position:relative;cursor:pointer;transition:background .15s}.toggle input:after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 2px #00000040;transition:transform .15s}.toggle input:checked{background:var(--ink)}.toggle input:checked:after{transform:translate(16px)}@media(prefers-color-scheme:dark){.toggle input:checked:after{background:var(--ink-text)}}
