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

.stu-stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  justify-content: center;
  min-height: clamp(10rem, 26vw, 15rem);
}

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

.stu-meta {
  margin: 0;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--c-ink-muted);
  font-variant-numeric: tabular-nums;
}

/* Whose turn it is matters more than the exact seconds left, so the name leads. */
.stu-name {
  margin: 0;
  font-size: clamp(2.5rem, 10vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
  color: var(--hue);
}

.stu-time {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
  font-size: clamp(2rem, 7vw, 4rem);
  color: var(--c-ink);
}

.stu-time.is-low {
  color: var(--c-abort);
}

.stu-bar {
  width: 100%;
  max-width: 40rem;
  height: 8px;
  margin-top: var(--space-3);
  border-radius: 999px;
  background: var(--hue-tint);
  overflow: hidden;
}

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

.stu-next {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
  justify-content: center;
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  background: var(--c-line);
  color: var(--c-ink-muted);
  font-size: var(--text-sm);
}

.next-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.72rem;
}

.next-name {
  font-weight: 700;
  color: var(--c-ink);
  font-size: var(--text-base);
}

.stu-plan {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--c-ink-muted);
  text-align: center;
}

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

.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;
}

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

.stu-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  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);
}

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

.stu-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);
}

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

.stu-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;
}

.stu-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.radio {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 36px;
  font-size: var(--text-sm);
  color: var(--c-ink);
  cursor: pointer;
}

.radio input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--c-confirm);
}

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

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

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

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

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

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