:root {
  --bg: #0b0d10;
  --fg: #e7e9ec;
  --muted: #8a9099;
  --line: #262b33;
  --accent: #4f8cff;
  --warn: #ff9f43;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  font: 16px/1.5 -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
h1 { font-size: 22px; margin: 24px 0 4px; }
.sub { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
label { display: block; margin: 12px 0; font-size: 14px; color: var(--muted); }
select, button {
  display: block; width: 100%; margin-top: 6px; padding: 12px;
  font-size: 16px; border-radius: 10px; border: 1px solid var(--line);
  background: #151920; color: var(--fg);
}
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; margin-top: 20px; }
.guide { color: var(--muted); font-size: 13px; padding-left: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; width: 40%; }

#run { display: none; }
body.running #setup { display: none; }
body.running #run { display: block; }
body.running { background: #000; }

#dim { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: .35; cursor: pointer; }
#elapsed { font-size: 56px; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.counts { display: flex; gap: 16px; font-size: 14px; color: var(--muted); flex-wrap: wrap; justify-content: center; }
.counts b { color: var(--fg); }
.meter { position: relative; width: 80%; height: 4px; background: var(--line); margin: 20px 0 8px; border-radius: 2px; }
#lvl { height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .2s; }
#bgl { position: absolute; top: -4px; width: 2px; height: 12px; background: var(--warn); }
.hint { font-size: 12px; color: var(--muted); }

#detail { display: none; font-size: 13px; }
body.detail #detail { display: block; }
body.detail #dim { min-height: 30vh; opacity: .8; }
#events { padding-left: 18px; }
#events small { color: var(--muted); }
#log { white-space: pre-wrap; color: var(--muted); font-size: 12px; max-height: 40vh; overflow: auto; }
#stop { margin: 16px 0 24px; opacity: .5; }
