/* v0.9.12: discrete stage pages using existing stage art. No scroll container. */
#stageSelect:not([hidden]){flex:1 1 0;min-height:0;overflow:hidden;justify-content:center;gap:clamp(3px,1vh,10px)}
#stageSelect .stage-head,#stageSelect .stage-mode-row{width:min(100%,1500px);max-width:1500px}
#stageSelect .stage-carousel{flex:1 1 0;min-height:0;width:min(100%,1500px);max-width:1500px;align-items:stretch;grid-template-columns:34px minmax(0,1fr) 34px}
#stageSelect .stage-carousel:has(#stagePrev[hidden]){grid-template-columns:minmax(0,1fr)}
#stageSelect .stage-grid:not(.special-grid){display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));grid-auto-rows:0;align-items:stretch;align-content:stretch;min-height:0;height:100%;width:100%;overflow:hidden;scroll-snap-type:none;padding:0;gap:clamp(3px,1vmin,10px)}
#stageSelect .stage-grid::before,#stageSelect .stage-grid::after{display:none}
#stageSelect .stage-grid[data-page-size="12"]{grid-template-columns:repeat(6,minmax(0,1fr))}
#stageSelect .stage-grid[data-page-size="8"]{grid-template-columns:repeat(4,minmax(0,1fr))}
#stageSelect .stage-grid[data-page-size="3"]{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:minmax(0,1fr)}
#stageSelect .stage-grid[data-page-size="2"]{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr)}
#stageSelect .stage-grid .stage-card[hidden],#stageSelect .stage-carousel button[hidden],#stageSelect .stage-dots[hidden]{display:none!important}
#stageSelect .stage-grid:not(.special-grid) .stage-card{display:grid;grid-template-rows:minmax(0,1fr) auto;align-self:stretch;justify-content:stretch;width:100%;height:100%;max-width:none;min-height:0;max-height:none;padding:clamp(4px,1vmin,11px);--stage-border:clamp(5px,1.25vmin,13px);filter:none}
#stageSelect .stage-grid:not(.special-grid) .stage-thumb{height:100%;min-height:0;max-height:none;width:100%;aspect-ratio:auto;object-fit:cover}
#stageSelect .stage-grid:not(.special-grid) .stage-body{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:1px 4px;padding:2px 3px 3px;text-align:left}
#stageSelect .stage-grid:not(.special-grid) .world-stage-code{font-size:clamp(11px,2.2vmin,23px);white-space:nowrap}
#stageSelect .stage-grid:not(.special-grid) .stage-body strong{font-size:clamp(10px,1.7vmin,17px);line-height:1.15;min-height:0;overflow-wrap:anywhere;white-space:normal}
#stageSelect .stage-grid:not(.special-grid) .stage-meta,#stageSelect .stage-grid:not(.special-grid) .stage-status{grid-column:1/-1;font-size:clamp(9px,1.55vmin,14px);line-height:1.15;margin:0;text-align:left}
#stageSelect .stage-grid .stage-locked .stage-thumb{filter:grayscale(.6) brightness(.65)}
#stageSelect .stage-carousel>.carousel-arrow{align-self:center;max-width:34px;padding:0}
#stageSelect .stage-dots{flex:none;height:auto!important;min-height:20px}
#stageSelect .stage-dot{width:25px;height:20px;min-height:20px;font-size:10px;padding:0}
#stageSelect .stage-mode-row .world-tab{min-width:0;max-width:210px}
#stageSelect .stage-mode-row .world-tabs{justify-content:center}
#stageSelect .stage-grid.special-grid{display:flex;justify-content:center;align-items:center;overflow:hidden}
@media(max-height:450px){#stageSelect .stage-head,#stageSelect .stage-mode-row{min-height:25px}#stageSelect .stage-grid:not(.special-grid) .stage-body{padding:1px 2px;gap:0 3px}#stageSelect .stage-grid:not(.special-grid) .stage-meta,#stageSelect .stage-grid:not(.special-grid) .stage-status{font-size:9px}#stageSelect .stage-dots{min-height:16px}#stageSelect .stage-dot{height:16px;min-height:16px}}

/* Short landscape: prioritize readable portraits and labels over packing six tiny tiles. */
#stageSelect .stage-grid:not(.special-grid) .stage-body{padding-inline:clamp(5px,1vmin,10px)}
#stageSelect .stage-mode-row .world-tabs{display:flex;justify-content:center;gap:clamp(3px,1vw,12px)}
#stageSelect .stage-mode-row .world-tab{flex:0 1 170px;max-width:170px}
@media(max-height:450px){#stageSelect .stage-grid:not(.special-grid) .stage-body{padding-inline:5px}#stageSelect .stage-grid:not(.special-grid) .stage-card{--stage-border:6px;padding:5px}#stageSelect .stage-grid:not(.special-grid) .stage-body strong{font-size:11px}#stageSelect .stage-mode-row .world-tab{flex-basis:140px;max-width:140px}}

/* 生存戦：拠点用の盾アイコンとHPバーを非表示。生存人数のみ表示。 */
.battlebar .survival-stat > img,.battlebar .survival-stat > .hpbar{display:none!important}
