:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bg: #fff7f9;
  --card: #ffffff;
  --ink: #4a3550;
  --muted: #8a7690;
  --pink: #ff7aa2;
  --pink-deep: #e8557f;
  --pink-soft: #ffe1ea;
  --pink-faint: #fff0f4;
  --rest: #ffc9d9;
  --lav: #c9b6ff;
  --lav-soft: #efe8ff;
  --peach: #ffd3b6;
  --mint: #bff0dd;
  --line: #f3e3ea;
  --radius: 22px;
  --shadow: 0 10px 30px -12px rgba(180, 90, 130, 0.25);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3 { font-family: var(--font); font-weight: 600; margin: 0; }

.blob {
  position: fixed; border-radius: 50%; filter: blur(60px); opacity: .55; z-index: -1; pointer-events: none;
}
.blob-a { width: 340px; height: 340px; background: var(--pink-soft); top: -120px; right: -100px; }
.blob-b { width: 300px; height: 300px; background: var(--lav-soft); bottom: -80px; left: -120px; }

.app {
  max-width: 480px; margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
}

.top { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 28px; color: var(--pink-deep); letter-spacing: .3px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; color: var(--muted);
  transition: background .2s, color .2s, transform .1s;
}
.icon-btn:hover { background: var(--pink-faint); color: var(--pink-deep); }
.icon-btn:active { transform: scale(.94); }

.card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}

/* Status */
.status {
  background: linear-gradient(140deg, #ffe7ef 0%, #fff3e9 55%, #f1eaff 100%);
  text-align: center; padding: 26px 20px 20px;
}
.mascot { display: block; margin: -6px auto 6px; animation: bob 3.2s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(232,85,127,.25)); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
.greeting { margin: 0 0 4px; font-weight: 700; color: var(--pink-deep); }
.status h2 { font-size: 26px; line-height: 1.2; margin-bottom: 6px; }
.status .muted { margin: 0 auto 18px; max-width: 32ch; }
.muted { color: var(--muted); }
.tiny { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.status-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.day-count {
  display: inline-grid; place-items: center;
  width: 92px; height: 92px; border-radius: 50%;
  background: #fff; color: var(--pink-deep);
  font-family: var(--font); font-size: 40px; font-weight: 600;
  box-shadow: 0 6px 18px -8px rgba(232,85,127,.5);
  margin: 6px auto 12px;
}
.day-count small { display: block; font-size: 12px; font-family: var(--font); font-weight: 700; color: var(--muted); margin-top: -26px; }

/* Buttons */
.btn {
  border-radius: 999px; padding: 14px 22px; font-weight: 800; font-size: 16px;
  transition: transform .1s, box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary {
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-deep) 100%);
  color: #fff; box-shadow: 0 8px 20px -8px rgba(232,85,127,.7);
}
.btn.primary:hover { box-shadow: 0 10px 24px -8px rgba(232,85,127,.85); }
.btn.soft { background: #fff; color: var(--pink-deep); box-shadow: inset 0 0 0 2px var(--pink-soft); }
.btn.soft.on { background: var(--pink-soft); }
.btn.ghost { color: var(--pink-deep); }
.btn.ghost:hover { background: var(--pink-faint); }
.btn.small { padding: 9px 16px; font-size: 14px; }
.btn.wide { width: 100%; margin-top: 8px; }
.btn.danger { color: #c4476b; background: #fff; box-shadow: inset 0 0 0 2px #ffd0dc; display: block; margin: 6px auto 14px; }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h3 { font-size: 20px; }
.weekdays, .grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.weekdays span { text-align: center; font-size: 12px; font-weight: 800; color: var(--muted); padding: 4px 0; }
.day {
  position: relative; aspect-ratio: 1 / 1; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: var(--ink);
  transition: background .15s, transform .1s;
}
.day:hover { background: var(--pink-faint); }
.day:active { transform: scale(.93); }
.day.empty { pointer-events: none; }
.day.future { color: #c9bccd; }
.day.today { box-shadow: inset 0 0 0 2px var(--lav); }
.day.today .num::after {
  content: "today"; display: block; font-size: 8px; text-transform: uppercase; letter-spacing: .5px; color: #9a83e6; margin-top: -2px;
}
.day.period { background: var(--pink); color: #fff; }
.day.period:hover { background: var(--pink-deep); }
.day.period.p-start { border-top-left-radius: 50%; border-bottom-left-radius: 50%; }
.day.period.p-end { border-top-right-radius: 50%; border-bottom-right-radius: 50%; }
.day.period.ongoing { background: linear-gradient(135deg, var(--pink), #ff9fbd); }
.day.period.today .num::after { color: #fff; }
.day.guess { background: repeating-linear-gradient(45deg, var(--pink-faint), var(--pink-faint) 4px, #fff 4px, #fff 8px); box-shadow: inset 0 0 0 1.5px var(--pink-soft); }
.marks { display: flex; gap: 2px; height: 8px; margin-top: 1px; align-items: center; }
.marks .d { width: 5px; height: 6px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #fff; }
.day:not(.period) .marks .d { background: var(--pink); }
.marks .c { width: 6px; height: 6px; border-radius: 50%; background: var(--peach); box-shadow: 0 0 0 1px #fff; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; margin: 14px 0 6px; font-size: 12px; color: var(--muted); font-weight: 700; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.dot.period { background: var(--pink); }
.dot.guess { background: repeating-linear-gradient(45deg, var(--pink-soft), var(--pink-soft) 2px, #fff 2px, #fff 4px); box-shadow: inset 0 0 0 1px var(--pink-soft); }
.drop-mini { width: 7px; height: 9px; background: var(--pink); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; display: inline-block; }
.cramp-mini { width: 9px; height: 9px; background: var(--peach); border-radius: 50%; display: inline-block; }
#todayBtn { display: block; margin: 4px auto 0; }

/* History */
.section-title { font-size: 18px; margin-bottom: 10px; }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.history li {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--pink-faint);
}
.history .h-icon { width: 38px; height: 38px; border-radius: 12px; background: #fff; display: grid; place-items: center; font-size: 18px; flex: none; }
.history .h-main { flex: 1; min-width: 0; }
.history .h-dates { font-weight: 800; }
.history .h-sub { font-size: 13px; color: var(--muted); }
.history .h-len { font-family: var(--font); font-weight: 600; color: var(--pink-deep); white-space: nowrap; }
.history .empty-msg { background: none; justify-content: center; color: var(--muted); text-align: center; padding: 6px; }

/* Tips */
.tips-intro { margin: -4px 0 12px; font-size: 14px; }
.tip-item { border-radius: 16px; background: var(--pink-faint); margin-bottom: 8px; overflow: hidden; }
.tip-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; font-weight: 800; font-size: 16px; position: relative;
}
.tip-item summary::-webkit-details-marker { display: none; }
.tip-item summary::after {
  content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2.5px solid var(--muted); border-bottom: 2.5px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s; margin-top: -4px;
}
.tip-item[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.t-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 19px; flex: none; }
.tip-body { padding: 0 16px 14px; font-size: 15px; line-height: 1.5; background: #fff; margin: 0 6px 6px; border-radius: 12px; padding-top: 4px; }
.tip-body p { margin: 10px 0; }
.tip-body ul { margin: 8px 0; padding-left: 4px; list-style: none; }
.tip-body li { margin: 7px 0; }
.tip-body ul.dots li { position: relative; padding-left: 18px; }
.tip-body ul.dots li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); }
.mini-title { font-weight: 800; color: var(--pink-deep); margin-bottom: 4px !important; }
.food-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.food-grid li { margin: 0; background: var(--pink-faint); border-radius: 10px; padding: 7px 10px; font-size: 14px; font-weight: 700; }
.note { background: var(--lav-soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.tip.iron { background: #ffeef0; }
.status-note { background: rgba(255,255,255,.75); border-radius: 14px; padding: 10px 14px; font-size: 14px; line-height: 1.45; margin: 14px 0 0; text-align: left; }
.status-note a { color: var(--pink-deep); font-weight: 800; }

.footer-note { text-align: center; font-size: 13px; color: var(--muted); margin: 4px 0 0; }

/* Sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(74, 53, 80, .3); backdrop-filter: blur(2px); z-index: 10; animation: fade .2s ease; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(480px, 100%); max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 28px 28px 0 0; z-index: 11;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px -10px rgba(120, 60, 100, .3);
  animation: up .28s cubic-bezier(.2, .9, .3, 1.1); overscroll-behavior: contain;
}
.sheet[hidden], .sheet-backdrop[hidden] { display: none; }
.sheet-handle { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; position: relative; cursor: pointer; }
.sheet-handle::after { content: ""; position: absolute; inset: -14px -40px; }
.sheet h3 { font-size: 22px; text-align: center; margin-bottom: 16px; }
.sheet-block { margin-bottom: 14px; }
.label { font-weight: 800; margin: 14px 0 8px; font-size: 15px; display: block; }

.btn.toggle {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--pink-faint); color: var(--pink-deep); box-shadow: inset 0 0 0 2px var(--pink-soft);
}
.btn.toggle[aria-pressed="true"] { background: linear-gradient(135deg, var(--pink), var(--pink-deep)); color: #fff; box-shadow: 0 8px 20px -8px rgba(232,85,127,.7); }
.toggle-icon { font-size: 20px; }
.start-end { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }

.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px; border-radius: 18px; background: #fff; font-weight: 800; font-size: 14px;
  box-shadow: inset 0 0 0 2px var(--line); transition: background .15s, box-shadow .15s, transform .1s;
}
.choice:active { transform: scale(.95); }
.choice:hover { box-shadow: inset 0 0 0 2px var(--pink-soft); }
.choice[aria-checked="true"] { background: var(--pink-faint); box-shadow: inset 0 0 0 2.5px var(--pink); color: var(--pink-deep); }
.drops { display: flex; gap: 3px; height: 22px; align-items: flex-end; }
.drops i { width: 13px; height: 18px; background: var(--pink); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; display: block; }
.emo { font-size: 22px; line-height: 22px; }
.tip { background: #fff8e8; border-radius: 16px; padding: 12px 14px; font-size: 14px; line-height: 1.45; margin: 12px 0 0; }

.field input {
  width: 100%; padding: 13px 16px; border-radius: 16px; border: 2px solid var(--line);
  font: inherit; color: var(--ink); outline: none; transition: border .2s;
}
.field input:focus { border-color: var(--pink); }
.about { background: var(--lav-soft); border-radius: 18px; padding: 4px 16px; margin: 16px 0; font-size: 14px; line-height: 1.5; }

.toast {
  position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translate(-50%, -30px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 20; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes up { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- v2 features ---------- */
.small-text { font-size: 14px; line-height: 1.45; margin: 4px 0 10px; }
.light { font-weight: 600; font-size: 13px; }
.section-title.sub { margin-top: 20px; }
[hidden] { display: none !important; }

/* Getting ready */
.ready-card { background: linear-gradient(160deg, #f1fbf5 0%, #fff 60%); }
.checklist { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; }
.checklist label { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); cursor: pointer; font-weight: 700; font-size: 15px; }
.checklist input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border-radius: 8px; border: 2.5px solid var(--pink-soft); flex: none; display: grid; place-items: center; margin: 0; background: #fff; transition: background .15s, border-color .15s; }
.checklist input:checked { background: var(--pink); border-color: var(--pink); }
.checklist input:checked::after { content: "✓"; color: #fff; font-weight: 900; font-size: 15px; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--pink-soft); }
.sign-list { list-style: none; padding: 0; margin: 4px 0 12px; }
.sign-list li { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; line-height: 1.45; font-size: 15px; }
.sign-list li span { flex: none; font-size: 18px; width: 26px; text-align: center; }

/* Calendar marks */
.marks .s { width: 6px; height: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--pink); background: transparent; }
.day.period .marks .s { box-shadow: inset 0 0 0 1.5px #fff; }
.marks .n { width: 5px; height: 5px; border-radius: 50%; background: #9a83e6; }
.day.period .marks .n { background: #fff; opacity: .8; }
.spot-mini { width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--pink); display: inline-block; }
.note-mini { width: 8px; height: 8px; border-radius: 50%; background: #9a83e6; display: inline-block; }

/* My cycles */
.cycle-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat { background: var(--pink-faint); border-radius: 16px; padding: 10px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-family: var(--font); font-size: 26px; color: var(--pink-deep); font-weight: 600; line-height: 1.1; }
.stat b i { font-style: normal; font-size: 13px; margin-left: 3px; color: var(--muted); font-family: var(--font); font-weight: 700; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 700; line-height: 1.25; }
.cycle-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.cycle-legend span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 14px; height: 10px; border-radius: 4px; display: inline-block; }
.k-period { background: var(--pink); }
.k-rest { background: var(--rest); }
.k-normal { background: #dcf3e6; box-shadow: inset 0 0 0 1px #b7e4cb; }
.cycles { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.cycle-btn { width: 100%; text-align: left; padding: 10px 12px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); transition: background .15s; }
.cycle-btn:hover { background: var(--pink-faint); }
.cycle-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.cycle-date { font-weight: 800; }
.cycle-len { font-size: 13px; font-weight: 800; color: var(--pink-deep); }
.cycle-len.flag { color: #b9852a; }
.track { position: relative; height: 14px; border-radius: 7px; background: #f6eef2; display: flex; overflow: hidden; }
.track .band { position: absolute; top: 0; bottom: 0; background: #dcf3e6; box-shadow: inset 0 0 0 1px #c3e9d4; }
.track .seg { position: relative; height: 100%; }
.track .seg.period { background: var(--pink); border-radius: 7px 0 0 7px; }
.track .seg.rest { background: var(--rest); opacity: .85; border-radius: 0 7px 7px 0; }
.track .seg.rest.current { background: repeating-linear-gradient(90deg, var(--rest) 0 6px, transparent 6px 10px); }
.cycle-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; font-weight: 600; }
.cycle-note { font-size: 13px; color: var(--muted); padding: 8px 4px 0; line-height: 1.45; }
.cycle-note a, .status-note a { color: var(--pink-deep); font-weight: 800; }
#showAllCycles { display: block; margin: 8px auto 0; }
#summaryBtn { margin-top: 12px; }
.summary-text { width: 100%; font: 13.5px/1.5 ui-monospace, Menlo, monospace; color: var(--ink); border: 2px solid var(--line); border-radius: 14px; padding: 12px; resize: vertical; background: #fffafc; }

/* Day sheet extras */
.choices.four { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.choices.four .choice { padding: 12px 2px; font-size: 13px; }
.drops i.tiny-drop { width: 7px; height: 9px; opacity: .7; }
.tip.spot { background: var(--pink-faint); }
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mood { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 24px; padding: 8px 0; border-radius: 16px; box-shadow: inset 0 0 0 2px var(--line); background: #fff; transition: transform .1s, box-shadow .15s, background .15s; }
.mood small { font-size: 11px; font-weight: 800; color: var(--muted); }
.mood[aria-checked="true"] { background: var(--lav-soft); box-shadow: inset 0 0 0 2.5px var(--lav); }
.mood:active, .chip:active { transform: scale(.95); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 13px; border-radius: 999px; font-weight: 800; font-size: 14px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); transition: background .15s, box-shadow .15s; }
.chip[aria-pressed="true"] { background: var(--lav-soft); box-shadow: inset 0 0 0 2.5px var(--lav); color: #5b46a8; }
.note-field textarea { width: 100%; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); font: inherit; color: var(--ink); resize: vertical; outline: none; min-height: 60px; }
.note-field textarea:focus { border-color: var(--pink); }

/* Settings */
.set-block { border-top: 2px dashed var(--line); padding-top: 4px; margin-top: 14px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns.center { justify-content: center; margin: 10px 0 4px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.small-toggle { padding: 11px 16px; font-size: 15px; }
.pin-setup, .confirm-box { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--pink-faint); padding: 12px; border-radius: 16px; }
.pin-setup input { padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); font: inherit; font-size: 20px; letter-spacing: 6px; text-align: center; outline: none; }
.pin-setup input:focus { border-color: var(--pink); }
.pin-msg { color: #c4476b; margin: 0; min-height: 1em; }

/* Lock screen */
.lock { position: fixed; inset: 0; z-index: 50; background: linear-gradient(160deg, #ffe7ef 0%, #fff3e9 55%, #f1eaff 100%); display: grid; place-items: center; padding: 24px; }
.lock-inner { text-align: center; max-width: 320px; width: 100%; }
.lock-inner h2 { font-size: 26px; margin: 6px 0 4px; }
.lock-inner .muted { margin: 0 0 14px; }
#lockInput { width: 180px; padding: 14px; border-radius: 18px; border: 2.5px solid var(--pink-soft); font: inherit; font-size: 30px; letter-spacing: 14px; text-align: center; outline: none; background: #fff; }
#lockInput:focus { border-color: var(--pink); }
.lock-msg { color: #c4476b; font-weight: 700; min-height: 1.4em; margin: 10px 0; }
.forgot { background: #fff; border-radius: 16px; padding: 12px; margin-bottom: 8px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* Confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.confetti i { position: absolute; top: -14px; width: 9px; height: 13px; border-radius: 3px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .9; } }

/* Promises */
.promise-card { background: linear-gradient(160deg, #fff 0%, #fff7fa 100%); }
.promise-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.promise-list li { display: flex; gap: 12px; align-items: flex-start; }
.p-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none; }
.promise-list b { display: block; font-size: 15.5px; margin-top: 2px; }
.promise-list p { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.footer-note a { color: var(--pink-deep); font-weight: 800; text-decoration: none; }
.footer-note { line-height: 1.7; }

/* Welcome tour */
.tour { position: fixed; inset: 0; z-index: 45; background: linear-gradient(160deg, #ffe7ef 0%, #fff3e9 55%, #f1eaff 100%); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.tour-card { position: relative; width: min(420px, 100%); background: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: 40px 22px 16px; text-align: center; }
.tour-skip { position: absolute; top: 14px; right: 16px; font-weight: 800; color: var(--muted); padding: 6px 10px; border-radius: 999px; }
.tour-skip:hover { background: var(--pink-faint); }
.tour-slide { min-height: 330px; display: flex; flex-direction: column; align-items: center; justify-content: center; animation: tourIn .3s ease; }
.tour-slide h2 { font-size: 25px; margin: 14px 0 8px; }
.tour-slide p { color: var(--muted); line-height: 1.5; margin: 0 0 8px; max-width: 32ch; font-size: 16px; }
.tour-small { font-size: 14px !important; }
.tour-dottie { display: flex !important; align-items: center; gap: 10px; margin: 14px 0 0 !important; padding: 8px 14px 8px 8px; background: var(--pink-faint); border-radius: 20px; text-align: left; font-size: 14px !important; font-weight: 700; color: var(--pink-deep) !important; line-height: 1.3; }
.tour-dottie img { width: 44px; height: 44px; flex: none; }
@keyframes tourIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.tour-big { font-size: 64px; line-height: 1; width: 110px; height: 110px; border-radius: 32px; background: var(--pink-faint); display: grid; place-items: center; }
.mini-cal { display: grid; grid-template-columns: repeat(7, 30px); gap: 5px; padding: 14px; border-radius: 20px; background: var(--pink-faint); }
.mini-cal i { width: 30px; height: 30px; border-radius: 9px; background: #fff; }
.mini-cal i.p { background: var(--pink); }
.mini-cal i.s { border-radius: 50% 9px 9px 50%; }
.mini-cal i.e { border-radius: 9px 50% 50% 9px; }
.mini-cal i.t { box-shadow: inset 0 0 0 2.5px var(--lav); }
.tour-pill { width: 130px; height: 130px; border-radius: 50%; background: #fff; box-shadow: 0 8px 22px -8px rgba(232,85,127,.5), inset 0 0 0 6px var(--pink-faint); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tour-pill b { font-family: var(--font); font-size: 44px; color: var(--pink-deep); font-weight: 600; line-height: 1; }
.tour-pill span { font-size: 13px; font-weight: 800; color: var(--muted); }
.tour-checks { list-style: none; padding: 0; margin: 4px 0 0; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.tour-checks li { position: relative; padding-left: 30px; font-weight: 700; line-height: 1.4; }
.tour-checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--pink); color: #fff; font-size: 13px; font-weight: 900; display: grid; place-items: center; }
.tour-name { width: 100%; text-align: left; margin: 6px 0 12px; }
.tour-choices { width: 100%; display: flex; flex-direction: column; gap: 4px; }
.tour-choices .btn.wide { margin-top: 4px; }
.tour-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.tour-dots { display: flex; gap: 6px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width .2s, background .2s; }
.tour-dots i.on { width: 22px; background: var(--pink); }
.tour-step { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Title bar */
.top {
  position: sticky; top: max(10px, env(safe-area-inset-top)); z-index: 5;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-radius: 22px; padding: 8px 8px 8px 10px;
  box-shadow: 0 8px 24px -14px rgba(180, 90, 130, .45), inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.brand { gap: 11px; }
.brand img { border-radius: 12px; box-shadow: 0 4px 10px -4px rgba(232, 85, 127, .4); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.tagline { margin: 9px 0 0; font-size: 11.5px; font-weight: 800; color: var(--muted); letter-spacing: .4px; }
.top .icon-btn { background: var(--pink-faint); }
:focus-visible { outline: 3px solid #c9b6ff; outline-offset: 2px; }
.btn:focus:not(:focus-visible), .choice:focus:not(:focus-visible) { outline: none; }

/* Wordmark: mydotdays. (Limelight, self-hosted, SIL OFL) */
@font-face { font-family: "Limelight"; src: url("/fonts/Limelight-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
.wordmark { font-family: "Limelight", var(--font); font-weight: 400; font-size: 27px; letter-spacing: 0; line-height: 1; display: flex; align-items: baseline; }
.wm-my { color: var(--wm-my, #9a83e6); } /* default purple; the theme color changes only this word */
.wm-dotword { color: #e8557f; }
.wm-days { color: var(--ink); }
.wm-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, #ff8fb3, #e5407a); margin-left: 2px; margin-right: 22px; display: inline-block; }
.wm-dot::before, .wm-dot::after { content: ""; position: absolute; top: 0; width: 7px; height: 7px; border-radius: 50%; background: inherit; }
.wm-dot::before { left: 10px; }
.wm-dot::after { left: 20px; }
.tagline { margin: 5px 0 0; }
@media (max-width: 360px) { .wordmark { font-size: 22px; } }

/* "day 3" badge: label above the number */
.day-count { grid-template-rows: auto auto; align-content: center; gap: 0; line-height: 1; }
.day-count small { margin: 0 0 2px !important; font-size: 13px; letter-spacing: .5px; text-transform: lowercase; }
.brand-text { justify-content: center; }

/* ---------- Bottom tabs ---------- */
.tab-hidden { display: none !important; }
.app { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 9;
  width: min(456px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px;
  background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-radius: 24px; box-shadow: 0 10px 30px -12px rgba(180, 90, 130, .45), inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; border-radius: 18px; color: var(--muted); font-size: 11.5px; font-weight: 800; transition: background .15s, color .15s; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tab svg .fill { fill: currentColor; stroke: none; }
.tab[aria-selected="true"] { background: var(--pink-faint); color: var(--pink-deep); }
.tab[aria-selected="true"] svg path:first-child { fill: rgba(255, 122, 162, .18); }
.tab:active { transform: scale(.96); }
.tiny a, #otherDayHint a { color: var(--pink-deep); font-weight: 800; }
.toast { z-index: 30; }

/* Plus (demo paywall) */
.plus-pill { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: linear-gradient(135deg,#ffe29a,#ffc2d6); color: #7a3a00; vertical-align: middle; margin-left: 4px; }
.plus-list { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 10px; }
.plus-list li { display: flex; gap: 12px; align-items: flex-start; }
.plus-list li > span { font-size: 22px; width: 40px; height: 40px; border-radius: 12px; background: var(--pink-soft); display: grid; place-items: center; flex: none; }
.plus-list b { display: block; }
.plus-list p { margin: 2px 0 0; font-size: 14px; color: var(--muted, #8a7a99); }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 16px 8px 12px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font: inherit; color: var(--ink); cursor: pointer; }
.plan span { font-size: 20px; font-weight: 800; color: var(--pink-deep); }
.plan[aria-checked="true"] { border-color: var(--pink-deep); background: var(--pink-soft); }
.plan i { position: absolute; top: -9px; font-style: normal; font-size: 11px; font-weight: 800; background: var(--pink-deep); color: #fff; padding: 2px 8px; border-radius: 999px; }
.center-text { text-align: center; }
.link-btn { background: none; border: 0; color: var(--pink-deep); font: inherit; text-decoration: underline; padding: 6px 0; cursor: pointer; }

/* Themes (Plus) */
html[data-theme="bubblegum"] { --wm-my:#e5407a; }
html[data-theme="lavender"] { --wm-my:#7c5ce0; --bg:#f7f4ff; --pink:#a98bff; --pink-deep:#7c5ce0; --pink-soft:#e9e1ff; --pink-faint:#f4f0ff; --lav:#ffc2d9; --lav-soft:#ffe9f1; --rest:#d9ccff; }
html[data-theme="mint"] { --wm-my:#1f9e7c; --bg:#f1fbf7; --pink:#3fc7a0; --pink-deep:#1f9e7c; --pink-soft:#d3f4e8; --pink-faint:#e9faf3; --lav:#b6d9ff; --lav-soft:#e4f1ff; --rest:#b5ecd7; }
html[data-theme="sunset"] { --wm-my:#e5702f; --bg:#fff8f1; --pink:#ff9a62; --pink-deep:#e5702f; --pink-soft:#ffe3d0; --pink-faint:#fff1e6; --lav:#ffd36b; --lav-soft:#fff3d0; --rest:#ffd0b0; }
html[data-theme="ocean"] { --wm-my:#2f7de0; --bg:#f1f8ff; --pink:#5aa9ff; --pink-deep:#2f7de0; --pink-soft:#d9eaff; --pink-faint:#eaf4ff; --lav:#c9b6ff; --lav-soft:#efe8ff; --rest:#bcdcff; }
.swatches { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
.swatch { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); cursor: pointer; font-size: 15px; display: grid; place-items: center; padding: 0; }
.swatch[aria-checked="true"] { box-shadow: 0 0 0 3px var(--pink-deep); }
.swatch .lock { position: absolute; right: -6px; bottom: -6px; font-size: 13px; background: #fff; border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.color { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 2px var(--line); font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; }
.color i { width: 34px; height: 34px; border-radius: 50%; display: block; }
.color[aria-checked="true"] { box-shadow: inset 0 0 0 3px var(--pink-deep); background: var(--pink-faint); }
.day { position: relative; }
.insights { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 10px; }
.insights li { display: flex; gap: 12px; align-items: center; background: var(--pink-faint); border-radius: 16px; padding: 10px 12px; font-size: 15px; line-height: 1.35; }
.insights li > span { font-size: 24px; flex: none; }
.insights.blurred li { filter: blur(4px); user-select: none; }
.insights-card .muted-line { color: var(--muted); font-size: 14px; margin: 6px 0 10px; }
.status-note.ease { background: var(--pink-faint); border-radius: 14px; padding: 10px 12px; }
.est-tag { background: #fff0a8; color: #6a5200; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }

/* Branded sheet titles: Limelight like the wordmark */
.brand-title { font-family: "Limelight", var(--font); font-weight: 400; font-size: 30px; letter-spacing: 0; text-align: center; line-height: 1.1; margin: 4px 0 8px; }
.brand-title .wm-plus { margin-left: .3em; background: linear-gradient(135deg, #f5b942, #e5702f); -webkit-background-clip: text; background-clip: text; color: transparent; }

.color-guide { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 10px; }
.color-guide li { display: flex; gap: 12px; align-items: center; }
.color-guide li > i { width: 30px; height: 30px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px rgba(0,0,0,.06); }
.color-guide b { display: block; }

.cal-lock { grid-column: 1 / -1; text-align: center; padding: 28px 12px; display: grid; gap: 10px; justify-items: center; }
.cal-lock-ico { font-size: 34px; }
.cal-lock p { margin: 0; color: var(--muted); font-size: 14px; max-width: 280px; }

/* Legal pages */
.legal-page .app { gap: 14px; }
.legal-home { display: inline-block; text-decoration: none; padding: 4px 4px 0; }
.legal-card { padding: 22px 20px 26px; line-height: 1.55; }
.legal-card h1 { font-size: 26px; color: var(--pink-deep); margin-bottom: 2px; }
.legal-card h2 { font-size: 17px; margin: 22px 0 6px; color: var(--ink); }
.legal-card p, .legal-card li { font-size: 15px; }
.legal-card ul { padding-left: 20px; margin: 8px 0; }
.legal-card li { margin: 5px 0; }
.legal-card a { color: var(--pink-deep); font-weight: 700; }
.legal-updated { color: var(--muted); font-size: 13px !important; margin: 0 0 14px; }
.legal-summary { background: var(--lav-soft); border-radius: 16px; padding: 12px 16px; }
.legal-summary b { display: block; margin-bottom: 4px; }
.legal-summary ul { margin: 4px 0 2px; }
.legal-nav { text-align: center; font-size: 14px; color: var(--muted); padding: 4px 0 16px; line-height: 1.8; }
.legal-nav a { color: var(--pink-deep); font-weight: 800; text-decoration: none; }
.todo { background: #fff0a8; border-radius: 4px; padding: 0 4px; }

/* Family profiles */
.top-actions { display: flex; align-items: center; gap: 8px; }
.profile-btn { font-size: 22px; line-height: 1; }
.who-list { display: grid; gap: 10px; margin: 12px 0 4px; }
.who-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 20px; background: #fff; box-shadow: 0 2px 10px rgba(200,100,140,.15), inset 0 0 0 2px var(--pink-soft); font: inherit; font-weight: 800; font-size: 18px; color: var(--ink); text-align: left; }
.who-emoji { font-size: 30px; }
.who-name { flex: 1; }
.who-badge { font-size: 13px; color: var(--muted); font-weight: 700; }
.swatch.avatar { background: #fff; font-size: 24px; }
