:root {
  --bg: #090b10;
  --panel: rgba(21, 24, 31, 0.92);
  --panel-strong: #171b24;
  --line: rgba(255, 255, 255, 0.10);
  --muted: #9aa2ad;
  --text: #f6f7f9;
  --green: #e31837;
  --green-deep: #b5122d;
  --success: #50c58b;
  --amber: #f4c454;
  --red: #f06a78;
  --blue: #5c9dff;
  --radius: 22px;
  --sidebar: 236px;
  color-scheme: dark;
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 12%, rgba(227, 24, 55, 0.10), transparent 30%),
    linear-gradient(145deg, #090b10 0%, #11141c 46%, #090b10 100%);
}

button { font: inherit; }
button:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.ambient {
  position: fixed;
  z-index: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: 0.14;
}
.ambient-a { right: -160px; top: -180px; background: #e31837; }
.ambient-b { left: 12%; bottom: -330px; background: #34202a; }

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  grid-template-rows: 76px minmax(calc(100vh - 76px), auto);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--sidebar) 1fr auto auto;
  align-items: center;
  min-height: 76px;
  padding: 0 30px 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 13, 0.88);
  backdrop-filter: blur(20px);
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0;
  color: var(--text);
  border: 0;
  background: transparent;
  font-family: Manrope, sans-serif;
  font-size: 18px;
  cursor: pointer;
}
.brand strong { color: var(--green); }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(145deg, #f02a48, #bd112f);
  box-shadow: 0 8px 26px rgba(227, 24, 55, 0.22);
  font-size: 21px;
}

.session-strip {
  justify-self: end;
  display: flex;
  gap: 28px;
  align-items: center;
  margin-right: 28px;
}
.account-actions { display: flex; gap: 9px; align-items: center; }
.quota-badge { padding: 7px 10px; color: #ffdbe1; border: 1px solid rgba(227,24,55,.28); border-radius: 999px; background: rgba(227,24,55,.10); font-size: 9px; font-weight: 900; letter-spacing: .06em; white-space: nowrap; }
.account-button { min-height: 38px; padding: 0 13px; color: var(--text); border: 1px solid rgba(227,24,55,.40); border-radius: 11px; background: rgba(227,24,55,.12); font-weight: 800; cursor: pointer; }
.account-button:hover { background: rgba(227,24,55,.24); }
.session-strip > div { display: flex; gap: 7px; align-items: baseline; }
.strip-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.13em; }
.session-strip strong { font-family: Manrope, sans-serif; font-size: 16px; }
.flame { color: var(--amber); font-size: 11px; }

.icon-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
}
.icon-button:hover { border-color: rgba(227,24,55,0.45); background: rgba(227,24,55,0.08); }

.sidebar {
  position: sticky;
  top: 76px;
  height: calc(100vh - 76px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 16px 24px;
  border-right: 1px solid var(--line);
  background: rgba(8, 10, 15, 0.62);
}
.sidebar nav { display: grid; gap: 7px; }
.nav-button {
  display: flex;
  gap: 13px;
  align-items: center;
  width: 100%;
  padding: 13px 14px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition: 160ms ease;
}
.nav-button:hover { color: var(--text); background: rgba(255,255,255,0.035); }
.nav-button.is-active { color: var(--text); border-color: rgba(227,24,55,0.14); background: rgba(227,24,55,0.09); }
.nav-icon { display: grid; width: 27px; height: 27px; place-items: center; color: var(--green); border-radius: 8px; background: rgba(227,24,55,0.09); }

.sidebar-foot {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 14px 10px;
  color: var(--muted);
  font-size: 11px;
}
.sidebar-foot strong, .sidebar-foot span { display: block; }
.sidebar-foot strong { margin-bottom: 3px; color: var(--text); font-size: 12px; }
.focus-ring {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 3px solid rgba(227,24,55,0.22);
  border-top-color: var(--green);
  border-radius: 50%;
  color: var(--green);
  font-weight: 800;
  transform: rotate(-20deg);
}
.focus-ring span { transform: rotate(20deg); }

main { min-width: 0; padding: 34px clamp(18px, 3.2vw, 52px) 46px; }
.view { display: none; max-width: 1440px; margin: 0 auto; }
.view.is-active { display: block; animation: view-in 280ms ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

.page-heading {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
}
.kicker { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 0.18em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 7px 0 0; font-family: Manrope, sans-serif; font-size: clamp(24px, 2.6vw, 38px); line-height: 1.12; letter-spacing: -0.035em; }
h2, h3 { font-family: Manrope, sans-serif; letter-spacing: -0.025em; }

.mode-tabs { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,0.025); }
.mode-tab {
  padding: 9px 14px;
  color: var(--muted);
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.mode-tab.is-active { color: #fff; background: var(--green); box-shadow: 0 5px 16px rgba(227,24,55,0.22); }

.trainer-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.72fr); gap: 18px; align-items: stretch; }
.table-card, .insight-card, .score-hero, .stat-card, .category-card, .mistakes-card, .method-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(24, 28, 37, 0.96), rgba(15, 18, 25, 0.96));
  box-shadow: 0 20px 80px rgba(0,0,0,0.18);
}
.table-card { min-width: 0; padding: 22px; overflow: hidden; }
.insight-card { min-height: 720px; padding: 25px; overflow: hidden; }

.context-row { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; }
.scenario-tag {
  display: inline-flex;
  padding: 5px 9px;
  color: var(--green);
  border: 1px solid rgba(227,24,55,0.18);
  border-radius: 7px;
  background: rgba(227,24,55,0.06);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.context-row h2 { margin: 10px 0 0; font-size: clamp(17px, 1.7vw, 23px); }
.hand-counter { display: flex; gap: 4px; align-items: baseline; padding: 7px 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; font-size: 11px; }
.hand-counter span:first-child { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.hand-counter span:last-child { color: #fff; font-size: 10px; font-weight: 900; letter-spacing: .04em; }

.tournament-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 18px 0 15px;
  border-block: 1px solid var(--line);
}
.tournament-item { position: relative; padding: 11px 13px; }
.tournament-item + .tournament-item::before { position: absolute; left: 0; top: 22%; width: 1px; height: 56%; background: var(--line); content: ""; }
.tournament-item span, .metric span, .stat-card span, .score-hero > span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.1em; }
.tournament-item strong { font-size: 12px; }
.payout-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; margin: -5px 0 9px; padding: 8px 11px; color: var(--muted); border: 1px solid rgba(227,24,55,.18); border-radius: 9px; background: rgba(227,24,55,.045); font-size: 10px; }
.payout-row[hidden] { display: none; }
.payout-row > span { color: var(--green); font-size: 8px; font-weight: 900; letter-spacing: .12em; white-space: nowrap; }
.payout-row > div { color: var(--text); font-weight: 700; }

.table-wrap { padding: 12px 5.8% 8px; }
.poker-table {
  position: relative;
  width: 100%;
  aspect-ratio: 1.82 / 1;
  min-height: 310px;
  border: 13px solid #303640;
  border-radius: 48% / 50%;
  background:
    radial-gradient(ellipse at center, rgba(63,198,132,0.09), transparent 52%),
    linear-gradient(145deg, #0c4a36, #073326 72%);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.05),
    inset 0 0 70px rgba(0,0,0,0.42),
    0 26px 40px rgba(0,0,0,0.2),
    0 0 0 1px #444b55;
}
.felt-line { position: absolute; inset: 8%; border: 1px solid rgba(255,255,255,0.10); border-radius: 48% / 50%; }
.table-center { position: absolute; top: 50%; left: 50%; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -51%); }
.pot-label { color: rgba(255,255,255,0.55); font-size: 8px; font-weight: 800; letter-spacing: 0.13em; }
.table-center strong { margin: 2px 0 9px; font-family: Manrope, sans-serif; font-size: 18px; }
.last-action { padding: 6px 9px; color: #f1f2f4; border: 1px solid rgba(255,255,255,0.14); border-radius: 8px; background: rgba(2,26,18,0.48); font-size: 10px; }

.seat { position: absolute; z-index: 3; width: 104px; transform: translate(-50%, -50%); text-align: center; }
.seat-0 { top: -1%; left: 50%; }
.seat-1 { top: 18%; left: 91%; }
.seat-2 { top: 51%; left: 101%; }
.seat-3 { top: 84%; left: 87%; }
.seat-4 { top: 101%; left: 50%; }
.seat-5 { top: 84%; left: 13%; }
.seat-6 { top: 51%; left: -1%; }
.seat-7 { top: 18%; left: 9%; }
.seat-chip {
  position: relative;
  display: inline-flex;
  min-width: 78px;
  flex-direction: column;
  padding: 7px 8px 6px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  background: rgba(4,14,12,0.88);
  box-shadow: 0 8px 18px rgba(0,0,0,0.24);
}
.seat.is-hero .seat-chip { border-color: rgba(227,24,55,0.65); box-shadow: 0 0 0 2px rgba(227,24,55,0.11), 0 8px 18px rgba(0,0,0,0.24); }
.seat.is-aggressor .seat-chip { border-color: rgba(255,202,103,0.52); }
.seat.is-folded { opacity: 0.52; }
.seat-name { color: var(--muted); font-size: 9px; font-weight: 700; }
.seat-stack { margin-top: 2px; color: var(--text); font-size: 11px; font-weight: 800; }
.seat-chip .seat-stack { color: #fff; font-family: Manrope, sans-serif; font-size: 13px; font-weight: 900; letter-spacing: -.02em; text-shadow: 0 1px 8px rgba(227,24,55,.34); }
.dealer-button { position: absolute; right: -9px; top: -9px; display: grid; width: 21px; height: 21px; place-items: center; color: #11141b; border: 2px solid rgba(255,255,255,0.42); border-radius: 50%; background: #f4f5e9; font-size: 8px; font-weight: 900; }
.action-bubble { position: absolute; left: 50%; top: calc(100% + 5px); width: max-content; padding: 4px 7px; color: var(--amber); border: 1px solid rgba(255,202,103,0.22); border-radius: 6px; background: rgba(42,31,8,0.86); font-size: 8px; font-weight: 800; transform: translateX(-50%); }

.hero-cards { position: absolute; z-index: 5; left: 50%; bottom: 11%; display: flex; transform: translateX(-50%); }
.hero-cards.hero-pos-0 { top: 17%; bottom: auto; left: 50%; }
.hero-cards.hero-pos-1 { top: 27%; bottom: auto; left: 72%; }
.hero-cards.hero-pos-2 { top: 50%; bottom: auto; left: 73%; transform: translate(-50%, -50%); }
.hero-cards.hero-pos-3 { bottom: 19%; left: 72%; }
.hero-cards.hero-pos-4 { top: auto; bottom: 11%; left: 50%; }
.hero-cards.hero-pos-5 { bottom: 19%; left: 28%; }
.hero-cards.hero-pos-6 { top: 50%; bottom: auto; left: 27%; transform: translate(-50%, -50%); }
.hero-cards.hero-pos-7 { top: 27%; bottom: auto; left: 28%; }
.playing-card {
  display: flex;
  width: clamp(42px, 5.5vw, 58px);
  aspect-ratio: .72;
  flex-direction: column;
  padding: 5px 6px;
  color: #111b18;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 8px;
  background: linear-gradient(155deg, #fff, #e8efeb);
  box-shadow: 0 9px 19px rgba(0,0,0,0.26);
  font-family: Manrope, sans-serif;
  font-size: clamp(16px, 2.2vw, 24px);
  font-weight: 800;
}
.playing-card + .playing-card { margin-left: -8px; transform: rotate(3deg) translateY(2px); }
.playing-card.red { color: #d93b48; }
.playing-card small { margin-top: auto; align-self: flex-end; font-size: .7em; }

.hero-prompt { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; padding: 0 4px; }
.position-pill { display: inline-block; margin-bottom: 7px; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 0.08em; }
.position-pill { display: inline-flex; gap: 8px; align-items: center; padding: 6px 9px; border: 1px solid rgba(227,24,55,.30); border-radius: 9px; background: rgba(227,24,55,.11); }
.hero-stack-value { padding: 3px 7px; color: #fff; border-radius: 6px; background: var(--green-deep); font-family: Manrope, sans-serif; font-size: 12px; font-weight: 900; letter-spacing: 0; }
.hero-prompt h3 { margin: 0; font-size: clamp(19px, 2vw, 26px); }
.decision-clock { position: relative; display: grid; width: 44px; height: 44px; place-items: center; }
.decision-clock svg { position: absolute; inset: 0; width: 44px; height: 44px; transform: rotate(-90deg); }
.decision-clock circle { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 3; }
.decision-clock .timer-ring { stroke: var(--green); stroke-linecap: round; stroke-dasharray: 113.1; transition: stroke-dashoffset 1s linear; }
.decision-clock span { font-size: 11px; font-weight: 800; }

.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; }
.actions.two-actions { grid-template-columns: repeat(2, 1fr); }
.action-button {
  display: flex;
  gap: 11px;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 9px 12px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  font-family: Manrope, sans-serif;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: 150ms ease;
}
.action-button:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.24); background: rgba(255,255,255,0.065); }
.action-button .key { display: grid; width: 25px; height: 25px; place-items: center; color: var(--muted); border: 1px solid var(--line); border-radius: 7px; font-family: "DM Sans"; font-size: 10px; }
.action-button small { display: block; margin-bottom: 1px; color: var(--muted); font-family: "DM Sans"; font-size: 8px; letter-spacing: .11em; }
.action-button.selected-correct { border-color: rgba(80,197,139,0.65); background: rgba(80,197,139,0.12); }
.action-button.selected-wrong { border-color: rgba(255,107,116,0.65); background: rgba(255,107,116,0.10); }
.action-button:disabled { cursor: default; transform: none; }
.limit-notice { display: grid; gap: 5px; margin-top: 13px; padding: 14px; border: 1px solid rgba(227,24,55,.34); border-radius: 13px; background: rgba(227,24,55,.10); }
.limit-notice strong { font-size: 13px; }
.limit-notice span { color: var(--muted); font-size: 11px; }
.limit-notice button { justify-self: start; margin-top: 4px; padding: 8px 11px; color: #fff; border: 0; border-radius: 8px; background: var(--green); font-weight: 800; cursor: pointer; }
.dialog-backdrop { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
.dialog-backdrop[hidden] { display: none; }
.account-dialog { position: relative; width: min(100%, 440px); max-height: min(90vh, 760px); overflow-y: auto; padding: 30px; border: 1px solid rgba(227,24,55,.25); border-radius: 22px; background: #151820; box-shadow: 0 25px 100px rgba(0,0,0,.55); }
.account-dialog h2 { margin: 9px 0 8px; font-size: 25px; }
.dialog-copy, .account-footnote { color: var(--muted); font-size: 12px; line-height: 1.55; }
.dialog-close { position: absolute; top: 13px; right: 14px; width: 34px; height: 34px; color: var(--muted); border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 23px; cursor: pointer; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 19px 0 16px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; }
.auth-tab { padding: 9px; color: var(--muted); border: 0; border-radius: 8px; background: transparent; font-weight: 800; cursor: pointer; }
.auth-tab.is-active { color: #fff; background: var(--green); }
.account-dialog form { display: grid; gap: 12px; }
.account-dialog label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.account-dialog input { width: 100%; min-height: 43px; padding: 0 12px; color: var(--text); border: 1px solid var(--line); border-radius: 9px; background: #0d1016; font: inherit; }
.account-dialog input:focus { outline: 2px solid rgba(227,24,55,.5); }
.google-auth { display: grid; justify-items: center; gap: 7px; margin: 18px 0 13px; }
.google-button-host { display: flex; width: 100%; min-height: 44px; justify-content: center; }
.google-button-host:empty { display: none; }
.google-placeholder {
  display: flex;
  width: 100%;
  min-height: 44px;
  gap: 11px;
  align-items: center;
  justify-content: center;
  color: #e8e8e8;
  border: 1px solid #5f6368;
  border-radius: 6px;
  background: #fff;
  font: 600 14px/1 DM Sans, sans-serif;
  color: #3c4043;
}
.google-placeholder[hidden] { display: none; }
.google-placeholder:disabled { cursor: not-allowed; opacity: .68; }
.google-g { display: grid; width: 19px; height: 19px; place-items: center; color: #4285f4; font-family: Arial, sans-serif; font-size: 17px; font-weight: 800; }
.google-auth small { color: var(--muted); font-size: 10px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.form-error { min-height: 16px; margin: 0; color: #ff8495; font-size: 11px; }
.account-footnote { display: block; margin-top: 14px; font-size: 10px; }

.insight-idle { display: flex; min-height: 668px; flex-direction: column; justify-content: center; }
.idle-orbit {
  display: grid;
  width: 76px;
  height: 76px;
  margin-bottom: 24px;
  place-items: center;
  border: 1px solid rgba(227,24,55,0.22);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227,24,55,0.12), transparent 66%);
  box-shadow: 0 0 0 12px rgba(227,24,55,0.025), 0 0 0 25px rgba(227,24,55,0.016);
}
.idle-orbit span { display: grid; width: 34px; height: 34px; place-items: center; color: var(--green); border: 1px solid rgba(227,24,55,0.3); border-radius: 50%; font-family: Manrope; font-size: 19px; font-weight: 800; }
.insight-idle h2 { max-width: 360px; margin: 11px 0 12px; font-size: clamp(24px, 2.2vw, 33px); line-height: 1.12; }
.insight-idle > p { max-width: 420px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.clue-list { display: grid; gap: 11px; margin-top: 28px; }
.clue-list > div { display: flex; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,0.025); }
.clue-list > div > span { color: var(--green); font-family: Manrope; font-size: 10px; font-weight: 800; }
.clue-list p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.clue-list strong { display: block; margin-bottom: 2px; color: var(--text); font-size: 12px; }

.result-panel { animation: result-in 260ms ease; }
@keyframes result-in { from { opacity: 0; transform: translateX(10px); } }
.result-status { display: inline-flex; gap: 7px; align-items: center; margin-bottom: 17px; padding: 7px 10px; color: var(--success); border: 1px solid rgba(80,197,139,0.22); border-radius: 9px; background: rgba(80,197,139,0.07); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.result-status.is-wrong { color: var(--red); border-color: rgba(255,107,116,0.25); background: rgba(255,107,116,0.07); }
.result-panel h2 { margin-bottom: 8px; font-size: 25px; }
.result-panel > p { min-height: 58px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.section-label { display: flex; justify-content: space-between; margin: 19px 0 9px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .11em; }
.section-label span:last-child { color: var(--text); letter-spacing: 0; }
.frequency-bar { display: flex; height: 10px; overflow: hidden; border-radius: 20px; background: rgba(255,255,255,0.05); }
.freq-fold { background: #aeb5bf; }
.freq-call { background: var(--blue); }
.freq-raise { background: var(--green); }
.frequency-legend { display: flex; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 9px; }
.frequency-legend span::before { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; content: ""; }
.frequency-legend .legend-fold::before { background: #aeb5bf; }
.frequency-legend .legend-call::before { background: var(--blue); }
.frequency-legend .legend-raise::before { background: var(--green); }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.metric { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,0.025); }
.metric strong { display: block; margin-bottom: 2px; font-family: Manrope; font-size: 21px; }
.metric small { color: var(--muted); font-size: 9px; }
.ev-table { display: grid; gap: 6px; }
.ev-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 9px; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 9px; background: rgba(255,255,255,0.025); font-size: 10px; }
.ev-row.is-best { color: #fff; background: var(--green); font-weight: 800; }
.ev-track { height: 4px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,0.10); }
.ev-row.is-best .ev-track { background: rgba(0,0,0,0.16); }
.ev-fill { height: 100%; border-radius: 10px; background: currentColor; opacity: .65; }
.takeaway { margin-top: 17px; padding: 13px; border-left: 2px solid var(--green); border-radius: 0 11px 11px 0; background: rgba(227,24,55,0.09); }
.takeaway span { color: var(--green); font-size: 8px; font-weight: 800; letter-spacing: .11em; }
.takeaway p { margin: 5px 0 0; font-size: 11px; line-height: 1.5; }
.next-button { display: flex; width: 100%; min-height: 46px; align-items: center; justify-content: space-between; margin-top: 18px; padding: 0 16px; color: #fff; border: 0; border-radius: 12px; background: var(--green); font-weight: 800; cursor: pointer; }
.next-button:hover { background: #f02a48; }
.accuracy-note { max-width: 980px; margin: 16px auto 0; color: #6f817b; font-size: 9px; line-height: 1.5; text-align: center; }

.ghost-button { padding: 9px 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: transparent; cursor: pointer; }
.ghost-button:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.progress-layout { display: grid; grid-template-columns: 1.1fr .55fr .55fr; gap: 16px; }
.score-hero { grid-row: span 2; min-height: 340px; display: flex; flex-direction: column; justify-content: center; padding: 36px; background: radial-gradient(circle at 50% 45%, rgba(227,24,55,.14), transparent 42%), linear-gradient(145deg, rgba(24,28,37,.96), rgba(15,18,25,.96)); }
.score-hero strong { display: block; margin: 12px 0 8px; color: var(--green); font-family: Manrope; font-size: clamp(64px, 8vw, 112px); letter-spacing: -.07em; }
.score-hero p { max-width: 360px; color: var(--muted); line-height: 1.6; }
.stat-card { min-height: 160px; padding: 25px; }
.stat-card strong { display: block; margin: 13px 0 4px; font-family: Manrope; font-size: 39px; }
.stat-card small { color: var(--muted); }
.category-card, .mistakes-card { padding: 25px; }
.category-card { grid-column: span 2; }
.mistakes-card { grid-column: 1 / -1; }
.category-card h3, .mistakes-card h3 { margin-bottom: 20px; }
.category-row { display: grid; grid-template-columns: 90px 1fr 42px; gap: 12px; align-items: center; margin-top: 12px; color: var(--muted); font-size: 11px; }
.category-track { height: 7px; overflow: hidden; border-radius: 20px; background: rgba(255,255,255,.06); }
.category-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--green-deep), var(--green)); }
.mistake-list { display: grid; gap: 8px; }
.mistake-item { display: grid; grid-template-columns: 95px 1fr auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); font-size: 11px; }
.mistake-item strong { color: var(--text); }
.mistake-item span:last-child { color: var(--red); }
.empty-state { color: var(--muted); font-size: 12px; }

.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.method-grid article { min-height: 230px; padding: 28px; }
.method-grid h2 { margin: 20px 0 10px; font-size: 23px; }
.method-grid p { max-width: 570px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.method-number { color: var(--green); font-family: Manrope; font-size: 12px; font-weight: 800; }
.method-wide { grid-column: 1 / -1; min-height: 170px !important; border-color: rgba(227,24,55,.2) !important; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: 22px; padding: 11px 15px; color: #fff; border-radius: 10px; background: var(--green); box-shadow: 0 12px 36px rgba(0,0,0,.35); font-size: 12px; font-weight: 800; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: 180ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1080px) {
  :root { --sidebar: 82px; }
  .brand > span:last-child, .nav-button > span:last-child, .sidebar-foot > div:last-child { display: none; }
  .nav-button { justify-content: center; padding: 12px; }
  .topbar { grid-template-columns: var(--sidebar) 1fr auto auto; }
  .trainer-grid { grid-template-columns: 1fr; }
  .insight-card { min-height: auto; }
  .insight-idle { min-height: 360px; }
  .progress-layout { grid-template-columns: 1fr 1fr; }
  .score-hero { grid-column: 1 / -1; grid-row: auto; min-height: 300px; }
  .category-card { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .app-shell { display: block; padding-bottom: 74px; }
  .topbar { grid-template-columns: 1fr auto auto; grid-template-rows: auto auto; min-height: 82px; padding: max(8px, env(safe-area-inset-top)) 12px 8px; }
  .topbar .brand { grid-column: 1; grid-row: 1; }
  .topbar .session-strip { grid-column: 2; grid-row: 1; }
  .topbar .install-button { grid-column: 3; grid-row: 1; }
  .topbar .account-actions { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: space-between; }
  .quota-badge { flex: 1; text-align: center; }
  .account-button { min-height: 30px; padding: 0 11px; font-size: 11px; }
  .brand > span:last-child { display: inline; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .session-strip { gap: 14px; margin-right: 11px; }
  .strip-label { display: none; }
  .install-label { display: none; }
  .icon-button { width: 38px; min-height: 38px; padding: 0; }
  .sidebar { position: fixed; z-index: 30; top: auto; bottom: 0; left: 0; width: 100%; height: calc(66px + env(safe-area-inset-bottom)); flex-direction: row; align-items: flex-start; padding: 8px 10px env(safe-area-inset-bottom); border: 0; border-top: 1px solid var(--line); background: rgba(5,15,12,.93); backdrop-filter: blur(20px); }
  .sidebar nav { display: grid; width: 100%; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .nav-button { gap: 4px; flex-direction: column; padding: 5px; font-size: 9px; }
  .nav-button > span:last-child { display: block; }
  .nav-icon { width: 23px; height: 23px; }
  .sidebar-foot { display: none; }
  main { padding: 24px 12px 24px; }
  .page-heading { display: block; }
  .mode-tabs { width: 100%; margin-top: 17px; }
  .mode-tab { flex: 1; padding-inline: 7px; }
  .table-card { padding: 15px 12px 17px; border-radius: 18px; }
  .insight-card { padding: 20px 16px; border-radius: 18px; }
  .account-dialog { padding: 25px 20px; }
  .tournament-bar { grid-template-columns: repeat(2, 1fr); }
  .tournament-item:nth-child(3)::before { display: none; }
  .tournament-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .table-wrap { padding: 18px 1% 15px; }
  .poker-table { min-height: 255px; border-width: 9px; }
  .table-center { z-index: 2; width: 34%; max-width: 132px; text-align: center; }
  .seat { width: 73px; }
  .seat-chip { min-width: 61px; padding: 5px 5px 4px; }
  .seat-name { font-size: 7px; }
  .seat-stack { font-size: 9px; }
  .seat-1 { left: 94%; }
  .seat-2 { left: 102%; }
  .seat-3 { left: 89%; }
  .seat-5 { left: 11%; }
  .seat-6 { left: -2%; }
  .seat-7 { left: 6%; }
  .action-bubble { padding: 3px 5px; font-size: 7px; }
  .dealer-button { width: 17px; height: 17px; font-size: 6px; }
  .hero-cards { bottom: 13%; }
  .hero-cards.hero-pos-0 { top: 18%; bottom: auto; }
  .hero-cards.hero-pos-1 { top: 28%; left: 78%; }
  .hero-cards.hero-pos-2 { top: 50%; left: 78%; }
  .hero-cards.hero-pos-3 { bottom: 20%; left: 76%; }
  .hero-cards.hero-pos-4 { top: auto; bottom: 13%; left: 50%; }
  .hero-cards.hero-pos-5 { bottom: 20%; left: 24%; }
  .hero-cards.hero-pos-6 { top: 50%; left: 22%; }
  .hero-cards.hero-pos-7 { top: 28%; left: 22%; }
  .playing-card { width: 36px; padding: 4px 5px; border-radius: 6px; font-size: 15px; }
  .playing-card + .playing-card { margin-left: -6px; }
  .table-center strong { font-size: 14px; }
  .last-action { max-width: 132px; padding: 5px 6px; font-size: 7px; line-height: 1.25; }
  .actions { gap: 7px; }
  .action-button { min-height: 58px; gap: 5px; padding: 8px 5px; font-size: 13px; }
  .action-button .key { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .accuracy-note { padding-inline: 10px; }
  .progress-layout, .method-grid { grid-template-columns: 1fr; }
  .score-hero, .category-card, .mistakes-card, .method-wide { grid-column: auto; }
  .score-hero { min-height: 270px; padding: 25px; }
  .mistake-item { grid-template-columns: 76px 1fr; }
  .mistake-item span:last-child { grid-column: 2; }
}

@media (max-width: 400px) {
  .brand { font-size: 15px; }
  .session-strip > div:first-child { display: none; }
  .poker-table { min-height: 232px; }
  .seat-2, .seat-6 { top: 48%; }
  .hero-cards.hero-pos-1, .hero-cards.hero-pos-2 { left: 79%; }
  .hero-cards.hero-pos-6, .hero-cards.hero-pos-7 { left: 21%; }
  .playing-card { width: 33px; font-size: 14px; }
  .context-row h2 { font-size: 16px; }
  .hero-prompt h3 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
