/* The arena shell: static, lightweight geometry and a compact game switcher. */
body{background:radial-gradient(ellipse at 20% 30%,#28453c70 0,transparent 52%),radial-gradient(ellipse at 100% 75%,#29342745,transparent 50%),#091210;min-height:100vh;isolation:isolate}
body:before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background-image:linear-gradient(135deg,transparent 49.8%,#b2d39808 50%,transparent 50.2%),linear-gradient(45deg,transparent 49.8%,#b2d39806 50%,transparent 50.2%);background-size:180px 180px;mask-image:linear-gradient(#000,transparent 95%)}
body:after{content:"";position:fixed;width:72vw;height:72vw;max-width:1100px;max-height:1100px;border:1px solid #a2c28c09;transform:rotate(45deg);left:-35vw;top:15vh;z-index:-1;pointer-events:none;box-shadow:0 0 0 45px #9fc78703,0 0 0 46px #9fc78708}
header{height:88px;max-width:1150px;margin:0 auto;padding:18px 24px;gap:26px;background:transparent;border:0;box-shadow:none;align-items:center}
header .brand{font-size:22px;letter-spacing:-1px}
header .brand-icon{width:37px;height:37px;border-radius:10px}
header nav{flex:0 1 auto;align-self:auto;display:flex;gap:4px;padding:4px;margin-left:auto;background:#0b1714cc;border:1px solid #43554a;border-radius:12px;box-shadow:inset 0 1px #d3eac208}
header nav button{min-height:38px;padding:0 18px;border:1px solid transparent;border-radius:8px;color:#a0b4a5;font-size:12px;font-weight:600;transition:background .15s,color .15s}
header nav button.active{background:#c8ee87;border-color:#dcf6b7;color:#182315;box-shadow:0 2px 6px #0003}
header nav button:hover:not(.active){background:#233a2d;color:#e5eedf}
header nav small{font:7px monospace;letter-spacing:.9px;color:inherit;opacity:.65;margin-left:4px}
header .account-button{margin-left:0;max-width:190px;padding:10px 15px;min-height:46px;background:#1b2a21;border:1px solid #4d6752;color:#d9e8cf;border-radius:10px;font-size:11px;box-shadow:inset 0 1px #d8efc90b}
header .account-button:hover{background:#293c2c;border-color:#8da578}
main{padding-top:10px}
.primary{justify-content:center;gap:10px;position:relative;background:linear-gradient(110deg,#c4ed7f,#d8f5a8);border:1px solid #dff9ba;border-radius:9px;min-height:48px;color:#1b2a13;font-weight:700;font-size:13px;box-shadow:0 3px 0 #6a8846,0 6px 14px #0003,inset 0 1px #f2ffe0;transition:filter .15s,transform .15s,box-shadow .15s}
.primary:hover{filter:brightness(1.06);transform:translateY(-1px);box-shadow:0 4px 0 #6a8846,0 8px 18px #0004}
.primary:active{transform:translateY(2px);box-shadow:0 1px 0 #6a8846}
.primary:disabled{transform:none;box-shadow:none;opacity:.45}
.secondary,.join-row button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:41px;padding:10px 13px;background:#1b2d22;border:1px solid #4b6550;border-radius:8px;color:#c8ddbd;font-size:11px;box-shadow:inset 0 1px #c9e7b80b;transition:background .15s,border-color .15s}
.secondary:hover,.join-row button:hover{background:#293e2b;border-color:#829f6c}
.bot-card{background:linear-gradient(110deg,#19291f,#132118);border-color:#3b5140;box-shadow:inset 0 1px #cadcbb06;transition:background .15s,border-color .15s}
.bot-card:hover{border-color:#789568;background:#253a28}
.bot-card.active{background:linear-gradient(100deg,#31462c,#20351f);border-color:#a1bf7d;box-shadow:inset 3px 0 #d0ed98}
.bot-card>span:first-child{display:grid;place-items:center;width:36px;height:39px;border:1px solid #5f79513d;border-radius:8px;background:#a5c97a0b;color:#c2dba9}
.bot-card .dot{height:6px;width:6px}
.panel{background:linear-gradient(135deg,#203127ee,#122219f5);border-color:#4a6050;box-shadow:inset 0 1px #d2e8bb0a,0 12px 28px #0003}
.quiet-button{color:#a8bf99;padding:12px;border-radius:7px}
.quiet-button:hover{background:#c2df9b0a;color:#dceccd}
#close-dialog{width:32px;height:32px;display:grid;place-items:center;border:1px solid #496049;border-radius:8px;font-size:20px;line-height:1;color:#b8c9ac}
#close-dialog:hover{background:#31452c;color:#eff9e4}
.board-actions button{border:1px solid #435a44;background:#17291d;border-radius:7px;color:#b5c7a9;min-height:33px}
.board-actions button:hover:not(:disabled){background:#2b402b;border-color:#90ac72;color:#e2efcf}
.board-actions #resign:hover:not(:disabled){background:#4b3029;border-color:#a97d68;color:#f3c3ad}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #d8f2a5;outline-offset:3px}
.champion{background:radial-gradient(ellipse at 95% 0%,#b7d96720,transparent 80%),#22351f}
.champion button{padding:6px 0;border-bottom:1px solid #8da96355;border-radius:0}
footer{border-top:1px solid #77906a20;margin-top:24px;padding:18px 24px;align-items:center}
#help{padding:7px 12px;border:1px solid #41593f;border-radius:7px;color:#b4c7a5}
#help:hover{background:#233821;color:#e3efd7}
@media(max-width:760px){header{height:auto;min-height:104px;flex-wrap:wrap;padding:15px 14px 12px;gap:12px}header .brand{font-size:19px}header .brand-icon{width:31px;height:31px}header .account-button{margin-left:auto;min-height:35px;padding:7px 10px;max-width:180px}header nav{order:3;flex:1 0 100%;margin:0;padding:3px;gap:3px;border-radius:10px}header nav button{flex:1;min-height:35px;padding:0 9px;font-size:11px}main{padding-top:6px}body:before{background-size:120px 120px}.primary{min-height:46px}}
@media(prefers-reduced-motion:reduce){.primary,.secondary,.bot-card,header nav button{transition:none}.primary:hover,.primary:active{transform:none}}

/* Bespoke game furniture, using the same signature set as the board. */
.bot-list{gap:10px}
.bot-card{position:relative;min-height:94px;padding:10px 13px 10px 8px;gap:11px;overflow:hidden;border-radius:11px}
.bot-card>span:first-child{width:66px;height:70px;flex-shrink:0;border:0;border-radius:0;background:radial-gradient(ellipse at 50% 80%,#b0d68420,transparent 70%)}
.bot-card .signature-piece{display:block;width:100%;height:100%;filter:drop-shadow(0 3px 2px #0005)}
.bot-card .signature-piece>svg,.user-avatar .signature-piece>svg{filter:none}
.bot-card b{font-size:15px;letter-spacing:-.3px}
.bot-card small{display:block;margin-top:2px;font-size:10px;color:#a5b69e}
.bot-card .bot-caption{display:block;color:#83977d;font-size:9px;margin-top:5px;line-height:1.3}
.bot-card.active .bot-caption{color:#b3c4a1}
.bot-card .dot{position:absolute;top:15px;right:13px}
.bot-card.active:after{content:"SELECTED";position:absolute;right:12px;bottom:13px;font:7px monospace;letter-spacing:1px;color:#c8e69f}
.user-avatar{background:radial-gradient(ellipse at 50% 100%,#586d3d,#1c2c20 80%)!important}
.user-avatar .signature-piece{width:94%;height:94%;display:block}
.player{position:relative;border:1px solid #3b504133;border-radius:10px;background:linear-gradient(90deg,#1c2c21b3,#101d1666);padding:8px 11px;height:65px}
.opponent{margin-top:0;margin-bottom:10px}
.you{margin-top:12px}
.player.is-turn{border-color:#a1c57770;background:linear-gradient(90deg,#304026bb,#17271bb3);box-shadow:inset 3px 0 #bddd8c}
.player.is-turn .player-name b:after{content:"";display:inline-block;width:5px;height:5px;background:#c7ec8f;border-radius:50%;margin-left:8px;vertical-align:2px}
.player .avatar{width:40px;height:40px}
.player .avatar .user-avatar{width:40px;height:40px}
.player-name small{font-size:10px}
.clock{font-variant-numeric:tabular-nums;min-width:98px;font-size:23px;letter-spacing:1px}
.nav-icon{height:15px;width:15px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
header nav button{display:flex;align-items:center;justify-content:center;gap:7px}
header nav small{margin-left:-3px}
.right h2{font-size:22px;max-width:230px;margin-bottom:18px}
.rank-heading h2{font-size:19px}
.mode-label:before{content:"";display:inline-block;width:11px;height:2px;background:#a8ca77;vertical-align:3px;margin-right:7px}
.champion{padding:17px}
.empty-champion>strong{font-size:16px;max-width:210px}
.empty-champion p{font-size:11px;line-height:1.7}
#status{display:flex;align-items:center;gap:5px;margin-left:auto;padding:6px 0;font-size:8px}
#status:before{content:"";height:4px;width:4px;border-radius:50%;background:#b5d28e}
.board-actions{align-items:center}
.square:disabled{opacity:1}
.square:not(:disabled):hover{filter:brightness(1.06)}
@media(max-width:760px){.bot-card{min-height:83px}.bot-card>span:first-child{width:55px;height:61px}.right h2{max-width:none}.player{height:62px}.clock{font-size:20px;min-width:86px}header nav button{gap:5px}.nav-icon{width:14px;height:14px}}

.time-heading{font:9px monospace;letter-spacing:1.3px;color:#a7bb99;margin:19px 0 9px}
.time-picker{display:flex;gap:6px}
.time-picker button{flex:1;min-width:0;min-height:54px;padding:8px 4px;border:1px solid #455c42;border-radius:8px;background:#122219;color:#bccdad}
.time-picker b{display:block;font-size:16px;letter-spacing:.4px}
.time-picker small{display:block;font-size:8px;color:#8fa480;margin-top:2px}
.time-picker button.active{border-color:#b0d47d;background:#354a28;color:#e4f8c7;box-shadow:inset 0 0 0 1px #aaca6344}
.time-picker button.active small{color:#c1d5ab}
.fair-play-note{font-size:10px;line-height:1.6;color:#9fb38e;margin:10px 0}
body{background:#08120f}
body:before{background:linear-gradient(#07110d18,#08120f44),url("assets/rhchess-floating-arena.png") center center/cover no-repeat;mask-image:none;opacity:1}
body:after{display:none}
header{background:linear-gradient(#0b1713cc,#0b171300)}
.panel{background:linear-gradient(135deg,#1d2e24f5,#112017f5)}
@media(max-width:760px){body:before{background-position:62% center}.time-picker b{font-size:15px}}

body:before{background-image:linear-gradient(#0c181520,#0c181550),url("assets/rhchess-floating-arena.png")}

/* RHChess — graphite surfaces, limestone text and restrained lime. */
:root{--text:#e7ebe3;--muted:#9ca9a2}
body{color:var(--text)}
/* Keep the scenery behind the playing surface: soft focus and a dark vignette. */
body:before{inset:-3px;background-image:radial-gradient(ellipse at 48% 42%,#080f0d99 0%,#080f0d70 48%,#060c0bd9 100%),linear-gradient(#080f0d80,#080f0d33 48%,#080f0da6),url("assets/rhchess-floating-arena.png");filter:saturate(.4) blur(2px);opacity:.4}
.panel{box-shadow:0 18px 45px #0007,inset 0 1px #e3efdf08}
header .brand{font-size:24px;letter-spacing:-1px;font-weight:750;gap:0}
header .brand .brand-word{display:inline;color:#edf0e9}
header .brand .brand-word b{color:#c8ed84;margin:0;font-weight:550}
header .brand .ticker{font:9px monospace;letter-spacing:.8px;color:#b8c69f;border:1px solid #60714f;border-radius:5px;padding:3px 5px;margin-left:10px}
header .brand-icon{width:41px;height:41px;margin-right:10px;filter:none}
.panel{background:linear-gradient(135deg,#252e2bf5,#18211ef7);border-color:#4b5952}
.bot-card{background:linear-gradient(110deg,#1c2722,#16201c);border-color:#3f5045}
.bot-card.active{background:linear-gradient(110deg,#364331,#273426);border-color:#a8bf80}
.player{background:linear-gradient(90deg,#25302be6,#19231ed9);border-color:#46534988}
.player.is-turn{background:linear-gradient(90deg,#34412df0,#202c21e6);border-color:#9fb675}
.primary{background:linear-gradient(115deg,#c5ec80,#def4b6);color:#202818;border-color:#e6f5cb;box-shadow:0 3px 0 #677b4e,0 6px 14px #0003}
.champion{background:linear-gradient(125deg,#303b29,#202c21);border-color:#62754f}
.time-picker button{background:#19251e;border-color:#4c5d50}
.time-picker button.active{background:#3b4930;border-color:#afc68a}
.mode-label,.compact-note,.rank-note,.player-name small{color:#a8b5a7}
.footer-brand{font-size:9px;line-height:1.8;letter-spacing:.4px;max-width:410px;color:#a7b3a4}
.footer-brand b{color:#c9e7a0;margin:0}
@media(max-width:760px){header .brand{font-size:21px}header .brand-icon{width:34px;height:34px}header .brand .ticker{font-size:8px;margin-left:7px}.footer-brand{flex-basis:100%;order:3}}

header .brand .brand-word{display:inline-block;width:auto;height:auto;background:none;border:0;border-radius:0;box-shadow:none;font:inherit;line-height:1.2;vertical-align:baseline;margin:0;padding:0;color:#edf0e9}header .brand .brand-word b{font:inherit;color:#c8ed84;margin:0}header .brand{white-space:nowrap;flex-shrink:0}

header .brand-icon{width:42px;height:46px;border-radius:0;margin-right:11px;background:none;object-fit:contain}header .brand .brand-word{color:#f3efdf}header .brand .brand-word b{color:#c5ef77}@media(max-width:760px){header .brand-icon{width:33px;height:37px}}

.match-history{display:grid;gap:10px;max-height:60vh;overflow:auto}.history-match{text-align:left;display:grid;gap:7px}.history-match span{font-size:12px;color:var(--muted)}

#recovery-secret{box-sizing:border-box;width:100%;resize:none;border:1px solid #637258;border-radius:8px;background:#0d1812;color:#d9ecc2;padding:14px;font:15px/1.8 monospace;overflow-wrap:anywhere}
dialog{max-height:calc(100dvh - 32px);overflow-y:auto}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid #d2f391;outline-offset:3px}
@media(max-width:420px){header .brand{font-size:19px}header .brand .ticker{display:none}.account-button{max-width:145px}dialog{width:calc(100vw - 24px);padding:24px 18px}dialog h2{font-size:24px}.player-name{min-width:0}.player-name b{display:block;max-width:135px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.board-actions{flex-wrap:wrap}}

header nav .coming-soon{color:#8e9b91}header nav .coming-soon small{font-size:7px;letter-spacing:.8px}
.social-x{display:grid;place-items:center;width:40px;height:40px;flex-shrink:0;color:#bdcbb8;border:1px solid #43554a;border-radius:9px;background:#101c16;text-decoration:none}
.social-x svg{width:17px;height:17px}
.social-x:hover{color:#d8f2a5;border-color:#9ab979;background:#233226}
@media(max-width:760px){header .social-x{margin-left:auto;width:35px;height:35px}header .social-x+.account-button{margin-left:0}}
