/* ==========================================================================
   KPL 赛研 · 站点 V2 基础层（首页 / 赛程 / 后续页面共用）
   与「单局详情」同一套 token：纸白 / 深空、Inter 数字、金=结论、蓝红=阵营。
   页面级布局写在各自的 page css 中，本文件只负责令牌与通用原件。
   ========================================================================== */

:root {
  --v2-bg: #f5f7fb;
  --v2-bg-elev: #ffffff;
  --v2-card: #ffffff;
  --v2-card-soft: #f4f7fc;
  --v2-inset: #eef3fa;
  --v2-line: #e4e9f1;
  --v2-line-2: #cbd6e6;
  --v2-ink: #171c26;
  --v2-ink-2: #4a5568;
  --v2-ink-3: #838fa3;
  --v2-blue: #2c5bd8;
  --v2-blue-rgb: 44, 91, 216;
  --v2-red: #c9354e;
  --v2-red-rgb: 201, 53, 78;
  --v2-gold: #a2761f;
  --v2-gold-rgb: 162, 118, 31;
  --v2-win: #8a6212;
  --v2-shadow-sm: 0 1px 2px rgba(23, 28, 38, .05);
  --v2-shadow: 0 1px 2px rgba(23, 28, 38, .04), 0 18px 40px -26px rgba(23, 28, 38, .28);
  --v2-shadow-lg: 0 1px 2px rgba(23, 28, 38, .05), 0 32px 64px -40px rgba(23, 28, 38, .45);
  --v2-hero-bg: linear-gradient(180deg, #ffffff 0%, #f7f9fd 58%, #f5f7fb 100%);
  --v2-hero-line: #e8edf5;
  --v2-glow-a: rgba(44, 91, 216, .10);
  --v2-glow-b: rgba(201, 53, 78, .08);
  --v2-grain: rgba(23, 28, 38, .022);
  --v2-mono: "Inter", "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", ui-monospace, monospace;
  --v2-sans: "Inter", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --v2-ease: cubic-bezier(.22, .61, .36, 1);
}

html.dark-site {
  --v2-bg: #080d16;
  --v2-bg-elev: #0b1320;
  --v2-card: #0d1524;
  --v2-card-soft: #111b2c;
  --v2-inset: #0a1220;
  --v2-line: rgba(203, 220, 244, .10);
  --v2-line-2: rgba(203, 220, 244, .18);
  --v2-ink: #edf2fb;
  --v2-ink-2: #a9b7cc;
  --v2-ink-3: #6f819c;
  --v2-blue: #6fa5ff;
  --v2-blue-rgb: 111, 165, 255;
  --v2-red: #ff7184;
  --v2-red-rgb: 255, 113, 132;
  --v2-gold: #f0c45c;
  --v2-gold-rgb: 240, 196, 92;
  --v2-win: #f0c45c;
  --v2-shadow-sm: 0 1px 0 rgba(255, 255, 255, .03);
  --v2-shadow: 0 1px 0 rgba(255, 255, 255, .03), 0 26px 56px -36px rgba(0, 0, 0, .85);
  --v2-shadow-lg: 0 1px 0 rgba(255, 255, 255, .04), 0 40px 80px -48px rgba(0, 0, 0, .95);
  --v2-hero-bg: linear-gradient(180deg, #0a1220 0%, #080d16 72%, #080d16 100%);
  --v2-hero-line: rgba(203, 220, 244, .09);
  --v2-glow-a: rgba(111, 165, 255, .16);
  --v2-glow-b: rgba(255, 113, 132, .12);
  --v2-grain: rgba(255, 255, 255, .025);
}

body.v2-page {
  background: var(--v2-bg);
  color: var(--v2-ink);
  font-family: var(--v2-sans);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .35s var(--v2-ease), color .35s var(--v2-ease);
}
body.v2-page ::selection { background: rgba(var(--v2-blue-rgb), .18); color: var(--v2-ink); }

.v2-wrap { width: min(1240px, 100%); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }
.v2-mono { font-family: var(--v2-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* 字号与标题 ------------------------------------------------------------- */
.v2-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--v2-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--v2-ink-3);
}
.v2-kicker i { width: 20px; height: 1px; background: currentColor; opacity: .55; display: inline-block; }
.v2-kicker b { color: var(--v2-ink-2); font-weight: 600; }

.v2-eyebrow { display: inline-flex; align-items: center; gap: 9px; font-family: var(--v2-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--v2-ink-3); }
.v2-eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .6; }
.v2-eyebrow .idx { color: var(--v2-gold); }

/* 面包屑 */
/* 兼容页（旧页面轻量换肤）通用头版 -------------------------------------- */
.lg-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--v2-hero-bg);
  border-bottom: 1px solid var(--v2-hero-line);
  padding: clamp(28px, 3.6vw, 52px) 0 clamp(24px, 3vw, 40px);
}
.lg-hero::before,
.lg-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(600px, 54vw);
  height: 500px;
  top: -200px;
  pointer-events: none;
}
.lg-hero::before { left: -6%; background: radial-gradient(closest-side, var(--v2-glow-a), transparent 72%); }
.lg-hero::after { right: -6%; background: radial-gradient(closest-side, var(--v2-glow-b), transparent 72%); }
.lg-hero .v2-kicker { margin-bottom: clamp(14px, 1.8vw, 20px); }
.lg-hero .v2-h1 { margin-bottom: 14px; }
.lg-hero .v2-lead { max-width: 72ch; }
.lg-hero-gridlines {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(var(--v2-grain) 1px, transparent 1px),
    linear-gradient(90deg, var(--v2-grain) 1px, transparent 1px);
  background-size: 100% 64px, 64px 100%;
  mask-image: linear-gradient(180deg, transparent, #000 32%, #000 76%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 32%, #000 76%, transparent);
}
html.dark-site .lg-hero-gridlines { opacity: .35; }

.v2-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-family: var(--v2-mono);
  font-size: 11px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--v2-ink-3);
}
.v2-crumb a { color: var(--v2-ink-3); border-bottom: 1px solid transparent; transition: color .18s, border-color .18s; }
.v2-crumb a:hover { color: var(--v2-ink); border-color: var(--v2-line-2); }
.v2-crumb .sep { color: var(--v2-line-2); }
.v2-crumb b { color: var(--v2-ink-2); font-weight: 600; letter-spacing: .1em; }

.v2-h1 {
  font-size: clamp(32px, 4.6vw, 62px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.035em;
  color: var(--v2-ink);
}
.v2-h1 span { color: var(--v2-blue); }
.v2-h1 .thin { font-weight: 500; }

.v2-h2 {
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--v2-ink);
}

.v2-lead {
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 1.9;
  color: var(--v2-ink-2);
  max-width: 54ch;
}
.v2-note { font-size: 12.5px; line-height: 1.75; color: var(--v2-ink-3); }

/* 区块标题 --------------------------------------------------------------- */
.v2-sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(16px, 2vw, 24px);
}
.v2-sec-head .l { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.v2-sec-head .v2-note { margin: 0; }
.v2-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--v2-ink-2);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--v2-line-2);
  transition: color .16s, border-color .16s;
}
.v2-more:hover { color: var(--v2-ink); border-color: var(--v2-ink-3); }
.v2-more .arr { font-family: var(--v2-mono); transition: transform .18s var(--v2-ease); }
.v2-more:hover .arr { transform: translateX(3px); }

.v2-section { padding: clamp(30px, 4vw, 56px) 0 0; }

/* 按钮 ------------------------------------------------------------------ */
.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border-radius: 11px;
  border: 1px solid var(--v2-line-2);
  background: transparent;
  color: var(--v2-ink-2);
  font-family: var(--v2-sans);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s, border-color .18s, background-color .18s, transform .18s;
}
.v2-btn:hover { color: var(--v2-ink); border-color: var(--v2-ink-3); background: var(--v2-card); }
.v2-btn:active { transform: translateY(1px); }
.v2-btn .arr { font-family: var(--v2-mono); transition: transform .18s var(--v2-ease); }
.v2-btn:hover .arr { transform: translateX(3px); }
.v2-btn.solid { border-color: transparent; background: var(--v2-ink); color: var(--v2-bg-elev); }
html.dark-site .v2-btn.solid { background: var(--v2-ink); color: #10141c; }
.v2-btn.solid:hover { background: var(--v2-blue); color: #fff; border-color: transparent; }
.v2-btn.sm { height: 34px; padding: 0 14px; font-size: 12.5px; border-radius: 9px; }
.v2-btn.ghost { border-color: transparent; padding-left: 4px; padding-right: 4px; border-bottom: 1px solid transparent; height: 30px; }
.v2-btn.ghost:hover { background: transparent; color: var(--v2-ink); }

.v2-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* 卡片 ------------------------------------------------------------------ */
.v2-card {
  background: var(--v2-card);
  border: 1px solid var(--v2-line);
  border-radius: 20px;
  box-shadow: var(--v2-shadow);
}
.v2-card.hoverable { transition: border-color .18s, transform .18s, box-shadow .18s; }
.v2-card.hoverable:hover { border-color: var(--v2-line-2); transform: translateY(-2px); box-shadow: var(--v2-shadow-lg); }

/* 分段 / 标签 ----------------------------------------------------------- */
.v2-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 11px;
  background: var(--v2-inset);
  border: 1px solid var(--v2-line);
  gap: 2px;
}
.v2-seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--v2-ink-3);
  height: 30px;
  padding: 0 13px;
  border-radius: 8px;
  font-family: var(--v2-sans);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color .16s, background-color .16s, box-shadow .16s;
  white-space: nowrap;
}
.v2-seg button:hover { color: var(--v2-ink-2); }
.v2-seg button[aria-pressed="true"] { color: var(--v2-ink); background: var(--v2-card); box-shadow: var(--v2-shadow-sm), 0 0 0 1px var(--v2-line); }
html.dark-site .v2-seg button[aria-pressed="true"] { background: #17233a; box-shadow: 0 0 0 1px var(--v2-line-2); }

.v2-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--v2-line);
  font-family: var(--v2-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--v2-ink-3);
  white-space: nowrap;
}
.v2-chip.on { color: var(--v2-ink-2); background: var(--v2-inset); border-color: var(--v2-line-2); }
.v2-chip.gold { color: var(--v2-gold); border-color: rgba(var(--v2-gold-rgb), .4); }
.v2-chip.blue { color: var(--v2-blue); border-color: rgba(var(--v2-blue-rgb), .35); }
.v2-chip.red { color: var(--v2-red); border-color: rgba(var(--v2-red-rgb), .35); }

.v2-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--v2-line);
  color: var(--v2-ink-3);
  font-family: var(--v2-mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.v2-tag.est { border-style: dashed; color: var(--v2-gold); border-color: rgba(var(--v2-gold-rgb), .45); }

/* 数字带 ---------------------------------------------------------------- */
.v2-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--v2-line);
  padding-top: clamp(16px, 1.8vw, 22px);
}
.v2-stat { padding: 0 20px; border-left: 1px solid var(--v2-line); min-width: 0; }
.v2-stat:first-child { padding-left: 0; border-left: 0; }
.v2-stat b {
  display: block;
  font-family: var(--v2-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(20px, 2.1vw, 29px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--v2-ink);
}
.v2-stat b .u { font-size: 11px; font-weight: 500; color: var(--v2-ink-3); margin-left: 4px; letter-spacing: 0; }
.v2-stat span { display: block; margin-top: 6px; font-size: 11px; letter-spacing: .04em; color: var(--v2-ink-3); white-space: nowrap; }
.lg-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .lg-kpis { grid-template-columns: 1fr; row-gap: 14px; } .lg-kpis .v2-stat { padding-left: 0; border-left: 0; } }

/* 队徽 / 头像 ----------------------------------------------------------- */
.v2-logo {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--v2-card-soft);
  border: 1px solid var(--v2-line);
  overflow: hidden;
}
.v2-logo img { position: relative; z-index: 1; width: 82%; height: 82%; object-fit: contain; }
.v2-logo .fb { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; color: var(--v2-ink-3); }

.v2-ava {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  background: var(--v2-inset);
  overflow: hidden;
}
.v2-ava img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.v2-ava .fb { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 9px; color: var(--v2-ink-3); }

/* 通用行（赛果 / 赛程） -------------------------------------------------- */
.v2-rows { display: flex; flex-direction: column; }
.v2-row {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 13px 4px;
  border-top: 1px solid var(--v2-line);
  color: var(--v2-ink-2);
  transition: background-color .15s;
}
.v2-row:first-child { border-top: 0; }
.v2-row:hover { background: var(--v2-inset); }
.v2-row .v2-row-time { font-family: var(--v2-mono); font-size: 11.5px; color: var(--v2-ink-3); white-space: nowrap; }
.v2-row .v2-row-team { display: flex; align-items: center; gap: 9px; min-width: 0; }
.v2-row .v2-row-team b { font-size: 13.5px; font-weight: 700; color: var(--v2-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-row .v2-row-team.win b { color: var(--v2-ink); }
.v2-row .v2-row-team.lose b { color: var(--v2-ink-3); font-weight: 600; }
.v2-row .v2-row-score {
  font-family: var(--v2-mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 700;
  color: var(--v2-ink);
  white-space: nowrap;
  text-align: center;
}
.v2-row .v2-row-score em { font-style: normal; color: var(--v2-ink-3); font-weight: 500; padding: 0 3px; }
.v2-row .v2-row-meta { font-size: 10.5px; color: var(--v2-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-row .v2-row-arr { font-family: var(--v2-mono); color: var(--v2-ink-3); text-align: right; }

/* 空态 ------------------------------------------------------------------ */
.v2-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 34px 20px;
  text-align: center;
  color: var(--v2-ink-3);
  font-size: 12.5px;
  line-height: 1.8;
}
.v2-empty b { color: var(--v2-ink-2); font-size: 13.5px; font-weight: 600; }
.v2-empty .ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px dashed var(--v2-line-2); font-size: 14px; margin-bottom: 2px; }

/* 本地运行状态条（common.js 在 localhost 注入） -------------------------- */
.v2-page #kplLocalRuntime {
  max-width: 1160px;
  margin: 14px auto 0;
  width: calc(100% - 2 * clamp(18px, 4vw, 40px));
  border-radius: 14px;
}

/* 入场动效 --------------------------------------------------------------- */
@keyframes v2-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.v2-r { opacity: 0; transform: translateY(18px); }
.v2-r.in { opacity: 1; transform: none; transition: opacity .6s var(--v2-ease), transform .6s var(--v2-ease); }

@media (prefers-reduced-motion: reduce) {
  .v2-page *, .v2-page *::before, .v2-page *::after { animation: none !important; transition: none !important; }
  .v2-r { opacity: 1; transform: none; }
}

/* 响应式基础 ------------------------------------------------------------- */
@media (max-width: 900px) {
  .v2-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  .v2-stat:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .v2-h1 { font-size: clamp(28px, 9vw, 40px); }
  .v2-stat { padding: 0 12px; }
  .v2-stat b { font-size: 20px; }
}


/* 覆盖 light.css 里针对全局 h1/h2 的 500 字重 */
body.v2-page .v2-h1 { font-weight: 800 !important; letter-spacing: -.035em !important; }
body.v2-page .v2-h2 { font-weight: 800 !important; letter-spacing: -.02em !important; }
body.v2-page .v2-lead { color: var(--v2-ink-2); }
body.v2-page .v2-note { color: var(--v2-ink-3); }

/* 窄屏 KPI 数字带必须单列：上面的 `.v2-stats` 两列规则在文件后面，
   会按加载顺序盖掉前面 `.lg-kpis` 的单列声明，这里补一条提权规则。 */
@media (max-width: 640px) {
  .v2-stats.lg-kpis { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
  .v2-stats.lg-kpis .v2-stat { padding-left: 0; border-left: 0; }
}

/* 圆角层级：arena.css 对 `html.v55` 的 .panel/.filterbar/.scopebar/.brief/.hcard
   .player 等写了 4px !important（旧暗色皮肤），light.css 又在浅色压成 14px，
   结果 V2 页「浅色 14 / 暗色 4」不一致。这里按 V2 组件层级统一恢复。 */
html.v55 body.v2-page .panel { border-radius: 18px !important; }
html.v55 body.v2-page .filterbar { border-radius: 14px !important; }
html.v55 body.v2-page .scopebar { border-radius: 16px !important; }
html.v55 body.v2-page .brief { border-radius: 14px !important; }
html.v55 body.v2-page :is(.hcard, .player, .tcard, .pick-card) { border-radius: 16px !important; }
