:root {
  --bg: #f4f6f9;
  --fg: #0c1218;
  --muted: #5b6673;
  --ok: #167a3e;
  --warn: #b45309;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f14;
    --fg: #eef3f8;
    --muted: #8a96a3;
    --ok: #4ade80;
    --warn: #fbbf24;
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

main {
  min-height: 100%;
  padding: 4vh 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(18px, 3.2vw, 36px);
  font-weight: 500;
  color: var(--muted);
}

.time {
  margin: 2vh 0;
  /* запасной размер до подгонки скриптом (fitTime в app.js): «ЧЧ:ММ:СС» ≈ 3,6–4,3em в зависимости от шрифта */
  font-size: min(21vw, 42vh);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.status {
  margin: 0;
  min-height: 1.4em;
  font-size: clamp(16px, 2.6vw, 28px);
  color: var(--muted);
}

.status[data-state="exact"] { color: var(--ok); }
.status[data-state="fast"],
.status[data-state="slow"],
.status[data-state="error"] { color: var(--warn); }
