:root {
  --bg: #f4efe6; --ink: #1d2b27; --muted: #6b766f; --card: #fffaf0;
  --accent: #1f6f5c; --accent-ink: #fff; --track: #e3dccd;
}
body[data-mode="break"] { --bg: #e8f1ef; --accent: #c4673a; --track: #d3e2de; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #14201c; --ink: #eee8da; --muted: #9aa69f; --card: #1c2b26; --accent: #4fb89c; --accent-ink: #0d1a16; --track: #2a3b35; }
  body[data-mode="break"] { --bg: #1d1a16; --accent: #e08a5c; --track: #3a322a; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  transition: background .3s;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.app { max-width: 28rem; margin: 0 auto; min-height: 100dvh; padding: 20px 16px 28px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.title { margin: 8px 0 0; font-size: 1.1rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; width: 100%; padding: 6px; background: var(--card); border-radius: 18px; }
.mode { min-height: 52px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.mode[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.dial { position: relative; width: min(78vw, 20rem); aspect-ratio: 1; margin: 4px 0; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial circle { fill: none; stroke-width: 9; }
.track { stroke: var(--track); }
.bar { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .4s linear, stroke .3s; }
.dial-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; }
.time { font-size: clamp(3rem, 17vw, 4.5rem); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.label { color: var(--muted); font-size: .95rem; }
.controls { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; width: 100%; }
.btn { min-height: 60px; border: 2px solid var(--accent); border-radius: 18px; background: transparent; color: var(--accent); font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn:active, .mode:active { transform: scale(.97); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.today { margin: auto 0 0; color: var(--muted); }
.today strong { color: var(--ink); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-height: 640px) { .dial { width: min(60vw, 14rem); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
