/* Approved Focus Arena 07: live controls, selected assets, exact board geometry. */
#focusSidebar{min-width:0;min-height:0}
#focusOutcome[hidden]{display:none}
#focusOutcome{display:flex;align-items:center;gap:14px;padding:18px 12px;border:1px solid #bc9a51;border-radius:8px;background:#08292ce8;min-width:0}
#focusOutcome>div{min-width:0}#focusOutcome h2{font:700 clamp(20px,2vw,28px)/1.2 Georgia,serif;color:#f0cb77;margin:0 0 8px;overflow-wrap:anywhere}
#focusOutcome p{font-size:14px;line-height:1.45;margin:0;color:#eadcb8;overflow-wrap:anywhere}
#reviewView #focusSidebar{display:contents}#reviewView #focusOutcome{display:none}
#playView #play:has(>#board[data-presentation]){--board-size:min(640px,calc(100vw - 44px))!important;display:grid!important;width:100%!important;max-width:1180px!important;height:auto!important;margin:0 auto!important;padding:12px 8px 24px!important;box-sizing:border-box;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto var(--board-size) auto auto!important;gap:24px!important;align-content:start!important;align-items:stretch!important;justify-content:center!important}
#playView #play:has(>#board[data-presentation])>.board{grid-column:1!important;grid-row:2!important;width:var(--board-size)!important;height:var(--board-size)!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;aspect-ratio:1!important;box-sizing:border-box!important;margin:0!important;padding:0!important;border:2px solid #b7a572!important;justify-self:center;box-shadow:0 0 0 10px #082a2e,0 0 0 11px #56736b!important}
#playView #board[data-presentation=classic]{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;grid-template-rows:repeat(8,minmax(0,1fr))!important;gap:0!important}
#playView #board[data-presentation=classic]>.square{width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;aspect-ratio:1;box-sizing:border-box;margin:0!important;padding:0!important}
#playView #play:has(>#board[data-presentation])>.playerbar{grid-column:1!important;height:auto!important;min-height:70px!important;margin:0!important;padding:10px 12px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;column-gap:12px;row-gap:4px;overflow:visible!important;border:1px solid #668477;border-radius:10px;background:#08282eed;box-sizing:border-box;min-width:0}
#playView #play:has(>#board[data-presentation])>.playerbar:has(#clockTop){grid-row:1!important}
#playView #play:has(>#board[data-presentation])>.playerbar:has(#clockBottom){grid-row:3!important}
#playView .playerbar #self,#playView .playerbar #opponent{grid-column:1;grid-row:1;min-width:0;white-space:normal!important;overflow:hidden;gap:10px}
#playView .playerbar .player-identity{min-width:0;gap:3px}#playView .playerbar .player-name{font-size:14px;line-height:1.25;max-width:100%}
#playView .playerbar .player-meta{font-size:12px;color:#c7d7ca}
#playView .playerbar .player-portrait{width:40px;height:40px;min-width:40px}
#playView .playerbar .clock{grid-column:2;grid-row:1/3;align-self:center;font:700 clamp(20px,2.2vw,28px)/1.2 ui-monospace,monospace;min-width:86px;padding:10px 8px;white-space:nowrap;border:1px solid #697f73;border-radius:6px}
#playView .playerbar .capture-strip{flex-wrap:wrap;white-space:normal;gap:4px}
#playView .playerbar .capture-caption{font-size:10px}
#playView .playerbar .turn-indicator{grid-column:1;grid-row:3;font-size:11px;white-space:normal}
#playView #focusSidebar{grid-column:1;grid-row:4;display:flex;flex-direction:column;gap:16px;align-self:stretch}
#playView #play:has(>#board[data-presentation]) #matchEssential{position:static!important;display:flex!important;flex-direction:column!important;gap:12px!important;height:auto!important;min-height:0!important;margin:0!important;padding:16px!important;align-self:stretch!important;border:1px solid #6b8475;border-radius:12px;background:#082a2eee;box-sizing:border-box}
#playView #gameStatus{font-size:16px;line-height:1.4;margin:0!important;overflow-wrap:anywhere}
#playView #play:has(>#board[data-presentation]) #actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important;width:100%;min-width:0;margin:0}
#playView #play:has(>#board[data-presentation]) #actions button{flex:1 1 100px!important;min-height:46px!important;font-size:13px!important;padding:10px!important;margin:0!important;white-space:normal!important;overflow-wrap:anywhere}
#playView #play:has(>#board[data-presentation]) #actions #restartGame{flex-basis:100%!important;background:linear-gradient(#e2bf75,#caa35c);color:#112b2b;border:1px solid #efd58d;font-weight:750}
#playView #play:has(>#board[data-presentation]) #actions [data-focus-key=open-review]{flex-basis:100%!important;order:1}
#playView #play:has(>#board[data-presentation]) #flipBoard{display:block;min-height:44px!important;width:100%!important;padding:10px!important;margin:0!important;font-size:13px!important}
#playView #flipBoard:after{content:none!important}#playView #companionToggle{display:none!important}
#playView #play:has(>#board[data-presentation]) #matchPanel{display:flex!important;position:static!important;flex:1;height:auto!important;min-height:260px!important;max-height:none!important;align-self:stretch!important;border:1px solid #6b8475;border-radius:12px;background:#082a2eee;overflow:hidden}
#playView #matchTabs{padding:12px;gap:8px;display:flex}
#playView #matchTabs button{flex:1;min-width:0;min-height:46px;padding:8px!important;font-size:13px!important;white-space:normal;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:6px}
#playView #matchTabs button[aria-pressed=true]{background:#dabb73;color:#132c2c;border-color:#efd58d}
#playView #matchPanel>[data-match-pane]{min-height:0;overflow:auto;padding:12px!important;max-height:480px}
#playView #moves{flex:1;margin:0!important}#playView #moves:empty:before{display:block;text-align:center;padding:48px 12px;color:#c6d0c9}
#playView #play:has(>#board[data-presentation=gallant]){grid-template-rows:auto 44px var(--board-size) auto auto!important}
#playView #play:has(>#board[data-presentation=gallant])>.gallant-toolbar{grid-row:2!important;grid-column:1!important;justify-content:stretch;position:static;margin:0;height:44px}
#playView .gallant-toolbar button{flex:1;min-width:0;padding:8px!important}
#playView #play:has(>#board[data-presentation=gallant])>.board{grid-row:3!important}
#playView #play:has(>#board[data-presentation=gallant])>.playerbar:has(#clockBottom){grid-row:4!important}
#playView #play:has(>#board[data-presentation=gallant])>#focusSidebar{grid-row:5!important}
@media(min-width:1001px){
 body{--rail-width:196px}body[data-rail-expanded=false]{--rail-width:92px}
 body>header .brand,body>header .brand img.brand-logo{height:156px}body>header #railToggle{top:164px}
 body>header #sectionNav{gap:8px}body>header #sectionNav a{min-height:58px;padding:12px;font-size:15px}
 body>header #sectionNav a[aria-current=page]{background:#103a3b;border:1px solid #81957c;box-shadow:inset 3px 0 #ddbf73;color:#f4d48b}
 #accountMenu{top:12px;right:16px}#accountMenu>summary{min-height:44px!important}
 body[data-screen=play] main{padding-top:58px!important}
 body[data-screen=play] #matchBar{display:none!important}
 #playView #play:has(>#board[data-presentation]){--board-size:min(calc(100dvh - 330px),calc(100vw - var(--rail-width) - 420px),720px)!important;grid-template-columns:var(--board-size) minmax(300px,360px)!important;grid-template-rows:100px var(--board-size) 100px!important;gap:24px 32px!important;padding:12px 16px 24px!important}
 #playView #play:has(>#board[data-presentation])>#focusSidebar{grid-column:2!important;grid-row:1/-1!important;max-height:none;min-height:0}
 #playView #play:has(>#board[data-presentation]) #matchPanel{min-height:160px!important}
 #playView #play:has(>#board[data-presentation]) #matchPanel>[data-match-pane]{max-height:none}
 #playView #play:has(>#board[data-presentation=gallant]){--board-size:min(calc(100dvh - 398px),calc(100vw - var(--rail-width) - 420px),720px)!important;grid-template-rows:100px 44px var(--board-size) 100px!important}
}
@media(min-width:1001px) and (max-height:700px){#playView #play:has(>#board[data-presentation]){--board-size:min(440px,calc(100vw - var(--rail-width) - 420px))!important}#playView #play:has(>#board[data-presentation=gallant]){--board-size:min(440px,calc(100vw - var(--rail-width) - 420px))!important}}
@media(max-width:1000px){
 body[data-screen=play] main{overflow:visible!important;height:auto!important;min-height:0}
 #playView{overflow:visible!important;height:auto!important;padding:0!important}
 #playView #play:has(>#board[data-presentation]){--board-size:min(640px,calc(100vw - 44px))!important;max-width:680px!important}
 #playView .playerbar .clock{min-width:76px;font-size:20px}
 #playView .playerbar .player-portrait{width:32px;height:32px;min-width:32px}
 #playView .playerbar .player-name{font-size:12px}
 #playView .playerbar .capture-caption{display:none}
 #playView #matchPanel{max-height:560px!important}
}
@media(max-width:360px){#playView #play:has(>#board[data-presentation])>.playerbar{padding:8px!important;column-gap:6px}#playView .playerbar .player-meta{font-size:10px}#playView #matchTabs{gap:4px;padding:8px}#playView #matchTabs svg{width:14px;height:14px}}

@media(min-width:1001px){#playView #play:has(>#board[data-presentation=gallant])>#focusSidebar{grid-column:2!important;grid-row:1/-1!important}#playView #play:has(>#board[data-presentation=gallant])>.playerbar{min-height:100px!important;height:auto!important}}

#playView #moves{font-family:inherit;white-space:normal}#playView #moves .move-table-heading,#playView #moves .move-table-row{display:grid;grid-template-columns:32px minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:center;padding:6px 0}#playView #moves .move-san{min-width:0;min-height:44px;margin:0;padding:8px;text-align:left}#playView #moves .move-table-heading{font-size:12px;color:#c8d5d0}#playView #moves .move-result{padding:12px;margin-bottom:12px;background:#204b3e;border-radius:7px;color:#efd07d}
/* >>> Big-board play layout (supersedes the Focus Arena grid above; selectors outrank every older layer, so it wins
   whatever the load order): a chess.com-class game screen. The board is as large as the window allows (height-driven),
   with slim player bars directly above and below it and ONE side panel (status, actions, board view, moves / chat / more).
   Tall desktops stack the game chat under that panel; shorter ones keep it as a tab. Expand mode (body[data-board-expanded],
   set by the button from compact-layout.js) hides the site rail and moves the bars beside the board so the board takes the
   full window height. #playView>.layout and #reviewBoardHost are size containers, so 100cqw is the width the grid can use. */
html body[data-match-active=true]>main{padding:0!important;margin:0!important;min-height:100dvh!important}
html body[data-match-active=true] #club,html body[data-match-active=true] #playView{padding:0!important;margin:0!important;gap:0!important}
html body[data-match-active=true] #playView>.layout{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;container-type:inline-size}
html body #playView #play.play-area:has(>#board[data-presentation]){--pl-pad:8px;--pl-hpad:16px;--pl-bar:48px;--pl-gap:6px;--pl-col:16px;--pl-panel-min:300px;--pl-panel-max:420px;--pl-board:max(280px,min(calc(100dvh - 2*var(--pl-pad) - 2*var(--pl-bar) - 2*var(--pl-gap)),calc(100cqw - 2*var(--pl-hpad) - var(--pl-panel-min) - var(--pl-col))));--board-size:var(--pl-board)!important;position:relative!important;display:grid!important;grid-template-columns:var(--pl-board) minmax(var(--pl-panel-min),var(--pl-panel-max))!important;grid-template-rows:var(--pl-bar) var(--pl-board) var(--pl-bar)!important;column-gap:var(--pl-col)!important;row-gap:var(--pl-gap)!important;gap:var(--pl-gap) var(--pl-col)!important;justify-content:center!important;align-content:center!important;align-items:stretch!important;width:100%!important;max-width:none!important;height:100dvh!important;min-height:0!important;margin:0!important;padding:var(--pl-pad) var(--pl-hpad)!important;box-sizing:border-box!important;overflow:visible!important}

/* Board */
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>#board{grid-column:1!important;grid-row:2!important;width:var(--pl-board)!important;height:var(--pl-board)!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;aspect-ratio:1!important;margin:0!important;padding:0!important;justify-self:center!important;align-self:center!important;box-sizing:border-box!important;border:2px solid #b7a572!important;box-shadow:0 0 0 1px #0b2b2c,0 12px 34px rgba(0,0,0,.5)!important}
html body #playView #play.play-area:has(>#board[data-presentation])>#stakeBadge{grid-column:1/2!important;grid-row:2/3!important;left:50%!important;top:0!important;max-width:min(92%,520px)}

/* Player bars: portrait, name + rating, captured material under the name, turn cue and clock on the right. */
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar{grid-column:1!important;align-self:stretch!important;justify-self:stretch!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:4px 5px 4px 6px!important;display:grid!important;grid-template-columns:auto auto auto minmax(0,1fr) auto auto!important;grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important;column-gap:0!important;row-gap:0!important;align-items:center!important;overflow:hidden!important;border:1px solid #4b6a5f!important;border-radius:8px!important;background:#07262bf0!important;box-shadow:none!important;box-sizing:border-box!important;min-width:0!important;container:plbar/inline-size!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar:has(>#clockTop){grid-row:1!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar:has(>#clockBottom){grid-row:-2!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar[data-active-turn=true]{border-color:#c9a65a!important;box-shadow:inset 3px 0 #e2bf75!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar>span:has(>.player-identity),html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .player-identity{display:contents!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .player-portrait{grid-column:1!important;grid-row:1/3!important;width:36px!important;height:36px!important;min-width:36px!important;margin:0 10px 0 0!important;align-self:center!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .player-name{grid-column:2!important;grid-row:1!important;align-self:end!important;min-width:0;max-width:min(240px,100%);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:700 14px/1.25 system-ui,"Segoe UI",sans-serif!important;color:#f6ecd2}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar :is(.ai-badge,.member-badge){grid-column:3!important;grid-row:1!important;align-self:end;margin-left:6px}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .player-meta{grid-column:4!important;grid-row:1!important;align-self:end!important;justify-self:stretch!important;min-width:0;margin-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:500 12px/1.3 system-ui,"Segoe UI",sans-serif!important;color:#b5c8bf}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .player-meta:empty{display:none!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .player-position-info{grid-column:2/5!important;grid-row:2!important;justify-self:start!important;align-self:start!important;display:flex!important;align-items:center;gap:6px;max-width:100%!important;min-width:0;height:20px;min-height:0!important;padding:0!important;margin:1px 0 0!important;overflow:hidden!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .player-meta:not(:empty){display:block!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .capture-caption{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;border:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .capture-strip{display:inline-flex!important;align-items:center;gap:6px;min-width:0;padding:0!important;background:none!important;border:0!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .capture-group{display:inline-flex!important;align-items:center;gap:0!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .capture-group img,html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .capture-group img.classic-capture{width:18px!important;height:18px!important;padding:0!important;background:none!important;border:0!important;border-radius:0!important;object-fit:contain!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.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}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .capture-group img.capture-light{filter:drop-shadow(0 1px 1px rgba(0,0,0,.65))!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .material-balance{margin-left:2px;font-size:12px;font-weight:800;color:#ffe08a}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .capture-group img+img{margin-left:-10px}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .turn-indicator{grid-column:5!important;grid-row:1/3!important;align-self:center!important;justify-self:end!important;margin:0 8px!important;font-size:12px!important;line-height:1.2!important;white-space:nowrap!important}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .turn-indicator:not([hidden]):not(:empty){padding:4px 9px;border-radius:999px;background:#e2bf7524;border:1px solid #e2bf7566;color:#f6d98c!important;font-weight:750}
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .clock{grid-column:6!important;grid-row:1/3!important;align-self:center!important;justify-self:end!important;display:flex!important;align-items:center;justify-content:center;box-sizing:border-box!important;height:38px!important;min-height:0!important;min-width:104px!important;margin:0!important;padding:0 10px!important;font:700 25px/1 ui-monospace,"Cascadia Mono",Consolas,monospace!important;letter-spacing:.02em;white-space:nowrap!important;border-radius:6px!important}

@container plbar (max-width:360px){html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .turn-indicator{display:none!important}}
@container plbar (max-width:280px){html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .player-meta{display:none!important}}
/* A member's chip keeps only its gem when the bar is narrow (the tier is in the tooltip). */
@container plbar (max-width:620px){html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .member-badge{width:20px;padding:0;justify-content:center}html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .member-badge .member-label{display:none}}

/* One side panel: status + expand button, actions, flip + 2D/3D, then Moves / Chat / More. */
html body #playView #play.play-area:has(>#board[data-presentation])>#focusSidebar{grid-column:2!important;grid-row:1/-1!important;display:flex!important;flex-direction:column!important;gap:0!important;min-width:0!important;min-height:0!important;height:auto!important;max-height:none!important;align-self:stretch!important;margin:0!important;padding:0!important;overflow:hidden!important;border:1px solid #58786c!important;border-radius:10px!important;background:#062327f2!important;box-shadow:0 12px 32px rgba(0,0,0,.38)!important;box-sizing:border-box!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #matchEssential{position:static!important;flex:0 0 auto!important;display:flex!important;flex-flow:row wrap!important;align-items:center!important;align-content:start!important;gap:7px!important;height:auto!important;min-height:0!important;margin:0!important;padding:10px 12px 11px!important;border:0!important;border-bottom:1px solid #ffffff1c!important;border-radius:0!important;background:none!important;box-shadow:none!important;box-sizing:border-box!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #focusOutcome:not([hidden]){flex:1 1 calc(100% - 60px)!important;min-width:0!important;margin:0!important;padding:8px 10px!important;gap:10px!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #gameStatus{flex:1 1 calc(100% - 60px)!important;min-width:0!important;max-height:none!important;margin:0!important;padding:0 2px!important;overflow:hidden!important;text-align:left!important;white-space:normal!important;font:700 15px/1.3 system-ui,"Segoe UI",sans-serif!important;color:#f4e2b2!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #actions{flex:1 1 100%!important;display:flex!important;flex-wrap:wrap!important;gap:6px!important;width:auto!important;min-width:0!important;margin:0!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #actions button{flex:1 1 auto!important;width:auto!important;min-width:0!important;min-height:38px!important;height:auto!important;margin:0!important;padding:4px 10px!important;font-size:13px!important;line-height:1.15!important;white-space:nowrap!important;order:0!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #actions [data-focus-key=open-review]{order:-1!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #actions #restartGame{flex-basis:auto!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #replay:not(:empty){flex:1 1 100%!important;margin:0!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #flipBoard{flex:1 0 auto!important;white-space:nowrap!important;width:auto!important;min-width:0!important;min-height:38px!important;height:38px!important;margin:0!important;padding:4px 10px!important;font-size:13px!important}
html body #playView #play.play-area:has(>#board[data-presentation]) .gallant-toolbar:not([hidden]){flex:999 0 auto!important;width:auto!important;min-width:0!important;height:38px!important;margin:0!important;padding:3px!important;box-sizing:border-box!important}
html body #playView #play.play-area:has(>#board[data-presentation]) .gallant-toolbar button{min-height:0!important;height:100%!important;padding:0 6px!important;font-size:13px!important;white-space:nowrap!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #matchPanel{position:static!important;flex:1 1 auto!important;display:flex!important;flex-direction:column!important;min-height:0!important;height:auto!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;overflow:hidden!important;align-self:stretch!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #matchTabs{flex:0 0 auto!important;display:flex!important;gap:2px!important;padding:0 8px!important;margin:0!important;border:0!important;border-bottom:1px solid #ffffff1c!important;background:#0000001f!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #matchTabs button{flex:1 1 0!important;min-width:0!important;min-height:0!important;height:40px!important;margin:0!important;padding:0 6px!important;display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:6px!important;font-size:13px!important;font-weight:650!important;border:0!important;border-bottom:3px solid transparent!important;border-radius:0!important;background:none!important;color:#c9d8d0!important;box-shadow:none!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #matchTabs button[hidden]{display:none!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #matchTabs button:hover{color:#fff!important;background:#ffffff0d!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #matchTabs button[aria-pressed=true]{color:#f3d688!important;border-bottom-color:#e2bf75!important;background:#ffffff0a!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #matchTabs svg{width:16px!important;height:16px!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #matchPanel>[data-match-pane]{flex:1 1 auto!important;min-height:0!important;max-height:none!important;margin:0!important;overflow:auto!important;overscroll-behavior:contain}
html body #playView #play.play-area:has(>#board[data-presentation]) #matchPanel>#moves{padding:0 10px 8px!important;line-height:1.4!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #matchPanel>#matchTools{padding:10px 12px!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #moves .move-table-heading,html body #playView #play.play-area:has(>#board[data-presentation]) #moves .move-table-row{grid-template-columns:34px minmax(0,1fr) minmax(0,1fr)!important;gap:4px!important;min-height:0!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #moves .move-table-heading{padding:6px 2px!important;font-size:12px!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #moves .move-table-row{padding:1px 2px!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #moves .move-table-row:nth-child(odd of .move-table-row){background:#ffffff06}
html body #playView #play.play-area:has(>#board[data-presentation]) #moves .move-san{min-height:30px!important;padding:4px 8px!important;font-size:14px!important;line-height:1.5!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #moves .move-result{margin:8px 0!important;padding:8px 10px!important}
html body #playView #play.play-area:has(>#board[data-presentation]) #moves:empty:before{padding:28px 12px!important}


/* Game chat / messenger inside the panel (Chat tab) or stacked under it (tall desktops). */
html body #playView #play.play-area:has(>#board[data-presentation]) #matchPanel[data-tab=chat]>#social{display:flex!important;flex-direction:column!important;padding:0!important;overflow:hidden!important}
html body #playView #play.play-area:has(>#board[data-presentation]) :is(#matchPanel,.chatDock) #social>.social-controls{flex:1 1 auto!important;display:flex!important;flex-direction:column!important;min-height:0!important;margin:0!important;padding:0!important;overflow:hidden!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important}
html body #playView #play.play-area:has(>#board[data-presentation]) :is(#matchPanel,.chatDock) #social>.social-controls>h2,html body #playView #play.play-area:has(>#board[data-presentation]) :is(#matchPanel,.chatDock) #social>.social-controls>p[role=status]:empty{display:none!important}
html body #playView #play.play-area:has(>#board[data-presentation]) :is(#matchPanel,.chatDock) #social>.social-controls>div{flex:1 1 auto!important;display:flex!important;flex-direction:column!important;min-height:0!important}
html body #playView #play.play-area:has(>#board[data-presentation]) :is(#matchPanel,.chatDock) #social .chat-panel{flex:1 1 auto!important;min-height:0!important;border:0!important;border-radius:0!important}
html body #playView #play.play-area:has(>#board[data-presentation]) :is(#matchPanel,.chatDock) #social .chat-log{flex:1 1 auto!important;min-height:60px!important;max-height:none!important}
html body #playView #play.play-area:has(>#board[data-presentation]) :is(#matchPanel,.chatDock) #social .chat-header{min-height:0!important;padding:6px 10px!important}
html body #playView #play.play-area:has(>#board[data-presentation]) :is(#matchPanel,.chatDock) #social .chat-header .player-portrait{width:28px!important;height:28px!important;min-width:28px!important}
html body #playView #play.play-area:has(>#board[data-presentation]) :is(#matchPanel,.chatDock) #social details>summary{min-height:36px!important;padding-block:6px!important}
html body #playView #play.play-area:has(>#board[data-presentation]) :is(#matchPanel,.chatDock) #social>.social-controls>div>details{margin:0!important;padding:0 12px!important;flex:0 0 auto}
html body #playView #play.play-area:has(>#board[data-presentation]) :is(#matchPanel,.chatDock) .msgr-game-host,html body #playView #play.play-area:has(>#board[data-presentation]) :is(#matchPanel,.chatDock) .msgr-mount{flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important}
html body #playView #play.play-area[data-chat-dock=true]:has(>#board[data-presentation]){--pl-chat-share:.44;--pl-chat:clamp(220px,calc((var(--pl-board) + 2*var(--pl-bar) + 2*var(--pl-gap))*var(--pl-chat-share)),520px);--pl-split:calc(var(--pl-board) + var(--pl-bar) - 2*var(--pl-gap) - var(--pl-chat));grid-template-rows:var(--pl-bar) var(--pl-split) calc(var(--pl-board) - var(--pl-gap) - var(--pl-split)) var(--pl-bar)!important}
html body #playView #play.play-area[data-chat-dock=true]:has(>#board[data-presentation])>#board,html body #playView #play.play-area[data-chat-dock=true]:has(>#board[data-presentation])>#stakeBadge{grid-row:2/4!important}
html body #playView #play.play-area[data-chat-dock=true]:has(>#board[data-presentation])>#focusSidebar{grid-row:1/3!important}
html body #playView #play.play-area[data-chat-dock=true]:has(>#board[data-presentation])>.chatDock{grid-column:2!important;grid-row:3/5!important;display:flex!important;flex-direction:column!important;min-width:0!important;min-height:0!important;margin:0!important;overflow:hidden!important;border:1px solid #58786c;border-radius:10px;background:#062327f2;box-shadow:0 12px 32px rgba(0,0,0,.38)}
html body #playView #play.play-area[data-chat-dock=true]:has(>#board[data-presentation])>.chatDock>#social{flex:1 1 auto!important;display:flex!important;flex-direction:column!important;min-height:0!important}
html body #playView #play.play-area:not([data-chat-dock=true]):has(>#board[data-presentation])>.chatDock{display:none!important}

@media (max-height:799px){html body #playView #play.play-area[data-chat-dock=true]:has(>#board[data-presentation]){--pl-chat-share:.36}html body #playView #play.play-area[data-chat-dock=true]:has(>#board[data-presentation])>.chatDock #social .chat-header{display:none!important}html body #playView #play.play-area[data-chat-dock=true]:has(>#board[data-presentation])>.chatDock #social details{padding-top:0!important;padding-bottom:0!important}html body #playView #play.play-area[data-chat-dock=true]:has(>#board[data-presentation])>.chatDock #social details>summary{min-height:34px!important;padding-block:4px!important}}

/* Bars and panel sit above the 3D canvas (z-index 30), which may reach a little past the board's sides. */
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>:is(.playerbar,#focusSidebar,.chatDock){position:relative!important;z-index:31!important}

/* Expand button (compact-layout.js), top-right of the panel next to the game status. */
#boardExpand{flex:0 0 auto;display:inline-grid;place-items:center;width:36px;height:36px;min-height:0!important;min-width:0;margin:0;padding:0!important;border:1px solid #6b8475;border-radius:8px;background:#0e3637;color:#f0d58a;cursor:pointer;box-shadow:none}
#boardExpand:hover{background:#15494a;border-color:#d7b45a;color:#fff1c4}
#boardExpand:focus-visible{outline:3px solid #f3d688;outline-offset:2px}
#boardExpand svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#boardExpand[aria-pressed=true] .expand-out,#boardExpand:not([aria-pressed=true]) .expand-in{display:none}
html body #playView #play.play-area:has(>#board[data-presentation]) #boardExpand{order:0;margin-left:auto!important}
#reviewView #boardExpand,body:not([data-match-active=true]) #boardExpand{display:none!important}

/* 3D board: the canvas reaches past the board's sides (where there is room) but stays clear of the player bars. */
html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>#board>.board3d{inset:-1% -5% -1% -5%!important;width:110%!important;height:102%!important}

/* Review (/review/<id>): the same board and bars, sized like the game screen, with the review sidebar beside it.
   (Short landscape screens move the bars into the sidebar, so their rows are auto with a minimum height.) */
html body[data-screen=review]>main{padding:0!important;margin:0!important;min-height:100dvh!important}
html body #club #reviewView[data-ready=true]{width:100%!important;max-width:none!important;height:auto!important;margin:0!important;padding:0!important}
html body #club #reviewView[data-ready=true]>.review-workspace{--pl-pad:8px;--pl-hpad:16px;--pl-bar:48px;--pl-gap:6px;--pl-col:16px;--pl-side:clamp(320px,26vw,400px);--pl-board:max(280px,min(calc(100dvh - 2*var(--pl-pad) - 2*var(--pl-bar) - 2*var(--pl-gap)),calc(100cqw - var(--pl-side) - var(--pl-col))));container-type:inline-size;display:grid!important;grid-template-columns:auto var(--pl-side)!important;grid-template-rows:auto!important;justify-content:center!important;align-content:center!important;align-items:center!important;gap:var(--pl-col)!important;width:100%!important;max-width:none!important;height:100dvh!important;min-height:0!important;margin:0!important;padding:var(--pl-pad) var(--pl-hpad)!important;box-sizing:border-box!important}
html body #club #reviewView #reviewBoardHost{display:block!important;align-self:center!important;justify-self:center!important;width:auto!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important}
html body #reviewView #reviewBoardHost>#play.play-area:has(>#board[data-presentation]){display:grid!important;grid-template-columns:var(--pl-board)!important;grid-template-rows:auto var(--pl-board) auto!important;gap:var(--pl-gap)!important;row-gap:var(--pl-gap)!important;width:auto!important;max-width:none!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;align-content:start!important;justify-content:start!important}
html body #reviewView #reviewBoardHost>#play.play-area:has(>#board[data-presentation])>.playerbar{min-height:var(--pl-bar)!important}
html body #club #reviewView[data-ready=true] #reviewSidebar{align-self:center!important;width:auto!important;height:calc(var(--pl-board) + 2*var(--pl-bar) + 2*var(--pl-gap))!important;max-height:none!important;min-height:0!important;margin:0!important;box-sizing:border-box!important}

@media (min-width:1001px){
 /* Expand mode: no site rail; the bars sit beside the board so the board can use the whole window height. */
 html body[data-board-expanded=true][data-match-active=true]{--rail-width:0px!important;padding-left:0!important}
 html body[data-board-expanded=true][data-match-active=true]>header,html body[data-board-expanded=true][data-match-active=true] #wgcBalance{display:none!important}
 html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation]){--pl-pad:8px;--pl-side-min:280px;--pl-side-max:380px;--pl-board:max(280px,min(calc(100dvh - 2*var(--pl-pad)),calc(100cqw - 2*var(--pl-hpad) - var(--pl-side-min) - var(--pl-col))));grid-template-columns:var(--pl-board) minmax(var(--pl-side-min),var(--pl-side-max))!important;grid-template-rows:var(--pl-bar) calc(var(--pl-board) - 2*var(--pl-bar) - 2*var(--pl-gap)) var(--pl-bar)!important}
 html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation])>#board,html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation])>#stakeBadge{grid-column:1/2!important;grid-row:1/-1!important}
 html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation]):has(>#stakeBadge:not([hidden])){--pl-pad:22px}
 html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation])>.playerbar{grid-column:2!important}
 html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation])>#focusSidebar{grid-column:2!important;grid-row:2!important}
 html body[data-board-expanded=true] #playView #play.play-area[data-chat-dock=true]:has(>#board[data-presentation]){--pl-mid:calc(var(--pl-board) - 2*var(--pl-bar) - 3*var(--pl-gap));--pl-chat:clamp(200px,calc(var(--pl-mid)*.4),460px);grid-template-rows:var(--pl-bar) calc(var(--pl-mid) - var(--pl-chat)) var(--pl-chat) var(--pl-bar)!important}
 html body[data-board-expanded=true] #playView #play.play-area[data-chat-dock=true]:has(>#board[data-presentation])>#focusSidebar{grid-row:2!important}
 html body[data-board-expanded=true] #playView #play.play-area[data-chat-dock=true]:has(>#board[data-presentation])>.chatDock{grid-row:3!important}
 html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation])>#board>.board3d{inset:-1% -6%!important;width:112%!important;height:102%!important}
}

/* Phones and small tablets: full-width board, compact bars above and below, the panel after them. */
@media (max-width:1000px){
 html body[data-match-active=true]>main{padding-bottom:16px!important}
 html body #playView #play.play-area:has(>#board[data-presentation]){--pl-pad:6px;--pl-hpad:8px;--pl-bar:46px;--pl-gap:5px;--pl-board:min(calc(100cqw - 2*var(--pl-hpad)),720px);grid-template-columns:var(--pl-board)!important;grid-template-rows:var(--pl-bar) var(--pl-board) var(--pl-bar) auto!important;align-content:start!important;height:auto!important;padding:var(--pl-pad) var(--pl-hpad) 8px!important}
 html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar:has(>#clockBottom){grid-row:3!important}
 html body #playView #play.play-area:has(>#board[data-presentation])>#focusSidebar{grid-column:1!important;grid-row:4!important;margin-top:6px!important;overflow:visible!important}
 html body #playView #play.play-area:has(>#board[data-presentation]) #matchPanel{min-height:280px!important;max-height:none!important;overflow:visible!important}
 html body #playView #play.play-area:has(>#board[data-presentation]) #matchPanel>[data-match-pane]{max-height:56dvh!important}
 html body #playView #play.play-area:has(>#board[data-presentation]) #matchPanel[data-tab=chat]>#social{height:min(560px,72dvh)!important;max-height:none!important}
 html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .player-portrait{width:32px!important;height:32px!important;min-width:32px!important;margin-right:8px!important}
 html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .player-name{font-size:13px!important;max-width:min(160px,100%)}
 html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .player-meta{font-size:11px!important;margin-left:6px}
 html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .clock{min-width:88px!important;height:36px!important;font-size:22px!important;padding:0 8px!important}
 html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>.playerbar .turn-indicator{margin:0 6px!important;font-size:11px!important}
 html body #playView #play.play-area:has(>#board[data-presentation]) #moves .move-san{min-height:38px!important}
 html body #playView #play.play-area:has(>#board[data-presentation]) #actions button,html body #playView #play.play-area:has(>#board[data-presentation]) #flipBoard,html body #playView #play.play-area:has(>#board[data-presentation]) .gallant-toolbar:not([hidden]){min-height:44px!important;height:auto!important}
 html body #playView #play.play-area:has(>#board[data-presentation]) .gallant-toolbar:not([hidden]){height:44px!important}
 html body #playView #play.play-area:has(>#board[data-presentation]) #matchTabs button{height:44px!important}
 html body #playView #play.play-area:has(>#board[data-presentation]) #boardExpand{width:44px;height:44px}
 html body :is(#playView,#reviewView) #play.play-area:has(>#board[data-presentation])>#board>.board3d{inset:-1% -3%!important;width:106%!important;height:102%!important}
 html body #club #reviewView[data-ready=true]>.review-workspace{--pl-pad:6px;--pl-hpad:8px;--pl-bar:46px;--pl-gap:5px;--pl-board:min(100cqw,720px);display:flex!important;flex-direction:column!important;align-items:center!important;height:auto!important;padding:var(--pl-pad) var(--pl-hpad) 16px!important;gap:10px!important}
 html body #club #reviewView[data-ready=true] #reviewSidebar{align-self:stretch!important;width:auto!important;height:auto!important}
 /* Expand on phones: only the bars and the board, centred; the button stays in the corner to come back. */
 html body[data-board-expanded=true][data-match-active=true]>header,html body[data-board-expanded=true][data-match-active=true] .mobile-drawer,html body[data-board-expanded=true][data-match-active=true]>footer{display:none!important}
 html body[data-board-expanded=true][data-match-active=true]>main{padding:0!important}
 html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation]){--pl-board:min(calc(100cqw - 2*var(--pl-hpad)),calc(100dvh - 2*var(--pl-bar) - 2*var(--pl-gap) - 24px),720px);grid-template-rows:var(--pl-bar) var(--pl-board) var(--pl-bar)!important;min-height:100dvh!important;align-content:center!important;padding:12px var(--pl-hpad)!important}
 html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation])>#focusSidebar,html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation]) #matchEssential{display:contents!important}
 html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation])>.chatDock,html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation]) #matchPanel,html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation]) #matchEssential>:not(#boardExpand){display:none!important}
 html body[data-board-expanded=true] #playView #play.play-area:has(>#board[data-presentation]) #boardExpand{position:fixed!important;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));z-index:300;margin:0!important;background:#0e3637f0;box-shadow:0 4px 14px rgba(0,0,0,.45)}
}
