/* ============================================================
   赛事中心 · 赛事计分器样式
   版本：2.2.1 beta
   ============================================================ */

:root {
  --bg: #0b0e14;
  --panel: #121722;
  --panel-2: #161d2b;
  --panel-3: #1b2434;
  --line: #232c3d;
  --line-2: #2e3a50;
  --text: #e6ecf5;
  --muted: #8592a8;
  --muted-2: #64718a;
  --accent: #ff6a2b;
  --accent-2: #ffb347;
  --good: #31c48d;
  --blue: #4c8dff;
  --purple: #b07cff;
  --red: #f05b5b;
  --yellow: #f6b73c;
  --green: #31c48d;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  font-family: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(820px 460px at 12% -8%, rgba(76, 141, 255, .18), transparent 68%),
    radial-gradient(700px 420px at 92% 0%, rgba(176, 124, 255, .12), transparent 70%),
    radial-gradient(900px 600px at 50% 110%, rgba(255, 106, 43, .05), transparent 70%);
  z-index: 0;
}

a { color: var(--blue); }

button, input, select { font-family: inherit; }

.num, .brand-mark, .score-num, .stepper b, .pill, .rank-badge, .final-rank {
  font-family: Bahnschrift, "DIN Alternate", "Arial Narrow", sans-serif;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 46px;
}

/* ---------- 顶栏 ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #4c8dff, #b07cff);
  color: #08101f;
  font-size: 23px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(76, 141, 255, .35);
}

.brand-text { min-width: 0; }

.brand-text b {
  display: block;
  font-size: 20px;
  letter-spacing: .1em;
  line-height: 1.2;
}

.brand-text span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text i { font-style: normal; color: #9fc0ff; }

.top-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* ---------- 通用按钮 ---------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, opacity .16s ease;
}

.btn:hover { border-color: var(--line-2); background: var(--panel-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid rgba(76, 141, 255, .7); outline-offset: 2px; }

.btn.primary {
  border: 0;
  color: #1a0e05;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 26px rgba(255, 106, 43, .24);
}

.btn.primary:hover { filter: brightness(1.06); }

.btn.blue {
  border: 0;
  color: #06101f;
  font-weight: 800;
  background: linear-gradient(135deg, #4c8dff, #74b9ff);
  box-shadow: 0 10px 26px rgba(76, 141, 255, .22);
}

.btn.ghost { background: transparent; }
.btn.danger { color: #ff9b9b; border-color: rgba(240, 91, 91, .35); }
.btn.danger:hover { background: rgba(240, 91, 91, .1); }

.btn.small { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.btn.big { padding: 14px 26px; font-size: 15px; border-radius: 12px; }

.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover { border-color: var(--line); background: var(--panel); }

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(76, 141, 255, .13), rgba(176, 124, 255, .06) 45%, transparent 72%),
    var(--panel);
}

.hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -110px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 141, 255, .2), transparent 66%);
  pointer-events: none;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(76, 141, 255, .32);
  background: rgba(76, 141, 255, .08);
  color: #9fc0ff;
  font-size: 11px;
  letter-spacing: .14em;
}

.hero h2 {
  margin: 14px 0 8px;
  font-size: 34px;
  letter-spacing: .05em;
  line-height: 1.15;
}

.hero p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.hero-tags span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .02);
  color: #c9d6ee;
  font-size: 12px;
}

/* ---------- 卡片 ---------- */

.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  background: linear-gradient(180deg, var(--panel), rgba(18, 23, 34, .86));
}

.card-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.card-head h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: .05em;
}

.step {
  color: var(--blue);
  font-family: Bahnschrift, sans-serif;
  font-size: 13px;
}

.card-head .hint { margin-left: auto; }

.hint { color: var(--muted); font-size: 12px; line-height: 1.6; }
.hint.warn { color: var(--accent-2); }

/* ---------- 赛制 / 模式选择 ---------- */

.format-grid, .mode-grid {
  display: grid;
  gap: 10px;
}

.format-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.format-card, .mode-card {
  position: relative;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  padding: 14px;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease, opacity .16s ease;
}

.format-card:hover, .mode-card:hover {
  border-color: rgba(76, 141, 255, .5);
  transform: translateY(-1px);
}

.format-card.is-active, .mode-card.is-active {
  border-color: rgba(76, 141, 255, .85);
  background:
    linear-gradient(135deg, rgba(76, 141, 255, .16), rgba(176, 124, 255, .07)),
    var(--panel-2);
  box-shadow: 0 0 0 1px rgba(76, 141, 255, .18), 0 12px 28px rgba(0, 0, 0, .22);
}

.format-card.is-active::after, .mode-card.is-active::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
}

.mode-card.is-disabled { opacity: .46; cursor: not-allowed; }
.mode-card.is-disabled:hover { transform: none; border-color: var(--line); }

.fc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fc-top b { font-size: 16px; letter-spacing: .02em; }

.tag {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .08em;
}

.format-card small, .mode-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.mode-rule {
  display: block;
  margin-top: 9px;
  font-style: normal;
  font-size: 11px;
  color: var(--muted-2);
}

.mode-card.is-active .mode-rule { color: #9fc0ff; }
.mode-card.is-disabled .mode-rule { color: var(--accent-2); }

/* ---------- 设置区 ---------- */

.setup-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  gap: 18px;
  align-items: start;
}

.subhead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 13px;
  color: #c9d6ee;
  font-weight: 700;
  letter-spacing: .04em;
}

.subhead .hint { font-weight: 400; margin-left: auto; }

.field-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
}

.count-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: var(--panel-2);
}

.stepper button {
  width: 31px;
  height: 31px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.stepper button:hover { background: var(--panel-3); }
.stepper button:disabled { opacity: .3; cursor: not-allowed; }

.stepper b {
  min-width: 66px;
  padding: 0 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.name-list { display: grid; gap: 8px; }

.name-row {
  display: grid;
  grid-template-columns: 9px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .015);
  padding: 8px 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--side-color, var(--blue));
  box-shadow: 0 0 10px var(--side-color, var(--blue));
  flex: 0 0 auto;
}

.name-row label { color: var(--muted); font-size: 12px; }

.name-row input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px dashed transparent;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  padding: 4px 2px;
  outline: none;
}

.name-row input::placeholder { color: var(--muted-2); }
.name-row input:focus { border-bottom-color: var(--blue); }

.name-sub { color: var(--muted-2); font-size: 11px; white-space: nowrap; }

.rule-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .015);
  padding: 14px;
}

.control {
  width: 100%;
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 13px;
  padding: 10px 34px 10px 12px;
  outline: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.control:focus { border-color: rgba(76, 141, 255, .7); }

.rule-tip {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.rule-tip b { color: var(--text); }

.points-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.points-preview span {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cdd9ee;
  font-size: 11px;
}

.start-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 2px 0;
}

.start-summary { color: var(--muted); font-size: 12px; }

.start-bar .hint { flex: 1 1 240px; }
.start-bar .btn { flex: 0 0 auto; }

/* ---------- 比赛头部 ---------- */

.match-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: #c9d6ee;
  font-size: 11px;
  letter-spacing: .08em;
}

.pill-blue { border-color: rgba(76, 141, 255, .38); color: #b9d2ff; background: rgba(76, 141, 255, .09); }

.match-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--good);
  font-size: 11px;
  letter-spacing: .1em;
}

.match-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 8px var(--good);
}

.match-status.is-finished { color: var(--accent-2); }
.match-status.is-finished::before { background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }

.match-desc { color: var(--muted); font-size: 12px; }

.match-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* ---------- 计分板 ---------- */

.scoreboard {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  margin-bottom: 16px;
}

.scoreboard[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scoreboard[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.scoreboard[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.score-card {
  --side-color: var(--blue);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 186px;
  padding: 15px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--side-color);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .008)),
    var(--panel);
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.score-card::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -64px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--side-color);
  filter: blur(58px);
  opacity: .16;
  pointer-events: none;
}

.score-card.is-king {
  box-shadow: 0 0 0 1px var(--side-color), 0 16px 36px rgba(0, 0, 0, .3);
}

.score-card.is-challenger { border-style: dashed; }

.score-card.is-ranked {
  border-color: var(--side-color);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)),
    var(--panel-2);
}

.score-card.is-winner {
  box-shadow: 0 0 0 1px var(--side-color), 0 0 34px rgba(255, 179, 71, .16);
}

.score-card[role="button"] { cursor: pointer; }
.score-card[role="button"]:hover { transform: translateY(-2px); border-color: var(--side-color); }
.score-card[role="button"]:focus-visible { outline: 2px solid rgba(76, 141, 255, .7); outline-offset: 2px; }

.score-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
}

.side-name {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.side-sub {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .06em;
}

.badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .04em;
}

.badge-king { color: #1a0e05; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; font-weight: 800; }
.badge-challenger { color: #b9d2ff; border-color: rgba(76, 141, 255, .4); background: rgba(76, 141, 255, .1); }
.badge-rank { color: #1a0e05; background: var(--blue); border: 0; font-weight: 800; }
.badge-gold { color: #1a0e05; background: linear-gradient(135deg, #ffd36e, #ffb347); border: 0; font-weight: 800; }

.score-num {
  position: relative;
  z-index: 1;
  font-size: 58px;
  line-height: 1;
  letter-spacing: -.02em;
  margin: 14px 0 3px;
  font-weight: 700;
}

.score-label {
  position: relative;
  z-index: 1;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.card-spacer { flex: 1 1 auto; min-height: 10px; }

.card-action {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-weight: 700;
}

.card-action:hover { border-color: var(--side-color); background: rgba(255, 255, 255, .07); }

.card-role {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.card-role b { color: var(--text); }

/* ---------- 比赛控制区 ---------- */

.match-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr);
  gap: 14px;
  align-items: start;
}

.control-stack { display: grid; gap: 14px; }

.round-panel, .arena-panel, .log-panel, .final-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 16px;
}

.round-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .03em;
}

.round-count { color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: .04em; margin-left: auto; }

.order-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  margin: 14px 0;
  align-items: center;
}

.order-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 12px;
}

.order-chip b { color: var(--blue); font-size: 12px; }

.order-empty { color: var(--muted-2); font-size: 12px; line-height: 1.6; }

.round-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.progress-track {
  height: 8px;
  margin: 16px 0 10px;
  border-radius: 999px;
  background: var(--panel-3);
  overflow: hidden;
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  box-shadow: 0 0 16px rgba(76, 141, 255, .55);
  transition: width .35s ease;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 12px;
}

.stat-row b { color: var(--text); }

.arena-matchup {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  margin: 4px 0 14px;
}

.arena-side {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  padding: 12px;
  min-width: 0;
}

.arena-side > span { color: var(--muted); font-size: 10px; letter-spacing: .12em; }

.arena-side b {
  display: block;
  margin-top: 5px;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arena-side em { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-style: normal; }

.vs {
  color: var(--muted-2);
  font-family: Bahnschrift, sans-serif;
  font-size: 13px;
  letter-spacing: .1em;
}

.arena-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.arena-actions .btn { flex: 1 1 210px; }

.adjust-panel {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.adjust-head { font-size: 12px; color: #c9d6ee; margin-bottom: 10px; }
.adjust-head span { color: var(--muted-2); font-size: 11px; margin-left: 8px; }

.adjust-list { display: flex; flex-wrap: wrap; gap: 7px; }

.adjust-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 5px 3px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
}

.adjust-item .dot { width: 6px; height: 6px; box-shadow: none; }

.mini {
  width: 23px;
  height: 23px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.mini:hover { border-color: var(--line-2); background: var(--panel-3); }

/* ---------- 日志 ---------- */

.log-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 7px;
  max-height: 260px;
  overflow: auto;
}

.log-list li {
  position: relative;
  padding-left: 13px;
  color: #aebbd0;
  font-size: 12px;
  line-height: 1.6;
}

.log-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-2);
}

.log-list li:first-child { color: var(--text); }
.log-list li:first-child::before { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.log-list li.empty { color: var(--muted-2); }
.log-list li.empty::before { display: none; }

/* ---------- 结束 ---------- */

.finish-banner {
  --side-color: var(--accent-2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border: 1px solid rgba(255, 179, 71, .36);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(255, 106, 43, .16), rgba(255, 179, 71, .05) 60%, transparent),
    var(--panel);
}

.finish-banner::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: var(--side-color);
  filter: blur(60px);
  opacity: .16;
}

.trophy {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a0e05;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 10px 26px rgba(255, 106, 43, .28);
}

.finish-banner h2 { margin: 0 0 4px; font-size: 23px; letter-spacing: .03em; }
.finish-banner p { margin: 0; color: var(--muted); font-size: 12px; }
.finish-banner .finish-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.final-list { display: grid; gap: 7px; margin-top: 12px; }

.final-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .015);
}

.final-rank {
  width: 24px;
  color: var(--muted-2);
  font-size: 13px;
  text-align: center;
}

.final-row:first-child .final-rank { color: var(--accent-2); }

.final-row b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.final-row em { margin-left: auto; color: var(--muted); font-size: 12px; font-style: normal; white-space: nowrap; }

/* ---------- 独立窗口待命 ---------- */

.board-idle {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 30px;
}

.idle-mark {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, #4c8dff, #b07cff);
  color: #08101f;
  font-size: 30px;
  font-weight: 800;
  box-shadow: 0 14px 36px rgba(76, 141, 255, .3);
  margin-bottom: 8px;
}

.board-idle h2 { margin: 0; font-size: 24px; }
.board-idle p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.7; max-width: 420px; }

/* ---------- 独立窗口模式 ---------- */

body.board-mode .wrap {
  width: 100%;
  max-width: none;
  padding: 12px 14px 18px;
}

body.board-mode .topbar { margin-bottom: 12px; }
body.board-mode .brand-mark { width: 36px; height: 36px; font-size: 18px; border-radius: 11px; }
body.board-mode .brand-text b { font-size: 15px; }
body.board-mode .brand-text span { font-size: 10px; margin-top: 2px; }
body.board-mode .foot, body.board-mode .only-full { display: none; }
body.board-mode .score-card { min-height: 150px; padding: 12px; }
body.board-mode .score-num { font-size: 46px; margin: 9px 0 2px; }
body.board-mode .match-head { margin-bottom: 10px; }
body.board-mode .scoreboard { gap: 9px; margin-bottom: 10px; }
body.board-mode .match-bottom { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 10px; }
body.board-mode .round-panel, body.board-mode .arena-panel, body.board-mode .log-panel, body.board-mode .finish-banner { padding: 12px; }
body.board-mode .log-list { max-height: 180px; }
body.board-mode .adjust-panel { display: none; }

/* ---------- 页脚 ---------- */

.foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: .04em;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: 26px;
  max-width: min(560px, calc(100vw - 32px));
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #1c2536;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */

@media (max-width: 980px) {
  .setup-cols { grid-template-columns: 1fr; }
  .match-bottom { grid-template-columns: 1fr; }
  .format-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scoreboard[data-count="5"], .scoreboard[data-count="6"], .scoreboard[data-count="7"], .scoreboard[data-count="8"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 24px); padding-top: 16px; }
  .topbar { align-items: flex-start; }
  .brand-mark { width: 40px; height: 40px; font-size: 20px; }
  .brand-text b { font-size: 17px; }
  .brand-text span { font-size: 11px; }
  .hero { padding: 21px; }
  .hero h2 { font-size: 27px; }
  .hero p { font-size: 13px; }
  .format-grid, .mode-grid { grid-template-columns: 1fr; }
  .scoreboard, .scoreboard[data-count="2"], .scoreboard[data-count="3"], .scoreboard[data-count="4"],
  .scoreboard[data-count="5"], .scoreboard[data-count="6"], .scoreboard[data-count="7"], .scoreboard[data-count="8"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .score-card { min-height: 158px; padding: 12px; }
  .score-num { font-size: 44px; margin: 11px 0 2px; }
  .name-row { grid-template-columns: 8px minmax(0, 1fr) auto; }
  .name-row label { display: none; }
  .match-actions { width: 100%; margin-left: 0; }
  .start-bar { flex-direction: column; align-items: stretch; }
  .start-bar .btn { width: 100%; }
  .finish-banner .finish-actions { margin-left: 0; width: 100%; }
  .arena-matchup { grid-template-columns: 1fr; }
  .vs { text-align: center; }
  .foot { flex-direction: column; gap: 4px; }
  body.board-mode .wrap { padding: 10px; }
  body.board-mode .scoreboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 430px) {
  .top-actions .btn { padding: 8px 10px; font-size: 12px; }
  .scoreboard, .scoreboard[data-count="2"], .scoreboard[data-count="3"], .scoreboard[data-count="4"],
  .scoreboard[data-count="5"], .scoreboard[data-count="6"], .scoreboard[data-count="7"], .scoreboard[data-count="8"] {
    grid-template-columns: 1fr;
  }
  .score-card { min-height: 132px; }
  .score-num { font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- v2.2.1 车辆 BP / 全能 / Gauntlet ---------- */

.bp-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bp-list { display: flex; flex-direction: column; gap: 10px; }
.bp-row {
  display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 8px;
  align-items: center; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: rgba(255, 255, 255, .018);
}
.bp-side { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.bp-side .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--side-color, var(--accent)); }
.bp-select { min-width: 0; }
.bp-chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.ban-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 5px 3px 8px;
  border-radius: 999px; border: 1px solid rgba(255, 106, 43, .35);
  background: rgba(255, 106, 43, .09); color: var(--text); font-size: 12px;
}
.ban-chip button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0 3px;
}
.ban-chip button:hover { color: var(--accent); }

.allround-panel, .gauntlet-panel {
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); display: flex; flex-direction: column; gap: 12px;
}
.allround-picked {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 10px; border: 1px dashed rgba(76, 141, 255, .45);
  background: rgba(76, 141, 255, .07);
}
.allround-picked span { color: var(--muted); font-size: 12px; }
.allround-picked b { font-size: 20px; }
.allround-picked em { color: var(--muted); font-size: 12px; font-style: normal; }
.allround-pick-row { display: flex; gap: 8px; align-items: center; }
.allround-pick-row .control { flex: 1; min-width: 0; }

.g-choice { display: flex; gap: 10px; flex-wrap: wrap; }
.g-stage-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.g-stage-row .control { width: 130px; }
.g-map-list { display: flex; flex-direction: column; gap: 8px; }
.g-map-row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) 130px 86px auto;
  gap: 8px; align-items: center; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .015);
}
.g-map-row.is-static { grid-template-columns: 28px minmax(0, 1fr) 92px 88px auto; }
.g-map-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; background: rgba(76, 141, 255, .16);
  color: var(--blue); font-size: 11px; font-weight: 700;
}
.g-map-car { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.g-map-score { color: var(--muted); font-size: 12px; white-space: nowrap; }
.g-map-state { font-size: 11px; color: var(--muted); white-space: nowrap; }
.g-map-state.is-win { color: var(--good); }
.g-map-state.is-lose { color: var(--accent); }
.g-scoreline {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .025);
  font-size: 13px;
}
.g-breaks { font-size: 22px; font-weight: 700; color: var(--accent-2); }

@media (max-width: 720px) {
  .bp-row { grid-template-columns: 1fr auto; }
  .bp-row .bp-select { grid-column: 1 / -1; }
  .g-map-row, .g-map-row.is-static { grid-template-columns: 28px minmax(0, 1fr) 80px; }
  .g-map-row .g-map-state, .g-map-row .btn { grid-column: 2 / -1; justify-self: start; }
  .allround-pick-row { flex-direction: column; align-items: stretch; }
}

.pill-event{background:rgba(176,124,255,.16);color:#d8c2ff;border:1px solid rgba(176,124,255,.35);max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ���� */
.sprint-list{display:flex;flex-direction:column;gap:8px;margin-top:10px}
.sprint-row{display:grid;grid-template-columns:minmax(110px,1fr) auto 130px auto auto;gap:8px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,255,255,.02);border-left:3px solid var(--side-color)}
.sprint-name b{display:block;font-size:14px}.sprint-name span{color:var(--muted);font-size:11px}
.sprint-dots{display:flex;gap:4px}.sp-dot{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.12)}.sp-dot.is-done{background:var(--side-color)}.sp-dot.is-burn{box-shadow:0 0 0 2px rgba(255,106,43,.35)}
.sprint-row input{width:100%;min-width:0;background:var(--panel-2);border:1px solid var(--line);color:var(--text);border-radius:8px;padding:8px 10px;font:inherit}
.panel-actions{display:flex;align-items:center;gap:12px;margin-top:12px;flex-wrap:wrap}
@media (max-width:720px){.sprint-row{grid-template-columns:1fr auto;grid-template-areas:"name dots" "input input" "record burn"}.sprint-row input{grid-area:input}.sprint-row .btn[data-act=sprint-record]{grid-area:record}.sprint-row .btn[data-act=sprint-burn]{grid-area:burn}.sprint-name{grid-area:name}.sprint-dots{grid-area:dots}}

/* 1v1 / 2 �ӶԿ�ǿ�� */
.scoreboard[data-count="2"]{grid-template-columns:1fr auto 1fr;align-items:stretch}
.versus-mark{align-self:center;font-family:Bahnschrift,sans-serif;font-size:22px;font-weight:700;color:var(--muted);letter-spacing:1px;padding:0 6px;text-shadow:0 0 18px rgba(255,106,43,.25)}
.scoreboard[data-count="2"] .score-card{min-height:240px}
.score-num{transition:color .2s ease}
.score-card.is-winner .score-num{text-shadow:0 0 24px rgba(255,179,71,.35)}
@keyframes scoreBump{0%{transform:scale(1)}35%{transform:scale(1.16);color:var(--accent-2)}100%{transform:scale(1)}}
.score-card.score-bump .score-num{animation:scoreBump .55s ease}
@media (max-width:760px){.scoreboard[data-count="2"]{grid-template-columns:1fr 1fr;gap:8px}.versus-mark{display:none}}
