:root {
  --bg: #0e1116;
  --card: #171b22;
  --line: #262c36;
  --text: #e8ecf1;
  --muted: #8a94a3;
  --accent: #7cc4d8;
  --hold: #d8b37c;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

.screen {
  max-width: 420px;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.screen[hidden] { display: none; }

h1 { margin: 16px 0 4px; font-size: 32px; font-weight: 600; letter-spacing: -0.02em; }
.sub { margin: 0; color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.card-head, .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.label { font-weight: 500; }

#holds { list-style: none; margin: 12px 0 0; padding: 0; }
#holds li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.stepper { display: flex; align-items: center; gap: 12px; }
.stepper output {
  min-width: 52px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  color: var(--text);
}
.stepper button {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}
.stepper button:active { background: var(--line); }

button { font: inherit; cursor: pointer; }
.link { background: none; border: 0; color: var(--accent); padding: 0; font-size: 14px; }

.primary, .secondary {
  height: 52px;
  border-radius: 14px;
  border: 0;
  font-weight: 600;
  font-size: 17px;
}
.primary { background: var(--accent); color: #0b1a20; margin-top: auto; }
.primary:disabled { opacity: 0.5; }
.secondary { background: var(--card); color: var(--text); border: 1px solid var(--line); flex: 1; }

#session { justify-content: center; align-items: center; text-align: center; }
#round-label { font-size: 15px; }

.ring-wrap { position: relative; width: min(78vw, 320px); aspect-ratio: 1; margin: 24px 0; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .track { stroke: var(--line); }
.ring .fill {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 565.49;
  stroke-dashoffset: 565.49;
  transition: stroke 0.4s;
}
body.holding .ring .fill { stroke: var(--hold); }

.ring-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#phase { margin: 0; color: var(--muted); font-size: 16px; letter-spacing: 0.04em; text-transform: uppercase; }
#clock { margin: 4px 0 0; font-size: 56px; font-weight: 300; font-variant-numeric: tabular-nums; }

.controls { display: flex; gap: 12px; width: 100%; }

.credit { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.credit a { color: var(--accent); text-decoration: none; }
