/* Keep game selection and the shared connection near the active game. */
@font-face{font-family:NotoGameEmoji;src:url('./fonts/NotoGameEmoji.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
body #playQuickGame,body #playQuickGame option,body .play-library-dialog .game-symbol{font-family:NotoGameEmoji,Inter,sans-serif!important}
body .playground-heading{margin-bottom:22px}
body .playground-heading>div{display:flex;align-items:baseline;gap:18px}
body .playground-heading h2{font-size:38px}
body .playground-heading #playCount{font-size:11px;margin:0}
.play-workspace-bar{position:sticky;top:0;z-index:12;display:grid;grid-template-columns:minmax(280px,.8fr) minmax(0,1.2fr);gap:26px;background:#f7f5ef;border-top:1px solid #ded9cf;border-bottom:1px solid #ded9cf;padding:15px 0;margin:0 0 25px}
.workspace-label,body .play-workspace-bar .model-switch>span{font-size:9px;font-weight:500;letter-spacing:1px;line-height:1.5;color:#8d765f;display:block;margin:0 0 7px}
.workspace-switch-row{display:grid;grid-template-columns:minmax(100px,.85fr) minmax(110px,1.15fr) auto;gap:8px;align-items:end}
.workspace-category-field,.workspace-game-field{min-width:0}
body #playGameCategory{width:100%;min-width:0;min-height:36px;padding:7px 24px 7px 10px;font-size:12px;background:#fffdf8}
body #playQuickGame{width:100%;min-width:0;min-height:36px;padding:7px 29px 7px 11px;font-size:12px;background:#fffdf8}
body .workspace-browse{white-space:nowrap;font-size:11px;padding:7px 11px;min-height:36px;background:transparent}
body .play-workspace-bar .playground-connections{position:relative;display:block;padding:0 0 0 25px;margin:0;border:0!important;border-left:1px solid #ded9cf!important;background:transparent!important;border-radius:0!important;min-width:0}
body .play-workspace-bar .playground-connection-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;align-items:end}
body .play-workspace-bar .model-switch{display:block;min-width:0;grid-column:1;grid-row:1;margin:0}
body .play-workspace-bar .model-switch>span{white-space:normal}
body .play-workspace-bar .model-switch select{max-width:none;min-height:36px;font-size:11px;padding:7px 9px;margin:0}
body .play-workspace-bar #connectionSettings{grid-column:2;grid-row:1;min-height:36px;font-size:11px}
body .play-workspace-bar .status{grid-row:2;grid-column:1;font-size:9px;line-height:1.5;white-space:normal;max-width:none}
body .play-workspace-bar .status .dot{width:5px;height:5px;flex:none}
.workspace-shared-note{grid-column:1/-1;font-size:9px;line-height:1.6;color:#928779}
body .play-workspace-bar .model-details{position:absolute;right:0;top:0;border:0!important;background:none;padding:0;margin:0;z-index:1;font-size:9px}
body .play-workspace-bar .model-details>summary{font-size:9px;color:#8d7c69;list-style:none}
body .play-workspace-bar .model-details>summary:after{content:' ⓘ'}
body .play-workspace-bar .model-details>summary::-webkit-details-marker{display:none}
body .play-workspace-bar .model-details[open] #modelPath{position:absolute;right:0;top:22px;width:290px;max-width:80vw;padding:14px;background:#fffdf8;border:1px solid #d8cbbb;border-radius:5px;box-shadow:0 8px 22px #30251b14;font-size:11px;overflow-wrap:anywhere}
body #showcasesView .scene-header{margin-bottom:16px;min-height:0}
body #showcasesView .scene-header h2{font-size:27px;margin:2px 0}
body #showcasesView .scene-kicker{font-size:9px}
body #showcasesView .play-grid,body #boardPlay .game-grid{display:grid;grid-template-columns:minmax(0,1fr) 282px;gap:22px;align-items:start}
body #gamesView .play-aside{display:flex;flex-direction:column;gap:12px;min-width:0}
body #gamesView .play-aside>.goal-card{padding:15px}
body #gamesView .play-aside>.goal-card h3{font-size:13px;line-height:1.65;margin:9px 0}
body #gamesView .play-aside .scene-stats{margin-top:13px;padding-top:12px;gap:13px}
body #gamesView .play-aside .scene-stats strong{font-size:22px}
body #gamesView .play-aside .scene-stats span{font-size:10px}
body #gamesView .play-aside .model-controller{gap:7px}
body #gamesView .play-aside .model-controller button{min-height:36px;font-size:11px;padding:8px 10px}
body #gamesView .play-seed-setup{padding:14px;margin:0;background:#f0ebe1;border-radius:6px!important;flex:none;width:100%}
.workspace-environment-heading{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:space-between;letter-spacing:.5px!important}
.workspace-environment-heading:before{display:none!important}
.workspace-environment-heading small{font-size:9px;letter-spacing:0;color:#8a705b;font-weight:400}
body #gamesView .seed-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px;margin-top:12px}
.seed-toolbar>label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body #gamesView .seed-toolbar :is(input,button){width:100%;min-width:0;min-height:34px;font-size:10px;margin:0;padding:7px 8px;white-space:normal}
body #gamesView .seed-toolbar input{font-size:11px;font-variant-numeric:tabular-nums}
.workspace-seed-help{margin:10px 0 0}
.workspace-seed-help summary{font-size:10px;color:#8d7d6b}
.workspace-seed-help .play-seed-description{font-size:10px;line-height:1.8;margin:9px 0 0}
.workspace-decision{margin:0;border-top:1px solid #ded9cf;padding-top:12px}
.workspace-decision>summary{font-size:11px;color:#897660}
body .workspace-decision .decision-card{border:0!important;background:none;padding:12px 0 0;box-shadow:none}
.workspace-decision .decision-heading{display:none}
.play-library-dialog{width:min(900px,calc(100vw - 40px));max-height:85dvh;border:1px solid #d8cbbb;border-radius:8px;padding:0;background:#f7f5ef;color:#25231f;box-shadow:0 25px 90px #28201529}
.play-library-dialog::backdrop{background:#29251f66}
.play-library-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:23px 26px;border-bottom:1px solid #ded9cf}
.play-library-heading h2{font-size:31px;line-height:1.2;letter-spacing:-.7px}
body .play-library-close{border:0;background:none;font-size:25px;line-height:1;min-width:36px;min-height:36px;padding:0}
.play-library-body{padding:22px 26px 26px;overflow:auto;max-height:calc(85dvh - 86px)}
body .play-library-dialog .play-library-tools{align-items:start;gap:18px;flex-direction:column}
body .play-library-dialog #playSearch{width:100%}
body .play-library-dialog .unified-picker .picker-row,body .play-library-dialog .unified-picker[data-filter=new] .picker-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
body .play-library-dialog .unified-picker{margin:0}
body .play-library-dialog .picker-row button{min-height:72px}
@media(max-width:1100px){.play-workspace-bar{gap:20px;grid-template-columns:minmax(230px,.8fr) minmax(0,1.2fr)}body .play-workspace-bar .playground-connections{padding-left:20px}body #showcasesView .play-grid,body #boardPlay .game-grid{grid-template-columns:minmax(0,1fr) 250px;gap:18px}}
@media(max-width:800px){.play-workspace-bar{position:static;grid-template-columns:1fr;gap:16px;padding:16px 0;margin-bottom:22px}body .play-workspace-bar .playground-connections{padding:14px 0 0;border-left:0!important;border-top:1px solid #ded9cf!important}body .play-workspace-bar .model-details{top:14px}.workspace-shared-note{grid-column:2;grid-row:2;font-size:8px;text-align:right;max-width:180px}body #showcasesView .play-grid,body #boardPlay .game-grid{grid-template-columns:1fr;gap:17px}body #gamesView .play-aside{display:grid;grid-template-columns:1fr 1fr;gap:12px}body #gamesView .workspace-decision{grid-column:1/-1}.play-library-heading{padding:18px}.play-library-heading h2{font-size:27px}.play-library-body{padding:18px}body .play-library-dialog .unified-picker .picker-row,body .play-library-dialog .unified-picker[data-filter=new] .picker-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){body .playground-heading h2{font-size:33px}body .playground-heading>div{gap:12px}body #gamesView .play-aside{display:flex}.workspace-shared-note{display:none}body .play-workspace-bar .model-details>summary{font-size:8px}.play-library-dialog{width:calc(100vw - 22px);max-height:90dvh}.play-library-body{max-height:calc(90dvh - 75px)}body .play-library-dialog .picker-row button{padding:10px;min-height:68px}body .play-library-dialog .picker-row .game-symbol{width:26px;height:26px;flex-basis:26px;font-size:18px}body .play-library-dialog .game-copy small{font-size:9px}body .play-library-dialog .play-filters{flex-wrap:wrap;overflow:visible}body .play-library-dialog .play-filters button{font-size:10px;padding:6px 8px}}
/* Reduce setup height so the board and its seed form enter the first viewport. */
body .shell:has(#gamesView:not(.hidden)) .mast{margin-bottom:24px}
body .playground-heading{margin-bottom:16px}
.play-workspace-bar{padding-top:12px;padding-bottom:12px;margin-bottom:20px}
.workspace-shared-note{display:none}
body #showcasesView .scene-header>div:first-child>.scene-kicker{display:none}

/* Compact only the surrounding controls. Game surface sizes and layout remain
   owned by their existing renderers and styles. */
body .shell:has(#gamesView:not(.hidden)) .mast{margin-bottom:12px;padding-bottom:12px}
body .shell:has(#gamesView:not(.hidden)) .foot{margin-top:12px;padding-top:8px}
body #gamesView .playground-heading{display:none}
body #gamesView .play-workspace-bar{grid-template-columns:minmax(300px,.9fr) minmax(0,1.6fr) auto;gap:12px;align-items:center;padding:10px 0;margin-bottom:14px}
body #gamesView .workspace-label,body #gamesView .play-workspace-bar .model-switch>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%)}
body #gamesView .workspace-switch-row{grid-template-columns:minmax(88px,.65fr) minmax(130px,1fr) auto;gap:6px}
body #gamesView .play-workspace-bar .playground-connections{display:flex;align-items:center;gap:8px;padding:0;border-left:0!important}
body #gamesView .play-workspace-bar .playground-connection-row{display:flex;align-items:center;gap:8px;flex:1;min-width:0}
body #gamesView .play-workspace-bar .model-switch{flex:1;min-width:0}
body #gamesView.has-participants .play-workspace-bar .model-switch{display:none}
body #gamesView .play-workspace-bar #connectionSettings{flex:none;padding:7px 10px;white-space:nowrap}
body #gamesView .play-workspace-bar .status{flex:none;position:relative;margin:0}
body #gamesView .play-workspace-bar #status{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body #gamesView .play-workspace-bar .model-details{position:relative;top:auto;right:auto;flex:none}
body #gamesView .play-workspace-bar .model-details>summary{font-size:0;min-width:20px;min-height:32px;display:grid;place-items:center}
body #gamesView .play-workspace-bar .model-details>summary:after{content:'ⓘ';font-size:15px}
body #gamesView .play-workspace-bar .model-details[open] #modelPath{top:36px}
.workspace-environment{position:relative;z-index:2;margin:0;padding:0}
.workspace-environment>summary{list-style:none;cursor:pointer;white-space:nowrap;border:1px solid var(--line);border-radius:5px;padding:8px 10px;font-size:11px;min-height:36px;display:flex;align-items:center;gap:6px}
.workspace-environment>summary:after{content:'⌄'}
.workspace-environment>summary::-webkit-details-marker{display:none}
body #gamesView .workspace-environment .play-seed-setup{position:absolute;right:0;top:calc(100% + 6px);width:290px;max-width:calc(100vw - 32px);box-shadow:0 8px 24px #30251b20;background:#fffdf8}
body #gamesView .play-aside{gap:8px}
body #gamesView .play-aside>.goal-card{padding:12px}
body #gamesView .play-aside>.goal-card h3{margin:6px 0}
body #gamesView .play-aside .scene-stats{margin-top:8px;padding-top:8px;gap:8px}
body #gamesView .play-aside .model-controller{display:grid;grid-template-columns:1fr 1fr;gap:6px}
body #gamesView .model-controller .primary{grid-column:1/-1;order:0}
body #gamesView .model-controller .quiet{order:2}
body #gamesView #showcaseAuto{order:1}
body #gamesView.has-participants .model-controller .primary{grid-column:auto}
body #gamesView.has-participants #showcaseAuto{display:none}
body #gamesView .model-controller [hidden]{display:none!important}
body #gamesView .workspace-decision{padding-top:8px}
body #gamesView .play-aside .scene-details{margin:0;padding:0;border:0}
body #gamesView .play-aside :is(.scene-details details,.workspace-result,#gameInput){margin:0;padding:8px 0;border:0;border-top:1px solid #ded9cf;font-size:11px}
body #gamesView .play-aside :is(.scene-details summary,.workspace-result>summary,#gameInput>summary){font-size:11px}
body #gamesView #showcaseActions{margin:12px 0 0;gap:6px}
body #gamesView #showcaseActions button{min-height:36px;padding:7px 12px}
body #gamesView #showcasesView:is([data-kind=doudizhu],[data-kind=texas_holdem],[data-kind=zha_jin_hua],[data-kind=property_tycoon]) #keyboardHint{display:none}
@media(max-width:1100px){
 body #gamesView .play-workspace-bar{grid-template-columns:minmax(0,1fr) auto}
 body #gamesView .play-workspace-switcher{grid-column:1}
 body #gamesView .play-workspace-bar .playground-connections{grid-column:1/-1;grid-row:2}
 body #gamesView .workspace-environment{grid-column:2;grid-row:1}
}
@media(max-width:800px){
 body #gamesView .play-workspace-bar .playground-connections{padding:0;border-top:0!important}
 body #gamesView .workspace-switch-row{grid-template-columns:minmax(80px,.65fr) minmax(110px,1fr) auto}
}
@media(max-width:520px){
 body #gamesView .play-workspace-bar{grid-template-columns:minmax(0,1fr);gap:8px}
 body #gamesView .workspace-environment{grid-column:1;grid-row:3;justify-self:end}
 body #gamesView .playground-connection-row{flex-wrap:wrap}
 body #gamesView .play-workspace-bar .model-details{align-self:flex-end}
 body #gamesView .workspace-browse{padding:7px}
}

/* Denser controls and bounded decision panels; no game-surface sizing rules. */
body #gamesView .play-workspace-bar{padding:6px 0;margin-bottom:8px;gap:8px}
body #gamesView .play-workspace-bar :is(select,button,.workspace-environment>summary){min-height:32px;padding-top:5px;padding-bottom:5px}
body #gamesView .play-workspace-bar .participant-controls :is(select,button){min-height:32px;padding-top:5px;padding-bottom:5px}
body #gamesView .workspace-environment>summary{min-height:32px;padding:5px 8px}
body #gamesView #showcasesView .scene-header{margin-bottom:8px}
body #gamesView #showcaseActions{margin-top:6px;padding:0;gap:4px}
body #gamesView #showcaseActions button{min-height:32px;padding:5px 10px}
body #gamesView .social-actions{min-height:0;padding:6px 8px;gap:6px;grid-template-columns:1fr}
body #gamesView .social-actions--cards{grid-template-columns:auto minmax(140px,1fr)}
body #gamesView .social-actions__intro{display:none}
body #gamesView .social-actions__buttons{justify-content:flex-start;gap:4px}
body #gamesView .social-actions__buttons button{min-width:72px}
body #gamesView .social-actions__picker{grid-column:auto;gap:0}
body #gamesView .social-actions__picker>span{display:none}
body #gamesView .social-actions__picker select{height:32px;padding:3px 8px}
body #gamesView #keyboardHint{display:none}
body #gamesView .play-aside{gap:5px;min-height:0;max-height:var(--workspace-panel-height,calc(100dvh - 220px));overflow-y:auto;overscroll-behavior-y:contain;overflow-anchor:none;scrollbar-width:thin}
body #gamesView .play-aside>*{flex-shrink:0}
body #gamesView .play-aside>.goal-card{padding:8px 10px}
body #gamesView .goal-card>.scene-kicker{display:none}
body #gamesView .play-aside>.goal-card h3{margin:0;font-size:12px;line-height:1.45}
body #gamesView #gameRules{margin:3px 0;font-size:11px;line-height:1.4}
body #gamesView .play-aside .scene-stats{margin-top:5px;padding-top:5px;gap:4px 14px;flex-wrap:wrap}
body #gamesView .play-aside .scene-stats strong{font-size:20px;line-height:1.15}
body #gamesView .play-aside .scene-stats span{margin-top:1px}
body #gamesView .play-aside .model-controller{gap:4px}
body #gamesView :is(#showcasesView,#boardPlay) .play-aside .model-controller button{min-height:32px;padding:5px 8px}
body #gamesView .play-aside :is(.workspace-decision,.workspace-result,.scene-details details,#gameInput){padding:5px 0}
body #gamesView .play-aside>.scene-details{display:flex;flex-direction:column;min-height:0;flex:1 1 auto}
body #gamesView .play-aside .scene-details>details{flex-shrink:0}
body #gamesView :is(#decisionDetails,.workspace-result)[open]{display:flex;flex-direction:column;min-height:0;flex:1 1 auto;overflow:hidden}
body #gamesView :is(#decisionDetails,.workspace-result)>summary{flex:none;line-height:1.5}
body #gamesView :is(#showcaseResult,#gameResult){min-height:0;max-height:320px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;overflow-wrap:anywhere}
body #gamesView :is(#showcaseResult,#gameResult):focus-visible{outline:1px solid #8d765f;outline-offset:-1px}
body #gamesView .play-aside .result{margin-top:5px;padding:8px;border-radius:5px}
body #gamesView .play-aside .result>.eyebrow{display:none}
body #gamesView .play-aside .result h3{font-size:15px;line-height:1.3;margin:0 0 4px;overflow-wrap:anywhere}
body #gamesView .play-aside .bars{margin-top:4px}
body #gamesView .play-aside .barrow{grid-template-columns:minmax(48px,.8fr) minmax(30px,1fr) 42px;gap:5px;margin:3px 0;font-size:11px;line-height:1.35}
body #gamesView .play-aside .result-timing{font-size:10px;line-height:1.4;margin-top:5px}
body #gamesView .play-aside .result details{margin-top:5px;padding:4px 0 0}
body #gamesView .play-aside .result details p{margin:5px 0;font-size:11px;line-height:1.4}
body #gamesView .play-aside pre{margin:5px 0;padding:6px;font-size:10px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}
body #gamesView .play-aside .field{margin:6px 0}
body #gamesView .play-aside .field-title{font-size:10px;margin-bottom:3px}
body #gamesView .play-aside .options{grid-template-columns:1fr;gap:3px}
body #gamesView .play-aside .option{padding:4px 6px;border-radius:4px;font-size:11px;line-height:1.4}
body #gamesView .play-aside .option b{padding:0 4px;margin-right:4px}
body #gamesView :is(#showcaseFields,#gameFields){max-height:220px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
body #gamesView .workspace-decision .decision-card{padding:5px 0 0}
body #gamesView #lastDecision{font-size:12px;margin:3px 0;line-height:1.4}
body #gamesView .move-history{max-height:100px;line-height:1.5}
body #gamesView .move-history div{padding:2px 0}
@media(max-width:800px){body #gamesView .play-aside{max-height:none;overflow:visible}body #gamesView :is(#showcaseResult,#gameResult){max-height:280px}}
@media(max-width:520px){body #gamesView .social-actions--cards{grid-template-columns:1fr}body #gamesView .social-actions__buttons button{min-height:36px}}

#showcaseResult .decision-origin{font-size:11px;line-height:1.5;color:#526a6e;margin-bottom:4px}
