:root {
  --bg: #faf7f9;
  --bg-soft: #f7f2f5;
  --surface: #ffffff;
  --surface-2: #f9f5f7;
  --surface-3: #f1eaf0;
  --border: #ecdfe7;
  --border-soft: #f4e9ef;
  --text: #142433;
  --muted: #5f7285;
  --muted-2: #8ea3b5;
  --accent: #e00070;
  --accent-dim: #b00055;
  --accent-2: #406080;
  --accent-soft: #fde7f2;
  --live: #e11d48;
  --gold: #d99a06;
  --danger: #dc2626;
  --shadow: 0 8px 24px rgba(45, 22, 38, 0.08);
  --shadow-sm: 0 2px 8px rgba(45, 22, 38, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 60px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: npcc-page-out .04s ease-out both; }
::view-transition-new(root) { animation: none; opacity: 1; }
::view-transition-group(site-header),
::view-transition-group(league-nav) { animation-duration: .04s; }
@keyframes npcc-page-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: 1ms !important; }
}
/* [hidden] 要真的不顯示（有些區塊用 display:flex 會蓋掉 hidden 預設值） */
[hidden] { display: none !important; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
.container { width: min(1280px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  view-transition-name: site-header;
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 20px; letter-spacing: 0.3px; white-space: nowrap; }
.brand .logo {
  /* NPcc 是橫式組合標誌，用高度控制、寬度自適應 */
  height: 44px; width: auto; border-radius: 0;
  display: block; flex-shrink: 0;
}
.brand > span { display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
.brand > span > small { margin-top: 1px; }
.brand .word { color: var(--accent); }
.brand small { display: block; font-size: 9px; font-weight: 700; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a { padding: 8px 13px; border-radius: var(--radius-sm); color: var(--muted); font-weight: 600; font-size: 14px; transition: 0.15s; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a.active { color: var(--accent); background: var(--accent-soft); }
.nav-live { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 20px; background: rgba(225, 29, 72, 0.08); color: var(--live) !important; font-weight: 700; font-size: 13px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 1.3s infinite; }
/* 沒有進行中的比賽 = 灰點不閃 */
.live-dot.idle { background: rgba(255, 255, 255, 0.55); animation: none; box-shadow: none; }
.home-hero .live-dot.idle, .hero-eyebrow .live-dot.idle { background: rgba(255, 255, 255, 0.5); }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.6); } 50% { box-shadow: 0 0 0 6px rgba(225, 29, 72, 0); } }
.search-box { position: relative; }
.search-box input { width: 200px; padding: 8px 12px 8px 34px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; color: var(--text); transition: 0.15s; }
.search-box input::placeholder { color: var(--muted-2); }
.search-box input:focus { outline: none; border-color: var(--accent); background: #fff; }
.search-box .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.mobile-toggle { display: none; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; cursor: pointer; }

.category-strip { background: #fff; border-bottom: 1px solid var(--border); overflow-x: auto; }
.category-strip .container { display: flex; gap: 4px; padding-block: 8px; }
.category-strip a { padding: 5px 13px; border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.category-strip a:hover { color: var(--text); background: var(--surface-2); }
.category-strip a.active { color: #fff; background: var(--accent); }

.page { padding-block: 22px 56px; }
.page-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.page-title h1 { font-size: 22px; font-weight: 800; }
.page-title .sub { color: var(--muted); font-size: 13px; }
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 22px; }
.main-col, .side-col { display: flex; flex-direction: column; gap: 22px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--border-soft); background: var(--surface-2); }
.panel-head h2, .panel-head h3 { font-size: 15px; font-weight: 700; letter-spacing: 0.2px; }
.panel-head .more { font-size: 13px; color: var(--accent); font-weight: 600; }
.panel-body { padding: 8px 16px; }
.section-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; }
.section-head h2 { font-size: 19px; font-weight: 800; }
.section-head .tag { font-size: 12px; padding: 3px 9px; border-radius: 5px; background: var(--accent-soft); color: var(--accent-dim); }

.match-row { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border-soft); transition: background 0.12s; }
.match-row:last-child { border-bottom: none; }
.match-row:hover { background: var(--surface-2); margin-inline: -16px; padding-inline: 16px; border-radius: var(--radius-sm); }
.match-row .status-col { width: 78px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; }
.match-row .time { font-weight: 700; font-size: 14px; }
.match-row .date { font-size: 11px; color: var(--muted-2); }
.match-row .teams { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.team-line { display: flex; align-items: center; gap: 8px; }
.team-line .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-line.winner .name { color: var(--accent); }
.team-line .score { margin-left: auto; font-weight: 800; font-size: 16px; min-width: 28px; text-align: right; }
.team-line.winner .score { color: var(--accent); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 5px; text-transform: uppercase; letter-spacing: 0.4px; }
.badge.live { background: rgba(225, 29, 72, 0.1); color: var(--live); }
.badge.upcoming { background: rgba(14, 165, 164, 0.12); color: var(--accent-2); }
.badge.finished { background: var(--surface-3); color: var(--muted); }
.match-meta { margin-top: 7px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted-2); }
.match-meta .sep { opacity: 0.4; }
.chip { font-size: 11px; padding: 2px 7px; border-radius: 5px; background: var(--surface-3); color: var(--muted); border: 1px solid var(--border); }
.chip.tour { background: var(--accent-soft); color: var(--accent-dim); border-color: rgba(224, 0, 112, 0.25); }
.chip.warn { background: #fff3df; color: #9a5b00; border-color: #f0c98a; font-weight: 700; }

/* ===== 聯賽分頁列（照 HKPL 的膠囊分頁）：一整排橫向、當前頁實心 ===== */
/* 舊的「同組頁面」那一排（data-group-page）和上面的聯賽分頁列重複，直接收起來 */
[data-group-page] { display: none !important; }
/* 舊的 group-pills（賽程/賽果/對陣圖/排名）也和多出來的聯賽分頁列重複 → 只留聯賽分頁列 */
.group-pills { display: none !important; }
.lg-nav {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center;
  padding: 4px 0 14px;
  view-transition-name: league-nav;
}
.lg-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 13.5px; font-weight: 700;
  text-decoration: none; white-space: nowrap; transition: .15s;
}
.lg-nav a:hover { border-color: var(--accent); color: var(--accent-dim); }
.lg-nav a.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== 分段選擇（例：第四季 甲組｜乙組｜丙組）：連在一起的方框、當前實心 ===== */
.seg-row { display: flex; flex-wrap: wrap; justify-content: center; margin: 0 0 14px; }
.seg-row button {
  appearance: none; border: 1px solid var(--accent); background: var(--surface); color: var(--accent-dim);
  padding: 10px 20px; font-size: 13.5px; font-weight: 800; cursor: pointer;
}
.seg-row button + button { border-left: none; }
.seg-row button:first-child { border-radius: 8px 0 0 8px; }
.seg-row button:last-child { border-radius: 0 8px 8px 0; }
.seg-row button.active { background: var(--accent); color: #fff; }

/* ===== 篩選列（「查看：」＋一排膠囊） ===== */
/* ===== 這兩個 class 直接掛在既有 .filter-tabs 容器上，不用改 HTML ===== */
.filter-tabs.pill-row {
  display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; align-items: center;
  padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.filter-tabs.pill-row::-webkit-scrollbar { display: none; }
.filter-tabs.pill-row .filter-tab {
  border: 1px solid var(--accent); border-radius: 999px; background: var(--surface);
  color: var(--accent-dim); padding: 8px 16px; font-weight: 800; flex: 0 0 auto;
}
.filter-tabs.pill-row .filter-tab.active { background: var(--accent); color: #fff; }

/* ===== KPI 卡（聯賽統計用） ===== */
/* 分段選擇（單一大圓角框，內部用豎線分隔，不是幾個獨立膠囊）——
   例：全部 / 進行中 / 即將開始 / 賽果；即將開始 / 過往賽果 / 完整賽季 */
.filter-tabs.seg-tabs {
  display: inline-flex; align-items: stretch; gap: 0; padding: 0;
  border: 2px solid var(--accent); border-radius: 999px; overflow: hidden;
  background: var(--surface);
}
.filter-tabs.seg-tabs .filter-tab {
  border: none; border-radius: 0; background: transparent;
  color: var(--accent-dim); padding: 9px 22px; font-weight: 800; white-space: nowrap;
  flex: 1 1 auto;
}
.filter-tabs.seg-tabs .filter-tab + .filter-tab { border-left: 1px solid var(--accent); }
.filter-tabs.seg-tabs .filter-tab.active { background: var(--accent); color: #fff; }
.filter-tabs.seg-tabs .filter-tab:hover:not(.active) { background: var(--accent-soft); }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.kpi-card b { display: block; font-size: 26px; font-weight: 900; letter-spacing: -0.5px; }
.kpi-card span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }

/* ===== 直方圖（純 CSS 柱） ===== */
.hist { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding: 12px 6px 0; }
.hist .bar { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.hist .bar span { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
.hist .bar em { font-size: 11.5px; color: var(--muted); font-style: normal; }

/* ===== 排行榜三欄（頭像＋姓名＋數值） ===== */
.rank-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.rank-list { display: flex; flex-direction: column; }
.rank-list .rl-head { padding: 10px 12px; font-weight: 800; font-size: 13.5px; }
.rank-list .rl-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border-soft); font-size: 13px; }
.rank-list .rl-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-list .rl-row b { font-variant-numeric: tabular-nums; }
.rank-list .rl-row b.up { color: #1f7a4d; }
.rank-list .rl-row b.down { color: var(--danger); }

.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.live-card { position: relative; background: linear-gradient(160deg, #ffffff, #fbf4f8); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.live-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--live); }
.live-card .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.live-card .event { font-size: 12px; color: var(--muted); font-weight: 600; }
.live-card .teams { gap: 9px; }
.live-card .score { font-size: 22px; }
.live-card .game-detail { margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; border: 1px solid transparent; cursor: pointer; transition: 0.15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dim); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }

.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tab { padding: 8px 15px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; transition: 0.15s; }
.filter-tab:hover { color: var(--text); border-color: var(--muted-2); }
.filter-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.filters-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.filters-row select { padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); cursor: pointer; }

.match-hero { background: linear-gradient(180deg, #ffffff, #fbf4f8); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow-sm); }
.match-hero .context { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.match-hero .context .tour { color: var(--accent); font-weight: 700; }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; margin-block: 20px; }
.sb-team { font-weight: 800; font-size: 20px; }
.sb-team .players { display: block; font-weight: 500; font-size: 13px; color: var(--muted); margin-top: 4px; }
.sb-center .main-score { font-size: 44px; font-weight: 900; letter-spacing: 2px; line-height: 1; color: var(--accent); }
.sb-center .bo { font-size: 12px; color: var(--muted); margin-top: 6px; }
.games-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.games-table th, .games-table td { padding: 11px 14px; text-align: center; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.games-table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.games-table td.name { text-align: left; font-weight: 600; white-space: nowrap; }
.games-table td.win { color: var(--accent); font-weight: 800; }
.games-table td.total { font-weight: 900; font-size: 17px; }
.stats-list { display: flex; flex-direction: column; gap: 13px; padding: 14px 16px; }
.stat-bar-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; font-size: 13px; }
.stat-bar-row .a { text-align: right; font-weight: 700; }
.stat-bar-row .b { font-weight: 700; }
.stat-bar-row .label { text-align: center; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
.stat-track { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: var(--surface-3); overflow: hidden; display: flex; }
.stat-track .fill-a { background: var(--accent); }
.stat-track .fill-b { background: var(--accent-2); margin-left: auto; }

.ranking-table { width: 100%; border-collapse: collapse; }
.ranking-table th, .ranking-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.ranking-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.ranking-table tr:hover td { background: var(--surface-2); }
.rank-pos { font-weight: 800; color: var(--muted-2); width: 40px; }
.rank-pos.top1 { color: var(--gold); }
.rank-pos.top2 { color: #6b7280; }
.rank-pos.top3 { color: #c2702c; }
.rank-name { font-weight: 700; }
.rank-sub { font-size: 12px; color: var(--muted); }
.rank-change.up { color: var(--accent); font-weight: 700; }
.rank-change.down { color: var(--live); font-weight: 700; }
.rank-change.same { color: var(--muted-2); }

.tourney-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tourney-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: 0.15s; box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; }
.tourney-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.tourney-card .cover { height: 120px; display: flex; align-items: flex-end; padding: 14px; background: linear-gradient(135deg, #e00070, #b00055); position: relative; }
.tourney-card .cover .tour-badge { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,0.92); color: var(--accent-dim); padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.tourney-card .cover h3 { font-size: 18px; font-weight: 800; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,0.3); }
.tourney-card .info { padding: 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.tourney-card .info .row { display: flex; justify-content: space-between; }
.tourney-card .info .row b { color: var(--text); font-weight: 600; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.news-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: 0.15s; box-shadow: var(--shadow-sm); }
.news-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.news-card .thumb { height: 150px; display: grid; place-items: center; font-size: 40px; background: linear-gradient(135deg, #fde7f2, #fbd0e4); }
.news-card .body { padding: 15px; }
.news-card .meta { font-size: 12px; color: var(--muted-2); margin-bottom: 6px; }
.news-card h3 { font-size: 16px; font-weight: 700; line-height: 1.35; }
.news-card p { margin-top: 7px; font-size: 13px; color: var(--muted); }
.news-card .cat { display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 700; color: var(--accent); }
.article-body { padding: 22px; font-size: 16px; line-height: 1.75; }
.article-body p { margin-bottom: 16px; }
.article-body h2 { margin: 20px 0 10px; font-size: 20px; }

.rank-mini { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.rank-mini:last-child { border-bottom: none; }
.rank-mini .pos { font-weight: 800; color: var(--muted-2); width: 22px; }
.rank-mini .name { font-weight: 600; flex: 1; }
.rank-mini .pts { color: var(--muted); font-size: 13px; }
.news-mini { display: block; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.news-mini:last-child { border-bottom: none; }
.news-mini .t { font-weight: 600; font-size: 14px; line-height: 1.4; }
.news-mini .d { font-size: 12px; color: var(--muted-2); margin-top: 3px; }
.news-mini:hover .t { color: var(--accent); }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .big { font-size: 38px; margin-bottom: 8px; }
.site-footer { border-top: 1px solid var(--border); padding: 30px 0 44px; color: var(--muted); font-size: 13px; background: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { color: var(--text); font-size: 14px; margin-bottom: 12px; }
.footer-grid a { display: block; padding: 3px 0; color: var(--muted); }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border-soft); color: var(--muted-2); font-size: 12px; }
.disclaimer { margin-top: 8px; font-size: 11px; color: var(--muted-2); }

@media (max-width: 1020px) {
  .layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .main-nav, .search-box { display: none; }
  .mobile-toggle { display: inline-flex; margin-left: auto; }
  .scoreboard { grid-template-columns: 1fr; gap: 12px; }
  .sb-team { font-size: 17px; }
  .footer-grid { grid-template-columns: 1fr; }
}
.mobile-menu { display: none; flex-direction: column; padding: 10px 16px 16px; gap: 4px; border-top: 1px solid var(--border); background: #fff; }
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 10px 8px; font-weight: 600; border-bottom: 1px solid var(--border-soft); }
/* ===== Team crests & player monograms ===== */
.crest { display: inline-block; border-radius: 50%; object-fit: cover; vertical-align: middle; background: #121a24; }
.crest-sm { width: 24px; height: 24px; }
.crest-md { width: 34px; height: 34px; }
.crest-lg { width: 60px; height: 60px; }
.crest-xl { width: 86px; height: 86px; }
.mono { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 800; letter-spacing: .3px; flex-shrink: 0; }
.mono-sm { width: 24px; height: 24px; font-size: 10px; }
.mono-md { width: 34px; height: 34px; font-size: 13px; }
.mono-lg { width: 60px; height: 60px; font-size: 21px; }
.mono-xl { width: 86px; height: 86px; font-size: 30px; }
.mono-stack { display: inline-flex; }
.mono-stack .mono + .mono { margin-left: -9px; box-shadow: 0 0 0 2px #fff; }
.side { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.side .names { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-link { font-weight: 600; }
.player-link:hover { color: var(--accent); text-decoration: underline; }
.slash { color: var(--muted-2); }
.team-name { font-weight: 700; }

/* ===== Discipline (3+2) layout ===== */
.disc-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.disc-card { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 17px 14px 14px; box-shadow: var(--shadow-sm); transition: 0.15s; }
.disc-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent); }
.disc-card.singles::after { background: #406080; }
.disc-card:hover { border-color: var(--muted-2); transform: translateY(-2px); }
.disc-group { display: grid; gap: 14px; }
.disc-group.doubles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.disc-group.singles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.disc-group-head { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; }
.disc-group-head .lbl { font-size: 11px; font-weight: 800; letter-spacing: 0.7px; text-transform: uppercase; }
.disc-group-head .lbl.doubles { color: var(--accent-dim); }
.disc-group-head .lbl.singles { color: #10305c; }
.disc-group-head .line { flex: 1; height: 1px; background: var(--border); }
.disc-group-head .num { font-size: 12px; color: var(--muted); font-weight: 600; }
.disc-title { font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.disc-empty { font-size: 13px; color: var(--muted); padding: 6px 0; }
.disc-card .disc-more { display: inline-block; margin-top: 9px; font-size: 12px; font-weight: 700; color: var(--accent); }
.disc-card.singles .disc-more { color: #10305c; }
@media (max-width: 700px) {
  .disc-group.doubles, .disc-group.singles { grid-template-columns: 1fr; }
}
.disc-card .disc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.disc-card .disc-top .count { margin-left: auto; font-size: 12px; color: var(--muted); }
.disc-badge { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 5px; letter-spacing: .4px; }
.disc-badge.doubles { background: var(--accent-soft); color: var(--accent-dim); }
.disc-badge.singles { background: #f7f2f8; color: #10305c; }
.disc-card .disc-match { display: block; padding: 8px 0; border-bottom: 1px solid var(--border-soft); cursor: pointer; }
.disc-card .disc-match .dm-row { display: flex; align-items: center; gap: 6px; }
.disc-card .disc-match .dm-score { margin-left: auto; font-weight: 800; font-size: 13px; }
.disc-card .disc-match .dm-names { display: block; margin-top: 5px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.disc-card .disc-match:hover .dm-names { color: var(--accent); }
.disc-card .disc-match .dm-badges { display: inline-flex; }
.disc-card .disc-match .dm-badges > * + * { margin-left: -7px; box-shadow: 0 0 0 2px #fff; }
.disc-card .disc-match:last-of-type { border-bottom: none; }


.group { margin-bottom: 22px; }
.group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.group-head h2 { font-size: 17px; font-weight: 800; }
.group-head .pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--accent-soft); color: var(--accent-dim); }
.group-head .pill.singles { background: #f7f2f8; color: #10305c; }
.group-head .pill.team { background: #fdf3e3; color: #b45309; }

/* ===== Player ability cards ===== */
.player-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; padding: 14px 16px; }
.pcard { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; background: #fff; }
.pcard-head { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.pcard-head .nm { font-weight: 800; font-size: 14px; }
.pcard-head .ct { font-size: 12px; color: var(--muted); }
.attr-row { display: grid; grid-template-columns: 86px 1fr 30px; gap: 8px; align-items: center; font-size: 12px; margin-bottom: 7px; }
.attr-row .lbl { color: var(--muted); }
.attr-track { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.attr-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), #f7a8cd); }
.attr-row .val { text-align: right; font-weight: 700; }
.style-tag { display: inline-block; margin-top: 9px; font-size: 11px; font-weight: 600; color: var(--accent-dim); background: var(--accent-soft); padding: 3px 8px; border-radius: 5px; }

/* ===== Player page ===== */
.player-hero { background: linear-gradient(180deg, #fff, #fbf4f8); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.player-hero .info h1 { font-size: 26px; font-weight: 900; }
.player-hero .meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.player-hero .meta b { color: var(--text); }
.wl-chip { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px; font-size: 12px; font-weight: 800; }
.wl-chip.w { background: var(--accent-soft); color: var(--accent-dim); }
.wl-chip.l { background: #fdecef; color: var(--live); }
.wl-row { display: flex; gap: 6px; margin-top: 6px; }

.stat-table { width: 100%; border-collapse: collapse; }
.stat-table th, .stat-table td { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); font-size: 13px; text-align: left; }
.stat-table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .4px; background: var(--surface-2); }
.stat-table td.num, .stat-table th.num { text-align: right; }
.stat-table tr:hover td { background: var(--surface-2); }
.player-cell { display: flex; align-items: center; gap: 8px; }

/* stat comparison */
.vs-legend { display: flex; justify-content: space-between; padding: 10px 16px 0; font-size: 12px; font-weight: 700; }
.vs-legend .a { color: var(--accent-dim); }
.vs-legend .b { color: var(--accent-2); }
/* ===== Register nav CTA ===== */
.main-nav a.cta { background: var(--accent); color: #fff; }
.main-nav a.cta:hover { background: var(--accent-dim); color: #fff; }
.main-nav a.cta.active, .main-nav a.cta.active:hover { background: var(--accent-dim); color: #fff; }

/* ===== Registration form ===== */
.form-section { padding: 20px; border-top: 1px solid var(--border-soft); }
.form-section:first-of-type { border-top: none; }
.form-section h2 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.form-section .form-note { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field .req { color: var(--live); }
.field input, .field select, .field textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; width: 100%;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 0, 112, 0.14);
}
.field .hint { font-size: 11px; color: var(--muted-2); }

.disc-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 12px; }

/* ---- event entry: tournament cards + entry form (enter.html) ---- */
.entry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.entry-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.entry-card .row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.entry-card h3 { font-size: 17px; margin: 0; }
.entry-card .meta { color: var(--muted); font-size: 13px; }
.entry-card .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.entry-card > .btn { align-self: flex-start; margin-top: 2px; }
@media (max-width: 700px) { .entry-grid { grid-template-columns: 1fr; } }
.disc-opt { position: relative; border: 2px solid var(--border); border-radius: 12px; padding: 13px 14px; cursor: pointer; background: #fff; transition: 0.15s; display: block; }
.disc-opt:hover { border-color: var(--muted-2); }
.disc-opt.selected { border-color: var(--accent); background: var(--accent-soft); }
.disc-opt input { position: absolute; opacity: 0; pointer-events: none; }
.disc-opt .t { display: block; font-weight: 800; font-size: 14px; }
.disc-opt .d { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.disc-opt .tick { position: absolute; top: 10px; right: 12px; font-weight: 900; color: var(--accent); opacity: 0; }
.disc-opt.selected .tick { opacity: 1; }

.partner-block { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; background: var(--surface-2); }
.partner-block h3 { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.partner-block[hidden] { display: none; }

.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; margin-bottom: 10px; line-height: 1.5; }
.check-row input { margin-top: 3px; flex-shrink: 0; }

.summary-box { background: var(--accent-soft); border: 1px solid rgba(224, 0, 112, 0.25); border-radius: 12px; padding: 14px 16px; font-size: 13px; }
.summary-box h3 { font-size: 14px; font-weight: 800; margin-bottom: 8px; }
.summary-box ul { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.summary-box li { display: flex; justify-content: space-between; gap: 10px; }
.summary-box .empty-line { color: var(--muted); }
.form-actions { display: flex; gap: 10px; padding: 18px 20px; border-top: 1px solid var(--border-soft); background: var(--surface-2); flex-wrap: wrap; }
.form-error { display: none; margin: 0 20px 0; padding: 11px 14px; border-radius: 10px; background: #fdecef; color: #b91c3c; font-size: 13px; font-weight: 600; }
.form-error.show { display: block; }
.reg-hero { background: linear-gradient(180deg, #fff, #fbf4f8); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.reg-hero h1 { font-size: 24px; font-weight: 900; }
.reg-hero p { color: var(--muted); margin-top: 6px; }
.reg-hero .chips { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.success-card { max-width: 620px; margin: 40px auto; text-align: center; }
.success-card .tick { width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 30px; margin: 0 auto 16px; }
.success-card h1 { font-size: 24px; font-weight: 900; margin-bottom: 10px; }
.success-card p { color: var(--muted); }
.ref-code { display: inline-block; margin-top: 12px; padding: 8px 14px; border-radius: 9px; background: var(--surface-2); border: 1px dashed var(--border); font-weight: 800; letter-spacing: 1px; }
/* ===== Horizontal scroller with arrows ===== */
.scroller { position: relative; }
.scroll-track {
  display: flex; gap: 14px; align-items: stretch;
  overflow-x: auto; overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
}
.scroll-track > * { flex: 0 0 auto; }
.scroll-track .disc-group { display: flex; gap: 14px; }
.scroll-track .disc-card { display: flex; flex-direction: column; flex: 0 0 252px; width: 252px; }
.scroll-track .disc-card .disc-more { margin-top: auto; padding-top: 10px; }
.scroll-track .live-card { flex: 0 0 282px; width: 282px; }
.scroll-track .tourney-card { flex: 0 0 300px; width: 300px; }
.scroll-track .pcard { flex: 0 0 258px; width: 258px; }
.scroll-track::-webkit-scrollbar { height: 8px; }
.scroll-track::-webkit-scrollbar-track { background: transparent; }
.scroll-track::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
.scroll-track::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }
.scroll-btn {
  position: absolute; top: calc(50% - 8px); transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(45, 22, 38, 0.16);
  display: grid; place-items: center; cursor: pointer; z-index: 4;
  font-size: 20px; line-height: 1; color: var(--text); padding-bottom: 2px;
  transition: 0.15s;
}
.scroll-btn:hover:not([disabled]) { background: var(--accent); border-color: var(--accent); color: #fff; }
.scroll-btn[disabled] { opacity: 0.28; cursor: default; }
.scroll-btn.prev { left: -9px; }
.scroll-btn.next { right: -9px; }
.track-sep { flex: 0 0 1px !important; align-self: stretch; background: var(--border); margin-inline: 6px; }
@media (max-width: 700px) {
  .scroll-track .disc-card { flex: 0 0 232px; width: 232px; }
}
/* team cards inside scroller */
.scroll-track .team-card { display: flex; flex-direction: row; align-items: center; gap: 12px; flex: 0 0 240px; width: 240px; }
/* keep grid columns from being stretched by wide scroll tracks */
.layout > .main-col, .layout > .side-col { min-width: 0; }
.main-col, .side-col { min-width: 0; }.scroll-track .news-card { flex: 0 0 300px; width: 300px; }
/* ===== PPR rating visuals ===== */
.ppr-badge { margin-left: auto; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 9px; flex-shrink: 0; }
.pcard-radar { display: flex; justify-content: center; margin: 2px 0 12px; }
.radar-chart { display: block; max-width: 100%; height: auto; }
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 20px; padding: 18px; align-items: center; }
@media (max-width: 760px) { .profile-grid { grid-template-columns: 1fr; } }
.formula-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.formula-table th, .formula-table td { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); text-align: left; }
.formula-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); background: var(--surface-2); }
.formula-table td.num, .formula-table th.num { text-align: right; }
.formula-code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; line-height: 1.6; overflow-x: auto; color: var(--text); }
.note { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
/* ===== Match page: side-by-side ability comparison ===== */
.vs-compare { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(300px, 1.25fr) minmax(190px, 1fr); gap: 18px; padding: 18px; align-items: start; }
@media (max-width: 980px) { .vs-compare { grid-template-columns: 1fr; } }
.vs-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vs-side-head { font-size: 11.5px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); padding-bottom: 9px; border-bottom: 1px solid var(--border-soft); }
.vs-side.right .vs-side-head { text-align: right; }
.vs-player { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; cursor: pointer; transition: 0.15s; font: inherit; color: inherit; }
.vs-player:hover { border-color: var(--muted-2); }
.vs-player.selected { border-color: var(--accent); background: var(--accent-soft); }
.vs-side.right .vs-player { flex-direction: row-reverse; text-align: right; }
.vs-side.right .vs-player.selected { border-color: #10305c; background: #f7f2f8; }
.vs-player .vsp-info { flex: 1; min-width: 0; }
.vs-player .vsp-name { display: block; font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-player .vsp-meta { font-size: 11.5px; color: var(--muted); }
.vs-player .vsp-score { font-weight: 800; font-size: 15px; color: var(--accent-dim); flex-shrink: 0; }
.vs-side.right .vs-player .vsp-score { color: #10305c; }
.vs-center { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.vs-legend { display: flex; gap: 18px; font-size: 12.5px; font-weight: 700; flex-wrap: wrap; justify-content: center; }
.vs-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vs-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.vs-legend .a { color: var(--accent-dim); }
.vs-legend .b { color: #10305c; }
.vs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.vs-table th, .vs-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-soft); text-align: center; }
.vs-table th { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); }
.vs-table td.attr { text-align: left; color: var(--muted); font-weight: 600; }
.vs-table .a { color: var(--accent-dim); font-weight: 800; }
.vs-table .b { color: #10305c; font-weight: 800; }
.vs-empty { font-size: 12.5px; color: var(--muted); padding: 8px 0; }
/* ===== icon links ===== */
.badge-link { display: inline-flex; text-decoration: none; border-radius: 50%; }
.badge-link:hover .crest, .badge-link:hover .mono { box-shadow: 0 0 0 2px var(--accent); }
.badge-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.row-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.row-link:hover .name { color: var(--accent-dim); }
.team-hero { background: linear-gradient(180deg, #ffffff, #fbf4f8); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.team-hero h1 { font-size: 26px; font-weight: 900; }
.team-hero .meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--muted); }
.team-hero .meta b { color: var(--text); }
/* ===== Bracket (overall schedule view) ===== */
.bracket-shell { background: linear-gradient(135deg, #10305c, #e00070); border-radius: 16px; padding: 22px 20px; overflow-x: auto; }
.bracket { display: flex; gap: 22px; align-items: center; min-width: max-content; }
.bracket-col { display: flex; flex-direction: column; justify-content: center; gap: 16px; width: 240px; flex: 0 0 240px; }
.bracket-col h3 { text-align: center; font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: #ffffff; margin-bottom: 2px; opacity: 0.95; }
.bracket-col.center h3 { font-size: 13px; }
.bracket-match { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 18px rgba(4, 30, 55, 0.22); cursor: pointer; transition: 0.15s; }
.bracket-match:hover { transform: translateY(-2px); }
.bracket-side { display: flex; align-items: center; gap: 9px; padding: 10px 12px; min-height: 46px; }
.bracket-side + .bracket-side { border-top: 2px solid #142433; }
.bracket-side.win { background: #fde7f2; }
.bracket-side .bs-name { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bracket-side .bs-sub { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.bracket-side.lose { opacity: 0.62; }
.bracket-vs { text-align: center; font-size: 11px; font-weight: 800; color: #fff; background: #142433; padding: 3px 0; letter-spacing: 1px; }
.bracket-champion { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; width: 240px; flex: 0 0 240px; }
.bracket-champion .cup { width: 74px; height: 74px; border-radius: 50%; background: #f5c542; display: grid; place-items: center; font-size: 34px; box-shadow: 0 8px 22px rgba(4, 30, 55, 0.25); }
.bracket-champion .who { color: #fff; font-weight: 800; font-size: 13.5px; text-align: center; }
.bracket-third { margin-top: 20px; display: flex; align-items: center; gap: 14px; justify-content: center; flex-wrap: wrap; }
.bracket-third .lbl { color: #fff; font-weight: 800; font-size: 12px; letter-spacing: 0.5px; text-transform: uppercase; }
.bracket-third .bracket-match { width: 300px; }

/* bracket per discipline */
.disc-block { margin-bottom: 28px; }
/* ===== HKPL-style rating cards & insights ===== */
.rate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding: 16px; }
.rate-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 15px; box-shadow: var(--shadow-sm); }
.rate-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.rate-card-head .rel { text-transform: none; letter-spacing: 0; color: var(--muted-2); font-weight: 600; white-space: nowrap; }
.rate-value { font-size: 36px; font-weight: 900; color: var(--accent-dim); line-height: 1.05; margin: 8px 0 10px; }
.rate-value small { font-size: 14px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.rate-track { display: block; height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.rate-fill { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); }
.rate-track.rel { height: 5px; }
.rate-track.rel .rate-fill { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }
.rate-meta { font-size: 12px; color: var(--muted); margin-top: 9px; }
.insight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; padding: 14px 16px; }
.insight { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: #fff; }
.insight .t { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.insight .v { font-weight: 700; font-size: 14px; }
.insight .v a { color: inherit; }
.insight .sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.tl-tabs { display: flex; gap: 6px; padding: 12px 16px 0; }
.form-list { display: flex; flex-direction: column; gap: 0; }
.form-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.form-row:last-child { border-bottom: none; }
.form-row .opp { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.form-row .sc { font-weight: 700; }
.form-row .dl { font-weight: 800; width: 56px; text-align: right; }
.form-row .dl.up { color: var(--accent-dim); }
.form-row .dl.down { color: var(--live); }
.form-row .dt { color: var(--muted-2); font-size: 11.5px; width: 74px; }
/* ===== Mobile ===== */
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .container { width: calc(100% - 22px); }
  .page { padding-block: 16px 42px; }
  .page-title { flex-wrap: wrap; gap: 8px; }
  .page-title h1 { font-size: 19px; }
  .page-title .sub { width: 100%; }
  .page-title .btn { width: 100%; justify-content: center; margin-left: 0 !important; }
  .panel-head { padding: 11px 13px; flex-wrap: wrap; gap: 6px; }
  .panel-body { padding: 6px 13px; }
  .section-head { flex-wrap: wrap; gap: 8px; }
  .section-head h2 { font-size: 17px; }
  .match-hero, .reg-hero, .player-hero, .team-hero { padding: 16px; }
  .sb-team { font-size: 16px; }
  .sb-center .main-score { font-size: 34px; }
  .rate-grid, .insight-grid { padding: 13px; }
  .rate-value { font-size: 30px; }
  .bracket-shell { padding: 16px 12px; border-radius: 12px; }
  .bracket-col, .bracket-champion { width: 208px; flex: 0 0 208px; }
  .vs-side.right .vs-player { flex-direction: row; text-align: left; }
  .vs-side.right .vs-side-head { text-align: left; }
  .form-row .dt { width: 56px; }
  .form-row .dl { width: 46px; }
  .footer-grid { gap: 18px; }
  .mobile-menu a { padding: 12px 8px; }
  .scroll-btn { width: 32px; height: 32px; font-size: 17px; }
  .scroll-btn.prev { left: -6px; }
  .scroll-btn.next { right: -6px; }
  .disc-group-head .line { display: none; }
  /* wide tables scroll inside themselves instead of pushing the page sideways */
  .page table { display: block; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .page table::-webkit-scrollbar { height: 6px; }
  .page table::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
}
@media (max-width: 480px) {
  .brand small { display: none; }
}
@media (max-width: 420px) {
  .brand { font-size: 17px; }
  .brand .logo { height: 38px; }
  .brand small { display: none; }
  .match-row .status-col { width: 60px; }
  .team-line .score { font-size: 15px; }
  .search-box input { width: 100%; }
  .rate-value { font-size: 27px; }
}
/* =====================================================================
   HKPL-INSPIRED TEMPLATE LAYER
   Layout & typography follow the HKPL design contract:
   display type = Akshar, body = Albert Sans, fluid clamp type scale,
   radius ladder 6/10/14/24, uppercase tracked eyebrows, dark ink footer.
   ===================================================================== */
:root {
  --font-display: 'Akshar', 'Albert Sans', 'Segoe UI', sans-serif;
  --font-body: 'Albert Sans', 'Noto Sans TC', -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  --fs-xs: clamp(.72rem, .70rem + .10vw, .78rem);
  --fs-sm: clamp(.82rem, .79rem + .15vw, .90rem);
  --fs-base: clamp(.95rem, .90rem + .22vw, 1.02rem);
  --fs-lg: clamp(1.10rem, 1.00rem + .40vw, 1.25rem);
  --fs-xl: clamp(1.40rem, 1.18rem + .80vw, 1.80rem);
  --fs-2xl: clamp(1.80rem, 1.40rem + 1.6vw, 2.60rem);

  --u: 4px;
  --space-1: var(--u); --space-2: calc(var(--u) * 2); --space-3: calc(var(--u) * 3);
  --space-4: calc(var(--u) * 4); --space-5: calc(var(--u) * 5); --space-6: calc(var(--u) * 6);

  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 24px; --r-pill: 999px;
  --radius: var(--r-lg);
  --radius-sm: var(--r-md);
  --ink: #10305c;      /* logo navy — used by the footer and dark buttons */
  --lh-tight: 1.15;
}

body { font-family: var(--font-body); font-size: var(--fs-base); }

/* ---- display typography ---- */
.brand, .page-title h1, .section-head h2, .panel-head h2, .panel-head h3,
.player-hero h1, .team-hero h1, .reg-hero h1, .success-card h1, .article-body h1,
.rate-value, .sb-center .main-score, .kpi-num, .group-head h2,
.bracket-col h3, .bracket-champion .who, .insight .v, .rank-name {
  font-family: var(--font-display);
  letter-spacing: -0.005em;
  line-height: var(--lh-tight);
}
.page-title h1 { font-size: var(--fs-2xl); font-weight: 800; }
.section-head h2 { font-size: var(--fs-xl); font-weight: 700; }
.panel-head h2, .panel-head h3 { font-size: var(--fs-lg); font-weight: 700; }
.player-hero h1, .team-hero h1, .reg-hero h1 { font-size: var(--fs-2xl); font-weight: 800; }
.rate-value { font-weight: 700; }
.kpi-num, .sb-center .main-score { font-weight: 800; }

/* ---- uppercase tracked eyebrows (HKPL label style) ---- */
.chip.tour, .tag, .disc-badge, .pill, .rate-card-head, .insight .t, .eyebrow,
.vs-side-head, .formula-table th, .stat-table th, .ranking-table th,
.admin-table th, .games-table th, .vs-table th, .footer-grid h4,
.kpi-lbl, .group-head .pill {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.10em;
  font-weight: 700;
}
.page-title .sub, .panel-head .more { font-size: var(--fs-sm); }

/* ---- radius ladder ---- */
.panel, .live-card, .disc-card, .tourney-card, .news-card, .pcard, .rate-card,
.insight, .match-hero, .reg-hero, .player-hero, .team-hero, .summary-box,
.partner-block, .formula-code, .info-strip, .bracket-match, .success-card {
  border-radius: var(--r-lg);
}
.btn, .filter-tab, .subtab, .scroll-btn { border-radius: var(--r-pill); }
.btn-primary, .btn-ghost { border-radius: var(--r-pill); }
.live-card, .match-hero, .reg-hero, .player-hero, .team-hero { border-radius: var(--r-xl); }
.field input, .field select, .field textarea, .filters-row select,
.admin-table input, .admin-table select, .admin-table textarea, .grid input, .grid select {
  border-radius: var(--r-md);
}

/* ---- section rhythm ---- */
.page { padding-block: var(--space-6) 64px; }
.section-head { margin-bottom: var(--space-4); }
.panel + .panel, .section-head + .panel { margin-top: 0; }

/* ---- KPI band ---- */
.kpi-band { background: linear-gradient(135deg, var(--accent-dim), var(--accent)); color: #fff; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); padding: 30px 0; }
.kpi-num { font-size: var(--fs-2xl); font-weight: 800; }
.kpi-lbl { opacity: .82; margin-top: 4px; }
@media (max-width: 700px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); padding: 22px 0; }
}

/* ---- segmented tab control (HKPL bordered switcher) ---- */
.filter-tabs {
  border: 2px solid var(--accent);
  border-radius: var(--r-pill);
  overflow: hidden;
  display: inline-flex;
  gap: 0;
  background: #fff;
  max-width: 100%;
}
.filter-tab {
  border: none; border-radius: 0; background: transparent; color: var(--accent-dim);
  padding: 8px 16px; font-weight: 700;
}
.filter-tab + .filter-tab { border-left: 2px solid var(--accent); }
.filter-tab:hover { background: var(--accent-soft); color: var(--accent-dim); }
.filter-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
@media (max-width: 700px) {
  .filter-tabs { display: flex; width: 100%; overflow-x: auto; border-radius: var(--r-lg); }
  .filter-tab { flex: 0 0 auto; padding: 8px 13px; }
}

/* ---- toolbar card (schedule / results / bracket controls) ---- */
.toolbar {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(180deg, #ffffff, #f6fbff);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 13px 15px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.toolbar-stack { flex-direction: column; align-items: stretch; gap: 11px; }
.toolbar-row { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; width: 100%; }
.toolbar-spacer { flex: 0 0 16px; }
.toolbar select {
  padding: 9px 14px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-pill); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer;
}
.toolbar select:hover { border-color: var(--accent); }
.toolbar .btn { padding: 9px 16px; font-size: 13px; }
@media (max-width: 700px) {
  .toolbar { padding: 12px; gap: 10px; }
  .toolbar .btn { flex: 1 1 auto; text-align: center; justify-content: center; }
}

/* ---- dark ink footer ---- */
.site-footer {
  background: var(--ink);
  color: #cbd5e1;
  border-top: none;
  padding: 44px 0 0;
}
.footer-grid h4 { color: #fff; }
.footer-grid a { color: #94a3b8; }
.footer-grid a:hover { color: #fff; }
.footer-grid p { color: #94a3b8; }
.site-footer .disclaimer { color: #64748b; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); color: #64748b; margin-top: 30px; padding: 20px 0 34px; }

/* ---- cards: softer, HKPL rounded-3xl feel where it reads as a feature card ---- */
.live-card, .tourney-card, .news-card { box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06); }
.disc-card::after { height: 4px; }

/* ---- buttons ---- */
.btn { padding: 9px 18px; font-weight: 700; }
.btn-primary { background: var(--accent); box-shadow: 0 2px 10px rgba(224, 0, 112, 0.28); }
.btn-primary:hover { background: var(--accent-dim); }
/* timeline switcher sits outside .filter-tabs, give it its own border */
.tl-tabs .filter-tab { border: 2px solid var(--accent); border-radius: var(--r-pill); padding: 6px 14px; }
.tl-tabs .filter-tab + .filter-tab { border-left: 2px solid var(--accent); margin-left: 6px; }
.tl-tabs .filter-tab.active { background: var(--accent); color: #fff; }

/* keep plain chips normal case but smaller */
.chip { font-size: var(--fs-xs); }
.tag, .pill { letter-spacing: 0.10em; }
/* ===== HKPL-style date-grouped lists ===== */
.day-head { display: flex; align-items: center; gap: 12px; margin: 22px 0 10px; }
.day-head:first-child { margin-top: 0; }
.day-head h3 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; }
.day-count { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 3px 10px; border-radius: var(--r-pill); }
.day-head::after { content: ""; flex: 1; height: 1px; background: var(--border-soft); }
/* ===== page header (HKPL pattern: title + subtitle + actions) ===== */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 800; }
.page-head .sub { color: var(--muted); font-size: var(--fs-sm); margin-top: 4px; max-width: 60ch; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-head-solo { justify-content: center; }
@media (max-width: 700px) {
  .page-head { align-items: flex-start; }
  .page-head h1 { font-size: var(--fs-xl); }
  .page-head-actions { width: 100%; }
  .page-head-actions .btn { flex: 1 1 auto; justify-content: center; }
}
/* ===== HKPL-style league table ===== */
.lg-table th.num, .lg-table td.num { text-align: right; }
.lg-table td.pos { color: var(--accent-dim); font-weight: 700; }
.lg-table td.neg { color: var(--live); font-weight: 700; }
.lg-table tr:hover td { background: var(--surface-2); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
/* ===== team grid (clubs page) ===== */
.team-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.team-grid .team-card { display: flex; align-items: center; gap: 16px; padding: 13px 18px; }
.team-grid .team-card-top { flex: 1 1 auto; margin: 0; }
.team-grid .team-card-stats { display: flex; gap: 20px; align-items: center; margin-left: auto; flex: 0 0 auto; }
.team-grid .team-card-stats > * { white-space: nowrap; }
@media (max-width: 720px) {
  .team-grid .team-card { flex-wrap: wrap; }
  .team-grid .team-card-stats { width: 100%; margin-left: 0; }
}
.team-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--r-xl); padding: 16px; box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; transition: 0.15s; }
.team-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.team-card-top { display: flex; align-items: center; gap: 12px; }
.team-card-name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); }
.team-card-city { font-size: var(--fs-xs); color: var(--muted); }
.team-card-pos { margin-left: auto; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 800; color: var(--accent-dim); }
.team-card-stats { display: flex; gap: 16px; margin: 14px 0 12px; padding: 10px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.team-card-stats b { display: block; font-family: var(--font-display); font-size: var(--fs-base); color: var(--text); letter-spacing: 0; text-transform: none; }
.team-card-roster { display: flex; flex-direction: column; gap: 6px; }
.team-chip { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); font-weight: 600; }
/* ===== language switcher (top-right, HKPL style) ===== */
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--r-pill);
  font-weight: 800; font-size: var(--fs-xs); letter-spacing: 0.08em;
  color: var(--muted); cursor: pointer; transition: 0.15s; white-space: nowrap;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent-dim); background: var(--accent-soft); }
.lang-switch.open .lang-btn { border-color: var(--accent); color: var(--accent-dim); background: var(--accent-soft); }
.lang-globe { opacity: 0.75; }
.lang-caret { font-size: 9px; opacity: 0.7; }
.lang-menu {
  position: absolute; top: calc(100% + 10px); right: 0; width: 232px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  padding: 6px; z-index: 80;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-opt {
  display: grid; grid-template-columns: 38px 1fr 18px; align-items: center; gap: 10px;
  width: 100%; padding: 9px 10px; margin: 0;
  border: none; background: transparent; border-radius: var(--r-md);
  cursor: pointer; text-align: left; transition: background 0.12s;
}
.lang-opt:hover { background: var(--surface-2); }
.lang-opt.active { background: var(--accent-soft); }
.lang-code {
  display: grid; place-items: center; height: 28px; border-radius: 8px;
  background: var(--surface-3); color: var(--muted);
  font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.04em;
  transition: 0.12s;
}
.lang-opt.active .lang-code { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(224, 0, 112, 0.35); }
.lang-opt:hover .lang-code { background: var(--accent); color: #fff; }
.lang-name { display: block; font-family: var(--font-body); font-weight: 700; font-size: var(--fs-sm); color: var(--text); letter-spacing: 0; text-transform: none; }
.lang-region { display: block; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0; text-transform: none; }
.lang-check { color: var(--accent); font-weight: 900; opacity: 0; transition: 0.12s; }
.lang-opt.active .lang-check { opacity: 1; }
@media (max-width: 720px) {
  .lang-switch { margin-left: auto; }
  .lang-btn { padding: 7px 10px; gap: 5px; }
  .lang-cur { display: none; }
  .mobile-toggle { margin-left: 8px !important; }
  .lang-menu { right: -4px; width: 220px; }
}
/* ===== header responsiveness with 8 nav items + language switcher ===== */
@media (max-width: 1200px) {
  .main-nav a { padding: 8px 10px; font-size: 13px; }
}
@media (max-width: 1100px) {
  .search-box { display: none; }
}
@media (max-width: 980px) {
  .main-nav { display: none; }
  .mobile-toggle { display: inline-flex !important; margin-left: 10px !important; }
  .lang-switch { margin-left: auto; }
}
@media (max-width: 720px) {
  .lang-cur { display: none; }
  .lang-menu { right: -4px; width: 220px; }
}
/* ===== HKPL-style header actions + mega menu + hero CTAs ===== */
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-actions .bell-panel { position: fixed; top: 66px; right: 16px; }
.hdr-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-pill); font-weight: 700; font-size: var(--fs-xs);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  cursor: pointer; transition: 0.15s; white-space: nowrap;
}
.hdr-btn:hover { border-color: var(--accent); color: var(--accent-dim); background: var(--accent-soft); }
.hdr-btn.active { border-color: var(--accent); color: var(--accent-dim); background: var(--accent-soft); }
.hdr-btn svg { opacity: 0.85; }
.hdr-signin { padding: 8px 16px; font-size: var(--fs-sm); }

/* ===== 消息鈴鐺（右上角） ===== */
.hdr-bell { position: relative; padding: 8px 11px; }
.hdr-bell.open { border-color: var(--accent); color: var(--accent-dim); background: var(--accent-soft); }
.bell-badge {
  position: absolute; top: -6px; right: -8px;
  min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  display: grid; place-items: center;        /* 數字在紅點的幾何中心 */
  background: var(--live); color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 999px; box-shadow: 0 2px 6px rgba(225, 29, 72, 0.4);
  line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.bell-badge[hidden], .hdr-bell[hidden] { display: none !important; }
.bell-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 70;
  width: min(420px, calc(100vw - 24px)); max-height: 70vh; overflow: auto;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: 0 20px 50px rgba(20, 36, 51, 0.18); padding: 10px;
}
.bell-head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 8px; flex-wrap: wrap; }
.bell-head b { font-size: 14px; white-space: nowrap; }
.bell-head .btn, .bell-head .chipst { white-space: nowrap; }
.bell-list { display: flex; flex-direction: column; }
.bell-item { display: flex; gap: 9px; align-items: flex-start; padding: 10px 8px; border-top: 1px solid var(--border-soft); border-radius: 10px; }
.bell-item.unread { background: var(--accent-soft); }
.bell-item .ic { font-size: 16px; line-height: 1.25; }
.bell-item .tx { flex: 1 1 auto; min-width: 0; }
.bell-item .t { font-size: 13px; }
.bell-item.unread .t { font-weight: 700; }
.bell-item .d { font-size: 11px; color: var(--muted); padding-top: 3px; }
.bell-item .acts { display: flex; gap: 6px; flex: 0 0 auto; }
.bell-item .acts .btn, .bell-item > .btn { white-space: nowrap; flex: 0 0 auto; }
.bell-empty { padding: 22px 8px; color: var(--muted); font-size: 13px; text-align: center; }
.bell-foot { padding: 10px 4px 2px; border-top: 1px solid var(--border-soft); font-size: 13px; font-weight: 700; }
.bell-foot a { color: var(--accent-dim); }

.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
  max-height: 0; overflow: hidden; opacity: 0; visibility: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease, visibility 0.2s;
  z-index: 70;
}
.mega.open { max-height: 560px; opacity: 1; visibility: visible; overflow-y: auto; }
.mega-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 26px; padding: 26px 0 30px; }
.mega-col { display: flex; flex-direction: column; }
.mega-col h4 {
  display: flex; align-items: flex-end; min-height: 32px;
  font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-dim);
  padding-bottom: 9px; margin-bottom: 8px; border-bottom: 2px solid var(--accent-soft);
}
.mega-col h4 a {
  display: inline; padding: 0; border-bottom: none; color: inherit; background: none;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
}
.mega-col h4 a:hover { color: var(--accent); padding-left: 0; }
.mega-col > a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; font-size: var(--fs-sm); font-weight: 600; color: var(--text);
  border-bottom: 1px solid var(--border-soft); transition: 0.12s;
}
.mega-col > a:last-child { border-bottom: none; }
.mega-col > a:hover { color: var(--accent-dim); padding-left: 4px; }
.mega-col > a .ic { color: var(--muted-2); display: inline-flex; }
.site-header { position: sticky; }
.site-header.mega-open { background: #fff; }

/* hero CTAs on the homepage */
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.hero-cta .btn { padding: 12px 22px; font-size: var(--fs-base); }
.hero-cta .btn-ghost { background: #fff; }
.hero-band {
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  color: #fff; border-radius: var(--r-xl); padding: 30px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  box-shadow: 0 12px 32px rgba(224, 0, 112, 0.25);
}
.hero-band h1 { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 800; color: #fff; }
.hero-band p { opacity: 0.92; margin-top: 6px; max-width: 54ch; }
.hero-band .btn-primary { background: #fff; color: var(--accent-dim); box-shadow: none; }
.hero-band .btn-primary:hover { background: #fde7f2; }
.hero-band .btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.hero-band .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
.hero-badge { display: inline-flex; align-items: center; gap: 7px; background: rgba(255,255,255,0.18); border-radius: var(--r-pill); padding: 5px 12px; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }

/* simple centered card page (sign-in / about) */
.center-card { max-width: 460px; margin: 40px auto; }
.center-card .panel { padding: 26px 24px; }
.center-card h1 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 800; margin-bottom: 6px; }
.center-card .lead { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 18px; }
.center-card .field { margin-bottom: 13px; }
.center-card .btn { width: 100%; justify-content: center; margin-top: 6px; }

@media (max-width: 980px) {
  .hdr-btn span { display: none; }
  .hdr-btn { padding: 8px 11px; }
  .mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 20px 0 24px; }
}
@media (max-width: 700px) {
  .hero-band { padding: 22px 18px; border-radius: var(--r-lg); }
  .hero-band h1 { font-size: var(--fs-xl); }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center; }
  .hdr-signin { padding: 8px 12px; }
  .mega-grid { grid-template-columns: 1fr; }
  .center-card { margin: 20px auto; }
}
/* ===== toast ===== */
.ptv-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(16px);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 700; box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
  opacity: 0; pointer-events: none; transition: 0.22s; z-index: 200; max-width: 90vw; text-align: center;
}
.ptv-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* ===== player grid ===== */
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.player-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; transition: 0.15s; }
.player-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.player-card-top { display: flex; align-items: center; gap: 12px; }
.player-card-name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-base); line-height: 1.2; }
.player-card-sub { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.player-card-rate { margin-left: auto; font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 800; color: var(--accent-dim); }
.player-card-stats { display: flex; gap: 14px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-soft); font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; }
.player-card-stats b { display: block; font-family: var(--font-display); font-size: var(--fs-base); color: var(--text); letter-spacing: 0; text-transform: none; }
/* ===== landing page (three entry points) ===== */
.landing { padding: 54px 0 70px; }
.landing-head { text-align: center; max-width: 660px; margin: 0 auto 38px; }
.landing-head .hero-badge { background: var(--accent-soft); color: var(--accent-dim); }
.landing-head h1 { font-family: var(--font-display); font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); font-weight: 800; line-height: 1.08; margin-top: 16px; }
.landing-head p { color: var(--muted); margin-top: 12px; font-size: var(--fs-lg); }
.landing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.land-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: 30px 26px 26px; min-height: 260px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  color: inherit; text-decoration: none; transition: 0.18s;
}
.land-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 18px 44px rgba(224, 0, 112, 0.18); }
.land-card.primary { background: linear-gradient(135deg, var(--accent-dim), var(--accent)); color: #fff; border-color: transparent; box-shadow: 0 10px 30px rgba(224, 0, 112, 0.3); }
.land-card.primary:hover { box-shadow: 0 20px 48px rgba(224, 0, 112, 0.35); }
.land-ic { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dim); }
.land-card.primary .land-ic { background: rgba(255, 255, 255, 0.22); color: #fff; }
.land-card h2 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 800; line-height: 1.1; }
.land-card p { color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }
.land-card.primary p { color: rgba(255, 255, 255, 0.92); }
.land-go { margin-top: auto; font-weight: 800; font-size: var(--fs-sm); color: var(--accent-dim); letter-spacing: 0.02em; }
.land-card.primary .land-go { color: #fff; }
.land-foot { text-align: center; margin-top: 30px; color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 900px) {
  .landing { padding: 30px 0 46px; }
  .landing-grid { grid-template-columns: 1fr; }
  .land-card { min-height: 0; padding: 22px 20px; }
}
/* ===== account ===== */
.hdr-account { display: inline-flex; align-items: center; gap: 7px; background: var(--accent-soft); color: var(--accent-dim); border: 1px solid rgba(224,0,112,.35); }
.hdr-account:hover { background: var(--accent); color: #fff; }
.acct-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(224,0,112,.22); }
.hdr-account:hover .acct-dot { background: #fff; box-shadow: none; }

/* ---- account avatar (header chip, personal centre, player registration) ---- */
.acct-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  object-fit: cover; background: var(--surface-3); color: #fff;
  font-family: var(--font-display); font-weight: 800; letter-spacing: .02em; font-size: 11.5px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .65);
}
.acct-avatar.sm { width: 22px; height: 22px; font-size: 9.5px; box-shadow: none; }
.acct-avatar.lg { width: 54px; height: 54px; font-size: 18px; }
.acct-avatar.xl { width: 84px; height: 84px; font-size: 26px; }
.hdr-account { display: inline-flex; align-items: center; gap: 8px; }

.auth-steps { display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: 20px; }
.auth-step { display: inline-flex; align-items: center; gap: 7px; font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.auth-step i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-style: normal; font-size: 11px; }
.auth-step.done i { background: var(--accent); color: #fff; }
.auth-step.done { color: var(--accent-dim); }
.auth-sep { width: 26px; height: 1px; background: var(--border); }

.code-input { letter-spacing: .5em; text-align: center; font-family: var(--font-mono); font-size: var(--fs-lg); }
.demo-code {
  margin-top: 12px; padding: 10px 14px; border-radius: var(--r-md);
  background: #fff7e6; border: 1px dashed #f0c36d; color: #8a6100;
  font-size: var(--fs-sm); text-align: center;
}
.demo-code b { font-family: var(--font-mono); font-size: var(--fs-lg); letter-spacing: .18em; }

.signin-note { display: flex; gap: 10px; padding: 13px 16px; border-radius: var(--r-md); font-size: var(--fs-sm); line-height: 1.55; }
.signin-note.warn { background: #fdf1f7; border: 1px solid rgba(224,0,112,.28); color: #0b4a6f; }
.signin-note.ok { background: var(--accent-soft); border: 1px solid rgba(224,0,112,.3); color: var(--accent-dim); }
.signin-note a { font-weight: 700; text-decoration: underline; }
.account-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
.account-row:last-child { border-bottom: none; }
.account-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-dim), var(--accent)); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 18px; }
/* ===== bracket: group stage (record grid) ===== */
.swiss { display: flex; gap: 14px; overflow-x: auto; padding: 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.swiss-col { flex: 0 0 178px; display: flex; flex-direction: column; gap: 9px; }
.swiss-col h4 { text-align: center; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 800; color: var(--muted); }
.swiss-cell { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border-soft); font-size: var(--fs-sm); font-weight: 600; min-height: 46px; }
.swiss-cell .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swiss-cell.qualified { background: #dcfce7; border-color: #8ce0aa; }
.swiss-cell.eliminated { background: #fee2e2; border-color: #f3b0b0; }
.swiss-pair { display: flex; flex-direction: column; gap: 5px; padding: 7px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border-soft); }
.swiss-pair .swiss-cell { background: #fff; border: none; min-height: 0; padding: 7px 8px; }
.swiss-pair .swiss-cell.qualified { background: #dcfce7; }
.swiss-pair .swiss-cell.eliminated { background: #fee2e2; }
.swiss-empty { font-size: var(--fs-sm); color: var(--muted-2); text-align: center; padding: 12px 0; }
.swiss-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); margin-top: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.swiss-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ===== bracket: knockout (match cards + connectors) ===== */
.ko { display: flex; gap: 44px; overflow-x: auto; padding: 20px 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); align-items: flex-start; }
.ko-round { flex: 0 0 296px; display: flex; flex-direction: column; gap: 20px; }
.ko-round > h3 { text-align: center; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; }
.ko-pair { position: relative; display: flex; flex-direction: column; gap: 18px; }
.ko-pair::after {
  content: ""; position: absolute; right: -44px; top: 25%; height: 50%; width: 44px;
  border-right: 1.5px solid var(--border); border-top: 1.5px solid var(--border); border-bottom: 1.5px solid var(--border);
  border-radius: 0 8px 8px 0;
}
.ko-round.ko-last .ko-pair::after, .ko-round.ko-last .ko-pair::before { display: none; }
.ko-match { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--r-md); overflow: hidden; }
.ko-head { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; font-size: var(--fs-xs); color: var(--muted); font-weight: 700; letter-spacing: 0.04em; }
.ko-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-top: 1px solid var(--border-soft); background: #fff; }
.ko-row.win { background: var(--accent-soft); }
.ko-row .nm { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ko-row .sc { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lg); color: var(--text); }
.ko-row .tbd { color: var(--muted-2); font-weight: 600; }
.ko-champion { flex: 0 0 250px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 42px; }
.ko-champion .cup { width: 76px; height: 76px; border-radius: 50%; background: #f5c542; display: grid; place-items: center; font-size: 34px; box-shadow: 0 10px 26px rgba(217, 154, 6, 0.35); }
.ko-champion .who { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lg); text-align: center; }
.ko-third { margin-top: 18px; }

@media (max-width: 700px) {
  .swiss, .ko { padding: 14px 12px; }
  .swiss-col { flex: 0 0 150px; }
  .ko-round { flex: 0 0 250px; }
  .ko { gap: 30px; }
  .ko-pair::after { right: -30px; width: 30px; }
}
/* ===== homepage hero (atmospheric) + compact entries ===== */
.home-hero {
  position: relative;
  min-height: clamp(320px, 42vw, 460px);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background-image: url("../assets/hero-event-blur.jpg");
  background-size: cover;
  background-position: center 42%;
  background-color: #0b2538;
  overflow: hidden;
}
.home-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16, 48, 92, 0.35) 0%, rgba(16, 48, 92, 0.18) 42%, rgba(14, 28, 54, 0.72) 100%);
}
.home-hero .hero-inner { position: relative; z-index: 2; padding: 46px 0; }
.home-hero .hero-badge { background: rgba(255, 255, 255, 0.18); color: #fff; backdrop-filter: blur(4px); }
.home-hero h1 {
  font-family: var(--font-display); font-weight: 800; color: #fff;
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem); line-height: 1.05;
  margin-top: 16px; text-shadow: 0 2px 24px rgba(14, 28, 54, 0.55);
}
.home-hero p {
  color: rgba(255, 255, 255, 0.92); margin-top: 12px;
  font-size: var(--fs-lg); text-shadow: 0 1px 14px rgba(14, 28, 54, 0.5);
}

.home-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: -34px 0 0; position: relative; z-index: 5; padding-bottom: 58px; }
.action-chip {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  color: inherit; text-decoration: none;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
  transition: 0.16s;
}
.action-chip:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 16px 36px rgba(224, 0, 112, 0.18); }
.action-chip .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dim); flex-shrink: 0; }
.action-chip .tx { flex: 1; min-width: 0; text-align: left; }
.action-chip .tx b { display: block; font-family: var(--font-display); font-size: var(--fs-base); font-weight: 700; line-height: 1.2; }
.action-chip .tx small { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-chip .go { color: var(--accent-dim); font-weight: 800; font-size: var(--fs-sm); flex-shrink: 0; }
.action-chip.primary { background: linear-gradient(135deg, var(--accent-dim), var(--accent)); border-color: transparent; }
.action-chip.primary .ic { background: rgba(255, 255, 255, 0.22); color: #fff; }
.action-chip.primary .tx b { color: #fff; }
.action-chip.primary .tx small { color: rgba(255, 255, 255, 0.85); }
.action-chip.primary .go { color: #fff; }

@media (max-width: 900px) {
  .home-actions { grid-template-columns: 1fr; gap: 10px; margin-top: -24px; padding-bottom: 42px; }
  .home-hero { min-height: 300px; }
  .home-hero .hero-inner { padding: 34px 0; }
}
/* ===== homepage long-scroll layout ===== */
:root { --chrome-h: 92px; }

.home-hero {
  position: relative;
  min-height: calc(100vh - var(--chrome-h));
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background-image: url("../assets/hero-event-blur.jpg");
  background-size: cover;
  background-position: center 42%;
  background-color: #0b2538;
  overflow: hidden;
  padding: 34px 0 40px;
}
@supports (height: 100svh) { .home-hero { min-height: calc(100svh - var(--chrome-h)); } }
.home-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(16, 48, 92, 0.42) 0%, rgba(16, 48, 92, 0.22) 40%, rgba(14, 28, 54, 0.78) 100%);
}
.home-hero .hero-inner { position: relative; z-index: 2; width: 100%; }
.home-hero .hero-badge { background: rgba(255, 255, 255, 0.16); color: #fff; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.22); }
.home-hero h1 {
  font-family: var(--font-display); font-weight: 800; color: #fff;
  font-size: clamp(2.75rem, 1.55rem + 4vw, 4.7rem); line-height: 1;
  margin-top: 18px; text-shadow: 0 3px 28px rgba(14, 28, 54, 0.6);
}
.home-hero p {
  color: rgba(255, 255, 255, 0.94); margin-top: 14px;
  font-size: clamp(1.15rem, 1rem + .65vw, 1.55rem); text-shadow: 0 1px 16px rgba(14, 28, 54, 0.55);
}
.home-hero .home-actions { margin-top: 46px; }

/* glass entry chips sitting on the hero image */
.home-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.action-chip {
  display: flex; align-items: center; gap: 13px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--r-lg);
  color: #fff; text-decoration: none;
  backdrop-filter: blur(10px);
  transition: 0.18s;
}
.action-chip:hover { background: rgba(255, 255, 255, 0.22); border-color: rgba(255,255,255,0.5); transform: translateY(-3px); }
.action-chip .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.2); color: #fff; flex-shrink: 0; }
.action-chip .tx { flex: 1; min-width: 0; text-align: left; }
.action-chip .tx b { display: block; font-family: var(--font-display); font-size: var(--fs-base); font-weight: 700; line-height: 1.2; }
.action-chip .tx small { display: block; color: rgba(255, 255, 255, 0.82); font-size: var(--fs-xs); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-chip .go { font-weight: 800; font-size: var(--fs-sm); color: #fff; flex-shrink: 0; }
.action-chip.primary { background: #fff; border-color: #fff; box-shadow: 0 12px 30px rgba(14, 28, 54, 0.28); }
.action-chip.primary .ic { background: var(--accent-soft); color: var(--accent-dim); }
.action-chip.primary .tx b { color: var(--accent-dim); }
.action-chip.primary .tx small { color: var(--muted); }
.action-chip.primary .go { color: var(--accent-dim); }
.action-chip.primary:hover { background: #fdf1f7; }

/* scroll cue */
.scroll-cue {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 2; color: rgba(255,255,255,.8); font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: .18em; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.scroll-cue i { display: block; width: 1px; height: 26px; background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,0)); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%,100% { opacity: .3; transform: translateY(-3px); } 50% { opacity: 1; transform: translateY(3px); } }

/* generic home sections */
.home-section { padding: 58px 0; }
.home-section.alt { background: #fff; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.home-section .section-head { margin-bottom: 20px; }
.home-section .section-head h2 { font-size: var(--fs-xl); }
.home-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.home-news { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.qual-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.qual-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 15px; box-shadow: var(--shadow-sm); }
.qual-card h4 { font-family: var(--font-display); font-size: var(--fs-base); font-weight: 700; padding-bottom: 9px; margin-bottom: 10px; border-bottom: 2px solid var(--accent-soft); color: var(--accent-dim); text-transform: uppercase; letter-spacing: .1em; }
.qual-list { display: flex; flex-direction: column; gap: 7px; }
.qual-item { display: flex; align-items: center; gap: 9px; font-size: var(--fs-sm); font-weight: 600; padding: 7px 9px; border-radius: var(--r-sm); background: #dcfce7; }
.qual-item .rec { margin-left: auto; font-size: var(--fs-xs); font-weight: 800; color: #15803d; letter-spacing: .04em; }
.qual-empty { font-size: var(--fs-sm); color: var(--muted); }

/* sponsors */
.sponsor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.sponsor-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 16px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); transition: .16s;
}
.sponsor-tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.sponsor-mark {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: .04em;
}
.sponsor-name { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-base); line-height: 1.15; }
.sponsor-note { font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }

@media (max-width: 900px) {
  :root { --chrome-h: 78px; }
  .home-hero .home-actions { margin-top: 30px; }
  .home-actions { grid-template-columns: 1fr; gap: 10px; }
  .home-grid-2, .home-news { grid-template-columns: 1fr; }
  .home-section { padding: 38px 0; }
  .scroll-cue { display: none; }
}
/* =====================================================================
   REDESIGN — header controls, narrower entries, richer hero
   ===================================================================== */

/* ---- header control cluster ---- */
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.hdr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 42px; min-width: 42px; padding: 0 13px;
  background: transparent; border: none; border-radius: 13px;
  color: var(--muted); cursor: pointer; transition: 0.16s;
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: 0.11em; text-transform: uppercase;
}
.hdr-btn:hover { background: var(--accent-soft); color: var(--accent-dim); }
.hdr-btn.active { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(224, 0, 112, 0.32); }
.hdr-btn svg { width: 19px; height: 19px; flex-shrink: 0; }

.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 14px;
  background: transparent; border: 1px solid var(--border); border-radius: 13px;
  color: var(--muted); cursor: pointer; transition: 0.16s;
  font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: 0.11em; text-transform: uppercase;
}
.lang-btn:hover, .lang-switch.open .lang-btn { border-color: var(--accent); color: var(--accent-dim); background: var(--accent-soft); }
.lang-globe { width: 17px; height: 17px; opacity: 0.85; }
.lang-caret { font-size: 9px; opacity: 0.6; }

a.hdr-signin, a.hdr-account {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 13px;
  font-size: var(--fs-sm); font-weight: 700;
}
a.hdr-signin { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(224, 0, 112, 0.3); }
a.hdr-signin:hover { background: var(--accent-dim); }
a.hdr-account { background: var(--accent-soft); color: var(--accent-dim); border: 1px solid rgba(224,0,112,.35); }
a.hdr-account:hover { background: var(--accent); color: #fff; }

/* ---- hero: narrower entries, stat strip ---- */
.home-hero { padding: 40px 0 68px; }
.home-hero .hero-inner { position: relative; }
.home-hero .hero-inner::before {
  content: ""; position: absolute; left: 50%; top: 38%;
  transform: translate(-50%, -50%);
  width: min(820px, 92%); height: 440px; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(125, 211, 252, 0.30), rgba(125, 211, 252, 0) 68%);
  pointer-events: none; z-index: 0;
}
.home-hero .hero-inner > * { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #fff; backdrop-filter: blur(8px);
  font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.home-hero h1 em { font-style: normal; color: #f7a8cd; }

.home-hero .home-actions { max-width: 930px; margin: 42px auto 0; }
.home-hero .action-chip { padding: 16px 19px; gap: 14px; border-radius: 18px; }
.home-hero .action-chip .ic { width: 44px; height: 44px; border-radius: 13px; }
.home-hero .action-chip .ic svg { width: 23px; height: 23px; }
.home-hero .action-chip .tx b { font-size: var(--fs-base); }
.home-hero .action-chip .tx small { font-size: 12px; margin-top: 3px; }
.home-hero .action-chip .go { font-size: var(--fs-base); }

.hero-stats { display: flex; justify-content: center; flex-wrap: wrap; margin-top: 40px; }
.hero-stat { padding: 0 30px; border-left: 1px solid rgba(255, 255, 255, 0.2); text-align: center; }
.hero-stat:first-child { border-left: none; }
.hero-stat b { display: block; font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 800; color: #fff; line-height: 1; }
.hero-stat span { display: block; margin-top: 7px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); }
.home-hero {
  min-height: clamp(500px, 58vh, 620px);
  padding: 20px 0 46px;
}
.home-landing {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  background: #071b2b;
}
@supports (height: 100svh) {
  .home-landing { min-height: calc(100svh - var(--header-h)); }
}
.home-top-band {
  flex: 0 0 54px;
  width: 100%;
  background: #072f2f;
  border-bottom: 0;
}
.home-landing .home-hero {
  flex: 1 1 auto;
  min-height: 360px;
  padding: 20px 0 34px;
}
.home-dashboard-section {
  position: relative;
  z-index: 3;
  padding: 16px 0 22px;
  background:
    radial-gradient(circle at 92% 8%, rgba(224, 0, 112, .14), transparent 34%),
    radial-gradient(circle at 8% 88%, rgba(0, 145, 58, .18), transparent 36%),
    linear-gradient(135deg, #071b2b 0%, #0c2d38 58%, #08392f 100%);
}
.home-landing .home-dashboard-section {
  flex: 0 0 auto;
  padding: 14px 0 16px;
}
.home-landing .site-stat-ribbon { flex: 0 0 auto; }

/* Homepage league dashboard, immediately below the shortened hero. */
.hero-dashboard {
  max-width: 1080px;
  margin: 0 auto;
  text-align: left;
}
.hero-dash-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.hero-dash-link {
  min-height: 86px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.24);
  border-top: 3px solid rgba(255,255,255,.92);
  background: linear-gradient(135deg, var(--accent-dim), var(--accent));
  color: #fff;
  box-shadow: 0 10px 28px rgba(100, 0, 48, .24);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.hero-dash-link:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
  box-shadow: 0 16px 34px rgba(100, 0, 48, .36);
}
.hero-dash-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: #fff;
}
.hero-dash-icon svg { width: 25px; height: 25px; }
.hero-dash-copy { min-width: 0; }
.hero-dash-copy b {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-dash-copy small {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.84);
  font-size: 10.5px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-dash-arrow { color: #fff; font-weight: 900; font-size: 15px; }
.hero-dash-lower {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.hero-dash-upcoming {
  padding: 10px 12px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  color: var(--text);
  box-shadow: 0 10px 28px rgba(0, 20, 40, .18);
}
.hero-dash-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 12px;
}
.hero-dash-head i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0b9347;
  box-shadow: 0 0 0 3px rgba(11,147,71,.12);
}
.hero-dash-head b { font-size: 13px; }
.hero-dash-head a {
  margin-left: auto;
  color: var(--accent-dim);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}
.hero-dash-head a:hover { text-decoration: underline; }
.hero-dash-games {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.hero-dash-game {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 7px 9px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.hero-dash-game:hover { border-color: #0b9347; box-shadow: 0 5px 14px rgba(0,80,30,.1); }
.hero-dash-date {
  color: #6b7280;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-dash-team {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
}
.hero-dash-team > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-dash-team .crest,
.hero-dash-team .mono {
  width: 18px !important;
  height: 18px !important;
  font-size: 8px !important;
  flex-shrink: 0;
}
.hero-dash-empty { color: var(--muted); font-size: 12px; padding: 8px 0; }
.site-stat-ribbon {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border-top: 1px solid rgba(255,255,255,.28);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.site-stat-ribbon__inner {
  min-height: 88px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
.site-stat-item {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 11px;
  padding: 14px 12px;
  border-left: 1px solid rgba(255,255,255,.22);
  color: inherit;
  text-decoration: none;
  transition: background-color .15s ease;
}
.site-stat-item:first-child { border-left: 0; }
.site-stat-item:hover { background: rgba(255,255,255,.08); }
.site-stat-item:focus-visible { outline: 2px solid rgba(255,255,255,.85); outline-offset: -2px; }
.site-stat-item b {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.3rem + 2vw, 3.2rem);
  font-weight: 800;
  line-height: 1;
}
.site-stat-item > span {
  font-size: clamp(.9rem, .78rem + .38vw, 1.12rem);
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}

/* ---- section polish ---- */
.home-section .section-head h2 { letter-spacing: -0.01em; }
.home-section .section-head .tag { background: var(--accent-soft); color: var(--accent-dim); border: none; }
.home-section.alt { background: linear-gradient(180deg, #ffffff, #f7fbfe); }

@media (max-width: 900px) {
  .home-hero { min-height: 500px; padding: 20px 0 34px; }
  .home-top-band { flex-basis: 44px; }
  .home-landing .home-hero { min-height: 420px; padding: 18px 0 28px; }
  .home-hero .home-actions { max-width: 100%; margin-top: 30px; }
  .home-hero .action-chip { padding: 15px 17px; }
  .hero-stats { margin-top: 26px; row-gap: 16px; justify-content: center; text-align: center; }
  .hero-stat { padding: 0 16px; }
  .hero-stat b { font-size: var(--fs-xl); }
  .home-dashboard-section { padding: 14px 0 18px; }
  .hero-dashboard { max-width: 100%; margin: 0 auto; }
  .hero-dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-dash-games {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .hero-dash-games::-webkit-scrollbar { display: none; }
  .hero-dash-game { flex: 0 0 min(240px, 78vw); }
  .site-stat-ribbon__inner { min-height: 72px; }
  .site-stat-item { gap: 6px; padding: 10px 4px; }
  .site-stat-item b { font-size: 1.65rem; }
  .site-stat-item > span { font-size: .72rem; }
  .hdr-btn { height: 40px; min-width: 40px; padding: 0 11px; }
  .hdr-btn span { display: none; }
  .lang-btn { padding: 0 11px; }
  .lang-cur { display: none; }
  a.hdr-signin, a.hdr-account { padding: 0 15px; }
}
@media (max-width: 520px) {
  .hero-dash-link { min-height: 72px; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 7px; padding: 9px 10px; }
  .hero-dash-icon { width: 26px; height: 26px; }
  .hero-dash-icon svg { width: 21px; height: 21px; }
  .hero-dash-copy b { font-size: 14px; }
  .hero-dash-copy small { font-size: 9.5px; }
  .hero-dash-upcoming { padding-inline: 9px; }
  .site-stat-item { gap: 5px; padding-inline: 2px; }
  .site-stat-item b { font-size: 1.45rem; }
  .site-stat-item > span { font-size: .7rem; }
}
/* =====================================================================
   BRACKET v2 — Swiss grid (group stage) + tree with real connectors
   ===================================================================== */
.swiss-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 20px 18px; overflow-x: auto; }
.swiss { display: flex; gap: 16px; align-items: flex-start; min-width: max-content; }
.swiss-col { flex: 0 0 176px; display: flex; flex-direction: column; gap: 10px; }
.swiss-col > h4 {
  text-align: center; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 800;
  color: var(--muted); padding-bottom: 8px; border-bottom: 2px solid var(--border-soft);
}
.swiss-match { display: flex; flex-direction: column; gap: 0; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border-soft); }
.swiss-team { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fff; font-size: var(--fs-sm); font-weight: 600; }
.swiss-team + .swiss-team { border-top: 2px solid #142433; }
.swiss-team.win { background: var(--accent-soft); }
.swiss-team .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swiss-out { display: flex; flex-direction: column; gap: 14px; flex: 0 0 auto; }
.swiss-block { border-radius: var(--r-md); padding: 10px; }
.swiss-block.adv { background: #dcfce7; border: 1px solid #8ce0aa; }
.swiss-block.elim { background: #fee2e2; border: 1px solid #f3b0b0; }
.swiss-block h5 { font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; text-align: center; }
.swiss-block.adv h5 { color: #15803d; }
.swiss-block.elim h5 { color: #b91c1c; }
.swiss-block .row { display: flex; align-items: center; gap: 8px; padding: 7px 9px; background: #fff; border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 600; margin-bottom: 6px; }
.swiss-block .row:last-child { margin-bottom: 0; }
.swiss-block .row .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swiss-block .row .rec { margin-left: auto; font-size: var(--fs-xs); font-weight: 800; }
.swiss-block.adv .row .rec { color: #15803d; }
.swiss-block.elim .row .rec { color: #b91c1c; }
.swiss-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); margin-top: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.swiss-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* knockout tree */
.ko-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); padding: 22px 18px; overflow-x: auto; }
.ko { display: flex; align-items: stretch; gap: 78px; min-width: max-content; justify-content: center; }
.ko-round { display: flex; flex-direction: column; flex: 0 0 288px; }
.ko-round > h3 { text-align: center; font-family: var(--font-display); font-size: var(--fs-base); font-weight: 700; margin-bottom: 16px; }
.ko-body { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 20px; }
.ko-pair { position: relative; display: flex; flex-direction: column; justify-content: space-around; gap: 20px; flex: 1; }
.ko-pair::after {
  content: ""; position: absolute; right: -54px; top: 25%; bottom: 25%; width: 54px;
  border-right: 2px solid #d9ccd5; border-top: 2px solid #d9ccd5; border-bottom: 2px solid #d9ccd5;
  border-radius: 0 10px 10px 0;
}
/* 中间那根横向的连接线（指向下一轮） */
.ko-pair::before {
  content: ""; position: absolute; right: -70px; top: calc(50% - 1px);
  width: 16px; height: 2px; background: #d9ccd5;
  border-radius: 1px;
}
.ko-round.ko-last .ko-pair::after { display: none; }
.ko-match { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--r-md); overflow: hidden; cursor: pointer; transition: .15s; }
.ko-match:hover { border-color: var(--accent); box-shadow: 0 8px 22px rgba(224,0,112,.14); }
.ko-head { display: flex; justify-content: space-between; gap: 10px; padding: 7px 12px; font-size: var(--fs-xs); color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.ko-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-top: 1px solid var(--border-soft); background: #fff; }
.ko-row.win { background: var(--accent-soft); }
.ko-row .nm { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ko-row .sc { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lg); }
.ko-row .tbd { color: var(--muted-2); font-weight: 600; }
.ko-champion { flex: 0 0 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.ko-champion .cup { width: 78px; height: 78px; border-radius: 50%; background: #f5c542; display: grid; place-items: center; font-size: 34px; box-shadow: 0 10px 26px rgba(217,154,6,.35); }
.ko-champion .who { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lg); text-align: center; }
@media (max-width: 700px) {
  .swiss-col { flex: 0 0 150px; }
  .ko-round { flex: 0 0 240px; }
  .ko { gap: 56px; justify-content: flex-start; }
  .ko-pair::after { right: -34px; width: 34px; }
  .ko-pair::before { right: -50px; width: 14px; }
}
/* =====================================================================
   HKPL-style narrow match cards (home: upcoming + results)
   ===================================================================== */
.hk-wrap { max-width: 860px; margin: 0 auto; }
.hk-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: 0 4px 18px rgba(15, 23, 42, 0.07); }
.hk-card-head { background: linear-gradient(135deg, var(--accent-dim), var(--accent)); color: #fff; padding: 18px 26px; }
.hk-card-head .eyebrow { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.82; }
.hk-card-head h2 { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 800; color: #fff; margin-top: 3px; line-height: 1.1; }

.hk-list { display: flex; flex-direction: column; }
.hk-row {
  display: grid; align-items: center; gap: 12px;
  padding: 15px 24px; border-top: 1px solid var(--border-soft);
  text-decoration: none; color: inherit; transition: background 0.14s;
}
.hk-row:first-child { border-top: none; }
.hk-row:hover { background: var(--surface-2); }
.hk-row.sched { grid-template-columns: 76px minmax(0, 1fr) auto minmax(0, 1fr) 96px; }
.hk-row.res { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }

.hk-date { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); line-height: 1.3; }
.hk-date b { display: block; color: var(--accent-dim); font-weight: 800; font-size: var(--fs-sm); }
.hk-side { display: flex; align-items: center; gap: 9px; min-width: 0; }
.hk-side.a { justify-content: flex-end; text-align: right; }
.hk-side.b { justify-content: flex-start; text-align: left; }
.hk-side .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: var(--fs-sm); }
.hk-vs { font-size: var(--fs-xs); font-weight: 800; color: var(--muted-2); letter-spacing: 0.12em; }
.hk-meta { font-size: var(--fs-xs); color: var(--muted-2); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk-score { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-xl); line-height: 1; }
.hk-score .w { color: var(--accent-dim); }
.hk-score .l { color: var(--muted-2); }
.hk-score .sep { color: var(--border); font-size: var(--fs-base); }
.hk-more { display: block; text-align: center; margin-top: 18px; font-weight: 700; font-size: var(--fs-sm); color: var(--accent-dim); }
.hk-more:hover { text-decoration: underline; }
.hk-empty { padding: 26px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }

.home-section .hk-wrap { padding: 0; }
@media (max-width: 760px) {
  .hk-row.sched { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding: 13px 16px; gap: 8px; }
  .hk-row.sched .hk-date, .hk-row.sched .hk-meta { display: none; }
  .hk-row.res { padding: 13px 16px; }
  .hk-score { font-size: var(--fs-lg); gap: 7px; }
  .hk-side .nm { font-size: var(--fs-xs); }
  .hk-card-head { padding: 15px 18px; }
}
/* =====================================================================
   Swiss bracket (ESL/CS style): each match is a chip of two crests,
   record labels head every band, winners climb up-right, losers drop
   down-right, qualified / eliminated teams collect in the side panels.
   ===================================================================== */
.sb-wrap { background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-sm); padding: 16px 16px 6px; overflow: auto; }
.sb-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 2px 2px 14px; }
.sb-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; padding: 6px 11px; border-radius: 999px; }
.sb-chip.adv { background: #e8f8e3; color: #2f8f1c; }
.sb-chip.elim { background: #fdecea; color: #c13923; }
.sb-chip.note { background: var(--surface-2); color: var(--muted); font-weight: 600; letter-spacing: 0; }
.sb-scale { margin: 0 auto; }
.sb-board { position: relative; }
.sb-links { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 3; }
.sb-rec { position: absolute; font-family: var(--font-display); font-size: 20px; font-weight: 800; line-height: 1; letter-spacing: .01em; color: #98a2ae; }
.sb-card { position: absolute; width: 164px; height: 68px; border-radius: 13px; background: #eef1f5; display: flex; align-items: center; justify-content: center; gap: 20px; cursor: pointer; transition: transform .16s, box-shadow .16s, background .16s; }
.sb-card:hover { background: #efe8ee; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12); }
.sb-slot { display: inline-flex; }
.sb-slot .crest { width: 44px; height: 44px; box-shadow: 0 0 0 2px #fff; }
.sb-slot .mono { width: 38px; height: 38px; font-size: 14px; box-shadow: 0 0 0 2px #fff; }
.sb-slot.win .crest, .sb-slot.win .mono { box-shadow: 0 0 0 2px #43c53a, 0 0 0 4px #fff; }
.sb-card.tbd { background: repeating-linear-gradient(135deg, #f2f5f9 0 10px, #eaeff5 10px 20px); border: 1px dashed #e2d6de; }
.sb-card.tbd:hover { background: repeating-linear-gradient(135deg, #f2f5f9 0 10px, #eaeff5 10px 20px); box-shadow: none; }
.sb-slot.tbd {
  font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: .08em;
  color: #93a2b3; background: transparent; border: none;
}
/* 還沒有對手的籤位：統一的 TBD 圓標 */
.tbd-crest {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #f3ebf0; color: #8697a8;
  border: 2px dashed #e0d3dc; font-weight: 800; letter-spacing: .04em;
  font-family: var(--font-display); flex: 0 0 auto;   /* 不讓 flex 把它壓成橢圓 */
}
.tbd-name { color: var(--muted); font-weight: 700; }
/* 晉級 / 淘汰色塊：陰影加在外層，L 形才會是一整塊（不會看到兩塊拼接的縫） */
.sb-blockwrap.adv, .sb-blockwrap.elim { filter: drop-shadow(0 10px 18px rgba(45, 22, 38, 0.20)); }
.sb-blockwrap .sb-blk { box-shadow: none; }
.sb-blockwrap .sb-blbl { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28); }
.ko-match.tbd-match { background: #f7fafd; border: 1px dashed #e2d6de; box-shadow: none; }
.ko-match.tbd-match .ko-head { color: #9aa9b8; }
.sb-slot.lose .crest, .sb-slot.lose .mono { opacity: 0.40; filter: grayscale(1); }
.sb-blockwrap { position: absolute; pointer-events: none; }
.sb-blockwrap a { pointer-events: auto; }
.sb-blockwrap .sb-blk { position: absolute; border-radius: 22px; background: #58bb3f; }
.sb-blockwrap.elim .sb-blk { background: #d34a2c; }
.sb-blbl { position: absolute; transform: translateX(-50%); font-family: var(--font-display); font-size: 20px; font-weight: 800; color: #fff; letter-spacing: .01em; line-height: 1; }
.sb-blockwrap .sb-slot { position: absolute; width: 52px; height: 52px; border-radius: 50%; background: rgba(0, 0, 0, 0.13); display: inline-flex; align-items: center; justify-content: center; }
.sb-blockwrap .sb-slot .crest { width: 44px; height: 44px; box-shadow: none; }
.sb-blockwrap .sb-slot .mono { width: 38px; height: 38px; font-size: 14px; box-shadow: none; }
.sb-blockwrap.elim .sb-slot .crest, .sb-blockwrap.elim .sb-slot .mono { opacity: 0.6; filter: grayscale(0.85); }
.sb-rec-out.adv .sb-tag { color: #2f8f1c; background: #e2f6db; }
.sb-rec-out.elim .sb-tag { color: #c33a24; background: #fde3dd; }
.sb-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); margin: 14px 2px 8px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sb-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sb-legend i.g { background: #dcfce7; border: 1px solid #7fd39a; }
.sb-legend i.r { background: #fee2e2; border: 1px solid #f0a9a9; }
@media (max-width: 760px) {
  .sb-wrap { padding: 12px 12px 4px; border-radius: 14px; }
  .sb-head { padding-bottom: 10px; }
  .sb-chip.note { display: none; }
}/* =====================================================================
   Qualified list — segmented tabs + seeded rows (HKPL division-tab style)
   ===================================================================== */
.qual-tabs { display: flex; border-bottom: 1px solid var(--border-soft); overflow-x: auto; scrollbar-width: none; }
.qual-tabs::-webkit-scrollbar { display: none; }
.qual-tab {
  flex: 0 0 auto; padding: 14px 20px; background: transparent; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 700; color: var(--muted);
  border-bottom: 3px solid transparent; transition: 0.15s; white-space: nowrap;
}
.qual-tab:hover { color: var(--text); background: var(--surface-2); }
.qual-tab.active { color: var(--accent-dim); border-bottom-color: var(--accent); }

.qual-list { display: flex; flex-direction: column; }
.q-row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 22px;
  align-items: center; gap: 13px; padding: 14px 24px;
  border-top: 1px solid var(--border-soft); transition: background 0.14s;
}
.q-row:first-child { border-top: none; }
.q-row:hover { background: var(--surface-2); }
.q-seed {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
  background: var(--surface-3); color: var(--muted);
}
.q-seed.s1 { background: linear-gradient(135deg, #fde68a, #f5c542); color: #7c4a03; }
.q-seed.s2 { background: linear-gradient(135deg, #e5e7eb, #cbd5e1); color: #475569; }
.q-seed.s3 { background: linear-gradient(135deg, #fcd9b6, #e8a06a); color: #7c3a0b; }
.q-team { display: flex; align-items: center; gap: 11px; min-width: 0; }
.q-team .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: var(--fs-base); }
.q-rec {
  font-family: var(--font-display); font-weight: 800; font-size: var(--fs-sm);
  padding: 4px 11px; border-radius: 20px; background: #dcfce7; color: #15803d; white-space: nowrap;
}
.q-rec.perfect { background: linear-gradient(135deg, #bbf7d0, #86efac); color: #14532d; }
.q-check { color: var(--accent); font-weight: 900; font-size: var(--fs-base); text-align: center; }
.qual-empty { padding: 30px 24px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 760px) {
  .qual-tab { padding: 12px 14px; font-size: var(--fs-xs); }
  .q-row { padding: 12px 16px; gap: 10px; grid-template-columns: 26px minmax(0, 1fr) auto; }
  .q-check { display: none; }
  .q-seed { width: 24px; height: 24px; font-size: 12px; }
  .q-team .nm { font-size: var(--fs-sm); }
}
/* =====================================================================
   Group pages (League / Players / Teams): banner + pill nav, HKPL style
   ===================================================================== */
.group-hero {
  position: relative; overflow: hidden;
  background-image: url("../assets/group-hero-blur.jpg");
  background-size: cover; background-position: center 44%;
  background-color: #0c233c;
  min-height: 200px; display: flex; align-items: center;
}
.group-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(4, 18, 28, 0.82) 0%, rgba(5, 19, 28, 0.62) 30%, rgba(5, 18, 26, 0.26) 58%, rgba(5, 18, 26, 0.08) 100%);
}
.group-hero .container { position: relative; z-index: 2; padding: 42px 0; }
.gh-chip {
  display: inline-block; padding: 5px 13px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
}
.group-hero h1 {
  font-family: var(--font-display); font-weight: 800; color: #fff; line-height: 1.08;
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 3rem); margin-top: 14px;
  text-shadow: 0 3px 26px rgba(14, 28, 54, 0.55);
}
.gh-rule { display: block; width: 58px; height: 4px; border-radius: 2px; background: #f7a8cd; margin-top: 16px; }
.group-hero p { color: rgba(255, 255, 255, 0.86); margin-top: 12px; font-size: var(--fs-base); }

.group-pills { background: #fff; border-bottom: 1px solid var(--border); }
.group-pills .container { display: flex; gap: 9px; padding: 14px 0; overflow-x: auto; scrollbar-width: none; justify-content: center; }
.group-pills .container::-webkit-scrollbar { display: none; }
.gp {
  flex: 0 0 auto; padding: 9px 19px; border-radius: 22px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); font-weight: 700; font-size: var(--fs-sm);
  text-decoration: none; transition: 0.15s; white-space: nowrap;
}
.gp:hover { color: var(--text); border-color: var(--muted-2); }
.gp.current { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(224, 0, 112, 0.28); }

/* hub cards */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.hub-card {
  display: flex; flex-direction: column; gap: 10px; padding: 22px 20px;
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; transition: 0.17s;
}
.hub-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 40px rgba(224, 0, 112, 0.16); }
.hub-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dim); }
.hub-card h3 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; }
.hub-card p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.6; }
.hub-stat { margin-top: auto; font-family: var(--font-display); font-size: var(--fs-base); font-weight: 800; color: var(--accent-dim); }
@media (max-width: 700px) {
  .group-hero { min-height: 150px; background-position: center 50%; }
  .group-hero .container { padding: 28px 0; }
  .gh-rule { width: 44px; height: 3px; margin-top: 12px; }
}
/* mega menu group headings are links to the group hub */
.mega-col h4 a { color: inherit; text-decoration: none; }
.mega-col h4 a:hover { color: var(--accent); }
.table th, .table td { padding: 9px 12px; }
.table th:first-child, .table td:first-child { width: 44px; }

/* 队标可点击的悬停 / 按下反馈 */
.sb-slot a.badge-link, .sb-slot a.badge-link .crest, .sb-slot a.badge-link .mono { transition: transform .14s ease, box-shadow .14s ease, filter .14s ease; }
.sb-slot a.badge-link { display: inline-flex; border-radius: 50%; cursor: pointer; }
.sb-slot a.badge-link:hover { transform: scale(1.1); }
.sb-slot a.badge-link:hover .crest, .sb-slot a.badge-link:hover .mono { box-shadow: 0 0 0 3px #e00070, 0 0 0 7px rgba(224, 0, 112, 0.22) !important; }
.sb-slot a.badge-link:active { transform: scale(0.95); }
.sb-slot a.badge-link:focus-visible { outline: none; box-shadow: 0 0 0 3px #e00070; }
.sb-card { cursor: pointer; }
.sb-card:hover .sb-slot { transform: translateY(-2px); transition: transform .16s ease; }

/* 季军赛：放在决赛那一列、冠军赛下方，与决赛左右对齐 */
.ko-round.ko-last { position: relative; }
.ko-round.ko-last .ko-body { justify-content: center; }
.ko-third-in { position: absolute; left: 0; right: 0; bottom: 0; padding-top: 14px; border-top: 1px dashed var(--border); }
.ko-third-in .kt-head { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-base); margin-bottom: 12px; }
.ko-third-in .medal { font-size: 18px; }

/* ===== Entered teams (registration desk) ===== */
.entry-board { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.entry-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.entry-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.entry-card-head h3 { font-family: var(--font-display); font-size: var(--fs-base); font-weight: 800; letter-spacing: 0.01em; }
.entry-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border-soft); color: inherit; }
.entry-row:last-child { border-bottom: none; }
a.entry-row:hover .nm { color: var(--accent-dim); }
.entry-row .col { display: flex; flex-direction: column; min-width: 0; }
.entry-row .nm { font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-row .meta { font-size: var(--fs-xs); color: var(--muted); }
.entry-row .st { margin-left: auto; flex-shrink: 0; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: var(--r-pill); }
.entry-row .st.pending { background: #fef3c7; color: #92400e; }
.entry-row .st.approved { background: #dcfce7; color: #166534; }
.entry-row .st.rejected { background: #fee2e2; color: #991b1b; }

/* ===== 手機：一行放不下的橫向列改成橫向滑動，不換行 ===== */
.cap-row { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .section-head,
  .page-title,
  .filters-row,
  .toolbar,
  .toolbar-row,
  .page-head-actions,
  .sb-head,
  .sb-legend,
  .swiss-legend,
  .vs-legend,
  .day-head,
  .reg-hero .chips,
  .player-hero .meta,
  .team-hero .meta,
  .cap-row,
  .kpi-grid,
  .hero-stats {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;
  }
  .section-head > *,
  .page-title > *,
  .filters-row > *,
  .toolbar > *,
  .toolbar-row > *,
  .page-head-actions > *,
  .sb-head > *,
  .sb-legend > *,
  .swiss-legend > *,
  .vs-legend > *,
  .reg-hero .chips > *,
  .player-hero .meta > *,
  .team-hero .meta > *,
  .kpi-grid > *,
  .hero-stats > * {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
  }
  .day-head > h3, .day-head > .day-count { flex: 0 0 auto; }
  .cap-row > * { flex: 0 0 auto; white-space: nowrap; }

  /* 整條工具列一起滑動，不要讓裡面的分頁自己再開一條滑動軸 */
  .filters-row .filter-tabs { width: auto; overflow: visible; }
  .kpi-grid { padding: 18px 0; gap: 22px; }
  .kpi-grid > * { min-width: 116px; }
  .hero-stats > * { min-width: 92px; }

  /* 隱藏這些橫向列的滾動條，只留滑動手勢 */
  .section-head::-webkit-scrollbar,
  .page-title::-webkit-scrollbar,
  .filters-row::-webkit-scrollbar,
  .toolbar::-webkit-scrollbar,
  .toolbar-row::-webkit-scrollbar,
  .page-head-actions::-webkit-scrollbar,
  .sb-head::-webkit-scrollbar,
  .sb-legend::-webkit-scrollbar,
  .swiss-legend::-webkit-scrollbar,
  .vs-legend::-webkit-scrollbar,
  .day-head::-webkit-scrollbar,
  .kpi-grid::-webkit-scrollbar,
  .hero-stats::-webkit-scrollbar { display: none; height: 0; }

  /* 標題列不再換行：標題保持單行，右側標籤／連結跟著一起滑 */
  .section-head h2, .page-title h1, .page-title .sub { white-space: nowrap; }

  /* 內容超出的橫向列：右邊淡出，提示可以左右滑 */
  .has-overflow {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 46px), rgba(0, 0, 0, 0.35) calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 46px), rgba(0, 0, 0, 0.35) calc(100% - 18px), transparent 100%);
  }
  .at-scroll-end { -webkit-mask-image: none; mask-image: none; }
}

/* ===== 小組賽對陣圖：適應螢幕的縮放切換 ===== */
.sb-fit-btn {
  margin-left: auto;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--accent-dim);
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: .04em;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: .15s;
}
.sb-fit-btn:hover { border-color: var(--accent); background: var(--accent-soft); }

/* 切換小組賽／淘汰賽時用淡入淡出取代整頁重載的閃屏 */
#bracket-root { transition: opacity .18s ease; }
@media (prefers-reduced-motion: reduce) {
  #bracket-root { transition: none; }
}

/* ===== 賽事詳情：賽事資訊 / 參賽人員 / 獎金分配 ===== */
.ok-chip { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: #dcfce7; color: #15803d; }
.wait-chip { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: #fef3c7; color: #92400e; }
.ev-info { padding: 6px 16px; }
.ev-row { display: flex; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: var(--fs-sm); }
.ev-row:last-child { border-bottom: none; }
.ev-row > span { flex: 0 0 96px; color: var(--muted); font-weight: 700; }
.ev-row > b { flex: 1; font-weight: 800; }

/* 全部頭像放在同一塊大底上，不再每個一個小白塊 */
.ev-field-panel { padding: 14px 12px; }
.ev-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px 6px;
}
.ev-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px;
  padding: 10px 6px; background: transparent; border: none; border-radius: var(--r-md); color: inherit;
  transition: background .15s ease;
}
a.ev-tile:hover { background: var(--accent-soft); }
.ev-tile .ev-crest { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; }
.ev-tile .ev-name {
  font-size: var(--fs-xs); font-weight: 700; text-align: center; line-height: 1.35;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.prize-panel { padding: 6px 0; }
.prize-group { padding: 10px 16px; border-bottom: 1px solid var(--border-soft); }
.prize-group:last-child { border-bottom: none; }
.prize-place { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: var(--fs-sm); color: var(--text); margin-bottom: 6px; }
.prize-place .pm { font-size: 18px; line-height: 1; }
.prize-rows { display: flex; flex-direction: column; }
.prize-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 0;
  border-bottom: 1px dashed var(--border-soft); color: inherit; font-size: var(--fs-sm);
}
.prize-row:last-child { border-bottom: none; }
a.prize-row:hover .prize-name { color: var(--accent-dim); }
.prize-row .prize-crest { flex: 0 0 34px; display: inline-flex; align-items: center; }
.prize-row .prize-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prize-row .prize-amt { flex: 0 0 auto; font-weight: 800; color: #c2820b; font-variant-numeric: tabular-nums; }
.prize-row.tbd .prize-name { color: var(--muted-2); font-weight: 600; }
.prize-row.tbd .prize-amt { color: #d9a24a; }
.tbd-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px; background: var(--surface-3, #f1eaf0);
  color: var(--muted-2); font-weight: 800; font-size: 12px;
}
@media (max-width: 700px) {
  .ev-field-panel { padding: 10px 8px; }
  .ev-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 4px; }
  .ev-tile { padding: 8px 4px; }
  .ev-row > span { flex: 0 0 76px; }
  .prize-row .prize-amt { font-size: var(--fs-xs); }
}
@media (min-width: 701px) and (max-width: 1199px) { .ev-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 701px) and (max-width: 980px) { .ev-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 430px) { .ev-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ===== Menu readability: larger labels, especially on phones ===== */
.mega.open {
  max-height: min(70vh, 680px);
  overscroll-behavior: contain;
}
.site-header .mega-col h4 {
  min-height: 34px;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: 0.1em;
}
.site-header .mega-col > a {
  padding: 10px 0;
  font-size: 1rem;
  line-height: 1.4;
}
.lg-nav a {
  padding: 9px 18px;
  font-size: 14.5px;
}
.lang-opt {
  padding: 11px 10px;
}
.lang-name {
  font-size: 0.95rem;
}
.lang-region {
  font-size: 12px;
}
.mobile-menu a {
  font-size: 16px;
}

@media (max-width: 980px) {
  .mega.open {
    max-height: calc(100dvh - var(--header-h));
  }
  .mega-grid {
    gap: 16px;
    padding: 16px 0 24px;
  }
  .site-header .mega-col h4 {
    min-height: 38px;
    font-size: 1.075rem;
    line-height: 1.35;
    padding-bottom: 8px;
    margin-bottom: 4px;
  }
  .site-header .mega-col > a {
    min-height: 48px;
    padding: 12px 2px;
    font-size: 1.075rem;
    line-height: 1.35;
  }
  .lang-menu {
    width: 240px;
  }
  .lang-opt {
    min-height: 48px;
    padding: 10px;
  }
  .lang-name {
    font-size: 1rem;
  }
  .lang-region {
    font-size: 12.5px;
  }
}

@media (max-width: 760px) {
  .lg-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 6px 2px 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .lg-nav::-webkit-scrollbar {
    display: none;
  }
  .lg-nav a {
    min-height: 44px;
    padding: 10px 17px;
    font-size: 15.5px;
  }
}

@media (max-width: 420px) {
  .site-header .mega-col h4,
  .site-header .mega-col > a {
    font-size: 1.1rem;
  }
  .lg-nav a {
    font-size: 15px;
  }
}

/* Data rows link to their player, team, club or match detail pages. */
.rank-list a.rl-row {
  color: inherit;
  text-decoration: none;
  transition: background 0.14s ease, color 0.14s ease;
}
.rank-list a.rl-row:hover {
  background: var(--accent-soft);
  color: var(--accent-dim);
}
.stat-table a.stat-link {
  color: inherit;
  text-decoration: none;
}
.stat-table a.stat-link:hover {
  color: var(--accent-dim);
  text-decoration: underline;
}
.panel-head a.stat-title-link {
  color: inherit;
}
.panel-head a.stat-title-link:hover {
  color: var(--accent-dim);
}
.stat-table a.stat-view {
  color: var(--accent-dim);
  font-weight: 800;
  white-space: nowrap;
}

/* ===== About NPcc ===== */
.about-page {
  padding-block: 28px 64px;
}
.about-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, .65fr);
  gap: 34px;
  align-items: center;
  overflow: hidden;
  padding: clamp(28px, 4vw, 54px);
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 18%, rgba(0, 185, 88, .25), transparent 34%),
    radial-gradient(circle at 12% 100%, rgba(224, 0, 112, .3), transparent 42%),
    linear-gradient(105deg, rgba(7, 27, 43, .94) 0%, rgba(7, 39, 47, .82) 52%, rgba(8, 50, 43, .68) 100%),
    url("../assets/about-event-blur.jpg") center 56% / cover no-repeat,
    #0b2538;
  box-shadow: 0 24px 70px rgba(9, 28, 43, .22);
}
.about-hero::after {
  content: "";
  position: absolute;
  inset: auto -90px -170px auto;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(255,255,255,.025), 0 0 0 96px rgba(255,255,255,.018);
  pointer-events: none;
}
.about-hero-copy,
.about-mark { position: relative; z-index: 1; }
.about-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9fe7b7;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .16em;
}
.about-kicker::before {
  content: "";
  width: 24px;
  height: 2px;
  background: currentColor;
}
.about-kicker.dark { color: var(--accent-dim); }
.about-hero h1 {
  max-width: 12ch;
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 3.3vw, 4rem);
  line-height: .98;
  letter-spacing: -.025em;
}
.about-lead {
  max-width: 66ch;
  margin-top: 20px;
  color: rgba(255, 255, 255, .82);
  font-size: var(--fs-base);
  line-height: 1.75;
}
.about-chip-row,
.about-hero-actions,
.about-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.about-chip-row { margin-top: 22px; }
.about-chip {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .9);
  font-size: 11.5px;
  font-weight: 700;
}
.about-hero-actions { margin-top: 26px; }
.about-btn-light {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .1);
  color: #fff;
}
.about-btn-light:hover {
  background: rgba(255, 255, 255, .18);
}
.about-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 24px;
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(12px);
}
.about-mark img {
  width: min(170px, 60%);
  height: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .22));
}
.about-mark strong {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: .04em;
}
.about-mark span,
.about-mark em {
  margin-top: 4px;
  color: rgba(255, 255, 255, .66);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .14em;
}
.about-section { margin-top: 34px; }
.about-section-head {
  align-items: flex-end;
  margin-bottom: 16px;
}
.about-grid.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.about-card,
.about-format-card {
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.about-card::before,
.about-format-card::before {
  display: none;
}
.about-grid.three > * + * {
  border-left: 1px solid var(--border-soft);
}
.about-card h3,
.about-format-card h3 {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  line-height: 1.1;
}
.about-card p,
.about-format-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}
.about-index {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
}
.about-card-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dim);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
}
.about-card-accent h3 { margin-top: 14px; }
.about-format-label {
  color: var(--accent-dim);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .14em;
}
.about-format-card strong {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 11.5px;
}
.about-standards {
  display: grid;
  grid-template-columns: minmax(260px, .78fr) minmax(0, 1.22fr);
  gap: 28px;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, #102a3b, #0b3c34);
}
.about-standards h2,
.about-cta h2 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.5vw, 2.5rem);
  line-height: 1.05;
}
.about-standards-copy p,
.about-cta p {
  margin-top: 12px;
  color: rgba(255, 255, 255, .72);
  line-height: 1.65;
}
.about-standard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.about-standard {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 15px;
  background: rgba(255, 255, 255, .06);
}
.about-standard b,
.about-standard span { display: block; }
.about-standard b { font-family: var(--font-display); font-size: var(--fs-base); }
.about-standard span { margin-top: 5px; color: rgba(255, 255, 255, .66); font-size: 12px; line-height: 1.5; }
.about-lineup {
  display: block;
}
.about-lineup-main,
.about-community-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.about-lineup-main {
  display: block;
  overflow: hidden;
}
.about-lineup-copy {
  padding: 24px;
}
.about-lineup-copy > p {
  max-width: 74ch;
  color: var(--muted);
  line-height: 1.7;
}
.about-people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.about-people > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
}
.about-people b { font-size: 13px; }
.about-people small { color: var(--muted); font-size: 11px; }
.about-community-card h3 {
  margin-top: 13px;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
}
.about-community-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}
.about-community-card {
  padding: 24px;
  border: 0;
  border-left: 1px solid var(--border-soft);
  border-radius: 0;
  background: linear-gradient(160deg, #fff, #fff7fb);
  box-shadow: none;
}
.about-community-card p { margin-top: 8px; color: var(--muted); line-height: 1.65; }
.about-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(224, 0, 112, .18);
  border-radius: 26px;
  background:
    radial-gradient(circle at 82% 20%, rgba(0, 185, 88, .18), transparent 30%),
    linear-gradient(135deg, #fff, #fff1f7);
}
.about-cta > div:first-child { max-width: 680px; }
.about-cta h2 { color: var(--text); }
.about-cta p { color: var(--muted); }
.about-cta-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}
@media (max-width: 900px) {
  .about-hero,
  .about-standards { grid-template-columns: 1fr; }
  .about-grid.three { grid-template-columns: 1fr; }
  .about-grid.three > * + * {
    border-left: 0;
    border-top: 1px solid var(--border-soft);
  }
  .about-mark { max-width: 360px; width: 100%; justify-self: center; }
  .about-cta { align-items: flex-start; flex-direction: column; }
  .about-cta-actions { justify-content: flex-start; }
  .home-hero { background-position: center center; }
}
@media (max-width: 620px) {
  .about-page { padding-block: 16px 44px; }
  .about-hero {
    padding: 24px 20px;
    border-radius: 22px;
    text-align: center;
    background-position: center 58%;
  }
  .about-hero h1 { max-width: none; margin-inline: auto; font-size: 2.25rem; }
  .about-lead { margin-inline: auto; }
  .about-kicker,
  .about-chip-row,
  .about-hero-actions { justify-content: center; }
  .about-section { margin-top: 24px; }
  .about-card,
  .about-format-card,
  .about-lineup-copy,
  .about-community-card { padding: 18px; }
  .about-community-card {
    border-left: 0;
    border-top: 1px solid var(--border-soft);
  }
  .about-standard-grid { grid-template-columns: 1fr; }
  .about-people > span { width: 100%; justify-content: space-between; }
}

@media (max-width: 760px) {
  .home-hero .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(280px, 100%);
    margin: 26px auto 0;
    justify-content: stretch;
    overflow: visible;
  }
  .home-hero .hero-stat {
    min-width: 0;
    padding-inline: 16px;
  }
}

/* Mobile league-nav drag affordance: visible on entry, then fades after 0.5s idle. */
.lg-nav-progress {
  display: none;
  width: min(260px, calc(100% - 40px));
  height: 4px;
  margin: -7px auto 15px;
  border-radius: 999px;
  background: rgba(224, 0, 112, .13);
  overflow: hidden;
  opacity: 0;
  transition: opacity .38s ease;
  pointer-events: none;
}
.lg-nav-progress span {
  display: block;
  width: 36px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width .14s ease, transform .08s linear;
}
.lg-nav-progress.show {
  opacity: 1;
}
.lg-nav-progress[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .lg-nav-progress {
    display: block;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lg-nav-progress,
  .lg-nav-progress span {
    transition: none;
  }
}

/* Mobile pull-to-refresh */
.pull-refresh {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 68px);
  left: 50%;
  z-index: 240;
  display: none;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(9, 31, 45, .9);
  color: #fff;
  box-shadow: 0 8px 24px rgba(5, 20, 30, .24);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -18px);
  transition: opacity .2s ease, transform .2s ease;
}
.pull-refresh .pr-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .16s ease;
}
.pull-refresh .pr-text {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}
.pull-refresh.ready .pr-icon {
  transform: rotate(180deg);
}
.pull-refresh.refreshing .pr-icon {
  animation: pull-refresh-spin .8s linear infinite;
}
@keyframes pull-refresh-spin {
  to { transform: rotate(360deg); }
}
@media (max-width: 760px) {
  html, body { overscroll-behavior-y: none; }
  .pull-refresh { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .pull-refresh,
  .pull-refresh .pr-icon {
    transition: none;
  }
}

/* NPcc review: shared brand, visible controls and readable mobile tables. */
:root { --accent:#d41473; --accent-dim:#a80f59; --accent-soft:#fce8f2; --text:#172b3a; --bg:#f6f7fb; }
[hidden] { display:none !important; }
:focus-visible { outline:3px solid #d41473; outline-offset:3px; }
.primary-nav { display:flex; align-items:center; gap:24px; margin-left:auto; margin-right:28px; font-size:14px; font-weight:700; }
.primary-nav a { padding:16px 0; white-space:nowrap; }
.primary-nav a:hover, .primary-nav a[aria-current=page] { color:var(--accent-dim); }
.site-footer p, .site-footer a { color:#c4cedd; }
.home-landing { min-height:0; background:#17324d; }
.home-top-band { display:none; }
.home-landing .home-hero { flex:none; min-height:550px; padding:64px 0 70px; background-color:#17324d; }
.home-hero::after { background:linear-gradient(120deg,rgba(12,31,52,.9),rgba(23,50,77,.67)); }
.home-hero h1 { font-size:clamp(42px,5.3vw,72px); line-height:1.12; letter-spacing:-.025em; }
.home-hero h1 em { color:#f5acd0; }
.home-hero p { max-width:650px; margin:22px auto 0; font-size:19px; }
.home-hero .home-actions { margin-top:32px; }
.home-hero .action-chip { border-radius:14px; }
.home-hero .scroll-cue { display:none; }
.home-landing .home-dashboard-section { background:#17324d; padding:20px 0 28px; }
.hero-dash-link { border:1px solid rgba(255,255,255,.2); background:rgba(255,255,255,.07); box-shadow:none; border-radius:12px; }
.hero-dash-link:hover { background:rgba(255,255,255,.13); box-shadow:none; }
.site-stat-ribbon { background:#17324d; border-top:1px solid rgba(255,255,255,.15); }
.home-intro { padding:48px 0; background:#fff; }
.home-intro >.container { display:flex; gap:32px; justify-content:space-between; align-items:center; }
.home-intro h2 { font-size:clamp(25px,3vw,34px); margin:12px 0; }
.home-intro p { color:var(--muted); max-width:680px; line-height:1.7; }
.home-intro .btn { flex-shrink:0; }
.contact-pending { color:var(--muted); line-height:1.7; padding:10px 0; }
.table-hint { display:none; margin:0; padding:12px 16px; color:var(--muted); font-size:14px; border-bottom:1px solid var(--border); }
#player-rank .ranking-table { min-width:880px; }
#player-rank th, #player-rank td { white-space:nowrap; }
#player-rank th:nth-child(2), #player-rank td:nth-child(2) { min-width:170px; }
.table-scroll { overflow-x:auto; scrollbar-width:thin; }
@media (max-width:1150px) { .primary-nav { gap:16px; margin-right:18px; } .brand small { display:none; } }
@media (max-width:960px) { .primary-nav { display:none; } }
@media (max-width:760px) {
  .home-landing .home-hero { min-height:0; padding:48px 16px 38px; }
  .home-hero .hero-inner { padding:0; }
  .home-hero h1 { font-size:clamp(34px,8.7vw,48px); }
  .home-hero p { font-size:17px; margin-top:18px; }
  .home-hero .home-actions { gap:12px; margin-top:28px; }
  .home-hero .action-chip { min-height:76px; padding:14px 16px; }
  .home-intro { padding:32px 0; }
  .home-intro >.container { display:block; }
  .home-intro .btn { margin-top:20px; }
  .toolbar, .toolbar-row { flex-wrap:wrap; overflow:visible; justify-content:flex-start; gap:10px; mask-image:none; -webkit-mask-image:none; }
  .toolbar > *, .toolbar-row > * { flex:1 1 auto; white-space:normal; }
  .toolbar > .filter-tabs { flex:1 0 100%; width:100%; display:flex; }
  .toolbar .filter-tab { flex:1 1 0; white-space:nowrap; padding-left:10px; padding-right:10px; }
  .toolbar .np-sel { flex:1 1 calc(50% - 10px); min-width:0; }
  .toolbar .np-sel-btn { width:100%; min-height:44px; justify-content:space-between; }
  .toolbar .toolbar-spacer { display:none; }
  .toolbar .btn { flex:1 1 calc(50% - 10px); min-height:44px; }
  .toolbar.has-overflow, .toolbar-row.has-overflow { mask-image:none; -webkit-mask-image:none; }
  .table-hint { display:block; }
  #player-rank .ranking-table th:first-child, #player-rank .ranking-table td:first-child { position:sticky; left:0; z-index:1; background:#fff; }
  #player-rank .ranking-table th:nth-child(2), #player-rank .ranking-table td:nth-child(2) { position:sticky; left:39px; z-index:1; background:#fff; box-shadow:5px 0 8px -6px #17324d; }
  .field input:not([type=checkbox]), .field textarea { font-size:16px; min-height:44px; }
}
@media (prefers-reduced-motion:reduce) { *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; transition-duration:.01ms !important; } }

.home-hero .hero-inner { padding:0; }
