/* ============================================================
   GTOLens — "PLO GTO Viewer"
   mobile-first · charcoal · gold/teal accents · tabular mono data
   ============================================================ */

:root {
  /* surfaces */
  --bg-0: #121417;
  --bg-1: #16191e;
  --panel: #15181c;
  --panel-2: #1a1d22;
  --line: #23272e;
  --line-soft: #1f232a;

  /* ink */
  --ink: #e7e9ec;
  --ink-dim: #aab2bc;
  --muted: #7e8893;

  /* brand */
  --gold: #c4b04a;
  --gold-deep: #aa9436;
  --gold-glow: rgba(196, 176, 74, .16);

  /* actions: raise gold · call/check teal · fold slate */
  --c-fold: #4a5470;
  --c-check: #4a9d8e;
  --c-call: #4a9d8e;
  --c-bet: #c4b04a;
  --c-raise: #c4b04a;
  --c-raise2: #a98f3a;
  --c-allin: #8c6f2c;

  /* EV sign */
  --pos: #5cb6a4;
  --neg: #cc6b6b;

  --radius: 14px;
  --radius-s: 9px;
  --pad: clamp(14px, 4vw, 22px);

  --f-display: 'Archivo', system-ui, sans-serif;
  --f-body: 'Archivo', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  --shadow: 0 18px 50px -18px rgba(0, 0, 0, .8);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(1100px 640px at 50% -160px, #1b222a 0%, transparent 60%),
    var(--bg-0);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

#app { position: relative; z-index: 1; padding-bottom: calc(28px + var(--sab)); }

::selection { background: var(--gold-deep); color: #0a0f0c; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--sat)) var(--pad) 10px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
  min-width: 0;
}
.brand .chip-icon {
  width: 30px; height: 30px; flex: none;
  border-radius: 9px;
  background: linear-gradient(150deg, var(--gold), var(--gold-deep));
  box-shadow: 0 4px 14px var(--gold-glow);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
/* inset poker-chip token (dark disc + glossy highlight) */
.brand .chip-icon::before {
  content: "";
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2b313a, #14161a 72%);
  box-shadow: inset 0 0 0 1.5px rgba(18, 20, 24, .6);
}
.brand .chip-icon::after {
  content: "";
  position: absolute; top: 8px; left: 9px;
  width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255, 255, 255, .5);
}
.brand b {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand small { color: var(--gold); font-family: var(--f-display); font-size: 14px; font-weight: 700; }

.iconbtn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-dim);
  border-radius: 10px;
  min-height: 40px;
  min-width: 40px;
  padding: 0 12px;
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.iconbtn:hover { border-color: var(--gold-deep); color: var(--ink); }
.iconbtn[aria-expanded="true"] { border-color: var(--gold); color: var(--gold); }

/* language menu */
.lang-wrap { position: relative; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  box-shadow: var(--shadow);
  min-width: 170px;
  padding: 6px;
  display: none;
  z-index: 40;
}
.lang-menu.open { display: block; animation: pop .16s ease-out; }
.lang-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: 0;
  color: var(--ink-dim);
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 7px;
  cursor: pointer;
}
.lang-menu button:hover { background: var(--panel); color: var(--ink); }
.lang-menu button[aria-current="true"] { color: var(--gold); }
.lang-menu button[aria-current="true"]::after { content: "●"; font-size: 9px; }

@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* ---------- layout ---------- */

.page { padding: 18px var(--pad) 0; max-width: 1060px; margin: 0 auto; }

.h-display {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(22px, 6vw, 34px);
  line-height: 1.12;
  letter-spacing: .01em;
  margin: 10px 0 4px;
}
.h-display .accent { color: var(--gold); }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; max-width: 56ch; }

.card {
  background: linear-gradient(170deg, var(--panel-2), var(--panel) 55%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.stack > * + * { margin-top: 12px; }

.reveal { animation: rise .45s cubic-bezier(.2, .7, .25, 1) both; }
.reveal:nth-child(2) { animation-delay: .05s; }
.reveal:nth-child(3) { animation-delay: .1s; }
.reveal:nth-child(4) { animation-delay: .15s; }
.reveal:nth-child(5) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- forms ---------- */

.field { display: flex; gap: 8px; }
.field input {
  flex: 1;
  min-width: 0;
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  padding: 12px 13px;
  font-family: var(--f-mono);
  font-size: 14px;
}
.field input::placeholder { color: var(--muted); }
.field input:focus { border-color: var(--gold-deep); outline: none; }

.btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: var(--gold);
  color: #181203;
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  padding: 0 18px;
  min-height: 46px;
  cursor: pointer;
  transition: transform .12s, box-shadow .2s, filter .15s;
  box-shadow: 0 6px 22px -8px rgba(227, 200, 120, .55);
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .55; cursor: default; box-shadow: none; }
.btn.ghost {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover { color: var(--ink); border-color: var(--gold-deep); }

.hint { color: var(--muted); font-size: 12.5px; margin-top: 8px; }

/* ---------- strategy list ---------- */

.strategy-item {
  display: block;
  width: 100%;
  text-align: left;
  background: linear-gradient(165deg, var(--panel-2), var(--panel) 60%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  transition: border-color .15s, transform .15s;
}
.strategy-item:hover { border-color: var(--gold-deep); transform: translateY(-1px); }
.strategy-item .row1 { display: flex; align-items: baseline; gap: 10px; }
.strategy-item .game {
  font-family: var(--f-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .06em;
}
.strategy-item .name {
  font-family: var(--f-mono);
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: rtl; /* keep tail of path visible */
  text-align: left;
  color: var(--ink-dim);
  flex: 1;
  min-width: 0;
}
.meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12.5px;
}
.meta-grid b { color: var(--ink-dim); font-family: var(--f-mono); font-weight: 600; }

.item-actions { display: flex; gap: 8px; margin-top: 12px; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 34px 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 14px;
}

/* ---------- action line (breadcrumb) ---------- */

.line-bar {
  position: sticky;
  top: calc(56px + var(--sat));
  z-index: 20;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 10px var(--pad);
  margin: 0 calc(var(--pad) * -1);
  background: color-mix(in srgb, var(--bg-0) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: none;
}
.line-bar::-webkit-scrollbar { display: none; }

.crumb {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-dim);
  font-family: var(--f-mono);
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.crumb:hover { border-color: var(--gold-deep); color: var(--ink); }
.crumb.current { border-color: var(--gold); color: var(--gold); cursor: default; }
.crumb .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.crumb .seat-tag { color: var(--muted); font-weight: 400; }

/* ---------- node panel ---------- */

.node-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.street-tag {
  font-family: var(--f-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--gold);
  border: 1px solid var(--gold-deep);
  border-radius: 999px;
  padding: 5px 12px;
}
.node-facts { display: flex; gap: 16px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.node-facts b { font-family: var(--f-mono); color: var(--ink); font-weight: 600; }

.actions-grid { display: grid; gap: 9px; margin-top: 14px; }

.action-btn {
  --ac: var(--c-call);
  display: grid;
  grid-template-columns: 4px 1fr auto auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0 14px 0 0;
  min-height: 54px;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, transform .12s, background .15s;
}
.action-btn::before { content: ""; align-self: stretch; background: var(--ac); }
.action-btn:hover { border-color: color-mix(in srgb, var(--ac) 60%, var(--line)); transform: translateX(2px); }
.action-btn .a-name { font-weight: 700; font-size: 15px; padding: 10px 0 10px 12px; }
.action-btn .a-name small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.action-btn .a-size { font-family: var(--f-mono); font-size: 13px; color: var(--ink-dim); }
.action-btn .a-size b { color: var(--ink); }
.action-btn .arrow { color: var(--muted); }

.terminal-card {
  text-align: center;
  padding: 30px 16px;
}
.terminal-card .t-kind {
  font-family: var(--f-display);
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .08em;
  font-size: 14px;
}
.terminal-card .t-pot { font-family: var(--f-mono); color: var(--ink-dim); margin-top: 8px; }

/* ---------- range matrix 13x13 ---------- */

.matrix-wrap { margin-top: 14px; }
.matrix {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 2px;
  border-radius: var(--radius-s);
  overflow: hidden;
}
.cell {
  aspect-ratio: 1 / .92;
  position: relative;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: var(--bg-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: clamp(7.5px, 2vw, 11.5px);
  font-weight: 600;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .65);
  transition: filter .12s;
  animation: cellin .5s ease both;
}
.cell:hover { filter: brightness(1.18); z-index: 2; }
.cell.pair { box-shadow: inset 0 0 0 1px rgba(227, 200, 120, .35); }
.cell.dim { color: rgba(255,255,255,.28); text-shadow: none; }
@keyframes cellin { from { opacity: 0; } }

.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 12.5px; color: var(--ink-dim); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* ---------- PLO hand picker ---------- */

.slots { display: flex; gap: 8px; margin: 4px 0 12px; }
.slot {
  flex: 1;
  aspect-ratio: 3 / 4;
  max-width: 76px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  background: var(--bg-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: clamp(16px, 5vw, 22px);
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .15s;
}
.slot.filled { border-style: solid; color: var(--ink); background: var(--panel-2); }
.slot.active { border-color: var(--gold); color: var(--gold); }
.slot .s-red { color: #e0707c; }
.slot .s-blue { color: #7fa7d9; }
.slot .s-green { color: #7ec98f; }

.deck { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; }
.deck button {
  aspect-ratio: 1 / 1.15;
  border: 0;
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--ink-dim);
  font-family: var(--f-mono);
  font-size: clamp(8px, 2.4vw, 12px);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  transition: background .12s, color .12s, opacity .12s;
}
.deck button:hover { background: var(--line); color: var(--ink); }
.deck button.used { opacity: .22; pointer-events: none; }
.deck button.s0, .deck button.s3 { color: var(--ink-dim); }
.deck button.s1 { color: #e0858f; }
.deck button.s2 { color: #8fb3e3; }

.picker-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ---------- hand rows (PLO results / sheet) ---------- */

.hand-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 14px;
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 11px 13px;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s;
}
.hand-row:hover { border-color: var(--gold-deep); }
.hand-row .h-name { font-family: var(--f-mono); font-weight: 700; font-size: 14px; letter-spacing: .02em; }

.freq-bar {
  grid-column: 1 / -1;
  height: 9px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--bg-1);
  display: flex;
}
.freq-bar i { display: block; height: 100%; }

/* ---------- bottom sheet ---------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 5, .62);
  backdrop-filter: blur(3px);
  z-index: 60;
  animation: fade .2s ease both;
}
@keyframes fade { from { opacity: 0; } }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 61;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  padding: 10px var(--pad) calc(22px + var(--sab));
  max-height: 82dvh;
  overflow-y: auto;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
  animation: sheetup .28s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes sheetup { from { transform: translateY(40%); opacity: .4; } }
.sheet .grip {
  width: 42px; height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 2px auto 14px;
}
.sheet h3 {
  margin: 0 0 2px;
  font-family: var(--f-mono);
  font-size: 20px;
  letter-spacing: .03em;
}
.sheet .sheet-sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }

.detail-row {
  display: grid;
  grid-template-columns: 12px minmax(72px, auto) 1fr auto auto;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.detail-row:last-child { border-bottom: 0; }
.detail-row .d-dot { width: 12px; height: 12px; border-radius: 4px; }
.detail-row .d-bar { height: 7px; border-radius: 4px; background: var(--bg-1); overflow: hidden; }
.detail-row .d-bar i { display: block; height: 100%; border-radius: 4px; }
.detail-row .d-freq, .detail-row .d-ev { font-family: var(--f-mono); font-size: 13.5px; }
.detail-row .d-freq { font-weight: 700; min-width: 56px; text-align: right; }
.detail-row .d-ev { color: var(--muted); min-width: 76px; text-align: right; }
.detail-row .d-ev.pos { color: var(--pos); }
.detail-row .d-ev.neg { color: var(--neg); }

/* ---------- toast ---------- */

#toast-root { position: fixed; left: 0; right: 0; bottom: calc(18px + var(--sab)); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: #2a1416;
  border: 1px solid #5e2d31;
  color: #f0c7c7;
  font-size: 13.5px;
  border-radius: 10px;
  padding: 11px 16px;
  max-width: min(92vw, 480px);
  box-shadow: var(--shadow);
  animation: rise .25s ease both;
}
.toast.ok { background: #14241a; border-color: #2c4f38; color: #bfe3c8; }

/* ---------- loading ---------- */

.spinner {
  width: 30px; height: 30px;
  margin: 40px auto;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--gold);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { border-radius: var(--radius-s); background: linear-gradient(100deg, var(--panel) 40%, var(--panel-2) 50%, var(--panel) 60%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- desktop ---------- */

@media (min-width: 880px) {
  .explorer-cols {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 18px;
    align-items: start;
  }
  .explorer-cols .col-left { position: sticky; top: calc(118px + var(--sat)); }
  .cell { font-size: 12.5px; }
}

/* ============================================================
   Postflop: board strip, toolbar, table view, statistics
   ============================================================ */

/* board strip in the node header */
.board-strip { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.board-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(24px, 4vw, 34px);
  height: clamp(30px, 5vw, 42px);
  padding: 0 clamp(4px, 0.8vw, 7px);
  border-radius: 7px;
  background: #3a4049;
  color: #eef1f4;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: clamp(14px, 2.5vw, 18px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 2px 6px rgba(0,0,0,.4);
}
/* 4-color suits: ♠ slate · ♥ red · ♦ blue · ♣ green (colored tile, light ink) */
.s-spade { background: #3a4049; color: #eef1f4; }
.s-heart { background: #b9514e; color: #ffffff; }
.s-diam { background: #3d77a8; color: #ffffff; }
.s-club { background: #4c945f; color: #ffffff; }
.board-tag { color: var(--gold); font-family: var(--f-display); font-size: 11px; font-weight: 700; letter-spacing: .12em; }

.node-extra-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.chip-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-dim);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: border-color .15s, color .15s;
}
.chip-btn:hover { border-color: var(--gold-deep); color: var(--ink); }
.chip-btn .ico { font-size: 14px; }

/* strategy toolbar */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}
.segmented {
  display: inline-flex;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 3px;
}
.segmented button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.segmented button[aria-pressed="true"] { background: var(--panel-2); color: var(--gold); box-shadow: 0 1px 4px rgba(0,0,0,.3); }

.ctl {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.ctl > label { font-size: 10px; color: var(--muted); padding-left: 2px; letter-spacing: .04em; text-transform: uppercase; }
.select-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.select-chip select {
  appearance: none;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 9px;
  padding: 8px 30px 8px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.select-chip::after {
  content: "▾";
  position: absolute;
  right: 11px;
  color: var(--muted);
  pointer-events: none;
  font-size: 11px;
}
.filter-field {
  flex: 1 1 160px;
  min-width: 130px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 10px;
}
.filter-field input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 13px;
  padding: 9px 0;
}
.filter-field input:focus { outline: none; }
.filter-field .clear-x { color: var(--muted); cursor: pointer; border: 0; background: none; font-size: 15px; }

/* table view */
.hand-table { display: flex; flex-direction: column; gap: 4px; }
.hand-table .thead {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 2px 12px 6px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.hand-table .thead .sort-on { color: var(--gold); }
.trow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  padding: 9px 12px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--ink);
}
.trow:hover { border-color: var(--gold-deep); }
.trow .t-hand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.trow .t-name { font-family: var(--f-mono); font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.trow .mini-bar { width: 70px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bg-1); display: flex; flex: none; }
.trow .mini-bar i { height: 100%; }
.trow .t-metric { font-family: var(--f-mono); font-size: 13px; color: var(--ink-dim); text-align: right; min-width: 52px; }
.trow .t-metric.pos { color: var(--pos); }
.trow .t-metric.neg { color: var(--neg); }
.trow .t-sub { color: var(--muted); font-size: 11px; text-align: right; min-width: 44px; }

/* statistics sheet */
.stats-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.stats-tabs button {
  flex: 1;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-dim);
  border-radius: 9px;
  padding: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.stats-tabs button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }

.equity-wrap { position: relative; }
.equity-canvas { width: 100%; height: 230px; display: block; border-radius: 10px; background: var(--bg-1); border: 1px solid var(--line); }
.equity-legend { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.equity-legend .lg { display: flex; align-items: center; gap: 8px; }
.equity-legend .sw { width: 14px; height: 4px; border-radius: 2px; }
.equity-legend .lg b { font-family: var(--f-mono); font-size: 15px; }
.equity-legend .lg span { color: var(--muted); font-size: 12px; }

.board-overview { display: flex; flex-direction: column; gap: 14px; }
.board-overview .big-board { display: flex; gap: 8px; justify-content: center; padding: 8px 0; }
.board-overview .big-board .board-card { height: clamp(52px, 7vw, 72px); min-width: clamp(38px, 5.5vw, 56px); font-size: clamp(20px, 3vw, 30px); border-radius: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12.5px;
  color: var(--ink-dim);
  background: var(--panel);
}
.tag.on { border-color: var(--gold-deep); color: var(--gold); }

/* ============================================================
   Multi-action table rows (FOLD/CALL/BET columns + EV + combos)
   ============================================================ */

.thead2 {
  display: grid;
  grid-template-columns: minmax(44px, 60px) 1fr auto auto;
  column-gap: 7px;
  align-items: end;
  padding: 2px 12px 6px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.thead2 .th-acts { display: flex; gap: 2px; }
.thead2 .th-act {
  flex: 1;
  min-width: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  color: var(--ac);
  font-family: var(--f-mono);
  overflow: hidden;
}
.thead2 .th-act .tha-name {
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: -.02em;
  line-height: 1.05;
  text-align: center;
  /* single tokens (CHECK / 7.5) stay on one line; "CALL 0.5" wraps at the space */
  white-space: normal;
  overflow-wrap: normal;
  max-width: 100%;
}
.thead2 .th-act .tha-pct { color: var(--ink-dim); font-weight: 600; font-size: 9.5px; }
.thead2 .th-num { text-align: right; min-width: 30px; }
.thead2 .sort-on { color: var(--gold); }

.trow2 {
  display: grid;
  grid-template-columns: minmax(44px, 60px) 1fr auto auto;
  grid-template-areas: "hand acts ev combos" "bar bar bar bar";
  column-gap: 7px;
  row-gap: 6px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  padding: 9px 12px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--ink);
}
.trow2:hover { border-color: var(--gold-deep); }
.trow2 .t-hand { grid-area: hand; }
.trow2 .tr-acts { grid-area: acts; display: flex; gap: 2px; }
.trow2 .act-cell {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #0c0f0a;
  background: var(--ac);
  border-radius: 5px;
  padding: 3px 1px;
  opacity: .92;
}
.trow2 .act-cell.zero { background: transparent; color: var(--muted); font-weight: 400; opacity: 1; }
.trow2 .tr-ev { grid-area: ev; }
.trow2 .tr-combos { grid-area: combos; color: var(--muted); }
.trow2 .tr-num { font-family: var(--f-mono); font-size: 12px; color: var(--ink-dim); text-align: right; min-width: 30px; }
.trow2 .tr-num.pos { color: var(--pos); }
.trow2 .tr-num.neg { color: var(--neg); }
.trow2 .mini-bar { grid-area: bar; width: 100%; height: 7px; }

/* matrix filter dimming */
.cell.filtered-out { filter: grayscale(.85) brightness(.4); opacity: .5; }

/* concrete-card chips (table rows): 4-color colored tile, light ink */
.t-cards { display: inline-flex; flex-wrap: nowrap; gap: 3px; align-items: center; vertical-align: middle; }
.t-cards .pc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(17px, 3vw, 24px);
  height: clamp(22px, 3.5vw, 30px);
  padding: 1px clamp(2px, 0.4vw, 4px);
  border-radius: 5px;
  /* background comes from the suit class (.s-spade/.s-heart/.s-diam/.s-club) */
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: clamp(11px, 2vw, 14px);
  line-height: 1.25;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  vertical-align: middle;
}
.t-cards .pc.s-spade { background: #3a4049; color: #eef1f4; }
.t-cards .pc.s-heart { background: #b9514e; color: #fff; }
.t-cards .pc.s-diam { background: #3d77a8; color: #fff; }
.t-cards .pc.s-club { background: #4c945f; color: #fff; }

/* Omaha: 4 cards on one row -> wider hand column, slightly tighter chips */
.hand-table.wide .thead2,
.hand-table.wide .trow2 { grid-template-columns: 90px 1fr auto auto; }
.hand-table.wide .t-cards { gap: 2px; }
.hand-table.wide .t-cards .pc { min-width: 0; padding: 1px clamp(1px, 0.3vw, 3px); font-size: clamp(10px, 1.5vw, 12px); }

/* equity-graph hover tooltip */
.equity-wrap { position: relative; }
.equity-tip {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  pointer-events: none;
  background: color-mix(in srgb, var(--bg-0) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
  box-shadow: var(--shadow);
}
.equity-tip.show { display: flex; }
.equity-tip .et-row { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.equity-tip .et-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.equity-tip .et-cards { display: inline-flex; gap: 2px; }
.equity-tip .et-cards .board-card { height: clamp(18px, 2.5vw, 24px); min-width: clamp(15px, 2vw, 20px); font-size: clamp(10px, 1.4vw, 13px); border-radius: 4px; padding: 0 clamp(2px, 0.4vw, 4px); }
.equity-tip .et-eq { font-family: var(--f-mono); font-weight: 700; font-size: 12.5px; color: var(--ink); margin-left: 2px; }

/* ============================================================
   Service mode: strategy library (catalog selector)
   ============================================================ */
.lib-controls { display: flex; flex-direction: column; gap: 14px; }
.choice-row { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: center; }
.choice-row > label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-dim);
  border-radius: 999px;
  padding: 8px 15px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.choice:hover { border-color: var(--gold-deep); color: var(--ink); }
.choice[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: var(--panel-2); }

.lib-results { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.lib-count { font-size: 12px; color: var(--muted); }
.lib-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title arrow" "meta arrow";
  gap: 2px 12px;
  align-items: center;
  text-align: left;
  background: linear-gradient(165deg, var(--panel-2), var(--panel) 60%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.lib-card:hover { border-color: var(--gold-deep); transform: translateY(-1px); }
.lib-card .lc-title { grid-area: title; font-weight: 700; font-size: 15px; }
.lib-card .lc-meta { grid-area: meta; color: var(--muted); font-size: 12px; font-family: var(--f-mono); }
.lib-card .arrow { grid-area: arrow; color: var(--muted); font-size: 20px; }
.lib-card.busy { opacity: .55; pointer-events: none; }

/* ============================================================
   PLO GTO Viewer — solver screen (header / poker table /
   action bar / filter drawer / control bar / table / matrix)
   ============================================================ */

/* full-width strategy screen (like the design) so both columns keep growing */
.page.solver { max-width: none; }

/* solver header */
.solver-head { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; }
.sv-back {
  width: 36px; height: 36px; flex: none;
  border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink-dim);
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.sv-back:hover { color: var(--ink); border-color: var(--gold-deep); }
.sv-title { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.sv-title b { font-family: var(--f-display); font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.sv-sum { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 3-zone body */
.solver-grid { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.solver-grid.one { display: block; }
.viz-col { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 560px; margin: 0 auto; }
.grid-col { min-width: 0; }
/* a little breathing room between the control bar and the strategy table/matrix */
.view-host { margin-top: 10px; }

/* poker table */
.poker-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px 12px; }
.poker-info {
  font-family: var(--f-display); font-size: 11px; font-weight: 700; color: var(--gold);
  letter-spacing: .03em; margin-bottom: 2px;
}
.poker-info-sub { color: var(--muted); font-weight: 400; }
.felt { position: relative; width: 100%; aspect-ratio: 1.9; margin: 0 auto 0; max-width: 460px; }
.felt-rim {
  position: absolute; inset: 6%; border-radius: 50% / 50%;
  background: radial-gradient(120% 120% at 50% 35%, #20423a 0%, #16302a 55%, #0f231f 100%);
  border: 2px solid #2a4c43;
  box-shadow: inset 0 0 40px rgba(0,0,0,.45), 0 6px 22px rgba(0,0,0,.35);
}
.felt-inner { position: absolute; inset: 11%; border-radius: 50% / 50%; border: 1px solid rgba(255,255,255,.05); }
.felt-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); text-align: center; width: 60%; }
.pot-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #6f8a82; }
.pot-val { font-size: 20px; font-weight: 700; color: #e9ecef; line-height: 1.1; }
.blinds-label { font-size: 10px; color: #86988f; margin-top: 2px; }
.felt-board { display: flex; gap: 4px; justify-content: center; margin-top: 6px; }
.felt-board .board-card { height: clamp(26px, 3.5vw, 32px); min-width: clamp(18px, 2.5vw, 24px); font-size: clamp(11px, 1.5vw, 14px); border-radius: 5px; padding: 0 clamp(3px, 0.5vw, 5px); }

.seat {
  min-width: 52px; padding: 5px 9px; border-radius: 10px;
  background: #1b1f25; border: 1.5px solid #333a44; text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.seat.actor { background: rgba(196,176,74,.16); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(196,176,74,.18), 0 4px 14px rgba(196,176,74,.25); }
.seat.folded { background: #16191d; border-color: #262b32; opacity: .6; }
.seat-pos { font-size: 12px; font-weight: 700; color: #dfe4ea; line-height: 1; }
.seat.actor .seat-pos { color: #e9d666; }
.seat.folded .seat-pos { color: #5a626c; }
.seat-stack { font-size: 9.5px; color: #8a929c; margin-top: 2px; }
.seat .dealer { position: absolute; top: -9px; right: -9px; width: 18px; height: 18px; border-radius: 50%; background: #e7e9ec; color: #16181c; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.seat-flag { font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #d8c45a; margin-top: 2px; }
.seat-flag.muted { color: #5a626c; }
/* seat cards — shown above the seat pod (hero's selected hand etc.) */
.seat-cards {
  display: flex; gap: 2px; justify-content: center; margin-bottom: 3px;
}
.seat-cards .sc {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 14px; height: 20px; padding: 1px 2px;
  border-radius: 3px; font-family: var(--f-mono); font-weight: 700; font-size: 9px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.sc-spade { background: #3a4049; color: #eef1f4; }
.sc-heart { background: #b9514e; color: #fff; }
.sc-diam { background: #3d77a8; color: #fff; }
.sc-club { background: #4c945f; color: #fff; }

/* card backs — decorative 4-card backs above each active seat */
.card-backs {
  display: flex; gap: 0; justify-content: center;
}
.card-backs .cb {
  width: 11px; height: 16px; border-radius: 2px; flex: none;
  background: linear-gradient(135deg, #2a3340 0%, #1e2530 50%, #2a3340 100%);
  border: 1px solid #3d4655;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
  position: relative;
}
.card-backs .cb + .cb { margin-left: -4px; }
.card-backs .cb::after {
  content: "";
  position: absolute; inset: 2px; border-radius: 1px;
  background: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(196,176,74,.12) 2px, rgba(196,176,74,.12) 3px);
}
.bet-chip { position: absolute; transform: translate(-50%,-50%); z-index: 4; display: flex; align-items: center; gap: 4px; }
.bet-chip.folded { opacity: .42; filter: grayscale(.5); }
.bet-chip .chip-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); box-shadow: 0 1px 4px rgba(0,0,0,.55); }
.bet-chip .chip-amt { font-size: 9px; font-weight: 700; color: #e7e9ec; background: rgba(0,0,0,.5); padding: 1px 5px; border-radius: 5px; }

/* action bar — inside poker-card on all screens */
.act-section { margin-top: 0; }
.act-section .action-head { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 0 2px 2px; flex-wrap: wrap; }
.act-section .action-head .ah-pos { display: none; }
.act-section .mini-legend { display: flex; gap: 9px; flex-wrap: wrap; }
.act-section .mini-legend span { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--muted); }
.act-section .mini-legend i { width: 9px; height: 9px; border-radius: 2px; }

/* colour-coded frequency bar */
.action-mix { display: flex; height: 16px; border-radius: 5px; overflow: hidden; background: var(--line); cursor: pointer; margin-bottom: 6px; }
.action-mix .am-seg { display: flex; align-items: center; justify-content: center; overflow: hidden; min-width: 0; }
.action-mix .am-lbl { font-size: 10px; font-weight: 700; line-height: 1; }

.action-row { display: flex; gap: 7px; }
.act-btn {
  --ac: var(--c-call); flex: 1; min-height: 44px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--ac) 45%, var(--line));
  background: color-mix(in srgb, var(--ac) 13%, var(--panel-2));
  cursor: pointer; padding: 4px clamp(4px, 2vw, 10px);
  display: flex; flex-direction: row; align-items: center; justify-content: center; gap: clamp(4px, 1.5vw, 7px);
  transition: transform .1s, border-color .12s;
}
.act-btn:hover { transform: translateY(-1px); border-color: var(--ac); }
.act-btn .ab-name { font-weight: 700; font-size: clamp(13px, 3.6vw, 15px); color: color-mix(in srgb, var(--ac) 78%, var(--ink)); }
.act-btn .ab-sub { font-size: clamp(9px, 2.6vw, 10px); color: var(--muted); }
.stats-link { display: flex; }

/* old standalone action card (kept for backward compat, hidden) */
.action-card { display: none; }

/* filter panel — bottom drawer on mobile */
.filter-panel {
  background: var(--panel); border: 1px solid var(--line); padding: 18px 16px 22px;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  border-radius: 18px 18px 0 0; max-height: 82vh; overflow: auto;
  box-shadow: 0 -10px 40px rgba(0,0,0,.5);
  transform: translateY(102%); transition: transform .26s cubic-bezier(.2,.8,.2,1);
}
.solver-grid.drawer-open .filter-panel { transform: translateY(0); }
.filter-backdrop { display: none; }
.solver-grid.drawer-open .filter-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 55; }

.fp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.fp-title { font-size: 13px; font-weight: 700; }
.fp-head-btns { display: flex; gap: 8px; align-items: center; }
.fp-reset { background: none; border: 0; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.fp-done { background: var(--gold); color: #16181c; border: 0; border-radius: 7px; padding: 6px 12px; font-weight: 700; font-size: 12px; cursor: pointer; }
.fp-sec { margin-bottom: 15px; }
.fp-label { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 7px; }
.fp-checks { display: flex; flex-direction: column; gap: 6px; }
.fp-check, .fp-toggle {
  display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 11px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2);
  color: var(--ink-dim); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; text-align: left; width: 100%;
}
/* selected state: no background fill — only the checkbox + border change */
.fp-check.on, .fp-toggle.on { color: var(--ink); border-color: color-mix(in srgb, var(--gold) 38%, var(--line)); background: var(--panel-2); }
.fp-check .box, .fp-toggle .box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--muted); flex: none; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #16181c; }
.fp-check.on .box, .fp-toggle.on .box { background: var(--gold); border-color: var(--gold); }
.fp-check .lbl { flex: 1; }
.fp-check .tag { font-size: 11px; color: var(--muted); }
.seg-row { display: flex; gap: 6px; }
.seg-row button { flex: 1; min-height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-dim); font: inherit; font-weight: 600; font-size: 12px; cursor: pointer; }
.seg-row button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }
.fp-ranks { display: flex; flex-wrap: wrap; gap: 5px; }
.fp-rank { width: 34px; height: 38px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-dim); font-weight: 600; font-size: 14px; cursor: pointer; }
.fp-rank.on { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }

/* control bar */
/* one compact row: range input (flexes) + combo count + range% pill + filter button */
.cb-bar { display: flex; align-items: center; gap: 7px; }
.cb-field { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg-1); transition: border-color .12s; }
.cb-field:focus-within { border-color: var(--gold-deep); }
.cb-ico { color: var(--muted); font-size: 13px; flex: none; }
.cb-field input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font-family: var(--f-mono); font-size: 13px; outline: none; }
.cb-clear { width: 22px; height: 22px; border-radius: 6px; border: 0; background: var(--line); color: var(--ink-dim); font-size: 12px; cursor: pointer; flex: none; }
.cb-clear:hover { background: var(--gold-deep); color: #16181c; }
.cb-stat { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.cb-stat-n { font-weight: 700; color: var(--ink-dim); }
.cb-stat-u { font-size: 10px; color: var(--muted); margin-left: 4px; }
.cb-pct { flex: none; min-width: 44px; height: 28px; padding: 0 8px; border-radius: 7px; background: var(--gold-glow); color: var(--gold); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cb-filter { flex: none; display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-dim); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; transition: border-color .12s, color .12s; }
.cb-filter:hover { border-color: var(--gold-deep); color: var(--ink); }
.cb-filter-ico { display: inline-flex; color: currentColor; }
.cb-filter-ico svg { display: block; }
.cb-filter-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: #16181c; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.cb-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.cb-chips-label { font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.a-chip { display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 9px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--line)); background: var(--gold-glow); color: var(--gold); font-family: var(--f-mono); font-size: 11px; font-weight: 600; cursor: pointer; }
.a-chip .x { font-size: 12px; opacity: .8; }
.cb-clearall { min-height: 28px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-dim); font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }

/* table view — scrolls horizontally on narrow screens, fluid on wide */
.hand-table3 { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.thead3, .trow3 { display: grid; grid-template-columns: minmax(64px, 1.1fr) 84px 1fr 56px 52px; align-items: center; gap: 8px; min-width: 470px; }
.hand-table3.wide .thead3, .hand-table3.wide .trow3 { grid-template-columns: 104px 84px 1fr 56px 52px; min-width: 540px; }
.thead3 { background: var(--panel-2); border-bottom: 1px solid var(--line); padding: 9px 11px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.thead3 > span { cursor: pointer; user-select: none; white-space: nowrap; }
.thead3 .th-mix { cursor: default; }
.thead3 .th-acts { display: flex; gap: 4px; }
.thead3 .th-act { flex: 1; min-width: 22px; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--ac); cursor: pointer; }
.thead3 .th-act .tha-name { font-weight: 700; font-size: 10px; letter-spacing: -.02em; }
.thead3 .th-act .tha-pct { color: var(--ink-dim); font-weight: 700; font-size: 11px; }
.thead3 .th-num { text-align: right; }
.thead3 .sort-on, .thead3 .th-act.sort-on .tha-name { color: var(--gold); }
.tbody3 { display: flex; flex-direction: column; }
.trow3 { padding: 8px 11px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; cursor: pointer; color: var(--ink); text-align: left; font: inherit; width: 100%; }
.trow3:hover { background: var(--panel-2); }
.trow3 .t-hand { min-width: 0; }
.trow3 .mini-bar { width: 100%; height: 10px; }
.trow3 .tr-acts { display: flex; gap: 4px; }
.trow3 .act-cell { flex: 1; min-width: 0; text-align: center; font-family: var(--f-mono); font-size: 11px; font-weight: 600; color: var(--ac); cursor: pointer; padding: 0; background: none; border: 0; }
.trow3 .act-cell.zero { color: var(--muted); font-weight: 400; }
.trow3 .tr-num { font-family: var(--f-mono); font-size: 12px; color: var(--ink-dim); text-align: right; }
.trow3 .tr-ev.pos { color: var(--pos); }
.trow3 .tr-ev.neg { color: var(--neg); }
.trow3 .tr-combos { color: var(--muted); }

.mini-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line); }
.mini-bar i { height: 100%; }

/* hover popover */
.hover-pop { position: fixed; z-index: 90; background: var(--panel-2); border: 1px solid #353c46; border-radius: 10px; padding: 10px 12px; box-shadow: 0 12px 34px rgba(0,0,0,.55); pointer-events: none; min-width: 212px; }
.hp-title { font-size: 11px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.hp-head { display: flex; gap: 8px; font-size: 8.5px; color: var(--muted); margin-bottom: 5px; }
.hp-head span:not(:first-child) { min-width: 46px; text-align: right; }
.hp-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.hp-dot { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.hp-label { flex: 1; font-size: 11px; color: var(--ink-dim); }
.hp-v { font-size: 11px; min-width: 46px; text-align: right; color: var(--ink); }
.hp-v.pos { color: var(--pos); }
.hp-v.neg { color: var(--neg); }
.hp-v.muted { color: var(--muted); }

/* hold'em 13x13 matrix (mock cell sizing) */
.matrix-wrap .matrix { gap: 2px; }
.matrix-wrap .cell { aspect-ratio: 1; border-radius: 3px; font-size: clamp(8px, 2vw, 11px); }

/* PLO mastermind matrix */
.mm-wrap { display: flex; flex-direction: column; gap: 10px; }
.mm-help { font-size: 11px; color: var(--muted); line-height: 1.4; }
.mm-flabel { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.mm-patterns { display: flex; flex-wrap: wrap; gap: 6px; }
.mm-pat { min-height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-dim); font: inherit; font-weight: 600; font-size: 12px; cursor: pointer; }
.mm-pat.on { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }
/* two selection slots + step hint + clear */
.mm-cards { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mm-slot { display: flex; flex-direction: column; gap: 1px; min-width: 96px; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.mm-slot.active { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-glow); }
.mm-slot.disabled { opacity: .45; cursor: default; }
.mm-slot-label { font-size: 9px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.mm-slot-cards { font-size: 15px; font-weight: 700; }
.mm-step { flex: 1; font-size: 11px; color: var(--muted); }
.mm-clear { min-height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-dim); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }

.mm-grid { display: grid; grid-template-columns: repeat(13, 1fr); gap: 2px; max-width: 460px; }
.mm-cell { aspect-ratio: 1; border: 0; border-radius: 3px; padding: 0; cursor: pointer; background: var(--bg-1); font-family: var(--f-mono); font-size: clamp(7px, 1.9vw, 11px); font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); position: relative; }
.mm-cell.mm-empty { color: rgba(255,255,255,.22); text-shadow: none; }
.mm-cell.pair { box-shadow: inset 0 0 0 1px rgba(196,176,74,.4); }
.mm-cell.sel-top { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold); z-index: 3; }
.mm-cell.sel-bottom { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c-call); z-index: 3; }
.mm-cell.sel-top.sel-bottom { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold), 0 0 0 6px var(--c-call); }
.mm-suit-legend { display: flex; gap: 16px; font-size: 11px; color: var(--muted); }

.mm-detail { margin-top: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px; }
.mm-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.mm-sel { font-size: 14px; font-weight: 700; color: var(--ink); }
.mm-agg { display: flex; gap: 10px; }
.mm-agg-item { display: flex; align-items: center; gap: 4px; }
.mm-agg-item i { width: 8px; height: 8px; border-radius: 2px; }
.mm-combos-count { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.mm-detail .hand-table3 { background: var(--panel-2); }

/* ---------- desktop: viz + grid row; filters stay an overlay drawer ---------- */
@media (min-width: 900px) {
  .solver-grid { flex-direction: row; align-items: flex-start; }
  .filter-panel {
    top: 0; bottom: 0; left: 0; right: auto; width: 340px; max-height: none;
    border-radius: 0; border-top: 0; border-right: 1px solid var(--line);
    box-shadow: 10px 0 44px rgba(0, 0, 0, .5);
    transform: translateX(-112%);
  }
  .solver-grid.drawer-open .filter-panel { transform: translateX(0); }
  /* both columns grow with the window (viz capped at 600, grid ~1.55× wider) */
  .viz-col { flex: 1 1 0; max-width: 600px; margin: 0; }
  .grid-col { flex: 1.55 1 0; min-width: 0; }
}

/* ---------- action head (position only) ---------- */
.action-head .ah-pos { font-size: 14px; font-weight: 700; color: var(--gold); letter-spacing: .02em; }

/* ---------- mobile view toggle (dropdown style) ---------- */
.vt-dropdown { position: relative; display: inline-flex; align-items: stretch; height: 32px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--panel-2); }
.vt-dropdown .vt-label {
  border: none; background: none; color: var(--ink-dim); font-family: var(--f-display); font-weight: 600; font-size: 12px; padding: 0 4px 0 10px; cursor: pointer; white-space: nowrap;
}
.vt-dropdown .vt-arrow {
  border: none; border-left: 1px solid var(--line); background: none; color: var(--muted); font-size: 10px; padding: 0 9px; cursor: pointer;
}
.vt-menu-bd { position: fixed; inset: 0; z-index: 999; }
.vt-menu {
  position: fixed !important; z-index: 1000; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px; min-width: 128px; box-shadow: 0 8px 24px rgba(0,0,0,.5); animation: menuup .14s ease;
}
@keyframes menuup { from { transform: translateY(-6px); opacity: 0; } }
.vt-menu button {
  display: block; width: 100%; text-align: left; border: none; font-family: var(--f-display); font-weight: 600; font-size: 12.5px; padding: 9px 11px; border-radius: 6px; cursor: pointer; color: var(--ink-dim); background: transparent;
}
.vt-menu button:hover { background: rgba(255,255,255,.06); }
.vt-menu button[aria-pressed="true"] { background: rgba(196,176,74,.15); color: #e3c84e; }

/* mobile: language as plain select */
.lang-sel { background: #1c2026; color: #aeb6c0; border: 1px solid #2c313a; border-radius: 8px; padding: 7px 8px; font-size: 11px; font-weight: 600; font-family: var(--f-mono); cursor: pointer; }

/* compact mobile cats button */
.cats-mob-btn {
  min-height: 32px; padding: 0 12px; border-radius: 7px; border: 1px solid #2c313a;
  background: #1f232a; color: #aeb6c0; font-family: var(--f-display); font-weight: 600; font-size: 12px; cursor: pointer;
}
.cats-mob-btn[aria-pressed="true"] { background: rgba(196,176,74,.15); border-color: rgba(196,176,74,.35); color: #e3c84e; }

/* ---------- sponsored banner (configurable in ads.js) ---------- */
.ad-banner {
  display: block; text-decoration: none; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1d2733 0%, #172029 55%, #14323a 100%);
  border: 1px solid #2b3a44; border-radius: 14px; padding: 13px 14px;
}
.ad-label { position: absolute; top: 0; right: 0; font-size: 8.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: rgba(0,0,0,.28); padding: 3px 7px; border-bottom-left-radius: 8px; }
.ad-row { display: flex; align-items: center; gap: 12px; }
.ad-icon { flex: none; width: 42px; height: 42px; border-radius: 11px; background: linear-gradient(150deg, #2a6f63, #1c4b44); display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.12); font-size: 21px; color: #e9ecef; }
.ad-body { min-width: 0; flex: 1; }
.ad-brand { font-size: 13px; font-weight: 700; color: #eef1f4; letter-spacing: -.01em; margin-bottom: 2px; }
.ad-title { font-size: 12px; font-weight: 600; color: #cdd3da; line-height: 1.25; }
.ad-desc { font-size: 10.5px; color: #8a95a0; line-height: 1.3; margin-top: 2px; }
.ad-cta-wrap { flex: none; align-self: stretch; display: flex; align-items: center; }
.ad-cta { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; padding: 0 14px; border-radius: 9px; background: linear-gradient(150deg, #c9b452, #aa9436); color: #16181c; font-weight: 700; font-size: 12.5px; white-space: nowrap; box-shadow: 0 3px 12px rgba(196,176,74,.22); }
@media (max-width: 460px) { .ad-cta-wrap { display: none; } }

/* ============================================================
   Selector (configurator) — pick a curated strategy
   ============================================================ */
.selector { display: flex; justify-content: center; padding: 6px 0 40px; }
.sel-card { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 18px 18px; }
.sel-title { font-size: 13px; font-weight: 600; color: var(--ink-dim); letter-spacing: .04em; text-transform: uppercase; margin-bottom: 16px; }
.sel-group { margin-bottom: 15px; }
.sel-glabel { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 7px; }
.sel-options { display: flex; gap: 7px; flex-wrap: wrap; }
.sel-opt { flex: 1; min-width: 56px; min-height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-dim); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.mono { font-family: var(--f-mono); }
.sel-opt.mono { font-family: var(--f-mono); }
.sel-opt:hover { border-color: var(--gold-deep); color: var(--ink); }
.sel-opt[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }
.sel-opt[disabled] { opacity: .4; cursor: default; }
.sel-open { width: 100%; min-height: 54px; margin-top: 5px; border: 0; border-radius: 11px; background: linear-gradient(150deg, #c9b452, #aa9436); color: #16181c; font-family: var(--f-display); font-weight: 700; font-size: 15px; letter-spacing: .01em; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 9px; box-shadow: 0 6px 18px rgba(196,176,74,.22); }
.sel-open[disabled] { opacity: .5; cursor: default; box-shadow: none; }
.sel-open.busy { opacity: .6; cursor: default; }
.sel-summary { text-align: center; margin-top: 12px; font-size: 11px; color: var(--muted); }

/* ============================================================
   Hand table — one column per action (Fold / Call / Raise …)
   ============================================================ */
.act-table { display: flex; flex-direction: column; gap: 8px; }
/* horizontal scroll (never clip) when the columns can't all fit */
.act-cols { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; align-items: flex-start; }
/* full columns grow with the grid but never shrink below their content (238px
   intrinsic) — so the numeric cells can't be clipped/overlapped */
.act-col { --ac: var(--c-call); flex: 1 1 280px; min-width: 280px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
/* colored top strip per action column (design: <div height:3px background:col.color>) */
.act-col::before { content: ""; display: block; height: 3px; background: var(--ac); flex: none; }
.act-col.collapsed { flex: 0 0 66px; min-width: 66px; }
.ac-head { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: #1b1f25; padding: 9px 10px; cursor: pointer; color: var(--ink); }
.act-col.collapsed .ac-head { background: var(--panel); }
.ac-head-top { display: flex; align-items: center; gap: 7px; }
.ac-dot { width: 9px; height: 9px; border-radius: 2px; background: var(--ac); flex: none; }
.ac-label { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-count { font-size: 10px; color: var(--muted); margin-left: auto; }
.ac-head-bar { display: flex; align-items: center; gap: 7px; }
.ac-aggbar { flex: 1; height: clamp(3px, 0.6vw, 5px); border-radius: 2px; background: var(--line); overflow: hidden; display: flex; }
.ac-aggbar i { height: 100%; background: var(--ac); }
.ac-aggpct { font-size: 11px; font-weight: 700; color: var(--muted); min-width: 42px; text-align: right; }
/* hand column reserves room for the 4 cards (≈78px) + padding so they never
   spill onto the freq column when the table narrows */
.ac-grid { display: grid; grid-template-columns: minmax(96px, 1fr) 52px 42px 44px 42px; align-items: center; }
.ac-subhead { background: var(--panel-2); border-bottom: 1px solid var(--line); }
.ac-subhead > span { padding: 7px 4px; font-size: 9px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; user-select: none; }
.ac-subhead .acg-hand { text-align: left; padding-left: 8px; }
.ac-subhead .acg-num { text-align: right; }
.ac-subhead .sort-on { color: var(--gold); }
.ac-body { display: flex; flex-direction: column; }
.ac-row { padding: 0; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; cursor: pointer; text-align: left; color: var(--ink); font: inherit; width: 100%; }
.ac-row:hover { background: var(--panel-2); }
.ac-row .acg-hand { padding: 3px 8px; min-width: 0; overflow: hidden; }
.ac-row .acg-hand .t-cards { gap: 2px; }
.ac-row .acg-hand .t-cards .pc { min-width: clamp(12px, 2vw, 18px); height: clamp(15px, 2.5vw, 22px); font-size: clamp(9px, 1.5vw, 12px); padding: 0 clamp(1px, 0.3vw, 3px); }
.ac-row .acg-num { padding: 3px 5px; text-align: right; font-family: var(--f-mono); font-size: 10px; color: var(--ink-dim); white-space: nowrap; }
.ac-row .acr-freq { font-weight: 700; color: var(--muted); }
.ac-row .acr-ev.pos { color: var(--pos); }
.ac-row .acr-ev.neg { color: var(--neg); }
.ac-row .acr-combos { color: var(--muted); }
.ac-collapsed-body { display: flex; flex-direction: column; cursor: pointer; }
.acc-row { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px; border-bottom: 1px solid var(--line-soft); }
.acc-row .t-cards { gap: 1px; }
.acc-row .t-cards .pc { min-width: clamp(11px, 1.8vw, 16px); height: clamp(16px, 2.3vw, 21px); font-size: clamp(8px, 1.3vw, 11px); padding: 0 clamp(1px, 0.2vw, 2px); }
.acc-bar { width: 100%; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; display: flex; }
.acc-bar i { height: 100%; }

/* ============================================================
   Categories panel (PLO hand classes as a selectable filter)
   ============================================================ */
.cats-host:empty { display: none; }
.cats-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 13px 14px; }
.cats-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.cats-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-dim); }
.cats-head-right { display: flex; align-items: center; gap: 9px; }
.cats-tot { font-size: 11px; color: var(--muted); }
.cats-clear { background: none; border: 0; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.cats-groups { display: flex; flex-direction: column; gap: 3px; }
.cat-group { border: 1px solid var(--line); border-radius: 9px; background: #171a1f; overflow: hidden; }
.cat-ghead { display: flex; align-items: center; gap: 8px; padding: 3px 7px; background: #1b1f25; border-bottom: 1px solid var(--line); }
.cat-glabel { flex: 1; min-width: 0; text-align: left; border: 0; background: none; cursor: pointer; padding: 0; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--ink-dim); }
.cat-glabel.on { color: var(--ink); }
.cat-gshare { flex: none; font-size: 10px; font-weight: 600; color: var(--muted); }
.cat-row { border-top: 1px solid #1d2127; }
.cat-row.active { background: rgba(196, 176, 74, .08); }
.cat-rmain { display: flex; align-items: center; gap: 6px; padding: 2px 7px; }
.cat-chev { width: 14px; height: 20px; border: 0; background: none; color: #6a727d; font-size: 10px; cursor: pointer; padding: 0; flex: none; }
.cat-chev.hidden { visibility: hidden; }
.cat-rlabel { flex: none; width: 96px; font-size: 11px; font-weight: 600; color: #dfe4ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-bar { flex: 1; display: flex; height: 5px; border-radius: 2px; overflow: hidden; background: #1c2026; min-width: 36px; }
.cat-bar.tall { height: 10px; border-radius: 3px; background: var(--line); min-width: 48px; }
.cat-bar i { height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cat-bar-lbl { font-size: 7px; font-weight: 700; line-height: 1; }
.cat-rshare { flex: none; width: 44px; text-align: right; font-size: 10px; color: #9aa3ad; }
.cat-box { flex: none; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid #404752; background: transparent; color: #16181c; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cat-box.on { background: var(--gold); border-color: var(--gold); }
.cat-box.mid { border-color: var(--gold); color: var(--gold); background: transparent; }
.cat-box.sm { width: 14px; height: 14px; border-radius: 3px; font-size: 9px; }
.cat-subs { display: flex; flex-direction: column; gap: 2px; padding: 0 7px 4px 30px; }
.cat-sub { display: flex; align-items: center; gap: 6px; }
.cat-slabel { flex: none; width: 90px; font-size: 10px; color: #9aa3ad; white-space: nowrap; }
.cat-sub .cat-bar { height: 4px; background: #1c2026; min-width: 30px; }
.cat-sshare { flex: none; width: 40px; text-align: right; font-size: 9px; color: var(--muted); }

/* ============================================================
   Mobile compact overrides (< 900px)
   ============================================================ */
@media (max-width: 899px) {
  /* poker table more compact */
  .poker-card { padding: 10px 8px; }
  .felt { aspect-ratio: 2.0; max-width: 400px; }

  /* smaller card backs on mobile */
  .card-backs .cb { width: 9px; height: 13px; }
  .card-backs .cb + .cb { margin-left: -3px; }

  /* smaller seats and text */
  .seat { min-width: 44px; padding: 3px 7px; border-radius: 8px; }
  .seat-pos { font-size: 10px; }
  .seat-stack { font-size: 8px; }
  .seat .dealer { width: 14px; height: 14px; font-size: 8px; top: -7px; right: -7px; }
  .seat-flag { font-size: 7px; }

  /* shorter action mix bar */
  .action-mix { height: 12px; }
  .action-mix .am-lbl { font-size: 7px; }

  /* shorter action buttons */
  .act-btn { min-height: 36px; padding: 2px 4px; gap: 3px; }
  .act-btn .ab-name { font-size: 11px; }
  .act-btn .ab-sub { font-size: 7px; }

  /* shorter category bars */
  .cat-bar.tall { height: 8px; min-width: 30px; }
  .cat-bar { height: 4px; }
  .cat-bar-lbl { font-size: 6px; }
  .cat-sub .cat-bar { height: 3px; }
  .cats-groups { gap: 2px; }
  .cat-rmain { padding: 2px 6px; }
  .cat-ghead { padding: 2px 6px; }
  .cat-subs { gap: 1px; padding: 0 6px 3px 24px; }

  /* compact header / toolbar */
  .solver-head { gap: 6px; padding: 0; }
  .sv-back { width: 30px; height: 30px; font-size: 16px; }
  .sv-title b { font-size: 12px; }
  .sv-sum { font-size: 10px; }

  /* compact control bar — one row, tight touch targets */
  .solver-grid { gap: 10px; }
  .cb-bar { gap: 5px; }
  .cb-field { height: 36px; padding: 0 9px; gap: 6px; }
  .cb-field input { font-size: 12px; }
  .cb-ico { font-size: 12px; }
  .cb-stat { font-size: 11px; }
  .cb-pct { min-width: 40px; height: 26px; font-size: 11px; padding: 0 6px; }
  .cb-filter { min-height: 36px; padding: 0 10px; font-size: 12px; }

  /* viz-col takes full width, smaller max */
  .viz-col { max-width: 100%; gap: 8px; }

  /* smaller cat labels */
  .cat-rlabel { width: 78px; font-size: 11px; }
  .cat-rshare { width: 40px; font-size: 10px; }
  .cat-glabel { font-size: 11px; }

  /* smaller topbar — line-bar must follow it up */
  .topbar { padding: calc(6px + var(--sat)) var(--pad) 6px; gap: 6px; }
  .line-bar { top: calc(40px + var(--sat)); }
  .iconbtn { min-height: 32px; min-width: 32px; padding: 0 8px; font-size: 11px; border-radius: 8px; }
  .brand .chip-icon { width: 24px; height: 24px; }
  .brand b { font-size: 12px; }
}

/* very narrow phones: drop the "Filters" label so the row never overflows */
@media (max-width: 380px) {
  .cb-filter-tx { display: none; }
  .cb-filter { padding: 0 9px; }
  .cb-stat { display: none; }   /* combo count drops off first; range% + filter stay */
}
