:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f0f4fa;
  --line: #d9e2ef;
  --text: #142033;
  --muted: #617086;
  --accent: #0f766e;
  --accent-soft: #d8f3ef;
  --warn: #9a6700;
  --warn-soft: #fff1c2;
  --danger: #8b2e2e;
  --danger-soft: #fde8e8;
  --shadow: 0 18px 40px rgba(20, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

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

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-mark {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-title {
  font-size: 30px;
  font-weight: 800;
}

.brand-subtitle {
  color: var(--muted);
  max-width: 720px;
  line-height: 1.6;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topnav a {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  color: var(--muted);
}

.topnav a.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(217, 226, 239, 0.9);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.panel-header {
  padding: 22px 22px 0;
}

.panel-title {
  margin: 0;
  font-size: 20px;
}

.panel-desc {
  color: var(--muted);
  line-height: 1.6;
  margin: 10px 0 0;
}

.panel-body {
  padding: 22px;
}

.setting-group {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 14px;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.hint-box,
.status-box {
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--panel-soft);
  line-height: 1.6;
  color: var(--muted);
}

.mini-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.status-box.good {
  background: var(--accent-soft);
  color: #0a5f58;
}

.status-box.watch {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-box.skip {
  background: var(--danger-soft);
  color: var(--danger);
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.load-status {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 18px;
}

.load-status strong {
  font-size: 14px;
}

.load-status span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.load-status.loading {
  background: #eef6ff;
  border-color: #c9def6;
}

.load-status.success {
  background: var(--accent-soft);
  border-color: #98ddd4;
}

.load-status.error {
  background: var(--danger-soft);
  border-color: #efb5b5;
}

.debug-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.debug-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 13px;
}

.debug-link.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.metric {
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
  border: 1px solid var(--line);
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.metric-value {
  font-size: 32px;
  font-weight: 800;
}

.metric-value.small {
  font-size: 22px;
}

.section-block + .section-block {
  margin-top: 22px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  font-size: 22px;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.match-list {
  display: grid;
  gap: 14px;
}

.match-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.match-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.teams {
  display: grid;
  gap: 8px;
}

.league-row,
.match-meta {
  color: var(--muted);
  font-size: 13px;
}

.match-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fact-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f2f7fd;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
}

.teams strong {
  font-size: 22px;
}

.match-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 13px;
}

.chip.good {
  background: var(--accent-soft);
  color: #0a5f58;
}

.chip.watch {
  background: var(--warn-soft);
  color: var(--warn);
}

.chip.skip {
  background: var(--danger-soft);
  color: var(--danger);
}

.ghost-link,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.primary-link {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.play-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.match-bottom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 20px 18px;
  border-top: 1px solid var(--line);
  background: #fcfdff;
}

.digest-block {
  display: grid;
  gap: 10px;
}

.digest-label {
  font-size: 13px;
  color: var(--muted);
}

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

.digest-list span,
.digest-text {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--text);
  line-height: 1.5;
}

.play-cell {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.play-cell.primary {
  background: #fbfdff;
}

.play-cell.secondary {
  background: #f7f9fc;
}

.play-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.play-cell:last-child {
  border-right: 0;
}

.play-name {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.play-mini-tier {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #edf4fb;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.play-brief {
  font-size: 15px;
  line-height: 1.5;
  min-height: 48px;
}

.play-tag {
  margin-top: 10px;
}

.match-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.headline-box {
  padding: 24px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.headline-box h1 {
  margin: 8px 0 10px;
  font-size: 34px;
}

.subgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.play-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.play-section.primary {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-color: #cadcf0;
}

.play-section.secondary {
  background: #fbfcfe;
}

.play-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.play-tier {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 6px;
}

.play-section h3 {
  margin: 0;
}

.play-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.play-summary-line {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  margin: 2px 0 10px;
  border-radius: 999px;
  background: #edf6ff;
  border: 1px solid #d2e3f6;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.probability-block {
  display: grid;
  gap: 10px;
  margin: 14px 0 2px;
  padding: 12px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #d6e4f3;
}

.probability-title {
  font-size: 13px;
  color: var(--muted);
}

.probability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.probability-cell {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #dfe9f5;
}

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

.probability-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.odds-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.odds-cell {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: #eef6ff;
  border: 1px solid #cfe0f5;
}

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

.odds-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.option-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.option-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel-soft);
}

.option-row strong {
  font-size: 15px;
}

.option-row span {
  color: var(--muted);
  text-align: right;
}

.play-section.primary:nth-child(1),
.play-section.primary:nth-child(2),
.play-section.primary:nth-child(3) {
  min-height: 100%;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.glossary-list {
  display: grid;
  gap: 12px;
}

.glossary-item {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.glossary-item span {
  color: var(--muted);
  line-height: 1.6;
}

.list-note {
  padding-left: 18px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.list-note li + li {
  margin-top: 8px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.accept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.check-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.check-list li {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--panel-soft);
}

.check-list a {
  font-weight: 700;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ops-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%);
  display: grid;
  gap: 10px;
}

.ops-card h3 {
  margin: 0;
  font-size: 18px;
}

.ops-card p,
.ops-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.ops-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #0a5f58;
  font-size: 13px;
  font-weight: 700;
}

.order-list {
  display: grid;
  gap: 12px;
}

.order-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: 16px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.order-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 12px;
  background: var(--text);
  color: #fff;
  font-weight: 700;
}

.order-main,
.order-side {
  display: grid;
  gap: 6px;
}

.order-main strong {
  font-size: 18px;
}

.order-main span,
.order-side {
  color: var(--muted);
  line-height: 1.6;
}

.footer-note {
  margin-top: 24px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.empty-state,
.fatal-state {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 18px;
  border: 1px dashed var(--line);
  background: #fff;
}

.empty-state strong,
.fatal-state h1 {
  margin: 0;
  font-size: 20px;
}

.empty-state span,
.fatal-state p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

@media (max-width: 1180px) {
  .layout,
  .subgrid,
  .info-grid,
  .accept-grid,
  .hero-strip,
  .play-grid,
  .ops-grid,
  .match-bottom {
    grid-template-columns: 1fr;
  }

  .play-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .play-cell:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 780px) {
  .shell {
    padding: 16px;
  }

  .topbar,
  .match-top,
  .match-header,
  .section-heading,
  .order-item {
    flex-direction: column;
    align-items: stretch;
  }

  .order-item {
    grid-template-columns: 1fr;
  }

  .brand-title {
    font-size: 26px;
  }

  .headline-box h1,
  .metric-value {
    font-size: 28px;
  }

  .teams strong {
    font-size: 20px;
  }
}
