@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,500&display=swap');
:root{--bg:#102720;--panel:#19332b;--line:#ffffff12;--text:#f2f0e7;--muted:#a6b7aa;--gold:#ddc18b;--green:#80b99b;--light:#e5dfca;--dark:#658574;font-family:'Be Vietnam Pro',sans-serif;color:var(--text);background:var(--bg);font-synthesis:none;color-scheme:dark}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 30% 50%,#23453855,transparent 65%),var(--bg)}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:disabled{opacity:.35;cursor:not-allowed}button:focus-visible,a:focus-visible{outline:3px solid var(--gold);outline-offset:3px}button{border:0;background:none}a{color:inherit;text-decoration:none}.topbar{height:88px;padding:0 5%;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:70px;background:#10261fe0}.brand{display:flex;align-items:center;gap:12px;font-family:'Playfair Display',Georgia,serif;font-size:30px;line-height:1}.brand-mark{font-family:Georgia;font-size:42px;color:var(--gold);border:1px solid #ddc18b66;border-radius:12px;width:49px;height:53px;text-align:center;line-height:50px}.brand-thin{font-family:'Be Vietnam Pro',sans-serif;font-size:20px;margin-left:5px;font-weight:400;color:#b6c6b9}.brand small{font-family:'Be Vietnam Pro',sans-serif;display:block;font-size:7px;letter-spacing:3px;margin-top:9px;color:var(--muted)}nav{align-self:stretch;display:flex;gap:32px;align-items:center;font-size:12px;color:var(--muted)}nav button{font-size:12px;padding:10px 0}nav button span{margin-left:7px}.nav-active{align-self:stretch;display:flex;align-items:center;border-bottom:2px solid var(--gold);color:var(--gold)}.header-right{margin-left:auto;display:flex;align-items:center;gap:10px;font-size:11px;color:var(--muted)}.local-dot,.live-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--green)}.icon-btn{font-size:23px;width:38px;height:38px;border:1px solid var(--line);border-radius:50%;margin-left:15px}.icon-btn[aria-pressed=true]{color:var(--gold);background:#ddc18b12}main{max-width:1260px;padding:29px 45px 0;margin:auto}.intro{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:24px;gap:20px}.eyebrow{font-size:9px;letter-spacing:2.1px;color:var(--muted);font-weight:500;margin:0 0 9px}h1{font-family:'Playfair Display',Georgia,serif;font-size:34px;line-height:1.3;font-weight:500;margin:0}h1 em{color:var(--gold);font-weight:500}.session-note{font-size:10px;color:var(--muted);padding-bottom:5px;white-space:nowrap}.session-note .live-dot{margin-right:6px;box-shadow:0 0 0 4px #80b99b10}.sep{margin:0 9px;color:#537560}.play-layout{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:46px;align-items:start}.arena{width:100%;max-width:650px;margin:auto}.board-frame{padding:12px;border:1px solid #9cb69f30;border-radius:7px;background:#284437;box-shadow:0 18px 50px #0004,inset 0 1px 0 #ffffff0d;width:min(100%,calc(100svh - 305px));min-width:360px;margin:auto}.board{display:grid;grid-template-columns:repeat(8,1fr);aspect-ratio:1;border-radius:2px;overflow:hidden;box-shadow:0 0 0 1px #0002}.square{position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:2px;background:var(--light);border:0;border-radius:0;isolation:isolate;touch-action:manipulation}.square.dark{background:var(--dark)}.square:hover{box-shadow:inset 0 0 0 3px #fff4}.piece{width:91%;height:91%;pointer-events:none;filter:drop-shadow(0 3px 1px #0004);overflow:visible;position:relative;z-index:2;transition:transform .2s}.piece.ivory g{fill:#fff6dc;stroke:#655f4c}.piece.ebony g{fill:#243d32;stroke:#b6c3a9}.piece .eye{fill:currentColor}.square:hover .piece{transform:translateY(-2px)}.rank,.file{position:absolute;font-size:9px;font-weight:600;color:#3a5a48;z-index:3;pointer-events:none}.dark .rank,.dark .file{color:#e3e7d4}.rank{left:4px;top:3px}.file{right:4px;bottom:2px}.square.last:after,.square.selected:after,.square.hinted:after{content:'';position:absolute;inset:0;background:#e2d06855;z-index:0}.square.selected:after{background:#d8bb59b0;box-shadow:inset 0 0 0 3px #ffe39e}.square.hinted:after{box-shadow:inset 0 0 0 4px #fcda88;background:#ddbf6b66}.square.check{background:#b65c4e}.square.legal:before{content:'';width:22%;height:22%;background:#183f3780;border-radius:50%;z-index:4;position:absolute;box-shadow:0 0 0 1px #fff2}.square.capture:before{width:88%;height:88%;background:none;border:5px solid #244b3977}.square.moved .piece{animation:land .25s ease-out}@keyframes land{from{transform:translateY(-8px);opacity:.5}to{transform:none;opacity:1}}.player-strip{display:flex;align-items:center;gap:11px;margin:0 auto 13px;width:min(100%,calc(100svh - 305px));min-width:360px;min-height:48px}.avatar{width:42px;height:42px;flex-shrink:0;border-radius:11px;display:grid;place-items:center;font-size:26px}.bot-avatar{background:#ddc18b16;color:var(--gold);border:1px solid #ddc18b3b}.human-avatar{background:#4e7964;color:#e7e9d6;font-family:'Playfair Display';font-size:23px}.player-copy{min-width:0;flex:1}.player-copy strong{font-size:12px;font-weight:600;display:block}.player-copy>span{display:block;font-size:9px;color:var(--muted);margin-top:4px}.you-tag{font-size:7px;color:#a6b7aa;margin-left:7px;letter-spacing:1px}.color-tag{font-size:8px;color:var(--muted);white-space:nowrap}.turn-chip{font-size:7px;letter-spacing:.7px;padding:8px 9px;border-radius:5px;background:#ffffff07;color:var(--muted);white-space:nowrap}.turn-chip.active{color:#cce8c9;background:#75ac8030}.turn-chip.thinking{color:var(--gold);background:#ddc18b15;animation:breathe 1.4s infinite}@keyframes breathe{50%{opacity:.5}}.human-strip{margin-top:14px;margin-bottom:0}.captures{height:0;display:flex;align-items:center;gap:0;overflow:hidden}.captures:not(:empty){height:17px;margin-top:3px}.captures .piece{width:16px;height:18px;filter:none;margin-left:-3px}.board-tools{width:min(100%,calc(100svh - 305px));min-width:360px;margin:18px auto 0;display:flex;align-items:center;justify-content:space-between;font-size:10px;color:var(--muted)}.board-tools>div{display:flex;gap:17px}.board-tools button{padding:3px 0;font-size:10px}.board-tools button:hover:not(:disabled){color:var(--gold)}.board-tools button span{font-size:16px;margin-right:4px}.elapsed{font-variant-numeric:tabular-nums;font-size:10px}.rail{display:grid;gap:14px}.game-card,.history-card{background:linear-gradient(145deg,#1d392f,#173027);border:1px solid var(--line);border-radius:13px;overflow:hidden}.game-card{padding:21px}.card-head{display:flex;align-items:center;justify-content:space-between}.card-head .eyebrow{margin:0;font-size:8px;letter-spacing:1.5px}.bot-badge{font-size:8px;color:var(--gold);background:#ddc18b14;padding:4px 7px;border-radius:4px;letter-spacing:1px}.bot-profile{display:flex;align-items:center;gap:14px;margin:20px 0}.portrait{width:53px;height:57px;border-radius:16px;border:1px solid #d4ba7a45;background:radial-gradient(circle at 30% 10%,#5c7451,#2a4432);display:grid;place-items:center;position:relative}.portrait>span{font-family:Georgia;font-size:44px;color:#e3cf9f;line-height:1}.portrait i{position:absolute;right:-3px;bottom:1px;background:#9cc4a0;border:3px solid #1b342b;border-radius:50%;width:13px;height:13px}h2{margin:0;font-weight:500;font-size:20px;font-family:'Playfair Display',Georgia,serif}.bot-profile p{font-size:9px;color:var(--muted);margin:7px 0 0}.difficulty{display:grid;grid-template-columns:repeat(3,1fr);padding:4px;background:#0d241d70;border-radius:8px;gap:3px}.difficulty button{font-size:12px;border-radius:5px;padding:9px 2px;color:#b3c2b5;border:1px solid transparent}.difficulty button span{display:block;font-size:8px;margin-top:5px;color:#90a595}.difficulty button.selected{background:#355540;border-color:#8baf6b55;color:#f0ebc6}.difficulty button.selected span{color:#c4d6ab}.choose-side{display:flex;align-items:center;justify-content:space-between;margin-top:17px;font-size:10px;color:var(--muted)}.choose-side>div{display:flex;gap:5px}.choose-side button{padding:7px 9px;border:1px solid transparent;border-radius:5px;font-size:10px}.choose-side button.selected{border-color:#a9b29455;background:#ffffff07;color:#f3efd8}.white-dot,.black-dot{width:9px;height:9px;display:inline-block;border-radius:50%;margin-right:4px;background:#e8e3cc;border:1px solid #bfc6ad}.black-dot{background:#182b23;border-color:#758a78}.next-note{font-size:8px;color:#96aa99;margin:10px 0 15px}.primary{border-radius:7px;background:var(--gold);color:#20342b;min-height:43px;display:flex;align-items:center;justify-content:center;gap:12px;padding:12px 16px;font-size:11px;font-weight:600;width:100%;transition:background .2s,transform .2s}.primary:hover{background:#ecd29e;transform:translateY(-1px)}#new-game span:first-child{font-size:19px;font-weight:400}#new-game span:last-child{margin-left:auto;font-size:18px}.status-card{display:flex;gap:11px;padding:14px 16px;border-radius:9px;background:#92ae8021;border:1px solid #92ae8028}.status-card>span{color:var(--gold);font-size:24px}.status-card strong{font-size:11px;font-weight:500}.status-card p{font-size:9px;line-height:1.7;color:#b3c5af;margin:5px 0 0}.status-card.over{border-color:#ddc18b88;background:#ddc18b17}.history-card .card-head{padding:16px 18px 13px}.history-card h2{font-family:'Be Vietnam Pro';font-size:12px;font-weight:500}.history-card .card-head>span{font-size:9px;color:var(--muted)}.history-labels,.move-row{display:grid;grid-template-columns:32px 1fr 1fr;align-items:center;gap:10px}.history-labels{padding:8px 18px;font-size:8px;letter-spacing:1px;color:#829d89;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.history{height:143px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#4f7158 transparent}.history-empty{text-align:center;padding:15px 10px;color:#849b86}.history-empty>span{font-size:31px;color:#94ab87}.history-empty p{font-size:9px;line-height:1.8;margin:3px 0}.move-row{padding:7px 18px;font-size:11px;font-variant-numeric:tabular-nums}.move-row:nth-child(even){background:#ffffff03}.move-row>span:first-child{font-size:9px;color:#8fa992}.move-row .latest{color:var(--gold);background:#ddc18b15;border-radius:4px}.move-row>span:not(:first-child){padding:4px 7px}.history-footer{border-top:1px solid var(--line);padding:11px 16px;display:flex;align-items:center;justify-content:space-between;font-size:8px;color:#9cb39e}.history-footer button{font-size:9px;color:#d2c395;padding:2px}.quiet-note{text-align:center;font-size:10px;font-family:'Playfair Display';font-style:italic;color:#8fa68d;margin:2px 0}footer{display:flex;justify-content:space-between;margin-top:27px;padding:20px 0;border-top:1px solid var(--line);font-size:8px;letter-spacing:.9px;color:#8fa28f}footer b{color:var(--gold);margin:0 10px;font-size:10px}footer i{margin-left:6px;width:4px;height:4px}dialog{border:1px solid #b4bc8055;border-radius:18px;background:#1c352b;color:var(--text);padding:35px;width:min(480px,calc(100% - 30px));box-shadow:0 24px 100px #0009}dialog::backdrop{background:#06160fcc;backdrop-filter:blur(6px)}dialog h2{font-size:29px;margin-bottom:15px}dialog p{font-size:12px;line-height:1.9;color:#bbcabd}.dialog-symbol{font-size:45px;color:var(--gold);margin-bottom:12px}.dialog-x{position:absolute;right:14px;top:11px;font-size:25px;color:var(--muted)}.dialog-actions{display:flex;gap:12px;margin-top:25px}.dialog-actions>*{flex:1}.secondary{border:1px solid #b7c6b04a;border-radius:7px;padding:11px;font-size:11px;min-height:42px}.guide-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:24px 0}.guide-grid>div{font-size:25px;color:var(--gold)}.guide-grid b{font-size:12px;font-weight:500;color:var(--text);vertical-align:middle;margin-left:7px}.guide-grid span{display:block;font-size:10px;color:var(--muted);margin:3px 0}.muted{font-size:10px!important}.credits{display:block;margin-top:18px;font-size:9px;text-align:center;color:var(--muted)}.promotion-options{display:flex;gap:9px;margin:20px 0}.promotion-options button{background:#4f6c50;border:1px solid #c6c9a044;border-radius:9px;padding:6px;width:25%;font-size:10px}.promotion-options button:hover{background:#7a9060}.promotion-options .piece{width:100%;height:60px}.promotion-options span{display:block;margin-bottom:5px}#toast{position:fixed;left:50%;bottom:26px;transform:translate(-50%,20px);padding:14px 22px;background:#ede2c3;color:#23382a;border-radius:9px;font-size:12px;box-shadow:0 5px 35px #0005;opacity:0;pointer-events:none;transition:.25s;max-width:90vw;width:max-content;z-index:10}#toast.show{opacity:1;transform:translate(-50%,0)}
@media(min-width:1450px){main{padding-top:35px}.intro{margin-bottom:30px}.board-frame,.player-strip,.board-tools{width:min(100%,calc(100svh - 315px))}.history{height:180px}}
@media(max-width:1000px){main{padding:25px 25px 0}.play-layout{gap:25px;grid-template-columns:minmax(0,1fr) 290px}.game-card{padding:17px}.topbar{gap:40px;padding:0 25px}.session-note{display:none}h1{font-size:30px}.board-frame,.player-strip,.board-tools{min-width:0;width:100%}.turn-chip{font-size:6px;padding:7px}.color-tag{display:none}.history{height:120px}.piece{width:93%;height:93%}}
@media(max-width:720px){.topbar{height:72px;padding:0 20px;gap:20px}.brand{font-size:25px}.brand-thin{font-size:17px}.brand-mark{width:40px;height:44px;font-size:35px;line-height:42px}.brand small{font-size:6px;letter-spacing:2px}.header-right>span{display:none}.header-right .icon-btn{margin:0}nav{margin-left:auto;font-size:11px;gap:18px}nav button{font-size:10px}.header-right{margin-left:0}.nav-active{display:none}main{padding:22px 16px 0}.intro{margin-bottom:23px}.eyebrow{font-size:8px;letter-spacing:1.6px}h1{font-size:27px}.play-layout{display:flex;flex-direction:column;gap:25px}.arena{max-width:500px}.board-frame{padding:7px}.board-tools{margin-top:15px}.player-strip{margin-bottom:10px}.human-strip{margin-top:12px}.avatar{width:35px;height:35px;font-size:23px}.player-copy strong{font-size:11px}.player-copy>span{font-size:8px}.turn-chip{font-size:7px}.rank,.file{font-size:8px}.rail{width:100%;max-width:500px;margin:auto;grid-template-columns:1fr 1fr;gap:12px}.game-card{grid-column:1/-1}.status-card{grid-column:1/-1;grid-row:1}.history-card{grid-column:1/-1}.history{height:155px}.quiet-note{grid-column:1/-1}.bot-profile{margin:14px 0}.difficulty button{padding:11px}.choose-side{margin-top:14px}footer{font-size:7px;letter-spacing:.3px;gap:20px;line-height:1.8}footer>span:last-child{text-align:right;max-width:130px}.board-tools button{font-size:10px}.board-tools>div{gap:20px}.history-empty{padding:20px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Device-local player account */
.account-chip{display:flex;align-items:center;gap:8px;border:1px solid #ddc18b30;background:#ddc18b0a;border-radius:20px;padding:5px 10px 5px 6px;min-width:0}
#account-avatar{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#496543;color:var(--gold);font-size:24px;flex-shrink:0}
#account-name{font-size:10px;max-width:125px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#dce4d6}.account-chevron{color:var(--muted);font-size:12px}
#player-name{display:inline-block;max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}
.account-dialog{width:min(460px,calc(100% - 28px));padding:30px;max-height:calc(100svh - 30px);overflow:auto;background:radial-gradient(ellipse at top right,#62724630,transparent 60%),#1c352b}
.account-decoration{display:flex;align-items:center;gap:17px;margin:0 0 25px;color:#93a582;font-size:35px}.account-decoration span:nth-child(2){display:grid;place-items:center;width:66px;height:72px;border:1px solid #ddc18b66;border-radius:17px;background:#ddc18b12;font-size:58px;color:var(--gold);transform:rotate(-5deg)}.account-decoration span:last-child{opacity:.6}
.account-dialog h2{font-size:32px;margin-bottom:8px}.account-dialog #account-intro{margin:0 0 24px;font-size:12px;line-height:1.8}
.account-identity{display:flex;align-items:center;gap:13px}.account-identity>div:last-child{flex:1;min-width:0}.account-identity label{display:block;font-size:11px;color:#cbd7c8;margin-bottom:8px}
#account-preview{display:grid;place-items:center;width:61px;height:68px;border:1px solid #bad2a033;background:#496543;border-radius:13px;font-size:50px;color:#ecdeb6;flex-shrink:0}
#account-nickname{width:100%;height:45px;background:#10271e;border:1px solid #9eb08c55;border-radius:8px;color:var(--text);font-family:inherit;font-size:16px;padding:10px 12px;outline:none}#account-nickname:focus{border-color:var(--gold);box-shadow:0 0 0 3px #ddc18b12}#account-nickname::placeholder{color:#829785;font-size:12px}
.avatar-field{padding:0;margin:23px 0 15px;border:0}.avatar-field legend{font-size:10px;color:#b3c3ad;margin-bottom:10px}.avatar-choices{display:flex;gap:10px}.avatar-choices button{width:52px;height:52px;background:#10271e66;border:1px solid #9eb08c33;border-radius:10px;font-size:37px;color:#a8bea0}.avatar-choices button.selected{color:#ebd7a6;background:#596e3e66;border-color:var(--gold);box-shadow:0 0 0 2px #ddc18b12}
.account-error{color:#f0ad96!important;font-size:11px!important;line-height:1.6!important;margin:0 0 12px!important}.account-error:empty{display:none}.account-dialog .primary{margin-top:21px;font-size:12px;min-height:46px}
.account-local-note{font-size:10px!important;line-height:1.8!important;color:#a5b59f!important;margin:17px 0 0}.account-local-note>span{color:var(--gold);font-size:16px;margin-right:4px}.account-cancel{font-size:11px;color:#d5c28e;margin-top:18px;padding:5px 0}.account-cancel[hidden]{display:none}
@media(max-width:720px){.topbar{padding:0 16px;gap:8px}.brand{gap:7px;font-size:23px}.brand-thin{font-size:14px;margin-left:4px}.brand-mark{width:34px;height:40px;font-size:30px;line-height:38px}.brand small{font-size:5px;letter-spacing:1.6px}.header-right{gap:5px;margin-left:auto}.header-right .icon-btn{width:29px;height:29px;font-size:19px}.account-chip{padding:3px 6px 3px 3px;gap:5px}#account-avatar{width:23px;height:23px;font-size:21px}#account-name{max-width:61px;font-size:9px}.account-chevron{display:none}nav{margin-left:auto;gap:0}nav #guide-open{font-size:0;width:22px;height:30px}nav #guide-open span{display:none}nav #guide-open:before{content:'?';font-size:14px;border:1px solid #93ab8744;border-radius:50%;width:19px;height:19px;display:block}#player-name{max-width:135px}.account-dialog{padding:25px 23px}.account-dialog h2{font-size:29px}}
@media(max-width:360px){#account-name{max-width:47px}.topbar{padding:0 12px;gap:6px}.brand{font-size:22px}.brand-thin{font-size:13px}}

[hidden]{display:none!important}
.home-view{max-width:1060px;margin:0 auto 45px}.home-welcome{display:flex;align-items:center;justify-content:space-between;padding:14px 0 26px}.home-welcome h1{font-size:43px}.home-welcome p:not(.eyebrow){font-size:12px;color:var(--muted);margin:15px 0 0}.home-welcome em{display:inline-block;max-width:70vw;overflow:hidden;text-overflow:ellipsis;vertical-align:bottom;white-space:nowrap}.home-emblem{font-size:100px;color:#ddc18b;transform:rotate(-8deg);text-shadow:10px 15px 0 #ddc18b0b;padding-right:30px}
.home-rating{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;align-items:center;border:1px solid #b2c49626;border-radius:14px;background:linear-gradient(115deg,#344d32,#1c352b);padding:23px 27px;margin:0 0 34px}.home-rating>div:first-child{display:grid;grid-template-columns:auto 1fr;align-items:baseline;gap:5px 18px}.home-rating>div:first-child>span{grid-column:1/-1;font-size:9px;letter-spacing:2px;color:#bac9af}.home-rating strong{font-size:29px;font-weight:500;font-variant-numeric:tabular-nums}.home-rating>div:first-child strong{font-family:'Playfair Display';font-size:43px;color:var(--gold)}.home-rating small{font-size:11px;color:#d8dfbf}.home-rating>div:not(:first-child){display:flex;flex-direction:column;align-items:center;border-left:1px solid #b2c49625;gap:8px}.home-rating>div:not(:first-child)>span{font-size:11px;color:var(--muted)}
.lobby-heading{display:flex;justify-content:space-between;align-items:center;margin:20px 0}.lobby-heading h2{font-size:23px}.lobby-heading>span{font-size:10px;color:var(--muted)}.bot-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:19px}.bot-choice{text-align:left;border:1px solid #9ab68c33;border-radius:15px;background:linear-gradient(135deg,#223c2f,#182f27);padding:23px;position:relative;transition:border-color .2s,transform .2s;display:flex;flex-direction:column;align-items:flex-start}.bot-choice:hover{transform:translateY(-3px);border-color:#ddc18b99}.bot-choice.selected{border-color:var(--gold);background:linear-gradient(135deg,#405333,#22382b);box-shadow:0 0 0 2px #ddc18b0c}.bot-card-icon{font-size:49px;color:var(--gold);height:64px}.bot-card-level{font-size:8px;letter-spacing:1.8px;color:#b6c4a0;margin:12px 0 9px}.bot-choice>strong{font-family:'Playfair Display';font-size:23px;font-weight:500}.bot-rating{display:block;color:#e0ce9b;font-size:12px;margin-top:10px}.bot-choice p{font-size:10px;color:#b1c3ac;line-height:1.8;margin:16px 0 24px;flex:1}.bot-select{font-size:10px;width:100%;padding-top:14px;border-top:1px solid #e2d0a322}.bot-select b{float:right;font-size:16px;font-weight:400}.bot-choice.selected .bot-select{color:var(--gold)}
.lobby-actions{display:flex;justify-content:space-between;gap:20px;align-items:center;margin:23px 0}.lobby-actions .choose-side{gap:25px;margin:0}.lobby-actions>div:last-child{display:flex;gap:12px}.lobby-actions .primary{width:190px}.lobby-actions .secondary{font-size:10px}.rating-disclaimer{font-size:10px;line-height:1.7;color:#94aa94;margin:20px 0 10px}.elo-help{font-size:10px;color:var(--gold);padding:0}.match-rating{display:flex;align-items:center;gap:10px;padding:13px 16px;border:1px solid var(--line);border-radius:9px;font-size:9px;color:var(--muted)}.match-rating strong{font-size:19px;color:var(--gold);font-weight:500}.match-rating>span:first-child{margin-right:auto}.match-rating button{font-size:9px;color:var(--gold)}
.result-dialog{text-align:center;width:min(455px,calc(100% - 28px));max-height:calc(100svh - 30px);overflow:auto;background:radial-gradient(ellipse at 50% 0,#67734144,transparent 65%),#1c352b}.result-symbol{font-size:70px;color:var(--gold);margin:0 0 14px}.result-dialog h2{font-size:29px}.result-dialog #result-description{font-size:11px;margin:8px 0 21px}.result-rating{border:1px solid #ddc18b44;border-radius:12px;background:#ddc18b0a;padding:19px}.result-rating>span{font-size:8px;letter-spacing:2px;color:#c3ccae}.result-rating>div{display:flex;align-items:center;justify-content:center;gap:14px;margin:14px 0 0}.result-rating #result-before{font-size:25px;color:#a9b4a0}.result-rating #result-after{font-size:37px;color:var(--gold);font-weight:500}.elo-arrow{color:#849d85}.result-rating #result-delta{font-size:12px;padding:6px 8px;border-radius:5px;background:#8daf8325}.positive{color:#a6db9b}.negative{color:#eead96}.result-rating #result-rank{font-size:12px;margin:9px 0 0;color:#dde2c5}.result-facts{display:flex;gap:12px;justify-content:center;margin:20px 0;color:#b1c0a7;font-size:9px}.result-dialog .secondary{margin-top:10px;width:100%;color:#e1d3ac}.result-dialog small{display:block;margin:17px 0 0;font-size:9px;color:#96ab94}#result-save-error{font-size:11px;color:#f0ad96}.elo-formula{font-size:10px;line-height:2.4;background:#0d261c;padding:14px;border-radius:9px;color:var(--gold);overflow-wrap:anywhere}#resign{color:#bca994}
@media(max-width:720px){.home-welcome{padding:4px 0 23px}.home-welcome h1{font-size:31px}.home-welcome p:not(.eyebrow){font-size:10px;max-width:210px;line-height:1.7}.home-emblem{font-size:68px;padding:0}.home-rating{padding:17px 13px;grid-template-columns:1.5fr 1fr 1fr 1fr;margin-bottom:27px}.home-rating>div:first-child{display:flex;flex-direction:column;gap:2px;align-items:flex-start}.home-rating>div:first-child>span{font-size:6px;letter-spacing:1px}.home-rating>div:first-child strong{font-size:32px}.home-rating strong{font-size:24px}.home-rating small{font-size:9px}.home-rating>div:not(:first-child)>span{font-size:9px}.lobby-heading{display:block}.lobby-heading h2{font-size:21px}.lobby-heading>span{display:block;margin-top:9px;font-size:9px}.bot-cards{grid-template-columns:1fr;gap:12px}.bot-choice{padding:17px 20px 17px 83px;min-height:125px}.bot-card-icon{position:absolute;left:20px;top:20px;font-size:43px}.bot-card-level{margin:0 0 6px;font-size:7px}.bot-choice>strong{font-size:21px}.bot-rating{margin-top:6px}.bot-choice p{margin:8px 0 0;font-size:9px}.bot-select{position:absolute;right:17px;top:18px;width:auto;font-size:0;border:0;padding:0}.bot-select b{font-size:18px}.lobby-actions{flex-direction:column;align-items:stretch}.lobby-actions .choose-side{justify-content:space-between;gap:15px}.lobby-actions>div:last-child{flex-direction:column}.lobby-actions .primary{width:100%}.match-rating{grid-column:1/-1}.board-tools>div{gap:12px;flex-wrap:wrap}.board-tools button{font-size:9px}.board-tools .elapsed{margin-left:6px}.topbar nav{gap:3px}.topbar nav #home-open{display:grid;place-items:center;font-size:0;width:21px;padding:0;border:0}.topbar nav #home-open:before{content:'⌂';font-size:20px}.topbar nav #guide-open{width:20px}.result-dialog{padding:26px 22px}.result-dialog h2{font-size:26px}}
@media(max-width:360px){.topbar .brand-thin{display:none}.topbar .brand small{font-size:4px;letter-spacing:.6px}#player-name{max-width:110px}.you-tag{font-size:6px}}

/* Home-first flow */
.boot-screen{position:fixed;inset:0;z-index:100;background:radial-gradient(ellipse at 50% 35%,#304c35,#0e231c 65%);display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;color:#e7d2a0}.boot-screen h1{font-family:'Playfair Display';font-size:58px;margin:25px 0 13px}.boot-screen h1 span{font-family:'Be Vietnam Pro';font-weight:400;font-size:34px;margin-left:8px;color:#b6c8ae}.boot-screen p{font-size:8px;letter-spacing:3px;color:#9fb59e;margin-bottom:30px}.boot-pieces{display:flex;gap:20px;align-items:end;height:105px}.boot-pieces span{font-size:60px;opacity:.5}.boot-pieces span:nth-child(2){font-size:115px;opacity:1;animation:bootKnight 2.5s ease-in-out infinite}.boot-track{width:min(250px,65vw);height:3px;background:#e2ce9833;border-radius:3px;overflow:hidden}.boot-track i{display:block;height:100%;width:0;background:var(--gold);animation:bootFill 5s linear forwards}.boot-screen small{font-size:9px;color:#8ea88f;margin-top:15px}@keyframes bootFill{to{width:100%}}@keyframes bootKnight{50%{transform:translateY(-10px)}}
.hero-chess{position:relative;width:300px;height:225px;flex-shrink:0;display:flex;align-items:center;justify-content:center}.hero-ring{position:absolute;width:220px;height:220px;border:1px solid #c3b78225;border-radius:50%;transform:rotateX(30deg)}.hero-knight{font-size:180px;color:var(--gold);z-index:2;filter:drop-shadow(12px 14px 0 #081c1544);transform:rotate(-7deg)}.hero-pawn{position:absolute;left:12px;top:78px;font-size:90px;color:#91a279}.hero-king{position:absolute;right:3px;top:65px;font-size:115px;color:#66866d}.hero-grid{position:absolute;bottom:0;left:0;right:0;height:95px;transform:perspective(200px) rotateX(50deg);background:conic-gradient(#a5b08818 25%,#0000 0 50%,#a5b08818 0 75%,#0000 0) 0 0/45px 45px;mask-image:linear-gradient(90deg,transparent,#000 30%,#000 70%,transparent)}
.home-auth{display:flex;justify-content:space-between;align-items:center;gap:22px;background:#c6b8790c;border:1px solid #ddc18b40;border-radius:12px;padding:23px 25px;margin:0 0 30px}.home-auth strong{font-size:18px;font-family:'Playfair Display';font-weight:500}.home-auth p{font-size:10px;color:var(--muted);margin:7px 0 0;line-height:1.7}.home-auth>div:last-child{display:flex;gap:10px;flex-shrink:0}.home-auth .primary{width:auto;min-width:150px}.home-auth .secondary{min-width:105px}.mode-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:19px}.mode-choice{text-align:left;display:flex;flex-direction:column;align-items:flex-start;padding:26px;border-radius:14px;border:1px solid #b9c99530;background:linear-gradient(145deg,#2a4532,#193229);transition:.2s}.mode-choice:hover:not(:disabled){border-color:var(--gold);transform:translateY(-3px)}.mode-choice:disabled{opacity:.63}.mode-icon{font-size:55px;color:var(--gold);height:75px}.mode-choice strong{font-family:'Playfair Display';font-size:25px;font-weight:500}.mode-choice p{font-size:10px;line-height:1.8;color:#aabfa7;margin:13px 0 26px;flex:1}.mode-action{width:100%;font-size:11px;border-top:1px solid #e3d39c25;padding-top:16px;color:var(--gold)}.mode-action b{float:right;font-weight:400}.home-bottom{display:flex;align-items:center;gap:12px;justify-content:space-between;margin:24px 0}.home-bottom>div{margin-left:auto;display:flex;gap:25px}.home-bottom button:not(.secondary){font-size:10px;color:#aabb9f}.back-link{font-size:11px;color:var(--gold);padding:10px 0 22px}.bot-heading{margin-bottom:30px}.bot-heading h1{font-size:32px}.bot-cards{grid-template-columns:repeat(4,1fr)}.bot-choice{padding:20px 18px}.bot-choice>strong{font-size:21px}.difficulty{grid-template-columns:repeat(4,1fr)}.difficulty button{font-size:10px}.difficulty button span{font-size:7px}.settings-row{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:25px 0;font-size:12px}.settings-row select{background:#10281e;color:#d8e3c8;padding:10px;border-radius:6px;border:1px solid #9cb28266;font-family:inherit;font-size:12px}.settings-row input{accent-color:#cfba80;width:20px;height:20px}.account-footer{display:flex;justify-content:space-between;gap:15px}.result-nav{display:grid;grid-template-columns:1fr 1fr;gap:10px}.result-dialog #result-title{font-family:'Be Vietnam Pro';font-weight:700;font-size:36px;letter-spacing:2px;animation:resultReveal .65s ease-out}.result-dialog #result-delta{animation:deltaReveal .8s ease-out}.result-dialog[data-result=win] #result-title{color:#f2d88e;text-shadow:0 0 35px #d8be7055}.result-dialog[data-result=loss] #result-title{color:#e4b3a1}.result-dialog[data-result=draw] #result-title{color:#c3d5b7}.result-dialog[data-result=win] .result-symbol{animation:winFloat 2.5s ease-in-out infinite}@keyframes resultReveal{from{opacity:0;transform:translateY(18px) scale(.92);letter-spacing:8px}to{opacity:1;transform:none;letter-spacing:2px}}@keyframes deltaReveal{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}@keyframes winFloat{50%{transform:translateY(-6px);text-shadow:0 0 30px #ddc18b77}}
:root[data-theme=wood]{--bg:#2b231d;--panel:#403328;--light:#e5c99a;--dark:#a37a55;--green:#bda77d}.square.dark{background:var(--dark)}:root[data-theme=wood] body{background:radial-gradient(ellipse at 30% 50%,#86663d33,transparent 65%),var(--bg)}:root[data-theme=wood] .board-frame{background:#60452f}:root[data-theme=night]{--bg:#141e31;--panel:#223049;--light:#cdd8e7;--dark:#6a829e;--green:#9bb7db}:root[data-theme=night] body{background:radial-gradient(ellipse at 30% 50%,#47618633,transparent 65%),var(--bg)}:root[data-theme=night] .board-frame{background:#30425b}
@media(max-width:850px){.bot-cards{grid-template-columns:repeat(2,1fr)}.hero-chess{width:220px}.hero-knight{font-size:150px}.hero-pawn{font-size:70px;left:0}.hero-king{font-size:95px;right:-8px}.hero-ring{width:190px;height:190px}.mode-choice{padding:20px}.mode-choice strong{font-size:21px}}
@media(max-width:720px){.home-welcome{gap:5px}.home-welcome h1{font-size:32px}.hero-chess{width:135px;height:170px;margin-right:-5px}.hero-knight{font-size:110px}.hero-pawn{font-size:48px;left:-7px;top:75px}.hero-king{font-size:65px;right:-2px;top:70px}.hero-ring{width:140px;height:140px}.hero-grid{height:60px}.home-auth{display:block;padding:20px}.home-auth>div:last-child{margin-top:17px}.home-auth .primary{min-width:0;flex:1;padding:12px;font-size:10px}.home-auth .secondary{min-width:90px;font-size:10px}.mode-cards{grid-template-columns:1fr;gap:12px}.mode-choice{position:relative;min-height:145px;padding:20px 20px 20px 89px}.mode-icon{position:absolute;left:22px;top:23px;font-size:45px}.mode-choice .eyebrow{font-size:7px}.mode-choice strong{font-size:24px}.mode-choice p{margin:10px 0 15px;font-size:9px}.mode-action{font-size:9px;padding-top:10px}.mode-choice:disabled{opacity:.63}.home-bottom{flex-wrap:wrap}.home-bottom>div{width:100%;justify-content:space-between;margin:12px 0}.bot-cards{grid-template-columns:1fr}.bot-choice{padding:18px 20px 18px 83px}.bot-choice>strong{font-size:22px}.bot-heading h1{font-size:29px}.bot-heading>span{margin-top:15px}.result-dialog #result-title{font-size:29px}.boot-screen h1{font-size:49px}.boot-screen h1 span{font-size:28px}.home-welcome #home-greeting{max-width:205px}.hero-grid{right:5px}.result-nav .secondary{font-size:10px;padding:10px 5px}}
