:root {
  color: #171715;
  background: #f1efe9;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 15% 10%, rgba(250, 204, 122, 0.28), transparent 32rem),
    #f1efe9;
}

button {
  font: inherit;
}

.shell {
  width: min(100%, 36rem);
  margin: 0 auto;
  padding: max(1.25rem, env(safe-area-inset-top)) 1rem max(1.25rem, env(safe-area-inset-bottom));
}

.card {
  background: rgba(255, 255, 252, 0.94);
  border: 1px solid rgba(23, 23, 21, 0.09);
  border-radius: 1.5rem;
  box-shadow: 0 1.2rem 3rem rgba(45, 39, 27, 0.11);
  padding: clamp(1.35rem, 5vw, 2.4rem);
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: #8b5b20;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.lede {
  color: #555048;
  font-size: 1.04rem;
  line-height: 1.65;
}

.checklist {
  margin: 1.4rem 0 1.7rem;
  padding-left: 1.25rem;
  color: #49453f;
  line-height: 1.65;
}

.actions.stacked {
  display: grid;
  gap: 0.75rem;
}

.button {
  min-height: 3.5rem;
  border: 0;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 750;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
  touch-action: manipulation;
}

.button:active:not(:disabled) {
  transform: scale(0.985);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.primary {
  color: white;
  background: #1f5d4f;
}

.secondary {
  color: #1f5d4f;
  background: #e4eee9;
}

.status,
.error {
  min-height: 1.4rem;
  margin: 0.8rem 0 0;
  font-size: 0.9rem;
}

.status {
  color: #5f5a52;
}

.error {
  color: #a63124;
}

.progress-row {
  display: grid;
  gap: 0.6rem;
  color: #5b564f;
  font-size: 0.84rem;
  font-weight: 750;
}

.progress-track {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e5de;
}

#progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #d8872d;
  transition: width 180ms ease;
}

.listening-stage {
  padding: 2rem 0 1.4rem;
  text-align: center;
}

.phase-label {
  min-height: 1.6rem;
  margin: 0 0 1.2rem;
  color: #45413b;
  font-weight: 700;
}

.sound-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.sound-step {
  display: grid;
  place-items: center;
  min-height: 6.3rem;
  border: 1px solid #e1ddd4;
  border-radius: 1.15rem;
  color: #787169;
  background: #f7f5f0;
  font-weight: 750;
}

.sound-step span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  color: #746951;
  background: #e9e3d7;
}

.sound-step.active {
  border-color: #d8872d;
  color: #6d4215;
  background: #fff2dd;
}

.sound-step.done {
  border-color: #74a093;
  color: #1f5d4f;
  background: #e9f2ee;
}

.play {
  width: 100%;
}

.choice-area {
  border-top: 1px solid #e4e0d7;
  padding-top: 1.25rem;
  text-align: center;
}

.choice-area p {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 800;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.choice {
  min-height: 5rem;
  color: #1f5d4f;
  border: 2px solid #8db3a8;
  background: #f1f8f5;
}

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

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
