/* play-life.css — bottom-left life + actions hub (playgroup.gg-style), QA G1 2026-07-02.
   Harmonizes with play-hud.css: dark glass, teal #2bd4c0 accent, Inter, tabular numerals. */

/* While the opening-hand / mulligan modal is up, hide the life hub so it can't overlap the
   Keep/Mulligan buttons (the modal lives in #playPage's stacking context; the hub is root-fixed). */
body.oh-open .pl-cluster { display: none !important; }
/* pinned/expanded action stack: keep the toggle highlighted so it's clear the buttons are anchored up */
.pl-actwrap.acts-open .pl-acts-toggle { background: rgba(43,212,192,.92); color: #06231f; border-color: #2bd4c0; box-shadow: 0 0 10px rgba(43,212,192,.45); }
/* mana pool + commander tax mirrored onto the hub (same state as the top vitals bar) */
.pl-mana { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 2px 2px 0; max-width: 340px; }
.pl-mp { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px 2px 4px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #eaf1fb; cursor: pointer; font-variant-numeric: tabular-nums; }
.pl-mp img { width: 15px; height: 15px; display: block; }
.pl-mp b { font-size: 12px; font-weight: 800; }
.pl-mp.has { border-color: rgba(43,212,192,.55); background: rgba(43,212,192,.10); }
.pl-mp:hover { background: rgba(120,160,230,.18); }
.pl-mp-clear, .pl-mp-keep { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #9fb0c6; border-radius: 999px; cursor: pointer; font-size: 10px; padding: 3px 8px; display: inline-flex; align-items: center; }
.pl-mp-keep { text-transform: uppercase; font-weight: 700; letter-spacing: .04em; }
.pl-mp-keep.on { background: rgba(43,212,192,.85); color: #06302b; border-color: #2bd4c0; }
.pl-mp-tax { font-size: 11px; font-weight: 800; color: #9cc9ff; margin-left: 2px; white-space: nowrap; }
.pl-cluster {
  position: fixed; left: 16px; bottom: 14px; z-index: 93;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  pointer-events: auto; font-family: Inter, system-ui, sans-serif;
  -webkit-user-select: none; user-select: none;
}

/* ---- action stack (VERTICAL): Counters · Commander damage · Player Counters · Draw · Roll Dice · Scoop ---- */
.pl-actions {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px;
  background: rgba(13,19,30,.92); border: 1px solid rgba(255,255,255,.10); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.46); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.pl-act {
  display: flex; align-items: center; justify-content: flex-start; gap: 8px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  color: #c7d2e2; border-radius: 9px; padding: 7px 11px; font-size: 12px; font-weight: 700;
  line-height: 1; text-align: left; white-space: nowrap;
  transition: background .12s ease, color .12s ease, border-color .12s ease, transform .08s ease;
}
.pl-act svg { width: 16px; height: 16px; flex: 0 0 auto; opacity: .92; }
.pl-act:hover { background: rgba(255,255,255,.10); color: #fff; }
.pl-act:active { transform: scale(.97); }
.pl-act-death:hover { background: rgba(229,72,77,.16); border-color: rgba(229,72,77,.5); color: #ffb4b6; }

/* ---- player-counters popup (matches the trackers/menu style) ---- */
.pl-ctr-sheet { width: min(360px, 92vw); }
.pl-ctr-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.pl-ctr-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border-radius: 12px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.08);
}
.pl-ctr-nm { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; color: #eaf1fb; }
.pl-ctr-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; color: #2bd4c0; }
.pl-ctr-ic .msym { margin: 0; font-size: 19px; vertical-align: 0; }
.pl-ctr-ic svg { display: block; }
.pl-ctr-ic-tx { font-size: 17px; line-height: 1; color: #3fb950; }
.pl-ctr-steps { display: inline-flex; align-items: center; gap: 10px; }
.pl-ctr-b {
  width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; font-size: 18px; font-weight: 800;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #dbe4f3; border-radius: 9px;
  transition: background .12s ease, transform .08s ease;
}
.pl-ctr-b:hover { background: rgba(255,255,255,.12); }
.pl-ctr-b:active { transform: scale(.92); }
.pl-ctr-inc { background: rgba(43,212,192,.18); border-color: rgba(43,212,192,.5); color: #7ff0e2; }
/* Monarch (and any binary counter) shows as a toggle switch, not a +/- count */
.pl-ctr-tog { position: relative; width: 48px; height: 27px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); cursor: pointer; padding: 0; flex: 0 0 auto; transition: background .15s ease, border-color .15s ease; }
.pl-ctr-tog > span { position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #cfd8e6; transition: transform .16s ease, background .16s ease; }
.pl-ctr-tog.on { background: rgba(43,212,192,.35); border-color: rgba(43,212,192,.6); }
.pl-ctr-tog.on > span { transform: translateX(21px); background: #7ff0e2; }
@media (prefers-reduced-motion: reduce) { .pl-ctr-tog, .pl-ctr-tog > span { transition: none; } }
.pl-ctr-inc:hover { background: rgba(43,212,192,.3); color: #fff; }
.pl-ctr-v { min-width: 26px; text-align: center; font-size: 17px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }

/* ---- bottom row: turn column + life pill + zone counts ---- */
.pl-bottom { display: flex; align-items: stretch; gap: 10px; }

.pl-turncol { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.pl-pass {
  cursor: pointer; border: 0; border-radius: 12px; padding: 9px 16px;
  background: linear-gradient(120deg, #3d72bd, #284c8a); color: #eaf2ff;
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800;
  box-shadow: 0 10px 24px rgba(40,76,138,.5); transition: filter .12s ease, transform .08s ease;
}
.pl-pass svg { width: 16px; height: 16px; }
.pl-pass:hover { filter: brightness(1.08); }
.pl-pass:active { transform: translateY(1px); }
.pl-untap {
  cursor: pointer; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 6px 14px;
  background: rgba(17,25,37,.9); color: #b9c5d6; display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 700; transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.pl-untap svg { width: 14px; height: 14px; }
.pl-untap:hover { background: rgba(28,40,58,.95); color: #fff; border-color: rgba(43,212,192,.45); }

/* collapsible action stack — hidden until you hover the group or click the up-arrow */
.pl-actwrap { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.pl-actwrap .pl-actions { opacity: 0; transform: translateY(12px); pointer-events: none; max-height: 0; overflow: hidden; margin-bottom: 0; transition: opacity .28s ease, transform .28s ease, max-height .28s ease, margin-bottom .28s ease; }
.pl-actwrap:hover .pl-actions, .pl-actwrap.acts-open .pl-actions { opacity: 1; transform: translateY(0); pointer-events: auto; max-height: 440px; margin-bottom: 6px; }
.pl-acts-toggle { align-self: flex-start; cursor: pointer; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 5px 12px; background: rgba(17,25,37,.9); color: #b9c5d6; display: inline-flex; align-items: center; transition: background .12s ease, color .12s ease, border-color .12s ease; }
.pl-acts-toggle svg { width: 18px; height: 18px; transition: transform .25s ease; }
.pl-acts-toggle:hover { background: rgba(28,40,58,.95); color: #fff; border-color: rgba(43,212,192,.45); }
.pl-actwrap:hover .pl-acts-toggle svg, .pl-actwrap.acts-open .pl-acts-toggle svg { transform: rotate(180deg); }
/* Untap + Draw sit side by side, together matching the Pass Turn width */
.pl-uprow { display: flex; gap: 6px; }
.pl-uprow .pl-untap { flex: 1 1 0; justify-content: center; padding-left: 8px; padding-right: 8px; }
@media (prefers-reduced-motion: reduce) { .pl-actwrap .pl-actions, .pl-acts-toggle svg { transition: none; } }

/* ---- live zone counts: Library / Graveyard / Exile (G1.4) ---- */
.pl-zones { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.pl-zones[hidden] { display: none; }
.pl-zone {
  display: flex; align-items: center; gap: 8px; min-width: 64px; padding: 3px 10px;
  border-radius: 9px; background: rgba(13,19,30,.9); border: 1px solid rgba(255,255,255,.09);
  font-size: 10.5px; font-weight: 700; color: #9fb0c6; letter-spacing: .04em; text-transform: uppercase;
}
.pl-zone b { margin-left: auto; color: #fff; font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ---- life pill ---- */
.pl-pill {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  background: rgba(10,15,24,.95); border: 1px solid rgba(255,255,255,.14); border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.05);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); overflow: visible;
}
.pl-step {
  cursor: pointer; width: 40px; height: 40px; border-radius: 11px; line-height: 1;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: #fff;
  font-size: 24px; font-weight: 800; transition: background .12s ease, color .12s ease, transform .07s ease;
  display: grid; place-items: center; touch-action: none;
}
.pl-step:hover { background: #2bd4c0; color: #06302b; border-color: #2bd4c0; }
.pl-step:active { transform: scale(.92); }

.pl-core { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 96px; }
.pl-life {
  cursor: pointer; border: 0; background: transparent; color: #fff; line-height: 1;
  font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .01em;
  padding: 0 6px; transition: transform .12s ease, color .12s ease, text-shadow .12s ease;
}
.pl-life:hover { text-shadow: none; }

/* G1.6 / G1.10 — red flash on loss, green flash on gain (every hold tick re-triggers it) */
.pl-life.hit { animation: plLifeHit .45s ease-out; }
.pl-life.heal { animation: plLifeHeal .45s ease-out; }
@keyframes plLifeHit { 0% { color: #ff5a63; text-shadow: 0 0 20px rgba(229,72,77,.85); transform: scale(1.12); } 100% { color: #fff; text-shadow: none; transform: scale(1); } }
@keyframes plLifeHeal { 0% { color: #4ade80; text-shadow: 0 0 20px rgba(63,185,80,.85); transform: scale(1.12); } 100% { color: #fff; text-shadow: none; transform: scale(1); } }
.pl-pill.hit { animation: plPillHit .45s ease-out; }
.pl-pill.heal { animation: plPillHeal .45s ease-out; }
@keyframes plPillHit { 0% { box-shadow: 0 0 0 3px rgba(229,72,77,.6), 0 16px 40px rgba(0,0,0,.55); } 100% { box-shadow: 0 16px 40px rgba(0,0,0,.55); } }
@keyframes plPillHeal { 0% { box-shadow: 0 0 0 3px rgba(63,185,80,.6), 0 16px 40px rgba(0,0,0,.55); } 100% { box-shadow: 0 16px 40px rgba(0,0,0,.55); } }

/* G1.9 — at 0 life the whole health area fills red with white "YOU ARE DEAD" */
.pl-dead {
  position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center;
  border-radius: 16px; background: linear-gradient(160deg, rgba(214,28,40,.97), rgba(150,12,22,.97));
  color: #fff; font-size: 15px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,.45);
}
.pl-dead[hidden] { display: none; }
.pl-cluster.pl-is-dead .pl-pill { border-color: rgba(229,72,77,.7); }

/* pending "+N / −N" readout (G1.5) */
.pl-math {
  height: 0; opacity: 0; overflow: hidden; font-size: 13px; font-weight: 800;
  font-variant-numeric: tabular-nums; letter-spacing: .02em; color: #9fb0c6;
  transition: opacity .12s ease; white-space: nowrap;
}
.pl-math.show { height: auto; opacity: 1; margin-top: 1px; }
.pl-math.neg { color: #ff8a8f; }
.pl-math.pos { color: #6fe3a0; }

/* poison badge — green, top-right of the pill */
.pl-poison {
  position: absolute; top: -9px; right: -8px; z-index: 5; display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: 999px; background: #3fb950; color: #06270f;
  border: 1px solid rgba(0,0,0,.25); box-shadow: 0 4px 12px rgba(63,185,80,.5); font-weight: 800; font-size: 12px;
}
.pl-poison[hidden] { display: none; }
.pl-poison-i { font-size: 12px; line-height: 1; }
.pl-poison b { font-variant-numeric: tabular-nums; }

/* health-bar counter chips (poison / energy / experience / rad / monarch) — an icon + count each */
.pl-cchips { position: absolute; top: -13px; right: -6px; z-index: 6; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 220px; pointer-events: none; }
.pl-cchips[hidden] { display: none; }
.pl-cchip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 7px 2px 5px; border-radius: 999px; background: #3fb950; color: #06270f; border: 1px solid rgba(0,0,0,.28); box-shadow: 0 4px 12px rgba(2,8,20,.5); font-weight: 800; font-size: 12px; line-height: 1; }
.pl-cchip b { font-variant-numeric: tabular-nums; font-size: 12px; }
.pl-cchip .pl-ctr-ic { display: inline-flex; align-items: center; }
.pl-cchip .pl-ctr-ic svg { width: 13px; height: 13px; }
.pl-cchip .msym { font-size: 15px; line-height: 1; }
.pl-cchip-poison { background: #3fb950; color: #06270f; }
.pl-cchip-energy { background: #2f6fed; color: #eaf3ff; }
.pl-cchip-experience { background: #7b52d0; color: #f3edff; }
.pl-cchip-rad { background: #d8a11e; color: #241a02; }
.pl-cchip-monarch { background: #c9942a; color: #241a02; }

/* one-shot pulse label (Draw / Conceded) over the pill */
.pl-flash {
  position: absolute; left: 50%; top: -14px; transform: translate(-50%, 0); z-index: 6;
  padding: 3px 12px; border-radius: 999px; background: rgba(43,212,192,.16);
  border: 1px solid rgba(43,212,192,.5); color: #2bd4c0; font-size: 11px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; opacity: 0; pointer-events: none; white-space: nowrap;
}
.pl-flash.go { animation: plFlash .7s ease-out; }
@keyframes plFlash { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.85); } 25% { opacity: 1; transform: translate(-50%, -2px) scale(1.05); } 100% { opacity: 0; transform: translate(-50%, -16px) scale(1); } }

/* ============================================================
   SHARED MODAL SHELL (escapes board overflow; fixed, high z)
   ============================================================ */
.pl-modal {
  position: fixed; inset: 0; z-index: 140; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(5,9,15,.6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  font-family: Inter, system-ui, sans-serif;
}
.pl-sheet {
  position: relative; width: min(360px, 94vw); max-height: 88vh; overflow-y: auto;
  background: linear-gradient(180deg, #10211d, #0b1622); border: 1px solid rgba(43,212,192,.30);
  border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.65); color: #e9eef6; padding: 18px 18px 20px;
}
.pl-sheet-x {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14);
  color: #cdd6e6; cursor: pointer;
}
.pl-sheet-x:hover { background: rgba(255,255,255,.12); color: #fff; }
.pl-sheet-x svg { width: 15px; height: 15px; }

.pl-kick { margin: 0; color: #2bd4c0; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.pl-sheet-hd { display: flex; align-items: center; gap: 13px; padding: 4px 36px 12px 2px; }
.pl-sheet-tt h3 { margin: 2px 0 0; font-size: 20px; font-weight: 800; letter-spacing: .01em; }

/* ============================================================
   SCOOP / CONCEDE CONFIRM (G1.3) — red Confirm · green Cancel
   ============================================================ */
.pl-confirm { width: min(340px, 92vw); text-align: center; padding: 22px 20px 20px; }
.pl-confirm-t { margin: 0 0 8px; font-size: 19px; font-weight: 800; letter-spacing: .01em; }
.pl-confirm-p { margin: 0 0 18px; color: #c7d2e2; font-size: 13.5px; line-height: 1.5; }
.pl-confirm-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.pl-cbtn {
  cursor: pointer; background: transparent; border: 1px solid transparent; border-radius: 10px;
  padding: 10px 20px; font-size: 15px; font-weight: 800; letter-spacing: .02em;
  transition: background .12s ease, color .12s ease, border-color .12s ease, transform .07s ease;
}
.pl-cbtn:active { transform: translateY(1px); }
.pl-cbtn-confirm { color: #ff5a63; }
.pl-cbtn-confirm:hover { background: rgba(229,72,77,.15); border-color: rgba(229,72,77,.55); color: #ff8a8f; }
.pl-cbtn-cancel { color: #3fb950; }
.pl-cbtn-cancel:hover { background: rgba(63,185,80,.14); border-color: rgba(63,185,80,.55); color: #6fe3a0; }

/* ============================================================
   COMMANDER-DAMAGE SHEET (G1.8) — card-art tiles, −/+ per opponent
   ============================================================ */
.pl-cd-sheet { width: min(440px, 94vw); }
.pl-cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 10px; margin-top: 4px; }
.pl-cd-empty { margin: 4px 0 0; color: #8a98ad; font-size: 12.5px; }
.pl-cd-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 8px 10px;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); border-radius: 12px;
}
.pl-cd-tile.me { border-color: rgba(43,212,192,.35); background: rgba(43,212,192,.06); }
.pl-cd-art {
  width: 100%; height: 64px; border-radius: 8px; background-size: cover; background-position: center 22%;
  border: 1px solid rgba(255,255,255,.16); box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.pl-cd-art.blank { background: radial-gradient(circle at 50% 35%, #213244, #0c1622); }
.pl-cd-nm {
  font-size: 11.5px; font-weight: 700; text-align: center; line-height: 1.2; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.pl-cd-owner { font-size: 10px; font-weight: 700; color: #8a98ad; letter-spacing: .03em; }
.pl-cd-tot { font-size: 11px; font-weight: 800; letter-spacing: .03em; color: #9fb2c8; background: rgba(255,255,255,.07); border-radius: 999px; padding: 2px 9px; font-variant-numeric: tabular-nums; }
.pl-cd-tot.warn { color: #ffd08a; background: rgba(245,158,11,.16); }
.pl-cd-tot.lethal { color: #ff8f9e; background: rgba(244,63,94,.18); }
.pl-cd-tot.me { background: transparent; color: #6b7b91; }
.pl-cd-steps { display: inline-flex; align-items: center; gap: 8px; }
.pl-cd-b {
  cursor: pointer; width: 32px; height: 32px; border-radius: 9px; line-height: 1; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); color: #fff;
  font-size: 18px; font-weight: 800; transition: background .12s ease, color .12s ease, border-color .12s ease, transform .07s ease;
}
.pl-cd-b:active { transform: scale(.92); }
.pl-cd-minus:hover { background: rgba(229,72,77,.2); border-color: rgba(229,72,77,.55); color: #ffb4b6; }
.pl-cd-plus:hover { background: #2bd4c0; border-color: #2bd4c0; color: #06302b; }
.pl-cd-b[disabled] { opacity: .32; cursor: not-allowed; }
.pl-cd-b[disabled]:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: #fff; }
.pl-cd-hint { margin: 12px 0 0; color: #8a98ad; font-size: 11px; line-height: 1.5; }

/* ============================================================
   OPPONENT PANEL (read-only) — commander damage TAKEN by another player,
   grouped per source commander. No edit controls anywhere in this sheet.
   ============================================================ */
.pl-opp-sheet { width: min(420px, 94vw); }
.pl-opp-life {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 2px 0 12px;
  padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
}
.pl-opp-lifenum { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; color: #e9eef6; }
.pl-opp-lifelbl { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #8a98ad; }
.pl-opp-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.pl-opp-grid { margin-top: 0; }
.pl-opp-tile { cursor: default; } /* read-only — no −/+ steps rendered, so no pointer affordance needed */

/* ---- reduced motion: no pulses/flashes ---- */
@media (prefers-reduced-motion: reduce) {
  .pl-life.hit, .pl-life.heal, .pl-pill.hit, .pl-pill.heal, .pl-flash.go { animation: none; }
}

/* ==================================================================== */
/* QA G7.46 · Mobile life cluster (Agent C-M) — ADDITIVE, phone-only.   */
/* The bottom-left hub is fixed; on a phone it scales down and hugs the */
/* safe-area so it stays readable without covering the board. Desktop   */
/* rendering is untouched (guarded by max-width: 820px).                */
/* ==================================================================== */
@media (max-width: 820px) {
  /* G7.6x — the hub is bottom-anchored, same as the pinned hand fan (table.css/play-shell.css),
     so it was overlapping the leftmost hand cards on a phone and swallowing taps meant for them.
     Clear the fixed hand band entirely instead of trying to carve out a pointer-events hole —
     that keeps every control visible, just moved up above the cards. */
  .pl-cluster {
    left: max(8px, env(safe-area-inset-left));
    bottom: calc(210px + max(8px, env(safe-area-inset-bottom)));
    gap: 6px;
  }

  /* Compact the vertical action stack — smaller pills, tighter padding. */
  .pl-actions { padding: 5px; gap: 3px; }
  .pl-act { padding: 6px 9px; font-size: 11.5px; min-height: 38px; }

  /* Life pill: smaller number + ≥40px steps kept for the thumb; the pill
     stays readable but no longer dominates the board. */
  .pl-pill { padding: 6px 9px; gap: 6px; }
  .pl-step { width: 42px; height: 42px; font-size: 22px; }
  .pl-life { font-size: 36px; }
  .pl-core { min-width: 78px; }

  /* Turn column + zone chips shrink so the whole bottom row fits. */
  .pl-pass { padding: 8px 13px; font-size: 12px; }
  .pl-untap { padding: 5px 11px; font-size: 11px; }
  .pl-zone { min-width: 56px; padding: 3px 8px; font-size: 10px; }
  /* new cluster elements stay tappable + fit on a phone */
  .pl-uprow .pl-untap { min-height: 38px; }
  .pl-acts-toggle { min-height: 34px; padding: 5px 14px; }
  .pl-cchips { max-width: 150px; top: -12px; }

  /* Sheets (counters / commander damage / concede) fill the phone. */
  .pl-sheet,
  .pl-confirm,
  .pl-cd-sheet,
  .pl-ctr-sheet {
    width: 100vw; max-width: 100vw;
    min-height: 100vh; max-height: 100vh;
    border-radius: 0;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  .pl-modal { padding: 0; }
}

/* Below 640px (real phones in portrait) the pinned hand fan is only 150px tall
   (play-shell.css), not the wider 200px band above — give some clearance back. */
@media (max-width: 640px) {
  .pl-cluster { bottom: calc(160px + max(8px, env(safe-area-inset-bottom))); }
}

/* Even narrower phones: let the bottom row wrap so the life pill and the
   turn/zone column stack rather than overflow horizontally. */
@media (max-width: 480px) {
  .pl-bottom { flex-wrap: wrap; }
}

/* ==================================================================== */
/* Touch: the collapsible action stack (.pl-actwrap) shows on `:hover` OR */
/* `.acts-open` (above). Touch browsers can leave `:hover` "stuck" on an  */
/* element after a tap (there's no mouse to fire mouseleave), so a       */
/* second tap toggled .acts-open off but the panel looked like it never  */
/* closed. Neutralise the hover-reveal on coarse pointers so only the    */
/* explicit tap-to-toggle controls it; mouse/trackpad hover is untouched.*/
/* ==================================================================== */
@media (pointer: coarse) {
  .pl-actwrap:hover:not(.acts-open) .pl-actions {
    opacity: 0; transform: translateY(12px); pointer-events: none; max-height: 0; margin-bottom: 0;
  }
  .pl-actwrap:hover:not(.acts-open) .pl-acts-toggle svg { transform: none; }
}
