/* Dear Dates — deardates.app
   Tokens mirror the app's theme (src/theme.ts): ink #101114, paper #F4F5F7,
   violet #6C4DFF, lime #D6F84C, plus one colour per kind of date. */

:root {
  --ink: #101114;
  --ink-2: #2A2D33;
  --paper: #F4F5F7;
  --white: #FFFFFF;
  --violet: #6C4DFF;
  --violet-deep: #4A32C7;
  --violet-soft: #B9A8FF;
  --lime: #D6F84C;
  --muted: #6E747D;
  --muted-2: #8A9099;
  --muted-3: #A6ACB5;
  --muted-4: #5D636C;
  --dark-card: #16181D;
  --dark-text: #868D96;
  --dark-text-2: #969DA6;
  --dark-text-3: #C9CDD4;
  --birthday: #FF4D2E;
  --anniversary: #6C4DFF;
  --remembrance: #5A6472;
  --gig: #FF3D8B;
  --trip: #12B981;
  --streak: #12B981;
  --pet: #FF8A3D;
  --work: #2E6BFF;
  --appointment: #8A9099;
  --display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  --radius-card: 22px;
  --container: 1160px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: var(--violet-deep); text-decoration: none; }
a:hover { color: var(--violet); }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; }
p { margin: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  z-index: 100;
}
.skip-link:focus { left: 8px; color: var(--paper); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 24px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1;
  white-space: nowrap;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { color: var(--paper); background: #1E2026; }
.btn-white { background: var(--white); border: 1px solid rgba(16,17,20,0.12); color: var(--ink); }
.btn-white:hover { color: var(--ink); background: #FBFBFC; }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-paper:hover { color: var(--ink); background: var(--white); }
.btn-ghost-light { background: rgba(244,245,247,0.1); border: 1px solid rgba(244,245,247,0.2); color: var(--paper); }
.btn-ghost-light:hover { color: var(--paper); background: rgba(244,245,247,0.16); }

.btn-pill { padding: 10px 16px; border-radius: 999px; font-size: 12.5px; }
.btn-pill.btn-ghost { background: rgba(16,17,20,0.06); color: var(--ink); }
.btn-pill.btn-ghost:hover { color: var(--ink); background: rgba(16,17,20,0.1); }

.store-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

/* ---------- Type helpers ---------- */

.eyebrow {
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted-2);
}
.eyebrow.lime { color: var(--lime); }
.eyebrow.violet { color: var(--violet); }
.eyebrow.slate { color: var(--remembrance); }

.h2 {
  margin-top: 12px;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 22ch;
  text-wrap: pretty;
}
.lede {
  margin-top: 18px;
  font-size: 15.5px;
  line-height: 25px;
  color: var(--muted);
  max-width: 46ch;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: var(--container);
  margin: 0 auto;
  padding: 26px var(--gutter);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--violet);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  color: var(--lime);
}
.brand-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.4px;
}
.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Hero ---------- */

.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) var(--gutter) clamp(56px, 7vw, 96px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-copy { flex: 1 1 440px; min-width: 0; }
.hero-phone { flex: 0 1 438px; min-width: 0; display: flex; justify-content: center; }

.kind-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(16,17,20,0.06);
}
.kind-pill .dot { width: 7px; height: 7px; border-radius: 4px; background: var(--kind, var(--birthday)); transition: background 380ms ease; }
.kind-pill .label {
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted-4);
}

.hero-rotor { min-height: clamp(150px, 16vw, 230px); margin-top: 20px; }
.rotor-item {
  transition: opacity 380ms ease, transform 380ms ease;
  opacity: 1;
  transform: translateY(0);
}
.rotor-item.is-out { opacity: 0; transform: translateY(10px); }

.hero h1 {
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: pretty;
}
.hero h1 .emph { color: var(--kind, var(--birthday)); transition: color 380ms ease; }
.hero-meta {
  margin-top: 18px;
  font-size: 15px;
  line-height: 23px;
  color: var(--muted);
  max-width: 44ch;
}
.hero-pitch {
  margin-top: clamp(20px, 3vw, 32px);
  font-size: 16.5px;
  line-height: 26px;
  color: var(--ink-2);
  max-width: 48ch;
  text-wrap: pretty;
}
.hero-fine { margin-top: 16px; font-size: 12.5px; color: var(--muted-2); }

/* ---------- Dark "how it counts" section ---------- */

.section-dark { background: var(--ink); color: var(--paper); }
.section-dark .container { padding-block: clamp(56px, 8vw, 110px); }
.section-dark .h2 { max-width: 24ch; }
.section-dark .lede { color: var(--dark-text); max-width: 56ch; font-size: 15px; line-height: 24px; }

.count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: clamp(32px, 4vw, 56px);
}
.count-card { padding: 26px; border-radius: var(--radius-card); background: var(--dark-card); }
.count-card .dot { width: 8px; height: 8px; border-radius: 4px; display: block; }
.count-card .big {
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-top: 18px;
}
.count-card .kind {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--dark-text);
  margin-top: 10px;
}
.count-card p { margin-top: 10px; font-size: 13.5px; line-height: 20px; color: var(--dark-text-2); }

.milestone-card {
  margin-top: 20px;
  padding: 26px;
  border-radius: var(--radius-card);
  background: rgba(108,77,255,0.16);
  border: 1px solid rgba(185,168,255,0.24);
}
.milestone-card .inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.milestone-card .copy { flex: 1 1 280px; min-width: 0; }
.milestone-card .tag {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--lime);
}
.milestone-card h3 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: 10px;
}
.milestone-card p { margin-top: 10px; font-size: 13.5px; line-height: 20px; color: #C9C2F5; }
.milestone-chips { flex: 0 1 300px; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(244,245,247,0.1);
  font-weight: 600;
  font-size: 12px;
}
.chip.lit { background: var(--lime); color: var(--ink); font-weight: 700; }

/* ---------- Feature sections (text + phone) ---------- */

.feature {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 110px) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.feature-copy { flex: 1 1 380px; min-width: 0; }
.feature-phone { flex: 0 1 438px; min-width: 0; display: flex; justify-content: center; }
.feature.phone-first .feature-phone { order: 1; }
.feature.phone-first .feature-copy { order: 2; }

.section-white {
  background: var(--white);
  border-top: 1px solid rgba(16,17,20,0.07);
  border-bottom: 1px solid rgba(16,17,20,0.07);
}

.bullets { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.bullets li { display: flex; gap: 12px; align-items: flex-start; list-style: none; }
.bullets { padding: 0; margin-bottom: 0; }
.bullets .dot { width: 7px; height: 7px; border-radius: 4px; margin-top: 7px; flex: 0 0 auto; }
.bullets span:last-child { font-size: 14.5px; line-height: 22px; color: var(--ink-2); }
.bullets strong { font-weight: 700; }

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.mini-card { padding: 18px; border-radius: 18px; background: var(--paper); }
.mini-card h3 { font-size: 17px; }
.mini-card p { margin-top: 6px; font-size: 13px; line-height: 19px; color: var(--muted); }

/* On this day */

.section-dark .feature { padding-inline: 0; }
.memory-rotor { min-height: 96px; margin-top: 22px; }
.memory-rotor .rotor-item { transition-duration: 500ms; }
.memory-line {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(19px, 2.2vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--violet-soft);
}
.memory-year { font-size: 13px; color: var(--dark-text); margin-top: 8px; }
.section-dark .feature .lede { margin-top: 24px; color: var(--dark-text-2); font-size: 15.5px; line-height: 25px; max-width: 46ch; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag-row .chip { padding: 9px 15px; background: rgba(244,245,247,0.08); font-size: 12.5px; color: #E7E9EE; }

/* ---------- Gentle by default ---------- */

.section-paper { background: var(--paper); }
.section-paper .container { padding-block: clamp(56px, 8vw, 110px); }
.gentle-head { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 56px); align-items: flex-end; }
.gentle-head .copy { flex: 1 1 420px; min-width: 0; }
.gentle-head .h2 { max-width: 26ch; }
.gentle-head .lede { flex: 1 1 300px; margin-top: 0; max-width: 44ch; }

.gentle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: clamp(32px, 4vw, 48px);
}
.gentle-card {
  padding: 26px;
  border-radius: var(--radius-card);
  background: var(--white);
  border: 1px solid rgba(16,17,20,0.07);
}
.gentle-card .badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.badge.violet { background: rgba(108,77,255,0.12); color: var(--violet-deep); }
.badge.lime { background: rgba(214,248,76,0.6); color: #3F4A0B; }
.badge.slate { background: rgba(90,100,114,0.14); color: #3D4552; }
.badge.coral { background: rgba(255,77,46,0.12); color: #B62B12; }
.gentle-card h3 { font-size: 19px; line-height: 1.25; margin-top: 16px; }
.gentle-card p { margin-top: 8px; font-size: 13.5px; line-height: 20px; color: var(--muted); }

.calm-card {
  margin-top: 20px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 26px;
  background: var(--white);
  border: 1px solid rgba(16,17,20,0.07);
}
.calm-rotor { min-height: clamp(96px, 12vw, 140px); margin-top: 18px; }
.calm-rotor .rotor-item { transition: opacity 700ms ease; transform: none; }
.calm-line {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--ink-2);
  max-width: 30ch;
  text-wrap: pretty;
}
.calm-meta { font-size: 13.5px; color: var(--muted-2); margin-top: 12px; }

/* ---------- Pricing / privacy ---------- */

.section-violet { background: var(--violet); color: var(--white); }
.section-violet .container { padding-block: clamp(56px, 8vw, 110px); }
.section-violet .inner { display: flex; flex-wrap: wrap; gap: clamp(28px, 4vw, 64px); }
.section-violet .copy { flex: 1 1 380px; min-width: 0; }
.section-violet .lede { color: var(--white); }
.section-violet .lede + .lede { margin-top: 14px; }
.plans { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.plan { padding: 24px; border-radius: var(--radius-card); }
.plan.free { background: rgba(255,255,255,0.22); border: 1px solid rgba(255,255,255,0.35); }
.plan.paid { background: var(--ink); }
.plan .price-row { display: flex; align-items: baseline; gap: 10px; }
.plan .price {
  font-family: var(--display);
  font-weight: 600;
  font-size: 34px;
  letter-spacing: -0.03em;
}
.plan.paid .price { color: var(--lime); }
.plan .per { font-size: 13px; color: var(--white); }
.plan.paid .per { color: var(--dark-text); }
.plan p { margin-top: 10px; font-size: 13.5px; line-height: 20px; color: var(--white); }
.plan.paid p { color: var(--dark-text-3); }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: var(--paper); }
.site-footer .container { padding-block: clamp(48px, 6vw, 80px); }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: flex-end;
  justify-content: space-between;
}
.footer-cta { flex: 1 1 320px; min-width: 0; }
.footer-cta h2 {
  font-size: clamp(26px, 3.2vw, 40px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  max-width: 20ch;
  text-wrap: pretty;
}
.footer-links {
  flex: 0 1 240px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.footer-links a { color: var(--dark-text-3); }
.footer-links a:hover { color: var(--paper); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(244,245,247,0.14);
  font-size: 12px;
  color: var(--dark-text);
}

/* ---------- Legal / support pages ---------- */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(64px, 8vw, 110px);
}
.page h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-top: 12px;
}
.page .updated { margin-top: 14px; font-size: 13px; color: var(--muted-2); }
.page h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
  margin-top: 40px;
}
.page p, .page li { font-size: 15.5px; line-height: 25px; color: var(--ink-2); }
.page p { margin-top: 14px; }
.page ul { margin: 12px 0 0; padding-left: 22px; }
.page li + li { margin-top: 6px; }
.page .note {
  margin-top: 28px;
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--white);
  border: 1px solid rgba(16,17,20,0.07);
  font-size: 14px;
  line-height: 21px;
  color: var(--muted);
}
.page a { font-weight: 600; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }

/* ---------- Phone mockup ----------
   Fixed 414×868 frame (390×844 screen), scaled to fit its wrapper with
   --phone-scale, which site.js keeps in sync via a ResizeObserver. */

.phone-wrap {
  width: 100%;
  max-width: 414px;
  aspect-ratio: 414 / 868;
  position: relative;
}
.phone {
  --phone-scale: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: 414px;
  height: 868px;
  padding: 12px;
  border-radius: 46px;
  background: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(16,17,20,0.45), 0 0 0 1px rgba(16,17,20,0.9);
  transform: scale(var(--phone-scale));
  transform-origin: top left;
  font-family: var(--body);
}
.phone.on-dark {
  background: #3A3F49;
  box-shadow: 0 30px 70px -18px rgba(0,0,0,0.7), 0 0 0 1px rgba(244,245,247,0.28), inset 0 1px 0 rgba(244,245,247,0.22);
}
.screen {
  position: relative;
  width: 390px;
  height: 844px;
  overflow: hidden;
  border-radius: 34px;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
}
.screen.dark { background: var(--ink); color: var(--paper); }

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 26px 2px;
  flex: 0 0 auto;
}
.status-bar .time { font-weight: 600; font-size: 13px; letter-spacing: 0.2px; }
.status-bar .icons { display: flex; align-items: center; gap: 5px; }
.status-bar .icons span { display: block; border: 1px solid currentColor; opacity: 0.65; }
.status-bar .icons .signal { width: 16px; height: 9px; border-radius: 2px; }
.status-bar .icons .battery { width: 22px; height: 10px; border-radius: 3px; }

.screen-body { flex: 1; overflow: hidden; padding: 10px 22px 40px; }

.screen-head { display: flex; align-items: flex-start; justify-content: space-between; }
.screen-eyebrow {
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted-2);
}
.screen-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 34px;
  line-height: 36.7px;
  letter-spacing: -1.19px;
  margin-top: 4px;
}
.gear {
  width: 38px;
  height: 38px;
  border-radius: 19px;
  background: #E7E9EE;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  font-size: 16px;
  color: var(--muted-4);
}
.nav-btns { display: flex; gap: 6px; }
.nav-btns span {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: rgba(16,17,20,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--muted-4);
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: rgba(16,17,20,0.06);
  border-radius: 999px;
  margin-top: 18px;
}
.segmented span {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--muted-2);
}
.segmented span.on { background: var(--white); box-shadow: 0 1px 2px rgba(16,17,20,0.1); color: var(--ink); }

.otd-banner {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--violet);
  display: flex;
  align-items: center;
}
.otd-banner .copy { flex: 1; min-width: 0; }
.otd-banner .eyebrow { font-size: 9.5px; color: var(--lime); }
.otd-banner .title { font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--white); margin-top: 3px; }
.otd-banner .chev { font-size: 20px; color: var(--lime); line-height: 1; }

.next-card {
  margin-top: 18px;
  padding: 20px;
  border-radius: 22px;
  background: var(--ink);
  box-shadow: 0 12px 20px rgba(16,17,20,0.4);
  color: var(--white);
}
.next-card .eyebrow { font-size: 9.5px; color: rgba(255,255,255,0.55); }
.next-card .title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 29px;
  line-height: 32px;
  letter-spacing: -1px;
  margin-top: 12px;
}
.next-card .count { font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--violet-soft); margin-top: 3px; }
.next-card .foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.14);
  font-size: 12px;
  color: rgba(255,255,255,0.6);
}

.month-group { margin-top: 26px; }
.month-label { display: flex; align-items: center; gap: 12px; }
.month-label span:first-child { font-weight: 600; font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted-2); }
.month-label .rule { flex: 1; height: 1px; background: rgba(16,17,20,0.10); }
.screen.dark .month-label span:first-child { color: var(--dark-text); }
.screen.dark .month-label .rule { background: rgba(244,245,247,0.14); }
.rows { margin-top: 8px; display: flex; flex-direction: column; }

.event-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 10px 12px 4px;
  border-radius: 14px;
}
.event-row .day { width: 42px; display: flex; flex-direction: column; align-items: center; }
.event-row .day .num { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 24px; }
.event-row .day .dow { font-weight: 600; font-size: 9px; letter-spacing: 1px; color: var(--muted-3); margin-top: 2px; }
.event-row .bar { width: 3px; align-self: stretch; min-height: 30px; border-radius: 2px; }
.event-row .text { flex: 1; min-width: 0; }
.event-row .name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-row .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.event-row .star { font-size: 10px; color: var(--violet); margin-left: 6px; }
.event-row.boxed { padding: 13px; gap: 12px; background: var(--white); border: 1px solid rgba(16,17,20,0.07); }
.event-row.boxed .name { font-size: 13.5px; }

/* Calendar */
.cal-grid { display: flex; flex-wrap: wrap; margin-top: 18px; }
.cal-grid .dow {
  width: 14.2857%;
  padding: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 9.5px;
  letter-spacing: 0.8px;
  color: var(--muted-3);
}
.cal-grid .cell { width: 14.2857%; aspect-ratio: 1; padding: 1px; }
.cal-grid .cell > div {
  height: 100%;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid transparent;
  font-weight: 500;
  font-size: 13px;
}
.cal-grid .cell .dots { display: flex; gap: 3px; height: 4px; }
.cal-grid .cell .dots span { width: 4px; height: 4px; border-radius: 2px; background: var(--dot); }
.cal-grid .cell.has { }
.cal-grid .cell.has > div { background: rgba(255,252,246,0.9); border-color: rgba(16,17,20,0.08); }
.cal-grid .cell.milestone > div { border: 1.5px solid rgba(108,77,255,0.85); }
.cal-grid .cell.selected > div { background: var(--ink); color: var(--paper); border: 1.5px solid var(--birthday); }
.cal-grid .cell.selected .dots span { background: var(--violet-soft); }

.day-label { margin-top: 22px; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(16,17,20,0.10);
}
.legend span { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); }
.legend i { width: 6px; height: 6px; border-radius: 3px; background: var(--dot); }

/* Recap */
.screen-body.recap { padding-inline: 0; }
.recap-head { padding: 0 22px; }
.recap-head .screen-eyebrow { color: var(--violet); }
.recap-head .screen-title { font-size: 32px; line-height: 34.6px; letter-spacing: -1.12px; margin-top: 6px; }
.recap-head .hint { font-size: 12.5px; line-height: 18px; color: var(--dark-text); margin-top: 10px; }
.recap-cards { display: flex; gap: 14px; padding: 22px; overflow: hidden; }
.recap-card { width: 268px; flex: 0 0 auto; border-radius: 22px; overflow: hidden; background: var(--dark-card); }
.recap-card .cover { height: 180px; display: flex; flex-direction: column; justify-content: flex-end; background: var(--birthday); }
.recap-card .cover span {
  display: block;
  padding: 16px;
  background: rgba(8,9,12,0.45);
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--paper);
}
.recap-card .body { padding: 18px; }
.recap-card .title { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 26px; }
.recap-card .count { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--violet-soft); margin-top: 4px; }
.recap-card .note { font-size: 12.5px; line-height: 19px; color: var(--dark-text-2); margin-top: 10px; }
.recap-week { padding: 0 22px; margin-top: 4px; }
.recap-week .empty { font-size: 12.5px; color: var(--dark-text); padding: 12px 0; margin-top: 8px; }

/* Add a date — step two */
.screen-body.add { padding: 0; display: flex; flex-direction: column; }
.add-scroll { flex: 1; overflow: hidden; padding: 18px 22px 20px; margin-top: -190px; }
.add-nav { display: flex; justify-content: space-between; align-items: center; }
.add-nav .back { font-size: 13px; color: var(--muted-4); }
.add-nav .dots { display: flex; gap: 5px; }
.add-nav .dots span { width: 6px; height: 6px; border-radius: 3px; background: rgba(16,17,20,0.2); }
.add-nav .dots span.on { background: var(--ink); }
.add-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 30px;
  line-height: 32.4px;
  letter-spacing: -1.05px;
  margin-top: 22px;
}
.add-hint { font-size: 12.5px; line-height: 18px; color: var(--muted); margin-top: 6px; }
.field { margin-top: 16px; }
.field.first { margin-top: 22px; }
.field-label { font-weight: 600; font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted-2); }
.input {
  margin-top: 7px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid rgba(16,17,20,0.10);
  font-size: 14px;
}
.input.year { width: 120px; }
.month-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.month-chips span {
  min-width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(16,17,20,0.06);
  font-weight: 600;
  font-size: 11.5px;
  color: var(--muted-4);
}
.month-chips span.on { background: var(--ink); color: var(--paper); }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.day-chips span {
  width: 38px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid rgba(16,17,20,0.10);
  font-weight: 500;
  font-size: 13px;
}
.day-chips span.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.day-note { font-size: 11.5px; color: var(--muted-2); margin-top: 8px; }
.year-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 16px; }
.year-row .field { flex: 1; margin-top: 0; }
.toggle-col { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.toggle-col .lbl { font-weight: 600; font-size: 11.5px; color: var(--muted); }
.toggle { width: 44px; height: 26px; border-radius: 999px; padding: 3px; background: var(--trip); flex: 0 0 auto; }
.toggle i { display: block; width: 20px; height: 20px; border-radius: 10px; background: var(--white); transform: translateX(18px); box-shadow: 0 1px 3px rgba(0,0,0,0.25); }
.toggle-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid rgba(16,17,20,0.08);
  margin-top: 16px;
}
.toggle-card .copy { flex: 1; }
.toggle-card .name { font-weight: 600; font-size: 13.5px; }
.toggle-card .sub { font-size: 11.5px; line-height: 16px; color: var(--muted-2); margin-top: 2px; }
.preview-card { padding: 18px; border-radius: 18px; background: rgba(108,77,255,0.12); margin-top: 16px; }
.preview-card .field-label { color: var(--violet-deep); }
.preview-card .line { font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 26px; color: var(--ink-2); margin-top: 6px; }
.preview-card .next { font-size: 12px; color: var(--muted); margin-top: 4px; }
.preview-card .ms { font-weight: 600; font-size: 11.5px; color: var(--violet-deep); margin-top: 6px; }
.add-footer { padding: 12px 22px 16px; border-top: 1px solid rgba(16,17,20,0.10); background: var(--paper); flex: 0 0 auto; }
.add-footer .cta {
  padding: 14px 0;
  border-radius: 14px;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--paper);
}

/* Tab bar */
.tab-bar {
  display: flex;
  align-items: flex-start;
  padding: 12px 20px;
  background: rgba(244,245,247,0.98);
  border-top: 1px solid rgba(16,17,20,0.10);
  flex: 0 0 auto;
  color: var(--ink);
}
.tab-bar .tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.tab-bar .tab i { width: 20px; height: 20px; border-radius: 6px; background: rgba(16,17,20,0.18); }
.tab-bar .tab span { font-weight: 600; font-size: 9.5px; letter-spacing: 0.4px; color: var(--muted-3); }
.tab-bar .tab.on i { background: var(--ink); }
.tab-bar .tab.on span { color: var(--ink); }
.tab-bar .add-btn {
  width: 46px;
  height: 46px;
  border-radius: 23px;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -10px;
  box-shadow: 0 6px 10px rgba(16,17,20,0.5);
  color: var(--paper);
  font-size: 26px;
  line-height: 30px;
  font-weight: 300;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rotor-item, .kind-pill .dot, .hero h1 .emph, .btn { transition: none; }
}
