*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* ── Brand Colors ── */
  --felt-dark: #1a3a2a;
  --felt-mid: #1f4a2e;
  --felt-light: #2d5a3e;
  --gold: #c9a84c;
  --gold-light: #e4c76b;
  --gold-dark: #a68a3e;

  /* ── Text ── */
  --text-primary: #f0e6d3;
  --text-secondary: #b8a890;
  --text-muted: #a09078;
  --font-display: 'Noto Serif SC', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ── Surface Hierarchy ── */
  --surface-elevated: rgba(255,255,255,0.06);
  --surface-base: rgba(255,255,255,0.035);
  --surface-inset: rgba(0,0,0,0.2);
  --surface-border: rgba(201,168,76,0.12);
  --surface-border-hover: rgba(201,168,76,0.25);
  --card-bg: var(--surface-base);
  --card-border: var(--surface-border);
  --card-bg-hover: var(--surface-elevated);

  /* ── Shadows ── */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);

  /* ── Misc ── */
  --red: #d94a4a;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--felt-dark);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography Scale ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.02em;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--felt-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 3px;
}

::selection {
  background: var(--gold);
  color: var(--felt-dark);
}

/* ── App Shell ── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-main {
  flex: 1;
  padding-top: 60px;
}

/* ── NavBar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: linear-gradient(180deg, rgba(26,58,42,0.99) 0%, rgba(26,58,42,0.94) 100%);
  backdrop-filter: blur(16px) saturate(120%);
  border-bottom: 1px solid rgba(201,168,76,0.15);
  height: 60px;
}

.navbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; gap: 8px;
}

.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-primary);
  flex-shrink: 0; margin-right: 16px;
}

.navbar-logo {
  font-size: 20px; color: var(--gold); font-weight: 900;
  letter-spacing: 2px; font-family: var(--font-display);
}

.navbar-title {
  font-size: 16px; font-weight: 700; white-space: nowrap;
  font-family: var(--font-display);
}

.navbar-links {
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto; flex: 1;
  -webkit-overflow-scrolling: touch;
}

.navbar-links::-webkit-scrollbar { height: 0; }

.navbar-link {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: 8px;
  text-decoration: none; color: var(--text-secondary);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: all var(--transition);
  position: relative;
}

.navbar-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.navbar-link.active {
  color: var(--gold);
  background: rgba(201,168,76,0.08);
}

/* Active indicator dot */
.navbar-link.active::after {
  content: '';
  position: absolute; bottom: -1px; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

.navbar-link-icon { font-size: 14px; }

.navbar-toggle {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer;
  padding: 8px; margin-left: auto;
}

.navbar-toggle-bar {
  width: 20px; height: 2px; background: var(--text-primary);
  border-radius: 1px; transition: all 0.25s;
}

.navbar-toggle.open .navbar-toggle-bar:nth-child(1) { transform: rotate(45deg) translate(4px,4px); }
.navbar-toggle.open .navbar-toggle-bar:nth-child(2) { opacity: 0; }
.navbar-toggle.open .navbar-toggle-bar:nth-child(3) { transform: rotate(-45deg) translate(4px,-4px); }

@media (max-width: 768px) {
  .navbar-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 58, 42, 0.98);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 199;
  }
  .navbar-links.open { transform: translateX(0); }
  .navbar-link { padding: 14px 16px; font-size: 15px; border-radius: 12px; }
  .navbar-toggle { display: flex; }
}

/* ── Beginner Module Sidebar ── */
.bsidebar {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
}

.bsidebar-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.bsidebar-line {
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(201, 168, 76, 0.15);
  z-index: 0;
}

.bsidebar-track {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}

.bsidebar-dot {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  color: var(--text-muted);
  transition: color var(--transition);
  text-align: left;
}

.bsidebar-dot:hover { color: var(--text-secondary); }
.bsidebar-dot.active { color: var(--gold); }
.bsidebar-dot.done { color: var(--text-secondary); }
.bsidebar-dot.active .bsidebar-dot-num { background: var(--gold); color: var(--felt-dark); }
.bsidebar-dot.done .bsidebar-dot-num { background: rgba(201,168,76,0.3); color: var(--text-primary); }

.bsidebar-dot-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--transition);
}

.bsidebar-dot-label {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  display: none;
}

.bsidebar-dot.active .bsidebar-dot-label,
.bsidebar-dot:hover .bsidebar-dot-label { display: inline; }

@media (max-width: 768px) {
  .bsidebar { display: none; }
}

/* ── Hero Section ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse at 80% 20%, rgba(31, 74, 46, 0.6) 0%, transparent 50%);
}

.hero-bg-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-card-float {
  position: absolute;
  font-size: 64px;
  font-weight: 900;
  opacity: 0.06;
  animation: floatCard 8s ease-in-out infinite;
}

.hero-card-1 { top: 15%; left: 10%; animation-delay: 0s; }
.hero-card-2 { top: 20%; right: 12%; animation-delay: -2s; }
.hero-card-3 { bottom: 25%; left: 15%; animation-delay: -4s; color: #d94a4a; }
.hero-card-4 { bottom: 20%; right: 10%; animation-delay: -6s; }

@keyframes floatCard {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-content {
  text-align: center;
  z-index: 1;
  padding: 0 24px;
  max-width: 640px;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-kicker {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 6px;
  color: var(--gold);
  margin-bottom: 24px;
  font-weight: 500;
  animation: fadeIn 0.6s 0.3s ease-out both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-title {
  margin-bottom: 24px;
}

.hero-title-line {
  display: block;
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 2px;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-weight: 400;
  animation: fadeIn 0.6s 0.6s ease-out both;
}

.hero-start-btn {
  padding: 16px 48px;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--felt-dark);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.3);
  transition: box-shadow var(--transition), transform 0.15s;
  animation: fadeIn 0.6s 0.9s ease-out both;
}

.hero-start-btn:hover {
  box-shadow: 0 6px 30px rgba(201, 168, 76, 0.5);
  transform: scale(1.05);
}

.hero-start-btn:active {
  transform: scale(0.97);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  animation: fadeIn 0.6s 1.5s ease-out both;
}

.hero-scroll-arrow {
  font-size: 20px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ── Chapter (shared) ── */
.chapter,
.bchapter {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  position: relative;
}

.chapter-inner,
.bchapter-inner {
  max-width: 720px;
  width: 100%;
}

/* ── Beginner Module Layout ── */
.module-beginner {
  display: flex;
}

.module-beginner-main {
  flex: 1;
  margin-left: 200px;
}

@media (max-width: 768px) {
  .module-beginner-main {
    margin-left: 0;
  }
}

/* ── Placeholder Module ── */
.module-placeholder {
  min-height: calc(100vh - 200px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}

.module-placeholder-inner {
  text-align: center; max-width: 420px;
}

.module-placeholder-icon {
  font-size: 72px; display: block;
  margin-bottom: 24px; opacity: 0.6;
  filter: grayscale(0.3);
}

.module-placeholder-inner h2 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 900; margin-bottom: 12px;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.module-placeholder-inner p {
  font-size: 15px; color: var(--text-secondary);
  line-height: 1.8; margin-bottom: 28px;
}

.module-placeholder-badge {
  display: inline-block;
  padding: 10px 28px; border-radius: 50px;
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  color: var(--gold); font-size: 13px;
  font-weight: 600; letter-spacing: 0.05em;
  position: relative;
}

.module-placeholder-badge::before {
  content: '';
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--gold);
  margin-right: 8px; vertical-align: middle;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid rgba(201,168,76,0.08);
  padding: 36px 24px; margin-top: 60px;
  background: var(--surface-inset);
}

.site-footer-inner {
  max-width: 1200px; margin: 0 auto; text-align: center;
}

.site-footer-brand {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; font-size: 17px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 10px;
  font-family: var(--font-display);
}

.site-footer-brand span:first-child {
  color: var(--gold); font-size: 20px;
}

.site-footer-text {
  font-size: 13px; color: var(--text-secondary); margin-bottom: 6px;
}

.site-footer-copy {
  font-size: 11px; color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════
   Button System (global)
   ═══════════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 32px; font-size: 15px; font-weight: 700;
  font-family: var(--font-body); border: none;
  border-radius: 50px; cursor: pointer;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--felt-dark);
  box-shadow: 0 2px 12px rgba(201,168,76,0.2);
  transition: all var(--transition);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(201,168,76,0.35); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 28px; font-size: 14px; font-weight: 600;
  font-family: var(--font-body);
  border-radius: 50px; cursor: pointer;
  background: transparent; color: var(--gold);
  border: 1.5px solid rgba(201,168,76,0.3);
  transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--gold); background: rgba(201,168,76,0.06); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 16px; font-size: 13px; font-weight: 500;
  font-family: var(--font-body);
  border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--text-secondary); border: none;
  transition: all var(--transition);
}
.btn-ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }

.chapter-header {
  text-align: center;
  margin-bottom: 48px;
}

.chapter-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.chapter-num {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 500;
}

.chapter-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 900;
  margin-bottom: 16px;
  background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.chapter-summary {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.8;
}

.chapter-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 48px;
}

.chapter-extra {
  margin-bottom: 48px;
}

.chapter-continue-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 50px;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  transition: all var(--transition);
}

.chapter-continue-btn:hover {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
  transform: scale(1.02);
}

.chapter-continue-btn:active {
  transform: scale(0.98);
}

.chapter-continue-arrow {
  font-size: 18px;
  animation: bounce 1.5s ease-in-out infinite;
}

/* ── Expandable Card ── */
.expandable-card {
  background: var(--surface-base);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  animation: fadeInUp 0.4s ease-out both;
}

.expandable-card:hover {
  background: var(--surface-elevated);
  border-color: var(--surface-border-hover);
}

.expandable-card.expanded {
  border-color: rgba(201,168,76,0.35);
  background: rgba(201,168,76,0.04);
  box-shadow: var(--shadow-sm);
}

.expandable-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  gap: 16px;
}

.expandable-trigger-title {
  flex: 1;
}

.expandable-chevron {
  font-size: 12px;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.25s;
}

.expandable-chevron.open {
  transform: rotate(180deg);
}

.expandable-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.35s ease-in-out, opacity 0.3s ease-in-out, padding 0.3s;
}

.expandable-body.open {
  max-height: 2000px;
  opacity: 1;
}

.expandable-content {
  padding: 0 24px 24px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.expandable-content p {
  margin-bottom: 12px;
}

.expandable-content p:last-child {
  margin-bottom: 0;
}

.expandable-content strong {
  color: var(--gold-light);
  font-weight: 600;
}

.expandable-content em {
  color: var(--text-primary);
  font-style: normal;
  background: rgba(201, 168, 76, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
}

/* ── Playing Card ── */
.pcard {
  width: 72px;
  height: 104px;
  border-radius: 8px;
  background: #fff;
  position: relative;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  flex-shrink: 0;
  animation: cardDeal 0.4s ease-out;
}

@keyframes cardDeal {
  from { opacity: 0; transform: translateY(-10px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.pcard.pcard-sm {
  width: 56px;
  height: 80px;
  border-radius: 6px;
}

.pcard.pcard-tbl {
  width: 60px;
  height: 86px;
  border-radius: 7px;
}

.pcard.pcard-lg {
  width: 100px;
  height: 144px;
  border-radius: 10px;
}

.pcard-face-down {
  background: linear-gradient(135deg, #1a3a6e 0%, #1e4294 50%, #1a3a6e 100%);
  border: 2px solid #2a5ab8;
}

.pcard-back-pattern {
  width: 80%;
  height: 85%;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pcard-back-icon {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.12);
  letter-spacing: 2px;
  transform: rotate(-30deg);
}

.pcard-corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.pcard-corner-tl {
  top: 6px;
  left: 7px;
}

.pcard-corner-br {
  bottom: 6px;
  right: 7px;
  transform: rotate(180deg);
}

.pcard-rank {
  font-size: 16px;
  font-weight: 900;
  font-family: 'Georgia', serif;
}

.pcard-sm .pcard-rank { font-size: 13px; }
.pcard-tbl .pcard-rank { font-size: 14px; }
.pcard-lg .pcard-rank { font-size: 20px; }

.pcard-suit {
  font-size: 14px;
  margin-top: -2px;
}

.pcard-sm .pcard-suit { font-size: 11px; }
.pcard-tbl .pcard-suit { font-size: 12px; }
.pcard-lg .pcard-suit { font-size: 18px; }

.pcard-center-suit {
  font-size: 28px;
}

.pcard-sm .pcard-center-suit { font-size: 22px; }
.pcard-tbl .pcard-center-suit { font-size: 24px; }
.pcard-lg .pcard-center-suit { font-size: 38px; }

.pcard-red { color: #d94a4a; }
.pcard-black { color: #1a1a2e; }

.pcard-pair {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.pcard-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Poker Table (Realistic) ── */
.poker-table-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  border: 1px solid rgba(201, 168, 76, 0.12);
  padding: 24px 16px 20px;
}

/* Scene wrapper */
.pt-scene {
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

/* ── The Table ── */
.pt-table {
  position: relative;
  width: 100%;
  max-width: 640px;
  min-height: 500px;
  /* Green felt background */
  background: radial-gradient(ellipse at 50% 50%, #1a6b30 0%, #145c24 40%, #0f4d1d 100%);
  /* Oval shape via border-radius */
  border-radius: 50%;
  /* Brown rail (outer ring) simulated with box-shadow */
  box-shadow:
    0 0 0 14px #5c3d2e,
    0 0 0 18px #7a5540,
    0 0 0 22px #4a2f22,
    0 0 0 26px #6b4835,
    0 0 0 30px #3d2419,
    0 0 0 32px rgba(0,0,0,0.3),
    0 8px 32px rgba(0,0,0,0.5);
  margin: 34px;
  overflow: visible;
}

/* Inner felt shadow */
.pt-table::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 100px rgba(0,0,0,0.5);
  pointer-events: none;
  z-index: 1;
}

/* ── Seats ── */
.pt-seat {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

/* Top seat (opponent) — pushed up to 2% from top */
.pt-seat-top {
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
}
.pt-seat-top .pt-seat-label { order: 1; }
.pt-seat-top .pt-seat-chips { order: 2; }
.pt-seat-top .pt-seat-cards { order: 3; }

/* Bottom seat (player) — pushed down to 2% from bottom */
.pt-seat-bottom {
  bottom: 2%;
  left: 50%;
  transform: translateX(-50%);
  flex-direction: column;
}
.pt-seat-bottom .pt-seat-cards { order: 1; }
.pt-seat-bottom .pt-seat-chips { order: 2; }
.pt-seat-bottom .pt-seat-label { order: 3; }

/* Side seats */
.pt-seat-left {
  top: 50%;
  left: 10%;
  transform: translate(-50%, -50%);
}
.pt-seat-right {
  top: 50%;
  right: 10%;
  transform: translate(50%, -50%);
}

.pt-seat-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.pt-seat-empty {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 400;
}

.pt-seat-chips {
  font-size: 9px;
  letter-spacing: -2px;
  opacity: 0.85;
  white-space: nowrap;
  line-height: 1;
}

.pt-seat-cards {
  display: flex;
  gap: 5px;
  justify-content: center;
}

/* Hide card areas for side seats */
.pt-seat-left .pt-seat-cards,
.pt-seat-right .pt-seat-cards {
  display: none;
}

/* ── Community Cards ── positioned in upper-center */
.pt-community {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 5px;
  z-index: 4;
}

.pt-empty-slot {
  width: 42px;
  height: 60px;
  border-radius: 4px;
  border: 1px dashed rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  flex-shrink: 0;
}

/* ── Pot ── positioned between community and bottom seat */
.pt-pot {
  position: absolute;
  top: 46%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 4;
  pointer-events: none;
}

.pt-pot-chips {
  font-size: 11px;
  letter-spacing: -3px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  line-height: 1;
}

.pt-pot-text {
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(0,0,0,0.5);
  padding: 2px 10px;
  border-radius: 10px;
  line-height: 1.3;
}

.pt-pot-text strong {
  color: var(--gold-light);
  font-size: 14px;
}

/* ── Dealer Button ── */
.pt-dealer-btn {
  position: absolute;
  bottom: 12%;
  right: 18%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff 0%, #ccc 100%);
  color: #1a1a2e;
  font-size: 12px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  border: 2px solid #aaa;
}

/* ── Blinds ── */
.pt-blind {
  position: absolute;
  z-index: 5;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid;
}

.pt-blind-sb {
  top: 12%;
  left: 32%;
  background: #2a6496;
  color: #fff;
  border-color: #1a4a76;
}

.pt-blind-bb {
  top: 12%;
  left: 42%;
  background: #8b2a2a;
  color: #fff;
  border-color: #6a1a1a;
}

/* ── Step Info ── */
.pt-step-info {
  margin-top: 40px;
  text-align: center;
  animation: fadeIn 0.3s ease-out;
}

.pt-step-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.pt-step-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Controls ── */
.pt-controls {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.pt-next-btn,
.pt-reset-btn {
  padding: 12px 36px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
}

.pt-next-btn {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--felt-dark);
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.25);
}

.pt-next-btn:hover {
  box-shadow: 0 6px 24px rgba(201, 168, 76, 0.4);
  transform: scale(1.03);
}

.pt-next-btn:active {
  transform: scale(0.97);
}

.pt-reset-btn {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.3);
}

.pt-reset-btn:hover {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.08);
  transform: scale(1.03);
}

/* ── Mobile: scale down poker table ── */
@media (max-width: 640px) {
  .pt-table {
    max-width: 100%;
    min-height: 320px;
    box-shadow:
      0 0 0 8px #5c3d2e,
      0 0 0 11px #7a5540,
      0 0 0 14px #4a2f22,
      0 0 0 17px #6b4835,
      0 0 0 20px #3d2419,
      0 0 0 21px rgba(0,0,0,0.3),
      0 4px 20px rgba(0,0,0,0.5);
    margin: 22px;
  }
  .pt-seat-label { font-size: 10px; }
  .pt-seat-chips { font-size: 7px; }
  .pt-community { gap: 2px; top: 34%; }
  .pt-pot { top: 44%; }
  .pt-empty-slot { width: 28px; height: 40px; }
  .pt-dealer-btn { width: 20px; height: 20px; font-size: 10px; bottom: 18%; right: 22%; }
  .pt-blind { width: 16px; height: 16px; font-size: 7px; }
  .pt-blind-sb { top: 10%; left: 30%; }
  .pt-blind-bb { top: 10%; left: 40%; }
  .pt-step-info { margin-top: 28px; }
  .pcard-tbl { width: 42px !important; height: 60px !important; border-radius: 5px !important; }
  .pcard-tbl .pcard-rank { font-size: 11px !important; }
  .pcard-tbl .pcard-suit { font-size: 9px !important; }
  .pcard-tbl .pcard-center-suit { font-size: 18px !important; }
  .pcard-sm { width: 42px !important; height: 60px !important; }
  .pcard-sm .pcard-rank { font-size: 11px !important; }
  .pcard-sm .pcard-suit { font-size: 9px !important; }
  .pcard-sm .pcard-center-suit { font-size: 18px !important; }
}
.winner-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--felt-dark);
  font-size: 12px;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 20px;
  animation: popIn 0.3s ease-out;
}

@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* ── Chapter Fade In ── */
.chapter-inner-animated,
.bchapter-inner {
  animation: fadeInUp 0.6s ease-out both;
}

/* ═══════════════════════════════════════════════════════
   Module Page Header (shared)
   ═══════════════════════════════════════════════════════ */
.module-page-header {
  text-align: center;
  padding: 56px 24px 28px;
}

.module-page-title {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 900;
  margin-bottom: 10px;
  font-family: var(--font-display);
}

.module-page-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Gold divider below page header */
.module-page-header::after {
  content: '';
  display: block;
  width: 48px; height: 2px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 1px;
}

/* ═══════════════════════════════════════════════════════
   Module: Hands (牌型大全)
   ═══════════════════════════════════════════════════════ */
.module-hands {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

/* Tabs */
.hands-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 36px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 4px;
  display: inline-flex;
  margin-left: 50%;
  transform: translateX(-50%);
}

.hands-tab {
  padding: 10px 24px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.hands-tab:hover { color: var(--text-primary); }

.hands-tab.active {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
}

/* Rankings */
.hands-rankings {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hand-card {
  display: flex; gap: 20px;
  background: var(--surface-base);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all var(--transition);
}

.hand-card:hover {
  border-color: var(--surface-border-hover);
  background: var(--surface-elevated);
}

.hand-card-rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 80px;
  padding-top: 4px;
}

.hand-card-rank-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--gold);
}

.hand-card-prob {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.hand-card-main {
  flex: 1;
}

.hand-card-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.hand-card-name {
  font-size: 18px;
  font-weight: 700;
}

.hand-card-eng {
  font-size: 12px;
  color: var(--text-muted);
}

.hand-card-cards {
  margin-bottom: 10px;
}

.hand-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 8px;
}

.hand-card-tip {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* Compare Tab */
.hands-compare {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.compare-card {
  background: var(--surface-base);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
}
.compare-card:hover { border-color: var(--surface-border-hover); }

.compare-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.compare-hands {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.compare-hand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 2px solid transparent;
  position: relative;
  min-width: 200px;
}

.compare-hand.winner {
  border-color: var(--gold);
  background: rgba(201,168,76,0.06);
}

.compare-hand-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.compare-vs {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-muted);
}

.compare-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--felt-dark);
  font-size: 13px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-explain {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: center;
}

/* Tips Tab */
.hands-tips {
  max-width: 680px;
  margin: 0 auto;
}

.tips-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tip-card {
  background: var(--surface-base);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all var(--transition);
}
.tip-card:hover { border-color: var(--surface-border-hover); }

.tip-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.tip-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 6px;
}

.tip-card p:last-child { margin-bottom: 0; }

.tip-remember {
  background: rgba(201,168,76,0.08);
  border-left: 3px solid var(--gold);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 13px !important;
  color: var(--gold-light) !important;
}

/* ═══════════════════════════════════════════════════════
   Module: Starting Hands v3
   ═══════════════════════════════════════════════════════ */
.module-starthand {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* ── Position Tabs (horizontal, top) ── */
.sh-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sh-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  min-width: 64px;
  color: var(--text-primary);
}

.sh-tab:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); }
.sh-tab-name { font-size: 14px; font-weight: 900; letter-spacing: 1px; color: inherit; }
.sh-tab-full { font-size: 10px; color: var(--text-secondary); }
.sh-tab-range {
  font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 6px;
  color: var(--text-secondary); background: rgba(255,255,255,0.05);
}
.sh-tab.active .sh-tab-range { color: #fff; }

/* ── Position Info bar ── */
.sh-pos-info {
  display: flex;
  align-items: center; justify-content: center;
  gap: 10px; margin-bottom: 14px;
  font-size: 13px; flex-wrap: wrap;
}
.sh-pos-info-dot { width: 10px; height: 10px; border-radius: 50%; }
.sh-pos-info-name { font-weight: 700; }
.sh-pos-info-desc { color: var(--text-secondary); }
.sh-pos-info-range { color: var(--text-muted); font-size: 12px; }

/* ── Legend ── */
.sh-legend {
  display: flex;
  align-items: center; gap: 12px;
  margin-bottom: 18px; justify-content: center;
  flex-wrap: wrap; font-size: 12px;
}
.sh-legend-item { display: flex; align-items: center; gap: 5px; color: var(--text-secondary); }
.sh-legend-dot { width: 14px; height: 14px; border-radius: 3px; border: 1px solid; }
.sh-legend-divider { width: 1px; height: 16px; background: rgba(255,255,255,0.08); margin: 0 4px; }
.sh-legend-note { color: var(--text-muted); font-size: 11px; }

/* ── Body: Matrix (left) + Preview (right) ── */
.sh-body {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: center;
}

.sh-body-left { flex-shrink: 0; }

.sh-body-right {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Matrix ── */
.sh-zone-labels {
  display: flex; justify-content: space-between;
  margin-bottom: 4px;
}
.sh-zone-label { font-size: 10px; color: var(--text-muted); letter-spacing: 1px; }
.sh-zone-label.suited-label { margin-left: 15%; }
.sh-zone-label.offsuit-label { margin-right: 10%; }

.sh-matrix {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px; overflow: hidden;
}
.sh-matrix-row { display: flex; }
.sh-matrix-corner { width: 40px; height: 40px; background: transparent; }
.sh-col-header, .sh-row-header {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
}
.sh-cell {
  width: 40px; height: 40px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.04);
  cursor: pointer; transition: all 0.12s; position: relative;
}
.sh-cell:hover { transform: scale(1.12); z-index: 3; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
.sh-cell.active { transform: scale(1.12); z-index: 3; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.sh-cell-label { font-size: 12px; font-weight: 700; color: var(--text-secondary); line-height: 1; }
.sh-cell-suffix { font-size: 8px; color: var(--text-muted); line-height: 1; }
.sh-raise .sh-cell-label { color: #fff; }
.sh-raise .sh-cell-suffix { color: rgba(255,255,255,0.7); }
.sh-call .sh-cell-label { color: #fff; }
.sh-call .sh-cell-suffix { color: rgba(255,255,255,0.7); }

/* ── Preview Panel (right of matrix) ── */
.sh-preview-panel {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sh-preview-panel-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.sh-preview-content { animation: fadeIn 0.15s ease-out; }

.sh-preview-cards { display: flex; gap: 10px; justify-content: center; margin-bottom: 10px; }

.sh-preview-name {
  font-size: 20px; font-weight: 900;
  color: var(--text-primary); margin-bottom: 4px;
}

.sh-preview-type { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }

.sh-preview-action { font-size: 14px; font-weight: 600; }
.sh-preview-action.raise { color: #3fb950; }
.sh-preview-action.call { color: #d29922; }
.sh-preview-action.fold { color: var(--text-muted); }

.sh-preview-empty {
  font-size: 13px; color: var(--text-muted);
  font-style: italic;
}

/* ── Stats Panel (right of matrix) ── */
.sh-stats-panel {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sh-stats-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sh-stats-num { font-size: 14px; font-weight: 700; }
.sh-stats-label { font-size: 11px; color: var(--text-muted); }

/* ── Mobile ── */
@media (max-width: 820px) {
  .sh-body { flex-direction: column; align-items: center; }
  .sh-body-right { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .sh-preview-panel { flex: 1; min-width: 180px; min-height: auto; }
  .sh-stats-panel { flex: 1; min-width: 180px; }
  .sh-tab { padding: 8px 10px; min-width: 52px; }
  .sh-tab-name { font-size: 13px; }
  .sh-tab-full { display: none; }
  .sh-col-header, .sh-row-header, .sh-cell, .sh-matrix-corner { width: 32px; height: 32px; }
  .sh-cell-label { font-size: 10px; }
  .sh-cell-suffix { font-size: 7px; }
  .sh-zone-label { display: none; }
}

/* ═══════════════════════════════════════════════════════
   Module: Position (位置策略)
   ═══════════════════════════════════════════════════════ */
.module-position {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.pos-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.pos-diagram {
  flex: 1;
  min-width: 380px;
}

.pos-table {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1.6 / 1;
  margin: 0 auto 24px;
}

.pos-felt {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, #1a6b30 0%, #145c24 40%, #0f4d1d 100%);
  box-shadow:
    0 0 0 10px #5c3d2e,
    0 0 0 14px #7a5540,
    0 0 0 18px #4a2f22,
    0 0 0 22px #6b4835,
    0 0 0 26px #3d2419,
    0 0 0 27px rgba(0,0,0,0.3),
    0 6px 24px rgba(0,0,0,0.5);
  box-shadow: inset 0 0 80px rgba(0,0,0,0.4);
}

.pos-community-marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 50px;
  border-radius: 8px;
  border: 2px dashed rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
}

.pos-center-label {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.pos-seat {
  position: absolute;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  z-index: 3;
  padding: 6px;
}

.pos-seat-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.25);
  transition: all var(--transition);
}

.pos-seat:hover .pos-seat-dot { background: rgba(201,168,76,0.3); border-color: var(--gold); }
.pos-seat.active .pos-seat-dot { background: var(--gold); border-color: var(--gold-light); }

.pos-seat-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  transition: color var(--transition);
}

.pos-seat:hover .pos-seat-label { color: var(--text-primary); }
.pos-seat.active .pos-seat-label { color: var(--gold); }

/* Action order */
.pos-action-order {
  text-align: center;
}

.pos-action-order h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

.pos-order-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pos-order-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.pos-order-num {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(201,168,76,0.15);
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pos-order-arrow {
  color: var(--text-muted);
  font-size: 10px;
  margin: 0 2px;
}

.pos-order-note {
  font-size: 12px;
  color: var(--text-muted);
}

/* Detail panel */
.pos-detail {
  width: 340px;
  flex-shrink: 0;
}

.pos-detail-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  animation: fadeIn 0.2s ease-out;
}

.pos-detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.pos-detail-badge {
  padding: 4px 12px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--felt-dark);
  font-size: 13px;
  font-weight: 900;
}

.pos-detail-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.pos-detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.pos-detail-stats {
  margin-bottom: 14px;
}

.pos-stat {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}

.pos-stat-label { font-size: 13px; color: var(--text-muted); }
.pos-stat-val { font-size: 13px; font-weight: 700; color: var(--gold-light); }

.pos-detail-tip {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 12px;
  background: rgba(201,168,76,0.05);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
}

.pos-detail-empty {
  text-align: center;
  padding: 60px 20px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 14px;
  margin-bottom: 20px;
}

.pos-detail-empty-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.pos-detail-empty p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* Position ranking */
.pos-ranking {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(201,168,76,0.08);
  border-radius: 14px;
  padding: 20px;
}

.pos-ranking h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.pos-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pos-rank-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
}

.pos-rank-item.tier-s { background: rgba(46,160,67,0.08); }
.pos-rank-item.tier-a { background: rgba(46,160,67,0.05); }
.pos-rank-item.tier-b { background: rgba(210,153,34,0.05); }
.pos-rank-item.tier-c { background: rgba(210,153,34,0.03); }
.pos-rank-item.tier-d { background: rgba(248,81,73,0.05); }

.pos-rank-badge {
  width: 40px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.pos-rank-name {
  font-size: 13px;
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .pos-layout { flex-direction: column; }
  .pos-detail { width: 100%; }
  .pos-diagram { min-width: 0; }
}

/* ═══════════════════════════════════════════════════════
   Module: Odds (概率与赔率)
   ═══════════════════════════════════════════════════════ */
.module-odds {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.odds-calc {
  animation: fadeIn 0.3s ease-out;
}

/* Scenario selector */
.odds-scenarios {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.odds-scenario-btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(201,168,76,0.15);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all var(--transition);
  font-family: inherit;
}

.odds-scenario-btn:hover { border-color: rgba(201,168,76,0.3); }
.odds-scenario-btn.active { border-color: var(--gold); background: rgba(201,168,76,0.08); }

.odds-scenario-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.odds-scenario-outs {
  font-size: 11px;
  color: var(--text-muted);
}

/* Scenario detail */
.odds-scenario-detail {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(201,168,76,0.08);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 24px;
}

.odds-scenario-cards {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.odds-card-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.odds-card-group-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.odds-scenario-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: center;
}

/* Outs slider */
.odds-outs-input {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.odds-slider {
  flex: 1;
  max-width: 300px;
  accent-color: var(--gold);
}

.odds-outs-val {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  min-width: 30px;
}

/* Results */
.odds-results {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.odds-result-card {
  flex: 1;
  text-align: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.1);
  border-radius: 14px;
  padding: 20px;
}

.odds-result-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.odds-result-num {
  font-size: 32px;
  font-weight: 900;
  color: var(--gold-light);
  margin-bottom: 4px;
}

.odds-result-odds {
  font-size: 12px;
  color: var(--text-muted);
}

/* Probability table */
.odds-table-wrap {
  overflow-x: auto;
}

.odds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.odds-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.odds-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-secondary);
}

.odds-td-scene { color: var(--text-primary); font-weight: 500; }
.odds-td-num { color: var(--gold-light); font-weight: 600; white-space: nowrap; }
.odds-td-desc { font-size: 13px; }

.odds-table tbody tr:hover { background: rgba(255,255,255,0.02); }

/* Pot odds */
.potodds-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.potodds-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.potodds-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.potodds-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  min-width: 60px;
  text-align: right;
}

.potodds-result {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}

.potodds-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.potodds-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-secondary);
}

.potodds-row strong {
  color: var(--text-primary);
  font-size: 16px;
}

.potodds-verdict {
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  margin-top: 6px;
}

.potodds-verdict.good { background: rgba(46,160,67,0.1); color: #3fb950; }
.potodds-verdict.bad { background: rgba(248,81,73,0.1); color: #f85149; }

.potodds-verdict-reason {
  display: block;
  font-size: 12px;
  font-weight: 400;
  margin-top: 4px;
  opacity: 0.8;
}

.potodds-explain {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  padding: 16px;
}

.potodds-explain strong { color: var(--gold-light); }

/* Rule of 4 and 2 */
.rule42-intro {
  text-align: center;
  margin-bottom: 24px;
}

.rule42-intro h3 { font-size: 20px; margin-bottom: 8px; }
.rule42-intro p { font-size: 14px; color: var(--text-secondary); }

.rule42-cards {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.rule42-card {
  flex: 1;
  text-align: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.12);
  border-radius: 14px;
  padding: 20px;
}

.rule42-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.rule42-card-formula {
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 6px;
}

.rule42-card-example {
  font-size: 13px;
  color: var(--text-muted);
}

.rule42-note {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 12px;
  background: rgba(201,168,76,0.05);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
}

.rule42-note strong { color: var(--text-primary); }

@media (max-width: 640px) {
  .odds-results { flex-direction: column; }
  .rule42-cards { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════
   Module: Glossary (术语词典)
   ═══════════════════════════════════════════════════════ */
.module-glossary {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.glossary-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.glossary-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-base);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 0 16px;
  transition: all var(--transition);
}
.glossary-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.08); }

.glossary-search-icon { font-size: 18px; opacity: 0.5; }

.glossary-search-input {
  flex: 1;
  background: none;
  border: none;
  padding: 14px 0;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  outline: none;
}

.glossary-search-input::placeholder { color: var(--text-muted); }

.glossary-search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
}

.glossary-cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.glossary-cat-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(201,168,76,0.15);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.glossary-cat-btn:hover { border-color: var(--gold); }
.glossary-cat-btn.active { background: var(--gold); color: var(--felt-dark); border-color: var(--gold); }

.glossary-count {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.glossary-item {
  background: var(--surface-base);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: all var(--transition);
}

.glossary-item:hover { border-color: var(--surface-border-hover); background: var(--surface-elevated); }

.glossary-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.glossary-item-zh {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.glossary-item-en {
  font-size: 13px;
  color: var(--text-muted);
}

.glossary-item-cat {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(201,168,76,0.1);
  color: var(--gold);
}

.glossary-item-def {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 4px;
}

.glossary-item-ex {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.glossary-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.glossary-reset-btn {
  margin-top: 12px;
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════
   Module: Quiz (知识测验)
   ═══════════════════════════════════════════════════════ */
.module-quiz {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

/* Start screen */
.quiz-start-card {
  text-align: center;
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  box-shadow: var(--shadow-sm);
}

.quiz-start-icon { font-size: 64px; margin-bottom: 16px; }

.quiz-start-card h3 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 28px;
}

.quiz-start-info {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 24px;
}

.quiz-start-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.quiz-start-stat-num {
  font-size: 24px;
  font-weight: 900;
  color: var(--gold);
}

.quiz-start-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

.quiz-best-score {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  padding: 8px 16px;
  background: rgba(201,168,76,0.06);
  border-radius: 10px;
  display: inline-block;
}

.quiz-best-score strong { color: var(--gold-light); }

.quiz-start-btn {
  padding: 14px 48px;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--felt-dark);
  cursor: pointer;
  transition: all var(--transition);
}

.quiz-start-btn:hover { transform: scale(1.03); box-shadow: 0 4px 20px rgba(201,168,76,0.3); }

/* Quiz header */
.quiz-header-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.quiz-progress { flex: 1; }

.quiz-progress-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.quiz-progress-track {
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width 0.3s;
}

.quiz-answered {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Question card */
.quiz-question-card {
  background: var(--surface-elevated);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 28px; margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.25s ease-out;
}

.quiz-q-cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 12px;
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(201,168,76,0.08);
}

.quiz-q-text {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: 24px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  text-align: left;
  color: var(--text-primary);
}

.quiz-option:hover { border-color: rgba(201,168,76,0.2); background: rgba(255,255,255,0.04); }

.quiz-option.selected {
  border-color: var(--gold);
  background: rgba(201,168,76,0.08);
}

.quiz-option-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text-muted);
}

.quiz-option.selected .quiz-option-letter {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--felt-dark);
}

.quiz-option-text { flex: 1; font-size: 15px; }

.quiz-option-check { font-size: 18px; }

/* Quiz nav */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.quiz-nav-btn {
  padding: 10px 24px;
  border-radius: 10px;
  border: 1px solid rgba(201,168,76,0.2);
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.quiz-nav-btn:hover:not(:disabled) { border-color: var(--gold); color: var(--text-primary); }
.quiz-nav-btn:disabled { opacity: 0.3; cursor: default; }
.quiz-nav-btn.primary { background: rgba(201,168,76,0.1); border-color: var(--gold); color: var(--gold); }
.quiz-nav-btn.submit { background: var(--gold); color: var(--felt-dark); border-color: var(--gold); font-weight: 700; }

/* Question dots */
.quiz-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.quiz-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.quiz-dot:hover { border-color: rgba(201,168,76,0.3); }
.quiz-dot.current { border-color: var(--gold); color: var(--gold); }
.quiz-dot.answered { background: rgba(201,168,76,0.15); border-color: rgba(201,168,76,0.3); color: var(--gold-light); }

/* Result screen */
.quiz-result-card {
  text-align: center;
}

.quiz-result-score {
  font-size: 80px;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.quiz-result-pct { font-size: 28px; color: var(--text-muted); margin-left: 4px; }

.quiz-result-grade {
  font-size: 22px;
  font-weight: 700;
  margin: 8px 0 16px;
}

.quiz-result-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* Answer review */
.quiz-review {
  text-align: left;
  margin-bottom: 28px;
}

.quiz-review h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.quiz-review-item {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,0.04);
}

.quiz-review-item.correct { border-left: 3px solid #3fb950; }
.quiz-review-item.wrong { border-left: 3px solid #f85149; }

.quiz-review-q {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.quiz-review-mark { flex-shrink: 0; font-size: 14px; }
.quiz-review-cat { font-size: 11px; color: var(--text-muted); margin-left: auto; flex-shrink: 0; }

.quiz-review-answers {
  display: flex;
  gap: 16px;
  font-size: 13px;
  margin: 4px 0 6px 26px;
}

.quiz-review-wrong-ans { color: #f85149; }
.quiz-review-right-ans { color: #3fb950; }

.quiz-review-exp {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-left: 26px;
}

.quiz-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.quiz-result-back {
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 50px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.quiz-result-back:hover { border-color: var(--gold); color: var(--text-primary); }
