:root {
  --bg: #f2f4f7;
  --card: #ffffff;
  --text: #15202b;
  --muted: #5b6875;
  --accent: #1f6fc4;
  --border: #dde3ea;
  --field: #1f78d1;
  --line: #ffffff;
  --attack: #ffffff;
  --attack-text: #12304f;
  --defense: #d93a3a;
  --defense-text: #ffffff;
  --ball: #ffcc33;
  --ball-stroke: #7a5a00;
  --run: #ffffff;
  --pass: #ffcc33;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161c;
    --card: #1b232c;
    --text: #e8edf2;
    --muted: #9aa7b4;
    --accent: #5ea8f2;
    --border: #2c3742;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.4;
}

.top {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.brand span { color: var(--accent); }

main {
  max-width: 520px;
  margin: 0 auto;
  padding: 16px;
}

h1 { font-size: 1.35rem; margin: 4px 0; }

/* Overview */
.play-list { list-style: none; margin: 0; padding: 0; }

.play-list a {
  display: block;
  margin-bottom: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
}

.play-list strong { font-size: 1.1rem; }
.play-list span { display: block; color: var(--muted); font-size: 0.9rem; }

/* Play view */
.back { color: var(--accent); text-decoration: none; font-size: 0.95rem; }
.summary { color: var(--muted); margin: 0 0 12px; }

.board svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: var(--field);
}

.field { fill: var(--field); }
.lines { fill: none; stroke: var(--line); stroke-width: 0.08; }
.lines .dashed { stroke-dasharray: 0.5 0.4; }
.goal { fill: none; stroke: var(--line); stroke-width: 0.12; }

.player circle { stroke-width: 0.08; }
.player text {
  font-size: 0.5px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}
.attack circle { fill: var(--attack); stroke: var(--attack-text); }
.attack text { fill: var(--attack-text); }
.defense circle { fill: var(--defense); stroke: #ffffff; }
.defense text { fill: var(--defense-text); }

.ball { fill: var(--ball); stroke: var(--ball-stroke); stroke-width: 0.06; }

.arrow-run { stroke: var(--run); stroke-width: 0.1; opacity: 0.75; fill: none; }
.arrow-pass { stroke: var(--pass); stroke-width: 0.1; stroke-dasharray: 0.35 0.25; fill: none; }

.controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
}

.controls button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.controls button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.controls svg { width: 22px; height: 22px; fill: currentColor; vertical-align: middle; }
.counter { margin-left: auto; color: var(--muted); font-size: 0.9rem; }

.step-text {
  min-height: 3em;
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
}

.options {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 4px solid var(--accent);
  background: var(--card);
}

.options h2 { margin: 0 0 6px; font-size: 0.95rem; }
.options ul { margin: 0; padding-left: 18px; }
