:root {
  --bg: #101213;
  --panel: #181d1c;
  --panel-2: #202625;
  --felt: #0f5b45;
  --felt-dark: #09382d;
  --line: #2f3a38;
  --text: #f5f1e8;
  --muted: #aeb8b4;
  --gold: #d8b15d;
  --gold-dark: #8e6b2e;
  --brand-pink: #e3409f;
  --brand-coral: #ff7654;
  --brand-blue: #2f94d7;
  --red: #c92232;
  --black: #0b0d0e;
  --suit-spade: #0b0d0e;
  --suit-heart: #c92232;
  --suit-club: #128249;
  --suit-diamond: #c8911c;
  --good: #6fd08c;
  --bad: #ff817c;
  --focus: #7cc7ff;
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans SC",
    system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(120deg, rgba(227, 64, 159, 0.08), transparent 28%),
    linear-gradient(240deg, rgba(47, 148, 215, 0.1), transparent 30%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 12px),
    var(--bg);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.app-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0 8px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(245, 241, 232, 0.96);
  padding: 7px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
}

.scoreboard {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: end;
}

.scoreboard span,
.mode-tabs,
.control-field,
.segmented,
.feedback-line,
.mistake-panel {
  border: 1px solid var(--line);
  background: rgba(24, 29, 28, 0.9);
  border-radius: 8px;
}

.scoreboard span {
  padding: 10px 12px;
  color: var(--muted);
  white-space: nowrap;
}

.scoreboard strong {
  color: var(--text);
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  margin-bottom: 12px;
}

.trainer-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  margin-bottom: 12px;
}

.trainer-toolbar .mode-tabs {
  margin-bottom: 0;
}

.lobby-return {
  min-width: 112px;
}

.tab-button,
.segment {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.tab-button.active,
.segment.active {
  color: #fff;
  background: linear-gradient(90deg, var(--brand-pink), var(--brand-coral), var(--brand-blue));
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}

.trainer-section {
  display: none;
}

.trainer-section.active {
  display: block;
}

.app-shell.lobby-active .trainer-toolbar,
.app-shell.lobby-active .trainer-section.active {
  display: none;
}

.app-shell.lobby-active #handMode.trainer-section.active,
.app-shell.lobby-active #potMode.trainer-section.active {
  display: none;
}

.training-lobby {
  display: none;
}

.training-lobby.active {
  display: grid;
  gap: 14px;
}

.lobby-track {
  display: grid;
  gap: 12px;
}

.track-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px;
}

.track-heading h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
}

.track-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
}

.exam-track-panel {
  padding-top: 4px;
  border-top: 1px solid rgba(216, 177, 93, 0.2);
}

.lobby-hero,
.rule-panel,
.daily-task-panel,
.quick-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 29, 28, 0.9);
}

.lobby-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  align-items: center;
  gap: 14px;
  padding: 16px;
}

.lobby-title h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.05;
}

.daily-progress {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(227, 64, 159, 0.1), rgba(47, 148, 215, 0.1)),
    rgba(0, 0, 0, 0.2);
}

.daily-progress span {
  color: var(--muted);
  font-size: 13px;
}

.daily-progress strong {
  color: var(--text);
  font-size: 24px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(245, 241, 232, 0.12);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-pink), var(--brand-coral), var(--brand-blue));
  transition: width 180ms ease;
}

.rule-panel {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(260px, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.rule-panel .panel-heading {
  margin-bottom: 0;
}

.rule-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.rule-button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.rule-button.active {
  color: #fff;
  background: linear-gradient(90deg, var(--brand-pink), var(--brand-coral), var(--brand-blue));
}

.rule-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.lobby-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lobby-card {
  min-height: 190px;
  display: grid;
  align-content: space-between;
  justify-items: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(245, 241, 232, 0.14);
  border-radius: 8px;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent),
    rgba(24, 29, 28, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.lobby-card:hover {
  transform: translateY(-2px);
  border-color: rgba(216, 177, 93, 0.45);
}

.lobby-card.primary-track {
  background:
    linear-gradient(145deg, rgba(227, 64, 159, 0.2), rgba(47, 148, 215, 0.1)),
    rgba(24, 29, 28, 0.94);
}

.lobby-card.exam-track {
  background:
    linear-gradient(145deg, rgba(216, 177, 93, 0.18), rgba(255, 118, 84, 0.1)),
    rgba(24, 29, 28, 0.94);
}

.exam-card {
  min-height: 134px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
}

.exam-card .track-kicker,
.exam-card strong,
.exam-card small {
  grid-column: 1;
}

.exam-card .mini-chip-row {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
}

.app-shell.exam-active #potMode .segmented,
.app-shell.exam-active #potMode #revealPotAnswer,
.app-shell.exam-active #potMode .pot-path {
  display: none;
}

.app-shell.exam-active #potMode .problem-panel {
  border-color: rgba(216, 177, 93, 0.28);
  background:
    linear-gradient(145deg, rgba(216, 177, 93, 0.11), rgba(255, 118, 84, 0.06)),
    rgba(8, 29, 25, 0.62);
}

.achievement-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 12px;
}

.achievement-card {
  display: grid;
  gap: 11px;
  min-height: 236px;
  padding: 16px;
  border: 1px solid rgba(216, 177, 93, 0.3);
  border-radius: 10px;
  color: var(--text);
  text-align: left;
  background: rgba(24, 29, 28, 0.94);
  transition: transform 160ms ease, border-color 160ms ease;
}

.achievement-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}

.leaderboard-spotlight {
  background:
    linear-gradient(125deg, rgba(216, 177, 93, 0.15), rgba(47, 148, 215, 0.08)),
    rgba(24, 29, 28, 0.96);
}

.honor-spotlight {
  background:
    linear-gradient(135deg, rgba(227, 64, 159, 0.15), rgba(216, 177, 93, 0.12)),
    rgba(24, 29, 28, 0.96);
}

.achievement-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.achievement-heading h3 {
  margin: 0;
  font-size: 22px;
}

.home-rank-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
}

.home-rank-tab {
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.home-rank-tab.active {
  color: #fff;
  background: linear-gradient(90deg, var(--brand-pink), var(--brand-blue));
}

.achievement-heading > span:not(.profile-avatar-mini) {
  color: var(--muted);
  font-size: 12px;
}

.spotlight-rank-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.spotlight-rank,
.spotlight-empty {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 35px;
  padding: 7px 9px;
  border: 1px solid rgba(245, 241, 232, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
}

.spotlight-rank b { color: var(--gold); }
.spotlight-rank > .leaderboard-identity { min-width: 0; }
.spotlight-rank strong { color: var(--text); font-size: 13px; }
.spotlight-rank.rank-1 { border-color: rgba(224, 186, 86, 0.62); }
.spotlight-rank.rank-2 { border-color: rgba(183, 198, 210, 0.42); }
.spotlight-rank.rank-3 { border-color: rgba(200, 131, 82, 0.48); }
.spotlight-empty { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }
.home-rank-note { min-height: 18px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }

.profile-avatar-mini {
  --avatar-size: 40px;
  position: relative;
  isolation: isolate;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  overflow: visible;
}

.profile-avatar-mini,
.profile-avatar-large {
  --avatar-size: 58px;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: visible;
}

.profile-avatar-mini { --avatar-size: 40px; }

.leaderboard-identity {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
}

.leaderboard-avatar {
  --avatar-size: 30px;
  position: relative;
  isolation: isolate;
  display: grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  overflow: visible;
}

.leaderboard-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-result-row strong {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.leaderboard-result-row .leaderboard-avatar {
  --avatar-size: 34px;
  width: 34px;
  height: 34px;
}

.avatar-face-layer {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: radial-gradient(circle at 36% 27%, rgba(255,255,255,.18), transparent 26%), rgba(0, 0, 0, .44);
  box-shadow: inset 0 0 13px rgba(0, 0, 0, .5);
  font-size: calc(var(--avatar-size) * .55);
  line-height: 1;
}

.avatar-frame-layer,
.avatar-aura,
.avatar-accessory-layer {
  position: absolute;
  pointer-events: none;
}

.avatar-frame-layer { z-index: 4; inset: -4px; border: 2px solid transparent; border-radius: 50%; }
.has-champion-frame .avatar-frame-layer { border-color: #ffd65d; box-shadow: 0 0 0 2px rgba(132, 74, 0, .85), 0 0 14px rgba(255, 195, 58, .86); }
.has-runner-up-frame .avatar-frame-layer { border-color: #e9f4ff; box-shadow: 0 0 0 2px rgba(102, 129, 155, .8), 0 0 13px rgba(194, 220, 242, .72); }
.has-third-place-frame .avatar-frame-layer { border-color: #ffbd81; box-shadow: 0 0 0 2px rgba(121, 62, 26, .84), 0 0 13px rgba(235, 130, 58, .73); }

.avatar-aura { z-index: 0; inset: -42%; border-radius: 50%; }
.avatar-aura.starlight-aura {
  background: radial-gradient(circle, transparent 41%, rgba(125, 221, 255, .16) 47%, transparent 62%);
  filter: drop-shadow(0 0 5px rgba(134, 230, 255, .75));
  animation: avatar-pulse 2.3s ease-in-out infinite;
}
.avatar-aura.starlight-aura::before,
.avatar-aura.starlight-aura::after {
  position: absolute;
  color: #e8fbff;
  font-size: calc(var(--avatar-size) * .37);
  line-height: 1;
  text-shadow: 0 0 8px #6bdcff, 0 0 15px rgba(93, 179, 255, .9);
  content: "✦";
}
.avatar-aura.starlight-aura::before { top: 3%; left: 50%; animation: star-orbit 3.2s linear infinite; }
.avatar-aura.starlight-aura::after { right: 4%; bottom: 6%; color: #ffe7a0; content: "✧"; animation: star-orbit 3.2s linear infinite reverse; }

.avatar-aura.flame-aura {
  inset: -34%;
  background: conic-gradient(from 15deg, transparent 0 8%, #ffda48 11%, #ff6a1a 17%, transparent 24% 38%, #ffce46 43%, #f34415 51%, transparent 58% 72%, #ffb52f 78%, #ff5c18 85%, transparent 92%);
  -webkit-mask: radial-gradient(transparent 44%, #000 46% 64%, transparent 66%);
  mask: radial-gradient(transparent 44%, #000 46% 64%, transparent 66%);
  filter: drop-shadow(0 0 5px #ff5b1a) drop-shadow(0 0 10px rgba(255, 177, 32, .9));
  animation: flame-spin 2.4s linear infinite;
}
.avatar-aura.flame-aura::before,
.avatar-aura.flame-aura::after {
  position: absolute;
  color: #ffe36a;
  font-size: calc(var(--avatar-size) * .43);
  line-height: 1;
  content: "♨";
  text-shadow: 0 0 8px #ff4a18, 0 0 16px #ff9c1c;
}
.avatar-aura.flame-aura::before { top: -3%; left: 44%; animation: flame-flicker .72s ease-in-out infinite alternate; }
.avatar-aura.flame-aura::after { right: 4%; bottom: 10%; font-size: calc(var(--avatar-size) * .32); animation: flame-flicker .56s ease-in-out infinite alternate-reverse; }

.avatar-accessory-layer { z-index: 5; display: grid; place-items: center; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0,0,0,.55)); }
.avatar-head-layer { top: -18%; left: 50%; transform: translateX(-50%); font-size: calc(var(--avatar-size) * .47); }
.avatar-neck-layer { right: -7%; bottom: -10%; font-size: calc(var(--avatar-size) * .35); }
.avatar-badge-layer { left: -10%; bottom: -8%; font-size: calc(var(--avatar-size) * .34); }

@keyframes star-orbit { from { transform: rotate(0deg) translateX(calc(var(--avatar-size) * .82)) rotate(0deg); } to { transform: rotate(360deg) translateX(calc(var(--avatar-size) * .82)) rotate(-360deg); } }
@keyframes avatar-pulse { 50% { transform: scale(1.06); opacity: .75; } }
@keyframes flame-spin { to { transform: rotate(360deg) scale(1.04); } }
@keyframes flame-flicker { from { transform: rotate(-8deg) scale(.86, 1.1); opacity: .75; } to { transform: rotate(9deg) scale(1.15, .9); opacity: 1; } }

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

.home-honor-counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.home-honor-counts strong {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 10px 4px;
  border: 1px solid rgba(245, 241, 232, 0.11);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.home-honor-counts b { color: var(--gold); font-size: 25px; line-height: 1; }
.home-honor-counts small, .honor-spotlight p { color: var(--muted); font-size: 12px; }
.honor-spotlight p { margin: 0; line-height: 1.45; }
.achievement-link { align-self: end; width: fit-content; padding: 0; border: 0; color: var(--gold); background: transparent; font-size: 13px; }

.hidden {
  display: none !important;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 12, 10, 0.82);
}

body:has(.auth-gate:not(.hidden)) .app-shell {
  visibility: hidden;
}

.auth-panel {
  width: min(420px, 100%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32);
}

.auth-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  padding: 6px;
  border-radius: 8px;
  background: #fff;
}

.auth-heading {
  margin: 14px 0 20px;
}

.auth-heading h1 {
  font-size: 28px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.auth-form input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--panel-2);
}

.auth-feedback {
  min-height: 20px;
  margin: 0;
  color: var(--bad);
  font-size: 13px;
}

.topbar-action {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--panel-2);
}

@media (max-width: 620px) {
  .auth-panel {
    padding: 20px;
  }
}

.track-kicker {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0;
}

.lobby-card strong {
  font-size: 25px;
  line-height: 1.1;
}

.lobby-card small {
  color: var(--muted);
  font-size: 13px;
}

.mini-card-row,
.mini-chip-row {
  display: flex;
  gap: 6px;
  align-self: end;
}

.mini-card-row i,
.mini-chip-row i {
  display: grid;
  place-items: center;
  font-style: normal;
}

.mini-card-row i {
  width: 32px;
  height: 44px;
  border: 1px solid rgba(23, 25, 26, 0.16);
  border-radius: 6px;
  color: var(--black);
  background: #f5f1e8;
  font-weight: 800;
  font-size: 14px;
}

.mini-chip-row i {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(245, 241, 232, 0.86);
  border-radius: 999px;
  color: #fff;
  background: #d84f4f;
  font-size: 10px;
  font-weight: 800;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.16);
}

.mini-chip-row i:nth-child(2) {
  background: #e0ba56;
  color: var(--black);
}

.mini-chip-row i:nth-child(3) {
  background: #54b87d;
}

.mini-chip-row.strong i:first-child {
  background: #2f94d7;
}

.mini-chip-row.strong i:nth-child(2) {
  background: #7c4bd8;
  color: #fff;
}

.lobby-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 12px;
}

.daily-task-panel,
.quick-panel {
  padding: 14px;
}

.panel-heading,
.task-row,
.quick-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading {
  margin-bottom: 10px;
}

.panel-heading span,
.task-row span,
.quick-entry span {
  color: var(--muted);
}

.panel-heading strong,
.task-row strong,
.quick-entry strong {
  color: var(--gold);
}

.task-list {
  display: grid;
  gap: 8px;
}

.task-row,
.quick-entry {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(245, 241, 232, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.quick-panel {
  display: grid;
  gap: 8px;
}

.quick-entry {
  width: 100%;
  color: var(--text);
  text-align: left;
}

.quick-entry:hover {
  border-color: rgba(216, 177, 93, 0.35);
}

.honor-entry strong {
  color: #e0ba56;
  font-size: 12px;
}

.profile-content {
  display: grid;
  gap: 16px;
}

.profile-overview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(216, 177, 93, 0.32);
  border-radius: 10px;
  background: linear-gradient(120deg, rgba(216, 177, 93, 0.15), rgba(47, 148, 215, 0.08));
}

.profile-avatar-large {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  font-size: 30px;
}

.profile-avatar-large i {
  position: absolute;
  right: -10px;
  bottom: -7px;
  max-width: 54px;
  padding: 2px 4px;
  border: 1px solid rgba(216, 177, 93, 0.6);
  border-radius: 999px;
  background: var(--panel);
  font-size: 13px;
  font-style: normal;
  line-height: 1;
}

.profile-overview strong,
.profile-overview p {
  margin: 0;
}

.profile-overview p,
.profile-empty {
  color: var(--muted);
  font-size: 13px;
}

.profile-section {
  display: grid;
  gap: 8px;
}

.profile-section h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
}

.avatar-picker,
.frame-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.avatar-choice,
.frame-choice {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel-2);
}

.avatar-choice {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
}

.avatar-choice span {
  font-size: 22px;
}

.avatar-choice small {
  color: var(--muted);
}

.avatar-choice small em {
  display: block;
  margin-top: 1px;
  color: var(--gold);
  font-size: 10px;
  font-style: normal;
}

.avatar-choice.locked {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.8);
}

.nickname-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.nickname-editor input {
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--panel-2);
}

.accessory-section {
  padding-top: 4px;
  border-top: 1px solid rgba(245, 241, 232, 0.1);
}

.accessory-slot {
  display: grid;
  gap: 6px;
}

.accessory-slot h4 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.accessory-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.accessory-choice {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  background: var(--panel-2);
}

.accessory-choice > span {
  font-size: 19px;
}

.accessory-choice small {
  color: var(--muted);
}

.accessory-choice small em {
  display: block;
  max-width: 166px;
  margin-top: 1px;
  color: var(--gold);
  font-size: 10px;
  font-style: normal;
  line-height: 1.25;
}

.accessory-choice.active {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 2px rgba(47, 148, 215, 0.45);
}

.accessory-choice.locked {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.8);
}

.frame-choice {
  padding: 0 11px;
}

.frame-choice.champion { border-color: #e0ba56; color: #ffe5a0; }
.frame-choice.runner-up { border-color: #a8b8ca; color: #dbe7f2; }
.frame-choice.third-place { border-color: #c88352; color: #f0bd91; }
.avatar-choice.active,
.frame-choice.active {
  box-shadow: 0 0 0 2px rgba(47, 148, 215, 0.52);
  border-color: var(--brand-blue);
}

.honor-history {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.honor-history li {
  padding: 9px 10px;
  border: 1px solid rgba(245, 241, 232, 0.1);
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.control-field {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto 150px 28px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--muted);
}

.control-field input {
  accent-color: var(--gold);
}

.control-field strong {
  color: var(--text);
  text-align: right;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(5, 46px);
  padding: 4px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  border: 1px solid var(--line);
  color: var(--text);
}

.primary-button {
  border-color: var(--gold-dark);
  color: var(--black);
  background: var(--gold);
}

.secondary-button {
  background: var(--panel-2);
}

.ghost-button {
  background: transparent;
  color: var(--muted);
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  border-color: rgba(245, 241, 232, 0.1);
}

.felt-surface {
  min-height: 520px;
  padding: 14px;
  border: 1px solid rgba(216, 177, 93, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(ellipse at center, rgba(24, 114, 87, 0.94), var(--felt-dark));
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.05);
}

.board-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  min-height: 92px;
  margin-bottom: 18px;
}

.strip-label {
  color: var(--gold);
  font-size: 14px;
}

.cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 72px;
  align-items: center;
}

.playing-card {
  width: 52px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid #d8d3c7;
  background: #fbf8ef;
  color: var(--black);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
}

.playing-card.red {
  color: var(--red);
}

[data-card-palette="four"] .playing-card.suit-spade {
  color: var(--suit-spade);
}

[data-card-palette="four"] .playing-card.suit-heart {
  color: var(--suit-heart);
}

[data-card-palette="four"] .playing-card.suit-club {
  color: var(--suit-club);
}

[data-card-palette="four"] .playing-card.suit-diamond {
  color: var(--suit-diamond);
}

.playing-card.card-back {
  color: #fff;
  border-color: rgba(245, 241, 232, 0.72);
  background:
    linear-gradient(135deg, var(--brand-pink), var(--brand-coral), var(--brand-blue));
}

.card-back-mark {
  display: grid;
  place-items: center;
  width: 72%;
  height: 72%;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  font-weight: 900;
}

.playing-card.small {
  width: 42px;
  height: 58px;
  font-size: 14px;
}

.card-face {
  display: grid;
  justify-items: center;
  gap: 2px;
  line-height: 0.9;
}

.card-rank,
.card-suit {
  display: block;
  font-weight: 950;
}

.card-rank {
  font-size: 1.08em;
}

.card-suit {
  font-size: 1.48em;
}

.task-prompt {
  width: fit-content;
  margin: 0 auto 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--black);
  background: rgba(245, 241, 232, 0.88);
  font-size: 14px;
  font-weight: 700;
}

.hand-workbench {
  display: grid;
  grid-template-columns: minmax(120px, 220px) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.hand-column {
  min-width: 0;
  border: 1px solid rgba(245, 241, 232, 0.16);
  border-radius: 8px;
  background: rgba(8, 29, 25, 0.58);
  padding: 8px;
}

.column-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--gold);
  font-weight: 800;
}

.column-heading small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.hand-drop-list {
  min-height: 44px;
  border: 1px dashed rgba(245, 241, 232, 0.2);
  border-radius: 8px;
  transition:
    border-color 140ms ease,
    background 140ms ease;
}

.hand-drop-list.drop-active {
  border-color: rgba(216, 177, 93, 0.8);
  background: rgba(216, 177, 93, 0.08);
}

.answer-row-list.insert-ready {
  border-color: rgba(216, 177, 93, 0.72);
  background: rgba(216, 177, 93, 0.06);
}

.answer-row-list.chop-ready,
.answer-row-list.chop-row {
  border-color: rgba(47, 148, 215, 0.92);
  background: rgba(47, 148, 215, 0.14);
  box-shadow: inset 0 0 0 1px rgba(47, 148, 215, 0.38);
}

.hand-source-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 6px;
  min-height: 48px;
  padding: 0;
  border: 0;
}

.answer-rows {
  display: grid;
  gap: 8px;
}

.answer-row {
  position: relative;
  display: block;
  min-height: 48px;
}

.answer-row-label {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  min-height: 0;
  border: 0;
  border-radius: 0;
  color: var(--gold);
  background: transparent;
  font-weight: 800;
  pointer-events: none;
  cursor: pointer;
}

.answer-row-label span {
  display: none;
}

.answer-row-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 5px 7px;
  background: rgba(0, 0, 0, 0.17);
  cursor: pointer;
  overflow: hidden;
}

.answer-row-list::before {
  content: attr(data-rank-label);
  position: absolute;
  left: 12px;
  top: 50%;
  z-index: 0;
  color: rgba(216, 177, 93, 0.17);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.answer-row-list .player-tile {
  position: relative;
  z-index: 1;
  flex: 1 1 96px;
  max-width: 160px;
}

#handMode .felt-surface {
  min-height: 0;
}

#handMode .board-strip {
  min-height: 56px;
  margin-bottom: 6px;
}

.hand-source-list,
.answer-rows {
  gap: 6px;
}

.answer-row-label {
  min-height: 0;
}

.hand-workbench .player-tile {
  min-height: 42px;
  gap: 8px;
  padding: 4px;
}

.hand-workbench .rank-badge {
  width: 26px;
  height: 26px;
  font-size: 13px;
}

.hand-workbench .player-main {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hand-workbench .player-title {
  display: none;
  margin-bottom: 0;
}

.hand-workbench .hand-summary {
  display: none;
  min-height: 0;
}

.hand-workbench .cards-row {
  min-height: 34px;
  gap: 5px;
  flex-wrap: nowrap;
}

.hand-workbench .playing-card.small {
  width: 25px;
  height: 34px;
  border-radius: 6px;
  font-size: 12px;
}

.player-tile,
.pot-player {
  border: 1px solid rgba(245, 241, 232, 0.16);
  border-radius: 8px;
  background: rgba(16, 18, 19, 0.78);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.player-tile {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 116px;
  padding: 12px;
  user-select: none;
  touch-action: none;
  will-change: transform;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.hand-source-list .player-tile {
  grid-template-columns: auto minmax(0, 1fr);
  justify-items: stretch;
  min-height: 48px;
  padding: 4px 5px;
  box-shadow: none;
}

.hand-source-list .rank-badge {
  position: static;
  width: 20px;
  height: 20px;
  font-size: 11px;
  z-index: auto;
}

.hand-source-list .player-main {
  justify-content: center;
  gap: 4px;
}

.hand-source-list .cards-row {
  justify-content: center;
  min-height: 34px;
  gap: 3px;
  flex-wrap: nowrap;
}

.hand-source-list .playing-card.small {
  width: 24px;
  height: 34px;
  border-radius: 5px;
  font-size: 11px;
}

.player-tile.dragging {
  opacity: 0.82;
  border-color: rgba(216, 177, 93, 0.72);
  background: rgba(13, 35, 31, 0.94);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(216, 177, 93, 0.28);
  transform: scale(1.02);
  z-index: 5;
}

.player-tile.drag-armed {
  border-color: rgba(216, 177, 93, 0.42);
}

.player-tile.tile-selected {
  border-color: rgba(216, 177, 93, 0.95);
  background: rgba(41, 45, 32, 0.92);
  box-shadow:
    0 0 0 2px rgba(216, 177, 93, 0.26),
    0 8px 18px rgba(0, 0, 0, 0.2);
}

.answer-rows.has-selected-tile .answer-row-label,
.answer-rows.has-selected-tile .answer-row-list {
  border-color: rgba(216, 177, 93, 0.52);
}

.answer-rows.has-selected-tile .answer-row:hover .answer-row-label,
.answer-rows.has-selected-tile .answer-row:hover .answer-row-list {
  border-color: rgba(216, 177, 93, 0.88);
  background: rgba(216, 177, 93, 0.08);
}

.player-tile.drag-placeholder {
  opacity: 0.38;
}

.result-chip {
  position: absolute;
  top: 3px;
  right: 3px;
  display: none;
  min-width: 28px;
  min-height: 20px;
  place-items: center;
  border-radius: 999px;
  color: var(--black);
  font-size: 11px;
  font-weight: 800;
}

.result-correct {
  border-color: rgba(111, 208, 140, 0.78);
  background: rgba(24, 68, 46, 0.88);
}

.result-wrong {
  border-color: rgba(255, 129, 124, 0.82);
  background: rgba(76, 33, 34, 0.88);
}

.result-missing {
  border-color: rgba(216, 177, 93, 0.8);
  background: rgba(77, 61, 28, 0.82);
}

.result-correct .result-chip,
.result-wrong .result-chip,
.result-missing .result-chip {
  display: grid;
}

.result-correct .result-chip {
  background: var(--good);
}

.result-wrong .result-chip {
  background: var(--bad);
}

.result-missing .result-chip {
  background: var(--gold);
}

.row-correct .answer-row-label {
  border-color: rgba(111, 208, 140, 0.78);
  color: var(--good);
}

.row-wrong .answer-row-label {
  border-color: rgba(255, 129, 124, 0.82);
  color: var(--bad);
}

.row-missing .answer-row-label {
  border-color: rgba(216, 177, 93, 0.78);
}

.answer-row-label small {
  display: block;
  color: currentColor;
  font-size: 11px;
  font-weight: 800;
}

.drag-ghost {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  width: var(--ghost-width);
  transform: translate3d(var(--ghost-x), var(--ghost-y), 0) scale(1.02);
  opacity: 0.96;
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(216, 177, 93, 0.36);
}

.rank-badge {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--black);
  background: var(--gold);
  font-weight: 800;
}

.player-main {
  min-width: 0;
}

.player-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 800;
}

.seat-position {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.hand-summary,
.pot-summary {
  color: var(--muted);
  font-size: 13px;
  min-height: 18px;
}

.move-buttons {
  display: grid;
  gap: 6px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.feedback-line {
  min-height: 46px;
  display: flex;
  align-items: center;
  margin-top: 14px;
  padding: 10px 14px;
  color: var(--muted);
}

.feedback-line:empty {
  display: none;
}

.feedback-line.good {
  border-color: rgba(111, 208, 140, 0.55);
  color: var(--good);
}

.feedback-line.bad {
  border-color: rgba(255, 129, 124, 0.55);
  color: var(--bad);
}

.problem-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 29, 28, 0.9);
}

.problem-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.problem-panel h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.problem-expand {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.problem-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.problem-route {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(245, 241, 232, 0.14);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  font-size: 13px;
}

.route-chip strong {
  color: var(--gold);
  margin-right: 5px;
}

.street-list {
  display: grid;
  gap: 8px;
}

.pot-winner-picker {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(216, 177, 93, 0.26);
  border-radius: 8px;
  background: rgba(216, 177, 93, 0.07);
}

.pot-answer-step {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(216, 177, 93, 0.38);
  border-radius: 8px;
  background: rgba(216, 177, 93, 0.1);
}

.pot-answer-step > header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pot-answer-step > header > span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--black);
  background: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.pot-answer-step > header > strong {
  color: var(--text);
  font-size: 14px;
}

.pot-answer-step > header > small {
  margin-left: auto;
  color: var(--gold);
  font-weight: 800;
}

.pot-winner-picker.complete > header > small {
  color: #9ff0bc;
}

.pot-payout-step {
  padding: 8px 10px;
  border-color: rgba(47, 148, 215, 0.3);
  background: rgba(47, 148, 215, 0.07);
}

.pot-winner-rows {
  display: grid;
  gap: 7px;
}

.pot-winner-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.pot-winner-row > strong {
  color: var(--text);
  font-size: 12px;
}

.pot-winner-row > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pot-winner-choice {
  min-height: 28px;
  border: 1px solid rgba(245, 241, 232, 0.15);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.pot-winner-choice.active,
.pot-winner-row.correct .pot-winner-choice.active {
  border-color: rgba(75, 194, 132, 0.68);
  color: #9ff0bc;
  background: rgba(75, 194, 132, 0.14);
}

.pot-winner-row.wrong {
  border-left: 2px solid var(--bad);
  padding-left: 6px;
}

.pot-player.answer-winner-selected {
  border-color: rgba(75, 194, 132, 0.82);
  box-shadow: 0 0 0 3px rgba(75, 194, 132, 0.2), 0 4px 12px rgba(0, 0, 0, 0.18);
}

.street-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 10px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.action-route-link {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.action-route-link.active {
  border-color: rgba(216, 177, 93, 0.58);
  background: rgba(216, 177, 93, 0.12);
}

.street-item strong {
  color: var(--gold);
}

.street-item span {
  color: var(--text);
  line-height: 1.45;
}

.street-action {
  min-width: 0;
}

.street-stats {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.street-stats i {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(216, 177, 93, 0.22);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(216, 177, 93, 0.08);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.problem-detail-content {
  display: grid;
  gap: 12px;
}

.problem-detail-board {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.problem-detail-board strong {
  color: var(--gold);
}

.problem-route-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.problem-route-list li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 6px 10px;
  padding: 10px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.problem-route-list strong {
  color: var(--gold);
}

.problem-route-list span {
  color: var(--text);
  line-height: 1.5;
}

.problem-route-list small {
  grid-column: 2;
  color: var(--muted);
}

.position-summary-block {
  display: grid;
  gap: 8px;
}

.problem-subheading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.problem-subheading strong {
  color: var(--gold);
}

.problem-subheading span {
  color: var(--muted);
  font-size: 12px;
}

.position-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.position-summary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  padding: 8px 9px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.position-summary-item strong {
  min-width: 0;
  color: var(--text);
}

.position-summary-item span {
  color: var(--gold);
  font-weight: 900;
}

.position-summary-item small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.position-summary-item.folded {
  border-color: rgba(255, 129, 124, 0.24);
  background: rgba(255, 129, 124, 0.06);
}

.compact-answer-list li {
  padding: 8px 10px;
}

.mistake-panel {
  margin-top: 14px;
  padding: 14px;
}

.mistake-panel.hidden {
  display: none;
}

.mistake-panel h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.mistake-panel details {
  display: grid;
  gap: 10px;
}

.mistake-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-weight: 800;
}

.mistake-panel summary::-webkit-details-marker {
  display: none;
}

.mistake-panel summary::after {
  content: "展开";
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.mistake-panel details[open] summary {
  margin-bottom: 10px;
}

.mistake-panel details[open] summary::after {
  content: "收起";
}

.mistake-panel summary strong {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  border-radius: 999px;
  color: var(--black);
  background: var(--gold);
  font-size: 12px;
}

.answer-list,
.pot-layer-list,
.mistake-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.answer-list li,
.pot-layer-list li,
.mistake-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.pot-layer-list li {
  display: grid;
  justify-content: stretch;
}

.pot-layer-item {
  gap: 7px;
}

.pot-layer-item[hidden] {
  display: none;
}

.pot-layer-item > strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pot-layer-item > strong span {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.pot-layer-item > strong small {
  color: var(--text);
  font-size: 13px;
}

.pot-layer-item.focus-layer {
  border: 1px solid rgba(216, 177, 93, 0.36);
  background:
    linear-gradient(180deg, rgba(216, 177, 93, 0.1), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.06);
}

.layer-focus-badge {
  display: inline-grid;
  place-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--black) !important;
  background: var(--gold);
  font-size: 11px !important;
  font-weight: 900;
}

.layer-summary {
  color: var(--text);
}

.layer-detail-grid {
  display: grid;
  gap: 5px;
}

.layer-awards {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}

.layer-award-summary {
  display: grid;
  gap: 5px;
}

.layer-award-summary > span {
  color: var(--text);
}

.layer-award-summary > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.layer-award {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(75, 194, 132, 0.38);
  border-radius: 6px;
  color: var(--text);
  background: rgba(75, 194, 132, 0.1);
  font-size: 12px;
}

.layer-award em {
  color: #9ff0bc;
  font-style: normal;
  font-weight: 900;
}

.layer-award-summary small {
  color: var(--gold);
  line-height: 1.4;
}

.layer-note,
.payout-empty-row span {
  color: var(--muted);
}

.answer-list li span,
.pot-layer-list li span {
  min-width: 0;
  line-height: 1.55;
}

.result-modal .answer-list li {
  display: grid;
  justify-content: stretch;
}

.mistake-item {
  display: grid;
  justify-content: stretch;
}

.mistake-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.mistake-detail {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.analysis-content {
  display: grid;
  gap: 10px;
}

.pot-coach-content {
  gap: 12px;
}

.pot-layer-walkthrough {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(216, 177, 93, 0.32);
  border-radius: 8px;
  background: rgba(216, 177, 93, 0.08);
}

.coach-walkthrough-progress {
  display: grid;
  gap: 4px;
}

.coach-walkthrough-progress strong {
  color: var(--gold);
}

.coach-walkthrough-progress p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.coach-seat-map {
  display: grid;
  gap: 5px;
}

.coach-seat-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.coach-seat-map-header > strong {
  color: var(--muted);
  font-size: 12px;
}

.coach-seat-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.coach-seat-legend i {
  font-size: 10px;
  font-style: normal;
}

.coach-seat-legend .eligible {
  color: #a9dcff;
}

.coach-seat-legend .folded {
  color: #ffb7b2;
}

.coach-seat-legend .winner {
  color: #9ff0bc;
}

.coach-seat-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.coach-seat-token {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(245, 241, 232, 0.16);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
  font-size: 12px;
  font-weight: 800;
}

.coach-seat-token.eligible {
  border-color: rgba(47, 148, 215, 0.58);
  color: #a9dcff;
  background: rgba(47, 148, 215, 0.12);
}

.coach-seat-token.folded {
  border-color: rgba(255, 129, 124, 0.5);
  color: #ffb7b2;
  background: rgba(255, 129, 124, 0.09);
}

.coach-seat-token.winner {
  border-color: rgba(75, 194, 132, 0.62);
  color: #9ff0bc;
  background: rgba(75, 194, 132, 0.14);
}

.coach-walkthrough-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.coach-walkthrough-controls button {
  min-height: 34px;
}

.pot-layer-item.coach-active {
  animation: coach-layer-enter 180ms ease-out;
  box-shadow: inset 3px 0 0 var(--gold);
}

.pot-player.coach-layer-contributor {
  border-color: rgba(216, 177, 93, 0.48);
}

.pot-player.coach-layer-eligible {
  border-color: rgba(47, 148, 215, 0.72);
  box-shadow: 0 0 0 2px rgba(47, 148, 215, 0.14), 0 4px 10px rgba(0, 0, 0, 0.12);
}

.pot-player.coach-layer-folded {
  border-color: rgba(255, 129, 124, 0.7);
  box-shadow: 0 0 0 2px rgba(255, 129, 124, 0.12), 0 4px 10px rgba(0, 0, 0, 0.12);
}

.pot-player.coach-layer-winner {
  border-color: rgba(75, 194, 132, 0.8);
  box-shadow: 0 0 0 3px rgba(75, 194, 132, 0.18), 0 4px 12px rgba(0, 0, 0, 0.18);
}

@keyframes coach-layer-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.coach-diagnosis {
  border-color: rgba(75, 194, 132, 0.38);
  background:
    linear-gradient(180deg, rgba(75, 194, 132, 0.14), rgba(0, 0, 0, 0.2)),
    rgba(0, 0, 0, 0.22);
}

.coach-diagnosis strong {
  color: #9ff0bc;
}

.coach-memory {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.submission-review {
  border-color: rgba(255, 129, 124, 0.35);
  background:
    linear-gradient(180deg, rgba(255, 129, 124, 0.1), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.2);
}

.review-diagnosis {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.review-diagnosis b {
  color: var(--text);
}

.review-diagnosis ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}

.review-diagnosis li {
  padding-left: 2px;
}

.hand-review {
  border-color: rgba(255, 129, 124, 0.35);
  background:
    linear-gradient(180deg, rgba(255, 129, 124, 0.1), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.2);
}

.hand-analysis-content {
  gap: 10px;
}

.hand-analysis-board {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(216, 177, 93, 0.28);
  border-radius: 8px;
  background: rgba(216, 177, 93, 0.08);
}

.hand-analysis-board > strong {
  color: var(--gold);
}

.hand-key-compare {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.hand-key-compare p {
  margin: 0;
}

.hand-compare-grid {
  display: grid;
  gap: 8px;
}

.hand-compare-card {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.hand-compare-text {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
}

.hand-compare-text strong {
  color: var(--gold);
}

.hand-compare-card small,
.hand-compare-guide {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.hand-compare-guide {
  display: block;
  padding: 7px 8px;
  border-left: 2px solid rgba(47, 148, 215, 0.7);
  background: rgba(47, 148, 215, 0.08);
}

.hand-chop-note {
  margin-top: 7px;
  padding: 7px 8px;
  border-left: 2px solid rgba(47, 148, 215, 0.78);
  color: #b4e3ff;
  background: rgba(47, 148, 215, 0.1);
  line-height: 1.45;
}

.hand-chop-note b {
  color: var(--text);
}

.analysis-card-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.analysis-card-row .playing-card.small {
  flex: 0 0 auto;
  width: 26px;
  height: 36px;
  border-radius: 6px;
  font-size: 11px;
}

.hand-correct-order .answer-heading {
  background: rgba(216, 177, 93, 0.1);
}

.review-list {
  display: grid;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.review-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.review-row strong {
  color: var(--text);
}

.review-row.wrong span {
  color: var(--bad);
  font-weight: 800;
}

.review-copy {
  display: grid;
  gap: 3px;
  line-height: 1.35;
}

.review-copy b,
.review-copy em {
  font-style: normal;
}

.review-row.wrong .review-copy b {
  color: var(--bad);
}

.review-row.wrong .review-copy em {
  color: var(--good);
}

.review-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.review-row.correct span {
  color: var(--good);
  font-weight: 800;
}

.mistake-book {
  display: grid;
  gap: 10px;
}

.mistake-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mistake-filter,
.mistake-actions button {
  min-height: 30px;
  border: 1px solid rgba(245, 241, 232, 0.13);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.18);
  font-size: 12px;
}

.mistake-filter {
  padding: 0 9px;
}

.mistake-filter.active {
  color: #fff;
  border-color: rgba(216, 177, 93, 0.42);
  background: linear-gradient(90deg, rgba(227, 64, 159, 0.7), rgba(47, 148, 215, 0.7));
}

.mistake-record-list {
  display: grid;
  gap: 8px;
}

.mistake-record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(245, 241, 232, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.mistake-record-card.mastered {
  opacity: 0.72;
}

.mistake-record-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.mistake-record-main strong {
  color: var(--text);
}

.mistake-record-main span,
.mistake-record-main small,
.mistake-empty {
  color: var(--muted);
}

.mistake-record-main small {
  line-height: 1.4;
}

.mistake-actions {
  display: grid;
  grid-template-columns: repeat(3, auto);
  align-content: center;
  gap: 5px;
}

.mistake-actions button {
  padding: 0 8px;
  color: var(--text);
}

.mistake-actions button:hover,
.mistake-filter:hover {
  border-color: rgba(216, 177, 93, 0.38);
}

.mistake-empty {
  padding: 12px;
  border: 1px solid rgba(245, 241, 232, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.analysis-box {
  padding: 10px 12px;
  border: 1px solid rgba(245, 241, 232, 0.14);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
  line-height: 1.55;
}

.analysis-box strong {
  color: var(--gold);
}

.coach-analysis {
  display: grid;
  gap: 8px;
}

.coach-analysis p {
  margin: 0;
}

.coach-analysis b,
.pot-layer-list b {
  color: var(--text);
}

.pot-felt {
  padding: 12px;
}

.poker-table {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border: 10px solid rgba(77, 48, 25, 0.92);
  border-radius: 46%;
  background:
    radial-gradient(ellipse at center, rgba(22, 132, 96, 0.96) 0 36%, rgba(9, 70, 53, 0.98) 68%, #063226 100%),
    var(--felt);
  box-shadow:
    inset 0 0 0 8px rgba(245, 241, 232, 0.08),
    inset 0 0 42px rgba(0, 0, 0, 0.36),
    0 20px 36px rgba(0, 0, 0, 0.28);
}

.poker-table::before {
  content: "";
  position: absolute;
  inset: 15%;
  border: 1px solid rgba(245, 241, 232, 0.28);
  border-radius: 50%;
  pointer-events: none;
}

.table-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(440px, 43vw);
  min-height: 300px;
  display: grid;
  gap: 12px;
  justify-items: center;
  align-content: center;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.board-strip.compact {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 0;
  margin: 0;
}

.center-pot {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 170px;
  padding: 10px 14px;
  border: 1px solid rgba(245, 241, 232, 0.2);
  border-radius: 8px;
  background: rgba(7, 26, 23, 0.74);
}

.pot-title {
  color: var(--gold);
  font-size: 13px;
}

.center-pot strong {
  font-size: 28px;
  line-height: 1;
}

.pot-path {
  display: grid;
  gap: 6px;
  width: 100%;
}

.seat-action-panel {
  display: flex;
  width: 100%;
  gap: 5px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

.seat-action-panel::-webkit-scrollbar {
  display: none;
}

.seat-action-stage {
  min-height: 28px;
  flex: 1 0 auto;
  border: 1px solid rgba(245, 241, 232, 0.16);
  border-radius: 7px;
  padding: 0 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
  font-size: 11px;
  font-weight: 800;
}

.seat-action-stage.active {
  border-color: rgba(216, 177, 93, 0.65);
  color: var(--text);
  background: rgba(216, 177, 93, 0.14);
}

.pot-path-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(245, 241, 232, 0.14);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  font-size: 12px;
}

.pot-path-row strong {
  color: var(--text);
}

.table-seats {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.pot-player {
  position: absolute;
  width: 178px;
  display: grid;
  gap: 10px;
  padding: 10px;
  transform: translate(-50%, -50%);
}

.pot-player.folded {
  opacity: 0.74;
}

.pot-player.user-mucked {
  border-color: rgba(47, 148, 215, 0.48);
}

.seat-0 {
  left: 50%;
  top: 89%;
}

.seat-1 {
  left: 25%;
  top: 79%;
}

.seat-2 {
  left: 10%;
  top: 55%;
}

.seat-3 {
  left: 16%;
  top: 28%;
}

.seat-4 {
  left: 38%;
  top: 12%;
}

.seat-5 {
  left: 62%;
  top: 12%;
}

.seat-6 {
  left: 84%;
  top: 28%;
}

.seat-7 {
  left: 90%;
  top: 55%;
}

.seat-8 {
  left: 75%;
  top: 79%;
}

.pot-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.pot-meta:empty {
  display: none;
}

.seat-action {
  min-height: 22px;
  overflow: hidden;
  border: 1px solid rgba(245, 241, 232, 0.11);
  border-radius: 6px;
  padding: 3px 6px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.16);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-action.allin {
  border-color: rgba(255, 118, 84, 0.54);
  color: #ffb19c;
}

.seat-action.bet {
  border-color: rgba(216, 177, 93, 0.54);
  color: var(--gold);
}

.seat-action.call,
.seat-action.allin-call {
  border-color: rgba(47, 148, 215, 0.5);
  color: #a9dcff;
}

.seat-action.fold,
.seat-action.idle {
  opacity: 0.72;
}

.muck-controls {
  display: flex;
  justify-content: end;
}

.muck-controls:empty {
  display: none;
}

.muck-toggle {
  min-height: 28px;
  border: 1px solid rgba(245, 241, 232, 0.18);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font-size: 12px;
  font-weight: 800;
}

.muck-toggle.active {
  border-color: rgba(47, 148, 215, 0.72);
  background: rgba(47, 148, 215, 0.2);
}

.muck-toggle.correct {
  border-color: var(--good);
  color: var(--good);
}

.muck-toggle.wrong {
  border-color: var(--bad);
  color: var(--bad);
}

.muck-toggle:disabled {
  cursor: default;
  opacity: 0.86;
}

.chip-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--black);
  background: #f5f1e8;
  font-weight: 800;
}

.seat-chip-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chip-stack,
.chip-mound {
  position: relative;
  min-height: 26px;
  min-width: 72px;
}

.chip-mound {
  min-width: 112px;
  min-height: 34px;
}

.chip {
  position: absolute;
  left: calc(var(--i) * 8px);
  bottom: calc(var(--i) * 2px);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 3px dashed rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: #fff;
  background: var(--chip-color);
  box-shadow:
    inset 0 0 0 4px rgba(0, 0, 0, 0.18),
    0 3px 7px rgba(0, 0, 0, 0.28);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
}

.chip.small {
  width: 22px;
  height: 22px;
  border-width: 2px;
  font-size: 7px;
}

.payout-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
}

.payout-input.correct {
  border-color: var(--good);
}

.payout-input.wrong {
  border-color: var(--bad);
}

.muted {
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
}

.modal-backdrop.hidden {
  display: none;
}

.result-modal {
  position: relative;
  width: min(640px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  border: 1px solid rgba(216, 177, 93, 0.42);
  border-radius: 8px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(216, 177, 93, 0.08), transparent 120px),
    #171c1b;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-size: 22px;
  line-height: 1;
}

.modal-status {
  width: fit-content;
  margin: 0 0 10px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--black);
  background: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.modal-status.good {
  background: var(--good);
}

.modal-status.bad {
  background: var(--bad);
}

.result-modal h2 {
  margin: 0 42px 14px 0;
  font-size: 24px;
}

.modal-body {
  display: grid;
  gap: 10px;
}

.result-coach-content {
  display: grid;
  gap: 10px;
}

.coach-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(245, 241, 232, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.coach-banner.good {
  border-color: rgba(111, 208, 140, 0.48);
  background:
    linear-gradient(90deg, rgba(111, 208, 140, 0.16), rgba(47, 148, 215, 0.12)),
    rgba(255, 255, 255, 0.05);
}

.coach-banner.bad {
  border-color: rgba(255, 129, 124, 0.5);
  background:
    linear-gradient(90deg, rgba(255, 129, 124, 0.16), rgba(227, 64, 159, 0.12)),
    rgba(255, 255, 255, 0.05);
}

.coach-emoji {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(245, 241, 232, 0.12);
  font-size: 24px;
}

.coach-banner strong,
.coach-banner span {
  display: block;
}

.coach-banner strong {
  margin-bottom: 3px;
  color: var(--text);
  font-size: 17px;
}

.coach-banner span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.modal-action {
  width: 100%;
  margin-top: 16px;
}

.body-lock {
  overflow: hidden;
}

@media (min-width: 721px) {
  #potMode.active {
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    align-items: start;
    gap: 10px 12px;
  }

  #potMode .control-row {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  #potMode .problem-panel {
    grid-column: 1;
    grid-row: 2;
    max-height: min(560px, calc(100vh - 220px));
    overflow: auto;
    margin-bottom: 0;
  }

  #potMode .pot-felt {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    padding: 8px;
  }

  #potMode .feedback-line,
  #potMode .mistake-panel {
    grid-column: 1 / -1;
  }

  .poker-table {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(86px, auto));
    gap: 6px;
    overflow: visible;
    border-width: 7px;
    border-radius: 56px;
    padding: 10px;
  }

  .table-center {
    position: relative;
    left: auto;
    top: auto;
    grid-column: 2 / 4;
    grid-row: 2 / 4;
    width: 100%;
    min-height: 0;
    gap: 6px;
    transform: none;
    align-self: center;
  }

  .table-seats {
    position: static;
    display: contents;
  }

  .pot-player {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title chips"
      "cards cards"
      "action action"
      "meta muck"
      "input input";
    gap: 4px;
    padding: 5px;
    transform: none;
  }

  .pot-player .player-title {
    grid-area: title;
    min-width: 0;
    margin-bottom: 0;
    font-size: 12px;
  }

  .pot-player .seat-position {
    font-size: 11px;
  }

  .pot-player .seat-chip-area {
    grid-area: chips;
    justify-content: end;
    gap: 3px;
  }

  .pot-player .playing-card.small {
    width: 24px;
    height: 34px;
    font-size: 10px;
  }

  .pot-player .cards-row {
    grid-area: cards;
    min-height: 34px;
    gap: 4px;
  }

  .pot-player .pot-meta {
    grid-area: meta;
    font-size: 11px;
    gap: 6px;
  }

  .pot-player .seat-action {
    grid-area: action;
    min-height: 18px;
    padding: 2px 5px;
    font-size: 10px;
  }

  .pot-player .muck-controls {
    grid-area: muck;
  }

  .pot-player .muck-toggle {
    min-height: 22px;
    padding: 0 6px;
    font-size: 10px;
  }

  .pot-player .payout-input {
    grid-area: input;
    min-height: 28px;
    padding: 0 7px;
  }

  .pot-player .chip-stack {
    min-width: 34px;
    min-height: 18px;
  }

  .pot-player .chip {
    left: calc(var(--i) * 4px);
    width: 16px;
    height: 16px;
    border-width: 2px;
    font-size: 5px;
  }

  .pot-player .chip-pill {
    min-height: 20px;
    padding: 0 6px;
    font-size: 11px;
  }

  .table-center .board-strip.compact {
    display: flex;
    min-height: 34px;
    gap: 6px;
  }

  .table-center .cards-row {
    min-height: 38px;
    gap: 5px;
  }

  .table-center .playing-card {
    width: 28px;
    height: 38px;
    font-size: 11px;
  }

  .center-pot {
    min-width: 0;
    width: 100%;
    grid-template-columns: auto auto 1fr;
    justify-content: center;
    align-items: center;
    padding: 5px 8px;
  }

  .center-pot strong {
    font-size: 19px;
  }

  .chip-mound {
    min-width: 72px;
    min-height: 22px;
  }

  .chip-mound .chip {
    width: 18px;
    height: 18px;
    border-width: 2px;
    font-size: 6px;
  }

  .pot-path-row {
    grid-template-columns: 50px 1fr auto;
    gap: 5px;
    padding: 4px 6px;
    font-size: 11px;
  }

  .seat-0 {
    grid-column: 2 / 4;
    grid-row: 4;
    justify-self: center;
    width: 52%;
  }

  .seat-1 {
    grid-column: 1;
    grid-row: 4;
  }

  .seat-2 {
    grid-column: 1;
    grid-row: 3;
  }

  .seat-3 {
    grid-column: 1;
    grid-row: 2;
  }

  .seat-4 {
    grid-column: 2;
    grid-row: 1;
  }

  .seat-5 {
    grid-column: 3;
    grid-row: 1;
  }

  .seat-6 {
    grid-column: 4;
    grid-row: 2;
  }

  .seat-7 {
    grid-column: 4;
    grid-row: 3;
  }

  .seat-8 {
    grid-column: 4;
    grid-row: 4;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100vw - 8px, 1180px);
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .topbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 5px;
  }

  .eyebrow {
    display: none;
  }

  h1 {
    font-size: 18px;
    line-height: 1.1;
  }

  .brand-lockup {
    gap: 8px;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
    padding: 4px;
  }

  .scoreboard {
    width: 100%;
    justify-content: start;
    gap: 4px;
  }

  .scoreboard span {
    padding: 5px 7px;
    font-size: 12px;
  }

  .mode-tabs {
    padding: 3px;
    margin-bottom: 6px;
  }

  .trainer-toolbar {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 5px;
    margin-bottom: 6px;
  }

  .lobby-return {
    min-width: 0;
    min-height: 31px;
    padding: 0 6px;
    font-size: 13px;
  }

  .tab-button,
  .segment {
    min-height: 31px;
    font-size: 14px;
  }

  .training-lobby.active {
    gap: 6px;
  }

  .lobby-hero {
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 6px;
    padding: 8px;
  }

  .lobby-title h2 {
    font-size: 20px;
  }

  .daily-progress {
    gap: 5px;
    padding: 7px;
  }

  .daily-progress span {
    font-size: 11px;
  }

  .daily-progress strong {
    font-size: 17px;
  }

  .progress-track {
    height: 6px;
  }

  .lobby-track {
    gap: 8px;
  }

  .track-heading {
    display: grid;
    gap: 4px;
  }

  .track-heading h3 {
    font-size: 18px;
  }

  .track-heading p {
    max-width: none;
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
  }

  .rule-panel {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 8px;
  }

  .rule-panel .panel-heading {
    min-height: 0;
    margin-bottom: 0;
  }

  .rule-options {
    gap: 3px;
    padding: 3px;
  }

  .rule-button {
    min-height: 30px;
    font-size: 13px;
  }

  .rule-hint {
    font-size: 12px;
    line-height: 1.35;
  }

  .lobby-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .lobby-card {
    min-height: 92px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: center;
    align-items: center;
    gap: 3px 10px;
    padding: 10px;
  }

  .lobby-card .track-kicker,
  .lobby-card strong,
  .lobby-card small {
    grid-column: 1;
  }

  .lobby-card strong {
    font-size: 19px;
  }

  .lobby-card small {
    font-size: 12px;
  }

  .mini-card-row,
  .mini-chip-row {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
  }

  .mini-card-row i {
    width: 26px;
    height: 36px;
    font-size: 12px;
  }

  .mini-chip-row i {
    width: 27px;
    height: 27px;
    border-width: 2px;
    font-size: 8px;
  }

  .lobby-bottom {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .daily-task-panel,
  .quick-panel {
    padding: 8px;
  }

  .task-list,
  .quick-panel {
    gap: 5px;
  }

  .task-row,
  .quick-entry {
    min-height: 31px;
    padding: 0 8px;
    font-size: 12px;
  }

  .mistake-filter-row {
    gap: 4px;
  }

  .mistake-filter {
    min-height: 28px;
    padding: 0 7px;
    font-size: 11px;
  }

  .mistake-record-card {
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 8px;
  }

  .mistake-record-main {
    font-size: 12px;
  }

  .mistake-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mistake-actions button {
    min-height: 28px;
    padding: 0 4px;
    font-size: 11px;
  }

  .control-row {
    align-items: stretch;
    gap: 5px;
    margin-bottom: 6px;
  }

  .control-field,
  .segmented,
  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }

  .trainer-toolbar .lobby-return {
    width: auto;
  }

  .control-field {
    grid-template-columns: auto 1fr 28px;
  }

  .segmented {
    grid-template-columns: repeat(6, 1fr);
  }

  #potMode .control-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  #potMode .segmented {
    grid-column: 1 / -1;
  }

  #potMode .primary-button,
  #potMode .secondary-button,
  #potMode .ghost-button {
    min-height: 30px;
    padding: 0 6px;
    font-size: 13px;
  }

  #handMode .control-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #handMode .control-field {
    grid-column: 1 / -1;
    min-height: 32px;
    padding: 4px 8px;
  }

  #handMode .primary-button,
  #handMode .secondary-button,
  #handMode .ghost-button {
    min-height: 34px;
    padding: 0 6px;
    font-size: 14px;
  }

  .felt-surface {
    padding: 12px;
  }

  #handMode .felt-surface {
    min-height: 0;
    padding: 6px;
  }

  #handMode .board-strip {
    display: flex;
    min-height: 42px;
    margin-bottom: 4px;
    gap: 6px;
  }

  #handMode .strip-label {
    font-size: 12px;
  }

  #handMode .cards-row {
    min-height: 36px;
    gap: 4px;
  }

  #handMode .board-strip .playing-card {
    width: 29px;
    height: 40px;
    border-radius: 6px;
    font-size: 12px;
  }

  #handMode .task-prompt {
    margin-bottom: 5px;
    padding: 4px 8px;
    font-size: 12px;
  }

  .pot-felt {
    padding: 3px;
  }

  .problem-panel {
    max-height: min(30vh, 230px);
    overflow: auto;
    gap: 6px;
    margin-bottom: 6px;
    padding: 8px;
  }

  .achievement-dashboard {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .achievement-card {
    min-height: 0;
    gap: 8px;
    padding: 10px;
  }

  .achievement-heading h3 {
    font-size: 18px;
  }

  .spotlight-rank,
  .spotlight-empty {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 12px;
  }

  .home-honor-counts strong {
    padding: 7px 4px;
  }

  .problem-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    position: sticky;
    top: -8px;
    z-index: 1;
    padding: 0 0 4px;
    background: rgba(24, 29, 28, 0.96);
  }

  .problem-panel h2 {
    font-size: 12px;
  }

  .problem-expand {
    min-height: 28px;
    padding: 0 7px;
    font-size: 11px;
  }

  .problem-note {
    display: none;
  }

  .street-list {
    gap: 5px;
  }

  .street-item {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 4px 6px;
    padding: 6px;
    font-size: 11px;
  }

  .street-item span {
    line-height: 1.35;
  }

  .street-stats {
    gap: 4px;
  }

  .street-stats i {
    min-height: 18px;
    padding: 0 5px;
    font-size: 9px;
  }

  .problem-subheading {
    display: grid;
    gap: 2px;
  }

  .position-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .position-summary-item {
    padding: 7px;
    font-size: 12px;
  }

  .board-strip {
    display: grid;
    justify-items: center;
  }

  .hand-workbench {
    grid-template-columns: minmax(86px, 0.36fr) minmax(0, 1fr);
    gap: 5px;
  }

  .hand-column {
    padding: 4px;
  }

  .column-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 4px;
    font-size: 11px;
  }

  .column-heading small {
    display: none;
  }

  .hand-drop-list {
    min-height: 36px;
    border-radius: 6px;
  }

  .hand-source-list,
  .answer-rows {
    gap: 4px;
  }

  .hand-source-list {
    grid-template-columns: minmax(0, 1fr);
    min-height: 36px;
  }

  .answer-row {
    display: block;
    min-height: 38px;
  }

  .answer-row-label {
    position: absolute;
    inset: 0;
    min-height: 0;
    border: 0;
    font-size: 10px;
  }

  .answer-row-label span {
    display: none;
  }

  .answer-row-list {
    gap: 3px;
    min-height: 38px;
    padding: 3px 4px;
  }

  .answer-row-list::before {
    left: 8px;
    font-size: 19px;
  }

  .answer-row-list .player-tile {
    width: auto;
    flex: 1 1 76px;
    max-width: 112px;
  }

  .hand-workbench .player-tile {
    grid-template-columns: auto 1fr;
    min-height: 36px;
    gap: 4px;
    padding: 3px;
    border-radius: 6px;
  }

  .hand-workbench .rank-badge {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .hand-workbench .player-title {
    display: none;
    gap: 0;
    margin-bottom: 0;
    font-size: 12px;
  }

  .hand-workbench .player-main {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .hand-workbench .hand-summary {
    display: none;
    min-height: 0;
  }

  .hand-workbench .cards-row {
    min-height: 28px;
    gap: 3px;
  }

  #handMode .hand-workbench .cards-row {
    min-height: 28px;
    gap: 3px;
  }

  .hand-workbench .playing-card.small {
    width: 19px;
    height: 27px;
    border-radius: 5px;
    font-size: 10px;
  }

  .hand-source-list .player-tile {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: stretch;
    min-height: 38px;
    gap: 3px;
    padding: 3px 4px;
  }

  .hand-source-list .rank-badge {
    position: static;
    width: 16px;
    height: 16px;
    font-size: 9px;
  }

  .hand-source-list .cards-row {
    min-height: 27px;
    gap: 2px;
    flex-wrap: nowrap;
    justify-content: center;
  }

  .hand-source-list .playing-card.small {
    width: 19px;
    height: 27px;
    font-size: 10px;
  }

  .result-chip {
    min-width: 24px;
    min-height: 18px;
    font-size: 10px;
  }

  .hand-workbench .card-face {
    gap: 1px;
  }

  #handMode .feedback-line {
    min-height: 34px;
    margin-top: 6px;
    padding: 6px 8px;
    font-size: 12px;
  }

  .move-buttons {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, 1fr);
  }

  .icon-button {
    width: 100%;
  }

  .poker-table {
    min-height: 0;
    display: grid;
    gap: 4px;
    overflow: visible;
    border-width: 4px;
    border-radius: 8px;
    padding: 5px;
  }

  .poker-table::before {
    display: none;
  }

  .table-center {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    min-height: 0;
    gap: 4px;
    transform: none;
  }

  .table-center .board-strip.compact {
    display: flex;
    min-height: 30px;
    gap: 5px;
  }

  .table-center .cards-row {
    min-height: 32px;
    gap: 4px;
  }

  .table-center .playing-card {
    width: 24px;
    height: 32px;
    border-radius: 5px;
    font-size: 10px;
  }

  .center-pot {
    width: 100%;
    min-width: 0;
    grid-template-columns: auto auto 1fr;
    justify-content: center;
    align-items: center;
    padding: 4px 6px;
  }

  .center-pot strong {
    font-size: 16px;
  }

  .chip-mound {
    min-width: 58px;
    min-height: 18px;
  }

  .chip-mound .chip {
    width: 14px;
    height: 14px;
    border-width: 2px;
    font-size: 5px;
  }

  .pot-path-row {
    grid-template-columns: 40px 1fr auto;
    gap: 3px;
    padding: 3px 4px;
    font-size: 9px;
    line-height: 1.2;
  }

  .pot-path-row span:last-child {
    grid-column: auto;
  }

  .table-seats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
  }

  .pot-player {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "title chips"
      "cards cards"
      "action action"
      "meta muck"
      "input input";
    gap: 2px;
    padding: 3px;
    transform: none;
  }

  .pot-player .playing-card.small {
    width: 20px;
    height: 28px;
    border-radius: 5px;
    font-size: 9px;
  }

  .pot-player .cards-row {
    grid-area: cards;
    min-height: 28px;
    gap: 3px;
  }

  .pot-meta {
    grid-area: meta;
    display: flex;
    justify-content: space-between;
    gap: 1px;
    font-size: 9px;
    line-height: 1.2;
  }

  .pot-player .seat-action {
    grid-area: action;
    min-height: 14px;
    padding: 1px 3px;
    border-radius: 4px;
    font-size: 8px;
  }

  .pot-player .muck-controls {
    grid-area: muck;
  }

  .pot-player .muck-toggle {
    min-height: 15px;
    padding: 0 4px;
    font-size: 8px;
  }

  .pot-player .player-title {
    grid-area: title;
    display: flex;
    gap: 3px;
    margin-bottom: 0;
    font-size: 10px;
    line-height: 1.05;
  }

  .pot-player .player-title span {
    white-space: nowrap;
  }

  .pot-player .seat-position {
    font-size: 10px;
  }

  .pot-player .seat-chip-area {
    grid-area: chips;
    justify-content: end;
    gap: 2px;
  }

  .chip-pill {
    min-height: 18px;
    padding: 0 5px;
    font-size: 10px;
  }

  .chip-stack {
    min-width: 28px;
    min-height: 17px;
  }

  .chip {
    left: calc(var(--i) * 3px);
    width: 13px;
    height: 13px;
    border-width: 2px;
    font-size: 4px;
  }

  .payout-input {
    grid-area: input;
    min-height: 24px;
    padding: 0 5px;
    font-size: 11px;
  }

  .seat-0 {
    left: auto;
    top: auto;
  }

  .seat-1 {
    left: auto;
    top: auto;
  }

  .seat-2 {
    left: auto;
    top: auto;
  }

  .seat-3 {
    left: auto;
    top: auto;
  }

  .seat-4 {
    left: auto;
    top: auto;
  }

  .seat-5 {
    left: auto;
    top: auto;
  }

  .seat-6 {
    left: auto;
    top: auto;
  }

  .seat-7 {
    left: auto;
    top: auto;
  }

  .seat-8 {
    left: auto;
    top: auto;
  }

  .result-modal {
    width: min(100%, calc(100vw - 18px));
    max-height: min(86vh, 760px);
    padding: 14px;
  }

  .result-modal h2 {
    margin-right: 36px;
    margin-bottom: 10px;
    font-size: 20px;
    line-height: 1.2;
  }

  .modal-status {
    margin-bottom: 8px;
    padding: 5px 9px;
    font-size: 12px;
  }

  .modal-body {
    gap: 8px;
  }

  .answer-list,
  .pot-layer-list,
  .mistake-list {
    gap: 6px;
  }

  .answer-list li,
  .pot-layer-list li,
  .mistake-item,
  .analysis-box {
    padding: 8px 9px;
    font-size: 13px;
  }

  .answer-list li span,
  .pot-layer-list li span,
  .analysis-box {
    line-height: 1.45;
  }

  .coach-analysis {
    gap: 6px;
  }

  .coach-step-list {
    gap: 5px;
    padding-left: 18px;
  }

  .pot-coach-content {
    gap: 8px;
  }

  .review-row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 7px 8px;
  }

  .layer-detail-grid {
    gap: 4px;
  }

  .pot-layer-item > strong small {
    font-size: 12px;
  }
}
