/* ワールド切替専用。既存のホーム・戦闘・モーダルには適用しない。 */
#stageSelect{display:flex;flex-direction:column;gap:12px;min-width:0}
#stageSelect .stage-head{margin:0;flex:none}
.world-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;flex:none}
.world-tab{border:1px solid #a68b60;border-radius:8px;background:#473a51;color:#fff3db;font-weight:800;min-height:42px;padding:4px;white-space:nowrap}
.world-tab[aria-pressed="true"]{background:#f1ce84;color:#38283a;border-color:#ffe6a5}
#stageSelect .stage-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;min-height:0;flex:1}
#stageSelect .stage-card{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;text-align:center;box-shadow:none}
#stageSelect .stage-thumb{flex:1;min-height:0;height:0;aspect-ratio:auto;object-fit:cover;object-position:center}
#stageSelect .stage-body{flex:none;min-height:0;min-width:0;padding:8px 4px}
.world-stage-code{display:block;font-weight:900;color:#8b5631;font-size:clamp(18px,3vw,32px);line-height:1.15}
#stageSelect .stage-body strong{overflow-wrap:anywhere;font-size:clamp(11px,1.6vw,17px);line-height:1.2;min-height:2.4em;display:grid;align-content:center}
#stageSelect .stage-meta,#stageSelect .stage-status{display:block;font-size:clamp(9px,1.2vw,12px);margin-top:3px;line-height:1.2;overflow-wrap:anywhere}
#stageSelect .future{flex:none;margin:0;font-size:11px;line-height:1.3}
@media(orientation:landscape){
 .app:has(#stageSelect:not([hidden])){height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
 .app:has(#stageSelect:not([hidden]))>.bar{flex:none}
 .app:has(#stageSelect:not([hidden]))>.footer{display:none}
 #stageSelect{flex:1;min-height:0;overflow:hidden;gap:6px;padding:7px 12px}
 #stageSelect .stage-head{flex-wrap:nowrap;gap:5px}
 #stageSelect .stage-head .ribbon{min-width:0;flex:1;white-space:nowrap;padding:7px 8px;font-size:clamp(14px,2.3vw,22px)}
 #stageSelect .stage-head button{min-height:36px;font-size:11px;padding:4px 9px;white-space:nowrap}
 #stageCount{font-size:11px;white-space:nowrap;width:auto!important}
 #stageCount img{width:14px;height:14px}
 .world-tabs{gap:5px}.world-tab{min-height:36px;font-size:12px}
 #stageSelect .stage-grid{gap:5px}
 #stageSelect .stage-body{padding:4px 2px}
 #stageSelect .stage-card{border-width:2px;border-radius:7px}
 #stageSelect .future{font-size:10px}
 #stageSelect .future img{width:12px;height:12px}
}
@media(orientation:portrait){#stageSelect .stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#stageSelect .stage-thumb{height:auto;aspect-ratio:16/9;flex:none}}
@media(orientation:landscape) and (max-height:600px){.app:has(#stageSelect:not([hidden])){height:100%}}

/* PLAZA7: keep unlock information legible. */
#stageSelect .stage-card.stage-locked .stage-status{color:#513c2c;font-weight:900}
#stageSelect .stage-card.stage-locked:disabled{opacity:1;filter:none}
#stageSelect .stage-card.stage-locked .stage-thumb{filter:grayscale(.8) brightness(.65)}
#stageSelect .stage-card.stage-locked .stage-status{color:#ffe2a0;font-weight:900;text-shadow:0 1px 2px #152b35}
