:root {
  color-scheme: light;
  --ink: #1f2937;
  --muted: #64748b;
  --paper: #fffaf0;
  --card: rgba(255,255,255,.95);
  --line: #eadfcb;
  --gold: #f59e0b;
  --blue: #3b82f6;
  --green: #22c55e;
  --rose: #fb7185;
  --purple: #8b5cf6;
  --shadow: 0 24px 70px rgba(91, 62, 24, .14);
}
* { 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:
    linear-gradient(90deg, rgba(59,130,246,.07) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(rgba(245,158,11,.08) 1px, transparent 1px) 0 0 / 34px 34px,
    radial-gradient(circle at top left, #fde68a 0, transparent 26rem),
    radial-gradient(circle at top right, #dbeafe 0, transparent 30rem),
    linear-gradient(135deg, #fff7ed, #f8fafc 58%, #eff6ff);
}
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,.88);border:1px solid #ece2d0;border-radius:24px;box-shadow:0 10px 24px rgba(31,41,55,.06);backdrop-filter:blur(12px)}
.site-brand{display:inline-flex;align-items:center;gap:10px;color:#172033;text-decoration:none;font-weight:900}.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:800;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: 60ch; 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,.88); color: var(--ink); padding: 11px 14px; border-radius: 999px; font-weight: 950; box-shadow: 0 8px 18px rgba(31,41,55,.06); }
.mode.active { background: #fffbeb; border-color: var(--gold); }
.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: 950; color: var(--ink); background: #fff; }
.timer-card, .info-card, .related, .faq { background: var(--card); border: 1px solid rgba(234,223,203,.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, #26324a, #1e3a5f); color: #fff; box-shadow: inset 0 -12px 30px rgba(0,0,0,.16); position: relative; overflow: hidden; }
.screen::before { content: "✎"; position: absolute; top: -4px; right: 18px; font-size: 6.8rem; color: rgba(255,255,255,.09); font-weight: 950; transform: rotate(-10deg); }
.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, #fde68a, var(--gold), var(--blue)); border-radius: inherit; transition: width .35s ease, background .35s ease; }
.phase { display: inline-flex; margin: 0 0 12px; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.13); 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,.84); line-height: 1.5; max-width: 38ch; margin-left: auto; margin-right: auto; }
.prompt-box { margin-top: 16px; min-height: 98px; display: grid; place-items: center; padding: 16px; border-radius: 20px; background: rgba(255,255,255,.11); border: 1px dashed rgba(255,255,255,.42); font-weight: 950; font-size: clamp(1.04rem, 2.8vw, 1.32rem); 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(--gold); color: #1f2937; box-shadow: 0 12px 24px rgba(245,158,11,.25); }
.secondary { background: #eff6ff; color: #1d4ed8; }
.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: #f8fbff; }
.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(--gold)); }
body.final .bar span { background: linear-gradient(90deg, var(--gold), var(--rose)); }
body.done .bar span { background: linear-gradient(90deg, var(--green), #bbf7d0); }
@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; }
}
