/* COUNT21 design system — premium dark, emerald & gold. */
:root {
  --bg: #090D0B; --bg-2: #111A15; --bg-3: #16221B; --emerald: #123D2B; --emerald-2: #1A5239; --felt: #0F3324;
  --gold: #D4AF37; --gold-2: #E6C766; --gold-dim: rgba(212,175,55,.14); --ink: #F5F5F0; --ink-2: #C9CEC9; --muted: #8E9992;
  --line: rgba(245,245,240,.09); --line-2: rgba(245,245,240,.16);
  --good: #5FBF7F; --warn: #E3B34A; --bad: #E07065; --info: #7C9CFF;
  /* validated chart palette (dark surface #111A15) */
  --c1: #B08D2A; --c2: #00A38F; --c3: #6A85F0; --c4: #D0654A; --c5: #A076D6; --c6: #6FA34A;
  --radius: 14px; --radius-sm: 9px; --shadow: 0 10px 40px rgba(0,0,0,.45); --sidebar: 248px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --card-scale: 1; --speed: 1;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15.5px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { transition: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
body.high-contrast { --muted: #B7C0BA; --line: rgba(245,245,240,.22); --ink-2: #E4E8E4; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: .005em; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); } h2 { font-size: 1.55rem; } h3 { font-size: 1.2rem; } h4 { font-size: 1.02rem; }
p { margin: 0 0 1em; } small, .small { font-size: .85rem; } .muted { color: var(--muted); } .ink2 { color: var(--ink-2); }
.gold { color: var(--gold); } .good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-3); padding: .1em .35em; border-radius: 5px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--gold); color: #000; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.shell.public { grid-template-columns: minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: linear-gradient(180deg, #0C1310, #090D0B); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.35rem; letter-spacing: .08em; color: var(--ink); padding: 4px 10px 18px; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border: 1.5px solid var(--gold); border-radius: 7px; display: grid; place-items: center; font-size: .8rem; color: var(--gold); font-family: var(--sans); font-weight: 700; letter-spacing: 0; transform: rotate(-6deg); }
.brand b { color: var(--gold); font-weight: 600; }
.nav-group { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; border-radius: 9px; color: var(--ink-2); font-size: .93rem; }
.nav a:hover { background: var(--bg-3); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--gold-dim); color: var(--gold-2); }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.sidebar .foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); font-size: .82rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 12px 28px; background: rgba(9,13,11,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .crumbs { font-size: .85rem; color: var(--muted); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumbs a { color: var(--muted); } .topbar .crumbs a:hover { color: var(--ink); }
.content { padding: 28px clamp(16px, 3vw, 40px) 60px; max-width: 1240px; width: 100%; margin: 0 auto; flex: 1; }
.content.narrow { max-width: 820px; }
.btn.menu-btn { display: none; }
.demo-banner { background: linear-gradient(90deg, #1E2A14, #2A2410); color: var(--gold-2); font-size: .82rem; padding: 7px 18px; text-align: center; border-bottom: 1px solid var(--line); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.page-head p { margin: 0; color: var(--muted); max-width: 640px; }
.eyebrow { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; font-weight: 600; }

/* public header */
.pub-head { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 22px; padding: 14px clamp(16px, 4vw, 48px); background: rgba(9,13,11,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.pub-head nav { display: flex; gap: 22px; flex: 1; }
.pub-head nav a { color: var(--ink-2); font-size: .93rem; }
.pub-head .brand { padding: 0; }
.pub-foot { border-top: 1px solid var(--line); padding: 40px clamp(16px, 4vw, 48px); color: var(--muted); font-size: .86rem; display: grid; gap: 28px; grid-template-columns: 2fr repeat(3, 1fr); }
.pub-foot h4 { color: var(--ink); font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.pub-foot a { display: block; color: var(--muted); padding: 3px 0; }
.pub-foot .legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 18px; font-size: .8rem; }

/* ---------- components ---------- */
.btn { --b: var(--line-2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--b); background: var(--bg-3); color: var(--ink); font: 600 .92rem var(--sans); cursor: pointer; transition: transform .12s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--gold); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #E0BD4A, #C9A22E); color: #14110A; border-color: transparent; box-shadow: 0 4px 18px rgba(212,175,55,.22); }
.btn.primary:hover { background: linear-gradient(180deg, #EBCB5E, #D4AF37); }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(224,112,101,.5); color: #F3A79F; background: transparent; }
.btn.sm { padding: 6px 12px; font-size: .84rem; border-radius: 8px; }
.btn.lg { padding: 14px 26px; font-size: 1rem; border-radius: 12px; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.panel { background: linear-gradient(180deg, var(--bg-2), #0E1612); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.panel.tight { padding: 16px; }
.panel.gold-edge { border-color: rgba(212,175,55,.35); box-shadow: inset 0 1px 0 rgba(212,175,55,.12); }
.panel h3 { margin-bottom: .6em; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head h3 { margin: 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-family: var(--serif); font-size: 2rem; line-height: 1.1; }
.stat .l { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat .d { font-size: .84rem; color: var(--ink-2); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--bg-3); color: var(--ink-2); border: 1px solid var(--line); }
.badge.gold { background: var(--gold-dim); color: var(--gold-2); border-color: rgba(212,175,55,.3); }
.badge.good { background: rgba(95,191,127,.12); color: var(--good); border-color: rgba(95,191,127,.3); }
.badge.bad { background: rgba(224,112,101,.12); color: var(--bad); border-color: rgba(224,112,101,.3); }
.progress { height: 8px; background: var(--bg-3); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, #A8872A, var(--gold)); border-radius: 99px; transition: width .6s; }
.ring { --p: 0; --size: 120px; width: var(--size); height: var(--size); border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--bg-3) 0); display: grid; place-items: center; position: relative; }
.ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--bg-2); }
.ring > * { position: relative; text-align: center; }
.list { display: flex; flex-direction: column; }
.list > * { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > *:last-child { border-bottom: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.gap-s { gap: 6px; } .mt { margin-top: 18px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 18px; } .mb0 { margin-bottom: 0; }
.center { text-align: center; } .right { text-align: right; } .grow { flex: 1; min-width: 0; }
.chip { display: inline-flex; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); font-size: .85rem; background: transparent; cursor: pointer; font-family: var(--sans); }
.chip.on, .chip[aria-pressed="true"] { background: var(--gold-dim); color: var(--gold-2); border-color: rgba(212,175,55,.45); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--muted); padding: 10px 14px; font: 600 .9rem var(--sans); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--gold-2); border-color: var(--gold); }

/* forms */
label.field { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; color: var(--ink-2); margin-bottom: 14px; }
/* Every text-like control (including inputs written without a type, which browsers render white by default). */
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date],
input[type=url], input[type=tel], input[type=time], input[type=datetime-local], input[type=month], input[type=week], select, textarea {
  font: inherit; color: var(--ink); background: #0B120E; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 13px; width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
input:not([type]):hover, input[type=text]:hover, input[type=email]:hover, input[type=password]:hover, input[type=number]:hover, input[type=search]:hover,
input[type=date]:hover, input[type=url]:hover, input[type=tel]:hover, select:hover, textarea:hover { border-color: rgba(245,245,240,.26); }
::placeholder { color: var(--muted); opacity: 1; }
select { cursor: pointer; }
select option, select optgroup { background: var(--bg-2); color: var(--ink); }
input:disabled, select:disabled, textarea:disabled, input[readonly], textarea[readonly] { background: #0E1511; color: var(--muted); border-color: var(--line); cursor: not-allowed; }
input[readonly], textarea[readonly] { cursor: text; }
/* Browser autofill would otherwise paint fields pale yellow/white */
input:-webkit-autofill, input:-webkit-autofill:hover, textarea:-webkit-autofill, select:-webkit-autofill {
  -webkit-text-fill-color: var(--ink); caret-color: var(--ink); -webkit-box-shadow: 0 0 0 1000px #0B120E inset; transition: background-color 99999s ease-out 0s; }
input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px #0B120E inset, 0 0 0 3px rgba(212,175,55,.15); }
input[type=search]::-webkit-search-cancel-button { filter: invert(.75); cursor: pointer; }
input[type=number] { font-variant-numeric: tabular-nums; }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--bad); }
textarea { min-height: 120px; resize: vertical; }
textarea.code { font-family: var(--mono); font-size: .82rem; min-height: 360px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.25); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); margin: 10px 0; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--gold); width: 16px; height: 16px; }
@media (pointer: coarse) { .check input, input[type=radio], input[type=checkbox] { width: 22px; height: 22px; min-width: 22px; } .check { min-height: 32px; align-items: center; } .check input { margin-top: 0; } }
input[type=range] { accent-color: var(--gold); width: 100%; }
.form-error { background: rgba(224,112,101,.1); border: 1px solid rgba(224,112,101,.35); color: #F3B0A8; padding: 10px 14px; border-radius: 10px; font-size: .9rem; margin-bottom: 14px; }
.form-note { background: var(--gold-dim); border: 1px solid rgba(212,175,55,.3); color: var(--gold-2); padding: 10px 14px; border-radius: 10px; font-size: .88rem; margin-bottom: 14px; word-break: break-word; }
.auth-wrap { min-height: calc(100vh - 70px); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 40px 16px; }
.auth-card { width: 100%; max-width: 430px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .8rem; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.option-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.option { text-align: left; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--ink); cursor: pointer; font: inherit; transition: border-color .15s, background .15s; }
.option:hover { border-color: rgba(212,175,55,.5); }
.option[aria-pressed="true"], .option.on { border-color: var(--gold); background: var(--gold-dim); }
.option.correct { border-color: var(--good); background: rgba(95,191,127,.12); }
.option.wrong { border-color: var(--bad); background: rgba(224,112,101,.1); }
.option small { display: block; color: var(--muted); margin-top: 2px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 0 1em; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; background: rgba(255,255,255,.02); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.015); }

/* prose */
.prose { font-size: 1.02rem; line-height: 1.75; color: var(--ink-2); max-width: 760px; }
.prose h2, .prose h3 { color: var(--ink); margin-top: 1.4em; }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin: .3em 0; }
.prose blockquote { margin: 0 0 1em; border-left: 3px solid var(--gold); padding: 6px 16px; background: var(--gold-dim); border-radius: 0 8px 8px 0; color: var(--ink); }
.prose blockquote p { margin: 0; }
details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 10px 0; background: var(--bg-3); }
details summary { cursor: pointer; font-weight: 600; color: var(--ink); }

/* toasts & modal */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 36px)); }
.toast { background: #17231C; border: 1px solid var(--line-2); border-left: 3px solid var(--gold); padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: .9rem; animation: toastIn .25s ease-out; }
.toast.good { border-left-color: var(--good); } .toast.bad { border-left-color: var(--bad); }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } }
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); z-index: 150; display: grid; place-items: center; padding: 16px; animation: fade .2s; }
.modal { width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; }
@keyframes fade { from { opacity: 0; } }

/* states */
.empty { text-align: center; padding: 38px 20px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius); }
.empty .ico { font-size: 1.8rem; color: var(--gold); margin-bottom: 6px; }
.skeleton { background: linear-gradient(90deg, var(--bg-2), var(--bg-3), var(--bg-2)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; min-height: 18px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.loading-page { display: grid; gap: 14px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--gold); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.lock { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-size: .8rem; }

/* ---------- playing cards ---------- */
.cards { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; min-height: calc(112px * var(--card-scale)); }
.cards.overlap { gap: 0; } .cards.overlap .pcard + .pcard { margin-left: calc(-38px * var(--card-scale)); }
.pcard { --w: calc(78px * var(--card-scale)); width: var(--w); height: calc(var(--w) * 1.4); border-radius: calc(var(--w) * .09); background: linear-gradient(160deg, #FFFFFF, #F1EFE8); color: #1A1A1A; position: relative; box-shadow: 0 6px 16px rgba(0,0,0,.45), inset 0 0 0 1px rgba(0,0,0,.08); flex: none; user-select: none; animation: deal calc(.32s / var(--speed)) cubic-bezier(.2,.8,.2,1) both; font-family: var(--serif); }
.pcard.red { color: #B3202A; } body.four-color .pcard.s-D { color: #1D5FC2; } body.four-color .pcard.s-C { color: #1B7A3A; }
.pcard .idx { position: absolute; top: 5%; left: 7%; display: flex; flex-direction: column; align-items: center; line-height: .95; font-weight: 700; font-size: calc(var(--w) * .22); }
.pcard .idx.br { top: auto; left: auto; bottom: 5%; right: 7%; transform: rotate(180deg); }
.pcard .idx span { font-size: .78em; }
.pcard .pips { position: absolute; inset: 20% 22%; display: grid; place-items: center; font-size: calc(var(--w) * .2); line-height: 1; }
.pcard .pips .p { position: absolute; transform: translate(-50%, -50%); }
.pcard .pips .p.flip { transform: translate(-50%, -50%) rotate(180deg); }
.pcard .face { position: absolute; inset: 18% 18%; border: 1.5px solid currentColor; border-radius: 6px; display: grid; place-items: center; opacity: .9; background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(0,0,0,.035) 6px 7px); }
.pcard .face b { font-size: calc(var(--w) * .36); font-weight: 600; letter-spacing: .02em; }
.pcard .face i { position: absolute; font-style: normal; font-size: calc(var(--w) * .16); }
.pcard .face i.t { top: 6%; left: 10%; } .pcard .face i.b { bottom: 6%; right: 10%; transform: rotate(180deg); }
.pcard .ace { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--w) * .52); }
.pcard.back { background: radial-gradient(circle at 50% 40%, #1C5A40, #0E2E21); box-shadow: 0 6px 16px rgba(0,0,0,.5), inset 0 0 0 calc(var(--w) * .05) #F1EFE8, inset 0 0 0 calc(var(--w) * .065) var(--gold); }
.pcard.back::after { content: '\2660'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--gold); font-family: var(--serif); font-size: calc(var(--w) * .3); opacity: .85; background: repeating-linear-gradient(45deg, transparent 0 5px, rgba(212,175,55,.08) 5px 6px); border-radius: inherit; }
.pcard.sm { --w: calc(52px * var(--card-scale)); } .pcard.lg { --w: calc(118px * var(--card-scale)); } .pcard.xl { --w: calc(150px * var(--card-scale)); }
@keyframes deal { from { transform: translate(40px, -60px) rotate(8deg); opacity: 0; } }
.pcard.no-anim { animation: none; }

/* ---------- blackjack table ---------- */
.table-felt { position: relative; border-radius: 26px 26px 140px 140px / 26px 26px 90px 90px; background: radial-gradient(ellipse at 50% 20%, #17543B 0%, #0F3A29 55%, #0A2A1E 100%); border: 10px solid #2B1F12; box-shadow: inset 0 0 0 2px rgba(212,175,55,.4), inset 0 0 80px rgba(0,0,0,.5), var(--shadow); padding: 26px clamp(12px, 3vw, 40px) 40px; min-height: 470px; overflow: hidden; }
.table-felt { display: flex; flex-direction: column; }
.table-felt > * { order: 2; } .table-felt > .zone:first-child { order: 0; }
.table-felt::before { order: 1; content: 'BLACKJACK PAYS ' attr(data-payout) ' · ' attr(data-rule); align-self: center; margin: 16px 0 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-family: var(--serif); letter-spacing: .3em; color: rgba(212,175,55,.35); font-size: .78rem; white-space: nowrap; border-top: 1px solid rgba(212,175,55,.25); border-bottom: 1px solid rgba(212,175,55,.25); padding: 6px 18px; pointer-events: none; }
.zone { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.zone .label { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(245,245,240,.6); }
.total-pill { background: rgba(0,0,0,.45); border: 1px solid rgba(212,175,55,.35); color: var(--ink); border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: .85rem; min-width: 46px; text-align: center; }
.hands-row { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; margin-top: 18px !important; }
.hand-box { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; border-radius: 14px; border: 1px dashed transparent; transition: border-color .2s; }
.hand-box.active { border-color: rgba(212,175,55,.6); background: rgba(212,175,55,.05); }
.hand-box .outcome { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.chips-stack { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--gold-2); font-size: .9rem; }
.chip-coin { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle, #E6C766 0 38%, #8A6D1D 40% 46%, #E6C766 48% 60%, #8A6D1D 62%); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.action-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.action-bar .btn { min-width: 108px; }
.action-bar .btn kbd { font-family: var(--mono); font-size: .72rem; opacity: .6; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }
.feedback { border-radius: 12px; padding: 12px 16px; margin-top: 14px; font-size: .92rem; border: 1px solid var(--line-2); background: var(--bg-3); }
.feedback.good { border-color: rgba(95,191,127,.4); background: rgba(95,191,127,.08); }
.feedback.bad { border-color: rgba(224,112,101,.4); background: rgba(224,112,101,.07); }
.math-hud { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.math-hud .stat .v { font-size: 1.4rem; }

/* ---------- trainers ---------- */
.trainer-stage { min-height: 320px; display: grid; place-items: center; text-align: center; padding: 26px; border-radius: var(--radius); background: radial-gradient(ellipse at center, #133826, #0B1F16); border: 1px solid rgba(212,175,55,.18); }
.big-num { font-family: var(--serif); font-size: 3.2rem; line-height: 1; }
.answer-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 360px; margin: 0 auto; }
.answer-pad .btn { padding: 16px; font-size: 1.15rem; }
.discard-tray { width: 120px; height: 220px; border: 2px solid rgba(212,175,55,.4); border-radius: 8px 8px 14px 14px; position: relative; background: rgba(0,0,0,.3); margin: 0 auto; }
.discard-tray .stackfill { position: absolute; left: 6px; right: 6px; bottom: 6px; background: repeating-linear-gradient(0deg, #EDEAE0 0 2px, #CFCABB 2px 3px); border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.discard-tray .tick { position: absolute; right: -34px; font-size: .7rem; color: var(--muted); transform: translateY(50%); }
.cat-bins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bin { border: 2px dashed var(--line-2); border-radius: 14px; padding: 14px; min-height: 140px; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; justify-content: center; transition: border-color .15s, background .15s; }
.bin.over { border-color: var(--gold); background: var(--gold-dim); }
.bin h5 { width: 100%; margin: 0 0 6px; text-align: center; font-size: .95rem; }

/* ---------- strategy chart ---------- */
.strat-table { border-collapse: separate; border-spacing: 2px; font-family: var(--mono); font-size: .78rem; }
.strat-table th, .strat-table td { padding: 5px 0; text-align: center; min-width: 34px; border: 0; border-radius: 4px; }
.strat-table th { background: none; color: var(--muted); }
.strat-table td.H { background: #3A3F3C; color: #E6E6E1; } .strat-table td.S { background: #6B2B2B; color: #FBE9E7; }
.strat-table td.D, .strat-table td.Ds { background: #2F5D3A; color: #E8F6EC; } .strat-table td.P { background: #2B4A7A; color: #E7EEFB; }
.strat-table td.Rh, .strat-table td.Rs, .strat-table td.Rp { background: #6A5418; color: #FFF6D6; }
.strat-table td.hl { outline: 2px solid var(--gold); }

/* ---------- lesson ---------- */
.lesson-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 34px; }
.lesson-toc { position: sticky; top: 80px; align-self: start; font-size: .86rem; }
.lesson-toc a { display: block; color: var(--muted); padding: 5px 10px; border-left: 2px solid var(--line); }
.lesson-toc a.on { color: var(--gold-2); border-color: var(--gold); }
.lesson-section { margin-bottom: 34px; scroll-margin-top: 90px; }
.widget { background: var(--bg-2); border: 1px solid rgba(212,175,55,.22); border-radius: var(--radius); padding: 20px; margin: 8px 0 30px; }
.widget > .w-title { display: flex; align-items: center; gap: 8px; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; font-weight: 700; }
.example { border-left: 3px solid var(--c3); background: rgba(106,133,240,.06); padding: 14px 18px; border-radius: 0 12px 12px 0; margin-bottom: 30px; }
.myth { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.myth > div { padding: 12px 14px; border-radius: 10px; font-size: .92rem; }
.myth .m { background: rgba(224,112,101,.07); border: 1px solid rgba(224,112,101,.25); } .myth .t { background: rgba(95,191,127,.07); border: 1px solid rgba(95,191,127,.25); }
.objectives li::marker { color: var(--gold); }
.module-card { display: flex; flex-direction: column; gap: 10px; }
.module-num { font-family: var(--serif); color: var(--gold); font-size: .85rem; letter-spacing: .1em; }
.lesson-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); }
.lesson-row:hover { background: var(--bg-3); text-decoration: none; color: var(--ink); }
.lesson-row .st { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; font-size: .7rem; flex: none; }
.lesson-row .st.done { background: var(--gold); border-color: var(--gold); color: #000; }
.lesson-row .st.started { border-color: var(--gold); }

/* ---------- charts ---------- */
.chart { width: 100%; position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: rgba(245,245,240,.07); }
.chart .axis text { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart .axis line, .chart .axis path { stroke: rgba(245,245,240,.18); }
.chart .tip { position: absolute; pointer-events: none; background: #1B2820; border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 10px; font-size: .8rem; box-shadow: var(--shadow); white-space: nowrap; z-index: 5; transform: translate(-50%, calc(-100% - 10px)); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--ink-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.bar-list .b { display: grid; grid-template-columns: 150px 1fr 54px; align-items: center; gap: 10px; font-size: .86rem; margin: 7px 0; }
.bar-list .track { height: 10px; background: var(--bg-3); border-radius: 0 4px 4px 0; }
.bar-list .fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--c1); }

/* ---------- landing ---------- */
.hero { position: relative; padding: clamp(50px, 9vw, 110px) clamp(16px, 5vw, 64px) 70px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: center; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 80% 30%, rgba(18,61,43,.65), transparent 70%), radial-gradient(ellipse 40% 40% at 10% 90%, rgba(212,175,55,.07), transparent 70%); pointer-events: none; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .sub { font-size: 1.12rem; color: var(--ink-2); max-width: 560px; margin-bottom: 30px; }
.hero > * { position: relative; }
.section { padding: 70px clamp(16px, 5vw, 64px); }
.section.alt { background: linear-gradient(180deg, #0B110E, #0D1511); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 700px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.feature .ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--gold-dim); color: var(--gold); margin-bottom: 14px; font-size: 1.15rem; }
.steps { counter-reset: s; }
.steps .panel { position: relative; padding-top: 44px; }
.steps .panel::before { counter-increment: s; content: '0' counter(s); position: absolute; top: 16px; left: 22px; font-family: var(--serif); color: var(--gold); font-size: 1.05rem; letter-spacing: .1em; }
.price-card { display: flex; flex-direction: column; gap: 14px; }
.price-card .price { font-family: var(--serif); font-size: 2.4rem; }
.price-card .price small { font-family: var(--sans); font-size: .9rem; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; color: var(--ink-2); flex: 1; }
.price-card li::before { content: '✓'; color: var(--gold); margin-right: 8px; }
.price-card.featured { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 20px 60px rgba(212,175,55,.08); }
.disclaimer { border: 1px solid rgba(212,175,55,.25); background: rgba(212,175,55,.05); border-radius: 12px; padding: 16px 20px; font-size: .9rem; color: var(--ink-2); }
.cta-band { text-align: center; padding: 70px 20px; background: radial-gradient(ellipse at center, rgba(18,61,43,.8), transparent 70%); }

/* certificate */
.cert { aspect-ratio: 1.414; background: radial-gradient(ellipse at center, #F8F5EA, #EDE6CF); color: #1B1B16; border-radius: 6px; padding: 5%; position: relative; box-shadow: var(--shadow); font-family: var(--serif); text-align: center; display: flex; flex-direction: column; justify-content: center; }
.cert::before { content: ''; position: absolute; inset: 2.2%; border: 2px solid #A88A2A; outline: 1px solid #A88A2A; outline-offset: 5px; pointer-events: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lesson-layout { grid-template-columns: minmax(0, 1fr); } .lesson-toc { display: none; } .hero { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .btn.menu-btn { display: inline-flex; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; }
  .topbar { padding: 10px 14px; }
  .pub-head nav { display: none; } .pub-head nav.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--bg-2); padding: 16px 20px; border-bottom: 1px solid var(--line); }
  .pub-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .myth { grid-template-columns: minmax(0, 1fr); }
  .bar-list .b { grid-template-columns: 100px 1fr 44px; }
  .table-felt { padding: 18px 8px 30px; min-height: 420px; border-width: 6px; }
  .hands-row { gap: 10px; }
  .table-felt::before { font-size: .6rem; letter-spacing: .15em; padding: 4px 8px; }

  .cat-bins { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 861px) { .pub-head .btn.menu-btn { display: none; } }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; display: none; }
.scrim.on { display: block; }
@media print { .sidebar, .topbar, .no-print, .demo-banner { display: none !important; } .shell { display: block; } body { background: #fff; } .cert { box-shadow: none; } }

.option:has(input:checked) { border-color: var(--gold); background: var(--gold-dim); }
kbd { font-family: var(--mono); font-size: .72rem; opacity: .65; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }
.ssr { max-width: 820px; margin: 40px auto; padding: 0 20px; }

.pub-head .btn-row { flex-wrap: nowrap; }
.content.narrow-pub { max-width: 860px; }
@media (max-width: 560px) { .g4 { grid-template-columns: minmax(0, 1fr); } .pub-head { gap: 10px; } .pub-head .btn.ghost.sm:not(.menu-btn) { display: none; } .brand { font-size: 1.15rem; } .page-head { margin-bottom: 18px; } .pub-foot { grid-template-columns: minmax(0, 1fr); } .panel { padding: 16px; } .action-bar .btn { min-width: 0; flex: 1; } }
.mobile-only { display: none; }
@media (max-width: 560px) { .pub-head nav.open .mobile-only { display: block; } }

/* ===== COUNT21 Live Training ===== */
.live-levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.live-level { text-align: left; cursor: pointer; color: inherit; font: inherit; display: flex; flex-direction: column; gap: 6px; transition: border-color .2s, transform .2s; }
.live-level:hover:not(.locked) { border-color: rgba(212,175,55,.55); transform: translateY(-2px); }
.live-level.locked { opacity: .55; cursor: not-allowed; }
.live-level.passed { border-color: rgba(0,163,143,.5); }
.live-level.focus { box-shadow: 0 0 0 2px var(--gold); }
.live-level h4 { margin: 4px 0 0; }
.lvl-n { font-family: var(--serif); font-size: 1.5rem; color: var(--gold); line-height: 1; }
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
/* Grid/flex children default to min-width:auto, which lets the ever-growing round history widen the table. */
.live-main, .live-side, .live-grid > * { min-width: 0; }
.round-strip { max-width: 100%; }
.live-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 14px; }
.live-felt { min-height: 520px; }
.live-top { display: grid !important; grid-template-columns: 120px 1fr 120px; align-items: start; gap: 10px; }
.dealer-zone { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.shoe-box, .tray-box { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tray-box .discard-tray { transform: scale(.55); transform-origin: top center; margin-bottom: -96px; }
.shoe { position: relative; width: 104px; height: 40px; border-radius: 6px 18px 6px 6px; background: #1b130b; border: 2px solid #3b2a17; overflow: hidden; box-shadow: inset 0 0 10px rgba(0,0,0,.6); }
.shoe-fill { position: absolute; right: 0; top: 4px; bottom: 4px; background: repeating-linear-gradient(90deg, #F1EFE8 0 2px, #d9d5c9 2px 3px); border-radius: 2px; transition: width .4s; }
.shoe .cut { position: absolute; top: 0; bottom: 0; width: 3px; background: #E2B33C; opacity: .85; }
.seats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: auto; padding-top: 18px; }
.seat.other { opacity: .88; transform: scale(.86); }
.seat.other .label, .seat.you .label { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.speed-ctl { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 6px; }
.speed-ctl .small { min-width: 66px; text-align: center; }
.live-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.live-stats .stat .v { font-size: 1.15rem; }
.feedback-panel .feedback-note { border-left: 2px solid var(--gold); padding: 6px 10px; margin: 8px 0; background: rgba(212,175,55,.05); border-radius: 0 8px 8px 0; }
.feedback-panel h5 { margin: 12px 0 4px; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.round-strip { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 2px; }
.round-chip { flex: none; font-size: .78rem; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); white-space: nowrap; }
.round-chip.ok { border-color: rgba(0,163,143,.5); } .round-chip.bad { border-color: rgba(208,101,74,.6); }
.bet-panel { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.chip-row { justify-content: center; }
.chip-btn { min-width: 0 !important; border-radius: 999px; padding: 8px 12px; }
.chip-btn.on { background: radial-gradient(circle, #E6C766 0 55%, #8A6D1D 57%); color: #1a1a1a; border-color: #8A6D1D; font-weight: 700; }
.checkpoint { margin-top: 14px; border-color: rgba(212,175,55,.5); }
.cp-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.review-cards { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.review-cards .rv { display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 700; font-size: .8rem; }
.mistake-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 10px; }
.v.small-v { font-size: 1.05rem; }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gold-row td { background: rgba(212,175,55,.07); }
.btn.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,.5); } 50% { box-shadow: 0 0 0 8px rgba(212,175,55,0); } }
.live-cta { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; background: linear-gradient(120deg, rgba(23,84,59,.55), rgba(10,42,30,.4)); border-color: rgba(212,175,55,.45); }
.lesson-live { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
@media (max-width: 1180px) { .live-levels { grid-template-columns: repeat(3, minmax(0, 1fr)); } .live-grid { grid-template-columns: minmax(0, 1fr); } .live-side { position: static; } .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .live-levels { grid-template-columns: repeat(2, minmax(0, 1fr)); } .live-top { grid-template-columns: 70px 1fr 70px; } .shoe { width: 64px; } .tray-box .discard-tray { transform: scale(.38); margin-bottom: -124px; } .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .live-cta { grid-template-columns: minmax(0, 1fr); } .seat.other { transform: scale(.75); } }
@media (prefers-reduced-motion: reduce) { .btn.pulse { animation: none; } }
@media (max-width: 640px) { .tray-box { width: 70px; overflow: hidden; } .tray-box .discard-tray { margin-left: -20px; } }

/* ===== Live Training: training styles, chip betting, guided count ===== */
.style-choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.style-card { text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: inherit; font: inherit; cursor: pointer; transition: border-color .2s, background .2s; }
.style-card:hover { border-color: rgba(212,175,55,.45); }
.style-card.on { border-color: var(--gold); background: rgba(212,175,55,.07); box-shadow: inset 0 0 0 1px rgba(212,175,55,.35); }
.style-card .radio-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.style-card.on .radio-dot { border-color: var(--gold); background: radial-gradient(circle, var(--gold) 0 45%, transparent 50%); }
.modal .style-choice { grid-template-columns: minmax(0, 1fr); }
.style-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: .72rem; letter-spacing: .04em; color: var(--ink2, inherit); text-transform: none; }
.style-tag.guided { border-color: rgba(212,175,55,.6); color: var(--gold); }
.bet-panel { gap: 12px; }
.bet-top { display: grid; grid-template-columns: repeat(3, auto); gap: 22px; align-items: end; justify-content: center; text-align: center; }
.bet-top .l { display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bet-top strong { font-size: 1.15rem; }
.bet-now strong { font-size: 1.5rem; color: var(--gold); font-family: var(--serif); display: block; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.pchip { --chip: #8b1e1e; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .6rem; font-weight: 800; color: #fff; background: radial-gradient(circle, var(--chip) 0 52%, transparent 53%), repeating-conic-gradient(var(--chip) 0 30deg, #f4efe2 30deg 45deg); border: 2px solid rgba(0,0,0,.35); box-shadow: 0 2px 4px rgba(0,0,0,.45); font-family: inherit; }
.pchip.c5 { --chip: #b3261e; } .pchip.c10 { --chip: #1f4fa8; } .pchip.c25 { --chip: #16794a; } .pchip.c50 { --chip: #c2601a; } .pchip.c100 { --chip: #1b1b1b; }
.pchip.c100 { color: var(--gold); }
.pchip.big { width: 54px; height: 54px; font-size: .92rem; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.pchip.big:hover:not([disabled]) { transform: translateY(-3px); }
.pchip.big.sel { box-shadow: 0 0 0 3px var(--gold), 0 4px 10px rgba(0,0,0,.5); }
.pchip.big[disabled] { opacity: .35; cursor: not-allowed; }
.pchip.big:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.chip-pile { display: inline-flex; align-items: flex-end; margin-right: 6px; vertical-align: middle; }
.chip-pile .pchip { width: 18px; height: 18px; font-size: 0; margin-left: calc(var(--i) * -0px - 9px); border-width: 1px; }
.chip-pile .pchip:first-child { margin-left: 0; }
.bet-spot { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 999px; border: 1px dashed rgba(212,175,55,.5); }
.bet-chip { white-space: nowrap; }
.bet-tools { justify-content: center; }
.bet-msg { min-height: 1.2em; text-align: center; }
.bet-examples { width: 100%; max-width: 640px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.bet-examples summary { cursor: pointer; }
.count-hud { border-color: rgba(212,175,55,.5); }
.hud-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.hud-grid .stat .v { font-size: 1.35rem; }
.feed { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow-y: auto; }
.feed-row { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line); }
[data-refill][disabled] { opacity: .5; }
@media (max-width: 640px) { .style-choice { grid-template-columns: minmax(0, 1fr); } .bet-top { gap: 12px; } .pchip.big { width: 46px; height: 46px; } .bet-tools .btn { padding: 6px 9px; } }

.hud-mini { display: none; }
.bet-tools { flex-wrap: wrap; }
.bet-tools .btn { white-space: nowrap; }
@media (max-width: 1180px) {
  .hud-mini { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 10px; padding: 8px 12px; border: 1px solid rgba(212,175,55,.45); border-radius: 12px; font-size: .85rem; background: rgba(212,175,55,.05); }
  .hud-mini b { color: var(--gold); font-weight: 600; margin-right: 3px; }
}
@media (max-width: 640px) { .action-bar { flex-wrap: wrap; gap: 8px; } .action-bar .btn kbd, .bet-panel kbd { display: none; } .action-bar .btn { flex: 1 1 28%; min-width: 0; padding-inline: 8px; } }
@media (max-width: 640px) { .action-bar .btn { white-space: normal; line-height: 1.2; } }

/* Bottom breathing room so the last controls are never flush with the screen edge. */
.content { padding-bottom: 96px; }
@media (max-width: 860px) { .content { padding-bottom: 32px; } }
@media (max-width: 420px) { .topbar form[data-search] { min-width: 0; flex: 1 1 auto; } }

/* Grid items may shrink below their content width; long words and tables scroll inside their own box instead of widening the page. */
.grid > *, .shell > *, .lesson-layout > * { min-width: 0; }
.lesson-pn .btn { white-space: normal; max-width: 100%; text-align: center; }
/* Account controls (including Sign out) stay visible at the bottom of the sidebar while the navigation scrolls. */
.sidebar .foot { position: sticky; bottom: -22px; background: #090D0B; padding-bottom: 22px; margin-bottom: -22px; z-index: 1; }
@media (max-width: 860px) { .sidebar { height: 100dvh; } }
/* Mobile top bar: keep the page title readable next to the search field. */
@media (max-width: 560px) { .topbar .crumbs { flex: 1 1 40%; } .topbar form[data-search] { max-width: 46% !important; } }
@media (max-width: 560px) { .topbar .crumbs > *:not(:last-child) { display: none; } }
.toast { cursor: pointer; }

/* ---------- support conversations ---------- */
.nav a .nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--gold); color: #14110a; font-size: .72rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nav a .nav-badge[hidden], .menu-dot[hidden] { display: none; }
.menu-btn { position: relative; }
.menu-dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--bg, #0b0f0d); }
.support-row { display: block; color: inherit; text-decoration: none; }
.support-row:hover { border-color: var(--gold); }
.support-row.unread { border-left: 3px solid var(--gold); }
.support-row .dot, .ticket-row .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 8px; vertical-align: middle; }
.support-thread { display: flex; flex-direction: column; gap: 12px; }
.support-msg { max-width: min(680px, 92%); }
.support-msg.mine, .support-msg.staff { align-self: flex-end; text-align: right; }
.support-msg .bubble { margin-top: 4px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2, rgba(255,255,255,.04)); border: 1px solid var(--line, rgba(255,255,255,.08)); text-align: left; overflow-wrap: anywhere; white-space: normal; }
.support-msg.mine .bubble, .support-msg.staff .bubble { background: rgba(212,175,55,.10); border-color: rgba(212,175,55,.35); }
.inbox { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 16px; align-items: start; }
.inbox .ticket-row { display: block; width: 100%; text-align: left; cursor: pointer; }
.inbox .ticket-row.on { border-color: var(--gold); }
.inbox .ticket-row.unread strong { color: var(--gold); }
@media (max-width: 900px) { .inbox { grid-template-columns: 1fr; } }
[data-chips] .chip { white-space: nowrap; }
.chip-n { margin-left: .35em; opacity: .7; font-variant-numeric: tabular-nums; }
