:root {
  --bg: #000;
  --fg: #fff;
  --dim: rgba(255,255,255,0.45);
  --line: rgba(255,255,255,0.12);
  --accent: hsl(200, 70%, 62%);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; background: var(--bg); color: var(--fg);
  font-family: system-ui, -apple-system, sans-serif; font-weight: 300;
  overscroll-behavior: none; user-select: none;
}
.screen { height: 100%; }
.hidden { display: none !important; }

#setup {
  display: flex; flex-direction: column; gap: 22px;
  padding: max(20px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom));
  justify-content: center;
}

.presets { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.preset {
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--dim);
  font: inherit; font-size: 14px;
}
.preset[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

.fields { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field .name { color: var(--dim); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; flex: 1; }
.field .value { font-size: 34px; font-weight: 200; min-width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
.field .value input { width: 96px; background: transparent; border: none; border-bottom: 1px solid var(--accent);
  color: var(--fg); font: inherit; font-size: 34px; text-align: right; }

.step {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
  font: inherit; font-size: 22px; line-height: 1;
}
.step:active { background: rgba(255,255,255,0.08); }

.more { align-self: center; background: none; border: none; color: var(--dim);
  font: inherit; font-size: 14px; text-decoration: underline; min-height: 44px; }

.duration { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.duration .label { color: var(--dim); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.duration-row { display: flex; align-items: center; gap: 14px; }
.duration .value { font-size: 34px; font-weight: 200; font-variant-numeric: tabular-nums; min-width: 110px; text-align: center; }
.duration-row.small .step { width: auto; padding: 0 14px; border-radius: 24px; font-size: 14px; }

.toggles { display: flex; align-items: center; gap: 12px; justify-content: center; }
.toggle { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--dim); font: inherit; font-size: 14px; }
.toggle[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
#volume { width: 110px; accent-color: var(--accent); }

.start { min-height: 64px; border-radius: 999px; border: 1px solid var(--accent);
  background: transparent; color: var(--accent); font: inherit; font-size: 20px; letter-spacing: .2em; }
.start:active { background: rgba(255,255,255,0.06); }

#session { position: fixed; inset: 0; background: #000; }
#canvas { width: 100%; height: 100%; display: block; }
