/* Player acceptance fixes: readable controls, stable small-screen layout. */
button{min-height:44px}
.icon-button{min-width:44px;justify-content:center}
#fullscreen{width:44px;height:44px;min-width:44px}
.pause-button{width:44px;height:44px}
.text-link{font-size:14px;line-height:1.6}
.game-bottom{gap:12px;font-size:12px;align-items:center}
.game-bottom>button{font-size:12px;min-height:44px;padding:8px 12px}
.save-status{font-size:12px;line-height:1.7;color:#aec2d6;margin:0;padding:0 18px 14px}
.save-status[data-status="temporary"]{margin:0 12px 12px;padding:12px;border:1px solid #d7a56c;background:#3e3027;color:#ffe0b4;border-radius:8px;font-size:14px}
.stage:not([data-state="running"]) .energy-control,
.stage:not([data-state="running"]) .shield-control{display:none}
.stage{min-height:500px}
.stage[data-state="running"] canvas,.stage[data-state="paused"] canvas,.stage[data-state="over"] canvas{height:calc(100% - 72px)}
.stage[data-state="running"]::before{content:"";position:absolute;left:0;right:0;bottom:0;height:72px;background:linear-gradient(#111c31,#10192b);border-top:1px solid #b7d9ec26;z-index:1;pointer-events:none}
.overlay> :not(.menu-courier){position:relative;z-index:1}
.stage[data-state="over"] .overlay,.stage[data-state="paused"] .overlay{padding:75px 32px 28px;justify-content:center}
.stage[data-state="over"] .overlay h2,.stage[data-state="paused"] .overlay h2{font-size:38px}
.overlay p{font-size:14px;max-width:350px;margin:14px 0 18px}
.primary{min-height:54px;font-size:16px}
.secondary,.revive-button,.end-run{font-size:14px;min-height:44px}
.start-hint{font-size:12px;line-height:1.7;margin-top:12px;max-width:360px}
.overlay-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:min(360px,100%);margin-top:10px}
.overlay-actions>button{margin:0;padding:8px;font-size:14px}
.menu-courier{z-index:0}
.effect-chip small{font-size:12px}
.effect-chip strong{font-size:14px}
.shield-control span,.shield-control b{font-size:12px}
.energy-control small{font-size:12px;line-height:1.5;white-space:normal}
.energy-control button div{font-size:14px;white-space:normal}
.energy-control{width:245px}
.location small{font-size:10px}
.station-link span{font-size:13px}
.mini-mission b,.mini-mission small,.mini-mission em{font-size:12px}
.flight-controls,.flight-controls>span{font-size:12px}
.flight-controls kbd{font-size:11px}
.dispatch-card h2>span,.level-badge{font-size:12px}
.power-preview>div>img{width:100%;height:100%;max-width:100%;object-fit:contain}
.power-preview>section{min-width:0}
.power-preview p{font-size:13px}
.power-preview h3{font-size:15px}
.crew-preview p{font-size:13px}
.sidebar{grid-template-columns:repeat(2,minmax(0,1fr))}
#hub[open]{display:flex;flex-direction:column;overflow:hidden}
#hub-content{overflow:auto;min-height:0;padding-right:5px;overscroll-behavior:contain}
.hub-top,.hub-notice{flex-shrink:0}
.hub-notice:empty{display:none}
.hub-notice{font-size:14px;line-height:1.7}
.hub-intro{font-size:14px;line-height:1.8}
.gear-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.gear-card,.gear-visual,.hangar-description,.stock-card,.quest-card{min-width:0}
.gear-visual>img{max-width:100%;width:130px;height:110px}
.gear-card h3{font-size:16px}
.gear-card p{font-size:13px;min-height:48px}
.gear-card button,.hangar-description button,.stock-card button{font-size:14px;min-height:44px}
.gear-card button{padding:10px 5px}
.upgrade-level span{font-size:12px}
.stock-card h4,.stock-card h4 small{font-size:13px}
.stock-card p,.stock-heading>span{font-size:12px}
.hangar-description p,.route-card p{font-size:14px}
.quest-card p{font-size:14px}
.close{min-width:44px;min-height:44px;z-index:10}
@media(max-width:900px){
  .gear-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .station-link span{font-size:12px}
}
@media(max-width:650px){
  .sidebar{grid-template-columns:minmax(0,1fr);gap:14px}
  .mission-card,.dispatch-card{padding:22px}
  .mission-card h3{font-size:16px;line-height:1.6}
  .mission-card>p{font-size:13px;line-height:1.7}
  .mission-heading h2,.dispatch-card h2{font-size:18px}
  .package-art{float:left;width:110px;height:125px;margin:16px 18px 16px 0}
  .package-art img{max-width:145px;width:145px;height:125px}
  .mission-progress{clear:both}
  .mission-progress>div:first-child,.mission-progress b,.reward,.reward strong{font-size:12px}
  .mini-mission{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:10px;margin:20px 0}
  .mini-mission em{position:static;align-self:center}
  .mini-mission b{font-size:14px;line-height:1.6}
  .mini-mission small{font-size:12px}
  .dispatch-card .text-link{font-size:14px;line-height:1.6}
  .station-links{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:100%}
  .station-link{min-width:0;padding:10px 2px;min-height:64px;flex-direction:column}
  .station-link span{font-size:12px;white-space:normal}
  .mode{min-height:44px;font-size:12px;padding:9px}
  .mode span{font-size:10px}
  .panel-bar{height:70px;padding:10px}
  .stage{min-height:min(560px,calc(100dvh - 88px));height:min(560px,calc(100dvh - 88px));aspect-ratio:auto;flex:none}
  .overlay{padding:48px 22px 30px;justify-content:center;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}
  .overlay h2{font-size:34px;line-height:1.3}
  .overlay p{font-size:14px;max-width:100%;line-height:1.7}
  .intro-tag{font-size:12px;line-height:1.7}
  .stage[data-state="over"] .overlay,.stage[data-state="paused"] .overlay{padding:28px 22px 24px;justify-content:center}
  .stage[data-state="over"] .overlay h2,.stage[data-state="paused"] .overlay h2{font-size:32px}
  .primary{min-width:180px;font-size:16px;padding:12px 18px}
  .secondary,.revive-button,.end-run{font-size:14px;min-height:44px;padding:10px 14px}
  .start-hint{font-size:12px;max-width:100%;line-height:1.7}
  .start-hint kbd{font-size:11px;min-width:22px}
  .menu-courier{opacity:.65;right:-10px;bottom:30px;width:155px;height:205px}
  .hud{left:14px;right:14px;top:16px}
  .distance>span{font-size:12px;letter-spacing:1px}
  .distance strong{font-size:24px}
  .score-line{font-size:12px}
  .score-line b{font-size:13px}
  .coin-counter{font-size:15px;padding:11px}
  .pause-button{width:44px;height:44px}
  .shield-control{left:14px;top:auto;bottom:10px;z-index:4}
  .shield-control button{padding:8px;font-size:18px;min-height:44px}
  .shield-control span,.shield-control b{font-size:12px}
  .effect-strip{top:116px;left:14px;right:14px;gap:6px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  .effect-chip{min-width:0;max-width:none;padding:6px}
  .effect-chip strong{font-size:14px}
  .effect-chip small{font-size:12px;line-height:1.4}
  .energy-control{width:min(190px,calc(100% - 119px));right:14px;bottom:10px}
  .energy-control button{min-height:48px;padding:10px}
  .energy-control button div{font-size:14px}
  .energy-control small{display:none}
  .energy-control b{font-size:14px}
  .location{display:none}
  .location small{font-size:10px}
  .game-bottom{font-size:12px;padding:12px;gap:8px}
  .game-bottom>button{font-size:12px;padding:8px;min-height:44px}
  .game-bottom>span:last-child{display:block;text-align:left;font-size:12px}
  .save-status{font-size:12px;padding:0 12px 12px}
  .section-heading h2{font-size:20px;max-width:none}
  .section-heading .text-link{font-size:13px}
  .power-preview{padding:16px;gap:12px}
  .power-preview>div{width:54px;min-width:54px;height:58px}
  .power-preview h3{font-size:16px}
  .power-preview p{font-size:13px}
  .power-gallery{grid-template-columns:1fr}
  .crew-preview p{font-size:13px}
  #hub{width:calc(100% - 24px);padding:20px;max-height:92dvh}
  .hub-top{display:block;padding-right:42px}
  .hub-top h2{font-size:22px;line-height:1.5}
  .hub-wallet{display:inline-flex;font-size:14px;margin:12px 0 0;padding:8px 12px}
  .hub-intro{font-size:14px}
  .gear-card{padding:16px}
  .gear-card h3{font-size:16px}
  .gear-card p{font-size:13px}
  .gear-visual{height:100px}
  .gear-visual>img{max-width:100%;height:100px}
  .gear-card button{width:100%;font-size:14px}
  .upgrade-level{flex-wrap:wrap}
  .upgrade-level span{font-size:12px}
  .stock-card{flex-wrap:wrap;padding:16px}
  .stock-card>div{flex:1;min-width:135px}
  .stock-card button{margin-left:auto;width:auto;min-width:84px}
  .stock-card h4,.stock-card h4 small{font-size:13px}
  .stock-card p{font-size:13px}
  .stock-heading>span{font-size:12px}
  .hangar-description{padding:18px 14px}
  .hangar-description p{font-size:13px}
  .hangar-description button{font-size:14px}
  .route-card p{font-size:14px}
  footer button{font-size:12px;min-height:44px}
  .game-panel:fullscreen .stage{flex:1;height:auto;min-height:0}
}
@media(max-width:360px){
  .gear-grid{grid-template-columns:minmax(0,1fr)}
  .gear-card p{min-height:0}
  .hangar-card{display:block}
  .hangar-portrait{height:190px}
  .hangar-portrait img{height:190px;width:auto}
  .hangar-description{border-left:0}
  .section-heading{align-items:flex-start;flex-direction:column;gap:8px}
}
@media(max-height:500px) and (min-width:651px){
  .stage[data-state] .overlay{padding:16px 24px;display:grid;grid-template-columns:minmax(0,1fr) 190px;gap:8px 22px;align-content:center;overflow-y:auto}
  .overlay .intro-tag{grid-column:1;grid-row:1;font-size:12px;margin:0}
  .stage[data-state] .overlay h2{grid-column:1;grid-row:2;font-size:30px;line-height:1.2}
  .overlay p{grid-column:1;grid-row:3;font-size:14px;line-height:1.6;margin:0;max-width:470px}
  .overlay .primary{grid-column:2;grid-row:2;min-width:0;width:190px}
  .overlay .revive-button,.overlay .overlay-actions{grid-column:2;grid-row:3;margin:0;width:190px}
  .overlay .overlay-actions{grid-template-columns:1fr}
  .overlay .start-hint{grid-column:1 / -1;grid-row:4;font-size:12px;margin:0;max-width:none}
  .overlay .menu-courier{display:none}
  .energy-control{bottom:10px;width:230px}
  .energy-control small{display:none}
  .energy-control button{min-height:48px;padding:10px}
}
