:root {
  --bg: #0a0a0a;
  --fg: #fafafa;
  --dim: #7a7a7a;
  --accent: #b4ff39;
  --danger: #ff5d5d;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  overflow: hidden;
}

#screen {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(16px, env(safe-area-inset-top)) 20px max(16px, env(safe-area-inset-bottom));
}

#brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.42em;
  padding-left: 0.42em; /* optically recenter the tracked-out text */
  color: var(--fg);
  padding-top: 8px;
}

#app {
  flex: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
}

.loading { color: var(--dim); }

.kicker {
  color: var(--dim);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}
.kicker strong { color: var(--fg); font-weight: 800; }

.target-label {
  color: var(--dim);
  font-size: 17px;
  font-weight: 600;
}

.big {
  font-size: clamp(64px, 24vw, 110px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.big.accent { color: var(--accent); }

.sub {
  font-size: 20px;
  font-weight: 700;
}
.sub.dim { color: var(--dim); font-weight: 600; font-size: 16px; }
.sub.accent { color: var(--accent); }
.sub.danger { color: var(--danger); }

.meta {
  color: var(--dim);
  font-size: 14px;
  font-weight: 600;
}

.btn {
  display: block;
  width: 100%;
  max-width: 340px;
  min-height: 64px;
  border: none;
  border-radius: 18px;
  font-family: inherit;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.btn:active { transform: scale(0.97); }

.btn.primary { background: var(--accent); color: #0a0a0a; }
.btn.secondary {
  background: transparent;
  color: var(--fg);
  border: 2px solid #333;
}
.btn.ghost {
  background: transparent;
  color: var(--dim);
  min-height: 44px;
  font-size: 14px;
}

.stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

/* Running screen: the whole surface is the stop target */
#stopzone {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--bg);
  z-index: 10;
  cursor: pointer;
}
#stopzone .hint {
  color: var(--dim);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
#stopzone .target-reminder {
  color: var(--dim);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

#toast {
  position: fixed;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--fg);
  color: var(--bg);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  z-index: 20;
  white-space: nowrap;
}

.pop { animation: pop 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
