/* GTO 撲克學院 — styles.css
 * 電視轉播級深色高級牌桌 Studio 設計系統（Obsidian · Emerald Felt · Walnut · Antique Brass）：
 *   1. Design tokens / 基礎排版
 *   2. 頂部導覽、手機底部導覽、搜尋、彈窗、術語提示卡
 *   3. 通用元件（卡片、頁首、按鈕、分段切換、分頁、篩選膠囊、輸入框、進度環）
 *   4. 撲克牌 / 13×13 範圍表 / 測驗引擎
 *   5. 各頁面：首頁、學習地圖、課程、範圍表、練習中心、百科、工具、進度
 *   6. 互動元件（widgets）與 RWD / 列印
 *   7. 版本號徽章與 Release Notes
 *   8. 排版優化 v2
 *   9. 6 人擬真 AI 實戰競技場（Arena）與雙軌教練覆盤室（Replay）
 */
:root {
  --bg: #0d1012;
  --surface: #14181b;
  --surface-elev: #1b2126;
  --surface-sub: #101417;
  --card-bg: #14181b;
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f3ef;
  --text-2: #c4ccd2;
  --muted: #8a959d;
  --text-muted: #8a959d;

  --brass: #c9a259;
  --brass-light: #ead39c;
  --brass-dark: #8e6d31;
  --brass-soft: rgba(201, 162, 89, 0.14);

  --primary: #c9a259;
  --primary-hover: #d8b56f;
  --primary-soft: rgba(201, 162, 89, 0.14);
  --accent: #34a173;

  --felt-center: #164435;
  --felt-mid: #103328;
  --felt-edge: #0a2019;
  --rail-light: #4b3626;
  --rail-mid: #2b1e15;
  --rail-dark: #18100b;

  --suit-spade: #16191e;
  --suit-heart: #c82938;
  --suit-diamond: #1962c4;
  --suit-club: #187d48;

  --act-raise: #c94a3c;
  --act-3bet: #c42c54;
  --act-4bet: #8549c9;
  --act-5bet: #9e4422;
  --act-call: #248a62;
  --act-fold: #455059;
  --act-fold-bg: #1a2026;

  --ok-bg: rgba(43, 122, 91, 0.22);
  --ok-fg: #7cd4a6;
  --warn-bg: rgba(201, 162, 89, 0.18);
  --warn-fg: #f0d08a;
  --bad-bg: rgba(185, 74, 57, 0.22);
  --bad-fg: #f4a49c;
  --info-bg: rgba(43, 111, 148, 0.22);
  --info-fg: #8bc8e8;

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --shadow: 0 2px 6px rgba(0, 0, 0, 0.36), 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 22px 58px rgba(0, 0, 0, 0.68);
  --header-h: 62px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.is-hidden *, html.is-hidden *::before, html.is-hidden *::after { animation-play-state: paused !important; }
html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(ellipse 90% 42% at 50% 0%, rgba(22, 68, 53, 0.16) 0%, transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brass-light); text-decoration: none; }
a:hover { text-decoration: underline; color: #f6e6bc; }
img { max-width: 100%; }
code {
  background: var(--surface-elev);
  color: var(--brass-light);
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.9em;
}
kbd {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  background: var(--surface-elev);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  text-align: center;
  line-height: 1.5;
}
::selection { background: rgba(201, 162, 89, 0.32); color: #fff; }

/* ===========================================================================
 * 2. 頂部導覽
 * =========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(23, 28, 32, 0.98) 0%, rgba(16, 20, 23, 0.98) 100%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(10px);
}
.header-inner {
  max-width: 1380px;
  margin: 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none !important; flex-shrink: 0; }
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, #1b4b3a 0%, #0e2c22 100%);
  border: 1px solid rgba(201, 162, 89, 0.48);
  color: var(--brass-light);
  display: grid;
  place-items: center;
  font-size: 19px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 14px rgba(0, 0, 0, 0.4);
}
.brand-txt b { display: block; font-size: 15.5px; letter-spacing: -0.01em; line-height: 1.2; color: var(--text); }
.brand-txt small { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.main-nav { display: flex; gap: 2px; flex: 1; justify-content: center; min-width: 0; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 9px;
  border-radius: 9px;
  color: var(--text-2);
  font-weight: 650;
  font-size: 13.5px;
  text-decoration: none !important;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.nav-link:hover { background: var(--surface-elev); color: var(--text); }
.nav-link.active {
  background: rgba(201, 162, 89, 0.14);
  border-color: rgba(201, 162, 89, 0.36);
  color: var(--brass-light);
}
.nav-ic { font-size: 14px; }
.header-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface-elev);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  min-width: 96px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.search-btn:hover { border-color: rgba(201, 162, 89, 0.5); color: var(--text); background: #232a30; }
.search-btn kbd { margin-left: auto; }
.hstat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 9px;
  background: rgba(201, 162, 89, 0.11);
  border: 1px solid rgba(201, 162, 89, 0.32);
  color: var(--brass-light);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
}
.hstat-pill:hover { background: rgba(201, 162, 89, 0.18); color: #f6e6bc; }
.hstat-pill .sep { opacity: 0.45; }
.mobile-nav { display: none; }

/* ===========================================================================
 * 搜尋、彈窗、術語提示卡、Toast
 * =========================================================================== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(6, 9, 11, 0.78);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 16px 16px;
}
.search-overlay.show { display: flex; }
.search-box {
  width: 100%;
  max-width: 660px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 76vh;
}
.search-inp-row { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--surface-elev); }
.si-ic { font-size: 18px; }
.search-inp-row input { flex: 1; border: none; outline: none; font: inherit; font-size: 16px; background: transparent; color: var(--text); }
.search-results { overflow-y: auto; padding: 6px; }
.sr-group { font-size: 11.5px; font-weight: 800; color: var(--brass); padding: 10px 10px 4px; letter-spacing: 0.05em; text-transform: uppercase; }
.sr-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
.sr-item.sel, .sr-item:hover { background: rgba(201, 162, 89, 0.14); }
.sr-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-elev); border: 1px solid var(--border); display: grid; place-items: center; flex-shrink: 0; font-size: 16px; }
.sr-txt { min-width: 0; }
.sr-txt strong { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.sr-txt small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-empty { padding: 28px; text-align: center; color: var(--muted); }
.search-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); background: var(--surface-sub); }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(5, 8, 10, 0.78);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s;
}
.modal-overlay.show { opacity: 1; }
.modal-box {
  position: relative;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  max-height: 92vh;
  overflow-y: auto;
}
.modal-x {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 1px solid var(--border);
  background: var(--surface-elev);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-2);
}
.modal-x:hover { background: #262e35; color: var(--text); }
.onb { text-align: center; }
.onb-hero { font-size: 48px; line-height: 1; }
.onb h2 { margin: 10px 0 6px; font-size: 24px; letter-spacing: -0.02em; }
.onb > p { margin: 0 0 18px; font-size: 14.5px; color: var(--text-2); }
.onb-opts { display: flex; flex-direction: column; gap: 10px; text-align: left; margin-bottom: 12px; }
.onb-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface-elev);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.onb-opt:hover { border-color: rgba(201, 162, 89, 0.55); background: rgba(201, 162, 89, 0.1); transform: translateY(-1px); }
.oo-ic { font-size: 32px; }
.onb-opt strong { display: block; font-size: 16px; color: var(--text); }
.onb-opt small { color: var(--muted); font-size: 13px; }

.term { border-bottom: 1.5px dashed rgba(201, 162, 89, 0.65); cursor: help; border-radius: 2px; transition: background 0.12s; }
.term:hover, .term:focus { background: rgba(201, 162, 89, 0.16); outline: none; border-bottom-style: solid; }
.term-pop {
  position: fixed;
  z-index: 1000;
  background: #192025;
  border: 1px solid rgba(201, 162, 89, 0.35);
  color: var(--text-2);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.12s, transform 0.12s;
  font-size: 13.5px;
  line-height: 1.6;
}
.term-pop.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.tp-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.tp-head strong { color: #fff; font-size: 15px; }
.tp-head span { color: var(--brass-light); font-size: 12.5px; font-weight: 700; }
.tp-body { color: var(--text-2); }
.tp-link { display: inline-block; margin-top: 8px; color: var(--brass-light); font-weight: 700; font-size: 12.5px; }

/* ===========================================================================
 * 3. 通用元件
 * =========================================================================== */
.app-main { max-width: 1320px; margin: 0 auto; padding: 22px 20px 44px; min-height: calc(100vh - var(--header-h)); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 20px; flex-wrap: wrap; }
.ph-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ph-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(145deg, #1b2824 0%, #12181b 100%);
  border: 1px solid rgba(201, 162, 89, 0.32);
  display: grid;
  place-items: center;
  font-size: 27px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.page-head h1 { margin: 0; font-size: 27px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; color: var(--text); }
.page-head .sub { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; max-width: 780px; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.btn, .btn-xs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--surface-elev);
  color: var(--text);
  font-weight: 650;
  cursor: pointer;
  text-decoration: none !important;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.08s;
  font-family: inherit;
  line-height: 1.3;
  white-space: nowrap;
}
.btn { padding: 9px 16px; font-size: 14px; }
.btn-xs { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn:hover, .btn-xs:hover { background: #242c33; border-color: rgba(255, 255, 255, 0.25); color: #fff; }
.btn:active, .btn-xs:active { transform: translateY(1px); }
.btn.primary, .btn-xs.primary {
  background: linear-gradient(180deg, #d4af64 0%, #ac863d 100%);
  border-color: rgba(255, 232, 184, 0.4);
  color: #14110b;
  font-weight: 750;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 245, 220, 0.3);
}
.btn.primary:hover, .btn-xs.primary:hover {
  background: linear-gradient(180deg, #deb96f 0%, #b89146 100%);
  border-color: rgba(255, 238, 200, 0.55);
  color: #0e0b06;
}
.btn.accent { background: linear-gradient(180deg, #2d8b66 0%, #1f684c 100%); border-color: rgba(124, 212, 166, 0.35); color: #f2fff8; }
.btn.ok { background: linear-gradient(180deg, #2b8a62 0%, #1f694a 100%); border-color: rgba(124, 212, 166, 0.35); color: #f2fff8; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-elev); color: var(--text); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.lg { padding: 11px 20px; font-size: 15px; border-radius: 11px; }
.btn.xl { padding: 13px 22px; font-size: 15.5px; border-radius: 12px; }
.btn[disabled] { opacity: 0.42; cursor: not-allowed; }
.lg-btn { padding: 10px 18px; font-size: 14.5px; }
.btn.ans-correct { background: var(--ok-bg) !important; border-color: #34a173 !important; color: #96e8be !important; opacity: 1; }
.btn.ans-wrong { background: var(--bad-bg) !important; border-color: #cf5646 !important; color: #f8b4ac !important; opacity: 1; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-elev);
  border: 1px solid var(--border);
  color: var(--text-2);
  white-space: nowrap;
}
.chip.ok { background: var(--ok-bg); color: var(--ok-fg); border-color: rgba(52, 161, 115, 0.35); }
.chip.warn { background: var(--warn-bg); color: var(--warn-fg); border-color: rgba(201, 162, 89, 0.35); }
.chip.bad { background: var(--bad-bg); color: var(--bad-fg); border-color: rgba(185, 74, 57, 0.35); }
.chip.info { background: var(--info-bg); color: var(--info-fg); border-color: rgba(59, 126, 184, 0.35); }

.inp {
  padding: 8px 11px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: #0e1215;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.inp:focus { border-color: rgba(201, 162, 89, 0.65); box-shadow: 0 0 0 3px rgba(201, 162, 89, 0.16); }
.inp.sm, .inp.sm-inp { padding: 5px 9px; font-size: 13px; }
.inp.xs { width: 72px; padding: 4px 8px; font-size: 13px; }
.lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }

.seg { display: inline-flex; background: #0c0f12; border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-elev); color: var(--brass-light); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45); }
.seg.big button { padding: 8px 14px; font-size: 13.5px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab {
  padding: 10px 14px;
  font-weight: 700;
  color: var(--muted);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  text-decoration: none !important;
  white-space: nowrap;
}
.tab small { background: var(--surface-elev); padding: 1px 7px; border-radius: 999px; font-size: 11.5px; margin-left: 2px; color: var(--muted); }
.tab:hover { color: var(--text); }
.tab.on { color: var(--brass-light); border-bottom-color: var(--brass); }
.tab.on small { background: rgba(201, 162, 89, 0.16); color: var(--brass-light); }

.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.chip-btn {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-elev);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  color: var(--text-2);
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}
.chip-btn small { color: var(--muted); font-weight: 650; }
.chip-btn:hover { border-color: rgba(201, 162, 89, 0.45); color: var(--text); }
.chip-btn.on { background: linear-gradient(180deg, #d4af64 0%, #ac863d 100%); color: #14110b; border-color: rgba(255, 232, 184, 0.4); }
.chip-btn.on small { color: #362912; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.search-field {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0e1215;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 0 12px;
  transition: border-color 0.15s;
}
.search-field input { flex: 1; border: none; outline: none; padding: 11px 0; font: inherit; font-size: 14.5px; background: transparent; color: var(--text); }
.search-field:focus-within { border-color: rgba(201, 162, 89, 0.65); box-shadow: 0 0 0 3px rgba(201, 162, 89, 0.15); }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--text-2); }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: 16px; }
.pulse { animation: pulse 0.9s ease-out 2; }
@keyframes pulse { 0%, 100% { transform: scale(1); border-color: var(--brass); } 50% { transform: scale(1.015); border-color: var(--brass-light); } }

.ring { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.09); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--c, var(--brass)); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.5s; }
.ring-txt { position: relative; font-family: var(--font-mono); font-weight: 800; font-size: 13px; color: var(--brass-light); }
.lv-stars { color: var(--brass); letter-spacing: 1px; font-size: 9px; }
.lv-stars i { color: rgba(255, 255, 255, 0.15); font-style: normal; }
.lv-chip { font-size: 11.5px; font-weight: 800; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.lv-chip.lv1 { background: rgba(52, 161, 115, 0.2); color: #7cd4a6; }
.lv-chip.lv2 { background: rgba(43, 111, 148, 0.24); color: #8bc8e8; }
.lv-chip.lv3 { background: rgba(156, 124, 232, 0.22); color: #c8b6f7; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; margin: 14px 0; font-size: 14px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.tbl th, .tbl td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); color: var(--text-2); }
.tbl th { background: var(--surface-elev); font-weight: 800; font-size: 13px; color: var(--brass-light); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }
.compact-tbl th, .compact-tbl td { padding: 6px 10px; font-size: 13px; }
.tips-list { margin: 8px 0 0; padding-left: 18px; }
.tips-list li { margin-bottom: 6px; font-size: 14px; }

/* ===========================================================================
 * 4. 撲克牌（Broadcast 4色精裝牌組）、13×13 範圍表、測驗引擎、工具與統計
 * =========================================================================== */
.hand {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 6px;
  background: rgba(201, 162, 89, 0.14);
  border: 1px solid rgba(201, 162, 89, 0.36);
  color: var(--brass-light);
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.92em;
}
.hand.lg { font-size: 1.15em; padding: 2px 10px; }

.pcards { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; flex-wrap: wrap; max-width: 100%; }
.pcard {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 40px;
  height: 56px;
  padding: 4px 5px;
  border-radius: 6px;
  background: linear-gradient(160deg, #ffffff 0%, #f3efe6 100%);
  border: 1px solid rgba(20, 20, 20, 0.24);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
  font-family: var(--font-ui);
  font-weight: 800;
  line-height: 1;
  user-select: none;
}
.pcard .pc-corner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 0.95;
}
.pcard .pc-r { font-size: 14px; font-weight: 800; letter-spacing: -0.05em; color: inherit; }
.pcard .pc-s { font-size: 10px; margin-top: 1px; color: inherit; }
.pcard .pc-pip {
  align-self: flex-end;
  font-size: 18px;
  line-height: 0.9;
  margin-top: -5px;
  color: inherit;
}

/* Inline compact badge card (for text / lists / history) */
.pcard.mini {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 24px;
  padding: 0 6px;
  gap: 2px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.32);
}
.pcard.mini .pc-corner { flex-direction: row; align-items: center; gap: 1px; line-height: 1; }
.pcard.mini .pc-r { font-size: 12.5px; letter-spacing: -0.02em; }
.pcard.mini .pc-s { font-size: 12px; margin-top: 0; }
.pcard.mini .pc-pip { display: none; }

/* Sizes matching broadcast table proportions */
.pcard.sm { width: 34px; height: 48px; padding: 3px 4px; border-radius: 5px; }
.pcard.sm .pc-r { font-size: 12px; }
.pcard.sm .pc-s { font-size: 8.5px; }
.pcard.sm .pc-pip { font-size: 14px; margin-top: -4px; }

.pcard.hole { width: 42px; height: 58px; padding: 3.5px 4.5px; border-radius: 6px; }
.pcard.hole .pc-r { font-size: 14px; }
.pcard.hole .pc-s { font-size: 10px; }
.pcard.hole .pc-pip { font-size: 18px; margin-top: -5px; }

.pcard.md { width: 52px; height: 74px; padding: 5px 6px; border-radius: 7px; }
.pcard.md .pc-r { font-size: 16.5px; }
.pcard.md .pc-s { font-size: 11px; }
.pcard.md .pc-pip { font-size: 24px; margin-top: -6px; }

.pcard.lg { width: 58px; height: 82px; padding: 6px 7px; border-radius: 8px; }
.pcard.lg .pc-r { font-size: 18px; }
.pcard.lg .pc-s { font-size: 12px; }
.pcard.lg .pc-pip { font-size: 27px; margin-top: -6px; }

.pcard.suit-s { color: var(--suit-spade); }
.pcard.suit-h { color: var(--suit-heart); }
.pcard.suit-d { color: var(--suit-diamond); }
.pcard.suit-c { color: var(--suit-club); }

/* Navy diagonal-stripe broadcast card back with ivory border & antique-brass spade */
.pcard.back {
  background:
    repeating-linear-gradient(
      45deg,
      #1b3449 0px,
      #1b3449 4px,
      #132637 4px,
      #132637 8px
    );
  border: 2px solid #ece7db;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5);
  padding: 0;
}
.pcard.back::after {
  content: "♠";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(201, 162, 89, 0.52);
  font-size: 16px;
}
.pcard.back.sm::after { font-size: 13px; }
.pcard.back.mini { width: 18px; height: 24px; border-width: 1.5px; }
.pcard.back.mini::after { font-size: 9px; }

/* ---------------------------------------------------------------------------
 * 13×13 互動翻前範圍表 (.rgrid, .rcell)
 * --------------------------------------------------------------------------- */
.rgrid {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 2px;
  background: #090c0e;
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 10px;
  user-select: none;
  max-width: 580px;
}
.rgrid.compact { max-width: 430px; gap: 1.5px; padding: 2px; }
.rcell {
  position: relative;
  aspect-ratio: 1 / 0.88;
  border: none;
  border-radius: 4px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  background: var(--act-fold-bg);
  transition: transform 0.08s, box-shadow 0.1s;
}
.rgrid.compact .rcell { font-size: 9.5px; aspect-ratio: 1 / 0.84; }
.rcell.type-pair { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.rcell.act-raise { background: var(--act-raise); color: #fff; }
.rcell.act-3bet  { background: var(--act-3bet);  color: #fff; }
.rcell.act-4bet  { background: var(--act-4bet);  color: #fff; }
.rcell.act-5bet  { background: var(--act-5bet);  color: #fff; }
.rcell.act-call  { background: var(--act-call);  color: #fff; }
.rcell.act-mix   { color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75); }
.rcell.act-fold  { background: #1a2026; color: #7e8a94; }
.rcell.type-pair.act-fold { background: #222a32; color: #b5c0c9; }
.rcell.not-in-base {
  opacity: 0.28;
  background: #14191e !important;
  color: #5d6872 !important;
}
.rcell:hover {
  z-index: 2;
  transform: scale(1.08);
  box-shadow: 0 0 0 2px var(--brass-light);
}
.rcell.selected {
  z-index: 3;
  box-shadow: 0 0 0 2px var(--brass-light), 0 0 0 4px #0b0e10 !important;
  transform: scale(1.08);
}
.rmix-dot, .pw-dot {
  position: absolute;
  right: 2px;
  bottom: 1px;
  font-size: 8px;
  line-height: 1;
  opacity: 0.92;
}
.rcell.paint-wrong {
  box-shadow: inset 0 0 0 2.5px #f0d08a, 0 0 0 1.5px #cf4a3c !important;
}
.pw-dot {
  background: #f0d08a;
  color: #14110b;
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 900;
}

.embed-chart { margin: 16px 0; }
.embed-card {
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  display: inline-block;
  vertical-align: top;
  margin: 6px 12px 6px 0;
  max-width: 100%;
  box-shadow: var(--shadow);
}
.embed-card .rgrid { max-width: 420px; }
.embed-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13.5px; flex-wrap: wrap; color: var(--text); }
.embed-actions { display: flex; gap: 5px; }
.embed-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 10px;
}
.lg-item { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.sw {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 3px;
}
.sw.act-raise { background: var(--act-raise); }
.sw.act-3bet  { background: var(--act-3bet); }
.sw.act-4bet  { background: var(--act-4bet); }
.sw.act-5bet  { background: var(--act-5bet); }
.sw.act-call  { background: var(--act-call); }
.sw.act-fold  { background: #1a2026; border: 1px solid rgba(255, 255, 255, 0.22); }
.sw.act-mix   { background: linear-gradient(90deg, var(--act-raise) 50%, var(--act-fold-bg) 50%); border: 1px solid rgba(255, 255, 255, 0.22); }
.sw.not-base  { background: #14191e; opacity: 0.5; border: 1px solid var(--border); }

/* ---------------------------------------------------------------------------
 * 隨機測驗練習場 (#/quiz) & 6-Max 擬真牌桌
 * --------------------------------------------------------------------------- */
.session-scoreboard { display: flex; gap: 8px; flex-wrap: wrap; }
.sb-pill {
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-2);
  box-shadow: var(--shadow);
}
.sb-pill strong { font-family: var(--font-mono); font-size: 15px; color: var(--brass-light); }

.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}
.fgroup { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flbl { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.fpill {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-elev);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.fpill:hover { border-color: rgba(201, 162, 89, 0.45); color: var(--text); }
.fpill.active {
  background: linear-gradient(180deg, #d4af64 0%, #ac863d 100%);
  border-color: rgba(255, 232, 184, 0.4);
  color: #14110b;
}

.qstage-grid.preflop-stage {
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(420px, 1fr);
  gap: 16px;
  align-items: start;
}

/* 6-Max 翻前練習牌桌視覺（核桃木框＋羊毛綠絨＋黃銅細線） */
.poker-table-wrap {
  padding: 44px 24px 116px;
  margin-bottom: 8px;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 80% 65% at 50% 48%, rgba(28, 72, 56, 0.24) 0%, rgba(10, 13, 15, 0.96) 76%),
    linear-gradient(180deg, #121719 0%, #090c0d 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.poker-felt .seat-cards .pcard.lg { width: 44px; height: 62px; padding: 4px 5px; }
.poker-felt .seat-cards .pcard.lg .pc-r { font-size: 14.5px; }
.poker-felt .seat-cards .pcard.lg .pc-s { font-size: 10px; }
.poker-felt .seat-cards .pcard.lg .pc-pip { font-size: 19px; margin-top: -5px; }
.poker-felt {
  position: relative;
  height: 360px;
  border-radius: 999px;
  background:
    radial-gradient(ellipse 68% 62% at 50% 45%, var(--felt-center) 0%, var(--felt-mid) 56%, var(--felt-edge) 100%);
  border: 13px solid #2d2016;
  box-shadow:
    inset 0 8px 26px rgba(0, 0, 0, 0.62),
    inset 0 0 0 2px rgba(0, 0, 0, 0.45),
    0 20px 44px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 224, 185, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.poker-felt::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  opacity: 0.08;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.poker-felt::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 999px;
  border: 1.5px solid rgba(201, 162, 89, 0.22);
  pointer-events: none;
}
.felt-center {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #f4f2eb;
  padding: 8px 16px;
  margin-top: -20px;
  pointer-events: none;
}
.felt-tag { font-family: var(--font-mono); font-size: 11px; color: rgba(235, 225, 198, 0.72); letter-spacing: 0.05em; }
.felt-title { font-size: 16px; font-weight: 800; margin: 3px 0 8px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.felt-hand-pill {
  display: inline-block;
  background: rgba(7, 17, 13, 0.78);
  border: 1px solid rgba(201, 162, 89, 0.36);
  color: var(--brass-light);
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 13px;
}

.tseat {
  position: absolute;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
/* 6 個座位環繞座標（seat-0 為正下方 Hero，順時針排列） */
.tseat.seat-0 { bottom: -66px; left: 50%; transform: translateX(-50%); z-index: 5; }
.tseat.seat-1 { bottom: 38px; left: -4px; }
.tseat.seat-2 { top: 34px; left: -4px; }
.tseat.seat-3 { top: -30px; left: 50%; transform: translateX(-50%); }
.tseat.seat-4 { top: 34px; right: -4px; }
.tseat.seat-5 { bottom: 38px; right: -4px; }

.seat-box {
  background: linear-gradient(180deg, rgba(28, 34, 39, 0.96) 0%, rgba(16, 20, 23, 0.98) 100%);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 6px 11px;
  min-width: 112px;
  text-align: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.52);
}
.tseat.folded .seat-box { opacity: 0.38; filter: saturate(0.25); }
.tseat.hero .seat-box {
  border-color: var(--brass);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(201, 162, 89, 0.38);
}
.tseat.villain .seat-box {
  border-color: rgba(201, 74, 60, 0.8);
  background: linear-gradient(180deg, rgba(58, 24, 24, 0.96) 0%, rgba(30, 14, 15, 0.98) 100%);
}
.seat-top { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11.5px; }
.seat-pos { font-family: var(--font-mono); font-weight: 800; color: var(--brass-light); }
.seat-zh { opacity: 0.82; font-size: 11px; color: var(--text-2); }
.dealer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: linear-gradient(160deg, #faf7ef 0%, #d4ccb8 100%);
  color: #18140e;
  border: 1.5px solid #8a7e68;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
.seat-cards { margin: 5px 0; display: flex; justify-content: center; gap: 3px; }
.seat-status { font-size: 11px; color: var(--text-2); }
.seat-chip {
  background: rgba(10, 18, 15, 0.88);
  color: #f7e6bb;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(201, 162, 89, 0.45);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
}

.qprompt-box {
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  margin: 14px 0 12px;
  font-size: 14.5px;
  color: var(--text);
}
.act-btn-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.act-choice-btn {
  padding: 13px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-elev);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: inherit;
  transition: transform 0.1s, border-color 0.12s, background 0.12s;
}
.act-choice-btn:hover { transform: translateY(-2px); border-color: var(--brass); background: #232b32; }
.act-choice-btn .ac-main { font-size: 16.5px; font-weight: 800; color: var(--text); }
.act-choice-btn .ac-en { font-size: 11.5px; color: var(--muted); }
.act-choice-btn.ans-correct {
  background: var(--ok-bg) !important;
  border-color: #34a173 !important;
  color: #96e8be !important;
}
.act-choice-btn.ans-wrong {
  background: var(--bad-bg) !important;
  border-color: #cf5646 !important;
  color: #f8b4ac !important;
}
.kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-elev);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
}

.qplaceholder { text-align: center; padding: 36px 20px; }
.qplaceholder h3 { margin: 6px 0; }
.qp-icon { font-size: 40px; margin-bottom: 6px; }
.qp-meta {
  margin-top: 14px;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  background: var(--surface-sub);
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.qfb-head {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.qfb-head.ok { background: var(--ok-bg); border: 1px solid rgba(52, 161, 115, 0.45); color: #d8f8e8; }
.qfb-head.bad { background: var(--bad-bg); border: 1px solid rgba(207, 86, 70, 0.45); color: #fde1dd; }
.qfb-verdict { font-weight: 800; font-size: 15.5px; margin-bottom: 4px; }
.qfb-explain { font-size: 13.5px; }
.qfb-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 13px;
}

/* 選擇題卡片 */
.mcq-card { max-width: 880px; margin: 0 auto; border-radius: 18px; padding: 24px 28px; }
.mcq-q { font-size: 19px; font-weight: 750; margin: 12px 0 18px; line-height: 1.45; color: var(--text); }
.mcq-opts { display: flex; flex-direction: column; gap: 10px; }
.mcq-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-elev);
  color: var(--text);
  text-align: left;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, background-color 0.12s, transform 0.08s;
}
.mcq-opt:hover { background: #232a31; border-color: rgba(201, 162, 89, 0.55); transform: translateY(-1px); }
.mcq-opt.ans-correct { background: var(--ok-bg); border-color: #34a173; color: #96e8be; }
.mcq-opt.ans-wrong { background: var(--bad-bg); border-color: #cf5646; color: #f8b4ac; }
.mcq-feedback {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 14px;
}
.mcq-feedback.ok { background: var(--ok-bg); border: 1px solid rgba(52, 161, 115, 0.45); color: #def9ec; }
.mcq-feedback.bad { background: var(--bad-bg); border: 1px solid rgba(207, 86, 70, 0.45); color: #fde4e1; }
.mfb-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mfb-btns { display: flex; gap: 8px; align-items: center; }
.mfb-exp { margin: 8px 0 0; font-size: 14.5px; line-height: 1.75; }

.eq-duel-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: radial-gradient(ellipse at center, rgba(22, 68, 53, 0.35) 0%, #0d1214 100%);
  border: 1px solid rgba(201, 162, 89, 0.24);
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.eq-side, .eq-board { text-align: center; }
.eq-lbl { font-size: 12px; font-weight: 700; color: var(--brass-light); margin-bottom: 6px; }
.eq-vs { font-family: var(--font-mono); font-size: 20px; font-weight: 900; color: var(--brass); }

/* Paint 填色模式 */
.paint-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.paint-select-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.paint-brushes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.brush-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 8px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-elev);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.brush-btn.active { border-color: var(--brass); background: rgba(201, 162, 89, 0.16); color: var(--brass-light); }
.paint-quick-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.paint-body {
  display: grid;
  grid-template-columns: minmax(420px, 560px) minmax(300px, 1fr);
  gap: 18px;
  align-items: start;
}
.pr-score {
  padding: 16px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 12px;
}
.pr-score.good { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid rgba(52, 161, 115, 0.4); }
.pr-score.warn { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid rgba(201, 162, 89, 0.4); }
.pr-score.bad  { background: var(--bad-bg); color: var(--bad-fg); border: 1px solid rgba(207, 86, 70, 0.4); }
.pr-num { font-family: var(--font-mono); font-size: 34px; font-weight: 900; line-height: 1.1; }
.pr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.missed-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mchip {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bad-bg);
  color: var(--bad-fg);
  border: 1px solid rgba(207, 86, 70, 0.38);
}

/* ---------------------------------------------------------------------------
 * 計算機工具箱 (#/tools) & 統計 (#/stats)
 * --------------------------------------------------------------------------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.tool-card h2 { margin: 0 0 4px; font-size: 18px; color: var(--text); }
.tool-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.eq-bar-wrap {
  display: flex;
  height: 30px;
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  margin-bottom: 8px;
}
.eq-bar-p1 { background: #2d996d; display: flex; align-items: center; justify-content: center; }
.eq-bar-p2 { background: #c95745; display: flex; align-items: center; justify-content: center; }
.calc-metrics { display: flex; justify-content: space-between; font-size: 13px; flex-wrap: wrap; gap: 8px; color: var(--text-2); }
.calc-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cmetric {
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.cmetric.good { background: var(--ok-bg); border-color: rgba(52, 161, 115, 0.4); }
.cmetric.bad  { background: var(--bad-bg); border-color: rgba(207, 86, 70, 0.4); }
.cm-val { font-family: var(--font-mono); font-size: 18px; font-weight: 800; color: var(--brass-light); }
.cm-lbl { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.stats-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.skpi { display: flex; flex-direction: column; gap: 4px; }
.skpi span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.skpi strong { font-family: var(--font-mono); font-size: 24px; color: var(--brass-light); }
.stats-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }
.rcell.hm-low  { background: rgba(201, 162, 89, 0.35); color: #f6e3b5; }
.rcell.hm-mid  { background: rgba(212, 122, 48, 0.68); color: #fff; }
.rcell.hm-high { background: #c94a3c; color: #fff; }
.mistake-list { display: flex; flex-direction: column; gap: 8px; }
.mistake-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  content-visibility: auto;
  contain-intrinsic-size: auto 56px;
}
.mi-btns { display: flex; gap: 6px; white-space: nowrap; }

/* Toast */
#toastBox {
  position: fixed;
  bottom: 84px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: #1b2228;
  border: 1px solid rgba(201, 162, 89, 0.42);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.ok { background: #14392b; border-color: rgba(124, 212, 166, 0.45); color: #e2fff0; }
.toast.show { opacity: 1; transform: translateY(0); }

/* ===========================================================================
 * 5-1. 首頁
 * =========================================================================== */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 34px 36px;
  border-radius: 22px;
  background:
    radial-gradient(ellipse 68% 78% at 78% 48%, rgba(22, 68, 53, 0.34) 0%, transparent 66%),
    radial-gradient(ellipse 60% 55% at 0% 0%, rgba(201, 162, 89, 0.1) 0%, transparent 56%),
    linear-gradient(180deg, #151a1e 0%, #0f1316 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
  margin-bottom: 30px;
}
.hero-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(201, 162, 89, 0.13);
  color: var(--brass-light);
  font-weight: 750;
  font-size: 12.5px;
  border: 1px solid rgba(201, 162, 89, 0.36);
}
.home-hero h1 { font-size: 40px; line-height: 1.18; margin: 14px 0 12px; letter-spacing: -0.03em; font-weight: 850; color: #f6f6f2; }
.hero-sub { color: var(--text-2); font-size: 15.5px; margin: 0 0 22px; line-height: 1.75; }
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-ctas .btn { white-space: normal; text-align: left; }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 18px; color: var(--muted); font-size: 13px; }
.hh-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.today-card { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(20, 25, 29, 0.88);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
}
.tc-item small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.tc-item b { font-size: 15px; color: var(--text); }
.home-sec { margin-bottom: 30px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; gap: 10px; }
.sec-head h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; color: var(--text); }
.sec-head a { font-weight: 650; font-size: 13.5px; color: var(--brass-light); }
.path-row { display: flex; align-items: stretch; gap: 4px; overflow-x: auto; padding: 4px 2px 8px; }
.path-card {
  flex: 1 1 0;
  min-width: 168px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--c);
  border-radius: 14px;
  padding: 14px;
  text-decoration: none !important;
  color: var(--text);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.path-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); background: var(--surface-elev); border-color: var(--c); }
.pc-top { display: flex; justify-content: space-between; align-items: center; }
.pc-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--cs); display: grid; place-items: center; font-size: 20px; }
.path-card small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.04em; }
.path-card b { display: block; margin-top: 10px; font-size: 16px; color: var(--text); }
.path-card p { margin: 3px 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.5; min-height: 38px; }
.pc-bar, .ss-bar, .sp-bar { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 99px; overflow: hidden; }
.pc-bar i, .ss-bar i, .sp-bar i { display: block; height: 100%; background: var(--c, var(--brass)); border-radius: 99px; }
.pc-cnt { display: block; margin-top: 6px; }
.path-card.done { background: linear-gradient(180deg, var(--cs), var(--surface) 72%); }
.path-arrow { align-self: center; color: rgba(255, 255, 255, 0.2); font-size: 22px; font-weight: 700; padding: 0 2px; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  text-decoration: none !important;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.quick-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(201, 162, 89, 0.45); background: var(--surface-elev); }
.quick-card > span { font-size: 28px; }
.quick-card b { font-size: 15.5px; color: var(--text); }
.quick-card small { color: var(--muted); font-size: 13px; }
.home-two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mini-modes { display: flex; flex-direction: column; gap: 10px; }
.mini-mode {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  text-decoration: none !important;
  color: var(--text);
  transition: border-color 0.15s, background-color 0.15s;
}
.mini-mode:hover { border-color: rgba(201, 162, 89, 0.45); background: var(--surface-elev); box-shadow: var(--shadow-md); }
.mini-mode > span { font-size: 28px; }
.mini-mode b { display: block; font-size: 15px; color: var(--text); }
.mini-mode small { color: var(--muted); font-size: 13px; }
.mini-mode em { margin-left: auto; font-style: normal; color: var(--brass); font-weight: 800; font-size: 18px; }
.tip-hero {
  background: linear-gradient(135deg, rgba(201, 162, 89, 0.12), var(--surface));
  border: 1px solid rgba(201, 162, 89, 0.3);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.tip-hero b { font-size: 16px; color: var(--brass-light); }
.tip-hero p { margin: 6px 0 0; color: var(--text-2); }
.term-hero { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; }
.term-hero small { color: var(--muted); font-weight: 750; font-size: 12px; }
.term-hero b { display: block; font-size: 16px; margin: 2px 0; color: var(--text); }
.term-hero p { margin: 0 0 6px; color: var(--text-2); font-size: 14px; }
.home-foot { margin: 34px auto 6px; color: var(--muted); font-size: 12.5px; text-align: center; max-width: 820px; line-height: 1.7; }

/* ===========================================================================
 * 迷你 6 人牌桌（widgets / 新手練習 / 首頁）— Broadcast Studio 質感
 * =========================================================================== */
.mt-wrap {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 16 / 10;
  margin: 18px auto 26px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 80% 65% at 50% 48%, rgba(28, 72, 56, 0.24) 0%, rgba(10, 13, 15, 0.96) 76%),
    linear-gradient(180deg, #121719 0%, #090c0d 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}
.mt-wrap.sm { max-width: 440px; }
.mt-rail {
  position: absolute;
  inset: 14% 10%;
  border-radius: 999px;
  padding: 10px;
  background: linear-gradient(160deg, var(--rail-light) 0%, var(--rail-mid) 48%, var(--rail-dark) 100%);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.65),
    inset 0 2px 3px rgba(255, 232, 200, 0.14),
    inset 0 -3px 6px rgba(0, 0, 0, 0.6);
}
.mt-felt {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: radial-gradient(ellipse 68% 62% at 50% 45%, var(--felt-center) 0%, var(--felt-mid) 56%, var(--felt-edge) 100%);
  box-shadow: inset 0 6px 20px rgba(0, 0, 0, 0.6), inset 0 0 0 1.5px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  overflow: visible;
}
.mt-felt::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  opacity: 0.08;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.mt-felt .felt-inner-ring {
  position: absolute;
  inset: 9px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 89, 0.24);
  pointer-events: none;
}
.mt-center { position: relative; z-index: 2; text-align: center; color: #f8fafc; }
.mt-pot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  background: rgba(7, 17, 13, 0.78);
  border: 1px solid rgba(201, 162, 89, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 6px;
  color: rgba(235, 226, 200, 0.78);
  letter-spacing: 0.06em;
}
.mt-pot strong { font-family: var(--font-mono); font-size: 12px; color: #f6e3b5 !important; }
.mt-board .pcards { gap: 4px; }
.mt-board .pcard.md { width: 38px; height: 54px; padding: 3.5px 4.5px; }
.mt-board .pcard.md .pc-r { font-size: 13px; }
.mt-board .pcard.md .pc-s { font-size: 9px; }
.mt-board .pcard.md .pc-pip { font-size: 16px; margin-top: -4px; }
.mt-slots { display: inline-flex; gap: 4px; }
.mt-slots i { width: 34px; height: 48px; border: 1px dashed rgba(255, 255, 255, 0.16); background: rgba(0, 0, 0, 0.14); border-radius: 6px; display: inline-block; }
.mt-note { font-size: 11.5px; color: var(--brass-light); margin-top: 6px; background: rgba(7, 17, 13, 0.72); border: 1px solid rgba(201, 162, 89, 0.28); border-radius: 999px; padding: 2px 10px; display: inline-block; }
.mt-seat { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 2px; transform: translate(-50%, -50%); z-index: 3; transition: opacity 0.2s; }
.mt-seat.s0 { left: 70%; top: 86%; }
.mt-seat.s1 { left: 30%; top: 86%; }
.mt-seat.s2 { left: 11%; top: 52%; }
.mt-seat.s3 { left: 23%; top: 18%; }
.mt-seat.s4 { left: 77%; top: 18%; }
.mt-seat.s5 { left: 89%; top: 52%; }
.mt-croupier {
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translate(-50%, -58%);
  background: linear-gradient(180deg, #21282e 0%, #13171b 100%);
  color: var(--text);
  border: 1px solid rgba(201, 162, 89, 0.35);
  border-radius: 999px;
  padding: 2px 12px 3px;
  text-align: center;
  line-height: 1.15;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.48);
  z-index: 3;
  white-space: nowrap;
}
.mt-croupier span { display: block; font-size: 11px; font-weight: 800; color: var(--brass-light); }
.mt-croupier small { display: block; font-size: 9px; color: var(--muted); }
.mt-badge {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, rgba(28, 34, 39, 0.96) 0%, rgba(16, 20, 23, 0.98) 100%);
  color: var(--text);
  border-radius: 9px;
  padding: 4px 10px;
  text-align: center;
  min-width: 70px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
  line-height: 1.25;
}
.mt-badge strong, .lesson-body .mt-badge strong { display: block; font-family: var(--font-mono); font-size: 12px; color: var(--brass-light) !important; font-weight: 800; letter-spacing: 0.02em; }
.mt-badge em { display: block; font-style: normal; font-size: 9.5px; color: #8bc8e8; font-weight: 600; line-height: 1.15; white-space: nowrap; }
.mt-badge small { display: block; font-size: 10.5px; color: var(--text-2); }
.mt-seat.hero .mt-badge { border-color: var(--brass); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(201, 162, 89, 0.35); }
.mt-seat.hl .mt-badge { border-color: var(--brass-light); box-shadow: 0 0 0 3px rgba(201, 162, 89, 0.35); }
.mt-seat.folded { opacity: 0.34; filter: saturate(0.25); }
.mt-seat.clickable { cursor: pointer; }
.mt-seat.clickable:hover .mt-badge { border-color: var(--brass-light); }
.mt-cards { display: flex; gap: 0; margin-bottom: -10px; z-index: 1; }
.mt-cards .pcards { gap: 0; }
.mt-cards .pcard.sm:first-child { transform: rotate(-5deg) translateX(2px); }
.mt-cards .pcard.sm:last-child { transform: rotate(5deg) translateX(-2px); }
.mt-cards .pcard.sm { width: 28px; height: 39px; padding: 2px 3px; }
.mt-cards .pcard.sm .pc-r { font-size: 10.5px; }
.mt-cards .pcard.sm .pc-s { font-size: 7.5px; }
.mt-cards .pcard.sm .pc-pip { font-size: 12px; margin-top: -3px; }
.mt-dealer {
  position: absolute;
  top: -6px;
  right: -12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(160deg, #faf7ef 0%, #d4ccb8 100%);
  color: #18140e;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 10.5px;
  display: grid;
  place-items: center;
  border: 1.5px solid #8a7e68;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.52);
  z-index: 4;
}
.mt-order { position: absolute; top: -9px; left: -11px; width: 21px; height: 21px; border-radius: 50%; background: var(--brass); color: #14110b; font-weight: 800; font-size: 11px; display: grid; place-items: center; z-index: 4; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); }
.mt-bet {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: rgba(10, 18, 15, 0.88);
  color: #f7e6bb;
  border-radius: 999px;
  padding: 1px 7px;
  border: 1px solid rgba(201, 162, 89, 0.45);
}
.mt-say { font-size: 10.5px; font-weight: 700; background: rgba(34, 42, 48, 0.94); color: var(--text); border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 8px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4); white-space: nowrap; }
.hero-table { margin: 2px auto 6px; }

/* ===========================================================================
 * 5-2. 學習地圖
 * =========================================================================== */
.continue-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, rgba(201, 162, 89, 0.12), var(--surface) 65%);
  border: 1px solid rgba(201, 162, 89, 0.34);
  border-radius: 18px;
  padding: 18px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.continue-card.done { background: linear-gradient(135deg, rgba(52, 161, 115, 0.16), var(--surface) 65%); border-color: rgba(52, 161, 115, 0.38); }
.cc-txt { flex: 1; min-width: 0; }
.cc-txt small { color: var(--brass-light); font-weight: 750; font-size: 12.5px; }
.cc-txt h3 { margin: 4px 0; font-size: 19px; color: var(--text); }
.cc-txt p { margin: 0; color: var(--text-2); font-size: 14px; }
.stage-stepper {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 26px;
  position: sticky;
  top: calc(var(--header-h) + 6px);
  z-index: 20;
  background: rgba(13, 16, 18, 0.95);
  backdrop-filter: blur(8px);
  padding: 6px 0;
}
.stage-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 3px 9px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 10px;
  text-decoration: none !important;
  color: var(--text);
  transition: border-color 0.15s, background-color 0.15s;
}
.stage-step:hover { border-color: var(--c); background: var(--surface-elev); box-shadow: var(--shadow-md); }
.ss-ic { grid-row: span 2; width: 34px; height: 34px; border-radius: 9px; background: var(--cs); display: grid; place-items: center; font-size: 18px; }
.ss-txt small { display: block; font-size: 10px; color: var(--muted); font-weight: 800; letter-spacing: 0.05em; line-height: 1.2; }
.ss-txt b { font-size: 13.5px; white-space: nowrap; color: var(--text); }
.ss-bar { grid-column: 2 / 3; height: 4px; }
.ss-cnt { grid-row: 1 / 3; grid-column: 3; font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-weight: 750; }
.stage-step.done { border-color: var(--c); background: linear-gradient(180deg, var(--cs), var(--surface)); }
.stage-sec { margin-bottom: 32px; scroll-margin-top: 150px; }
.stage-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sh-ic { width: 54px; height: 54px; border-radius: 14px; background: var(--cs); display: grid; place-items: center; font-size: 27px; flex-shrink: 0; }
.sh-txt { flex: 1; }
.sh-txt small { color: var(--ct, var(--c)); font-weight: 800; letter-spacing: 0.06em; font-size: 11.5px; }
.sh-txt h2 { margin: 0; font-size: 22px; letter-spacing: -0.01em; color: var(--text); }
.sh-txt p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.lesson-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 12px; }
.lesson-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  text-decoration: none !important;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  content-visibility: auto;
  contain-intrinsic-size: auto 156px;
}
.lesson-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--c); background: var(--surface-elev); }
.lc-top { display: flex; justify-content: space-between; align-items: center; }
.lc-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--cs); display: grid; place-items: center; font-size: 21px; }
.lc-no { font-family: var(--font-mono); font-size: 12px; font-weight: 750; color: var(--muted); }
.lesson-card h3 { margin: 4px 0 0; font-size: 15.5px; line-height: 1.45; color: var(--text); }
.lesson-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; font-size: 12px; color: var(--muted); padding-top: 6px; }
.lesson-card.done { background: linear-gradient(180deg, rgba(52, 161, 115, 0.1), var(--surface)); border-color: rgba(52, 161, 115, 0.3); }
.lesson-card.done .lc-no { color: #7cd4a6; }
.lesson-card.next { border: 2px solid var(--c); box-shadow: 0 0 0 4px var(--cs); }
.lesson-card.next .lc-no { color: var(--ct, var(--c)); }
.plan-card { background: linear-gradient(135deg, rgba(52, 161, 115, 0.15), var(--surface) 65%); border-color: rgba(52, 161, 115, 0.36); }
.plan-card .cc-txt small { color: #7cd4a6; }
.plan-card .ring-fg { stroke: #34a173; }
.plan-week { margin-bottom: 26px; }
.pw-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.pw-no { width: 50px; height: 50px; border-radius: 14px; background: var(--surface-elev); border: 1px solid rgba(201, 162, 89, 0.4); color: var(--brass-light); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 900; font-size: 17px; flex-shrink: 0; }
.pw-head > div { flex: 1; }
.pw-head h2 { margin: 0; font-size: 19px; color: var(--text); }
.pw-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.plan-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.plan-day { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; transition: border-color 0.15s; scroll-margin-top: 120px; content-visibility: auto; contain-intrinsic-size: auto 230px; }
.plan-day.today { border: 2px solid #34a173; box-shadow: 0 0 0 4px rgba(52, 161, 115, 0.18); content-visibility: visible; }
.plan-day.done { background: linear-gradient(180deg, rgba(52, 161, 115, 0.1), var(--surface)); }
.pd-head { display: flex; align-items: flex-start; gap: 12px; }
.pd-no { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-elev); border: 1px solid var(--border); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 900; color: var(--text-2); flex-shrink: 0; }
.plan-day.today .pd-no { background: #2b7a5b; color: #fff; border-color: #34a173; }
.plan-day.done .pd-no { background: #2b7a5b; color: #fff; }
.pd-title { flex: 1; min-width: 0; }
.pd-title b { display: block; font-size: 15px; line-height: 1.4; color: var(--text); }
.pd-title small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.5; margin-top: 2px; }
.pd-check { display: flex; gap: 4px; align-items: center; font-size: 13px; font-weight: 700; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.pd-check input { width: 16px; height: 16px; accent-color: #34a173; }
.pd-items { display: flex; flex-direction: column; gap: 6px; }
.pd-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--surface-sub); border: 1px solid var(--border); color: var(--text); font-size: 13.5px; text-decoration: none !important; }
.pd-item:hover { background: rgba(201, 162, 89, 0.12); border-color: rgba(201, 162, 89, 0.35); }
.pd-item em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 12px; white-space: nowrap; }
.pd-item.lesson.ok { background: rgba(52, 161, 115, 0.12); border-color: rgba(52, 161, 115, 0.28); }
.pd-item.drill { background: rgba(156, 124, 232, 0.12); border-color: rgba(156, 124, 232, 0.25); }
.pd-tip { font-size: 13px; color: var(--brass-light); background: rgba(201, 162, 89, 0.1); border: 1px solid rgba(201, 162, 89, 0.24); border-radius: 10px; padding: 7px 10px; }
.plan-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(52, 161, 115, 0.16), var(--surface));
  border: 1px solid rgba(52, 161, 115, 0.35);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 14px;
  text-decoration: none !important;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.plan-hero:hover { border-color: #34a173; transform: translateY(-1px); }
.plan-hero > span { font-size: 28px; }
.plan-hero > div { flex: 1; min-width: 0; }
.plan-hero small { display: block; color: #7cd4a6; font-weight: 800; font-size: 12px; }
.plan-hero b { display: block; font-size: 16px; color: var(--text); }
.plan-hero em { display: block; font-style: normal; color: var(--text-2); font-size: 13px; }
.plan-hero i { font-style: normal; color: #7cd4a6; font-weight: 900; font-size: 18px; }

/* ===========================================================================
 * 5-3. 課程頁
 * =========================================================================== */
.read-progress { position: fixed; top: var(--header-h); left: 0; right: 0; height: 3px; z-index: 99; pointer-events: none; }
.read-progress i { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left center; will-change: transform; background: linear-gradient(90deg, var(--brass), #34a173); border-radius: 0 3px 3px 0; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin: 0 0 14px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); font-weight: 650; }
.crumbs a:hover { color: var(--brass-light); }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 26px; align-items: start; }
.lesson-article { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 32px 40px; box-shadow: var(--shadow); min-width: 0; }
.lesson-hero { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.lh-ic { width: 62px; height: 62px; border-radius: 16px; background: var(--cs); display: grid; place-items: center; font-size: 31px; flex-shrink: 0; }
.lh-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.stage-chip { background: var(--cs); color: var(--ct, var(--c)); padding: 2px 10px; border-radius: 999px; font-weight: 800; }
.lesson-hero h1 { margin: 6px 0 0; font-size: 29px; line-height: 1.3; letter-spacing: -0.02em; color: var(--text); }
.tldr { background: linear-gradient(135deg, var(--cs), rgba(20, 24, 27, 0.96) 85%); border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; }
.tldr-lbl { font-size: 11.5px; font-weight: 800; color: var(--ct, var(--c)); letter-spacing: 0.05em; }
.tldr p { margin: 4px 0 0; font-size: 17px; font-weight: 750; line-height: 1.6; color: var(--text); }
.plain-box { display: flex; gap: 12px; background: rgba(201, 162, 89, 0.11); border: 1px solid rgba(201, 162, 89, 0.3); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; }
.pb-ic { font-size: 26px; line-height: 1.2; }
.plain-box b { color: var(--brass-light); }
.plain-box p { margin: 2px 0 0; color: var(--text-2); font-size: 14.5px; line-height: 1.75; }
.keypoints { background: var(--surface-sub); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.kp-title { font-weight: 800; margin-bottom: 8px; color: var(--text); }
.keypoints ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.keypoints li { position: relative; padding-left: 28px; font-size: 14.5px; line-height: 1.65; color: var(--text-2); }
.keypoints li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--ok-bg);
  color: var(--ok-fg);
  font-size: 11px;
  font-weight: 900;
  display: grid;
  place-items: center;
}
.lesson-body { font-size: 15.5px; line-height: 1.88; color: var(--text-2); }
.lesson-body h3 { font-size: 20.5px; margin: 36px 0 12px; scroll-margin-top: 84px; display: flex; align-items: center; gap: 10px; line-height: 1.4; letter-spacing: -0.01em; color: var(--text); }
.lesson-body h3::before { content: ''; flex-shrink: 0; width: 4px; height: 22px; background: var(--c, var(--brass)); border-radius: 3px; }
.lesson-body h3.sec-target-highlight {
  animation: secHighlightPulse 2.8s ease-out forwards;
  border-left: 4px solid var(--brass);
  padding-left: 12px;
  border-radius: 4px;
}
@keyframes secHighlightPulse {
  0% { background: rgba(201, 162, 89, 0.32); }
  40% { background: rgba(201, 162, 89, 0.16); }
  100% { background: transparent; }
}
.lesson-body h4 { font-size: 16px; margin: 22px 0 8px; color: var(--text); }
.lesson-body p { margin: 10px 0; }
.lesson-body ul, .lesson-body ol { padding-left: 22px; }
.lesson-body li { margin: 5px 0; }
.lesson-body strong { color: #f6f6f2; }
.lesson-body table { display: table; }
.lesson-body .tbl { font-size: 14px; }
.lesson-body .tbl td:first-child, .lesson-body .tbl th:first-child { min-width: 4.6em; }
.lesson-body .tbl-wrap { margin: 14px 0; }
.lesson-body .tbl-wrap .tbl { margin: 0; }
.lesson-body > *:first-child { margin-top: 18px; }
.formula {
  background: linear-gradient(135deg, rgba(201, 162, 89, 0.13), rgba(22, 68, 53, 0.24));
  border: 1px solid rgba(201, 162, 89, 0.34);
  color: var(--brass-light);
  padding: 12px 16px;
  border-radius: 11px;
  font-family: var(--font-mono);
  font-weight: 750;
  text-align: center;
  margin: 14px 0;
  font-size: 15px;
  letter-spacing: 0.01em;
}
.callout {
  position: relative;
  padding: 12px 16px 12px 48px;
  border-radius: 12px;
  margin: 16px 0;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  font-size: 14.5px;
  line-height: 1.78;
  color: var(--text-2);
}
.callout::before { position: absolute; left: 15px; top: 11px; font-size: 19px; line-height: 1.3; }
.callout > b:first-child { display: block; margin-bottom: 2px; font-size: 13.5px; letter-spacing: 0.02em; }
.callout.key { background: rgba(43, 111, 148, 0.14); border-color: rgba(88, 166, 212, 0.34); }
.callout.key::before { content: '🔑'; }
.callout.key > b:first-child { color: #8bc8e8; }
.callout.tip { background: rgba(43, 122, 91, 0.15); border-color: rgba(74, 180, 134, 0.34); }
.callout.tip::before { content: '💡'; }
.callout.tip > b:first-child { color: #7cd4a6; }
.callout.warn { background: rgba(201, 162, 89, 0.13); border-color: rgba(201, 162, 89, 0.36); }
.callout.warn::before { content: '⚠️'; }
.callout.warn > b:first-child { color: var(--brass-light); }
.callout.example { background: rgba(156, 124, 232, 0.13); border-color: rgba(156, 124, 232, 0.32); }
.callout.example::before { content: '🧩'; }
.callout.example > b:first-child { color: #c8b6f7; }
.callout.plain { background: rgba(212, 148, 64, 0.13); border-color: rgba(212, 148, 64, 0.32); }
.callout.plain::before { content: '🐣'; }
.callout.plain > b:first-child { color: #f2c985; }
.callout.pro { background: var(--surface-elev); border: 1px dashed var(--border-strong); }
.callout.pro::before { content: '🎓'; }
.callout.pro > b:first-child { color: var(--text); }
.range-side .callout, .rs-sec .callout { padding-left: 16px; }
.range-side .callout::before, .rs-sec .callout::before { content: none; }
ol.steps { list-style: none; counter-reset: st; padding: 0 !important; margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
ol.steps > li { counter-increment: st; position: relative; padding: 10px 14px 10px 50px; background: var(--surface-elev); border: 1px solid var(--border); border-radius: 12px; margin: 0 !important; line-height: 1.7; color: var(--text-2); }
ol.steps > li::before {
  content: counter(st);
  position: absolute;
  left: 13px;
  top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c, var(--brass));
  color: #14110b;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  display: grid;
  place-items: center;
}
ol.steps > li > b:first-child { display: block; color: var(--text); }
ol.steps.mini > li { padding: 6px 10px 6px 40px; font-size: 13.5px; }
ol.steps.mini > li::before { width: 21px; height: 21px; top: 7px; left: 10px; font-size: 11.5px; }
ol.steps.mini > li > b:first-child { display: inline; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.compare > div { border-radius: 12px; padding: 12px 16px; border: 1px solid var(--border); background: var(--surface-elev); font-size: 14.5px; color: var(--text-2); }
.compare > div:first-child { border-color: rgba(52, 161, 115, 0.36); background: rgba(43, 122, 91, 0.14); }
.compare > div:last-child { border-color: rgba(207, 86, 70, 0.36); background: rgba(185, 74, 57, 0.14); }
.compare h4 { margin: 0 0 6px !important; font-size: 15px; color: var(--text); }
.compare ul { margin: 4px 0; }
.hh { border: 1px solid var(--border-strong); border-radius: 14px; overflow: hidden; margin: 18px 0; background: var(--surface-sub); box-shadow: var(--shadow); }
.hh-title { background: linear-gradient(90deg, #163b2e, #182025); color: var(--brass-light); padding: 10px 16px; font-weight: 800; font-size: 14.5px; border-bottom: 1px solid rgba(201, 162, 89, 0.25); }
.hh-row { position: relative; display: block; padding: 10px 16px 10px 84px; border-top: 1px solid var(--border); font-size: 14.5px; line-height: 1.8; color: var(--text-2); }
.hh-street { position: absolute; left: 16px; top: 12px; min-width: 54px; font-weight: 800; font-size: 12px; color: var(--text); background: #2a333b; border-radius: 6px; text-align: center; padding: 1px 6px; line-height: 1.6; }
.hh-row.result { background: rgba(43, 122, 91, 0.15); }
.hh-row.result .hh-street { background: #2b7a5b; color: #fff; }
.lesson-side { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; padding-bottom: 6px; }
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.side-title { font-weight: 800; font-size: 13px; color: var(--brass); margin-bottom: 8px; }
.toc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.toc a { display: block; padding: 5px 9px; border-radius: 8px; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.toc a:hover { background: var(--surface-elev); text-decoration: none; color: var(--text); }
.toc a.on { color: var(--ct, var(--brass-light)); background: var(--cs); font-weight: 750; }
.stage-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.stage-list a { display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 8px; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.stage-list a:hover { background: var(--surface-elev); text-decoration: none; color: var(--text); }
.sl-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border-strong); flex-shrink: 0; }
.stage-list li.done .sl-dot { background: #34a173; border-color: #34a173; }
.stage-list li.cur a { background: var(--cs); color: var(--ct, var(--brass-light)); font-weight: 750; }
.stage-list li.cur .sl-dot { border-color: var(--c); }
.tip-card p, .side-card p { font-size: 13px; color: var(--text-2); margin: 0; line-height: 1.65; }
.term-demo { border-bottom: 1.5px dashed rgba(201, 162, 89, 0.7); }
.lesson-quiz { margin-top: 36px; border-top: 1px solid var(--border); padding-top: 22px; }
.lq-head { display: flex; justify-content: space-between; align-items: center; }
.lq-head h3 { margin: 0; font-size: 19px; color: var(--text); }
.lq-item { border: 1px solid var(--border); background: var(--surface-sub); border-radius: 14px; padding: 14px 16px; margin-top: 12px; transition: border-color 0.15s; }
.lq-item.ok { border-color: rgba(52, 161, 115, 0.5); }
.lq-item.bad { border-color: rgba(207, 86, 70, 0.5); }
.lq-q { font-weight: 700; font-size: 15px; margin-bottom: 10px; display: flex; gap: 8px; line-height: 1.6; color: var(--text); }
.lq-no { flex-shrink: 0; background: var(--brass); color: #14110b; border-radius: 6px; padding: 0 7px; font-family: var(--font-mono); font-size: 12px; font-weight: 800; height: 22px; line-height: 22px; margin-top: 1px; }
.lq-opts { display: flex; flex-direction: column; gap: 6px; }
.lq-opt { display: flex; gap: 10px; align-items: center; text-align: left; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-elev); font: inherit; font-size: 14px; cursor: pointer; line-height: 1.5; color: var(--text); }
.lq-opt:hover:not([disabled]) { border-color: rgba(201, 162, 89, 0.55); background: #232a31; }
.lq-opt.ans-correct { background: var(--ok-bg); border-color: #34a173; color: #96e8be; }
.lq-opt.ans-wrong { background: var(--bad-bg); border-color: #cf5646; color: #f8b4ac; }
.lq-opt[disabled] { cursor: default; }
.lq-exp { margin-top: 10px; font-size: 13.5px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; line-height: 1.7; }
.lq-foot { margin-top: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 650; }
.sources { margin-top: 30px; background: var(--surface-sub); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; }
.sources h4 { margin: 0 0 6px; font-size: 15px; color: var(--text); }
.sources ul { margin: 0; padding-left: 18px; }
.sources li { margin: 4px 0; font-size: 14px; color: var(--text-2); }
.sources li small { color: var(--muted); margin-left: 6px; }
.sources p { margin: 8px 0 0; }
.lesson-done-bar { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 30px 0 8px; }
.lesson-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.ln-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; text-decoration: none !important; color: var(--text); background: var(--surface-elev); transition: border-color 0.15s, background-color 0.15s; }
.ln-card:hover { border-color: rgba(201, 162, 89, 0.5); box-shadow: var(--shadow-md); background: #232a31; }
.ln-card small { display: block; color: var(--muted); font-weight: 750; font-size: 12px; }
.ln-card b { font-size: 14.5px; color: var(--text); }
.ln-card.next { text-align: right; }

/* ===========================================================================
 * 5-4. 範圍表
 * =========================================================================== */
.help-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 14px; }
.help-box summary { cursor: pointer; padding: 12px 16px; font-weight: 750; color: var(--brass-light); list-style: none; }
.help-box summary::-webkit-details-marker { display: none; }
.help-box[open] summary { border-bottom: 1px solid var(--border); }
.help-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 14px 16px; font-size: 13.5px; }
.help-body p { margin: 4px 0 0; color: var(--text-2); line-height: 1.7; }
.sw-dot { display: inline-block; width: 11px; height: 11px; border-radius: 3px; vertical-align: -1px; margin: 0 3px 0 6px; }
.sw-dot.act-raise { background: var(--act-raise); }
.sw-dot.act-3bet { background: var(--act-3bet); }
.sw-dot.act-4bet { background: var(--act-4bet); }
.sw-dot.act-call { background: var(--act-call); }
.sw-dot.act-fold { background: #1a2026; border: 1px solid rgba(255, 255, 255, 0.25); }
.picker { padding: 14px 16px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.pk-row { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 12px; align-items: center; }
.pk-lbl { font-weight: 800; font-size: 13.5px; color: var(--text-2); }
.pk-cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pk-cat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0 9px;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-elev);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.pk-cat > span { grid-row: span 2; font-size: 23px; align-self: center; }
.pk-cat b { font-size: 14.5px; color: var(--text); }
.pk-cat small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.pk-cat:hover { border-color: rgba(201, 162, 89, 0.45); background: #232a31; }
.pk-cat.on { border-color: var(--brass); background: rgba(201, 162, 89, 0.14); box-shadow: 0 0 0 2px rgba(201, 162, 89, 0.2); }
.pk-pos { display: flex; gap: 8px; flex-wrap: wrap; }
.pos-btn { display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 11px; background: var(--surface-elev); color: var(--text); cursor: pointer; font: inherit; transition: background-color 0.12s, color 0.12s, border-color 0.12s; }
.pos-btn b { font-family: var(--font-mono); font-size: 15px; }
.pos-btn small { font-size: 11.5px; color: var(--muted); }
.pos-btn:hover { border-color: rgba(201, 162, 89, 0.5); }
.pos-btn.on { background: linear-gradient(180deg, #d4af64 0%, #ac863d 100%); border-color: rgba(255, 232, 184, 0.45); color: #14110b; }
.pos-btn.on small { color: #362912; }
.pos-btn.vill.on { background: #b9384a; border-color: #d95b6a; color: #fff; }
.pos-btn.vill.on small { color: rgba(255, 255, 255, 0.85); }
.range-layout { display: grid; grid-template-columns: minmax(0, 600px) minmax(300px, 1fr); gap: 16px; align-items: start; }
.range-layout.cmp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(280px, 340px); }
.range-card .rgrid { max-width: none; }
.rc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.rc-head h2 { margin: 0 0 4px; font-size: 18.5px; color: var(--text); }
.rc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.freq-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.fq { flex: 1; min-width: 110px; border-radius: 10px; padding: 8px 12px; background: var(--surface-sub); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); }
.fq small { display: block; font-size: 12px; color: var(--muted); font-weight: 750; }
.fq b { font-family: var(--font-mono); font-size: 17px; color: var(--text); }
.fq em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.fq.act-raise { border-left-color: var(--act-raise); }
.fq.act-3bet { border-left-color: var(--act-3bet); }
.fq.act-4bet { border-left-color: var(--act-4bet); }
.fq.act-5bet { border-left-color: var(--act-5bet); }
.fq.act-call { border-left-color: var(--act-call); }
.range-side h3 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text); }
.range-side p { margin: 0; font-size: 14px; color: var(--text-2); }
.rs-sec + .rs-sec { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.pos-pills-title { font-weight: 750; font-size: 13px; margin: 12px 0 6px; color: var(--text); }
.pos-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pos-pill { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; }
.pos-pill b { font-weight: 800; }
.pos-pill.ok { background: var(--ok-bg); color: var(--ok-fg); }
.pos-pill.warn { background: var(--warn-bg); color: var(--warn-fg); }
.pos-pill.bad { background: var(--surface-elev); color: var(--muted); }
.tier-tag { display: inline-block; padding: 1px 9px; border-radius: 999px; font-weight: 800; font-size: 12px; }

/* ===========================================================================
 * 5-5. 練習中心與題目
 * =========================================================================== */
.hub-top { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 26px; }
.hub-goal { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow); }
.hub-goal small { display: block; color: var(--muted); font-weight: 750; font-size: 12.5px; }
.hub-goal b { display: block; font-size: 18px; margin: 2px 0; color: var(--text); }
.hub-goal .muted { font-size: 13px; }
.hub-rec {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: linear-gradient(135deg, #174636 0%, #102a21 60%, #1d242a 100%);
  border: 1px solid rgba(201, 162, 89, 0.42);
  color: #f6f6f2;
  border-radius: 16px;
  padding: 16px 22px;
  text-decoration: none !important;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s, border-color 0.15s;
}
.hub-rec:hover { transform: translateY(-2px); border-color: var(--brass-light); }
.hub-rec small { color: var(--brass-light); font-weight: 750; }
.hub-rec b { font-size: 21px; color: #fff; }
.hub-rec > span { color: var(--text-2); font-size: 13.5px; }
.hub-rec em { font-style: normal; font-weight: 800; margin-top: 6px; color: var(--brass-light); }
.hub-sec { margin-bottom: 26px; }
.hub-sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hub-sec-head > span { font-size: 28px; }
.hub-sec-head h2 { margin: 0; font-size: 18.5px; color: var(--text); }
.hub-sec-head p { margin: 0; color: var(--muted); font-size: 13px; }
.mode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.mode-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  text-decoration: none !important;
  color: var(--text);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  content-visibility: auto;
  contain-intrinsic-size: auto 92px;
}
.mode-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(201, 162, 89, 0.45); background: var(--surface-elev); }
.mode-card.rec { border: 1.5px solid rgba(52, 161, 115, 0.65); }
.mc-ic { width: 50px; height: 50px; border-radius: 12px; background: var(--surface-elev); border: 1px solid var(--border); display: grid; place-items: center; font-size: 26px; flex-shrink: 0; }
.mc-txt { flex: 1; min-width: 0; }
.mc-txt b { font-size: 15.5px; color: var(--text); }
.mc-txt p { margin: 2px 0; color: var(--text-2); font-size: 13px; line-height: 1.45; }
.mc-txt small { color: var(--muted); font-size: 12px; }
.mc-go { color: var(--brass-light); font-weight: 800; font-size: 13px; white-space: nowrap; }
.drill-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 12px; }
.back-link { font-weight: 750; font-size: 13.5px; color: var(--text-2); padding: 7px 12px; border-radius: 10px; background: var(--surface-elev); border: 1px solid var(--border); text-decoration: none !important; }
.back-link:hover { color: var(--brass-light); border-color: rgba(201, 162, 89, 0.45); }
.dh-title { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 240px; }
.dh-ic { font-size: 32px; }
.dh-title h1 { margin: 0; font-size: 22px; letter-spacing: -0.01em; color: var(--text); }
.dh-title p { margin: 0; color: var(--muted); font-size: 13.5px; }
.drill-switch { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ds-tab { padding: 6px 13px; border-radius: 999px; background: var(--surface-elev); border: 1px solid var(--border); color: var(--text-2); font-weight: 650; font-size: 13px; text-decoration: none !important; }
.ds-tab:hover { border-color: rgba(201, 162, 89, 0.45); color: var(--text); }
.ds-tab.on { background: linear-gradient(180deg, #d4af64 0%, #ac863d 100%); border-color: rgba(255, 232, 184, 0.4); color: #14110b; }
.kbd-hint { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 16px; }
.dr-stage { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 4px; }
.dr-hands { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.dr-hand { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 18px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface-elev); min-width: 150px; box-shadow: var(--shadow); }
.dr-hand small { color: var(--muted); font-size: 12px; font-weight: 650; }
.dr-board, .sd-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, var(--felt-center) 0%, var(--felt-mid) 58%, var(--felt-edge) 100%);
  border: 6px solid #2b1e15;
  border-radius: 16px;
  box-shadow: inset 0 6px 20px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(201, 162, 89, 0.25), 0 10px 26px rgba(0, 0, 0, 0.45);
}
.dr-board .lbl, .sd-board .lbl { color: var(--brass-light); margin: 0; letter-spacing: 0.06em; }
.dr-hand .lbl, .sd-p .lbl { margin: 0; }
.dr-board .pcards, .sd-board .pcards { gap: 7px; }
.dr-results { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.dr-res { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface-elev); border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; max-width: 100%; }
.dr-res.win { border-color: rgba(52, 161, 115, 0.5); background: var(--ok-bg); }
.dr-res > b { min-width: 72px; color: var(--text); }
.dr-res > span:not(.pcards) { color: var(--text-2); font-size: 13.5px; flex: 1 1 140px; min-width: 0; }
.dr-res > .pcards { flex: 0 0 auto; max-width: 100%; }
.dr-outs { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.dr-outs-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface-elev); border: 1px solid rgba(52, 161, 115, 0.4); border-radius: 10px; padding: 8px 10px; font-size: 13.5px; }
.dr-outs-row.dirty { border-color: rgba(207, 86, 70, 0.45); }
.mfb-exp .mt-wrap { margin-bottom: 26px; }

/* ===========================================================================
 * 5-6. 百科
 * =========================================================================== */
.g-count { margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.g-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; align-items: start; }
.g-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; transition: border-color 0.15s, background 0.15s; content-visibility: auto; contain-intrinsic-size: auto 92px; }
.g-card:hover { border-color: rgba(201, 162, 89, 0.4); background: var(--surface-elev); }
.g-card.open { border-color: var(--brass); box-shadow: 0 0 0 2px rgba(201, 162, 89, 0.22); content-visibility: visible; }
.g-head { width: 100%; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; background: none; border: none; padding: 0; cursor: pointer; font: inherit; text-align: left; color: var(--text); }
.g-term b { display: block; font-size: 15px; color: var(--text); }
.g-term span { color: var(--brass-light); font-weight: 700; font-size: 13.5px; }
.g-imp { color: var(--brass); font-size: 11px; white-space: nowrap; letter-spacing: 1px; }
.g-short { margin: 6px 0 0; color: var(--text-2); font-size: 13.5px; cursor: pointer; line-height: 1.6; }
.g-more { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 13.5px; line-height: 1.7; }
.g-card.open .g-more { display: block; }
.g-def { color: var(--text-2); }
.g-ex { margin-top: 8px; background: var(--surface-sub); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.g-ex b { display: block; font-size: 12px; color: var(--muted); }
.g-aka { margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.g-rel { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; font-size: 12.5px; color: var(--muted); }
.g-rel a { background: rgba(201, 162, 89, 0.14); color: var(--brass-light); padding: 1px 9px; border-radius: 999px; font-weight: 650; }
.flash-wrap { max-width: 660px; margin: 10px auto; }
.flash-card { min-height: 290px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 22px; box-shadow: var(--shadow-md); padding: 28px; cursor: pointer; display: grid; place-items: center; text-align: center; outline: none; }
.flash-card .fc-back { display: none; text-align: left; width: 100%; }
.flash-card.flip .fc-front { display: none; }
.flash-card.flip .fc-back { display: block; }
.fc-front small { color: var(--muted); }
.fc-front h2 { font-size: 30px; margin: 8px 0 2px; color: var(--brass-light); }
.fc-front p { font-size: 18px; font-weight: 700; margin: 0 0 12px; color: var(--text); }
.fc-back > b { font-size: 18px; color: var(--text); }
.fc-back .fc-short { font-weight: 700; margin: 6px 0; color: var(--brass-light); }
.fc-def { color: var(--text-2); font-size: 14.5px; line-height: 1.75; }
.flash-btns { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.daily-tip { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(135deg, rgba(201, 162, 89, 0.14), var(--surface)); border: 1px solid rgba(201, 162, 89, 0.34); border-radius: 14px; padding: 14px 18px; margin-bottom: 16px; }
.dt-ic { font-size: 28px; }
.daily-tip small { color: var(--brass-light); font-weight: 800; }
.daily-tip b { display: block; font-size: 16.5px; color: var(--text); }
.daily-tip p { margin: 4px 0 0; color: var(--text-2); }
.tip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tip-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; content-visibility: auto; contain-intrinsic-size: auto 148px; }
.tc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tc-cat { font-size: 12px; color: var(--muted); font-weight: 750; }
.tip-card h4 { margin: 2px 0 0; font-size: 15.5px; color: var(--text); }
.tip-card p { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.7; }
.tc-link { margin-top: auto; font-size: 12.5px; font-weight: 750; padding-top: 4px; color: var(--brass-light); }
.leak-intro { display: flex; justify-content: space-between; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; margin-bottom: 14px; }
.leak-intro p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.leak-count { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.leak-count small { color: var(--muted); font-size: 12px; }
.leak-count .ring-fg { stroke: #cf5646; }
.leak-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 12px; }
.leak-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; content-visibility: auto; contain-intrinsic-size: auto 240px; }
.leak-card.mine { border-color: rgba(207, 86, 70, 0.55); box-shadow: 0 0 0 2px rgba(207, 86, 70, 0.2); }
.lk-head { display: flex; align-items: center; gap: 10px; }
.lk-ic { font-size: 24px; }
.lk-head h4 { margin: 0; font-size: 16px; flex: 1; color: var(--text); }
.lk-mine { font-size: 12.5px; color: var(--muted); display: flex; gap: 4px; align-items: center; cursor: pointer; white-space: nowrap; }
.lk-rows { display: flex; flex-direction: column; gap: 6px; }
.lk-rows > div { display: grid; grid-template-columns: 92px 1fr; gap: 8px; font-size: 13.5px; line-height: 1.65; }
.lk-rows p { margin: 0; color: var(--text-2); }
.lk-lbl { font-weight: 800; font-size: 12.5px; color: var(--muted); }
.lk-rows .fix { background: rgba(43, 122, 91, 0.16); border: 1px solid rgba(52, 161, 115, 0.3); border-radius: 10px; padding: 6px 8px; margin: 0 -8px; }
.lk-rows .fix p { color: #b7f0d2; }
.lk-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.cs-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 16px; position: sticky; top: calc(var(--header-h) + 4px); z-index: 20; background: rgba(13, 16, 18, 0.95); backdrop-filter: blur(8px); padding: 8px 0; }
.cs-nav a { padding: 5px 11px; border-radius: 999px; background: var(--surface-elev); border: 1px solid var(--border); font-size: 13px; font-weight: 650; color: var(--text-2); text-decoration: none !important; }
.cs-nav a:hover { border-color: rgba(201, 162, 89, 0.45); color: var(--brass-light); }
.cs-nav .btn { margin-left: auto; }
.cs-sec { margin-bottom: 26px; scroll-margin-top: 130px; }
.cs-sec h2 { font-size: 18px; margin: 0 0 10px; color: var(--text); }
.cs-sec .widget { margin: 0; }
.formula-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.fm-card { border: 1px solid var(--border); background: var(--surface-elev); border-radius: 12px; padding: 12px; }
.fm-card .formula { margin: 8px 0 6px; font-size: 13.5px; }
.fm-card small { color: var(--muted); }
.maxim { margin: 0 0 18px; background: linear-gradient(135deg, #16372b, #141a1e); border: 1px solid rgba(201, 162, 89, 0.35); color: var(--text-2); border-radius: 16px; padding: 20px 24px; position: relative; }
.maxim p { margin: 0; font-size: 18px; font-weight: 750; color: #f6f6f2; padding-right: 90px; }
.maxim small { display: block; margin-top: 6px; color: var(--muted); font-style: italic; }
.maxim cite { display: block; margin-top: 4px; color: var(--brass-light); font-style: normal; font-weight: 750; font-size: 13px; }
.maxim .btn { position: absolute; right: 12px; top: 12px; color: var(--text-2); }
.mx-note { margin-top: 8px; color: var(--text-2); font-size: 13.5px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-group { font-weight: 800; font-size: 14px; color: var(--brass-light); margin: 14px 0 2px; }
.faq-group:first-child { margin-top: 0; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: border-color 0.15s; content-visibility: auto; contain-intrinsic-size: auto 54px; }
.faq-item[open] { border-color: rgba(201, 162, 89, 0.45); box-shadow: 0 0 0 2px rgba(201, 162, 89, 0.16); content-visibility: visible; }
.faq-item summary { cursor: pointer; padding: 12px 16px; font-weight: 700; font-size: 15px; display: flex; gap: 10px; align-items: baseline; list-style: none; color: var(--text); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '＋'; margin-left: auto; color: var(--muted); font-weight: 800; }
.faq-item[open] summary::after { content: '－'; color: var(--brass); }
.faq-q { flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px; background: rgba(201, 162, 89, 0.16); color: var(--brass-light); font-size: 12px; font-weight: 900; display: grid; place-items: center; }
.faq-a { padding: 0 16px 14px 48px; color: var(--text-2); font-size: 14.5px; line-height: 1.8; }
.faq-a p { margin: 6px 0; }
.faq-more { display: inline-block; margin-top: 8px; font-weight: 700; font-size: 13px; color: var(--brass-light); }
.spot-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.spot-history { background: rgba(201, 162, 89, 0.12); border: 1px solid rgba(201, 162, 89, 0.34); border-radius: 12px; padding: 10px 14px; font-size: 14.5px; color: var(--brass-light); line-height: 1.7; }
.chips-row.tight { margin: 0; flex: 1; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin: 12px 0 14px; }
.res-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; text-decoration: none !important; color: var(--text); display: flex; flex-direction: column; gap: 4px; transition: transform 0.15s, border-color 0.15s, background 0.15s; content-visibility: auto; contain-intrinsic-size: auto 136px; }
.res-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(201, 162, 89, 0.45); background: var(--surface-elev); }
.rc-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rc-cat { font-size: 12px; font-weight: 750; color: var(--muted); margin-right: auto; }
.res-card h4 { margin: 4px 0 0; font-size: 15.5px; color: var(--text); }
.ext { color: var(--muted); font-size: 12px; }
.res-card p { margin: 4px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.65; }

/* ===========================================================================
 * 5-7. 工具與進度
 * =========================================================================== */
.tools-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.tools-mini .widget { margin: 0; }
.tools-mini.one { grid-template-columns: 1fr; }
.tool-card h2 { font-size: 17px; }
.stage-progress-card { margin-bottom: 16px; }
.spc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.spc-head h2 { margin: 0; font-size: 18px; color: var(--text); }
.sp-rows { display: flex; flex-direction: column; gap: 4px; }
.sp-row { display: grid; grid-template-columns: 130px 1fr 64px; gap: 12px; align-items: center; color: var(--text); text-decoration: none !important; padding: 5px 8px; border-radius: 8px; font-size: 14px; }
.sp-row:hover { background: var(--surface-elev); }
.sp-bar { height: 8px; }
.sp-row b { text-align: right; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.skpi strong { color: var(--brass-light); }
.badge-card { margin-bottom: 16px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { border: 1px solid var(--border); border-radius: 14px; padding: 12px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; background: var(--surface-sub); filter: grayscale(1); opacity: 0.6; }
.badge.ok { filter: none; opacity: 1; background: linear-gradient(180deg, rgba(201, 162, 89, 0.14), var(--surface-elev)); border-color: rgba(201, 162, 89, 0.42); }
.bd-ic { font-size: 30px; line-height: 1.2; }
.badge b { font-size: 14px; color: var(--text); }
.badge small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.badge em { font-style: normal; font-size: 11.5px; color: var(--muted); font-weight: 750; }
.badge.ok em { color: var(--brass-light); }
.bd-bar { width: 100%; height: 5px; background: rgba(255, 255, 255, 0.08); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.bd-bar i { display: block; height: 100%; background: var(--brass); }
.stats-kpi-row .card { border-radius: 14px; }

/* ===========================================================================
 * 6. 互動元件（widgets）
 * =========================================================================== */
.widget { margin: 20px 0; }
.w-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); font-size: 14px; line-height: 1.6; }
.w-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.w-head strong { font-size: 15.5px; color: var(--text); }
.w-head .muted { font-size: 12.5px; }
.w-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); font-size: 13.5px; }
.w-links { display: flex; gap: 6px; flex-wrap: wrap; }
.w-note { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.rk-list { list-style: none; margin: 0; padding: 0 !important; display: flex; flex-direction: column; gap: 6px; }
.rk-item { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin: 0 !important; background: var(--surface-sub); transition: border-color 0.15s, background 0.15s; }
.rk-row { width: 100%; display: grid; grid-template-columns: 30px minmax(120px, 160px) minmax(0, 1fr) 64px 16px; align-items: center; gap: 10px; padding: 8px 12px; background: transparent; border: none; cursor: pointer; font: inherit; text-align: left; color: var(--text); }
.rk-row:hover { background: var(--surface-elev); }
.rk-no { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-elev); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 800; font-size: 13px; color: var(--muted); }
.rk-item:nth-child(-n+3) .rk-no { background: rgba(201, 162, 89, 0.22); color: var(--brass-light); }
.rk-name b { display: block; font-size: 14.5px; line-height: 1.3; color: var(--text); }
.rk-name small { color: var(--muted); font-size: 11.5px; }
.rk-prob { font-family: var(--font-mono); font-size: 12px; color: var(--muted); text-align: right; font-weight: 750; }
.rk-chev { color: var(--muted); transition: transform 0.2s; }
.rk-detail { display: none; padding: 0 14px 12px 52px; color: var(--text-2); font-size: 14px; line-height: 1.7; }
.rk-item.open { border-color: rgba(201, 162, 89, 0.45); background: rgba(201, 162, 89, 0.08); }
.rk-item.open .rk-row { background: transparent; }
.rk-item.open .rk-detail { display: block; }
.rk-item.open .rk-chev { transform: rotate(180deg); color: var(--brass); }
.sd-players { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.sd-p { border: 1.5px solid var(--border); background: var(--surface-elev); border-radius: 14px; padding: 12px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: border-color 0.15s, background 0.15s; }
.sd-p.win { border-color: #34a173; background: var(--ok-bg); }
.sd-res b { display: block; color: var(--text); }
.sd-res small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.sd-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.fb { margin-top: 12px; padding: 12px 14px; border-radius: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.fb.ok { background: var(--ok-bg); color: #def9ec; border: 1px solid rgba(52, 161, 115, 0.4); }
.fb.bad { background: var(--bad-bg); color: #fde4e1; border: 1px solid rgba(207, 86, 70, 0.4); }
.fb .btn { margin-left: auto; }
.walk-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.walk-text h4 { margin: 0 0 8px !important; font-size: 17px; color: var(--text); }
.walk-body { font-size: 14.5px; color: var(--text-2); min-height: 120px; line-height: 1.75; }
.walk-dots { display: flex; gap: 5px; margin: 12px 0; flex-wrap: wrap; }
.walk-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); cursor: pointer; transition: background-color 0.2s, transform 0.2s; }
.walk-dots i.past { background: rgba(201, 162, 89, 0.55); }
.walk-dots i.on { background: var(--brass); width: 22px; border-radius: 99px; }
.walk-btns { display: flex; gap: 8px; }
.pos-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.pi-title { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.pi-pos { background: linear-gradient(180deg, #d4af64 0%, #ac863d 100%); color: #14110b; font-family: var(--font-mono); font-weight: 900; border-radius: 10px; padding: 8px 12px; font-size: 18px; }
.pi-title b { display: block; font-size: 17px; color: var(--text); }
.pi-title small { color: var(--muted); }
.pi-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pi-stats > span { background: var(--surface-elev); border: 1px solid var(--border); border-radius: 8px; padding: 3px 10px; font-size: 13px; color: var(--text-2); }
.pos-info p { color: var(--text-2); font-size: 14px; margin: 6px 0; }
.pos-info .callout { margin: 10px 0; }
.tiers-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
.tiers-grid .rgrid { max-width: 520px; }
.tier-legend { display: flex; flex-direction: column; gap: 6px; }
.tier-lg { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-elev); cursor: pointer; font: inherit; text-align: left; color: var(--text); }
.tier-lg:hover { border-color: rgba(201, 162, 89, 0.45); }
.tier-lg i { width: 16px; height: 16px; border-radius: 5px; flex-shrink: 0; }
.tier-lg small { margin-left: auto; color: var(--muted); font-size: 12px; }
.tier-info { margin-top: 10px; background: var(--surface-sub); border: 1px solid var(--border); border-radius: 12px; padding: 12px; font-size: 13.5px; color: var(--text-2); }
.tier-info p { margin: 6px 0 0; }
.tier-cell { transition: opacity 0.15s; }
.tier-cell.dim { opacity: 0.22; }
.outs-live { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: center; margin-bottom: 12px; }
.outs-live label { font-weight: 750; display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.ol-n { font-family: var(--font-mono); font-size: 22px; color: var(--brass-light); }
.ol-cards, .po-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.stat-tile { background: var(--surface-sub); border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; }
.stat-tile small, .stat-tile span { display: block; color: var(--muted); font-size: 12px; font-weight: 650; }
.stat-tile b, .stat-tile strong { display: block; font-family: var(--font-mono); font-size: 19px; color: var(--brass-light); }
.stat-tile em { font-style: normal; color: var(--muted); font-size: 12px; }
.stat-tile.ok { background: var(--ok-bg); border-color: rgba(52, 161, 115, 0.4); }
.stat-tile.bad { background: var(--bad-bg); border-color: rgba(207, 86, 70, 0.4); }
.outs-tbl tr { cursor: pointer; }
.outs-tbl tr.hl td { background: rgba(201, 162, 89, 0.12); }
.outs-tbl tr.sel td { background: rgba(201, 162, 89, 0.22) !important; color: #fff; }
.draw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.draw-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--surface-elev); display: flex; flex-direction: column; gap: 8px; }
.dc-top { display: flex; align-items: baseline; gap: 6px; }
.dc-top b { font-size: 14.5px; color: var(--text); }
.dc-top small { color: var(--muted); font-size: 11.5px; }
.dc-outs { margin-left: auto; font-family: var(--font-mono); font-weight: 900; font-size: 20px; color: var(--brass-light); }
.dc-outs small { font-size: 11px; color: var(--muted); font-weight: 700; }
.dc-cards { display: flex; gap: 10px; flex-wrap: wrap; }
.dc-cards > span { display: flex; flex-direction: column; gap: 3px; }
.dc-cards small { color: var(--muted); font-size: 11px; }
.draw-card p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.dc-pct { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); margin-top: auto; }
.dc-pct b { color: var(--text); }
.po-inputs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.po-inputs label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 750; color: var(--muted); }
.po-inputs .inp { width: 100%; }
.pcs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 12px; }
.pcs-item { border: 1px solid var(--border); background: var(--surface-elev); border-radius: 14px; padding: 10px; text-decoration: none !important; color: var(--text); display: flex; flex-direction: column; gap: 6px; transition: border-color 0.15s, transform 0.15s; }
.pcs-item:hover { border-color: rgba(201, 162, 89, 0.5); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.pcs-head { display: flex; align-items: baseline; gap: 6px; }
.pcs-head b { font-size: 16px; color: var(--text); }
.pcs-head > span { color: var(--muted); font-size: 12.5px; }
.pcs-head em { margin-left: auto; font-style: normal; font-family: var(--font-mono); font-weight: 800; color: var(--act-raise); font-size: 13px; }
.pcs-item small { color: var(--muted); font-size: 12px; }
.pcs-item .rgrid { max-width: none; }

/* ===========================================================================
 * RWD
 * =========================================================================== */
@media (max-width: 1240px) {
  .nav-link { padding: 8px 10px; }
  .brand-txt small { display: none; }
  .search-btn { min-width: 0; }
  .search-btn .sb-txt { display: none; }
}
@media (max-width: 1080px) {
  .range-layout, .range-layout.cmp, .qstage-grid.preflop-stage, .paint-body, .tools-grid, .stats-grid { grid-template-columns: 1fr; }
  .lesson-layout { grid-template-columns: minmax(0, 1fr); }
  .lesson-side { display: none; }
  .stage-stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .main-nav { display: none; }
  .header-inner { justify-content: space-between; }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(16, 20, 23, 0.97);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 4px 2px calc(4px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .mnav-link { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 4px 2px; border-radius: 10px; color: var(--muted); text-decoration: none !important; font-size: 17px; line-height: 1.2; white-space: nowrap; }
  .mnav-link small { font-size: 10.5px; font-weight: 750; }
  .mnav-link.active { color: var(--brass-light); background: rgba(201, 162, 89, 0.14); }
  body { padding-bottom: 66px; }
  .home-hero, .home-two, .hub-top, .walk-grid, .pos-grid, .tiers-grid, .outs-live, .tools-mini { grid-template-columns: 1fr; }
  .home-hero { padding: 24px 20px; }
  .home-hero h1 { font-size: 31px; }
  .stage-stepper { position: static; }
  .pk-row { grid-template-columns: 1fr; gap: 6px; }
  .pk-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-body { grid-template-columns: 1fr; }
  .lesson-article { padding: 22px 18px; border-radius: 18px; }
  .lesson-hero h1 { font-size: 24px; }
  .leak-list { grid-template-columns: 1fr; }
  .po-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare { grid-template-columns: 1fr; }
  .lesson-nav { grid-template-columns: 1fr; }
  .continue-card { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .app-main { padding: 14px 12px 30px; }
  .hh-row { padding-left: 16px; padding-top: 34px; }
  .hh-street { top: 9px; }
  .page-head h1 { font-size: 23px; }
  .ph-icon { width: 44px; height: 44px; font-size: 22px; border-radius: 12px; }
  .stage-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .stats-kpi-row { grid-template-columns: 1fr 1fr; }
  .sd-players { grid-template-columns: 1fr; }
  .sd-btns { grid-template-columns: 1fr; }
  .hstat-pill { display: none; }
  .rk-row { grid-template-columns: 26px minmax(0, 1fr) auto 14px; }
  .rk-prob { display: none; }
  .g-grid, .tip-grid, .res-grid, .mode-grid, .plan-days { grid-template-columns: 1fr; }
  .mcq-card { padding: 18px 16px; }
  .dr-board .pcard.lg, .dr-hand .pcard.lg { width: 44px; height: 62px; }
  .sp-row { grid-template-columns: 100px 1fr 54px; }
  .lk-rows > div { grid-template-columns: 1fr; gap: 2px; }
  .mt-wrap { margin: 16px auto 24px; }
  .mt-badge { min-width: 48px; padding: 2px 6px; }
}
@media print {
  .site-header, .mobile-nav, .cs-nav, .tabs, .page-head .ph-actions, .toolbar, .read-progress, .lesson-side, #toastBox { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
  .app-main { padding: 0; max-width: none; }
  .w-card, .card, .lesson-article { box-shadow: none; break-inside: avoid; }
}

/* ===========================================================================
 * 中英術語對照：中文術語後的英文小標籤（en_terms.js + ui.js annotateEn）
 * =========================================================================== */
.en-t, .en-demo {
  display: inline;
  margin: 0 0.3em 0 0.2em;
  padding: 0 0.42em;
  border-radius: 0.45em;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 0.74em;
  font-weight: 600;
  font-style: normal;
  line-height: 1.6;
  letter-spacing: 0.01em;
  vertical-align: 0.1em;
  white-space: nowrap;
  text-decoration: none;
  text-transform: none;
}
.lesson-body .en-t, .callout .en-t, .lesson-body strong .en-t { color: var(--muted); }
.hh-title .en-t { background: rgba(255, 255, 255, 0.14); color: var(--brass-light); }
.hh-row { padding-left: 88px; }
.hh-street .en-sub {
  display: block;
  margin: 0;
  padding: 0 0 2px;
  background: none;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  vertical-align: baseline;
}
@media (max-width: 600px) {
  .hh-row { padding-left: 16px; }
  .hh-street .en-sub { display: inline; margin-left: 4px; padding: 0; }
}

/* ===========================================================================
 * 7. 版本號徽章 (v1.x.x) & Release Notes / 智慧發版彈跳視窗
 * =========================================================================== */
.brand-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.site-header .campus-home { width: 30px; margin-right: 0; padding: 0; justify-content: center; }
.site-header .campus-home .ch-txt { display: none; }
@media (max-width: 1319px) {
  .header-inner { gap: 10px; padding: 0 14px; }
  .nav-link { padding: 8px 8px; gap: 4px; }
}
@media (max-width: 1120px) {
  .header-inner { gap: 6px; padding: 0 10px; }
  .nav-link { padding: 7px 6px; }
  .nav-link .nav-ic { display: none; }
}
@media (max-width: 420px) {
  .header-inner { gap: 6px; padding: 0 10px; }
  .brand-wrap { gap: 5px; }
  .brand { gap: 6px; }
  .brand-logo { width: 30px; height: 30px; font-size: 17px; border-radius: 9px; }
  .brand-txt b { font-size: 14px; }
  .ver-badge { padding: 2px 6px; font-size: 11px; }
  .search-btn { padding: 5px 7px; }
  .search-btn kbd { display: none; }
}
.ver-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(201, 162, 89, 0.12);
  border: 1px solid rgba(201, 162, 89, 0.34);
  color: var(--brass-light);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
  align-self: flex-start;
  margin-top: 2px;
}
.ver-badge:hover {
  background: rgba(201, 162, 89, 0.22);
  border-color: var(--brass-light);
  transform: translateY(-1px);
}
.ver-badge.has-changes {
  background: rgba(201, 162, 89, 0.2);
  border-color: var(--brass);
  color: #f6e3b5;
}
.ver-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e2b455;
  box-shadow: 0 0 0 2px rgba(226, 180, 85, 0.28);
  display: inline-block;
}
.ver-pill-lg {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(201, 162, 89, 0.14);
  border: 1px solid rgba(201, 162, 89, 0.36);
  color: var(--brass-light);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  margin-left: 6px;
  vertical-align: middle;
}

.modal-bd {
  position: fixed;
  inset: 0;
  z-index: 980;
  background: rgba(5, 8, 10, 0.78);
  backdrop-filter: blur(4px);
  display: none;
  place-items: center;
  padding: 16px;
}
.modal-bd.open { display: grid; }
.modal-box.rel-modal-box, .rel-modal-box {
  width: min(780px, 95vw);
  max-width: 780px;
  max-height: 88vh;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-strong);
}
.rel-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #1b2126 0%, #14181b 100%);
}
.rel-modal-head h3 { margin: 0 0 4px; font-size: 19px; font-weight: 850; color: var(--text); }
.rel-modal-body { padding: 18px 22px 24px; overflow-y: auto; }
.rel-status-box {
  border-radius: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: var(--surface-sub);
}
.rel-status-box.clean {
  background: linear-gradient(135deg, rgba(43, 122, 91, 0.16) 0%, var(--surface-sub) 100%);
  border-color: rgba(52, 161, 115, 0.4);
}
.rel-status-box.dirty {
  background: linear-gradient(135deg, rgba(201, 162, 89, 0.14) 0%, var(--surface-sub) 100%);
  border-color: rgba(201, 162, 89, 0.42);
}
.rs-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rel-sec-title { margin: 18px 0 10px; font-size: 15px; font-weight: 850; color: var(--text); }
.ri-date { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 600; }
.rbo-sub { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.rel-ai-advice {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--info-bg);
  border: 1px solid rgba(88, 166, 212, 0.35);
  font-size: 13.5px;
  color: var(--text-2);
}
.rel-bump-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.rel-bump-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-elev);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.rel-bump-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rel-bump-opt:hover { border-color: rgba(201, 162, 89, 0.5); }
.rel-bump-opt.active, .rel-bump-opt.on {
  border-color: var(--brass);
  background: rgba(201, 162, 89, 0.14);
  box-shadow: 0 0 0 2px rgba(201, 162, 89, 0.22);
}
.rbo-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.rbo-top b, .rbo-top strong { font-size: 13px; color: var(--text); }
.rel-bump-opt small { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.rel-form { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.rel-actions { margin-top: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rel-timeline { display: flex; flex-direction: column; gap: 12px; }
.rel-item { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--surface-elev); }
.rel-item.latest { border-color: rgba(201, 162, 89, 0.45); background: linear-gradient(180deg, rgba(201, 162, 89, 0.1) 0%, var(--surface-elev) 60%); }
.ri-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ri-ver {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 850;
  color: var(--text);
  background: var(--surface-sub);
  padding: 2px 9px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
}
.rel-item.latest .ri-ver {
  background: rgba(201, 162, 89, 0.2);
  border-color: rgba(201, 162, 89, 0.45);
  color: var(--brass-light);
}
.ri-title { font-size: 15.5px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.ri-list { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--text-2); line-height: 1.65; }
.ri-list li { margin-bottom: 3px; }
@media (max-width: 680px) {
  .rel-bump-grid { grid-template-columns: 1fr; }
}

/* ===========================================================================
 * 8. 排版優化 v2：閱讀寬度、標題節奏、手機表格捲動、行動目錄、觸控尺寸、對比
 * =========================================================================== */
:root {
  color-scheme: dark;
  --measure: 40rem;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
:focus-visible { outline: 2.5px solid rgba(201, 162, 89, 0.65); outline-offset: 2px; }

@media (min-width: 1081px) {
  .lesson-layout { grid-template-columns: minmax(0, 860px) 280px; justify-content: center; }
  .page-learn .crumbs { max-width: 1166px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 1080px) {
  .lesson-article { max-width: 860px; margin: 0 auto; width: 100%; }
  .page-learn .crumbs { max-width: 860px; margin-left: auto; margin-right: auto; }
}

.lesson-body > * { max-width: var(--measure); }
.lesson-body > .tbl-wrap,
.lesson-body > .widget,
.lesson-body > .embed-chart,
.lesson-body > .compare,
.lesson-body > .w-card { max-width: none; }
.lesson-body p, .lesson-body li { overflow-wrap: anywhere; }
.lesson-body h3 + p, .lesson-body h4 + p { margin-top: 6px; }
.lesson-body h3 { margin: 40px 0 12px; }
.lesson-body > h3:first-child { margin-top: 22px; }
.lesson-body h4 { margin: 24px 0 6px; line-height: 1.5; }
.lesson-body ul > li::marker { color: var(--c, var(--brass)); }
.lesson-body ol:not(.steps) > li::marker { color: var(--ct, var(--c, var(--brass))); font-weight: 800; }
.lesson-body .callout > *:last-child, .lesson-body .compare > div > *:last-child { margin-bottom: 0; }
.lesson-body .callout p:first-of-type { margin-top: 2px; }
.lesson-body .callout ul, .lesson-body .callout ol:not(.steps) { margin: 6px 0; padding-left: 20px; }
.lesson-body .hh .cards, .lesson-body .tbl .cards { white-space: nowrap; }
.tldr, .plain-box, .keypoints { max-width: none; }

.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  max-width: 100%;
  background:
    linear-gradient(to right, var(--surface) 30%, rgba(20, 24, 27, 0)) left center / 28px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, rgba(20, 24, 27, 0)) right center / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0)) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0)) right center / 12px 100% no-repeat scroll;
}
.tbl th { word-break: keep-all; line-height: 1.45; }
.tbl td { line-height: 1.65; }
.tbl td .pcards { flex-wrap: nowrap; }

.toc-inline { display: none; }
.toc { counter-reset: tocn; }
.toc li { counter-increment: tocn; }
.toc a { display: flex; gap: 6px; }
.toc a::before { content: counter(tocn) '.'; flex-shrink: 0; min-width: 1.4em; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.toc a.on::before { color: inherit; }
@media (max-width: 1080px) {
  .toc-inline:not([hidden]) {
    display: block;
    margin: 4px 0 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
  }
  .toc-inline summary {
    cursor: pointer;
    list-style: none;
    padding: 11px 16px;
    min-height: 44px;
    font-weight: 800;
    font-size: 14.5px;
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .toc-inline summary::-webkit-details-marker { display: none; }
  .toc-inline summary::after { content: '▾'; color: var(--muted); }
  .toc-inline[open] summary { border-bottom: 1px solid var(--border); }
  .toc-inline[open] summary::after { content: '▴'; color: var(--brass); }
  .toc-inline .toc { padding: 6px 8px 10px; }
  .toc-inline .toc a { padding: 8px 10px; font-size: 14px; }
}

@media (max-width: 600px) {
  .lesson-article { padding: 18px 14px 22px; border-radius: 16px; }
  .lesson-hero { gap: 12px; align-items: flex-start; }
  .lh-ic { width: 48px; height: 48px; font-size: 25px; border-radius: 14px; }
  .lesson-hero h1 { font-size: 22px; line-height: 1.35; }
  .tldr { padding: 12px 14px; }
  .tldr p { font-size: 16px; }
  .plain-box { padding: 12px 14px; gap: 10px; }
  .keypoints { padding: 12px 14px; }
  .lesson-body { font-size: 16px; line-height: 1.8; }
  .lesson-body h3 { font-size: 19px; margin: 32px 0 10px; gap: 8px; }
  .lesson-body h3::before { height: 20px; }
  .lesson-body h4 { font-size: 16px; margin: 20px 0 6px; }
  .lesson-body ul, .lesson-body ol { padding-left: 20px; }
  .callout { padding: 12px 14px 12px 40px; font-size: 15px; line-height: 1.75; }
  .callout::before { left: 11px; font-size: 18px; }
  ol.steps > li { padding: 10px 12px 10px 44px; }
  ol.steps > li::before { left: 10px; width: 24px; height: 24px; font-size: 12.5px; }
  .compare > div { padding: 12px 14px; font-size: 15px; }
  .formula { font-size: 14.5px; padding: 10px 12px; text-align: left; }
  .hh-title { padding: 10px 14px; }
  .hh-row { padding: 32px 14px 10px; font-size: 15px; }
  .hh-street { left: 14px; top: 9px; }
  .lesson-body .tbl { font-size: 13.5px; }
  .tbl th, .tbl td { padding: 8px 10px; }
  .tbl td { min-width: 5.5em; }
  .sources { padding: 12px 14px; }
  .sources li { overflow-wrap: anywhere; }
  .lq-item { padding: 12px; }
  .lesson-done-bar .btn { flex: 1 1 100%; white-space: normal; }
  .continue-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; padding: 16px; }
  .continue-card .cc-ring { align-self: start; }
  .continue-card > .btn { grid-column: 1 / -1; width: 100%; }
  .continue-card.done { grid-template-columns: minmax(0, 1fr); }
  .cc-txt h3 { font-size: 17px; }
  .cs-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-left: -10px; margin-right: -10px; padding: 8px 10px; }
  .cs-nav::-webkit-scrollbar { display: none; }
  .cs-nav a, .cs-nav .btn { flex-shrink: 0; white-space: nowrap; }
  .fgroup { min-width: 0; max-width: 100%; }
}
select.inp { max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.fgroup select.inp { flex: 1 1 12em; }

@media (max-width: 480px) {
  .app-main { padding: 12px 10px 28px; }
  .lesson-article { padding: 16px 12px 20px; }
  .crumbs { font-size: 12.5px; margin-bottom: 10px; }
  .rk-row { grid-template-columns: 26px minmax(0, 1fr) 14px; grid-template-areas: 'no name chev' 'no cards chev'; row-gap: 4px; gap: 4px 10px; }
  .rk-no { grid-area: no; }
  .rk-name { grid-area: name; }
  .rk-name b { display: inline; }
  .rk-name small { margin-left: 6px; }
  .rk-cards { grid-area: cards; }
  .rk-chev { grid-area: chev; }
  .rk-detail { padding-left: 14px; }
}

@media (pointer: coarse) {
  .btn, .lq-opt, .mcq-opt, .act-choice-btn, .seg button, .tab, .onb-opt { min-height: 44px; }
  .chip-btn, .toc a, .stage-list a, .crumbs a { min-height: 40px; }
  .chip-btn, .crumbs a { display: inline-flex; align-items: center; }
  .stage-list a { padding-top: 8px; padding-bottom: 8px; }
  .mnav-link { min-height: 48px; justify-content: center; }
  .tabs, .chips-row { scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
}

.lc-meta, .lc-no, .lh-meta, .crumbs, .crumbs a, .side-title, .sources li small { color: var(--muted); }
.crumbs a:hover { color: var(--brass-light); }

/* ==========================================================================
   9. 6 人擬真 AI 實戰競技場（Arena）與雙軌教練覆盤室（Replay）
      Broadcast Studio 美學：Obsidian · Walnut Rail · Wool Emerald Felt · Brass
   ========================================================================== */

/* --- 9-1 實戰桌容器與頂部工具列 --- */
.arena-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 24px;
}
.arena-topbar,
.arena-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 11px 16px;
  background: linear-gradient(180deg, #171c20 0%, #13171a 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.at-brand {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--brass-light);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.at-left, .at-toggles, .at-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.at-lbl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.at-sel {
  font-size: 13px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: #0e1215;
  color: var(--text);
  font-weight: 500;
}
.at-chk {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.at-chk:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
  color: var(--text);
}
.at-chk input {
  cursor: pointer;
  accent-color: var(--brass);
}
.arena-timer-bar-wrap {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}
.arena-timer-bar {
  height: 100%;
  background: linear-gradient(90deg, #2b7a5b, var(--brass));
  border-radius: 99px;
  transition: width 0.1s linear, background-color 0.3s;
}
.arena-timer-bar.danger {
  background: #cf4a3c;
}

/* 重打失誤提示橫幅 */
.arena-retry-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(201, 162, 89, 0.14);
  border: 1px solid rgba(201, 162, 89, 0.42);
  border-radius: 10px;
  color: var(--brass-light);
  font-size: 13.5px;
  font-weight: 600;
}

/* --- 9-2 Broadcast 撲克桌與桌面配置 --- */
.arena-table-container {
  position: relative;
  width: 100%;
  padding: 78px 96px 92px;
  background:
    radial-gradient(ellipse 76% 62% at 50% 48%, rgba(28, 72, 56, 0.25) 0%, rgba(12, 16, 18, 0.97) 72%),
    linear-gradient(180deg, #121719 0%, #090c0d 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.68),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: visible;
  user-select: none;
}
.arena-table {
  position: relative;
  width: 100%;
  max-width: 820px;
  height: 390px;
  margin: 0 auto;
  box-sizing: border-box;
}
.arena-rail {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  padding: 15px;
  background: linear-gradient(160deg, var(--rail-light) 0%, var(--rail-mid) 48%, var(--rail-dark) 100%);
  box-shadow:
    0 26px 56px rgba(0, 0, 0, 0.75),
    0 4px 14px rgba(0, 0, 0, 0.5),
    inset 0 2px 3px rgba(255, 232, 200, 0.15),
    inset 0 -4px 8px rgba(0, 0, 0, 0.65);
}
.arena-felt {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: radial-gradient(ellipse 68% 62% at 50% 45%, var(--felt-center) 0%, var(--felt-mid) 56%, var(--felt-edge) 100%);
  box-shadow:
    inset 0 8px 26px rgba(0, 0, 0, 0.64),
    inset 0 0 0 2px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
/* 羊毛綠絨細膩顆粒質感 */
.arena-felt::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.085;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.felt-inner-ring {
  position: absolute;
  inset: 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(201, 162, 89, 0.23);
  pointer-events: none;
}

/* 桌面中心公共區域 */
.arena-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  transform: translateY(-6px);
  pointer-events: none;
}
.arena-pot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 14px;
  background: rgba(7, 17, 13, 0.76);
  border: 1px solid rgba(201, 162, 89, 0.36);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.38);
}
.pot-chip-stack {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f0d08a 0%, #c0913d 65%, #7c581c 100%);
  border: 1.5px dashed rgba(255, 248, 224, 0.72);
  flex-shrink: 0;
  display: inline-block;
}
.pot-lbl {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: rgba(235, 226, 200, 0.74);
}
.pot-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
  color: #f6e3b5;
}
.arena-board {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 76px;
}
.arena-board .pcards {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 7px;
}
.board-slot-empty {
  width: 52px;
  height: 74px;
  border-radius: 7px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}
.arena-street-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(235, 225, 198, 0.62);
  text-transform: uppercase;
}

/* 6 個座位配置（跨坐核桃木桌沿，精準對齊 6-Max 轉播幾何） */
.arena-seats {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.arena-seat {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: auto;
  transition: opacity 0.25s ease, filter 0.25s ease;
  z-index: 10;
}

.seat-0 { left: 50%; top: 100%; }
.seat-1 { left: 2%; top: 76%; }
.seat-2 { left: 2%; top: 24%; }
.seat-3 { left: 50%; top: 0%; }
.seat-4 { left: 98%; top: 24%; }
.seat-5 { left: 98%; top: 76%; }

/* 扇形底牌（從資訊名牌上方探出） */
.arena-seat-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: -14px;
  z-index: 1;
}
.arena-seat-cards .pcards {
  gap: 0;
  flex-wrap: nowrap;
}
.arena-seat-cards .pcard:first-child {
  transform: rotate(-5deg) translateX(3px);
}
.arena-seat-cards .pcard:last-child {
  transform: rotate(5deg) translateX(-3px);
}

/* 浮動深黑曜石座位名牌 */
.arena-seat-badge {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 11px 8px;
  min-width: 132px;
  background: linear-gradient(180deg, rgba(28, 34, 39, 0.96) 0%, rgba(16, 20, 23, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  color: var(--text);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.54);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.arena-seat-badge:hover {
  border-color: rgba(255, 255, 255, 0.24);
}
.arena-seat.is-hero .arena-seat-badge,
.arena-seat.hero-seat .arena-seat-badge {
  min-width: 138px;
  border-color: rgba(201, 162, 89, 0.38);
}
.arena-seat.is-active .arena-seat-badge,
.arena-seat.active-turn .arena-seat-badge {
  border-color: var(--brass);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.6),
    0 0 0 2px rgba(201, 162, 89, 0.45);
  animation: pulseBrass 1.8s ease-in-out infinite;
}
@keyframes pulseBrass {
  0%, 100% { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(201, 162, 89, 0.38); }
  50% { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65), 0 0 0 3px rgba(201, 162, 89, 0.68), 0 0 18px rgba(201, 162, 89, 0.26); }
}
.arena-seat.is-folded,
.arena-seat.folded {
  opacity: 0.36;
  filter: saturate(0.25);
}

.asb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}
.asb-pos {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1.5px 5.5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #e4e8e6;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.asb-pos.hero-pos,
.arena-seat.is-hero .asb-pos,
.arena-seat.hero-seat .asb-pos {
  background: var(--brass);
  color: #161108;
}
.asb-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 86px;
}
.asb-persona-badge {
  font-size: 10px;
  font-weight: 600;
  margin-top: 1px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
}
.asb-persona-badge.tilt {
  color: #f4a49c;
  font-weight: 700;
}
.asb-stack {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 700;
  color: #ead39c;
  text-align: right;
  margin-top: 1px;
}
.asb-stack strong {
  color: #f4dfae;
  font-weight: 800;
}

/* 象牙白 3D 莊家鈕（浮在桌沿內側） */
.arena-dealer-btn {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(160deg, #faf7ef 0%, #d4ccb8 100%);
  color: #18140e;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #8a7e68;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.58);
  z-index: 16;
  pointer-events: none;
}
.seat-0 .arena-dealer-btn { top: 4px; right: -26px; }
.seat-1 .arena-dealer-btn { top: 2px; right: -24px; }
.seat-2 .arena-dealer-btn { bottom: 2px; right: -24px; }
.seat-3 .arena-dealer-btn { bottom: -12px; right: -24px; }
.seat-4 .arena-dealer-btn { bottom: 2px; left: -24px; }
.seat-5 .arena-dealer-btn { top: 2px; left: -24px; }

/* 動作氣泡（座位名牌正下方，不與籌碼衝突） */
.arena-action-bubble {
  margin-top: 2px;
  padding: 2px 9px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f2f5f7;
  background: rgba(34, 42, 48, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.38);
  z-index: 15;
  animation: popIn 0.2s ease-out;
}
.arena-action-bubble.act-fold  { background: #4a545c; color: #dce1e5; border-color: rgba(255, 255, 255, 0.12); }
.arena-action-bubble.act-check { background: #2b7a5b; color: #f2fff8; border-color: rgba(124, 212, 166, 0.35); }
.arena-action-bubble.act-call  { background: #2b6f94; color: #f2faff; border-color: rgba(139, 200, 232, 0.35); }
.arena-action-bubble.act-bet   { background: #b87b29; color: #fffaf0; border-color: rgba(240, 208, 138, 0.4); }
.arena-action-bubble.act-raise { background: #b44636; color: #fff6f4; border-color: rgba(244, 164, 156, 0.4); }
.arena-action-bubble.act-allin { background: #9b2430; color: #ffffff; border-color: rgba(255, 190, 196, 0.45); }
.arena-action-bubble.act-blind { background: rgba(32, 39, 45, 0.92); color: #c7d0d6; }
@keyframes popIn {
  0% { transform: scale(0.86); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* 桌面下注籌碼膠囊（帶金屬金籌碼圓點） */
.arena-bet-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: rgba(10, 18, 15, 0.88);
  border: 1px solid rgba(201, 162, 89, 0.46);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 700;
  color: #f7e6bb;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.48);
  z-index: 12;
  pointer-events: none;
}
.arena-bet-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d8a74a;
  border: 1px solid #fff3d1;
  flex-shrink: 0;
}

/* 籌碼在綠絨內側的精準位置 */
.seat-0 .arena-bet-chip { bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%); }
.seat-1 .arena-bet-chip { left: calc(100% + 16px); top: 26%; }
.seat-2 .arena-bet-chip { left: calc(100% + 16px); top: 62%; }
.seat-3 .arena-bet-chip { top: calc(100% + 14px); left: 50%; transform: translateX(-50%); }
.seat-4 .arena-bet-chip { right: calc(100% + 16px); top: 62%; }
.seat-5 .arena-bet-chip { right: calc(100% + 16px); top: 26%; }

/* --- 9-3 底部操作控制列（Action Bar） --- */
.arena-action-bar {
  background: linear-gradient(180deg, #171c20 0%, #121619 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 15px 18px;
  box-shadow: var(--shadow);
}
.aab-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.aab-quick-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.aab-quick-sizes button {
  padding: 5px 11px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface-elev);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
}
.aab-quick-sizes button:hover {
  background: rgba(201, 162, 89, 0.16);
  border-color: rgba(201, 162, 89, 0.45);
  color: var(--brass-light);
}

.aab-slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}
.aab-slider {
  flex: 1;
  height: 6px;
  accent-color: var(--brass);
  cursor: pointer;
}
.aab-input-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}
.aab-inp {
  width: 72px;
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  background: #0c1012;
  color: var(--brass-light);
  border-radius: 7px;
  text-align: right;
}
.aab-unit {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

.aab-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.aab-btn {
  flex: 1 1 120px;
  max-width: 185px;
  min-height: 46px;
  padding: 8px 14px;
  font-size: 14.5px;
  font-weight: 800;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, filter 0.15s;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.aab-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.aab-btn:active {
  transform: translateY(1px);
}
.aab-btn small {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
}
.aab-btn.act-fold  { background: linear-gradient(180deg, #566068 0%, #3f474e 100%); color: #edf1f4; }
.aab-btn.act-check { background: linear-gradient(180deg, #2d8764 0%, #206349 100%); }
.aab-btn.act-call  { background: linear-gradient(180deg, #2f7ca5 0%, #225c7c 100%); }
.aab-btn.act-raise { background: linear-gradient(180deg, #d4af64 0%, #a8823c 100%); color: #14110b; border-color: rgba(255, 232, 184, 0.42); }
.aab-btn.act-allin { background: linear-gradient(180deg, #b93640 0%, #8a202a 100%); border-color: rgba(255, 190, 196, 0.35); }

/* 等待與結算面板 */
.aab-wait {
  text-align: center;
  padding: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.aab-fast-forward {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-sub);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  color: var(--text-2);
}
.aab-ended {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px;
}
.aab-result-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.aab-result-text .plus, .plus { color: #7cd4a6; }
.aab-result-text .minus, .minus { color: #f4a49c; }
.aab-result-text .badge.green { display: inline-block; padding: 2px 9px; border-radius: 99px; background: var(--ok-bg); color: var(--ok-fg); border: 1px solid rgba(52, 161, 115, 0.4); font-size: 12px; filter: none; opacity: 1; }
.aab-result-text .badge.red { display: inline-block; padding: 2px 9px; border-radius: 99px; background: var(--bad-bg); color: var(--bad-fg); border: 1px solid rgba(207, 86, 70, 0.4); font-size: 12px; filter: none; opacity: 1; }
.aab-result-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* --- 9-4 即時教練提示卡片 --- */
.arena-hint-box {
  background: var(--surface);
  border: 1px solid rgba(201, 162, 89, 0.34);
  border-radius: 12px;
  padding: 12px 16px;
}
.ah-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brass-light);
  margin-bottom: 8px;
}
.ah-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
}
.ah-track {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}
.ah-track.gto {
  background: var(--info-bg);
  border: 1px solid rgba(88, 166, 212, 0.34);
  color: #cbe7f6;
}
.ah-track.exploit {
  background: var(--warn-bg);
  border: 1px solid rgba(201, 162, 89, 0.36);
  color: #f3dfb0;
}
.ah-track b {
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- 9-5 覆盤室（Replay Room）與雙軌教練版面 --- */
.replay-page-wrap,
.replay-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding-bottom: 24px;
}
.replay-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #171c20 0%, #13171a 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.rt-left, .rt-right, .rt-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.rt-left h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}
.rt-tab.active {
  background: rgba(201, 162, 89, 0.16);
  border-color: rgba(201, 162, 89, 0.48);
  color: var(--brass-light);
}

.replay-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.replay-layout > *,
.replay-main,
.replay-viewer-card,
.replay-coach-card,
.replay-table-wrap {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.replay-table-wrap {
  margin: 12px 0;
}
.replay-table-stage {
  padding: 64px 72px 74px;
  border-radius: 16px;
}
.replay-mini-table {
  height: 345px;
  max-width: 720px;
}
.replay-mini-table .arena-center {
  transform: translateY(-14px);
  gap: 6px;
}
.replay-mini-table .seat-0 .arena-bet-chip {
  bottom: calc(100% + 6px);
}
.replay-mini-table .arena-seat-badge {
  min-width: 122px;
  padding: 6px 9px;
}
.replay-mini-table .board-slot-empty,
.replay-mini-table .arena-board .pcard.md {
  width: 46px;
  height: 66px;
}
.replay-mini-table .arena-board .pcard.md .pc-r { font-size: 15px; }
.replay-mini-table .arena-board .pcard.md .pc-pip { font-size: 20px; }

/* 牌局側邊選單 */
.replay-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 760px;
}
.rs-list,
.replay-hand-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding-right: 2px;
}
.rs-item,
.replay-hand-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 9px 11px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
}
.rs-item:hover,
.replay-hand-item:hover {
  background: var(--surface-elev);
  border-color: var(--border-strong);
}
.rs-item.active,
.replay-hand-item.active {
  background: rgba(201, 162, 89, 0.12);
  border-color: rgba(201, 162, 89, 0.52);
}
.rsi-top,
.rhi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.rsi-bot,
.rhi-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}
.rsi-tags i {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
}
.rsi-tags .tag-err { background: var(--bad-bg); color: var(--bad-fg); }
.rsi-tags .tag-ok  { background: var(--ok-bg); color: var(--ok-fg); }
.rhi-chips { font-family: var(--font-mono); font-weight: 700; }
.rhi-chips.plus { color: #7cd4a6; }
.rhi-chips.minus { color: #f4a49c; }

/* 主播放控制與牌桌 */
.replay-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.rv-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rv-title h3 { margin: 0; font-size: 17px; color: var(--text); }
.rv-profit { font-family: var(--font-mono); font-size: 13.5px; font-weight: 700; }
.rv-streets-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.replay-controls,
.replay-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.rc-btns,
.rc-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.rc-scrubber-row,
.rc-scrubber-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 200px;
}
.rc-slider {
  flex: 1;
  height: 6px;
  accent-color: var(--brass);
  cursor: pointer;
}
.rc-step-lbl {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* 雙軌教練診斷分析卡片 */
.replay-coach-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.dd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.dd-grade-pill {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.dd-grade-pill.grade-best       { background: var(--ok-bg); color: var(--ok-fg); }
.dd-grade-pill.grade-good       { background: var(--info-bg); color: var(--info-fg); }
.dd-grade-pill.grade-inaccuracy { background: var(--warn-bg); color: var(--warn-fg); }
.dd-grade-pill.grade-mistake    { background: rgba(212, 132, 54, 0.24); color: #f5c384; }
.dd-grade-pill.grade-blunder    { background: var(--bad-bg); color: var(--bad-fg); }

.dd-dual-track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.track-card {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-2);
}
.track-card.gto {
  background: rgba(43, 111, 148, 0.14);
  border: 1px solid rgba(88, 166, 212, 0.34);
}
.track-card.exploit {
  background: rgba(201, 162, 89, 0.12);
  border: 1px solid rgba(201, 162, 89, 0.34);
}
.track-card h4 {
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.track-card.gto h4 { color: #8bc8e8; }
.track-card.exploit h4 { color: var(--brass-light); }

/* 你的動作 vs 建議動作比較列 */
.dd-compare-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.dd-comp-box {
  padding: 10px 12px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dd-comp-box.rec {
  background: rgba(43, 122, 91, 0.15);
  border-color: rgba(52, 161, 115, 0.38);
}
.dd-comp-box .lbl { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dd-comp-box strong { font-size: 15px; font-weight: 800; color: var(--text); }
.dd-comp-box.rec strong { color: #7cd4a6; }

/* 數學統計卡片列 */
.math-stats-row,
.dd-math-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.math-tile,
.mt-tile {
  padding: 8px 10px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.math-tile-sub,
.mt-tile span { font-size: 11px; color: var(--muted); font-weight: 600; }
.math-tile-val,
.mt-tile b { font-family: var(--font-mono); font-size: 15px; font-weight: 800; color: var(--brass-light); }
.dd-range-peek {
  margin-bottom: 14px;
  padding: 12px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.dd-range-peek h5 { margin: 0 0 8px; font-size: 13px; color: var(--text); }

/* 🗺️ 本手牌涵蓋觀念 ＆ 課程章節總覽 */
.hand-concepts-card {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-left: 4px solid var(--brass);
}
.hco-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 12px; }
.hco-head h4 { margin: 0; font-size: 15.5px; font-weight: 800; color: var(--text); }
.hco-grid { display: flex; flex-direction: column; gap: 10px; }
.concept-item {
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ci-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.concept-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(201, 162, 89, 0.2);
  border: 1px solid rgba(201, 162, 89, 0.4);
  color: var(--brass-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.concept-spot { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.ci-chapter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}
.ci-actions { display: flex; gap: 6px; align-items: center; }

/* 推薦補課指引 */
.dd-lessons-section { border-top: 1px solid var(--border); padding-top: 12px; }
.dd-lessons-section > h5 { margin: 0 0 10px; font-size: 14.5px; font-weight: 800; color: var(--text); }
.coach-lessons-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.coach-lesson-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 12px 14px;
  background: var(--surface-sub);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none !important;
  color: inherit;
  transition: all 0.15s;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.coach-lesson-card:hover { background: var(--surface-elev); border-color: rgba(201, 162, 89, 0.45); }
.clc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.clc-tier-badge { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-size: 12px; min-width: 0; max-width: 100%; word-break: break-word; }
.clc-badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 700;
  line-height: 1.3;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-break: break-word;
}
.clc-badge-pill.stage  { background: rgba(156, 124, 232, 0.2); color: #c8b6f7; }
.clc-badge-pill.lesson { background: var(--info-bg); color: var(--info-fg); }
.clc-badge-pill.sec    { background: var(--warn-bg); color: var(--warn-fg); }
.clc-badge-sep { color: var(--muted); font-weight: 800; font-size: 11px; }
.clc-why-note { margin: 4px 0 8px; font-size: 13px; color: var(--text-2); line-height: 1.45; word-break: break-word; }
.clc-foot-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* 決策時間軸導覽列 */
.coach-decisions-timeline { display: flex; flex-direction: column; gap: 10px; }
.coach-decisions-timeline > h4 { margin: 0; font-size: 15px; color: var(--text); }
.cd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cd-chip {
  padding: 4px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface-elev);
  color: var(--text-2);
}
.cd-chip.active {
  border-color: var(--brass);
  background: rgba(201, 162, 89, 0.16);
  color: var(--brass-light);
}

/* 漏洞雷達（Leak Finder） */
.leaks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; margin-top: 12px; }
.lc-rank {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(201, 162, 89, 0.18);
  color: var(--brass-light);
}
.lc-loss { font-family: var(--font-mono); font-size: 12.5px; color: var(--bad-fg); }
.leak-lesson-pill {
  display: inline-block;
  padding: 3px 9px;
  margin: 2px;
  background: rgba(201, 162, 89, 0.12);
  border: 1px solid rgba(201, 162, 89, 0.34);
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--brass-light);
  text-decoration: none !important;
}
.leak-lesson-pill:hover { background: rgba(201, 162, 89, 0.22); }

/* 彈出視窗與筆記 Modal */
.modal-mask,
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 10, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-card,
.player-note-modal,
.arena-summary-modal {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 20px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 16.5px; color: var(--text); }
.close-btn {
  border: 1px solid var(--border);
  background: var(--surface-elev);
  color: var(--text-2);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
}
.close-btn:hover { color: #fff; background: #262e35; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.note-tags-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-choice-btn.active { background: rgba(201, 162, 89, 0.2); border-color: var(--brass); color: var(--brass-light); }
.session-stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

/* 高對比即時 HUD 膠囊與識人命中標籤 */
.arena-hud-pill {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  background: rgba(13, 17, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #d6dde2;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 999px;
  margin-top: 2px;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
}
.arena-hud-pill span { color: #e8edf0; }
.arena-hud-pill small { color: var(--muted); font-size: 9px; }

.asb-match-pill {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  margin-left: 2px;
  white-space: nowrap;
}
.asb-match-pill.match {
  background: rgba(52, 161, 115, 0.24);
  color: #7cd4a6;
  border: 1px solid rgba(52, 161, 115, 0.4);
}
.asb-match-pill.miss {
  background: rgba(207, 86, 70, 0.24);
  color: #f4a49c;
  border: 1px solid rgba(207, 86, 70, 0.4);
}

/* 防止介面專用詞被 ui.linkTerms 包成膠囊 */
.no-terms .term {
  pointer-events: none !important;
  border-bottom: none !important;
  background: none !important;
  color: inherit !important;
}

.arena-cnt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b93640;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  margin-left: 4px;
  line-height: 1;
}

/* --- 9-6 響應式微調（900px, 680px, 480px, 390px） --- */
@media (max-width: 980px) {
  .replay-layout { grid-template-columns: 1fr; }
  .replay-sidebar { max-height: 280px; }
  .arena-table-container { padding: 66px 68px 78px; }
}

@media (max-width: 680px) {
  .arena-table-container { padding: 66px 14px 74px; overflow: hidden; }
  .arena-table { height: 370px; }
  .arena-rail { padding: 10px; }
  .felt-inner-ring { inset: 9px; }
  .seat-1, .seat-2 { left: 16%; }
  .seat-4, .seat-5 { left: 84%; }
  .seat-1, .seat-5 { top: 76%; }
  .seat-2, .seat-4 { top: 24%; }
  .arena-seat-badge { min-width: 92px; padding: 5px 7px; }
  .arena-seat.is-hero .arena-seat-badge,
  .arena-seat.hero-seat .arena-seat-badge { min-width: 108px; }
  .asb-name { max-width: 56px; font-size: 11px; }
  .asb-stack { font-size: 11.5px; }
  .arena-seat-cards { margin-bottom: -11px; }
  .arena-seat-cards .pcard.hole { width: 32px; height: 44px; padding: 2px 3px; }
  .arena-seat-cards .pcard.hole .pc-r { font-size: 11.5px; }
  .arena-seat-cards .pcard.hole .pc-s { font-size: 8px; }
  .arena-seat-cards .pcard.hole .pc-pip { font-size: 13px; }
  .board-slot-empty, .arena-board .pcard.md { width: 36px; height: 50px; }
  .seat-1 .arena-bet-chip, .seat-2 .arena-bet-chip { left: calc(100% + 4px); top: 76%; }
  .seat-4 .arena-bet-chip, .seat-5 .arena-bet-chip { right: calc(100% + 4px); top: 76%; }
  .dd-dual-track, .ah-body { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .concept-item, .coach-lesson-card { padding: 8px 10px !important; }
  .clc-badge-pill { font-size: 11px !important; padding: 1px 5px !important; }
  .ci-actions, .clc-foot-actions { width: 100%; justify-content: flex-end; }
  .modal-onb, .modal-card, .player-note-modal, .arena-summary-modal, .modal-box {
    max-width: 95vw !important;
    width: 95vw !important;
    box-sizing: border-box !important;
    padding: 14px 12px !important;
  }
  .arena-table-container { padding: 68px 10px 72px; }
  .arena-table { height: 340px; }
  .arena-center { gap: 5px; transform: translateY(-4px); }
  .arena-pot { padding: 3px 9px; gap: 4px; }
  .pot-lbl { font-size: 9px; }
  .pot-val { font-size: 11.5px; }
  .arena-street-lbl { font-size: 9px; }
  .arena-board { gap: 3px; min-height: 46px; }
  .board-slot-empty, .arena-board .pcard.md { width: 30px; height: 42px; padding: 2px 3px; border-radius: 5px; }
  .arena-board .pcard.md .pc-r { font-size: 11px; }
  .arena-board .pcard.md .pc-s { font-size: 8px; }
  .arena-board .pcard.md .pc-pip { font-size: 12px; }
  .arena-bet-chip { font-size: 9px; padding: 1.5px 5px; gap: 3px; }
  .arena-bet-chip::before { width: 6px; height: 6px; }
  .seat-0 .arena-bet-chip { bottom: calc(100% + 6px); }
  .seat-3 .arena-bet-chip { top: calc(100% + 5px); }
  .seat-1 .arena-bet-chip { left: 50%; top: -18px; transform: translateX(-50%); }
  .seat-2 .arena-bet-chip { left: 50%; top: calc(100% + 4px); transform: translateX(-50%); }
  .seat-4 .arena-bet-chip { right: auto; left: 50%; top: calc(100% + 4px); transform: translateX(-50%); }
  .seat-5 .arena-bet-chip { right: auto; left: 50%; top: -18px; transform: translateX(-50%); }
  .arena-dealer-btn { width: 18px; height: 18px; font-size: 9.5px; }
  .seat-0 .arena-dealer-btn { top: 4px; right: -20px; }
  .seat-1 .arena-dealer-btn { top: 2px; right: -18px; }
  .seat-2 .arena-dealer-btn { bottom: 2px; right: -18px; }
  .seat-3 .arena-dealer-btn { bottom: -10px; right: -18px; }
  .seat-4 .arena-dealer-btn { bottom: 2px; left: -18px; }
  .seat-5 .arena-dealer-btn { top: 2px; left: -18px; }
  .aab-btn { flex: 1 1 45%; min-height: 42px; font-size: 14px; }
}

@media (max-width: 400px) {
  .mnav-link { padding: 3px 1px; }
  .mnav-link small { font-size: 9.5px; letter-spacing: -0.2px; }
  .arena-table { height: 330px; }
  .seat-1, .seat-2 { left: 18%; }
  .seat-4, .seat-5 { left: 82%; }
  .arena-seat-badge { min-width: 82px; padding: 4px 6px; }
  .arena-seat.is-hero .arena-seat-badge,
  .arena-seat.hero-seat .arena-seat-badge { min-width: 98px; }
  .asb-name { max-width: 46px; font-size: 10px; }
  .asb-stack { font-size: 10.5px; }
  .asb-pos { font-size: 9px; padding: 1px 3.5px; }
  .arena-hud-pill { font-size: 8px; gap: 2.5px; padding: 1px 4px; }
  .arena-action-bubble { font-size: 9px; padding: 1.5px 6px; }
}


/* =========================================================================
   Standalone Monetize & Resources Page (#/resources) + Funnel Banner
   ========================================================================= */
.mon-banner {
  margin-top: 22px;
  padding: 20px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(22, 34, 42, 0.96) 0%, rgba(15, 22, 29, 0.98) 100%);
  border: 1px solid rgba(38, 184, 138, 0.34);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.mon-banner-left { flex: 1; min-width: 240px; }
.mon-kicker {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #39d6a4;
  text-transform: uppercase;
}
.mon-banner h3 {
  margin: 6px 0 6px;
  font-size: 17px;
  font-weight: 800;
  color: #f4f6fa;
}
.mon-banner p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #a5b0c0;
}
.mon-banner-actions { flex-shrink: 0; }

.mon-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 6px 0 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.mon-hero {
  padding: 26px 26px 24px;
  border-radius: 18px;
  background: linear-gradient(145deg, #161d27 0%, #11161e 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
}
.mon-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.mon-utm-pill {
  font-size: 11.5px;
  font-weight: 700;
  color: #9ae6cb;
  background: rgba(38, 184, 138, 0.14);
  border: 1px solid rgba(38, 184, 138, 0.35);
  padding: 3px 10px;
  border-radius: 99px;
}
.mon-hero h1 {
  margin: 10px 0 10px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  line-height: 1.25;
  color: #f5f7fb;
}
.mon-lead {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: #a7b2c2;
  max-width: 820px;
}
.mon-sec-head h2 {
  margin: 0 0 5px;
  font-size: 19px;
  font-weight: 800;
  color: #f4f6fa;
}
.mon-sec-sub {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: #8d98a8;
}
.mon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.mon-card {
  background: #151b23;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.mon-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}
.mon-card.tone-mint { border-top: 3px solid #26b88a; }
.mon-card.tone-coral { border-top: 3px solid #f06449; }
.mon-card.tone-gold { border-top: 3px solid #d9a441; }
.mon-card.tone-aff { border-top: 3px solid #4c8bf5; }
.mon-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mon-badge {
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #dbe3ee;
}
.mon-price {
  font-size: 15px;
  font-weight: 900;
  color: #39d6a4;
}
.mon-card h3 {
  margin: 2px 0 0;
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.35;
  color: #f4f6fa;
}
.mon-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #a0abb9;
  flex: 1;
}
.mon-benefit {
  font-size: 12.5px;
  font-weight: 700;
  color: #6ee7bf;
  background: rgba(38, 184, 138, 0.1);
  padding: 7px 10px;
  border-radius: 8px;
}
.mon-cta {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 800;
  background: #26b88a;
  color: #071611;
  transition: filter 0.14s ease;
}
.mon-cta:hover { filter: brightness(1.07); }
.mon-cta.secondary {
  background: #1f2836;
  color: #eaf0f8;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.mon-setup-hint {
  font-size: 11px;
  color: #d9a441;
  line-height: 1.4;
}
.mon-disclaimer {
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12.5px;
  line-height: 1.6;
  color: #8893a3;
}
.mon-ga-hint { color: #d9a441; }
