:root {
  color-scheme: dark;
  --bg: #0f1115;
  --card: #171a21;
  --border: #2a2e37;
  --text: #e6e8ec;
  --muted: #9aa1ac;
  --accent: #6ea8fe;
  --good: #4ade80;
  --bad: #ff6b6b;
}

* { box-sizing: border-box; }

.hide { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", sans-serif;
  padding: 24px;
}

.wrap { width: 100%; max-width: 640px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

h1 { margin: 0 0 4px; font-size: 1.5rem; }
p.sub { color: var(--muted); margin: 0 0 24px; font-size: 0.9rem; }

.pack-select {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.pack-btn {
  flex: 1;
  padding: 12px;
  background: #0f1115;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all .15s;
}
.pack-btn.active {
  border-color: var(--accent);
  background: rgba(110,168,254,0.12);
  color: var(--accent);
}

.stats-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}
.stats-row span b { color: var(--text); }

.prompt-box {
  text-align: center;
  padding: 48px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f1115;
  margin-bottom: 20px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

.prompt-desc {
  font-size: 1.4rem;
  font-weight: 700;
}

.feedback {
  font-size: 1rem;
  font-weight: 600;
  min-height: 1.4em;
}
.feedback.correct { color: var(--good); }
.feedback.wrong { color: var(--bad); }

.keys-pressed {
  display: flex;
  gap: 6px;
  min-height: 32px;
}
kbd {
  background: #262a35;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-family: inherit;
}

.results {
  text-align: center;
}
.results .big { font-size: 2.2rem; font-weight: 800; margin: 8px 0; }

button.primary {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #0f1115;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
button.primary:hover { opacity: 0.9; }

.note {
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 16px;
  line-height: 1.6;
}
