/* ==========================================================================
   赛事节目单布局：首页官方赛事双栏、赛事总览、积分排行与筛选栏
   ========================================================================== */

.fixture-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: clamp(18px, 2.4vw, 30px);
  align-items: stretch;
}

.fixture-spread .official-event {
  max-width: none;
  border-radius: 16px;
  background: linear-gradient(180deg, #171717 0%, #222222 100%);
  color: #f9f9f9;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.fixture-spread .official-event:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(32, 32, 32, 0.18);
  outline: none;
}

.fixture-spread .official-cover {
  flex: 1;
  min-height: clamp(175px, 21vw, 320px);
  border-bottom: 4px solid #bebebe;
  transition: transform 0.35s var(--ease);
}
.fixture-spread .official-event:hover .official-cover {
  transform: scale(1.02);
}

.fixture-spread .official-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: clamp(20px, 2.2vw, 30px);
  background: linear-gradient(180deg, #202020, #171717);
}
.fixture-spread .official-copy .row {
  justify-content: space-between;
  flex-wrap: wrap;
}
.fixture-spread .official-copy h2 {
  font-size: clamp(24px, 2.8vw, 38px);
  line-height: 1.15;
  font-weight: 850;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.fixture-spread .official-copy p,
.fixture-spread .official-copy .link {
  color: #ebebeb;
}
.fixture-spread .official-copy .link {
  justify-self: start;
  padding: 6px 14px;
  margin-inline: 0;
  border-radius: 999px;
  background: rgba(235, 235, 235, 0.14);
  border: 1px solid rgba(235, 235, 235, 0.35);
  color: #ffffff;
}
.fixture-spread .official-event:hover .official-copy .link {
  background: rgba(235, 235, 235, 0.24);
}

/* 右侧最近完赛卡片 */
.fixture-digest {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid #252525;
  border-radius: 14px;
  padding: 18px 20px 20px;
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xs);
}
.fixture-digest h2 {
  font-size: 19px;
  font-weight: 750;
  padding: 0 0 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.fixture-digest .feedrow {
  padding: 11px 8px;
  text-align: left;
}
.fixture-digest > .link {
  display: inline-flex;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 10px;
}

/* 赛事页眉与页签 */
.event-masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 2px solid #383838;
  margin-bottom: 20px;
}
.event-masthead .heading { margin-bottom: 10px; }
.event-masthead .event-sections {
  border: 0;
  margin: 0;
  gap: 4px;
}
.event-masthead .event-sections a {
  display: block;
  padding: 10px 18px;
  border: 0;
  border-radius: 9px 9px 0 0;
  font-size: 14px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.event-masthead .event-sections a:not([aria-current=page]):hover {
  background: rgba(80, 80, 80, 0.08);
  color: var(--deep);
}
.event-masthead .event-sections a[aria-current=page] {
  color: #ffffff;
  background: #383838;
}

/* 赛事总览 Hero + 2x2 指标区 */
.programme {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(225px, 0.78fr);
  gap: 16px;
  margin-bottom: 20px;
}
.programme .hero { margin: 0; min-height: 238px; }
.programme .hero-copy { max-width: 88%; }
.programme .stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid #383838;
  border-radius: 13px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.programme .stat {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 16px 14px;
  min-width: 0;
  transition: background 0.14s ease;
}
.programme .stat:hover {
  transform: none;
  box-shadow: none;
  background: var(--surface-soft);
}
.programme .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.programme .stat:nth-child(odd) { border-right: 1px solid var(--line); }
.programme .stat-icon, .programme .stat-trail { display: none; }
.programme .stat-number { margin-top: 8px; }

/* 积分排行：左侧吸顶筛选栏 + 右侧数据表 */
.league-results {
  display: grid;
  grid-template-columns: minmax(175px, 210px) minmax(0, 1fr);
  gap: clamp(14px, 1.8vw, 24px);
  align-items: start;
  margin-top: 16px;
}
.league-results .filter-column {
  position: sticky;
  top: 80px;
  border: 1px solid var(--line);
  border-top: 4px solid #b0b0b0;
  background: var(--surface);
  padding: 16px;
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
}
.filter-column h3 {
  font-size: 15.5px;
  font-weight: 750;
  margin-bottom: 12px;
  color: var(--ink);
}
.league-results .toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.league-results .toolbar > * { width: 100%; min-width: 0; }
.league-results .filter-column button { width: 100%; }
.league-results > .panel { margin: 0; min-width: 0; overflow: hidden; }
.league-results .panel thead th {
  background: #f1f1f1;
  color: #383838;
}
.league-results .panel tbody tr:nth-child(even) {
  background: #f9f9f9;
}
.league-results .panel tbody tr:hover {
  background: rgba(80, 80, 80, 0.055);
}

/* 最近完赛缩略阵容行 */
.feedrow {
  --plant-size: clamp(20px, 1.7vw, 26px);
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  column-gap: clamp(8px, 1vw, 12px);
}
.feedrow .feed-lineups { display: grid; gap: 3px; align-content: center; }
.feedrow .plants { display: grid; grid-template-columns: repeat(5, var(--plant-size)); gap: 2px; margin: 0; }
.feedrow .plants img { width: var(--plant-size); height: var(--plant-size); padding: 1px; border-radius: 5px; }
.feedrow .end { white-space: nowrap; }

/* ---------------- 响应式适配 ---------------- */
@media (max-width: 1100px) {
  .league-results { grid-template-columns: 1fr; }
  .league-results .filter-column { position: static; }
  .league-results .toolbar { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
  .league-results .filter-column button { width: auto; }
}

@media (max-width: 860px) {
  .programme { grid-template-columns: 1fr; }
  .programme .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .programme .stat:nth-child(n) { border: 0; border-right: 1px solid var(--line); }
  .programme .stat:last-child { border: 0; }
  .fixture-spread { grid-template-columns: 1fr; }
}

@media (max-width: 570px) {
  .event-masthead { display: block; }
  .event-masthead .event-sections { justify-content: space-between; gap: 4px; }
  .event-masthead .event-sections a { flex: 1; text-align: center; padding: 9px 6px; font-size: 13.5px; }
  .programme { gap: 12px; }
  .programme .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .programme .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .programme .stat:nth-child(even) { border-right: 0; }
  .programme .hero { min-height: 192px; }
  .fixture-spread { gap: 16px; }
  .fixture-digest { padding: 15px; }
  .league-results .toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .league-results .toolbar input { grid-column: 1 / -1; }
  .league-results .filter-column button { width: 100%; }
}
#event-notice-gate {
  position: fixed; inset: 0; box-sizing: border-box; width: 100%; max-width: none;
  height: 100%; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0;
  border-radius: 0; background: #fafaf8; color: var(--ink); overflow: hidden;
}
#event-notice-gate::backdrop { background: #fafaf8; }
body:has(#event-notice-gate[open]) { overflow: hidden; }
.notice-sheet { display: grid; grid-template-rows: auto minmax(0,1fr) auto; width: min(100%, 760px); height: 100%; margin: auto; padding: clamp(16px, 5vw, 52px); box-sizing: border-box; }
.notice-sheet header { border-bottom: 2px solid currentColor; padding-bottom: 12px; }
.notice-sheet header span { font-size: 13px; font-weight: 700; letter-spacing: .12em; }
.notice-event { margin: 5px 0 0; font-size: 16px; }
.notice-sheet article { overflow: auto; overscroll-behavior: contain; padding: 22px 4px; overflow-wrap: anywhere; }
.notice-sheet h2 { margin: 0 0 8px; font-size: clamp(24px,5vw,42px); line-height: 1.25; }
.notice-sheet time,.notice-history small { color: var(--ink-2); font-size: 13px; }
.notice-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
.notice-sheet footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 14px 0 env(safe-area-inset-bottom); }
.notice-sheet footer button { min-height: 44px; flex-shrink: 0; }
