/* Every active battle shortcut keeps the same minimum target on fine and
   coarse pointers; the surrounding panels retain their existing placement. */
@media(max-width:1000px){
 body.game-mode[data-screen=battle][data-battle-format=doubles] .double-targets>button[data-action=double-target]>span:last-child{overflow-wrap:anywhere}
}
body.game-mode .modal:has(.settings-save) .music-preview>summary,
body.game-mode .modal:has(.settings-save) .playtest-panel>summary{
 min-height:44px;padding-top:10px;padding-bottom:10px;box-sizing:border-box;
}
@media(min-width:480px) and (max-width:700px) and (max-height:500px){
 body.game-mode[data-screen=battle][data-battle-format=doubles] .double-targets>button[data-action=double-target]{grid-template-columns:minmax(0,1fr)}
 body.game-mode[data-screen=battle][data-battle-format=doubles] .double-targets>button[data-action=double-target]>.double-target-portrait{display:none}
 body.game-mode[data-screen=battle][data-battle-format=doubles] .double-targets>button[data-action=double-target]>span:last-child{font-size:18px}
}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .battle-heading .icon-button,
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .battle-heading .run-info-button,
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .battle-field-strip button{
 min-width:44px;min-height:44px;flex-shrink:0;
}

/* Short landscape openings expose both decisions immediately. The selected
   companion's advice keeps its own full-width line above the action footer. */
@media (min-width:480px) and (max-width:700px) and (max-height:360px){
 body.game-mode .starter-screen.starter-screen--first{
  display:grid;grid-template-columns:minmax(0,1fr) 100px;grid-template-rows:auto auto auto 44px;
  align-content:start;gap:6px 8px;padding:58px 12px 8px;
 }
 body.game-mode .starter-screen--first .starter-screen__heading,
 body.game-mode .starter-screen--first .starter-grid{grid-column:1/-1}
 body.game-mode .starter-screen--first .starter-screen__heading .eyebrow{display:none}
 body.game-mode .starter-screen--first .starter-screen__heading h1{font-size:22px;line-height:1.1}
 body.game-mode .starter-screen--first .starter-choice-hint{margin-top:3px;line-height:1.2}
 body.game-mode .starter-screen--first .starter-card{grid-template-rows:44px auto auto auto;padding:4px;gap:2px}
 body.game-mode .starter-screen--first .starter-art,
 body.game-mode .starter-screen--first .starter-art .sprite{height:44px}
 body.game-mode .starter-screen--first .starter-art .sprite{width:52px}
 body.game-mode .starter-screen--first .starter-name{font-size:21px;line-height:1.1}
 body.game-mode .starter-screen--first .starter-confirm{display:contents}
 body.game-mode .starter-screen--first .starter-confirm p{grid-column:1/-1;min-width:0;margin:0}
 body.game-mode .starter-screen--first .starter-confirm p>strong{display:none}
 body.game-mode .starter-screen--first .starter-confirm p>span{margin:0;font-size:12px;line-height:1.25}
 body.game-mode .starter-screen--first .starter-confirm .button{
  grid-column:1;grid-row:4;width:100%;min-width:0;min-height:44px;height:44px;padding:6px 8px;
 }
 body.game-mode .starter-screen--first .starter-screen__back{
  grid-column:2;grid-row:4;align-self:stretch;width:100%;min-width:0;min-height:44px;height:44px;margin:0;
 }
}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .battle-heading .icon-button{
 width:44px;height:44px;
}
body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .battle-party .party-token{
 flex:none;width:44px;height:44px;min-width:44px;min-height:44px;
}
@media(min-width:701px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .battle-field-strip{padding-top:0;padding-bottom:0}
}

/* Larger phone parties occupy one complete row. Their inventory counts are
   already available in Catch and Bag; the smaller parties keep that badge. */
@media(pointer:fine) and (max-width:700px) and (min-height:701px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .battle-bottom:has(.party-token:nth-child(4))>p{display:none}
}
@media(max-width:375px) and (min-height:701px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .battle-party{gap:2px}
}
/* Keep the complete party/stock row above the decorative console rail on
   portrait windows, with the same gap below the player card. */
@media(max-width:700px) and (min-height:701px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .battle-bottom,
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .health-plate.player{translate:0 -14px}
}

/* Small desktop windows use the same separate battle utility lanes as touch
   screens. Fine pointers must not inherit the tiny inline header buttons. */
@media (min-width:480px) and (max-width:700px) and (max-height:500px){
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .battle-heading>div:last-child{
  position:fixed;left:112px;top:10px;width:auto;height:44px;min-height:44px;margin:0;padding:0;gap:4px;background:transparent;border:0;box-shadow:none;
 }
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .battle-heading .turn-chip{
  display:flex;align-items:center;justify-content:center;min-width:27px;min-height:44px;background:#193e40ee;border:1px solid #a8b999;
 }
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .battle-heading .icon-button{
  flex:none;width:44px;height:44px;min-width:44px;min-height:44px;border:1px solid #a8b999;background:#193e40ee;font-size:13px;
 }
 body.game-mode[data-screen=battle][data-battle-format=singles] .battle-shell .battle-heading .icon-button .icon{width:17px;height:17px}
}
