/* ChaosTracker26 — grimdark Old World theme. Mobile-first, big touch targets. */
:root {
  --bg: #0f0810;
  --bg2: #1a0d16;
  --card: #241320;
  --card2: #2c1726;
  --line: #4a2c3e;
  --line2: #5e3a4c;
  --ink: #f4ebf1;
  --muted: #b594a7;
  --brass: #cda23f;
  --brass-d: #8a6a22;
  --gaze: #e8862a;
  --aug: #5bbf7b;
  --hex: #d65a42;
  --danger: #e05550;
  --good: #69c98a;
  --bad: #e0685c;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* per-card mark accent (overridden by .mark-* classes) */
  --mk: #cda23f;
  --mk-soft: rgba(205, 162, 63, 0.16);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(140% 70% at 50% -10%, #3a182c 0%, var(--bg2) 42%, var(--bg) 78%),
    var(--bg);
  color: var(--ink);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
  position: relative;
}
/* faint grain + chaos-star watermark behind everything */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04; mix-blend-mode: overlay;
}
body::after {
  content: ""; position: fixed; left: 50%; top: 46%; width: 92vw; height: 92vw; max-width: 680px; max-height: 680px;
  transform: translate(-50%, -50%); z-index: 0; pointer-events: none; opacity: 0.05;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cpolygon points='100.0,2.0 113.0,68.6 169.3,30.7 131.4,87.0 198.0,100.0 131.4,113.0 169.3,169.3 113.0,131.4 100.0,198.0 87.0,131.4 30.7,169.3 68.6,113.0 2.0,100.0 68.6,87.0 30.7,30.7 87.0,68.6' fill='none' stroke='%23cda23f' stroke-width='2'/%3E%3Ccircle cx='100' cy='100' r='30' fill='none' stroke='%23cda23f' stroke-width='2'/%3E%3C/svg%3E");
}
.topbar, .roster, .foot { position: relative; z-index: 1; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.serif { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif; }

button {
  font: inherit; color: var(--ink); background: linear-gradient(180deg, var(--card2), #20111c);
  border: 1px solid var(--line); border-radius: 11px; padding: 10px 13px;
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .06s, border-color .15s, box-shadow .15s;
}
button:hover { border-color: var(--line2); }
button:active { transform: translateY(1px); }
button.primary {
  background: linear-gradient(180deg, #f0922f, #b5621c);
  border-color: #7a3f12; color: #1a0d05; font-weight: 700;
  box-shadow: 0 2px 0 #6d3a10, 0 6px 16px rgba(232,134,42,0.28);
}
button.ghost { background: transparent; box-shadow: none; }
button.danger { color: var(--danger); border-color: #5a2222; }
input, select, textarea {
  font: inherit; color: var(--ink); background: #160b12;
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gaze); outline-offset: -1px; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding: 12px 14px; padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: linear-gradient(180deg, rgba(26,13,22,0.96), rgba(20,10,17,0.86));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--brass-d) 20%, var(--brass) 50%, var(--brass-d) 80%, transparent) 1;
  transition: padding 0.15s ease;
}
/* condensed sticky header once you scroll, to free up screen space */
.topbar.compact { padding-top: calc(4px + env(safe-area-inset-top, 0px)); padding-bottom: 4px; gap: 6px; }
.topbar.compact .points { display: none; }
.topbar.compact .brand img { width: 20px; height: 20px; }
.topbar.compact .actions button { padding: 6px 9px; font-size: 13px; }
.topbar.compact .turnbox { padding: 2px 4px; }
.topbar.compact .turnstep { padding: 4px 8px; }

/* overflow menu */
.menu { position: relative; }
.menupanel { position: absolute; right: 0; top: calc(100% + 8px); display: flex; flex-direction: column; gap: 5px;
  background: linear-gradient(180deg, #2a1626, var(--bg2)); border: 1px solid var(--line2); border-radius: 12px; padding: 8px;
  min-width: 190px; box-shadow: 0 14px 34px rgba(0,0,0,0.55); z-index: 60; }
.menupanel[hidden] { display: none; }
.menupanel button { text-align: left; background: var(--card2); padding: 11px 12px; }
.menupanel button.danger { color: var(--danger); border-color: #5a2222; }
.menu-sep { height: 1px; background: var(--line); margin: 2px 0; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand img { border-radius: 7px; flex: none; box-shadow: 0 0 0 1px var(--brass-d), 0 0 14px rgba(232,134,42,0.35); }
.brandtext { display: flex; flex-direction: column; min-width: 0; }
.armyrow { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.armysel { font-size: 14px; max-width: 52vw; padding: 6px 8px; background: #170c13; color: var(--brass); border-color: var(--line); border-radius: 8px; font-weight: 600; }
.iconbtn { padding: 4px 9px; font-size: 14px; line-height: 1; background: var(--card2); }
.iconbtn.danger { color: var(--danger); border-color: #5a2222; }
.iconbtn:disabled { opacity: 0.35; }
.armyname {
  background: transparent; border: none; padding: 2px 0; font-size: 20px; font-weight: 700; color: var(--ink);
  max-width: 52vw; letter-spacing: 0.01em;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  text-shadow: 0 1px 0 #000;
}
.armyname:focus { outline: none; border-bottom: 1px dashed var(--gaze); }
.points { color: var(--brass); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.turnbox { display: flex; align-items: center; gap: 6px; background: #170c13; border: 1px solid var(--line); border-radius: 11px; padding: 3px 5px; }
.turnlabel { font-size: 13px; color: var(--muted); padding: 0 2px; white-space: nowrap; }
.turnlabel b { color: var(--brass); font-size: 15px; }
.turnstep { padding: 6px 10px; font-size: 16px; line-height: 1; background: var(--card2); }
.turnstep:disabled { opacity: 0.35; }
#btnNextTurn { padding: 8px 12px; }
.actions button { padding: 9px 12px; font-size: 14px; }

/* roster */
.roster { padding: 14px; display: flex; flex-direction: column; gap: 14px; max-width: 780px; margin: 0 auto; }
.cat {
  margin: 10px 2px 0; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--brass);
  display: flex; align-items: center; gap: 12px; font-weight: 700;
}
.cat::before, .cat::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--brass-d)); }
.cat::before { background: linear-gradient(90deg, var(--brass-d), transparent); }
.empty { text-align: center; color: var(--muted); padding: 54px 18px; }
.empty p { margin: 8px 0; }

/* unit card */
.card {
  position: relative;
  background:
    radial-gradient(120% 80% at 0% 0%, var(--mk-soft), transparent 55%),
    linear-gradient(180deg, var(--card), #1b0e17);
  border: 1px solid var(--line); border-left: 4px solid var(--mk);
  border-radius: var(--radius); padding: 13px 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.04);
}
/* corner flourishes */
.card::before, .card::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none; opacity: 0.6;
  border-color: var(--mk); border-style: solid; border-width: 0;
}
.card::before { top: 7px; right: 7px; border-top-width: 2px; border-right-width: 2px; border-top-right-radius: 4px; }
.card::after { bottom: 7px; right: 7px; border-bottom-width: 2px; border-right-width: 2px; border-bottom-right-radius: 4px; }
.card.dead { opacity: 0.5; filter: grayscale(0.4); }

/* mark accents */
.card.mark-khorne   { --mk: #d23b2b; --mk-soft: rgba(210,59,43,0.16); }
.card.mark-nurgle   { --mk: #94ad4a; --mk-soft: rgba(148,173,74,0.15); }
.card.mark-tzeentch { --mk: #2f8fd6; --mk-soft: rgba(47,143,214,0.16); }
.card.mark-slaanesh { --mk: #d063a6; --mk-soft: rgba(208,99,166,0.16); }
.card.mark-undivided{ --mk: #cda23f; --mk-soft: rgba(205,162,63,0.15); }
.card.mark-none     { --mk: #6a4a5a; --mk-soft: rgba(106,74,90,0.12); }

.u-head { display: flex; align-items: center; gap: 8px; }
.u-name {
  flex: 1 1 auto; font-size: 18px; font-weight: 700; background: transparent; border: none;
  border-bottom: 1px solid transparent; padding: 4px 0; min-width: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: #fff; text-shadow: 0 1px 0 #000;
}
.u-name:focus { border-bottom-color: var(--mk); outline: none; }
.mark { flex: none; max-width: 42%; font-size: 13px; border-color: var(--mk); color: var(--ink); }
button.icon { background: transparent; border: none; padding: 6px 8px; font-size: 16px; line-height: 1; box-shadow: none; }
button.icon.danger { color: var(--danger); }

/* stat row */
.stats { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; margin: 13px 0 4px; }
.stat {
  text-align: center; background: linear-gradient(180deg, #1c0f18, #160b12);
  border: 1px solid var(--line); border-radius: 9px; padding: 6px 2px; position: relative; overflow: hidden;
}
.stat-l { font-size: 10px; color: var(--brass); letter-spacing: 0.05em; font-weight: 700; opacity: 0.85; }
.stat-v { font-size: 17px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat.changed { border-color: var(--gaze); box-shadow: inset 0 0 0 1px rgba(232,134,42,0.35); animation: pop .45s ease; }
.stat.changed.up   { border-color: var(--good); box-shadow: inset 0 0 0 1px rgba(105,201,138,0.4); }
.stat.changed.down { border-color: var(--bad);  box-shadow: inset 0 0 0 1px rgba(224,104,92,0.4); }
.stat.changed.up   .stat-v { color: var(--good); }
.stat.changed.down .stat-v { color: var(--bad); }
.stat.changed .stat-v { color: var(--gaze); }
.arr { font-size: 9px; vertical-align: super; margin-left: 1px; opacity: 0.85; }
.stat-b { display: block; font-size: 9px; font-weight: 600; color: var(--muted); margin-top: -1px; }
@keyframes pop { 0% { transform: scale(0.82); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* mount line */
.stats.mount { margin-top: 4px; }
.stats.mount .stat { background: #150b12; border-style: dashed; opacity: 0.95; padding: 4px 2px; }
.stats.mount .stat-v { font-size: 14px; color: #ddccd6; }
.stat.mlabel { background: transparent; border: none; display: flex; flex-direction: column; justify-content: center; }
.stat.mlabel .mlbl { font-size: 11px; color: var(--brass); font-weight: 800; }
.stats.mount .stat.mountadd { border-style: solid; border-color: var(--brass-d); background: rgba(205,162,63,0.1); }
.stats.mount .stat.mountadd .stat-v { color: var(--brass); }
.stat.ghostcell { background: transparent; border: none; }
.stats.champ { margin-top: 4px; }
.stats.champ .stat { background: #150b12; opacity: 0.97; padding: 4px 2px; }
.stats.champ .stat.ghostcell, .stats.champ .stat.mlabel { background: transparent; border: none; }
.mountnote { margin: 2px 2px 0; color: var(--brass); opacity: 0.8; }
.cmdline { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 2px; }
.cmdchip { font-size: 11.5px; padding: 3px 9px; border-radius: 7px; background: #170c13; border: 1px solid var(--line); color: var(--brass); }
.unitnote { margin: 6px 2px 0; font-style: italic; }

/* trackers */
.track { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 11px 0 4px; }
.stepper {
  display: flex; align-items: center; gap: 8px; background: linear-gradient(180deg, #1d101a, #160b12);
  border: 1px solid var(--line); border-radius: 12px; padding: 6px 9px;
}
.step-l { font-size: 12px; color: var(--muted); min-width: 44px; font-weight: 600; }
.step-c { display: flex; align-items: center; gap: 9px; }
.step-v b { font-size: 19px; font-variant-numeric: tabular-nums; } .step-v .muted { font-size: 13px; }
button.round {
  width: 40px; height: 40px; border-radius: 50%; font-size: 23px; line-height: 1; padding: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
button.round.minus { background: linear-gradient(180deg, #4a221a, #34160f); border-color: #6a2f20; color: #ffb9a6; }
button.round.plus  { background: linear-gradient(180deg, #1c3f2a, #133021); border-color: #2c6044; color: #b6f0c8; }
.rankbox { display: flex; gap: 8px; align-items: center; }
.chip { font-size: 12px; padding: 5px 10px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted); }
.chip.on { color: #1a0d05; background: linear-gradient(180deg, #f0c44f, var(--brass)); border-color: var(--brass-d); font-weight: 700; }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0 2px; }
.tag { font-size: 11.5px; padding: 3px 9px; border-radius: 7px; background: #170c13; border: 1px solid var(--line); color: var(--muted); }
.tag.t-mount { color: var(--brass); border-color: var(--brass-d); }
.tag.t-rule { color: #cdb9c5; }
a.tag.link { text-decoration: none; cursor: pointer; }
a.tag.t-rule.link { border-color: #5a4658; }
a.tag.link:hover { border-color: var(--brass); color: #fff; }
a.tag.link::after { content: " ↗"; opacity: 0.5; font-size: 9px; }
.tag.t-mark { color: var(--mk); border-color: var(--mk); }
.tag.t-gaze { color: var(--gaze); border-color: #6a3c12; }
.tag.t-aug { color: var(--aug); border-color: #245038; }
.tag.t-hex { color: var(--hex); border-color: #5a2a20; }
.tag.t-item { color: #d9b6e6; border-color: #5a3a6a; }

/* active rewards/effects chips */
.active { display: flex; flex-wrap: wrap; gap: 6px; margin: 9px 0 2px; }
.achip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 7px 5px 10px; border-radius: 20px; border: 1px solid var(--line); font-weight: 600; }
.achip.gaze { border-color: var(--gaze); color: var(--gaze); background: rgba(232,134,42,0.1); box-shadow: 0 0 10px rgba(232,134,42,0.12); }
.achip.gaze.bad { border-color: var(--danger); color: var(--danger); background: rgba(224,85,80,0.1); }
.achip.aug { border-color: #2c6044; color: var(--aug); background: rgba(91,191,123,0.1); }
.achip.hex { border-color: #6a2f20; color: var(--hex); background: rgba(214,90,66,0.1); }
.achip.info { border-color: var(--brass-d); color: var(--brass); background: rgba(205,162,63,0.08); }
.achip.item { border-color: #5a3a6a; color: #d9b6e6; background: rgba(157,110,180,0.1); }
.pick.spell { border-left: 3px solid var(--brass); }
.pick.spell.augment { border-left-color: var(--aug); }
.pick.spell.hex { border-left-color: var(--hex); }
.spellmeta { font-size: 11px; color: var(--brass); opacity: 0.85; }
.achip .x { background: transparent; border: none; color: inherit; font-size: 17px; padding: 0 2px; line-height: 1; box-shadow: none; }

/* unit actions */
.u-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.u-actions .act { flex: 1 1 22%; min-width: 72px; text-align: center; font-weight: 700; }
.act.gaze { border-color: #6a3c12; color: var(--gaze); }
.act.spell { border-color: #3a3a6a; color: #a6abe8; }
.act.item { border-color: #5a3a6a; color: #d9b6e6; }
.pick.item { border-left: 3px solid #9d6eb4; }
.pick.item.on { background: rgba(157,110,180,0.18); border-color: #9d6eb4; }
.opts { margin-top: 9px; }
.opts summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.opts[open] summary { color: var(--brass); }

/* modal */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.66); display: flex; align-items: flex-end; justify-content: center; padding: 0; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  background: linear-gradient(180deg, #241320, var(--bg2)); border: 1px solid var(--line2);
  border-radius: 18px 18px 0 0; padding-bottom: calc(12px + var(--safe-b));
  box-shadow: 0 -10px 40px rgba(0,0,0,0.6); animation: slideup .22s ease;
}
@keyframes slideup { from { transform: translateY(24px); } to { transform: translateY(0); } }
@media (min-width: 600px) { .modal-back { align-items: center; } .modal { border-radius: 18px; } }
.modal-h { position: sticky; top: 0; background: #241320; display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.modal-h h3 { margin: 0; font-size: 17px; font-family: "Iowan Old Style", Palatino, Georgia, serif; color: var(--brass); }
.modal-b { padding: 15px; }
.modal-f { position: sticky; bottom: 0; background: #241320; display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 12px 15px; border-top: 1px solid var(--line); }

/* pick lists */
.picklist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
@media (max-width: 420px) { .picklist { grid-template-columns: 1fr; } }
.pick { text-align: left; display: flex; flex-direction: column; gap: 2px; }
.pick.bad { border-color: #5a2222; }
.pick.augment { border-left: 3px solid var(--aug); }
.pick.hex { border-left: 3px solid var(--hex); }
.rollrow { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; flex-wrap: wrap; }
button.big.roll { font-size: 17px; padding: 13px 18px; background: linear-gradient(180deg, #f0922f, #b5621c); border-color: #7a3f12; color: #1a0d05; font-weight: 800; box-shadow: 0 2px 0 #6d3a10, 0 8px 20px rgba(232,134,42,0.3); }
.rolled { animation: pop .5s ease; } .rolled b { color: var(--gaze); font-size: 17px; }
h4.augh { color: var(--aug); } h4.hexh { color: var(--hex); }
.durrow, .customrow, .filerow { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.customrow input { flex: 1; min-width: 120px; }
.filerow { justify-content: space-between; background: #170c13; border: 1px dashed var(--line2); border-radius: 11px; padding: 11px; }

/* edit grids */
.editgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.editgrid label, .editmeta label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 3px; }
.editgrid input { text-align: center; }
.editmeta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.editmeta label.chk, label.chk { flex-direction: row; align-items: center; gap: 6px; color: var(--ink); }
label.full { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
label.full textarea { color: var(--ink); }
.gazeedit { display: grid; grid-template-columns: 48px 1fr 1.2fr; gap: 6px; margin-bottom: 6px; }
.gazeedit .roll { text-align: center; }
textarea.import { width: 100%; }
.modal-b h4 { margin: 14px 0 6px; font-size: 14px; }

/* misc */
.foot { text-align: center; padding: 20px 12px calc(26px + var(--safe-b)); }
.toast { position: fixed; left: 50%; bottom: calc(26px + var(--safe-b)); transform: translate(-50%, 20px); background: linear-gradient(180deg, #321a2a, #241320); border: 1px solid var(--gaze); color: var(--ink); padding: 11px 18px; border-radius: 24px; opacity: 0; transition: all 0.25s; z-index: 90; box-shadow: 0 8px 28px rgba(0,0,0,0.55); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
code { background: #160b12; padding: 1px 5px; border-radius: 4px; font-size: 12px; color: var(--brass); }

/* ---- v19 quality-of-life additions ---- */
.summary { text-align: center; padding: 2px 0 2px; letter-spacing: 0.02em; }

/* collapse caret + header tweaks */
.caret { background: transparent; border: none; box-shadow: none; color: var(--brass); font-size: 14px; padding: 4px 4px; flex: none; width: 26px; }
.u-head { gap: 6px; }
button.icon.flag { color: var(--muted); }
button.icon.flag.on { color: var(--gaze); }
.card.fleeing { opacity: 0.9; }
.card.fleeing .u-name { font-style: italic; }
.card.collapsed { padding-bottom: 11px; }

/* status badges */
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.badge { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 20px; border: 1px solid; }
.badge.b-dead { color: #fff; background: rgba(216,83,79,0.22); border-color: var(--danger); }
.badge.b-flee { color: var(--gaze); border-color: #6a3c12; background: rgba(232,134,42,0.12); }
.badge.b-half { color: #e6c46a; border-color: #6a5520; background: rgba(205,162,63,0.12); }

/* tap-to-set + empty tracker */
.step-v.tappable { cursor: pointer; border-bottom: 1px dotted var(--line2); }
.step-v.tappable:active { color: var(--gaze); }
.stepper.empty { border-color: #5a2222; }
.stepper.empty .step-v b { color: var(--danger); }

/* dispel + manage controls */
.dispel { margin: 8px 0 2px; width: 100%; background: transparent; border: 1px dashed var(--line2); color: var(--muted); font-size: 13px; padding: 8px; }
.dispel:hover { border-color: var(--hex); color: var(--hex); }
.managerow { display: flex; gap: 8px; margin: 6px 0; }
.managerow button { flex: 1; }

/* help + version + a11y */
.ver { display: block; margin-top: 6px; opacity: 0.6; }
.help h4 { margin: 12px 0 4px; color: var(--brass); font-size: 14px; }
.help p { margin: 4px 0; }
:focus-visible { outline: 2px solid var(--gaze); outline-offset: 1px; }
button:focus-visible, a.tag:focus-visible { outline: 2px solid var(--gaze); outline-offset: 2px; }

/* fleeing toggle (in the tracker row) */
.fleebtn { background: #170c13; border: 1px solid var(--line); color: var(--muted); padding: 10px 16px; border-radius: 12px; font-weight: 700; }
.fleebtn.on { background: linear-gradient(180deg, #f0922f, #b5621c); border-color: #7a3f12; color: #1a0d05; box-shadow: 0 2px 0 #6d3a10; }

/* VP status row */
.statusrow { display: flex; gap: 6px; margin: 8px 0 2px; }
.stbtn { flex: 1; padding: 9px 6px; font-size: 12.5px; font-weight: 700; background: #170c13; border: 1px solid var(--line); color: var(--muted); }
.stbtn.flee.on { background: linear-gradient(180deg,#f0922f,#b5621c); border-color:#7a3f12; color:#1a0d05; }
.stbtn.fled.on { background: linear-gradient(180deg,#b06a2a,#7a3f12); border-color:#5a2f0e; color:#fff; }
.stbtn.dead.on { background: linear-gradient(180deg,#b23b32,#7a221c); border-color:#5a2020; color:#fff; }
.badge.b-quarter { color: var(--gaze); border-color: #6a3c12; background: rgba(232,134,42,0.14); }
.summary.loss { color: var(--gaze); text-align: center; margin-top: -6px; }

/* compact models counter (tap to set, no +/-) */
.stepper.compact { padding: 8px 12px; }
.stepper.compact .step-v.tappable { padding: 2px 6px; border: 1px dashed var(--line2); border-radius: 8px; }
.stepper.compact .step-v b { font-size: 18px; }

/* the joke button */
.act.daddy { border-color: #6a2f56; color: #e6a3d0; }
.act.daddy:hover { border-color: #d063a6; }

/* random value roller */
.rollrand { background: #170c13; border: 1px solid var(--line); color: var(--gaze); padding: 10px 14px; border-radius: 12px; font-weight: 700; }

/* start-of-turn reminder checklist */
.remlist { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.remrow { display: flex; flex-direction: column; gap: 1px; background: #170c13; border: 1px solid var(--line); border-left: 3px solid var(--gaze); border-radius: 8px; padding: 8px 10px; }
.remrow b { color: var(--ink); }

/* tablet / landscape: two-column roster */
@media (min-width: 860px) {
  .roster { max-width: 1180px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: start; }
  .roster .cat, .roster .summary, .roster .empty { grid-column: 1 / -1; }
}
