/* Landscape touch placement only. index.html activates this sheet through
 * its input/orientation media query; the review preview selects it explicitly.
 * The viewport already sits inside the game container's safe-area padding. */
.combat-controls,
.combat-controls:has(.combat-command-grid[data-count]),
.in-training .combat-controls {
  /* 58px at the least: the longest price, "5 EN 8 MP" at readability.css's
   * 14px, is 58px with its letters closed up (below). 56px ran the Warrior's
   * prices together; 60px pushes the left thumbs past 30% of a 667px
   * phone with a notch, into the log seated between them. */
  --thumb-width: clamp(58px, 7.6vw, 64px);
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  display: grid; grid-template-columns: repeat(2,var(--thumb-width)) minmax(0,1fr) repeat(2,var(--thumb-width));
  grid-template-rows: repeat(2,minmax(76px,auto)); gap: 8px;
  width: auto; margin: 0; padding: 0; pointer-events: none;
}
.combat-controls > .control-group.combat-command-grid,
.in-training .combat-controls > .control-group.combat-command-grid { display: contents; }
/* Primary attack is under the right thumb. Both clusters form compact Ls. */
.combat-command-grid #btn-attack { grid-column: 5; grid-row: 2; }
.combat-command-grid #btn-heavy { grid-column: 5; grid-row: 1; }
.combat-command-grid #btn-special { grid-column: 4; grid-row: 2; }
.combat-command-grid #btn-ability-1 { grid-column: 4; grid-row: 1; }
.combat-command-grid #btn-guard { grid-column: 1; grid-row: 2; }
.combat-command-grid #btn-potion { grid-column: 1; grid-row: 1; }
.combat-command-grid #btn-run { grid-column: 2; grid-row: 2; }
.combat-command-grid #btn-ability-2 { grid-column: 2; grid-row: 1; }
.combat-controls .control-group.combat-command-grid button {
  height: 76px; min-height: 76px; padding: 6px 2px;
  align-self: end; pointer-events: auto;
}
.command-art, #btn-attack .command-art { width: 34px; height: 34px; }
.combat-command-grid .command-name { font-size: 10px; line-height: 13px; letter-spacing: -0.02em; }
/* A price must stay in its thumb-wide button ("5 EN 8 MP", "0/2 MOM") without
 * shrinking below readability.css's 14px, so its letters close up a little.
 * Never its word spacing: that read "Nexthit", "FullHP" and "5EN8MP".
 * Centred as a flex line, a price a hair wider than the padding inside its
 * button spills evenly to both sides, not all off the right edge.
 * The extra selector outranks readability.css, which loads later. */
.combat-controls .combat-command-grid .command-cost { display: flex; justify-content: center; letter-spacing: -0.05em; }
.combat-controls > .control-group.command-heading {
  grid-column: 3; grid-row: 2; align-self: end;
  flex-direction: column; flex-wrap: nowrap; justify-content: flex-end;
  width: auto; min-height: 76px; gap: 3px; padding: 4px;
  text-align: center; pointer-events: none;
}
.command-heading #combat-status, .in-training .command-heading #combat-status {
  width: auto; padding: 0; font-size: 11px; line-height: 14px; text-align: center;
}
/* Room for the turn and the tell under it even while only the turn shows,
 * so the log above - and the monsters above that - stay where they are. */
.command-heading #combat-status { min-height: 2.6em; min-height: 2lh; }
.command-note { max-width: 100%; font-size: 10px; text-align: center; }
/* The log sits in the column between the thumbs, straight above the turn
 * line: seatCombatLog (ui/combat.js) measures its place, so it never covers
 * the monster. These are its looks, and its place until that first runs. */
#combat-log, .in-training #combat-log {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%);
  width: min(400px,calc(100% - 48px)); max-height: 28px;
  margin: 0; padding: 4px 10px; font-size: 11px;
}
.in-training .combat-controls .control-group.combat-command-grid button {
  height: auto; min-height: 88px; align-self: stretch;
}
.in-training #combat-log { bottom: 114px; }

.combat-command .kbd, .movement-command .kbd { display: none; }
