:root {
  --bg: #14231b;
  --bg-card: #1d3227;
  --bg-card-2: #223a2c;
  --line: #35513f;
  --text: #ece4d3;
  --text-dim: #93a795;
  --accent: #c9a227;
  --accent-soft: #8a7018;
  --moss: #7a9b76;
  --correct: #6fae68;
  --wrong: #c2564a;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 10%, rgba(201,162,39,0.06), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(122,155,118,0.08), transparent 45%);
  color: var(--text);
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 32px 16px 64px;
}

.notebook {
  width: 100%;
  max-width: 620px;
}

/* Masthead */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.eyebrow {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.masthead h1 {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 34px;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.01em;
}

.masthead-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
}

.masthead-right strong {
  color: var(--accent);
  font-size: 15px;
}

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  gap: 12px;
}

.tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bg);
  background: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.location {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  text-align: right;
}

/* Player */
.player {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 24px;
}

.play-btn {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.play-btn:hover { background: #ddb238; transform: scale(1.04); }
.play-btn:active { transform: scale(0.97); }

.waveform {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
}

.waveform .bar {
  width: 3px;
  border-radius: 2px;
  background: var(--moss);
  height: 20%;
  transition: background 0.2s ease;
}

.waveform.playing .bar {
  animation: bounce 900ms ease-in-out infinite;
  background: var(--accent);
}

@keyframes bounce {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* Options */
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

@media (max-width: 480px) {
  .options { grid-template-columns: 1fr; }
}

.opt-btn {
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-card-2);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.opt-btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: #28402f;
}

.opt-btn:active:not(:disabled) { transform: scale(0.98); }

.opt-btn:disabled { cursor: default; }

.opt-btn.correct {
  border-color: var(--correct);
  background: rgba(111,174,104,0.18);
  color: var(--correct);
}

.opt-btn.wrong {
  border-color: var(--wrong);
  background: rgba(194,86,74,0.18);
  color: var(--wrong);
}

/* Feedback */
.feedback {
  min-height: 24px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.feedback.correct { color: var(--correct); }
.feedback.wrong { color: var(--wrong); }

.attribution {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 20px;
  line-height: 1.5;
}

.attribution a { color: var(--moss); }

/* Next button */
.next-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, background 0.15s ease, color 0.15s ease;
}

.next-btn.visible { opacity: 1; pointer-events: auto; }
.next-btn:hover { background: var(--accent); color: var(--bg); }

/* Colophon */
.colophon {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 24px;
  line-height: 1.6;
}

.colophon a { color: var(--moss); }

@media (prefers-reduced-motion: reduce) {
  .waveform.playing .bar { animation: none; }
  * { transition: none !important; }
}
