/* Pot Odds (pot): all selectors prefixed with .g-pot */
.g-pot {
  --pot-felt: color-mix(in srgb, var(--ok) 70%, var(--ink));
  --pot-felt-edge: color-mix(in srgb, var(--ok) 45%, var(--ink));
  --pot-on-felt: var(--surface);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .g-pot {
    --pot-felt: color-mix(in srgb, var(--ok) 42%, var(--bg));
    --pot-felt-edge: color-mix(in srgb, var(--ok) 22%, var(--bg));
    --pot-on-felt: var(--ink);
  }
}
:root[data-theme="dark"] .g-pot {
  --pot-felt: color-mix(in srgb, var(--ok) 42%, var(--bg));
  --pot-felt-edge: color-mix(in srgb, var(--ok) 22%, var(--bg));
  --pot-on-felt: var(--ink);
}

.g-pot .g-pot-wrap { max-width: 560px; margin: 0 auto; padding: 4px 0 24px; display: flex; flex-direction: column; gap: 12px; }
.g-pot .g-pot-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }

/* ---------- Felt table ---------- */
.g-pot .g-pot-felt {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 14px 10px 16px; border-radius: 120px / 60px; color: var(--pot-on-felt);
  background: radial-gradient(ellipse at 50% 40%, var(--pot-felt) 55%, var(--pot-felt-edge) 100%);
  border: 6px solid var(--pot-felt-edge); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--pot-on-felt) 18%, transparent), var(--shadow);
}
.g-pot .g-pot-villain, .g-pot .g-pot-hero { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 0; }
.g-pot .g-pot-villain .g-pot-card { width: 32px; height: 46px; }
.g-pot .g-pot-vbet { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.g-pot .g-pot-centre { display: flex; align-items: center; justify-content: center; gap: 8px; }
.g-pot .g-pot-amt {
  font-family: var(--font-mono); font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 30%, transparent); color: var(--pot-on-felt); white-space: nowrap;
}
.g-pot .g-pot-amt--pot { font-size: 15px; background: var(--gold); color: var(--ink); }
.g-pot .g-pot-board { display: flex; gap: 5px; justify-content: center; }
.g-pot .g-pot-street { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }
.g-pot .g-pot-you { color: var(--pot-on-felt); opacity: .85; margin-left: 4px; }

/* ---------- Cards ---------- */
.g-pot .g-pot-card {
  position: relative; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 48px; height: 68px; border-radius: 8px; background: var(--card); color: var(--ink);
  border: 1.5px solid var(--card-border); box-shadow: 0 2px 6px color-mix(in srgb, var(--ink) 25%, transparent);
  font-family: var(--font-mono); line-height: 1; flex: none;
}
.g-pot .g-pot-card b { font-size: 19px; font-weight: 800; letter-spacing: -0.04em; }
.g-pot .g-pot-card i { font-style: normal; font-size: 20px; margin-top: 3px; }
.g-pot .g-pot-card.is-red { color: var(--bad); }
.g-pot .g-pot-card--big { width: 58px; height: 82px; }
.g-pot .g-pot-card--big b { font-size: 23px; }
.g-pot .g-pot-card--big i { font-size: 24px; }
.g-pot .g-pot-slot { background: transparent; border: 1.5px dashed color-mix(in srgb, var(--pot-on-felt) 45%, transparent); box-shadow: none; }
.g-pot .g-pot-back {
  background: repeating-linear-gradient(45deg, var(--accent) 0 4px, color-mix(in srgb, var(--accent) 70%, var(--card)) 4px 8px);
  border: 2px solid var(--card);
}
.g-pot .g-pot-deal { animation: g-pot-deal .38s cubic-bezier(.2,.8,.2,1.2) both; animation-delay: var(--d, 0ms); }
@keyframes g-pot-deal { from { opacity: 0; transform: translateY(-26px) rotate(-8deg) scale(.8); } to { opacity: 1; transform: none; } }

/* ---------- Chips ---------- */
.g-pot .g-pot-stack { position: relative; display: inline-block; width: 26px; height: 34px; }
.g-pot .g-pot-chip {
  position: absolute; left: 0; bottom: calc(var(--i) * 4px); width: 26px; height: 9px; border-radius: 50%;
  border: 2px dashed var(--card); box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 40%, transparent);
}
.g-pot .g-pot-chip--gold { background: var(--gold); }
.g-pot .g-pot-chip--blue { background: var(--blue); }
.g-pot .g-pot-chip--bad { background: var(--bad); }
.g-pot .g-pot-chip--ok { background: var(--ok); }

/* ---------- Question & inputs ---------- */
.g-pot .g-pot-q { display: flex; flex-direction: column; gap: 4px; }
.g-pot .g-pot-ask { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 17.5px; line-height: 1.35; }
.g-pot .g-pot-small { margin: 0; font-size: 13px; }
.g-pot .g-pot-pad { display: flex; flex-direction: column; gap: 10px; transition: opacity .2s ease; }
.g-pot .g-pot-pad.is-locked { opacity: .6; }
.g-pot .g-pot-steps { display: flex; align-items: center; justify-content: center; gap: 6px; }
.g-pot .g-pot-sbtn {
  min-width: 48px; height: 48px; padding: 0 6px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  font-family: var(--font-mono); font-weight: 700; font-size: 18px; cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent; transition: transform .1s ease, border-color .15s ease;
}
.g-pot .g-pot-sbtn:hover { border-color: var(--ink-3); }
.g-pot .g-pot-sbtn:active { transform: scale(.94); }
.g-pot .g-pot-sbtn:disabled { opacity: .4; cursor: default; transform: none; }
.g-pot .g-pot-val { min-width: 84px; text-align: center; font-size: 36px; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.g-pot .g-pot-hint { margin: 0; text-align: center; font-size: 12.5px; }
.g-pot .g-pot-cf { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-pot .g-pot-cf .btn { min-height: 56px; font-size: 18px; }
.g-pot .g-pot-fold { background: var(--surface); border: 1.5px solid var(--line); }
.g-pot .g-pot-cf .btn:disabled { opacity: .45; cursor: default; }
.g-pot .g-pot-cf .btn.is-picked { opacity: 1; box-shadow: 0 0 0 3px var(--gold); }

/* ---------- Reveal ---------- */
.g-pot .g-pot-reveal { display: flex; flex-direction: column; gap: 12px; }
.g-pot .g-pot-verdict { display: flex; flex-direction: column; gap: 10px; border-width: 2px; }
.g-pot .g-pot-verdict.is-ok { border-color: var(--ok); }
.g-pot .g-pot-verdict.is-near { border-color: var(--gold); }
.g-pot .g-pot-verdict.is-bad { border-color: var(--bad); }
.g-pot .g-pot-title { margin: 0; font-family: var(--font-display); font-size: 19px; line-height: 1.3; }
.g-pot .g-pot-eq { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.g-pot .g-pot-eq b { color: var(--ink); font-family: var(--font-mono); }
.g-pot .g-pot-tip { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); background: var(--gold-soft); border-radius: 10px; padding: 8px 10px; }
.g-pot .g-pot-points { display: flex; gap: 6px; flex-wrap: wrap; min-height: 24px; }
.g-pot .g-pot-rows { display: flex; flex-direction: column; gap: 4px; }
.g-pot .g-pot-rows div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.g-pot .g-pot-rows b { font-family: var(--font-mono); font-size: 14px; }

/* 52-card grid */
.g-pot .g-pot-grid { display: flex; flex-direction: column; gap: 3px; }
.g-pot .g-pot-grow { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 3px; }
.g-pot .g-pot-gc {
  display: flex; flex-direction: column; align-items: center; justify-content: center; height: 34px; border-radius: 5px;
  font-family: var(--font-mono); font-weight: 700; font-size: 11px; line-height: 1; letter-spacing: -0.04em;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-3);
}
.g-pot .g-pot-gc i { font-style: normal; font-size: 11px; margin-top: 2px; }
.g-pot .g-pot-gc.is-dim { opacity: .45; }
.g-pot .g-pot-gc.is-seen { background: var(--card); color: var(--ink); border: 2px solid var(--ink-3); opacity: 1; }
.g-pot .g-pot-gc.is-red.is-seen { color: var(--bad); }
.g-pot .g-pot-gc.is-out { color: var(--ink); animation: g-pot-glow .45s cubic-bezier(.2,.8,.2,1.4) both; animation-delay: var(--d, 0ms); }
.g-pot .g-pot-gc.is-flush { background: var(--gold-soft); border: 2px solid var(--gold); }
.g-pot .g-pot-gc.is-straight { background: var(--blue-soft); border: 2px solid var(--blue); }
.g-pot .g-pot-gc.is-both { background: var(--ok-soft); border: 2px solid var(--ok); }
.g-pot .g-pot-gc.is-red.is-out { color: var(--bad); }
@keyframes g-pot-glow { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
.g-pot .g-pot-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink-2); }
.g-pot .g-pot-legend span { display: inline-flex; align-items: center; gap: 5px; }
.g-pot .g-pot-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 2px solid var(--line); }
.g-pot .g-pot-key.is-flush { background: var(--gold-soft); border-color: var(--gold); }
.g-pot .g-pot-key.is-straight { background: var(--blue-soft); border-color: var(--blue); }
.g-pot .g-pot-key.is-both { background: var(--ok-soft); border-color: var(--ok); }
.g-pot .g-pot-key.is-seen { background: var(--card); border-color: var(--ink-3); }

/* Two-bar comparison */
.g-pot .g-pot-bars { display: flex; flex-direction: column; gap: 8px; }
.g-pot .g-pot-bar { display: grid; grid-template-columns: 70px 1fr 54px; align-items: center; gap: 8px; }
.g-pot .g-pot-blabel { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.g-pot .g-pot-bar b { font-family: var(--font-mono); font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.g-pot .g-pot-btrack { position: relative; height: 16px; border-radius: 999px; background: var(--line); overflow: hidden; }
.g-pot .g-pot-bfill {
  position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 999px;
  animation: g-pot-grow .7s cubic-bezier(.2,.8,.2,1) both;
}
.g-pot .g-pot-bar + .g-pot-bar .g-pot-bfill { animation-delay: .25s; }
@keyframes g-pot-grow { from { width: 0; } to { width: var(--w); } }
.g-pot .g-pot-bfill--need { background: var(--ink-3); }
.g-pot .g-pot-bfill--ok { background: var(--ok); }
.g-pot .g-pot-bfill--bad { background: var(--bad); }

/* Ledger */
.g-pot .g-pot-ledger { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.g-pot .g-pot-lrow {
  display: grid; grid-template-columns: 16px 58px 1fr auto; gap: 6px; align-items: baseline; padding: 4px 0;
  border-bottom: 1px dashed var(--line); animation: g-pot-row .25s ease-out both; animation-delay: var(--d, 0ms);
}
@keyframes g-pot-row { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.g-pot .g-pot-lmark { font-weight: 800; }
.g-pot .g-pot-lrow.is-ok .g-pot-lmark { color: var(--ok); }
.g-pot .g-pot-lrow.is-bad .g-pot-lmark { color: var(--bad); }
.g-pot .g-pot-lname { min-width: 0; overflow-wrap: anywhere; }
.g-pot .g-pot-lyou { font-family: var(--font-mono); color: var(--ink-3); }
.g-pot .g-pot-lsum { display: flex; justify-content: space-around; gap: 8px; padding-top: 8px; font-family: var(--font-mono); flex-wrap: wrap; }

.g-pot .g-pot-note { margin: 0; font-size: 12px; line-height: 1.45; color: var(--ink-3); text-align: center; }

@media (max-width: 380px) {
  .g-pot .g-pot-card { width: 44px; height: 62px; }
  .g-pot .g-pot-card--big { width: 54px; height: 76px; }
  .g-pot .g-pot-sbtn { min-width: 44px; height: 48px; font-size: 16px; }
  .g-pot .g-pot-val { min-width: 70px; font-size: 32px; }
  .g-pot .g-pot-gc { height: 32px; font-size: 10px; }
}
@media (min-width: 560px) {
  .g-pot .g-pot-card { width: 54px; height: 76px; }
  .g-pot .g-pot-card--big { width: 64px; height: 90px; }
  .g-pot .g-pot-felt { padding: 18px 16px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .g-pot .g-pot-deal, .g-pot .g-pot-gc.is-out, .g-pot .g-pot-bfill, .g-pot .g-pot-lrow { animation: none; }
}
