:root {
  --bg: #070b16;
  --bg-2: #0d1426;
  --line: #24304d;
  --line-soft: #172038;
  --text: #e8ecf6;
  --muted: #8490ad;
  --sat: #ffd9a0;
  --sat-low: #5f7099;
  --sat-eye: #ffffff;
  --accent: #9fc2ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-2), var(--bg) 60%) fixed var(--bg);
  color: var(--text);
  font: 16px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.mark { color: var(--text); font-weight: 600; }
.clock { font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }

.hero { text-align: center; padding: 36px 0 20px; }
.count {
  font-size: clamp(88px, 28vw, 152px);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--sat);
  text-shadow: 0 0 60px rgb(255 217 160 / 0.25);
}
.lede { margin: 10px 0 0; font-size: 18px; }
.status { margin: 6px 0 0; min-height: 1.5em; color: var(--muted); font-size: 14px; }

.progress {
  width: 180px; height: 2px; margin: 12px auto 0;
  background: var(--line-soft); border-radius: 2px; overflow: hidden;
}
.progress i { display: block; height: 100%; width: 0; background: var(--accent); }

.sky { position: relative; margin-top: 8px; }
#chart { display: block; width: 100%; aspect-ratio: 1; touch-action: manipulation; }
.caption { margin: 8px 0 0; text-align: center; color: var(--muted); font-size: 12.5px; }
.tip {
  position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 10px));
  padding: 4px 8px; border-radius: 6px; white-space: nowrap;
  background: #1a2542; border: 1px solid var(--line);
  font-size: 12.5px; font-variant-numeric: tabular-nums;
}

.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  margin: 28px 0 0; border: 1px solid var(--line-soft); border-radius: 12px;
  background: var(--line-soft); overflow: hidden;
}
.stats div { background: var(--bg); padding: 14px 12px; min-width: 0; }
.stats dt { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.stats dd {
  margin: 4px 0 0; font-size: 20px; font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.stats dd small { display: block; color: var(--muted); font-size: 12.5px; }

.where { margin-top: 28px; text-align: center; }
.where p { margin: 0 0 12px; }
.actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

button {
  font: inherit; font-size: 14px; color: var(--bg); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: 8px 16px; cursor: pointer;
}
button.quiet { color: var(--text); background: transparent; border-color: var(--line); }
button:hover { filter: brightness(1.1); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: 0.6; cursor: default; }

#manual {
  display: flex; gap: 10px; justify-content: center; align-items: end; flex-wrap: wrap;
  margin-top: 14px;
}
#manual[hidden] { display: none; }
#manual label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; text-align: left; }
input {
  width: 116px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
}

footer { margin-top: 36px; color: var(--muted); font-size: 12.5px; text-align: center; }
footer p { margin: 0 0 6px; }
