:root {
  --bg: #0d0f14;
  --surface: #161a22;
  --border: #2a3142;
  --text: #e6e9f0;
  --muted: #8b92a6;
  --accent: #7dd3c0;
  --accent-dim: #5fb8a8;
  --danger: #e07d7d;
  --font-sans: 'Unbounded', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.5;
}

.layout {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.header h1 {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--accent);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.main {
  flex: 1;
}

.start-section {
  text-align: center;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.start-section p {
  margin: 0 0 24px 0;
  color: var(--muted);
}

.game-section,
.result-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.game-section.hidden,
.result-section.hidden,
.start-section.hidden {
  display: none;
}

.scene-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  margin: 0 0 16px 0;
  color: var(--accent);
}

.scene-description {
  margin-bottom: 24px;
  white-space: pre-wrap;
  color: var(--text);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-align: left;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-dim);
}

.btn-option {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-option:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(125, 211, 192, 0.08);
}

.error {
  margin: 16px 0 0 0;
  color: var(--danger);
  font-size: 0.9rem;
}

.result-section h2 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  margin: 0 0 16px 0;
  color: var(--accent);
}

.end-type {
  font-weight: 600;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

.radar-wrap {
  margin: 0 auto 24px;
  width: min(100%, 420px);
  aspect-ratio: 1;
}

#radar {
  width: 100%;
  height: auto;
  display: block;
}

.scores-list {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.scores-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 0.9rem;
}

.scores-list .label {
  color: var(--muted);
}

.scores-list .value {
  font-weight: 600;
  color: var(--accent);
}

.footer {
  margin-top: 24px;
  text-align: center;
}

.steps-info {
  color: var(--muted);
  font-size: 0.85rem;
}
