:root {
  --bg: #f4ead1;
  --panel: rgba(255, 250, 239, 0.92);
  --panel-strong: rgba(255, 253, 247, 0.98);
  --ink: #2f2218;
  --muted: #6e5c4c;
  --gold: #b37a30;
  --gold-deep: #7f5419;
  --jade: #2c6b56;
  --jade-soft: #e3f2eb;
  --line: rgba(95, 62, 25, 0.14);
  --shadow: 0 24px 46px rgba(70, 40, 12, 0.12);
  --pitch: linear-gradient(180deg, #2b7b56 0%, #184f37 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 244, 212, 0.9), transparent 34%),
    radial-gradient(circle at right 20%, rgba(219, 237, 228, 0.9), transparent 28%),
    linear-gradient(135deg, #f7efde 0%, #ead9b8 55%, #e3cea5 100%);
}

.shell {
  width: min(1260px, calc(100% - 28px));
  margin: 18px auto 30px;
}

.page-header,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.page-header {
  padding: 26px 28px 22px;
  margin-bottom: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: var(--jade);
  background: rgba(44, 107, 86, 0.1);
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  margin-top: 14px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.02;
  font-family: "ZCOOL XiaoWei", serif;
  font-weight: 400;
}

.lead {
  margin-top: 10px;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.stat-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(127, 84, 25, 0.12);
}

.stat-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat-card strong {
  font-size: 24px;
  color: var(--gold-deep);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.3fr) 360px;
}

.grid.home {
  grid-template-columns: 1.15fr 0.85fr;
}

.panel {
  padding: 18px;
}

.panel-title {
  font-family: "ZCOOL XiaoWei", serif;
  font-size: 28px;
}

.panel-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

button,
select {
  font: inherit;
}

button {
  border: none;
  border-radius: 15px;
  padding: 12px 17px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(73, 40, 11, 0.13);
}

button.primary {
  background: linear-gradient(135deg, var(--gold), #d89c44);
  color: #fff7e9;
}

button.secondary {
  background: rgba(47, 34, 24, 0.08);
  color: var(--ink);
}

button.choice {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(127, 84, 25, 0.13);
  color: var(--ink);
}

button.choice.active {
  background: var(--jade-soft);
  border-color: rgba(44, 107, 86, 0.35);
}

button.choice small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 500;
}

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

.info-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(127, 84, 25, 0.12);
}

.tiny {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--jade);
  background: rgba(44, 107, 86, 0.09);
}

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

.control label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

select {
  width: 100%;
  border: 1px solid rgba(127, 84, 25, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.conference,
.result-banner {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(127, 84, 25, 0.12);
}

.conference-question {
  font-weight: 800;
  line-height: 1.6;
}

.choice-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.pitch {
  margin-top: 16px;
  border-radius: 24px;
  padding: 16px;
  border: 10px solid rgba(246, 235, 208, 0.72);
  background: var(--pitch);
  position: relative;
  overflow: hidden;
}

.pitch::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49.2%, rgba(255,255,255,0.34) 49.2% 50.8%, transparent 50.8%),
    radial-gradient(circle at center, transparent 0 12%, rgba(255,255,255,0.27) 12.5% 13%, transparent 13.5%);
  pointer-events: none;
}

.formation-grid {
  display: grid;
  gap: 12px;
  min-height: 430px;
  position: relative;
  z-index: 1;
}

.formation-row {
  display: grid;
  gap: 12px;
}

.player-slot {
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(18, 71, 46, 0.18);
  box-shadow: 0 10px 18px rgba(7, 33, 21, 0.16);
}

.slot-role {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #255540;
  margin-bottom: 6px;
}

.slot-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #265441;
  margin-top: 6px;
}

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

.player-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(127, 84, 25, 0.12);
}

.player-card.used {
  outline: 2px solid rgba(44, 107, 86, 0.24);
  background: rgba(227, 242, 235, 0.7);
}

.player-card strong {
  display: block;
  margin-bottom: 4px;
}

.scoreboard {
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(45, 30, 20, 0.96), rgba(87, 57, 19, 0.96));
  color: #fff8eb;
}

.score-line {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
}

.score-line .club {
  text-align: center;
}

.score-value {
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 900;
}

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

.summary-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(127, 84, 25, 0.12);
  text-align: center;
}

.summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  color: var(--jade);
}

.event-log {
  margin-top: 14px;
  max-height: 360px;
  overflow: auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(127, 84, 25, 0.12);
  padding: 8px;
}

.event {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
}

.event:nth-child(odd) {
  background: rgba(255, 255, 255, 0.55);
}

.event.goal {
  background: rgba(219, 243, 228, 0.82);
}

.event.warn {
  background: rgba(255, 239, 224, 0.84);
}

.minute {
  color: var(--gold-deep);
  font-weight: 800;
}

.status-banner {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(127, 84, 25, 0.12);
  line-height: 1.7;
}

.footer-note {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .grid.two,
  .grid.home {
    grid-template-columns: 1fr;
  }

  .controls,
  .stats-row,
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pitch {
    padding: 12px;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 16px, 1260px);
    margin-top: 10px;
  }

  .controls,
  .stats-row,
  .summary-grid,
  .squad-grid {
    grid-template-columns: 1fr;
  }

  .score-line {
    grid-template-columns: 1fr;
  }

  .formation-grid {
    min-height: 360px;
  }
}
