/* =========================================================================
   tigers-magic.css — 阪神 優勝マジック カウントダウン 常設ページ専用
   -------------------------------------------------------------------------
   スコープ:
     すべてのセレクタを .tmg- 接頭辞で閉じ、既存ページには一切影響させない。
     色は tb-page-unify.css の --tb-* トークンを再利用し、ダークは
     html[data-theme="dark"] を読むだけ（専用の切替スクリプトは不要）。

   タイポグラフィ（CLAUDE.md §3.1）:
     大きな数字・カード見出し → Zen Old Mincho
     本文 → 16px
   ========================================================================= */

.tmg {
  --tmg-gold:      #b8860b;
  --tmg-gold-lit:  #f1b81d;
  --tmg-ink:       #1c1a17;
  --tmg-text:      #3a342d;
  --tmg-mute:      #5c5550;
  --tmg-line:      #e3dccf;
  --tmg-surface:   #fffdf7;
  --tmg-surface-2: #f7f3ea;
  --tmg-ok:        #2f6b40;
  --tmg-warn:      #9c4634;
  --tmg-cool:      #46718c;

  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px 64px;
  color: var(--tmg-text);
  font-size: 16px;
  line-height: 1.8;
}

html[data-theme="dark"] .tmg {
  --tmg-gold:      #d8a52a;
  --tmg-gold-lit:  #ffd24a;
  --tmg-ink:       #e9e2d2;
  --tmg-text:      #d8dfef;
  --tmg-mute:      #a0998a;
  --tmg-line:      #33302a;
  --tmg-surface:   #17150f;
  --tmg-surface-2: #1f1c13;
  --tmg-ok:        #6fbf85;
  --tmg-warn:      #e08a76;
  --tmg-cool:      #86b4d0;
}

/* ---------------------------------------------------------------- 共通部品 */

.tmg-section {
  margin: 40px 0 0;
}

.tmg-section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-bottom: 2px solid var(--tmg-ink);
  padding-bottom: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tmg-section-num {
  font-family: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--tmg-gold);
}

.tmg-section-title {
  font-family: "Zen Old Mincho", serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--tmg-ink);
  line-height: 1.4;
}

.tmg-note {
  font-size: 13px;
  color: var(--tmg-mute);
  line-height: 1.7;
  margin: 10px 0 0;
}

/* ------------------------------------------------------------- ヒーロー部 */

.tmg-hero {
  background: var(--tmg-surface);
  border: 1px solid var(--tmg-line);
  border-top: 4px solid var(--tmg-gold);
  padding: 28px 24px;
  margin-top: 24px;
  text-align: center;
}

.tmg-hero-label {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 12px;
  letter-spacing: .18em;
  font-weight: 700;
  color: var(--tmg-gold);
  margin: 0 0 4px;
}

.tmg-hero-sub {
  font-size: 14px;
  color: var(--tmg-mute);
  margin: 0 0 14px;
}

.tmg-magic-number {
  font-family: "Zen Old Mincho", serif;
  font-size: clamp(76px, 22vw, 148px);
  font-weight: 700;
  line-height: 1;
  color: var(--tmg-gold-lit);
  letter-spacing: -.02em;
  display: block;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .06);
}

.tmg-magic-unit {
  font-family: "Zen Old Mincho", serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--tmg-ink);
  display: block;
  margin-top: 4px;
}

.tmg-magic-target {
  font-size: 15px;
  color: var(--tmg-text);
  margin: 12px 0 0;
}

.tmg-magic-target strong {
  font-weight: 800;
  color: var(--tmg-ink);
}

.tmg-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.tmg-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border: 1px solid var(--tmg-line);
  background: var(--tmg-surface-2);
  color: var(--tmg-text);
  border-radius: 999px;
  line-height: 1.5;
}

.tmg-badge--ok     { color: var(--tmg-ok);   border-color: currentColor; }
.tmg-badge--warn   { color: var(--tmg-warn); border-color: currentColor; }
.tmg-badge--gold   { color: var(--tmg-gold); border-color: currentColor; }

.tmg-asof {
  font-family: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--tmg-mute);
  margin: 14px 0 0;
}

/* 未点灯・優勝決定などの状態表示 */
.tmg-state-msg {
  font-family: "Zen Old Mincho", serif;
  font-size: clamp(26px, 7vw, 40px);
  font-weight: 700;
  color: var(--tmg-ink);
  line-height: 1.4;
  margin: 8px 0;
}

/* ------------------------------------------------------------- 注記バナー */

.tmg-alert {
  border-left: 4px solid var(--tmg-warn);
  background: var(--tmg-surface-2);
  padding: 12px 16px;
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--tmg-text);
}

.tmg-alert strong { color: var(--tmg-warn); }

/* ------------------------------------------------------------ 消化条件表 */

.tmg-cond-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tmg-cond {
  border: 1px solid var(--tmg-line);
  background: var(--tmg-surface);
  padding: 16px;
}

.tmg-cond-effect {
  font-family: "Zen Old Mincho", serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 2px;
}

.tmg-cond--down .tmg-cond-effect { color: var(--tmg-gold); }
.tmg-cond--flat .tmg-cond-effect { color: var(--tmg-mute); }

.tmg-cond-label {
  font-weight: 800;
  color: var(--tmg-ink);
  font-size: 15px;
  margin-bottom: 4px;
}

.tmg-cond-detail {
  font-size: 13px;
  color: var(--tmg-mute);
  line-height: 1.7;
}

.tmg-formula {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--tmg-surface-2);
  border: 1px dashed var(--tmg-line);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 13px;
  line-height: 1.9;
  color: var(--tmg-text);
  overflow-x: auto;
}

/* --------------------------------------------------------------- Xデー予測 */

.tmg-xday-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tmg-xday {
  border: 1px solid var(--tmg-line);
  background: var(--tmg-surface);
  padding: 18px 16px;
  text-align: center;
}

.tmg-xday--pace { border-top: 3px solid var(--tmg-gold); }

.tmg-xday-kind {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--tmg-gold);
  margin-bottom: 6px;
}

.tmg-xday-date {
  font-family: "Zen Old Mincho", serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--tmg-ink);
}

.tmg-xday-date small {
  display: block;
  font-family: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 500;
  color: var(--tmg-mute);
  margin-top: 4px;
}

.tmg-xday-assume {
  font-size: 12px;
  color: var(--tmg-mute);
  line-height: 1.7;
  margin-top: 10px;
  text-align: left;
}

/* --------------------------------------------------------------- 推移ログ */

.tmg-chart-wrap {
  border: 1px solid var(--tmg-line);
  background: var(--tmg-surface);
  padding: 18px 16px 12px;
  overflow-x: auto;
}

.tmg-chart {
  display: block;
  width: 100%;
  min-width: 320px;
  height: auto;
}

.tmg-chart-line   { fill: none; stroke: var(--tmg-cool); stroke-width: 2; }
.tmg-chart-line--lit { stroke: var(--tmg-gold-lit); stroke-width: 3; }
.tmg-chart-axis   { stroke: var(--tmg-line); stroke-width: 1; }
.tmg-chart-label  { fill: var(--tmg-mute); font-size: 10px; font-family: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; font-variant-numeric: tabular-nums; }
.tmg-chart-dot    { fill: var(--tmg-gold-lit); }
.tmg-chart-marker { stroke: var(--tmg-gold); stroke-width: 1; stroke-dasharray: 3 3; }

.tmg-tablewrap {
  overflow-x: auto;
  border: 1px solid var(--tmg-line);
  background: var(--tmg-surface);
  margin-top: 14px;
}

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

.tmg-table th,
.tmg-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--tmg-line);
  text-align: left;
  white-space: nowrap;
}

.tmg-table thead th {
  background: var(--tmg-surface-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--tmg-mute);
}

.tmg-table td.tmg-num {
  font-family: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--tmg-ink);
}

.tmg-table tr.tmg-row--event td { background: rgba(241, 184, 29, .12); }

.tmg-delta-down { color: var(--tmg-gold); font-weight: 700; }
.tmg-delta-flat { color: var(--tmg-mute); }

.tmg-event-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tmg-gold);
  color: #1a1408;
}

.tmg-prelit-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--tmg-line);
  color: var(--tmg-mute);
}

/* --------------------------------------------------------- ライバル状況 */

.tmg-rival-selfpower--alive { color: var(--tmg-warn); font-weight: 700; }
.tmg-rival-selfpower--dead  { color: var(--tmg-mute); }
.tmg-row--target td { background: rgba(241, 184, 29, .10); }
.tmg-row--tigers td { font-weight: 700; color: var(--tmg-ink); }

/* ------------------------------------------------------------- 検証カード */

.tmg-verify {
  border: 1px solid var(--tmg-line);
  background: var(--tmg-surface);
  padding: 18px 20px;
}

.tmg-verify-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--tmg-line);
  flex-wrap: wrap;
}

.tmg-verify-row:last-child { border-bottom: 0; }

.tmg-verify-key {
  flex: 0 0 156px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tmg-mute);
}

.tmg-verify-val {
  flex: 1 1 240px;
  font-size: 14px;
  color: var(--tmg-text);
  line-height: 1.7;
  word-break: break-word;
}

.tmg-sources {
  margin: 12px 0 0;
  padding-left: 1.2em;
  font-size: 13px;
  color: var(--tmg-mute);
  line-height: 1.9;
}

.tmg-sources a { color: var(--tmg-cool); }

/* --------------------------------------------------------------- 次の試合 */

.tmg-next-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tmg-next-item {
  border: 1px solid var(--tmg-line);
  background: var(--tmg-surface);
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.6;
}

.tmg-next-date {
  display: block;
  font-family: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif; font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--tmg-mute);
}

.tmg-next-opp { font-weight: 700; color: var(--tmg-ink); }

/* ---------------------------------------------------------------- 読込中 */

.tmg-loading,
.tmg-error {
  border: 1px solid var(--tmg-line);
  background: var(--tmg-surface);
  padding: 32px 20px;
  text-align: center;
  color: var(--tmg-mute);
  font-size: 14px;
  margin-top: 24px;
}

.tmg-error a { color: var(--tmg-cool); }

/* =========================================================================
   TMG-RACE — トップページ「優勝レース帯」（ヒーロー直下 / サイト唯一の反転ブロック）
   -------------------------------------------------------------------------
   全面ゴールド地 × 黒文字。サイト全体は「紙／墨」基調なので、ここだけが反転する。
   反転を1箇所に限定することで、優勝レースの節目感を出す。

   ⚠ ライト／ダークで色を切り替えない。この帯は「常に金地に黒」であることが
     デザイン上の意味を持つため、テーマに追従させると狙いが崩れる。
     周囲との境目だけ、ダーク時に締める。

   3分割:
     左   .tmg-race__magic … M数字（特大 Zen Old Mincho）＋ 今日の消化条件
     中央 .tmg-race__card  … 今朝のデータカード画像
     右   .tmg-race__x     … 毎朝8時Xで配信中 ＋ フォローボタン

   M が一桁になったら .tmg-race--final が付き、帯ごと拡大する（演出）。
   ========================================================================= */

.tmg-race {
  --tmgr-gold-1: #f7d98a;
  --tmgr-gold-2: #d9a62e;
  --tmgr-gold-3: #c08f1c;
  --tmgr-ink:    #14120c;
  --tmgr-ink-2:  #3d3520;
  --tmgr-line:   rgba(20, 18, 12, .22);

  position: relative;
  padding: 34px 28px;
  background:
    radial-gradient(1200px 380px at 12% -30%, rgba(255, 255, 255, .55), transparent 62%),
    linear-gradient(135deg, var(--tmgr-gold-1) 0%, var(--tmgr-gold-2) 52%, var(--tmgr-gold-3) 100%);
  color: var(--tmgr-ink);
  border-top: 3px solid var(--tmgr-ink);
  border-bottom: 3px solid var(--tmgr-ink);
  transition: padding .2s ease;
}

html[data-theme="dark"] .tmg-race {
  border-top-color: rgba(20, 18, 12, .55);
  border-bottom-color: rgba(20, 18, 12, .55);
}

.tmg-race[hidden] { display: none; }

.tmg-race__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  /* 2026-09-18: 中央が2枚（佐藤カード｜優勝条件カード）になったので中央を広くとる */
  grid-template-columns: minmax(230px, 0.8fr) minmax(400px, 2fr) minmax(200px, 0.7fr);
  gap: 28px;
  align-items: center;
}

/* ---------------------------------------------------------------- 左: M数字 */

.tmg-race__kicker {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--tmgr-ink-2);
  margin-bottom: 2px;
}

.tmg-race__m {
  font-family: "Zen Old Mincho", serif;
  font-weight: 700;
  font-size: 108px;
  line-height: .92;
  letter-spacing: .01em;
  color: var(--tmgr-ink);
  display: flex;
  align-items: baseline;
  gap: 10px;
  transition: font-size .2s ease;
}

.tmg-race__m span {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .04em;
}

/* 未点灯・優勝決定など、数字を出さない状態 */
.tmg-race__state {
  font-family: "Zen Old Mincho", serif;
  font-weight: 700;
  font-size: 34px;
  line-height: 1.25;
  color: var(--tmgr-ink);
}

.tmg-race__conds {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tmg-race__cond {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 5px 11px;
  border: 1.5px solid var(--tmgr-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .34);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.tmg-race__cond b {
  font-family: "Zen Old Mincho", serif;
  font-size: 17px;
  font-weight: 700;
}

.tmg-race__meta {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--tmgr-ink-2);
}

/* -------------------------------------------------------------- 中央: カード */

.tmg-race__card {
  display: block;
  border: 3px solid var(--tmgr-ink);
  background: #0f0e0b;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 6px 0 rgba(20, 18, 12, .18);
}

a.tmg-race__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 rgba(20, 18, 12, .22);
}

.tmg-race__card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 675;
}

.tmg-race__cardcap {
  padding: 7px 12px;
  background: var(--tmgr-ink);
  color: #f0c96a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.tmg-race__cardcap em { font-style: normal; color: #b3ab97; }

/* ---------------------------------------------------------------- 右: X導線 */

.tmg-race__x {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.tmg-race__xhead {
  font-family: "Zen Old Mincho", serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.4;
  color: var(--tmgr-ink);
}

.tmg-race__xhead small {
  display: block;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--tmgr-ink-2);
  margin-top: 4px;
  letter-spacing: .02em;
}

a.tmg-race__follow,
.tmg-race__follow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  background: var(--tmgr-ink);
  color: #fdfbf3;
  border: 2px solid var(--tmgr-ink);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: .02em;
  transition: background .12s ease, color .12s ease;
}

.tmg-race__follow svg { width: 16px; height: 16px; fill: currentColor; flex: 0 0 auto; }

a.tmg-race__follow:hover { background: #fdfbf3; color: var(--tmgr-ink); }

a.tmg-race__more,
.tmg-race__more {
  font-size: 13px;
  font-weight: 700;
  color: var(--tmgr-ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------------------- Mが一桁になったら帯ごと拡大する */

.tmg-race--final {
  padding: 52px 28px;
  background:
    radial-gradient(1200px 420px at 12% -30%, rgba(255, 255, 255, .68), transparent 62%),
    linear-gradient(135deg, #ffe9a8 0%, #e8b52f 52%, #c9941f 100%);
  border-top-width: 5px;
  border-bottom-width: 5px;
}

.tmg-race--final .tmg-race__m { font-size: 168px; }
.tmg-race--final .tmg-race__m span { font-size: 32px; }
.tmg-race--final .tmg-race__kicker { font-size: 13px; letter-spacing: .3em; }
.tmg-race--final .tmg-race__xhead { font-size: 27px; }

/* ------------------------------------------------------------ レスポンシブ */

@media (max-width: 1080px) {
  .tmg-race__inner { grid-template-columns: 1fr 1fr; }
  .tmg-race__x { grid-column: 1 / -1; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 16px; }
  .tmg-race__xhead { flex: 1 1 240px; }
}

@media (max-width: 700px) {
  .tmg-race { padding: 26px 16px; }
  .tmg-race__inner { grid-template-columns: 1fr; gap: 20px; }
  .tmg-race__m { font-size: 84px; }
  .tmg-race__m span { font-size: 22px; }
  .tmg-race__xhead { font-size: 21px; }
  .tmg-race--final { padding: 34px 16px; }
  .tmg-race--final .tmg-race__m { font-size: 116px; }
  .tmg-race--final .tmg-race__xhead { font-size: 23px; }
}

@media (prefers-reduced-motion: reduce) {
  .tmg-race, .tmg-race__m, .tmg-race__card { transition: none; }
}

/* ------------------------------------------------------------ レスポンシブ */

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

@media (max-width: 560px) {
  .tmg { padding: 0 12px 48px; font-size: 16px; }
  .tmg-cond-grid { grid-template-columns: 1fr; }
  .tmg-hero { padding: 22px 16px; }
  .tmg-section-title { font-size: 19px; }
  .tmg-verify-key { flex-basis: 100%; }
}

/* =========================================================================
   TMG-X — Xの埋め込みタイムライン（/tigers-magic/ の 08 / X）
   -------------------------------------------------------------------------
   widgets.js は画面に入ってから読む（assets/js/x-timeline.js）。
   読み込めなかった場合はフォールバック（フォロー導線）がそのまま残る設計なので、
   フォールバックは最初から描いておき、成功したときだけ畳む。
   ========================================================================= */

.tmg-x {
  margin-top: 18px;
  min-height: 220px;
  border: 1px solid var(--tmg-line, #e3dccf);
  border-radius: 10px;
  background: #15181c;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 埋め込みが出たら、余計な枠を主張させない */
.tmg-x[data-state="loaded"] { padding: 8px; min-height: 0; }

.tmg-x iframe { max-width: 100% !important; }

.tmg-x-fallback {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 4px 6px;
}

.tmg-x-fallback[hidden] { display: none; }

.tmg-x-msg {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #b7c0cc;
}

a.tmg-x-follow,
.tmg-x-follow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 999px;
  background: #f4f6f8;
  color: #14120c;
  border: 2px solid #f4f6f8;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: .02em;
  transition: background .12s ease, color .12s ease;
}

.tmg-x-follow svg { width: 16px; height: 16px; fill: currentColor; flex: 0 0 auto; }

a.tmg-x-follow:hover { background: transparent; color: #f4f6f8; }

@media (max-width: 560px) {
  .tmg-x { padding: 10px; }
  .tmg-x-fallback { padding: 12px 2px 4px; }
}

/* =========================================================================
   優勝条件早見表（2026-09-18 追加）
   - トップの帯: 中央を「佐藤カード｜優勝条件カード」の2枚横並びにする（同じ 1200x675）。
     1080px以下は 1列（マジック → 2枚 → フォロー）、700px以下は2枚も縦に積む
     （マジック → 佐藤 → 優勝条件 → フォロー の順）。
   - /tigers-magic/: 02 / CLINCH セクション（同じ画像 ＋ HTMLの表）。
     数字は data/magic-countdown.json の clinchTable だけから描く。
   ========================================================================= */

.tmg-race__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.tmg-race__cards--1 { grid-template-columns: 1fr; max-width: 520px; }

@media (max-width: 1080px) {
  .tmg-race__inner { grid-template-columns: 1fr; }
  .tmg-race__x { grid-column: auto; }
}

@media (max-width: 700px) {
  .tmg-race__cards { grid-template-columns: 1fr; gap: 16px; }
}

.tmg-clinch-fig { margin: 0 0 18px; }

.tmg-clinch-fig img {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  aspect-ratio: 1200 / 675;
  background: #0f0e0b;
  border: 2px solid rgba(20, 18, 12, .55);
}

.tmg-clinch-fig figcaption { font-size: 12px; color: var(--tmg-mute); margin-top: 6px; }

.tmg-clinch-head { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.tmg-clinch-table th[scope="row"] {
  font-family: "Zen Old Mincho", serif;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

.tmg-clinch-table td small { display: block; font-size: 12px; color: var(--tmg-mute); margin-top: 2px; }
.tmg-clinch-table td strong { font-family: "Zen Old Mincho", serif; font-size: 1.15em; font-weight: 700; }
.tmg-clinch-row--clinch td, .tmg-clinch-row--infeasible td { color: var(--tmg-mute); }
.tmg-clinch--clinch { color: #b8860b; }
html[data-theme="dark"] .tmg-clinch--clinch { color: #f0c96a; }
.tmg-clinch--none { color: var(--tmg-mute); }
.tmg-clinch-elim { margin-top: 10px; font-weight: 700; font-size: 14px; }
.tmg-clinch-done { font-size: 15px; }

/* ------------------------------------------------- 優勝モード（2026-10-03）
   data/magic-countdown.json の status === "clinched" のときだけ .tmg-race--champion が付く。
   数字（1）が V に変わる短い演出と金の紙吹雪は最初の数秒だけ（.tmg-race--celebrate）。
   prefers-reduced-motion では動かさず、最初から V を出す。 */

.tmg-race--champion { overflow: hidden; }

/* 優勝モードは左（V と決定日の行）を広くとる */
.tmg-race--champion .tmg-race__inner {
  grid-template-columns: minmax(340px, 1.15fr) minmax(400px, 1.8fr) minmax(200px, 0.7fr);
}

.tmg-champ {
  display: flex;
  align-items: center;
  gap: 18px;
}

.tmg-champ__mark {
  position: relative;
  font-family: "Zen Old Mincho", serif;
  font-weight: 700;
  font-size: 168px;
  line-height: .92;
  color: var(--tmgr-ink);
  min-width: .72em;
}

.tmg-champ__from,
.tmg-champ__v { display: block; }

.tmg-champ__from {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.tmg-champ__title {
  white-space: nowrap;
  font-family: "Zen Old Mincho", serif;
  font-weight: 700;
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: .04em;
}

.tmg-champ__sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.tmg-champ__rows {
  margin: 14px 0 0;
  display: grid;
  gap: 4px;
  font-size: 14px;
  line-height: 1.6;
}

.tmg-champ__rows div { display: flex; gap: 10px; }

.tmg-champ__rows dt {
  flex: 0 0 4.5em;
  font-weight: 700;
  color: var(--tmgr-ink-2);
}

.tmg-champ__rows dd {
  margin: 0;
  font-weight: 700;
  color: var(--tmgr-ink);
  font-variant-numeric: tabular-nums;
  min-width: 0;
  overflow-wrap: anywhere;
}

.tmg-champ__links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

a.tmg-champ__link {
  font-size: 13px;
  font-weight: 700;
  color: var(--tmgr-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a.tmg-champ__link:hover { color: #000; }

/* 1 → V（最初の1回だけ） */
.tmg-race--celebrate .tmg-champ__from { animation: tmg-champ-out .55s ease-in .35s both; }
.tmg-race--celebrate .tmg-champ__v    { animation: tmg-champ-in .6s cubic-bezier(.2, 1.4, .4, 1) .8s both; }

@keyframes tmg-champ-out {
  0%   { opacity: 1; transform: rotateX(0); }
  100% { opacity: 0; transform: rotateX(90deg); }
}

@keyframes tmg-champ-in {
  0%   { opacity: 0; transform: scale(.4) rotate(-8deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* 金の紙吹雪 */
.tmg-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.tmg-confetti i {
  position: absolute;
  top: -16px;
  width: 9px;
  height: 14px;
  border-radius: 1px;
  opacity: 0;
  animation-name: tmg-confetti-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes tmg-confetti-fall {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0); }
  85%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tmg-drift, 0), 480px) rotate(var(--tmg-spin, 540deg)); }
}

@media (max-width: 1080px) {
  .tmg-race--champion .tmg-race__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .tmg-race--champion .tmg-race__inner { grid-template-columns: 1fr; }
  .tmg-champ__mark { font-size: 116px; }
  .tmg-champ__title { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .tmg-race--celebrate .tmg-champ__from,
  .tmg-race--celebrate .tmg-champ__v { animation: none; }
  .tmg-confetti { display: none; }
}

/* ------------------------------------------------- 優勝特集ハブへの導線（2026-10-04）
   /tigers-magic/ のヒーロー直下。status === "clinched" かつ clinched_article_url があるときだけ出る。
   黒×金で固定（テーマに追従させない）。カード全体がリンク。 */

a.tmg-hub-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "kicker btn" "title btn" "sub btn";
  align-items: center;
  column-gap: 24px;
  row-gap: 6px;
  margin: 20px 0 0;
  padding: 28px 28px;
  background: #0f0e0c;
  color: #ffffff;
  text-decoration: none;
  border: 2px solid #f1b81d;
  border-bottom-width: 5px;
  transition: background .12s ease;
}
a.tmg-hub-card:hover { background: #1c1a17; }
.tmg-hub-card__kicker { grid-area: kicker; font-size: 11px; font-weight: 700; letter-spacing: .22em; color: #f1b81d; }
.tmg-hub-card__title {
  grid-area: title;
  font-family: "Zen Old Mincho", serif;
  font-size: 30px; font-weight: 700; line-height: 1.25; color: #ffffff;
}
.tmg-hub-card__sub { grid-area: sub; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .88); }
.tmg-hub-card__btn {
  grid-area: btn;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  background: #f1b81d; color: #1a1408;
  font-size: 15px; font-weight: 700; letter-spacing: .04em; white-space: nowrap;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35);
}
.tmg-hub-card__btn i { font-style: normal; font-size: 18px; line-height: 1; }

@media (max-width: 700px) {
  a.tmg-hub-card { grid-template-columns: 1fr; grid-template-areas: "kicker" "title" "sub" "btn"; padding: 22px 16px; }
  .tmg-hub-card__title { font-size: 24px; }
  .tmg-hub-card__btn { justify-content: center; margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) { a.tmg-hub-card { transition: none; } }
