:root {
  --bg: #f7f2f5;
  --bg-elev: #fffbfc;
  --ink: #1f1218;
  --muted: #7d5a68;
  --line: rgba(31, 18, 24, 0.08);
  --rose: #e23d65;
  --rose-deep: #b91d48;
  --rose-soft: rgba(226, 61, 101, 0.12);
  --fertile: #0d9b8a;
  --fertile-soft: rgba(13, 155, 138, 0.14);
  --ovulation: #d97706;
  --ovulation-soft: rgba(217, 119, 6, 0.16);
  --luteal: #6b4fad;
  --luteal-soft: rgba(107, 79, 173, 0.12);
  --follicular: #e879a0;
  --ok: #059669;
  --radius: 22px;
  --radius-sm: 14px;
  --font: "Sora", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --shadow: 0 18px 40px rgba(31, 18, 24, 0.08);
  --shadow-nav: 0 12px 40px rgba(31, 18, 24, 0.14);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --phase-glow: rgba(226, 61, 101, 0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(820px 480px at 8% -10%, var(--phase-glow), transparent 58%),
    radial-gradient(680px 400px at 100% 6%, rgba(13, 155, 138, 0.1), transparent 52%),
    linear-gradient(180deg, #fbf7f9 0%, var(--bg) 45%, #f0e8ec 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  transition: background 0.6s ease;
}

#screen-today[data-phase="fertile"],
#screen-today[data-phase="ovulation"] { --phase-glow: rgba(13, 155, 138, 0.22); }
#screen-today[data-phase="luteal"] { --phase-glow: rgba(107, 79, 173, 0.18); }
#screen-today[data-phase="period"] { --phase-glow: rgba(226, 61, 101, 0.26); }
#screen-today[data-phase="follicular"] { --phase-glow: rgba(232, 121, 160, 0.2); }

body.discreet {
  --rose: #64748b;
  --rose-deep: #475569;
  --rose-soft: rgba(100, 116, 139, 0.14);
  --fertile: #64748b;
  --fertile-soft: rgba(100, 116, 139, 0.12);
  --ovulation: #94a3b8;
  --ovulation-soft: rgba(148, 163, 184, 0.16);
  --luteal: #64748b;
  --luteal-soft: rgba(100, 116, 139, 0.12);
  --follicular: #94a3b8;
}

a { color: var(--fertile); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: 14px 18px calc(108px + var(--safe-b));
  position: relative;
}

/* —— Top bar —— */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  animation: fade-in 0.5s ease both;
}
.brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -0.035em;
  line-height: 1;
}
.brand span {
  color: var(--rose);
  font-style: italic;
  font-weight: 500;
}
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
  display: grid; place-items: center;
  color: var(--muted);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.icon-btn:hover { color: var(--ink); background: #fff; }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 18px; height: 18px; }

/* —— Greeting / status —— */
.greet {
  margin: 4px 0 18px;
  animation: fade-up 0.55s ease 0.05s both;
}
.greet-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.greet-date i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--rose);
  display: inline-block;
  animation: pulse-dot 2.2s ease infinite;
}
.greet h1 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 5.5vw, 1.95rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0;
}
.greet h1 em {
  font-style: italic;
  color: var(--rose);
  font-weight: 500;
}

/* —— Cycle ring —— */
.today-hero {
  position: relative;
  margin: 2px 0 8px;
  animation: fade-up 0.6s ease 0.08s both;
}
.hero-ring {
  position: relative;
  width: min(280px, 74vw);
  aspect-ratio: 1;
  margin: 0 auto 12px;
}
.ring-glow {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--phase-glow), transparent 70%);
  filter: blur(18px);
  animation: glow-breathe 4.5s ease-in-out infinite;
  pointer-events: none;
}
.hero-ring svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 14px 30px rgba(226, 61, 101, 0.14));
  position: relative;
  z-index: 1;
}
.hero-ring .track {
  fill: none;
  stroke: rgba(42, 20, 32, 0.06);
  stroke-width: 11;
}
.hero-ring .prog {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 11;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 28px;
}
.hero-center .eyebrow {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 2px;
}
.hero-center .day {
  font-family: var(--display);
  font-size: clamp(3rem, 12vw, 3.75rem);
  font-weight: 600; line-height: 0.92;
  letter-spacing: -0.05em;
}
.hero-center .phase-pill {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--rose-soft);
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 700;
}
.hero-center .phase-pill[data-phase="fertile"],
.hero-center .phase-pill[data-phase="ovulation"] {
  background: var(--fertile-soft);
  color: #0a7a6c;
}
.hero-center .phase-pill[data-phase="luteal"] {
  background: var(--luteal-soft);
  color: #5b3f99;
}
.hero-center .phase-pill[data-phase="period"] {
  background: var(--rose-soft);
  color: var(--rose-deep);
}

.lede {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 28em;
  margin: 0 auto 6px;
  line-height: 1.5;
}

/* —— Week strip (Clue/Flo pattern) —— */
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 0 0 18px;
  animation: fade-up 0.55s ease 0.18s both;
}
.week-day {
  border: 0;
  background: transparent;
  padding: 8px 2px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease, transform 0.15s ease;
}
.week-day:active { transform: scale(0.96); }
.week-day .wd {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.week-day .dn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 700;
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid transparent;
  transition: 0.2s ease;
}
.week-day.on .dn {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 18px rgba(42, 20, 32, 0.2);
}
.week-day.today .dn { border-color: var(--rose); }
.week-day.period .dn { background: var(--rose-soft); color: var(--rose-deep); }
.week-day.fertile .dn { background: var(--fertile-soft); color: #0a7a6c; }
.week-day.ovulation .dn { background: var(--ovulation-soft); color: #b45309; }
.week-day.on.period .dn,
.week-day.on.fertile .dn,
.week-day.on.ovulation .dn {
  background: var(--ink);
  color: #fff;
}

/* —— Quick actions —— */
.quick-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
  animation: fade-up 0.55s ease 0.22s both;
}
.quick {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 12px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.quick:hover {
  border-color: rgba(226, 61, 101, 0.28);
  box-shadow: var(--shadow);
}
.quick:active { transform: scale(0.96); }
.quick .q-icon {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--rose-soft);
  color: var(--rose-deep);
}
.quick .q-icon svg { width: 18px; height: 18px; }
.quick[data-kind="fertile"] .q-icon { background: var(--fertile-soft); color: #0a7a6c; }
.quick[data-kind="mood"] .q-icon { background: var(--luteal-soft); color: #5b3f99; }
.quick[data-kind="lab"] .q-icon { background: var(--ovulation-soft); color: #b45309; }
.quick span {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
}

/* —— Next-up milestones —— */
.next-up,
.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 2px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  animation: fade-up 0.55s ease 0.2s both;
}
.next-up > div,
.status-strip > div {
  text-align: center;
  padding: 0 8px;
  border-right: 1px solid var(--line);
}
.next-up > div:last-child,
.status-strip > div:last-child { border-right: 0; }
.next-up b,
.status-strip b {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.next-up span,
.status-strip span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.cta-row {
  display: flex;
  gap: 10px;
  margin: 16px 0 8px;
}
.btn {
  flex: 1;
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.92rem;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: white;
  box-shadow: 0 12px 28px rgba(226, 61, 101, 0.28);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.btn:hover { box-shadow: 0 14px 32px rgba(226, 61, 101, 0.36); }
.btn:active { transform: scale(0.98); }
.btn.ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.panel {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 14px;
  backdrop-filter: blur(8px);
}
.panel h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.tip { color: var(--muted); font-size: 0.88rem; line-height: 1.5; margin: 0; }

.daily-tip {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
  line-height: 1.45;
  margin: 4px 0 8px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  opacity: 0.92;
}

/* —— Calendar —— */
.legend {
  display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 10px 0 8px;
  font-size: 0.72rem; color: var(--muted); font-weight: 600;
}
.legend i {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px;
  vertical-align: 1px;
}
.legend .p { background: var(--rose); }
.legend .f { background: var(--fertile); }
.legend .o { background: var(--ovulation); }
.legend .l { background: var(--luteal); }

.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.cal-head strong {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.dow {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  text-align: center; color: var(--muted);
  font-size: 0.68rem; font-weight: 700; margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px;
}
.cell {
  aspect-ratio: 1; border-radius: 14px; border: 1.5px solid transparent;
  background: rgba(255, 255, 255, 0.45);
  display: grid; place-items: center;
  font-size: 0.84rem; font-weight: 650; position: relative;
  transition: transform 0.12s ease, background 0.15s ease;
}
.cell:not(:disabled):active { transform: scale(0.94); }
.cell:disabled { opacity: 0; pointer-events: none; background: transparent; }
.cell.today { border-color: rgba(226, 61, 101, 0.45); }
.cell.selected { box-shadow: inset 0 0 0 2px var(--ink); }
.cell.period { background: var(--rose-soft); color: var(--rose-deep); }
.cell.fertile { background: var(--fertile-soft); color: #0a7a6c; }
.cell.ovulation { background: var(--ovulation-soft); color: #b45309; }
.cell.luteal { background: var(--luteal-soft); color: #5b3f99; }
.cell.follicular { background: rgba(232, 121, 160, 0.1); }
.cell .dot {
  position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink); opacity: 0.55;
}

/* —— Chips / log —— */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: 9px 13px;
  font-size: 0.84rem;
  font-weight: 650;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.chip:active { transform: scale(0.96); }
.chip.on {
  background: var(--rose-soft);
  border-color: rgba(226, 61, 101, 0.35);
  color: var(--rose-deep);
}
.chip.flow-light.on { background: rgba(251, 113, 133, 0.18); }
.chip.flow-medium.on { background: rgba(226, 61, 101, 0.2); }
.chip.flow-heavy.on { background: rgba(192, 41, 79, 0.28); color: #fff; border-color: transparent; }

.log-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 4px;
}
.log-head h2 { margin: 0; font-family: var(--display); font-size: 1.35rem; font-weight: 600; }
.log-head span { color: var(--muted); font-size: 0.8rem; font-weight: 600; }

.field { margin: 12px 0; }
.field label {
  display: block; font-size: 0.75rem; color: var(--muted);
  margin-bottom: 6px; font-weight: 650; letter-spacing: 0.02em;
}
.field input, .field select, .field textarea {
  width: 100%; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85); padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: rgba(226, 61, 101, 0.4);
  box-shadow: 0 0 0 3px var(--rose-soft);
  outline: none;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input[type="range"] { padding: 0; accent-color: var(--rose); }

.log-sticky {
  position: sticky;
  bottom: calc(88px + var(--safe-b));
  margin-top: 12px;
  z-index: 20;
}
.log-sticky .btn { width: 100%; }

/* —— Labs —— */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 10px 0 4px;
}
.metric {
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
}
.metric b {
  display: block;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.metric span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.insight-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem;
}
.insight-row:last-child { border-bottom: 0; }
.insight-row span { color: var(--muted); }
.bar {
  height: 8px; border-radius: 999px;
  background: rgba(42, 20, 32, 0.06); overflow: hidden; margin-top: 6px;
}
.bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--fertile));
  border-radius: inherit;
  transition: width 0.6s ease;
}

.spark {
  display: flex; align-items: flex-end; gap: 4px; height: 56px; margin-top: 12px;
}
.spark i {
  flex: 1; border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--rose), rgba(13, 155, 138, 0.45));
  min-height: 4px;
  animation: bar-rise 0.5s ease both;
}
.matrix-row {
  display: grid; grid-template-columns: 1.2fr repeat(5, 1fr); gap: 4px;
  align-items: center; margin: 6px 0; font-size: 0.72rem;
}
.matrix-row span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matrix-row b {
  text-align: center; border-radius: 8px; padding: 6px 2px;
  background: var(--rose-soft); font-weight: 700; color: var(--rose-deep);
}
.matrix-head { color: var(--muted); font-size: 0.65rem; text-align: center; font-weight: 700; }
.report {
  white-space: pre-wrap; font-size: 0.78rem; line-height: 1.45;
  background: rgba(255, 255, 255, 0.7); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px; max-height: 220px; overflow: auto;
  color: var(--muted);
}
.forecast-row {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.88rem;
}
.forecast-row span { color: var(--muted); font-size: 0.78rem; }

/* —— Bottom nav —— */
.nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + var(--safe-b));
  width: min(420px, calc(100% - 20px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px 6px;
  border-radius: 24px;
  background: rgba(255, 250, 251, 0.9);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: var(--shadow-nav);
  z-index: 40;
}
.nav button {
  border: 0; background: transparent; color: var(--muted);
  border-radius: 16px; padding: 8px 2px 6px;
  font-size: 0.62rem; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
  position: relative;
}
.nav button svg { width: 22px; height: 22px; }
.nav button.on {
  color: var(--rose-deep);
  background: var(--rose-soft);
}
.nav button.nav-log {
  transform: translateY(-10px);
}
.nav button.nav-log .nav-fab {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
  color: #fff;
  box-shadow: 0 10px 24px rgba(226, 61, 101, 0.35);
  margin-bottom: 2px;
}
.nav button.nav-log .nav-fab svg { width: 22px; height: 22px; }
.nav button.nav-log.on .nav-fab {
  box-shadow: 0 12px 28px rgba(226, 61, 101, 0.45);
}
.nav button.nav-log.on {
  background: transparent;
  color: var(--rose-deep);
}

.screen { display: none; }
.screen.on { display: block; animation: fade-up 0.35s ease; }

.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(42, 20, 32, 0.45);
  backdrop-filter: blur(10px);
  display: none; align-items: flex-end; justify-content: center;
  padding: 16px;
}
.overlay.on { display: flex; animation: fade-in 0.25s ease; }
.sheet {
  width: min(440px, 100%);
  background:
    radial-gradient(500px 200px at 20% 0%, rgba(226, 61, 101, 0.12), transparent 60%),
    linear-gradient(180deg, #fffafb, #f7eef2);
  border: 1px solid var(--line);
  border-radius: 28px 28px 22px 22px;
  padding: 26px 20px 20px;
  max-height: min(88dvh, 720px); overflow: auto;
  box-shadow: var(--shadow);
  animation: sheet-up 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.sheet h1 {
  font-family: var(--display); font-size: 1.75rem; margin: 0 0 8px;
  letter-spacing: -0.03em; font-weight: 600;
}
.sheet p { color: var(--muted); margin: 0 0 16px; line-height: 1.5; }
.ob-steps {
  display: flex; gap: 6px; margin-bottom: 16px;
}
.ob-steps i {
  flex: 1; height: 4px; border-radius: 999px;
  background: rgba(42, 20, 32, 0.08);
}
.ob-steps i.on { background: var(--rose); }

.seo-banner { display: none !important; }

.toast {
  position: fixed; left: 50%;
  bottom: calc(96px + var(--safe-b));
  transform: translateX(-50%) translateY(16px);
  background: var(--ink); color: #fff;
  padding: 11px 16px; border-radius: 999px;
  font-size: 0.84rem; font-weight: 650;
  opacity: 0; pointer-events: none;
  transition: 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 80; white-space: nowrap;
  box-shadow: var(--shadow);
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sheet-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}
@keyframes bar-rise {
  from { transform: scaleY(0.2); transform-origin: bottom; opacity: 0.4; }
  to { transform: none; opacity: 1; }
}

@media (min-width: 720px) {
  .app { padding-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* —— Feel bar (tap-first today) —— */
.feel {
  margin: 8px 0 12px;
  padding: 18px 0 6px;
  border-top: 1px solid var(--line);
  animation: fade-up 0.55s ease 0.28s both;
}
.feel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.feel-head h2 {
  font-family: var(--display); font-size: 1.2rem; margin: 0;
  font-weight: 600; letter-spacing: -0.02em;
}
.saved-dot {
  font-size: 0.72rem; font-weight: 750; color: var(--ok);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.saved-dot.pop { animation: pop-in 0.45s ease; }

.flow-drip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 12px;
}
.drip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.75);
  border-radius: 16px;
  padding: 10px 4px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.drip i {
  width: 8px; height: 10px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: rgba(226, 61, 101, 0.25);
  display: inline-block; margin: 0 1px;
}
.drip span { font-size: 0.65rem; font-weight: 700; color: var(--muted); }
.drip.on {
  background: var(--rose-soft);
  border-color: rgba(226, 61, 101, 0.4);
  box-shadow: 0 8px 20px rgba(226, 61, 101, 0.12);
  transform: translateY(-2px);
}
.drip.on i { background: var(--rose); }
.drip:active { transform: scale(0.95); }

.feel-row {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px 2px 10px; margin: 0 -2px 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.feel-row::-webkit-scrollbar { display: none; }
.feel-row.wrap { flex-wrap: wrap; overflow: visible; }
.feel-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.8);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 68px;
  font-size: 0.7rem; font-weight: 700; color: var(--muted);
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.feel-chip .emoji { font-size: 1.25rem; line-height: 1; }
.feel-chip.sm {
  flex-direction: row; min-width: 0; padding: 8px 12px;
  border-radius: 999px; font-size: 0.78rem;
}
.feel-chip.on {
  background: var(--rose-soft);
  border-color: rgba(226, 61, 101, 0.35);
  color: var(--rose-deep);
  transform: scale(1.04);
}
.feel-chip:active { transform: scale(0.94); }
.feel-more {
  border: 0; background: transparent; color: var(--rose-deep);
  font-weight: 750; font-size: 0.85rem; padding: 8px 0 0;
}

.hero-ring {
  border: 0; background: transparent; padding: 0; display: block;
  width: min(280px, 74vw); margin-left: auto; margin-right: auto;
  cursor: pointer;
}
.hero-ring.on-period .phase-pill { background: var(--rose-soft); }
.hero-ring.bounce { animation: ring-bounce 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.ring-hint {
  margin-top: 8px; font-size: 0.65rem; font-weight: 700;
  color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase;
}

.autosave-hint {
  color: var(--muted); font-size: 0.8rem; margin: 0 0 10px;
  display: flex; align-items: center; gap: 8px;
}
.more-details {
  margin: 12px 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.55);
  padding: 4px 14px 8px;
}
.more-details summary {
  cursor: pointer; font-weight: 750; padding: 12px 0;
  list-style: none; display: flex; align-items: baseline; gap: 8px;
}
.more-details summary::-webkit-details-marker { display: none; }
.more-details summary span { color: var(--muted); font-weight: 600; font-size: 0.8rem; }

.pain-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pain-pill {
  width: 42px; height: 42px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.8);
  font-weight: 750; transition: 0.15s ease;
}
.pain-pill.on {
  background: var(--rose); color: #fff; border-color: transparent;
  box-shadow: 0 8px 18px rgba(226, 61, 101, 0.28);
}

.sheet-grab {
  width: 40px; height: 4px; border-radius: 999px;
  background: rgba(42,20,32,0.12); margin: 0 auto 14px;
}
.sheet-quick { padding-top: 12px; }
.ql-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.ql-head h1 { font-size: 1.45rem; margin: 0; }
.ql-label {
  font-size: 0.72rem; font-weight: 750; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); margin: 14px 0 8px;
}

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.pill {
  border: 1px solid var(--line); background: rgba(255,255,255,0.85);
  border-radius: 999px; padding: 10px 14px; font-weight: 700; font-size: 0.88rem;
  transition: 0.15s ease;
}
.pill.on {
  background: var(--ink); color: #fff; border-color: transparent;
  box-shadow: 0 8px 18px rgba(42, 20, 32, 0.18);
}
.pill:active { transform: scale(0.96); }

.toast {
  display: flex; align-items: center; gap: 12px;
  white-space: normal; max-width: min(360px, calc(100% - 32px));
}
.toast button {
  border: 0; background: rgba(255,255,255,0.15);
  color: #fff; font-weight: 750; font-size: 0.78rem;
  padding: 6px 10px; border-radius: 999px; flex-shrink: 0;
}

@keyframes ring-bounce {
  0% { transform: scale(1); }
  35% { transform: scale(0.96); }
  70% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
@keyframes pop-in {
  0% { opacity: 0; transform: translateY(4px) scale(0.9); }
  40% { opacity: 1; transform: translateY(0) scale(1.05); }
  100% { opacity: 1; transform: none; }
}

/* —— Insight feed (editorial, not card stack) —— */
.info-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 0 8px;
  animation: fade-up 0.55s ease 0.22s both;
}
.insight {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.insight:first-child { border-top: 0; padding-top: 4px; }
.info-kicker {
  font-size: 0.68rem; font-weight: 750;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.insight h2,
.body-block h2 {
  font-family: var(--display); font-size: 1.35rem;
  margin: 0 0 8px; font-weight: 600; letter-spacing: -0.03em;
  line-height: 1.15;
}
.body-copy {
  margin: 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.55;
  opacity: 0.88;
}
.insight > .tip {
  margin: 0; color: var(--muted); font-size: 0.86rem; line-height: 1.45;
}

.fert-block.dim { opacity: 0.72; }
.fert-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.fert-row strong {
  font-family: var(--display); font-size: 2rem; font-weight: 600;
  letter-spacing: -0.04em; line-height: 1;
}
.fert-row span { font-weight: 750; color: var(--muted); font-size: 1rem; }
.fert-meter {
  height: 12px; border-radius: 999px;
  background: rgba(31, 18, 24, 0.06); overflow: hidden; margin-bottom: 10px;
}
.fert-meter i {
  display: block; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #94a3b8, var(--fertile), var(--rose));
  transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.fert-block[data-level="peak"] .fert-row strong,
.fert-block[data-level="high"] .fert-row strong { color: var(--fertile); }
.fert-block[data-level="low"] .fert-row strong,
.fert-block[data-level="very-low"] .fert-row strong { color: var(--muted); }
.fert-block[data-level="peak"] .fert-meter i {
  background: linear-gradient(90deg, var(--fertile), var(--ovulation));
}

.self-care {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
.self-care span {
  font-size: 0.74rem; font-weight: 700;
  padding: 7px 12px; border-radius: 999px;
  background: var(--rose-soft); color: var(--rose-deep);
}

.expect-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px;
}
.expect-chip {
  border: 1px solid rgba(226, 61, 101, 0.28);
  background: transparent;
  border-radius: 999px; padding: 9px 14px;
  font-size: 0.82rem; font-weight: 700; color: var(--ink);
  transition: 0.15s ease;
}
.expect-chip.ghost { opacity: 0.65; border-style: dashed; }
.expect-chip:active,
.expect-chip:hover {
  transform: scale(0.97);
  background: var(--rose-soft);
  border-color: rgba(226, 61, 101, 0.45);
}

.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-row {
  display: grid; grid-template-columns: 72px 1fr auto;
  gap: 8px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.tl-row:last-child { border-bottom: 0; padding-bottom: 0; }
.tl-row b { font-weight: 750; color: var(--rose-deep); }
.tl-row[data-kind="fertile"] b,
.tl-row[data-kind="ovulation"] b { color: #0a7a6c; }
.tl-row span { color: var(--ink); font-weight: 600; }
.tl-row em { color: var(--muted); font-style: normal; font-size: 0.78rem; }

.feel-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 4px; flex-wrap: wrap;
}
.feel-period {
  border: 0; background: transparent;
  color: var(--muted); font-weight: 700; font-size: 0.82rem;
  padding: 8px 0; text-decoration: underline;
  text-underline-offset: 3px;
}
.feel-period:hover { color: var(--rose-deep); }

@keyframes glow-breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

@media (max-width: 380px) {
  .tl-row { grid-template-columns: 64px 1fr; }
  .tl-row em { grid-column: 2; }
  .fert-row strong { font-size: 1.7rem; }
}
