:root {
  color-scheme: light;
  --ink: #2b2550;
  --muted: #625c7b;
  --paper: #fffaf5;
  --lilac: #dcd2ff;
  --mint: #bfeedd;
  --gold: #ffd98a;
  --display: 'Baloo 2', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper) radial-gradient(ellipse at 85% 12%, #eee6ff, transparent 48%) no-repeat; font: 600 15px/1.6 var(--body); }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px dashed #7b43ac; outline-offset: 4px; }
.wrap { width: min(1060px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; z-index: 3; left: 16px; top: -90px; padding: 12px; background: var(--ink); color: white; }
.skip-link:focus { top: 10px; }
.topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding: 22px 0; border-bottom: 1.5px solid #ded7e8; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 800 24px var(--display); text-decoration: none; }
.brand img { object-fit: contain; }
.brand span { padding-left: 9px; border-left: 1.5px solid #c9c1db; font-size: 16px; font-weight: 600; }
.back-link { font-size: 13px; text-underline-offset: 4px; }
.hero { padding: 40px 0 30px; }
.kicker, .eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.kicker { margin: 0 0 10px; color: #8251a2; }
h1, h2 { margin: 0; font-family: var(--display); line-height: 1.15; }
h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 800; letter-spacing: -.025em; }
h1 span { color: #7754ae; }
h2 { font-size: 24px; }
.lead { margin: 16px 0 0; color: var(--muted); line-height: 1.75; }
.timer-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.timer-panel, .settings-panel { min-width: 0; padding: 28px; border: 2.5px solid var(--ink); border-radius: 22px; background: white; box-shadow: 0 5px 0 var(--ink); }
.timer-panel { background: #eee8ff; transition: background .2s; }
.timer-panel[data-state="finished"] { background: #e4f6ed; }
.panel-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.panel-top h2 { font: 800 12px var(--body); }
.state-label { padding: 4px 11px; border: 1px solid #bca9d6; border-radius: 20px; background: #fffaf5; font-size: 11px; }
[data-state="running"] .state-label { border-color: #8db4a0; background: var(--mint); }
[data-state="finished"] .state-label { border-color: #bba06a; background: var(--gold); }
.timer-face { padding: 36px 0 12px; text-align: center; }
.eyebrow { margin: 0 0 13px; color: var(--muted); font-size: 10px; }
.clock { margin: 0; font: 500 clamp(62px, 8vw, 104px)/1.2 var(--mono); letter-spacing: -.06em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock.has-hours { font-size: clamp(35px, 5vw, 68px); }
.clock-units { margin: 9px 0 22px; color: var(--muted); font-size: 12px; letter-spacing: .12em; }
.selected-duration { display: inline-block; margin: 0; padding: 5px 12px; border: 1px dashed #bda7df; border-radius: 8px; font-size: 12px; }
.timer-status { min-height: 48px; margin: 13px 0 16px; text-align: center; font-size: 14px; }
.timer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 16px; border: 2px solid var(--ink); border-radius: 11px; background: white; box-shadow: 0 3px 0 var(--ink); font: 700 16px var(--display); transition: transform .15s, box-shadow .15s; }
.btn.primary { background: var(--gold); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: none; }
.sound-option { display: flex; align-items: center; gap: 9px; width: fit-content; margin: 26px 0 0; min-height: 44px; font-size: 13px; cursor: pointer; }
.sound-option input { width: 18px; height: 18px; margin: 0; accent-color: #7754ae; }
.timer-note, .hint { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.timer-note { font-size: 11px; }
.muted { margin: 10px 0 20px; color: var(--muted); font-size: 13px; }
.presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.presets button { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 74px; padding: 9px 4px; border: 1.5px solid #c9bcdb; border-radius: 12px; background: #fffdfa; font: 700 25px/1.1 var(--display); }
.presets button span { margin-top: 5px; font: 600 11px var(--body); }
.presets button:hover { border-color: #7754ae; background: #f5f0ff; }
.presets button[aria-pressed="true"] { border: 2px solid var(--ink); background: var(--lilac); box-shadow: 0 3px 0 var(--ink); }
.custom-duration { margin-top: 26px; padding-top: 24px; border-top: 1px dashed #d1c5df; }
.custom-duration h2 { margin-bottom: 18px; font-size: 22px; }
.duration-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 800; }
.field input { width: 100%; min-width: 0; min-height: 50px; padding: 10px; border: 1.5px solid #bdb3ce; border-radius: 10px; background: #fffdfa; font: 500 21px var(--mono); text-align: center; }
.field input:hover { border-color: #7754ae; }
.apply { width: 100%; margin-top: 18px; background: var(--mint); font-size: 14px; }
.notice { margin: 14px 0; padding: 12px 14px; border: 1px solid #a93c4d; border-radius: 10px; background: #fff0f2; color: #8d2438; font-size: 13px; overflow-wrap: anywhere; }
.change-note { margin-top: 18px; font-size: 11px; }
.local-note { margin: 24px 0 40px; color: var(--muted); font-size: 11px; text-align: center; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 24px 0 30px; border-top: 1.5px solid #ded7e8; color: var(--muted); font-size: 11px; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .timer-panel, .settings-panel { padding: 22px; }
  .timer-layout { gap: 18px; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 32px); }
  .topbar { gap: 10px; padding: 16px 0; }
  .brand { font-size: 21px; }
  .brand img { width: 30px; height: 36px; }
  .brand span { font-size: 13px; }
  .back-link { font-size: 11px; }
  .hero { padding: 30px 0 26px; }
  .lead { font-size: 14px; }
  .desktop-break { display: none; }
  .timer-layout { grid-template-columns: 1fr; gap: 22px; }
  .timer-panel, .settings-panel { padding: 22px 20px; }
  .timer-face { padding-top: 28px; }
  .clock { font-size: clamp(64px, 18vw, 104px); }
  .clock.has-hours { font-size: clamp(36px, 10.5vw, 68px); }
  .timer-status { min-height: 24px; margin-bottom: 22px; }
  .local-note { margin-bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
