@font-face {
  font-family: "Hermes Newspaper Serif";
  src: url("/static/fonts/hermes-newspaper-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Hermes Newspaper Sans";
  src: url("/static/fonts/hermes-newspaper-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Hermes Newspaper Numbers";
  src: url("/static/fonts/hermes-newspaper-numbers.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
html[data-site-theme] {
  color-scheme: dark;
  --cis-navy-base: #050D17;
  --cis-navy-card: #0B1B2B;
  --cis-navy-raised: #10263B;
  --cis-navy-line: #385069;
  --cis-gold: #D4A900;
  --cis-gold-hover: #F0CD55;
  --cis-red: #A02B21;
  --cis-text: #F5F7FA;
  --cis-muted: #B6C2CF;
  --cis-light-bg: #E7ECEF;
  --cis-light-card: #F7F4EC;
  --cis-light-text: #10263D;
  --cis-light-gold-text: #8A6500;
  --font-display: "Hermes Newspaper Serif", "Noto Serif TC", "PMingLiU", Georgia, serif;
  --font-body: "Hermes Newspaper Sans", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  --font-num: "Hermes Newspaper Numbers", "Arial Narrow", Arial, sans-serif;
  --font: var(--font-body);
  --display: var(--font-display);
  --bg: var(--cis-navy-base);
  --bg-2: var(--cis-navy-base);
  --panel: var(--cis-navy-card);
  --panel-2: var(--cis-navy-raised);
  --line: var(--cis-navy-line);
  --text: var(--cis-text);
  --muted: var(--cis-muted);
  --gold: var(--cis-gold);
  --gold-2: var(--cis-gold);
  --gold-hover: var(--cis-gold-hover);
  --gold-ink: var(--cis-navy-base);
  --logo-mark: var(--cis-gold);
  --red: var(--cis-red);
  --red-ink: var(--cis-text);
  --win: var(--cis-red);
  --loss: var(--cis-red);
  --draw: var(--cis-muted);
  /* CIS 4.3: result colours are independent of the red LIVE status. */
  --result-win: #35D08A;
  --result-loss: var(--cis-red);
  --result-draw: var(--cis-muted);
  --result-win-ink: var(--cis-navy-base);
  --result-loss-ink: var(--cis-text);
  --result-draw-ink: var(--cis-navy-base);
  --live-tint: var(--cis-navy-raised);
  --fallback-bg: var(--cis-navy-card);
  --fallback-text: var(--cis-gold);
  --radius: 10px;
}
html[lang="ja"][data-site-theme] {
  --font-display: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --font-body: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  --font: var(--font-body);
  --display: var(--font-display);
}
html[data-site-theme][data-theme="light"] {
  color-scheme: light;
  --bg: var(--cis-light-bg);
  --bg-2: var(--cis-light-bg);
  --panel: var(--cis-light-card);
  --panel-2: var(--cis-light-bg);
  --line: var(--cis-navy-line);
  --text: var(--cis-light-text);
  --muted: var(--cis-navy-line);
  --gold: var(--cis-gold);
  --gold-2: var(--cis-light-gold-text);
  --gold-hover: var(--cis-gold);
  --gold-ink: var(--cis-light-text);
  --logo-mark: var(--cis-light-gold-text);
  --red: var(--cis-red);
  --red-ink: var(--cis-text);
  --win: var(--cis-red);
  --loss: var(--cis-red);
  --draw: var(--cis-navy-line);
  --result-win: #18794E;
  --result-loss: var(--cis-red);
  --result-draw: #5F6B76;
  --result-win-ink: var(--cis-text);
  --result-loss-ink: var(--cis-text);
  --result-draw-ink: var(--cis-text);
}
html[data-site-theme][data-theme="light"] .article-block { background: var(--panel); }
html[data-site-theme][data-theme="light"] :is(
  .article-prose .table-scroll .standings thead th,
  .glossary-article .glossary-table thead th
) {
  color: var(--cis-gold);
  background: var(--cis-navy-raised);
}

html[data-site-theme] body {
  background-color: var(--bg);
  background-image: none;
}
html[data-site-theme] body { font-family: var(--font-body); }
/* The formal-site wordmark uses Barlow Condensed; the local numeric subset is
   the same face and keeps its exact weight, size, spacing and logo gap. */
html[data-site-theme] .brand-en { font-family: var(--font-num); }
html[data-site-theme] :is(.m-score, .duel-score strong, .postseason-card-score, time, .filter-count, .summary-record) {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
html[data-site-theme] :is(.gold, .eyebrow) { color: var(--gold-2); }
html[data-site-theme] .mark { color: var(--logo-mark); }
html[data-site-theme] .block-head :is(h1, h2)::after { background: var(--gold); }
html[data-site-theme] .top {
  background: var(--bg);
}
html[data-site-theme] .lead,
html[data-site-theme] .summary p,
html[data-site-theme] .search-trigger { color: var(--muted); }
html[data-site-theme] .focus-tags > span {
  color: var(--gold-2);
  border-color: var(--gold);
}
html[data-site-theme] .focus-tags > .is-important {
  color: var(--red-ink);
  border-color: var(--red);
  background: var(--red);
}
html[data-site-theme] .brand-zh { color: var(--muted); }
html[data-site-theme] .nav-schedule { border-color: var(--gold); }
html[data-site-theme] .nav-schedule:not([aria-current]) { color: var(--gold-2); }
html[data-site-theme] :is(.nav-schedule, .name-toggle, .nav-favorites):hover { color: var(--gold-ink); border-color: var(--gold); background: var(--gold); }
html[data-site-theme] :is(.nav-drop.is-current summary, .nav-link[aria-current], .nav-favorites[aria-current], .nav-panel a[aria-current]) {
  color: var(--gold-ink);
  border-color: var(--gold);
  background: var(--gold);
}
html[data-site-theme] :is(.nav-link[aria-current], .nav-favorites[aria-current], .nav-panel a[aria-current]):hover {
  color: var(--gold-ink);
  background: var(--gold-hover);
}
html[data-site-theme] .btn { border-radius: 999px; }
html[data-site-theme] .btn:first-child { color: var(--gold-ink); background: var(--gold); }
html[data-site-theme] .btn:first-child:hover { color: var(--gold-ink); background: var(--gold-hover); }
html[data-site-theme] .btn.ghost { color: var(--gold-2); border-color: var(--gold); background: transparent; }
html[data-site-theme] :is(.card, .match, .summary, .league-summary-row, .home-game-links a) { border-radius: 10px; }
html[data-site-theme] .league-tabs a[aria-current="page"] {
  color: var(--gold-ink);
  border-color: var(--gold);
  border-radius: 999px 999px 0 0;
  background: var(--gold);
}
html[data-site-theme] :is(.m-score:not(.vs):not(.live), .duel-score strong, .postseason-card-score) { color: var(--gold-2); }
html[data-site-theme] .live-status { color: var(--text); background: transparent; }
html[data-site-theme] .live-dot { background: var(--red); }
html[data-site-theme] .m-score.live { color: var(--gold-2); background: transparent; }
html[data-site-theme] :is(.match.is-live, .focus-card.is-live) { border-color: var(--red); }
html[data-site-theme] :is(.m-round, .focus-status .live-status) {
  border-color: var(--gold);
  border-radius: 4px;
  background: var(--panel-2);
}
html[data-site-theme] .focus-status .live-status {
  color: var(--text);
  border-color: var(--gold);
  background: var(--panel-2);
}
html[data-site-theme] :is(.match-hero, .summary, .player-card.is-podium) {
  background: var(--panel);
}
html[data-site-theme] .foot { background: var(--bg); }
html[data-site-theme] .foot-social svg path { fill: currentColor !important; }
html[data-site-theme] .site-menu-check { color: var(--text); border-color: var(--line); }

/* Missing artwork is always a navy monogram, never an empty white disc. */
html[data-site-theme] .badge:not(.has-crest),
html[data-site-theme] .badge.crest-pending {
  color: var(--fallback-text);
  border: 1px solid var(--line);
  background: var(--fallback-bg);
  box-shadow: none;
}
html[data-site-theme] .badge.has-crest:not(.national-flag) {
  border: 1px solid var(--line);
  background: var(--fallback-bg);
  box-shadow: none;
}
html[data-site-theme] :is(.badge-code, .esports-code) {
  box-sizing: border-box;
  max-width: calc(100% - 4px);
  padding-inline: 1px;
  overflow: hidden;
  color: var(--fallback-text);
  font-size: inherit;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.top-theme-toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--panel);
  cursor: pointer;
  font: 800 13px/1 var(--font-body);
}
.top-theme-toggle:hover { color: var(--gold-ink); border-color: var(--gold); background: var(--gold); }
.top-theme-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#upcoming-schedule { scroll-margin-top: 88px; display: flow-root; }
#upcoming-schedule > .block:first-child { margin-top: 0; }

/* Proposal 1 remains an isolated historical preview. */
html[data-site-theme="proposal-1"] .proposal-note {
  margin: 20px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--panel);
}
html[data-site-theme="proposal-1"] main > .hero { display: none; }
.proposal-note strong { color: var(--text); }
.proposal-one-headline {
  display: grid;
  gap: 12px;
  margin: 26px 0 4px;
  padding: 22px;
  border-block: 5px double var(--line);
}
.proposal-one-headline .eyebrow { margin: 0; }
.proposal-one-headline h1 { max-width: 17ch; margin: 0; font-size: clamp(36px, 6vw, 64px); line-height: 1.1; }
.proposal-one-headline p { max-width: 48em; margin: 0; color: var(--muted); }
/* Approved action-first war-room homepage. */
.home-warroom {
  padding-top: 24px;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
}
.home-warroom :is(h1, h2, h3, .card-title) {
  font-family: var(--font-display);
  line-height: 1.25;
  letter-spacing: .03em;
  word-break: keep-all;
  text-wrap: balance;
}
.home-warroom .block { margin-top: 32px; }
.home-warroom .block-head {
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
  border-bottom-color: var(--line);
}
.home-warroom .block-head :is(h1, h2) {
  position: relative;
  margin: 0;
  padding-bottom: 8px;
}
.home-warroom .block-head h1 { font-size: 32px; }
.home-warroom .block-head h2 { font-size: 24px; }
.home-warroom .block-head :is(h1, h2)::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: -2px;
  width: 28px;
  height: 3px;
  background: var(--gold);
}
.home-warroom .block-head :is(h1, h2)::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 4px;
  height: 4px;
  background: var(--red);
}
.home-warroom .block-head a { color: var(--gold-2); font-size: 13px; line-height: 1.6; }
.warroom-dashboard { display: grid; gap: 24px; align-items: start; }
.warroom-main,
.warroom-rail { min-width: 0; }
.warroom-dashboard .focus-cards { gap: 16px; }
.home-warroom :is(.card.focus-card, .match, .league-summary-row, .home-game-links a) {
  border-color: var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: none;
}
.home-warroom :is(.match, .league-summary-row) { padding: 16px; }
.home-warroom .card.focus-card { min-height: 143px; height: auto; max-height: none; padding: 12px 14px; }
.home-warroom :is(.card.focus-card, .match, .league-summary-row, .home-game-links a):hover {
  border-color: var(--gold);
}
.home-warroom .focus-card { gap: 8px; }
.home-warroom .focus-card .m-when > :is(time, .m-time) { font-size: 14px; }
.home-warroom .focus-card .m-when {
  grid-template-columns: minmax(0, 1fr) max-content minmax(0, auto);
  grid-template-rows: auto;
  gap: 8px;
}
.home-warroom .focus-card .m-when > .competition-mark {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  max-width: 100%;
}
.home-warroom .focus-card .m-when > :is(time, .m-time) {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}
.home-warroom .focus-card .m-when > .m-round {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-warroom .focus-card .m-team,
.home-warroom .match .m-team {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0;
}
.home-warroom :is(.m-team .tn, .summary-leader .tn, .summary-next) {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: normal;
  word-break: keep-all;
  text-wrap: balance;
}
.home-warroom .focus-card .m-team .tn {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-warroom .m-when > .competition-mark {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.home-warroom .m-when .competition-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}
.home-warroom :is(.m-score, time, .summary-record, .filter-count) { letter-spacing: 0; }
.home-warroom :is(.m-when, .focus-tags > span, .focus-card-action, .summary-leader, .block-head a) {
  font-size: 13px;
}
.home-warroom .focus-card-form { font-size: 13px; line-height: 1.4; }
.home-warroom .focus-tags > span { border-radius: 4px; line-height: 1.6; }
.warroom-schedule-list { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; }
.warroom-schedule-row {
  position: relative;
  min-width: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: max-content 20px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.warroom-schedule-row:hover { border-color: var(--gold); }
.warroom-schedule-row time { color: var(--text); font-size: 12px; font-weight: 700; white-space: nowrap; }
.warroom-schedule-row .competition-mark { min-width: 0; justify-content: center; }
.warroom-schedule-row .competition-name { display: none; }
.warroom-schedule-row .compact-pair { min-width: 0; display: flex; flex-wrap: nowrap; align-items: center; gap: 0 4px; font-size: 13px; line-height: 1.35; overflow: hidden; }
.warroom-schedule-row .compact-pair .tn { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warroom-schedule-row .compact-pair b { flex: 0 0 3.5ch; color: var(--muted); font-size: 11px; text-align: center; text-transform: uppercase; }
.warroom-schedule-row .compact-pair b:not(:only-child) { min-width: 3.5ch; text-align: center; font-variant-numeric: tabular-nums; }
.warroom-schedule-row.is-live { border-color: var(--red); }
.warroom-schedule-row.is-live .compact-pair b { color: var(--gold-2); font-size: 13px; }
.warroom-schedule-row .m-round { max-width: 52px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warroom-leagues .league-summary-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.warroom-leagues .league-summary-row { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.warroom-leagues .competition-mark { grid-column: 1; grid-row: 1; justify-self: start; }
.warroom-leagues .summary-record { grid-column: 2; grid-row: 1; }
.warroom-leagues .summary-leader { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
.warroom-leagues .summary-next { grid-column: 1 / -1; grid-row: 3; }
.home-warroom .m-score.score-changed { position: relative; }
.home-warroom .m-score.score-changed::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: hs-score-change 1.8s ease-in-out infinite;
}
.home-warroom .m-score .upset-badge {
  width: max-content;
  margin: 5px auto 0;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--red-ink);
  background: var(--red);
  font: 700 11px/1.35 var(--font-body);
  letter-spacing: 0;
}
@keyframes hs-score-change {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
.empty-state {
  min-height: 144px;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--panel);
  text-align: center;
}
.empty-state strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: .03em;
}
.empty-state span { font-size: 15px; line-height: 1.65; }
.empty-state a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-2);
}

/* 我的最愛：首頁最上方一整條，字級跟下方區塊一致 */
.home-warroom .favorites-home { margin: 0 0 32px; padding: 0; border: 0; border-radius: 0; background: none; }
.home-warroom .favorites-title { min-height: 0; margin-bottom: 16px; }
.home-warroom .favorites-title > a { min-height: 0; color: var(--gold-2); font-size: 13px; }
.home-warroom .favorite-leagues { margin-bottom: 14px; }
.home-warroom .favorite-league { font-size: 14px; }
.home-warroom .favorite-teams { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; align-items: stretch; }
.home-warroom .favorite-team-card { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 10px; background: var(--panel); }
.home-warroom .favorite-team-card:hover { border-color: var(--gold); }
.home-warroom .favorite-team-heading { min-height: 32px; margin-bottom: 4px; }
.home-warroom .favorite-team-heading > a { color: var(--text); font-family: var(--font-body); font-size: 16px; line-height: 1.35; }
.home-warroom .favorite-team-heading > a:hover { color: var(--gold); }
.home-warroom .favorite-team-heading img { width: 28px; height: 28px; }
.home-warroom .favorite-fixture {
  min-height: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: baseline;
  column-gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  line-height: 1.45;
}
.home-warroom .favorite-fixture small { font-size: 13px; line-height: 1.45; }
.home-warroom .favorite-fixture .favorite-time { justify-self: end; font-family: var(--font-body); }
.home-warroom .favorite-pair { grid-column: 1 / -1; }
.home-warroom .favorite-fixture .favorite-needed { grid-column: 1 / -1; margin-left: 0; }
.home-warroom .favorite-all { min-height: 36px; margin-top: auto; color: var(--gold-2); font-size: 13px; }
.home-warroom .favorite-score { color: var(--gold-2); }
.home-warroom .favorite-team-card.is-live { border-color: var(--red); }
.home-warroom .favorite-fixture.is-live .favorite-fixture-label { color: var(--text); }
.home-warroom .favorite-fixture.is-live .favorite-score { font-size: 16px; }
/* 台灣球員昨日表現：字級對齊焦點卡 */
.home-warroom .taiwan-daily time { font-size: 13px; }
.home-warroom .taiwan-daily-player { min-height: 0; padding: 12px 14px; border-radius: 10px; }
.home-warroom .taiwan-daily-identity { gap: 10px; }
.home-warroom :is(.taiwan-daily-identity img, .taiwan-daily-fallback) { width: 40px; height: 40px; }
.home-warroom .taiwan-daily-fallback { font-size: 18px; }
.home-warroom .taiwan-daily-player h3 { font-family: var(--font-body); font-size: 16px; line-height: 1.35; }
.home-warroom .taiwan-daily-identity p { color: var(--muted); font-size: 13px; }
.home-warroom .taiwan-daily-game { min-height: 40px; margin-top: 6px; }
.home-warroom .taiwan-daily-game strong { font-family: var(--font-body); color: var(--gold-2); font-size: 16px; line-height: 1.4; }
.home-warroom .taiwan-daily-detail { font-size: 14px; }

@media (min-width: 1100px) {
  .warroom-dashboard { grid-template-columns: minmax(0, 2.2fr) minmax(360px, .9fr); }
  .warroom-dashboard .focus-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 14px; }
  /* 焦點與 48 小時並排時，兩個標題同字級，分隔線才會對齊 */
  .warroom-dashboard .block-head :is(h1, h2) { font-size: 28px; line-height: 1.25; }
}
@media (max-width: 600px) {
  html[data-site-theme] .brand-zh { display: none; }
  html[data-site-theme] .top-actions { gap: 4px; }
  /* 手機頂欄：選單只留三橫線，騰出位置放中／英切換；顯示目前模式，英文模式加金底 */
  html[data-site-theme] .menu-btn > span:last-child { display: none; }
  html[data-site-theme] .menu-btn { min-width: 44px; min-height: 44px; justify-content: center; padding: 8px 12px; }
  html[data-site-theme] .name-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 10px; font-size: 16px; font-weight: 700; line-height: 1; }
  html[data-site-theme] .name-toggle :is(.nt-long, .nt-short) { display: none; }
  html[data-site-theme] .name-toggle::before { content: "Aa"; }
  html[data-site-theme] .name-toggle[aria-pressed="true"]::before { content: "Aa"; }
  html[data-site-theme] .name-toggle[aria-pressed="false"]:hover { color: var(--text); border-color: var(--line); background: var(--panel); }
  html[data-site-theme] .name-toggle[aria-pressed="true"] { color: var(--gold-ink); border-color: var(--gold); background: var(--gold); }
  .top-theme-toggle > span:last-child { display: none; }
  .proposal-one-headline { padding-inline: 4px; }
  .home-warroom { padding-top: 16px; font-size: 15px; line-height: 1.65; }
  .home-warroom .block { margin-top: 24px; }
  .home-warroom .block-head { gap: 8px; margin-bottom: 16px; }
  .home-warroom .block-head h1 { font-size: 28px; }
  .home-warroom .block-head h2 { font-size: 22px; }
  .home-warroom .focus-card-form { font-size: 13px; }
  .empty-state span { font-size: 15px; }
  .warroom-dashboard { gap: 24px; }
  .warroom-dashboard .focus-card:nth-child(n + 4),
  .warroom-schedule-row.desktop-extra { display: none; }
  .warroom-schedule-row { grid-template-columns: max-content 20px minmax(0, 1fr) max-content; gap: 6px; padding: 6px 8px; }
  .warroom-schedule-row time { font-size: 12px; }
  .warroom-schedule-row .compact-pair { font-size: 13px; }
  .warroom-schedule-row .m-round { max-width: 52px; padding-inline: 5px; }
  .warroom-leagues .league-summary-list { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .warroom-leagues .league-summary-row {
    min-height: 50px;
    grid-template-columns: 72px minmax(0, 112px) minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    overflow: hidden;
  }
  .warroom-leagues .competition-mark { grid-column: 1; grid-row: 1; min-width: 0; overflow: hidden; }
  .warroom-leagues .competition-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .warroom-leagues .summary-leader { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; overflow: hidden; flex-wrap: nowrap; }
  .warroom-leagues .summary-leader .badge { flex: none; }
  .warroom-leagues .summary-leader .tn {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
    text-wrap: nowrap;
  }
  .warroom-leagues .summary-record { display: none; }
  .warroom-leagues .summary-next {
    grid-column: 3;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    text-wrap: nowrap;
  }
  .home-warroom .home-matches .match {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 2px;
    padding: 6px 10px;
  }
  .home-warroom .home-matches .match .m-when { display: contents; margin: 0; }
  .home-warroom .home-matches .match .m-when > .competition-mark {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    min-width: 0;
  }
  .home-warroom .home-matches .match .competition-name {
    font-size: 13px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: keep-all;
  }
  .home-warroom .home-matches .match .competition-mark :is(.league-mark, .game-icon) { display: none; }
  .home-warroom .home-matches .match .m-when > :is(time, .m-time) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    font-size: 13px;
    line-height: 1.35;
    white-space: nowrap;
    text-align: right;
  }
  .home-warroom .home-matches .match .m-round { display: none; }
  .home-warroom .home-matches .match :is(.m-team a, .m-when > a, .competition-mark) {
    min-height: 0;
    min-width: 0;
  }
  .home-warroom .home-matches .match .m-teams {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
  }
}

/* 手機最新比分：隊徽貼隊名，比分獨佔中間。favorites.css 在 640px 會把客隊隊徽放到比分那一格。 */
@media (max-width: 640px) {
  .home-warroom .home-matches .match .m-teams {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    min-width: 0;
  }
  .home-warroom .home-matches .match .m-teams > .badge {
    display: inline-grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    padding: 2px;
    font-size: 9px;
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
    position: relative;
    z-index: 0;
  }
  .home-warroom .home-matches .match .m-teams > .badge:nth-child(2) { order: 2; }
  .home-warroom .home-matches .match .m-teams > .badge:nth-child(4) { order: 4; }
  .home-warroom .home-matches .match .m-team,
  .home-warroom .home-matches .match .m-team .tn {
    overflow: hidden;
    white-space: normal;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    font-size: 15px;
    line-height: 1.35;
    max-width: 100%;
  }
  .home-warroom .home-matches .match .m-team a,
  .home-warroom .home-matches .match .m-team > .tn {
    display: -webkit-box;
    width: 100%;
    min-width: 0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  html:is([lang="en"], [lang="ja"]) .home-warroom .home-matches .match .m-team,
  html:is([lang="en"], [lang="ja"]) .home-warroom .home-matches .match .m-team .tn,
  html:is([lang="en"], [lang="ja"]) .home-warroom .home-matches .match .m-team a {
    word-break: keep-all;
  }
  .home-warroom .home-matches .match .m-team.home {
    order: 1;
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc((100% - 10.5rem) / 2);
    justify-content: flex-start;
    text-align: left;
    grid-column: auto;
    grid-row: auto;
  }
  .home-warroom .home-matches .match .m-team.away {
    order: 5;
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc((100% - 10.5rem) / 2);
    justify-content: flex-end;
    text-align: right;
    grid-column: auto;
    grid-row: auto;
  }
  .home-warroom .home-matches .match .m-score {
    order: 3;
    flex: 0 0 80px;
    align-self: center;
    width: 80px;
    min-width: 80px;
    margin-inline: auto;
    font-size: 21px;
    white-space: nowrap;
    position: relative;
    z-index: 1;
    grid-column: auto;
    grid-row: auto;
  }
  .home-warroom .home-matches .match .m-score.vs { font-size: 13px; min-width: 80px; }

  .home-warroom .focus-card .focus-pair {
    width: 100%;
    grid-template-columns: 28px minmax(0, 1fr) 80px minmax(0, 1fr) 28px;
    gap: 6px;
  }
  .home-warroom .focus-card .focus-pair > .badge { width: 28px; height: 28px; }
  .home-warroom .focus-card .m-team { min-width: 0; }
  .home-warroom .focus-card .m-team .tn {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .home-warroom .focus-card .m-score { width: 80px; min-width: 80px; }

  /* Translated league and team names need their own space on narrow screens. */
  html:is([lang="en"], [lang="ja"]) .warroom-leagues .league-summary-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    grid-template-rows: auto auto;
    min-height: 64px;
  }
  html:is([lang="en"], [lang="ja"]) .warroom-leagues .competition-mark {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  html:is([lang="en"], [lang="ja"]) .warroom-leagues .summary-leader {
    grid-column: 1;
    grid-row: 2;
  }
  html:is([lang="en"], [lang="ja"]) .warroom-leagues .summary-next {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-site-theme] *, html[data-site-theme] *::before, html[data-site-theme] *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .home-warroom .m-score.score-changed::after { animation: none; opacity: 1; }
}

/* ===== 桌機寬度 B：內容 1320px、右欄加寬、字級放大（2026-10-16 老闆選定，技術長）=====
   只在 761px 以上套用；760px 以下（手機）完全不變。頂欄與內容同寬、左右對齊。 */
@media (min-width: 761px) {
  :root[data-site-theme] {
    --desk-wrap: 1320px;        /* 內容最大寬度（頂欄同寬） */
    --desk-text: 15px;          /* 卡片內文、近 5 場、聯賽名、看全部（原 13px） */
    --desk-time: 16px;          /* 卡片日期時間（原 14px） */
    --desk-team: 16px;          /* 48 小時隊名（原 13px）、列表隊名 */
    --desk-focus-team: 17px;    /* 焦點卡隊名（原 16px） */
    --desk-tag: 14px;           /* 焦點標籤（原 13px） */
    --desk-badge: 13px;         /* 輪次徽章（原 11～12px） */
    --desk-rail-time: 14px;     /* 48 小時日期（原 12px） */
    --desk-crumbs: 14px;        /* 麵包屑（原 13px） */
    --desk-table: 15px;         /* 積分榜（原 14px） */
    --desk-prose: 17px;         /* 指南內文（原 16px） */
    --desk-focus-h: 132px;      /* 焦點卡高（原 143px），矮而寬 */
    --desk-toc: 320px;
    --desk-measure: 44em;
  }

  html[data-site-theme] .wrap,
  html[data-site-theme] .top > .wrap { width: min(var(--desk-wrap), 100% - 32px); }
  html[data-site-theme] .top > .wrap { container-type: inline-size; }

  /* 字級 */
  html[data-site-theme] .crumbs { font-size: var(--desk-crumbs); }
  html[data-site-theme] .home-warroom :is(.m-when, .focus-card-action, .summary-leader, .block-head a, .focus-card-form) { font-size: var(--desk-text); }
  html[data-site-theme] .home-warroom .competition-mark { font-size: var(--desk-text); }
  html[data-site-theme] .home-warroom .m-when time,
  html[data-site-theme] .home-warroom .focus-card .m-when > :is(time, .m-time) { font-size: var(--desk-time); }
  html[data-site-theme] .home-warroom :is(.m-round, .focus-card .m-when > .m-round) { font-size: var(--desk-badge); }
  html[data-site-theme] .home-warroom .focus-tags > span { font-size: var(--desk-tag); }
  html[data-site-theme] .home-warroom :is(.focus-card .m-team, .match .m-team) { font-size: var(--desk-focus-team); }
  html[data-site-theme] .home-warroom .card.focus-card { min-height: var(--desk-focus-h); height: auto; max-height: none; }
  html[data-site-theme] .warroom-schedule-row { grid-template-columns: max-content 22px minmax(0, 1fr) max-content; gap: 8px; padding: 8px 12px; }
  html[data-site-theme] .warroom-schedule-row time { font-size: var(--desk-rail-time); }
  html[data-site-theme] .warroom-schedule-row .compact-pair { font-size: var(--desk-team); gap: 0 6px; }
  html[data-site-theme] .warroom-schedule-row .compact-pair b { font-size: 12px; }
  html[data-site-theme] .warroom-schedule-row.is-live .compact-pair b { font-size: var(--desk-team); }
  /* 48 小時徽章完整顯示（例：國聯冠軍賽 G5），不截字；字距收緊、隊名欄讓位 */
  html[data-site-theme] .warroom-schedule-row .m-round { max-width: none; overflow: visible; text-overflow: clip; padding-inline: 6px; letter-spacing: 0; }
  html[data-site-theme] .home-warroom .summary-next { font-size: var(--desk-text); }
  html[data-site-theme] .home-warroom .summary-record { font-size: 14px; }
  html[data-site-theme] .home-warroom .favorites-title > a { font-size: var(--desk-text); }
  html[data-site-theme] .home-warroom .favorite-team-heading > a { font-size: var(--desk-focus-team); }
  html[data-site-theme] .home-warroom .favorite-fixture { font-size: var(--desk-team); }
  html[data-site-theme] .home-warroom .favorite-fixture small { font-size: var(--desk-text); }
  html[data-site-theme] .home-warroom .favorite-all { font-size: var(--desk-text); }
  html[data-site-theme] .home-warroom .taiwan-daily time,
  html[data-site-theme] .home-warroom .taiwan-daily-identity p,
  html[data-site-theme] .home-warroom .taiwan-daily-detail { font-size: var(--desk-text); }
  html[data-site-theme] .standings { font-size: var(--desk-table); }
  html[data-site-theme] .standings th { font-size: 13px; }
  html[data-site-theme] .zone-legend { font-size: 14px; }
  html[data-site-theme] .article-prose { font-size: var(--desk-prose); }
  html[data-site-theme] .article-updated { font-size: 15px; }
  html[data-site-theme] .article-toc a { font-size: 15px; }
  html[data-site-theme] .index-card-description { font-size: 15px; }

  /* 焦點卡（桌機 2 欄）奇數張時，最後一張撐滿整列，不留右下空格 */
  html[data-site-theme] .warroom-dashboard .focus-cards > .focus-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

  /* 我的球隊：每列最多 4 張撐滿整列，超過往下排（1320px 扣 3 個 14px 間距，每張約 319px，最小 300px） */
  html[data-site-theme] .home-warroom .favorite-teams { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
}

/* 頂欄：「荷米斯體育」品牌字一律保留（1280px 以上）；放不下時依頂欄實際寬度收次要元素 */
@media (min-width: 1280px) {
  html[data-site-theme] .top .brand-zh { display: inline; }
}
@container (max-width: 1399px) {
  html[data-site-theme] .top .name-toggle .nt-long { display: none; }
  html[data-site-theme] .top .name-toggle .nt-short { display: inline; }
}
@container (max-width: 1299px) {
  html[data-site-theme] .top .top-theme-toggle > span:last-child { display: none; }
}
@container (max-width: 1259px) {
  html[data-site-theme] .search-trigger-text,
  html[data-site-theme] .search-trigger kbd { display: none; }
}

@media (min-width: 1080px) {
  html[data-site-theme] .article-shell {
    width: min(100%, calc(var(--desk-measure) + var(--desk-toc) + 32px));
    grid-template-columns: minmax(0, 1fr) var(--desk-toc);
    column-gap: 32px;
    margin-inline: 0; /* 指南與麵包屑、頂欄同一條左邊線 */
  }
}

@media (min-width: 1280px) {
  /* 右欄加寬；1100～1279px 沿用原比例，焦點卡才放得下聯賽名 */
  html[data-site-theme] .warroom-dashboard { grid-template-columns: minmax(0, 1.9fr) minmax(440px, 1fr); }
}

/* 我的球隊只有 1 張時改成橫條 */
@media (min-width: 1000px) {
  html[data-site-theme] .home-warroom .favorite-team-card:only-child {
    display: grid;
    grid-template-columns: minmax(200px, .7fr) minmax(0, 1fr) minmax(0, 1fr) max-content;
    align-items: center;
    column-gap: 24px;
    padding: 12px 20px;
  }
  html[data-site-theme] .home-warroom .favorite-team-card:only-child .favorite-team-heading { grid-column: 1; grid-row: 1; margin: 0; }
  html[data-site-theme] .home-warroom .favorite-team-card:only-child .favorite-fixture:nth-child(2) { grid-column: 2; }
  html[data-site-theme] .home-warroom .favorite-team-card:only-child .favorite-fixture:nth-child(3) { grid-column: 3; }
  html[data-site-theme] .home-warroom .favorite-team-card:only-child .favorite-fixture {
    grid-row: 1;
    align-self: stretch;
    align-content: center;
    padding: 4px 0 4px 24px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
  html[data-site-theme] .home-warroom .favorite-team-card:only-child .favorite-all { grid-column: 4; grid-row: 1; margin: 0; }
}

/* 頂欄右側（10/23 老闆）：明暗、中／英一律用手機版的圓形圖示；語言改成地球下拉、放最右邊。
   10/27：內容寬上限 1320px，搜尋全文會把「指南」蓋住，改跟明暗、愛心一樣只留 44px 圖示。 */
html[data-site-theme] .top .top-theme-toggle { width: 44px; padding: 0; font-size: 18px; }
html[data-site-theme] .top .top-theme-toggle > span:last-child { display: none; }
html[data-site-theme] .top .search-trigger { width: 44px; min-width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 999px; color: var(--text); }
html[data-site-theme] .top .search-trigger-text,
html[data-site-theme] .top .search-trigger kbd { display: none; }
@media (min-width: 1200px) {
  html[data-site-theme] .top-row,
  html[data-site-theme] .site-nav,
  html[data-site-theme] .top-actions { flex-wrap: nowrap; }
  html[data-site-theme] .site-nav > :is(.nav-link, .nav-drop),
  html[data-site-theme] .top-actions > * { flex: none; }
}
@container (max-width: 1319px) {
  @media (min-width: 1200px) {
    html[data-site-theme] .top-row { gap: 10px; }
    html[data-site-theme] .top-actions { gap: 8px; }
    html[data-site-theme] .site-nav { gap: 2px; }
    html[data-site-theme] .site-nav :is(.nav-drop summary, .nav-link) { padding: 8px 8px; font-size: 14px; }
  }
}
html[data-site-theme] .top .name-toggle { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 44px; min-height: 44px; padding: 0; border-radius: 999px; font-size: 16px; font-weight: 700; line-height: 1; }
html[data-site-theme] .top .name-toggle :is(.nt-long, .nt-short) { display: none; }
html[data-site-theme] .top .name-toggle::before { content: "Aa"; letter-spacing: .02em; }
html[data-site-theme] .top .name-toggle[aria-pressed="true"]::before { content: "Aa"; }
html[data-site-theme] .top .name-toggle[aria-pressed="false"]:hover { color: var(--text); border-color: var(--gold); background: var(--panel); }
html[data-site-theme] .top .name-toggle[aria-pressed="true"] { color: var(--gold-ink); border-color: var(--gold); background: var(--gold); }
html[data-site-theme] .top .top-languages { position: relative; padding: 0; border: 0; border-radius: 0; }
.lang-menu > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: var(--panel); cursor: pointer; font: 800 13px/1 var(--font-body); white-space: nowrap; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary::after { content: ""; width: 8px; height: 4px; background: currentColor; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.lang-menu > summary svg { fill: none; stroke: currentColor; stroke-width: 1.7; }
.lang-menu > summary:hover, .lang-menu[open] > summary { color: var(--gold-ink); border-color: var(--gold); background: var(--gold); }
.lang-menu > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lang-panel { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; display: grid; min-width: 150px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
html[data-site-theme] .top .lang-panel a { justify-content: flex-start; min-height: 40px; padding: 0 12px; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 600; }
html[data-site-theme] .top .lang-panel a:hover { background: var(--panel-2); }
html[data-site-theme] .top .lang-panel a[aria-current=true] { color: var(--gold); background: var(--panel-2); font-weight: 700; }
