#board.wave6-board,[data-board-slot=board].wave6-board{display:block!important;width:100%;box-sizing:border-box;padding:14px!important;background:#f5f9f7;border-radius:18px;min-width:0}
.wave6-game{width:100%;max-width:500px;margin:auto;text-align:center;color:#173c3f}
.wave6-summary{margin:8px 0;font-size:14px;font-weight:650;line-height:1.45}
.wave6-note{font-size:12px;line-height:1.5;color:#597271;margin:12px 0 0}
.wave6-button{min-width:44px;min-height:44px;border:1px solid #a4c4b5!important;border-radius:11px!important;background:#fff;color:#173c3f;font-size:16px;font-weight:700;cursor:pointer;touch-action:manipulation;padding:8px!important;line-height:1.2!important}
.wave6-button:hover:enabled{background:#e3f0e8;box-shadow:0 2px 8px #12383a18}
.wave6-button:focus-visible{outline:3px solid #228573;outline-offset:3px}
.wave6-button:disabled{cursor:default;opacity:.42}
.maze-map{display:block;width:100%;max-width:330px;aspect-ratio:1;margin:0 auto 12px;overflow:visible;border-radius:6px}
#board.wave6-board .maze-floor,[data-board-slot=board].wave6-board .maze-floor{fill:#fff;stroke:none}
#board.wave6-board .maze-wall,[data-board-slot=board].wave6-board .maze-wall{fill:none;stroke:#19494b;stroke-width:2px;vector-effect:non-scaling-stroke;stroke-linecap:square}
#board.wave6-board .maze-player,[data-board-slot=board].wave6-board .maze-player{fill:#147e66;stroke:#fff;stroke-width:1px;vector-effect:non-scaling-stroke}
#board.wave6-board .maze-exit,[data-board-slot=board].wave6-board .maze-exit{fill:#dca34c;stroke:none}
.maze-pad{display:grid;grid-template-columns:repeat(4,minmax(44px,1fr));gap:8px;max-width:300px;margin:auto;direction:ltr}
.maze-pad .wave6-button{font-size:23px}
.flood-grid{display:grid;grid-template-columns:repeat(var(--side),1fr);max-width:300px;margin:10px auto;gap:3px;aspect-ratio:1;border-radius:12px;overflow:hidden}
.flood-cell{display:grid;place-items:center;font-size:14px;font-weight:700;border-radius:4px;border:1px solid #ffffff70}
.flood-cell.captured{box-shadow:inset 0 0 0 2px #173d3b}
.tone-0{background:#c9e6d6!important;color:#123d32!important}.tone-1{background:#f6d982!important;color:#56411a!important}.tone-2{background:#9dd4e5!important;color:#17445c!important}.tone-3{background:#e8b5c9!important;color:#672d47!important}.tone-4{background:#c4b9e5!important;color:#41305d!important}.tone-5{background:#efb887!important;color:#663718!important}
.flood-palette{display:grid;grid-template-columns:repeat(var(--colours,5),minmax(44px,1fr));gap:6px;max-width:330px;margin:auto}
.flood-palette .wave6-button:disabled{opacity:1;box-shadow:inset 0 0 0 3px #173d3b}
.relay-chain{padding:10px;background:#e4f1e9;border-radius:10px;max-height:82px;overflow:auto;font-size:18px;font-weight:700;line-height:1.6;overflow-wrap:anywhere}
.relay-checks{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin:8px 0 12px;font-size:12px}
.relay-checks span{border:1px dashed #bca16e;padding:5px;border-radius:6px}.relay-checks .passed{border-color:#1d785b;background:#e0eee3}
.relay-tray{display:grid;grid-template-columns:repeat(4,minmax(44px,1fr));gap:8px}.relay-tray .wave6-button{min-height:48px}.relay-tray .used{opacity:.2}
@media(max-width:900px){#board.wave6-board,[data-board-slot=board].wave6-board{padding:10px!important}.maze-map{max-width:290px;margin-bottom:8px}.flood-grid{max-width:250px}.wave6-note{font-size:11px;margin-top:8px}.wave6-summary{margin:5px 0}.relay-tray{gap:6px}.relay-chain{font-size:16px;max-height:58px}.relay-tray .wave6-button{min-height:44px}.relay-checks{margin:5px 0 8px}}
@media(max-width:360px){.relay-tray .wave6-button{font-size:14px}.flood-palette{gap:5px}.maze-map{max-width:255px}}
/* Preserve the shared shell;compact only the three new game panels. */
@media(max-width:900px){
 .game-layout:is([data-newgame=maze],[data-newgame=flood],[data-newgame=relay]) .game-panel{padding:12px!important}
 .game-layout:is([data-newgame=maze],[data-newgame=flood],[data-newgame=relay]) .play-heading{margin:0 0 8px!important;padding-bottom:8px!important}
 .game-layout:is([data-newgame=maze],[data-newgame=flood],[data-newgame=relay]) #title{font-size:21px!important;line-height:1.25!important;margin:8px 0!important}
 .game-layout:is([data-newgame=maze],[data-newgame=flood],[data-newgame=relay]) .game-rules-row{margin:4px 0!important;padding:0!important}
 .game-layout:is([data-newgame=maze],[data-newgame=flood],[data-newgame=relay]) .content-tier-controls{margin:4px 0 6px!important}
 .game-layout:is([data-newgame=maze],[data-newgame=flood],[data-newgame=relay]) .flood-grid{max-width:230px}
 .game-layout:is([data-newgame=maze],[data-newgame=flood],[data-newgame=relay]) .maze-map{max-width:270px}
}

/* Expert controls stay in the original three-column workspace. */
.relay-tray.relay-expert{grid-template-columns:repeat(6,minmax(44px,1fr));gap:5px}
.relay-expert .wave6-button{font-size:13px;padding:4px!important;white-space:nowrap}
.maze-switch{font:bold 11px sans-serif!important;fill:#4b326d!important;stroke:#fff!important;stroke-width:.7px!important;paint-order:stroke}
#board .maze-gate line,[data-board-slot=board] .maze-gate line{stroke-width:3px;vector-effect:non-scaling-stroke}
#board .maze-gate.opened line,[data-board-slot=board] .maze-gate.opened line{stroke:#267757;stroke-dasharray:2 3}
#board .maze-gate.closed line,[data-board-slot=board] .maze-gate.closed line{stroke:#b54435}
#board .maze-gate text,[data-board-slot=board] .maze-gate text{font:bold 8px sans-serif!important;fill:#603d27!important;stroke:#fff!important;stroke-width:1px!important;paint-order:stroke}
.maze-state{direction:ltr;unicode-bidi:isolate;font-size:12px;overflow-wrap:anywhere}
.boss-play-status{font-size:13px;line-height:1.5;margin:4px 0 8px;padding:6px 8px;background:#f8eedb;border-radius:8px}
.boss-hint-scope{padding:8px;border:1px solid #c7ae78;border-radius:8px;line-height:1.5}
@media(max-width:900px){.boss-workspace .wave6-game .wave6-note{display:none}.boss-workspace .maze-map{max-width:245px}.boss-workspace .flood-grid{max-width:220px}.boss-workspace .game-panel .new-game-actions{margin-top:10px!important}.boss-workspace .relay-chain{max-height:48px}.boss-workspace .relay-checks span{padding:3px}}
@media(max-width:370px){.relay-tray.relay-expert{grid-template-columns:repeat(5,minmax(44px,1fr))}.flood-palette{gap:3px}.flood-palette .wave6-button{min-width:40px}}
.boss-studio-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}.boss-studio-filters label{display:grid;gap:5px}.boss-studio-filters select{min-height:44px;max-width:100%;width:100%}
@media(max-width:600px){.boss-studio-filters{grid-template-columns:1fr}.boss-preview{padding:12px;max-width:calc(100vw - 24px)}}
@media(max-width:900px){
 #main:has(#newgame-scope.boss-workspace:is([data-newgame=maze],[data-newgame=flood],[data-newgame=relay])) .new-game-choice{display:none}
 #newgame-scope.boss-workspace .maze-map{max-width:225px!important}
 #newgame-scope.boss-workspace .maze-state{font-size:11px;line-height:1.4}
 #newgame-scope.boss-workspace .game-panel>#title{position:absolute;width:1px;height:1px;margin:0!important;padding:0;overflow:hidden;clip-path:inset(50%)}
 #newgame-scope.boss-workspace .game-panel .experience-rules{margin:0!important}
 #newgame-scope.boss-workspace #board.wave6-board{padding:8px!important}
 #newgame-scope.boss-workspace .relay-chain{font-size:14px;line-height:1.4;padding:4px 6px;max-height:40px}
 #newgame-scope.boss-workspace .relay-checks{margin:4px 0 6px}
}
