/* ==========================================================================
   XSport / 全越 棒球測試會數據平台 — 黑金運動 × 數據儀表板
   品牌色取自 Logo：金 #E7CC49、墨黑 #221714（XPORTS）；灼見=單色背書
   金色定位＝品牌/主要動作/active/重點高亮（不當淺底文字色，符合對比規範）
   ========================================================================== */

:root {
  /* 品牌 */
  --gold: #e7cc49;
  --gold-deep: #c9a93b;
  --gold-soft: #fbf3d2;
  --on-gold: #221714;

  /* 介面（淺色） */
  --bg: #faf8f2;
  --panel: #ffffff;
  --panel-2: #fcfbf6;
  --ink: #221714;
  --ink-2: #4b4234;
  --muted: #857b6b;
  --line: #ece6d8;

  /* header 永遠是深墨黑（品牌簽名） */
  --header-bg: #211712;
  --header-fg: #ffffff;
  --header-muted: #cfc7b8;

  /* 語意狀態 */
  --success: #15803d; --success-bg: #e7f6ec;
  --warn: #b45309;    --warn-bg: #fbf0dc;
  --error: #be123c;   --error-bg: #fff1f2;
  --info: #1d6fb8;    --info-bg: #e6f0f9;

  --shadow: 0 16px 40px rgba(34, 23, 20, 0.07);
  --radius: 13px;
  --radius-sm: 8px;
}

/* 深色模式 token —— 手動指定 [data-theme="dark"] */
:root[data-theme="dark"] {
  --gold: #ecd35a;
  --gold-deep: #c9a93b;
  --gold-soft: #2c2616;
  --on-gold: #1b130f;

  --bg: #15110d;
  --panel: #211b15;
  --panel-2: #2a2219;
  --ink: #f4efe4;
  --ink-2: #d6cdbd;
  --muted: #9b9081;
  --line: #352c22;

  --header-bg: #120d09;
  --header-fg: #ffffff;
  --header-muted: #c3baab;

  --success: #4ade80; --success-bg: #16321f;
  --warn: #fbbf24;    --warn-bg: #3a2c12;
  --error: #fb7185;   --error-bg: #3a161f;
  --info: #7dd3fc;    --info-bg: #15293a;

  --shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
/* 深色模式 —— 跟隨系統（未手動指定 light 時） */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --gold: #ecd35a; --gold-deep: #c9a93b; --gold-soft: #2c2616; --on-gold: #1b130f;
    --bg: #15110d; --panel: #211b15; --panel-2: #2a2219;
    --ink: #f4efe4; --ink-2: #d6cdbd; --muted: #9b9081; --line: #352c22;
    --header-bg: #120d09; --header-fg: #ffffff; --header-muted: #c3baab;
    --success: #4ade80; --success-bg: #16321f; --warn: #fbbf24; --warn-bg: #3a2c12;
    --error: #fb7185; --error-bg: #3a161f; --info: #7dd3fc; --info-bg: #15293a;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* 數字：等寬 tabular，欄位對齊不跳動 */
.num,
td .num,
.metric-list b,
.cell-sub { font-variant-numeric: tabular-nums; }

/* ----------------------------- Header ----------------------------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
  padding: 0 clamp(16px, 3vw, 42px);
  background: var(--header-bg);
  color: var(--header-fg);
  border-bottom: 2px solid var(--gold);
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { width: 38px; height: 38px; border-radius: 9px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.06; }
.brand-text b {
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.02em;
}
.brand-text small { font-size: 0.68rem; color: var(--header-muted); letter-spacing: 0.04em; }

.top-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-left: auto; }
.top-nav a {
  position: relative;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  color: var(--header-muted);
  font-size: 0.92rem;
  font-weight: 700;
  transition: color 0.18s ease, background 0.18s ease;
}
.top-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.top-nav a.on { color: #fff; }
.top-nav a.on::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: -2px;
  height: 3px;
  background: var(--gold);
  border-radius: 3px 3px 0 0;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--header-fg);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--gold); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* ------------------------------ Layout ---------------------------------- */
.app-main {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 24px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 3px 11px 3px 10px;
  border-radius: 4px;
  background: var(--gold);
  color: var(--on-gold);
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: skewX(-11deg); /* 呼應 Logo 斜切 tagline bar */
}
.eyebrow > * { display: inline-block; transform: skewX(11deg); }

h1, h2 { margin: 0; }
h1 {
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.06;
  letter-spacing: 0.01em;
}
:root h1 :lang(zh), h1 { font-weight: 900; } /* 中文標題補強字重 */
h2 { font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif; font-size: 1.15rem; font-weight: 700; }

.split-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.single-layout { max-width: 860px; }

/* ------------------------------ Panel ----------------------------------- */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}
.count { color: var(--muted); font-size: 0.88rem; font-weight: 700; }

/* ------------------------------ Forms ----------------------------------- */
.form-panel { display: grid; gap: 16px; padding: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid-single { grid-template-columns: 1fr; }
.form-span-2 { grid-column: span 2; }
.keyin-form button { width: fit-content; }

label { display: grid; gap: 7px; color: var(--muted); font-size: 0.88rem; font-weight: 800; }

input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--panel-2);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
}
input[type="file"] { padding: 9px 12px; }
input::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus {
  border-color: var(--gold-deep);
  outline: 3px solid color-mix(in srgb, var(--gold) 40%, transparent);
}

/* 主要動作＝金色（品牌 CTA、墨黑字高對比）；次要＝描邊 */
button, .secondary-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  background: var(--gold);
  color: var(--on-gold);
  font-family: "Barlow", "Noto Sans TC", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.06s ease, border-color 0.18s ease;
}
button:hover, .secondary-action:hover { background: var(--gold-deep); }
button:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: 0.45; }
button:disabled:hover { background: var(--gold); }

.secondary-action {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.secondary-action:hover { background: var(--panel-2); border-color: var(--gold-deep); }

/* ----------------------------- Messages --------------------------------- */
.message {
  margin: 0 0 16px;
  border: 1px solid transparent;
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-weight: 700;
}
.message p { margin: 0; }
.message p + p { margin-top: 4px; }
.message-error { border-color: var(--error); background: var(--error-bg); color: var(--error); }
.message-success { border-color: var(--success); background: var(--success-bg); color: var(--success); }

/* ------------------------------ Tables ---------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
thead th {
  text-align: left;
  padding: 11px 14px;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: var(--gold-soft); }

.cell-main { display: block; font-weight: 700; }
.cell-sub { display: block; color: var(--muted); font-size: 0.82rem; }

/* metric pill：中性（金留給重點，pill 不搶戲） */
.metric-list { display: flex; flex-wrap: wrap; gap: 7px; }
.metric-list span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
  padding: 4px 9px;
  font-size: 0.82rem;
  color: var(--ink-2);
  white-space: nowrap;
}
.metric-list b { color: var(--ink); font-weight: 700; }

/* 項目 badge（trials 列表） */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}
.badge-cmj { --badge-bg: #2f4f8f; background: var(--badge-bg); }
.badge-ppu { --badge-bg: #6a4a96; background: var(--badge-bg); }
.badge-dj  { --badge-bg: #0d6b63; background: var(--badge-bg); }
.badge-sj  { --badge-bg: #9a6312; background: var(--badge-bg); }
.badge-br_circuit,
.badge-br_sprint60 { --badge-bg: #9a2b3f; background: var(--badge-bg); }
.badge-agility_5_10_5 { --badge-bg: #9a2b3f; background: var(--badge-bg); }
.badge-grip { --badge-bg: #41612f; background: var(--badge-bg); }

/* 來源 chip（中性） */
.chip {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* 狀態 pill（語意） */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 54px;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.8rem;
  font-weight: 800;
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-import, .status-confirmed { background: var(--success-bg); color: var(--success); }
.status-skip, .status-pending     { background: var(--warn-bg);    color: var(--warn); }
.status-auto                      { background: var(--info-bg);    color: var(--info); }
.status-rejected                  { background: var(--error-bg);   color: var(--error); }

.empty { padding: 30px 10px; color: var(--muted); text-align: center; }

/* ----------------------------- Toolbars --------------------------------- */
.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.preview-panel form { display: grid; }
.preview-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 320px) auto;
  gap: 14px;
  align-items: end;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.preview-table { min-width: 980px; }

/* ---------------------------- Video Mark -------------------------------- */
.mark-shell {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(250px, 300px);
  gap: 18px;
  align-items: start;
}

.mark-sidebar,
.clip-panel {
  position: sticky;
  top: 82px;
}

.mark-section {
  display: grid;
  gap: 14px;
  padding: 0 20px 20px;
}

.mark-section + .mark-section {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.source-stack {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.source-stack span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: var(--panel-2);
  color: var(--ink-2);
  font-weight: 700;
}

.source-stack b {
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
}

.mark-stage {
  display: grid;
  gap: 16px;
}

.video-panel {
  background: #070604;
  border-color: color-mix(in srgb, var(--gold) 30%, #000);
}

.video-panel video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.mark-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
}

.time-readout,
.mark-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.time-readout span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  padding: 7px 10px;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

.time-readout b {
  color: var(--ink);
}

.mark-message {
  margin: 0;
}

.source-picker {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.compact-head {
  padding: 13px 14px;
  background: var(--panel-2);
}

.source-list {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.source-row {
  display: grid;
  grid-template-columns: auto minmax(58px, auto) minmax(120px, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--panel);
  color: var(--ink);
}

.source-row input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
}

.camera-angle-input {
  min-height: 36px;
  padding: 7px 9px;
}

.clip-list {
  display: grid;
  gap: 10px;
  max-height: 650px;
  overflow: auto;
  padding: 0 16px 16px;
}

.clip-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--panel-2);
}

.clip-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.clip-item span,
.clip-item small {
  color: var(--muted);
}

.status-processing { background: var(--info-bg); color: var(--info); }
.status-done       { background: var(--success-bg); color: var(--success); }
.status-failed     { background: var(--error-bg); color: var(--error); }

.tight-empty {
  margin: 0;
  padding: 14px 6px;
}

/* ------------------------------ Footer ---------------------------------- */
.app-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(1180px, calc(100vw - 32px));
  margin: 8px auto 0;
  padding: 22px 0 40px;
  color: var(--muted);
  font-size: 0.82rem;
}
.foot-logo { height: 22px; opacity: 0.82; }
:root[data-theme="dark"] .foot-logo { filter: invert(1) brightness(1.4); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .foot-logo { filter: invert(1) brightness(1.4); }
}
.foot-sep { flex: 1; height: 1px; background: var(--line); }

/* --------------------------- Responsive --------------------------------- */
@media (max-width: 760px) {
  .app-header { height: auto; flex-wrap: wrap; padding: 12px 16px; gap: 10px; }
  .top-nav { order: 3; width: 100%; justify-content: flex-start; }
  .split-layout, .form-grid, .filter-bar, .preview-toolbar, .mark-shell, .mark-controls { grid-template-columns: 1fr; }
  .form-span-2 { grid-column: span 1; }
  .mark-sidebar, .clip-panel { position: static; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .keyin-form button { width: 100%; }
}

/* ----------------- 手機：資料表改卡片式堆疊（≤640px） ------------------- */
@media (max-width: 640px) {
  .table-wrap { overflow-x: visible; }
  table, .preview-table { min-width: 0; }

  /* 視覺隱藏表頭（保留給螢幕報讀） */
  thead {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  }

  tbody, tbody tr, tbody td { display: block; width: 100%; }

  /* 每筆 = 一張卡片 */
  tbody tr {
    margin: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--panel);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  tbody tr:hover { background: var(--panel); }

  /* 每格 = 標籤在上、值在下 */
  tbody td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
  }
  tbody tr td:last-child { border-bottom: 0; }
  tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  tbody td[colspan]::before, td.empty::before { content: none; }

  td.empty { text-align: center; }
  .metric-list { gap: 6px; }
}

/* ------------------------- Reduced motion ------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ==========================================================================
   Report-web 專屬補充樣式
   ========================================================================== */

/* --- 排名金銀銅 --- */
.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1rem;
}
.rank-1 { background: var(--gold); color: var(--on-gold); }
.rank-2 { background: #d0d5db; color: #2d3238; }
.rank-3 { background: #c9875e; color: #fff; }
.rank-other { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.rank-repeat {
  display: inline-block;
  width: 32px;
  height: 32px;
}

/* --- 即時排行榜集合 / 完整排名 --- */
.ranking-kicker-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.ranking-kicker-row .eyebrow { margin-bottom: 0; }
.ranking-back-link {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}
.ranking-back-link:hover {
  color: var(--gold-deep);
  background: transparent;
}
.ranking-back-link svg {
  width: 16px;
  height: 16px;
}
.rankings-single-head { align-items: flex-start; }
.rankings-single-title {
  min-width: 0;
  width: 100%;
}
.ranking-title-line {
  display: block;
}
.ranking-single-heading {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.ranking-single-heading h1 {
  margin: 0;
}
.ranking-metric-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  overflow: visible;
  padding: 2px 0 4px;
}
.ranking-title-dropdown {
  position: relative;
  flex: 0 0 auto;
  z-index: 16;
}
.ranking-title-trigger {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
  list-style: none;
}
.ranking-title-trigger::-webkit-details-marker {
  display: none;
}
.ranking-title-trigger .ranking-title-tag {
  gap: 7px;
  border: 1px solid transparent;
  box-shadow: 0 8px 20px rgba(37, 30, 24, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}
.ranking-title-trigger:hover .ranking-title-tag,
.ranking-title-dropdown[open] .ranking-title-tag {
  border-color: color-mix(in srgb, var(--gold) 70%, #fff);
  box-shadow: 0 10px 24px rgba(37, 30, 24, 0.16);
  filter: brightness(1.04);
}
.ranking-title-chevron {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: currentColor;
  transition: transform 180ms ease-out;
}
.ranking-title-dropdown[open] .ranking-title-chevron {
  transform: rotate(180deg);
}
.ranking-metric-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: min(620px, calc(100vw - 32px));
  max-height: min(520px, 62vh);
  border: 1px solid color-mix(in srgb, var(--gold) 28%, var(--line));
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(37, 30, 24, 0.18);
  overflow: auto;
  padding: 10px;
}
.ranking-metric-tabs a,
.ranking-metric-menu a {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 5px 8px 5px 6px;
  color: var(--ink-2);
  font-size: 0.76rem;
  font-weight: 900;
}
.ranking-metric-tabs a:hover,
.ranking-metric-tabs a.active,
.ranking-metric-menu a:hover,
.ranking-metric-menu a.active {
  border-color: var(--gold-deep);
  background: var(--gold-soft);
  color: var(--ink);
}
.ranking-metric-menu a.active {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold-deep) 46%, transparent);
}
.ranking-metric-tabs b,
.ranking-metric-menu b {
  overflow: hidden;
  min-width: 0;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ranking-board-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 5px;
  background: var(--badge-bg, var(--ink));
  padding: 3px 7px;
  color: #fff;
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-style: italic;
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ranking-title-tag {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 0.86rem;
}
.ranking-value {
  font-family: "Barlow Semi Condensed", "IBM Plex Mono", "Noto Sans TC", sans-serif;
  font-size: 1.22rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  font-style: normal;
  font-stretch: normal;
  font-synthesis: none;
  letter-spacing: 0;
  line-height: 1;
  color: var(--ink);
}
.ranking-value.is-leader { color: var(--gold-deep); }
.live-rankings-head { align-items: center; }
.live-rankings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.live-rankings-status {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--warn-bg);
  padding: 5px 10px;
  color: var(--warn);
  font-size: 0.78rem;
  font-weight: 900;
}
.live-rankings-status.is-stale {
  border-color: var(--warn);
  background: var(--warn-bg);
  color: var(--warn);
}
.rankings-countdown {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  background: var(--gold);
  padding: 6px 10px;
  color: var(--on-gold);
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-style: italic;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  transform: skewX(-11deg);
  white-space: nowrap;
}
.rankings-countdown-text {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  transform: skewX(11deg);
}
.rankings-countdown b {
  min-width: 1.35em;
  color: var(--on-gold);
  font-family: "Barlow Semi Condensed", "IBM Plex Mono", monospace;
  font-style: normal;
  text-align: right;
}
.icon-action {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border-color: transparent;
  border-radius: 5px;
  background: var(--gold);
  color: var(--on-gold);
  padding: 0;
  transform: skewX(-11deg);
}
.icon-action:hover {
  border-color: transparent;
  background: var(--gold-deep);
  color: #fff;
}
.icon-action svg {
  width: 17px;
  height: 17px;
  transform: skewX(11deg);
}
.icon-action.is-loading svg { animation: refreshSpinSkewed 800ms linear infinite; }

.app-main:has(.rankings-dashboard-fixedbar) {
  width: min(1400px, calc(100vw - 24px));
  padding-top: calc(var(--rankings-fixedbar-height, 46px) + 22px);
  padding-bottom: 0;
}

.app-main:has(.rankings-dashboard-fixedbar) > .breadcrumb,
.app-main:has(.rankings-dashboard-fixedbar) > .live-rankings-head {
  display: none;
}

.app-main:has(.rankings-dashboard-fixedbar) + .app-foot {
  display: none;
}

.rankings-dashboard-fixedbar,
.rankings-dashboard-fixedbar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.rankings-dashboard-shell {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  height: var(--rankings-shell-height, calc(100dvh - var(--rankings-fixedbar-top, 64px) - var(--rankings-fixedbar-height, 46px) - 18px));
  min-height: 560px;
  min-width: 0;
}

.rankings-page-dots {
  position: sticky;
  top: 124px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 64px;
  border-right: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.rankings-page-dot {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: var(--dot-color, var(--gold));
  cursor: pointer;
}

.rankings-page-dot:hover,
.rankings-page-dot:focus-visible {
  background: transparent;
  color: var(--dot-color, var(--gold));
  outline: none;
}

.rankings-page-dot:focus-visible::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid var(--dot-color, var(--gold));
  border-radius: 999px;
}

.rankings-page-dot > span:first-child {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--dot-color, var(--gold));
  opacity: 0.38;
  transition: transform 200ms ease-out, background 200ms ease-out, opacity 200ms ease-out;
}

.rankings-page-dot.is-active > span:first-child,
.rankings-page-dot[aria-selected="true"] > span:first-child {
  background: var(--dot-color, var(--gold));
  opacity: 1;
  transform: scale(1.4);
}

.rankings-page-dot::after {
  content: none;
  display: none;
}

.rankings-page-window {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.rankings-page-track {
  display: grid;
  min-height: 100%;
}

.rankings-page-panel {
  position: relative;
  min-width: 0;
  min-height: var(--rankings-panel-height, 100%);
  overflow: visible;
  padding: 2px 2px 16px;
  scroll-margin-top: 0;
}

.rankings-page-grid.live-rankings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, auto));
  gap: 14px;
  align-content: start;
  min-height: var(--rankings-panel-height, 100%);
}

.rankings-page-grid .live-ranking-card {
  min-height: 0;
}

.live-ranking-card.is-card-entering {
  animation: rankingCardEnter 480ms ease-out both;
}

.ranking-placeholder-card {
  display: grid;
  min-height: 238px;
  border: 1px dashed color-mix(in srgb, var(--muted) 48%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--panel-2) 78%, transparent);
  padding: 16px;
  place-items: center;
  text-align: center;
}

.ranking-placeholder-card div {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 900;
}

.ranking-placeholder-card b {
  color: var(--ink-2);
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-style: italic;
}

.rankings-custom-empty-grid {
  opacity: 0.86;
}

.rankings-custom-cta {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  min-height: 38px;
  border-radius: 5px;
  padding: 8px 14px;
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-style: italic;
  transform: translate(-50%, -50%) skewX(-11deg);
}

.rankings-custom-cta > span {
  display: inline-block;
  transform: skewX(11deg);
}

.rankings-custom-tools {
  position: absolute;
  top: 2px;
  right: 6px;
  z-index: 6;
}

.rankings-custom-modal[hidden] {
  display: none;
}

.rankings-custom-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  padding: 24px;
  background: rgba(18, 13, 9, 0.56);
  place-items: center;
}

.rankings-custom-dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(980px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 48px));
  border: 1px solid color-mix(in srgb, var(--gold) 26%, var(--line));
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.rankings-custom-head,
.rankings-custom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
}

.rankings-custom-head {
  border-bottom: 1px solid var(--line);
}

.rankings-custom-head .eyebrow {
  margin-bottom: 6px;
}

.rankings-custom-progress {
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  padding: 8px 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.rankings-custom-body {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 0;
  min-height: 0;
}

.rankings-custom-options,
.rankings-custom-selected {
  min-height: 0;
  overflow: auto;
  padding: 16px 18px;
}

.rankings-custom-options {
  display: grid;
  gap: 14px;
  border-right: 1px solid var(--line);
}

.rankings-custom-group {
  display: grid;
  gap: 8px;
}

.rankings-custom-group h3,
.rankings-custom-selected h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rankings-custom-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  padding: 9px 10px;
  color: var(--ink);
  cursor: pointer;
}

.rankings-custom-option input {
  width: 18px;
  min-height: 18px;
}

.rankings-custom-option span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.rankings-custom-option b {
  overflow: hidden;
  min-width: 0;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rankings-custom-option small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.rankings-custom-option:has(input:checked) {
  border-color: var(--gold-deep);
  background: var(--gold-soft);
}

.rankings-custom-selected {
  display: grid;
  align-content: start;
  gap: 10px;
}

.rankings-custom-selected ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rankings-custom-selected li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  padding: 9px 9px 9px 11px;
}

.rankings-custom-selected li > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.rankings-custom-selected li b,
.rankings-custom-selected li small {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rankings-custom-selected li b {
  font-size: 0.88rem;
}

.rankings-custom-selected li small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.rankings-custom-selected li div {
  display: flex;
  gap: 4px;
}

.rankings-custom-selected li button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  padding: 0;
  color: var(--ink);
}

.rankings-custom-selected li button svg {
  width: 15px;
  height: 15px;
}

.rankings-custom-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
}

body.rankings-modal-open {
  overflow: hidden;
}

.live-rankings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px 16px;
  align-items: start;
  min-width: 0;
}
.live-ranking-card {
  position: relative;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform-origin: center;
}
.live-ranking-card[data-test-type="cmj"] { --board-color: #2f4f8f; }
.live-ranking-card[data-test-type="ppu"] { --board-color: #6a4a96; }
.live-ranking-card[data-test-type="dj"] { --board-color: #0d6b63; }
.live-ranking-card[data-test-type="sj"] { --board-color: #9a6312; }
.live-ranking-card[data-test-type="br_circuit"],
.live-ranking-card[data-test-type="br_sprint60"] { --board-color: #9a2b3f; }
.live-ranking-card[data-test-type="grip"] { --board-color: #41612f; }
.live-ranking-card[data-test-type="pitch_trackman"] { --board-color: #1a3a5c; }
.live-ranking-card[data-test-type="hit_trackman"] { --board-color: #3a1a5c; }
.live-ranking-card[data-test-type="hit_blast"] { --board-color: #1a5c3a; }
.live-ranking-card-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  margin-bottom: 8px;
  padding: 0 0 10px;
}
.live-ranking-card-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 3px;
  border-radius: 999px;
  background: var(--gold);
}
.live-ranking-title-block {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.live-ranking-card-head .ranking-board-tag {
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 7px;
  letter-spacing: 0.02em;
}
.live-ranking-card-head h2 {
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 1.04rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.1;
  text-align: left;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}
.live-ranking-full-link {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}
.live-ranking-full-link:hover {
  color: var(--gold-deep);
}
.live-ranking-table-wrap {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.live-ranking-list { min-width: 0; }
.live-ranking-list-body {
  position: relative;
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 0;
  overflow: hidden;
}
.ranking-row-trail {
  position: absolute;
  z-index: 2;
  border-radius: 5px;
  background: var(--board-color, var(--gold));
  opacity: 0.25;
  pointer-events: none;
  transform: translateZ(0);
  transition: opacity 300ms ease-out;
}
.ranking-row-trail.is-fading {
  opacity: 0;
}
.ranking-row {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 44px minmax(76px, 90px);
  column-gap: 6px;
  align-items: center;
  max-width: 100%;
  width: calc(100% - 20px);
  min-width: 0;
  height: 44px;
  margin-inline: 10px;
  border: 1px solid rgba(37, 30, 24, 0.08);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 4px 10px rgba(37, 30, 24, 0.04);
  isolation: isolate;
  overflow: hidden;
  backface-visibility: hidden;
  transition:
    background 360ms ease,
    border-color 360ms ease,
    box-shadow 360ms ease,
    color 360ms ease,
    opacity 250ms ease-out,
    height 360ms cubic-bezier(0.2, 0.72, 0.16, 1),
    grid-template-columns 360ms cubic-bezier(0.2, 0.72, 0.16, 1),
    margin 360ms cubic-bezier(0.2, 0.72, 0.16, 1),
    border-radius 360ms cubic-bezier(0.2, 0.72, 0.16, 1),
    width 360ms cubic-bezier(0.2, 0.72, 0.16, 1);
  will-change: transform, opacity;
}
.ranking-row.is-standard-row {
  width: calc(100% - 20px);
}
.ranking-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--board-color, var(--header-bg)) 48%, var(--header-bg)) 0%,
      var(--header-bg) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 520ms ease;
}
.ranking-row.is-hero-row {
  grid-template-columns: 46px minmax(0, 1fr) 48px minmax(86px, 100px);
  height: 64px;
  margin-inline: 0;
  width: 100%;
  border-color: color-mix(in srgb, var(--board-color, var(--header-bg)) 38%, var(--header-bg));
  border-radius: 6px;
  color: #fff;
  box-shadow: 0 7px 16px rgba(34, 23, 20, 0.18);
}
.ranking-row.is-hero-row::before {
  opacity: 1;
}
.ranking-row > [role="cell"] {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}
.ranking-row .rank-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ranking-row .rank-num,
.ranking-row .rank-repeat {
  flex: 0 0 auto;
  width: 30px;
  height: auto;
  font-size: 1.05rem;
  transition: color 360ms ease, font-size 360ms cubic-bezier(0.2, 0.72, 0.16, 1), width 360ms cubic-bezier(0.2, 0.72, 0.16, 1);
}
.rank-num b {
  display: inline-block;
  transform: none;
}
.rank-num.is-rank-counting {
  overflow: hidden;
  height: 1em;
  line-height: 1;
}
.rank-count-window {
  display: inline-block;
  overflow: hidden;
  height: 1em;
  vertical-align: top;
}
.rank-count-stack {
  display: grid;
  grid-auto-rows: 1em;
  will-change: transform;
}
.rank-count-stack b {
  display: block;
  height: 1em;
  line-height: 1;
}
.live-ranking-list .rank-num,
.full-ranking-table .rank-num {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-style: italic;
  line-height: 1;
  transform: none;
  box-shadow: none;
}
.live-ranking-list .is-hero-row .rank-num {
  width: 36px;
  color: #fff;
  font-size: 1.26rem;
}
.live-ranking-list .is-hero-row.is-leader-collapsing .rank-num {
  width: 30px;
  color: var(--ink);
  font-size: 1.05rem;
}
.live-ranking-list .rank-repeat {
  background: transparent;
  transform: none;
}
.ranking-row.is-exiting-to-bottom {
  z-index: 3;
  pointer-events: none;
}
.ranking-row.is-row-dimmed {
  opacity: 0.5;
}
.ranking-row.is-reduced-highlight {
  background: var(--gold-soft);
  border-color: rgba(231, 204, 73, 0.74);
}
.ranking-row.is-new-row-fading {
  z-index: 10;
}
.ranking-row.is-rank-climbing {
  z-index: 9;
  transform: translateZ(0);
}
.ranking-row.is-rank-climbing.is-rank-up {
  border-color: rgba(37, 30, 24, 0.08);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 4px 10px rgba(37, 30, 24, 0.04);
  color: var(--ink);
}
.ranking-row.is-rank-climbing.is-rank-down {
  opacity: 0.96;
}
.ranking-row.is-leader-collapsing {
  z-index: 8;
  box-shadow: 0 6px 14px rgba(37, 30, 24, 0.08);
}
.ranking-row.is-hero-row.is-leader-collapsing {
  grid-template-columns: 36px minmax(0, 1fr) 44px minmax(76px, 90px);
  width: calc(100% - 20px);
  height: 44px;
  margin-inline: 10px;
  border-color: rgba(37, 30, 24, 0.08);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  box-shadow: 0 4px 10px rgba(37, 30, 24, 0.04);
}
.ranking-row.is-hero-row.is-leader-collapsing::before {
  opacity: 0;
}
.ranking-row.is-hero-revealing {
  transform-origin: center;
  will-change: transform, filter, box-shadow;
  animation: heroRevealLift 1040ms cubic-bezier(0.18, 0.86, 0.2, 1) both;
}
.ranking-row.is-hero-revealing::after {
  content: "";
  position: absolute;
  inset: -40% -32%;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg,
      transparent 32%,
      rgba(255, 255, 255, 0.24) 46%,
      rgba(231, 204, 73, 0.26) 52%,
      transparent 66%);
  transform: translateX(-58%) skewX(-14deg);
  animation: heroRevealSheen 820ms cubic-bezier(0.18, 0.86, 0.2, 1) both;
}
.ranking-hero-sweep-layer {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.ranking-row.is-hero-sweeping .ranking-hero-sweep-layer {
  display: block;
}
.ranking-hero-sweep-layer::before,
.ranking-hero-sweep-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.ranking-hero-sweep-layer::before {
  background:
    linear-gradient(90deg,
      rgba(255, 238, 112, 0) 0%,
      rgba(255, 238, 112, 0.08) 62%,
      rgba(255, 238, 112, 0.96) 86%,
      rgba(255, 238, 112, 1) 91%,
      rgba(231, 204, 73, 0) 100%),
    linear-gradient(90deg,
      rgba(231, 204, 73, 0.54) 0%,
      rgba(255, 228, 86, 0.48) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 238, 112, 1),
    inset -3px 0 0 rgba(255, 238, 112, 0.94);
  transform-origin: left center;
  animation: rankingHeroSweepFill 700ms ease-in-out both;
}
.ranking-hero-sweep-layer::after {
  border: 2px solid rgba(255, 238, 112, 1);
  box-shadow: 0 0 0 1px rgba(231, 204, 73, 0.38);
  animation: rankingHeroSweepBorder 940ms ease-in-out both;
}
.ranking-row.is-hero-sweeping > [role="cell"] {
  z-index: 3;
}
.ranking-row.is-settled-update {
  animation: rankingSettledOutline 720ms ease-out both;
}
.live-ranking-list-body.is-fields-sweeping .ranking-row > [role="cell"]::after {
  content: "";
  position: absolute;
  inset: -18% -34%;
  z-index: 4;
  background:
    linear-gradient(105deg,
      transparent 28%,
      rgba(255, 255, 255, 0.18) 42%,
      rgba(255, 255, 255, 0.82) 51%,
      rgba(255, 255, 255, 0.22) 60%,
      transparent 74%);
  pointer-events: none;
  transform: translateX(-128%) skewX(-12deg);
  animation: rankingFieldWhiteSweep 720ms cubic-bezier(0.18, 0.82, 0.24, 1) both;
}
.live-ranking-list-body.is-fields-sweeping .ranking-row > [role="cell"]:nth-child(2)::after {
  animation-delay: 70ms;
}
.live-ranking-list-body.is-fields-sweeping .ranking-row > [role="cell"]:nth-child(3)::after {
  animation-delay: 140ms;
}
.live-ranking-list-body.is-fields-sweeping .ranking-row > [role="cell"]:nth-child(4)::after {
  animation-delay: 210ms;
}
.ranking-row.is-rank-ticking .rank-num b {
  animation: rankingRankTick 340ms cubic-bezier(0.2, 0.92, 0.18, 1) both;
}
.ranking-athlete {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  color: inherit;
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-size: 1.02rem;
  font-style: italic;
  font-weight: 900;
  line-height: 1.03;
  text-overflow: ellipsis;
  transition: color 360ms ease, font-size 360ms cubic-bezier(0.2, 0.72, 0.16, 1);
  white-space: nowrap;
}
.is-hero-row .ranking-athlete {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 900;
}
.ranking-row.is-hero-row.is-leader-collapsing .ranking-athlete {
  color: inherit;
  font-size: 1.02rem;
}
.ranking-athlete-name {
  flex: 1 1 auto;
  overflow: hidden;
  min-width: 0;
  padding-right: 2px;
  text-overflow: ellipsis;
}
.ranking-athlete-hands {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.56em;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  transition: color 360ms ease;
}
.is-hero-row .ranking-athlete-hands {
  color: var(--header-muted);
}
.ranking-row.is-hero-row.is-leader-collapsing .ranking-athlete-hands {
  color: var(--muted);
}
.ranking-athlete-meta,
.ranking-athlete-team {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.5rem;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  transition: color 360ms ease, font-size 360ms cubic-bezier(0.2, 0.72, 0.16, 1);
  white-space: nowrap;
}
.is-hero-row .ranking-athlete-meta,
.is-hero-row .ranking-athlete-team {
  color: var(--header-muted);
  font-size: 0.56rem;
}
.ranking-row.is-hero-row.is-leader-collapsing .ranking-athlete-meta,
.ranking-row.is-hero-row.is-leader-collapsing .ranking-athlete-team {
  color: var(--muted);
  font-size: 0.5rem;
}
.ranking-role-cell { justify-self: end; }
.ranking-role-label {
  display: block;
  overflow: hidden;
  max-width: 42px;
  color: var(--ink);
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  text-align: right;
  text-overflow: ellipsis;
  text-transform: uppercase;
  transition: color 360ms ease, font-size 360ms cubic-bezier(0.2, 0.72, 0.16, 1);
  white-space: nowrap;
}
.is-hero-row .ranking-role-label {
  color: #fff;
  font-size: 0.92rem;
}
.ranking-row.is-hero-row.is-leader-collapsing .ranking-role-label {
  color: var(--ink);
  font-size: 0.8rem;
}
.ranking-metric {
  text-align: right;
  white-space: nowrap;
}
.live-ranking-list .ranking-value { font-size: 0.9rem; }
.live-ranking-list .ranking-value {
  transition: color 360ms ease, font-size 360ms cubic-bezier(0.2, 0.72, 0.16, 1);
}
.live-ranking-list .is-hero-row .ranking-value {
  color: #fff;
  font-size: 1.38rem;
}
.live-ranking-list .is-hero-row.is-leader-collapsing .ranking-value {
  color: var(--ink);
  font-size: 0.9rem;
}
.live-ranking-list .ranking-value.is-counting {
  color: var(--gold);
  text-shadow: none;
}
.ranking-metric .metric-unit { margin-left: 3px; }
.is-hero-row .metric-unit { color: var(--header-muted); }
.ranking-row.is-hero-row.is-leader-collapsing .metric-unit { color: var(--muted); }
.value-changed { animation: valuePulse 460ms ease-out both; }
.live-ranking-empty {
  min-height: 104px;
  margin: 0;
  padding: 34px 10px 0;
  text-align: center;
}
.live-rankings-sticky {
  position: fixed;
  top: var(--rankings-fixedbar-top, 64px);
  left: 0;
  right: 0;
  z-index: 18;
  border-bottom: 1px solid rgba(231, 204, 73, 0.25);
  background: var(--header-bg);
  color: var(--header-fg);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.live-rankings-sticky.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.live-rankings-sticky-inner {
  width: min(1180px, calc(100vw - 32px));
  min-height: 46px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sticky-rankings-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sticky-rankings-title span {
  border-radius: 4px;
  background: var(--gold);
  padding: 2px 8px;
  color: var(--on-gold);
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-style: italic;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  transform: skewX(-11deg);
}
.sticky-rankings-title strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sticky-actions .rankings-countdown {
  background: var(--gold);
  color: var(--on-gold);
}
.sticky-actions .rankings-countdown b { color: var(--on-gold); }
.sticky-actions .icon-action {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
}
.full-ranking-panel { overflow: hidden; }
.full-ranking-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.full-ranking-wrap { border-top: 1px solid var(--line); }
.full-ranking-table {
  width: 100%;
  min-width: 820px;
  table-layout: fixed;
}
.full-ranking-table thead th,
.full-ranking-table tbody td {
  display: table-cell;
  vertical-align: middle;
  padding: 14px 16px;
}
.full-ranking-table tbody tr { height: 72px; }
.full-ranking-table th:nth-child(1),
.full-ranking-table td:nth-child(1) { width: 78px; text-align: center; }
.full-ranking-table th:nth-child(2),
.full-ranking-table td:nth-child(2) { width: auto; text-align: left; }
.full-ranking-table th:nth-child(3),
.full-ranking-table td:nth-child(3) { width: 96px; text-align: left; }
.full-ranking-table th:nth-child(4),
.full-ranking-table td:nth-child(4) { width: 82px; text-align: left; }
.full-ranking-table th:nth-child(5),
.full-ranking-table td:nth-child(5) { width: 160px; text-align: right; }
.full-ranking-table th:nth-child(6),
.full-ranking-table td:nth-child(6) { width: 78px; text-align: right; }
.full-ranking-table .rank-num,
.full-ranking-table .rank-repeat {
  width: 28px;
  height: 30px;
  font-size: 0.86rem;
}
.full-ranking-athlete-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.full-ranking-athlete {
  display: block;
  overflow: hidden;
  color: inherit;
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-size: 1.18rem;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.full-ranking-athlete-meta,
.full-ranking-role,
.full-ranking-hands,
.full-ranking-trials {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
}
.full-ranking-athlete-meta {
  overflow: hidden;
  font-size: 0.74rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.full-ranking-role,
.full-ranking-hands {
  color: var(--ink);
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-size: 1.02rem;
  font-style: italic;
  font-weight: 700;
  text-transform: uppercase;
}
.full-ranking-value-cell { white-space: nowrap; }
@media (max-width: 640px) {
  .full-ranking-wrap { overflow-x: auto; }
  .full-ranking-table { min-width: 780px; }
  .full-ranking-table thead {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
  }
  .full-ranking-table tbody { display: table-row-group; width: auto; }
  .full-ranking-table tbody tr {
    display: table-row;
    width: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .full-ranking-table tbody tr:hover { background: var(--gold-soft); }
  .full-ranking-table tbody td {
    display: table-cell;
    width: auto;
  }
  .full-ranking-table tbody td::before {
    content: none;
    display: none;
  }
}
@keyframes refreshSpin {
  to { transform: rotate(360deg); }
}
@keyframes refreshSpinSkewed {
  to { transform: skewX(11deg) rotate(360deg); }
}
@keyframes rankingSettledOutline {
  0% {
    box-shadow: 0 0 0 0 rgba(231, 204, 73, 0);
    transform: translateY(0);
  }
  30% {
    box-shadow: 0 0 0 2px rgba(231, 204, 73, 0.9);
    transform: translateY(-2px);
  }
  48% {
    transform: translateY(0);
  }
  72% {
    box-shadow: 0 0 0 2px rgba(231, 204, 73, 0.9);
  }
  100% {
    box-shadow: 0 0 0 2px rgba(231, 204, 73, 0);
    transform: translateY(0);
  }
}
@keyframes rankingFieldWhiteSweep {
  0% {
    opacity: 0;
    transform: translateX(-128%) skewX(-12deg);
  }
  16% {
    opacity: 0.9;
  }
  72% {
    opacity: 0.78;
  }
  100% {
    opacity: 0;
    transform: translateX(128%) skewX(-12deg);
  }
}
@keyframes rankingRankTick {
  0% { transform: translateY(0) scale(1); }
  34% { transform: translateY(-4px) scale(1.1); }
  66% { transform: translateY(1px) scale(0.98); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes rankingCardEnter {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes rankingHeroSweepFill {
  0% {
    transform: scaleX(0);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  72% {
    transform: scaleX(1);
    opacity: 1;
  }
  100% {
    transform: scaleX(1);
    opacity: 0;
  }
}
@keyframes rankingHeroSweepBorder {
  0% {
    clip-path: inset(0 100% calc(100% - 2px) 0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  68% {
    clip-path: inset(0 0 calc(100% - 2px) 0);
    opacity: 1;
  }
  86% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 0;
  }
}
@keyframes heroRevealLift {
  0% {
    box-shadow: 0 4px 10px rgba(37, 30, 24, 0.04);
    filter: brightness(1);
    transform: scale(1);
  }
  24% {
    box-shadow: 0 7px 16px rgba(34, 23, 20, 0.18);
    filter: brightness(1);
    transform: scale(1);
  }
  58% {
    box-shadow:
      0 0 0 2px rgba(231, 204, 73, 0.52),
      0 14px 28px rgba(34, 23, 20, 0.22);
    filter: brightness(1.09);
    transform: scale(1.045);
  }
  78% {
    transform: scale(0.995);
  }
  100% {
    box-shadow: 0 7px 16px rgba(34, 23, 20, 0.18);
    filter: brightness(1);
    transform: scale(1);
  }
}
@keyframes heroRevealSheen {
  0% { transform: translateX(-58%) skewX(-14deg); opacity: 0; }
  24% { opacity: 1; }
  100% { transform: translateX(58%) skewX(-14deg); opacity: 0; }
}
@keyframes valuePulse {
  0%, 100% { color: inherit; }
  35%, 70% { color: var(--gold-deep); }
}

/* --- 指標大數字卡 --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 204px));
  gap: 14px;
  justify-content: start;
  padding: 18px 20px;
}
.stat-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  min-height: 108px;
  padding: 16px 14px 22px 15px;
  display: grid;
  grid-template-columns: minmax(0, auto) max-content;
  column-gap: 9px;
  row-gap: 6px;
  align-items: baseline;
  align-content: start;
  overflow: hidden;
}
.stat-label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.stat-value {
  grid-column: 1;
  grid-row: 2;
  font-family: "Barlow Semi Condensed", "IBM Plex Mono", monospace;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  min-width: 0;
  white-space: nowrap;
}
.stat-unit {
  grid-column: 2;
  grid-row: 2;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  align-self: end;
  padding-bottom: 0.16rem;
  white-space: nowrap;
}
.stat-unit-degree {
  font-size: 0.92rem;
  align-self: start;
  transform: translateY(-0.16em);
}
.stat-card.highlight { border-color: var(--gold); background: var(--gold-soft); }
.stat-card.highlight .stat-value { color: var(--gold-deep); }

/* --- 體能合併區 --- */
.fitness-section-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0;
  padding: 20px 22px 22px;
}
.fitness-test-panel {
  min-width: 0;
  padding: 4px 18px 2px;
  border-left: 1px solid var(--line);
}
.fitness-test-panel:first-child {
  border-left: 0;
}
.fitness-test-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  white-space: nowrap;
}
.fitness-test-title strong {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 900;
}
.fitness-test-title span {
  color: var(--muted);
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-size: 0.96rem;
  font-style: italic;
  font-weight: 700;
}
.fitness-metrics {
  display: grid;
  gap: 12px;
}
.fitness-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.fitness-metric + .fitness-metric {
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.fitness-metric-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.fitness-metric-value {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--ink);
  font-family: "Barlow Semi Condensed", "IBM Plex Mono", monospace;
  font-size: 2.16rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fitness-metric.highlight .fitness-metric-value {
  color: var(--gold-deep);
}
.fitness-arm-panel .fitness-metric-value {
  font-size: 2.36rem;
  font-weight: 800;
  text-shadow:
    0.45px 0 0 currentColor,
    -0.45px 0 0 currentColor,
    0 0.45px 0 currentColor;
}
.fitness-metric-value small {
  color: var(--muted);
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
}
.fitness-metric-median {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
}
.sprint-metric-median,
.running-metric-median {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}

/* --- 守備區 --- */
.defense-section {
  padding: 0;
}
.defense-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(520px, 1.28fr);
  gap: 16px;
  align-items: stretch;
  padding: 14px 20px 18px;
}
.defense-data {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}
.defense-best-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.defense-best-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  padding: 12px 14px;
  display: grid;
  gap: 5px;
  min-width: 0;
}
.defense-best-card.highlight {
  background: linear-gradient(135deg, var(--panel-2), color-mix(in srgb, var(--gold) 12%, var(--panel-2)));
}
.defense-best-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}
.defense-best-value {
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-size: 2.05rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.defense-best-value small {
  font-size: 0.65em;
  color: var(--muted);
  margin-left: 4px;
  font-weight: 800;
}
.defense-metric-median {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}
.defense-trials-title {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 900;
}
.defense-trials-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}
.defense-trials-table th:first-child,
.defense-trials-table td:first-child {
  width: 36px;
}
.defense-trials-table th:nth-child(2),
.defense-trials-table td:nth-child(2),
.defense-trials-table th:nth-child(3),
.defense-trials-table td:nth-child(3) {
  width: calc((100% - 36px) / 2);
}
.defense-trials-table th,
.defense-trials-table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-size: 1.34rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
}
.defense-trials-table th {
  text-align: left;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.86rem;
  font-weight: 900;
  color: var(--muted);
}
.defense-trials-table .metric-unit {
  font-size: 0.78em;
  font-weight: 900;
  margin-left: 4px;
}
.defense-video {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  min-width: 0;
}
.defense-video-player {
  width: 100%;
  height: 100%;
  min-height: 300px;
  max-height: 520px;
  object-fit: contain;
  background: #000;
  display: block;
}
.defense-video-empty {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 24px;
}

@media (max-width: 980px) {
  .defense-layout {
    grid-template-columns: 1fr;
  }
  .defense-video {
    min-height: 260px;
  }
  .defense-video-player {
    min-height: 260px;
  }
}

/* --- 跑量視覺化 --- */
.running-section-body {
  display: grid;
  grid-template-columns: minmax(360px, 1.35fr) minmax(170px, 0.55fr);
  gap: 26px;
  align-items: center;
  padding: 20px 22px 22px;
}
.running-section-body.has-three {
  grid-template-columns: minmax(360px, 1.3fr) minmax(170px, 0.55fr) minmax(150px, 0.45fr);
}
.running-section-body.sprint-only {
  grid-template-columns: minmax(0, 760px);
}
.running-section-body.circuit-only {
  grid-template-columns: minmax(180px, 340px);
}
.running-section-body.agility-only {
  grid-template-columns: minmax(160px, 300px);
}
.running-section-body.metric-only-pair {
  grid-template-columns: repeat(2, minmax(170px, 300px));
}
.running-sprint-panel {
  min-width: 0;
  padding: 10px 4px 4px;
}
.sprint-time small {
  color: var(--muted);
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
}
.sprint-axis {
  position: relative;
  height: 146px;
  margin: 8px 32px 0;
}
.sprint-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 62px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), #9a2b3f);
}
.sprint-node {
  position: absolute;
  left: var(--x);
  top: 62px;
  display: grid;
  grid-template-rows: 40px 18px 22px;
  justify-items: center;
  align-items: center;
  width: 86px;
  color: var(--ink);
  transform: translate(-50%, -47px);
}
.sprint-dot {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--gold-deep);
  box-shadow: 0 8px 18px rgba(34, 23, 20, 0.18);
}
.sprint-yard {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 900;
  white-space: nowrap;
}
.sprint-time {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: "Barlow Semi Condensed", "IBM Plex Mono", monospace;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sprint-node.start {
  width: 86px;
}
.sprint-node.start .sprint-dot {
  grid-row: 2;
  background: var(--gold-deep);
}
.sprint-node.start .sprint-node-foot {
  grid-row: 3;
}
.sprint-node-foot {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 0;
  transform: translateY(18px);
}
.sprint-metric-median {
  white-space: nowrap;
}
.sprint-node.finish .sprint-dot {
  background: #9a2b3f;
}
.running-circuit-stack {
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 132px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.running-section-body.circuit-only .running-circuit-stack {
  padding-left: 0;
  border-left: 0;
}
.running-section-body.metric-only-pair .running-circuit-stack {
  padding-left: 0;
  border-left: 0;
}
.running-agility-panel {
  display: grid;
  align-content: center;
  min-height: 132px;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.running-section-body.agility-only .running-agility-panel {
  padding-left: 0;
  border-left: 0;
}
.running-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 12px;
  align-items: baseline;
}
.running-metric + .running-metric {
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.running-metric-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.running-metric-value {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--ink);
  font-family: "Barlow Semi Condensed", "IBM Plex Mono", monospace;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.running-metric.highlight .running-metric-value {
  color: var(--gold-deep);
}
.running-metric-value small {
  color: var(--muted);
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.74rem;
  font-weight: 900;
}
.running-metric-median {
  grid-column: 2;
  justify-self: end;
  margin-top: -8px;
  white-space: nowrap;
}
.agility-metric {
  grid-template-columns: max-content max-content;
  justify-content: start;
  align-items: end;
  column-gap: 24px;
  row-gap: 4px;
  min-height: 72px;
}
.agility-metric .running-metric-label {
  align-self: end;
  padding-bottom: 8px;
}
.agility-metric .running-metric-median {
  grid-column: 2;
  margin-top: -4px;
}

@media (max-width: 760px) {
  .fitness-section-body {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .fitness-test-panel {
    padding: 0 0 14px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .fitness-test-panel:first-child {
    border-top: 0;
  }
  .fitness-test-panel + .fitness-test-panel {
    padding-top: 14px;
  }
  .fitness-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }
  .fitness-metric + .fitness-metric {
    padding-top: 0;
    border-top: 0;
  }
  .fitness-metric-value {
    font-size: 2rem;
  }
  .defense-layout {
    grid-template-columns: 1fr;
    padding: 14px 16px;
  }
  .defense-best-row {
    flex-direction: column;
  }
  .running-section-body,
  .running-section-body.has-both,
  .running-section-body.has-three,
  .running-section-body.sprint-only,
  .running-section-body.circuit-only,
  .running-section-body.metric-only-pair,
  .running-section-body.agility-only {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }
  .running-agility-panel {
    min-height: auto;
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .running-section-body.agility-only .running-agility-panel {
    padding-top: 0;
    border-top: 0;
  }
  .agility-metric {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .agility-metric .running-metric-label {
    padding-bottom: 0;
  }
  .agility-metric .running-metric-value {
    font-size: 2.55rem;
  }
  .agility-metric .running-metric-median {
    grid-column: 1;
    justify-self: start;
    margin-top: 0;
  }
  .running-sprint-panel {
    padding: 0;
  }
  .sprint-axis {
    height: 142px;
    margin: 8px 18px 0;
  }
  .sprint-line,
  .sprint-node {
    top: 58px;
  }
  .sprint-node {
    grid-template-rows: 34px 18px 20px;
    transform: translate(-50%, -41px);
  }
  .sprint-node-foot {
    transform: translateY(20px);
  }
  .sprint-node {
    width: 62px;
  }
  .sprint-time {
    font-size: 1.62rem;
  }
  .sprint-yard {
    font-size: 0.82rem;
  }
  .sprint-metric-median {
    font-size: 0.62rem;
  }
  .running-circuit-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    min-height: 0;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    gap: 14px;
  }
  .running-metric + .running-metric {
    padding-top: 0;
    border-top: 0;
  }
  .running-metric {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .running-metric-value {
    justify-self: start;
    font-size: 2.18rem;
  }
  .running-metric-median {
    grid-column: 1;
    justify-self: start;
    margin-top: 0;
  }
}

body.vc-modal-open {
  overflow: hidden;
}

.vc-modal[hidden] {
  display: none;
}
.vc-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.82);
}
.vc-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1540px, calc(100vw - 20px));
  height: min(960px, calc(100vh - 20px));
  overflow: hidden;
  border: 1px solid rgba(231, 204, 73, 0.22);
  border-radius: 10px;
  background: #111;
  color: #f5efe5;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.52);
}
.vc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 8px 14px;
  border-bottom: 1px solid #303030;
  background: #1d1a16;
}
.vc-head h2 {
  margin: 0;
  color: #fff;
  font-size: 1.02rem;
}
.vc-eyebrow {
  margin: 0 0 2px;
  color: var(--gold);
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.vc-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.vc-layout-switch {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #3a352f;
  border-radius: 8px;
}
.vc-layout-btn,
.vc-close,
.vc-toolbar button,
.vc-align-toolbar button {
  min-height: 34px;
  border-radius: 0;
  padding: 7px 11px;
  background: #2f2a24;
  color: #d8d0c4;
  font-size: 0.82rem;
}
.vc-layout-btn + .vc-layout-btn {
  border-left: 1px solid #3a352f;
}
.vc-layout-btn.active,
.vc-toolbar button.active,
.vc-align-toolbar button.active {
  background: var(--gold);
  color: var(--on-gold);
}
.vc-toolbar button:disabled,
.vc-align-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
.vc-close {
  width: 36px;
  padding: 0;
  border-radius: 50%;
  background: #34231e;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
}
.vc-opacity-group {
  display: none;
  grid-template-columns: auto 92px 42px;
  align-items: center;
  gap: 7px;
  color: #cfc7b8;
  font-size: 0.78rem;
}
.vc-opacity-group.active {
  display: grid;
}
.vc-opacity-group input {
  min-height: 24px;
  padding: 0;
}
.vc-opacity-group b {
  color: var(--gold);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
}
.vc-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  background: #000;
}
.vc-stage.is-overlay {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}
.vc-pane {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid #252525;
  background: #000;
}
.vc-pane:last-child {
  border-right: 0;
}
.vc-stage.is-overlay .vc-pane {
  position: relative;
  align-self: stretch;
  justify-self: stretch;
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  border: 0;
}
.vc-stage.is-overlay .vc-pane[data-vc-pane="b"] {
  z-index: 2;
}
.vc-stage.is-overlay .vc-video-shell,
.vc-stage.is-overlay .vc-video {
  width: 100%;
  height: 100%;
}
.vc-video-shell {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
}
.vc-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  transform-origin: center center;
}
.vc-video-status {
  position: absolute;
  inset: auto 12px 58px 12px;
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid rgba(231, 204, 73, 0.35);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 800;
}
.vc-video-status[hidden] {
  display: none;
}
.vc-video-label {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.68);
  padding: 6px 9px;
  color: #fff;
  font-size: 0.82rem;
  backdrop-filter: blur(6px);
}
.vc-video-label b {
  color: var(--gold);
}
.vc-video-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vc-crop-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.68);
  padding: 8px 10px;
  backdrop-filter: blur(6px);
}
.vc-crop-controls label {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: #d8d0c4;
  font-size: 0.72rem;
}
.vc-crop-controls input {
  min-height: 24px;
  padding: 0;
}
.vc-timeline {
  display: grid;
  grid-template-rows: auto;
  border-top: 1px solid #303030;
  background: #111;
}
.vc-timeline.is-expanded {
  grid-template-rows: auto 168px;
}
.vc-toolbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #2d2d2d;
  background: #1d1a16;
}
.vc-toolbar button {
  border-radius: 999px;
}
.vc-align-toolbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #2d2d2d;
  background: #1d1a16;
}
.vc-align-toolbar button {
  border-radius: 999px;
}
.vc-timeline-tools {
  display: grid;
  grid-template-rows: auto 22px minmax(0, 1fr);
  min-height: 0;
}
.vc-timeline-tools[hidden] {
  display: none;
}
.vc-tools-toggle {
  min-width: 118px;
}
.vc-time {
  min-width: 76px;
  border-radius: 6px;
  background: #0a0a0a;
  padding: 5px 8px;
  color: var(--gold);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
}
.vc-nudge-group {
  display: inline-flex;
  gap: 6px;
}
.vc-ruler {
  position: relative;
  cursor: pointer;
  background:
    repeating-linear-gradient(
      to right,
      #26231f 0,
      #26231f 1px,
      transparent 1px,
      transparent 8.333%
    ),
    #191919;
}
.vc-tracks {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #101010;
}
.vc-track-row {
  position: relative;
  height: 50%;
  border-bottom: 1px solid #252525;
  cursor: pointer;
}
.vc-track-row:last-child {
  border-bottom: 0;
}
.vc-track-label {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 5;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.68);
  padding: 3px 6px;
  color: #d8d0c4;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
}
.vc-segment {
  position: absolute;
  top: 7px;
  bottom: 7px;
  z-index: 3;
  display: flex;
  align-items: center;
  min-width: 34px;
  overflow: hidden;
  border: 2px solid #555;
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.11) 0,
      rgba(255, 255, 255, 0.11) 16px,
      rgba(255, 255, 255, 0.04) 16px,
      rgba(255, 255, 255, 0.04) 32px
    ),
    #34495e;
  color: #fff;
  cursor: grab;
  user-select: none;
}
.vc-segment:hover,
.vc-segment.dragging {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(231, 204, 73, 0.12);
}
.vc-segment.dragging {
  cursor: grabbing;
}
.vc-segment span {
  position: relative;
  z-index: 2;
  max-width: 100%;
  overflow: hidden;
  padding: 0 10px 0 44px;
  font-size: 0.8rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vc-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 10;
  width: 2px;
  background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.vc-play-range {
  position: absolute;
  top: 2px;
  bottom: 2px;
  z-index: 2;
  min-width: 28px;
  border: 1px solid rgba(231, 204, 73, 0.82);
  border-radius: 6px;
  background: rgba(231, 204, 73, 0.14);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28);
  cursor: grab;
  user-select: none;
}
.vc-play-range.dragging {
  cursor: grabbing;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.28),
    0 0 0 2px rgba(231, 204, 73, 0.18);
}
.vc-play-range-label {
  position: absolute;
  left: 50%;
  top: 3px;
  z-index: 2;
  max-width: calc(100% - 34px);
  transform: translateX(-50%);
  overflow: hidden;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.66);
  padding: 2px 6px;
  color: var(--gold);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.vc-range-handle {
  position: absolute;
  top: -3px;
  bottom: -3px;
  z-index: 9;
  width: 12px;
  min-height: 0;
  border: 0;
  border-radius: 5px;
  padding: 0;
  background:
    linear-gradient(
      90deg,
      transparent 0,
      transparent 4px,
      rgba(22, 20, 16, 0.72) 4px,
      rgba(22, 20, 16, 0.72) 5px,
      transparent 5px,
      transparent 7px,
      rgba(22, 20, 16, 0.72) 7px,
      rgba(22, 20, 16, 0.72) 8px,
      transparent 8px
    ),
    var(--gold);
  cursor: ew-resize;
}
.vc-range-handle-start {
  left: -7px;
}
.vc-range-handle-end {
  right: -7px;
}

/* --- Video Lightbox：逐球瀏覽 --- */
.video-trial-row.has-video { cursor: pointer; }
.video-trial-row.has-video:hover { background: var(--gold-soft); }
.video-trial-row.has-video:focus {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}
.video-trial-row.no-video { cursor: default; }
.video-trial-row.no-video:hover { background: transparent; }
.video-entry-label { color: var(--gold); font-weight: 800; }

body.vlb-modal-open { overflow: hidden; }
.vlb-modal[hidden] { display: none; }
.vlb-modal {
  position: fixed;
  inset: 0;
  z-index: 1190;
  display: grid;
  place-items: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.82);
}
.vlb-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1540px, calc(100vw - 20px));
  height: min(960px, calc(100vh - 20px));
  overflow: hidden;
  border: 1px solid rgba(231, 204, 73, 0.22);
  border-radius: 10px;
  background: #111;
  color: #f5efe5;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.52);
}
.vlb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 8px 14px;
  border-bottom: 1px solid #303030;
  background: #1d1a16;
}
.vlb-title-group { min-width: 0; }
.vlb-head h2 {
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-size: 1.02rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vlb-eyebrow {
  margin: 0 0 2px;
  color: var(--gold);
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.vlb-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.vlb-mobile-picker {
  display: none;
  position: relative;
}
.vlb-mobile-trigger {
  min-height: 34px;
  border-radius: 7px;
  background: #2f2a24;
  color: var(--gold);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 800;
}
.vlb-mobile-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 20;
  width: min(520px, calc(100vw - 32px));
  max-height: 60vh;
  transform: translateX(-50%);
  overflow: auto;
  border: 1px solid rgba(231, 204, 73, 0.28);
  border-radius: 8px;
  background: #17130f;
  box-shadow: 0 18px 42px rgba(0,0,0,0.45);
  padding: 8px;
}
.vlb-icon-btn,
.vc-watermark-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  border-radius: 8px;
  background: #2f2a24;
  color: #d8d0c4;
  padding: 0;
}
.vlb-icon-btn svg,
.vc-watermark-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.vlb-icon-btn .vlb-icon-side,
.vlb-icon-btn.is-side .vlb-icon-overlay,
.vc-watermark-toggle .vc-icon-side,
.vc-watermark-toggle.is-side .vc-icon-overlay { display: none; }
.vlb-icon-btn.is-side .vlb-icon-side,
.vc-watermark-toggle.is-side .vc-icon-side { display: block; }
.vlb-action-btn {
  min-height: 36px;
  border-radius: 8px;
  padding: 7px 13px;
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 900;
}
.vlb-action-btn.is-cancel {
  background: #3a352f;
  color: #fff;
}
.vlb-close {
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  background: #34231e;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
}
.vlb-body {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  min-height: 0;
  background: #070604;
}
.vlb-dialog.is-watermark-side .vlb-body {
  grid-template-columns: 184px 156px minmax(0, 1fr);
}
.vlb-dialog.is-quad .vlb-body,
.vlb-dialog.is-quad.is-watermark-side .vlb-body {
  grid-template-columns: 184px minmax(0, 1fr);
}
.vlb-sidebar {
  grid-column: 1;
  min-height: 0;
  overflow: auto;
  border-right: 1px solid #2d251e;
  background: #15110d;
  padding: 8px 6px;
}
.vlb-list {
  display: grid;
  gap: 6px;
}
.vlb-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid transparent;
  border-left: 4px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #d8d0c4;
  padding: 5px 7px;
  text-align: left;
}
.vlb-list-item:hover:not(:disabled),
.vlb-list-item[aria-current="true"] {
  border-left-color: var(--gold);
  background: rgba(231,204,73,0.12);
}
.vlb-list-item:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.vlb-list-main {
  display: grid;
  min-width: 0;
  gap: 1px;
}
.vlb-list-main b {
  color: var(--gold);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92rem;
}
.vlb-list-item[aria-current="true"] .vlb-list-main b { font-size: 1.06rem; }
.vlb-list-main small {
  overflow: hidden;
  color: #9b9081;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vlb-no-video,
.vlb-plus {
  color: #a79d8f;
  font-size: 0.66rem;
  font-weight: 800;
}
.vlb-plus {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-gold);
  font-size: 1rem;
}
.vlb-main {
  grid-column: 2;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  gap: 8px;
  padding: 10px;
}
.vlb-dialog.is-watermark-side .vlb-main {
  grid-column: 3;
}
.vlb-dialog.is-quad .vlb-main,
.vlb-dialog.is-quad.is-watermark-side .vlb-main {
  grid-column: 2;
}
.vlb-single-view {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  gap: 8px;
}
.vlb-single-view[hidden],
.vlb-quad-view[hidden] {
  display: none;
}
#vlb-view-toggle[hidden],
#vlb-quad-play[hidden],
.vlb-retry[hidden] {
  display: none !important;
}
.vlb-player-shell {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
  background: #000;
}
.vlb-video {
  display: block;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 138px);
  object-fit: contain;
  background: #000;
}
.vlb-quad-view {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  gap: 8px;
}
.vlb-quad-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  min-height: 0;
  gap: 10px;
}
.vlb-quad-cell,
.vlb-quad-metrics {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(34, 23, 20, 0.16);
  border-radius: 8px;
  background: #000;
}
.vlb-quad-cell {
  cursor: pointer;
}
.vlb-quad-cell:hover,
.vlb-quad-cell:focus {
  border-color: var(--gold-deep);
  outline: none;
}
.vlb-quad-cell.is-missing {
  cursor: not-allowed;
  opacity: 0.62;
}
.vlb-quad-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.vlb-quad-label,
.vlb-quad-cell-status {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-weight: 900;
  backdrop-filter: blur(4px);
}
.vlb-quad-label {
  left: 10px;
  top: 10px;
  max-width: calc(100% - 20px);
  overflow: hidden;
  padding: 4px 9px;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vlb-quad-cell-status {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 104px;
  padding: 6px 10px;
  color: var(--gold);
  font-size: 0.82rem;
  text-align: center;
}
.vlb-quad-cell-status:empty {
  display: none;
}
.vlb-quad-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  overflow: auto;
  background: var(--video-panel);
  padding: 14px;
}
.vlb-quad-metrics-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  border-bottom: 1px solid var(--video-line);
  padding-bottom: 9px;
}
.vlb-quad-metrics-head b {
  color: var(--gold-deep);
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.05rem;
}
.vlb-quad-metrics-head span {
  overflow: hidden;
  color: var(--video-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vlb-quad-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
  border: 1px solid var(--video-line);
  border-radius: 7px;
  background: var(--video-panel-2);
  padding: 10px;
}
.vlb-quad-metric span {
  color: var(--video-muted);
  font-size: 0.72rem;
  font-weight: 900;
}
.vlb-quad-metric b {
  overflow-wrap: anywhere;
  color: var(--video-ink);
  font-size: clamp(1.16rem, 1.7vw, 1.65rem);
  font-weight: 900;
  line-height: 1.04;
}
.vlb-quad-metric em {
  margin-left: 3px;
  color: var(--video-muted);
  font-size: 0.62em;
  font-style: normal;
}
.vlb-quad-metrics.is-spin-panel {
  grid-template-columns: minmax(0, 1fr) minmax(218px, 232px);
  align-items: center;
  align-content: center;
  column-gap: clamp(8px, 1vw, 14px);
  row-gap: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 65% 38%, rgba(255,255,255,0.05), transparent 38%),
    var(--video-panel);
  padding: clamp(12px, 1.35vw, 20px) clamp(14px, 1.55vw, 22px);
}
.vlb-quad-spin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  justify-self: stretch;
  gap: clamp(10px, 1.35vw, 20px) clamp(5px, 0.75vw, 10px);
  min-width: 0;
  max-width: 720px;
}
.vlb-quad-spin-metric {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  min-width: 0;
  min-height: clamp(52px, 7.2vw, 74px);
  padding: 0;
  text-align: center;
}
.vlb-quad-spin-label {
  color: var(--gold);
  font-size: clamp(0.68rem, 0.9vw, 0.86rem);
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
}
.vlb-quad-spin-value {
  max-width: 100%;
  overflow-wrap: normal;
  color: var(--video-ink);
  font-family: "Barlow Semi Condensed", "IBM Plex Mono", "Noto Sans TC", sans-serif;
  font-size: clamp(1.22rem, 1.95vw, 2rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.98;
  white-space: nowrap;
}
.vlb-quad-spin-unit {
  min-height: 1em;
  color: var(--video-muted);
  font-family: "Noto Sans TC", sans-serif;
  font-size: clamp(0.64rem, 0.78vw, 0.78rem);
  font-weight: 850;
  line-height: 1;
}
.vlb-quad-spin-visual {
  display: grid;
  justify-items: center;
  align-content: center;
  box-sizing: border-box;
  justify-self: center;
  width: min(100%, 280px);
  min-width: 0;
}
.pitch-spin-clock-frame.vlb-quad-spin-clock-frame {
  width: min(100%, clamp(204px, 21vw, 280px));
  height: auto;
  aspect-ratio: 1;
}
.vlb-quad-spin-clock-frame .pitch-spin-clock text {
  fill: var(--video-muted);
}
.vlb-quad-spin-clock-frame .pitch-spin-clock {
  overflow: hidden;
}
.vlb-quad-spin-clock-frame .pitch-spin-clock-band {
  stroke: color-mix(in srgb, var(--video-muted) 24%, transparent);
}
.vlb-quad-spin-clock-frame .pitch-spin-clock-hole {
  stroke: color-mix(in srgb, var(--video-panel-2) 70%, transparent);
}
.vlb-quad-spin-clock-frame .pitch-spin-clock-tick {
  stroke: color-mix(in srgb, var(--video-muted) 78%, transparent);
}
.vlb-quad-spin-clock-frame .pitch-spin-clock-tick.major {
  stroke: color-mix(in srgb, var(--video-ink) 76%, transparent);
}
.pitch-spin-ball-canvas.vlb-quad-spin-canvas {
  width: 68%;
  height: 68%;
}
.pitch-spin-caption.vlb-quad-spin-caption {
  margin-top: clamp(8px, 1vw, 12px);
  color: var(--video-muted);
  font-size: clamp(0.62rem, 0.82vw, 0.78rem);
  line-height: 1.25;
}
.vlb-quad-status {
  display: none;
}
.vlb-watermark-overlay {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 4;
  display: grid;
  gap: 7px;
  width: min(156px, calc(100% - 24px));
  max-height: min(58%, 360px);
  overflow-x: hidden;
  overflow-y: auto;
  background: transparent;
  border-radius: 0;
  padding: 0;
  backdrop-filter: none;
  color: #fff;
  pointer-events: none;
  transition: opacity 250ms ease-out;
}
.vlb-watermark-overlay.is-faded { opacity: 0.3; }
.vlb-watermark-panel {
  grid-column: 2;
  display: none;
  min-height: 0;
  overflow: auto;
  border-right: 1px solid #2d251e;
  background: #17130f;
  padding: 8px 6px;
}
.vlb-dialog.is-watermark-side .vlb-watermark-panel {
  display: grid;
  align-content: start;
  gap: 7px;
}
.vlb-dialog.is-quad .vlb-watermark-panel {
  display: none;
}
.vlb-dialog.is-watermark-side .vlb-watermark-overlay { display: none; }
.vlb-dialog.is-watermark-overlay .vlb-watermark-overlay {
  width: min(156px, calc(100% - 24px));
}
.vlb-watermark-metric,
.vc-metric {
  display: grid;
  gap: 2px;
  min-height: 0;
  border: 0;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.42);
  padding: 6px 8px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}
.vlb-watermark-metric span,
.vc-metric span {
  color: rgba(255,255,255,0.82);
  font-size: 0.78rem;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0,0,0,0.72);
}
.vlb-watermark-metric b,
.vc-metric b {
  color: #fff;
  font-family: inherit;
  font-size: clamp(1.12rem, 1.16vw, 1.32rem);
  font-weight: 900;
  line-height: 1.05;
  text-shadow:
    0 1px 3px rgba(0,0,0,0.9),
    0 0 1px rgba(0,0,0,0.95);
  -webkit-text-stroke: 0.25px rgba(0,0,0,0.52);
  white-space: nowrap;
}
.vlb-watermark-metric em,
.vc-metric em {
  margin-left: 3px;
  font-style: normal;
  font-size: 0.66em;
  opacity: 0.78;
}
.vlb-dialog.is-watermark-side .vlb-watermark-metric,
.vc-dialog.is-watermark-side .vc-metric {
  gap: 3px;
  border-radius: 0;
  background: transparent;
  padding: 8px 8px 10px;
  backdrop-filter: none;
  border-bottom: 1px solid var(--video-line);
}
.vlb-dialog.is-watermark-side .vlb-watermark-metric span,
.vc-dialog.is-watermark-side .vc-metric span {
  color: var(--video-muted);
  font-size: 0.72rem;
  text-shadow: none;
}
.vlb-dialog.is-watermark-side .vlb-watermark-metric b,
.vc-dialog.is-watermark-side .vc-metric b {
  color: var(--video-ink);
  font-size: 1.12rem;
  text-shadow: none;
  -webkit-text-stroke: 0;
}
.vlb-dialog.is-watermark-side .vlb-watermark-metric em,
.vc-dialog.is-watermark-side .vc-metric em {
  color: var(--video-muted);
}
.vlb-retry {
  position: absolute;
  z-index: 5;
  min-height: 38px;
  border-radius: 8px;
  background: rgba(0,0,0,0.72);
  color: var(--gold);
}
.vlb-thumbs,
.vc-thumbs {
  display: flex;
  gap: 10px;
  min-height: 82px;
  overflow-x: auto;
  padding: 2px 0 4px;
}
.vlb-thumbs.is-empty,
.vc-thumbs.is-empty { min-height: 16px; }
.vlb-thumb,
.vc-thumb {
  flex: 0 0 120px;
  display: grid;
  gap: 4px;
  border: 2px solid transparent;
  border-radius: 7px;
  background: #17130f;
  color: #d8d0c4;
  padding: 4px;
  text-align: left;
}
.vlb-thumb[aria-selected="true"],
.vc-thumb[aria-selected="true"] { border-color: var(--gold); }
.vlb-thumb-media,
.vc-thumb-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
  background: #000;
}
.vlb-thumb video,
.vc-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vlb-thumb b,
.vc-thumb b {
  overflow: hidden;
  font-size: 0.68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Video Compare：跨球比對覆寫 --- */
.vc-watermark-toggle {
  flex: 0 0 auto;
}
.vc-pane-grid {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.vc-stage.is-overlay .vc-pane-grid {
  height: 100%;
}
.vc-video-area {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  background: #000;
}
.vc-dialog.is-watermark-side .vc-video-area {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
}
.vc-dialog.is-watermark-overlay .vc-video-area {
  display: block;
}
.vc-metrics {
  display: grid;
  align-items: baseline;
  gap: 7px;
  overflow-x: hidden;
  overflow-y: auto;
  color: #fff;
}
.vc-dialog.is-watermark-side .vc-metrics {
  position: relative;
  left: auto;
  top: auto;
  z-index: 4;
  width: auto;
  height: 100%;
  max-height: none;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: var(--video-panel);
  padding: 8px 6px;
  backdrop-filter: none;
  pointer-events: none;
}
.vc-dialog.is-watermark-side .vc-pane[data-vc-pane="b"] .vc-video-area {
  grid-template-columns: minmax(0, 1fr) 156px;
}
.vc-dialog.is-watermark-side .vc-pane[data-vc-pane="b"] .vc-video-shell {
  grid-column: 1;
  grid-row: 1;
}
.vc-dialog.is-watermark-side .vc-pane[data-vc-pane="b"] .vc-metrics {
  grid-column: 2;
  grid-row: 1;
}
.vc-dialog.is-watermark-overlay .vc-metrics {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 4;
  width: min(156px, calc(50% - 20px));
  max-height: min(62%, 340px);
  border-radius: 0;
  background: transparent;
  padding: 0;
  backdrop-filter: none;
  pointer-events: none;
}
.vc-pane[data-vc-pane="b"] .vc-metrics {
  left: auto;
  right: 10px;
  background: transparent;
}
.vc-dialog.is-watermark-side .vc-pane[data-vc-pane="b"] .vc-metrics {
  right: auto;
  background: var(--video-panel);
}
.vc-pane[data-vc-pane="b"] .vc-metric {
  text-align: right;
}
.vc-stage.is-overlay .vc-pane[data-vc-pane="b"] .vc-metrics {
  left: auto;
  right: 10px;
}
.vc-fullscreen-stage[hidden] {
  display: none !important;
}
.vc-fullscreen-stage {
  position: fixed;
  inset: 0;
  z-index: 10000;
  width: 100vw;
  height: 100vh;
  background: #000;
  display: grid;
  place-items: stretch;
}
.vc-fullscreen-stage:fullscreen {
  width: 100vw;
  height: 100vh;
  background: #000;
}
.vc-fullscreen-videos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  background: #000;
}
.vc-fullscreen-video {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  background: #000;
}
.vc-fullscreen-stage.is-overlay .vc-fullscreen-videos {
  position: relative;
  display: block;
}
.vc-fullscreen-stage.is-overlay .vc-fullscreen-video {
  position: absolute;
  inset: 0;
}
.vc-fullscreen-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(0, 0, 0, 0.74);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}
.vc-video-shell {
  position: relative;
  inset: auto;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #000;
}
.vc-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.vc-pane-foot {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(152px, 200px);
  gap: 6px;
  align-items: center;
  border-top: 1px solid #252525;
  background: #111;
  padding: 5px 8px;
}
.vc-video-label {
  position: static;
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  padding: 4px 7px;
  font-size: 0.74rem;
}
.vc-change-btn {
  min-height: 28px;
  border-radius: 7px;
  background: #2f2a24;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 5px 9px;
}
.vc-pane-foot .vc-thumbs {
  min-height: 0;
  padding: 0;
}
.vc-pane-foot .vc-thumbs.is-empty {
  display: none;
}
.vc-angle-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--video-muted);
  font-size: 0.64rem;
  font-weight: 800;
}
.vc-angle-select span {
  white-space: nowrap;
}
.vc-angle-select select {
  width: min(122px, 100%);
  min-height: 28px;
  border: 1px solid var(--video-line);
  border-radius: 7px;
  background: var(--video-panel-2);
  color: var(--video-ink);
  padding: 3px 8px;
  font: inherit;
}
.vc-pick-popover {
  position: absolute;
  right: 10px;
  bottom: calc(100% + 8px);
  z-index: 15;
  display: grid;
  gap: 5px;
  width: min(280px, calc(100% - 20px));
  max-height: 320px;
  overflow: auto;
  border: 1px solid rgba(231,204,73,0.28);
  border-radius: 8px;
  background: #17130f;
  padding: 8px;
  box-shadow: 0 18px 42px rgba(0,0,0,0.45);
}
.vc-pick-popover[hidden] { display: none; }
.vc-pick-option {
  display: grid;
  gap: 2px;
  min-height: 38px;
  border-radius: 6px;
  background: transparent;
  color: #d8d0c4;
  padding: 6px 8px;
  text-align: left;
}
.vc-pick-option:hover:not(:disabled) { background: rgba(231,204,73,0.12); }
.vc-pick-option:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
.vc-pick-option span {
  display: flex;
  gap: 7px;
  align-items: center;
}
.vc-pick-option b {
  color: var(--gold);
  font-family: "IBM Plex Mono", monospace;
}
.vc-pick-option small,
.vc-pick-option em {
  overflow: hidden;
  color: #9b9081;
  font-size: 0.68rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vc-crop-controls {
  position: static;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 0;
  border-top: 1px solid #252525;
  background: #17130f;
  padding: 5px 8px;
  backdrop-filter: none;
}
.vc-crop-controls label {
  gap: 5px;
  font-size: 0.64rem;
}
.vc-crop-controls input {
  min-height: 18px;
}

/* Video modals use a light control surface while keeping the actual video well black. */
.vlb-dialog,
.vc-dialog {
  --video-modal-bg: #f7f1e6;
  --video-panel: #fffdf7;
  --video-panel-2: #f1e8d8;
  --video-panel-3: #eadfca;
  --video-ink: #221714;
  --video-muted: #6f6252;
  --video-line: rgba(34, 23, 20, 0.16);
  --video-soft-gold: rgba(231, 204, 73, 0.22);
  --video-soft-gold-strong: rgba(231, 204, 73, 0.38);
  background: var(--video-modal-bg);
  border-color: rgba(34, 23, 20, 0.18);
  color: var(--video-ink);
  box-shadow: 0 24px 60px rgba(34, 23, 20, 0.28);
}
.vlb-modal,
.vc-modal {
  background: rgba(34, 23, 20, 0.46);
}
.vlb-head,
.vc-head,
.vc-toolbar,
.vc-align-toolbar {
  border-color: var(--video-line);
  background: var(--video-panel);
}
.vlb-head h2,
.vc-head h2 {
  color: var(--video-ink);
}
.vlb-eyebrow,
.vc-eyebrow,
.vlb-list-main b,
.vc-pick-option b {
  color: var(--gold-deep);
}
.vlb-icon-btn,
.vc-watermark-toggle,
.vlb-mobile-trigger,
.vc-layout-btn,
.vc-close,
.vc-toolbar button,
.vc-align-toolbar button,
.vc-change-btn {
  background: var(--video-panel-2);
  color: var(--video-ink);
}
.vlb-icon-btn:hover,
.vc-watermark-toggle:hover,
.vc-layout-btn:hover,
.vc-close:hover,
.vc-toolbar button:hover,
.vc-align-toolbar button:hover,
.vc-change-btn:hover {
  background: var(--video-panel-3);
}
.vlb-action-btn,
.vc-layout-btn.active,
.vc-toolbar button.active,
.vc-align-toolbar button.active {
  background: var(--gold);
  color: var(--on-gold);
}
.vlb-action-btn.is-cancel {
  background: #594f43;
  color: #fffaf0;
}
.vlb-body,
.vc-stage {
  background: var(--video-modal-bg);
}
.vlb-sidebar,
.vlb-watermark-panel,
.vlb-mobile-popover,
.vc-pane-foot,
.vc-pick-popover,
.vc-crop-controls,
.vc-timeline,
.vc-timeline-tools {
  border-color: var(--video-line);
  background: var(--video-panel);
}
.vlb-list-item,
.vlb-thumb,
.vc-thumb,
.vc-pick-option,
.vc-metrics,
.vc-opacity-group,
.vc-crop-controls label,
.vc-toolbar,
.vc-align-toolbar {
  color: var(--video-ink);
}
.vlb-list-item:hover:not(:disabled),
.vlb-list-item[aria-current="true"],
.vc-pick-option:hover:not(:disabled) {
  background: var(--video-soft-gold);
}
.vlb-list-item[aria-current="true"] {
  border-color: var(--video-soft-gold-strong);
  border-left-color: var(--gold-deep);
}
.vlb-list-main small,
.vlb-no-video,
.vc-pick-option small,
.vc-pick-option em {
  color: var(--video-muted);
}
.vlb-watermark-metric,
.vc-metric {
  border-color: transparent;
  background: rgba(0,0,0,0.42);
}
.vlb-watermark-metric span,
.vc-metric span {
  color: rgba(255,255,255,0.82);
}
.vlb-watermark-metric b,
.vc-metric b {
  color: #fff;
  font-family: inherit;
}
.vlb-watermark-metric em,
.vc-metric em {
  color: rgba(255,255,255,0.82);
}
.vlb-watermark-overlay,
.vc-dialog.is-watermark-overlay .vc-metrics {
  background: transparent;
  color: #fff;
  box-shadow: none;
}
.vc-pane[data-vc-pane="b"] .vc-metrics {
  background: transparent;
}
.vc-dialog.is-watermark-side .vc-metrics,
.vc-dialog.is-watermark-side .vc-pane[data-vc-pane="b"] .vc-metrics {
  background: var(--video-panel);
}
.vlb-dialog.is-watermark-side .vlb-watermark-panel {
  color: var(--video-ink);
  font-family: inherit;
}
.vlb-dialog.is-watermark-side .vlb-watermark-metric,
.vc-dialog.is-watermark-side .vc-metric {
  border: 0;
  border-bottom: 1px solid var(--video-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 9px 8px 11px;
  color: var(--video-ink);
  font-family: inherit;
  backdrop-filter: none;
  text-shadow: none;
}
.vlb-dialog.is-watermark-side .vlb-watermark-metric:last-child,
.vc-dialog.is-watermark-side .vc-metric:last-child {
  border-bottom: 0;
}
.vlb-dialog.is-watermark-side .vlb-watermark-metric span,
.vc-dialog.is-watermark-side .vc-metric span {
  color: var(--video-muted);
  text-shadow: none;
}
.vlb-dialog.is-watermark-side .vlb-watermark-metric b,
.vc-dialog.is-watermark-side .vc-metric b {
  color: var(--video-ink);
  font-family: inherit;
  font-size: 1.12rem;
  text-shadow: none;
  -webkit-text-stroke: 0;
}
.vlb-dialog.is-watermark-side .vlb-watermark-metric em,
.vc-dialog.is-watermark-side .vc-metric em {
  color: var(--video-muted);
}
.vlb-thumb,
.vc-thumb {
  background: var(--video-panel);
  border-color: rgba(34, 23, 20, 0.08);
}
.vlb-thumb[aria-selected="true"],
.vc-thumb[aria-selected="true"] {
  border-color: var(--gold-deep);
}
.vlb-thumb b,
.vc-thumb b,
.vc-video-label {
  color: var(--video-ink);
}
.vc-video-label {
  background: rgba(255, 253, 247, 0.86);
}
.vc-video-label b,
.vc-time {
  color: var(--gold-deep);
}
.vc-time {
  background: var(--video-panel-2);
}
.vc-ruler {
  background:
    repeating-linear-gradient(
      to right,
      rgba(34, 23, 20, 0.18) 0,
      rgba(34, 23, 20, 0.18) 1px,
      transparent 1px,
      transparent 8.333%
    ),
    #efe5d3;
}
.vc-tracks {
  background: #f6efe2;
}
.vc-track-row,
.vc-pane,
.vc-pane-foot,
.vc-crop-controls,
.vc-timeline,
.vc-toolbar,
.vc-align-toolbar {
  border-color: var(--video-line);
}
.vc-track-label {
  background: rgba(255, 253, 247, 0.88);
  color: var(--video-muted);
}
.vc-playhead {
  background: var(--video-ink);
  box-shadow: 0 0 8px rgba(34, 23, 20, 0.32);
}
.vc-play-range-label {
  background: rgba(255, 253, 247, 0.9);
  color: var(--gold-deep);
}

@media (max-width: 899px) {
  .vlb-modal {
    padding: 0;
  }
  .vlb-dialog {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
  .vlb-head {
    align-items: flex-start;
    gap: 8px;
  }
  .vlb-title-group {
    min-width: 0;
  }
  .vlb-mobile-picker {
    display: block;
    margin-left: auto;
  }
  .vlb-watermark-toggle,
  #vlb-watermark-toggle,
  #vlb-view-toggle,
  #vlb-quad-play,
  #vlb-compare {
    display: none;
  }
  .vlb-body,
  .vlb-dialog.is-watermark-side .vlb-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .vlb-sidebar,
  .vlb-watermark-panel {
    display: none;
  }
  .vlb-main {
    padding: 10px;
  }
  .vlb-quad-view {
    display: none !important;
  }
  .vlb-video {
    max-height: calc(100dvh - 154px);
  }
  .vlb-watermark-overlay {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    left: 10px;
    top: 10px;
    gap: 12px;
  }
  .vc-modal {
    display: none !important;
  }
}

/* --- 項目 section 標題 --- */
.test-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.test-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.test-section-head h2 { font-size: 1rem; margin: 0; white-space: nowrap; }
.section-badge-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

/* --- 逐球收合清單 --- */
.trial-collapse {
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.trial-collapse + .trial-collapse {
  border-top-style: dashed;
}
.trial-collapse summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 18px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  list-style: none;
  user-select: none;
}
.trial-collapse summary::-webkit-details-marker { display: none; }
.trial-collapse summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 2px;
  color: var(--gold-deep);
  font-size: 0.72rem;
  transition: transform 0.16s ease;
}
.trial-collapse[open] summary::before {
  transform: rotate(90deg);
}
.trial-collapse-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}
.trial-table-wrap {
  border-top: 1px solid var(--line);
}

/* --- 場次卡片（首頁） --- */
.session-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  transition: border-color 0.18s, transform 0.12s;
  text-decoration: none;
  color: inherit;
}
.session-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.session-card .session-name { font-size: 1.15rem; font-weight: 700; }
.session-card .session-meta { color: var(--muted); font-size: 0.85rem; margin-top: 6px; }
.session-card .session-count {
  display: inline-block;
  margin-top: 10px;
  background: var(--gold-soft);
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.82rem;
  font-weight: 700;
}

.session-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* --- 篩選列 --- */
.report-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.report-filter label { min-width: 180px; }
.report-filter button { align-self: flex-end; }

/* --- 選手列表卡（場次總覽） --- */
.athlete-row-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}
.athlete-row-link:hover { background: var(--gold-soft); }
.athlete-row-link:last-child { border-bottom: 0; }
.athlete-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: "Barlow Semi Condensed", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.athlete-info { flex: 1; }
.athlete-info strong { display: block; font-weight: 700; }
.athlete-info small { color: var(--muted); font-size: 0.82rem; }
.test-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.test-chip {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* --- 麵包屑 --- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep::after { content: "/"; margin: 0 2px; }

/* --- 快捷導覽（場次總覽） --- */
.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.quick-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.9rem;
  transition: border-color 0.15s, background 0.15s;
}
.quick-nav a:hover { border-color: var(--gold); background: var(--gold-soft); }

/* badge 補充（TrackMan/Blast） */
.badge-pitch_trackman { --badge-bg: #1a3a5c; background: var(--badge-bg); }
.badge-hit_trackman   { --badge-bg: #3a1a5c; background: var(--badge-bg); }
.badge-hit_blast      { --badge-bg: #1a5c3a; background: var(--badge-bg); }
.badge-assets-video   { --badge-bg: #0f5f5a; background: var(--badge-bg); }
.badge-assets-report  { --badge-bg: #6f4a12; background: var(--badge-bg); }
.badge-defense { background: color-mix(in srgb, var(--gold) 35%, transparent); color: var(--ink); }

/* --- 場次總覽排行榜 --- */
.overview-title-search {
  flex: 0 0 auto;
  width: min(320px, 100%);
  max-width: 100%;
  margin-left: auto;
}
.overview-title-search input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border-radius: 999px;
}
.overview-tabs { margin-bottom: 16px; }
.overview-panel-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.overview-panel-title h2 {
  white-space: nowrap;
}
.pitch-type-filter {
  --pitch-color: var(--ink);
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}
.pitch-type-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 25px;
  padding: 4px 8px;
  border-color: var(--pitch-color);
  color: #fff;
  box-shadow: none;
}
.pitch-type-filter-toggle.pitch-type-pill {
  --pitch-color: inherit;
}
.pitch-type-filter-toggle:hover,
.pitch-type-filter-toggle[aria-expanded="true"] {
  background: var(--pitch-color);
  color: #fff;
  filter: brightness(0.96);
}
.pitch-type-filter-caret {
  color: currentColor;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
}
.pitch-type-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  display: grid;
  gap: 6px;
  width: max-content;
  min-width: 132px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.pitch-type-menu[hidden] {
  display: none;
}
.pitch-type-option {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  padding: 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}
.pitch-type-option:hover,
.pitch-type-option[aria-selected="true"] {
  border-color: color-mix(in srgb, var(--gold) 48%, transparent);
  background: var(--gold-soft);
}
.pitch-metric-heading {
  background: color-mix(in srgb, var(--selected-pitch-color, var(--gold)) 14%, var(--panel-2));
  box-shadow: inset 0 -3px 0 var(--selected-pitch-color, var(--gold));
}
.pitch-metric-heading .sort-trigger {
  gap: 0;
  color: color-mix(in srgb, var(--selected-pitch-color, var(--ink)) 48%, var(--ink));
}
.pitch-heading-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.overview-filter-empty {
  border-top: 1px solid var(--line);
}
.leaderboard-panel { overflow: hidden; }
.leaderboard-wrap { border-top: 1px solid var(--line); }
.leaderboard-table {
  min-width: 1320px;
  table-layout: auto;
}
#overview-pitchers-table {
  min-width: 1500px;
}
.leaderboard-table tbody tr[hidden] {
  display: none !important;
}
.leaderboard-table th:first-child,
.leaderboard-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--panel);
  min-width: 190px;
  box-shadow: 10px 0 18px rgba(34, 23, 20, 0.05);
}
.leaderboard-table thead th:first-child {
  z-index: 3;
  background: var(--panel-2);
}
.leaderboard-table tbody tr:hover td:first-child { background: var(--gold-soft); }
.sort-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: unset;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.sort-trigger:hover { background: transparent; color: var(--ink); }
.sort-indicator {
  display: inline-block;
  width: 0.7em;
  margin-left: 4px;
  color: var(--gold-deep);
}
.sort-trigger.active.asc .sort-indicator::before { content: "↑"; }
.sort-trigger.active.desc .sort-indicator::before { content: "↓"; }
.leaderboard-athlete {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}
.athlete-avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
}
.leaderboard-name strong {
  display: block;
  line-height: 1.15;
}
.leaderboard-name small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.metric-cell {
  min-width: 72px;
  padding-right: 14px;
  padding-bottom: 13px;
  font-variant-numeric: tabular-nums;
}
.metric-value {
  display: inline-block;
  white-space: nowrap;
}
.metric-unit {
  display: inline-block;
  margin-left: 3px;
  color: var(--muted);
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  vertical-align: baseline;
}
.metric-unit-degree {
  margin-left: 1px;
  font-size: 0.62rem;
  line-height: 0;
  vertical-align: super;
}
.empty-cell { color: var(--muted); }

.live-ranking-list .metric-cell {
  min-width: 0;
  padding-right: 12px;
  padding-bottom: 0;
}

.live-ranking-list .is-hero-row .metric-cell {
  padding-right: 12px;
}

.live-ranking-list .ranking-row > [role="cell"] {
  min-width: 0;
}

@media (min-width: 761px) and (max-width: 1279px) {
  .rankings-dashboard-shell {
    grid-template-columns: 56px minmax(0, 1fr);
    height: var(--rankings-shell-height, calc(100dvh - var(--rankings-fixedbar-top, 64px) - var(--rankings-fixedbar-height, 46px) - 18px));
    min-height: 680px;
  }
  .rankings-page-dots {
    width: 56px;
  }
  .rankings-page-grid.live-rankings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, auto));
  }
}

@media (max-width: 760px) {
  .app-main:has(.rankings-dashboard-fixedbar) {
    width: min(100vw - 16px, 100%);
    padding-top: calc(var(--rankings-fixedbar-height, 58px) + 14px);
    padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  }
  .stat-grid { grid-template-columns: repeat(2, 1fr); padding: 12px 14px; }
  .session-grid { grid-template-columns: 1fr; }
  .report-filter { flex-direction: column; }
  .report-filter label, .report-filter button { width: 100%; }
  .overview-title-search { width: 100%; margin-left: 0; }
  .overview-panel-title {
    justify-content: space-between;
  }
  .live-rankings-head { align-items: flex-start; }
  .live-rankings-actions { width: 100%; justify-content: flex-end; }
  .rankings-dashboard-shell {
    display: block;
    height: calc(100dvh - var(--rankings-fixedbar-top, 112px) - var(--rankings-fixedbar-height, 58px) - 78px);
    min-height: 320px;
  }
  .rankings-page-dots {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    top: auto;
    z-index: 19;
    width: auto;
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel) 90%, transparent);
    box-shadow: 0 10px 24px rgba(37, 30, 24, 0.14);
    flex-direction: row;
    gap: 3px;
    padding: 3px 8px;
    transform: translateX(-50%);
  }
  .rankings-page-dot {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }
  .rankings-page-window {
    height: 100%;
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }
  .rankings-page-panel {
    min-height: var(--rankings-panel-height, 100%);
    padding: 2px 0 16px;
  }
  .live-rankings-grid,
  .rankings-page-grid.live-rankings-grid {
    grid-template-columns: 1fr;
  }
  .rankings-page-grid.live-rankings-grid {
    grid-template-rows: none;
    height: auto;
    min-height: var(--rankings-panel-height, 100%);
    gap: 12px;
  }
  .ranking-placeholder-card {
    min-height: 190px;
  }
  .rankings-custom-tools {
    top: 8px;
    right: 10px;
  }
  .rankings-custom-modal {
    padding: 0;
    place-items: stretch;
  }
  .rankings-custom-dialog {
    width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }
  .rankings-custom-body {
    grid-template-columns: 1fr;
  }
  .rankings-custom-options {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .ranking-row {
    grid-template-columns: 34px minmax(0, 1fr) 48px minmax(74px, auto);
    grid-template-rows: 1fr;
    grid-template-areas: "rank athlete role metric";
    column-gap: 5px;
    height: 58px;
    width: calc(100% - 10px);
    margin-inline: 5px;
  }
  .ranking-row.is-hero-row {
    grid-template-columns: 40px minmax(0, 1fr) 52px minmax(82px, auto);
    grid-template-areas: "rank athlete role metric";
    height: 78px;
    width: 100%;
    margin-inline: 0;
  }
  .ranking-row .rank-cell {
    grid-area: rank;
  }
  .ranking-athlete-cell {
    grid-area: athlete;
  }
  .ranking-role-cell {
    grid-area: role;
    align-self: center;
    justify-self: end;
    text-align: right;
  }
  .ranking-metric {
    grid-area: metric;
    align-self: center;
    justify-self: end;
    text-align: right;
  }
  .ranking-athlete-cell {
    min-width: 0;
    overflow: hidden;
  }
  .ranking-athlete-team {
    max-width: 100%;
  }
  .ranking-athlete {
    width: 100%;
    font-size: 1rem;
  }
  .is-hero-row .ranking-athlete {
    font-size: 1.16rem;
  }
  .ranking-role-label {
    max-width: 48px;
    font-size: 0.78rem;
  }
  .is-hero-row .ranking-role-label {
    max-width: 52px;
    font-size: 0.86rem;
  }
  .live-ranking-list .ranking-value {
    font-size: 0.92rem;
  }
  .live-ranking-list .is-hero-row .ranking-value {
    font-size: 1.08rem;
  }
  .ranking-title-line { display: block; }
  .ranking-title-dropdown {
    position: static;
  }
  .ranking-metric-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    grid-template-columns: 1fr;
    width: 100%;
    max-height: 48vh;
    margin-top: 0;
  }
  .ranking-metric-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-right: -16px;
    padding-right: 16px;
  }
  .ranking-metric-tabs a { flex: 0 0 auto; }
  .live-ranking-full-link { display: none; }
  .live-rankings-sticky-inner {
    min-height: 58px;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
    padding: 0;
  }
  .sticky-rankings-title { flex: 1 1 auto; }
  .sticky-actions {
    width: auto;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin-left: auto;
  }
}

/* =========================================================================
   場次總覽：投手 / 打者 分頁（Tab Bar）
   ========================================================================= */

.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--line);
  margin-bottom: 20px;
}
.tab-btn {
  position: relative;
  padding: 13px 28px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  color: var(--muted);
  font-family: "Noto Sans TC", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}
.tab-btn .tab-count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--line);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
  transition: background 0.15s, color 0.15s;
}
.tab-btn.active .tab-count {
  background: var(--gold-soft);
  color: var(--gold-deep);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Section label above ranking grid inside a tab */
.tab-section-label {
  margin: 22px 0 10px;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* =========================================================================
   選手報告：Hero 區塊
   ========================================================================= */

.athlete-hero {
  /* Full-bleed: escape the app-main max-width */
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  /* Cancel app-main's padding-top so hero butts up to header */
  margin-top: -32px;
  /* Visual */
  background: linear-gradient(135deg, #221714 0%, #1a0f0a 45%, #0e0a06 100%);
  border-bottom: 2px solid var(--gold);
  padding: 44px clamp(20px, 5vw, calc((100vw - 1180px) / 2 + 42px)) 38px;
  margin-bottom: 28px;
  overflow: hidden;
}
/* Diagonal stripe decoration */
.athlete-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -55deg,
    transparent,
    transparent 42px,
    rgba(231, 204, 73, 0.028) 42px,
    rgba(231, 204, 73, 0.028) 43px
  );
  pointer-events: none;
}
/* Gold accent bar on left edge */
.athlete-hero::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--gold);
}

.athlete-hero-inner {
  position: relative;
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  min-height: 150px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.athlete-hero-left {
  flex: 0 1 300px;
  min-width: 180px;
}
.athlete-hero-eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 3px 11px 3px 10px;
  border-radius: 4px;
  background: var(--gold);
  color: var(--on-gold);
  font-family: "Barlow Semi Condensed", sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: skewX(-11deg);
}
.athlete-hero-eyebrow > span { display: inline-block; transform: skewX(11deg); }

.athlete-hero-name {
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-style: italic;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
  line-height: 1.0;
}
.athlete-hero-birth {
  color: #d1c5b4;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 8px;
  font-variant-numeric: tabular-nums;
}
.athlete-hero-sub {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.98rem;
  margin: 0 0 5px;
  letter-spacing: 0.03em;
}
.athlete-hero-session {
  color: #7a6e62;
  font-size: 0.83rem;
  margin: 0;
}
.hero-pitch-arsenal {
  display: grid;
  gap: 0;
  width: min(330px, 100%);
  margin-top: 12px;
}
.hero-pitch-arsenal-radar {
  width: 100%;
  max-width: 300px;
  min-height: 350px;
  margin-top: 0;
  padding: 6px 4px 2px;
  align-self: start;
  color: #fff;
}
.hero-pitch-arsenal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff7df;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}
.hero-pitch-arsenal-title span:last-child {
  color: #7f7365;
  font-size: 0.64rem;
  white-space: nowrap;
}
.hero-pitch-arsenal-card {
  --avg-pct: 50%;
  --pitch-color: var(--gold);
  position: relative;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(50px, 0.75fr) minmax(96px, 1.65fr) minmax(42px, 0.58fr);
  align-items: center;
  gap: 9px;
  min-height: 35px;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
}
.hero-pitch-arsenal-card::before,
.hero-pitch-arsenal-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  display: none;
}
.hero-pitch-arsenal-card::before {
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), #f26a32);
}
.hero-pitch-arsenal-card::after {
  left: 3px;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), #f26a32);
  box-shadow: 0 0 14px rgba(231, 204, 73, 0.34);
}
.hero-pitch-arsenal-card:last-child {
  border-bottom: 0;
}
.hero-pitch-arsenal-name,
.hero-pitch-arsenal-range,
.hero-pitch-arsenal-avg {
  position: relative;
  z-index: 1;
}
.hero-pitch-arsenal-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.hero-pitch-arsenal-name strong {
  min-width: 0;
  overflow: hidden;
  color: color-mix(in srgb, var(--pitch-color) 84%, #ffffff);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-pitch-arsenal-name span {
  color: #a89b8c;
  font-size: 0.52rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.hero-pitch-arsenal-range {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.hero-pitch-arsenal-track {
  position: relative;
  display: block;
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pitch-color) 46%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.hero-pitch-arsenal-marker {
  position: absolute;
  left: var(--avg-pct);
  top: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid #1b120d;
  border-radius: 50%;
  background: var(--pitch-color);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--pitch-color) 60%, transparent);
}
.hero-pitch-arsenal-range-labels {
  display: inline-flex;
  justify-content: space-between;
  gap: 8px;
  color: #84786a;
  font-family: "IBM Plex Mono", "Noto Sans TC", monospace;
  font-size: 0.52rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero-pitch-arsenal-avg {
  display: grid;
  justify-items: end;
  gap: 1px;
  min-width: 0;
}
.hero-pitch-arsenal-avg span {
  color: color-mix(in srgb, var(--pitch-color) 88%, #ffffff);
  font-family: "Barlow Semi Condensed", "IBM Plex Mono", "Noto Sans TC", sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero-pitch-arsenal-avg small {
  color: #8f8274;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.5rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.hero-pitch-arsenal-radar .hero-pitch-arsenal-title {
  min-height: 24px;
  margin-bottom: 10px;
  padding-bottom: 5px;
  font-size: 0.9rem;
  letter-spacing: 0;
}
.hero-pitch-arsenal-radar .hero-pitch-arsenal-title span:last-child {
  font-size: 0.68rem;
}
.hero-pitch-arsenal-radar .hero-pitch-arsenal-card {
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-areas:
    "name avg"
    "range range";
  gap: 6px 14px;
  min-height: 58px;
  padding: 7px 0 8px;
}
.hero-pitch-arsenal-radar .hero-pitch-arsenal-name {
  grid-area: name;
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.hero-pitch-arsenal-radar .hero-pitch-arsenal-name strong {
  font-size: 0.88rem;
}
.hero-pitch-arsenal-radar .hero-pitch-arsenal-name span {
  font-size: 0.62rem;
}
.hero-pitch-arsenal-radar .hero-pitch-arsenal-range {
  grid-area: range;
  gap: 5px;
}
.hero-pitch-arsenal-radar .hero-pitch-arsenal-track {
  height: 5px;
}
.hero-pitch-arsenal-radar .hero-pitch-arsenal-marker {
  width: 11px;
  height: 11px;
}
.hero-pitch-arsenal-radar .hero-pitch-arsenal-range-labels {
  font-size: 0.6rem;
}
.hero-pitch-arsenal-radar .hero-pitch-arsenal-avg {
  grid-area: avg;
}
.hero-pitch-arsenal-radar .hero-pitch-arsenal-avg span {
  font-size: 1.18rem;
}
.hero-pitch-arsenal-radar .hero-pitch-arsenal-avg small {
  font-size: 0.56rem;
}

.athlete-hero-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
  flex: 0 1 auto;
  padding-top: 4px;
}

.hero-card {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  min-width: 90px;
  text-align: center;
}
.hero-card.highlight {
  background: rgba(231, 204, 73, 0.10);
  border-color: rgba(231, 204, 73, 0.40);
}
.hero-card-label {
  display: block;
  font-size: 0.70rem;
  color: #7a6e62;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}
.hero-card-val {
  display: block;
  font-size: 1.22rem;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.hero-card.highlight .hero-card-val { color: var(--gold); }
.hero-card-val small {
  font-size: 0.68rem;
  color: #7a6e62;
  font-weight: 400;
  margin-left: 2px;
}
.hero-test-tags {
  position: absolute;
  right: 0;
  bottom: 0;
  width: max-content;
  max-width: min(760px, calc(100% - 400px));
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.hero-test-tags::-webkit-scrollbar { display: none; }
.hero-test-tags .hero-card-label {
  width: 100%;
  margin-bottom: 8px;
  color: #9b9081;
  text-align: left;
}
.hero-test-chip-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 7px;
}
.hero-test-chip-list .test-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  min-height: 46px;
  background: var(--badge-bg, var(--ink));
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  padding: 9px 13px;
  color: #fff;
  font-size: 0.96rem;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.24);
}
.hero-test-chip {
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 800;
  cursor: pointer;
}
.hero-test-chip:focus-visible {
  outline: 3px solid rgba(231, 204, 73, 0.62);
  outline-offset: 3px;
}

.hero-radar-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  justify-content: end;
  justify-items: end;
  flex: 1 1 760px;
  min-width: min(100%, 720px);
  max-width: 936px;
  column-gap: 28px;
  row-gap: 18px;
  padding-top: 0;
}
.hero-radar-panel {
  width: 100%;
  max-width: 300px;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 6px 4px 2px;
  color: #fff;
}
.hero-radar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  margin-bottom: 2px;
}
.hero-radar-head h2 {
  color: #fff;
  font-size: 0.96rem;
}
.hero-radar-head span {
  border-radius: 999px;
  background: rgba(231, 204, 73, 0.14);
  padding: 3px 7px;
  color: var(--gold);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  font-weight: 900;
}
.hero-radar-body {
  display: block;
}
.hero-radar-chart-wrap {
  display: grid;
  place-items: center;
  padding: 42px 0 48px;
}
.hero-radar-chart {
  width: min(280px, 100%);
  aspect-ratio: 1;
  overflow: visible;
}
.radar-grid polygon {
  fill: none;
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 0.45;
}
.radar-grid line {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 0.45;
}
.radar-area-avg {
  fill: rgba(255, 255, 255, 0.14);
  stroke: none;
}
.radar-line-avg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.6);
  stroke-linejoin: round;
  stroke-width: 1.1;
}
.radar-area {
  fill: rgba(231, 204, 73, 0.28);
  stroke: none;
}
.radar-line {
  fill: none;
  stroke: var(--gold);
  stroke-linejoin: round;
  stroke-width: 1.35;
}
.radar-point {
  fill: var(--gold);
  stroke: var(--gold);
  stroke-width: 0.65;
}
.radar-axis-label {
  fill: #e8deca;
  font-size: 6.9px;
  font-weight: 900;
}
.radar-axis-value {
  font-family: "Barlow Semi Condensed", "IBM Plex Mono", "Noto Sans TC", sans-serif;
  font-size: 5.7px;
  font-weight: 900;
}
.radar-axis-pr-token {
  fill: var(--gold);
}
.radar-axis-score-token {
  fill: #b9ad9d;
}
.radar-axis-label.unavailable,
.radar-axis-value.unavailable {
  fill: #746a5e;
}
.radar-axis-value.unavailable .radar-axis-pr-token,
.radar-axis-value.unavailable .radar-axis-score-token {
  fill: #746a5e;
}
.radar-axis:focus {
  outline: none;
}
.radar-axis:focus .radar-axis-label,
.radar-axis:focus .radar-axis-value {
  fill: #fff;
}
.radar-empty-message {
  fill: #9b9081;
  font-size: 3.4px;
  font-weight: 900;
}
.hero-radar-insufficient,
.hero-radar-empty {
  display: grid;
  place-items: center;
  min-height: 140px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #9b9081;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 900;
}
.hero-radar-insufficient b {
  color: var(--gold);
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.8rem;
  line-height: 1;
}
.hero-radar-insufficient span {
  display: block;
}
.hero-radar-empty {
  min-height: 190px;
  padding: 18px;
}

/* --- 個人報告：打擊仰角初速圖 --- */
.hit-summary-layout {
  display: grid;
  grid-template-columns: minmax(360px, 480px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.hit-summary-stat-grid {
  grid-template-columns: repeat(auto-fill, minmax(176px, 204px));
  align-content: start;
  padding: 0;
}
.hit-launch-speed-panel {
  order: -1;
  min-width: 0;
  overflow: visible;
}
.hit-launch-speed-max {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, max-content) max-content;
  justify-content: end;
  align-items: baseline;
  gap: 2px 4px;
  color: var(--gold-deep);
  text-align: right;
}
.hit-launch-speed-max span {
  grid-column: 1 / -1;
  color: var(--gold-deep);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.hit-launch-speed-max strong {
  grid-column: 1;
  color: var(--gold-deep);
  font-family: "Barlow Semi Condensed", "IBM Plex Mono", "Noto Sans TC", sans-serif;
  font-size: 1.86rem;
  font-weight: 700;
  line-height: 0.96;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hit-launch-speed-max small {
  grid-column: 2;
  color: var(--gold-deep);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.hit-launch-speed-plot {
  position: relative;
  min-height: 318px;
  padding: 8px 30px 42px 48px;
}
.hit-launch-speed-field {
  position: relative;
  height: 284px;
  background: transparent;
  overflow: visible;
}
.hit-launch-speed-grid-line {
  position: absolute;
  z-index: 0;
  background: color-mix(in srgb, var(--line) 72%, transparent);
  pointer-events: none;
}
.hit-launch-speed-grid-line.is-x {
  left: 0;
  right: 0;
  height: 1px;
}
.hit-launch-speed-grid-line.is-y {
  top: 0;
  bottom: 0;
  width: 1px;
}
.hit-launch-speed-axis {
  position: absolute;
  z-index: 1;
  background: color-mix(in srgb, var(--muted) 50%, transparent);
  pointer-events: none;
}
.hit-launch-speed-axis-x {
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
}
.hit-launch-speed-axis-y {
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
}
.hit-launch-speed-axis-title {
  position: absolute;
  z-index: 2;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
.hit-launch-speed-axis-title-x {
  right: 0;
  bottom: -36px;
}
.hit-launch-speed-axis-title-y {
  left: 0;
  top: -17px;
}
.hit-launch-speed-tick {
  position: absolute;
  z-index: 2;
  color: var(--muted);
  font-family: "IBM Plex Mono", "Noto Sans TC", monospace;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.hit-launch-speed-tick-x {
  bottom: -18px;
  transform: translateX(-50%);
}
.hit-launch-speed-tick-y {
  left: -8px;
  transform: translate(-100%, 50%);
}
.hit-launch-speed-point {
  position: absolute;
  z-index: 3;
  width: 12px;
  height: 12px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 5px 12px rgba(34, 23, 20, 0.18);
  transform: translate(-50%, 50%);
}
.hit-launch-speed-point.is-best {
  z-index: 4;
  width: 16px;
  height: 16px;
  border-color: #fff;
  background: var(--gold);
  box-shadow:
    0 0 0 5px rgba(231, 204, 73, 0.22),
    0 8px 16px rgba(34, 23, 20, 0.2);
}
.hit-launch-speed-empty {
  display: grid;
  place-items: center;
  min-height: 250px;
  margin: 0;
  padding: 20px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
  text-align: center;
}

/* --- 個人報告：投球摘要與位移圖 --- */
.pitch-data-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  gap: 18px;
  align-items: start;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.pitch-summary-cell {
  position: relative;
  min-width: 0;
}
.pitch-summary-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  transition: opacity 0.18s ease, filter 0.18s ease;
}
.pitch-summary-wrap.is-dimmed {
  opacity: 0.25;
  filter: blur(1.5px);
}
.pitch-summary-cell.is-showing-detail .pitch-summary-wrap {
  opacity: 0;
  filter: none;
}
.pitch-summary-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.pitch-summary-table th,
.pitch-summary-table td {
  white-space: nowrap;
}
.pitch-summary-table th:first-child,
.pitch-summary-table td:first-child {
  width: 22%;
}
.pitch-summary-table tbody td {
  padding: 12px 10px;
  vertical-align: top;
}
.pitch-summary-table tbody td.metric-cell {
  padding-right: 20px;
  padding-bottom: 12px;
}
.pitch-summary-table tbody tr {
  transition: background 0.15s ease;
}
.pitch-summary-table tbody tr.is-active {
  background: var(--gold-soft);
}
.pitch-summary-table tbody tr.is-hidden-by-point {
  display: none;
}
.summary-metric {
  min-width: 92px;
}
.summary-metric .summary-value {
  display: inline-block;
}
.summary-value {
  display: block;
  color: var(--ink);
  font-family: "Barlow Semi Condensed", "Noto Sans TC", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pitch-summary-table small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}
.pitch-type-pill {
  --pitch-color: var(--ink);
  --pitch-ink: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--pitch-color);
  border-radius: 8px;
  background: var(--pitch-color);
  color: var(--pitch-ink);
  padding: 5px 10px;
  font-weight: 900;
  white-space: nowrap;
}
.pitch-type-pill.compact {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 0.78rem;
}
.movement-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  overflow: hidden;
}
.movement-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.movement-card-head h3 {
  margin: 0;
  font-size: 0.9rem;
}
.movement-card-head span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}
.movement-chart {
  position: relative;
  width: min(calc(100% - 28px), 560px);
  aspect-ratio: 1 / 1;
  margin: 14px auto;
  border-radius: 7px;
  background: var(--panel);
  overflow: hidden;
}
.movement-grid-line {
  position: absolute;
  z-index: 0;
  background: color-mix(in srgb, var(--line) 72%, transparent);
  pointer-events: none;
}
.movement-grid-line.is-x {
  left: 0;
  right: 0;
  height: 1px;
}
.movement-grid-line.is-y {
  top: 0;
  bottom: 0;
  width: 1px;
}
.movement-axis {
  position: absolute;
  z-index: 1;
  background: color-mix(in srgb, var(--muted) 50%, transparent);
  pointer-events: none;
}
.movement-axis-x { left: 0; right: 0; bottom: var(--movement-origin-y, 50%); height: 1px; }
.movement-axis-y { top: 0; bottom: 0; left: var(--movement-origin-x, 50%); width: 1px; }
.movement-axis-title {
  position: absolute;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
}
.movement-axis-title-x { right: 8px; bottom: calc(var(--movement-origin-y, 50%) + 5px); }
.movement-axis-title-y { left: calc(var(--movement-origin-x, 50%) + 6px); top: 7px; }
.movement-tick-label {
  position: absolute;
  z-index: 2;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}
.movement-tick-label-x {
  bottom: 2px;
  transform: translateX(-50%);
}
.movement-tick-label-y {
  right: 2px;
  transform: translateY(50%);
}
.movement-point {
  --pitch-color: var(--gold);
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  width: 14px;
  height: 14px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  background: var(--pitch-color);
  box-shadow: none;
  cursor: default;
  outline: none;
  transform: translate(-50%, 50%);
  transition: box-shadow 0.15s ease, filter 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.movement-point.is-muted {
  opacity: 0.15;
  filter: grayscale(0.4);
}
.movement-point:focus-visible {
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--pitch-color) 25%, transparent);
}
@media (hover: hover) {
  .movement-point:hover {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--pitch-color) 25%, transparent);
    transform: translate(-50%, 50%) scale(1.15);
  }
  .movement-point.is-active {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--pitch-color) 35%, transparent);
    transform: translate(-50%, 50%) scale(1.15);
  }
  .movement-point.is-selected {
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--pitch-color) 35%, transparent);
    transform: translate(-50%, 50%) scale(1.15);
  }
}
.movement-hover-detail {
  position: absolute;
  inset: 10px;
  box-sizing: border-box;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 236px;
  align-items: center;
  gap: 12px;
  width: auto;
  min-height: calc(100% - 20px);
  padding: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.movement-hover-detail.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.movement-hover-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 32px 28px;
  min-width: 0;
}
.movement-hover-metric {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 7px;
  min-height: 82px;
  padding: 0;
  text-align: center;
}
.movement-hover-label {
  color: var(--gold-deep);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.05;
  text-transform: uppercase;
  white-space: nowrap;
}
.movement-hover-value {
  color: var(--ink);
  font-family: "Barlow Semi Condensed", "IBM Plex Mono", "Noto Sans TC", sans-serif;
  font-size: 2.12rem;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}
.movement-hover-unit {
  margin-top: 0;
  color: var(--muted);
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1;
}
.movement-hover-spin {
  display: grid;
  justify-items: center;
  align-content: center;
  min-width: 0;
}
.pitch-spin-clock-frame {
  position: relative;
  width: 238px;
  height: 238px;
  display: grid;
  place-items: center;
}
.pitch-spin-clock {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
.pitch-spin-clock-band {
  fill: none;
  stroke: color-mix(in srgb, var(--muted) 22%, transparent);
  stroke-width: 7;
}
.pitch-spin-clock-hole {
  fill: none;
  stroke: color-mix(in srgb, var(--panel) 58%, transparent);
  stroke-width: 1;
}
.pitch-spin-clock-tick {
  stroke: color-mix(in srgb, var(--muted) 74%, transparent);
  stroke-width: 0.65;
  stroke-linecap: round;
}
.pitch-spin-clock-tick.major {
  stroke: color-mix(in srgb, var(--ink) 68%, transparent);
  stroke-width: 1.05;
}
.pitch-spin-clock text {
  fill: var(--muted);
  font-family: "Barlow Semi Condensed", "IBM Plex Mono", "Noto Sans TC", sans-serif;
  font-size: 7.2px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: middle;
}
.pitch-spin-clock-axis-marker {
  position: absolute;
  left: 50%;
  top: 7%;
  z-index: 4;
  width: 18px;
  height: 12px;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: 50% 50%;
  transition: opacity 0.1s ease;
}
.pitch-spin-clock-axis-marker::before,
.pitch-spin-clock-axis-marker::after {
  content: "";
  position: absolute;
  clip-path: polygon(50% 0, 100% 100%, 50% 72%, 0 100%);
}
.pitch-spin-clock-axis-marker::before {
  inset: 0;
  background: var(--ink);
  filter: none;
}
.pitch-spin-clock-axis-marker::after {
  display: none;
}
.pitch-spin-ball-canvas {
  width: 188px;
  height: 188px;
  display: block;
  position: relative;
  z-index: 1;
}
.pitch-spin-ball-canvas.is-unavailable {
  border-radius: 50%;
}
.pitch-spin-caption {
  width: 100%;
  margin: 23px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
}
/* --- 個人報告：自訂報告 / 影片 --- */
.athlete-assets-layout {
  display: grid;
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  min-height: 480px;
}
.athlete-assets-list {
  display: grid;
  align-content: start;
  gap: 16px;
  max-height: 680px;
  overflow: auto;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: var(--panel-2);
}
.athlete-assets-group {
  display: grid;
  gap: 8px;
}
.athlete-assets-group h3 {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}
.athlete-asset-item {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 10px 12px;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  user-select: none;
}
.athlete-asset-item:hover {
  border-color: var(--gold-deep);
  background: var(--gold-soft);
}
.athlete-assets-list .athlete-asset-item.active,
.athlete-assets-list .athlete-asset-item.active:hover,
.athlete-assets-list .athlete-asset-item.active:focus {
  border-color: #211712 !important;
  background: #211712 !important;
  color: var(--gold) !important;
  box-shadow: none;
}
.athlete-assets-list .athlete-asset-item.active .asset-item-meta {
  border-color: color-mix(in srgb, var(--gold) 78%, transparent) !important;
  color: var(--gold) !important;
}
.athlete-assets-list .athlete-asset-item[aria-selected="false"] {
  border-color: var(--line) !important;
  background: var(--panel) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}
.athlete-assets-list .athlete-asset-item[aria-selected="true"],
.athlete-assets-list .athlete-asset-item[aria-selected="true"]:hover,
.athlete-assets-list .athlete-asset-item[aria-selected="true"]:focus {
  border-color: #211712 !important;
  background: #211712 !important;
  color: var(--gold) !important;
  box-shadow: none !important;
}
.athlete-assets-list .athlete-asset-item[aria-selected="true"] .asset-item-meta {
  border-color: color-mix(in srgb, var(--gold) 78%, transparent) !important;
  color: var(--gold) !important;
}
.athlete-asset-item:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--gold) 42%, transparent);
  outline-offset: 2px;
}
.asset-item-title {
  min-width: 0;
  overflow: hidden;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-item-meta {
  border: 1px solid color-mix(in srgb, var(--line) 70%, var(--muted));
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}
.athlete-assets-preview {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  background: var(--panel);
}
.athlete-assets-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.athlete-assets-preview-head h3 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-download-link,
.asset-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gold);
  color: var(--on-gold);
  padding: 8px 13px;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}
.asset-download-link:hover,
.asset-download-button:hover {
  background: var(--gold-deep);
}
.athlete-assets-preview-body {
  display: grid;
  min-height: 420px;
  max-height: 72vh;
  overflow: auto;
  background: color-mix(in srgb, var(--panel-2) 70%, var(--panel));
}
.athlete-assets-preview-body video {
  display: block;
  width: 100%;
  max-height: 72vh;
  align-self: center;
  background: #000;
}
.athlete-assets-preview-body iframe {
  display: block;
  width: 100%;
  min-height: 520px;
  height: min(72vh, 760px);
  border: 0;
  background: var(--panel);
}
.athlete-assets-preview-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
  padding: 14px;
}
.asset-preview-fallback,
.asset-download-card {
  display: grid;
  place-self: center;
  justify-items: center;
  gap: 10px;
  width: min(360px, calc(100% - 32px));
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  padding: 22px;
  color: var(--muted);
  text-align: center;
}
.asset-preview-fallback[hidden] {
  display: none;
}
.asset-preview-fallback strong,
.asset-download-card strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
}

/* =========================================================================
   選手報告：Sticky 導覽列
   ========================================================================= */

.sticky-report-bar {
  /* Lives outside app-main → spans full viewport naturally */
  position: fixed;
  top: 64px;          /* 緊貼 app-header 底部 */
  left: 0;
  right: 0;
  z-index: 18;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(231, 204, 73, 0.22);
  /* Hide state */
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.sticky-report-bar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-bar-inner {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 42px);
  display: flex;
  align-items: stretch;
  gap: 0;
}
.sticky-player-name {
  font-weight: 700;
  color: var(--gold);
  font-size: 0.92rem;
  white-space: nowrap;
  padding: 0 18px 0 0;
  margin-right: 4px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
}
.sticky-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.sticky-tabs::-webkit-scrollbar { display: none; }

.sticky-tab {
  padding: 0 18px;
  height: 54px;
  color: #8a7c6d;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: transparent;
  position: relative;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.sticky-tab:hover { color: #ccc; }
.sticky-tab.active { color: var(--gold); }
.sticky-tab.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--gold);
  border-radius: 2px 2px 0 0;
}

/* =========================================================================
   選手報告：各測試區塊 section anchor
   ========================================================================= */
.test-section-anchor {
  /* 捲動補償：讓 sticky bar 不蓋住標題 */
  display: block;
  height: calc(64px + 54px + 12px);  /* header + sticky bar + margin */
  margin-top: calc(-1 * (64px + 54px + 12px));
  pointer-events: none;
  visibility: hidden;
}

.xsport-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2000;
  padding: 10px 16px;
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius-sm);
  background: var(--header-bg);
  color: var(--header-fg);
  box-shadow: var(--shadow);
  font-size: 0.85rem;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.xsport-toast.visible {
  opacity: 1;
}

@media (max-width: 760px) {
  .athlete-hero { padding: 32px 16px 28px; }
  .athlete-hero-inner { min-height: 0; }
  .athlete-hero-name { font-size: 2.2rem; }
  .athlete-hero-cards { gap: 8px; }
  .hero-radar-group {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    margin-top: 18px;
    justify-content: stretch;
    justify-items: stretch;
  }
  .hero-radar-panel { max-width: none; min-height: 0; }
  .hero-radar-chart { width: min(280px, 100%); }
  .hero-card { padding: 8px 12px; min-width: 80px; }
  .hero-card-val { font-size: 1.05rem; }
  .hero-test-tags { position: static; width: 100%; max-width: 100%; margin-top: 20px; overflow: visible; }
  .hero-test-chip-list { flex-wrap: wrap; justify-content: flex-start; }
  .hero-test-chip-list .test-chip { min-height: 42px; font-size: 0.86rem; }
  .test-section-head {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 10px;
  }
  .test-section-head .count {
    flex: 0 0 100%;
    display: block;
    width: 100%;
    min-width: 0;
    white-space: normal;
    line-height: 1.35;
  }
  .section-badge-group {
    flex-wrap: wrap;
  }
  .hit-summary-layout {
    grid-template-columns: 1fr;
    padding: 12px 14px;
  }
  .hit-summary-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hit-launch-speed-max {
    right: 5px;
    top: 5px;
  }
  .hit-launch-speed-max strong {
    font-size: 1.5rem;
  }
  .hit-launch-speed-plot {
    min-height: 282px;
    padding: 8px 24px 38px 42px;
  }
  .hit-launch-speed-field {
    height: 238px;
  }
  .hit-launch-speed-axis-title-y {
    left: 0;
    top: -16px;
  }
  .pitch-data-layout { grid-template-columns: 1fr; padding: 12px 14px; }
  .pitch-summary-wrap {
    overflow-x: auto;
  }
  .pitch-summary-table {
    min-width: 620px;
    table-layout: auto;
  }
  .pitch-summary-table thead {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    display: table-header-group;
  }
  .pitch-summary-table tbody {
    display: table-row-group;
  }
  .pitch-summary-table tbody tr {
    display: table-row;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .pitch-summary-table tbody tr:hover {
    background: var(--gold-soft);
  }
  .pitch-summary-table th,
  .pitch-summary-table td,
  .pitch-summary-table tbody td {
    display: table-cell;
    width: auto;
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }
  .pitch-summary-table tbody td::before {
    content: none;
  }
  .pitch-summary-table th:first-child,
  .pitch-summary-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 112px;
    min-width: 112px;
    max-width: 112px;
    background: var(--panel-2);
    box-shadow: 10px 0 14px color-mix(in srgb, var(--ink) 8%, transparent);
  }
  .pitch-summary-table thead th:first-child {
    z-index: 4;
  }
  .pitch-summary-table tbody td.metric-cell {
    padding-right: 14px;
    padding-bottom: 9px;
  }
  .pitch-summary-table .summary-value {
    font-size: 1.25rem;
  }
  .pitch-summary-table .pitch-type-pill {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 0.84rem;
  }
  .defense-trials-table {
    min-width: 0;
    table-layout: fixed;
  }
  .defense-trials-table thead {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    display: table-header-group;
  }
  .defense-trials-table tbody {
    display: table-row-group;
  }
  .defense-trials-table tbody tr {
    display: table-row;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .defense-trials-table th,
  .defense-trials-table td,
  .defense-trials-table tbody td {
    display: table-cell;
    width: auto;
    padding: 11px 8px;
    border-bottom: 1px solid var(--line);
    font-size: 1.28rem;
    line-height: 1.1;
    white-space: nowrap;
  }
  .defense-trials-table tbody td::before {
    content: none;
  }
  .defense-trials-table th:first-child,
  .defense-trials-table td:first-child {
    width: 38px;
  }
  .leaderboard-wrap,
  .trial-table-wrap,
  .report-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .leaderboard-table {
    min-width: 1180px;
    table-layout: auto;
  }
  #overview-pitchers-table {
    min-width: 1450px;
  }
  .trial-table-wrap > table {
    min-width: 760px;
    table-layout: auto;
  }
  .trial-table-wrap > table[data-video-context^="athlete-hit-"] {
    min-width: 1040px;
  }
  .report-table-wrap > table[data-video-context^="trackman-hit-"] {
    min-width: 1120px;
  }
  .report-table-wrap > table[data-video-context^="trackman-pitch-"] {
    min-width: 980px;
  }
  .leaderboard-table thead,
  .trial-table-wrap > table thead,
  .report-table-wrap > table thead {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    display: table-header-group;
  }
  .leaderboard-table tbody,
  .trial-table-wrap > table tbody,
  .report-table-wrap > table tbody {
    display: table-row-group;
    width: auto;
  }
  .leaderboard-table tbody tr,
  .trial-table-wrap > table tbody tr,
  .report-table-wrap > table tbody tr {
    display: table-row;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  .leaderboard-table th,
  .leaderboard-table td,
  .leaderboard-table tbody td,
  .trial-table-wrap > table th,
  .trial-table-wrap > table td,
  .trial-table-wrap > table tbody td,
  .report-table-wrap > table th,
  .report-table-wrap > table td,
  .report-table-wrap > table tbody td {
    display: table-cell;
    width: auto;
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
  }
  .leaderboard-table tbody td::before,
  .trial-table-wrap > table tbody td::before,
  .report-table-wrap > table tbody td::before {
    content: none;
  }
  .leaderboard-table th:first-child,
  .leaderboard-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    background: var(--panel);
    box-shadow: 10px 0 14px color-mix(in srgb, var(--ink) 8%, transparent);
  }
  .leaderboard-table thead th:first-child {
    z-index: 4;
    background: var(--panel-2);
  }
  .leaderboard-table .leaderboard-athlete {
    gap: 8px;
  }
  .leaderboard-table .athlete-avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 0.84rem;
  }
  .leaderboard-table .leaderboard-name strong,
  .leaderboard-table .leaderboard-name small {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .trial-table-wrap > table th:first-child,
  .trial-table-wrap > table td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    background: var(--panel);
    box-shadow: 8px 0 12px color-mix(in srgb, var(--ink) 7%, transparent);
  }
  .trial-table-wrap > table thead th:first-child {
    z-index: 4;
    background: var(--panel-2);
  }
  .report-table-wrap > table th:first-child,
  .report-table-wrap > table td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 128px;
    min-width: 128px;
    max-width: 128px;
    background: var(--panel);
    box-shadow: 8px 0 12px color-mix(in srgb, var(--ink) 7%, transparent);
  }
  .report-table-wrap > table thead th:first-child {
    z-index: 4;
    background: var(--panel-2);
  }
  .fitness-arm-panel .fitness-metric-value {
    font-size: 2.16rem;
  }
  .movement-chart { height: auto; width: min(calc(100% - 28px), 420px); }
  .movement-hover-detail { display: none !important; }
  .athlete-assets-layout { grid-template-columns: 1fr; min-height: 0; }
  .athlete-assets-list {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .athlete-assets-preview-body {
    min-height: 320px;
    max-height: none;
  }
  .athlete-assets-preview-body iframe {
    min-height: 420px;
    height: 62vh;
  }
  .athlete-assets-preview-body video {
    max-height: 62vh;
  }
  .tab-btn { padding: 11px 16px; font-size: 0.9rem; }
  .sticky-tab { padding: 0 13px; font-size: 0.82rem; }
  .sticky-player-name { font-size: 0.82rem; padding-right: 12px; }
  .xsport-toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    text-align: center;
  }
  .vc-modal {
    padding: 0;
  }
  .vc-dialog {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
  .vc-head {
    align-items: flex-start;
  }
  .vc-stage:not(.is-overlay) {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  .vc-crop-controls {
    grid-template-columns: 1fr;
    max-width: 260px;
  }
  .vc-timeline.is-expanded {
    grid-template-rows: auto 226px;
  }
  .vc-toolbar {
    justify-content: flex-start;
  }
  .vc-nudge-group {
    width: 100%;
  }
  .vc-nudge-group button {
    flex: 1 1 130px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ranking-row,
  .ranking-row.is-new,
  .ranking-row.is-exiting-to-bottom,
  .ranking-row.is-rank-ticking .rank-num b,
  .ranking-row.is-hero-revealing,
  .ranking-row.is-hero-revealing::after,
  .ranking-row.is-hero-sweeping,
  .ranking-row.is-hero-sweeping .ranking-hero-sweep-layer::before,
  .ranking-row.is-hero-sweeping .ranking-hero-sweep-layer::after,
  .ranking-row.is-settled-update,
  .live-ranking-list-body.is-fields-sweeping .ranking-row > [role="cell"]::after,
  .live-ranking-card.is-card-entering,
  .live-ranking-card.is-card-exiting,
  .ranking-row-trail,
  .value-changed,
  .icon-action.is-loading svg {
    animation: none !important;
  }
  .rankings-page-track,
  .rankings-page-window,
  .live-ranking-card,
  .ranking-row,
  .ranking-row-trail,
  .rankings-page-dot > span:first-child {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================================================================
   四分割同步播放（quad.html / quad_player.js）
   =========================================================================== */
.quad-wrap { display: flex; flex-direction: column; gap: 14px; }

.quad-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 12px 16px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.quad-btn {
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer;
  font-weight: 700; font-size: 14px; white-space: nowrap;
}
.quad-btn:hover { border-color: var(--gold-deep); }
.quad-btn-primary { background: var(--gold); color: var(--on-gold); border-color: var(--gold); }
.quad-seek { flex: 1 1 220px; min-width: 160px; accent-color: var(--gold-deep); }
.quad-time { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.quad-time b { color: var(--ink); }
.quad-rate { display: inline-flex; gap: 4px; }
.quad-rate-btn {
  border: 1px solid var(--line); background: var(--bg); color: var(--muted);
  padding: 6px 10px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 700; font-size: 13px;
}
.quad-rate-btn.active { background: var(--gold-soft); color: var(--on-gold); border-color: var(--gold-deep); }

.quad-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.quad-cell {
  position: relative; aspect-ratio: 16 / 9; background: #000;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.quad-video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.quad-cell-label {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(0, 0, 0, 0.6); color: #fff; letter-spacing: .04em;
}
.quad-cell-status {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  z-index: 1; color: #cfc7b8; font-size: 14px; font-weight: 600; pointer-events: none;
}

@media (max-width: 720px) {
  .quad-grid { grid-template-columns: 1fr; }
}

.quad-empty {
  padding: 48px 24px; margin: 0; text-align: center; color: var(--muted);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}

/* 下載區間 modal */
.trim-modal {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.6); padding: 16px;
}
.trim-modal[hidden] { display: none; }
.trim-dialog {
  width: min(720px, 100%); max-height: 92vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
}
.trim-head { display: flex; align-items: center; justify-content: space-between; }
.trim-video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-sm); display: block; }
.trim-range { position: relative; height: 34px; }
.trim-range input[type="range"] {
  position: absolute; left: 0; top: 0; width: 100%; margin: 0; background: none; pointer-events: none;
  -webkit-appearance: none; appearance: none; accent-color: var(--gold-deep);
}
.trim-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto;
  width: 18px; height: 18px; border-radius: 50%; background: var(--gold); border: 2px solid var(--gold-deep); cursor: pointer;
}
.trim-range input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 18px; height: 18px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--gold-deep); cursor: pointer;
}
.trim-info { color: var(--muted); font-size: 14px; }
.trim-info b { color: var(--ink); font-variant-numeric: tabular-nums; }
.trim-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); cursor: pointer; }
.trim-check input { accent-color: var(--gold-deep); width: 16px; height: 16px; }
.trim-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.trim-status { margin: 0; font-size: 14px; color: var(--muted); }
.trim-status[hidden] { display: none; }
