@font-face {
  font-family: "Noto Sans TC";
  src: url("../assets/fonts/NotoSansTC-VF.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #12151a;
  --panel2: #181c22;
  --line: #2a2d2f;
  --line-strong: #4c4434;
  --text: #f1eee7;
  --muted: #99968f;
  --gold: #b8954f;
  --gold-bright: #d6b568;
  --green: #72b89a;
  --red: #c87979;
  --violet: #aa91c8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    linear-gradient(rgba(184, 149, 79, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(184, 149, 79, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  color: var(--text);
  font:
    15px/1.55 "Noto Sans TC",
    system-ui,
    sans-serif;
  min-height: 100vh;
}
a {
  color: inherit;
}
.shell {
  width: min(1180px, calc(100% - 32px));
  margin: auto;
  padding: 22px 0 48px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 48px;
  margin-bottom: 42px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}
.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: contain;
}
.nav {
  display: flex;
  align-self: stretch;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}
.nav a {
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  text-decoration: none;
}
.nav a:hover,
.nav a.active {
  color: var(--text);
}
.nav a.active {
  border-bottom-color: var(--gold);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 850px;
}
h2 {
  font-size: 22px;
}
.eyebrow {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 850;
}
.lede,
.muted {
  color: var(--muted);
}
.lede {
  max-width: 720px;
  font-size: 17px;
}
.panel {
  background: rgba(18, 21, 26, 0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}
.hero {
  padding: clamp(24px, 5vw, 50px);
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  background: var(--panel2);
  font-weight: 750;
  cursor: pointer;
  color: var(--text);
}
.button.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #12100c;
}
.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.grid {
  display: grid;
  gap: 14px;
}
.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0 30px;
}
.metric strong {
  display: block;
  font-size: 23px;
  margin-top: 5px;
}
.metric span {
  color: var(--muted);
  font-size: 12px;
}
.section {
  margin-top: 36px;
}
.cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card-link {
  text-decoration: none;
}
.card-link:hover {
  border-color: #516984;
  transform: translateY(-1px);
}
.status {
  display: inline-flex;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}
.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 28px;
}
.home-intro h1 {
  margin-bottom: 0;
}
.home-intro .lede {
  margin-bottom: 6px;
  font-size: 15px;
}
.focus-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(440px, 0.95fr);
  gap: 28px;
  padding: 26px;
  border-color: var(--line-strong);
  box-shadow: inset 3px 0 var(--gold);
}
.focus-copy h2 {
  margin-bottom: 6px;
  font-size: clamp(24px, 3vw, 34px);
}
.section-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 4px rgba(184, 149, 79, 0.12);
}
.focus-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--line);
}
.compact-stat {
  padding: 18px;
  background: var(--panel2);
}
.compact-stat span,
.performance-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.compact-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--gold-bright);
  font-size: 23px;
  font-variant-numeric: tabular-nums;
}
.focus-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #101216;
  color: var(--muted);
  font-size: 11px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 14px;
}
.section-head h2,
.section-head p {
  margin-bottom: 0;
}
.section-head > a {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}
.section-head > a:hover {
  color: var(--gold-bright);
}
.portal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.portal-card {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 128px;
  text-decoration: none;
}
.portal-card:hover {
  border-color: var(--gold);
}
.portal-card h3 {
  margin-bottom: 4px;
  font-size: 19px;
}
.portal-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}
.portal-kicker {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.portal-arrow {
  color: var(--gold);
  font-size: 18px;
}
.game-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: saturate(0.82);
}
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
}
.performance-list,
.update-list {
  border-top: 1px solid var(--line);
}
.performance-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.performance-list strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.update-list a {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.update-list strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.update-list small {
  color: var(--muted);
}
.update-type {
  color: var(--gold);
  font-size: 11px;
  font-weight: 750;
}
.site-footer {
  margin-top: 52px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #77756f;
  font-size: 11px;
}
.site-footer p {
  margin-bottom: 4px;
}
.site-footer a {
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 6px;
  margin: 22px 0;
}
.tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
  padding: 10px 15px;
  border-radius: 10px;
  font-weight: 750;
  cursor: pointer;
}
.tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #172033;
}
.summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.bracket-scroll {
  overflow: visible;
  margin-top: 18px;
  padding: 12px 2px 16px;
}
.bracket-panel {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(120, 48, 34, 0.42), transparent 30%),
    radial-gradient(circle at 50% 15%, rgba(97, 86, 124, 0.45), transparent 48%),
    linear-gradient(180deg, #242236, #321d25 72%, #151729);
}
.game-bracket {
  --bracket-gold: #ffcb26;
  --bracket-orange: #ff7a1a;
  container-type: inline-size;
  position: relative;
  display: grid;
  grid-template-columns: 30% 40% 30%;
  grid-template-rows: 47% 6% 47%;
  grid-template-areas:
    "a upper c"
    ". champion ."
    "b lower d";
  align-items: center;
  width: 100%;
  height: clamp(440px, 60vw, 500px);
}
.game-bracket-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.game-bracket-lines path {
  fill: none;
  stroke: var(--bracket-gold);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(255, 176, 0, 0.72));
}
.game-bracket-lines path.route-low {
  stroke: var(--bracket-orange);
  filter: drop-shadow(0 0 7px rgba(255, 88, 0, 0.82));
}
.game-bracket-lines path.route-loser {
  stroke: #090909;
  filter: none;
}
.game-junction-label,
.game-matchup-label {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: max(1px, 0.2cqw) solid rgba(255, 255, 255, 0.55);
  background: #17151f;
  color: #fff;
  line-height: 1;
}
.game-junction-label {
  width: 3.6cqw;
  height: 3.6cqw;
  border-radius: 50%;
  font-size: 1.9cqw;
  font-weight: 800;
}
.game-matchup-label {
  width: 6.8cqw;
  height: 3.6cqw;
  border-radius: 1.8cqw;
  font-size: 1.7cqw;
  font-weight: 800;
}
.game-label-a { left: 40%; top: 25.484%; }
.game-label-c { left: 60%; top: 25.484%; }
.game-label-b { left: 40%; top: 78.226%; }
.game-label-d { left: 60%; top: 78.226%; }
.game-label-ac { left: 50%; top: 25.484%; }
.game-label-bd { left: 50%; top: 78.226%; }
.bracket-hint {
  display: none;
  font-size: 12px;
  margin: 4px 0 0;
}
.group-sections {
  display: grid;
  gap: 18px;
}
.game-match,
.game-champion {
  position: relative;
  z-index: 1;
}
.game-a { grid-area: a; }
.game-b { grid-area: b; }
.game-c { grid-area: c; }
.game-d { grid-area: d; }
.game-upper { grid-area: upper; }
.game-lower { grid-area: lower; }
.game-champion { grid-area: champion; }
.game-r1 {
  width: 72%;
}
.game-a,
.game-b {
  justify-self: end;
}
.game-c,
.game-d {
  justify-self: start;
}
.game-r2 {
  width: 240px;
  justify-self: center;
}
.game-champion {
  width: 104px;
  height: 104px;
  justify-self: center;
}
.game-final-node {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 6.8cqw;
  height: 3.6cqw;
  transform: translate(-50%, -50%);
  border: max(1px, 0.2cqw) solid rgba(255, 255, 255, 0.55);
  border-radius: 1.8cqw;
  background: #17151f;
  color: #fff;
  font-size: 1.7cqw;
  font-weight: 800;
  line-height: 1;
}
.game-slot {
  margin-bottom: 5px;
  color: #c1b9cb;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-align: center;
}
.game-player {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 64px;
  padding: 6px 8px;
  border: 1px solid rgba(150, 138, 170, 0.28);
  border-radius: 12px;
  background: rgba(18, 17, 31, 0.82);
  color: #aaa4b3;
}
.game-player + .game-player {
  margin-top: 7px;
}
.game-player.advancing {
  border-color: #ffc52b;
  background: linear-gradient(90deg, rgba(255, 177, 0, 0.2), rgba(29, 25, 39, 0.92));
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 176, 0, 0.24);
}
.game-avatar {
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 3px solid #75648c;
  border-radius: 14px;
  background: radial-gradient(circle at 35% 30%, #786ba0, #29273c 70%);
  color: #eee7ff;
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 2px 3px #000;
}
.advancing .game-avatar {
  border-color: #ffd22e;
  box-shadow: 0 0 8px rgba(255, 174, 0, 0.75);
}
.game-player-copy {
  min-width: 0;
  flex: 1;
}
.game-player-copy strong,
.game-player-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.game-player-copy strong {
  font-size: 13px;
}
.game-player-copy small {
  color: #eee;
  font-size: 12px;
  font-weight: 850;
}
.game-player-copy small span {
  color: #ffc400;
}
.advice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.pick {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #0d192a;
}
.pick.selected {
  border-color: var(--gold);
  box-shadow: inset 3px 0 var(--gold);
}
.pick.correct {
  border-color: var(--green);
  box-shadow: inset 3px 0 var(--green);
}
.pick.wrong {
  border-color: var(--red);
  box-shadow: inset 3px 0 var(--red);
}
.pick-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.pick-players {
  display: grid;
  gap: 5px;
  margin: 8px 0;
}
.pick-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-weight: 750;
}
.pick-player.recommended {
  border-color: var(--gold);
  background: rgba(245, 200, 76, 0.1);
  color: var(--text);
}
.pick-player strong {
  color: var(--gold);
  font-size: 11px;
}
.pick-reason {
  color: var(--muted);
  font-size: 12px;
}
.confidence {
  color: var(--gold);
}
.result {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 750;
}
.result.correct {
  color: var(--green);
}
.result.wrong {
  color: var(--red);
}
.coverage {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  font-size: 12px;
}
.list {
  display: grid;
  gap: 10px;
}
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}
.error-state {
  padding-top: 15vh;
  text-align: center;
  max-width: 700px;
}
.error-state h1 {
  font-size: 40px;
}
.notice {
  border-left: 3px solid var(--gold);
  padding: 12px 15px;
  background: #2b2412;
  color: #e7dba8;
  border-radius: 8px;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.table-wrap {
  overflow: auto;
}
@media (max-width: 780px) {
  .metrics,
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .bracket-hint {
    display: block;
  }
  .game-bracket {
    height: clamp(400px, 70vw, 500px);
    aspect-ratio: auto;
  }
  .advice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-intro,
  .focus-panel,
  .split-grid {
    grid-template-columns: 1fr;
  }
  .home-intro {
    gap: 12px;
  }
  .portal-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .shell {
    width: min(100% - 22px, 1120px);
    padding-top: 20px;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding-bottom: 10px;
  }
  .nav {
    width: 100%;
    gap: 18px;
    overflow-x: auto;
  }
  .nav a {
    flex: 0 0 auto;
    padding-bottom: 8px;
  }
  .metrics,
  .cards {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 22px;
  }
  .home-intro h1 {
    font-size: 32px;
  }
  .focus-panel {
    padding: 20px;
  }
  .focus-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .focus-meta {
    align-items: flex-start;
    flex-direction: column;
  }
  .update-list a {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .update-list small {
    display: none;
  }
  .bracket-panel {
    padding: 18px 12px;
  }
  .bracket-panel > div:first-child {
    padding: 0 6px;
  }
  .bracket-scroll {
    margin-top: 8px;
    padding-bottom: 8px;
  }
  .game-bracket {
    height: clamp(340px, 82vw, 440px);
  }
  .game-r1 {
    width: 81.667%;
  }
  .game-player {
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    min-height: 65px;
    padding: 3px 2px;
    text-align: center;
  }
  .game-player + .game-player {
    margin-top: 4px;
  }
  .game-avatar {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    border-width: 2px;
    border-radius: 10px;
    font-size: 15px;
  }
  .game-player-copy {
    width: 100%;
  }
  .game-player-copy strong {
    font-size: 10px;
    line-height: 1.2;
  }
  .game-player-copy small {
    font-size: 9px;
    line-height: 1.2;
  }
  .game-slot {
    margin-bottom: 2px;
    font-size: 9px;
  }
  .game-champion {
    width: 76px;
    height: 82px;
  }
  .game-final-node {
    top: 50%;
  }
  .advice-grid {
    grid-template-columns: 1fr;
  }
}
