/* The visual kit for drills and lessons (js/ui/kit.js, js/ui/lessonDeck.js), Blue Felt, tokens from styles.css.
   Motion, decided once (docs/superpowers/specs/2026-11-02-visual-drills-lessons-design.md); all of it is
   off under Reduce Motion by the global rule in styles.css, and every piece's resting state is its final state:
     deal    520ms cubic-bezier(.2,.9,.25,1.08)   a card lands (existing token)
     flip    360ms ease-in-out                    back narrows 180ms, face widens 180ms
     slide   420ms cubic-bezier(.16,1,.3,1)       chips from a seat to its bet, and from bets to the pot
     fill    900ms cubic-bezier(.65,0,.35,1)      pie slices, the race bar, player dials
     pop     320ms cubic-bezier(.2,.9,.25,1.2)    bubbles, the correct-answer chip pulse (60ms apart), streak edge
     shake   360ms ease-out, ±6px decaying        a wrong pick
     press   120ms ease-out, scale .97            outs cards, steps, dots
   Nothing here moves while you choose, except what your own finger moves. */

/* ---------- chips ---------- */
.kchips { display: inline-flex; align-items: flex-end; gap: 6px; font-size: 12.5px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kchips b { padding: 1px 8px; border-radius: 999px; background: rgba(7,20,40,0.55); line-height: 18px; }
.kstack { position: relative; width: 22px; display: inline-block; flex: none; }
.kstack i, .kpulse i {
  position: absolute; left: 0; width: 22px; height: 12px; border-radius: 50%;
  background: radial-gradient(ellipse at 40% 35%, #e04456 0%, var(--chip) 60%, #951b2b 100%);
  box-shadow: inset 0 0 0 2px rgba(243,239,228,0.92), inset 0 0 0 3.5px var(--chip), 0 2px 0 #7e1424, 0 3px 4px -1px rgba(0,0,0,0.5);
}
.kstack i::after, .kpulse i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed rgba(243,239,228,0.85); }
.kchips.pot .kstack i { background: radial-gradient(ellipse at 40% 35%, #f6eedb 0%, var(--ivory) 55%, #cfc6b0 100%); box-shadow: inset 0 0 0 2px var(--chip), 0 2px 0 #a99f87, 0 3px 4px -1px rgba(0,0,0,0.5); }
.kchips.pot .kstack i::after { border-color: rgba(200,40,59,0.7); }
.kchips.slide-them { animation: kSlideThem 420ms cubic-bezier(.16,1,.3,1) both; }
.kchips.slide-you { animation: kSlideYou 420ms cubic-bezier(.16,1,.3,1) both; }
@keyframes kSlideThem { from { transform: translateY(-34px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes kSlideYou { from { transform: translateY(34px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.kchips.to-pot { animation: kToPot 420ms cubic-bezier(.16,1,.3,1) both; }
@keyframes kToPot { to { transform: translate(var(--dx, 0), var(--dy, 0)) scale(.8); opacity: 0; } }

/* Correct answer: three chips drop onto a stack, 60ms apart. */
.kpulse { position: relative; display: inline-block; width: 22px; height: 20px; flex: none; vertical-align: middle; }
.kpulse i { animation: kDrop 320ms cubic-bezier(.2,.9,.25,1.2) both; }
.kpulse i:nth-child(1) { bottom: 0; }
.kpulse i:nth-child(2) { bottom: 4px; animation-delay: 60ms; }
.kpulse i:nth-child(3) { bottom: 8px; animation-delay: 120ms; }
@keyframes kDrop { from { transform: translateY(-12px); opacity: 0; } 70% { opacity: 1; } to { transform: none; opacity: 1; } }

/* Wrong answer: a gentle shake. */
.kshake { animation: kShake 360ms ease-out; }
@keyframes kShake { 0%, 100% { translate: 0; } 18% { translate: -6px; } 40% { translate: 5px; } 62% { translate: -3px; } 82% { translate: 1.5px; } }
.kpop { animation: pop 320ms cubic-bezier(.2,.9,.25,1.2) both; }

/* Streak of 3+ right in the round: the run's progress dots get a gold edge. */
.dr-segs span.right.hot { background: var(--gold-hi); box-shadow: 0 0 0 1px rgba(241,226,184,0.9), 0 0 10px rgba(241,226,184,0.5); animation: fade 320ms ease-out both; }
.dr-verdict { display: flex; align-items: center; gap: 10px; }

/* ---------- the mini felt ---------- */
.mf { position: relative; width: 100%; max-width: 540px; aspect-ratio: 16 / 9; margin: 4px auto; --cw: 40px; --hw: 44px; --vw: 26px; }
.mf-rail {
  position: absolute; inset: 10% 2% 10%; border-radius: 999px;
  background: linear-gradient(180deg, #1c3f6e 0%, #102a4f 45%, #0a1b36 100%);
  box-shadow: 0 0 0 1px var(--gold-line), inset 0 2px 0 rgba(255,255,255,0.10), 0 30px 40px -24px rgba(0,0,0,0.85);
}
.mf-felt {
  position: absolute; inset: 9px; border-radius: 999px; overflow: hidden;
  background: radial-gradient(ellipse 60% 65% at 50% 42%, var(--felt-hi) 0%, var(--felt) 45%, #17437c 75%, var(--felt-lo) 100%);
  box-shadow: 0 0 0 1.5px rgba(216,192,138,0.6), inset 0 6px 24px rgba(0,0,0,0.45);
}
.mf-felt::before { content: ''; position: absolute; inset: 14% 9%; border-radius: 999px; border: 1px solid rgba(243,239,228,0.10); }
/* Seats sit on the rail's edge, as at the real table: the opponent at the top, you at the bottom. */
.mf-seat { position: absolute; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; z-index: 2; }
.mf-seat.them { top: 10%; }
.mf-seat.you { top: 90%; }
.mf-plate {
  display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 12px; white-space: nowrap;
  background: linear-gradient(180deg, rgba(14,36,68,0.96), rgba(7,20,40,0.96)); box-shadow: inset 0 1px 0 var(--gold-line), inset 0 0 0 1px rgba(243,239,228,0.06), 0 10px 18px -10px rgba(0,0,0,0.8);
}
.mf-plate.you { padding: 4px; }
.mf-who { display: flex; flex-direction: column; line-height: 1.1; }
.mf-who b { font-size: 12px; font-weight: 700; font-stretch: 85%; letter-spacing: 0.06em; text-transform: uppercase; }
.mf-who small { font-size: 11px; font-weight: 650; }
.mf-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 850; font-size: 11px; letter-spacing: 0.02em; color: var(--night); background: var(--c, #a9b6c9); flex: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25); }
.mf-av.unknown { background: #1d3a64; color: var(--muted); box-shadow: inset 0 0 0 1px rgba(243,239,228,0.18); }
.mf-av.hero { background: var(--foil); color: var(--accent-ink); width: 34px; height: 30px; border-radius: 9px; font-size: 11.5px; }
.mf-av.big { width: 46px; height: 46px; font-size: 15px; }
.mf-hole { display: flex; gap: 3px; }
.mf-hole .card { --w: var(--vw); }
.mf-hole.hero .card { --w: var(--hw); }
.mf-hole.hero .card:first-child { rotate: -4deg; }
.mf-hole.hero .card:last-child { rotate: 4deg; }
.mf-flip { position: relative; display: inline-block; }
.mf-flip .card.out { animation: kFlipOut 180ms ease-in both; }
.mf-flip .card.in { position: absolute; left: 0; top: 0; animation: kFlipIn 180ms ease-out both; }
@keyframes kFlipOut { to { transform: scaleX(0); } }
@keyframes kFlipIn { from { transform: scaleX(0); } to { transform: none; } }
.mf-bubble {
  position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); z-index: 3; white-space: nowrap;
  background: var(--ivory); color: var(--night); font-weight: 750; font-size: 11.5px; padding: 3px 9px; border-radius: 999px; box-shadow: 0 6px 12px -4px rgba(0,0,0,0.6);
}
.mf-bubble.bet, .mf-bubble.raise { background: var(--chip); color: var(--ivory); }
.mf-bubble.check, .mf-bubble.fold, .mf-bubble.post { background: #34465f; color: #d5dde8; }
.mf-mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 1; }
.mf-board { display: flex; gap: 5px; min-height: calc(var(--cw) * 1.4); }
.mf-board .card { --w: var(--cw); }
.mf-pot { display: flex; align-items: flex-end; gap: 7px; padding: 3px 12px 3px 6px; border-radius: 999px; background: rgba(7,20,40,0.55); box-shadow: inset 0 0 0 1px rgba(216,192,138,0.35); font-weight: 750; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mf-bet { position: absolute; z-index: 2; transform: translate(-50%, -50%); }
.mf-bet.them { left: 50%; top: 27%; }
.mf-bet.you { left: 50%; top: 73%; }
/* No board (the pot odds drill): a shorter table, the pot in the middle. */
.mf.no-board { max-width: 460px; aspect-ratio: 2 / 1; }
.mf.no-board .mf-board { display: none; }
.mf.no-board .mf-bet.them { top: 32%; }
.mf-caption { min-height: 21px; text-align: center; color: var(--muted); font-size: 14px; }
.mf-caption b { color: var(--text); }
.mf-line { display: inline-block; margin: 0; padding-left: 18px; text-align: left; columns: 2; column-gap: 32px; color: var(--muted); font-size: 13px; }
@media (max-width: 700px) { .mf-line { columns: 1; } }
.mf-tools { display: flex; justify-content: center; gap: 8px; }

/* ---------- the pot pie ---------- */
.pie { position: relative; width: 190px; aspect-ratio: 1; flex: none; touch-action: none; border-radius: 50%; }
.pie.live { cursor: grab; }
.pie.live.dragging { cursor: grabbing; }
.pie-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.pie-base { fill: rgba(7,20,40,0.6); stroke: var(--gold-line); stroke-width: 1; }
.pie.live .pie-base { fill: rgba(243,239,228,0.05); stroke: rgba(216,192,138,0.7); stroke-dasharray: 2 2.5; }
.pie-seg { transition: stroke-dasharray 900ms cubic-bezier(.65,0,.35,1), transform 900ms cubic-bezier(.65,0,.35,1); }
.pie-seg.pot { opacity: 0.95; }
.pie-guess { fill: rgba(243,239,228,0.16); stroke: var(--ivory); stroke-width: 1.2; stroke-dasharray: 3 2.2; stroke-linejoin: round; }
.pie-knob { fill: var(--ivory); stroke: var(--gold); stroke-width: 1.6; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.6)); }
.pie-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; line-height: 1.05; }
.pie-center b { font-size: 30px; font-weight: 850; font-stretch: 125%; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; text-shadow: 0 2px 10px rgba(0,0,0,0.75); }
.pie-center small { font-size: 12.5px; color: var(--text); font-weight: 650; text-shadow: 0 1px 6px rgba(0,0,0,0.9); }
.pie:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.pie-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.pie-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* The pot odds drill's answer surface: the pie, its words, the steps. */
.ptag { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 22px; align-items: center; }
.ptag-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ptag-ask { font-size: 15px; color: var(--muted); }
.ptag-ask b { color: var(--text); }
.ptag-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.ptag-steps .dr-opt { min-height: 48px; padding: 8px 34px 8px 40px; font-size: 16px; flex: 1 1 88px; }
.ptag-steps .dr-key { left: 11px; }
.ptag-steps .dr-mark { right: 8px; }
.ptag-lock { align-self: flex-start; }
.ptag-result { font-size: 15px; }
.ptag-result b { color: var(--gold); }

/* ---------- the race bar ---------- */
.race { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.race-top { position: relative; height: 18px; }
.race-top span { position: absolute; left: var(--need); transform: translateX(-50%); font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--ivory); }
.race-track { position: relative; height: 14px; border-radius: 999px; background: rgba(243,239,228,0.08); box-shadow: inset 0 0 0 1px var(--line); }
.race-fill { position: absolute; inset: 0; border-radius: 999px; transform-origin: left center; transform: scaleX(var(--to)); animation: kFill 900ms cubic-bezier(.65,0,.35,1) both; }
.race.over .race-fill { background: linear-gradient(90deg, rgba(91,224,165,0.55), var(--good)); }
.race.under .race-fill { background: linear-gradient(90deg, rgba(242,115,122,0.55), var(--bad)); }
@keyframes kFill { from { transform: scaleX(0); } }
.race-need { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--ivory); box-shadow: 0 0 0 1.5px rgba(7,20,40,0.85); animation: pop 320ms cubic-bezier(.2,.9,.25,1.2) both; }
.race-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.race.over .race-foot b { color: var(--good); }
.race.under .race-foot b { color: var(--bad); }

/* ---------- the player card ---------- */
.pcard { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(7,20,40,0.5); box-shadow: inset 0 0 0 1px var(--line), inset 3px 0 0 var(--c); }
.pcard-head { display: flex; align-items: center; gap: 12px; }
.pcard-head b { display: block; font-size: 17px; font-stretch: 112%; color: var(--c); }
.pcard-head small { color: var(--muted); font-size: 12.5px; }
.pcard-answer { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 10px; background: rgba(243,239,228,0.05); font-size: 13.5px; color: var(--muted); }
.pcard-answer b { font-size: 15px; color: var(--text); }
.pcard-answer.good b { color: var(--good); }
.pcard-answer.bad b { color: var(--bad); }
.pcard-dials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pdial { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.pdial-arc { width: 100%; max-width: 92px; }
.pdial-arc svg { display: block; width: 100%; }
.pdial-arc .bg { fill: none; stroke: rgba(243,239,228,0.10); stroke-width: 9; stroke-linecap: round; }
.pdial-arc .v { fill: none; stroke: var(--c); stroke-width: 9; stroke-linecap: round; animation: kDial 900ms cubic-bezier(.65,0,.35,1) both; }
@keyframes kDial { from { stroke-dashoffset: 125.66; } }
.pdial b { font-size: 17px; font-weight: 850; font-stretch: 112%; font-variant-numeric: tabular-nums; margin-top: -10px; }
.pdial small { font-size: 11.5px; color: var(--muted); }
.pcard-habits { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text); display: grid; gap: 3px; }

/* ---------- the tap-the-outs deck ---------- */
.odeck-wrap { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.odeck { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 4px; }
.ocell {
  position: relative; aspect-ratio: 5 / 7; border: 0; border-radius: 6px; padding: 0; background: #fff; color: var(--spade);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; gap: 1px;
  box-shadow: inset 0 0 0 1px rgba(7,20,40,0.08), 0 3px 6px -3px rgba(0,0,0,0.6);
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, opacity 120ms ease-out;
}
.ocell .r { font-weight: 800; font-size: clamp(10px, 2.2vw, 15px); letter-spacing: -0.04em; }
.ocell .s { font-size: clamp(10px, 2.2vw, 15px); }
.ocell.s-h { color: var(--heart); }
.ocell.s-d { color: var(--diamond); }
.ocell.s-c { color: var(--club); }
.ocell:hover:not(:disabled) { box-shadow: inset 0 0 0 2px rgba(216,192,138,0.8), 0 3px 6px -3px rgba(0,0,0,0.6); }
.ocell:active:not(:disabled) { transform: scale(.97); }
.ocell.inplay { background: rgba(243,239,228,0.06); color: rgba(243,239,228,0.32); box-shadow: inset 0 0 0 1px rgba(243,239,228,0.14); cursor: default; }
.ocell:disabled { cursor: default; }
.ocell.on { transform: translateY(-3px); box-shadow: inset 0 0 0 2.5px var(--gold), 0 0 0 2px rgba(216,192,138,0.35), 0 8px 12px -6px rgba(0,0,0,0.7); background: #fffaf0; }
.odeck:not(.tap) .ocell:not(.inplay):not(.lit) { opacity: 0.38; }
.ocell.lit { box-shadow: inset 0 0 0 2.5px var(--gold), 0 0 0 2px rgba(216,192,138,0.35); animation: kLit 320ms cubic-bezier(.2,.9,.25,1.2) both; }
@keyframes kLit { from { transform: scale(.8); opacity: .3; } to { transform: none; opacity: 1; } }
.ocell.hit { box-shadow: inset 0 0 0 2.5px var(--good), 0 0 0 2px rgba(91,224,165,0.4); transform: none; }
.ocell.missed { box-shadow: none; outline: 2.5px dashed var(--gold); outline-offset: -1px; }
.ocell.extra { box-shadow: inset 0 0 0 2.5px var(--bad-mark); transform: none; }
.ocell.extra::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(to top right, transparent calc(50% - 1px), var(--bad-mark) calc(50% - 1px), var(--bad-mark) calc(50% + 1px), transparent calc(50% + 1px)); }
.ocell.dirty::before { content: ''; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 1px #fff; }
.odeck.tap .ocell:not(.inplay):not(.on):not(.hit):not(.missed):not(.extra) { opacity: 0.92; }
.odeck .ocell:disabled:not(.inplay):not(.hit):not(.missed):not(.extra):not(.lit):not(.on) { opacity: 0.22; }
.obar { display: flex; flex-direction: column; gap: 6px; }
.obar-track { height: 8px; border-radius: 999px; background: rgba(243,239,228,0.08); overflow: hidden; }
.obar-track span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--foil); transition: width 180ms ease-out; }
.obar-text { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.obar-text b { color: var(--text); }
.olegend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--muted); }
.olegend i { display: inline-block; width: 12px; height: 15px; border-radius: 3px; margin-right: 6px; vertical-align: -3px; background: #fff; }
.olegend i.hit { box-shadow: inset 0 0 0 2px var(--good); }
.olegend i.missed { outline: 2px dashed var(--gold); outline-offset: -1px; }
.olegend i.extra { box-shadow: inset 0 0 0 2px var(--bad-mark); opacity: 0.7; }
.olegend i.dirty { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); vertical-align: 0; }
.outs-sum { font-size: 15px; }
.outs-sum .cards { vertical-align: middle; }

/* ---------- lessons as cards (lessonDeck.js) ---------- */
.lesson-tag { margin-left: 8px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 700; color: var(--gold); background: rgba(216,192,138,0.12); vertical-align: 1px; }
.ldeck { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ldeck h2 { margin: 0; }
.lcard-n { font-size: 12px; font-weight: 700; color: var(--gold); letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.ldeck-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 16px; outline-offset: 4px; }
.ldeck-track::-webkit-scrollbar { display: none; }
.lcard { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; min-width: 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; border-radius: 16px; background: rgba(7,20,40,0.45); box-shadow: inset 0 0 0 1px var(--line); }
.lcard + .lcard { margin-left: 14px; }
.lcard h3 { margin: 0; color: var(--text); font-size: 20px; font-stretch: 112%; letter-spacing: -0.01em; line-height: 1.2; }
.lcard-text { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--muted); max-width: 62ch; }
.lcard-text b { color: var(--text); }
.lvis { margin-top: 6px; }
.ldeck-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ldeck-nav .btn { min-width: 112px; min-height: 44px; }
.ldots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.ldot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(243,239,228,0.18); transition: background-color 180ms ease-out, transform 120ms ease-out; position: relative; }
.ldot::after { content: ''; position: absolute; inset: -10px; }
.ldot.on { background: var(--gold); transform: scale(1.2); }
.lfull { border-top: 1px solid var(--line); padding-top: 14px; }
.tappable { cursor: pointer; }

/* Tap-to-step controls under a visual. */
.lstep { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.lstep-dots { display: flex; gap: 6px; }
.lstep-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(243,239,228,0.2); position: relative; }
.lstep-dot::after { content: ''; position: absolute; inset: -12px -5px; }
.lstep-dot.on { background: var(--ivory); }

/* Seats: seven opponents around a felt, the big-hand odds over them. */
.lseats { display: flex; flex-direction: column; gap: 12px; }
.lseats-read { display: flex; align-items: center; gap: 14px; }
.lseats-big { font-size: 46px; font-weight: 850; font-stretch: 125%; letter-spacing: -0.04em; color: var(--gold); font-variant-numeric: tabular-nums; flex: none; line-height: 1; }
.lseats-read span { font-size: 15px; color: var(--muted); max-width: 30ch; }
.lseats-read span b { color: var(--text); }
.lseats-table { position: relative; width: 100%; max-width: 560px; aspect-ratio: 16 / 9; margin: 0 auto; }
.lseats-table .mf-rail { inset: 12% 6% 12%; }
.lseat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; z-index: 2; }
.lseat .card.xs { --w: 30px; }
.lseat-cards { display: flex; gap: 2px; padding: 3px; border-radius: 7px; transition: box-shadow 180ms ease-out; }
.lseat.big .lseat-cards { box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(216,192,138,0.55); background: rgba(216,192,138,0.18); }
.lseat-tag { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--foil); color: var(--accent-ink); white-space: nowrap; }
.lseat-tag.you { background: rgba(7,20,40,0.75); color: var(--muted); }
.lseat-empty { display: grid; place-items: center; width: 44px; height: 34px; border-radius: 8px; border: 1px dashed rgba(243,239,228,0.22); font-size: 10.5px; color: var(--dim); background: rgba(7,20,40,0.35); }
.lseats-ctl { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lseats-ctl label { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; font-weight: 650; }
.lseats-ctl label span { white-space: nowrap; }
.lseats-ctl label b { color: var(--gold); font-variant-numeric: tabular-nums; }
.lseats-ctl input[type=range] { flex: 1; accent-color: var(--gold); min-height: 32px; }
.lseats-tally { font-size: 14px; }
.k-gold { color: var(--gold); }
.k-good { color: var(--good); }
.k-bad { color: var(--bad); }

.lfelt { display: flex; flex-direction: column; gap: 4px; }
.lpie { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.lpie-side { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 200px; }
.lpie-caption, .lrace-caption { font-size: 16px; font-weight: 650; }
.lrace { display: flex; flex-direction: column; gap: 8px; }

/* Player types: a row of avatars, the chosen one's card below. */
.ltypes { display: flex; flex-direction: column; gap: 12px; }
.ltype-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ltype { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 5px 14px 5px 6px; border: 0; border-radius: 999px; background: rgba(7,20,40,0.5); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); font-weight: 650; transition: box-shadow 160ms ease-out, color 160ms ease-out, transform 120ms ease-out; }
.ltype:active { transform: scale(.97); }
.ltype.on { color: var(--text); box-shadow: inset 0 0 0 2px var(--gold); background: rgba(216,192,138,0.08); }
.ltype .mf-av { width: 32px; height: 32px; }
.ltype.plain { padding: 5px 14px; }
.ltype.plain b { color: var(--gold); font-size: 16px; font-variant-numeric: tabular-nums; }

/* The deck inside a lesson. */
.ldeck-vis { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.ldeck-vis .odeck-wrap { width: 100%; }
.ldeck-vis .q-visual .card { --w: 44px; }
.ldeck-label { font-size: 15px; }
.ldeck-result { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }

/* Rule of 2 and 4 against exact. */
.lodds { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.lodds-row { display: flex; flex-direction: column; gap: 6px; }
.lodds-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.lodds-head > b { color: var(--text); }
.lodds-bars { display: flex; flex-direction: column; gap: 4px; }
.lodds-bars span { display: block; height: 9px; border-radius: 999px; transform-origin: left center; transform: scaleX(var(--to)); animation: kFill 900ms cubic-bezier(.65,0,.35,1) both; }
.lodds-bars .lo-rule { background: var(--foil); }
.lodds-bars .lo-exact { background: var(--info); }
.lodds-key { display: flex; gap: 16px; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.lodds-key i { display: inline-block; width: 14px; height: 8px; border-radius: 4px; margin-right: 6px; }
.lodds-key i.lo-rule { background: var(--foil); }
.lodds-key i.lo-exact { background: var(--info); }

/* The 100-times test. */
.lhundred { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.lhundred-grid { display: grid; grid-template-columns: repeat(10, 14px); gap: 5px; }
.lhundred-grid span { width: 14px; height: 14px; border-radius: 50%; background: rgba(243,239,228,0.12); }
.lhundred-grid span.win { background: var(--good); animation: kDot 320ms cubic-bezier(.2,.9,.25,1.2) both; }
.lhundred-grid span.loss { background: var(--bad-mark); animation: kDot 320ms cubic-bezier(.2,.9,.25,1.2) both; }
@keyframes kDot { from { transform: scale(.3); opacity: .2; } }
.lhundred-side { display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 200px; align-items: flex-start; font-size: 15px; }

/* The plan. */
.lplan { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.lplan-list { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 240px; }
.lplan-line { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; border: 0; border-radius: 12px; text-align: left; background: rgba(7,20,40,0.5); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); font-size: 15px; font-weight: 600; transition: box-shadow 160ms ease-out, transform 120ms ease-out; }
.lplan-line:active { transform: scale(.98); }
.lplan-line.on { box-shadow: inset 0 0 0 2px var(--gold); background: rgba(216,192,138,0.08); }
.lplan-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 800; color: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold-line); }
.lplan-line.on .lplan-n { background: var(--gold); color: var(--accent-ink); }
.lplan-side { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 90px; }
.lplan-stack .kstack { transform: scale(1.6); transform-origin: bottom center; }

/* The check. */
.lcheck { gap: 16px; }
.lcheck-q { display: flex; flex-direction: column; gap: 8px; }
.lcheck-text { display: flex; gap: 10px; font-size: 16px; font-weight: 650; line-height: 1.4; }
.lcheck-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 800; color: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold-line); margin-top: 1px; }
.lcheck-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lcheck-opts.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lcheck-opts.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lcheck-opts .dr-opt { min-height: 48px; padding: 8px 12px; font-size: 15px; text-align: center; }
.lcheck-why { font-size: 14px; color: var(--muted); }
.lcheck-score { font-size: 15px; }

/* ---------- small screens ---------- */
/* One column of lessons: the list becomes a row of chips that scrolls sideways, not a sticky column
   that floats over the lesson (it had no background) and pushes the cards below the fold. */
@media (max-width: 860px) {
  .lesson-list { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .lesson-list::-webkit-scrollbar { display: none; }
  .lesson-list button { flex: none; white-space: nowrap; padding: 8px 12px; box-shadow: inset 0 0 0 1px var(--line); border-radius: 999px; }
  .lesson-list button.active { box-shadow: inset 0 0 0 1.5px var(--gold); }
}
@media (max-width: 700px) {
  .mf { aspect-ratio: 4 / 3; --cw: 32px; --hw: 38px; --vw: 22px; }
  .mf.no-board { aspect-ratio: 16 / 10; }
  .mf-rail { inset: 10% 1% 10%; }
  .mf-who b { font-size: 11px; }
  .ptag { grid-template-columns: 1fr; justify-items: center; }
  .ptag-side { width: 100%; }
  .pie { width: 176px; }
  .odeck { gap: 2.5px; }
  .ocell { border-radius: 4px; }
  .dr-card.has-deck { padding-left: 10px; padding-right: 10px; }
  .lcard { padding: 16px 14px 18px; }
  .lcard h3 { font-size: 18px; }
  .lseats-big { font-size: 38px; }
  .lseats-table { aspect-ratio: 4 / 3.2; }
  .lseat .card.xs { --w: 21px; }
  .lseat-empty { width: 36px; height: 28px; }
  .lseats-table .mf-rail { inset: 14% 4% 14%; }
  .lcheck-opts, .lcheck-opts.n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lcheck-opts.n3 .dr-opt:last-child { grid-column: 1 / -1; }
  .ldeck-nav .btn { min-width: 0; padding-left: 16px; padding-right: 16px; }
  .ltype { padding-right: 10px; font-size: 13px; }
}
