/* Playroom: a compact arcade screen. Portfolio styles stay outside this page. */
.playroom-page { background:#102746; color:#e9f3ff; --arcade-ink:#102744; --arcade-gold:#ffd565; --arcade-panel:#1c3b61; --arcade-line:#4c739e; }
[data-theme=light] .playroom-page { background:#e7f0f8; color:#173a5a; }
.playroom-page .site-header .nav { min-height:64px; height:auto; padding-block:9px; display:flex; flex-wrap:nowrap; gap:16px; }
.playroom-page .site-header .brand { font-size:18px; white-space:nowrap; }
.playroom-page .brand-leaf { width:25px; height:29px; }
.playroom-page .site-header .nav-actions { display:flex; align-items:center; gap:18px; }
.playroom-page .site-header .nav-actions>nav { width:auto; order:initial; flex-wrap:nowrap; }
.playroom-page .playroom-back { font-size:12px; white-space:nowrap; }
.playroom-page .site-header .theme-picker { margin-left:0; }
.playroom-page .theme-picker summary { height:38px; padding:0 12px; }
.arcade.wrap { width:calc(100% - 32px); max-width:740px; padding-block:27px 45px; border:0; position:relative; }
.legacy-game-anchor { position:absolute; top:0; }
.arcade-heading { text-align:center; margin-bottom:23px; }
.arcade-heading h1 { font:900 31px/1 'Trebuchet MS',var(--sans); letter-spacing:1.3px; margin:0; }
.arcade-heading h1>span { color:#efba41; }
.arcade-heading>p { font-size:12px; margin:9px 0 0; opacity:.7; }
.playroom-page .sound-toggle { display:inline-flex; align-items:center; gap:7px; margin-top:14px; min-height:36px; padding:6px 12px; font-size:10px; }
.sound-toggle svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.sound-toggle svg>path:first-child { fill:currentColor; stroke:none; }
.sound-toggle .sound-slash,.sound-toggle[aria-pressed="false"] .sound-waves { display:none; }
.sound-toggle[aria-pressed="false"] .sound-slash { display:block; }
.playroom-page .sound-toggle[aria-pressed="false"] { color:#c2cddd; background:#253d56; }
.arcade-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; max-width:508px; margin:0 auto; }
.arcade-tab { display:flex; align-items:center; gap:12px; min-width:0; padding:10px; text-align:left; border:2px solid #45658d; border-bottom-width:5px; border-radius:15px; background:#193556; color:#d9e7fa; transition:background .15s,translate .15s; }
.arcade-tab[aria-selected=true] { background:#ffd565; border-color:#a96c29; color:#2e3542; }
.arcade-tab[aria-selected=true]:after { content:''; width:8px; height:8px; margin-left:auto; border-radius:50%; background:#5e471c; box-shadow:inset 0 1px #fff5; }
.arcade-tab strong { display:block; font-size:16px; letter-spacing:-.3px; font-weight:850; }
.arcade-tab small { display:block; font-size:8px; font-weight:800; letter-spacing:1.1px; margin-top:5px; opacity:.7; }
.tab-art { width:47px; height:47px; flex:0 0 47px; overflow:hidden; border:2px solid #1a2f49; border-radius:11px; display:grid; place-items:center; }
.tab-art img { width:100%; height:100%; object-fit:cover; }
.cat-tab-art { background:#94d4e3; }
.cat-tab-art img { object-fit:contain; width:38px; height:47px; margin-top:6px; }
.blocks-tab-art img { width:106px; max-width:none; }
.arcade-load-status { font-size:12px; text-align:center; min-height:0; margin:0; }
.arcade-load-status:not(:empty) { padding:14px 0; }
.game-panel { margin-top:22px; }
.game-panel[hidden] { display:none; }
.arcade-layout { display:flex; flex-direction:column; align-items:center; gap:16px; }
.playroom-page :is(.block-game,.canvas-game) { width:100%; max-width:508px; min-width:0; padding:17px; border:3px solid #4d749d; border-radius:24px; background:#1b395d; color:#ecf5ff; box-shadow:0 9px 0 #091c32,inset 0 2px #ffffff17; align-self:center; }
.playroom-page :is(.block-topbar,.canvas-game-heading) { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 1px 13px; border-bottom:1px solid #3c5d80; }
.playroom-page .block-game-name { display:flex; align-items:center; gap:8px; }
.playroom-page :is(.block-game-name h3,.canvas-game-heading h3) { color:#eef7ff; font:900 22px/1.1 'Trebuchet MS',var(--sans); letter-spacing:.1px; margin:0; }
.playroom-page .block-glyph { color:#ffd565; font-size:28px; }
.game-tag { color:#a5bedc; font-size:11px; font-weight:800; }
.playroom-page :is(.block-hud,.canvas-hud) { display:grid; grid-template-columns:1fr 1.4fr 1fr; align-items:center; padding:17px 1px 18px; gap:8px; }
.playroom-page :is(.block-hud,.canvas-hud)>div { display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center; min-width:0; }
.playroom-page :is(.block-hud,.canvas-hud) span { color:#a8c4e4; font-size:10px; font-weight:800; letter-spacing:1.3px; margin:0; }
.playroom-page :is(.block-hud,.canvas-hud) b { color:#e8f3ff; font-size:27px; font-weight:900; letter-spacing:-.7px; line-height:1; margin:0; font-variant-numeric:tabular-nums; }
.playroom-page :is(.block-hud,.canvas-hud) .score-main b { color:#ffda73; font-size:46px; text-shadow:0 3px #805b36; }
.playroom-page .block-board { background:#102644; border:2px solid #0a1b32; border-radius:11px; padding:7px; gap:4px; box-shadow:inset 0 2px 6px #08172e80,0 1px #6388af; }
.playroom-page .block-row { gap:4px; }
.playroom-page .block-cell { background:#1a3557; border-color:#25466b; border-radius:5px; box-shadow:inset 0 1px 2px #08172e50; }
.playroom-page .block-cell.preview { background:color-mix(in srgb,var(--gem) 25%,transparent); border:1px dashed var(--gem-light); }
.playroom-page .block-cell.invalid { background:repeating-linear-gradient(135deg,#68708566,#68708566 2px,#26324b 2px,#26324b 5px); }
.playroom-page .block-tray { margin:12px 0; gap:9px; }
.playroom-page .piece-button { height:114px; border:2px solid #35587f; border-radius:11px; background:#153151; gap:8px; }
.playroom-page .piece-button[aria-pressed=true] { background:#254a72; border-color:#edc665; }
.playroom-page .piece-button:not(:disabled):hover { background:#264a70; }
.playroom-page .piece-button:disabled { background:#153151; border-color:#2a496b; }
.playroom-page .mini-shape { --unit:21px; }
.playroom-page .piece-label { color:#b2c8e1; font-size:8px; }
.playroom-page .piece-label kbd { color:#ffda73; }
.playroom-page .block-controls { display:grid; grid-template-columns:auto 1fr auto; gap:9px; align-items:center; }
.playroom-page .block-controls>p { font-size:10px; line-height:1.4; max-width:none; text-align:center; color:#a9c3df; margin:0; }
.playroom-page :is(.button,.text-button) { display:inline-flex; align-items:center; justify-content:center; gap:9px; min-height:45px; padding:10px 15px; border:2px solid #0c2645; border-bottom-width:5px; border-radius:12px; background:#ffce59; color:#3c351e; box-shadow:inset 0 2px #fff8; font:900 14px/1 'Trebuchet MS',var(--sans); letter-spacing:.5px; transition:filter .12s,translate .12s; text-transform:uppercase; }
.playroom-page .text-button { padding:8px 10px; background:#31577f; color:#e5f0ff; border-color:#102745; font-size:10px; min-height:41px; box-shadow:inset 0 1px #ffffff28; }
.playroom-page :is(.button,.text-button):hover:not(:disabled) { color:inherit; filter:brightness(1.08); transform:none; }
.playroom-page :is(.button,.text-button):active:not(:disabled) { translate:0 3px; border-bottom-width:2px; margin-bottom:3px; }
.playroom-page :is(.button,.text-button):disabled { opacity:.45; cursor:default; }
.playroom-page :is(button,summary,a):focus-visible { outline:3px solid #ffdb7a; outline-offset:4px; }
.playroom-page .block-options { margin-top:17px; padding-top:14px; border-top:1px solid #3b5b7c; display:flex; flex-direction:column; gap:9px; }
.block-material-label { font-size:9px; letter-spacing:1.4px; font-weight:800; color:#a8c4e4; margin:0; }
.block-skins { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.block-skins button { display:flex; align-items:center; justify-content:center; gap:9px; min-height:46px; padding:7px; background:#284c72; color:#dcecff; border:2px solid #3e668d; border-bottom-width:4px; border-radius:10px; font-size:11px; font-weight:800; }
.block-skins button[aria-pressed=true] { background:#ffd565; border-color:#ad7939; color:#3b361f; }
.skin-swatch { display:grid; grid-template-columns:repeat(2,10px); grid-template-rows:repeat(2,10px); gap:1px; }
.skin-swatch i { width:10px; height:10px; border-radius:2px; }
.skin-swatch i:last-child { grid-column:2; }
.skin-brick i { border:1px solid #713b31; background:linear-gradient(0deg,transparent 42%,#713b31 42% 55%,transparent 55%),#d67a55; }
.skin-earth i { border:1px solid #654b2f; background:linear-gradient(#94b862 0 30%,#5d7d40 30% 40%,#aa784a 40%); }
.skin-candy i { border:1px solid #a34f88; background:repeating-linear-gradient(135deg,#f5a1cb 0 4px,#fff0f8 4px 6px); border-radius:3px; }
.playroom-page .block-status,.canvas-status { color:#a8c4e4; font-size:10px; line-height:1.5; padding:9px 0 0; margin:9px 0 0; border:0; min-height:25px; text-align:center; }
.game-help { width:100%; max-width:508px; border-top:1px solid #496582; padding:4px 3px 0; font-size:12px; color:inherit; }
.game-help>summary { cursor:pointer; display:flex; align-items:center; justify-content:space-between; list-style:none; font-size:10px; letter-spacing:1.1px; font-weight:800; min-height:42px; }
.game-help>summary::-webkit-details-marker { display:none; }
.game-help>summary>span { display:grid; place-items:center; width:22px; height:22px; border:2px solid currentColor; border-radius:50%; font-size:12px; }
.game-help p,.game-help li { line-height:1.7; opacity:.8; }
.game-help ol { margin:8px 0; padding-left:21px; }
.game-help li+li { margin-top:8px; }
.playroom-page .block-cover { inset:0; background:#102848eF; border:2px solid #355c86; border-radius:11px; backdrop-filter:blur(2px); padding:20px; }
.playroom-page .cover-shape { margin-bottom:16px; transform:none; scale:1.25; }
.playroom-page .game-kicker { color:#a9c6e7; font-size:9px; letter-spacing:2px; }
.playroom-page .block-cover h4 { font:900 42px/1 'Trebuchet MS',var(--sans); color:#ffda73; letter-spacing:1px; margin:0 0 13px; text-shadow:0 3px #6b5438; }
.playroom-page .block-cover>p:not(.game-kicker) { color:#d5e4f4; font-size:13px; line-height:1.6; margin:0 0 20px; }
.playroom-page .block-cover .button { min-width:165px; min-height:55px; font-size:20px; }
.playroom-page .block-toast { background:#ffda73; color:#172d46; border:2px solid #8f6936; border-radius:10px; font-weight:800; font-size:12px; }
.canvas-game-heading .pause-button { min-height:34px; padding:7px 9px; font-size:9px; }
.canvas-stage { position:relative; overflow:hidden; border:2px solid #0b2038; border-radius:13px; background:#88ccdd; }
.canvas-stage canvas { display:block; width:100%; height:auto; aspect-ratio:3/4; outline-offset:-5px; }
.canvas-overlay { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:20px; background:#153454ed; color:#eff6ff; }
.canvas-overlay[hidden] { display:none; }
.start-mascot { width:86px; height:106px; object-fit:contain; margin:0 0 10px; filter:drop-shadow(0 5px #07192d66); }
.canvas-overlay h4 { font:900 32px/1.05 'Trebuchet MS',var(--sans); letter-spacing:.6px; color:#ffda73; text-shadow:0 3px #725537; max-width:260px; margin:9px 0 13px; }
.canvas-overlay p { font-size:13px; line-height:1.6; max-width:250px; color:#d5e7fa; margin:0 0 24px; }
.canvas-overlay .button { min-width:160px; min-height:55px; font-size:20px; }
.canvas-controls { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:13px; }
.quick-controls { color:#a9c5e3; font-size:10px; font-weight:800; letter-spacing:.6px; }
.playroom-page .arcade-result { width:min(354px,calc(100% - 28px)); max-height:90dvh; border:0; padding:0; background:#1c3b61; color:#f0f6ff; border-radius:24px; box-shadow:0 10px 0 #06192db0,0 20px 65px #0006; overflow:auto; }
.arcade-result::backdrop { background:#071528c9; backdrop-filter:blur(2px); }
.arcade-result[open] { animation:result-pop .18s ease-out both; }
.arcade-result-inner { position:relative; border:3px solid #5682ae; border-radius:24px; padding:24px 21px 21px; overflow:hidden; isolation:isolate; text-align:center; }
.playroom-page .result-close { position:absolute; right:10px; top:9px; width:29px; height:29px; min-height:0; padding:0; display:grid; place-items:center; border:2px solid #12304e; border-radius:8px; background:#3d648c; color:#e9f4ff; font-size:21px; line-height:1; }
.result-game-name { margin:0 0 12px; font-size:10px; font-weight:850; letter-spacing:1.4px; color:#abc8e6; text-transform:uppercase; }
.playroom-page .arcade-result h2 { font:900 36px/1.05 'Trebuchet MS',var(--sans); margin:0 0 22px; letter-spacing:.5px; color:#ffd565; text-shadow:0 4px #825731; }
.result-scoreboard { position:relative; border:3px solid #0f2947; background:#f7efd7; color:#163451; padding:17px 13px 0; border-radius:17px; box-shadow:inset 0 3px #fff8; }
.score-caption { display:block; font-size:11px; letter-spacing:2px; font-weight:850; color:#6b746f; }
#arcade-result-score { display:block; font:900 73px/1.18 'Trebuchet MS',var(--sans); letter-spacing:-2px; font-variant-numeric:tabular-nums; }
.new-record { display:inline-block; padding:5px 11px; margin:0 0 10px; border:2px solid #a97027; border-radius:99px; background:#ffd565; color:#604722; font-size:10px; font-weight:900; letter-spacing:.7px; }
.new-record[hidden] { display:none; }
.result-metrics { display:grid; grid-template-columns:1fr 1fr; margin:8px -13px 0; background:#e5ddc7; border-top:2px solid #c6c5b3; border-radius:0 0 13px 13px; }
.result-metrics>div { padding:13px 8px; display:flex; flex-direction:column; gap:6px; }
.result-metrics>div+div { border-left:2px solid #c6c5b3; }
.result-metrics span { font-size:9px; font-weight:850; letter-spacing:1px; color:#69716b; }
.result-metrics b { font-size:23px; font-weight:900; line-height:1; font-variant-numeric:tabular-nums; }
#arcade-result-summary { font-size:12px; color:#bcd2e9; line-height:1.5; margin:15px 0; }
.result-actions { display:flex; flex-direction:column; gap:10px; }
.playroom-page .result-actions .button { min-height:52px; font-size:18px; border-color:#102844; }
.result-actions svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; }
.playroom-page .result-actions .button-secondary { background:#315b84; color:#d7e8fa; font-size:11px; min-height:42px; border-bottom-width:3px; }
.result-burst { position:absolute; inset:0; pointer-events:none; z-index:-1; overflow:hidden; }
.result-burst i { position:absolute; left:var(--x); top:-15px; width:8px; height:12px; border-radius:2px; background:var(--confetti); animation:confetti-drop 1.3s var(--delay) ease-out both; }
.playroom-page footer { max-width:740px; font-size:10px; padding-block:22px; opacity:.65; }
@keyframes result-pop { from { opacity:0; transform:translateY(12px) scale(.95); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes confetti-drop { from { opacity:0; transform:translateY(0) rotate(0); } 15% { opacity:1; } to { opacity:0; transform:translateY(var(--fall)) rotate(var(--spin)); } }
@media(max-width:520px) {
 .playroom-page .site-header .nav { gap:11px; min-height:60px; }
 .playroom-page .site-header .brand { font-size:15px; gap:7px; }
 .playroom-page .site-header .nav-actions { gap:11px; }
 .playroom-page .theme-picker summary { width:34px; height:34px; padding:0; }
 .playroom-page .playroom-back { font-size:0!important; }
 .playroom-page .playroom-back:before { content:'Portfolio'; font-size:11px; }
 .arcade.wrap { width:calc(100% - 24px); padding-block:22px 28px; }
 .arcade-heading { margin-bottom:18px; }
 .arcade-heading h1 { font-size:27px; }
 .arcade-heading>p { font-size:11px; }
 .arcade-tab { padding:8px; gap:8px; min-height:64px; border-radius:12px; }
 .arcade-tab strong { font-size:14px; }
 .arcade-tab small { font-size:7px; }
 .tab-art { width:37px; height:37px; flex-basis:37px; border-radius:8px; }
 .cat-tab-art img { height:38px; width:31px; }
 .blocks-tab-art img { width:84px; }
 .game-panel { margin-top:17px; }
 .playroom-page :is(.block-game,.canvas-game) { padding:11px; border-radius:19px; }
 .playroom-page :is(.block-game-name h3,.canvas-game-heading h3) { font-size:19px; }
 .playroom-page :is(.block-hud,.canvas-hud) { padding-block:14px; }
 .playroom-page :is(.block-hud,.canvas-hud) b { font-size:24px; }
 .playroom-page :is(.block-hud,.canvas-hud) .score-main b { font-size:40px; }
 .playroom-page .block-board { padding:5px; gap:3px; }
 .playroom-page .block-row { gap:3px; }
 .playroom-page .piece-button { height:95px; padding:5px; }
 .playroom-page .mini-shape { --unit:16px; }
 .playroom-page .block-controls>p { font-size:9px; }
 .playroom-page .text-button { font-size:9px; padding:7px; }
 .block-skins button { gap:6px; font-size:10px; }
 .canvas-overlay h4 { font-size:30px; }
 .quick-controls { font-size:9px; }
}
@media(prefers-reduced-motion:reduce) { .arcade-tab,.playroom-page :is(.button,.text-button) { transition:none; } .arcade-result[open],.result-burst i { animation:none; } }
.playroom-page .block-game { max-width:440px; scroll-margin-top:0; }
.playroom-page .canvas-game { max-width:400px; scroll-margin-top:0; }
.arcade-tabs,.game-help { max-width:440px; }

html:has(.playroom-page) { scroll-padding-top:70px; }
.playroom-page .block-tray .piece-button { height:104px; }
.playroom-page :is(.block-hud,.canvas-hud) { padding-block:12px; }
.playroom-page :is(.block-hud,.canvas-hud) .score-main b { font-size:42px; }
@media(max-width:520px) { .playroom-page .block-tray .piece-button { height:92px; } }
