@import"https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap";:root{font-family:DM Sans,Vazirmatn,sans-serif;color:#17211d;background:#f7f1e6;font-synthesis:none;--forest:#205844;--forest2:#174838;--ivory:#f7f1e6;--paper:#fffaf1;--sage:#dce7d8;--peach:#f3c2a4;--ink:#17211d;--muted:#68736d;--border:#d7d5c9;--danger:#a54035;--safe-top:max(12px,env(safe-area-inset-top));--safe-bottom:max(14px,env(safe-area-inset-bottom))}*{box-sizing:border-box}body{margin:0;min-width:320px;background:var(--ivory);font-size:18px;line-height:1.5}button,input{font:inherit}button{color:inherit}.app-shell{min-height:100dvh;padding-bottom:calc(88px + var(--safe-bottom));max-width:720px;margin:auto;background:var(--ivory)}.topbar{height:calc(66px + var(--safe-top));padding:var(--safe-top) 20px 0;display:flex;align-items:center;justify-content:space-between}.brand{border:0;background:none;padding:6px;display:flex;align-items:center;gap:10px;font-weight:800;font-size:19px}.brand-mark{width:35px;height:35px;border-radius:10px;background:var(--forest);color:#fff;display:grid;place-items:center;font-family:Georgia;font-size:24px}.language{min-height:44px;padding:0 15px;border:1.5px solid #c7cbc4;border-radius:22px;background:transparent;font-weight:700;font-size:14px}.page{padding:18px 20px 30px}.welcome-row{display:flex;justify-content:space-between;align-items:center;margin:6px 0 32px}.eyebrow{display:block;font-size:14px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:700}.welcome-row h1,.setup-heading h1{font-size:32px;line-height:1.15;margin:4px 0;font-weight:800}.avatar{width:58px;height:58px;border-radius:50%;background:#f2b991;border:3px solid var(--paper);box-shadow:0 0 0 1px #c98562;display:grid;place-items:center;font-size:24px;font-weight:800;position:relative}.avatar span{width:13px;height:13px;background:#3e895d;border:2px solid var(--paper);border-radius:50%;position:absolute;right:0;bottom:1px}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.section-title h2,.games-section h2{font-size:25px;margin:0;font-weight:800}.turn-pill{background:var(--sage);padding:7px 11px;border-radius:20px;font-size:13px;font-weight:700;display:flex;align-items:center;gap:7px}.turn-pill span,.dev-badge span{width:8px;height:8px;background:#347257;border-radius:50%}.continue-card{background:var(--forest);color:#fff;border-radius:24px;padding:20px;box-shadow:0 8px 22px #21453729}.match-identity{display:flex;align-items:center;gap:14px}.game-emblem{width:58px;height:58px;background:#fffaf1;color:var(--forest);border-radius:16px;display:grid;place-items:center;font-family:Georgia;font-size:40px}.game-emblem.large{width:64px;height:64px;background:var(--sage)}.match-identity h3{font-size:24px;margin:0}.match-identity p{margin:2px 0;color:#e0e8e2;font-size:15px}.match-meta{display:flex;gap:20px;border-top:1px solid rgba(255,255,255,.18);margin:17px 0 15px;padding-top:13px;font-size:14px}.match-meta span{display:flex;align-items:center;gap:6px}.match-meta svg{width:18px}.primary,.secondary,.danger-button{border:0;min-height:54px;border-radius:15px;padding:0 18px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:8px}.primary{background:var(--forest);color:#fff}.continue-card .primary{background:#fffaf1;color:var(--forest)}.primary:disabled{opacity:.5}.wide{width:100%}.arrow{margin-inline-start:auto;display:flex}.arrow svg{width:21px}.games-section{margin-top:34px}.game-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px;margin-top:14px}.game-card{min-height:162px;border:1.5px solid #d1d1c5;border-radius:20px;background:var(--paper);padding:17px;text-align:start;display:flex;flex-direction:column;align-items:flex-start;position:relative}.game-card.forest{background:var(--sage);border:2px solid var(--forest)}.game-card.peach{background:#f8dfcf}.game-card.sage{background:#e8eee4}.game-card.clay{background:#eee2d7}.game-card.blue{background:#e0e8e7}.game-card.sand{background:#eee9d8}.game-card.disabled{color:#65706a}.game-icon{font-family:Georgia;font-size:43px;line-height:1;margin-bottom:auto}.game-card strong{font-size:18px}.play-label,.soon{font-size:13px;font-weight:700;margin-top:4px;display:flex;align-items:center;gap:3px}.play-label svg{width:16px}.soon{padding:3px 8px;background:#ffffffb3;border-radius:8px}.dev-badge{display:flex;gap:8px;align-items:center;justify-content:center;color:var(--muted);font-size:13px;margin:22px}.skeleton{height:210px;opacity:.5;animation:pulse 1.4s infinite}.empty-card{border:2px dashed var(--border);border-radius:22px;min-height:160px;display:grid;place-items:center;color:var(--muted)}.bottom-nav{position:fixed;bottom:0;left:50%;transform:translate(-50%);max-width:720px;width:100%;height:calc(76px + var(--safe-bottom));padding:8px 18px var(--safe-bottom);background:#fffaf1f5;border-top:1px solid #d9d8cf;display:grid;grid-template-columns:repeat(3,1fr);z-index:20}.nav-item{border:0;background:none;min-height:58px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#6f7773;font-size:12px;font-weight:700}.nav-item svg{width:23px}.nav-item.active{color:var(--forest)}.nav-item.active:after{content:"";position:absolute;top:5px;width:32px;height:3px;background:var(--forest);border-radius:3px}.back-link{min-height:48px;border:0;background:none;display:flex;align-items:center;gap:3px;color:var(--forest);font-weight:700;padding:0;margin-bottom:14px}.setup-heading{display:flex;gap:15px;align-items:center;margin-bottom:28px}.form-section{padding:23px 0;border-top:1px solid var(--border)}.form-section h2{font-size:21px;margin:0 0 15px}.segment{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:8px}.segment button,.quick-times button{min-height:56px;border:1.5px solid #cdd0c8;background:var(--paper);border-radius:14px;padding:8px;position:relative;font-weight:700;display:flex;align-items:center;justify-content:center;gap:6px}.segment button.selected,.quick-times button.selected{border:2px solid var(--forest);background:var(--sage);color:var(--forest)}.segment button svg,.quick-times button svg{position:absolute;top:5px;right:5px;width:15px}.mini-piece{font-family:Georgia;font-size:24px}.field-label{font-size:15px;font-weight:700;color:#57615c;margin:20px 0 9px}.switch-row,.setting-row{display:flex;justify-content:space-between;align-items:center;gap:20px}.switch-row h2{margin-bottom:2px}.switch-row p{font-size:13px;color:var(--muted);margin:0}.switch{flex:none;width:60px;height:34px;border:0;border-radius:20px;background:#a9afaa;padding:3px;position:relative}.switch span{display:block;width:28px;height:28px;border-radius:50%;background:#fff;transition:transform .2s}.switch.on{background:var(--forest)}.switch.on span{transform:translate(26px)}[dir=rtl] .switch.on span{transform:translate(-26px)}.timer-panel{margin-top:17px}.quick-times{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.quick-times button{min-width:0;font-size:14px;padding:5px}.steppers{display:grid;grid-template-columns:1fr 1fr;gap:12px}.stepper>div:last-child{display:grid;grid-template-columns:52px 1fr 52px;border:1.5px solid var(--border);background:var(--paper);border-radius:14px;overflow:hidden}.stepper button{border:0;background:#eef1eb;font-size:24px;min-height:54px}.stepper input{width:100%;border:0;background:transparent;text-align:center;font-weight:800;font-size:20px}.time-summary{margin-top:16px;background:var(--sage);border-radius:14px;padding:14px;display:flex;align-items:center;justify-content:center;gap:9px;color:var(--forest)}.time-summary svg{width:21px}.more-toggle{width:100%;min-height:55px;border:0;background:none;display:flex;align-items:center;justify-content:space-between;font-weight:800;padding:0}.more-toggle span{display:flex;gap:10px}.more-toggle svg{transition:transform .2s}.more-toggle svg.rotated{transform:rotate(180deg)}.settings-list{border-top:1px solid var(--border)}.setting-row{min-height:68px;border-bottom:1px solid var(--border);font-weight:600}.setup-footer{position:sticky;bottom:0;background:linear-gradient(transparent,var(--ivory) 25%);padding-top:28px;padding-bottom:var(--safe-bottom)}.game-page{min-height:100dvh;padding:var(--safe-top) 14px 24px;background:#ebe7dc}.game-toolbar{height:58px;display:grid;grid-template-columns:52px 1fr 52px;align-items:center;text-align:center}.game-toolbar div{display:flex;flex-direction:column}.game-toolbar span{font-size:12px;color:var(--muted)}.icon-button{width:48px;height:48px;border:1px solid var(--border);border-radius:50%;background:var(--paper);display:grid;place-items:center}.player-row{display:grid;grid-template-columns:48px 1fr 28px auto;align-items:center;gap:10px;border:1.5px solid transparent;border-radius:16px;padding:8px 10px;margin:8px 0}.player-row.active{background:var(--paper);border-color:var(--forest)}.avatar.small{width:42px;height:42px;font-size:17px;border-width:2px}.avatar.small span{width:10px;height:10px}.player-name{display:flex;flex-direction:column}.player-name span{font-size:12px;color:var(--muted)}.player-color{font-size:24px}.player-row time{font-weight:800;font-variant-numeric:tabular-nums;font-size:20px;background:#deddd3;padding:8px 10px;border-radius:10px}.player-row.active time{background:var(--forest);color:#fff}.board-wrap{margin:8px auto;max-width:520px}.turn-banner{height:34px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:14px;font-weight:800}.turn-banner span{width:8px;height:8px;background:var(--forest);border-radius:50%}.chessboard{width:100%;aspect-ratio:1;display:grid;grid-template-columns:repeat(8,1fr);border:5px solid #315543;border-radius:8px;overflow:hidden;box-shadow:0 10px 22px #1c2d2433}.chessboard button{min-width:0;min-height:0;border:0;padding:0;position:relative;display:grid;place-items:center;font-family:Georgia;font-size:clamp(27px,10vw,55px);line-height:1}.chessboard .light{background:#eee8d3}.chessboard .dark{background:#779272}.chessboard .picked{box-shadow:inset 0 0 0 4px #ee9c60;background:#f0c991}.chessboard .legal i{position:absolute;width:28%;aspect-ratio:1;background:#215844aa;border-radius:50%;z-index:2}.chessboard .legal:has(span) i{width:80%;background:transparent;border:4px solid #215844aa}.white-piece{color:#fffdf4;text-shadow:0 1px 2px #25352e,0 0 1px #25352e}.black-piece{color:#15241e;text-shadow:0 1px 1px #fff}.chessboard small{position:absolute;font:700 10px DM Sans;opacity:.75}.rank{top:1px;left:2px}.file{bottom:1px;right:2px}.game-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}.game-actions button{min-height:58px;border:1.5px solid var(--border);background:var(--paper);border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:12px;font-weight:800;gap:2px}.game-actions button svg{width:20px}.game-actions button.danger{color:var(--danger)}.game-actions button:disabled{opacity:.45}.inline-error{background:#f5d6d1;color:#7a211c;padding:12px;border-radius:10px;margin:10px 0}.modal-backdrop{position:fixed;inset:0;background:#17211d88;z-index:50;display:flex;align-items:flex-end;justify-content:center}.modal{width:min(100%,600px);background:var(--paper);border-radius:24px 24px 0 0;padding:22px 20px calc(22px + var(--safe-bottom));animation:slide .22s ease-out}.modal-head{display:flex;justify-content:space-between;align-items:center}.modal h2{font-size:25px;margin:0}.modal-head button{width:48px;height:48px;border:0;border-radius:50%;background:#ebe9df}.modal p{color:#4e5953}.modal-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}.modal-actions>button{min-height:55px;border:1px solid var(--border);border-radius:14px;background:#fff;font-weight:800}.modal-actions .primary{background:var(--forest)}.danger-button{background:var(--danger)!important;color:#fff}.confirm-preview{text-align:center;font-size:28px;padding:20px}.chat-input{width:100%;min-height:54px;border:1.5px solid var(--border);border-radius:14px;padding:12px}.result-overlay{position:fixed;inset:0;background:#17211dd1;z-index:60;display:grid;place-items:center;padding:20px}.result-card{width:min(100%,420px);background:var(--paper);border-radius:28px;padding:30px;text-align:center}.trophy{width:74px;height:74px;border-radius:50%;background:var(--peach);display:grid;place-items:center;margin:-4px auto 18px}.trophy svg{width:38px;height:38px;color:var(--forest)}.result-card h2{font-size:30px;margin:5px}.result-card p{margin:5px;color:var(--muted)}.rating-change{display:flex;justify-content:space-between;background:var(--sage);padding:14px;border-radius:14px;margin:20px 0}.secondary{background:transparent;border:1.5px solid var(--forest);color:var(--forest);margin-top:10px}.toast{position:fixed;z-index:70;left:50%;bottom:100px;transform:translate(-50%);width:min(calc(100% - 32px),500px);background:#1b3e31;color:#fff;border-radius:15px;padding:13px 15px;display:flex;align-items:center;gap:10px;box-shadow:0 8px 24px #0003}.toast button{margin-inline-start:auto;border:0;background:none;color:#fff}.placeholder{text-align:center;padding-top:100px}.placeholder-icon{width:74px;height:74px;margin:auto;border-radius:24px;background:var(--sage);display:grid;place-items:center;color:var(--forest)}.placeholder h1{font-size:30px}.placeholder p{color:var(--muted)}@keyframes pulse{50%{opacity:.3}}@keyframes slide{0%{transform:translateY(30px);opacity:.5}}@media(min-width:640px){.app-shell{box-shadow:0 0 40px #302b2412}.home-page,.setup-page{padding-inline:34px}.game-grid{grid-template-columns:repeat(3,1fr)}.chessboard{font-size:52px}}@media(max-width:360px){body{font-size:17px}.page{padding-inline:14px}.game-page{padding-inline:8px}.welcome-row h1,.setup-heading h1{font-size:28px}.segment{gap:5px}.segment button{font-size:14px;padding:5px}.game-grid{gap:8px}.game-card{padding:13px;min-height:145px}.player-row{gap:6px;padding-inline:5px}.player-row time{font-size:17px;padding:7px}.game-actions{gap:5px}.quick-times button{font-size:12px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important;transition:none!important}}.setup-footer{background:var(--ivory)}:root{color:#f7faf7;background:#071c14;--forest:#86e881;--forest2:#66cf6b;--ivory:#071c14;--paper:#102d22;--sage:#173c2d;--peach:#80452f;--ink:#f7faf7;--muted:#b8c6c0;--border:#355346;--danger:#ff9c8f}body,.app-shell{background:#071c14;color:#f7faf7}.app-shell,.topbar{background:#092017}.brand-mark{background:#8ced84;color:#0b281c}.language{border-color:#557065;color:#eaf5ed}.eyebrow,.player-name span,.game-toolbar span,.result-card p,.placeholder p{color:var(--muted)}.welcome-row>div:first-child{min-width:0;flex:1}.welcome-row>.avatar{flex:none;margin-inline-start:16px}.welcome-row h1{max-width:100%;font-size:clamp(23px,5.8vw,28px);line-height:1.12;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.welcome-row h1.long{font-size:clamp(21px,5vw,25px)}.welcome-row h1.very-long{font-size:clamp(19px,4.5vw,22px)}.avatar{background:#a8d28c;border-color:#173c2d;box-shadow:0 0 0 1px #b9e19e;color:#10251a}.continue-card{background:#12482f;border:1px solid #2e684b;box-shadow:none}.continue-card .primary,.primary{background:#8ce982;color:#0b2318}.continue-card .primary:hover,.primary:hover{background:#a3f198}.game-emblem{background:#e8eedb;color:#113c29}.game-emblem.large{background:#1b4533;color:#eef8ee;border:1px solid #3e6a53}.match-meta{border-color:#47745f}.game-card{background:#193c2d;border-color:#345745;color:#fff}.game-card.forest{background:#2b573b;border-color:#8cea86}.game-card.peach{background:#6d3828}.game-card.sage{background:#4c4927}.game-card.clay{background:#6d332f}.game-card.blue{background:#174c6b}.game-card.sand{background:#254e62}.game-card.disabled{color:#f2f4f1}.soon{background:#0d241bbd;color:#d5dfd8}.bottom-nav{background:#082017;border-color:#274438}.nav-item{color:#aab9b3}.nav-item.active{color:#a0f18b}.nav-item.active:after{background:#a0f18b}.empty-card{border-color:#38574a;color:#b9c7c1}.segment button,.quick-times button{background:#18382b;border-color:#3a5a4c;color:#f3f7f4}.segment button.selected,.quick-times button.selected{background:#19482f;border-color:#91ef8c;color:#d9ffd7}.switch{background:#496156}.switch.on{background:#64d270}.switch span{background:#f5fff6}.timer-panel,.settings-list{color:#f5f7f4}.field-label,.switch-row p{color:#bdcac4}.stepper>div:last-child{background:#142e24;border-color:#3a584b}.stepper button{background:#1c4933;color:#94ec8a}.stepper input{color:#fff}.time-summary{background:#1b4934;color:#9cf595}.form-section{border-color:#2e493e}.more-toggle{color:#f5f7f4}.setting-row{border-color:#2e493e}.setup-footer{background:#092017}.game-page{background:#071a13}.game-toolbar .icon-button,.icon-button{background:#143527;border-color:#385849;color:#eef7f0}.player-row.active{background:#14392a;border-color:#8ce982}.player-row time{background:#243d33;color:#f7faf7}.player-row.active time{background:#8ce982;color:#082017}.chessboard{border-color:#163b2b;box-shadow:0 12px 26px #0007}.chessboard .light{background:#d5d7b6}.chessboard .dark{background:#56825f}.game-actions button{background:#123126;border-color:#365347;color:#f1f6f2}.game-actions button.danger{color:#ffada1}.modal{background:#0d281e}.modal-head button{background:#1d3a2f;color:#fff}.chat-input{background:#102f23;border-color:#456155;color:#fff}.result-card{background:#0f2e22}.rating-change{background:#1a4934}.secondary{color:#9cec96;border-color:#86e881}.placeholder-icon{background:#194631;color:#9ced94}.toast{background:#102c21;border:1px solid #4e6b5e}.dev-badge{color:#aebdb6}.back-link{color:#a1f29b}.trophy{background:#6a412a}.trophy svg{color:#a6f49b}.invite-state{text-align:center}.invite-icon{width:68px;height:68px;border-radius:22px;background:#194832;color:#9df296;display:grid;place-items:center;margin:10px auto 16px}.invite-icon svg{width:32px;height:32px}.invite-state strong{display:block;font-size:22px}.invite-state p{font-size:15px}.invite-state code{display:block;direction:ltr;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#071c14;border:1px solid #315244;border-radius:12px;padding:12px;color:#c9d8d1;font-size:12px}.modal-actions.stacked{grid-template-columns:1fr}.modal-actions.stacked button{display:flex;align-items:center;justify-content:center;gap:8px}.app-shell.playing{max-width:520px;padding-bottom:0;background:#061a12;box-shadow:none}.game-page{min-height:100dvh;padding:max(10px,env(safe-area-inset-top)) 12px max(14px,env(safe-area-inset-bottom));background:#061a12;display:flex;flex-direction:column}.match-header{min-height:52px;display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:10px;margin-bottom:3px}.match-header>div:nth-child(2){display:flex;flex-direction:column;align-items:center;line-height:1.15}.match-header>div:nth-child(2)>span{font-size:16px;font-weight:900;letter-spacing:.16em;color:#f6fff7}.match-header>div:nth-child(2)>strong{font-size:12px;color:#a9bdb3;margin-top:4px;font-weight:600}.match-header .icon-button{width:44px;height:44px;background:#0f2f22;border-color:#355345}.connection-chip{min-height:34px;border:1px solid #315244;border-radius:18px;padding:0 10px;display:flex;align-items:center;gap:6px;color:#c6d5ce;font-size:12px;font-weight:700}.connection-chip i{width:8px;height:8px;border-radius:50%;background:#7ee77d;outline:3px solid #244c38}.game-page .player-row{min-height:66px;display:grid;grid-template-columns:54px minmax(0,1fr) 26px 116px;align-items:center;gap:10px;border:1.5px solid transparent;border-radius:17px;padding:6px 8px;margin:2px 0;background:transparent;direction:ltr}.game-page .player-row.active{background:#102f23;border-color:#79df78}.game-page .avatar.small{width:52px;height:52px;background:#b3d991;border-color:#76a46e;box-shadow:none;font-size:21px}.game-page .avatar.small span{width:12px;height:12px;background:#7ce47c;border-color:#102f23}.game-page .player-name{min-width:0;line-height:1.2;unicode-bidi:plaintext}.game-page .player-name strong{font-size:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.game-page .player-name span{font-size:12px;color:#a9bdb3;margin-top:3px}.game-page .player-color{font-size:21px;text-align:center;color:#dce8df}.game-page .player-row time{min-width:116px;min-height:54px;padding:5px 10px;border-radius:14px;background:#17382b;color:#f9fff9;display:grid;place-items:center;font-size:29px;font-weight:900;line-height:1;font-variant-numeric:tabular-nums;border:1.5px solid #3b5d4e;letter-spacing:.02em;direction:ltr;unicode-bidi:isolate}.game-page .player-row.active time{background:#8ee986;color:#072016;border-color:#a9f5a4}.board-wrap{width:100%;max-width:496px;margin:1px auto}.game-page .chessboard{width:100%;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));aspect-ratio:1;border:3px solid #305f43;border-radius:5px;box-shadow:none;direction:ltr;unicode-bidi:isolate}.game-page .chessboard .light{background:#e7ead5}.game-page .chessboard .dark{background:#73986c}.game-page .chessboard button{width:100%;height:100%;min-width:0;min-height:0;font-size:clamp(27px,11.2vw,57px)}.game-page .chessboard .chess-piece{display:block;width:86%;height:86%;max-width:100%;max-height:100%;pointer-events:none}.captured-row{display:flex;align-items:center;gap:8px;min-height:32px;margin:4px 0;padding:3px 6px;border-radius:8px;background:#133225}.captured-label{flex:none;font-size:10px;font-weight:700;color:#b7cbbf}.captured-list{display:flex;align-items:center;gap:0;min-width:0;overflow-x:auto;white-space:nowrap}.captured-list>span[role=img]{flex:none;display:grid;place-items:center;width:24px;height:24px}.captured-list .chess-piece{display:block;width:23px;height:23px}.captured-empty{font-size:10px;color:#89a494}.game-page .chessboard small{z-index:4;opacity:1;text-shadow:none}.game-page .chessboard .rank{left:2px;right:auto;direction:ltr;unicode-bidi:isolate;font-variant-numeric:tabular-nums}.game-page .chessboard .file{right:2px;left:auto;direction:ltr;unicode-bidi:isolate}.game-page .chessboard .light small{color:#173326}.game-page .chessboard .dark small{color:#f1f3dc}.game-page .chessboard .last-move{outline:3px solid #d8ff64;outline-offset:-3px}.game-page .chessboard .last-from{outline-color:#b5df52}.game-page .chessboard .last-to{outline:4px solid #e5ff75;outline-offset:-4px}.game-page .chessboard .picked{background:#d6ba62;outline:4px solid #f5d86e;outline-offset:-4px}.game-page .chessboard .legal i{background:#0b4f35a8}.game-page .chessboard .legal:has(.chess-piece) i{width:80%;background:transparent;border:4px solid #0b4f35b8}.game-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:8px}.game-actions button{min-height:76px;border:1px solid #38594a;background:#123126;border-radius:17px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#f3faf5;font-size:15px;font-weight:800}.game-actions button svg{width:29px;height:29px;stroke-width:2.3}.game-actions button.danger{background:#3b211e;border-color:#6e3931;color:#ffb5a7}.game-actions .chat-action{position:relative}.game-actions .chat-action:disabled{opacity:.38;filter:grayscale(1);cursor:not-allowed}.unread-badge{position:absolute;top:7px;right:calc(50% - 27px);min-width:18px;height:18px;padding:0 5px;border:2px solid #123126;border-radius:10px;background:#ff6f61;color:#fff;display:grid;place-items:center;font-size:10px;font-weight:900;line-height:1}.game-page .modal p{color:#c4d1cb}.game-page .modal-actions>button:not(.primary):not(.danger-button){background:#f4f7f2;border-color:#aebfb6;color:#10271d}.game-page .chat-modal{height:min(64dvh,520px);display:flex;flex-direction:column;padding-bottom:max(14px,env(safe-area-inset-bottom))}.chat-messages{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:8px;padding:12px 2px;scrollbar-width:thin}.chat-empty{margin:auto!important;color:#9fb2a8!important;text-align:center}.chat-message{width:fit-content;max-width:82%;padding:8px 11px 6px;border-radius:15px;background:#193b2d;color:#f4faf6;display:grid;gap:2px;overflow-wrap:anywhere}.chat-message.mine{align-self:flex-end;background:#77d978;color:#082116;border-end-end-radius:5px}.chat-message.theirs{align-self:flex-start;border-end-start-radius:5px}.chat-message strong{font-size:11px;color:#a9c9b8}.chat-message span{font-size:17px;line-height:1.42;white-space:pre-wrap}.chat-message time{font-size:10px;opacity:.72;justify-self:end;font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}.chat-compose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding-top:10px;border-top:1px solid #315244}.chat-compose .chat-input{min-width:0;min-height:52px;padding:10px 13px;font-size:16px}.chat-compose .primary{min-height:52px;padding-inline:20px;font-size:15px}.rating-number{direction:ltr;unicode-bidi:isolate;display:inline-block;font-variant-numeric:tabular-nums}.result-card{max-height:calc(100dvh - 28px);overflow-y:auto}.rematch-panel,.rematch-status{margin:18px 0;padding:14px;border:1.5px solid #3e6653;border-radius:16px;background:#14392a;display:grid;gap:12px;text-align:start}.rematch-options{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.rematch-options button{min-height:52px;padding:6px;border:1.5px solid #456958;border-radius:12px;background:#193c2d;color:#f4faf6;font-size:12px;font-weight:800}.rematch-options button.selected{border-color:#96ef8d;background:#24563a;color:#b8ffad}.rematch-status span{color:#bad0c4;font-size:14px}.rematch-status .modal-actions{margin-top:2px}.takeback-action{align-self:center;min-height:42px;margin-top:8px;border:0;background:transparent;color:#9fb2a8;display:flex;align-items:center;justify-content:center;gap:7px;font-size:13px;font-weight:700}.takeback-action svg{width:17px}.takeback-action:disabled{opacity:.58}@media(max-width:380px){.game-page{padding-inline:8px}.match-header{grid-template-columns:44px 1fr auto}.connection-chip{padding-inline:8px}.game-page .player-row{grid-template-columns:46px minmax(0,1fr) 20px 98px;gap:6px;padding-inline:4px;min-height:58px}.game-page .avatar.small{width:44px;height:44px}.game-page .player-name strong{font-size:18px}.game-page .player-row time{min-width:98px;min-height:48px;font-size:24px}.game-actions{gap:6px}.game-actions button{min-height:68px;font-size:14px}.game-actions button svg{width:25px;height:25px}}@media(max-height:700px){.match-header{min-height:46px}.game-page .player-row{min-height:56px}.game-page .avatar.small{width:44px;height:44px}.game-page .player-row time{min-height:46px;font-size:24px}.game-actions button{min-height:62px}.takeback-action{margin-top:3px}}.backgammon-setup .setup-note{color:#afc1b8;font-size:13px}.backgammon-game{gap:8px}.bg-player,.bg-status{border:1.5px solid #365b49;border-radius:15px;padding:10px 13px;background:#102f23;display:flex;align-items:center;justify-content:space-between;gap:10px;direction:ltr}.bg-player strong{font-size:20px}.bg-player .bg-win-count{display:inline-grid;place-items:center;min-width:24px;height:24px;padding:0 5px;margin-inline-start:4px;border-radius:7px;background:var(--app-accent, #82e781);color:var(--app-accent-text, #092518);font:700 13px/1 system-ui,sans-serif}.bg-player span,.bg-status{color:#b9cbc2;font-size:13px}.bg-player.you{border-color:#82e781}.bg-player-controls{display:flex;align-items:center;gap:10px;min-width:0}.bg-auto-roll{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;min-height:30px;padding:3px 6px 3px 9px;border:1.5px solid #648071;border-radius:999px;background:#173b2b;color:#c7d8cf;font:700 11px/1.2 sans-serif;cursor:pointer;direction:ltr}.bg-player .bg-auto-roll span{color:inherit;font-size:11px}.bg-auto-roll i{display:block;width:23px;height:14px;border:1px solid #789787;border-radius:99px;background:#36594a;position:relative}.bg-auto-roll i:after{content:"";position:absolute;width:10px;height:10px;top:1px;left:1px;border-radius:50%;background:#c7d8cf}.bg-auto-roll.on{border-color:#82e781;color:#d3ffd3}.bg-auto-roll.on i{border-color:#82e781;background:#4fba69}.bg-auto-roll.on i:after{left:10px;background:#fff}.bg-auto-roll:focus-visible{outline:2px solid #baffac;outline-offset:2px}.bg-status time{color:#94f18d;font-size:17px;font-weight:900}.bg-winner{padding:9px;border:2px solid #8ded83;border-radius:12px;color:#b9ffb2;text-align:center}.backgammon-board{position:relative;isolation:isolate;flex-shrink:0;width:100%;max-width:496px;aspect-ratio:1 / 1.1;margin:auto;padding:9px;display:grid;grid-template-columns:repeat(6,minmax(0,1fr)) 32px repeat(6,minmax(0,1fr));grid-template-rows:minmax(0,1fr) 64px minmax(0,1fr);column-gap:1px;background:#deb98b;border:7px solid #754936;outline:1px solid #c39465;outline-offset:-3px;border-radius:14px;direction:ltr}.bg-point{--point-color: #96503d;--cap-height: calc(50cqw - 1px) ;position:relative;min-width:0;min-height:0;border:0;padding:0;background:transparent;isolation:isolate;touch-action:none;container-type:inline-size}.bg-point.cream{--point-color: #f6e6bf}.bg-point .point-cap,.bg-point .point-triangle{position:absolute;left:1px;right:1px;z-index:0;background:var(--point-color);pointer-events:none}.bg-point .point-cap{height:var(--cap-height)}.bg-point.top .point-cap{top:0;border-radius:50% 50% 0 0/100% 100% 0 0}.bg-point.bottom .point-cap{bottom:0;border-radius:0 0 50% 50%/0 0 100% 100%}.bg-point .point-triangle{height:calc(100% - var(--cap-height))}.bg-point.top .point-triangle{top:var(--cap-height);clip-path:polygon(0 0,100% 0,50% 100%)}.bg-point.bottom .point-triangle{bottom:var(--cap-height);clip-path:polygon(50% 0,100% 100%,0 100%)}.checker-stack{position:absolute;inset:0 1px;display:flex;align-items:center;gap:1px;z-index:2}.top .checker-stack{flex-direction:column}.bottom .checker-stack{flex-direction:column-reverse}.checker-stack i{position:relative;display:block;flex:0 0 auto;width:100%;aspect-ratio:1;border:2px solid #473a2b;border-radius:50%;background:#f7f3e7}.checker-stack i{pointer-events:auto;cursor:pointer}.checker-stack i:after{content:"";position:absolute;inset:20%;border-radius:50%;background:#d9cfb9}.checker-stack i.dark{background:#253b3d;border-color:#d3dfd9}.checker-stack i.dark:after{background:#4c6465}.bg-point.movable .checker-stack i:last-child,.bg-point.selected .checker-stack i:last-child{background:#63e67b;border-color:#173b2b}.bg-point.movable .checker-stack i:last-child:after,.bg-point.selected .checker-stack i:last-child:after{background:#afa}.bg-point.destination{--point-color: #77d986}.bg-point.destination .point-cap,.bg-point.destination .point-triangle{animation:point-breathe 1.3s ease-in-out infinite}.bg-point.compound-destination{--point-color: #67b8ed}.bg-point.compound-destination .point-cap,.bg-point.compound-destination .point-triangle{animation:point-breathe 1.3s ease-in-out infinite}.bg-point.animating-source .checker-stack i:last-child{opacity:0}.bg-point>b{position:absolute;left:50%;top:48%;transform:translate(-50%);z-index:4;border:1px solid #bfe7bf;border-radius:8px;background:#143b28;color:#fff;padding:0 3px;font-size:11px}@keyframes point-breathe{50%{opacity:.7}}.bg-bar{grid-column:7;grid-row:1 / 4;display:flex;flex-direction:column;justify-content:space-between;padding:9px 1px;background:#754936;border-inline:1px solid #ab8055;border-radius:3px;z-index:1}.bar-stack{position:relative;min-height:56px;border:0;border-radius:6px;background:transparent;padding:0;display:flex;flex-direction:column;align-items:center;color:#fff;opacity:1;touch-action:none}.bar-stack i{display:block;width:23px;height:23px;margin-bottom:-12px;border:2px solid #d3dfd9;border-radius:50%;background:#253b3d}.bar-stack.light i{background:#f7f3e7;border-color:#473a2b}.bar-stack b{position:relative;z-index:3;margin-top:13px;background:#183b28;border:1px solid #c8ddb1;padding:0 4px;border-radius:8px;font:700 12px/18px sans-serif}.bar-stack.available{outline:2px solid #8eff9e}.bar-stack.available i{background:#63e67b;border-color:#173b2b}.bar-stack.animating-source i:last-of-type{opacity:0}.dice-tray{grid-row:2;display:flex;align-items:center;justify-content:center;gap:10px;position:relative;min-width:0;z-index:3;direction:ltr}.opponent-dice{grid-column:1 / 7}.player-dice{grid-column:8 / 14;border:0;background:transparent;color:#173325;cursor:pointer;padding:0;flex-wrap:wrap}.player-dice:disabled{cursor:default}.player-dice.opening-prompt{outline:1px dashed #7c512f;outline-offset:-4px;border-radius:10px;background:#e9d0a8}.dice-tray.opening-winner{outline:2px solid #83f492;outline-offset:-3px;border-radius:10px;background:#b6d69c}.dice-tray.opening-winner .die-face{border-color:#2e9850;box-shadow:0 0 0 2px #80f391}.player-dice small{flex-basis:100%;max-width:100%;margin-top:-6px;font-size:10px;font-weight:800;line-height:11px;text-align:center;white-space:normal}.die{--size: 30px;width:var(--size);height:var(--size);display:inline-block;position:relative;perspective:240px}.die-cube{position:relative;display:block;width:100%;height:100%;transform-style:preserve-3d;transform:rotateX(-14deg) rotateY(18deg)}.die-face{position:absolute;inset:0;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:2px;padding:5px;border:1px solid #ac9b79;border-radius:5px;background:#f5eedc;backface-visibility:hidden}.die-face i.pip{background:#1e2b28;border-radius:50%}.die.flat{perspective:none}.die.flat .flat-face{inset:0;backface-visibility:visible}.die.flat.half-used .flat-face{overflow:hidden}.die.flat.half-used .flat-face:after{content:"";position:absolute;inset:1px;z-index:2;background:#1d27237a;clip-path:polygon(0 0,100% 0,0 100%);pointer-events:none}.die.flat.used .flat-face{background:#aaa18d;border-color:#877e6b}.die.flat.used .pip{background:#38433c}.face-0{transform:translateZ(calc(var(--size) / 2))}.face-1{transform:rotateY(180deg) translateZ(calc(var(--size) / 2))}.face-2{transform:rotateY(90deg) translateZ(calc(var(--size) / 2))}.face-3{transform:rotateY(-90deg) translateZ(calc(var(--size) / 2))}.face-4{transform:rotateX(90deg) translateZ(calc(var(--size) / 2))}.face-5{transform:rotateX(-90deg) translateZ(calc(var(--size) / 2))}.player-dice.ready .die-cube,.opponent-dice:not(.settled) .die-cube{animation:die-hover var(--die-idle-duration, 4s) linear infinite;animation-delay:var(--die-idle-delay, 0ms)}.dice-tray .die.rolling .die-cube{animation:dice-drop var(--die-roll-duration, .9s) cubic-bezier(.3,.02,.45,1) both;animation-delay:0ms;animation-direction:normal}@keyframes die-hover{0%{transform:translateY(-7px) rotateX(0) rotateY(0)}50%{transform:translateY(-13px) rotateX(var(--die-idle-half-x, 180deg)) rotateY(var(--die-idle-half-y, 180deg))}to{transform:translateY(-7px) rotateX(var(--die-idle-x, 360deg)) rotateY(var(--die-idle-y, 360deg))}}@keyframes dice-drop{0%{transform:translateY(-20px) rotateX(0) rotateY(0) rotate(0)}55%{transform:translateY(-9px) rotateX(var(--die-mid-x, 400deg)) rotateY(var(--die-mid-y, 400deg)) rotate(var(--die-mid-z, 200deg))}75%{transform:translateY(6px) rotateX(var(--die-late-x, 650deg)) rotateY(var(--die-late-y, 650deg)) rotate(var(--die-late-z, 320deg))}88%{transform:translateY(-4px) rotateX(var(--die-spin-x, 720deg)) rotateY(var(--die-spin-y, 720deg)) rotate(var(--die-spin-z, 360deg))}to{transform:translateY(0) rotateX(var(--die-spin-x, 720deg)) rotateY(var(--die-spin-y, 720deg)) rotate(var(--die-spin-z, 360deg))}}.bg-off-row{display:flex;gap:8px}.bg-off{flex:1;border:1px solid #607b62;background:#173b2b;color:#e4f1e5;border-radius:10px;padding:9px;font-size:12px}.bg-off b{display:block;direction:ltr;font-size:16px}.bg-off:enabled{border:2px solid #9bff91}.bg-drag-ghost{position:fixed;z-index:1000;pointer-events:none;width:34px;height:34px;border:2px solid #473a2b;border-radius:50%;transform:translate(-50%,-50%);background:#f7f3e7}.bg-drag-ghost.dark{background:#253b3d;border-color:#d3dfd9}.bg-moving-checker{position:fixed;z-index:1001;pointer-events:none;border:2px solid #473a2b;border-radius:50%;background:#f7f3e7;transform:translate(-50%,-50%);animation:bg-checker-move .45s cubic-bezier(.2,.75,.3,1) forwards}.bg-moving-checker:after{content:"";position:absolute;inset:20%;border-radius:50%;background:#d9cfb9}.bg-moving-checker.dark{background:#253b3d;border-color:#d3dfd9}.bg-moving-checker.dark:after{background:#4c6465}@keyframes bg-checker-move{to{transform:translate(calc(-50% + var(--move-x)),calc(-50% + var(--move-y)))}}@media(prefers-reduced-motion:reduce){.player-dice.ready .die-cube,.opponent-dice:not(.settled) .die-cube,.dice-tray .die.rolling .die-cube,.bg-point.destination .point-cap,.bg-point.destination .point-triangle,.bg-point.compound-destination .point-cap,.bg-point.compound-destination .point-triangle,.bg-moving-checker{animation:none}}html[data-theme=dark]{--app-bg: #161311;--app-panel: #26211d;--app-panel-soft: #302923;--app-glass: rgb(34 29 25 / 88%);--app-text: #f7f1e7;--app-muted: #bfb3a5;--app-line: #80684a;--app-accent: #e3bb76;--app-accent-text: #1d1711;--hero-image: url(/artwork/dark/home-hero.jpg);--backgammon-image: url(/artwork/dark/backgammon-board-small.png);--tic-tac-toe-image: url(/artwork/dark/tic-tac-toe-card.webp);--roulette-image: url(/artwork/dark/roulette-card.webp);--forest: var(--app-accent);--forest2: #c99d5b;--ivory: var(--app-bg);--paper: var(--app-panel);--sage: var(--app-panel-soft);--ink: var(--app-text);--muted: var(--app-muted);--border: var(--app-line);color:var(--app-text);background:var(--app-bg)}html[data-theme=light]{--app-bg: #f7efe3;--app-panel: #fffaf2;--app-panel-soft: #f0e4d3;--app-glass: rgb(255 250 243 / 88%);--app-text: #231b16;--app-muted: #75695f;--app-line: #c9aa7d;--app-accent: #d7a85e;--app-accent-text: #24190e;--hero-image: url(/artwork/light/home-hero.jpg);--backgammon-image: url(/artwork/light/backgammon-board-small.png);--tic-tac-toe-image: url(/artwork/light/tic-tac-toe-card.webp);--roulette-image: url(/artwork/light/roulette-card.webp);--forest: #95652e;--forest2: #775025;--ivory: var(--app-bg);--paper: var(--app-panel);--sage: var(--app-panel-soft);--ink: var(--app-text);--muted: var(--app-muted);--border: var(--app-line);color:var(--app-text);background:var(--app-bg)}html[data-theme] body,html[data-theme] .app-shell{background-color:var(--app-bg);color:var(--app-text)}html[data-theme] .app-shell{position:relative;overflow:clip}html[data-theme] .app-shell.home-shell{background-image:var(--hero-image);background-position:center top;background-size:auto 475px;background-repeat:no-repeat}html[data-theme] .topbar{position:relative;z-index:2;height:calc(68px + var(--safe-top));padding-inline:20px;background:transparent}html[data-theme] .brand{padding:0;gap:11px;color:var(--app-text);font-family:Georgia,Times New Roman,Vazirmatn,serif;font-size:clamp(23px,5.4vw,33px);font-weight:700;white-space:nowrap}html[data-theme] .brand-mark{width:43px;height:43px;border-radius:10px;background:#dfb66e}html[data-theme] .topbar-actions{display:flex;align-items:center;gap:8px;flex:none}html[data-theme] .theme-toggle{width:42px;height:42px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:var(--app-panel-soft);color:var(--app-accent);cursor:pointer}html[data-theme] .theme-toggle svg{width:20px;height:20px}html[data-theme] .language{display:inline-flex;align-items:center;gap:8px;min-height:42px;padding-inline:13px;border:0;border-radius:999px;background:var(--app-glass);color:var(--app-text);font-size:14px}html[data-theme] .language svg{width:18px;height:18px;color:var(--app-accent)}html[data-theme] button{background-image:none}html[data-theme] button:focus-visible{outline:2px solid var(--app-accent);outline-offset:3px}html[data-theme] .primary,html[data-theme] .continue-card .primary{background:var(--app-accent);color:var(--app-accent-text);border:0;box-shadow:none}html[data-theme] .primary:hover,html[data-theme] .continue-card .primary:hover{background:var(--app-accent);filter:brightness(1.06)}html[data-theme] .secondary{border-color:var(--app-line);color:var(--app-accent)}html[data-theme=light] .secondary{color:var(--forest)}html[data-theme] .home-page{position:relative;padding:0 16px 40px}html[data-theme] .home-hero{position:relative;height:150px;isolation:isolate}html[data-theme][dir=rtl] .app-shell.home-shell{background-position:80% top}html[data-theme] .welcome-row{position:relative;align-items:flex-start;margin:0;padding:14px 3px 0}html[data-theme] .welcome-row>div:first-child{min-width:0;width:73%}html[data-theme] .welcome-row .eyebrow{color:var(--app-muted);font-size:11px;letter-spacing:.12em;line-height:1.35;max-width:190px}html[data-theme] .welcome-row h1{margin-top:17px;max-width:220px;color:var(--app-text);font-family:Georgia,Times New Roman,Vazirmatn,serif;font-size:clamp(23px,6.1vw,30px);font-weight:700;line-height:1.12;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}html[data-theme] .welcome-row h1.long{font-size:clamp(21px,5.4vw,27px)}html[data-theme] .welcome-row h1.very-long{font-size:clamp(18px,4.7vw,23px)}html[data-theme] .welcome-row .avatar{width:49px;height:49px;margin-inline-start:auto;background:#dfb66e;border:2px solid #302315;box-shadow:0 0 0 2px #d3ac6b;color:#1d1711;font:700 23px Georgia,serif;cursor:pointer}html[data-theme] .welcome-row .avatar span{width:14px;height:14px;background:#55ce64;border-color:#2c241b}html[data-theme] .home-continue{position:relative;padding:19px 17px 18px;border:1px solid var(--app-line);border-radius:30px;background:var(--app-glass);-webkit-backdrop-filter:blur(13px);backdrop-filter:blur(13px)}html[data-theme] .home-continue .section-title{min-height:44px;gap:8px;margin-bottom:11px}html[data-theme] .section-title h2,html[data-theme] .games-section h2{color:var(--app-text);font-family:Georgia,Times New Roman,Vazirmatn,serif;font-size:clamp(25px,6vw,34px);font-weight:700;line-height:1.06}html[data-theme] .turn-pill{flex:none;border:1px solid #5c7456;background:var(--app-panel);color:var(--app-text);font-size:11px;white-space:nowrap}html[data-theme] .turn-pill span{background:#5bd368}html[data-theme] .continue-empty{min-height:126px;display:grid;place-content:center;justify-items:center;gap:9px;border:1px dashed var(--app-line);border-radius:19px;background:var(--app-panel-soft);color:var(--app-muted);font-size:15px}html[data-theme] .continue-empty svg{width:35px;height:35px;stroke-width:1.5}html[data-theme] .continue-card{background:var(--app-panel-soft);color:var(--app-text);border:1px solid var(--app-line);border-radius:18px;box-shadow:none}html[data-theme] .continue-card .match-identity p{color:var(--app-muted)}html[data-theme] .continue-card .game-emblem{background:var(--app-panel);color:var(--app-accent)}html[data-theme] .match-meta{border-color:var(--app-line)}html[data-theme] .game-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}html[data-theme] .game-card{position:relative;isolation:isolate;min-width:0;min-height:156px;height:clamp(156px,39vw,205px);overflow:hidden;padding:10px;border-radius:18px;background:var(--app-panel-soft);color:var(--app-text);justify-content:flex-end;transition:transform .2s ease,box-shadow .2s ease}html[data-theme] .game-card.forest{background:var(--hero-image) 64% 24% / auto 310px;color:#fff8eb}html[data-theme] .game-card.peach{background:#432c28;color:#fff8eb}html[data-theme] .game-card.roulette-card{background:#102b3a;color:#f4f8fb}html[data-theme] .game-card.roulette-card:after{background:none}html[data-theme] .game-card.roulette-card .game-icon{color:#e7bd68}html[data-theme=light] .game-card.peach{background:#785346}html[data-theme] .game-card.peach:before{content:"";position:absolute;z-index:-2;inset:-6px -24px 35px -12px;background:var(--backgammon-image) center top / contain no-repeat;pointer-events:none}html[data-theme] .game-card:not(.disabled):after{content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(180deg,transparent 25%,rgb(18 13 10 / 55%) 58%,#19120e 100%);pointer-events:none}html[data-theme] .game-card .game-icon{display:grid;place-items:center;width:44px;height:44px;margin-bottom:auto;color:var(--app-accent);font-size:32px}html[data-theme] .game-card.forest .game-icon,html[data-theme] .game-card.peach .game-icon{visibility:hidden}html[data-theme] .game-card[data-game=ticTacToe],html[data-theme] .game-card[data-game=roulette]{background-color:var(--app-panel-soft);background-position:center top;background-size:100% auto;background-repeat:no-repeat;color:var(--app-text)}html[data-theme] .game-card[data-game=ticTacToe]{background-image:var(--tic-tac-toe-image)}html[data-theme] .game-card[data-game=roulette]{background-image:var(--roulette-image)}html[data-theme] .game-card[data-game=ticTacToe]:after,html[data-theme] .game-card[data-game=roulette]:after{background:none}html[data-theme] .game-card[data-game=ticTacToe] .game-icon,html[data-theme] .game-card[data-game=roulette] .game-icon{visibility:hidden}html[data-theme] .game-card strong{width:100%;margin:8px 0;font-family:DM Sans,Vazirmatn,sans-serif;font-size:clamp(11px,3.2vw,17px);font-weight:800;line-height:1.35;overflow-wrap:anywhere}html[data-theme] .game-card .play-label{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:32px;margin:0;padding:0 8px;gap:2px;border-radius:9px;background:var(--app-accent);color:var(--app-accent-text);font-size:clamp(10px,2.7vw,12px);font-weight:800}html[data-theme] .game-card .play-label svg{width:14px;height:14px;flex:none}html[data-theme] .game-card .soon{display:flex;align-items:center;min-height:32px;padding:0;margin:0;background:transparent;color:var(--app-muted);font-size:clamp(10px,2.6vw,12px)}html[data-theme] .game-card.disabled{opacity:1;cursor:not-allowed}html[data-theme] .game-card.blue{background:linear-gradient(145deg,#29414b,var(--app-panel))}html[data-theme] .game-card.sage{background:linear-gradient(145deg,#354239,var(--app-panel))}html[data-theme] .game-card.clay{background:linear-gradient(145deg,#513733,var(--app-panel))}html[data-theme] .game-card.sand{background:linear-gradient(145deg,#49402f,var(--app-panel))}html[data-theme=light] .game-card.disabled{background:linear-gradient(145deg,#fffaf2,#e8dbc7)}@media(hover:hover){html[data-theme] .game-card:not(:disabled):hover{transform:translateY(-4px);box-shadow:0 12px 24px #0003}}html[data-theme] .game-card:not(:disabled):active{transform:scale(.97)}html[data-theme] .bottom-nav{width:min(calc(100% - 24px),696px);height:calc(71px + var(--safe-bottom));bottom:8px;border:1px solid var(--app-line);border-radius:24px;background:var(--app-glass);-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);box-shadow:none}html[data-theme] .nav-item{color:var(--app-muted)}html[data-theme] .nav-item.active{color:var(--app-accent)}html[data-theme] .nav-item.active:after{background:var(--app-accent)}html[data-theme] .page:not(.home-page){color:var(--app-text)}html[data-theme] .setup-heading h1,html[data-theme] .placeholder h1,html[data-theme] .profile-heading h1,html[data-theme] .result-card h2,html[data-theme] .modal h2{font-family:Georgia,Times New Roman,Vazirmatn,serif;color:var(--app-text)}html[data-theme] .setup-heading>div:last-child{flex:1;min-width:0}html[data-theme] .setup-heading h1{font-size:clamp(23px,6vw,30px);line-height:1.22;white-space:normal;overflow-wrap:anywhere}html[data-theme] .back-link{color:var(--app-accent)}html[data-theme] .game-emblem.large,html[data-theme] .placeholder-icon,html[data-theme] .invite-icon{background:var(--app-panel-soft);color:var(--app-accent);border:1px solid var(--app-line)}html[data-theme] .form-section,html[data-theme] .setting-row{border-color:var(--app-line)}html[data-theme] .segment button,html[data-theme] .quick-times button,html[data-theme] .modal-actions>button,html[data-theme] .game-actions button{background:var(--app-panel);border-color:var(--app-line);color:var(--app-text);box-shadow:none}html[data-theme] .segment button.selected,html[data-theme] .quick-times button.selected,html[data-theme] .theme-options button.selected{background:var(--app-accent);color:var(--app-accent-text);border-color:var(--app-accent)}html[data-theme] .field-label,html[data-theme] .switch-row p,html[data-theme] .setup-note{color:var(--app-muted)}html[data-theme] .switch{background:var(--app-line)}html[data-theme] .switch.on{background:var(--app-accent)}html[data-theme] .stepper>div:last-child,html[data-theme] .stepper button,html[data-theme] .time-summary{background:var(--app-panel-soft);border-color:var(--app-line);color:var(--app-text)}html[data-theme] .stepper input{color:var(--app-text)}html[data-theme] .setup-footer{background:var(--app-bg)}html[data-theme] .game-page{background:var(--app-bg);color:var(--app-text)}html[data-theme] .match-header>div:nth-child(2)>span{color:var(--app-text)}html[data-theme] .match-header>div:nth-child(2)>strong,html[data-theme] .game-page .player-name span,html[data-theme] .captured-label,html[data-theme] .captured-empty,html[data-theme] .bg-player span,html[data-theme] .bg-status{color:var(--app-muted)}html[data-theme=light] .bg-status time{color:#705019}html[data-theme] .match-header .icon-button,html[data-theme] .icon-button,html[data-theme] .connection-chip,html[data-theme] .player-row,html[data-theme] .captured-row,html[data-theme] .bg-player,html[data-theme] .bg-status,html[data-theme] .bg-off{background:var(--app-panel);color:var(--app-text);border-color:var(--app-line)}html[data-theme] .player-row.active,html[data-theme] .bg-player.you{border-color:var(--app-accent)}html[data-theme] .game-page .player-row.active{background:var(--app-panel-soft);border-color:var(--app-accent)}html[data-theme] .player-row time{background:var(--app-panel-soft);color:var(--app-text)}html[data-theme] .game-page .player-row time{background:var(--app-panel-soft);color:var(--app-text);border-color:var(--app-line)}html[data-theme] .game-page .player-row.active time{background:var(--app-accent);color:var(--app-accent-text);border-color:var(--app-line)}html[data-theme] .chessboard{border-color:var(--app-line);box-shadow:none}html[data-theme] .chessboard .light{background:#e9dcc5}html[data-theme] .chessboard .dark{background:#947751}html[data-theme] .chessboard .picked{background:#c9a467}html[data-theme] .chessboard .legal i{background:#d9af56bb}html[data-theme] .chessboard .legal:has(.chess-piece) i{background:transparent;border-color:#d9af56}html[data-theme] .modal,html[data-theme] .result-card,html[data-theme] .toast{background:var(--app-panel);color:var(--app-text);border:1px solid var(--app-line);box-shadow:none}html[data-theme] .game-page .modal-actions>button:not(.primary):not(.danger-button){background:var(--app-panel-soft);color:var(--app-text);border-color:var(--app-line)}html[data-theme] .modal-head button,html[data-theme] .chat-input,html[data-theme] .rating-change,html[data-theme] .chat-message,html[data-theme] .profile-panel{background:var(--app-panel-soft);color:var(--app-text);border-color:var(--app-line)}html[data-theme] .modal p,html[data-theme] .result-card p,html[data-theme] .placeholder p{color:var(--app-muted)}html[data-theme] .backgammon-board{border-color:var(--app-line)}html[data-theme] .bg-auto-roll{background:var(--app-panel-soft);border-color:var(--app-line);color:var(--app-text)}html[data-theme] .bg-auto-roll.on{border-color:var(--app-accent)}html[data-theme] .profile-page{min-height:calc(100dvh - 180px)}html[data-theme] .profile-heading{display:flex;align-items:center;gap:16px;margin:20px 0 30px}html[data-theme] .profile-heading>svg{width:54px;height:54px;padding:10px;border:1px solid var(--app-line);border-radius:50%;color:var(--app-accent)}html[data-theme] .profile-heading h1{margin:0;font-size:32px}html[data-theme] .profile-heading p{margin:3px 0 0;color:var(--app-muted);font-size:14px}html[data-theme] .profile-panel{padding:20px;border:1px solid var(--app-line);border-radius:22px}html[data-theme] .profile-panel h2{margin:0 0 16px;font-family:Georgia,Times New Roman,Vazirmatn,serif}html[data-theme] .theme-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}html[data-theme] .theme-options button{min-height:62px;display:flex;align-items:center;justify-content:center;gap:9px;border:1px solid var(--app-line);border-radius:14px;background:var(--app-panel);color:var(--app-text);font-weight:700}html[data-theme] .theme-options svg{width:20px}html[data-theme] .home-continue,html[data-theme] .turn-pill,html[data-theme] .continue-empty,html[data-theme] .continue-card,html[data-theme] .game-card,html[data-theme] .game-card.forest,html[data-theme] .game-card.peach,html[data-theme] .game-card .play-label,html[data-theme] .bottom-nav,html[data-theme] .game-emblem.large,html[data-theme] .placeholder-icon,html[data-theme] .invite-icon,html[data-theme] .segment button,html[data-theme] .quick-times button,html[data-theme] .modal-actions>button,html[data-theme] .game-actions button,html[data-theme] .match-header .icon-button,html[data-theme] .icon-button,html[data-theme] .connection-chip,html[data-theme] .player-row,html[data-theme] .captured-row,html[data-theme] .bg-player,html[data-theme] .bg-status,html[data-theme] .bg-off,html[data-theme] .game-page .player-row.active,html[data-theme] .game-page .player-row time,html[data-theme] .modal,html[data-theme] .result-card,html[data-theme] .toast,html[data-theme] .chat-input,html[data-theme] .chat-message,html[data-theme] .profile-panel,html[data-theme] .theme-options button,html[data-theme] .bg-auto-roll,html[data-theme] .profile-heading>svg{border:0}html[data-theme] .game-card.forest{background-color:var(--app-panel-soft)}html[data-theme] .player-row.active,html[data-theme] .bg-player.you{background:var(--app-panel-soft)}html[data-theme] .form-section,html[data-theme] .setting-row,html[data-theme] .match-meta,html[data-theme] .segment button.selected,html[data-theme] .quick-times button.selected,html[data-theme] .theme-options button.selected{border:0}@media(max-width:639px){html[data-theme] .home-shell .topbar{height:calc(60px + var(--safe-top));padding-inline:16px}html[data-theme] .home-shell .brand{gap:8px;font-size:clamp(21px,5.5vw,25px)}html[data-theme] .home-shell .brand-mark{width:38px;height:38px}html[data-theme] .home-shell .topbar-actions{gap:5px}html[data-theme] .home-shell .language{min-height:40px;padding-inline:10px;font-size:12px}html[data-theme] .home-shell .theme-toggle{width:40px;height:40px}html[data-theme] .app-shell.home-shell{background-size:auto 360px}html[data-theme] .home-hero{height:108px}html[data-theme] .welcome-row{padding-top:9px}html[data-theme] .welcome-row .eyebrow{font-size:10px}html[data-theme] .welcome-row h1{margin-top:9px;font-size:clamp(21px,5.5vw,25px)}html[data-theme] .welcome-row h1.long{font-size:clamp(19px,4.8vw,23px)}html[data-theme] .welcome-row h1.very-long{font-size:clamp(17px,4.3vw,20px)}html[data-theme] .welcome-row .avatar{width:42px;height:42px;font-size:20px}html[data-theme] .home-continue{padding:13px;border-radius:24px}html[data-theme] .home-continue .section-title{min-height:30px;margin-bottom:8px}html[data-theme] .section-title h2,html[data-theme] .games-section h2{font-size:clamp(22px,5.5vw,27px)}html[data-theme] .turn-pill{padding:5px 8px;font-size:10px}html[data-theme] .continue-card{padding:12px;border-radius:16px}html[data-theme] .continue-card .match-identity{gap:9px}html[data-theme] .continue-card .game-emblem{width:42px;height:42px;border-radius:12px;font-size:29px}html[data-theme] .continue-card .match-identity h3{font-size:19px;line-height:1.1}html[data-theme] .continue-card .match-identity p{font-size:12px;line-height:1.3}html[data-theme] .continue-card .match-meta{margin:9px 0;padding-top:7px;font-size:12px}html[data-theme] .continue-card .primary{min-height:43px;border-radius:12px;font-size:16px}html[data-theme] .continue-empty{min-height:88px;gap:3px;font-size:13px}html[data-theme] .continue-empty svg{width:27px;height:27px}html[data-theme] .games-section{margin-top:14px}html[data-theme] .bottom-nav{height:calc(64px + var(--safe-bottom))}}@media(min-width:640px){html[data-theme] .home-page{padding-inline:32px}html[data-theme] .home-hero{height:184px}}@media(max-width:360px){html[data-theme] .brand{font-size:22px}html[data-theme] .brand-mark{width:36px;height:36px}html[data-theme] .language{padding-inline:9px}html[data-theme] .home-continue{padding-inline:13px}html[data-theme] .game-grid{gap:7px}html[data-theme] .game-card{padding:8px}}html[data-theme] .app-shell.home-shell{background-image:linear-gradient(180deg,transparent,var(--app-bg) 440px),var(--hero-image)}html[data-theme] .home-continue{background:var(--app-glass);border:1px solid color-mix(in srgb,var(--app-accent) 22%,transparent);box-shadow:0 14px 36px #0002,inset 0 1px #ffffff0a}html[data-theme] .home-continue .section-title h2{font-size:clamp(20px,5vw,27px)}html[data-theme] .continue-card+.continue-card{margin-top:12px}html[data-theme] .continue-card .primary{margin-top:12px}html[data-theme] .continue-card .match-identity>div:last-child{min-width:0}html[data-theme] .continue-card .match-identity p{overflow-wrap:anywhere}html[data-theme] .games-section{margin-top:24px}html[data-theme] .games-section h2{display:flex;align-items:center;gap:14px;font-size:clamp(23px,5.5vw,30px)}html[data-theme] .games-section h2:after{content:"";height:1px;flex:1;background:color-mix(in srgb,var(--app-accent) 25%,transparent)}html[data-theme] .bottom-nav{border:1px solid color-mix(in srgb,var(--app-accent) 20%,transparent);box-shadow:0 8px 30px #0004;height:calc(58px + var(--safe-bottom));padding-top:6px}html[data-theme] .nav-item{min-height:48px;font-size:11px}html[data-theme] .nav-item.active{background:color-mix(in srgb,var(--app-accent) 10%,transparent);border-radius:15px}html[data-theme] .nav-item.active:after{display:none}html[data-theme][dir=rtl] .home-page h1,html[data-theme][dir=rtl] .home-page h2{font-family:Vazirmatn,sans-serif;line-height:1.5}.ttt-setup .game-emblem{font-size:25px;font-weight:800;letter-spacing:-.13em;padding-inline-end:5px}.ttt-setup .ttt-segment button{min-width:0;font-size:clamp(12px,3.5vw,16px)}.ttt-note{margin:12px 0 0;color:var(--app-muted);font-size:14px}.ttt-game{--ttt-gold: var(--app-accent);--ttt-gold-soft: var(--app-panel-soft);background:var(--app-bg);color:var(--app-text);padding-bottom:calc(26px + var(--safe-bottom))}.ttt-game .game-toolbar{margin-bottom:16px}.ttt-game .game-toolbar strong{letter-spacing:.12em}.ttt-player{width:min(100%,520px);margin:10px auto;display:flex;align-items:center;gap:12px;padding:12px;border-radius:20px;background:var(--app-panel)}.ttt-player.active{outline:2px solid var(--app-accent);outline-offset:-2px}.ttt-avatar{flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:var(--app-accent);color:var(--app-accent-text);font-weight:800}.ttt-player div{min-width:0;display:flex;flex:1;flex-direction:column}.ttt-player strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:18px}.ttt-player small{color:var(--app-muted);font-size:12px}.ttt-mark{width:40px;height:40px;display:grid;place-items:center}.ttt-symbol{display:block;width:min(57%,74px);aspect-ratio:1;position:relative;color:inherit}.ttt-symbol.o{border:clamp(5px,1.7vw,10px) solid currentColor;border-radius:50%}.ttt-symbol.x:before,.ttt-symbol.x:after{content:"";position:absolute;width:15%;min-width:5px;height:125%;top:-12.5%;left:42.5%;border-radius:99px;background:currentColor;transform:rotate(45deg)}.ttt-symbol.x:after{transform:rotate(-45deg)}.ttt-mark .ttt-symbol{width:27px}.ttt-mark .ttt-symbol.o{border-width:5px}.ttt-mark.x,.ttt-board .x{color:var(--app-accent)}.ttt-mark.o,.ttt-board .o{color:var(--app-text)}.ttt-status{min-height:42px;display:flex;align-items:center;justify-content:center;gap:8px;font-weight:800;font-size:17px}.ttt-status svg{width:20px;color:var(--app-accent)}.ttt-board{width:min(100%,520px);aspect-ratio:1;margin:10px auto 18px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);gap:4px;padding:4px;border-radius:22px;background:var(--app-accent);overflow:hidden}.ttt-board button{display:grid;place-items:center;border:0;min-width:0;min-height:0;background:var(--app-panel);cursor:pointer}.ttt-board.size-4{grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(4,1fr);gap:3px;padding:3px}.ttt-board.size-4 .ttt-symbol{width:58%}.ttt-board.size-4 .ttt-symbol.o{border-width:clamp(4px,1.3vw,8px)}.ttt-board button:disabled{cursor:default;opacity:1}.ttt-board button:not(:disabled):hover,.ttt-board button:not(:disabled):focus-visible{background:var(--app-panel-soft)}.ttt-board button.winning{background:var(--ttt-gold-soft)}.ttt-board button:nth-child(1){border-top-left-radius:17px}.ttt-board button:nth-child(3){border-top-right-radius:17px}.ttt-board button:nth-child(7){border-bottom-left-radius:17px}.ttt-board button:nth-child(9){border-bottom-right-radius:17px}.ttt-board.size-4 button:nth-child(3),.ttt-board.size-4 button:nth-child(7),.ttt-board.size-4 button:nth-child(9){border-radius:0}.ttt-board.size-4 button:nth-child(4){border-top-right-radius:17px}.ttt-board.size-4 button:nth-child(13){border-bottom-left-radius:17px}.ttt-board.size-4 button:nth-child(16){border-bottom-right-radius:17px}.ttt-finish{width:min(100%,520px);margin:16px auto;border-radius:20px;padding:18px;background:var(--app-panel);text-align:center}.ttt-finish strong{font-family:Georgia,Vazirmatn,serif;font-size:22px}.ttt-finish p{color:var(--app-muted);margin:8px 0 14px;font-size:14px}.ttt-game .game-actions{width:min(100%,520px);margin:18px auto 0}.ttt-game .game-actions button{background:var(--app-panel);color:var(--app-text);border:0;position:relative}.ttt-game .game-actions button.danger{color:#ffada1}.ttt-game .modal{background:var(--app-panel);color:var(--app-text)}.ttt-game .modal p{color:var(--app-muted)}.ttt-game .modal-actions button:not(.danger-button){background:var(--app-panel-soft);color:var(--app-text);border:0}.ttt-game .modal-actions .danger-button{border:0}@media(max-width:360px){.ttt-player{padding:9px}.ttt-game .game-actions{gap:6px}}.waiting-game-page{gap:10px}.waiting-chess-player{min-height:68px;display:flex;align-items:center;gap:11px;padding:8px 10px;border-radius:16px;background:#173226;color:#f9f6ed}.waiting-chess-player.you{border:2px solid #d5b16d}.waiting-chess-avatar{width:46px;height:46px;flex:none;display:grid;place-items:center;border-radius:50%;background:#d8b777;color:#241b15;font-size:23px;font-weight:800}.waiting-chess-player>div{min-width:0;display:flex;flex-direction:column;line-height:1.2}.waiting-chess-player strong{font-size:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.waiting-chess-player small{font-size:12px;color:#bdc9bf;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.waiting-chess-player time{margin-inline-start:auto;color:#b9c8bf;font-size:18px;font-weight:800;direction:ltr}.waiting-chess-message{padding:10px 13px;border-radius:12px;background:#263b2e;color:#e8e3d5;font-size:13px;line-height:1.5}.waiting-chess-square{min-width:0;min-height:0;display:grid;place-items:center}.waiting-chess-square .chess-piece{display:block;width:86%;height:86%}.waiting-chess-actions{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:4px}.waiting-chess-actions button{min-height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:14px;font-weight:800}.waiting-chess-actions svg{width:20px;height:20px}.waiting-chess-cancel{border:1px solid #5b5042;background:#302a23;color:#f3e9dc;padding:0 13px}.waiting-game-page .primary{background:#e8bf76;color:#261b13}.waiting-backgammon-board{margin:2px auto;pointer-events:none}.waiting-backgammon-board .checker-stack i{pointer-events:none}.waiting-ttt-board{width:100%;max-width:496px;margin:2px auto;pointer-events:none}.invite-state .invite-link{white-space:normal;overflow-wrap:anywhere;-webkit-user-select:all;user-select:all}
