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

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

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

.ivl-label {
  margin: 0;
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--c-ink-muted);
}

.ivl-time {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-size: clamp(4rem, 18vw, 13rem);
  color: var(--hue, var(--c-amber));
}

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

.ivl-meta {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--c-ink);
}

/* The break reads as a different state entirely, not as a smaller number: from
   the back of a room, "am I working or switching?" must be answerable at a glance. */
.ivl-face.is-rest .ivl-time {
  color: var(--c-ink-muted);
  font-size: clamp(3rem, 12vw, 8rem);
}

.ivl-face.is-rest .ivl-label {
  color: var(--c-confirm);
}

.ivl-face.is-rest .ivl-bar-fill {
  background: var(--c-confirm);
}

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

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

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

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

.ivl-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
  animation: ivl-done-in 420ms cubic-bezier(0.16, 1.2, 0.3, 1) both;
}

@keyframes ivl-done-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

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

.ivl-setup input {
  max-width: 8rem;
}

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

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

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

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

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

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