/* Luna — design tokens from the flyer/artifact:
   warm cream #FAF3EA, deep-brown serif #6E4525, gold #C6A15B,
   pale blush cards #FDEEE6, peach chips #F8DCD1, blush-pink pill #F0B49D.
   Phone-first: ~430px column, 16px inputs, sticky bottom button. */
:root {
  --cream: #FAF3EA;
  --brown: #6E4525;
  --gold: #C6A15B;
  --card: #FDEEE6;
  --chip: #F8DCD1;
  --primary: #F0B49D;
  --ink: #4A3220;
  --red: #B3402E;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 430px; margin: 0 auto; padding: 20px 18px 110px; }
h1, h2, .serif { font-family: Georgia, "Times New Roman", serif; color: var(--brown); }
h1 { font-size: 40px; margin: 6px 0 2px; text-align: center; }
h2 { font-size: 24px; margin: 10px 0 12px; }
.center { text-align: center; }
.moon { display: flex; justify-content: center; margin-top: 26px; }
.sub { text-align: center; color: var(--brown); opacity: .85; margin: 2px 0 18px; }

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 18px;
  margin: 14px 0;
  box-shadow: 0 1px 3px rgba(110, 69, 37, .08);
}
label { display: block; font-size: 14px; color: var(--brown); margin: 12px 0 5px; font-weight: 600; }
input, select, textarea {
  width: 100%; font-size: 16px; padding: 12px;
  border: 1.5px solid #E5CDBB; border-radius: 12px;
  background: #FFFDF9; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.invalid input, .invalid select, .invalid textarea, input.invalid, select.invalid {
  border-color: var(--red) !important; outline-color: var(--red);
}
.invalid label, label.invalid { color: var(--red); }
textarea { min-height: 74px; resize: vertical; }
.row2 { display: flex; gap: 10px; }
.row2 > * { flex: 1; }
.unit-row { display: flex; gap: 10px; }
.unit-row input { flex: 2; }
.unit-row select { flex: 1; }

.btn {
  display: block; width: 100%; border: none; cursor: pointer;
  background: var(--primary); color: var(--brown);
  font-size: 17px; font-weight: 700; padding: 15px 18px;
  border-radius: 999px; margin: 12px 0; text-align: center; text-decoration: none;
}
.btn:active { transform: scale(.99); }
.btn.secondary { background: #FFFDF9; border: 1.5px solid var(--gold); }
.btn.ghost { background: transparent; color: var(--brown); font-weight: 600; }
.btn.google { background: #fff; border: 1.5px solid #DADCE0; color: #3c4043; font-weight: 600; }
.btn[disabled] { opacity: .55; cursor: default; }
.linklike { background: none; border: none; color: var(--brown); text-decoration: underline; cursor: pointer; font-size: 15px; padding: 6px; }
.linklike[disabled] { opacity: .55; text-decoration: none; cursor: default; }
.resend-row { margin-top: 2px; }
.small { font-size: 13.5px; opacity: .85; }
.note { font-size: 14px; line-height: 1.45; }
.error { color: var(--red); font-size: 14.5px; min-height: 20px; margin: 6px 0; }
.notice-line { font-size: 14px; margin: 8px 0 2px; }

.sticky-bottom {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, var(--cream) 30%);
  padding: 18px 18px calc(14px + env(safe-area-inset-bottom));
}
.sticky-bottom .inner { max-width: 430px; margin: 0 auto; }
.progress { margin-top: 8px; }
.progress .bar { height: 8px; background: var(--chip); border-radius: 99px; overflow: hidden; }
.progress .fill { height: 100%; background: var(--gold); border-radius: 99px; transition: width .4s; }
.progress .cap { font-size: 12.5px; color: var(--brown); text-align: center; margin-top: 5px; }

.banner {
  background: #FFF6EC; border: 1.5px solid var(--gold);
  border-radius: 14px; padding: 12px 14px; margin: 10px 0;
  display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45;
}
.banner .x { margin-left: auto; background: none; border: none; font-size: 17px; cursor: pointer; color: var(--brown); }
.ready-notice {
  background: var(--card); border: 1.5px dashed var(--gold);
  border-radius: 14px; padding: 12px 14px; margin: 10px 0; text-align: center; font-size: 16px;
}

.play-card { text-align: center; padding: 26px 18px; }
.play-btn {
  width: 118px; height: 118px; border-radius: 50%;
  background: var(--primary); border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(110, 69, 37, .18);
}
.play-btn svg { width: 46px; height: 46px; fill: var(--brown); }
.play-msg { min-height: 22px; margin-top: 12px; font-size: 15.5px; color: var(--brown); font-style: italic; }
.end-zone { margin-top: 12px; }
.task-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.check-box { width: 26px; height: 26px; border: 2px solid var(--gold); border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: #fff; flex: none; background: transparent; }
.check-box.done { background: var(--gold); }
.start-day-line { font-size: 13.5px; color: var(--brown); opacity: .8; margin-top: 4px; }

/* Home: one white card holds the cycle toggle (main switch), the start
   day, and the big play/pause button. The toggle's filled segment and
   white knob sit on the Started side (left, blush pink) or the Ended
   side (right, dusty rose). */
.home-card { background: #FFFDF9; text-align: center; padding: 22px 18px 20px; border-radius: 22px; box-shadow: 0 2px 10px rgba(110, 69, 37, .09); }
.cycle-toggle {
  position: relative; display: flex; align-items: center; height: 52px;
  border-radius: 999px; background: #FFFDF9; border: 1.5px solid #EAD9C8;
  cursor: pointer; overflow: hidden; padding: 4px;
}
.ct-fill {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: 55%;
  border-radius: 999px; background: #F6CDBE; transition: left .3s ease, right .3s ease, background .3s ease;
}
.cycle-toggle.ended .ct-fill { left: auto; right: 4px; background: #DFA19B; }
.ct-knob {
  position: relative; z-index: 1; flex: none; width: 42px; height: 42px;
  border-radius: 50%; background: #FFFDF9; box-shadow: 0 1px 5px rgba(110, 69, 37, .28);
}
.ct-label { position: relative; z-index: 1; flex: 1; text-align: center; font-size: 15.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.home-card .start-day-line { text-align: center; margin-top: 14px; font-size: 14.5px; }
.play-btn.big { width: 92px; height: 92px; margin-top: 16px; }
.play-btn.big svg { width: 36px; height: 36px; }
.play-btn[disabled] { cursor: default; }
.home-card .play-msg { font-style: normal; color: var(--ink); font-size: 16px; margin-top: 12px; }
.option-btn .opt-ico { width: 19px; height: 19px; color: var(--gold); flex: none; margin-right: 12px; }
.option-btn .opt-label { flex: 1; }

/* Cycle slider: three stops — Before (soft gold) · Started (pink) ·
   Ended (rose). The filled pill carries the white knob and the current
   phase's full label; the other stops show as small side captions. */
.seg3 { display: flex; align-items: stretch; gap: 4px; background: #F7F1E6; border-radius: 20px; padding: 5px; }
.seg3-opt { flex: 1; border: none; background: transparent; border-radius: 15px; padding: 10px 4px; font-size: 14.5px; font-weight: 500; color: #A98F6F; cursor: pointer; line-height: 1.25; }
.seg3-opt.active { flex: 1.45; background: #F6DDCE; color: var(--brown); font-weight: 700; box-shadow: 0 1px 4px rgba(110, 69, 37, .12); }
.phase-line { text-align: center; margin-top: 14px; font-size: 14.5px; color: var(--brown); opacity: .85; }
.care-note { margin: 16px auto 0; max-width: 300px; background: #FFF6EC; border: 1.5px dashed var(--gold); border-radius: 14px; padding: 10px 12px; font-size: 14px; line-height: 1.5; color: var(--ink); }
.care-head { font-family: Georgia, "Times New Roman", serif; font-size: 18px; font-weight: 700; color: var(--brown); margin-top: 16px; }
.done-btn { display: block; width: 100%; border: 1.5px solid #E0BBA6; background: #FFFDF9; color: var(--brown); font-size: 15.5px; font-weight: 600; padding: 14px; border-radius: 999px; margin: 12px 0; cursor: pointer; }

.option-btn {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; background: #FFFDF9; border: 1.5px solid #E5CDBB;
  border-radius: 14px; padding: 16px; font-size: 16.5px; color: var(--ink);
  margin: 10px 0; cursor: pointer; text-align: left;
}
.option-btn .chev { color: var(--gold); font-weight: 700; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.chip {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid #E0BBA6;
  background: var(--chip); color: var(--brown); font-size: 15px; font-weight: 600; cursor: pointer;
}
.chip.sel { background: var(--gold); color: #fff; border-color: var(--gold); }
.scale-legend { font-size: 12.5px; color: var(--brown); opacity: .85; margin: 2px 0 8px; }
.rating-q { font-size: 15.5px; font-weight: 600; color: var(--brown); margin-top: 14px; }

.timing-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.timing-row select { width: 76px; flex: none; }
.timing-row .days { font-size: 15px; color: var(--brown); }
.timing-row label { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15.5px; }
.timing-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--gold); }

.photo-preview { width: 100%; border-radius: 14px; margin-top: 10px; display: none; }
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(74, 50, 32, .45); z-index: 40;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--cream); width: 100%; max-width: 430px;
  border-radius: 20px 20px 0 0; padding: 18px;
}
.list-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #EFE0D2; font-size: 15px; }
.list-row:last-child { border-bottom: none; }
.remove-btn { background: none; border: none; color: var(--red); cursor: pointer; font-size: 14px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; }
.count-chip { background: var(--chip); border-radius: 999px; padding: 4px 12px; font-size: 14px; color: var(--brown); font-weight: 600; }
.locklink { font-size: 13.5px; color: var(--brown); }
.topbar { display: flex; align-items: center; margin-bottom: 4px; }
.topbar .back { background: none; border: none; font-size: 22px; color: var(--brown); cursor: pointer; padding: 4px 8px 4px 0; }

/* "← Back" pill pinned to the top-left on the form/flow screens: it
   leaves the flow (and ends the session) back to the welcome screen.
   Lives outside #app so screen re-renders never remove it; z-index sits
   below the bottom sheet (40) and above page content. While it shows,
   .wrap gets extra top padding so headings/topbars clear it. */
.flow-back {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 12px; z-index: 30;
  background: rgba(255, 253, 249, .94); border: 1.5px solid var(--gold); color: var(--brown);
  font-size: 13.5px; font-weight: 600; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  box-shadow: 0 1px 4px rgba(110, 69, 37, .14);
}
.flow-back[hidden] { display: none; }
.flow-back:active { transform: scale(.98); }
.wrap.has-flow-back { padding-top: 58px; }

/* Slider change confirmation (her design, 2026-10-26) */
.modal-scrim { position: fixed; inset: 0; background: rgba(91, 70, 50, .48); display: flex; align-items: center; justify-content: center; padding: 22px; z-index: 60; }
.modal-card { background: #FFFBF4; border-radius: 26px; padding: 28px 24px 22px; width: 100%; max-width: 340px; text-align: center; box-shadow: 0 18px 44px rgba(62, 44, 28, .35); }
.modal-flower { font-size: 34px; }
.modal-title { font-family: Georgia, 'Times New Roman', serif; font-size: 23px; font-weight: 700; color: #3E2C1C; margin: 10px 0 0; line-height: 1.25; }
.modal-body { margin-top: 12px; font-size: 15.5px; line-height: 1.5; color: #7A6A58; }
.modal-body b { color: #3E2C1C; }
.modal-yes { margin-top: 20px; width: 100%; border: none; border-radius: 999px; padding: 16px; font-size: 16.5px; font-weight: 700; color: #5B4632; background: #EBB096; cursor: pointer; }
.modal-no { margin-top: 8px; width: 100%; border: none; background: none; padding: 12px; font-size: 16px; font-weight: 600; color: #6E4525; cursor: pointer; }

/* Cycle updates in the Period Tracker */
.cycle-row { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid #F3E7D8; }
.cycle-row:last-child { border-bottom: none; }
.cdot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex: none; }
.cdot.gold { background: #D9A94A; } .cdot.pink { background: #E58CA6; } .cdot.rose { background: #C97B84; } .cdot.gray { background: #C9BBA6; }
.cycle-main { display: flex; flex-direction: column; }
.cycle-what { font-size: 15px; font-weight: 600; color: #6E4525; }
.cycle-when { font-size: 13px; color: #A98F6F; margin-top: 2px; }

/* Phase confirmation: Change Date reveal */
.modal-change { margin-top: 14px; border: none; background: none; padding: 6px 10px; font-size: 15.5px; font-weight: 700; color: #C07A4E; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pm-date-row { margin-top: 8px; }
.pm-date-row input[type="date"] { width: 100%; padding: 13px 14px; border: 1.5px solid #EAD9C8; border-radius: 14px; font-size: 16px; color: var(--brown); background: #FFFDF9; }

/* Period Tracker calendar (her design, 2026-10-26) */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title { font-family: Georgia, 'Times New Roman', serif; font-size: 21px; font-weight: 700; color: #141414; }
.cal-nav { width: 38px; height: 38px; border-radius: 50%; border: none; background: #F9EEE9; color: var(--brown); font-size: 19px; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px 0; }
.calcard { padding-left: 10px; padding-right: 10px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 600; color: #A79B8B; padding: 4px 0; }
.cal-cell { position: relative; border: none; background: none; min-width: 0; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 15px; color: #3A2C20; cursor: pointer; border-radius: 50%; }
.cal-cell.empty { cursor: default; }
.cal-cell .cal-num { position: relative; width: 120%; max-width: 68px; flex: none; aspect-ratio: 1 / 1; border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 1.1; }
.cal-cell.period .cal-num { background: #F9CDBE; font-weight: 700; }
.cal-cell.today .cal-num { box-shadow: inset 0 0 0 2px #C4A467; font-weight: 700; }
.cal-cell .cal-heal { position: absolute; bottom: 11%; left: 0; right: 0; text-align: center; font-size: 10.5px; color: #C07C92; line-height: 1; }
.cal-legend { display: flex; gap: 18px; justify-content: center; margin-top: 12px; font-size: 13.5px; color: #9A8871; align-items: center; }
.cal-sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #F9CDBE; margin-right: 6px; vertical-align: -1px; }
.cal-fl { color: #C07C92; margin-right: 6px; font-size: 14px; vertical-align: -1px; }

/* Day sheet: Period start / Period end Yes-No segments (her design) */
.rose-flower { color: #C97B84; }
.sw-row { display: flex; align-items: center; justify-content: space-between; background: #FDEEE6; border-radius: 16px; padding: 13px 15px; margin-top: 12px; }
.sw-row .lab { font-size: 16.5px; font-weight: 700; color: var(--ink); }
.ynseg { display: flex; width: 118px; height: 42px; border-radius: 13px; background: #EFE9E2; padding: 3px; flex: none; }
.ynseg .half { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: #A39E97; border-radius: 10px; cursor: pointer; }
.ynseg .half.sel { background: #D48C9E; color: #fff; box-shadow: 0 2px 6px rgba(110, 69, 37, .22); }
#day-sheet .modal-yes { background: #EBB096; }

/* Tracker cards match her design: near-white, not blush */
.tcard { background: #FFFDFA; }

/* Reward after form: Share Your Experience + consent card (her design) */
.share-h { font-size: 19px; font-weight: 800; color: #1A1A1A; margin: 18px 0 6px; }
.consent-card { background: #FFFBF4; border-radius: 16px; padding: 16px; margin-top: 16px; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; margin-top: 10px; cursor: pointer; }
.consent-row input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: #C97B84; }

/* Thank-you gift page (replaces the 2nd free month offer, 2026-10-26) */
.gift-card { background: #F7E8DE; border-radius: 20px; padding: 24px 18px; text-align: center; margin-top: 16px; }
.gift-label { font-size: 12px; letter-spacing: 2.5px; font-weight: 700; color: #A98F6F; }
.gift-big { font-family: Georgia, 'Times New Roman', serif; font-size: 46px; font-weight: 700; color: #B26A4E; margin: 10px 0 6px; }
.price-card { background: #FFFDFA; border: 1.5px solid #E8DCCB; border-radius: 16px; padding: 4px 16px; margin-top: 16px; }
.price-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; font-size: 15px; }
.price-row + .price-row { border-top: 1px solid #EFE4D2; }
.price-row b { color: #141414; white-space: nowrap; }
.reward-form { padding-left: 12px; padding-right: 12px; }
.reward-form .consent-card { padding: 14px; }

.price-row .was { color: #A98F6F; text-decoration: line-through; margin-right: 7px; font-size: 14px; }
a.pay-btn { display: block; text-align: center; text-decoration: none; }

.pay-opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #FFFDFA; border: 1.5px solid #EFC3AE; border-radius: 16px; padding: 16px; margin-top: 12px; text-decoration: none; color: #4A3220; font-size: 15.5px; }
.pay-opt b { color: #141414; white-space: nowrap; }
.pay-opt-name { font-weight: 700; }
.pay-opt:active { background: #FDEEE6; }

.pay-opt-left { display: flex; flex-direction: column; gap: 2px; }
.pay-opt-sub { font-size: 13px; color: #A98F6F; }
.pay-opt b { font-size: 19px; }

/* Plan picker (payment page, her design 2026-10-26) — compact, fits one screen */
.luna-logo { text-align: center; font-family: Georgia, 'Times New Roman', serif; font-size: 24px; font-weight: 700; color: #6E4525; }
.plan-card { background: #FFFDFA; border: 1.5px solid #EADBC6; border-radius: 20px; padding: 10px 13px; margin-top: 8px; cursor: pointer; box-shadow: 0 2px 8px rgba(160,110,60,.06); }
.plan-card.sel { background: linear-gradient(135deg, #FDEEE2, #FBE3D3); border-color: #D89B7E; box-shadow: 0 4px 14px rgba(190,120,70,.16); }
.plan-top { display: flex; align-items: center; gap: 10px; }
.plan-radio { width: 21px; height: 21px; border-radius: 50%; border: 2px solid #C9BBA6; flex: none; position: relative; background: #fff; }
.plan-card.sel .plan-radio { border-color: #C0734F; }
.plan-card.sel .plan-radio::after { content: ''; position: absolute; inset: 3.5px; border-radius: 50%; background: #C0734F; }
.plan-name { font-weight: 700; font-size: 16.5px; color: #141414; }
.plan-badge { margin-left: auto; background: linear-gradient(135deg, #F6CDB6, #F0B49D); color: #7E3E1E; font-weight: 700; font-size: 13.5px; border-radius: 999px; padding: 6px 12px; box-shadow: 0 2px 6px rgba(190,120,70,.18); }
.plan-price { margin: 5px 0 1px 31px; font-size: 14.5px; color: #8A6D4F; }
.plan-price b { font-family: Georgia, 'Times New Roman', serif; font-size: 24px; color: #6E4525; margin-right: 6px; }
.plan-sub { margin-left: 31px; font-size: 13px; color: #A98F6F; }
.plan-note { font-size: 12px; color: #A98F6F; margin-top: 8px; line-height: 1.45; }
.code-box { background: #FBE9DD; border: 1.5px dashed #E3A583; border-radius: 14px; padding: 9px 12px; font-size: 13.5px; line-height: 1.45; margin-top: 8px; color: #6E4525; }
.code-chip { background: #FFFDFA; border: 1.5px dashed #C98A63; border-radius: 8px; padding: 1px 7px; font-weight: 800; letter-spacing: 1px; color: #8A4B2A; white-space: nowrap; }
#pay-continue { background: linear-gradient(135deg, #F4C3A8, #EEA982); box-shadow: 0 5px 14px rgba(200,120,70,.28); }
#app.pol-bg { background: linear-gradient(180deg, #FDF6EC 0%, #FAF0E4 55%, #F9EADD 100%); }
.plan-foot { font-size: 11px; color: #A98F6F; text-align: center; margin-top: 8px; line-height: 1.5; }

.plan-was { color: #B08D6D; font-size: 15px; margin-right: 7px; }

/* Refer a friend page (her design, 2026-10-26) */
.refer-back { background: #F8DCD1 !important; border-radius: 50%; width: 40px; height: 40px; padding: 0 !important; display: flex; align-items: center; justify-content: center; }
.refer-moon svg { width: 30px; height: 30px; }
.refer-heart { width: 86px; height: 86px; border-radius: 50%; background: #F8DCD1; display: flex; align-items: center; justify-content: center; margin: 16px auto 4px; }
.refer-heart svg { width: 42px; height: 42px; }
.refer-title { text-align: center; font-size: 27px; margin: 12px 0 8px; }
.refer-sub { text-align: center; font-size: 16px; line-height: 1.5; padding: 0 14px; }
.how-card { background: #FFFDFA; text-align: left; margin-top: 18px; padding: 22px 20px 10px; }
.how-label { font-size: 12px; letter-spacing: .14em; font-weight: 700; color: var(--gold); margin-bottom: 6px; }
.how-step { display: flex; gap: 14px; margin: 16px 0; }
.how-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #F8DCD1; color: var(--brown); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.how-h { font-weight: 700; font-size: 16px; }
.how-p { margin: 3px 0 0; font-size: 15px; line-height: 1.45; opacity: .85; }
