/* All seven action buttons need real tracks at every UI scale. Late-loaded
   vehicle styles previously replaced the six-track layout with five tracks. */
@media(min-width:761px) and (pointer:fine){
  #game-shell:not(.touch-playing) .combat-controls{width:100%;max-width:var(--combat-hud-width);min-width:0;}
  #game-shell:not(.touch-playing) .action-dock:has(#emote-button){
    width:min(100%,760px);max-width:100%;min-width:0;
    grid-template-columns:minmax(105px,1fr) 76px 84px 70px minmax(132px,1.15fr) 62px 64px;
    gap:6px;padding:6px;
  }
  #game-shell:not(.touch-playing) .action-dock>button{min-width:0;max-width:100%;overflow:hidden;}
  #game-shell:not(.touch-playing) #nearby-button{order:1;}
  #game-shell:not(.touch-playing) #emote-button{order:2;}
  #game-shell:not(.touch-playing) #bag-shortcut{order:3;}
  #game-shell:not(.touch-playing) #vehicle-shortcut{order:4;}
  #game-shell:not(.touch-playing) #attack-button{order:5;}
  #game-shell:not(.touch-playing) #quick-medicine-button{order:6;}
  #game-shell:not(.touch-playing) #auto-attack-button{order:7;}
  #game-shell:not(.touch-playing) .action-dock #bag-shortcut{min-width:0;}
  #game-shell:not(.touch-playing) .action-dock #attack-button{width:auto;min-width:0;padding:7px 5px;gap:4px;}
  #game-shell:not(.touch-playing) .action-dock #attack-button>div{min-width:0;}
  #game-shell:not(.touch-playing) .action-dock #attack-button :is(strong,small){display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
}
@media(min-width:761px) and (max-width:950px) and (pointer:fine){
  #game-shell:not(.touch-playing) .action-dock:has(#emote-button){grid-template-columns:minmax(86px,1fr) 68px 74px 60px minmax(110px,1.1fr) 55px 58px;gap:4px;padding:4px;}
  #game-shell:not(.touch-playing) .action-dock :is(.action-slot strong,.attack-button strong){font-size:13px;}
  #game-shell:not(.touch-playing) .action-dock :is(.action-slot small,.attack-button small){font-size:10px;}
}
@media(max-width:760px) and (pointer:fine){
  #game-shell:not(.touch-playing) .action-dock:has(#vehicle-shortcut){width:min(100%,370px);max-width:100%;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:4px;}
  #game-shell:not(.touch-playing) .action-dock>button{min-width:0;max-width:100%;min-height:55px;overflow:hidden;}
  #game-shell:not(.touch-playing) .action-dock #nearby-button{grid-column:span 2;}
  #game-shell:not(.touch-playing) .action-dock #attack-button{width:auto;grid-column:span 2;}
  #game-shell:not(.touch-playing) .action-dock :is(.action-slot strong,.attack-button strong){font-size:12px;}
  #game-shell:not(.touch-playing) .action-dock :is(.action-slot small,.attack-button small){font-size:9px;}
}
@media(pointer:coarse), (any-pointer:coarse){
  #game-shell.touch-playing .bottom-hud:has(#vehicle-shortcut){width:210px;}
  #game-shell.touch-playing #emote-button,#game-shell.touch-playing #auto-attack-button{min-height:50px;height:50px;}
}
/* NPC actions can be much longer than a dock cell. Keep the shared grid row
   fixed and clip labels inside their own buttons instead of growing the HUD. */
#game-shell:not(.touch-playing) .action-dock{grid-auto-rows:76px;align-items:stretch;}
#game-shell:not(.touch-playing) .action-dock>button{height:100%;min-height:0;min-width:0;overflow:hidden;}
#game-shell .action-dock :is(.action-slot strong,.action-slot small,.attack-button strong,.attack-button small){
  display:block;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#game-shell:not(.touch-playing) .action-dock #nearby-button{min-width:0;overflow:hidden;}
#game-shell:not(.touch-playing) .action-dock #nearby-button :is(strong,small){width:100%;}
@media(max-width:760px){
  #game-shell:not(.touch-playing) .action-dock{grid-auto-rows:60px;}
}
@media(max-width:760px){
  #game-shell:not(.touch-playing) .combat-controls .interaction-hint{
    white-space:normal;overflow:visible;text-overflow:clip;
  }
}
@media(pointer:coarse), (any-pointer:coarse){
  #game-shell.touch-playing #nearby-button small{
    max-width:100%;white-space:normal;overflow:visible;text-overflow:clip;
    line-height:1.2;overflow-wrap:anywhere;
  }
}

/* Vehicle charge is actionable status, including in the compact dock. */
#game-shell:has(#world) .action-dock #vehicle-shortcut small{
  display:block!important;font-size:11px!important;line-height:12px;
  color:#d8e6b5;flex-shrink:0;white-space:nowrap;
}
@media(pointer:coarse), (max-width:760px){
  #game-shell:has(#world) .action-dock #vehicle-shortcut{
    display:grid!important;grid-template-columns:14px minmax(0,1fr);
    grid-template-rows:14px 12px;align-content:center;gap:1px!important;
  }
  #game-shell:has(#world) .action-dock #vehicle-shortcut img{
    grid-column:1;grid-row:1/3;width:14px!important;height:18px!important;align-self:center;
  }
  #game-shell:has(#world) .action-dock #vehicle-shortcut strong{grid-column:2;grid-row:1;line-height:14px;}
  #game-shell:has(#world) .action-dock #vehicle-shortcut small{grid-column:2;grid-row:2;width:100%;}
}
