:root {
  color-scheme: light;
  --ink: #1b2235;
  --muted: #66758d;
  --paper: #fff8fb;
  --card: rgba(255,255,255,.94);
  --line: #f1dbe6;
  --rose: #e11d48;
  --pink: #fb7185;
  --peach: #fdba74;
  --violet: #8b5cf6;
  --mint: #8bf4c7;
  --shadow: 0 24px 70px rgba(80, 28, 60, .15);
}
* { 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, #ffe4ec 0, transparent 31rem), radial-gradient(circle at top right, #ede9fe 0, transparent 33rem), linear-gradient(135deg, #fffafb, #fff7ed 55%, #f5f3ff);
}
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 #eee3eb;border-radius:24px;box-shadow:0 10px 24px rgba(68,27,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:#5b6070;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, 470px); gap: 28px; align-items: center; padding: 14px 0 22px; }
.eyebrow { margin: 0 0 12px; color: var(--rose); font-weight: 950; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; }
h1 { margin: 0 0 18px; font-size: clamp(2.25rem, 7vw, 5.1rem); line-height: .94; letter-spacing: -.075em; }
.lede { max-width: 61ch; color: var(--muted); font-size: clamp(1.06rem, 2vw, 1.25rem); line-height: 1.58; }
.quick-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 22px 0; max-width: 620px; }
.quick-stats div { padding: 15px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.82); box-shadow: 0 10px 22px rgba(80,28,60,.06); }
.quick-stats span { display: block; font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 950; letter-spacing: -.05em; }
.quick-stats small { display: block; margin-top: 4px; color: var(--muted); font-weight: 850; }
.mode-row, .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
button { border: 0; cursor: pointer; font: inherit; }
.mode { border: 2px solid var(--line); background: rgba(255,255,255,.88); 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: #fff1f2; border-color: var(--rose); }
.timer-card, .info-card, .related, .faq, .pattern-card, .log-card { background: var(--card); border: 1px solid rgba(241,219,230,.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, #35142e, #be123c); color: #fff; box-shadow: inset 0 -12px 30px rgba(0,0,0,.14); position: relative; overflow: hidden; }
.screen::before { content: "♡"; position: absolute; top: -18px; right: 18px; font-size: 8rem; color: rgba(255,255,255,.08); font-weight: 950; }
.time { font-size: clamp(4.1rem, 16vw, 7.4rem); font-weight: 950; line-height: .9; letter-spacing: -.09em; position: relative; font-variant-numeric: tabular-nums; }
.bar { height: 17px; margin: 22px 0 16px; background: rgba(255,255,255,.16); border-radius: 999px; overflow: hidden; }
.bar span { display: block; width: 0%; height: 100%; background: linear-gradient(90deg, var(--peach), var(--pink), #fff); border-radius: inherit; transition: width .25s ease; }
.phase { 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,.84); line-height: 1.5; max-width: 40ch; margin-left: auto; margin-right: auto; }
.prompt-box { margin-top: 16px; min-height: 104px; 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: 900; font-size: clamp(1rem, 2.6vw, 1.22rem); 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: 230px; background: var(--rose); color: #fff; box-shadow: 0 12px 24px rgba(225,29,72,.25); }
.secondary { background: #fff1f2; color: #8f1238; }
.small { padding: 10px 13px; }
body.timing .primary { background: #7f1d1d; }
body.timing .screen { background: linear-gradient(180deg, #3b0f28, #9f1239); }
body.timing .bar span { animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 0%,100% { opacity: .72; } 50% { opacity: 1; } }
.pattern-card, .log-card, .info-card, .related, .faq { padding: clamp(20px, 3vw, 28px); }
.pattern-card { margin: 8px 0 18px; }
.pattern-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pattern-grid div { border: 1px solid var(--line); background: #fffafb; border-radius: 18px; padding: 16px; }
.pattern-grid strong { display:block; font-size: clamp(1.2rem, 3vw, 1.85rem); letter-spacing: -.04em; }
.pattern-grid span { color: var(--muted); font-weight: 850; }
#summaryText { color: var(--muted); line-height: 1.6; margin-bottom: 0; }
.log-card { margin-bottom: 18px; }
.log-heading { display:flex; justify-content:space-between; gap:12px; align-items:center; flex-wrap:wrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: #8f1238; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
td { color: var(--muted); font-weight: 750; }
.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 18px 0; }
.wide { grid-column: 1 / -1; }
.caution { background: #fff7ed; border-color: #fed7aa; }
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 var(--line); border-radius: 18px; background: #fffafb; }
.related-grid a:hover { border-color: var(--rose); }
.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; }
@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}
  .quick-stats, .pattern-grid { grid-template-columns: 1fr; }
  .mode { flex: 1 1 100%; }
  .actions .primary, .actions .secondary { width: 100%; }
  .related-grid { grid-template-columns: 1fr; }
}
