:root {
  --bg: #000;
  --text: #f5f5f7;
  --muted: #86868b;
  --fill: #1c1c1e;
  --fill-on: #2c2c2e;
  --start: #fff;
  --start-text: #000;
  --safe: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
}

.screen {
  min-height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  position: relative;
}

.view {
  display: none;
  flex-direction: column;
  min-height: 100dvh;
  padding: 72px 32px calc(40px + var(--safe));
}

.view.is-on { display: flex; }

.day {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.close {
  margin-top: 28px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.title {
  margin-top: 28px;
  font-size: clamp(40px, 11vw, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.meta {
  margin-top: 10px;
  font-size: 19px;
  font-weight: 400;
  color: var(--muted);
}

.need {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 400;
  color: var(--muted);
}

.theme {
  margin-top: 48px;
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.how {
  margin-top: 14px;
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.bottom {
  margin-top: auto;
  padding-top: 48px;
}

.seg {
  display: flex;
  background: var(--fill);
  border-radius: 10px;
  padding: 2px;
}

.seg-btn {
  flex: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
}

.seg-btn.is-on {
  background: var(--fill-on);
  color: var(--text);
}

.start {
  display: block;
  width: 100%;
  margin-top: 16px;
  appearance: none;
  border: 0;
  background: var(--start);
  color: var(--start-text);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  height: 56px;
  border-radius: 980px;
  cursor: pointer;
}

.end {
  display: block;
  width: 100%;
  appearance: none;
  border: 0;
  background: var(--fill);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  height: 56px;
  border-radius: 980px;
  cursor: pointer;
}

.count {
  margin: auto;
  font-size: 96px;
  font-weight: 600;
  letter-spacing: -0.04em;
  text-align: center;
}

.clock {
  margin-top: 28px;
  font-size: clamp(56px, 16vw, 80px);
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

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

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
