:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #607086;
  --paper: #fff8ed;
  --card: rgba(255,255,255,.94);
  --line: #e5eaf3;
  --mint: #25a974;
  --blue: #38bdf8;
  --pink: #f472b6;
  --gold: #fbbf24;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(28, 47, 79, .16);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #ffdee9 0, transparent 30rem), radial-gradient(circle at top right, #c7f9ff 0, transparent 29rem), linear-gradient(135deg, #fff8ed, #eefbff 58%, #fff0fa);
}
main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 42px; }
.site-nav{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 24px;padding:12px 16px;background:rgba(255,255,255,.86);border:1px solid #e1e5ee;border-radius:24px;box-shadow:0 10px 24px rgba(22,31,54,.06);backdrop-filter:blur(12px)}
.site-brand{display:inline-flex;align-items:center;gap:10px;color:#172033;text-decoration:none;font-weight:800}.brand-mark{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:12px;background:#172033;color:#fff;font-weight:900}.site-nav a:not(.site-brand){color:#4b5565;text-decoration:none;font-weight:700;font-size:.95rem}.site-nav a:hover{text-decoration:underline}
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 460px); gap: 28px; align-items: center; padding: 14px 0 24px; }
.eyebrow { margin: 0 0 12px; color: #b45309; font-weight: 950; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; }
h1 { margin: 0 0 18px; font-size: clamp(2.25rem, 7vw, 5.2rem); line-height: .94; letter-spacing: -.075em; }
.lede { max-width: 59ch; color: var(--muted); font-size: clamp(1.06rem, 2vw, 1.28rem); line-height: 1.58; }
.mode-row, .preset-row, .custom-row, .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mode-row { margin-top: 24px; }
.preset-row { margin: 14px 0 18px; }
button, input { font: inherit; }
button { border: 0; cursor: pointer; }
.mode, .pill { border: 2px solid var(--line); background: rgba(255,255,255,.84); color: var(--ink); padding: 11px 14px; border-radius: 999px; font-weight: 900; box-shadow: 0 8px 18px rgba(31,41,55,.06); }
.mode.active { background: #fff1f8; border-color: var(--pink); }
.pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.custom-label { display: block; margin: 0 0 8px; font-weight: 950; }
input { width: 112px; border: 2px solid var(--line); border-radius: 14px; padding: 12px; font-weight: 900; color: var(--ink); background: #fff; }
.timer-card, .info-card, .related, .faq { background: var(--card); border: 1px solid rgba(227,232,242,.95); border-radius: 30px; box-shadow: var(--shadow); }
.timer-card { padding: clamp(20px, 4vw, 34px); text-align: center; }
.screen { border-radius: 28px; padding: clamp(20px, 5vw, 34px); background: linear-gradient(180deg, #152039, #26365f); color: #fff; box-shadow: inset 0 -12px 30px rgba(0,0,0,.14); position: relative; overflow: hidden; }
.screen::before { content: "♪"; position: absolute; top: 14px; right: 20px; font-size: 5rem; color: rgba(255,255,255,.08); font-weight: 950; }
.time { font-size: clamp(4rem, 16vw, 7.6rem); font-weight: 950; line-height: .9; letter-spacing: -.09em; position: relative; }
.bar { height: 17px; margin: 22px 0 16px; background: rgba(255,255,255,.16); border-radius: 999px; overflow: hidden; }
.bar span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--mint), var(--blue), var(--pink)); border-radius: inherit; transition: width .35s ease, background .35s ease; }
.quadrant { display: inline-flex; margin: 0 0 12px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-weight: 950; }
.timer-card h2 { margin: 8px 0; font-size: clamp(1.35rem, 3vw, 1.9rem); }
.timer-card p { color: rgba(255,255,255,.8); line-height: 1.5; max-width: 35ch; margin-left: auto; margin-right: auto; }
.lyric-box { margin-top: 16px; min-height: 82px; display: grid; place-items: center; padding: 16px; border-radius: 20px; background: rgba(255,255,255,.11); border: 1px dashed rgba(255,255,255,.4); font-weight: 950; font-size: clamp(1.05rem, 2.8vw, 1.35rem); line-height: 1.42; }
.actions { justify-content: center; margin-top: 18px; }
.primary, .secondary { border-radius: 16px; padding: 13px 18px; font-weight: 950; }
.primary { min-width: 220px; background: var(--mint); color: #fff; box-shadow: 0 12px 24px rgba(34,160,107,.26); }
.secondary { background: #edf7ff; color: #17427b; }
.small { padding: 11px 13px; }
.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 18px 0; }
.info-card, .related, .faq { padding: clamp(20px, 3vw, 28px); }
.wide { grid-column: 1 / -1; }
h2 { letter-spacing: -.03em; }
li, .info-card p, details p { color: var(--muted); line-height: 1.6; }
li { margin: 9px 0; }
.related { margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.related-grid a { display: grid; place-items: center; min-height: 76px; padding: 14px; text-align: center; text-decoration: none; color: var(--ink); font-weight: 950; border: 1px solid #dbe7ff; border-radius: 18px; background: #f5fbff; }
.faq { margin-bottom: 24px; }
details { border-top: 1px solid var(--line); padding: 15px 0; }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 950; }
body.running .bar span { background: linear-gradient(90deg, var(--blue), var(--pink)); }
body.final .bar span { background: linear-gradient(90deg, var(--red), var(--gold)); }
body.done .bar span { background: linear-gradient(90deg, var(--mint), #86efac); }
@media (max-width: 850px) {
  .hero, .content-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  main { width: min(100% - 20px, 1120px); padding-top: 14px; }
  .site-nav{padding:10px 12px;border-radius:20px}.brand-mark{width:30px;height:30px}.site-brand span:last-child{max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mode, .pill { flex: 1 1 calc(50% - 8px); }
  .actions .primary, .actions .secondary { width: 100%; }
  .related-grid { grid-template-columns: 1fr; }
}
