:root {
  --bg: #14161a;
  --surface: #1f2228;
  --text: #e8e6e3;
  --muted: #8a8f98;
  --accent: #e3b873;
  --on-accent: #14161a;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f3ee;
    --surface: #ebe6de;
    --text: #1d1f23;
    --muted: #6b6f76;
    --accent: #9a6b1f;
    --on-accent: #f6f3ee;
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

main {
  min-height: 100dvh;
  max-width: 420px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}

button {
  font: inherit;
  color: inherit;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
}

.presets {
  display: flex;
  gap: 12px;
}

.presets button {
  width: 64px;
  height: 44px;
  border-radius: 22px;
  background: var(--surface);
  font-size: 18px;
}

.presets button[aria-pressed="true"] {
  outline: 2px solid var(--accent);
}

.dial {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent;
  font-size: 28px;
  color: var(--muted);
}

#clock {
  min-width: 5ch;
  text-align: center;
  font-size: clamp(56px, 18vw, 88px);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
}

.start {
  width: 100%;
  max-width: 240px;
  height: 56px;
  border-radius: 28px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 20px;
  font-weight: 600;
}

.hint {
  min-height: 2.6em;
  margin: -12px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.total {
  margin: 0;
  font-size: 16px;
}

.sound {
  background: transparent;
  font-size: 14px;
  color: var(--muted);
  padding: 8px 12px;
}

.about {
  margin: 0;
  max-width: 34ch;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.about a {
  color: inherit;
}

/* During a session only the clock, Stop and the sound switch stay. */
.running .presets,
.running .step,
.running .about {
  visibility: hidden;
}

.running .start {
  background: var(--surface);
  color: var(--text);
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
