/* Hermes selected menu system: navy surfaces, the CIS gold accent and reusable controls. */
.top-row { position: relative; gap: 10px; }
.top-actions { margin-left: 0; gap: 8px; }
.sports-nav { display: flex; align-items: center; gap: 2px; flex: none; }
.sport-nav-drop { position: relative; }
.sport-nav-drop > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 9px; border: 1px solid transparent; border-radius: 8px; color: var(--text); cursor: pointer; font-size: 14px; font-weight: 700; list-style: none; white-space: nowrap; }
.sport-nav-drop > summary::-webkit-details-marker { display: none; }
.sport-nav-drop > summary::after, .menu-guide-drop > summary::after, .menu-tools-drop > summary::after { content: ""; width: 7px; height: 4px; margin-left: 7px; background: currentColor; clip-path: polygon(0 0, 100% 0, 50% 100%); }
.sport-nav-drop > summary:hover, .sport-nav-drop[open] > summary, .sport-nav-drop.is-current > summary { color: var(--gold); }
.sport-menu-panel { position: absolute; top: calc(100% + 5px); left: 0; z-index: 60; display: grid; min-width: 230px; max-height: min(70vh, 560px); overflow: auto; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 16px 38px rgba(0, 0, 0, .4); }
.sport-nav-drop[open]::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; z-index: 59; height: 5px; }
.sport-menu-panel a { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 10px; border-radius: 8px; color: var(--text); font-size: 14px; font-weight: 600; }
.sport-menu-panel a:hover, .sport-menu-panel a[aria-current] { color: var(--gold); background: var(--panel-2); text-decoration: none; }
.sport-menu-panel .sport-overview { color: var(--gold); font-weight: 700; }
.site-nav { position: static; display: flex; align-items: center; flex: 1 1 auto; justify-content: flex-start; gap: 2px; min-width: 0; }
.schedule-segmented { display: inline-grid; grid-template-columns: repeat(3, minmax(64px, 1fr)); flex: none; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; }
.schedule-segmented a { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 6px 12px; border-right: 1px solid var(--line); color: var(--text); font-size: 14px; font-weight: 700; white-space: nowrap; }
.schedule-segmented a:last-child { border-right: 0; }
.schedule-segmented a:hover { color: var(--gold); text-decoration: none; }
.schedule-segmented a[aria-current="page"] { background: var(--gold); color: var(--gold-ink); }
.schedule-segmented a:focus-visible, .sport-nav-drop > summary:focus-visible, .site-nav > .nav-drop > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.site-nav > .schedule-segmented { margin-left: auto; margin-right: 10px; }
.menu-guide-drop, .menu-tools-drop { position: static; flex: none; }
.site-nav > .nav-drop > summary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; color: var(--gold); cursor: pointer; font-size: 14px; font-weight: 800; list-style: none; white-space: nowrap; }
.site-nav > .nav-drop > summary::-webkit-details-marker { display: none; }
.site-nav > .nav-drop[open] > summary, .site-nav > .nav-drop.is-current > summary { border-color: var(--gold); color: var(--gold); }
.site-nav > .nav-drop > .nav-panel { position: absolute; top: calc(100% - 2px); left: 50%; z-index: 55; display: none; width: min(880px, calc(100vw - 32px)); max-height: calc(100dvh - 96px); overflow: auto; padding: 0; transform: translateX(-50%); border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: 0 0 4px 4px; background: var(--panel); isolation: isolate; box-shadow: 0 22px 50px rgba(0, 0, 0, .45); }
.site-nav > .nav-drop[open]::after { content: ""; position: absolute; top: calc(100% - 10px); left: 50%; z-index: 54; width: min(880px, calc(100vw - 32px)); height: 10px; transform: translateX(-50%); }
.site-nav > .nav-drop[open] > .nav-panel { display: block; }
/* 10/30 方向 B → v3（樣張 hermes-menu-v3/A-round-chips.html）：運動／用途分頁 → 主題清單＋先讀三篇；不顯示主題數字、總數與「看完順手算」，面板 880 寬。 */
.guide-menu-panel, .tool-menu-panel { --menu-soft: color-mix(in srgb, var(--line) 55%, transparent); }
.menu-tabs { display: flex; align-items: stretch; gap: 4px; padding: 0 32px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.menu-tabs::-webkit-scrollbar { display: none; }
.menu-tabs button { position: relative; display: inline-flex; flex: none; align-items: center; min-height: 52px; padding: 0 16px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: 700 16px/1 var(--font); white-space: nowrap; }
.menu-tabs button:hover, .menu-tabs button[aria-pressed="true"] { color: var(--text); }
.menu-tabs button[aria-pressed="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; background: var(--gold); }
.menu-tabs button.is-past { opacity: .6; }
.menu-tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.nav-panel .menu-tabs .menu-all-link { display: inline-flex; flex: none; align-items: center; gap: 0; margin-left: auto; padding: 0 4px 0 16px; border: 0; border-radius: 0; background: transparent; color: var(--gold); font-size: 15px; font-weight: 700; white-space: nowrap; }
.nav-panel .menu-tabs .menu-all-link::after { content: "›"; margin-left: 6px; }
.nav-panel .menu-tabs .menu-all-link:hover { background: transparent; color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
.menu-tab-body { display: grid; grid-template-columns: 280px minmax(0, 1fr); padding: 0 28px; }
.menu-tab-body[hidden] { display: none; }
.menu-tab-body > div { min-width: 0; padding: 20px 28px 24px; }
.menu-tab-body > :first-child { padding-left: 0; }
.menu-tab-body > div + div { border-left: 1px solid var(--menu-soft); }
.menu-tab-body h3 { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.nav-panel .menu-topics a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 0; border-bottom: 1px solid var(--menu-soft); border-radius: 0; color: var(--text); font-size: 16px; font-weight: 600; }
.nav-panel .menu-topics a:hover { background: transparent; color: var(--gold); text-decoration: none; }
.menu-rank ol { margin: 0; padding: 0; list-style: none; counter-reset: menu-rank; }
.menu-rank li { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--menu-soft); counter-increment: menu-rank; }
.menu-rank li::before { content: counter(menu-rank); color: var(--text); opacity: .35; font: 700 28px/1 var(--font-num, var(--display)); }
.menu-rank li:first-child::before { color: var(--gold); opacity: 1; }
.nav-panel .menu-rank a { display: block; grid-column: 2; padding: 0; border-radius: 0; color: var(--text); font: 600 17px/1.45 var(--display); }
.nav-panel .menu-rank a:hover { background: transparent; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
.nav-panel a.menu-mobile-all { display: none; }
.menu-tab-body.tool-pane { grid-template-columns: minmax(0, 1fr); }
.tool-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.menu-tab-body.tool-pane > .tool-topics { padding: 14px 0 20px; }
.nav-panel .tool-topics a { display: grid; align-content: center; justify-content: stretch; gap: 2px; min-height: 58px; padding: 8px 0; }
.tool-topics a strong { font-weight: 600; }
.tool-topics a span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 13px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.nav-panel .tool-topics a:hover strong { color: var(--gold); }
.mobile-menu-tabs, .drawer-heading, .mobile-sports-bar, .mobile-league-chips { display: none; }
.nav-link.nav-favorites-drawer { display: none; }
.language-settings { position: relative; flex: none; }
.language-settings > summary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 84px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--text); cursor: pointer; font-size: 12px; font-weight: 700; list-style: none; white-space: nowrap; }
.language-settings > summary::-webkit-details-marker { display: none; }
.language-settings > summary:hover, .language-settings[open] > summary { border-color: var(--gold); color: var(--gold); }
.language-glyph { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1px solid currentColor; border-radius: 50%; font-size: 13px; }
.language-settings > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* Language + team-name dropdown (10/30: narrow list, replaces the wide card). */
.language-settings > .lang-panel { position: absolute; top: calc(100% + 6px); right: 0; z-index: 70; display: none; width: 184px; min-width: 0; padding: 4px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: 0 12px 28px rgba(0, 0, 0, .35); }
.language-settings[open] > .lang-panel { display: block; }
.lang-dropdown { display: grid; }
.lang-dropdown-group { display: grid; }
.lang-dropdown .locale-choice { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 0; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; touch-action: manipulation; }
html[data-site-theme] .top .lang-dropdown a.locale-choice { min-height: 44px; padding: 0 14px; border-radius: 0; font-size: 14px; }
.lang-dropdown a.locale-choice:hover { background: var(--panel-2, rgba(255, 255, 255, .06)); color: var(--text); text-decoration: none; }
.lang-dropdown a.locale-choice:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.lang-dropdown .locale-choice[aria-current="true"] { color: var(--gold); font-weight: 700; }
.locale-check { width: 10px; height: 6px; margin-top: -3px; border-bottom: 2px solid currentColor; border-left: 2px solid currentColor; transform: rotate(-45deg); }
.team-name-options { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6px; margin: 4px 0 0; padding: 8px 12px 8px 14px; border: 0; border-top: 1px solid var(--line); min-width: 0; }
.team-name-options legend { float: left; grid-column: 1 / -1; padding: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.team-name-options label { position: relative; display: grid; place-items: center; min-height: 36px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); cursor: pointer; font-size: 13px; font-weight: 600; touch-action: manipulation; }
.team-name-options input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.team-name-options label:has(input:checked) { border-color: var(--gold); background: var(--gold); color: var(--gold-ink, #0B1F3A); }
.team-name-options label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.mobile-sports-bar { display: none; }
.site-menu-check { z-index: 0; }
.menu-backdrop { display: none; }

@media (min-width: 1200px) {
  .site-nav { flex: 1 1 auto; }
  .site-nav > .schedule-segmented { margin-left: auto; }
  .drawer-heading, .mobile-menu-tabs, .mobile-sports-bar, .mobile-league-chips { display: none !important; }
}

@media (max-width: 1199px) {
  .sport-nav-drop[open]::after, .site-nav > .nav-drop[open]::after { display: none; }
  .top-row { min-height: 52px; gap: 8px; }
  .top-actions { gap: 6px; }
  .sports-nav { display: none; }
  .mobile-sports-bar { display: flex; align-items: center; justify-content: space-around; gap: 8px; min-height: 44px; overflow-x: auto; padding: 0 12px; border-top: 1px solid rgba(255,255,255,.05); border-bottom: 1px solid var(--line); background: var(--bg-2); }
  .mobile-sports-bar a { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 54px; min-height: 44px; padding: 0 8px; color: var(--text); font-size: 15px; font-weight: 700; white-space: nowrap; touch-action: manipulation; }
  .mobile-sports-bar a:hover { text-decoration: none; }
  .mobile-sports-bar a[aria-current="page"], .mobile-sports-bar a[aria-expanded="true"] { color: var(--gold); }
  .mobile-sports-bar a[aria-expanded="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; background: var(--gold); }
  .mobile-sport-caret { width: 8px; height: 5px; flex: none; background: currentColor; clip-path: polygon(0 0, 100% 0, 50% 100%); }
  .mobile-sports-bar a[aria-expanded="true"] .mobile-sport-caret { transform: rotate(180deg); }
  /* 10/30 v3（樣張 A）：點運動 → 下方一排可左右滑的聯賽膠囊，再點一次收起。 */
  .mobile-league-chips { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; padding: 10px 16px 12px; border-bottom: 1px solid var(--line); background: var(--panel); scrollbar-width: none; }
  .mobile-league-chips::-webkit-scrollbar { display: none; }
  .mobile-league-chips[hidden] { display: none; }
  .mobile-league-chips a { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 40px; padding: 0 14px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font-size: 15px; font-weight: 600; white-space: nowrap; touch-action: manipulation; }
  .mobile-league-chips a:hover { text-decoration: none; }
  .mobile-league-chips a:active { background: var(--panel-2); }
  .mobile-league-chips a.chip-all { padding-left: 14px; border-color: var(--gold); color: var(--gold); font-weight: 700; }
  .mobile-league-chips a[aria-current="page"] { border-color: var(--gold); color: var(--gold); }
  .mobile-league-chips .league-mark { width: 20px; height: 20px; }
  .mobile-league-chips a:focus-visible, .mobile-sports-bar a:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
  .site-nav { display: none; }
  .drawer-heading, .mobile-menu-tabs { display: flex; }
  .top:has(.site-menu-check:checked) .site-nav { position: fixed; top: 52px; right: 0; bottom: auto; left: 0; z-index: 55; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; width: 100%; max-height: min(70vh, calc(100vh - 52px)); max-height: min(70dvh, calc(100dvh - 52px)); margin: 0; padding: 0 16px max(20px, env(safe-area-inset-bottom, 0px)); overflow-x: hidden; overflow-y: auto; background: var(--bg); border: 0; border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(0, 0, 0, .24); }
  .top:has(.site-menu-check:checked) .menu-backdrop { position: fixed; top: 52px; right: 0; bottom: 0; left: 0; z-index: 45; display: block; background: rgba(4, 8, 16, .65); }
  .top:has(.site-menu-check:checked) .top-row { position: relative; z-index: 60; }
  .drawer-heading { position: sticky; top: 0; z-index: 2; align-items: center; justify-content: space-between; min-height: 52px; margin: 0 -16px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--bg); color: var(--text); }
  .menu-close { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 40px; margin: 0; padding: 7px 12px; border: 0; background: transparent; color: var(--gold); cursor: pointer; font: 700 14px/1 var(--font); }
  .site-nav > .schedule-segmented { display: grid; width: 100%; margin: 8px 0; }
  .schedule-segmented a { min-height: 44px; font-size: 15px; }
  .mobile-menu-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 6px; border: 1px solid var(--line); }
  .mobile-menu-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 0; border-bottom: 2px solid transparent; background: var(--bg-2); color: var(--text); cursor: pointer; font: 700 14px/1 var(--font); }
  .mobile-menu-tabs button + button { border-left: 1px solid var(--line); }
  .mobile-menu-tabs button[aria-selected="true"] { border-bottom-color: var(--gold); color: var(--gold); }
  .mobile-menu-tabs button span { color: var(--muted); font-size: 12px; }
  .site-nav > .nav-drop { width: 100%; }
  .site-nav > .nav-drop > summary { display: none; }
  .site-nav > .nav-drop > .nav-panel { position: static; display: none; width: 100%; max-height: none; overflow: visible; padding: 0; transform: none; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .site-nav > .nav-drop[open] > .nav-panel { display: block; }
  .menu-tabs { gap: 0; margin: 0 0 4px; padding: 0; }
  .menu-tabs button { min-height: 48px; padding: 0 12px; font-size: 15px; }
  .nav-panel .menu-tabs .menu-all-link { display: none; }
  .menu-tab-body { display: block; padding: 0; }
  .menu-tab-body > div, .menu-tab-body > :first-child { padding: 16px 0 6px; }
  .menu-tab-body > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .menu-topics { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
  .menu-topics h3 { grid-column: 1 / -1; }
  .menu-rank li { grid-template-columns: 32px minmax(0, 1fr); }
  .menu-rank li::before { font-size: 24px; }
  .nav-panel .menu-rank a { font-size: 16px; }
  .nav-panel a.menu-mobile-all { display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 6px 0 16px; padding: 0 12px; border: 1px solid var(--gold); border-radius: 6px; color: var(--gold); font-weight: 700; }
  .nav-panel a.menu-mobile-all:hover { background: var(--gold); color: var(--gold-ink); text-decoration: none; }
  .tool-topics { display: block; }
  .site-nav > .nav-link.nav-favorites-drawer { display: inline-flex; align-items: center; align-self: flex-start; gap: 8px; min-height: 40px; margin: 0 0 8px; padding: 0 12px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text); font-size: 14px; font-weight: 700; }
  .site-nav > .nav-link.nav-favorites-drawer:hover, .site-nav > .nav-link.nav-favorites-drawer[aria-current="page"] { border-color: var(--gold); background: var(--gold); color: var(--gold-ink); text-decoration: none; }
  .drawer-favorite-icon { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--text); }
  html[data-site-theme][data-theme="light"] .drawer-favorite-icon { background: var(--panel); }
  .drawer-favorite-icon svg { display: block; width: 16px; height: 16px; fill: var(--cis-red, #A02B21); stroke: var(--cis-red, #A02B21); stroke-width: 1.8; stroke-linejoin: round; }
  body:has(.site-menu-check:checked) { overflow: hidden; }
}

@media (max-width: 479px) {
  .top-language-settings > summary { min-width: 44px; padding: 0 8px; gap: 4px; }
  .top-language-settings > summary [data-current-locale] { display: none; }
  .top .top-actions { gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-tabs button, .menu-topics a { transition: none !important; }
}

/* 10/30 v3（樣張 hermes-menu-v3/B-square-dropdown.html）：頁首鈕 搜尋→明暗→語言→（我的最愛）→選單，
   一律 44×44 圓角方形、同框線同底色；語言鈕不再黃底，打開時才跟其他鈕一樣亮金框金字。 */
.top .top-row > .top-actions { gap: 8px; }
.top .top-row > .top-actions :is(.search-trigger, .top-theme-toggle, .nav-favorites, .menu-btn),
.top .top-row > .top-actions .top-language-settings > summary { position: relative; box-sizing: border-box; display: inline-grid; place-items: center; flex: none; gap: 0; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); cursor: pointer; font: 700 16px/1 var(--font-body, var(--font)); text-decoration: none; }
.top .top-row > .top-actions :is(.search-trigger, .top-theme-toggle, .nav-favorites, .menu-btn):hover,
.top .top-row > .top-actions .nav-favorites[aria-current="page"],
.top .top-row > .top-actions .menu-btn[aria-expanded="true"],
.top .top-row > .top-actions .top-language-settings > summary:hover,
.top .top-row > .top-actions .top-language-settings[open] > summary { border-color: var(--gold); background: var(--panel); color: var(--gold); text-decoration: none; }
.top .top-row > .top-actions :is(.search-trigger-text, .search-trigger kbd, .top-theme-toggle > span, .menu-btn > span) { display: none; }
.top .top-row > .top-actions .top-language-settings > summary::after { display: none; }
.top .top-row > .top-actions .top-language-settings [data-current-locale] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.top .top-row > .top-actions .language-glyph { display: block; width: auto; height: auto; border: 0; border-radius: 0; font-size: 17px; font-weight: 700; line-height: 1; white-space: nowrap; }
/* 10/30 老闆：中文頁「文」、英文頁「EN」；兩個拉丁字母縮一級字，留在 44×44 內不換行。 */
html:lang(en) .top .top-row > .top-actions .language-glyph { font-size: 14px; letter-spacing: .04em; }
.top .top-row > .top-actions svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.top .top-row > .top-actions .theme-glyph path { fill: currentColor; stroke: none; }
.top .top-row > .top-actions :is(.search-trigger, .top-theme-toggle, .nav-favorites, .menu-btn):focus-visible,
.top .top-row > .top-actions .top-language-settings > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (min-width: 1200px) { .top .top-row > .top-actions .menu-btn { display: none; } }
@media (max-width: 1199px) { .top .top-row > .top-actions { gap: 6px; } }
@media (max-width: 479px) { .top .top-row > .top-actions .nav-favorites { display: none; } }
