﻿:root {
  color-scheme: light;
  --bg: #f1eee5;
  --surface: rgba(255, 251, 242, 0.92);
  --text: #182015;
  --muted: #59665b;
  --line: rgba(24, 32, 21, 0.12);
  --brand: #0d6a3b;
  --accent: #f1d08a;
  --field-dark: #246f37;
  --field-mid: #347f45;
  --shadow: 0 16px 38px rgba(61, 45, 13, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  background: linear-gradient(90deg, #dde7dc 0, #f6f2e9 8%, #f6f2e9 92%, #dde7dc 100%);
  color: var(--text);
}

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

button {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto;
  padding: 12px 0 28px;
}

.site-header,
.hero,
.candidate-panel,
.faq {
  margin-top: 14px;
}

.site-header,
.setup-panel,
.pitch-panel,
.scorecard-panel,
.candidate-panel,
.faq {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.site-header {
  border-radius: 999px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
}

.top-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.top-nav a {
  color: var(--muted);
}

.language-switcher {
  display: flex;
  gap: 8px;
}

.language-chip,
.setup-chip,
.roll-button,
.ghost-button,
.primary-button,
.secondary-button,
.candidate-card button,
.scorecard-tab {
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  font-weight: 700;
}

.language-chip {
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
}

.language-chip.is-active {
  background: var(--brand);
  color: #f8f4e8;
}

.hero {
  display: grid;
  grid-template-columns: 330px minmax(420px, 1fr) 290px;
  gap: 0;
  align-items: stretch;
  border-radius: 0;
  min-height: calc(100vh - 120px);
}

.hero.is-simulating {
  display: block;
  min-height: calc(100vh - 120px);
}

.hero.is-simulating > .setup-panel,
.hero.is-simulating > .pitch-panel,
.hero.is-simulating > .scorecard-panel {
  display: none;
}

.setup-panel,
.pitch-panel,
.scorecard-panel {
  padding: 18px 16px;
  min-width: 0;
  min-height: 100%;
}

.setup-panel {
  display: block;
}

.sidebar-view {
  width: 100%;
}

.sidebar-view[hidden] {
  display: none !important;
}

.setup-panel,
.pitch-panel {
  border-right: 1px solid rgba(24, 32, 21, 0.1);
}

.setup-label,
.panel-label,
.section-tag {
  margin: 0 0 8px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #5a6880;
  font-weight: 800;
}

.setup-group + .setup-group {
  margin-top: 16px;
}

.chip-grid {
  display: grid;
  gap: 10px;
}

.chip-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.setup-chip {
  min-height: 40px;
  border-radius: 16px;
  border: 1px solid rgba(24, 32, 21, 0.22);
  background: #fff;
  color: #112417;
  cursor: pointer;
}

.setup-chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff7ef;
}

.pool-switch {
  width: 100%;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid rgba(24, 32, 21, 0.2);
  border-radius: 16px;
  background: #fff;
  color: #153121;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.pool-switch:disabled {
  cursor: wait;
  opacity: 0.65;
}

.pool-switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d9ddd8;
  transition: background 160ms ease;
}

.pool-switch-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(17, 36, 23, 0.25);
  transition: transform 160ms ease;
}

.pool-switch.is-complete .pool-switch-track {
  background: var(--brand);
}

.pool-switch.is-complete .pool-switch-track span {
  transform: translateX(18px);
}

.pool-switch-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.pool-switch-copy strong {
  font-size: 0.86rem;
}

.pool-switch-copy small {
  color: #68756c;
  font-size: 0.68rem;
}

.draw-box {
  --nation-primary: #0f7046;
  --nation-secondary: #f1d08a;
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  padding: 16px 14px;
  min-height: 124px;
  border-radius: 22px;
  background: #fff;
  border: 1px dashed rgba(241, 208, 138, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
}

.draw-box::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--nation-primary) 0 68%, var(--nation-secondary) 68%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.draw-box.is-drawn::before {
  opacity: 1;
}

.draw-box-copy {
  margin: 0;
  max-width: 12ch;
  color: #566578;
  font-size: 0.92rem;
  line-height: 1.3;
  font-weight: 700;
}

.draw-box span,
.draw-box strong {
  display: block;
}

.draw-nation-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  font-size: 1.08rem;
}

.draw-flag {
  width: 1.35em;
  font-size: 1.35rem;
  line-height: 1;
}

.draw-flag:empty {
  display: none;
}

.draw-box strong {
  font-size: 1rem;
}

.draw-box-compact {
  min-height: 112px;
  margin-top: 18px;
}

.setup-actions {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.roll-button,
.ghost-button,
.primary-button,
.secondary-button,
.candidate-card button,
.scorecard-tab {
  min-height: 44px;
  border-radius: 16px;
  border: 0;
  cursor: pointer;
}

.roll-button,
.primary-button,
.candidate-card button,
.scorecard-tab.is-active {
  background: var(--brand);
  color: #fff8ef;
}

.roll-button-large {
  min-height: 92px;
  font-size: 2.5rem;
  letter-spacing: 0.04em;
  background: #ff654f;
  box-shadow: 0 18px 36px rgba(255, 101, 79, 0.24);
}

.ghost-button,
.secondary-button,
.scorecard-tab {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.pitch-panel {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.pitch-frame {
  width: 100%;
  max-width: min(540px, 100%);
}

.pitch {
  position: relative;
  width: 100%;
  aspect-ratio: 72 / 100;
  max-height: calc(100vh - 180px);
  border-radius: 26px;
  overflow: hidden;
  background: repeating-linear-gradient(180deg, var(--field-mid) 0, var(--field-mid) 11.5%, var(--field-dark) 11.5%, var(--field-dark) 23%);
}

.pitch::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
}

.pitch-markings,
.pitch-markings::before,
.pitch-markings::after,
.pitch-center-circle,
.pitch-box-top,
.pitch-box-bottom,
.pitch-goal-top,
.pitch-goal-bottom,
.pitch-arc-top,
.pitch-arc-bottom,
.pitch-spot-top,
.pitch-spot-bottom {
  position: absolute;
}

.pitch-markings { inset: 0; }

.pitch-markings::before,
.pitch-markings::after,
.pitch-center-circle,
.pitch-box-top,
.pitch-box-bottom,
.pitch-goal-top,
.pitch-goal-bottom,
.pitch-arc-top,
.pitch-arc-bottom,
.pitch-spot-top,
.pitch-spot-bottom {
  content: "";
}

.pitch-markings::before {
  left: 50%;
  top: 0;
  bottom: 0;
  border-left: 4px solid rgba(233, 241, 231, 0.56);
  transform: translateX(-50%);
}

.pitch-markings::after {
  left: 0;
  right: 0;
  top: 50%;
  border-top: 4px solid rgba(233, 241, 231, 0.56);
  transform: translateY(-50%);
}

.pitch-center-circle {
  left: 50%;
  top: 50%;
  width: 31%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 4px solid rgba(233, 241, 231, 0.56);
  transform: translate(-50%, -50%);
}

.pitch-box-top,
.pitch-box-bottom {
  left: 21%;
  width: 58%;
  height: 15.8%;
  border: 4px solid rgba(233, 241, 231, 0.56);
}

.pitch-box-top { top: 0; border-top: 0; }
.pitch-box-bottom { bottom: 0; border-bottom: 0; }

.pitch-goal-top,
.pitch-goal-bottom {
  left: 38.5%;
  width: 23%;
  height: 5.8%;
  border: 4px solid rgba(233, 241, 231, 0.56);
}

.pitch-goal-top { top: 0; border-top: 0; }
.pitch-goal-bottom { bottom: 0; border-bottom: 0; }

.pitch-arc-top,
.pitch-arc-bottom {
  left: 50%;
  width: 26%;
  height: 8.6%;
  border: 4px solid rgba(233, 241, 231, 0.56);
  border-radius: 0 0 999px 999px;
  border-top: 0;
  transform: translateX(-50%);
}

.pitch-arc-top { top: 15.8%; }
.pitch-arc-bottom { bottom: 15.8%; transform: translateX(-50%) rotate(180deg); }

.pitch-spot-top,
.pitch-spot-bottom {
  left: 50%;
  width: 1.6%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: rgba(233, 241, 231, 0.68);
  transform: translateX(-50%);
}

.pitch-spot-top { top: 9.6%; }
.pitch-spot-bottom { bottom: 9.6%; }

.pitch-slot {
  position: absolute;
  min-width: 62px;
  min-height: 62px;
  padding: 6px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #eef7ee;
  background: rgba(9, 56, 30, 0.22);
  border: 4px dashed var(--accent);
  font-weight: 800;
  z-index: 2;
  font-size: 0.92rem;
}

.pitch-slot.is-next {
  background: rgba(9, 56, 30, 0.34);
}

.pitch-slot.is-selectable {
  background: rgba(255, 247, 234, 0.96);
  color: #153121;
  border-style: solid;
  border-color: #f1d08a;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(241, 208, 138, 0.18);
}

.pitch-slot.is-filled {
  min-width: 76px;
  min-height: 62px;
  padding: 0;
  background: transparent;
  color: #133120;
  border: 0;
}

.slot-name {
  font-size: 0.66rem;
  color: #5c6d5e;
}

.pitch-slot.is-filled .slot-name {
  position: absolute;
  top: 31px;
  left: 50%;
  min-width: 24px;
  padding: 2px 5px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: #f1d08a;
  color: #173522;
  font-size: 0.55rem;
  line-height: 1.2;
  z-index: 2;
}

.pitch-slot.is-filled strong {
  display: block;
  max-width: 76px;
  margin-top: 3px;
  padding: 2px 5px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(252, 248, 239, 0.94);
  color: #133120;
  font-size: 0.58rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(8, 32, 18, 0.18);
}

.player-avatar {
  position: relative;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  image-rendering: pixelated;
}

.player-avatar svg {
  display: block;
  width: 100%;
  height: 100%;
}

.player-avatar.is-star {
  box-shadow: 0 0 0 2px #d7a52a, 0 2px 5px rgba(8, 32, 18, 0.28);
}

.pitch-avatar {
  width: 42px;
  height: 42px;
  border: 2px solid rgba(252, 248, 239, 0.96);
  box-shadow: 0 2px 5px rgba(8, 32, 18, 0.28);
}

.scorecard-tabs {
  display: flex;
  justify-content: flex-end;
}

.scorecard-title {
  min-height: 44px;
  min-width: 180px;
  padding: 0 20px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff8ef;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
}

.scorecard-head {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.scorecard-head strong {
  color: #3f5469;
}

.score-meters {
  margin-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(24, 32, 21, 0.12);
}

.meter-row + .meter-row {
  margin-top: 10px;
}

.meter-row span {
  display: block;
  margin-top: 6px;
  color: #4a596d;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.meter-bar {
  width: 100%;
  height: 10px;
  background: rgba(24, 32, 21, 0.08);
  overflow: hidden;
}

.meter-bar span {
  display: block;
  height: 100%;
  width: 0;
  margin: 0;
}

.meter-attack span { background: #ff654f; }
.meter-defense span { background: #102417; }

.scorecard-list {
  margin-top: 12px;
  max-height: calc(100vh - 330px);
  overflow: auto;
}

.scorecard-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(24, 32, 21, 0.1);
}

.scorecard-slot {
  color: #b5b5ad;
  font-weight: 800;
  text-transform: uppercase;
}

.scorecard-player {
  color: #5c6d5e;
}

.faq {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.candidate-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.candidate-panel-head-sidebar {
  display: grid;
  gap: 12px;
}

.candidate-panel-head-sidebar .board-topline {
  display: none;
}

.candidate-panel-head h2,
.faq h2,
.result-panel h3 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

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

.board-badge {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 62, 39, 0.08);
  color: #234231;
  font-size: 0.92rem;
}

.candidate-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.candidate-list-sidebar {
  margin-top: 12px;
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  border: 1px solid rgba(24, 32, 21, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.candidate-empty {
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line);
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
}

.candidate-card {
  border: 0;
  border-bottom: 1px solid rgba(24, 32, 21, 0.1);
  background: rgba(255, 255, 255, 0.96);
  padding: 10px 8px;
  display: grid;
  grid-template-columns: 40px 32px minmax(0, 1fr) 46px 34px;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  min-width: 0;
}

.candidate-avatar {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(19, 49, 32, 0.14);
}

.candidate-card.is-featured {
  background: #fffaf1;
}

.candidate-card.is-ideal {
  background: #fff7ea;
}

.candidate-card.is-good {
  background: #fffdf6;
}

.candidate-card.is-selected {
  background: #eef7f0;
  outline: 2px solid rgba(13, 106, 59, 0.3);
  outline-offset: -2px;
}

.candidate-card.is-disabled {
  background: rgba(238, 238, 233, 0.72);
  color: #8f968f;
  opacity: 0.58;
  cursor: not-allowed;
}

.candidate-card.is-disabled:hover {
  background: rgba(238, 238, 233, 0.72);
}

.candidate-card.is-disabled .candidate-number,
.candidate-card.is-disabled .candidate-name,
.candidate-card.is-disabled .candidate-position,
.candidate-card.is-disabled .candidate-rating {
  color: #8f968f;
}

.candidate-card:hover {
  background: #f8f4ea;
}

.candidate-card:focus-visible {
  outline: 2px solid rgba(13, 106, 59, 0.42);
  outline-offset: -2px;
}

.candidate-number {
  color: #5a6880;
  font-size: 0.78rem;
  font-weight: 800;
}

.candidate-name {
  font-size: 0.78rem;
  font-weight: 800;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.version-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 18px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(13, 106, 59, 0.1);
  color: #0d6a3b;
  font-size: 0.64rem;
  font-weight: 900;
  vertical-align: middle;
}

.candidate-position,
.stat-line,
.result-panel p,
.faq p {
  color: var(--muted);
  line-height: 1.6;
}

.candidate-position {
  font-weight: 800;
  letter-spacing: 0.01em;
  margin: 0;
  text-align: right;
  font-size: 0.68rem;
  white-space: nowrap;
}

.candidate-rating {
  font-size: 0.92rem;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: right;
  font-weight: 900;
}

.simulate-actions {
  margin-top: 16px;
}

.simulate-button {
  width: 100%;
  min-height: 52px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  background: #ff654f;
  box-shadow: 0 14px 28px rgba(255, 101, 79, 0.16);
}

.result-panel {
  margin-top: 14px;
  border-radius: var(--radius-lg);
  padding: 14px;
  background: linear-gradient(135deg, rgba(13, 106, 59, 0.1), rgba(235, 208, 156, 0.38));
  border: 1px solid rgba(13, 106, 59, 0.18);
}

.simulation-view {
  width: 100%;
  min-height: calc(100vh - 120px);
}

.summary-view {
  width: 100%;
  min-height: calc(100vh - 120px);
}

.simulation-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 120px);
}

.summary-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 28px;
}

.summary-shell h2 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.95;
}

.summary-copy {
  margin: 18px 0 0;
  max-width: 58ch;
  color: #58655a;
  font-size: 1.08rem;
}

.summary-scoreline {
  margin-top: 18px;
  display: inline-flex;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(12, 61, 39, 0.08);
  color: #173524;
  font-weight: 800;
}

.summary-results {
  margin-top: 26px;
  display: grid;
  gap: 12px;
}

.summary-result-card {
  display: block;
  border: 1px solid rgba(24, 32, 21, 0.12);
  background: rgba(255, 255, 255, 0.92);
}

.summary-result-head {
  position: relative;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 120px;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.summary-result-head::-webkit-details-marker {
  display: none;
}

.summary-result-head::after {
  content: "+";
  position: absolute;
  right: 14px;
  color: #5a685d;
  font-weight: 900;
}

.summary-result-card[open] .summary-result-head::after {
  content: "−";
}

.summary-result-card strong {
  font-size: 1.15rem;
}

.summary-result-card span {
  color: #5a685d;
}

.summary-result-score {
  text-align: right;
  font-size: 2rem;
  font-weight: 900;
  padding-right: 18px;
}

.summary-result-outcome {
  color: #5a685d;
  font-weight: 800;
}

.summary-result-outcome.is-win { color: #0d6a3b; }
.summary-result-outcome.is-loss { color: #d94b3d; }

.summary-match-detail {
  padding: 0 18px 18px;
  border-top: 1px solid rgba(24, 32, 21, 0.08);
}

.summary-match-detail > p {
  margin: 14px 0 10px;
  color: #5a685d;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-match-events {
  display: grid;
  gap: 8px;
}

.summary-goal-event {
  display: grid;
  grid-template-columns: 34px 44px minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  background: #f8f6ef;
}

.summary-goal-event strong,
.summary-goal-event span {
  min-width: 0;
}

.summary-goal-event.is-home .summary-goal-minute,
.summary-goal-event.is-home strong {
  color: #0d6a3b;
}

.summary-goal-event.is-away .summary-goal-minute,
.summary-goal-event.is-away strong {
  color: #d94b3d;
}

.summary-goal-minute {
  font-weight: 900;
}

.summary-event-avatar {
  width: 34px;
  height: 34px;
}

.summary-no-events {
  margin: 0;
  color: #5a685d;
}

.summary-actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.simulation-summary,
.simulation-stage {
  padding: 22px 20px;
}

.simulation-summary {
  border-right: 1px solid rgba(24, 32, 21, 0.1);
  background: rgba(255, 255, 255, 0.64);
}

.simulation-summary h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
}

.simulation-run-meta {
  margin-top: 12px;
  color: #556478;
  font-weight: 700;
}

.simulation-results {
  margin-top: 20px;
  display: grid;
  gap: 10px;
}

.simulation-result-item {
  padding: 12px 14px;
  border: 1px solid rgba(24, 32, 21, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

.simulation-result-item strong {
  display: block;
  font-size: 1.1rem;
}

.simulation-result-item span {
  display: block;
  margin-top: 4px;
  color: #5b685e;
}

.simulation-stage {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.simulation-match-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.simulation-match-head h3 {
  margin: 0;
  font-size: 2.6rem;
  line-height: 0.95;
}

.simulation-timer {
  min-width: 86px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #102417;
  color: #fff;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 900;
}

.simulation-scoreboard {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(13, 106, 59, 0.08), rgba(241, 208, 138, 0.3));
  border: 1px solid rgba(13, 106, 59, 0.14);
}

.simulation-team {
  display: grid;
  gap: 6px;
}

.simulation-team-away {
  text-align: right;
}

.simulation-team-label {
  color: #57675b;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}

.simulation-team strong {
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 0.9;
}

.simulation-score-divider {
  text-align: center;
  font-size: 2rem;
  font-weight: 900;
}

.simulation-events {
  flex: 1;
  min-height: 260px;
  max-height: 48vh;
  overflow: auto;
  padding: 10px 0;
  border-top: 1px solid rgba(24, 32, 21, 0.1);
  border-bottom: 1px solid rgba(24, 32, 21, 0.1);
}

.simulation-event {
  display: grid;
  grid-template-columns: 54px 38px minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
  padding: 10px 4px;
}

.event-avatar {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(24, 32, 21, 0.1);
  box-shadow: 0 2px 5px rgba(8, 32, 18, 0.12);
}

.simulation-event + .simulation-event {
  border-top: 1px solid rgba(24, 32, 21, 0.08);
}

.simulation-event-minute {
  color: #5a6880;
  font-weight: 900;
}

.simulation-event.is-home .simulation-event-minute,
.simulation-event.is-home .simulation-event-copy strong {
  color: #0d6a3b;
}

.simulation-event.is-away .simulation-event-minute,
.simulation-event.is-away .simulation-event-copy strong {
  color: #d94b3d;
}

.simulation-event-copy strong {
  display: block;
  font-size: 1rem;
}

.simulation-event-copy span {
  display: block;
  color: #5b685e;
  margin-top: 2px;
}

.simulation-actions-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.site-footer {
  margin-top: 18px;
  padding: 18px 4px 4px;
  border-top: 1px solid rgba(24, 32, 21, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-footer > div {
  display: grid;
  gap: 3px;
}

.site-footer strong {
  font-size: 0.92rem;
}

.site-footer span {
  color: var(--muted);
  font-size: 0.78rem;
}

.footer-kofi {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  background: #ff5f5f;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.faq-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.faq-list article {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.faq-list h3 {
  margin: 0;
  font-weight: 800;
}

@media (max-width: 1400px) {
  .hero {
    grid-template-columns: 320px minmax(400px, 1fr) 280px;
    min-height: calc(100vh - 120px);
  }
}

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .simulation-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .simulation-summary {
    border-right: 0;
    border-bottom: 1px solid rgba(24, 32, 21, 0.1);
  }

  .setup-panel,
  .pitch-panel {
    border-right: 0;
    border-bottom: 1px solid rgba(24, 32, 21, 0.1);
  }

  .pitch {
    max-height: none;
  }

  .scorecard-list {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1600px);
  }

  .chip-grid-two,
  .chip-grid-three {
    grid-template-columns: 1fr;
  }

  .candidate-card {
    grid-template-columns: 1fr;
  }

  .candidate-card button,
  .ghost-button,
  .roll-button,
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .candidate-panel-head,
  .draft-controls,
  .draw-meta,
  .simulation-actions-row,
  .simulation-match-head,
  .summary-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-result-head {
    grid-template-columns: 1fr;
  }

  .summary-result-score {
    padding-right: 0;
    text-align: left;
  }

  .summary-goal-event {
    grid-template-columns: 34px 40px minmax(0, 1fr);
  }

  .summary-goal-event > span:last-child {
    grid-column: 3;
  }

  .pitch-slot {
    min-width: 58px;
    min-height: 58px;
    font-size: 0.82rem;
  }

  .pitch-slot.is-filled {
    min-width: 66px;
    min-height: 54px;
  }

  .pitch-avatar {
    width: 36px;
    height: 36px;
  }

  .pitch-slot.is-filled .slot-name {
    top: 27px;
  }

  .pitch-slot.is-filled strong {
    max-width: 66px;
    font-size: 0.54rem;
  }

  .candidate-card {
    grid-template-columns: 34px 28px minmax(0, 1fr) 42px 30px;
    gap: 5px;
  }

  .candidate-avatar {
    width: 34px;
    height: 34px;
  }
}
