/* play screen styles. Loaded after the shared stylesheets so rules here can override them. */

/* Focus rings are for keyboard users; after a mouse or touch press they read as a stray white box. */
html[data-input=pointer] #board .square:focus-visible,html[data-input=pointer] #board>button.square:focus-visible{outline:none!important;box-shadow:none!important}

/* Legal-move dots and capture rings stay inside their square. */
#board .square.target::after{content:'';position:absolute;left:50%;top:50%;width:28%;height:28%;transform:translate(-50%,-50%);border:0;border-radius:50%;background:rgba(14,32,26,.36);box-shadow:none;pointer-events:none;z-index:3;animation:target-in .14s ease-out}
#board .square.target:has(.piece)::after{left:5%;top:5%;width:90%;height:90%;transform:none;background:transparent;box-shadow:inset 0 0 0 5px rgba(14,32,26,.42);animation:capture-in .16s ease-out}
#board .square.target:hover{background-image:linear-gradient(rgba(255,226,120,.35),rgba(255,226,120,.35))}
@keyframes target-in{from{transform:translate(-50%,-50%) scale(.3);opacity:0}}
@keyframes capture-in{from{transform:scale(1.15);opacity:0}}

/* Check: the king's square glows red. */
#board .square.in-check{background-image:radial-gradient(circle,rgba(255,52,40,.95) 0%,rgba(232,30,24,.6) 38%,rgba(200,0,0,0) 72%)!important;animation:check-pulse 1.2s ease-in-out 2}
@keyframes check-pulse{50%{filter:brightness(1.25)}}

/* Move animation, captured-piece fade and the "can't move" shake. */
#board .piece.moving{position:relative;z-index:60;will-change:transform}
#board .capture-ghost{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;z-index:4;animation:ghost-out .28s ease-in forwards}
#board .capture-ghost img{width:86%;height:86%;object-fit:contain}
@keyframes ghost-out{to{opacity:0;transform:scale(.55) rotate(-10deg)}}
#board .square.shake .piece{animation:piece-shake .34s ease-in-out}
@keyframes piece-shake{20%{transform:translateX(-5px)}40%{transform:translateX(5px)}60%{transform:translateX(-3px)}80%{transform:translateX(3px)}}

/* Low time: the clock turns red, and pulses in the last ten seconds. */
#playView .playerbar .clock.low-time{background:#8a2119!important;color:#fff!important;border-color:#ff8f7d!important}
#playView .playerbar .clock.critical-time{animation:clock-pulse 1s ease-in-out infinite}
@keyframes clock-pulse{50%{box-shadow:0 0 0 4px rgba(255,120,100,.45);transform:scale(1.04)}}

/* Captured pieces sit beside the name, clear of the portrait. */
#playView .playerbar .player-position-info{grid-column:1;grid-row:2;display:flex;align-items:center;gap:6px;min-width:0;min-height:18px;padding-left:50px;margin-top:2px;overflow:hidden}
#playView .playerbar .capture-strip{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:1px;min-width:0}
#playView .playerbar .capture-caption{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
#playView .playerbar .capture-group{display:inline-flex;align-items:center;font-size:11px;color:#d9e6dc}
#playView .playerbar .capture-group img{width:18px;height:18px;object-fit:contain}
#playView .playerbar .material-balance{font-size:12px;font-weight:700;color:#ffe08a}
@media (max-width:700px){#playView .playerbar .player-position-info{padding-left:40px}#playView .playerbar .capture-group img{width:15px;height:15px}}

/* Messages over the board: "It's your opponent's turn", "Check!", "Your time is running low!" */
#play{position:relative}
.board-notice{position:absolute;left:50%;top:46%;z-index:80;max-width:min(82%,440px);padding:10px 18px;border-radius:999px;background:rgba(10,24,20,.93);border:1px solid rgba(232,196,108,.65);color:#fff6dd;font-weight:600;font-size:15px;line-height:1.3;text-align:center;box-shadow:0 10px 28px rgba(0,0,0,.4);opacity:0;transform:translate(-50%,-50%) scale(.94);transition:opacity .18s,transform .18s;pointer-events:none}
.board-notice.visible{opacity:1;transform:translate(-50%,-50%) scale(1)}

/* Confirmation popups. */
.toast-host{position:fixed;right:20px;bottom:20px;z-index:2147483000;display:flex;flex-direction:column;align-items:flex-end;gap:8px;pointer-events:none}
.toast{min-width:220px;max-width:min(380px,calc(100vw - 32px));padding:12px 16px 12px 40px;border-radius:10px;background:#12392f;border:1px solid #d7b45a;color:#fff6dd;font-weight:600;line-height:1.35;box-shadow:0 12px 30px rgba(0,0,0,.4);position:relative;animation:toast-in .22s ease-out;transition:opacity .25s,transform .25s}
.toast::before{content:'✓';position:absolute;left:14px;top:50%;transform:translateY(-50%);font-size:16px;color:#ffd970}
.toast-error{background:#4a1c18;border-color:#e0705f}.toast-error::before{content:'!';color:#ffb3a6}
.toast-info{border-color:#86a99c}.toast-info::before{content:'i';color:#cfe4dc}
.toast.leaving{opacity:0;transform:translateY(8px)}
@keyframes toast-in{from{opacity:0;transform:translateY(10px)}}
@media (max-width:700px){.toast-host{left:12px;right:12px;top:12px;bottom:auto;align-items:stretch}}

/* Promotion: a column of piece images over the promotion square, queen nearest. */
#promotion.promotion-picker{position:fixed;inset:auto;margin:0;padding:0;width:var(--square);max-width:none;border:0;border-radius:8px;background:#f5eedb;box-shadow:0 12px 32px rgba(0,0,0,.5);overflow:hidden;display:flex;flex-direction:column;animation:picker-in .14s ease-out}
#promotion.promotion-picker.opens-up{flex-direction:column-reverse}
#promotion.promotion-picker::backdrop{background:rgba(5,12,10,.28)}
#promotion.promotion-picker h2{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);margin:0}
#promotion.promotion-picker .promotion-options{display:flex;flex-direction:column;gap:0;margin:0}
#promotion.promotion-picker.opens-up .promotion-options{flex-direction:column-reverse}
#promotion.promotion-picker [data-promotion]{flex:0 0 var(--square);width:var(--square);height:var(--square);min-height:0;margin:0;padding:7%;border:0;border-radius:0;background:transparent;display:grid;place-items:center;cursor:pointer}
#promotion.promotion-picker [data-promotion=q]{order:1}#promotion.promotion-picker [data-promotion=n]{order:2}#promotion.promotion-picker [data-promotion=r]{order:3}#promotion.promotion-picker [data-promotion=b]{order:4}
#promotion.promotion-picker [data-promotion]:hover,#promotion.promotion-picker [data-promotion]:focus-visible{background:#e8c86a;outline:none}
#promotion.promotion-picker [data-promotion] img{width:100%;height:100%;object-fit:contain;pointer-events:none}
#promotion.promotion-picker [data-promotion-cancel]{flex:0 0 calc(var(--square)*.6);height:calc(var(--square)*.6);margin:0;border:0;border-radius:0;background:#ded3b5;color:#1d3a32;font-size:12px;font-weight:700;cursor:pointer}
@keyframes picker-in{from{opacity:0;transform:scale(.92)}}

/* Restart asks "Are you sure?" on the first click. */
#restartGame.armed{background:#a8402b!important;color:#fff!important;border-color:#ffb199!important;animation:armed-pulse 1s ease-in-out infinite}
@keyframes armed-pulse{50%{box-shadow:0 0 0 4px rgba(255,150,120,.35)}}

/* Draw offers slide in instead of snapping open. */
dialog.draw-offer-dialog[open]{animation:dialog-pop .22s ease-out}
dialog.draw-offer-dialog::backdrop{background:rgba(5,12,10,.35);animation:fade-in .22s ease-out}
@keyframes dialog-pop{from{opacity:0;transform:translateY(12px) scale(.96)}}
@keyframes fade-in{from{opacity:0}}

/* The sidebar collapse arrow was a 20px button with a 24px line, which cut the glyph in half. */
#railToggle{width:28px!important;height:28px!important;min-width:28px!important;min-height:0!important;padding:0!important;display:grid!important;place-items:center!important;font-size:18px!important;line-height:1!important;border-radius:50%!important;overflow:visible!important}

/* Time-control labels sit right above their boxes. */
label[for=minutes],label[for=increment]{display:block;margin:14px 0 6px;line-height:1.3}
#minutes,#increment{margin-top:0}

/* Slimmer player bars on desktop: the board gets the space and the page stops scrolling by a few pixels. */
@media (min-width:1001px){
 #playView #play:has(>#board[data-presentation]){--board-size:min(calc(100dvh - 262px),calc(100vw - var(--rail-width) - 420px),720px)!important;grid-template-rows:76px var(--board-size) 76px!important;gap:16px 28px!important;padding:8px 16px 12px!important}
 #playView #play:has(>#board[data-presentation=gallant]){--board-size:min(calc(100dvh - 322px),calc(100vw - var(--rail-width) - 420px),720px)!important;grid-template-rows:76px 44px var(--board-size) 76px!important}
 #playView #play:has(>#board[data-presentation])>.playerbar{min-height:0!important;padding:8px 12px!important;row-gap:2px!important}
 #playView .playerbar .clock{grid-row:1!important;padding:6px 8px!important;font-size:clamp(20px,2vw,26px)!important}
 #playView .playerbar .turn-indicator{grid-column:2!important;grid-row:2!important;justify-self:center;font-size:11px!important;line-height:1.2}
}
/* Chat gets its own column on wide screens (see compact-layout.js). */
#play>.chatDock{display:none}
#reviewView .chatDock{display:none!important}
@media (min-width:1280px) and (min-height:620px){
 #playView #play[data-chat-dock=true]:has(>#board[data-presentation]){--board-size:min(calc(100dvh - 262px),calc(100vw - var(--rail-width) - 720px),720px)!important;grid-template-columns:var(--board-size) minmax(280px,340px) minmax(260px,340px)!important;max-width:none!important}
 #playView #play[data-chat-dock=true]:has(>#board[data-presentation=gallant]){--board-size:min(calc(100dvh - 322px),calc(100vw - var(--rail-width) - 720px),720px)!important}
 #playView #play[data-chat-dock=true]>.chatDock{display:flex;flex-direction:column;grid-column:3;grid-row:1/-1;min-height:0;min-width:0}
 .chatDock #social{display:flex;flex-direction:column;flex:1;min-height:0}
 .chatDock .social-controls{display:flex;flex-direction:column;flex:1;min-height:0;margin:0;padding:0;overflow:hidden;border-radius:12px}
 .chatDock .social-controls>h2,.chatDock .social-controls>p[role=status]:empty{display:none!important}
 #playView #play[data-chat-dock=true] [data-match-tab=chat]{display:none!important}
 .chatDock .social-controls>div{display:flex;flex-direction:column;flex:1;min-height:0}
 .chatDock .chat-panel{flex:1;min-height:0}
 .chatDock .chat-log{max-height:none}
 .chatDock .social-controls details:not(.chat-options){margin:0;padding:6px 12px 10px;font-size:13px}
}

/* Messenger-style chat: bubbles left and right, game events as centered notes. */
.social-controls .chat-panel{display:flex;flex-direction:column;gap:0;min-width:0;border-radius:10px;overflow:hidden;background:#0c241e;border:1px solid rgba(255,255,255,.07)}
.social-controls .chat-header{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#123a30;border-bottom:1px solid rgba(255,255,255,.08)}
.social-controls .chat-header strong{display:block;font-size:14px;line-height:1.2;color:#fff6dd}
.social-controls .chat-header span{display:block;font-size:11px;color:#9fbcb0}
.social-controls .chat-log{flex:1 1 auto;min-height:150px;max-height:18rem;overflow-y:auto;padding:12px 10px;display:flex;flex-direction:column;gap:6px;overflow-wrap:anywhere;background-image:radial-gradient(rgba(255,255,255,.035) 1px,transparent 1px);background-size:18px 18px}
.social-controls .chat-bubble{max-width:82%;padding:6px 10px 4px;border-radius:12px;line-height:1.35;font-size:14px;box-shadow:0 1px 1px rgba(0,0,0,.3);animation:bubble-in .16s ease-out}
.social-controls .chat-bubble.mine{align-self:flex-end;background:#1d6b51;color:#f1fff8;border-bottom-right-radius:3px}
.social-controls .chat-bubble.theirs{align-self:flex-start;background:#2a443d;color:#f0f5f2;border-bottom-left-radius:3px}
.social-controls .chat-text{display:block;white-space:pre-wrap}
.social-controls .chat-time{display:block;text-align:right;font-size:10px;opacity:.65;margin-top:1px}
.social-controls .chat-system{align-self:center;margin:2px 0;padding:3px 10px;border-radius:8px;background:rgba(232,196,108,.15);color:#f1dda4;font-size:12px;text-align:center;max-width:92%}
.social-controls .chat-empty{align-self:center;margin:auto;color:#9fbcb0;font-size:13px;text-align:center}
.social-controls .chat-compose{display:flex;align-items:center;gap:8px;margin:0;padding:8px;background:#123a30;border-top:1px solid rgba(255,255,255,.08)}
.social-controls .chat-compose input{flex:1;min-width:0;margin:0;padding:9px 14px;border-radius:20px;border:1px solid #3d5e54;background:#0e2b24;color:#fff;font-size:14px}
.social-controls .chat-compose input:focus{outline:none;border-color:#d7b45a}
.social-controls .chat-send{flex:none;width:40px;height:40px;min-height:0;margin:0;padding:0;border-radius:50%;border:0;display:grid;place-items:center;background:#d7b45a;color:#13241f;font-size:16px;cursor:pointer}
.social-controls .chat-send:disabled{opacity:.5}
.social-controls .chat-options{padding:6px 12px 8px;font-size:13px;background:#0c241e}
.social-controls .chat-options summary{cursor:pointer;color:#c5d8cf}
.social-controls .chat-actions{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
@keyframes bubble-in{from{opacity:0;transform:translateY(4px)}}

/* Play for WGC. */
#wagerView{padding:16px}
.wgc-panel{max-width:1040px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start;color:#f3efe2}
.wgc-panel>.wgc-head,.wgc-panel>.wgc-notice,.wgc-panel>.wgc-closed,.wgc-panel>.wgc-signin,.wgc-panel>.wgc-rules{grid-column:1/-1}
.wgc-head h1{margin:0 0 4px;font-size:clamp(24px,3vw,34px)}
.wgc-intro{margin:0;color:#c9d8d0}
.wgc-card{background:rgba(12,36,30,.94);border:1px solid rgba(215,180,90,.35);border-radius:14px;padding:16px 18px;box-shadow:0 10px 28px rgba(0,0,0,.3)}
.wgc-card h2{margin:0 0 12px;font-size:18px}
.wgc-wallet{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px}
.wgc-wallet h2{flex:1 0 100%;margin-bottom:0;font-size:14px;color:#c9d8d0;font-weight:600}
.wgc-balance{margin:0;font-size:34px;font-weight:800;color:#ffd970;line-height:1.1}
.wgc-balance-unit{font-size:16px;color:#f3dfa6}
.wgc-refresh{margin-left:auto}
.wgc-choices{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 10px}
.wgc-choice-label{flex:0 0 100%;font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#9fbcb0}
.wgc-chip{min-height:36px;padding:6px 14px;border-radius:999px;border:1px solid #3d5e54;background:#123a30;color:#f3efe2;font-weight:700;cursor:pointer}
.wgc-chip[aria-pressed=true]{background:#d7b45a;border-color:#d7b45a;color:#13241f}
.wgc-summary{margin:6px 0 12px;font-weight:600}
.wgc-go{width:100%;min-height:46px;font-size:16px}
.wgc-go.armed,.wgc-accept.armed,.wgc-cancel.armed{background:#a8402b!important;color:#fff!important;border-color:#ffb199!important}
.wgc-rules{margin:12px 0 0;font-size:12px;line-height:1.45;color:#9fbcb0}
.wgc-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.wgc-item{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;background:#0f2f27;border:1px solid rgba(255,255,255,.06)}
.wgc-item-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.wgc-item-meta{font-size:13px;color:#c9d8d0}
.wgc-item.wgc-win{border-color:#4fbf8b}.wgc-item.wgc-win .wgc-item-meta{color:#8ff0c0}
.wgc-item.wgc-loss .wgc-item-meta{color:#f0a89b}
.wgc-item.wgc-error{border-color:#e0705f}.wgc-item.wgc-error .wgc-item-meta{color:#ffb3a6}
.wgc-item.wgc-live{border-color:#d7b45a}
.wgc-empty{margin:0;color:#9fbcb0}
.wgc-notice{margin:0;padding:10px 14px;border-radius:10px;background:#4a1c18;border:1px solid #e0705f}
.wgc-closed{padding:12px 16px;border-radius:10px;background:rgba(232,196,108,.12);border:1px solid rgba(232,196,108,.4)}
.wgc-signin p{margin:0 0 12px}
.wgc-signin-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:10px 22px;border-radius:10px;background:#d7b45a;color:#13241f!important;font-weight:800;text-decoration:none}
.wgc-signin-button::before{content:'◈';font-size:18px}
.wgc-welcome{margin:4px 0 14px;text-align:center}
.wgc-welcome .wgc-signin-button{width:100%;box-sizing:border-box}
.wgc-welcome p{margin:8px 0 0;font-size:13px;color:#c9d8d0}
.wgc-welcome .wgc-or{display:flex;align-items:center;gap:10px;margin-top:14px;color:#9fbcb0;font-size:12px;text-transform:uppercase;letter-spacing:.05em}
.wgc-welcome .wgc-or::before,.wgc-welcome .wgc-or::after{content:'';flex:1;height:1px;background:rgba(255,255,255,.14)}
.wgc-balance-chip[hidden]{display:none!important}

/* Sign-in errors are easy to miss as grey text under the button. */
.welcome-status.error{margin-top:8px;padding:8px 12px;border-radius:8px;background:rgba(160,48,36,.22);border:1px solid #e0705f;color:#ffd3c9!important;font-weight:600}

/* Phones: the top bar stays put while scrolling, the language picker no longer covers the logo,
   and the welcome card starts right under the bar instead of after a strip of background. */
@media (max-width:700px){
 body>header{position:sticky!important;top:0;z-index:60}
 body:not([data-authenticated=true])>header>nav{left:auto!important;right:12px!important;transform:none!important}
 body:not([data-authenticated=true]) #railToggle,body:not([data-authenticated=true])>header .brand{visibility:hidden}
 body:not([data-authenticated=true])>main{padding-top:0!important}
 body:not([data-authenticated=true]) #identity{margin-top:8px!important}
}
.wgc-connect{display:block;margin-top:8px;font-weight:700}
.wgc-balance-chip{display:inline-flex;align-items:center;min-height:36px;margin-right:8px;padding:6px 14px;border-radius:999px;background:#12392f;border:1px solid #d7b45a;color:#ffd970!important;font-weight:800;text-decoration:none;white-space:nowrap}
.wgc-balance-chip:hover{background:#18493c}
.wgc-balance-chip.wgc-balance-fixed{position:fixed;z-index:55;margin:0;height:36px;box-sizing:border-box;box-shadow:0 6px 18px rgba(0,0,0,.35)}
@media (max-width:760px){.wgc-panel{grid-template-columns:1fr}.wgc-balance-chip{padding:4px 10px;font-size:13px}}

/* The stake sits on the board's top edge during a WGC game. */
.board-stake{position:absolute;z-index:70;transform:translate(-50%,-50%);max-width:min(92%,520px);padding:5px 14px;border-radius:999px;background:#12392f;border:1px solid #d7b45a;color:#ffe08a;font-size:13px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 6px 18px rgba(0,0,0,.4);pointer-events:none}
.board-stake[data-kind=win]{border-color:#4fbf8b;color:#9cf5c8}
.board-stake[data-kind=loss]{border-color:#e0705f;color:#ffb3a6}
.board-stake[data-kind=error]{border-color:#e0705f;color:#ffb3a6}

/* Payout line on the result screen. */
#resultDialog .rs-wager{margin:8px 16px 0;padding:9px 12px;border-radius:10px;background:#12392f!important;border:1px solid #d7b45a;color:#ffe08a!important;font-size:15px;font-weight:800;text-align:center;opacity:1!important}
#resultDialog .rs-wager[data-kind=win]{border-color:#4fbf8b;color:#b8ffd8!important}
#resultDialog .rs-wager[data-kind=loss]{background:#3b1714!important;border-color:#e0705f;color:#ffc4b8!important}

@media (prefers-reduced-motion:reduce) and (scripting:none){.social-controls .chat-bubble,#board .square.target::after,#board .square.in-check,#board .capture-ghost,#board .square.shake .piece,#playView .playerbar .clock.critical-time,.toast,#promotion.promotion-picker,#restartGame.armed,dialog.draw-offer-dialog[open]{animation:none!important}}

/* Computer games: the chat column says why it is empty, centred and padded instead of jammed in a corner. */
.social-ai-note{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:28px 22px;text-align:center;color:#c9d8d0}
.social-ai-note strong{font-size:16px;color:#f3e3b3}
.social-ai-note p{margin:0;font-size:14px;line-height:1.5;max-width:30ch}
.chatDock .social-ai-note{flex:1}

/* Play for WGC while WGC is switched off on the server: one centred "coming soon" page. */
#wagerContent:has(>.wgc-off){display:flex;justify-content:center;padding:12px 16px}
.wgc-off{width:min(100%,780px);box-sizing:border-box;display:flex;flex-direction:column;align-items:center;text-align:center;padding:28px 36px 26px;background:rgba(12,36,30,.95);border:1px solid rgba(215,180,90,.45);border-radius:18px;box-shadow:0 16px 40px rgba(0,0,0,.4);color:#e6eee9}
.wgc-off-mark{display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#f6dc8c,#c79a3a);color:#173025;font-size:28px;box-shadow:0 0 0 6px rgba(215,180,90,.15)}
.wgc-off-badge{margin-top:16px;padding:4px 12px;border-radius:999px;border:1px solid rgba(215,180,90,.6);color:#f3d68b;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.wgc-off h1{margin:12px 0 6px;font:700 34px/1.15 Georgia,'Times New Roman',serif;color:#fff3cf}
.wgc-off-intro{margin:0;max-width:52ch;color:#c9d8d0;line-height:1.5}
.wgc-steps{list-style:none;counter-reset:wgc-step;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;width:100%;margin:22px 0 18px;padding:0}
.wgc-steps li{counter-increment:wgc-step;display:flex;flex-direction:column;gap:6px;padding:16px 14px;text-align:left;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.1);border-radius:12px}
.wgc-steps li::before{content:counter(wgc-step);display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#d7b45a;color:#173025;font-weight:800;font-size:13px}
.wgc-steps strong{color:#fff0c7;font-size:15px}
.wgc-steps span{color:#b9cbc2;font-size:13px;line-height:1.45}
.wgc-off-note{margin:0 0 16px;color:#9fb8ad;font-size:13px}
.wgc-play-regular{display:inline-flex;align-items:center;min-height:44px;padding:10px 22px;border-radius:10px;background:#d7b45a;color:#13241f!important;font-weight:800;text-decoration:none}
.wgc-play-regular:hover{background:#e3c46c}
@media (max-width:700px){.wgc-off{padding:26px 18px}.wgc-off h1{font-size:27px}.wgc-steps{grid-template-columns:1fr}}
/* View headings get focus for screen readers when a page opens; no ring around them. */
.app-view :is(h1,h2)[tabindex="-1"]:focus{outline:none}



@media (min-width:1001px){
 /* Welcome: guest play sits beside the sign-in form, so the card fits on a laptop screen without scrolling. */
 #identity.welcome-panel:not([hidden]){max-width:980px!important;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);column-gap:36px;align-items:start}
 #identity.welcome-panel>*{grid-column:1;min-width:0}
 #identity.welcome-panel>.welcome-copy{grid-column:1/-1}
 #identity.welcome-panel>.welcome-guest{grid-column:2;grid-row:2/span 12;margin-top:12px!important;padding:0 0 0 36px!important;border-top:0;border-left:1px solid #65716e}

 /* Left rail: tighter items so it never scrolls, and the profile lives at the bottom above Language. */
 body>header #sectionNav{gap:4px!important;min-height:0;overflow-y:auto;scrollbar-width:none}
 body>header #sectionNav::-webkit-scrollbar{display:none}
 body>header #sectionNav a{min-height:46px!important;padding-top:6px!important;padding-bottom:6px!important}
 body>header>nav:not(#sectionNav){order:3}
 body>header>.wgc-balance-chip{order:1;justify-content:center;margin:8px 0 0!important}
 body>header>#accountMenu{order:2;position:relative!important;top:auto!important;right:auto!important;left:auto!important;width:100%!important;margin:8px 0!important;border-radius:10px;background:#102b32}
 body>header>#accountMenu>summary{width:100%;box-sizing:border-box;justify-content:flex-start;border-radius:10px!important;padding:5px 10px 5px 5px!important}
 body>header>#accountMenu>summary>span:last-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body>header>#accountMenu>div{left:calc(100% + 14px)!important;right:auto!important;top:auto!important;bottom:0!important}
 body[data-rail-expanded=false]>header>#accountMenu>summary{justify-content:center;padding:4px!important}
 body[data-rail-expanded=false]>header>#accountMenu>summary>span:last-child{display:none}
 body[data-rail-expanded=false]>header>.wgc-balance-chip{font-size:0;padding:6px}
 body[data-rail-expanded=false]>header>.wgc-balance-chip::before{content:'◈';font-size:16px}
}
@media (min-width:1001px) and (max-height:740px){body>header .brand-logo{max-height:104px;width:auto;margin:0 auto}}
@media (min-width:1001px) and (max-height:700px){body>header .brand-logo{max-height:84px}body>header #sectionNav{gap:2px!important}body>header #sectionNav a{min-height:40px!important;padding-top:4px!important;padding-bottom:4px!important}body>header>#accountMenu{margin:6px 0!important}}

/* ---- Round 3 layout fixes (2026-10-22) ---- */

/* Game screen on desktop: the top strip held the old floating profile chip; give that space to the
   board and leave clear room between the board frame (with its a-h / 1-8 labels) and both player cards. */
@media (min-width:1001px){
 body[data-screen=play] main{padding-top:14px!important}
 #playView #play:has(>#board[data-presentation]){--board-size:min(calc(100dvh - 262px),calc(100vw - var(--rail-width) - 420px),720px)!important;grid-template-rows:86px var(--board-size) 86px!important;gap:26px 28px!important}
 #playView #play:has(>#board[data-presentation=gallant]){--board-size:min(calc(100dvh - 332px),calc(100vw - var(--rail-width) - 420px),720px)!important;grid-template-rows:86px 44px var(--board-size) 86px!important}
 #playView #play:has(>#board[data-presentation])>.playerbar{align-self:stretch!important}
}
@media (min-width:1280px) and (min-height:620px){
 #playView #play[data-chat-dock=true]:has(>#board[data-presentation]){--board-size:min(calc(100dvh - 262px),calc(100vw - var(--rail-width) - 720px),720px)!important}
 #playView #play[data-chat-dock=true]:has(>#board[data-presentation=gallant]){--board-size:min(calc(100dvh - 332px),calc(100vw - var(--rail-width) - 720px),720px)!important}
}

/* Player cards: portrait spans both lines, name on top, rating and captured pieces share the second
   line, clock and turn on the right. Nothing spills onto the board edge any more. */
#playView #play:has(>#board[data-presentation])>.playerbar{grid-template-columns:auto minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;column-gap:12px!important;row-gap:2px!important;align-items:center!important}
#playView #play:has(>#board[data-presentation])>.playerbar>span:has(>.player-identity),#playView #play:has(>#board[data-presentation])>.playerbar .player-identity{display:contents!important}
#playView #play:has(>#board[data-presentation])>.playerbar .player-portrait{grid-column:1!important;grid-row:1/3!important}
#playView #play:has(>#board[data-presentation])>.playerbar .player-name{grid-column:2!important;grid-row:1!important;align-self:end;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#playView #play:has(>#board[data-presentation])>.playerbar .player-meta:not(:empty){display:block;grid-column:2!important;grid-row:2!important;justify-self:start;align-self:center;font-size:12px;color:#b9cbc2;white-space:nowrap}
#playView #play:has(>#board[data-presentation])>.playerbar .player-position-info{grid-column:2!important;grid-row:2!important;justify-self:end;max-width:62%;align-self:center;padding:0!important;margin:0!important;min-height:22px;overflow:visible!important}
#playView #play:has(>#board[data-presentation])>.playerbar .clock{grid-column:3!important;grid-row:1!important}
#playView #play:has(>#board[data-presentation])>.playerbar .turn-indicator{grid-column:3!important;grid-row:2!important}

/* Captured pieces: plain icons, same pieces overlapping, dark pieces outlined so they read on the dark card. */
#playView .playerbar .capture-strip{display:inline-flex;align-items:center;gap:7px;padding:0!important;background:none!important;border-radius:0}
#playView .playerbar .capture-group{display:inline-flex;align-items:center;gap:0!important}
#playView .playerbar .capture-group img,#playView .playerbar .capture-group img.classic-capture{width:20px!important;height:20px!important;padding:0!important;background:none!important;border:0!important;border-radius:0!important;object-fit:contain}
#playView .playerbar .capture-group img+img{margin-left:-11px}
#playView .playerbar .capture-group img.capture-dark{filter:drop-shadow(0 0 1px rgba(255,255,255,.95)) drop-shadow(0 0 .5px rgba(255,255,255,.8))!important}
#playView .playerbar .capture-group img.capture-light{filter:drop-shadow(0 1px 1px rgba(0,0,0,.65))!important}
#playView .playerbar .material-balance{margin-left:4px;font-size:12px;font-weight:800;color:#ffe08a}

/* Start-a-game and in-game links become proper buttons instead of underlined text. */
.setup-nav,.match-routes{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0 0 14px}
.setup-nav a,#matchBar a,.match-routes a{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:8px 16px!important;border-radius:999px!important;border:1px solid rgba(215,180,90,.45)!important;background:rgba(9,38,43,.9)!important;color:#f1e3b8!important;text-decoration:none!important;font-size:14px!important;font-weight:700;line-height:1;box-sizing:border-box}
.setup-nav a:hover,#matchBar a:hover,.match-routes a:hover{background:#12423f!important;border-color:#d7b45a!important}
.setup-nav a.nav-back{background:#d7b45a!important;border-color:#d7b45a!important;color:#13241f!important}
.setup-nav a.nav-back::before{content:'‹';font-size:18px;line-height:1;margin-top:-2px}
.match-routes{margin:6px 0 0}

/* Invite links: "Join this game?" */
dialog.invite-dialog{width:min(92vw,420px);box-sizing:border-box;padding:26px 26px 22px;border:1px solid rgba(215,180,90,.55);border-radius:16px;background:#0c2a2f;color:#eef3ee;box-shadow:0 24px 60px rgba(0,0,0,.55);text-align:center}
dialog.invite-dialog::backdrop{background:rgba(3,14,16,.65)}
dialog.invite-dialog .invite-portrait{position:relative;display:block;width:68px;height:68px;margin:0 auto 12px;border-radius:50%;overflow:hidden;border:2px solid #d7b45a;background:#103a3b}
dialog.invite-dialog h2{margin:0 0 6px;font:700 25px/1.2 Georgia,'Times New Roman',serif;color:#fff3cf}
dialog.invite-dialog p{margin:0 0 14px;color:#c9d8d0;line-height:1.45}
.invite-facts{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0 0 20px;padding:0;list-style:none}
.invite-facts li{padding:5px 12px;border-radius:999px;border:1px solid rgba(215,180,90,.5);color:#f3d68b;font-size:13px;font-weight:700}
.invite-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.invite-actions button{min-height:44px;padding:10px 22px;border-radius:10px;font-weight:800;font-size:15px;cursor:pointer}
.invite-actions .primary{background:#d7b45a;color:#13241f;border:1px solid #d7b45a}
.invite-actions .primary:hover{background:#e3c46c}
.invite-actions .secondary{background:transparent;color:#e6eee9;border:1px solid rgba(255,255,255,.28)}

/* Initials (shown only until a picture loads, or if it cannot) sit centred in their circle. */
.player-portrait>.portrait-initials:not([hidden]){display:grid;place-items:center;width:100%;height:100%;line-height:1;text-align:center}
.home-avatar>.portrait-initials{font-size:18px}

/* Profile: the background picture always covers the whole window. */
body[data-screen=profile]{background-size:100% 100%,cover!important;background-attachment:fixed!important}

/* ---- Play page (chess.com style): board left, choices right, centred ---- */
#playHome{max-width:none!important;width:auto!important;padding:0!important;margin:0 auto!important;background:none!important;border:0!important;box-shadow:none!important}
.play-hub{--hub-board:min(calc(100dvh - 110px),calc(100vw - var(--rail-width,196px) - 520px),640px);display:grid;grid-template-columns:var(--hub-board) minmax(330px,400px);gap:28px;justify-content:center;align-items:start;padding:16px 16px 24px;margin:0 auto}
.hub-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));aspect-ratio:1;width:var(--hub-board);box-sizing:border-box;border:8px solid #22383a;border-radius:8px;box-shadow:0 18px 44px rgba(0,0,0,.45);overflow:hidden;background:#22383a}
.hub-square{display:grid;place-items:center;background:#ebe4d2}.hub-square.dark{background:#6b8a71}
.hub-square img{width:88%;height:88%;object-fit:contain;pointer-events:none}
.hub-panel{display:flex;flex-direction:column;gap:16px;box-sizing:border-box;padding:22px 20px;border:1px solid rgba(215,180,90,.45);border-radius:16px;background:rgba(10,36,41,.96);box-shadow:0 16px 40px rgba(0,0,0,.4);color:#e9efe9}
.hub-panel h1{margin:0;font:700 30px/1.15 Georgia,'Times New Roman',serif;color:#fff3cf;text-align:center}
.hub-label{display:block;margin-bottom:8px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#9fb8ad}
.hub-time-group{display:grid;grid-template-columns:58px repeat(4,minmax(0,1fr));gap:6px;align-items:center;margin-bottom:6px}
.hub-time-kind{font-size:12px;color:#c9d8d0}
.hub-chip{min-height:36px;padding:6px 8px;border-radius:8px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.05);color:#e9efe9;font-size:13px;font-weight:700;cursor:pointer}
.hub-chip:hover:not(:disabled){border-color:#d7b45a}
.hub-chip[aria-pressed=true]{background:#d7b45a;border-color:#d7b45a;color:#13241f}
.hub-chip:disabled{opacity:.45;cursor:default}
.hub-primary{display:flex;flex-direction:column;align-items:center;gap:3px;width:100%;min-height:62px;box-sizing:border-box;padding:12px 16px;border:0;border-radius:12px;background:linear-gradient(#e6c76f,#c99d3e);color:#13241f;font:800 20px/1.2 system-ui,sans-serif;cursor:pointer;box-shadow:0 5px 0 #8a6a25}
.hub-primary small{font:600 12px/1.3 system-ui,sans-serif;color:#3d3420}
.hub-primary:hover:not(:disabled){filter:brightness(1.05)}
.hub-primary:disabled{opacity:.55;cursor:default;box-shadow:none}
.hub-search{padding:14px;border:1px solid rgba(215,180,90,.5);border-radius:12px;background:rgba(215,180,90,.08);text-align:center}
.hub-search p{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;margin:0 0 12px}
.hub-spinner{width:16px;height:16px;border:2px solid rgba(255,255,255,.25);border-top-color:#d7b45a;border-radius:50%;animation:hub-spin 1s linear infinite}
@keyframes hub-spin{to{transform:rotate(360deg)}}
.hub-search-time{color:#f3d68b;font-weight:800;font-variant-numeric:tabular-nums}
.hub-search-tc{padding:2px 8px;border:1px solid rgba(215,180,90,.5);border-radius:999px;color:#f3d68b;font-size:12px}
.hub-search-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.hub-secondary{min-height:40px;padding:8px 16px;border:1px solid rgba(215,180,90,.55);border-radius:10px;background:#12423f;color:#fff0c7;font-weight:800;cursor:pointer;white-space:nowrap}
.hub-secondary:hover:not(:disabled){background:#185450}
.hub-secondary:disabled{opacity:.45;cursor:default}
.hub-modes{display:grid;gap:10px}
.hub-mode{display:grid;grid-template-columns:40px minmax(0,1fr) auto;gap:10px 12px;align-items:center;padding:12px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:rgba(255,255,255,.04)}
.hub-mode-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.hub-mode-text strong{color:#fff0c7;font-size:15px}
.hub-mode-text span{color:#b9cbc2;font-size:12px;line-height:1.35}
.hub-mode-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;background:#1b4a44;color:#f3d68b;font-size:22px;line-height:1}
.hub-icon-friend::before{content:'\2709'}
.hub-icon-bot::before{content:'\265E'}
.hub-mode-bot .hub-levels{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.hub-resume{padding:14px;border:1px solid #d7b45a;border-radius:12px;background:rgba(215,180,90,.1);text-align:center}
.hub-resume strong{display:block;margin-bottom:4px;color:#fff0c7}
.hub-resume p{margin:0 0 12px;color:#c9d8d0;font-size:13px;line-height:1.4}
.hub-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;padding-top:12px;border-top:1px solid rgba(255,255,255,.1)}
.hub-links a{display:inline-flex;align-items:center;min-height:34px;padding:6px 14px!important;border:1px solid rgba(215,180,90,.4)!important;border-radius:999px!important;background:transparent!important;color:#f1e3b8!important;font:700 13px system-ui,sans-serif!important;text-decoration:none!important}
.hub-links a:hover{border-color:#d7b45a!important;background:#12423f!important}
@media (max-width:1000px){.play-hub{--hub-board:min(calc(100vw - 32px),440px);grid-template-columns:minmax(0,1fr);justify-items:center}.hub-panel{width:100%;max-width:520px}.hub-board{order:2}}
@media (max-width:700px){.hub-board{display:none}.play-hub{padding:12px}}
/* Play page: hold the board's squares square, and keep the page's own button styles over the shared game-panel ones. */
#playHome .hub-board{grid-template-rows:repeat(8,minmax(0,1fr))}
#playHome .hub-square{min-width:0;min-height:0;aspect-ratio:1}
#playHome .hub-panel{gap:12px;padding:20px 18px}
#playHome .hub-panel h1{font-size:28px}
#playHome .hub-primary{background:linear-gradient(#e6c76f,#c99d3e)!important;color:#13241f!important;border:0!important;border-radius:12px!important;box-shadow:0 5px 0 #8a6a25!important;font:800 20px/1.2 system-ui,sans-serif!important;min-height:62px!important;padding:12px 16px!important;width:100%!important}
#playHome .hub-primary small{display:block;color:#3d3420!important;font:600 12px/1.3 system-ui,sans-serif!important}
#playHome .hub-primary:disabled{opacity:.55;box-shadow:none!important}
#playHome .hub-chip{min-height:34px!important;padding:5px 8px!important;border-radius:8px!important;border:1px solid rgba(255,255,255,.18)!important;background:rgba(255,255,255,.05)!important;color:#e9efe9!important;font:700 13px/1.1 system-ui,sans-serif!important;white-space:nowrap}
#playHome .hub-chip[aria-pressed=true]{background:#d7b45a!important;border-color:#d7b45a!important;color:#13241f!important}
#playHome .hub-secondary{min-height:40px!important;padding:8px 16px!important;border-radius:10px!important;border:1px solid rgba(215,180,90,.55)!important;background:#12423f!important;color:#fff0c7!important;font:800 14px/1.1 system-ui,sans-serif!important}
#playHome .hub-mode-icon{font-size:22px!important;line-height:1!important}
#playHome .hub-mode-icon::before{display:block;font-size:22px;line-height:1}
#playHome .hub-mode-bot>.hub-secondary{grid-column:3;grid-row:1}
#playHome .hub-mode-bot .hub-levels{grid-template-columns:repeat(auto-fit,minmax(88px,1fr))}
#playHome .hub-mode-bot .hub-levels{grid-template-columns:repeat(4,minmax(0,1fr))}
#playHome .hub-levels .hub-chip{font-size:12px!important;padding:5px 3px!important}
#playHome .hub-links{flex-wrap:wrap;gap:6px}
#playHome .hub-links a,#playHome .hub-links #watchGames,#playHome .hub-links #navLobby{min-height:30px;padding:4px 10px!important;font:700 12px/1.1 system-ui,sans-serif!important;white-space:nowrap;border:1px solid rgba(215,180,90,.4)!important;border-radius:999px!important;background:transparent!important;color:#f1e3b8!important}
@media (max-width:440px){#playHome .hub-mode-bot .hub-levels{grid-template-columns:repeat(2,minmax(0,1fr))}#playHome .hub-links{flex-wrap:wrap}}

/* Every page: centred between the menu and the right edge, starting near the top (the 48px strip was
   for the old floating profile chip), and a background that covers the window and stays put. */
@media (min-width:1001px){
 body>main{padding-top:16px!important}
 main .app-view:not(#playView){margin-left:auto!important;margin-right:auto!important}
 html body,html body[data-screen]{background-size:cover!important;background-position:center!important;background-attachment:fixed!important;background-repeat:no-repeat!important}
}

/* Button arrows drawn with CSS instead of the "›" character, so no font can clip or shrink them. */
.cta-arrow{display:inline-block;width:7px;height:7px;margin-left:9px;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(45deg);vertical-align:middle;position:relative;top:-1px;flex:none}
/* Page headings get focus only so screen readers announce them; no focus box. */
main h1:focus,main h2:focus{outline:none!important;box-shadow:none!important}
/* Settings: gold checkboxes and a proper button for the custom-game link. */
#settingsView input[type=checkbox]{accent-color:#d7b45a;width:20px;height:20px}
#settingsView #customGameSettings{display:inline-flex;align-items:center;min-height:38px;padding:8px 16px;border:1px solid rgba(215,180,90,.45);border-radius:999px;background:rgba(9,38,43,.9);color:#f1e3b8!important;text-decoration:none!important;font-weight:700;font-size:14px}
#settingsView #customGameSettings:hover{background:#12423f;border-color:#d7b45a}
#profileContent .home-cta:has(.cta-arrow),#profileContent a:has(>.cta-arrow){justify-content:center!important;gap:0!important}

/* Avatars are always round: the small-avatar minimum width (32px) no longer stretches avatars that a view
   sizes smaller (tournament pairings 22px, standings 26px), and flex rows cannot squeeze them. */
.player-portrait{flex-shrink:0;aspect-ratio:1/1}
.player-portrait.portrait-small{min-width:0}
#tournaments .tv-pairing .player-portrait,.tv-name .player-portrait{width:26px!important;height:26px!important;min-width:26px!important;max-width:26px}
/* Sign-in dialog: visitors see the home page, and the welcome form opens over it when they need an account. */
dialog.login-dialog{width:min(560px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);margin:auto;padding:0;border:0;background:transparent;color:inherit;overflow:visible}
dialog.login-dialog::backdrop{background:rgba(3,12,15,.74)}
dialog.login-dialog>#identity{width:100%!important;max-width:none!important;max-height:calc(100dvh - 24px);margin:0!important;overflow:auto;box-sizing:border-box}
.login-dialog-close{position:absolute;top:10px;right:10px;z-index:2;display:grid;place-items:center;width:40px;height:40px;min-height:0;padding:0;border:1px solid rgba(255,255,255,.22);border-radius:50%;background:rgba(10,30,34,.92);color:#f4edda;font-size:24px;line-height:1;cursor:pointer}
@media (min-width:1001px){dialog.login-dialog{width:min(980px,calc(100vw - 48px))}}
/* Visitor welcome strip on the home page. */
.home-welcome.home-welcome-visitor{display:flex!important;align-items:center;gap:14px}
.home-welcome-visitor .home-visitor-knight{flex:none;width:30px;height:46px;object-fit:contain;filter:drop-shadow(0 2px 3px rgba(0,0,0,.6))}
.home-welcome-visitor>div:not(.home-visitor-actions){flex:1;min-width:0}
.home-visitor-actions{display:flex;flex:none;gap:8px;margin-left:auto}
.home-visitor-actions button{min-height:40px;padding:6px 18px;border:1px solid rgba(215,180,90,.65);border-radius:9px;background:transparent;color:#f1e3b8;font:700 15px/1.1 Georgia,'Noto Serif KR',serif;cursor:pointer}
.home-visitor-actions button.primary{border-color:#d2b778;background:linear-gradient(#1f6a4a,#13503a);color:#fff3cf}
/* Desktop: a page shorter than the window sits in its vertical middle instead of leaving a gap at the bottom.
   The game and review screens keep their own full-height layout. */
@media (min-width:1001px){
 html body>main{display:flex!important;flex-direction:column!important;min-height:100dvh!important;box-sizing:border-box!important;padding-bottom:16px!important}
 html body>main>#club{flex:1 0 auto!important;display:flex!important;flex-direction:column!important}
 html body>main>#club>.app-view:not(#playView):not(#reviewView){width:100%;box-sizing:border-box;margin-top:auto!important;margin-bottom:auto!important}
}
/* Store preview: the small board shows the real Everwake king and queen (the K/Q tags, which stay in games, covered
   them at this size), and the two large figures carry a clear one-line label with a small piece symbol. */
#themes .theme-sample-square .piece-role{display:none!important}
#themes .store-hero-piece figcaption{display:flex!important;align-items:center;justify-content:center;gap:6px;margin-top:6px;white-space:nowrap;font:700 13px/1.2 system-ui,sans-serif;color:#f1e3b8}
#themes .store-hero-piece:has(img[src*="/pieces/everwake/"]) figcaption::before{flex:0 0 22px!important;width:22px!important;height:22px!important;background-size:18px 18px!important;border-radius:4px!important}
@media (max-width:760px){#themes .store-hero-piece figcaption{flex-direction:column;gap:3px;font-size:11px;letter-spacing:0}}
.login-dialog-note{margin:0 0 10px;padding:10px 52px 10px 14px;border:1px solid #d2b778;border-radius:10px;background:#123a35;color:#fff3cf;font:700 15px/1.35 system-ui,sans-serif}
.login-dialog-note[hidden]{display:none}
/* Game panel, graphical (Jay's design): a result card when the game ends, and icons on every action with the
   finished-game actions laid out as Review (gold) over New game and Challenge again. */
html body #playView #focusOutcome:has(.gs-result){display:block!important;width:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;overflow:visible!important;white-space:normal!important;text-align:left!important}
#focusOutcome .gs-result{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 14px;border:1px solid rgba(215,180,90,.55);border-radius:14px;background:radial-gradient(120% 140% at 0% 0%,rgba(215,180,90,.16),rgba(10,32,35,.6) 60%)}
#focusOutcome .gs-result[data-tone=win]{border-color:rgba(87,192,137,.7);background:radial-gradient(120% 140% at 0% 0%,rgba(87,192,137,.2),rgba(10,32,35,.6) 60%)}
#focusOutcome .gs-result[data-tone=loss]{border-color:rgba(255,255,255,.22);background:rgba(255,255,255,.04)}
#focusOutcome .gs-emblem{width:58px;height:58px;object-fit:contain;filter:drop-shadow(0 4px 8px rgba(0,0,0,.45))}
#focusOutcome .gs-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
#focusOutcome .gs-title{font:700 24px/1.1 Georgia,'Noto Serif KR',serif;color:#fff1cc}
#focusOutcome .gs-result[data-tone=loss] .gs-title{color:#dfe5e2}
#focusOutcome .gs-reason{font:500 13px/1.3 system-ui,sans-serif;color:#d9d2c0}
#focusOutcome .gs-reason::first-letter{text-transform:uppercase}
#focusOutcome .gs-elo{font:600 12px/1.3 system-ui,sans-serif;color:#b9c8c1}
#focusOutcome .gs-elo[data-trend=up]{color:#7fe0aa}#focusOutcome .gs-elo[data-trend=down]{color:#f0a294}
#focusOutcome .gs-score{display:inline-flex;align-items:center;gap:6px;font:700 26px/1 Georgia,serif;color:#f3d68b}
#focusOutcome .gs-half{display:inline-grid;justify-items:center;font-size:15px;line-height:1}
#focusOutcome .gs-half span:first-child{padding:0 2px 2px;border-bottom:2px solid #d7b45a}
#focusOutcome .gs-half span:last-child{padding-top:2px}
#focusOutcome .gs-dash{color:#d7b45a;font-size:20px}
/* A narrow side panel (beside the chat column on laptops, or on phones): the emblem sits beside the title and the score,
   and the reason and Elo line run full width underneath, so the title never breaks into a sliver. */
html body #playView #focusOutcome:has(.gs-result){container:gsout/inline-size}
@container gsout (max-width:300px){
 #focusOutcome .gs-result{grid-template-columns:auto minmax(0,1fr);grid-template-areas:"emblem title" "emblem score" "reason reason" "elo elo";column-gap:10px;row-gap:2px;padding:10px 12px}
 #focusOutcome .gs-copy{display:contents}
 #focusOutcome .gs-emblem{grid-area:emblem;width:46px;height:46px;align-self:center}
 #focusOutcome .gs-title{grid-area:title;align-self:end;font-size:20px;line-height:1.15}
 #focusOutcome .gs-score{grid-area:score;align-self:start;font-size:20px}
 #focusOutcome .gs-score .gs-half{font-size:12px}
 #focusOutcome .gs-score .gs-dash{font-size:16px}
 #focusOutcome .gs-reason{grid-area:reason;margin-top:4px}
 #focusOutcome .gs-elo{grid-area:elo}
}
@container gsout (max-width:220px){
 #focusOutcome .gs-result{column-gap:8px;padding:10px}
 #focusOutcome .gs-emblem{width:38px;height:38px}
 #focusOutcome .gs-title{font-size:18px}
}
#playView #actions button,#playView #flipBoard{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important}
#playView .game-icon,#matchTools .game-icon{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html body #playView #play:has(>#board) #actions:has([data-act=review]){display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important}
html body #playView #play:has(>#board) #actions:has([data-act=review]) button{grid-column:auto!important;width:100%!important;min-width:0!important;margin:0!important}
html body #playView #play:has(>#board) #actions:has([data-act=review]) [data-act=review]{order:-1!important;grid-column:1/-1!important;min-height:50px!important;border:0!important;background:linear-gradient(180deg,#ecd07c,#c99d3e)!important;color:#1d1a0e!important;font-weight:800!important;box-shadow:0 3px 0 #8a6a25!important}
#playView #actions:has([data-act=review]) #restartGame{background:rgba(255,255,255,.04)!important;color:#f4ead2!important;border:1px solid rgba(215,180,90,.6)!important;box-shadow:none!important}
#playView #actions [data-act=rematch]{border:1px solid rgba(215,180,90,.6)!important;background:rgba(255,255,255,.04)!important;color:#f4ead2!important}
#playView #actions [data-act=accept]{border:0!important;background:linear-gradient(180deg,#2c8a63,#1b6648)!important;color:#fff!important}
#playView #actions [data-act=resign]{border-color:rgba(224,122,106,.55)!important;color:#ffd2c9!important}
#playView #actions [data-act=resign]:hover:not(:disabled){background:rgba(224,122,106,.14)!important}
/* More tab: settings-style rows with an icon in front. */
#matchTools [data-act]{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;text-align:left!important}
#matchTools .game-icon{color:#d7b45a}
html body #playView #play:has(>#board) #actions:has([data-act=review]) #wagerCancel{grid-column:1/-1!important}
#matchTools .match-routes{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
#matchTools .match-routes a{justify-content:flex-start!important;border-radius:10px!important}
/* Desktop: the Play page (no game open) sits in the vertical middle of the window, like the other short pages. */
@media (min-width:1001px){
 html body>main>#club>#playView:not([hidden]):has(#playHome .play-hub){display:flex!important;flex-direction:column!important;justify-content:center!important;flex:1 0 auto!important;margin-top:0!important;margin-bottom:0!important}
 html body #playView #playHome:has(.play-hub){margin-top:auto!important;margin-bottom:auto!important}
}
/* Desktop: the empty Review page sits in the vertical middle like the other short pages, and the Social page
   (messages and clubs) is centred between the menu and the right edge instead of hugging the left. */
@media (min-width:1001px){
 html body>main>#club>#reviewView[data-ready=false]:not([hidden]){width:100%;box-sizing:border-box;margin-top:auto!important;margin-bottom:auto!important}
 html body #messagesView>.social-tabs,html body #messagesView>#inboxContent,html body #messagesView>#clubsContent{width:min(100%,900px)!important;max-width:900px!important;box-sizing:border-box;margin-left:auto!important;margin-right:auto!important}
 /* The messages and clubs panel keeps one height (the window's), like a messenger, so loading or a new message never
    moves it up or down. */
 html body #messagesView>#inboxContent,html body #messagesView>#clubsContent{flex:none!important;height:calc(100dvh - 150px)!important;min-height:0!important;overflow-y:auto!important}
 html body #messagesView:not([hidden]),html body #messagesView:has(.empty-state-card){height:auto!important;min-height:0!important;padding-top:0!important}html body #messagesView>.social-tabs{margin-top:0!important}
}
/* Play page, refined (Jay's design): ornament-framed time control, icon tiles, green-and-gold action buttons that stay
   readable while a search runs, icon link buttons, and a compact "5 min" picker on phones. */
#playHome .hub-panel{background:radial-gradient(140% 70% at 50% 0%,#174a44 0%,#0e2f31 55%,#0a2326 100%)!important;border:1px solid rgba(215,180,90,.7)!important;box-shadow:inset 0 0 0 5px #0b2427,inset 0 0 0 6px rgba(215,180,90,.28),0 20px 50px rgba(0,0,0,.5)!important}
#playHome .hub-panel h1{background:linear-gradient(180deg,#fff6dc 15%,#e2bf66 90%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;font-size:34px!important;letter-spacing:.01em}
#playHome .hub-label{display:flex!important;align-items:center;gap:10px;justify-content:center;color:#d9c48c!important;letter-spacing:.12em!important}
#playHome .hub-label::before,#playHome .hub-label::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,rgba(215,180,90,.7))}
#playHome .hub-label::after{background:linear-gradient(90deg,rgba(215,180,90,.7),transparent)}
#playHome .hub-icon{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#playHome .hub-online{flex-direction:row!important;flex-wrap:wrap;justify-content:center;column-gap:10px}
#playHome .hub-online small{flex-basis:100%;text-align:center}
#playHome .hub-online .hub-icon{width:24px;height:24px}
#playHome .hub-mode{border:1px solid rgba(215,180,90,.32)!important;background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02))!important;border-radius:14px!important}
#playHome .hub-mode-icon{display:grid!important;place-items:center;width:46px!important;height:46px!important;border-radius:12px!important;background:linear-gradient(160deg,#1f6a4a,#123f33)!important;border:1px solid rgba(215,180,90,.6);color:#f3d68b!important;box-shadow:0 4px 12px rgba(0,0,0,.3)}
#playHome .hub-mode-icon::before{content:none!important}
#playHome .hub-mode-icon .hub-icon{width:24px;height:24px}
#playHome .hub-secondary{border:1px solid #d2b778!important;background:linear-gradient(180deg,#1f6a4a,#13503a)!important;color:#fff3cf!important;border-radius:11px!important;font-weight:800!important;box-shadow:0 3px 0 #0b3324!important}
#playHome .hub-secondary:hover:not(:disabled){filter:brightness(1.1)}
#playHome .hub-secondary:disabled,#playHome .hub-chip:disabled{opacity:.62!important;filter:saturate(.8)}
#playHome .hub-search .hub-secondary{background:linear-gradient(180deg,#174f45,#103b35)!important}
#playHome .hub-search-note{display:block;margin:-4px 0 12px;color:#c9d8d0;font-size:12.5px;line-height:1.4}
#playHome .hub-spinner{width:20px!important;height:20px!important;border-width:3px!important}
#playHome .hub-links a{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important}
#playHome .hub-links .hub-icon{width:17px;height:17px;color:#d7b45a}
#playHome .hub-time-picker{display:none}
@media (max-width:760px){
 html body #playHome .hub-time-group{display:none!important}
 html body #playHome .hub-time-picker{display:flex;align-items:center;justify-content:center;gap:8px;width:max-content;max-width:100%;margin:2px auto 0;padding:6px 8px 6px 14px;border:1px solid #d2b778;border-radius:999px;background:linear-gradient(180deg,#174f45,#0f3a35);color:#f3d68b;box-shadow:0 4px 12px rgba(0,0,0,.3)}
 html body #playHome .hub-time-select{min-height:34px;padding:2px 26px 2px 4px;border:0;background:transparent;color:#fff3cf;font:800 16px/1 system-ui,sans-serif;appearance:auto;cursor:pointer}
 html body #playHome .hub-time-select option,html body #playHome .hub-time-select optgroup{background:#0e2f31;color:#fff3cf}
 html body #playHome .hub-label{margin-bottom:4px!important}
 html body #playHome .hub-panel h1{font-size:30px!important}
 html body #playHome .hub-mode>.hub-secondary,html body #playHome .hub-mode-bot>.hub-secondary{min-height:50px!important;font-size:17px!important}
 html body #playHome .hub-links>a{min-height:46px!important;font-size:14px!important}
}
#playHome .hub-links .hub-link-label{font:700 13px/1.2 system-ui,sans-serif!important;color:#f1e3b8}
#playHome .hub-links>button{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;border-radius:999px!important}
@media (max-width:440px){html body #playHome .hub-links>a{gap:6px!important;padding:6px 8px!important}html body #playHome .hub-links .hub-link-label{white-space:nowrap;font-size:12.5px!important}html body #playHome .hub-links .hub-icon{width:16px;height:16px;flex:none}}
/* Sign-in pop-up on short screens (small phones, short windows): it fits without scrolling. The logo, subtitle, the
   empty status line and the not-yet-available provider box step aside, spacing tightens; every field stays. */
@media (max-height:900px) and (max-width:700px),(max-height:700px){
 dialog.login-dialog .wgc-welcome{margin:2px 0 8px!important}
 dialog.login-dialog .wgc-welcome>p:not(.wgc-or){display:none!important}
 dialog.login-dialog .wgc-welcome .wgc-signin-button{min-height:42px!important;padding:8px 16px!important}
 dialog.login-dialog .wgc-welcome .wgc-or{margin-top:8px!important}
 dialog.login-dialog .welcome-logo,dialog.login-dialog .welcome-copy>p,dialog.login-dialog .welcome-provider,dialog.login-dialog .welcome-guest>p{display:none!important}
 dialog.login-dialog .login-dialog-note{margin-bottom:6px!important;padding-top:7px!important;padding-bottom:7px!important;font-size:14px!important}
 dialog.login-dialog>#identity{padding-top:10px!important;padding-bottom:10px!important}
 dialog.login-dialog .welcome-copy{margin-bottom:6px!important}
 dialog.login-dialog .welcome-copy h1{margin:2px 44px 2px 0!important;font-size:22px!important}
 dialog.login-dialog .welcome-tabs{margin:6px 0!important}
 dialog.login-dialog .welcome-tabs button{min-height:38px!important;padding-top:6px!important;padding-bottom:6px!important}
 dialog.login-dialog .welcome-form label{margin-bottom:3px!important}
 dialog.login-dialog .welcome-form input{min-height:40px!important;padding-top:7px!important;padding-bottom:7px!important;margin-bottom:5px!important}
 dialog.login-dialog .welcome-password button{min-height:32px!important;padding:4px 12px!important;font-size:13px!important}
 dialog.login-dialog #welcome-password-hint{margin:3px 0!important;font-size:13px!important}
 dialog.login-dialog .welcome-form .primary{min-height:40px!important}
 dialog.login-dialog .welcome-status:empty{display:none!important}
 dialog.login-dialog .welcome-guest{margin-top:8px!important;padding-top:8px!important}
 dialog.login-dialog .welcome-guest h2{margin-bottom:4px!important;font-size:18px!important}
 dialog.login-dialog .welcome-guest button{min-height:40px!important}
}
