/* play-hud.css — in-game taskbar + Roll Dice / Trackers pop-ups (Kiku-style). */

/* ---- taskbar (img 4) ---- */
.hud-bar {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 70;
  display: flex; align-items: center; gap: 2px; padding: 6px 8px;
  background: rgba(13,19,30,.92); border: 1px solid rgba(255,255,255,.10); border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0,0,0,.5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: Inter, system-ui, sans-serif;
}
.hud-turn { display: flex; align-items: baseline; gap: 8px; padding: 0 12px 0 8px; white-space: nowrap; }
.hud-turn b { font-size: 14px; font-weight: 800; color: #eef3fb; }
.hud-timer { font-size: 12px; color: #8a98ad; font-variant-numeric: tabular-nums; }
.hud-sep { width: 1px; align-self: stretch; margin: 4px 5px; background: rgba(255,255,255,.12); }
.hud-ic {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: transparent; border: 0; color: #b9c5d6; cursor: pointer; transition: background .12s ease, color .12s ease;
}
.hud-ic:hover { background: rgba(255,255,255,.10); color: #fff; }
.hud-ic-leave:hover { background: rgba(229,72,77,.20) !important; color: #ff6b6b !important; }
.hud-set-eng { color: #7ff0e2; }
.hud-set-audio { color: #8fb6ef; }
.hud-eng-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.07); }
.hud-eng-tx { flex: 1 1 auto; }
.hud-eng-tx b { display: block; color: #eaf1fb; font-size: 14px; font-weight: 700; }
.hud-eng-tx i { display: block; color: #97a6bd; font-size: 11.5px; font-style: normal; line-height: 1.45; margin-top: 3px; }
.hud-eng-tog { position: relative; flex: 0 0 auto; width: 50px; height: 28px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); cursor: pointer; padding: 0; transition: background .15s ease, border-color .15s ease; }
.hud-eng-tog > span { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #cfd8e6; transition: transform .16s ease, background .16s ease; }
.hud-eng-tog.on { background: rgba(43,212,192,.35); border-color: rgba(43,212,192,.6); }
.hud-eng-tog.on > span { transform: translateX(22px); background: #7ff0e2; }
.hud-eng-note { color: #8a98ad; font-size: 11.5px; margin: 12px 2px 2px; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .hud-eng-tog, .hud-eng-tog > span { transition: none; } }
.hud-leave-warn { font-size: 13.5px; line-height: 1.55; color: #e9eef6; margin: 2px 0 16px; }
.hud-leave-warn b { color: #ff8a8a; }
.hud-leave-row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.hud-leave-yes { cursor: pointer; border: 1px solid rgba(229,72,77,.6); background: rgba(229,72,77,.16); color: #ff8a8a; font-weight: 800; font-size: 13px; padding: 9px 16px; border-radius: 10px; }
.hud-leave-yes:hover { background: rgba(229,72,77,.85); color: #fff; }
.hud-leave-no { cursor: pointer; border: 1px solid rgba(43,212,192,.5); background: rgba(43,212,192,.14); color: #7ff0e2; font-weight: 800; font-size: 13px; padding: 9px 16px; border-radius: 10px; }
.hud-leave-no:hover { background: rgba(43,212,192,.28); color: #fff; }
.hud-ic:active { transform: scale(.94); }
.hud-pill { width: auto; padding: 0 12px; gap: 6px; grid-auto-flow: column; background: rgba(43,212,192,.14); border: 1px solid rgba(43,212,192,.4); color: #7ff0e2; }
.hud-pill:hover { background: rgba(43,212,192,.24); color: #fff; }
.hud-pill-tx { font-size: 12.5px; font-weight: 800; letter-spacing: .01em; }

/* ---- pop-up window shell (img 1 / 2) ---- */
.hud-pop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(5,9,15,.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.hud-pop-card {
  width: min(560px, 96vw); max-height: 86vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #10211d, #0b1622); border: 1px solid rgba(43,212,192,.30);
  border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.6); color: #e9eef6; font-family: Inter, system-ui, sans-serif;
}
.hud-pop-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 22px 14px; }
.hud-pop-kick { margin: 0; color: #2bd4c0; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hud-pop-title { margin: 3px 0 0; font-size: 24px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.hud-pop-actions { display: flex; gap: 8px; }
.hud-pop-edit, .hud-pop-x { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14); color: #cdd6e6; cursor: pointer; }
.hud-pop-edit:hover, .hud-pop-x:hover { background: rgba(255,255,255,.12); color: #fff; }
.hud-pop-body { padding: 4px 22px 22px; overflow-y: auto; }

/* ---- dice popup (img 1) ---- */
.hud-sec { margin-top: 14px; }
.hud-sec-h { margin: 0 0 8px; color: #2bd4c0; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.hud-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hud-big { cursor: pointer; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #e9eef6; border-radius: 10px; padding: 14px; font-size: 15px; font-weight: 700; }
.hud-big:hover { background: rgba(43,212,192,.14); border-color: #2bd4c0; }
.hud-dice { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.hud-die { cursor: pointer; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #e9eef6; border-radius: 9px; padding: 12px 0; font-size: 13px; font-weight: 800; }
.hud-die:hover { background: rgba(43,212,192,.14); border-color: #2bd4c0; }
.hud-custom { display: flex; gap: 8px; align-items: center; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.hud-custom select { background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.16); color: #e9eef6; border-radius: 9px; padding: 9px 10px; font-size: 14px; }
.hud-custom select option { background: #1b2230; color: #f1f5f9; }
.hud-roll-go { margin-left: auto; cursor: pointer; border: 0; background: #2bd4c0; color: #06302b; border-radius: 9px; padding: 10px 24px; font-size: 14px; font-weight: 800; }
.hud-roll-go:hover { filter: brightness(1.07); }
.hud-result { margin-top: 16px; min-height: 30px; display: flex; align-items: center; gap: 12px; }
.hud-res-k { font-size: 12px; color: #8a98ad; text-transform: uppercase; letter-spacing: .08em; }
.hud-res-v { font-size: 30px; font-weight: 800; color: #2bd4c0; font-variant-numeric: tabular-nums; }
.hud-res-sub { font-size: 13px; color: #9fb0c6; }
/* roll / coin-flip animation + white flash when the result locks in */
.hud-result { position: relative; }
.hud-res-v { display: inline-block; }
.hud-result.rolling .hud-res-v { color: #aeb9c9; animation: hudShake .11s linear infinite; }
@keyframes hudShake { 0%, 100% { transform: translateY(0) rotate(0deg); } 25% { transform: translateY(-2px) rotate(-4deg); } 75% { transform: translateY(2px) rotate(4deg); } }
.hud-result.flash .hud-res-v { animation: hudPop .6s cubic-bezier(.2,.85,.25,1); }
@keyframes hudPop { 0% { transform: scale(1.75); color: #fff; text-shadow: 0 0 28px rgba(255,255,255,.95), 0 0 12px rgba(43,212,192,.85); } 55% { color: #eafffb; } 100% { transform: scale(1); color: #2bd4c0; text-shadow: none; } }
.hud-result.flash::after { content: ""; position: absolute; inset: -10px -14px; border-radius: 14px; background: radial-gradient(120px 80px at 28% 50%, rgba(255,255,255,.82), rgba(255,255,255,0) 70%); animation: hudBurst .5s ease-out forwards; pointer-events: none; }
@keyframes hudBurst { 0% { opacity: .9; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.45); } }

/* ---- trackers popup (img 2 / 3) ---- */
.hud-trk-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 8px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; }
.hud-trk-l { font-size: 15px; font-weight: 700; }
.hud-trk-step { display: inline-flex; align-items: center; gap: 6px; }
.hud-trk-step button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #e9eef6; font-size: 18px; font-weight: 800; cursor: pointer; }
.hud-trk-step button:hover { background: var(--tbl-accent, #2bd4c0); color: #06302b; }
.hud-trk-step b { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 800; }
.hud-trk-tog { width: 52px; height: 30px; border-radius: 999px; border: 0; background: rgba(255,255,255,.14); cursor: pointer; position: relative; transition: background .15s ease; }
.hud-trk-tog span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s ease; }
.hud-trk-tog.on { background: #2bd4c0; } .hud-trk-tog.on span { left: 25px; }
.hud-trk-hint { color: #8a98ad; font-size: 13px; margin: 4px 2px 14px; }
.hud-trk-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.hud-trk-pill { cursor: pointer; border: 1px solid rgba(43,212,192,.4); background: transparent; color: #2bd4c0; border-radius: 8px; padding: 8px 13px; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.hud-trk-pill.on { background: #2bd4c0; color: #06302b; border-color: #2bd4c0; }
.hud-trk-pill:hover { filter: brightness(1.1); }
.hud-trk-add { display: flex; gap: 8px; margin-top: 16px; }
.hud-trk-add input { flex: 1; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.14); color: #e9eef6; border-radius: 9px; padding: 10px 12px; font-size: 14px; }
.hud-trk-add button { cursor: pointer; border: 0; background: #2bd4c0; color: #06302b; border-radius: 9px; padding: 10px 18px; font-size: 14px; font-weight: 800; }
/* per-row controls cluster (pin + stepper/toggle) */
.hud-trk-ctl { display: inline-flex; align-items: center; gap: 10px; }
/* thumbtack "pin to board" button — outline when off, filled accent when pinned */
.hud-trk-pin { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 9px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.04); color: #8a98ad; cursor: pointer; transition: background .12s ease, color .12s ease, border-color .12s ease; }
.hud-trk-pin:hover { color: #2bd4c0; border-color: rgba(43,212,192,.5); background: rgba(43,212,192,.1); }
.hud-trk-pin.on { background: #2bd4c0; color: #06302b; border-color: #2bd4c0; }
.hud-trk-pin svg { width: 16px; height: 16px; }

/* ---- settings popup ---- */
.hud-set { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.hud-set-row { cursor: pointer; text-align: left; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: #e9eef6; border-radius: 10px; padding: 13px 16px; font-size: 14px; font-weight: 600; }
.hud-set-row:hover { background: rgba(255,255,255,.1); }

/* ---- cleaned-up right-click card menu (img 3) ---- */
.tbl-menu { background: #0e1622; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 6px; min-width: 234px; box-shadow: 0 22px 54px rgba(0,0,0,.62); z-index: 100; font-family: Inter, system-ui, sans-serif; }
.tbl-menu button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; text-align: left; background: transparent; border: 0; color: #e9eef6; border-radius: 8px; padding: 9px 12px; font-size: 14px; cursor: pointer; }
.tbl-menu button:hover { background: rgba(43,212,192,.15); }
.tbl-menu button .mk { background: rgba(43,212,192,.14); color: #2bd4c0; border: 1px solid rgba(43,212,192,.42); border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 800; min-width: 16px; text-align: center; flex: 0 0 auto; }
.tbl-menu .sep { height: 1px; background: rgba(255,255,255,.1); margin: 6px 4px; }
.tbl-submenu { background: #111c2a; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 5px; margin: 2px 0 4px 12px; }
.tbl-submenu button { display: block; width: 100%; text-align: left; background: transparent; border: 0; color: #e9eef6; border-radius: 7px; padding: 7px 11px; font-size: 13px; cursor: pointer; }
.tbl-submenu button:hover { background: rgba(43,212,192,.15); }

/* ---- Create Token search popup (img 1 / 2) ---- */
.tok-panel { width: min(560px, 95vw); max-height: 88vh; display: flex; flex-direction: column; background: #0f1822; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 0; color: #e9eef6; box-shadow: 0 30px 90px rgba(0,0,0,.7); font-family: Inter, system-ui, sans-serif; overflow: hidden; }
.tok-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 22px 10px; }
.tok-kicker { color: #2bd4c0; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.tok-title { margin: 3px 0 0; font-size: 25px; font-weight: 800; letter-spacing: .01em; }
.tok-x { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #cdd6e6; border-radius: 50%; width: 36px; height: 36px; cursor: pointer; font-size: 14px; flex: 0 0 auto; }
.tok-x:hover { background: rgba(255,255,255,.13); }
.tok-search { display: flex; gap: 10px; padding: 6px 22px 0; }
.tok-q { flex: 1; background: #0a121b; border: 1px solid rgba(255,255,255,.14); color: #e9eef6; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.tok-q::placeholder { color: #7e8ca0; }
.tok-filter { width: 46px; flex: 0 0 auto; background: #0a121b; border: 1px solid rgba(255,255,255,.14); color: #cdd6e6; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.tok-filter[aria-pressed="true"] { border-color: #2bd4c0; color: #2bd4c0; }
.tok-only { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px 8px; font-size: 13.5px; font-weight: 600; color: #cdd6e6; cursor: pointer; user-select: none; }
.tok-only input { width: 16px; height: 16px; accent-color: #2bd4c0; cursor: pointer; }
.tok-list { flex: 1; overflow-y: auto; padding: 6px 16px 18px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.tok-empty { text-align: center; color: #7e8ca0; padding: 40px 0; font-size: 14px; }
.tok-row { display: flex; align-items: center; gap: 14px; padding: 9px 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.02); }
.tok-row:hover { background: rgba(255,255,255,.05); }
.tok-thumb { width: 44px; height: 61px; flex: 0 0 auto; border-radius: 6px; overflow: hidden; background: #0a121b; }
.tok-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tok-meta { flex: 1; min-width: 0; }
.tok-nm { font-size: 15px; font-weight: 700; color: #f4f7fb; }
.tok-type { font-size: 12.5px; color: #8a98ad; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok-qty { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.tok-qty button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #e9eef6; font-size: 16px; font-weight: 800; cursor: pointer; line-height: 1; }
.tok-qty button:hover { background: rgba(255,255,255,.12); }
.tok-qty b { min-width: 14px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 800; }
.tok-go { flex: 0 0 auto; cursor: pointer; border: 0; background: #2bd4c0; color: #06302b; border-radius: 9px; padding: 10px 18px; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.tok-go:hover { filter: brightness(1.08); }
.tok-go.done { background: #1c8f80; color: #d8fff7; }

/* ---- life / zones panel (img 4, top-right) ---- */
.hud-life { position: fixed; top: 52px; right: 16px; z-index: 70; width: 252px; display: flex; flex-direction: column; gap: 8px; font-family: Inter, system-ui, sans-serif; }
/* health sits at the top of the right rail column; push the stack/log down so they clear it */
body.play-fs #playPage .tbl-rail { padding-top: 232px; }
body.play-fs.hud-log-off #playPage .tbl-rail { padding-top: 0; }
.hud-ic-tx { font-size: 16px; font-weight: 800; line-height: 1; }
/* quick-action buttons (Untap all / Draw) pinned top-left — sleek dark pills w/ a colored accent dot to match the taskbar */
.hud-quick { position: fixed; top: 62px; left: 18px; height: 42px; z-index: 75; display: flex; align-items: center; gap: 8px; font-family: Inter, system-ui, sans-serif; }
.hud-quick button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 8px 15px; font-size: 13px; font-weight: 700; cursor: pointer; background: rgba(17,25,37,.9); color: #dbe4f3; box-shadow: 0 6px 16px rgba(0,0,0,.34); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hud-quick button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.hud-quick .qa-untap::before { background: #4f9bff; box-shadow: 0 0 8px rgba(79,155,255,.85); }
.hud-quick .qa-draw::before { background: #2bd4c0; box-shadow: 0 0 8px rgba(43,212,192,.85); }
.hud-quick button:hover { background: rgba(28,40,58,.95); }
.hud-quick .qa-untap:hover { border-color: rgba(79,155,255,.55); }
.hud-quick .qa-draw:hover { border-color: rgba(43,212,192,.55); }
.hud-quick button:active { transform: translateY(1px); }
.hud-life-top { display: flex; gap: 6px; }
.hud-life-top button { flex: 1; min-width: 0; background: rgba(13,19,30,.9); border: 1px solid rgba(255,255,255,.14); color: #dbe4f3; border-radius: 9px; padding: 7px 5px; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.hud-life-top button:hover { background: rgba(30,40,56,.96); }
.hud-life-card { position: relative; overflow: hidden; background: rgba(13,19,30,.92); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 13px 15px; box-shadow: 0 14px 36px rgba(0,0,0,.5); }
.hud-life-art { position: absolute; inset: 0; background-size: cover; background-position: center 22%; opacity: .17; z-index: 0; }
.hud-life-card > * { position: relative; z-index: 1; }
.hud-life-nm { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #eef3fb; }
.hud-life-sw { width: 13px; height: 13px; border-radius: 50%; flex: 0 0 auto; }
.hud-life-big { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 6px 0 10px; }
.hud-life-big b { font-size: 40px; font-weight: 800; min-width: 58px; text-align: center; font-variant-numeric: tabular-nums; color: #fff; }
.hud-life-big button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: #fff; font-size: 20px; font-weight: 800; cursor: pointer; line-height: 1; }
.hud-life-big button:hover { background: var(--tbl-accent, #2bd4c0); color: #06302b; }
.hud-life-cmd { width: 100%; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: #cdd6e6; border-radius: 9px; padding: 7px; font-size: 12px; font-weight: 600; cursor: pointer; margin-bottom: 8px; }
.hud-life-cmd:hover { background: rgba(255,255,255,.1); }
.hud-life-zones { display: flex; flex-direction: column; }
.hud-life-zones span { display: flex; justify-content: space-between; font-size: 13px; color: #aab6c8; padding: 5px 0; border-top: 1px solid rgba(255,255,255,.08); }
.hud-life-zones i { font-style: normal; }
.hud-life-zones b { color: #eef3fb; font-weight: 700; }

/* ---- pinned tracker chips (board overlay, top-left under the phase bar) ---- */
/* G7.57 — moved from the bottom-left corner (where it sat under the life hub) to the empty
   top-left area just below .hud-bar (fixed, top:12px, ~46px tall) so it never overlaps the
   phase bar, the action log/stack (right rail), or opponents' zones. Scrolls if crowded. */
.hud-pins { position: fixed; left: 16px; top: 66px; bottom: auto; z-index: 92; display: flex; flex-direction: column; gap: 6px; width: 232px; max-height: calc(100vh - 96px); overflow-y: auto; font-family: Inter, system-ui, sans-serif; }
.hud-pin { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 6px 11px; background: rgba(13,19,30,.92); border: 1px solid rgba(255,255,255,.14); border-radius: 11px; box-shadow: 0 10px 26px rgba(0,0,0,.42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hud-pin-l { font-size: 12.5px; font-weight: 700; color: #dbe4f3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-pin-ctl { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.hud-pin-ctl button { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #e9eef6; font-size: 15px; font-weight: 800; line-height: 1; cursor: pointer; }
.hud-pin-ctl button:hover { background: var(--tbl-accent, #2bd4c0); color: #06302b; }
.hud-pin-v { min-width: 26px; text-align: center; font-size: 14px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.hud-pin-x { color: #8a98ad !important; }
.hud-pin-x svg { width: 13px; height: 13px; }
.hud-pin-x:hover { background: rgba(229,72,77,.85) !important; color: #fff !important; }

/* ==================================================================== */
/* QA G7.46 · Mobile HUD (Agent C-M) — ADDITIVE, phone-only.            */
/* Shrinks the fixed taskbar/pop-ups + honours safe-area insets so the  */
/* chrome never overlaps the notch or the pan/zoom board. Desktop kept. */
/* ==================================================================== */
@media (max-width: 820px) {
  /* Top taskbar: clear the notch, shrink, and let it scroll sideways so
     buttons stay ≥ tappable instead of squashing off-screen. */
  .hud-bar {
    top: max(8px, env(safe-area-inset-top));
    max-width: calc(100vw - 16px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 5px 6px;
  }
  .hud-bar::-webkit-scrollbar { display: none; }
  .hud-ic { flex: 0 0 auto; }
  .hud-turn { padding: 0 8px 0 6px; }

  /* Quick actions clear the notch + the taskbar sitting above them. */
  .hud-quick { top: max(58px, calc(env(safe-area-inset-top) + 48px)); left: max(10px, env(safe-area-inset-left)); }

  /* Top-right vitals panel: narrower + notch-safe. */
  .hud-life {
    top: max(48px, calc(env(safe-area-inset-top) + 40px));
    right: max(10px, env(safe-area-inset-right));
    width: min(220px, calc(100vw - 20px));
  }
  .hud-pins {
    left: max(8px, env(safe-area-inset-left)); right: auto;
    top: max(58px, calc(env(safe-area-inset-top) + 50px)); bottom: auto;
    max-height: calc(100vh - 78px);
    width: min(210px, calc(100vw - 20px));
  }

  /* Pop-up windows (dice / trackers / settings / token search) fill the
     phone as sheets rather than a centred 560px card. */
  .hud-pop { padding: 0; }
  .hud-pop-card,
  .tok-panel {
    width: 100vw; max-width: 100vw;
    height: 100vh; max-height: 100vh;
    border-radius: 0;
  }
  .hud-pop-body,
  .tok-list { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .hud-dice { grid-template-columns: repeat(3, 1fr); }

  /* Right-click card menu: comfortable row height for a fingertip. */
  .tbl-menu button { min-height: 44px; }
}
