/* Product surfaces share one catalog, one board renderer, and one game flow. */
:root{--radius:14px;--muted:#a5b4c8}body{font-size:16px}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--world-accent);outline-offset:4px}button{touch-action:manipulation}button:disabled{cursor:default}a{overflow-wrap:anywhere}input,select,textarea{font-size:16px;min-width:0}label,.quiet,.secondary,.subtle{font-size:14px}.eyebrow{font-size:12px;line-height:1.5}.muted{line-height:1.6}.header{min-height:82px;padding:0 4%;gap:40px;border-bottom:1px solid #ffffff12;backdrop-filter:blur(18px)}.header nav{gap:30px;justify-content:center;flex:1}.header nav a{padding:27px 0;font-size:15px}.header nav a.active{color:#f0d29a;border-bottom:2px solid var(--gold)}.brand{flex-shrink:0}.brand>div{font-size:18px}.brand small{font-size:9px}.user-menu{position:relative;margin-left:auto;z-index:12}.user-menu summary{list-style:none;cursor:pointer;width:43px;height:43px;display:grid;place-items:center;border:1px solid #84704b;border-radius:50%;background:#29251e;font-size:29px;color:var(--gold)}.user-menu summary::-webkit-details-marker{display:none}.user-menu>div{position:absolute;top:56px;right:0;width:240px;display:grid;padding:10px;background:#142033;border:1px solid #3b4b62;border-radius:10px;box-shadow:0 20px 50px #0008}.user-menu a,.user-menu button{border:0;background:none;color:#d7e1ed;font-size:14px;text-align:left;padding:12px;border-radius:5px}.user-menu a:hover,.user-menu button:hover{background:#23364b}.user-menu .account{margin:0}.page-heading{max-width:1400px;margin:30px auto 24px;padding:0 30px}.page-heading h1{font-size:30px}.page-heading #quickStyle{display:none}main{max-width:1400px;padding:0 30px;margin:auto}.world-home{grid-template-columns:minmax(390px,1.4fr) minmax(300px,.9fr);gap:24px}.home-arena{padding:24px 32px 17px;min-width:0}.world-hero-copy h2{font-size:37px}.world-hero-copy p{font-size:14px}.home-board-stage{max-width:460px;margin:24px auto;transform:perspective(1800px) rotateX(5deg)}.home-actions{border:0;background:none;padding:10px 0 0 18px;display:flex;flex-direction:column}.lobby-player{display:flex;align-items:center;gap:15px;color:var(--text)}.lobby-player strong{font-size:18px}.lobby-player small{display:block;font-size:13px;color:var(--muted);margin-top:6px}.portrait-avatar{display:grid;place-items:center;width:62px;height:62px;flex-shrink:0;overflow:hidden;background:radial-gradient(ellipse at 50% 100%,#4c493b,#162439);border:1px solid #8b7449;border-radius:16px}.portrait-avatar img{width:70%;height:90%;object-fit:contain;filter:drop-shadow(0 4px 3px #0008)}.portrait-avatar.large{width:90px;height:90px;border-radius:22px}.lobby-invitation{margin:auto 0;padding:35px 0 25px}.lobby-invitation h2{font:42px/1.18 Georgia,serif;margin:16px 0 28px;color:#f1f0ea}.play-chess{min-height:74px;font-size:21px;font-weight:800;letter-spacing:2px;padding:20px 25px;background:linear-gradient(120deg,#f0d49e,#c59a56);box-shadow:0 12px 45px #a77c3422}.primary:hover{filter:brightness(1.08)}.home-shortcuts{grid-template-columns:1fr 1fr;gap:12px}.home-shortcuts a{display:grid;grid-template-columns:28px 1fr;gap:8px;padding:16px;background:#142133;border:1px solid #304059;border-radius:10px;color:#e5eaf1}.home-shortcuts a>span{grid-row:1/3;color:var(--gold);font-size:25px}.home-shortcuts small{font-size:12px;line-height:1.6;color:var(--muted)}.home-shortcuts strong{font-size:14px}.training-links{display:flex;justify-content:space-between;margin-top:16px}.featured-worlds{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.world-card{min-height:230px}.world-card strong{font-size:26px}.world-card small{font-size:12px;letter-spacing:1px}.world-card span{font-size:14px}.world-card img{height:180px;width:95px;right:15px;top:15px;opacity:.9}.section-heading a{font-size:14px}.section-heading h2{font-size:25px}.world-selector{margin-top:18px}.home-stories{margin-top:10px}.story-card{min-height:180px;gap:14px;background-size:cover!important}.story-card h3{line-height:1.5}.story-card p{font-size:14px}.story-card a{margin-top:auto}.replay-score{font:30px Georgia,serif;color:#ead1a0}.empty-panel p{margin:0 0 14px}.empty-panel{font-size:16px}.owner-tag{font-size:12px}.arena-caption{font-size:14px}.arena-caption button{font-size:14px}
/* Setup is the same flow from lobby, world cards, profiles and replays. */
.play-dialog{max-width:960px;width:calc(100% - 40px);max-height:92svh;padding:30px;background:radial-gradient(ellipse at 0 0,#243d57,#101a29 75%);overflow:auto}.play-dialog h2{font:34px Georgia,serif;margin:14px 0 24px}.segmented{display:flex;gap:7px;padding:5px;background:#09132199;border:1px solid #34445b;border-radius:9px;width:fit-content;max-width:100%;margin-bottom:25px}.segmented button{background:none;color:#a6b6cb;border:0;border-radius:6px;padding:10px 20px;font-size:14px}.segmented button.active{background:#2d3b4e;color:#f0d298}.segmented button:disabled{opacity:.55}.mode-cards{display:grid;grid-template-columns:1fr 1fr;gap:16px}.mode-cards button{display:grid;grid-template-columns:55px 1fr;gap:9px 15px;text-align:left;align-items:center;padding:27px 22px;background:linear-gradient(135deg,#21344a,#152033);border:1px solid #405370;border-radius:12px;color:#eaf0f6;min-height:135px}.mode-cards button:hover{border-color:var(--gold);background:#283b50}.mode-cards span{grid-row:1/3;font-size:34px;color:var(--gold)}.mode-cards strong{font-size:19px}.mode-cards small{font-size:14px;color:var(--muted)}.battle-layout{display:grid;grid-template-columns:minmax(260px,1.2fr) minmax(230px,1fr);gap:28px}.battle-scene{padding:20px;display:flex;flex-direction:column;justify-content:center;gap:22px;align-items:center}.battle-scene .preview-board{width:100%;max-width:380px}.battle-scene strong{font:24px Georgia,serif;color:#efdab0}.battle-choices{display:grid;gap:7px}.battle-choices button{border:1px solid #384b65;background:#132236;color:#e6edf5;text-align:left;border-radius:7px;padding:10px 13px;font-size:15px}.battle-choices button small{display:block;font-size:12px;color:#a6b7cc;margin-top:3px}.battle-choices button.active{border-color:var(--gold);background:#353427}.battle-choices button:disabled{opacity:.35}.battle-options label{margin-top:14px}.battle-options select{padding:9px 11px}.battle-layout~.world-chips{margin:20px 0}.error-text{color:#ffb7a1;font-size:14px;min-height:10px}.quick-challenge{display:block;width:100%;text-align:left;border:1px solid #36546c;background:#18283b;color:#e7d0a6;padding:13px;border-radius:6px;margin:7px 0}#quickList{font-size:14px;color:var(--muted)}#quickGames{border-top:1px solid #344357;padding:0 0 10px;margin-top:25px}#setupBack{padding-left:0;padding-top:0}
/* Board remains the dominant playing surface. */
body[data-page="play"] .page-heading{display:none}.game-bar{max-width:1120px;margin:14px auto 12px;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--gold);gap:12px}.workspace{justify-content:center}.game-started .workspace{grid-template-columns:minmax(350px,min(74svh,740px)) minmax(260px,310px);gap:26px}.game-started .left-panel{display:none}.game-started #lobby{display:none}.game-started .right-panel{display:block;grid-column:auto}.game-started .board-column{padding:12px;min-width:0}.board-column{min-width:0}#board,.preview-board{position:relative}.motion-piece{position:absolute;pointer-events:none;z-index:10}.motion-piece img{position:absolute;width:94%;height:94%;inset:0;object-fit:contain}.motion-piece img.royal{inset:auto;max-width:none;max-height:none;object-fit:fill}.player-avatar img{width:85%;height:100%;object-fit:contain}.player-info strong{font-size:16px}.player-info span{font-size:12px}.board-tools span{font-size:12px}.board-message{font-size:13px}.status-card h2{font-size:24px}.status-card>p{font-size:14px}.board-frame{padding:7px}.notation #moves{height:235px}.board-tools button{min-height:38px}.game-actions button{font-size:14px}.game-started .material{margin-bottom:20px}.board-column #focusMode{font-size:12px;padding:7px;margin-top:4px}.arena-match-label{font-size:12px}.fx-check{animation:custom-check .75s ease-out}@keyframes custom-check{0%,50%{box-shadow:inset 0 0 20px var(--fx-color)}100%{box-shadow:inset 0 0 0 transparent}}[data-fx="rune"].fx-capture::after{border-radius:0;rotate:45deg}[data-fx="ember"].fx-capture::after{border-style:dashed;box-shadow:0 0 8px #ff754c}[data-fx="pulse"].fx-capture::after{box-shadow:0 0 6px #da83ff}.focus-mode .game-bar{display:none}
/* Identity, home arena and collection. */
.player-profile{max-width:none;padding:0;border:0;background:none}.profile-hero{display:grid;grid-template-columns:1.15fr 1fr;gap:40px;padding:35px}.profile-presentation h2{font-size:33px;margin:10px 0 22px}.profile-presentation .preview-board{max-width:470px;margin:0}.profile-identity{padding:16px 10px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.profile-identity h2{font-size:34px;margin:14px 0 0}.profile-identity p{font-size:15px}.profile-identity .primary,.profile-identity .full{max-width:none;width:100%;margin:12px 0 0}.profile-identity .quiet{text-align:center}.profile-stats{display:grid;grid-template-columns:repeat(4,1fr);width:100%;padding:24px 0 10px;gap:12px}.profile-stats strong{display:block;font-size:29px;color:#e7cea1;font-weight:500}.profile-stats span{display:block;font-size:12px;color:var(--muted);margin-top:7px}.player-profile>.section-heading,.player-profile .section-heading{margin-top:30px}.collection-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.collectible{padding:0 0 17px;border:1px solid #31415a;border-radius:11px;background:#121e2f;overflow:hidden;display:flex;flex-direction:column}.collectible.equipped{border-color:#b89a63}.collectible-preview{height:210px;display:flex;justify-content:center;align-items:center;gap:12px;background:radial-gradient(ellipse at 50% 100%,#27435a,#0d1726);overflow:hidden}.collectible-preview img{height:175px;max-width:35%;object-fit:contain;filter:drop-shadow(0 6px 4px #0008)}.collectible-preview.classic img,.collectible-preview.neon img{height:110px}.collectible-preview.neon img{filter:drop-shadow(0 0 6px #67ebff)}.collectible .rarity{margin:17px 17px 8px;font-size:11px;color:#a7c6c3;text-transform:uppercase;letter-spacing:1px}.collectible h3{margin:0 17px 18px;font-size:17px;line-height:1.5}.collectible .secondary{margin:auto 17px 0;min-height:43px}.collectible.equipped .secondary{color:#e5cb94;opacity:1;background:#40352266}.board-swatch{margin:16px 16px 0;height:auto;aspect-ratio:1;border:5px solid #253141}.effect-symbol{font-size:120px;color:var(--fx-color);text-shadow:0 0 28px var(--fx-color);font-family:Georgia,serif;line-height:1}.effect-symbol.ember{rotate:25deg}.effect-symbol.rune{rotate:45deg}.effect-symbol.none{color:#a5b4c7;text-shadow:none}.collection-note{border-top:1px solid #30415a;margin-top:35px;padding-top:25px;color:var(--muted);font-size:14px;line-height:1.7}.rarity{color:#d0af79;font-size:12px;letter-spacing:1.4px}.world-editor{grid-template-columns:minmax(235px,.75fr) minmax(400px,1.8fr)}.editor-preview{grid-template-columns:minmax(240px,1.5fr) minmax(160px,1fr);align-items:start;gap:22px;padding:25px}.editor-preview .preview-board{position:sticky;top:25px;width:100%;margin-top:12px}.editor-options label{font-size:14px}.editor-options select{font-size:14px}.avatar-picker{display:flex;gap:7px;flex-wrap:wrap;margin:20px 0}.avatar-option{width:42px;height:48px;background:#1a2b3c;border:1px solid #354e69;border-radius:6px;padding:3px}.avatar-option img{width:100%;height:100%;object-fit:contain}.avatar-option.active{border-color:var(--gold);background:#3e3629}.piece-sets{grid-template-columns:repeat(3,1fr)}.board-themes{grid-template-columns:repeat(5,1fr)}.board-themes .collectible h3{font-size:14px}.world-editor .primary{font-size:15px}
/* Replay is both a viewer and an invitation back into the game. */
.replay-layout{grid-template-columns:minmax(350px,min(77svh,740px)) minmax(275px,340px);gap:32px}.replay-stage{padding:23px}.replay-stage>.preview-board{max-width:610px}.replay-sidebar{padding-top:10px}.replay-sidebar h2{font-size:32px}.replay-sidebar .muted{font-size:16px}.replay-sidebar .full{display:block;text-align:center}.replay-timeline{display:flex;flex-wrap:wrap;gap:4px;max-height:130px;overflow:auto;margin:16px 0 0;padding:3px}.replay-timeline button{padding:8px 10px;color:#adbed1;border:1px solid transparent;border-radius:5px;background:#102238;font-size:14px}.replay-timeline button.event{border-bottom-color:#968059}.replay-timeline button.active{color:#f2d091;border-color:var(--gold);background:#3c3529}.replay-transport #replayAuto{min-width:100px}.replay-step>span{font-size:14px}.moments{max-height:300px}.moments button{font-size:14px}.replay-layout.portrait .replay-stage{min-height:0;aspect-ratio:9/16}.share-dialog{max-width:900px;width:calc(100% - 32px);max-height:92svh;overflow:auto}.share-dialog h2{font:29px/1.3 Georgia,serif}.social-card{padding:24px;display:grid;grid-template-columns:1fr 1.05fr;align-items:center;gap:20px;aspect-ratio:1200/630}.social-card h3{font:25px/1.4 Georgia,serif;white-space:pre-line;overflow-wrap:anywhere;margin:20px 0}.social-card strong{font:35px Georgia,serif;color:var(--gold)}.social-card p{font-size:14px;color:var(--gold)}.social-card small{font-size:12px;color:var(--muted)}.social-card .preview-board{border-width:3px}.share-actions{display:flex;gap:10px;margin-top:16px}.share-actions button{flex:1;width:auto;font-size:14px}.share-dialog input{font-size:14px}#toast{z-index:40}
@media(min-width:1600px){.game-started .workspace{grid-template-columns:minmax(400px,min(74svh,820px)) 320px;gap:30px}}@media(max-width:1100px){.header{gap:18px;padding:0 25px}.header nav{gap:19px}.brand>div{font-size:15px}main{padding:0 22px}.world-home{grid-template-columns:1.2fr 1fr;gap:15px}.home-arena{padding:22px}.home-actions{padding-left:8px}.lobby-invitation h2{font-size:35px}.home-shortcuts{grid-template-columns:1fr}.featured-worlds,.collection-grid{grid-template-columns:repeat(2,1fr)}.featured-worlds .world-card{min-height:200px}.game-started .workspace{grid-template-columns:minmax(340px,1fr) 270px;gap:18px}.profile-hero{gap:25px;padding:25px}.profile-identity{padding:0}.world-editor{grid-template-columns:1fr 2fr;gap:16px}.editor-preview{grid-template-columns:1fr;padding:22px}.editor-preview .preview-board{max-width:430px;margin:auto;position:static}.editor-options{display:block}.board-themes{grid-template-columns:repeat(3,1fr)}.replay-layout{grid-template-columns:minmax(340px,1fr) 280px;gap:22px}.replay-stage{padding:16px}}
@media(max-width:750px){.header{padding:12px 16px 0;gap:10px;min-height:0;flex-wrap:wrap}.header nav{flex:auto;order:3;gap:0;width:100%;height:auto;overflow:visible;justify-content:space-between}.header nav a{font-size:13px;padding:13px 7px;line-height:1.4}.brand>div{font-size:16px}.brand>span{font-size:33px}.user-menu{margin-left:auto}.user-menu summary{width:38px;height:38px}.page-heading{padding:0 16px;margin:22px auto 19px}.page-heading h1{font-size:25px}.page-heading .eyebrow{font-size:10px}main{padding:0 12px}.world-home{display:grid;grid-template-columns:1fr;gap:18px}.home-actions{grid-row:1;padding:0}.lobby-player{gap:10px}.portrait-avatar{width:48px;height:48px;border-radius:13px}.lobby-player strong{font-size:16px}.lobby-player small{font-size:12px}.lobby-invitation{padding:22px 0 0}.lobby-invitation h2{display:none}.lobby-invitation .eyebrow{display:none}.play-chess{min-height:62px;font-size:19px}.lobby-invitation .subtle{margin:11px 0 0}.home-shortcuts{grid-template-columns:1fr 1fr;margin-top:18px}.home-shortcuts a{padding:12px;gap:4px;grid-template-columns:24px 1fr}.home-shortcuts a small{font-size:12px}.training-links{margin-top:7px}.home-arena{padding:20px 16px 10px}.world-hero-copy h2{font-size:29px}.world-hero-copy p{font-size:13px}.home-board-stage{max-width:390px;margin:20px auto;transform:none}.world-overline{gap:8px}.world-overline .eyebrow,.owner-tag{font-size:10px}.arena-caption,.arena-caption button{font-size:12px}.section-heading{gap:12px;align-items:flex-start}.section-heading h2{font-size:21px}.section-heading a{font-size:13px;flex-shrink:0}.featured-worlds{gap:10px}.featured-worlds .world-card{min-height:195px;padding:15px}.world-card strong{font-size:23px}.world-card span{font-size:12px}.world-card small{font-size:10px}.world-card img{right:5px;top:10px;height:155px;width:77px}.collection-grid{gap:12px}.collectible-preview{height:170px}.collectible-preview img{height:148px}.collectible .rarity{font-size:10px;margin:12px 12px 7px}.collectible h3{font-size:15px;margin:0 12px 14px}.collectible .secondary{margin:auto 12px 0}.segmented{width:100%;gap:2px}.segmented button{font-size:13px;padding:10px 12px;flex:1}.play-dialog{width:calc(100% - 20px);padding:20px 16px;max-height:94svh}.play-dialog h2{font-size:27px;margin-top:13px}.mode-cards{gap:10px}.mode-cards button{display:flex;flex-direction:column;align-items:flex-start;padding:16px 13px;min-height:160px;gap:10px}.mode-cards span{font-size:29px}.mode-cards strong{font-size:16px;line-height:1.4}.mode-cards small{font-size:12px;line-height:1.5}.battle-layout{display:flex;flex-direction:column;gap:15px}.battle-scene{padding:15px;gap:14px}.battle-scene .preview-board{max-width:260px}.battle-scene strong{font-size:23px}.battle-choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.battle-choices button{font-size:13px;text-align:center;padding:10px 5px}.battle-choices button small{font-size:10px;line-height:1.5}.battle-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}.battle-choices,.battle-options>div{grid-column:1/-1}.battle-options label{margin:0;align-self:center}.battle-options select{font-size:15px}.world-chip{font-size:12px}.game-bar{margin:9px 0;gap:5px}.game-bar>span{display:none}.game-bar button{font-size:12px}.game-started .workspace{display:flex;gap:15px}.game-started .board-column{padding:7px}.board-frame{padding:4px}.player-strip{margin-bottom:9px;gap:9px;height:40px}.player-strip.bottom{margin-top:11px;margin-bottom:9px}.player-avatar{width:34px;height:38px}.player-info strong{font-size:14px}.player-info span{font-size:11px}.clock{font-size:22px;min-width:85px;padding:6px 9px}.board-tools span{font-size:11px}.board-message{font-size:12px}.board-column #focusMode{display:none}.game-started .right-panel{display:flex;flex-direction:column;width:100%;gap:12px}.game-started .notation{order:1;margin:0}.game-started .game-actions{order:0;margin:0}.game-started .status-card{order:-1;padding:17px}.status-card h2{font-size:22px}.status-card>p{font-size:14px}.game-started #moves{height:160px}.game-started .export-actions,.game-started .material,.game-started #rematch{order:2;margin:0}.game-started .finished-replay{order:0;margin:0}.workspace>.left-panel{width:100%}.profile-hero{grid-template-columns:1fr;padding:20px 17px;gap:25px}.profile-presentation h2{font-size:28px}.profile-presentation .preview-board{max-width:420px}.profile-identity{position:relative}.profile-identity .large{width:62px;height:62px}.profile-identity h2{font-size:29px}.profile-stats{gap:8px;padding-top:20px}.profile-stats strong{font-size:26px}.profile-stats span{font-size:11px}.world-editor{display:flex;flex-direction:column}.world-editor>section:first-child{order:1}.world-editor .editor-preview{order:0}.editor-options{display:grid;grid-template-columns:1fr 1fr;gap:9px;align-items:center}.editor-options label{margin:0;font-size:13px}.editor-options select{font-size:14px}.editor-options>#eventEffectFields,.editor-options>button{grid-column:1/-1}.editor-options>#eventEffectFields{display:grid;grid-template-columns:1fr 1fr;gap:9px;align-items:center}.piece-sets{grid-template-columns:1fr 1fr}.piece-sets .collectible:first-child{grid-column:1/-1}.board-themes{grid-template-columns:repeat(2,1fr)}.replay-layout,.replay-layout.portrait{display:flex;flex-direction:column;gap:15px}.replay-stage{padding:16px 12px}.replay-stage h2{font-size:22px;margin:15px 0 19px}.replay-transport{gap:5px}.replay-transport button{padding:10px 14px;min-width:38px}.replay-transport #replayAuto{min-width:95px}.replay-timeline{max-height:105px}.replay-sidebar{padding:10px 3px}.replay-sidebar h2{font-size:29px}.replay-layout.portrait .replay-stage{min-height:0;max-width:430px;width:100%;margin:auto}.share-dialog{padding:20px 15px}.share-dialog h2{font-size:25px}.social-card{padding:12px;gap:10px}.social-card h3{font-size:16px;margin:10px 0}.social-card strong{font-size:24px}.social-card .eyebrow{font-size:9px}.social-card p{font-size:10px;margin:8px 0}.social-card small{display:none}.social-card .preview-board{border-width:2px}.share-actions{flex-wrap:wrap}.share-actions button{min-width:40%}.share-dialog .link-row{flex-wrap:wrap}footer{font-size:12px}.focus-mode main{padding-top:8px}}
@media(max-width:360px){.header nav a{padding:13px 4px;font-size:12px}.home-shortcuts a{grid-template-columns:1fr}.home-shortcuts a>span{display:none}.battle-choices button{font-size:12px}.world-card strong{font-size:20px}.replay-transport button{padding:9px 10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
.player-avatar{overflow:hidden;flex-shrink:0}.player-avatar img{width:31px;height:38px;min-height:0}
@media(min-width:751px){.game-started .workspace{grid-template-columns:minmax(350px,min(calc(100svh - 310px),800px)) minmax(260px,310px)}.game-started .player-strip{margin-bottom:10px;height:42px}.game-started .player-strip.bottom{margin-top:10px;margin-bottom:8px}.game-started .arena-match-label{display:none}.game-started .board-message{margin-top:4px}.game-started #focusMode{padding:5px;margin-top:0}}
body[data-page="play"] .left-panel{display:none}
@media(min-width:751px){body[data-page="play"] .workspace{grid-template-columns:minmax(350px,min(calc(100svh - 310px),800px)) minmax(260px,310px)}body[data-page="play"] .right-panel{display:block;grid-column:auto}}
/* Shared competition identity */
.competition-settings{grid-column:1/-1;display:grid;gap:14px;margin:16px 0;padding:18px;border:1px solid #344c68;border-radius:16px;background:linear-gradient(140deg,#17263be6,#101822)}
.mode-choice{display:flex;gap:8px;flex-wrap:wrap}.mode-choice label{display:flex!important;align-items:center;gap:7px;flex:1;padding:11px;border:1px solid #3b4c64;border-radius:10px;font-size:14px;cursor:pointer}.mode-choice label:has(input:checked){background:#294466;border-color:#719cca;color:#fff}.mode-choice input,.check-label input{width:auto!important;margin:0;accent-color:var(--gold)}
.rating-range{display:grid;grid-template-columns:1fr 1fr;gap:12px}.rating-range label{display:grid;gap:7px;min-width:0}.rating-range input{min-width:0;width:100%}.competition-settings .subtle{margin:0;font-size:12px;line-height:1.6}
.control-badge{--pool-color:#a8c9ee;display:inline-flex;width:fit-content;max-width:100%;align-items:center;gap:8px;padding:9px 14px;border:1px solid color-mix(in srgb,var(--pool-color),transparent 65%);border-radius:999px;color:var(--pool-color);background:color-mix(in srgb,var(--pool-color),transparent 93%);font-size:13px;line-height:1.5;font-weight:650;letter-spacing:.02em}
[data-pool=bullet]{--pool-color:#cfb7ff}[data-pool=blitz]{--pool-color:#f3c87e}[data-pool=rapid]{--pool-color:#8cd9d5}[data-pool=classical]{--pool-color:#abc9ff}
.rating-pools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:24px 0}.rating-pool{display:grid;grid-template-columns:auto 1fr;gap:7px 14px;padding:22px 18px;align-items:center;border:1px solid #344355;border-radius:16px;background:linear-gradient(130deg,#202d42,#111925)}.rating-pool .pool-icon{grid-row:span 2;display:grid;place-items:center;width:46px;height:52px;color:var(--pool-color);font-size:32px;background:#ffffff08;border:1px solid color-mix(in srgb,var(--pool-color),transparent 65%);border-radius:16px 16px 22px 22px;filter:drop-shadow(0 3px 8px #0005)}.rating-pool strong{white-space:nowrap;font-size:26px;color:#f3f5f8}.rating-pool>span:not(.pool-icon){font-size:14px;color:var(--pool-color)}.rating-pool small{grid-column:1/-1;font-size:11px;color:#a2b0c1}
.game-reports{display:grid;gap:7px;margin-top:12px}.game-reports .quiet{font-size:12px;text-align:left;padding:6px}.game-reports p{margin:0}.report-record{padding:16px 0;border-bottom:1px solid #354154;overflow-wrap:anywhere}.report-record small{display:block;margin-top:8px;color:#a4b7cc}
#reportForm,.cup-form{display:grid;gap:16px}#reportForm label,.cup-form label{display:grid;gap:8px}#reportForm textarea,.cup-form textarea{box-sizing:border-box;width:100%;resize:vertical;padding:12px;background:#101a27;border:1px solid #35465e;border-radius:8px;color:#e5edf5;font:inherit}.form-error,#cupCreateError,#reportState{color:#ffb5ad}
.cup-dialog{width:min(600px,calc(100vw - 24px));max-height:90dvh;overflow-y:auto}.cup-dialog .check-label{display:flex!important;align-items:center;gap:10px!important}.cup-dialog [hidden]{display:none!important}.cup-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:18px}.cup-list .tournament-card{min-width:0}.cup-announcement{white-space:pre-wrap;overflow-wrap:anywhere;padding:18px 22px;background:#182c42;border-left:3px solid #86bce9;border-radius:0 12px 12px 0}.cup-schedule{color:var(--gold);font-variant-numeric:tabular-nums}.withdrawn-player{color:#8493a7}.withdrawn-player td small{display:block;margin-top:6px;font-size:11px;color:#d6a49b}.cup-log{padding:18px;border:1px solid #344255;border-radius:12px;color:#a8bbd2;font-size:13px}.cup-log summary{cursor:pointer;color:#d9e4ef}.cup-log p{overflow-wrap:anywhere}.cup-rounds .quiet{display:block;margin-top:10px}
@media(max-width:800px){.rating-pools{grid-template-columns:repeat(2,1fr)}.rating-pool{padding:16px 12px;gap:7px 10px}}@media(max-width:420px){.rating-pool .pool-icon{width:35px;height:43px;font-size:26px}.rating-pool strong{font-size:23px}.mode-choice label{font-size:12px;padding:9px 6px}.competition-settings{padding:12px}.cup-dialog{padding:24px 18px}}
.notification-bell{position:relative;display:grid;place-items:center;flex:none;width:42px;height:42px;border:1px solid #46566c;border-radius:50%;background:#172438;color:#dec18d;margin-left:auto}.notification-count{position:absolute;right:-7px;top:-6px;min-width:20px;height:20px;display:grid;place-items:center;padding:0 4px;border-radius:12px;background:#e1bb74;color:#151d2b;font-size:11px;font-weight:800;border:2px solid #0c111b}.notification-bell+.user-menu{margin-left:0}.notification-dialog{width:min(580px,94vw);max-height:88dvh;overflow-y:auto;padding:24px}.notification-actions{display:flex;justify-content:space-between;gap:10px}.notification-list{display:grid;gap:9px;margin-top:12px;max-height:50dvh;overflow-y:auto}.notification-item{display:flex;gap:14px;width:100%;text-align:left;padding:15px;border:1px solid #304057;border-radius:12px;background:#121e2f;color:#edf2f8}.notification-item.unread{border-color:#786844;background:linear-gradient(115deg,#2b2c2d,#17243a)}.notification-symbol{display:grid;place-items:center;width:34px;height:38px;flex:none;color:var(--gold);font-size:27px}.notification-copy{display:grid;gap:6px;min-width:0;overflow-wrap:anywhere}.notification-copy strong{font-size:15px;font-weight:650}.notification-copy>span{font-size:14px;color:#b0bed0;line-height:1.5}.notification-copy small{font-size:12px;color:#a99d82}.notification-settings{border-top:1px solid #344355;margin-top:20px;padding-top:15px}.notification-settings summary{cursor:pointer;color:#d7c39f;font-size:14px}.notification-settings label{display:flex;gap:10px;align-items:center}.notification-settings input{width:auto;accent-color:var(--gold)}.notification-live{position:fixed;bottom:22px;right:22px;z-index:50;max-width:min(480px,calc(100vw - 32px));display:flex;border:1px solid #aa925e;background:#17263cf5;box-shadow:0 12px 45px #0009;border-radius:14px;overflow:hidden}.notification-open{border:0;background:none;color:#f4dfb5;text-align:left;padding:18px;line-height:1.5;font-size:14px}.notification-dismiss{background:none;border:0;border-left:1px solid #41516a;color:#b7c4d8;font-size:24px;padding:12px}.scheduler-health{padding:12px 16px;border:1px solid #35465b;border-radius:10px;background:#111c2a}.scheduler-health[data-state=running]{color:#99cdbb}.scheduler-health[data-state=delayed]{color:#e6c087}@media(max-width:750px){.notification-bell{width:37px;height:37px}.notification-dialog{padding:18px}.notification-item{padding:12px;gap:9px}.notification-live{right:16px;bottom:16px}.header{column-gap:12px}}

/* Keep the account dropdown above tournament cards and every page surface. */
.header{position:relative;z-index:60}
.presence-badge{flex:none;white-space:nowrap;padding:8px 11px;border:1px solid #405064;border-radius:9px;background:#162132;color:#d9e5f1;font-size:14px;line-height:1.4;font-variant-numeric:tabular-nums}
@media(max-width:750px){.presence-badge{order:2;width:100%;text-align:center;margin-top:3px}.header nav{order:3}}

/* Tactile move transport aligned with the board’s lower edge on desktop. */
.game-started .right-panel{position:relative}
.game-started .history-controls{position:absolute;left:0;right:0;top:var(--history-controls-top,0px);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:0;padding:10px;border:1px solid #40536b;border-radius:15px;background:linear-gradient(180deg,#1a293b,#101a28);box-shadow:inset 0 1px 0 #ffffff12,0 12px 28px #0004}
.game-started .history-controls button{display:grid;place-items:center;width:100%;min-width:0;min-height:58px;padding:0;border:1px solid #516783;border-radius:11px;background:linear-gradient(180deg,#405873 0%,#293e57 46%,#1b2d43 100%);color:#eff6ff;box-shadow:inset 0 1px 0 #ffffff45,inset 0 -2px 0 #0b1521,0 5px 0 #08111b,0 8px 13px #0006;font-size:24px;line-height:1;transition:transform .12s ease,box-shadow .12s ease,filter .12s ease,border-color .12s ease}
.game-started .history-controls button svg{width:25px;height:25px;fill:currentColor;stroke:currentColor;stroke-width:1.2;stroke-linejoin:round}
.game-started .history-controls button:hover:not(:disabled){transform:translateY(-2px);border-color:#b69a69;filter:brightness(1.12);box-shadow:inset 0 1px 0 #ffffff55,0 7px 0 #08111b,0 12px 18px #0007}
.game-started .history-controls button:active:not(:disabled){transform:translateY(3px);filter:brightness(.98);box-shadow:inset 0 2px 5px #07101b99,0 1px 0 #08111b,0 3px 6px #0005}
.game-started .history-controls button:nth-child(3){border-color:#b89a62;background:linear-gradient(180deg,#f2d69e 0%,#d9b570 50%,#a98143 100%);color:#261d11;box-shadow:inset 0 1px 0 #fff8d9, inset 0 -2px 0 #8d6935,0 5px 0 #5b4323,0 8px 13px #0006}
.game-started .history-controls button:nth-child(3):hover:not(:disabled){border-color:#f3dca7;filter:brightness(1.08)}
.game-started .history-controls button:disabled{opacity:.42;filter:saturate(.45);box-shadow:inset 0 1px 0 #ffffff12,0 2px 0 #08111b}
.game-started .history-controls button:focus-visible{outline:3px solid #f2d69e;outline-offset:3px}
/* Classic-game PGNs open directly in analysis, outside .game-started. Keep the same
   large, high-contrast transport visible there, including on a small screen. */
body[data-page="analysis"] .history-controls{position:relative;inset:auto;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:12px 0 0;padding:10px;border:1px solid #60758f;border-radius:14px;background:linear-gradient(180deg,#1b2b40,#101b2b);box-shadow:inset 0 1px 0 #ffffff1c,0 8px 20px #0005}
body[data-page="analysis"] .history-controls button{display:grid;place-items:center;width:100%;min-width:0;min-height:58px;padding:0;border:1px solid #8da4bf;border-radius:10px;background:linear-gradient(180deg,#526c8a,#304760 52%,#22374f);color:#fff!important;box-shadow:inset 0 1px 0 #ffffff55,inset 0 -2px 0 #102033,0 4px 0 #091321,0 7px 12px #0006}
body[data-page="analysis"] .history-controls button svg{width:27px;height:27px;fill:currentColor;stroke:currentColor;stroke-width:1.35;stroke-linejoin:round}
body[data-page="analysis"] .history-controls button:nth-child(3){border-color:#eed39a;background:linear-gradient(180deg,#f2d69e,#d9b570 52%,#a98143);color:#261d11!important}
body[data-page="analysis"] .history-controls button:disabled{opacity:.72;filter:saturate(.6);color:#edf3fa!important}
body[data-page="analysis"] .history-controls button:hover:not(:disabled){filter:brightness(1.18);border-color:#f1d49a}
body[data-page="analysis"] .history-controls button:active:not(:disabled){transform:translateY(2px);box-shadow:inset 0 2px 5px #07101b99,0 1px 0 #08111b,0 3px 6px #0005}
.legend-analysis-return{max-width:1580px;margin:-12px auto 20px;padding:0 3.5%;display:flex;align-items:center;gap:12px}
.legend-analysis-return[hidden]{display:none}
.legend-analysis-return>span{flex:1;color:#c9d5e3;font-size:13px}
.legend-analysis-return button{min-height:46px;border-radius:9px;font-weight:650}
.legend-analysis-return #returnLegendArchive{border-color:#8197b1;color:#f4f7fb;background:linear-gradient(180deg,#2b4059,#1b2b3e);box-shadow:inset 0 1px 0 #ffffff22,0 3px 0 #091321}
.legend-analysis-return #returnLegendRoster{border:1px solid #526982;color:#e4edf7;background:#182638;padding:10px 14px}
.replay-transport{gap:10px;padding:10px;border:1px solid #40536b;border-radius:15px;background:linear-gradient(180deg,#1a293b,#101a28);box-shadow:inset 0 1px 0 #ffffff12,0 12px 28px #0004}
.replay-transport button{min-width:58px;min-height:58px;padding:0 15px;border:1px solid #516783;border-radius:11px;background:linear-gradient(180deg,#405873 0%,#293e57 46%,#1b2d43 100%);color:#eff6ff;box-shadow:inset 0 1px 0 #ffffff45,inset 0 -2px 0 #0b1521,0 5px 0 #08111b,0 8px 13px #0006;font-size:24px;line-height:1;transition:transform .12s ease,box-shadow .12s ease,filter .12s ease,border-color .12s ease}
.replay-transport button:hover:not(:disabled){transform:translateY(-2px);border-color:#b69a69;filter:brightness(1.12);box-shadow:inset 0 1px 0 #ffffff55,0 7px 0 #08111b,0 12px 18px #0007}
.replay-transport button:active:not(:disabled){transform:translateY(3px);filter:brightness(.98);box-shadow:inset 0 2px 5px #07101b99,0 1px 0 #08111b,0 3px 6px #0005}
.replay-transport button:disabled{opacity:.42;filter:saturate(.45);box-shadow:inset 0 1px 0 #ffffff12,0 2px 0 #08111b}
.replay-transport #replayAuto{min-width:132px;border-color:#b89a62;background:linear-gradient(180deg,#f2d69e 0%,#d9b570 50%,#a98143 100%);color:#261d11;box-shadow:inset 0 1px 0 #fff8d9,inset 0 -2px 0 #8d6935,0 5px 0 #5b4323,0 8px 13px #0006;font-weight:750}
@media(max-width:750px){.legend-analysis-return{padding:0 12px;margin:-8px auto 15px;display:grid;grid-template-columns:1fr 1fr;gap:8px}.legend-analysis-return>span{grid-column:1/-1;grid-row:1;font-size:12px}.legend-analysis-return button{min-height:48px;font-size:12px;padding:9px 8px}.game-started .right-panel{position:static}.game-started .history-controls{position:static;top:auto;order:2;gap:8px;margin-top:11px;padding:9px}.game-started .history-controls button{min-height:62px;border-radius:12px}.game-started .history-controls button svg{width:27px;height:27px}.replay-transport{gap:7px;padding:8px}.replay-transport button{min-width:50px;min-height:60px;padding:0 10px;border-radius:12px}.replay-transport #replayAuto{min-width:100px}}

.replay-flip{width:100%;min-height:48px;margin:4px 0 10px;border:1px solid #665b47;background:linear-gradient(180deg,#24384d,#18283b);color:#f2d394;font-weight:650}
.replay-flip[aria-pressed="true"],.broadcast-flip[aria-pressed="true"]{border-color:#dfbd79;background:linear-gradient(180deg,#5a4930,#30291f);color:#ffe5ae;box-shadow:inset 0 1px 0 #fff3c555,0 0 0 2px #dfbd7922}

.replay-stage>.preview-board{margin-bottom:0}
.replay-stage>.replay-transport{margin:8px 0 0;padding:7px}
.replay-stage>.replay-flip{display:block;width:min(100%,280px);margin:8px auto 0}
.replay-step{margin-top:8px}
.home-piece-picker{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:16px 0 5px}.home-piece-picker>span{margin-right:4px;color:#c4d5e2;font-size:13px}.home-piece-picker button{min-height:40px;padding:7px 12px;border:1px solid #68819a;border-radius:8px;background:#132638dc;color:#e6f3f4;font-size:13px}.home-piece-picker button.active{border-color:#9ae9ca;background:linear-gradient(110deg,#842c4d99,#164f4388);color:#f3fff9;box-shadow:inset 0 0 0 1px #adf2d355,0 0 15px #78dfbe28}.home-piece-picker #homePieceGems:not(.active){border-color:#a06485;background:linear-gradient(110deg,#59213988,#16443888);color:#ffdeec}.home-piece-picker button:hover{border-color:#b7ffe0}
@media(max-width:480px){.home-piece-picker{display:grid;grid-template-columns:1fr 1fr;gap:7px}.home-piece-picker>span{grid-column:1/-1}.home-piece-picker button{min-width:0;padding:8px 4px;font-size:12px}}
