/* ══════════════════════════════════════════════════════════════════
   日系簡約卡片風格 — 雙主題
   霧青 (mist) = 淺色預設 / 松夜 (pine) = 深色
   用戶 2026-10-06 裁決：預設霧青，點月亮 icon 切松夜 + localStorage 記住
   ══════════════════════════════════════════════════════════════════ */

/* ── 主題 ─────────────────────────────────────────────────────── */
:root,
[data-theme='mist'] {
  --bg: #eef4f4;
  --surface: #fbfdfd;
  --surface-2: #f4f9f9;
  --ink: #1f2e2e;
  --ink-2: #4a5f5f;
  --muted: #7d9292;
  --line: #d9e5e5;
  --line-2: #c7d8d8;
  --accent: #4a8b85;
  --accent-soft: #d9ebe9;
  --live: #2f9e6e;
  --shadow-1: 0 1px 2px rgba(31, 46, 46, 0.04);
  --shadow-2: 0 6px 20px rgba(31, 46, 46, 0.08);
  --st-live-soft: #d8f0e4;
  color-scheme: light;
}

[data-theme='pine'] {
  --bg: #141c1e;
  --surface: #1b2628;
  --surface-2: #212e30;
  --ink: #e4eeec;
  --ink-2: #b3c4c2;
  --muted: #7e918f;
  --line: #2a3839;
  --line-2: #354648;
  --accent: #6fb5ad;
  --accent-soft: #24393a;
  --live: #4fc98d;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 6px 20px rgba(0, 0, 0, 0.38);
  --st-live-soft: #1f3a2f;
  color-scheme: dark;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans TC', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic',
    system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  font-feature-settings: 'palt';
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
code {
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--surface-2);
  font-size: 0.86em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
pre {
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: var(--surface-2);
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.6;
}
pre code { padding: 0; background: none; }

/* ── 版面 ─────────────────────────────────────────────────────── */
.shell { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem 4rem; }
.shell--embed { padding-top: 1.25rem; max-width: 100%; }

/* ── 頂欄 ─────────────────────────────────────────────────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top__in {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
}
.brand b { font-weight: 700; }
.brand span { color: var(--muted); font-size: 0.76rem; letter-spacing: 0.16em; }

.nav { display: flex; gap: 0.25rem; margin-left: auto; align-items: center; }
.nav a {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink-2);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current='page'] { background: var(--accent-soft); color: var(--accent); }

.theme-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  font-size: 0.9rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
    background-color 0.25s ease, border-color 0.25s ease;
}
.theme-btn:hover {
  transform: rotate(35deg);
  background: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
}
.theme-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero { padding: 3.25rem 0 2.25rem; border-bottom: 1px solid var(--line); }
.hero--detail { border-bottom: 0; padding-top: 1rem; }
.hero__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}
.hero__title {
  margin-top: 0.85rem;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.hero__lead {
  margin-top: 0.85rem;
  max-width: 52ch;
  color: var(--ink-2);
  font-size: 0.92rem;
}

.stats {
  margin-top: 1.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.stat { background: var(--surface); padding: 0.85rem 1rem; }
.stat__n {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stat__l { margin-top: 0.25rem; font-size: 0.73rem; color: var(--muted); }

/* ── 分組 ─────────────────────────────────────────────────────── */
.group { margin-top: 2.75rem; }
.group__head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.group__t {
  font-size: 1.02rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.group__n { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 特效 2：跳動綠點 + LIVE 呼吸燈 */
.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  position: relative;
  flex: none;
}
.dot-live::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(3.2); opacity: 0; }
}
.live-tag {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--live);
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--st-live-soft);
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── 篩選 ─────────────────────────────────────────────────────── */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.6rem;
}
.pill {
  padding: 0.32rem 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.is-on { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.pill__n { margin-left: 0.3rem; opacity: 0.6; font-variant-numeric: tabular-nums; }

/* ── 卡片網格 ─────────────────────────────────────────────────── */
.grid {
  margin-top: 1.15rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 0.85rem;
}

/* ── 卡片（核心） ────────────────────────────────────────────── */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  text-align: left;
  cursor: pointer;
  /* 特效 3：載入 stagger */
  animation: card-in 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) backwards;
  animation-delay: calc(var(--i, 0) * 35ms);
  /* 特效 1：hover 浮起 + 陰影變深 */
  transition: transform 0.28s cubic-bezier(0.34, 1.3, 0.64, 1),
    box-shadow 0.28s ease, border-color 0.28s ease;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-2);
  border-color: var(--line-2);
}
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.card__top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.card__league { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__when { margin-left: auto; flex: none; font-variant-numeric: tabular-nums; font-weight: 700; }

.card__teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
}
.side { display: grid; justify-items: center; gap: 0.4rem; min-width: 0; }
.side__n {
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  line-height: 1.35;
  word-break: break-word;
}

/* 特效 1：隊徽 hover 放大 */
.crest {
  width: 42px;
  height: 42px;
  object-fit: contain;
  transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.card:hover .crest { transform: scale(1.12); }
.crest--none {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.9rem;
}
.vs { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.1em; padding-bottom: 0.15rem; }

.score { display: grid; place-items: center; gap: 0.1rem; padding: 0.3rem 0; }
.score__n {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.score__n--ft { font-size: 1.08rem; color: var(--ink-2); }
.score__min { font-size: 0.68rem; color: var(--live); font-weight: 700; }

.countdown { display: grid; place-items: center; gap: 0.05rem; padding: 0.25rem 0; }
.countdown__n {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}
.countdown__l { font-size: 0.6rem; color: var(--muted); letter-spacing: 0.1em; }

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
}
.tag {
  padding: 0.13rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.69rem;
}
.tag--dir { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.tag--hit { background: var(--st-live-soft); color: var(--live); font-weight: 700; }
.tag--miss { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
.tag--none { color: var(--muted); }
.tag--warn { background: var(--accent-soft); color: var(--accent); }
/* 2026-10-07：AH/OU 主打 pick 標籤 + 走盤 verdict */
.tag--pick { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.tag--void { background: var(--surface-2); color: var(--muted); }

/* ── Modal ────────────────────────────────────────────────────── */
.sheet {
  /* 🔴 2026-10-07 修復：全域 reset `* { margin: 0 }` 洗走咗 <dialog> 原生
     margin:auto 置中 → modal 縮去左上角。呢度擺返個 margin:auto。 */
  margin: auto;
  width: min(760px, calc(100vw - 2rem));
  max-width: none;
  max-height: 88dvh;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  color: var(--ink);
  overflow: visible;
}
.sheet::backdrop { background: rgba(20, 32, 32, 0.42); backdrop-filter: blur(4px); }
.sheet[open] { animation: sheet-in 0.3s cubic-bezier(0.34, 1.35, 0.64, 1); }
.sheet__frame {
  border-radius: 16px;
  overflow: hidden auto;
  max-height: 88dvh;
}
.sheet__iframe { width: 100%; height: 86dvh; border: 0; display: block; }

/* ── 可拖曳關閉鈕（2026-10-10 用戶：X 做成可移動，用戶自己揀擺邊）──
   座標存 localStorage（所有 modal 共用）；drag 中禁用 transition；
   :hover 旋轉只喺唔係拖緊時生效（用 :not(.is-drag)）。 */
.sheet__close {
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-2), 0 2px 10px rgba(20, 32, 32, 0.18);
  transition: transform 0.25s cubic-bezier(0.34, 1.5, 0.64, 1),
    background-color 0.2s ease, color 0.2s ease;
  touch-action: none;            /* 觸控拖曳唔觸發頁面滾動 */
  user-select: none;
  -webkit-user-select: none;
}
.sheet__close.is-drag {
  transition: none;              /* 拖曳時要 1:1 跟手指 */
  cursor: grabbing;
  scale: 1.12;
  z-index: 3;
}
.sheet__close svg {
  width: 20px;
  height: 20px;
  display: block;
  pointer-events: none;          /* 拖曳目標計算一律用 button 本體 */
}
.sheet__close:hover:not(.is-drag) {
  transform: rotate(90deg) scale(1.08);
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}
.sheet__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* ── 詳情頁 ───────────────────────────────────────────────────── */
.crumb {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 1.25rem 0 0;
}
.crumb a:hover { color: var(--accent); }

.detail__head {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 1rem;
}
.detail__side { display: grid; justify-items: center; gap: 0.5rem; flex: 1 1 150px; }
.detail__side .crest { width: 60px; height: 60px; }
.detail__vs { font-size: 0.78rem; color: var(--muted); letter-spacing: 0.1em; }
.detail__score {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.panel {
  margin-top: 1.15rem;
  padding: 1.05rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.panel__t {
  font-size: 0.73rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 0.6rem 1.2rem; font-size: 0.84rem; }
.kv > div { display: grid; gap: 0.1rem; }
.kv dt { color: var(--muted); font-size: 0.71rem; }
.kv dd { font-weight: 500; }

.prose { max-width: 72ch; }
.prose h2 { margin: 1.6rem 0 0.6rem; font-size: 1.06rem; }
.prose h3 { margin: 1.2rem 0 0.5rem; font-size: 0.94rem; }
.prose p { margin: 0.7rem 0; color: var(--ink-2); }
.prose ul, .prose ol { margin: 0.7rem 0 0.7rem 1.25rem; color: var(--ink-2); }
.prose li { margin: 0.28rem 0; }
.prose strong { color: var(--ink); }
.prose blockquote {
  margin: 0.9rem 0;
  padding: 0.65rem 1rem;
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 8px 8px 0;
  color: var(--ink-2);
}
.prose table { width: 100%; margin: 1rem 0; border-collapse: collapse; font-size: 0.84rem; }
.prose th, .prose td { padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { font-weight: 700; }

/* ── 統計頁 ───────────────────────────────────────────────────── */
.tbl { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.tbl th, .tbl td { padding: 0.5rem 0.55rem; border-bottom: 1px solid var(--line); text-align: left; }
.tbl th {
  font-weight: 700;
  font-size: 0.71rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .pair { display: inline-flex; align-items: center; gap: 0.28rem; white-space: nowrap; }
.scroll-x { overflow-x: auto; }

/* ── 其他 ─────────────────────────────────────────────────────── */
.empty {
  padding: 2.25rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.87rem;
}
.foot {
  margin-top: 3.5rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  font-size: 0.77rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* ── 響應式 ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .shell { padding: 0 1rem 3rem; }
  .top__in { padding: 0.65rem 1rem; gap: 0.7rem; flex-wrap: wrap; }
  .nav { width: 100%; order: 3; margin-left: 0; overflow-x: auto; }
  .hero { padding: 2.1rem 0 1.6rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 0.55rem; }
  .card { padding: 0.75rem 0.7rem; gap: 0.5rem; border-radius: 12px; }
  .crest, .crest--none { width: 30px; height: 30px; }
  .side__n { font-size: 0.74rem; }
  .score__n { font-size: 1.08rem; }
  .sheet { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  .sheet__frame, .sheet__iframe { max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .sheet__close { top: -14px; right: -8px; width: 44px; height: 44px; }
  .sheet__close.is-drag { scale: 1.1; }
  /* 手機冇 hover → 用 active 反饋 */
  .card:hover { transform: none; box-shadow: var(--shadow-1); }
  .card:active { transform: scale(0.985); }
  /* 🔴 2026-10-07 行動端詳情排版修復：
     1) 賽事頭兩隊 1fr vs 1fr 對稱，中間比分/VS 固定闊，唔再被擠壓換行
     2) 機械層 kv 兩欄 → 一欄，標籤同行值唔會斷開
     3) 長隊名 word-break 防溢出；面板左右留邊唔掂屏 */
  .detail__head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.6rem; align-items: center; }
  .detail__side { flex: none; padding: 0 0.25rem; min-width: 0; }
  .detail__side .side__n { font-size: 0.82rem; line-height: 1.35; word-break: break-word; }
  .detail__side .crest { width: 46px; height: 46px; }
  .detail__score { font-size: 1.5rem; white-space: nowrap; }
  .detail__vs { font-size: 0.7rem; }
  .hero--detail { padding-top: 0.75rem; }
  .shell--embed { padding-top: 0.9rem; }
  .panel { margin-inline: 0.25rem; }
  .kv { grid-template-columns: 1fr 1fr; gap: 0.55rem 0.9rem; font-size: 0.8rem; }
  .kv dt { font-size: 0.66rem; }
  .prose { max-width: 100%; font-size: 0.9rem; }
  .prose table { font-size: 0.76rem; display: block; overflow-x: auto; }
}

/* ── 戰力值面板（2026-10-09）─────────────────────────────────── */
/* 只用 CSS vars → 兩個主題（mist / pine）自動跟。零硬編碼顏色。 */
.panel__t .sub {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: 0.4rem;
}
.srow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0 0.5rem;
}
.sside { text-align: left; min-width: 0; }
.sside--a { text-align: right; }
.stitle {
  font-size: 0.72rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sbig { font-size: 1.5rem; font-weight: 800; color: var(--ink); line-height: 1.15; }
.sside--a .sbig { color: var(--accent); }
.svs { font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.svs b { color: var(--ink-2); }
.stab {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.3rem;
  /* 🔴 2026-10-09：一定要 fixed —— 唔係嘅話 auto layout 會將剩餘闊度
     全部俾主隊條（實測主軌 654px vs 客軌 **38px**），兩邊唔同尺度冇得比。 */
  table-layout: fixed;
}
.stab th:nth-child(1), .stab td:nth-child(1) { width: 3.8rem; }
.stab th:nth-child(2), .stab td:nth-child(2) { width: 2.5rem; }
.stab th:nth-child(4), .stab td:nth-child(4) { width: 2.5rem; }
.stab th {
  font-size: 0.64rem;
  color: var(--muted);
  font-weight: 600;
  text-align: right;
  padding: 0.15rem 0.2rem;
}
.stab th:first-child { text-align: left; }
.stab td { padding: 0.18rem 0.2rem; border-top: 1px solid var(--line); }
/* 🔴 100 分時主隊條會頂到客隊數值 → bar 格兩側留白 */
.stab td.sbar { padding-left: 0.4rem; padding-right: 0.4rem; }
.sdim { font-size: 0.74rem; color: var(--ink-2); white-space: nowrap; }
.snum {
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--ink);
}
/* 條軌：兩邊同樣闊度 + 淡底，方便同尺度對比 */
.sbar {
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}
.sbar i {
  display: block;
  height: 5px;
  border-radius: 4px;
  background: var(--accent);
  opacity: 0.9;
}
.sbar--a i { background: var(--ink-2); opacity: 0.55; }
/* 客隊條由右邊起 → 視覺上向中軸收，兩邊一眼睇得出誰長 */
.sbar--a i { margin-left: auto; }
.snote {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0.5rem 0 0;
  word-break: break-word;
}
.tag--warn { background: var(--surface-2); color: var(--ink-2); font-weight: 700; }

@media (max-width: 560px) {
  /* 🔴 2026-10-09：原本 `th:nth-child(3), td.sbar { display:none }` ——
     手機版直接冇咗兩條 bar，變咗 3 欄擠向左邊，同電腦版完全兩回事。
     用戶原話：「手機版呢個表側埋去左邊完全同電腦版唔同，都唔靚」。
     → 改為**保留同一套 5 欄**（維度｜主值｜主條｜客值｜客條），只縮細尺寸。 */
  .sbig { font-size: 1.25rem; }
  .srow { gap: 0.3rem; padding: 0.55rem 0 0.4rem; }
  .stitle { font-size: 0.66rem; }
  .svs { font-size: 0.66rem; }
  .stab th:nth-child(1), .stab td:nth-child(1) { width: 3rem; }
  .stab th:nth-child(2), .stab td:nth-child(2) { width: 2.1rem; }
  .stab th:nth-child(4), .stab td:nth-child(4) { width: 2.1rem; }
  .stab th { font-size: 0.58rem; padding: 0.12rem 0.1rem; }
  .stab td { padding: 0.16rem 0.1rem; }
  .stab td.sbar { padding-left: 0.22rem; padding-right: 0.22rem; }
  .sbar i { height: 4px; }
  .sdim { font-size: 0.66rem; }
  .snum { font-size: 0.66rem; }
  .snote { font-size: 0.66rem; }
}

/* ── 分頁（2026-10-10 用戶要求三分頁）────────────────────────── */
.tabs {
  display: flex; gap: .5rem; margin-top: 2.25rem;
  border-bottom: 1px solid var(--border); padding-bottom: .75rem;
}
.tab {
  font: inherit; font-size: .92rem; font-weight: 500;
  background: transparent; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px;
  padding: .42rem 1.05rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: .4rem;
  transition: all .18s ease;
}
.tab:hover { border-color: var(--accent); color: var(--accent); }
.tab.is-on { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.tab__n {
  font-size: .74rem; font-weight: 700;
  background: rgba(0,0,0,.08); border-radius: 999px; padding: .05rem .45rem;
}
.tab.is-on .tab__n { background: rgba(255,255,255,.25); }
[data-theme="pine"] .tab__n { background: rgba(255,255,255,.1); }
.tabpanel { display: none; }
.tabpanel.is-on { display: block; animation: fade-in .25s ease; }

/* ── 已完場日期導航（2026-10-10 三修：一行、超寬左右滑動）── */
.monthtabs, .daytabs {
  display: flex; flex-wrap: nowrap;        /* 用戶：只係放一行，多咗左右滑 */
  gap: .45rem; margin: 1.1rem 0 1.4rem;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;                   /* Firefox 細捲軸 */
  padding-bottom: .35rem;
}
.monthtabs::-webkit-scrollbar,
.daytabs::-webkit-scrollbar { height: 6px; }
.monthtabs::-webkit-scrollbar-thumb,
.daytabs::-webkit-scrollbar-thumb {
  background: var(--border); border-radius: 999px;
}
.monthtabs::-webkit-scrollbar-track,
.daytabs::-webkit-scrollbar-track { background: transparent; }
.tab--sm { font-size: .8rem; padding: .3rem .8rem; white-space: nowrap; flex: 0 0 auto; }
.tab--sm .tab__n { font-size: .68rem; padding: .04rem .38rem; }

/* ── 完場按日期分組 ── */
.day-group { margin-top: 2rem; }
.day-group__head {
  display: flex; align-items: baseline; gap: .6rem;
  margin-bottom: 1rem; padding-bottom: .4rem;
  border-bottom: 1px dashed var(--border);
}
.day-group__d { font-size: 1rem; font-weight: 700; margin: 0; }
.day-group__n { font-size: .8rem; color: var(--muted); }

@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

/* ── 無障礙 ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ── CF Pages 版補充（2026-10-12）──────────────────── */
.daytab {
  font-size: .8rem; padding: .3rem .8rem; white-space: nowrap; flex: 0 0 auto;
  border: 1px solid var(--border); border-radius: 999px; background: transparent;
  color: var(--muted); cursor: pointer; font-family: inherit;
}
.daytab:hover { border-color: var(--accent); color: var(--accent); }
.daytab--on { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.league-sel {
  font: inherit; font-size: .8rem; padding: .3rem .7rem;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  color: var(--text); max-width: 40vw;
}
