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

.rot-stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  justify-content: center;
  min-height: clamp(8rem, 20vw, 12rem);
}

.rot-meta {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-ink);
}

.rot-plan {
  margin: 0;
  max-width: 46ch;
  text-align: center;
  text-wrap: balance;
  color: var(--c-ink-muted);
}

/* --- The round clock ----------------------------------------------------- */

.rot-clock {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.clock-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--c-ink);
}

/* The last fifteen seconds are when people need to start wrapping up. */
.clock-time.is-low {
  color: var(--hue, var(--c-orange));
}

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

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

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

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

.pair-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: var(--space-4);
}

.rot-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--hue-tint);
  color: var(--c-ink);
  border-top: 4px solid var(--hue);
  animation: rot-in 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.rot-card:nth-child(2) {
  animation-delay: 50ms;
}
.rot-card:nth-child(3) {
  animation-delay: 100ms;
}
.rot-card:nth-child(4) {
  animation-delay: 150ms;
}
.rot-card:nth-child(n + 5) {
  animation-delay: 200ms;
}

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

.rot-label {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--hue);
}

.rot-people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.rot-people li {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
}

/* The person sitting out is stated plainly — they need to know, and so does
   everyone else, so nobody stands around looking for a partner. */
.rot-card.is-solo {
  background: transparent;
  border: 1px dashed var(--c-line);
  border-top: 4px solid var(--c-line);
}

.rot-card.is-solo .rot-label,
.rot-card.is-solo .rot-people li {
  color: var(--c-ink-muted);
}

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

.rot-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 --------------------------------------------------------------- */

.rot-setup {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-8);
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  border-top: 1px solid var(--c-line);
  padding-top: var(--space-6);
}

.rot-names {
  flex: 1 1 16rem;
  max-width: 22rem;
}

.rot-names textarea {
  font: inherit;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  width: 100%;
  resize: vertical;
  min-height: 8rem;
}

.name-chip {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  min-height: 36px;
  border-radius: 999px;
  background: var(--hue-tint);
  color: var(--c-ink);
  font-weight: 600;
}

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

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

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

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

.toy.is-fullscreen .rot-people li {
  font-size: var(--text-xl);
}

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

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