:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #14161a;
  --muted: #8a9099;
  --faint: #b6bcc4;
  --line: #edeff2;
  --accent: #4257d5;
  --up: #12805c;
  --down: #d1483c;
  --radius: 16px;
  --shell: #e8ebf0;      /* 页面最外层底色 */
  --sunk: #f1f2f5;       /* 比卡片更深一级的凹陷块（占位、进度槽、缩略图） */
  --card-hover: #f9fafc; /* 卡片按下/悬停 */
  --line-strong: #dde3eb;
  --star: #e8a72c;       /* 关注星标 */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* hidden 属性必须压过下面那些 display:flex，否则筛选条会漏到赛程页 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--shell);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 460px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding-bottom: 72px;
  position: relative;
}

/* 左侧壳层：手机上只有顶部的 hero（tabbar 是 fixed 在屏幕底部的），
   宽屏下它整块变成左侧导航栏 */
.side { display: contents; }

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ---------- 顶部 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #172033 0%, #101827 100%);
  color: #fff;
  border-radius: 0 0 22px 22px;
  padding: 18px 0 6px;
  box-shadow: 0 10px 24px rgba(13, 18, 26, 0.18);
}

/* 右上一团冷光，避免纯色块显得死板 */
.hero::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 138, 255, 0.34), transparent 68%);
  pointer-events: none;
}

.hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 14px;
}

.hero h1,
.hero .brand-name {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.head-actions { display: flex; align-items: center; gap: 8px; }

.hero-btn {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.hero-btn:active { background: rgba(255, 255, 255, 0.22); }
.hero-btn[disabled] { opacity: 0.45; }

/* 手动录入表单 */
.form label {
  display: block;
  margin-bottom: 13px;
  font-size: 13px;
  color: var(--muted);
}

.form input,
.form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 15px;
  color: var(--text);
  background: var(--card);
  outline: none;
  font-family: inherit;
}
.form input:focus, .form select:focus { border-color: #c9d2e2; }

.tag-manual {
  font-size: 10px;
  color: #9a6200;
  background: #fff4e0;
  padding: 2px 6px;
  border-radius: 5px;
  font-weight: 600;
}

/* Liquipedia 补的占位赛事：只定了时间、对阵还没排 */
.tag-liquipedia {
  color: #2b6cb0;
  background: #e6f1fb;
}

/* ---------- 游戏切换 ---------- */

/* 游戏项目：图标方块 + 名称 */
.games {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  padding: 0 20px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.games::-webkit-scrollbar { display: none; }

.gametile {
  flex: 0 0 auto;
  border: none;
  background: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.gt-icon {
  width: 84px;
  height: 52px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  opacity: 0.45;
  transition: opacity 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.gt-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
/* Simple Icons 的图标是纯黑路径，这里翻成白色 */
.gt-logo.invert { filter: brightness(0) invert(1); }

.gt-mark {
  color: #fff;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.gametile.is-active .gt-icon {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.42), 0 0 0 2px rgba(255, 255, 255, 0.24);
}

.gt-name {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.52);
  white-space: nowrap;
}
.gametile.is-active .gt-name { color: #fff; font-weight: 600; }

/* ---------- 搜索与排序 ---------- */

.searchwrap { padding: 4px 20px 12px; }

.searchwrap input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 15px;
  color: var(--text);
  outline: none;
}
.searchwrap input::placeholder { color: var(--faint); }
.searchwrap input:focus { border-color: #d5dae2; }

.chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  padding: 14px 20px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  font-weight: 550;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}
.chip.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
  box-shadow: 0 4px 12px rgba(20, 22, 26, 0.16);
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.chip-n {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.5;
}
.chip.is-active .chip-n { opacity: 0.8; }

.chip-star {
  color: #dfa02a;
  font-size: 12.5px;
  line-height: 1;
}
.chip.is-active .chip-star { color: #ffd479; }

/* 分类网格：铺成 4 列，全部可见，不用横向滑 */
.cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 0 20px 12px;
}

.cat {
  border: 1px solid var(--line);
  background: var(--card);
  color: #5c636d;
  font-size: 14px;
  padding: 10px 4px;
  border-radius: 9px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
  font-weight: 650;
}

/* 市场整体趋势条 */
.trend {
  background: var(--card);
  border-radius: 14px;
  padding: 13px 16px 14px;
  margin: 0 12px 10px;
}

.trend-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 9px;
}

.trend-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--sunk);
}
.trend-bar i { display: block; height: 100%; }

.trend-legend {
  display: flex;
  gap: 14px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--muted);
}
.trend-legend b { font-weight: 650; }
.trend-legend .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 5px;
}

/* 详情页价格条状图 */
.chart { margin-top: 6px; }

.bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.bar-label {
  flex: 0 0 54px;
  font-size: 12.5px;
  color: var(--muted);
}

.bar-track {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: var(--sunk);
  overflow: hidden;
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #6f9bff, #2b5cff);
}

.bar-value {
  flex: 0 0 72px;
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ---------- 饰品详情的圆盘图 / 树状图 ---------- */

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.donut {
  width: 124px;
  height: 124px;
  flex: 0 0 auto;
}

.donut-center {
  font-size: 10px;
  fill: var(--faint);
}
.donut-center.big {
  font-size: 14px;
  font-weight: 700;
  fill: var(--text);
}

.donut-legend {
  flex: 1;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.donut-legend div {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.donut-legend div.is-mine {
  color: var(--text);
  font-weight: 700;
}
.donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: 0 0 auto;
}
.donut-legend .n {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.tree {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.tree-cell {
  flex-grow: 1;
  flex-basis: 84px;
  min-width: 84px;
  height: 62px;
  border-radius: 9px;
  background: var(--sunk);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 5px 7px;
  box-sizing: border-box;
}
.tree-cell img {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 38px;
  object-fit: contain;
  opacity: 0.9;
}
.tree-cell .tree-name,
.tree-cell .tree-n {
  position: relative;
  font-size: 10.5px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tree-cell .tree-name { font-weight: 600; }
.tree-cell .tree-n { color: #6b7280; }
.tree-cell.is-mine {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--card-hover);
}

/* ---------- 列表 ---------- */

.list { flex: 1; padding: 0 12px; }

/* ---------- 链接化的导航（服务端直出的页面用 <a>，爬虫才跟得进来） ---------- */

a.gametile,
a.tabbar-item,
a.cat,
a.skin-name {
  text-decoration: none;
  color: inherit;
}

a.skin-name { display: block; }

/* 服务端直出的面包屑与全站导航 */
.seo-crumb {
  font-size: 12.5px;
  color: var(--faint);
  padding: 14px 8px 0;
}
.seo-crumb a { color: var(--muted); text-decoration: none; }

.seo-foot {
  border-top: 1px solid var(--line);
  margin: 26px 12px 84px;
  padding-top: 16px;
}
.seo-foot h2 {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 600;
}
.seo-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 12px;
  font-size: 13px;
}
.seo-group a { color: var(--muted); text-decoration: none; }
.seo-group a.strong { color: var(--text); font-weight: 650; }
.seo-note { font-size: 12px; color: var(--faint); line-height: 1.7; }
.seo-icp { margin: 6px 0 0; font-size: 12px; line-height: 1.7; }
.seo-icp a { color: var(--faint); text-decoration: none; }
.seo-icp a:hover { color: var(--muted); }

/* ---------- SEO：页面导语 + 常见问题 ---------- */

.intro {
  margin: 0 4px 14px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* 客户端渲染出来的页面主标题（服务端那份被 SPA 替换后，语义要接上） */
.list-title {
  margin: 4px 4px 2px;
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.01em;
  color: var(--text);
}

.faq {
  margin: 26px 4px 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.faq h2 {
  font-size: 15px;
  margin: 0 0 10px;
  color: var(--text);
}
.faq details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
}
.faq summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.faq details > div {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.faq a { color: var(--accent); }

/* ---------- 比赛详情里的深度数据（BP / 经济曲线 / 团战） ---------- */

.label .src { font-size: 11.5px; color: var(--faint); font-weight: 400; margin-left: 6px; }

/* 手机上一栏一栏地排（弹层本来就窄，两栏会把英雄名挤没） */
.bp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 12px; }
@media (min-width: 760px) {
  .bp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.bp-side { border: 1px solid var(--line); border-radius: 12px; padding: 10px; min-width: 0; }
.bp-title { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; }
.bp-title span { color: var(--faint); }
.bp-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; min-width: 0; }
.bp-item img { width: 32px; height: 32px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); flex: none; }
.bp-who { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.bp-who b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-who i { font-style: normal; font-size: 10.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-kda { font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.bp-gold { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }

.bp-bans { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; font-size: 12px; color: var(--faint); }
.bp-bans img { width: 24px; height: 24px; border-radius: 6px; opacity: 0.55; }
.bp-bans i { font-style: normal; }

.curve, .fights { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.curve-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.curve-head b { font-weight: 600; }
.curve-head b.up { color: #4ec38a; }
.curve-head b.down { color: #e0664f; }
.curve svg { width: 100%; height: 92px; display: block; }
.curve-mid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.curve-line { fill: none; stroke-width: 2; }
.curve-line.is-radiant { stroke: #4ec38a; }
.curve-line.is-dire { stroke: #e0664f; }
.curve-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }

.fight-track { position: relative; height: 26px; border-radius: 7px; background: rgba(255, 255, 255, 0.05); }
.fight-track i { position: absolute; top: 6px; height: 14px; border-radius: 4px; background: var(--accent); opacity: 0.85; min-width: 3px; }

/* ---------- 页面：Dota 2 英雄版本榜（/meta/dota2/） ---------- */

.meta-body { margin: 0; background: var(--shell); color: var(--text); }
.meta-page { max-width: 1020px; margin: 0 auto; padding: 22px 16px 60px; }

.meta-head { padding: 6px 0 4px; }
.meta-crumb { font-size: 12.5px; color: var(--faint); margin: 0 0 10px; }
.meta-crumb a { color: var(--muted); text-decoration: none; }
.meta-head h1 { font-size: 26px; margin: 0 0 10px; letter-spacing: -0.01em; }
.meta-sub { font-size: 13.5px; line-height: 1.75; color: var(--muted); margin: 0 0 6px; }
.meta-note { font-size: 12.5px; color: var(--faint); line-height: 1.7; margin: 4px 0 0; }
.meta-note a { color: var(--muted); }
.meta-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0 0; font-size: 13px; }
.meta-links a { color: var(--accent); text-decoration: none; }

.meta-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 22px 0 8px; }
.meta-tier-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: rgba(255, 255, 255, 0.02); }
.meta-tier-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.meta-tier-n { font-size: 12.5px; color: var(--faint); }
.meta-tier-icons { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.meta-tier-icons figure { margin: 0; width: 58px; text-align: center; }
.meta-tier-icons img { width: 44px; height: 44px; border-radius: 10px; display: block; margin: 0 auto 3px; background: rgba(255, 255, 255, 0.04); }
.meta-tier-icons figcaption { font-size: 10.5px; color: var(--faint); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tier-badge { min-width: 22px; padding: 0 6px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #0d121a; }
.tier-S { background: #ff7a59; }
.tier-A { background: #f2c14e; }
.tier-B { background: #6fb3f2; }
.tier-C { background: #9aa3ad; }

.meta-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 20px 0 12px; }
.meta-sorts { display: flex; flex-wrap: wrap; gap: 7px; }
.meta-btn { border: 1px solid var(--line); background: none; color: var(--muted); font: inherit; font-size: 13px;
  padding: 6px 12px; border-radius: 9px; cursor: pointer; }
.meta-btn.is-active { color: var(--text); border-color: var(--accent); background: rgba(255, 255, 255, 0.04); }
.meta-filter { flex: 1 1 200px; max-width: 320px; border: 1px solid var(--line); background: none; color: var(--text);
  font: inherit; font-size: 13px; padding: 8px 12px; border-radius: 10px; }

.meta-tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.meta-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.meta-table th, .meta-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.meta-table thead th { font-size: 12.5px; color: var(--faint); font-weight: 600; background: rgba(255, 255, 255, 0.03); position: sticky; top: 0; }
.meta-table tbody tr:last-child td { border-bottom: 0; }
.meta-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.meta-rank { color: var(--faint); font-variant-numeric: tabular-nums; }
.meta-hero { display: flex; align-items: center; gap: 9px; }
.meta-hero img { width: 34px; height: 34px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); }
.meta-hero span { display: flex; flex-direction: column; line-height: 1.25; }
.meta-hero i { font-style: normal; font-size: 11px; color: var(--faint); }
.meta-roles { color: var(--muted); font-size: 12.5px; }
.meta-empty-tip { font-size: 13px; color: var(--muted); padding: 12px; }

.meta-foot { margin-top: 26px; font-size: 13px; color: var(--muted); line-height: 1.85; }
.meta-foot h2 { font-size: 15px; color: var(--text); margin: 0 0 8px; }
.meta-foot ul { margin: 0 0 12px; padding-left: 20px; }

/* 英雄详情页 */
.meta-h2 { font-size: 16px; color: var(--text); margin: 26px 0 10px; }
.meta-hero a { display: flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; }
.hero-facts {
  display: flex; align-items: center; gap: 18px;
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 18px 0 6px;
}
.hero-facts img { width: 88px; height: 88px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.hero-facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; flex: 1; }
.hero-facts-grid div { display: flex; flex-direction: column; gap: 4px; }
.hero-facts-grid span { font-size: 12.5px; color: var(--faint); }
.hero-facts-grid b { font-size: 20px; font-variant-numeric: tabular-nums; }

@media (max-width: 640px) {
  .meta-head h1 { font-size: 22px; }
  .meta-table { font-size: 12.5px; }
  .meta-table th, .meta-table td { padding: 8px 9px; }
  .meta-hero img { width: 30px; height: 30px; }
  .hero-facts { flex-direction: column; align-items: flex-start; }
  .hero-facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0 18px;
  font-size: 13px;
}
.seo-table th,
.seo-table td {
  text-align: left;
  padding: 8px 8px;
  border-bottom: 1px solid var(--line);
}
.seo-table th { color: var(--muted); font-weight: 500; }
.seo-table thead th { color: var(--faint); font-weight: 500; }
.seo-table td:last-child,
.seo-table th:last-child { text-align: right; }
.seo-table a { color: var(--accent); text-decoration: none; }

.group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 20px 8px 10px;
  font-size: 16px;
  font-weight: 600;
}
.group span { font-weight: 400; font-size: 13px; color: var(--faint); }

/* ---------- 级别分区 ---------- */

.tier {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 4px 10px;
}

.tier-copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }

.tier-name {
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tier-badge {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  border-radius: 8px;
  letter-spacing: 0.02em;
}

.tier-caption {
  font-size: 13px;
  color: var(--faint);
  font-weight: 400;
}

/* 联赛名是个按钮：默认显示简称，点一下展开全称 */
button.tier-name {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-align: left;
}
.tier-caret { font-size: 10px; color: var(--faint); }

/* 已结束的比赛默认收起（点开才看比分） */
.past-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 16px 0 0;
  padding: 12px 4px 2px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.past-arrow { font-size: 10px; transition: transform 0.18s ease; }
.past-toggle.is-open .past-arrow { transform: rotate(180deg); }

/* 列表末尾的说明：未来赛程排到哪天 */
.list-note {
  margin: 24px 4px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--faint);
  line-height: 1.7;
}

.day-sub {
  font-size: 13.5px;
  color: #9299a3;
  padding: 14px 4px 7px;
  font-weight: 600;
}

/* 联赛内的阶段分组（线下小组赛 / 线下淘汰赛…） */
.stage {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: #5c636d;
  font-weight: 600;
  padding: 15px 4px 0;
}
.stage i {
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: var(--accent);
}
.stage span {
  margin-left: auto;
  font-size: 13px;
  font-weight: 400;
  color: var(--faint);
}

/* ---------- 日历 ---------- */

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px 14px;
}

.cal-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }

.cal-nav {
  border: none;
  background: var(--sunk);
  color: #5c636d;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
}
.cal-nav[disabled] { opacity: 0.35; cursor: default; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--card);
  border-radius: 16px;
  padding: 10px 8px 14px;
  margin: 0 12px 6px;
}

.cal-wd {
  text-align: center;
  font-size: 12px;
  color: var(--faint);
  padding: 4px 0 8px;
}

.cal-cell {
  position: relative;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.cal-cell.is-out { color: #dfe3e8; }
.cal-cell.is-today {
  font-weight: 700;
  color: var(--accent);
}

.cal-cell .dots {
  position: absolute;
  bottom: 6px;
  display: flex;
  gap: 2px;
}

.cal-cell .dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  display: block;
}

.node {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.node-date {
  flex: 0 0 52px;
  text-align: center;
  border-right: 1px solid var(--line);
  padding-right: 10px;
}

.node-date b { display: block; font-size: 17px; font-weight: 700; }
.node-date span { font-size: 11px; color: var(--faint); }

.node-main { flex: 1; min-width: 0; }
.node-name { font-size: 14.5px; line-height: 1.4; }
.node-sub {
  margin-top: 5px;
  font-size: 12px;
  color: var(--faint);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- 比赛卡片 ---------- */

.match {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(22, 31, 48, 0.025);
}
.match:active { background: var(--card-hover); border-color: var(--line-strong); }

.match-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
}

.match-time {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #263249;
  font-size: 16.5px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}
.match-time i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.match-meta { display: flex; align-items: center; gap: 7px; }

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--down);
  font-weight: 600;
}
.live-dot i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--down);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.match-bo {
  font-size: 12px;
  color: #7e8794;
  background: var(--sunk);
  border-radius: 6px;
  padding: 3px 8px;
  font-weight: 650;
}

.matchup { margin-top: 9px; }
.team { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 5px 0; }
.team + .team { border-top: 1px solid var(--line); }

.mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--sunk);
  object-fit: contain;
  flex: 0 0 auto;
}
.mark-text {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--sunk);
  color: #a3a9b2;
  font-size: 11.5px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
  letter-spacing: -0.02em;
}

.team-name {
  flex: 1;
  font-size: 16.5px;
  font-weight: 520;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.team.is-winner .team-name { font-weight: 650; }
.team.is-loser .team-name { color: var(--muted); }
.team.is-tbd .team-name { color: var(--faint); }
.team.is-tbd .mark-text {
  background: transparent;
  border: 1px dashed var(--line);
  color: var(--faint);
}

.team-score {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 20px;
  text-align: right;
}
.team.is-winner .team-score { color: var(--up); }
.team.is-loser .team-score { color: var(--faint); font-weight: 500; }
.team-score.is-empty { color: transparent; }

/* ---------- 饰品条目 ---------- */

.skin {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.skin:active { background: var(--card-hover); }

.skin-main { flex: 1; min-width: 0; }

.skin-name {
  font-size: 14.5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.skin-thumb {
  width: 68px;
  height: 50px;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8f9fb, #eef0f4);
  object-fit: contain;
  flex: 0 0 auto;
}

.skin-thumb-text {
  width: 68px;
  height: 50px;
  border-radius: 8px;
  background: var(--sunk);
  color: #a3a9b2;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0 4px;
  text-align: center;
  line-height: 1.2;
}

.rarity-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}

.skin-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--faint);
  display: flex;
  gap: 10px;
}

.skin-price { text-align: right; flex: 0 0 auto; }
.skin-price b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.skin-price em {
  font-style: normal;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--faint); }

/* ---------- 空态 ---------- */

.empty {
  text-align: center;
  color: var(--faint);
  font-size: 15.5px;
  padding: 80px 30px;
  line-height: 2;
}

/* ---------- 底部导航 ---------- */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}

.tabbar-item {
  flex: 1;
  border: none;
  background: none;
  padding: 9px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--faint);
  cursor: pointer;
}

/* 非 Dota 2 游戏时把「英雄榜」这个 tab 藏起来（作者样式的 display 会盖掉 [hidden]，所以要显式写一条） */
.tabbar-item[hidden] { display: none; }

.tabbar-item svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tabbar-item.is-active { color: var(--text); }

/* ---------- 底部弹层 ---------- */

.mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 18, 22, 0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 60;
}
.mask[hidden] { display: none; }

.sheet {
  width: 100%;
  max-width: 460px;
  max-height: 84vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 22px 22px 26px;
  animation: rise 0.2s ease-out;
}

@keyframes rise {
  from { transform: translateY(16px); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet h2 { margin: 0 0 6px; font-size: 18px; line-height: 1.4; letter-spacing: -0.01em; }
.sheet .subtle { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

.row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.row > span:first-child { color: var(--muted); flex: 0 0 auto; }
.row > span:last-child { text-align: right; word-break: break-word; }

.sheet .label { font-size: 13px; color: var(--muted); margin: 22px 0 4px; }

.member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.member .nat { margin-left: auto; color: var(--faint); font-size: 12px; }

.close-btn {
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--sunk);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.link-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

/* ==================== 宽屏（电脑）布局 ====================
   手机上的结构原样保留，宽屏下把 .side 从 display:contents 换成
   真正的左侧栏：深色底、游戏纵排、Tab 变竖排菜单，右侧内容区加宽。
   这样两套界面共用一份 DOM，不用维护两份代码。
*/

@media (min-width: 1000px) {
  body { background: #0b0f16; }

  .app {
    /* 宽屏铺满整个窗口，左右不再留黑边 */
    max-width: none;
    min-height: 100vh;
    padding-bottom: 0;
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    align-items: stretch;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.45);
  }

  .side {
    display: flex;
    flex-direction: column;
    background: linear-gradient(168deg, #202a3b 0%, #151b26 55%, #0d121a 100%);
    color: #fff;
    /* 侧栏固定视口高度：游戏列表自己滚，「赛程/日历/饰品」始终贴在左下角 */
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }

  .hero {
    border-radius: 0;
    box-shadow: none;
    background: none;
    flex: 1;
    min-height: 0;
    padding: 26px 0 10px;
    overflow-y: auto;
  }

  .hero-top { padding: 0 22px 22px; }
  .hero h1,
  .hero .brand-name { font-size: 22px; }

  /* 侧栏只有 272px：标题一行、按钮一行，别让「搜索/主题/同步」挤成竖排 */
  .hero-top { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero h1,
  .hero .brand-name { white-space: nowrap; }
  .head-actions { width: 100%; }
  .head-actions .hero-btn { padding: 6px 12px; font-size: 12.5px; }

  /* 游戏项目：图标在左、名字在右，做成一行一个的导航项 */
  .games {
    flex-direction: column;
    gap: 4px;
    padding: 0 14px 18px;
    overflow: visible;
  }

  .gametile {
    flex-direction: row;
    align-items: center;
    width: 100%;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 12px;
    transition: background 0.16s ease;
  }
  .gametile:hover { background: rgba(255, 255, 255, 0.06); }
  .gametile.is-active { background: rgba(255, 255, 255, 0.1); }

  .gt-icon {
    width: 46px;
    height: 32px;
    border-radius: 9px;
    padding: 5px 8px;
    opacity: 0.55;
  }
  .gametile.is-active .gt-icon {
    opacity: 1;
    transform: none;
    box-shadow: none;
  }
  .gt-name { font-size: 14px; }

  /* Tab 从屏幕底部挪到侧边栏底部，竖排 */
  .tabbar {
    position: static;
    flex: none;
    max-width: none;
    margin: 0;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px 18px;
    background: none;
    backdrop-filter: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .tabbar-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 11px;
    padding: 11px 12px;
    border-radius: 11px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.55);
  }
  .tabbar-item:hover { background: rgba(255, 255, 255, 0.06); }
  .tabbar-item.is-active { background: rgba(255, 255, 255, 0.1); color: #fff; font-weight: 600; }
  .tabbar-item svg { width: 19px; height: 19px; }

  /* 右侧内容区 */
  .content { padding: 26px 34px 48px; background: var(--bg); }
  /* 跟着内容区铺满，不再卡在 940px */
  .list { padding: 0; width: 100%; }

  .searchwrap { padding: 0 0 14px; max-width: 420px; }
  .cats { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0 0 12px; }
  /* 宽屏下让筛选条换行显示，别把右边的联赛裁掉 */
  .chips { padding: 0 0 10px; flex-wrap: wrap; overflow-x: visible; }

  /* 弹层在电脑上居中显示，别贴着屏幕底 */
  .mask { align-items: center; }
  .sheet {
    max-width: 560px;
    border-radius: 20px;
    margin: 0 24px;
    max-height: 86vh;
    animation: pop 0.18s ease-out;
  }

  @keyframes pop {
    from { transform: scale(0.97); opacity: 0.4; }
    to { transform: scale(1); opacity: 1; }
  }

  .empty { padding: 120px 30px; }
}

/* ==================== 关注战队 ====================
   比赛卡片上每支队伍右侧一个星标，点了存在浏览器本地；
   顶部筛选条最前面的「只看关注」用来把列表收窄到关注队伍的比赛。
*/

.star {
  border: none;
  background: none;
  padding: 3px 6px;
  font-size: 18px;
  line-height: 1;
  color: var(--faint);
  cursor: pointer;
  border-radius: 6px;
  flex: 0 0 auto;
}
.star:hover { color: var(--star); }
.star.on { color: var(--star); }

.team.is-followed .team-name { color: var(--accent); }

/* ==================== 加载失败重试 ==================== */

.retry {
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
}
.retry:active { background: var(--card-hover); }

/* ==================== 全局搜索弹层 ==================== */

.gs-input {
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  font-size: 15px;
  background: var(--sunk);
  color: var(--text);
  outline: none;
}
.gs-result { margin-top: 12px; }
.gs-result .empty { padding: 30px 10px; }
.gs-group {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 12px 4px 6px;
}
.gs-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 11px;
  padding: 11px 12px;
  margin-bottom: 6px;
  background: var(--sunk);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}
.gs-item:active { background: var(--card-hover); }
.gs-title { font-weight: 600; }
.gs-sub { flex: 0 0 auto; font-size: 12px; color: var(--muted); }

/* ==================== 日历导出 ==================== */

.cal-ics { padding: 20px 8px 6px; text-align: center; }
.hero-btn.dark { background: var(--text); color: var(--bg); padding: 10px 20px; font-size: 13.5px; }
.hero-btn.dark:active { opacity: 0.85; }
.cal-ics-note {
  margin: 10px auto 0;
  max-width: 300px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--faint);
}

/* ==================== 深色模式 ====================
   主题由 app.js 决定：跟随系统时把 data-theme 解析成 light / dark 写进 <html>，
   所以这里只需要一套深色变量，不用再写媒体查询。
*/

:root[data-theme="dark"] {
  --bg: #10151d;
  --card: #161d27;
  --text: #e9eef5;
  --muted: #98a2b0;
  --faint: #6a7482;
  --line: #232b37;
  --shell: #0b0f16;
  --sunk: #1e2632;
  --card-hover: #1c2431;
  --line-strong: #2c3644;
  --accent: #8b9bf3;
  --up: #35c48c;
  --down: #f2695c;
  --star: #f0b83f;
}

:root[data-theme="dark"] .chip.is-active,
:root[data-theme="dark"] .cat.is-active { color: #10151d; }
:root[data-theme="dark"] .tabbar {
  background: rgba(22, 29, 39, 0.94);
  border-top-color: var(--line);
}
:root[data-theme="dark"] .mask { background: rgba(0, 0, 0, 0.55); }
:root[data-theme="dark"] .sheet { box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5); }
:root[data-theme="dark"] .mark-text { color: #cdd6e2; }
:root[data-theme="dark"] .tree-cell .tree-n { color: #8b95a5; }
:root[data-theme="dark"] .tree-cell img { opacity: 0.95; }
:root[data-theme="dark"] .match,
:root[data-theme="dark"] .skin { box-shadow: none; }

/* ==================== 赛程页：低级别赛事折叠区 ====================
   平时只铺 S / A 级联赛，B / C / D 级收在下面这个按钮里，点开才铺出来。
*/

.more-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong, var(--line));
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.more-toggle:hover { background: var(--card-hover, var(--sunk)); }

.more-title { font-weight: 600; }

.more-meta { flex: 1; color: var(--muted); }

.more-arrow {
  color: var(--muted);
  transition: transform 0.15s ease;
}

.more-toggle.is-open .more-arrow { transform: rotate(180deg); }

.more-wrap { margin-top: 4px; }

/* 没有图片的饰品（目前是 Dota 2）用分类名做占位，别留一排空框 */
.skin-thumb-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sunk);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  padding: 2px;
  border-radius: 8px;
}
