/* === styles.css === */
/* ===========================================================
   LOL Esports Stats - light blue esports portal theme
   =========================================================== */

:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-soft: #f7faff;
  --surface-blue: #edf4ff;
  --line: #dfe7f4;
  --line-strong: #c9d6eb;
  --text: #16223a;
  --text-soft: #52627d;
  --text-mute: #8a98b5;
  --blue: #3f7df4;
  --blue-2: #6b9af6;
  --blue-deep: #3159b8;
  --red: #ff4b50;
  --red-soft: #fff0f1;
  --green: #19ad73;
  --green-soft: #eaf8f2;
  --gold: #f4b33f;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(40, 64, 104, 0.08);
  --shadow-md: 0 10px 28px rgba(57, 95, 160, 0.14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #3159b8;
  color: #fff;
  box-shadow: 0 3px 14px rgba(27, 65, 141, 0.18);
}
.header-main {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
  letter-spacing: 0;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border: 3px solid #fff;
  transform: skew(-16deg);
  position: relative;
  display: inline-block;
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 7px;
  top: -6px;
  width: 14px;
  height: 36px;
  background: #fff;
  transform: skew(-20deg) rotate(38deg);
}
.primary-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.primary-nav::-webkit-scrollbar,
.region-tabs::-webkit-scrollbar,
.game-tabs::-webkit-scrollbar { display: none; }
.nav-btn {
  height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: rgba(255,255,255,0.74);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.nav-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-btn.is-active {
  color: #fff;
  background: rgba(255,255,255,0.15);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.54);
}
.header-tools { display: flex; align-items: center; gap: 10px; }

/* Hamburger button — hidden on desktop, shown on phone via media query below. */
.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 6px;
  position: relative;
  margin-left: auto;
}
.nav-toggle:hover { background: rgba(255,255,255,0.12); }
.nav-toggle-bar {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.18s, opacity 0.18s, top 0.18s;
}
.nav-toggle-bar:nth-child(1) { top: 11px; }
.nav-toggle-bar:nth-child(2) { top: 17px; }
.nav-toggle-bar:nth-child(3) { top: 23px; }
body.nav-open .nav-toggle-bar:nth-child(1) { top: 17px; transform: rotate(45deg); }
body.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-bar:nth-child(3) { top: 17px; transform: rotate(-45deg); }
.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 7px;
  background: rgba(255,255,255,0.12);
}
.lang-btn {
  border: 0;
  border-radius: 5px;
  padding: 5px 10px;
  color: rgba(255,255,255,0.76);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}
.lang-btn.is-active { background: #fff; color: var(--blue-deep); }
.header-sub {
  min-height: 50px;
  background: #eaf2ff;
  border-top: 1px solid rgba(255,255,255,0.48);
  border-bottom: 1px solid #d7e5fb;
  box-shadow: 0 2px 10px rgba(49, 89, 184, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 max(24px, calc((100vw - 1180px) / 2 + 24px));
}
.region-tabs,
.game-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  min-width: 0;
}
.region-tab {
  height: 32px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: rgba(255,255,255,0.72);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.header-game-tabs {
  flex: 1;
  gap: 8px;
}
.header-game-tabs .game-tab {
  min-width: 82px;
  height: 34px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #31518d;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.header-game-tabs .game-tab:hover {
  color: #244a9f;
  background: rgba(63, 125, 244, 0.10);
}
.header-game-tabs .game-tab.is-active {
  color: #fff;
  background: #3f7df4;
  box-shadow: 0 2px 6px rgba(63, 125, 244, 0.20);
}
.api-badge {
  border-radius: 7px;
  padding: 5px 10px;
  background: rgba(63, 125, 244, 0.10);
  color: #31518d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- shell content ---------- */
.content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 56px;
}

.portal-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.portal-title-block {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.portal-toolbar h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
}
.portal-subtitle {
  color: var(--text-mute);
  font-size: 12px;
}
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.content-region-tabs {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.content-region-tabs .region-tab {
  min-width: 78px;
  height: 36px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: #1d2742;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.content-region-tabs .region-tab:hover {
  color: var(--blue);
  background: var(--surface-blue);
}
.content-region-tabs .region-tab:last-child { border-right: 0; }
.content-region-tabs .region-tab.is-active {
  background: var(--blue);
  color: #fff;
}

/* ---------- buttons / inputs ---------- */
.btn {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
}
.btn:hover { background: var(--surface-blue); border-color: #b8c9ec; }
.btn-primary {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-soft); }
.btn-danger { color: var(--red); border-color: #ffb6b9; background: #fff; }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { min-height: 28px; padding: 4px 9px; font-size: 12px; }
.input, .select, .textarea {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  outline: 0;
}
.select.slim { width: 116px; height: 36px; }
.league-select {
  width: 136px;
  height: 36px;
  border-color: #bfd0ee;
  background-color: #fff;
  color: #1e3e7c;
  font-weight: 700;
}
.admin-region-select-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 14px;
}
.admin-league-select { width: 148px; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(63,125,244,0.14);
}
.textarea {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  font-family: var(--mono);
}
.textarea-compact {
  min-height: 74px;
  font-family: var(--font);
}
.input.search { min-width: 240px; }

/* ---------- common panels ---------- */
.panel,
.portal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.portal-panel.compact { margin-bottom: 12px; }
.panel-head,
.portal-panel-head {
  min-height: 48px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-head h2,
.portal-panel-head h2 {
  margin: 0;
  padding-left: 9px;
  border-left: 4px solid var(--blue);
  font-size: 15px;
  font-weight: 800;
}
.panel-sub {
  color: var(--text-mute);
  font-size: 12px;
}
.panel-body { padding: 16px; }
.panel-body.flush { padding: 0; overflow-x: auto; }
.empty {
  padding: 34px;
  color: var(--text-mute);
  text-align: center;
  font-size: 13px;
}
.compact-empty { padding: 18px; }

/* ---------- home ---------- */
.portal-stage {
  position: relative;
  min-height: 250px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.stage-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.98), rgba(255,255,255,0.78)),
    radial-gradient(circle at 72% 42%, rgba(63,125,244,0.16), transparent 34%),
    linear-gradient(135deg, transparent 0 40%, rgba(49,89,184,0.08) 40% 46%, transparent 46%);
}
.stage-content {
  position: relative;
  z-index: 1;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 28px;
}
.stage-label {
  margin-bottom: 18px;
  color: #111b34;
  font-size: 18px;
  font-weight: 800;
}
.featured-match {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255,255,255,0.92);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.featured-match:hover,
.match-row:hover,
.library-row:hover {
  border-color: var(--blue-2);
  box-shadow: var(--shadow-md);
}
.featured-meta,
.featured-sides,
.featured-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.featured-sides { margin: 12px 0; }
.featured-time { color: var(--text-mute); font-size: 12px; }
.team-score-block {
  min-width: 210px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.team-score-block.red {
  grid-template-columns: auto minmax(0, 1fr) 56px;
  text-align: right;
}
.team-score-block.red .team-logo { order: 3; }
.team-score-block.red strong { order: 2; }
.team-score-block.red span { order: 1; }
.team-score-block strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-score-block > span {
  color: var(--red);
  font-size: 18px;
  font-weight: 800;
}
.featured-vs {
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 800;
}
.hot-event-list {
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hot-event {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 6px 12px;
  font-weight: 700;
}
.match-list { padding: 0; }
.match-row {
  display: grid;
  grid-template-columns: 116px minmax(120px, 1fr) minmax(280px, 1.8fr) 24px;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  background: #fff;
}
.match-row:last-child { border-bottom: 0; }
.match-row-time {
  display: flex;
  gap: 10px;
  color: #0e1c3b;
  font-variant-numeric: tabular-nums;
}
.match-row-time small { color: var(--text-mute); }
.match-row-event {
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-row-teams {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) 24px auto 24px minmax(70px, 1fr);
  align-items: center;
  gap: 8px;
  text-align: center;
}
.match-row-teams span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.match-row-teams strong {
  color: var(--red);
  font-variant-numeric: tabular-nums;
}
.match-row-go { color: var(--text-mute); font-size: 22px; text-align: right; }

/* ---------- libraries ---------- */
.library-list { padding: 0; }
.library-row {
  min-height: 60px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.library-row:last-child { border-bottom: 0; }
.library-row strong { display: block; }
.library-row span { color: var(--text-mute); font-size: 12px; }
.library-meta { display: flex; gap: 12px; align-items: center; }
.team-library-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.team-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  background: #fff;
}
.team-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.team-card-head strong { display: block; font-size: 15px; }
.team-card-head span { color: var(--text-mute); font-size: 12px; }
.team-note {
  margin: 0 0 12px;
  color: var(--text-soft);
  font-size: 12px;
}
.team-roster-list {
  display: grid;
  gap: 8px;
}
.team-roster-list > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.team-mini,
.team-pill,
.player-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.team-mini span:last-child,
.player-identity span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- detail ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--text-mute);
  font-size: 13px;
  margin-bottom: 14px;
}
.crumb-link {
  min-height: 28px;
  border: 1px solid #cfe0fb;
  border-radius: 999px;
  background: #f4f8ff;
  color: var(--blue);
  padding: 0 11px;
  font-size: 13px;
  font-weight: 700;
}
.crumb-link:hover {
  border-color: #9fbcf2;
  background: #eaf2ff;
}
.crumb-sep {
  color: #9aabc8;
  font-weight: 700;
}
.crumb-current {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d9e5f7;
  border-radius: 999px;
  background: #fff;
  color: #41547a;
  padding: 0 12px;
  font-weight: 700;
}
.detail-hero {
  min-height: 170px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  margin: -20px -24px 0;
  padding: 34px 24px 30px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 34px;
}
.detail-team {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
  font-size: 24px;
  font-weight: 700;
}
.detail-team.right { justify-content: flex-start; }
.detail-team-name {
  overflow-wrap: anywhere;
}
.detail-score { text-align: center; min-width: 160px; }
.detail-time {
  margin-bottom: 12px;
  color: var(--text-mute);
  font-size: 15px;
}
.score-boxes {
  display: flex;
  justify-content: center;
  gap: 18px;
}
.score-box {
  width: 58px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #fff;
  color: var(--text-mute);
  box-shadow: 0 8px 26px rgba(62, 103, 196, 0.16);
  font-size: 40px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.score-box.blue { color: var(--text-mute); }
.detail-status {
  margin-top: 12px;
  color: var(--text-mute);
  font-size: 12px;
}
.detail-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 -24px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.detail-tab {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-bottom: 3px solid transparent;
  background: #fff;
  color: #111b34;
  font-size: 16px;
  text-align: center;
}
.detail-tab.is-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.detail-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.detail-grid.two-col { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr); }
.game-title-bar {
  height: 44px;
  margin-bottom: 14px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--blue), var(--blue-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
}
.live-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.55fr);
  gap: 14px;
  margin-bottom: 14px;
}
.live-score-panel,
.bp-panel {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px;
}
.live-score-panel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.live-score-center {
  min-width: 140px;
  text-align: center;
  color: var(--text-mute);
}
.live-score-center strong {
  display: block;
  color: #0f1c38;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
}
.lane-bars {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}
.lane-bar {
  display: grid;
  grid-template-columns: 1fr 80px 1fr;
  align-items: center;
  color: var(--text-soft);
}
.lane-bar strong { text-align: center; }
.obj-bar .obj-blue { text-align: right; color: #2563eb; font-weight: 600; }
.obj-bar .obj-red  { text-align: left;  color: #dc2626; font-weight: 600; }
.bp-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(5, 42px);
  gap: 10px;
  justify-content: center;
}
.bp-grid span {
  width: 42px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #aeb8d4;
  color: #fff;
  font-weight: 800;
  font-style: italic;
}
.ability-panel {
  min-height: 250px;
  padding-bottom: 16px;
}
.ability-panel .portal-panel-head { margin-bottom: 16px; }
.ability-row {
  display: grid;
  grid-template-columns: 28px 1fr 54px 28px;
  gap: 8px;
  align-items: center;
  padding: 6px 22px;
}
.ability-track {
  height: 6px;
  border-radius: 999px;
  background: #e8edf6;
  overflow: hidden;
}
.ability-track span {
  display: block;
  height: 100%;
  background: var(--blue);
}
.analysis-filters {
  padding: 12px 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.metric-pill {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text-soft);
  background: #fff;
  font-size: 12px;
}
.comparison-bars {
  padding: 24px;
  display: grid;
  gap: 16px;
}
.compare-row {
  display: grid;
  grid-template-columns: 42px 1fr 70px 42px;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
}
.compare-row strong { text-align: center; color: var(--text); }
.compare-track {
  height: 4px;
  display: flex;
  background: #e9eef7;
  border-radius: 999px;
  overflow: hidden;
}
.compare-track i { display: block; height: 100%; }
.compare-track .left { background: var(--blue); }
.compare-track .right { background: #68c2be; }
.position-tabs {
  padding: 16px 16px 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.position-tab {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--text-mute);
  font-weight: 700;
}
.lineup-compare {
  padding: 18px 24px 24px;
  display: grid;
  gap: 12px;
}
.lineup-pair {
  min-height: 48px;
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  align-items: center;
  gap: 16px;
}
.lineup-pair > span:last-child { justify-self: end; }
.position-badge {
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-blue);
  color: var(--blue);
  font-weight: 800;
}
.combo-list {
  padding: 16px;
  display: grid;
  gap: 9px;
}
.combo-row {
  display: grid;
  grid-template-columns: 24px 80px 1fr 44px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.mini-bar {
  height: 4px;
  border-radius: 999px;
  background: #ecf1fa;
  overflow: hidden;
}
.mini-bar span {
  display: block;
  height: 100%;
  background: #68c2be;
}
.stats-table-panel { border: 0; }
.stats-table-title {
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  background: linear-gradient(90deg, var(--blue), var(--blue-2));
}
.stats-table-panel.red .stats-table-title {
  background: linear-gradient(90deg, var(--red), #ff8588);
}
.reserved-live-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}
.reserve-card {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 8px;
  align-content: center;
  justify-items: center;
  color: var(--text-soft);
}
.reserve-card strong { color: var(--text); }
.reserve-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-blue);
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

/* ---------- logos / badges ---------- */
.team-logo,
.player-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  object-fit: contain;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  font-weight: 800;
  font-size: 11px;
}
.team-logo-xs { width: 24px; height: 24px; font-size: 9px; }
.team-logo-sm { width: 30px; height: 30px; font-size: 10px; }
.team-logo-lg { width: 52px; height: 52px; font-size: 14px; }
.team-logo-xl { width: 70px; height: 70px; font-size: 17px; }
.team-logo.is-tbd {
  background: #fff;
  color: #536580;
  border: 1px solid var(--line);
}
.logo-pending {
  margin-left: 8px;
  color: #98620c;
  background: #fff7e6;
}
img.team-logo,
img.player-avatar {
  background: #fff;
  border: 1px solid var(--line);
  padding: 3px;
}
.player-avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
  background: linear-gradient(135deg, #dfe8ff, var(--blue));
}
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-soft);
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}
.chip.accent {
  color: var(--blue);
  border-color: transparent;
  background: var(--surface-blue);
}
.chip.pos {
  min-width: 44px;
  color: var(--blue);
  border-color: transparent;
  background: var(--surface-blue);
}
.live-dot {
  color: var(--text-mute);
  font-size: 12px;
}
.live-dot.live { color: var(--red); }
.live-dot.done { color: var(--green); }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; }
.tbl {
  width: 100%;
  /* min-width keeps wide tables readable on desktop; mobile breakpoint
   * below clears it so the table can shrink/card-stack. */
  min-width: 680px;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th,
.tbl td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.tbl thead th {
  color: var(--text-mute);
  background: #f6f9ff;
  font-size: 12px;
  font-weight: 800;
}
.tbl tbody tr:hover { background: #f8fbff; }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.actions { text-align: right; white-space: nowrap; }
.compact-table { min-width: 520px; }

/* ---------- admin ---------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}
.page-head h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}
.lead {
  margin-top: 4px;
  color: var(--text-mute);
  font-size: 12px;
}
.subnav {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.subnav-btn {
  min-width: 92px;
  height: 38px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--text-soft);
  font-weight: 800;
  white-space: nowrap;
}
.subnav-btn.is-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.filter-row,
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.spacer { flex: 1; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}
.roster-edit-row {
  display: grid;
  grid-template-columns: 90px minmax(140px, 1fr) minmax(140px, 1fr) minmax(180px, 1.1fr) 34px;
  gap: 7px;
  align-items: center;
  margin-bottom: 7px;
}
.player-row {
  display: grid;
  grid-template-columns: 64px minmax(110px, 1.1fr) minmax(90px, 1fr) 60px 60px 60px 80px 80px 60px 34px;
  gap: 6px;
  align-items: center;
  padding: 4px 0;
}
.player-row .input { padding: 6px 8px; font-size: 12px; }
.hint {
  color: var(--text-mute);
  font-size: 12px;
}

/* ---------- project empty ---------- */
.project-empty {
  min-height: 260px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
.empty-mark {
  width: 82px;
  height: 82px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-blue);
  color: var(--blue);
  font-weight: 900;
}
.project-empty h2 { margin: 0; }
.project-empty p {
  max-width: 360px;
  margin: 0;
  color: var(--text-mute);
}

/* ---------- modal / toast ---------- */
.modal-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
}
.modal-root.is-open { pointer-events: auto; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 31, 58, 0.42);
  opacity: 0;
  transition: opacity 0.16s;
}
.modal-root.is-open .modal-backdrop { opacity: 1; }
.modal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 54px);
  transform: translate(-50%, -48%);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity 0.16s, transform 0.16s;
}
.modal-root.is-open .modal {
  opacity: 1;
  transform: translate(-50%, -50%);
}
.modal-head,
.modal-foot {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body {
  padding: 16px;
  overflow-y: auto;
}
.modal-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(18px);
  z-index: 120;
  max-width: min(520px, calc(100vw - 32px));
  border-radius: 7px;
  background: #111b34;
  color: #fff;
  padding: 10px 15px;
  opacity: 0;
  pointer-events: none;
  box-shadow: var(--shadow-md);
  transition: opacity 0.18s, transform 0.18s;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .header-main { gap: 14px; flex-wrap: wrap; padding: 12px 14px; }
  .brand { width: 100%; font-size: 20px; }
  .header-sub { padding: 8px 14px; }
  .content { padding: 16px 14px 44px; }
  .portal-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { flex-direction: column; align-items: stretch; }
  .header-game-tabs,
  .content-region-tabs { width: 100%; }
  .header-game-tabs .game-tab,
  .content-region-tabs .region-tab { flex: 1 0 82px; }
  .match-row { grid-template-columns: 74px 1fr 24px; }
  .match-row-event { display: none; }
  .match-row-teams { grid-template-columns: 1fr 22px auto 22px 1fr; }
  .detail-hero {
    margin: -16px -14px 0;
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .detail-team,
  .detail-team.right { justify-content: center; }
  .detail-tabs { margin: 0 -14px 12px; }
  .detail-grid.two-col,
  .live-overview-grid,
  .reserved-live-grid { grid-template-columns: 1fr; }
  .roster-edit-row { grid-template-columns: 1fr; }
  .player-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 13px; }
  .primary-nav { width: 100%; }
  .header-tools { width: 100%; justify-content: flex-end; }
  .match-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .match-row-go { display: none; }
  .match-row-teams {
    grid-template-columns: 1fr 22px auto 22px 1fr;
    width: 100%;
  }
  .featured-sides {
    align-items: stretch;
    flex-direction: column;
  }
  .team-score-block,
  .team-score-block.red {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    text-align: left;
  }
  .team-score-block.red .team-logo,
  .team-score-block.red strong,
  .team-score-block.red span { order: initial; }
  .detail-team { font-size: 20px; }
  .score-box { width: 52px; height: 60px; font-size: 34px; }
  .live-score-panel { grid-template-columns: 1fr; justify-items: center; }

  /* Tables: drop hard min-widths so they can shrink to viewport;
   * parent .table-scroll still allows horizontal swipe if needed. */
  .tbl, .compact-table { min-width: 0; }
  .tbl th, .tbl td { padding: 6px 8px; font-size: 12px; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 6px 6px; }
  /* Make any bare .data-table scrollable on phone (most aren't wrapped). */
  .stats-panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-scroll { -webkit-overflow-scrolling: touch; }

  /* Date-picker popup: fit phone width with margin. */
  .date-picker-popup { width: min(280px, calc(100vw - 32px)); }

  /* Toolbar: stack title + actions so the date chip doesn't crowd. */
  .portal-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .toolbar-actions { flex-wrap: wrap; gap: 8px; }

  /* ---- Mobile nav (hamburger) ---- */
  .header-main {
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 16px;
    min-height: 56px;
  }
  .brand { min-width: 0; flex: 1; font-size: 18px; }
  .brand { gap: 8px; }
  .brand-mark { width: 24px; height: 24px; border-width: 2px; }
  .brand-mark::after { left: 5px; top: -4px; width: 10px; height: 26px; }
  .nav-toggle { display: block; }
  .header-tools { order: 5; }

  /* Slide-down nav panel below the header bar. */
  .primary-nav {
    order: 10;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 4px;
    transition: max-height 0.22s ease, opacity 0.18s ease, padding 0.18s ease;
  }
  body.nav-open .primary-nav {
    max-height: 320px;
    opacity: 1;
    padding: 6px 4px 10px;
  }
  .primary-nav .nav-btn {
    height: 40px;
    border-radius: 6px;
    text-align: left;
    padding: 0 14px;
  }
  /* Sub-bar (region/game tabs) tightens up. */
  .header-sub { padding: 0 16px; min-height: 44px; gap: 8px; flex-wrap: wrap; }
}

/* ---- Round 2 additions: footer, hot-events sidebar, champion display ---- */

.site-footer {
  padding: 14px 22px;
  margin-top: 32px;
  border-top: 1px solid var(--border-soft, #e2e8f0);
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.6;
  background: rgba(15, 23, 42, 0.02);
}
.site-footer a { color: #64748b; text-decoration: underline; }

/* Two-column home: left sidebar (220px) + main */
.home-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 880px) {
  .home-layout { grid-template-columns: 1fr; }
}

.hot-events-card {
  background: #fff;
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.hot-events-card .card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #3b6ad0;
  border-bottom: 1px solid #eef2f7;
  background: #f7faff;
}
.hot-events-group {
  padding: 4px 0;
}
.hot-events-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  cursor: pointer;
  user-select: none;
}
.hot-events-group-header .chevron { font-size: 10px; color: #94a3b8; }
.hot-events-group.collapsed .hot-events-list { display: none; }
.hot-events-group.collapsed .chevron { transform: rotate(-90deg); }
.hot-events-list {
  display: flex;
  flex-direction: column;
}
.hot-event-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 12px;
  color: #1f2937;
  cursor: pointer;
  transition: background 0.1s;
}
.hot-event-row:hover { background: #f7faff; }
.hot-event-row .event-icon {
  width: 20px; height: 20px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
}

/* Champion cell with icon + label */
.champion-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.champion-cell img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.champion-cell .champion-label {
  font-size: 13px;
}

/* Team logo in row */
.team-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Player avatar with size variants */
.player-avatar-img {
  border-radius: 50%;
  object-fit: cover;
  background: #f1f5f9;
}
.player-avatar-img.size-sm { width: 24px; height: 24px; }
.player-avatar-img.size-md { width: 48px; height: 48px; }
.player-avatar-img.size-lg { width: 96px; height: 96px; }

/* Clickable table rows */
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f7faff; }

/* Player detail page */
.player-detail-header {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 12px;
  margin-bottom: 16px;
}
.player-detail-info { flex: 1; min-width: 0; }
.player-detail-name { margin: 0 0 4px; font-size: 26px; }
.player-detail-meta { color: #64748b; font-size: 13px; line-height: 1.6; margin-bottom: 8px; }
.player-detail-team { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; }
.player-detail-team .team-logo { width: 18px; height: 18px; }

.player-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}
.summary-cell { text-align: center; padding: 6px; }
.summary-value { font-size: 22px; font-weight: 700; color: #1e3a8a; }
.summary-label { font-size: 11px; color: #64748b; margin-top: 2px; }

.player-detail-recent,
.player-detail-top-champs {
  background: #fff;
  border: 1px solid var(--border-soft, #e2e8f0);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}
.player-detail-recent h2,
.player-detail-top-champs h2 {
  margin: 0 0 12px;
  font-size: 16px;
  color: #1e293b;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; text-align: left; }
.data-table th { font-weight: 600; color: #64748b; background: #f8fafc; }
.result-win { color: #00872f; font-weight: 600; }
.result-loss { color: #64748b; font-weight: 500; }

.breadcrumb {
  font-size: 13px;
  margin-bottom: 12px;
  color: #64748b;
}
.breadcrumb .crumb-sep { margin: 0 6px; color: #cbd5e1; }
.breadcrumb .crumb-current { color: #1e293b; font-weight: 600; }
.crumb-link {
  background: none; border: none; cursor: pointer;
  color: #3b82f6; padding: 0; font: inherit;
}
.crumb-link:hover { text-decoration: underline; }

/* ---- Series support: BO chip + game tabs + series score ---- */

.format-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: #e0f2fe;
  color: #075985;
}
.format-bo1 { background: #f1f5f9; color: #64748b; }
.format-bo3 { background: #fef3c7; color: #92400e; }
.format-bo5 { background: #fde68a; color: #7c2d12; }

.series-score { color: #1e40af; }

.match-row-teams .result-win,
.detail-team-name.result-win,
.team-score-block.result-win > strong,
.team-score-block.result-win > span:not(.team-logo) { color: #00872f; font-weight: 700; }
.match-row-teams .result-loss,
.detail-team-name.result-loss,
.team-score-block.result-loss > strong,
.team-score-block.result-loss > span:not(.team-logo) { color: #64748b; font-weight: 500; }

/* Match detail: series header score is bigger / different.
   Series doesn't have fixed blue/red sides (teams swap between games), so
   neutral colors with winner highlighted. */
.score-boxes.series .score-box {
  font-size: 36px;
  min-width: 56px;
}
.score-boxes.series .score-box.series-a,
.score-boxes.series .score-box.series-b {
  color: #475569;
  background: #f1f5f9;
}
.score-boxes .score-box.result-win,
.score-boxes.series .score-box.result-win {
  color: #00872f;
  background: #ecfdf0;
}
.score-boxes .score-box.result-loss,
.score-boxes.series .score-box.result-loss {
  color: #64748b;
  background: #f1f5f9;
}

/* Game switcher bar — replaces the static "第一局" blue strip for series.
   For BO1: just a single static label.
   For BO3/BO5: each game becomes a pill button rendered inline on the blue bar. */
.game-title-bar.game-switcher-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: stretch;
  padding: 8px;
  flex-wrap: wrap;
}
.game-title-bar .game-bar-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 18px;
  border: 1px solid rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  transition: all 0.15s;
  min-width: 92px;
}
.game-title-bar .game-bar-tab:hover {
  background: rgba(255,255,255,0.30);
  border-color: rgba(255,255,255,0.75);
}
.game-title-bar .game-bar-tab.is-active {
  background: #fff;
  color: #1e3a8a;
  border-color: #fff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.game-bar-label { font-size: 14px; font-weight: 600; }
.game-bar-winner {
  font-size: 10px;
  line-height: 1;
  opacity: 0.85;
  letter-spacing: 0;
}
.game-bar-winner.side-a { color: #fde68a; }
.game-bar-winner.side-b { color: #fda4af; }
.game-title-bar .game-bar-tab.is-active .game-bar-winner.side-a { color: #1e3a8a; opacity: 0.6; }
.game-title-bar .game-bar-tab.is-active .game-bar-winner.side-b { color: #1e3a8a; opacity: 0.6; }

/* ---- Real Ban/Pick rows in match detail ---- */
.bp-panel { padding: 14px 16px; }
.bp-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 6px 0 6px 8px;
  align-items: stretch;
  border-left: 3px solid transparent;
}
.bp-row.bp-blue { border-left-color: #3b82f6; }
.bp-row.bp-red  { border-left-color: #ef4444; }
.bp-row.bp-ban  { opacity: 0.92; }
.bp-row.bp-pick + .bp-row.bp-ban,
.bp-row.bp-ban  + .bp-row.bp-pick { margin-top: 2px; }

/* Each cell: icon on top, name below — fixed width, single-line ellipsis. */
.bp-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bp-cell .champion-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
  min-width: 0;
}
.bp-cell .champion-cell img {
  flex-shrink: 0;
}
.bp-cell .champion-cell .champion-label {
  width: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.bp-cell.empty {
  color: #cbd5e1;
  font-size: 12px;
}

/* Bans: slightly smaller icons, grayscale + red ring, strikethrough name. */
.bp-row.bp-ban .bp-cell .champion-cell img {
  width: 30px;
  height: 30px;
  filter: grayscale(85%) brightness(0.7);
  border: 1.5px solid #dc2626;
}
.bp-row.bp-ban .bp-cell .champion-cell .champion-label {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 11px;
}

/* Picks: bigger icons, full color, light border. */
.bp-row.bp-pick .bp-cell .champion-cell img {
  width: 38px;
  height: 38px;
  border: 1.5px solid #d1d5db;
}
.bp-row.bp-pick .bp-cell .champion-cell .champion-label {
  color: #1e293b;
  font-size: 12px;
  font-weight: 500;
}

.bp-empty {
  text-align: center;
  padding: 24px;
  color: #94a3b8;
  font-size: 13px;
}

/* ---- Event detail page ---- */
.event-detail-hero {
  background: linear-gradient(135deg, #3159b8 0%, #6b9af6 100%);
  color: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 14px;
}
.event-detail-name { margin: 0 0 6px; font-size: 24px; }
.event-detail-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  opacity: 0.9;
}
.event-detail-meta .chip.accent {
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.event-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 880px) {
  .event-grid { grid-template-columns: 1fr; }
}
.stats-subtabs {
  display: flex;
  gap: 4px;
  margin: 10px 0;
  border-bottom: 1px solid #e2e8f0;
}
.stats-subtab {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.stats-subtab.is-active {
  color: #1e40af;
  border-bottom-color: #1e40af;
}
.stats-panel { padding: 16px; }
.stats-panel .data-table { width: 100%; }
.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.participant-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}
.participant-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.participant-roster { display: flex; flex-direction: column; gap: 6px; }
.participant-player { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.champ-mini-list { display: flex; gap: 4px; }
.champ-mini-list .champion-cell img { width: 18px; height: 18px; }
.champ-mini-list .champion-cell .champion-label { font-size: 11px; }

/* ---- Pagination bar (home: finished + upcoming) ---- */
.pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 14px 16px 18px;
  border-top: 1px solid #f1f5f9;
}
.page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s;
}
.page-btn:hover:not(.is-active):not(.is-disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}
.page-btn.is-active {
  background: #1e40af;
  border-color: #1e40af;
  color: #fff;
  cursor: default;
}
.page-btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.page-ellipsis {
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
  color: #94a3b8;
  font-size: 13px;
}

/* ---- Date-picker chip + popup (home toolbar) ---- */
.date-picker-wrap {
  position: relative;
  display: inline-block;
}
.date-picker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px 0 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.12s;
}
.date-picker-chip:hover { border-color: #94a3b8; color: #1e293b; }
.date-picker-chip.is-active {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1e40af;
}
.dp-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.dp-chip-label { white-space: nowrap; }
.dp-chip-clear {
  margin-left: 2px;
  padding: 0 4px;
  font-size: 14px;
  line-height: 1;
  color: #64748b;
  border-radius: 3px;
}
.dp-chip-clear:hover { background: #e2e8f0; color: #ef4444; }

.date-picker-popup {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  width: 280px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
  padding: 12px;
  user-select: none;
}
.dp-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 8px;
}
.dp-title {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}
.dp-nav {
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  border-radius: 4px;
  color: #64748b;
  font-size: 15px;
  cursor: pointer;
}
.dp-nav:hover { background: #f1f5f9; color: #1e40af; }

.dp-weekrow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.dp-weekcell {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  padding: 4px 0;
}
.dp-weekcell.is-weekend { color: #f87171; }

.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.dp-day {
  height: 32px;
  border: 0;
  background: transparent;
  border-radius: 4px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  transition: all 0.1s;
}
.dp-day:hover { background: #f1f5f9; }
.dp-day.is-other { color: #cbd5e1; }
.dp-day.is-weekend:not(.is-other) { color: #ef4444; }
.dp-day.is-today {
  font-weight: 700;
  color: #1e40af;
}
.dp-day.is-selected {
  background: #1e40af !important;
  color: #fff !important;
}

.dp-foot {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px solid #f1f5f9;
}
.dp-foot-btn {
  flex: 1;
  height: 28px;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 5px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
}
.dp-foot-btn:hover { background: #f8fafc; border-color: #94a3b8; color: #1e40af; }

.review-badge { display: inline-block; white-space: nowrap; padding: 3px 7px; border-radius: 4px; background: #f1f5f9; color: #52627a; font-size: 12px; }
.review-badge.is-pending { background: #fff4db; color: #805c12; }
.review-badge.is-confirmed { background: #e6f6ef; color: #226b4c; }
.review-count, .review-meta { color: var(--text-mute); font-size: 12px; }
.review-table-scroll { overflow-x: auto; }
.review-editor-status, .review-match-heading { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.review-match-heading .review-meta { width: 100%; overflow-wrap: anywhere; }
.review-detail h3 { font-size: 14px; margin: 20px 0 10px; }
.review-reasons, .review-history { padding-left: 20px; margin: 8px 0; }
.review-reasons li, .review-history li { margin-bottom: 10px; overflow-wrap: anywhere; }
.review-note { width: 100%; resize: vertical; }
.review-note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.modal:has(.review-detail) .modal-foot { flex-wrap: wrap; }
.review-warning { padding: 10px 12px; border-left: 3px solid #d4a235; background: #fff9e9; color: #725614; font-size: 13px; }
.review-notice { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding: 14px 16px; border-left: 4px solid #d4a235; background: #fff8e6; color: #725614; }
.review-notice.has-issues { border-left-color: #cc3c48; background: #fff1f2; color: #98323b; }
.review-notice-copy { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1 1 300px; }
.review-urgent-preview { font-size: 12px; overflow-wrap: anywhere; }
.review-queue-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.review-queue-table { min-width: 670px; }
.review-queue-table td { vertical-align: top; }
.review-queue-table td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; max-width: 580px; }
.review-queue-reasons { margin: 8px 0 0; padding-left: 18px; font-size: 13px; }
.review-issue-row { background: #fff8f8; }
.review-badge.is-issue { background: #ffe2e5; color: #ac2837; font-weight: 600; }
.review-queue-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding-top: 12px; font-size: 13px; }
.review-field-warning { padding: 12px; margin-bottom: 16px; background: #fff1f2; color: #98323b; border-left: 3px solid #cc3c48; overflow-wrap: anywhere; }
.review-field-warning ul { margin-bottom: 0; padding-left: 20px; }
.review-player-issue { background: #fff1f2; }
.review-input-issue { border-color: #cc3c48; background: #fff6f6; }
.nav-review-count { margin-left: 6px; padding: 2px 6px; background: #ffe6a6; color: #664700; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.nav-review-count[hidden] { display: none; }
.review-verification-status { margin-top: 6px; white-space: normal; }

.economy-panel { min-width: 0; }
.economy-head { gap: 8px 18px; flex-wrap: wrap; }
.economy-source { font-size: 12px; color: var(--text-mute); overflow-wrap: anywhere; }
.economy-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 14px 18px 4px; font-size: 12px; }
.economy-legend > span { max-width: 100%; overflow-wrap: anywhere; }
.economy-legend-blue { color: #3068d0; }
.economy-legend-red { color: #bf3c50; }
.economy-legend > span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 6px; }
.economy-plot { position: relative; height: 300px; width: 100%; min-width: 0; }
.economy-plot > svg { display: block; touch-action: pan-y; }
.economy-plot > svg:focus-visible { outline: 2px solid #3f7df4; outline-offset: -2px; }
.economy-axis-text { fill: #71839c; font-size: 12px; font-family: inherit; letter-spacing: 0; }
.economy-empty { position: absolute; inset: 0 20px 16px 56px; display: grid; place-items: center; pointer-events: none; }
.economy-empty strong { padding: 10px 14px; background: #fff; color: #71839c; font-size: 13px; font-weight: 400; text-align: center; }
.economy-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding: 6px 18px 14px; font-size: 12px; color: #526986; }
.economy-selection { font-variant-numeric: tabular-nums; }
.economy-samples { color: var(--text-mute); }
.economy-tooltip { position: absolute; z-index: 2; max-width: min(260px, calc(100% - 12px)); padding: 8px 10px; border: 1px solid #cedbef; background: #fff; color: #274264; box-shadow: 0 3px 10px #1b355b14; border-radius: 4px; font-size: 12px; line-height: 1.6; pointer-events: none; overflow-wrap: anywhere; }
.economy-invalid { padding: 0 18px 14px; color: #9a5b19; font-size: 12px; }

.analysis-missing-metrics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; padding: 8px 18px; margin: 0; }
.analysis-missing-metrics dt, .analysis-missing-metrics dd { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
.analysis-missing-metrics dd { text-align: right; color: var(--text-mute); }
.analysis-missing-metrics dt:nth-last-of-type(1), .analysis-missing-metrics dd:last-child { border-bottom: 0; }

.global-search { display: flex; align-items: center; flex: 0 1 290px; min-width: 180px; height: 36px; margin: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; }
.global-search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 2px #3f7df41a; }
.global-search input { width: 100%; min-width: 0; padding: 8px 10px; border: 0; outline: none; background: transparent; color: var(--text); font-size: 13px; }
.global-search button { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 34px; padding: 0; border: 0; background: transparent; color: var(--blue-deep); }
.global-search button:disabled { opacity: .4; cursor: wait; }
.search-icon { position: relative; display: block; width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 2px; background: currentColor; bottom: -3px; right: -5px; transform: rotate(45deg); }
.search-kind-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.search-kind-tab { flex-shrink: 0; border: 1px solid transparent; border-radius: 4px; padding: 8px 12px; background: transparent; color: var(--text-soft); font-size: 13px; }
.search-kind-tab.is-active { color: var(--blue-deep); background: #eaf2ff; border-color: #c9dcff; }
.search-result-total { font-size: 13px; color: var(--text-soft); overflow-wrap: anywhere; }
.search-section { margin: 24px 0; }
.search-section-title { margin: 0 0 10px; font-size: 16px; }
.search-result-list { border-top: 1px solid var(--line); background: #fff; }
.search-result-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search-result-identity { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.search-result-avatar { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; object-fit: contain; border-radius: 4px; background: #edf4ff; color: var(--blue-deep); font-size: 12px; font-weight: 700; }
.search-result-copy { min-width: 0; overflow-wrap: anywhere; }
.search-result-copy strong { font-size: 14px; }
.search-result-meta { font-size: 12px; color: var(--text-soft); margin-top: 3px; }
.search-result-row > button { flex-shrink: 0; }
.search-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding-top: 10px; font-size: 13px; }
@media (max-width: 880px) {
  .header-sub { flex-wrap: wrap; gap: 8px; padding: 8px 14px; }
  .header-sub .header-game-tabs { flex: 1 0 100%; width: 100%; }
  .global-search { flex: 1 1 100%; min-width: 0; }
  .header-sub .api-badge { display: none; }
}
@media (max-width: 560px) {
  .search-result-row { align-items: flex-start; flex-wrap: wrap; gap: 8px; padding: 12px; }
  .search-result-identity { flex-basis: 100%; }
  .search-result-row > button { margin-left: 0; }
}
.search-review-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 16px; margin: 16px 0; border-left: 3px solid #cb851c; background: #fff8e9; color: #755018; }
.search-review-notice span { flex: 1; min-width: 200px; font-size: 12px; }
.search-review-reason { color: #946018; font-size: 12px; line-height: 1.6; }
.search-identity-dialog { width: min(560px, calc(100% - 32px)); max-height: 85vh; border: 1px solid #d8e4fa; border-radius: 8px; padding: 24px; color: #18315b; }
.search-identity-dialog::backdrop { background: rgb(15 30 55 / 35%); }
.search-identity-form { display: grid; gap: 16px; }
.search-identity-form h2 { font-size: 18px; margin: 0; }
.search-identity-form label { display: grid; gap: 6px; font-size: 13px; }
.search-identity-form select, .search-identity-form textarea { width: 100%; min-width: 0; padding: 9px; border: 1px solid #c7d9f6; border-radius: 4px; background: #fff; color: inherit; font: inherit; }
.search-identity-actions { display: flex; justify-content: flex-end; gap: 10px; }
.dq-toolbar { display: grid; gap: 16px; margin: 16px 0; }
.dq-kinds { flex-wrap: wrap; gap: 8px; }
.dq-status-note { border-left: 3px solid #d5a033; padding: 10px 14px; background: #fff8e9; color: #79551e; font-size: 13px; }
.dq-table { width: 100%; min-width: 740px; }
.dq-table th, .dq-table td { vertical-align: top; white-space: normal; overflow-wrap: anywhere; }
.dq-table th:first-child { width: 22%; }
.dq-table th:nth-child(2) { width: 41%; }
.dq-table th:nth-child(3) { width: 24%; }
.dq-reason { margin-top: 8px; line-height: 1.6; }
.dq-record { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.dq-detail { line-height: 1.6; }
.dq-source-file { display: block; overflow-wrap: anywhere; padding: 12px; background: #f0f5ff; }
.dq-form-field { display: grid; gap: 6px; margin: 12px 0; font-size: 13px; }
.dq-form-field > input, .dq-form-field > select { width: 100%; min-width: 0; }
/* Competition detail and maintenance controls. */
.competition-panel { margin-bottom: 16px; min-width: 0; }
.competition-panel > .table-scroll { max-height: 480px; overflow: auto; }
.competition-panel .review-meta { padding: 8px 14px; }
.competition-filters { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; align-items: end; }
.competition-filter { display: grid; gap: 5px; font-size: 12px; }
.competition-coverage { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.coverage-label { padding: 5px 9px; border: 1px solid #dce6f4; border-radius: 4px; font-size: 12px; background: #f5f8fd; color: #66768c; }
.coverage-label.is-complete { background: #edf8f2; border-color: #c4e4d3; color: #26744f; }
.coverage-label.is-missing { background: #fff8eb; border-color: #f0dfb6; color: #8d6a28; }
.detail-tabs.event-detail-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.competition-editor { margin-top: 18px; border-top: 1px solid #dce6f4; padding-top: 12px; }
.competition-editor summary { cursor: pointer; color: #3159b8; font-weight: 600; margin-bottom: 14px; }
.competition-player-editor { border-top: 1px solid #e2eaf4; padding-top: 12px; margin-top: 12px; }
.competition-player-editor h3 { grid-column: 1 / -1; font-size: 13px; }
.bp-side-label { display: block; padding: 4px 0; font-size: 12px; }
.event-stage-row { padding: 10px 14px; border-top: 1px solid #e2eaf4; }
.competition-scope { overflow-wrap: anywhere; }
/* Entity histories retain the portal shell; evidence and samples stay beside the figures. */
.entity-history-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.entity-history-heading { display: flex; gap: 18px; align-items: center; margin: 22px 0; min-width: 0; }
.entity-portrait { flex: 0 0 64px; width: 64px; height: 64px; object-fit: contain; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #dce6f4; border-radius: 6px; color: #3159b8; font-weight: 700; }
.entity-title { min-width: 0; }
.entity-title h1 { margin: 0 0 6px; font-size: 24px; overflow-wrap: anywhere; }
.entity-title p { margin: 4px 0; font-size: 13px; overflow-wrap: anywhere; }
.entity-history-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin: 16px 0 10px; }
.entity-filter { display: grid; gap: 6px; font-size: 13px; min-width: 150px; }
.entity-filter select { min-height: 36px; width: 100%; }
.entity-scope { font-size: 13px; color: #536783; line-height: 1.7; margin: 6px 0; overflow-wrap: anywhere; }
.entity-history-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 20px 0; background: #fff; border-block: 1px solid #dce6f4; }
.entity-history-metrics.is-player { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.entity-history-metrics.is-player .entity-metric:nth-child(-n+3) { grid-column: span 2; }
.entity-metric { padding: 14px 18px; min-width: 0; }
.entity-metric dt { color: #536783; font-size: 13px; }
.entity-metric dd { margin: 7px 0 4px; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.entity-metric small { font-size: 12px; }
.entity-data-coverage { border-bottom: 1px solid #dce6f4; padding: 0 0 14px; margin: 20px 0; }
.entity-data-coverage h2, .entity-roster h2, .entity-champions h2, .entity-section-title { font-size: 16px; margin: 0 0 12px; }
.entity-data-coverage p { font-size: 13px; line-height: 1.8; margin: 5px 0; overflow-wrap: anywhere; }
.entity-warning { color: #805e25; }
.entity-roster { display: flex; align-items: baseline; gap: 12px 18px; flex-wrap: wrap; margin: 18px 0; }
.entity-roster h2 { width: 100%; margin-bottom: 0; }
.entity-link { padding: 0; border: 0; background: transparent; color: #2459ba; cursor: pointer; font: inherit; text-align: inherit; overflow-wrap: anywhere; }
.entity-link:hover { text-decoration: underline; }
.entity-link:focus-visible, .entity-team-button:focus-visible { outline: 2px solid #3f7df4; outline-offset: 4px; }
.entity-team-button { border: 0; background: transparent; font: inherit; cursor: pointer; color: inherit; }
.entity-team-button:disabled { cursor: default; opacity: 1; }
.entity-champions { margin: 22px 0; max-width: 650px; }
.entity-history-table { background: #fff; min-width: 760px; }
.entity-history-table td { vertical-align: middle; }
.entity-history-table small { display: block; max-width: 240px; white-space: normal; }
.entity-history-table .numeric, .entity-champions .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.entity-history-pager { display: flex; justify-content: end; gap: 14px; align-items: center; margin: 16px 0; }
@media (min-width: 681px) and (max-width: 1000px) {
  .entity-history-metrics.is-player { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .entity-history-metrics.is-player .entity-metric:nth-child(-n+3) { grid-column: auto; }
}
@media (max-width: 680px) {
  .entity-history-topbar { display: block; }
  .entity-history-heading { gap: 12px; margin: 16px 0; }
  .entity-title h1 { font-size: 20px; }
  .entity-history-filters { gap: 10px; }
  .entity-filter { flex: 1 1 120px; min-width: 0; }
  .entity-filter select { min-height: 44px; }
  .entity-history-metrics, .entity-history-metrics.is-player { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entity-history-metrics.is-player .entity-metric:nth-child(-n+3) { grid-column: auto; }
  .entity-history-metrics.is-player .entity-metric:last-child { grid-column: 1 / -1; }
  .entity-metric { padding: 12px; }
  .entity-metric dd { font-size: 20px; }
  .entity-roster .entity-link { min-height: 36px; }
}
@media (max-width: 680px) {
  .competition-filters { gap: 8px; }
  .competition-filter { flex: 1 1 120px; min-width: 0; }
  .competition-filter select { width: 100%; min-width: 0; }
  .competition-panel table { min-width: 560px; }
}
.source-identity-editor { display: grid; gap: 12px; min-width: 0; }
.source-identity-editor .update-field { min-width: 0; }
.source-identity-editor select, .source-identity-editor textarea { width: 100%; max-width: 100%; }
.source-identity-editor [hidden] { display: none; }
.field-gap-table { min-width: 780px; }
.field-gap-table td { vertical-align: top; }
.field-gap-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.field-gap-toolbar select { min-width: 0; max-width: 100%; width: min(100%, 420px); }
.field-gap-table .btn + .btn { margin-top: 8px; }
.field-gap-evidence { max-width: 100%; overflow: auto; max-height: 180px; padding: 12px; background: #f4f7fb; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
/* A person dossier is an unframed evidence band, not another decorative dashboard. */
.person-career { margin: 20px 0 24px; padding: 20px 0; border-block: 1px solid var(--line, #dce6f4); min-width: 0; }
.person-career h2 { margin: 0; font-size: 18px; }
.person-career h3 { margin: 22px 0 12px; font-size: 15px; }
.career-heading, .career-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.career-id, .career-aliases { margin: 12px 0; font-size: 13px; overflow-wrap: anywhere; }
.career-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.career-facts dt { font-size: 12px; color: #536783; }
.career-facts dd { margin: 6px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.career-meta { display: block; font-size: 12px; color: #536783; line-height: 1.7; overflow-wrap: anywhere; }
.career-empty { margin: 12px 0; color: #536783; font-size: 13px; line-height: 1.7; }
.career-warning, .career-warnings { color: #805e25; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.career-warnings { padding-left: 20px; }
.career-homonyms { display: flex; gap: 12px 18px; flex-wrap: wrap; font-size: 13px; }
.career-table { min-width: 620px; width: 100%; background: #fff; }
.career-table td, .career-table th { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.career-table th:first-child { width: 24%; }
.career-table-scroll { max-width: 100%; }
.career-observations { margin: 18px 0 0; font-size: 13px; }
.career-observations summary { cursor: pointer; color: #2459ba; padding: 6px 0; }
.career-observation-row { display: grid; grid-template-columns: minmax(160px, 1fr) 90px minmax(200px, 2fr); gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line, #dce6f4); }
.career-observation-row > span:nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; }
.career-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.career-field { display: grid; gap: 6px; min-width: 0; font-size: 13px; }
.career-field.is-wide { grid-column: 1 / -1; }
.career-field input, .career-field select, .career-field textarea { width: 100%; min-width: 0; max-width: 100%; }
.entity-analysis { margin: 24px 0; min-width: 0; }
.entity-analysis h2 { font-size: 18px; }
.entity-analysis h3 { font-size: 15px; margin: 20px 0 12px; }
.entity-analysis-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.entity-analysis-grid > section { min-width: 0; }
.entity-analysis table { min-width: 520px; font-variant-numeric: tabular-nums; }
.entity-analysis td.numeric { text-align: right; }
.entity-analysis th:not(:first-child) { text-align: right; }
.career-validation { margin: 16px 0; min-width: 0; }
.career-validation .career-actions { justify-content: flex-end; margin-top: 12px; }
@media (max-width: 900px) { .entity-analysis-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) {
  .career-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .career-heading { align-items: start; }
  .career-actions { justify-content: start; }
  .career-actions .btn { min-height: 44px; }
  .career-observation-row { grid-template-columns: minmax(0, 1fr) 80px; gap: 6px 12px; }
  .career-observation-row .career-meta { grid-column: 1 / -1; }
  .career-form-grid { grid-template-columns: minmax(0, 1fr); }
  .career-field input, .career-field select { min-height: 44px; }
  .modal:has(.career-editor) .modal-foot .btn { min-height: 44px; }
}


/* === ui-polish.css === */
/* Taste: Accent Ladder. Existing brand and type retained; no business/data changes.
   Frame: 1280px including 2 x 32px gutters; home = 216px + 24px + remaining width. */
:root {
  --bg: #f5f7fa;
  --surface-soft: #f8fafc;
  --surface-blue: #edf3fc;
  --line: #e3e8ef;
  --line-strong: #c7d1df;
  --text: #172331;
  --text-soft: #526174;
  --text-mute: #637185;
  --blue: #2862ce;
  --blue-2: #86a7dc;
  --blue-deep: #2d55a4;
  --red: #c43d4c;
  --green: #00872f;
  --shadow-sm: none;
  --shadow-md: 0 12px 36px #14284024;
}
html { scroll-padding-top: 128px; }
body { font-size: 14px; line-height: 1.6; font-variant-numeric: tabular-nums; }
button, input, select, textarea { letter-spacing: 0; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { transition: background-color .15s, border-color .15s, color .15s; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 3px;
}
button:disabled { cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--text-mute); opacity: 1; }
.site-header { background: var(--blue-deep); box-shadow: none; }
.header-main { max-width: 1280px; min-height: 64px; padding: 0 32px; gap: 28px; }
.brand { font-size: 21px; font-weight: 700; gap: 12px; min-width: 190px; }
.brand-mark { width: 26px; height: 26px; border-width: 2px; }
.brand-mark::after { left: 6px; top: -5px; width: 12px; height: 30px; }
.primary-nav { gap: 6px; }
.nav-btn { height: 36px; border-radius: 5px; font-weight: 500; padding: 0 14px; color: #e2eaf8; }
.nav-btn.is-active { background: #ffffff20; box-shadow: none; color: #fff; }
.nav-review-count { margin-left: 6px; font-weight: 500; border-radius: 3px; }
.lang-switch { border-radius: 5px; background: #ffffff12; padding: 3px; }
.lang-btn { font-weight: 600; border-radius: 3px; }
.header-sub {
  min-height: 58px; gap: 24px; background: #edf3fc;
  border-top: 0; border-bottom: 1px solid #dce5f1; box-shadow: none;
  padding: 8px max(32px, calc((100vw - 1280px) / 2 + 32px));
}
.header-game-tabs { gap: 4px; }
.header-game-tabs .game-tab {
  min-width: 72px; height: 34px; padding: 0 14px; border-radius: 4px;
  font-size: 12px; font-weight: 600; color: #465b7b;
}
.header-game-tabs .game-tab.is-active { background: #d8e5fa; color: #214f99; box-shadow: none; }
.header-game-tabs .game-tab:hover { background: #e0e9f6; color: #214f99; }
.global-search { flex-basis: 310px; height: 36px; border-radius: 5px; border-color: #cdd8e6; }
.global-search input { font-size: 13px; }
.api-badge { background: transparent; color: #536781; font-size: 11px; font-weight: 500; padding: 0; }
.time-zone-control { flex: 0 0 184px; min-width: 0; }
.time-zone-control select {
  display: block; width: 100%; height: 36px; padding: 0 8px; border: 1px solid #cdd8e6;
  border-radius: 5px; background: #fff; color: #465b7b; font: inherit; font-size: 12px;
  font-variant-numeric: tabular-nums; cursor: pointer;
}
.time-zone-control select:hover { border-color: #86a7dc; }
.time-zone-control select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.content { max-width: 1280px; padding: 28px 32px 48px; }
.portal-toolbar, .page-head { margin-bottom: 24px; gap: 16px; align-items: center; }
.portal-title-block { gap: 5px; }
.portal-toolbar h1, .page-head h1 { font-size: 22px; line-height: 1.4; font-weight: 650; }
.portal-subtitle { color: var(--text-mute); font-size: 12px; }
.toolbar-actions { gap: 10px; }
.btn, .input, .select, .textarea { border-radius: 5px; font-weight: 400; }
.btn { min-height: 34px; padding: 6px 12px; font-weight: 500; }
.btn-sm { min-height: 28px; padding: 3px 9px; }
.btn-primary { background: var(--blue); border-color: var(--blue); }
.btn-danger { color: #b83140; border-color: #e6cdd0; }
.btn:disabled { background: #eef1f5; color: #637185; border-color: #d7dfe8; opacity: 1; }
.input, .select { min-height: 36px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 2px #2862ce14; }
.league-select { color: var(--text); font-weight: 500; border-color: var(--line-strong); }
.panel, .portal-panel, .hot-events-card, .team-card, .participant-card,
.live-score-panel, .bp-panel, .reserve-card { border-radius: 6px; box-shadow: none; }
.panel-head, .portal-panel-head { min-height: 48px; padding: 12px 20px; }
.panel-head h2, .portal-panel-head h2 { font-size: 15px; font-weight: 600; border-left: 0; padding-left: 0; }
.panel-head .panel-sub, .portal-panel-head .panel-sub { font-size: 12px; color: var(--text-mute); }
.panel-body { padding: 20px; }
.panel-body.flush { padding: 0; }
.home-layout { grid-template-columns: 216px minmax(0, 1fr); gap: 24px; }
.home-main, .home-sidebar { min-width: 0; }
.home-sidebar { position: sticky; top: 144px; }
.hot-events-card .card-header { padding: 14px 16px; color: var(--text); font-size: 14px; background: #fff; }
.hot-events-group-header { background: var(--surface-soft); color: var(--text-soft); padding: 9px 16px; font-weight: 500; }
.hot-events-list { max-height: 430px; overflow-y: auto; scrollbar-width: thin; }
.hot-event-row { padding: 10px 16px; font-size: 12px; align-items: start; }
.hot-event-row .event-icon { background: var(--surface-blue) !important; color: var(--blue-deep); border-radius: 3px; }
.portal-stage { min-height: 0; margin-bottom: 24px; background: #fff; border-radius: 6px; }
.stage-bg { background: none; }
.stage-content { min-height: 0; padding: 18px 20px; gap: 12px; }
.stage-label { font-size: 14px; font-weight: 600; margin: 0; }
.featured-match { width: 100%; border: 0; border-radius: 0; box-shadow: none; padding: 0; background: transparent; }
.featured-match:hover, .match-row:hover, .library-row:hover { box-shadow: none; }
.featured-meta { font-size: 12px; }
.featured-sides { margin: 16px 0 12px; gap: 18px; }
.team-score-block { min-width: 0; flex: 1; grid-template-columns: 40px minmax(0, 1fr) 28px; gap: 12px; }
.team-score-block.red { grid-template-columns: 28px minmax(0, 1fr) 40px; }
.team-score-block strong { font-size: 15px; font-weight: 600; }
.team-score-block > .team-logo { width: 36px; height: 36px; }
.team-score-block > span:not(.team-logo) { font-size: 22px; color: var(--text-soft); }
.team-score-block > .result-win:not(.team-logo) { color: #00872f; }
.team-score-block > .result-loss:not(.team-logo) { color: #64748b; }
.home-main .portal-panel { margin-bottom: 24px; }
.home-main .match-list { max-height: 256px; overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.match-row { min-height: 60px; padding: 12px 20px; gap: 12px; grid-template-columns: 92px minmax(120px, 1fr) minmax(270px, 1.3fr) 16px; }
.match-row:hover, .library-row:hover { background: #f7faff; }
.match-row-time { font-size: 13px; align-items: center; }
.match-row-event { font-size: 12px; }
.match-row-teams { grid-template-columns: minmax(42px, 1fr) 26px 58px 26px minmax(42px, 1fr); gap: 8px; }
.match-row-teams strong { color: var(--text-soft); font-weight: 600; }
.match-row-teams .series-score { font-size: 16px; }
.match-row-go { font-size: 18px; }
.pagination-bar { background: #fff; border-top: 1px solid var(--line); padding: 10px 16px; }
.pagination-btn, .pagination-bar button { border-radius: 4px; }
.library-row { padding: 14px 20px; min-height: 68px; }
.library-row strong { font-weight: 600; }
.team-library-grid { padding: 0; gap: 16px; background: var(--bg); }
.team-card, .participant-card { padding: 18px; }
.team-card-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.team-card-head strong { font-weight: 600; }
.team-roster-list { gap: 10px; }
.chip { font-weight: 500; border-radius: 4px; }
.bo-chip { letter-spacing: 0; border-radius: 3px; font-weight: 500; }
.team-logo { background: var(--surface-blue); color: var(--blue-deep); border-radius: 5px; font-weight: 600; }
.player-avatar { background: #e6edf7; color: #365a88; font-weight: 600; }
img.team-logo, img.player-avatar { background: #fff; border-color: #e7ebf0; }
.team-logo-xs { font-size: 11px; }
.team-logo-sm, .player-avatar { font-size: 11px; }
.team-logo.team-logo-xs { width: 24px; height: 24px; }
.team-logo.team-logo-sm { width: 30px; height: 30px; }
.team-logo.team-logo-lg { width: 48px; height: 48px; }
.team-logo.team-logo-xl { width: 64px; height: 64px; }
.team-logo.is-tbd { background: #fff; color: var(--text-mute); }
.breadcrumb { font-size: 12px; gap: 8px; margin-bottom: 20px; }
.crumb-link, .crumb-current { min-height: 28px; border-radius: 4px; border-color: transparent; font-size: 12px; font-weight: 500; }
.crumb-link { background: #eaf0f9; color: #345e99; }
.crumb-current { background: transparent; padding-left: 0; color: var(--text-soft); }
.breadcrumb h1.crumb-current { margin: 0; font-size: 12px; line-height: 1.5; }
.detail-hero { margin: 0; padding: 24px; min-height: 170px; gap: 24px; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; }
.detail-team { font-size: 22px; line-height: 1.35; }
.detail-time { font-size: 13px; color: var(--text-mute); }
.score-box, .score-boxes.series .score-box { box-shadow: none; background: var(--surface-soft); font-size: 36px; font-weight: 650; border: 1px solid var(--line); }
.detail-tabs { margin: 0 0 24px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; }
.detail-tab { height: 48px; font-size: 14px; font-weight: 500; border-bottom-width: 2px; }
.detail-tab.is-active { background: #f4f7fd; }
.game-title-bar { height: 40px; font-size: 15px; background: #e9f0fa; color: #31558e; font-weight: 600; }
.game-title-bar.game-switcher-bar { height: auto; min-height: 56px; padding: 8px; }
.game-title-bar .game-bar-tab { color: #536782; background: transparent; border-color: transparent; border-radius: 4px; transition: background-color .15s, color .15s; }
.game-title-bar .game-bar-tab:hover { color: #31558e; background: #dde7f6; border-color: transparent; }
.game-title-bar .game-bar-tab.is-active { color: #244e89; background: #fff; border-color: #d5deeb; box-shadow: none; }
.game-bar-winner { font-size: 11px; }
.game-bar-winner.side-a, .game-bar-winner.side-b { color: #536782; }
.bp-cell.empty { padding: 8px 0; min-height: 32px; color: var(--text-mute); }
.bp-empty { padding: 12px; color: var(--text-mute); }
.bp-panel:has(.bp-empty) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; align-content: start; }
.bp-panel:has(.bp-empty) > .panel-head { grid-column: 1 / -1; padding: 4px 0 12px; }
.bp-panel:has(.bp-empty) > .bp-side-label:nth-child(2) { grid-column: 1; grid-row: 2; }
.bp-panel:has(.bp-empty) > .bp-side-label:nth-child(5) { grid-column: 2; grid-row: 2; }
.bp-panel:has(.bp-empty) > div:nth-child(3) { grid-column: 1; grid-row: 3; }
.bp-panel:has(.bp-empty) > div:nth-child(4) { grid-column: 1; grid-row: 4; }
.bp-panel:has(.bp-empty) > div:nth-child(6) { grid-column: 2; grid-row: 3; }
.bp-panel:has(.bp-empty) > div:nth-child(7) { grid-column: 2; grid-row: 4; }
.bp-panel:has(.bp-empty) > .bp-empty { grid-column: 1 / -1; padding: 8px; }
.detail-grid, .live-overview-grid { gap: 16px; margin-bottom: 16px; }
.stats-table-title { background: #edf3fc; color: #274d85; font-size: 14px; font-weight: 600; padding: 0 20px; }
.stats-table-panel.red .stats-table-title { background: #f9f0f1; color: #94434a; }
.stats-table-panel { border: 1px solid var(--line); }
.event-detail-hero { background: #edf3fc; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 24px; }
.event-detail-name { font-size: 24px; font-weight: 600; }
.event-detail-meta { color: var(--text-soft); opacity: 1; flex-wrap: wrap; }
.event-detail-meta .chip.accent { color: #31558e; background: #dfe9f8; }
.reserve-card { min-height: 96px; align-content: start; padding: 20px; justify-items: start; }
.reserve-icon { background: transparent; color: var(--text-mute); width: auto; height: auto; }
.tbl { font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { border-bottom-color: #edf0f4; padding: 12px 16px; }
.tbl thead th { background: #fafbfd; color: #58687a; font-weight: 500; }
.tbl tbody tr:hover { background: #f7faff; }
.tbl td.num, .tbl th.num { text-align: right; }
.match-player-table th:nth-child(n+3), .match-player-table td:nth-child(n+3) { text-align: right; white-space: nowrap; }
.subnav { gap: 12px; margin-bottom: 20px; scrollbar-width: thin; }
.subnav-btn { min-width: max-content; padding: 0 12px; height: 42px; font-weight: 500; border-bottom-width: 2px; }
.filter-row { gap: 10px; }
.review-notice { padding: 16px 20px; border-radius: 5px; }
.review-notice.has-issues { background: #fff5f4; }
.review-notice-copy { min-width: 0; }
.review-urgent-preview { overflow-wrap: anywhere; }
.review-notice .btn { flex-shrink: 0; }
.review-badge { font-size: 12px; font-weight: 500; }
.form-grid { gap: 18px; }
.field { gap: 7px; }
.field label { color: var(--text-soft); font-size: 13px; font-weight: 500; }
.modal { border-radius: 8px; }
.modal-head, .modal-foot { padding: 16px 24px; }
.modal-body { padding: 24px; }
.modal-foot { background: var(--surface-soft); }
.site-footer { margin: 0; padding: 24px max(32px, calc((100vw - 1216px) / 2)); background: transparent; color: #637185; text-align: left; line-height: 1.8; font-size: 11px; }
.site-footer a { color: #405e87; }
@media (max-width: 1100px) {
  .header-main { gap: 16px; }
  .brand { min-width: 170px; font-size: 19px; }
  .nav-btn { padding: 0 10px; }
  .header-sub { gap: 12px; }
  .header-game-tabs .game-tab { min-width: 64px; padding: 0 10px; }
  .global-search { flex-basis: 250px; }
  .home-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 20px; }
  .match-row { grid-template-columns: 72px minmax(0, 1fr) 16px; }
  .match-row-event { display: none; }
}
@media (max-width: 920px) {
  .header-main { padding: 12px 24px; flex-wrap: wrap; }
  .brand { width: auto; flex: 1; }
  .primary-nav { order: 3; flex-basis: 100%; }
  .header-tools { width: auto; }
  .header-sub { padding: 10px 24px; flex-wrap: wrap; }
  .header-sub .header-game-tabs { flex-basis: 100%; }
  .global-search { flex: 1; }
  .content { padding: 24px; }
  .home-layout { display: flex; flex-direction: column; }
  .home-main { width: 100%; }
  .home-sidebar { position: static; order: 2; width: 100%; }
  .hot-events-body { max-height: 170px; overflow-y: auto; }
  .hot-events-list { max-height: none; }
  .portal-toolbar { flex-direction: row; align-items: center; }
  .toolbar-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
  .detail-hero { margin: 0; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; }
  .detail-team { font-size: 18px; flex-direction: column-reverse; text-align: center; }
  .detail-team.right { flex-direction: column; }
  .detail-tabs { margin: 0 0 20px; }
}
@media (max-width: 560px) {
  html { scroll-padding-top: 196px; }
  body { font-size: 14px; }
  .header-main { padding: 10px 16px; gap: 8px; min-height: 56px; }
  .brand { width: auto; font-size: 18px; min-width: 0; }
  .brand-mark { width: 24px; height: 24px; }
  .header-tools { order: 2; width: auto; margin-left: 4px; }
  .lang-btn { padding: 4px 8px; }
  .nav-toggle { order: 1; width: 34px; height: 34px; }
  .primary-nav { order: 10; }
  .header-sub { gap: 10px; padding: 8px 16px 12px; }
  .header-game-tabs .game-tab { flex: 0 0 auto; min-width: 62px; padding: 0 12px; }
  .global-search { min-width: 0; width: 100%; flex-basis: 100%; }
  .header-sub .global-search { flex: 1 1 150px; width: auto; }
  .time-zone-control { flex: 0 1 176px; }
  .content { padding: 20px 16px 32px; }
  .portal-toolbar, .page-head { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 20px; }
  .portal-toolbar h1, .page-head h1 { font-size: 21px; }
  .toolbar-actions { justify-content: flex-start; flex-wrap: wrap; }
  .toolbar-actions .select { width: auto; flex: 1; min-width: 0; }
  .home-sidebar { display: block; }
  .home-layout { display: flex; flex-direction: column; gap: 16px; }
  .home-main { width: 100%; }
  .home-sidebar { order: 2; width: 100%; }
  .hot-events-body { max-height: 150px; }
  .stage-content { padding: 16px; }
  .featured-sides { flex-direction: row; align-items: center; gap: 8px; }
  .team-score-block, .team-score-block.red { min-width: 0; grid-template-columns: 1fr; justify-items: center; gap: 6px; text-align: center; }
  .team-score-block strong { font-size: 13px; max-width: 110px; }
  .team-score-block > .team-logo { width: 32px; height: 32px; }
  .team-score-block.red .team-logo, .team-score-block.red strong, .team-score-block.red span { order: initial; }
  .featured-time { font-size: 11px; overflow-wrap: anywhere; }
  .match-row { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; gap: 8px; }
  .match-row-time { font-size: 12px; }
  .match-row-teams { grid-template-columns: minmax(32px, 1fr) 24px 52px 24px minmax(32px, 1fr); gap: 6px; }
  .home-main .match-list { max-height: 380px; }
  .panel-head, .portal-panel-head { padding: 12px 16px; }
  .panel-head h2, .portal-panel-head h2 { font-size: 14px; }
  .detail-hero { padding: 20px 10px; gap: 8px; }
  .detail-team { font-size: 14px; gap: 10px; }
  .detail-team .team-logo.team-logo-xl { width: 44px; height: 44px; font-size: 13px; }
  .detail-score { min-width: 108px; }
  .detail-time { font-size: 11px; max-width: 130px; }
  .score-boxes { gap: 8px; }
  .score-box, .score-boxes.series .score-box { width: 44px; height: 50px; font-size: 28px; }
  .detail-grid.two-col, .live-overview-grid { grid-template-columns: minmax(0, 1fr); }
  .stats-table-panel { overflow-x: auto; }
  .stats-table-panel .tbl { min-width: 700px; }
  .review-notice { padding: 14px 16px; gap: 12px; }
  .review-notice .row { width: 100%; }
  .subnav { gap: 4px; }
  .subnav-btn { font-size: 12px; padding: 0 10px; }
  .modal { max-height: calc(100dvh - 24px); width: calc(100% - 24px); }
  .modal-head, .modal-foot, .modal-body { padding: 16px; }
  .modal-foot { flex-wrap: wrap; }
  .input.search { min-width: 0; width: 100%; }
  .site-footer { padding: 20px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}


/* === update-center.css === */
.update-center { color: var(--text, #172331); }
.update-center h2 { margin: 0 0 16px; font-size: 16px; }
.update-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.update-topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.update-topbar .update-message { margin: 0; }
.update-message { min-height: 20px; margin: 12px 0 20px; color: #637185; font-size: 13px; overflow-wrap: anywhere; }
.update-message.is-error { color: #a62f35; }
.update-runtime { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr) minmax(0, 2fr); border-block: 1px solid #dfe5ec; padding: 18px 0; gap: 20px; }
.update-runtime > div { display: flex; flex-direction: column; gap: 7px; }
.update-runtime span { font-size: 12px; color: #637185; }
.update-runtime strong { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.update-runtime > p { grid-column: 1 / -1; margin: 0; }
.update-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 20px; padding: 18px 0; }
.update-field { display: flex; flex-direction: column; gap: 8px; color: #637185; font-size: 13px; min-width: 0; }
.update-field input[type="checkbox"] { width: 32px; height: 32px; margin: 0; accent-color: #3159b8; }
.update-field input[type="number"] { width: 150px; }
.update-field .input, .update-field .select, .update-center .btn { min-height: 34px; border-radius: 6px; }
.update-followed, .update-history { border-top: 1px solid #dfe5ec; padding-top: 22px; margin-top: 4px; }
.update-event-builder { display: grid; grid-template-columns: 100px minmax(180px, 2fr) minmax(160px, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 20px; }
.update-event-select { width: 100%; }
.update-event-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #e7ebf0; }
.update-event-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.update-center small { display: block; color: #637185; font-size: 12px; }
.update-event-row > button { flex: none; }
.update-history { margin-top: 20px; }
.update-runs-table { min-width: 900px; table-layout: fixed; width: 100%; }
.update-runs-table th:nth-child(1) { width: 150px; }
.update-runs-table th:nth-child(2) { width: 205px; }
.update-runs-table th:nth-child(3) { width: 220px; }
.update-runs-table th:nth-child(4), .update-runs-table th:nth-child(5), .update-runs-table th:nth-child(6) { width: 82px; text-align: right; }
.update-runs-table th:last-child { width: 140px; }
.update-runs-table td { vertical-align: top; overflow-wrap: anywhere; white-space: normal; }
.update-runs-table td:last-child .btn { margin: 0 6px 6px 0; }
.update-number { text-align: right; font-variant-numeric: tabular-nums; }
.update-status { display: inline-block; font-size: 12px; padding: 3px 7px; border-radius: 4px; background: #edf0f4; color: #526174; white-space: nowrap; }
.update-status.status-ok { color: #13613b; background: #e5f4eb; }
.update-status.status-partial, .update-status.status-interrupted, .update-status.status-waiting_api,
.update-status.status-needs_reconcile { color: #805a15; background: #fff3d9; }
.update-status.status-failed { color: #a62f35; background: #fcebed; }
.update-status.status-running { color: #3159b8; background: #eaf2ff; }
.update-run-error { line-height: 1.5; margin-top: 7px; overflow-wrap: anywhere; }
.update-paging { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding-top: 16px; font-size: 13px; }
.update-detail { overflow-wrap: anywhere; }
.update-tracked-regions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 16px; border: 1px solid #dfe5ec; }
.update-tracked-regions .update-field { flex-direction: row-reverse; align-items: center; gap: 4px; }
.update-tracked-regions .update-field input[type="checkbox"] { width: 18px; height: 18px; }
.update-conflict { padding: 14px 0; border-top: 1px solid #dfe5ec; }
.update-conflict p { margin: 8px 0; }
@media (max-width: 760px) {
  .update-runtime { grid-template-columns: 1fr 1fr; gap: 20px 12px; }
  .update-runtime strong { font-size: 14px; }
  .update-event-builder { grid-template-columns: 100px minmax(0, 1fr); }
  .update-event-builder .update-field:nth-child(3) { grid-column: 1 / -1; }
  .update-event-row { flex-wrap: wrap; }
  .update-event-name { flex-basis: 100%; }
  .update-center .update-runs-table { min-width: 900px; }
}


/* === matchup.css === */
/* Two opponent columns share the same edges: 2 * (available - 24px) / 2 + 24px. */
.match-detail-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fixture-hero + .match-detail-tabs { margin-bottom: 16px; }
.match-detail-tabs .detail-tab { min-width: 0; text-align: center; }
.fixture-team { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; min-width: 0; padding: 8px; border-radius: 4px; }
.fixture-team:hover:not(:disabled) { background: #f4f7fc; }
.fixture-team { font-size: 20px; font-weight: 600; }
.fixture-hero { min-height: 142px; padding: 16px 24px; }
.fixture-team:disabled { opacity: 1; cursor: default; }
.fixture-team .detail-team-name { overflow-wrap: anywhere; }
.fixture-score { display: block; font-size: 30px; font-weight: 600; line-height: 1.5; font-variant-numeric: tabular-nums; }
.fixture-hero .detail-time { max-width: 240px; line-height: 1.6; }
.matchup-content { min-width: 0; padding: 16px 24px; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.matchup-content h2 { font-size: 15px; font-weight: 600; line-height: 1.5; margin: 0; }
.matchup-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.matchup-filters { display: flex; flex-wrap: wrap; gap: 12px; }
.matchup-filter { display: flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 12px; }
.matchup-filter .select { height: 34px; min-width: 100px; }
.matchup-scope { color: #617087; font-size: 12px; line-height: 1.7; margin: 6px 0 10px; overflow-wrap: anywhere; }
.matchup-comparison { font-variant-numeric: tabular-nums; }
.matchup-comparison-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr); align-items: center; gap: 16px; padding: 7px 0; border-bottom: 1px solid #edf0f4; text-align: center; font-size: 14px; line-height: 1.4; }
.matchup-comparison-row > span { color: var(--text-soft); font-size: 12px; }
.matchup-comparison-row > strong { font-weight: 500; }
.matchup-team-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.matchup-team-heading h2 { overflow-wrap: anywhere; text-align: left; }
.matchup-comparison-head .matchup-team-heading { justify-content: center; }
.matchup-logo { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: 0 0 32px; background: #fff; border: 1px solid #e5eaf2; border-radius: 4px; font-size: 11px; color: #31558e; }
.matchup-logo img { width: 28px; height: 28px; object-fit: contain; }
.matchup-recent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 12px; }
.matchup-history { min-width: 0; }
.matchup-history > .matchup-team-heading { padding: 8px 0 12px; }
.matchup-history-list { max-height: 510px; overflow-y: auto; scrollbar-width: thin; }
.matchup-history-row { display: grid; grid-template-columns: minmax(105px, 1fr) minmax(80px, 1fr) 56px 24px; align-items: center; gap: 10px; width: 100%; min-height: 62px; background: #fff; border: 0; border-top: 1px solid #edf0f4; padding: 10px 0; font: inherit; font-size: 12px; text-align: left; cursor: pointer; font-variant-numeric: tabular-nums; }
.matchup-history-row:hover { background: #f5f8fd; }
.matchup-history-row small { display: block; margin-top: 4px; font-size: 11px; color: #637185; line-height: 1.4; overflow-wrap: anywhere; }
.matchup-history-date, .matchup-opponent { min-width: 0; overflow-wrap: anywhere; }
.matchup-kills { text-align: right; }
.matchup-kills strong { font-weight: 500; }
.matchup-result { text-align: right; font-weight: 600; }
.matchup-content .matchup-section-title { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.matchup-content > .matchup-section-title { margin-top: 14px; padding-top: 0; border-top: 0; }
.matchup-text-button { border: 0; padding: 8px 0; background: transparent; color: #3159b8; font: inherit; font-size: 12px; cursor: pointer; }
.matchup-text-button:hover { text-decoration: underline; }
.matchup-h2h .matchup-history-list { max-height: 340px; }
.matchup-roster-row { display: flex; align-items: center; gap: 16px; min-height: 36px; border-bottom: 1px solid #edf0f4; font-size: 13px; }
.matchup-roster-row > span:first-child { width: 40px; color: #637185; font-size: 12px; }
.matchup-empty { padding: 20px 0; margin: 0; color: #637185; font-size: 13px; }
.fixture-team:focus-visible, .matchup-content button:focus-visible { outline: 2px solid #3159b8; outline-offset: 2px; }
@media (max-width: 900px) {
  .matchup-recent-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .matchup-rosters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .matchup-content { padding: 16px; }
  .matchup-comparison-row { grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr); gap: 8px; font-size: 13px; }
  .matchup-comparison-head .matchup-team-heading { flex-direction: column; }
  .matchup-comparison-head h2 { font-size: 13px; text-align: center; }
  .matchup-filters { width: 100%; gap: 10px; }
  .matchup-filter { flex: 1; flex-direction: column; align-items: stretch; gap: 4px; }
  .matchup-filter .select { min-width: 0; width: 100%; height: 40px; }
  .matchup-history-row { grid-template-columns: minmax(78px, 1fr) minmax(65px, 1fr) 45px 20px; gap: 6px; }
  .matchup-history-date > span { font-size: 11px; }
  .matchup-rosters { grid-template-columns: minmax(0, 1fr); }
  .fixture-hero { grid-template-columns: minmax(0, 1fr) 105px minmax(0, 1fr); }
  .fixture-hero .detail-time { font-size: 11px; }
  .fixture-team { font-size: 14px; }
  .match-detail-tabs .detail-tab { font-size: 13px; padding: 12px 4px; min-height: 44px; }
}


/* === navigation.css === */
.page-backbar { display: flex; align-items: center; min-height: 32px; margin: 0 0 12px; }
.page-back { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 4px 8px; border: 0; border-radius: 4px; background: transparent; color: #31558e; font: inherit; font-size: 13px; line-height: 1.4; white-space: nowrap; cursor: pointer; flex-shrink: 0; }
.page-back > [aria-hidden] { font-size: 19px; line-height: 1; }
.page-back:hover { background: #eaf0fa; color: #193f7c; }
.page-back:focus-visible { outline: 2px solid #3159b8; outline-offset: 2px; }
.breadcrumb > .page-back { margin-right: 4px; padding-right: 12px; border-right: 1px solid #dce4f0; border-radius: 0; }
.modal-head > h3 { flex: 1; min-width: 0; }
.modal-back { margin-right: 8px; width: 32px; }
@media (max-width: 560px) {
  .page-back { min-height: 44px; padding: 6px 10px; }
  .page-backbar { margin-bottom: 8px; }
  .breadcrumb > .page-back { margin-right: 0; }
}
