.presets { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.presets .preset { padding: 6px 10px; font-size: 0.85rem; }
.checkbox { flex-direction: row; align-items: center; color: var(--fg); gap: 6px; }
.checkbox input { width: auto; }

.timer-stage {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
}
@media (max-width: 600px) {
  .timer-stage { grid-template-columns: 1fr; justify-items: center; }
}

.timer-right { display: flex; flex-direction: column; gap: 14px; }
.display {
  font-family: "Menlo", ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(3.2rem, 11vw, 7rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(240, 180, 41, 0.35);
}
.display.warn { color: #fca5a5; text-shadow: 0 0 24px rgba(252, 165, 165, 0.45); animation: warnPulse 1s ease-in-out infinite; }
.display.done { color: var(--good); text-shadow: 0 0 28px rgba(26, 168, 82, 0.6); }
@keyframes warnPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* Hourglass. Shape and sand are drawn as SVG (see timer.html); the sand
   polygons are repositioned by timer.js as the clock drains. */
.sand-timer {
  width: 170px;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.5));
}
.hourglass-svg {
  display: block;
  width: 100%;
  height: auto;
}
#sandStream {
  opacity: 0;
}
.sand-timer.running #sandStream {
  animation: streamFlicker 0.12s steps(2, end) infinite;
}
@keyframes streamFlicker {
  0%   { opacity: 0.95; }
  50%  { opacity: 0.55; }
  100% { opacity: 0.95; }
}
