/* ============================================================
   FieldOp - Defcon-style tactical map
   ============================================================ */

:root {
  --bg-deep:        #02060c;
  --bg-ocean:       #04101a;
  --grid-line:      #0c2e1c;
  --grid-line-maj:  #103a22;
  --border:         #2dff85;
  --border-dim:     #1ea864;
  --phosphor:       #7fffb8;
  --hud-fg:         #5cffa3;
  --hud-dim:        #2a7a55;
  --hud-bg:         #03110a;
  --hud-edge:       #0a3a22;
  --warn:           #ff7755;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg-deep);
  color: var(--hud-fg);
  font-family: "JetBrains Mono", "Fira Code", "Menlo", "Consolas", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── App grid ─────────────────────────────────────────────────────────────
   Row 1 (1fr):   map + right sidebar
   Row 2 (160px): bottom command bar (state strip + action row)
   ──────────────────────────────────────────────────────────────────────── */
#app {
  display: grid;
  grid-template-areas:
    "map     sidebar"
    "cmdbar  cmdbar";
  grid-template-rows: 1fr 160px;
  grid-template-columns: 1fr 220px;
  height: 100%;
}

/* ── HUD bars ─────────────────────────────────────────────────────────────*/
.hud-bar {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--hud-bg);
  border-bottom: 1px solid var(--hud-edge);
  text-transform: uppercase;
  font-size: 11px;
  gap: 16px;
}
.hud-cluster   { display: flex; align-items: center; gap: 8px; }
.hud-label     { color: var(--hud-fg); font-weight: 600; }
.hud-dim       { color: var(--hud-dim); }
.hud-sep       { color: var(--hud-dim); }
.hud-mono      { color: var(--hud-fg); font-variant-numeric: tabular-nums; }

/* ── CONFIRM button ───────────────────────────────────────────────────── */
#confirm-btn {
  --accent: #5cffa3;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 14px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background 100ms linear, color 100ms linear;
}
#confirm-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}
#confirm-btn:disabled {
  --accent: #2a7a55;
  cursor: not-allowed;
  opacity: 0.6;
}
#confirm-btn.playing {
  --accent: #ff7755;
  letter-spacing: 0.18em;
}

/* ── Map area ─────────────────────────────────────────────────────────── */
.map-shell {
  grid-area: map;
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
}
/* Promote viewport group to GPU layer so pan/zoom compositing is cheap */
#viewport { will-change: transform; }
#map           { display: block; width: 100%; height: 100%; cursor: grab; }
#map.dragging  { cursor: grabbing; }
#map.placing   { cursor: crosshair; }
#map.moving    { cursor: crosshair; }
#map.launching { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='7' fill='none' stroke='%23ff9955' stroke-width='1.5'/%3E%3Cline x1='10' y1='2' x2='10' y2='18' stroke='%23ff9955' stroke-width='1'/%3E%3Cline x1='2' y1='10' x2='18' y2='10' stroke='%23ff9955' stroke-width='1'/%3E%3C/svg%3E") 10 10, crosshair; }
#ocean         { fill: var(--bg-ocean); }

/* ── Grid lines ───────────────────────────────────────────────────────── */
#grid line {
  stroke: var(--grid-line);
  stroke-width: 0.25;
  vector-effect: non-scaling-stroke;
}
#grid line.major {
  stroke: var(--grid-line-maj);
  stroke-width: 0.5;
}

/* ── Country borders ──────────────────────────────────────────────────── */
/* drop-shadow filter removed — SVG group filters re-rasterise the entire
   countries layer on every viewport transform change (every pan/zoom frame),
   defeating the will-change:transform compositing on #viewport entirely. */
#countries {
}
#countries path {
  --accent: #7fffb8;
  fill: transparent;          /* no interior shading — borders only */
  stroke: var(--border);
  stroke-width: 1.0;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition: stroke 80ms linear;
  cursor: crosshair;
}
#countries path.neutral {
  stroke: var(--border-dim);
  fill: transparent;
  cursor: default;
  opacity: 0.55;
}
#countries path.territory-hover {
  fill: color-mix(in srgb, var(--accent) 30%, transparent);
  stroke: var(--accent);
  stroke-width: 1.2;
}
#countries path.territory-selected {
  fill: color-mix(in srgb, var(--accent) 55%, transparent);
  stroke: var(--accent);
  stroke-width: 1.6;
}
#countries path.territory-opponent {
  fill: color-mix(in srgb, #ff3344 45%, transparent);
  stroke: #ff3344;
  stroke-width: 1.6;
}

/* ── City dots ────────────────────────────────────────────────────────── */
#cities circle {
  --accent: #7fffb8;
  fill: var(--accent);
  stroke: rgba(0, 0, 0, 0.45);
  stroke-width: 0.25;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  opacity: 0.30;   /* dimmed — units should be easier to spot */
}
#cities circle.capital     { opacity: 0.55; }
#cities circle.neutral     { fill: #4a7a62; opacity: 0.30; }
#cities circle.city-setup  { fill: #7fffb8; opacity: 0.30; }
#cities circle.city-player { fill: var(--accent); opacity: 0.55; }
#cities circle.city-player.capital { stroke: #ffffff; stroke-width: 0.4; }
#cities circle.city-ai     { fill: var(--accent); opacity: 0.40; }

/* ── Units ────────────────────────────────────────────────────────────── */
#units g.unit {
  --unit-accent: #5cffa3;
  cursor: default;
}
#units g.unit .unit-base {
  fill: rgba(2, 6, 12, 0.82);
  stroke: var(--unit-accent);
  stroke-width: 0.6;
  stroke-dasharray: 2.5 1.5;
  opacity: 0.7;
  vector-effect: non-scaling-stroke;
}
#units g.unit path,
#units g.unit polygon,
#units g.unit rect,
#units g.unit ellipse,
#units g.unit circle {
  stroke: var(--unit-accent);
  stroke-width: 2.0;
  stroke-linejoin: round;
  stroke-linecap: round;
  fill: color-mix(in srgb, var(--unit-accent) 18%, transparent);
  vector-effect: non-scaling-stroke;
  transition: stroke 120ms, fill 120ms;
}
#units g.unit line {
  stroke: var(--unit-accent);
  stroke-width: 1.5;
  fill: none;
  vector-effect: non-scaling-stroke;
}
#units g.unit .unit-base { stroke-width: 1.3; }
/* HUD bars — more-specific selectors beat the generic icon rules above */
/* Health bar background */
#units g.unit .hbar-bg {
  fill: rgba(0,0,0,0.65);
  stroke: rgba(0,0,0,0.5);
  stroke-width: 0.8;
  transition: none;
}
/* Health bar fill and XP fill: colour is set via element.style (inline) by JS;
   we only need to suppress the accent stroke from the icon rule */
#units g.unit .hbar-fill,
#units g.unit .xpbar-fill {
  stroke: none;
  stroke-width: 0;
  transition: none;
}
/* XP bar background */
#units g.unit .xpbar-bg {
  fill: rgba(0,0,0,0.45);
  stroke: none;
  stroke-width: 0;
  transition: none;
}
/* Veterancy stars — fill/stroke via CSS so inline attributes don't fight cascade */
#units g.unit .vet-pip {
  fill: var(--unit-accent);
  stroke: rgba(0,0,0,0.85);
  stroke-width: 1.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: none;
}
#units g.unit .vet-pip.vet-pip--elite {
  fill: #ffe97a;
}
#units g.unit--ai         { --unit-accent: #ff3344; }
#units g.unit--player     { cursor: pointer; }
#units g.unit--player:hover path,
#units g.unit--player:hover polygon,
#units g.unit--player:hover rect,
#units g.unit--player:hover ellipse,
#units g.unit--player:hover circle {
  fill: color-mix(in srgb, var(--unit-accent) 45%, transparent);
}
/* Keep HUD bars and vet stars unaffected by hover/selected fill changes */
#units g.unit--player:hover .hbar-bg,
#units g.unit--player:hover .xpbar-bg { fill: rgba(0,0,0,0.65); }
#units g.unit--player:hover .vet-pip  { fill: var(--unit-accent); }
#units g.unit--player:hover .vet-pip.vet-pip--elite { fill: #ffe97a; }
#units g.unit--selected .unit-base {
  stroke-dasharray: none;
  stroke-width: 2;
  opacity: 1;
  /* No CSS filter — avoid per-unit compositing layer that slows zoom */
}
#units g.unit--selected path,
#units g.unit--selected polygon,
#units g.unit--selected rect,
#units g.unit--selected ellipse {
  fill: color-mix(in srgb, var(--unit-accent) 38%, transparent);
}
/* HUD bars stay intact when unit is selected */
#units g.unit--selected .hbar-bg,
#units g.unit--selected .xpbar-bg { fill: rgba(0,0,0,0.65); }
/* Moving: slightly brighter base — no animation, no GPU layer */
#units g.unit--moving .unit-base { opacity: 1; }
/* Returning-home: orange tint on base, no animation */
#units g.unit--returning .unit-base {
  stroke: #ff9955 !important;
  opacity: 0.85;
}
/* No per-unit will-change — creates too many GPU compositing layers. */
/* Intercept projectile — no pointer events needed */
.intercept-projectile { pointer-events: none; }

/* Attack-order indicator — dashed red line + target reticle */
.attack-indicator-line {
  stroke: #ff3344;
  stroke-width: 0.5;
  stroke-dasharray: 2.5 2.5;
  opacity: 0.65;
  pointer-events: none;
}
.attack-reticle {
  fill: none;
  stroke: #ff3344;
  stroke-width: 0.7;
  opacity: 0.9;
  pointer-events: none;
}
.attack-reticle-inner {
  fill: none;
  stroke: #ff3344;
  stroke-width: 0.4;
  opacity: 0.5;
  pointer-events: none;
}

/* Hypersonic in-flight: small amber plasma dot */
.missile-dot-hsm {
  fill: #ff8800;
  filter: drop-shadow(0 0 1.5px #ff6600);
  pointer-events: none;
}

/* Interceptor / SAM blue dot */
.intercept-dot {
  fill: #44bbff;
  filter: drop-shadow(0 0 1.5px #22aaff);
  pointer-events: none;
}

/* ── Move destination overlay ─────────────────────────────────────────── */
.move-dest-ring {
  fill: none;
  stroke: var(--unit-accent, #5cffa3);
  stroke-width: 0.7;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  opacity: 0.85;
}
.move-dest-line {
  stroke: var(--unit-accent, #5cffa3);
  stroke-width: 0.45;
  stroke-dasharray: 2 2;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  opacity: 0.55;
}

/* ── Missiles ─────────────────────────────────────────────────────────── */
/* missile-pulse removed — no per-unit animations */
#units g.unit--missile { opacity: 0.9; }

/* Launch range ring */
@keyframes range-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.75; } }
.launch-range-ring {
  fill: none;
  stroke: #ff9955;
  stroke-width: 0.6;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  animation: range-pulse 2s ease-in-out infinite;
}

/* Unit selection range ring — shown for all units on click */
.unit-range-ring {
  fill: none;
  stroke: var(--unit-range-color, #5cffa3);
  stroke-width: 0.5;
  stroke-dasharray: 3 5;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  opacity: 0.28;
  transition: opacity 120ms;
}

/* Missile arc trajectory */
.missile-arc {
  fill: none;
  stroke-width: 0.5;
  stroke-dasharray: 2.5 3;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
  opacity: 0.7;
}

/* Missile projectile diamond */
.missile-projectile {
  opacity: 0.95;
  pointer-events: none;
}

/* ── Floating info panel ──────────────────────────────────────────────── */
#info-panel {
  --info-accent: #5cffa3;
  position:       absolute;
  z-index:        30;
  min-width:      190px;
  max-width:      250px;
  background:     rgba(2, 8, 5, 0.96);
  border:         1px solid var(--info-accent);
  padding:        10px 14px 12px;
  pointer-events: none;
  backdrop-filter: blur(3px);
  box-shadow:     0 0 14px rgba(0,0,0,0.7),
                  0 0 6px color-mix(in srgb, var(--info-accent) 18%, transparent);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.7;
}
#info-panel.ip-hidden { display: none; }
.ip-title {
  color: var(--info-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  margin-bottom: 7px;
  padding-bottom: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--info-accent) 30%, transparent);
}
.ip-row  { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 1px; }
.ip-k    { color: var(--hud-dim); flex-shrink: 0; }
.ip-v    { color: var(--hud-fg); text-align: right; font-weight: 600; }

/* ── Territory ownership tints (setup / placement only) ──────────────── */
#countries path.territory-player {
  fill: transparent;
  stroke: var(--accent);
  stroke-width: 1.4;
}
#countries path.territory-ai {
  fill: transparent;
  stroke: color-mix(in srgb, #ff3344 70%, var(--border));
  stroke-width: 1.2;
}

/* ── Per-country conquest ownership (playing phase) ──────────────────── */
/* Captured countries: clearly tinted fill + accent border */
#countries path.country-player {
  fill: rgba(92, 255, 163, 0.18);
  stroke: var(--accent);
  stroke-width: 1.4;
  opacity: 1;
}
#countries path.country-ai {
  fill: rgba(255, 51, 68, 0.14);
  stroke: #ff3344;
  stroke-width: 1.2;
  opacity: 1;
}
/* Neutral countries during playing phase are de-emphasised */
#countries path:not(.country-player):not(.country-ai).territory-hover-off {
  opacity: 0.35;
}

/* ── Placement animations ─────────────────────────────────────────────── */
@keyframes placement-ping {
  0%   { transform: scale(0.15); opacity: 0.9; }
  100% { transform: scale(3.5);  opacity: 0;   }
}
.placement-ping {
  transform-box: fill-box;
  transform-origin: center;
  animation: placement-ping 0.7s ease-out forwards;
  pointer-events: none;
}
@keyframes unit-appear { from { opacity: 0; } to { opacity: 1; } }
.unit--new { animation: unit-appear 0.3s ease-out forwards; }

/* ── Territory hover – context suppression ────────────────────────────── */
#map.city-hovered #countries path.territory-hover {
  fill: transparent;
  stroke: var(--accent);
  stroke-width: 0.9;
}
#map.zoomed-in #countries path.territory-hover {
  fill: transparent;
  stroke: var(--accent);
  stroke-width: 1.5;
}

/* ── Pause button ─────────────────────────────────────────────────────── */
.pause-btn {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 2px 9px;
  background: transparent;
  color: var(--phosphor);
  border: 1px solid var(--phosphor);
  cursor: pointer;
  transition: color 80ms, border-color 80ms, background 80ms;
}
.pause-btn:hover {
  background: color-mix(in srgb, var(--phosphor) 18%, transparent);
}
.pause-btn--paused {
  color: #ff4455;
  border-color: #ff4455;
  background: color-mix(in srgb, #ff4455 12%, transparent);
  letter-spacing: 0.08em;
}
.pause-btn--paused:hover {
  background: color-mix(in srgb, #ff4455 22%, transparent);
}

/* ── Speed controls ───────────────────────────────────────────────────── */
.speed-btn {
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  background: transparent;
  color: var(--hud-dim);
  border: 1px solid var(--hud-edge);
  cursor: pointer;
  transition: color 80ms, border-color 80ms, background 80ms;
}
.speed-btn:hover       { color: var(--hud-fg); border-color: var(--hud-fg); }
.speed-btn--active {
  color: var(--phosphor);
  border-color: var(--phosphor);
  background: color-mix(in srgb, var(--phosphor) 12%, transparent);
}

/* ── Economy HUD ──────────────────────────────────────────────────────── */
#econ-pop      { font-variant-numeric: tabular-nums; color: var(--hud-fg); }
.econ-balance  {
  font-variant-numeric: tabular-nums;
  color: #5cffa3;
  text-shadow: 0 0 6px rgba(92, 255, 163, 0.55);
  font-weight: 700;
}
.econ-income   { color: var(--hud-dim); font-variant-numeric: tabular-nums; }

/* ── City hover ───────────────────────────────────────────────────────── */
.city-hover-el { min-width: 6ch; font-variant-numeric: tabular-nums; transition: color 80ms, text-shadow 80ms; }
.city-hover--active { color: #ffe97a; text-shadow: 0 0 8px rgba(255, 233, 122, 0.6); }

/* ── Scanline / CRT ───────────────────────────────────────────────────── */
.scanline {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0px,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.18) 3px
    ),
    radial-gradient(
      ellipse at center,
      rgba(0, 0, 0, 0) 60%,
      rgba(0, 0, 0, 0.45) 100%
    );
  mix-blend-mode: multiply;
}

/* ══════════════════════════════════════════════════════════════════════════
   RIGHT SIDEBAR
   ══════════════════════════════════════════════════════════════════════════ */
#right-sidebar {
  grid-area: sidebar;
  background: rgba(2, 10, 6, 0.98);
  border-left: 1px solid var(--hud-edge);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* No backdrop-filter — compositor cost not worth it */
}

/* ── Placement panel (inside sidebar during placement phase) ─────────── */
#placement-panel {
  --player-accent: #5cffa3;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px 10px;
  overflow-y: auto;
}
#placement-panel.pp-hidden { display: none !important; }

.pp-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hud-edge);
  margin-bottom: 8px;
}
.pp-title {
  color: var(--player-accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.pp-sub { color: var(--hud-dim); font-size: 9px; letter-spacing: 0.08em; }

.pp-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.pp-card {
  border: 1px solid var(--hud-edge);
  padding: 6px 8px;
  cursor: pointer;
  transition: border-color 80ms, background 80ms;
  background: rgba(255,255,255,0.02);
}
.pp-card:hover:not(.pp-card--full) {
  border-color: var(--player-accent);
  background: color-mix(in srgb, var(--player-accent) 8%, transparent);
}
.pp-card--armed {
  border-color: var(--player-accent) !important;
  background: color-mix(in srgb, var(--player-accent) 15%, transparent) !important;
  box-shadow: 0 0 6px color-mix(in srgb, var(--player-accent) 30%, transparent);
}
.pp-card--full { opacity: 0.4; cursor: not-allowed; }

.pp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}
.pp-card-abbr  { color: var(--player-accent); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; }
.pp-card-cat   { color: var(--hud-dim); font-size: 9px; }
.pp-card-name  { color: var(--hud-fg); font-size: 9px; letter-spacing: 0.06em; margin-bottom: 3px; }
.pp-card-count { color: var(--hud-dim); font-size: 9px; }
.pp-card-count .pp-placed { color: var(--player-accent); font-weight: 700; }

.pp-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 8px;
  font-size: 8.5px;
  color: var(--hud-fg);
  letter-spacing: 0.04em;
  margin: 2px 0 4px;
  font-variant-numeric: tabular-nums;
}
.pp-stat   { display: inline-flex; align-items: baseline; gap: 3px; }
.pp-stat-k { color: var(--hud-dim); font-size: 8px; letter-spacing: 0.08em; }

.pp-status {
  font-size: 9px;
  color: var(--hud-fg);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 0 4px;
  min-height: 24px;
  border-top: 1px solid var(--hud-edge);
  margin-top: 4px;
}

.pp-budget {
  font-size: 10px;
  color: var(--hud-dim);
  padding: 4px 0;
  text-transform: uppercase;
}
.pp-dim { color: var(--hud-dim); }

.pp-begin {
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 0;
  width: 100%;
  background: color-mix(in srgb, var(--player-accent) 15%, transparent);
  color: var(--player-accent);
  border: 1px solid var(--player-accent);
  cursor: pointer;
  margin-top: 6px;
  transition: background 100ms, box-shadow 100ms;
}
.pp-begin:hover:not(:disabled) {
  background: color-mix(in srgb, var(--player-accent) 30%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--player-accent) 35%, transparent);
}
.pp-begin:disabled { opacity: 0.35; cursor: not-allowed; }

.pp-blocs {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--hud-edge);
  margin-bottom: 8px;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pp-blocs-list { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.pp-bloc-tag {
  border: 1px solid;
  padding: 1px 5px;
  font-size: 9px;
  letter-spacing: 0.08em;
  background: rgba(255, 51, 68, 0.06);
  opacity: 0.85;
}

/* ── Game panel (unit roster, playing phase) ─────────────────────────── */
#game-panel {
  --gp-accent: #5cffa3;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
#game-panel.gp-hidden { display: none !important; }

.gp-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 11px 9px;
  border-bottom: 1px solid var(--hud-edge);
  flex-shrink: 0;
}
.gp-title { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; }
.gp-sub   { color: var(--hud-dim); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; }

.gp-roster {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.gp-empty {
  font-size: 9px;
  color: var(--hud-dim);
  text-align: center;
  padding: 20px 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 80ms;
  border-left: 2px solid transparent;
}
.gp-row:hover {
  background: rgba(255,255,255,0.04);
}
.gp-row--selected {
  background: color-mix(in srgb, var(--row-accent, #5cffa3) 10%, transparent);
  border-left-color: var(--row-accent, #5cffa3);
}

.gp-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 8, 5, 0.6);
}

.gp-row-info {
  flex: 1;
  min-width: 0;
}

.gp-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3px;
}
.gp-abbr {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.gp-row-status {
  font-size: 8px;
  color: var(--hud-dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.gp-status-moving  { color: #ffe97a; }
.gp-status-launch  { color: #ff9955; }

.gp-hp-track {
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 2px;
}
.gp-hp-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 400ms;
}
.gp-hp-label {
  font-size: 8px;
  color: var(--hud-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

/* ── Mini SVG icons (command bar + game panel) ────────────────────────── */
.unit-mini-svg {
  display: block;
  overflow: visible;
}
.unit-mini-svg .unit-base {
  fill: rgba(2, 6, 12, 0.85);
  stroke: var(--unit-accent);
  stroke-width: 0.8;
  stroke-dasharray: 2.5 1.5;
  opacity: 0.85;
  vector-effect: non-scaling-stroke;
}
.unit-mini-svg path,
.unit-mini-svg polygon,
.unit-mini-svg rect,
.unit-mini-svg ellipse,
.unit-mini-svg circle {
  stroke: var(--unit-accent);
  stroke-width: 1.1;
  stroke-linejoin: round;
  stroke-linecap: round;
  fill: color-mix(in srgb, var(--unit-accent) 20%, transparent);
  vector-effect: non-scaling-stroke;
}
.unit-mini-svg line {
  stroke: var(--unit-accent);
  stroke-width: 0.9;
  fill: none;
  vector-effect: non-scaling-stroke;
}

/* ══════════════════════════════════════════════════════════════════════════
   BOTTOM COMMAND BAR
   ══════════════════════════════════════════════════════════════════════════ */
#cmd-bar {
  grid-area: cmdbar;
  display: grid;
  grid-template-rows: 30px 1fr;
  background: var(--hud-bg);
  border-top: 1px solid var(--hud-edge);
  font-size: 11px;
  text-transform: uppercase;
  overflow: hidden;
}

/* ── State strip (top row — formerly the top HUD bar) ─────────────────── */
.cmd-state {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border-bottom: 1px solid var(--hud-edge);
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
  white-space: nowrap;
}
.cmd-state .hud-sep { opacity: 0.35; }

/* ── Main row (bottom row — unit detail + actions + meta) ─────────────── */
.cmd-main {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  min-height: 0;
}

/* ── Left: unit detail / idle status ─────────────────────────────────── */
.cmd-detail {
  width: 310px;
  flex-shrink: 0;
  padding: 10px 14px;
  border-right: 1px solid var(--hud-edge);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.cmd-idle {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Unit card layout */
.cmd-unit-card {
  --cmd-accent: #5cffa3;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.cmd-icon-wrap {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid var(--cmd-accent, #5cffa3);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 8, 5, 0.7);
}

.cmd-icon-svg { display: block; }

.cmd-unit-info {
  flex: 1;
  min-width: 0;
}

.cmd-unit-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-unit-meta {
  font-size: 8.5px;
  color: var(--hud-dim);
  letter-spacing: 0.07em;
  margin-bottom: 4px;
  display: flex;
  gap: 5px;
  align-items: baseline;
}
.cmd-abbr   { color: var(--hud-fg); font-weight: 700; }
.cmd-sep    { color: var(--hud-dim); }
.cmd-status-badge   { color: var(--hud-dim); }
.cmd-status-moving  { color: #ffe97a !important; }
.cmd-status-launch  { color: #ff9955 !important; }

.cmd-hp-track {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 3px;
}
.cmd-hp-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 300ms;
}
.cmd-unit-stats {
  display: flex;
  gap: 10px;
  font-size: 8.5px;
  color: var(--hud-fg);
  font-variant-numeric: tabular-nums;
}
.cmd-stat-k { color: var(--hud-dim); font-size: 8px; letter-spacing: 0.07em; margin-right: 2px; }

/* ── Center: action buttons ───────────────────────────────────────────── */
.cmd-actions {
  flex: 1;
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  border-right: 1px solid var(--hud-edge);
  min-width: 0;
}

/* Hint text in cmd-actions when no button needed */
.cmd-move-hint, .cmd-launch-hint {
  font-size: 9px;
  color: var(--hud-dim);
  letter-spacing: 0.07em;
}
.cmd-launch-hint { color: #ff9955; }

/* Action buttons */
.cmd-btn {
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  background: transparent;
  border: 1px solid;
  cursor: pointer;
  width: fit-content;
  transition: background 100ms, box-shadow 100ms;
}

.cmd-btn--launch {
  color: #ff9955;
  border-color: #ff9955;
}
.cmd-btn--launch:hover {
  background: rgba(255, 153, 85, 0.14);
  box-shadow: 0 0 8px rgba(255, 153, 85, 0.3);
}

.cmd-btn--warn {
  color: var(--warn);
  border-color: var(--warn);
}
.cmd-btn--warn:hover {
  background: rgba(255, 119, 85, 0.14);
}

.cmd-btn--cancel {
  color: var(--hud-dim);
  border-color: var(--hud-edge);
}
.cmd-btn--cancel:hover {
  color: var(--warn);
  border-color: var(--warn);
}

/* ── Right: meta (economy, speed, hints) ──────────────────────────────── */
.cmd-meta {
  width: 260px;
  flex-shrink: 0;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.cmd-econ {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 11px;
}

.cmd-speed {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cmd-hints {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 9px;
  color: var(--hud-dim);
}
.cmd-hints .hud-mono { font-size: 9px; }

.cmd-zoom-row {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
}

/* ── Fuel bar (game panel roster) ─────────────────────────────────────── */
.gp-fuel-track {
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 2px;
}
.gp-fuel-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 400ms;
}

/* Returning status */
.gp-row--returning {
  background: rgba(255, 153, 85, 0.05);
}
.gp-status-returning { color: #ff9955; }

/* ── Fuel bar (command bar unit card) ─────────────────────────────────── */
.cmd-fuel-track {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 3px;
}
.cmd-fuel-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 300ms;
}

/* ── Missile recharge bar ──────────────────────────────────────────────── */
.cmd-cooldown-track {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 3px;
}
.cmd-cooldown-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 400ms;
}

/* Fuel warning label */
.cmd-fuel-warn {
  color: #ff9955;
  font-size: 8.5px;
  letter-spacing: 0.05em;
  margin-left: 4px;
}

/* Returning status badge */
.cmd-status-warn { color: #ff9955 !important; }

/* ── City / territory info icons ─────────────────────────────────────── */
.cmd-info-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(2, 8, 5, 0.7);
  letter-spacing: 0;
}
.cmd-city-icon { border-radius: 2px; }
.cmd-terr-icon { font-size: 26px; }

/* Capital city badge */
.cmd-badge {
  font-size: 7.5px;
  letter-spacing: 0.1em;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════════════════
   RECRUITMENT SYSTEM  (sidebar-native — no overlay)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── View-toggle button (RECRUIT / ← FORCES) ─────────────────────────── */
.gp-toggle-btn {
  --gp-accent: #5cffa3;
  display: block;
  width: calc(100% - 20px);
  margin: 7px 10px 4px;
  padding: 6px 0;
  background: color-mix(in srgb, var(--gp-accent) 10%, transparent);
  border: 1px solid var(--gp-accent);
  color: var(--gp-accent);
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 120ms;
  flex-shrink: 0;
}
.gp-toggle-btn:hover {
  background: color-mix(in srgb, var(--gp-accent) 22%, transparent);
}

/* ── Recruit view container (fills remaining sidebar height) ─────────── */
.gp-recruit-view {
  --recruit-accent: #5cffa3;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 0;
}

/* Balance strip at top of shop */
.shop-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 10px 5px;
  border-bottom: 1px solid var(--hud-edge);
  flex-shrink: 0;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.shop-bal-label { color: var(--hud-dim); }
.shop-bal-val   { color: var(--hud-fg); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Unit card list (single column in sidebar) */
.shop-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.shop-card {
  --card-accent: #5cffa3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: transparent;
  border-bottom: 1px solid var(--hud-edge);
  cursor: pointer;
  transition: background 80ms;
}
.shop-card:hover:not(.shop-card--disabled) {
  background: color-mix(in srgb, var(--card-accent) 8%, transparent);
}
.shop-card--disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.shop-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(1,6,3,0.7);
}

.shop-card-info {
  flex: 1;
  min-width: 0;
}
.shop-card-name {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--hud-fg);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.shop-cost {
  font-size: 9px;
  font-weight: 700;
  color: var(--card-accent);
  letter-spacing: 0.05em;
}
.shop-cost--broke { color: #ff5533; }
.shop-cost--na    { color: var(--hud-dim); font-weight: 400; font-size: 8px; }
.shop-card-count {
  font-size: 8px;
  color: var(--hud-dim);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ── Armed placement cursor ─────────────────────────────────────────── */
#map.recruit-armed {
  cursor: crosshair;
}
#map.recruit-armed * {
  cursor: crosshair !important;
}

/* Country conquest tints — duplicate block removed; see above rules */

/* ══════════════════════════════════════════════════════════════════════════
   FOG OF WAR
   ══════════════════════════════════════════════════════════════════════════ */

/* The fog overlay rect is rendered via SVG mask inside fog.js;
   no extra CSS needed for the rect itself.  These rules handle
   the radar-pulse animation on the player's units. */

/* No radar-pulse animation — per-unit drop-shadow filter is expensive. */

/* Missile reload indicator on interceptor/ICBM/hypersonic */
.unit--reloading .unit-base {
  opacity: 0.45;
}

/* ══════════════════════════════════════════════════════════════════════════
   AMPHIBIOUS MARINES
   ══════════════════════════════════════════════════════════════════════════ */

/* Amphibious units use the standard unit styling — the wave in the SVG
   icon already distinguishes them visually.  The mobilty badge shown
   in the command bar will read "AMPHIB". */

/* Intercept flash: the blue explosion for a successful interception */
.missile-intercept-flash {
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════════════════
   SAVE / LOAD SYSTEM
   ══════════════════════════════════════════════════════════════════════════ */

.save-bar {
  display: flex;
  gap: 6px;
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--hud-edge);
  flex-shrink: 0;
}

.save-btn {
  flex: 1;
  background: transparent;
  border: 1px solid var(--hud-dim);
  color: var(--hud-dim);
  font-family: inherit;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 4px;
  cursor: pointer;
  transition: color 80ms, border-color 80ms, background 80ms;
  text-align: center;
}
.save-btn:hover {
  color: var(--hud-fg);
  border-color: var(--hud-fg);
  background: color-mix(in srgb, var(--hud-fg) 8%, transparent);
}
.save-btn--save:hover {
  color: var(--phosphor);
  border-color: var(--phosphor);
  background: color-mix(in srgb, var(--phosphor) 10%, transparent);
}
.save-btn--load:hover {
  color: #ffe97a;
  border-color: #ffe97a;
  background: color-mix(in srgb, #ffe97a 8%, transparent);
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE SIDEBAR TOGGLE BUTTON
   (hidden on desktop; shown by media query below)
   ══════════════════════════════════════════════════════════════════════════ */

.mob-sidebar-btn {
  display: none;  /* hidden on desktop */
}

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE / TOUCH  (≤ 768 px)
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── App grid: drop the sidebar column ─────────────────────────────── */
  #app {
    grid-template-areas:
      "map"
      "cmdbar";
    grid-template-rows: 1fr 52px;
    grid-template-columns: 1fr;
  }

  /* ── Right sidebar becomes a slide-up bottom sheet ──────────────────── */
  #right-sidebar {
    display: none;
    position: fixed;
    bottom: 52px;           /* sits directly above the cmd bar */
    left: 0;
    right: 0;
    height: 32vh;
    max-height: 32vh;
    z-index: 90;
    border-left: none;
    border-top: 1px solid var(--hud-edge);
    border-right: none;
    overflow: hidden;
    animation: none;
  }
  #right-sidebar.mob-open {
    display: flex;
    animation: mob-slide-up 0.18s ease-out;
  }
  @keyframes mob-slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }

  /* ── Command bar: two buttons side-by-side ───────────────────────────
     Left half: confirm-btn (SELECT A TERRITORY / DEPLOY / GAME ON / …)
     Right half: FORCES toggle. Everything else hidden. */
  #cmd-bar {
    display: flex !important;
    flex-direction: row;
    grid-template-rows: none;
    padding: 0;
    align-items: stretch;
  }

  /* cmd-state hosts confirm-btn; strip all its other clusters */
  .cmd-state {
    flex: 1;
    padding: 0;
    gap: 0;
    background: transparent;
    border: none;
    min-height: 0;
    height: auto;
  }
  .cmd-state > .hud-cluster { display: none; }
  .cmd-state > .hud-cluster:has(#confirm-btn) {
    display: flex;
    flex: 1;
    margin: 0 !important;
  }

  /* cmd-main hosts the FORCES toggle (inside cmd-meta); strip the rest */
  .cmd-main {
    flex: 1;
    padding: 0;
    gap: 0;
    min-height: 0;
  }
  .cmd-detail,
  .cmd-actions,
  .cmd-econ,
  .cmd-speed {
    display: none !important;
  }
  .cmd-meta {
    width: 100%;
    padding: 0;
    gap: 0;
    flex: 1;
    display: flex;
    align-items: stretch;
  }

  /* Shared full-size button styling for both bottom-bar buttons */
  #confirm-btn,
  .mob-sidebar-btn {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    border-top: 1px solid var(--hud-edge);
    border-radius: 0;
    font-family: inherit;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 0;
    cursor: pointer;
    transition: background 80ms, color 80ms, opacity 80ms;
  }
  /* Visual divider between the two buttons */
  .mob-sidebar-btn {
    border-left: 1px solid var(--hud-edge);
    background: color-mix(in srgb, var(--hud-fg) 12%, transparent);
    color: var(--hud-fg);
  }
  .mob-sidebar-btn:hover,
  .mob-sidebar-btn:active {
    background: color-mix(in srgb, var(--hud-fg) 22%, transparent);
  }
  /* confirm-btn keeps its own contextual colors via existing rules;
     here we just override sizing. Disabled state stays muted. */
  #confirm-btn:disabled {
    cursor: default;
    opacity: 0.55;
  }

  /* Hide all the other mob-tagged clusters too */
  .mob-hide,
  .mob-hide-flex { display: none !important; }

  /* ── EXPANDED cmd-bar ────────────────────────────────────────────────
     Tapping GAME ON during play adds .cmd-expanded to #cmd-bar. The bar
     grows out of its 52px row, stacks vertically, and reveals: DATE,
     unit detail, action buttons, econ stats, pause/speed controls, and
     the FORCES toggle at the bottom. Scrolls internally if very tall. */
  #app:has(#cmd-bar.cmd-expanded) {
    grid-template-rows: 1fr auto;
  }
  #cmd-bar.cmd-expanded {
    flex-direction: column;
    align-items: stretch;
    max-height: 70vh;
    overflow-y: auto;
  }

  /* cmd-state becomes a vertical block: DATE row + GAME ON row */
  #cmd-bar.cmd-expanded .cmd-state {
    flex-direction: column;
    flex: 0 0 auto;
    padding: 0;
  }
  /* Reveal the DATE cluster (and any other non-confirm, non-mob-hide cluster) */
  #cmd-bar.cmd-expanded .cmd-state > .hud-cluster {
    display: flex;
    width: 100%;
    padding: 6px 14px;
    margin: 0 !important;
    box-sizing: border-box;
    border-bottom: 1px solid var(--hud-edge);
  }
  /* Hide pure-branding "FieldOp // TACTICAL COMMAND" cluster on mobile */
  #cmd-bar.cmd-expanded .cmd-state > .hud-cluster:first-child {
    display: none;
  }
  /* The GAME ON button cluster: full 52px row, no border (button has its own) */
  #cmd-bar.cmd-expanded .cmd-state > .hud-cluster:has(#confirm-btn) {
    flex: 0 0 52px;
    padding: 0;
    border-bottom: none;
  }

  /* cmd-main: vertical stack of detail, actions, then cmd-meta */
  #cmd-bar.cmd-expanded .cmd-main {
    flex-direction: column;
    width: 100%;
    flex: 0 0 auto;
    padding: 0;
    gap: 0;
  }

  /* Reveal the items hidden in collapsed mode */
  #cmd-bar.cmd-expanded .cmd-detail,
  #cmd-bar.cmd-expanded .cmd-actions,
  #cmd-bar.cmd-expanded .cmd-econ,
  #cmd-bar.cmd-expanded .cmd-speed {
    display: flex !important;
    width: 100%;
    padding: 10px 14px;
    border-top: 1px solid var(--hud-edge);
    box-sizing: border-box;
  }
  #cmd-bar.cmd-expanded .cmd-actions {
    flex-wrap: wrap;
    gap: 6px;
  }
  #cmd-bar.cmd-expanded .cmd-econ {
    gap: 8px;
    flex-wrap: wrap;
    font-size: 11px;
    align-items: center;
  }
  #cmd-bar.cmd-expanded .cmd-speed {
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
  }

  /* cmd-meta stacks: (cmd-econ, cmd-speed already styled above; here we
     restructure cmd-meta itself so the FORCES btn sits at the bottom) */
  #cmd-bar.cmd-expanded .cmd-meta {
    flex-direction: column;
    width: 100%;
    padding: 0;
    gap: 0;
  }
  #cmd-bar.cmd-expanded .mob-sidebar-btn {
    border-left: none;
    border-top: 1px solid var(--hud-edge);
    height: 52px;
    flex: 0 0 52px;
  }

  /* Chevron on GAME ON to indicate expand/collapse affordance */
  #cmd-bar:not(.cmd-expanded) #confirm-btn.playing::after {
    content: "  \25BE";  /* ▾ */
    margin-left: 8px;
  }
  #cmd-bar.cmd-expanded #confirm-btn.playing::after {
    content: "  \25B4";  /* ▴ */
    margin-left: 8px;
  }

  /* Speed buttons: compact */
  .cmd-speed {
    gap: 3px;
    flex-wrap: wrap;
  }
  .speed-btn {
    padding: 3px 5px;
    font-size: 9px;
    min-height: 28px;
  }
  .pause-btn {
    padding: 3px 7px;
    min-height: 28px;
  }

  /* Economy: smaller text */
  .cmd-econ {
    font-size: 10px;
    gap: 5px;
  }

  /* Sidebar contents: touch-friendly row heights */
  .gp-row {
    padding: 8px 10px;
    min-height: 44px;
  }
  .gp-toggle-btn {
    min-height: 38px;
  }
  .shop-card {
    padding: 10px;
    min-height: 52px;
  }
  .save-btn {
    min-height: 36px;
    padding: 6px 4px;
  }

  /* Placement panel cards: touch-friendly */
  .pp-card {
    padding: 10px 10px;
    min-height: 44px;
  }
  .pp-begin {
    min-height: 44px;
    font-size: 13px;
  }

  /* Scanline: skip on mobile (GPU cost) */
  .scanline { display: none; }

  /* Info panel: slightly larger on touch screens */
  #info-panel {
    font-size: 10px;
    min-width: 170px;
    padding: 10px 12px 12px;
  }
  .ip-title { font-size: 13px; }
}
