.nine {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  align-items: center;
  width: 100%;
}

.nine-stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}

.nine-intro {
  margin: 0;
  max-width: 48ch;
  text-align: center;
  text-wrap: balance;
  color: var(--c-ink-muted);
  font-size: var(--text-lg);
}

/* --- The two rounds ------------------------------------------------------- */

.nine-rounds {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

.nine-round {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-ink-muted);
}

.step-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: 2px solid var(--hue);
  background: transparent;
}

.nine-round.is-done .step-dot,
.nine-round.is-current .step-dot {
  background: var(--hue);
}

.nine-round.is-current {
  color: var(--c-ink);
  font-weight: 700;
}

/* --- The round panel ------------------------------------------------------ */

.nine-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: clamp(var(--space-6), 4vw, var(--space-12)) var(--space-6);
  border-radius: var(--radius);
  background: var(--hue-tint);
  border-top: 6px solid var(--hue);
  animation: nine-in 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes nine-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nine-panel {
    animation: none;
  }
}

.nine-meta {
  margin: 0;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--hue);
}

.nine-question {
  margin: 0;
  text-align: center;
  text-wrap: balance;
  font-size: clamp(1.8rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--c-ink);
}

.nine-why {
  margin: var(--space-2) 0 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--hue);
}

/* --- The ladder ----------------------------------------------------------- */

.nine-pips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

.nine-pip {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--hue);
  background: var(--c-paper);
  color: var(--c-ink-muted);
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.nine-pip.is-done {
  background: var(--hue);
  color: var(--c-ink-inverse);
  opacity: 0.55;
}

.nine-pip.is-current {
  background: var(--hue);
  color: var(--c-ink-inverse);
  transform: scale(1.12);
}

.nine-bottom {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-ink-muted);
}

/* --- Clock ---------------------------------------------------------------- */

.nine-clock {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.clock-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--c-ink);
  letter-spacing: -0.01em;
}

.clock-time.is-up {
  color: var(--c-abort);
}

.nine-bar {
  width: 100%;
  max-width: 32rem;
  height: 6px;
  border-radius: 999px;
  background: var(--c-paper);
  overflow: hidden;
}

.nine-bar-fill {
  height: 100%;
  background: var(--hue);
  transform-origin: left center;
  transition: transform 250ms linear;
}

/* --- Finished ------------------------------------------------------------- */

.nine-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-8) 0;
  text-align: center;
}

.done-title {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-confirm);
}

.done-body {
  margin: 0;
  color: var(--c-ink-muted);
  text-wrap: balance;
}

/* --- Setup ---------------------------------------------------------------- */

.nine-setup {
  border-top: 1px solid var(--c-line);
  padding-top: var(--space-6);
  width: 100%;
  max-width: 14rem;
  align-items: center;
}

.nine-hint {
  margin: 0;
  color: var(--c-ink-muted);
  font-size: var(--text-sm);
  text-align: center;
  text-wrap: balance;
}

.nine-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

/* --- Fullscreen ----------------------------------------------------------- */

.toy.is-fullscreen .nine {
  justify-content: center;
  height: 100%;
}

.toy.is-fullscreen .nine-setup {
  opacity: 0;
  transition: opacity 200ms ease;
}

.toy.is-fullscreen .nine-setup:focus-within,
.toy.is-fullscreen:hover .nine-setup {
  opacity: 1;
}
