/* RX盃 官網｜風格 B 淺紫玻璃 */
:root {
  --ink: #221d57;
  --ink-2: #5149b0;
  --ink-3: #8a84c4;
  --bg: #eeeaff;
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .86);
  --glass-line: rgba(255, 255, 255, .92);
  --line: rgba(83, 74, 183, .16);
  --magenta: #b23aa6;
  --pink: #f0a3f0;
  --violet: #8e7cf6;
  --blue: #7c9bff;
  --mint: #19f0a0;
  --mint-ink: #03362a;
  --navy: #232860;
  --navy-2: #12153a;
  --twitch: #9146ff;
  --youtube: #ff0033;
  --grad: linear-gradient(135deg, #f0a3f0 0%, #8e7cf6 55%, #7c9bff 100%);
  --grad-text: linear-gradient(90deg, #b23aa6, #5149b0);
  --shadow: 0 12px 32px rgba(70, 56, 170, .12);
  --font: "Noto Sans TC", system-ui, -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-display: "Chakra Petch", "Noto Sans TC", sans-serif;
  --wrap: 1200px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1100px 620px at 100% 25%, rgba(240, 163, 240, .38), transparent 62%),
    radial-gradient(900px 640px at 0% 75%, rgba(124, 155, 255, .32), transparent 62%),
    var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.nb { display: inline-block; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow);
}

/* ---------- 導覽列 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .58);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(255, 255, 255, .75);
}
.nav-in { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 20px; letter-spacing: .04em; flex: none; }
.brand-mark { width: 40px; height: auto; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: background .15s; }
.nav-links a:hover { background: rgba(255, 255, 255, .6); }
.nav-links a[aria-current="page"] { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 2px 10px rgba(70, 56, 170, .1); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-live { background: var(--mint); color: var(--mint-ink); box-shadow: 0 6px 18px rgba(25, 200, 140, .35); }
.btn-ghost { background: rgba(255, 255, 255, .28); color: #fff; border: 1px solid rgba(255, 255, 255, .7); }
.btn-ghost:hover { background: rgba(255, 255, 255, .4); }
.nav .btn-live { margin-left: auto; height: 40px; padding: 0 16px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #e0245e; box-shadow: 0 0 0 0 rgba(224, 36, 94, .6); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(224, 36, 94, .55); } 70% { box-shadow: 0 0 0 8px rgba(224, 36, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 36, 94, 0); } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 56px 0 128px;
  background: linear-gradient(180deg, #f0a3f0 0%, #b9a2fa 48%, #8aa6ff 100%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .24) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .24) 1px, transparent 1px);
  background-size: 120px 120px;
  background-position: -1px -1px;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.spark {
  position: absolute;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  background:
    linear-gradient(#fff, #fff) center / 2px 100% no-repeat,
    linear-gradient(#fff, #fff) center / 100% 2px no-repeat;
  opacity: .85;
}
.shard {
  position: absolute;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, .6);
  background: linear-gradient(135deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .04) 70%);
  pointer-events: none;
}
.shard.s1 { width: 560px; height: 560px; right: -160px; top: -240px; transform: rotate(28deg); }
.shard.s2 { width: 300px; height: 300px; left: -120px; bottom: -150px; transform: rotate(-18deg); }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; }
.hero-logo img { width: 100%; max-width: 420px; margin: 0 auto; filter: drop-shadow(0 12px 32px rgba(70, 40, 170, .45)); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  background: rgba(34, 29, 87, .28);
  border: 1px solid rgba(255, 255, 255, .45);
  font-weight: 700;
  font-size: 14px;
}
.eyebrow img { height: 18px; width: auto; }
.hero h1 {
  font-size: clamp(44px, 6.4vw, 80px);
  font-weight: 900;
  line-height: 1.04;
  margin: 18px 0 6px;
  letter-spacing: .02em;
  text-shadow: 0 6px 28px rgba(60, 40, 160, .35);
}
.hero h1 .yr { font-family: var(--font-display); font-weight: 700; }
.hero .lead { margin: 0; font-size: 18px; font-weight: 500; opacity: .96; }
.hero .dates { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: .04em; margin: 10px 0 20px; }
.status {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(34, 29, 87, .26);
  border: 1px solid rgba(255, 255, 255, .45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.status-label { font-weight: 700; font-size: 15px; }
.countdown { display: flex; gap: 8px; }
.cd { min-width: 54px; text-align: center; padding: 4px 6px; border-radius: 10px; background: rgba(255, 255, 255, .22); }
.cd b { display: block; font-family: var(--font-display); font-size: 24px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cd span { font-size: 11px; opacity: .9; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- 數據列 ---------- */
.stats { position: relative; z-index: 2; margin-top: -76px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { border-radius: 20px; padding: 20px 22px; background: var(--glass-strong); }
.stat .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.1;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat .unit { font-size: 15px; font-weight: 700; color: var(--ink-2); margin-right: 4px; }
.stat .label { font-size: 14px; color: var(--ink-2); margin-top: 4px; font-weight: 500; }

/* ---------- 區塊標題 ---------- */
.section { scroll-margin-top: 80px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: 80px 0 22px; }
.sec-title { position: relative; display: flex; align-items: baseline; gap: 12px; margin: 0; padding-left: 18px; font-size: clamp(26px, 3vw, 34px); font-weight: 900; line-height: 1.2; }
.sec-title::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 4px; width: 6px; border-radius: 3px; background: var(--grad); }
.sec-title small { font-family: var(--font-display); font-size: 14px; letter-spacing: .22em; color: var(--magenta); font-weight: 600; }
.sec-link { font-weight: 700; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.sec-link:hover { color: var(--magenta); }

/* ---------- 賽程速覽 ---------- */
.phases { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.phase { position: relative; border-radius: 18px; padding: 18px 18px 16px; }
.phase .d { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1.1; }
.phase .d small { font-family: var(--font); font-size: 14px; font-weight: 700; color: var(--ink-2); margin-left: 4px; }
.phase .t { font-weight: 900; font-size: 17px; margin-top: 8px; }
.phase .desc { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.phase .tag { position: absolute; top: 14px; right: 14px; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.phase.is-done { opacity: .62; }
.phase.is-done .tag { background: rgba(34, 29, 87, .08); color: var(--ink-2); }
.phase.is-next { background: #fff; border: 2px solid var(--violet); }
.phase.is-next .tag { background: var(--violet); color: #fff; }
.phase.is-today { background: #fff; border: 2px solid var(--mint); }
.phase.is-today .tag { background: var(--mint); color: var(--mint-ink); }

/* ---------- 獎金 ---------- */
.prizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.prize { border-radius: 18px; padding: 18px 20px; }
.prize .r { font-weight: 900; color: var(--magenta); }
.prize .a { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin-top: 4px; }
.prize-note { margin-top: 14px; color: var(--ink-2); font-size: 14px; }

/* ---------- 隊伍 ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chips { display: flex; gap: 6px; padding: 4px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); }
.chips button { border: 0; background: transparent; padding: 7px 16px; border-radius: 999px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.search { position: relative; }
.search input {
  width: 260px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--glass-line);
  background: var(--glass-strong);
  padding: 0 16px 0 42px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.search input::placeholder { color: var(--ink-3); }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); }

.teams { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.team { border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.team[hidden] { display: none; }
.team-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.team-badge {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(142, 124, 246, .4);
}
.team-meta { min-width: 0; flex: 1; }
.team-no { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .16em; color: var(--magenta); }
.team-name { font-size: 19px; font-weight: 900; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-name.tbd { color: var(--ink-3); font-weight: 700; font-size: 16px; }
.group-tag { flex: none; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.group-tag.g-A { background: #fbe1f7; color: #8e2a84; }
.group-tag.g-B { background: #dfe6ff; color: #33409e; }
.roster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.person { position: relative; min-width: 0; text-align: center; }
.person .ph {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #e7e0ff, #f8e6fa);
  border: 1px solid #fff;
  transition: transform .18s, box-shadow .18s;
}
.person .ph img { width: 100%; height: 100%; object-fit: cover; }
.person .ph .initial { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; font-weight: 900; color: var(--ink-3); }
.person a.ph:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(70, 56, 170, .22); }
.person .role { position: absolute; left: 6px; top: 6px; font-size: 11px; font-weight: 700; line-height: 1; padding: 4px 7px; border-radius: 999px; background: rgba(34, 29, 87, .78); color: #fff; }
.person.is-captain .role { background: var(--mint); color: var(--mint-ink); }
.person .plats { position: absolute; right: 6px; top: 6px; display: flex; gap: 4px; } /* 放頭像右上角，避免壓到名字 */
.plat { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.plat svg { width: 14px; height: 14px; }
.plat.twitch { background: var(--twitch); }
.plat.youtube { background: var(--youtube); }
.plat.facebook { background: #0866ff; }
.plat.tiktok { background: #111; }
.plat.kick { background: #53fc18; color: #0b0b0b; }
.person .nm { display: block; margin-top: 6px; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person a.nm:hover { color: var(--magenta); }
.person.is-hit .ph { outline: 3px solid var(--magenta); outline-offset: 2px; }
.empty { grid-column: 1 / -1; text-align: center; padding: 40px 16px; border-radius: 20px; color: var(--ink-2); }

.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; }

/* ---------- 頁尾 ---------- */
.footer { position: relative; margin-top: 140px; background: linear-gradient(180deg, var(--navy), var(--navy-2)); color: #fff; padding: 40px 0 28px; }
.footer::before { content: ""; position: absolute; left: 0; right: 0; top: -140px; height: 140px; background: linear-gradient(180deg, rgba(35, 40, 96, 0), var(--navy)); pointer-events: none; }
.sp-rows { display: grid; gap: 30px; }
.sp-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 18px 36px; }
.sp-label { width: 100%; text-align: center; font-size: 14px; font-weight: 700; color: var(--mint); letter-spacing: .12em; }
.sp-row img { height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.sp-row .df img { height: 34px; }
.rxp { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; font-family: var(--font-display); font-weight: 700; }
.rxp b { font-size: 34px; background: linear-gradient(90deg, #f0a3f0, #8ec5ff); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .04em; }
.rxp small { font-size: 11px; letter-spacing: .5em; margin-top: 4px; color: #d9d2ff; }
.foot-live-row { margin-top: 40px; text-align: center; }
.foot-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--twitch);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(145, 70, 255, .35);
  transition: transform .15s;
  max-width: 100%;
}
.foot-live:hover { transform: translateY(-1px); }
.foot-live svg { width: 18px; height: 18px; flex: none; }
.foot-live span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 13px; color: rgba(255, 255, 255, .68); }
.foot-bottom a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.socials { display: flex; gap: 14px; }

/* ---------- 其他 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  opacity: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.load-error { margin: 40px auto; max-width: 520px; text-align: center; padding: 28px; border-radius: 20px; }

/* ---------- 子頁 Hero ---------- */
.hero-sm { padding: 44px 0 96px; }
.hero-sm h1 { font-size: clamp(36px, 5vw, 56px); margin: 14px 0 6px; }

/* ---------- 賽程戰績頁 ---------- */
.steps { position: relative; z-index: 2; margin-top: -60px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { border-radius: 20px; padding: 20px 22px; background: var(--glass-strong); }
.step-no { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .16em; color: var(--magenta); }
.step h3 { margin: 6px 0 6px; font-size: 20px; font-weight: 900; }
.step p { margin: 0; color: var(--ink-2); font-size: 15px; }
.step-date { margin-top: 12px; font-weight: 700; font-size: 14px; }
.placeholder { border-radius: 20px; padding: 36px 24px; text-align: center; }
.placeholder p { margin: 6px 0 0; color: var(--ink-2); }
.rules { display: grid; gap: 14px; }
.rule { border-radius: 18px; padding: 0 22px; }
.rule summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 900; font-size: 18px; display: flex; justify-content: space-between; align-items: center; }
.rule summary::-webkit-details-marker { display: none; }
.rule summary::after { content: "+"; font-family: var(--font-display); font-size: 24px; color: var(--magenta); line-height: 1; }
.rule[open] summary::after { content: "−"; }
.rule dl { margin: 0 0 20px; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px 16px; }
.rule dt { font-weight: 700; color: var(--magenta); }
.rule dd { margin: 0; color: var(--ink); }

/* ---------- 示範資料提示 ---------- */
.demo-bar { position: relative; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 16px; background: #ffd84d; color: #3a2c00; font-weight: 700; font-size: 14px; padding: 6px 12px; }
.demo-bar label { display: inline-flex; align-items: center; gap: 8px; }
.demo-bar select { font: inherit; font-size: 14px; font-weight: 700; color: #3a2c00; background: #fff8d6; border: 2px solid #3a2c00; border-radius: 999px; padding: 3px 10px; cursor: pointer; max-width: 100%; }

/* ---------- 隊伍小標籤（賽程、積分、對戰樹共用） ---------- */
.tm { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; font-weight: 700; }
.tm .tn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.tm:hover .tn { color: var(--magenta); }
.tno { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-display); font-size: 13px; font-weight: 700; color: #fff; background: var(--ink-3); }
.tno.g-A { background: linear-gradient(135deg, #f0a3f0, #c45bb8); }
.tno.g-B { background: linear-gradient(135deg, #8ec5ff, #6a7ff0); }
.tm.tbd { color: var(--ink-3); }
.tm.tbd .tno { background: rgba(34, 29, 87, .12); color: var(--ink-3); }

/* ---------- 賽程比分 ---------- */
.refresh-note { font-size: 13px; color: var(--ink-2); }
.day-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.day-tabs button {
  position: relative;
  text-align: left;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  border-radius: 16px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.day-tabs button:hover { background: rgba(255, 255, 255, .85); }
.day-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 8px 20px rgba(34, 29, 87, .25); }
.day-tabs .dt { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.2; }
.day-tabs .dt small { font-family: var(--font); font-size: 13px; font-weight: 700; margin-left: 2px; opacity: .8; }
.day-tabs .dn { display: block; font-size: 13px; font-weight: 500; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session + .session { margin-top: 28px; }
.session-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 12px; }
.session-head h3 { margin: 0; font-size: 19px; font-weight: 900; }
.session-head span { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.session-head .session-count { margin-left: auto; }
.mc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mc { border-radius: 18px; padding: 12px 16px 14px; }
.mc-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.mc-lab { font-weight: 700; color: var(--ink); }
.mc-bo, .mc-map { padding: 1px 8px; border-radius: 999px; background: rgba(83, 74, 183, .1); font-weight: 700; font-size: 12px; }
.st { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.st-done { background: rgba(34, 29, 87, .08); color: var(--ink-2); }
.st-live { background: var(--mint); color: var(--mint-ink); }
.st-upcoming { background: rgba(142, 124, 246, .15); color: var(--ink-2); }
.mc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; margin-top: 10px; }
.side { min-width: 0; display: flex; }
.side.b { justify-content: flex-end; }
.side.b .tm { flex-direction: row-reverse; text-align: right; }
.side.lose .tm { opacity: .5; }
.score { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.score b { min-width: 30px; text-align: center; color: var(--ink-3); }
.score b.w { color: var(--ink); }
.score i { font-style: normal; color: var(--ink-3); }
.score .vs { font-size: 16px; color: var(--ink-3); letter-spacing: .1em; }
.games { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.g { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: rgba(83, 74, 183, .07); color: var(--ink-2); }
.g b { font-family: var(--font-display); color: var(--ink-3); }
.g b.w { color: var(--ink); }
.g.pending { background: var(--mint); color: var(--mint-ink); font-weight: 700; }
.mc-note { margin-top: 8px; font-size: 12px; color: var(--magenta); text-align: center; font-weight: 500; }

/* ---------- 積分榜 ---------- */
.stand-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stand-wrap > .placeholder { grid-column: 1 / -1; }
.stand { border-radius: 20px; padding: 16px 18px 10px; overflow: hidden; }
.stand-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.stand-head h3 { margin: 0; font-size: 20px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.stand-head span { font-size: 13px; color: var(--ink-2); }
.gdot { width: 12px; height: 12px; border-radius: 4px; }
.gdot.g-A { background: #d76ccb; }
.gdot.g-B { background: #7a90f5; }
.stand table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.stand th { font-size: 12px; font-weight: 700; color: var(--ink-3); text-align: center; padding: 6px 4px; width: 48px; }
.stand td { text-align: center; padding: 8px 4px; border-top: 1px solid var(--line); font-family: var(--font-display); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.stand th.rk, .stand td.rk { width: 34px; }
.stand th.tc, .stand td.tc { width: auto; text-align: left; font-family: var(--font); font-size: 15px; }
.stand td.tc .tm { max-width: 100%; }
.stand td.pos { color: #0f8a5f; }
.stand td.neg { color: #c2416b; }
.stand td.sub, .stand th.sub { color: var(--ink-3); }
.stand tr.q td.rk { color: var(--magenta); }
.stand tr.e.final td { opacity: .5; }
.stand sup { font-size: 10px; color: var(--magenta); }
.stand tr.cut td { padding: 0; border-top: 2px dashed var(--violet); height: 0; position: relative; }
.stand tr.cut span { position: absolute; right: 0; top: -10px; font-family: var(--font); font-size: 11px; font-weight: 700; color: var(--violet); background: #f6f3ff; padding: 1px 8px; border-radius: 999px; }
.qtag, .etag { flex: none; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.qtag { background: var(--mint); color: var(--mint-ink); }
.etag { background: rgba(34, 29, 87, .1); color: var(--ink-2); }
.stand-note, .tie-note { font-size: 13px; color: var(--ink-2); margin: 12px 2px 0; }
.tie-note { color: var(--magenta); margin: 8px 0 6px; }

/* ---------- 淘汰賽對戰樹 ---------- */
.bracket-scroll { overflow-x: auto; margin: -12px -16px; padding: 12px 16px 28px; }
.bracket { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); grid-template-rows: auto 1fr; column-gap: 40px; row-gap: 12px; min-width: 840px; }
.br-title { font-weight: 900; font-size: 17px; }
.br-title small { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.round { display: flex; flex-direction: column; justify-content: space-around; gap: 24px; }
.pair { position: relative; display: flex; flex-direction: column; gap: 16px; }
.pair::after { content: ""; position: absolute; right: -20px; top: calc(25% - 4px); bottom: calc(25% - 4px); width: 20px; border: 2px solid rgba(142, 124, 246, .55); border-left: 0; border-radius: 0 10px 10px 0; }
.pair.full { flex: 1; justify-content: space-around; gap: 0; }
.pair.full::after { top: 25%; bottom: 25%; }
.r2 .bm::before, .r3 .bm::before { content: ""; position: absolute; left: -20px; top: 50%; width: 20px; border-top: 2px solid rgba(142, 124, 246, .55); }
.fin { display: flex; flex-direction: column; justify-content: center; gap: 14px; flex: 1; }
.bm { position: relative; border-radius: 16px; padding: 8px 12px 6px; background: var(--glass-strong); border: 1px solid var(--glass-line); box-shadow: var(--shadow); }
.bm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; min-width: 0; }
.bm-row + .bm-row { border-top: 1px solid var(--line); }
.bm-row b { font-family: var(--font-display); font-size: 20px; color: var(--ink-3); min-width: 20px; text-align: right; }
.bm-row.win b { color: var(--magenta); }
.bm-row.lose .tm { opacity: .5; }
.bm-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); padding-top: 4px; border-top: 1px solid var(--line); }
.champ { border-radius: 16px; padding: 14px; text-align: center; background: rgba(255, 255, 255, .5); border: 2px dashed rgba(142, 124, 246, .5); color: var(--ink-3); }
.champ span { display: block; font-family: var(--font-display); font-size: 12px; letter-spacing: .3em; font-weight: 700; }
.champ b { display: block; font-size: 20px; font-weight: 900; }
.champ small { font-size: 12px; }
.champ.on { background: var(--grad); border: 0; color: #fff; box-shadow: 0 10px 28px rgba(142, 124, 246, .45); }

.map-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.map-chip { padding: 10px 18px; border-radius: 14px; font-weight: 700; }

/* ---------- 冠軍預測按鈕 ---------- */
.btn-pickem { background: #5865f2; color: #fff; box-shadow: 0 6px 18px rgba(88, 101, 242, .35); }
.btn-pickem:hover { background: #4752c4; }
.pk-ic { display: inline-flex; width: 18px; height: 18px; }
.pk-ic svg { width: 18px; height: 18px; }

/* ---------- MVP / FMVP ---------- */
.mvps { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.mvp { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 3px; border-radius: 999px; font-size: 13px; font-weight: 700; max-width: 100%; }
.mvp img, .mvp-ini { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; background: #e7e0ff; display: grid; place-items: center; font-size: 12px; }
.mvp-k { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; }
.mvp-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mvp-mvp { background: #fff4d6; color: #6b4a00; }
.mvp-mvp .mvp-k { background: linear-gradient(135deg, #ffd25a, #f0a52b); color: #4a3000; }
.mvp-fmvp { background: #efeaff; color: var(--ink-2); }
.mvp-fmvp .mvp-k { background: var(--violet); color: #fff; }
a.mvp:hover .mvp-n { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 響應式 ---------- */
@media (max-width: 1100px) {
  .teams { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .hero { padding: 36px 0 112px; }
  .hero-in { grid-template-columns: 1fr; gap: 20px; text-align: center; }
  .hero-logo img { max-width: 260px; }
  .hero-cta, .countdown { justify-content: center; }
  .status { justify-content: center; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .phases { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(220px, 70%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .phase { scroll-snap-align: start; }
}
@media (max-width: 700px) {
  .teams { grid-template-columns: 1fr; }
  .sec-head { margin-top: 60px; }
  .toolbar, .search, .search input { width: 100%; }
  .steps { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 8px; }
  .step { scroll-snap-align: start; padding: 16px 18px; }
  .step h3 { font-size: 18px; }
  .step p { font-size: 14px; }
  .mc-grid, .stand-wrap { grid-template-columns: 1fr; }
  .day-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .session-head .session-count { margin-left: 0; }
  .bracket { display: flex; flex-direction: column; min-width: 0; gap: 10px; }
  .br-title { margin-top: 14px; }
  .bracket .br-title:nth-child(1) { order: 1; }
  .bracket .r1 { order: 2; }
  .bracket .br-title:nth-child(2) { order: 3; }
  .bracket .r2 { order: 4; }
  .bracket .br-title:nth-child(3) { order: 5; }
  .bracket .r3 { order: 6; }
  .round, .pair, .pair.full { gap: 10px; }
  .pair::after, .r2 .bm::before, .r3 .bm::before { display: none; }
  /* 手機：比分卡改成兩隊各一行、比分靠右 */
  .mc-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "a sa" "b sb"; row-gap: 8px; }
  .mc-row .side.a { grid-area: a; }
  .mc-row .side.b { grid-area: b; justify-content: flex-start; }
  .mc-row .side.b .tm { flex-direction: row; text-align: left; }
  .mc-row .score { display: contents; }
  .mc-row .score i, .mc-row .score .vs { display: none; }
  .mc-row .score .sa { grid-area: sa; }
  .mc-row .score .sb { grid-area: sb; }
  .mc-row .score b { font-family: var(--font-display); font-size: 24px; font-weight: 700; text-align: right; }
  .games { justify-content: flex-start; }
  /* 手機：積分榜讓隊名有空間 */
  .stand { padding: 14px 12px 8px; }
  .stand th, .stand td { width: 36px; }
  .stand th:nth-child(5), .stand td:nth-child(5) { width: 54px; }
  .stand th.rk, .stand td.rk { width: 24px; }
  .stand th.sub, .stand td.sub { width: 0; padding: 0; font-size: 0; visibility: hidden; }
  .stand .qtag, .stand .etag { display: none; }
  .rule dl { grid-template-columns: 1fr; gap: 2px; }
  .rule dd { margin-bottom: 10px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .nav-in { gap: 10px; }
  .brand-name { display: none; }
  .nav-links a { padding: 6px 10px; font-size: 14px; }
  .nav .btn-live { padding: 0 12px; font-size: 14px; }
  .stat { padding: 14px 16px; }
  .stat .num { font-size: 28px; }
  .stat .unit { display: block; font-size: 12px; margin: 0 0 2px; }
  .cd { min-width: 48px; }
  .cd b { font-size: 20px; }
  .sp-row img { height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
