/* Use the shared site shell; this game only owns its arena. */
.firefighter-active .game-panel{min-width:0;padding:8px 12px 12px}
.firefighter-active .race-display{display:flex;flex-direction:column;gap:6px;height:auto;min-height:0}
.firefighter-active .game-heading{order:0;height:24px;margin:0}
.firefighter-active .game-heading h2{font-size:16px;margin:0}
.firefighter-active .game-heading-icon{width:24px;height:24px}
.firefighter-active .play-controls{order:1;margin:0;gap:6px}
.firefighter-active .game-panel:not(.race-fullscreen) .play-controls button{min-height:34px;padding:6px 12px}
.firefighter-active .game-stage{order:2;display:block;flex:none;height:auto;min-height:0;margin:0;overflow:visible;border:0;background:none;container-type:normal}
.firefighter-game{width:100%;min-width:0;color:#e9e9c9;background:#203f38;border-radius:6px;padding:6px}
.firefighter-status{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;padding:0 2px 5px}
.firefighter-status>span{white-space:nowrap;color:#f4d691;font-variant-numeric:tabular-nums}
.firefighter-arena{position:relative;width:100%;overflow:hidden;border:2px solid #807b54;border-radius:4px;background:#739a75;isolation:isolate}
.firefighter-arena canvas{display:block;width:100%;image-rendering:pixelated;image-rendering:crisp-edges}
.ff-results{position:absolute;right:10px;bottom:10px;width:250px;max-height:210px;padding:10px;background:rgba(21,48,39,.78);color:#f3e8bb;border:2px solid #d3b471;border-radius:9px;z-index:3}
.ff-result-heading{display:flex;justify-content:space-between;align-items:center;gap:6px}
.ff-result-heading h3{font-size:14px;margin:0;overflow-wrap:anywhere}
.ff-result-heading button{color:#c8d3b5;font-size:21px;padding:0 5px}
.ff-list{max-height:150px;overflow:auto;margin-top:6px;scrollbar-width:thin}
.ff-result-row{display:flex;align-items:center;gap:8px;font-size:11px;border-top:1px solid #82927066;padding:5px 0}
.ff-result-row strong{min-width:25px}.ff-result-row b{flex:1;min-width:0;overflow-wrap:anywhere}.ff-result-row span{white-space:nowrap;font-size:10px;font-variant-numeric:tabular-nums}
/* Override the common desktop frame's fixed height without changing other games. */
body.firefighter-view .page>.playground.firefighter-active{height:auto;min-height:0}
body.firefighter-view .page>.playground.firefighter-active>.setup-panel{max-height:none;overflow:visible}
body.firefighter-view .page>.playground.firefighter-active>.game-panel:not(.race-fullscreen){flex:none;min-height:0;overflow:visible;padding:8px 12px 12px}
body.firefighter-view .page>.playground.firefighter-active>.game-panel:not(.race-fullscreen)>.race-display{height:auto;min-height:0;gap:6px}
body.firefighter-view .page .firefighter-active .game-panel:not(.race-fullscreen) .game-stage{flex:none;height:auto;min-height:0;overflow:visible;margin:0}
@media(max-width:900px),(pointer:coarse){
 body.firefighter-view .page>.playground.firefighter-active{width:100%;max-width:480px;margin-inline:auto;display:flex;flex-direction:column;height:auto;min-height:0;overflow:visible;transform:none}
 .firefighter-view .setup-panel,.firefighter-view .game-panel{width:100%;flex:none;min-height:0;max-height:none;overflow:visible}
 body.firefighter-view .page>.playground.firefighter-active>.game-panel:not(.race-fullscreen){padding:6px}
 .firefighter-view .race-display{width:100%;height:auto;min-height:0;transform:none}
 .firefighter-view .game-stage{width:100%;height:auto;min-height:0;transform:none}
 .ff-results{left:8px;right:8px;bottom:8px;width:auto;max-height:155px;padding:8px}.ff-list{max-height:100px}
 .ff-result-row{font-size:10px;padding:4px 0}
}

/* Keep setup only as tall as its actual names and input. */
body.firefighter-view .page>.playground.firefighter-active>.setup-panel{display:block;height:auto;min-height:0;padding:8px 12px}
body.firefighter-view .firefighter-active #participant-setup{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 8px}
body.firefighter-view .firefighter-active #participant-setup>.panel-heading{grid-column:1/-1;margin:0 0 5px}
body.firefighter-view .firefighter-active #people-list{grid-column:1/-1;gap:4px;min-height:0}
body.firefighter-view .firefighter-active #people-list>.small-muted{padding:3px 0}
body.firefighter-view .firefighter-active #participant-limit-note{display:none}
body.firefighter-view .firefighter-active #add-form{grid-column:1;grid-row:3;max-width:none;margin:6px 0 0;height:32px}
body.firefighter-view .firefighter-active .list-actions{grid-column:2;grid-row:3;align-self:center;margin:6px 0 0}
body.firefighter-view .firefighter-active #game-setup-fields{display:none}
body.firefighter-view .firefighter-active .race-speed-label{display:none}
body.firefighter-view .page .firefighter-active .race-toolbar{order:1;display:flex;justify-content:flex-end;gap:6px;padding:0;flex:none}

/* Reuse the shared fullscreen rotation, with a fitted canvas and floating controls. */
body.firefighter-view .firefighter-active .game-panel.race-fullscreen{padding:0;min-height:0;max-width:none}
body.firefighter-view .firefighter-active .game-panel.race-fullscreen>.race-display{position:absolute;inset:0;display:block;width:100%;height:100%;min-height:0;gap:0;padding:0;background:#203f38;transform:none}
body.firefighter-view .firefighter-active .race-fullscreen .game-heading,
body.firefighter-view .firefighter-active .race-fullscreen .firefighter-status{display:none}
body.firefighter-view .page .firefighter-active .race-fullscreen .race-toolbar{position:absolute;top:max(4px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));left:auto;z-index:6}
body.firefighter-view .page .firefighter-active .race-fullscreen .game-stage{position:absolute;inset:0;display:block;width:100%;height:auto;min-height:0;margin:0;overflow:hidden}
body.firefighter-view .firefighter-active .race-fullscreen .firefighter-game{position:absolute;inset:0;padding:0;border-radius:0}
body.firefighter-view .firefighter-active .race-fullscreen .firefighter-arena{height:100%;border:0;border-radius:0}
body.firefighter-view .page .firefighter-active .race-fullscreen .play-controls{position:absolute;top:max(4px,env(safe-area-inset-top));bottom:auto;left:max(8px,env(safe-area-inset-left));right:auto;width:auto;max-width:calc(100% - 16px);display:flex;flex-wrap:nowrap;margin:0;gap:6px;z-index:6}
@media(max-width:900px),(pointer:coarse){body.firefighter-view .page .firefighter-active .race-fullscreen .ff-results{left:auto;right:8px;width:min(250px,40%);max-height:155px}}
@media(max-width:900px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){
 body.firefighter-view .firefighter-active .game-panel.race-fullscreen>.race-display{inset:auto;top:50%;left:50%;width:100vh;width:100dvh;height:100vw;height:100dvw;transform:translate(-50%,-50%) rotate(90deg)}
}

/* Normal view keeps its labels; fullscreen inherits the marathon controls. */
body.firefighter-view .page .firefighter-active .game-panel:not(.race-fullscreen) .play-controls button,
body.firefighter-view .page .firefighter-active .game-panel:not(.race-fullscreen) .race-toolbar button{min-height:34px;height:34px;padding:6px 9px;font-size:11px;gap:5px;border-radius:6px}
body.firefighter-view .page .firefighter-active .game-panel:not(.race-fullscreen) #race-fullscreen{width:auto;min-width:84px;max-width:none}
body.firefighter-view .page .firefighter-active .game-panel:not(.race-fullscreen) #race-fullscreen>span{display:inline}

/* Remove the title row and keep the compact controls at the left. */
body.firefighter-view .page .firefighter-active .game-panel .game-heading{display:none}
body.firefighter-view .page .firefighter-active .play-controls{justify-content:flex-start}
body.firefighter-view .page .firefighter-active .race-fullscreen .play-controls,
body.firefighter-view .page .firefighter-active .race-fullscreen .race-toolbar{gap:4px}
body.firefighter-view .page .firefighter-active .race-fullscreen .play-controls button{min-height:26px;height:26px;min-width:0;padding:3px 6px;gap:3px;font-size:9px;border-radius:5px}
body.firefighter-view .page .firefighter-active .race-fullscreen .play-button{min-width:62px}
body.firefighter-view .page .firefighter-active .race-fullscreen .play-controls button svg{width:12px;height:12px}
body.firefighter-view .page .firefighter-active .race-fullscreen .race-toolbar button{min-height:26px;height:26px;width:26px;min-width:26px;padding:5px;border-radius:5px}
body.firefighter-view .page .firefighter-active .race-fullscreen .race-toolbar button svg{width:14px;height:14px}
