/* Lúnea — design system */
:root {
  --bg: #f7f5fb; --surface: #fff; --surface-2: #efecf6; --ink: #1d1b33; --muted: #6e6b85; --line: #e4e0ee;
  --primary: #4b3fb5; --primary-ink: #fff; --primary-soft: #e9e6fa;
  --coral: #e8615c; --coral-soft: #fbe3e1;
  --tide: #a463d6; --tide-soft: #f3e8fb; --tide-ink: #8240b5;
  --foam: #2fa58f; --foam-soft: #dcf3ee; --foam-ink: #1f7f6d;
  --sun: #e9a23b; --sun-soft: #fbefd9;
  --ring-mid: #dcd7ef;
  --s1: #cfe8e2; --s2: #b9d7ea; --s3: #a7b5ec; --s4: #9b8be0; --s5: #c46fb0; --s6: #e2575f;
  --shadow: 0 1px 2px rgba(40, 30, 90, .04), 0 8px 24px rgba(40, 30, 90, .07);
  --shadow-lg: 0 12px 40px rgba(27, 34, 48, .18);
  --r: 22px; --r-sm: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tab-h: 74px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0f0e1d; --surface: #19172c; --surface-2: #232038; --ink: #f0eefa; --muted: #a29fba; --line: #2f2b48;
    --primary: #a99cff; --primary-ink: #0f0e1d; --primary-soft: #2b2752;
    --coral: #f27d78; --coral-soft: #3a2228; --tide: #cf8cf2; --tide-soft: #34223f; --tide-ink: #e0b4fa;
    --foam: #5fd0b8; --foam-soft: #173430; --foam-ink: #7fe0cb; --sun: #f0b65c; --sun-soft: #3a2f1c;
    --ring-mid: #2e2a4d;
    --s1: #24423d; --s2: #24425a; --s3: #3a4680; --s4: #5d4fa8; --s5: #9a4f8c; --s6: #d9525a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0f0e1d; --surface: #19172c; --surface-2: #232038; --ink: #f0eefa; --muted: #a29fba; --line: #2f2b48;
  --primary: #a99cff; --primary-ink: #0f0e1d; --primary-soft: #2b2752;
  --coral: #f27d78; --coral-soft: #3a2228; --tide: #cf8cf2; --tide-soft: #34223f; --tide-ink: #e0b4fa;
  --foam: #5fd0b8; --foam-soft: #173430; --foam-ink: #7fe0cb; --sun: #f0b65c; --sun-soft: #3a2f1c;
  --ring-mid: #2e2a4d;
  --s1: #24423d; --s2: #24425a; --s3: #3a4680; --s4: #5d4fa8; --s5: #9a4f8c; --s6: #d9525a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  min-height: 100dvh; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--primary); }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 10px; }
small, .muted { color: var(--muted); }
svg { display: block; }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; }
.view { padding: calc(env(safe-area-inset-top) + 18px) 18px calc(var(--tab-h) + env(safe-area-inset-bottom) + 28px); }

/* ---------- entrada escalonada ---------- */
.stagger > * { animation: rise .55s var(--ease) both; }
.stagger > *:nth-child(1) { animation-delay: .02s; } .stagger > *:nth-child(2) { animation-delay: .07s; }
.stagger > *:nth-child(3) { animation-delay: .12s; } .stagger > *:nth-child(4) { animation-delay: .17s; }
.stagger > *:nth-child(5) { animation-delay: .22s; } .stagger > *:nth-child(6) { animation-delay: .27s; }
.stagger > *:nth-child(7) { animation-delay: .32s; } .stagger > *:nth-child(n+8) { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .18; } 50% { transform: scale(1.5); opacity: .05; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes grow { from { width: 0; } }
@keyframes slideL { from { opacity: 0; transform: translateX(40px); } }
@keyframes slideR { from { opacity: 0; transform: translateX(-40px); } }
@keyframes wave { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-14px); } }
@keyframes spin-in { from { transform: rotate(-90deg) scale(.6); opacity: 0; } }

/* ---------- transições de página (View Transitions API) ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; animation-timing-function: var(--ease); }
html[data-dir='fwd']::view-transition-old(root) { animation-name: vt-out-l; }
html[data-dir='fwd']::view-transition-new(root) { animation-name: vt-in-r; }
html[data-dir='back']::view-transition-old(root) { animation-name: vt-out-r; }
html[data-dir='back']::view-transition-new(root) { animation-name: vt-in-l; }
html[data-dir='up']::view-transition-old(root) { animation-name: vt-fade-out; }
html[data-dir='up']::view-transition-new(root) { animation-name: vt-up; }
html[data-dir='fade']::view-transition-old(root) { animation-name: vt-fade-out; }
html[data-dir='fade']::view-transition-new(root) { animation-name: vt-fade-in; }
::view-transition-group(tabbar) { z-index: 50; }
::view-transition-old(tabbar), ::view-transition-new(tabbar) { animation: none; }
@keyframes vt-out-l { to { opacity: 0; transform: translateX(-12%); } }
@keyframes vt-in-r { from { opacity: 0; transform: translateX(16%); } }
@keyframes vt-out-r { to { opacity: 0; transform: translateX(12%); } }
@keyframes vt-in-l { from { opacity: 0; transform: translateX(-16%); } }
@keyframes vt-up { from { opacity: 0; transform: translateY(8%) scale(.98); } }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
.no-vt #app > * { animation: fade .3s var(--ease); }

/* ---------- cabeçalhos ---------- */
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; min-height: 44px; }
.head .grow { flex: 1; min-width: 0; }
.head .eyebrow { font-size: 13px; color: var(--muted); font-weight: 600; }
.head .eyebrow::first-letter { text-transform: uppercase; }
.head h1 { font-size: 26px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface); box-shadow: var(--shadow); color: var(--ink); transition: transform .15s var(--ease);
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 22px; height: 22px; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--tide)); color: #fff; text-decoration: none;
}

/* ---------- cartões ---------- */
.card { background: var(--surface); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card.flat { box-shadow: none; background: var(--surface-2); }
.card h2 + p, .card h3 + p { margin-top: 6px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head a, .link { font-size: 14px; font-weight: 700; color: var(--primary); text-decoration: none; }
.section-title { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 4px 10px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px;
  border-radius: 999px; font-weight: 700; background: var(--surface-2); color: var(--ink); text-decoration: none;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s;
}
.btn:active { transform: scale(.96); }
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn.coral { background: var(--coral); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--coral-soft); color: var(--coral); }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; pointer-events: none; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; }

/* ---------- barra de abas ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; view-transition-name: tabbar;
  padding: 0 12px calc(env(safe-area-inset-bottom) + 10px); pointer-events: none;
}
.tabbar nav {
  pointer-events: auto; max-width: 520px; margin: 0 auto; height: 64px; display: grid; grid-template-columns: repeat(5, 1fr);
  align-items: center; background: color-mix(in srgb, var(--surface) 88%, transparent); border-radius: 26px;
  box-shadow: var(--shadow-lg); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700;
  color: var(--muted); text-decoration: none; padding: 6px 0; position: relative; transition: color .2s;
}
.tabbar a svg { width: 24px; height: 24px; transition: transform .3s var(--spring); }
.tabbar a.on { color: var(--primary); }
.tabbar a.on svg { transform: translateY(-2px) scale(1.08); }
.tabbar a.on::after { content: ''; position: absolute; bottom: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); animation: pop .35s var(--spring); }
.tabbar .fab {
  justify-self: center; width: 58px; height: 58px; margin-top: -26px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--primary), var(--tide)); color: #fff; box-shadow: 0 10px 24px color-mix(in srgb, var(--tide) 45%, transparent);
  transition: transform .2s var(--spring);
}
.tabbar .fab::after { display: none; }
.tabbar .fab:active { transform: scale(.9) rotate(-8deg); }
.tabbar .fab svg { width: 28px; height: 28px; }
body.hide-tabs .tabbar { display: none; }

/* ---------- Hoje: herói com anel ---------- */
.hero { position: relative; display: grid; place-items: center; margin: 0 auto 6px; width: min(76vw, 280px); aspect-ratio: 1; }
.hero .ring { width: 100%; height: 100%; animation: spin-in .8s var(--ease) both; }
.hero-center { position: absolute; inset: 20%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.hero-center .label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hero-center .big { font-size: 60px; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.hero-center .phase { display: inline-block; margin-top: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.hero-center .sub { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.3; }
.phase.menses { background: var(--coral-soft); color: var(--coral); }
.phase.pre { background: var(--tide-soft); color: var(--tide-ink); }
.phase.post { background: var(--foam-soft); color: var(--foam-ink); }
.phase.mid { background: var(--primary-soft); color: var(--primary); }
.ring .draw { stroke-dasharray: 1; animation: draw 1s var(--ease) both .15s; }
.ring .pop { transform-box: fill-box; transform-origin: center; animation: pop .5s var(--spring) both .9s; }
.ring .pulse { transform-box: fill-box; transform-origin: center; animation: pulse 2.4s ease-in-out infinite 1.2s; }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 16px; }
.quick button, .quick a {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: var(--r-sm);
  background: var(--surface); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none;
  transition: transform .15s var(--ease);
}
.quick button:active, .quick a:active { transform: scale(.95); }
.quick i { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; }
.quick i svg { width: 22px; height: 22px; }
.qi-coral { background: var(--coral-soft); color: var(--coral); }
.qi-tide { background: var(--tide-soft); color: var(--tide-ink); }
.qi-foam { background: var(--foam-soft); color: var(--foam-ink); }
.qi-sun { background: var(--sun-soft); color: var(--sun); }
.qi-primary { background: var(--primary-soft); color: var(--primary); }

/* faixa da semana */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 14px; }
.week button {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 8px; border-radius: 16px;
  font-size: 11px; color: var(--muted); font-weight: 700; transition: background .2s, transform .15s;
}
.week button:active { transform: scale(.93); }
.week b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: var(--ink); }
.week .menses b { background: var(--coral); color: #fff; }
.week .spot b { box-shadow: inset 0 0 0 2px var(--coral); }
.week .pred b { outline: 2px dashed color-mix(in srgb, var(--coral) 60%, transparent); outline-offset: -2px; }
.week .today { background: var(--surface); box-shadow: var(--shadow); color: var(--primary); }
.week .dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.week .dot.on { background: var(--tide); }

/* check-in card */
.checkin-cta {
  display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--r); margin-bottom: 14px; color: #fff; text-decoration: none;
  background: linear-gradient(130deg, #3b32a0, #9a6fe0); box-shadow: 0 12px 30px rgba(91, 70, 196, .35);
  position: relative; overflow: hidden; transition: transform .15s var(--ease);
}
.checkin-cta:active { transform: scale(.98); }
.checkin-cta::before {
  content: ''; position: absolute; left: -10%; right: -10%; bottom: -34px; height: 70px; border-radius: 50%;
  background: rgba(255, 255, 255, .12); animation: wave 6s ease-in-out infinite;
}
.checkin-cta .txt { flex: 1; position: relative; }
.checkin-cta b { display: block; font-size: 17px; }
.checkin-cta span { font-size: 13px; opacity: .9; }
.checkin-cta .go { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; position: relative; flex: none; }
.checkin-cta .go svg { width: 22px; height: 22px; }
.done-card { display: flex; gap: 14px; align-items: center; }
.done-card .grow { flex: 1; min-width: 0; }
.check-ic { width: 46px; height: 46px; border-radius: 50%; background: var(--foam-soft); color: var(--foam-ink); display: grid; place-items: center; flex: none; }
.check-ic svg { width: 24px; height: 24px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--surface-2); color: var(--ink); transition: background .2s, color .2s, transform .15s;
}
button.chip:active { transform: scale(.95); }
.chip.on { background: var(--primary); color: var(--primary-ink); }
.chip i { width: 10px; height: 10px; border-radius: 50%; }
.chip-scroll { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px 6px; padding: 2px 18px 10px; scrollbar-width: none; }
.chip-scroll::-webkit-scrollbar { display: none; }
.chip-scroll .chip { flex: none; }

/* progresso da jornada */
.journey { display: flex; gap: 14px; align-items: center; }
.journey .grow { flex: 1; min-width: 0; }
.meter { width: 64px; height: 64px; flex: none; position: relative; }
.meter svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.meter b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; }
.meter .track { stroke: var(--surface-2); }
.meter .val { stroke: var(--foam); stroke-dasharray: 1; animation: draw 1.2s var(--ease) both .3s; }
.streak { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: var(--sun); }

/* carrossel de insights */
.insights { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -18px 8px; padding: 2px 18px 12px; scrollbar-width: none; }
.insights::-webkit-scrollbar { display: none; }
.insight {
  flex: 0 0 76%; scroll-snap-align: start; border-radius: var(--r); padding: 18px; min-height: 150px; display: flex; flex-direction: column;
  justify-content: space-between; gap: 10px; text-decoration: none; color: var(--ink); transition: transform .15s var(--ease);
}
.insight:active { transform: scale(.97); }
.insight .tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.insight b { font-size: 18px; line-height: 1.25; letter-spacing: -.01em; }
.insight span { font-size: 13px; opacity: .8; }
.insight.c0 { background: var(--tide-soft); } .insight.c1 { background: var(--foam-soft); } .insight.c2 { background: var(--sun-soft); }
.insight.c3 { background: var(--coral-soft); } .insight.c4 { background: var(--primary-soft); } .insight.c5 { background: var(--surface-2); }

.crisis { border-left: 4px solid var(--coral); }
.crisis h3 { color: var(--coral); margin-bottom: 6px; }
.crisis p { font-size: 14px; }
.crisis p:last-child { margin: 0; }

/* ---------- check-in guiado ---------- */
.ci { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 14px) 18px calc(env(safe-area-inset-bottom) + 18px); max-width: 560px; margin: 0 auto; }
.ci-top { display: flex; align-items: center; gap: 12px; }
.ci-top .grow { flex: 1; text-align: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.ci-top .grow::first-letter { text-transform: uppercase; }
.progress { display: flex; gap: 3px; margin: 14px 0 6px; }
.progress i { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; position: relative; }
.progress i.on::after { content: ''; position: absolute; inset: 0; background: var(--primary); }
.progress i.cur::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 100%; background: color-mix(in srgb, var(--primary) 45%, transparent); animation: grow .35s var(--ease) both; }
.ci-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 10px 0; }
.ci-body.fwd { animation: slideL .35s var(--ease) both; }
.ci-body.back { animation: slideR .35s var(--ease) both; }
.ci-kicker { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--tide-ink); margin-bottom: 8px; }
.ci-q { font-size: 25px; font-weight: 800; letter-spacing: -.02em; line-height: 1.22; margin-bottom: 8px; }
.ci-help { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.opts { display: grid; gap: 8px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px; border-radius: 18px; text-align: left;
  background: var(--surface); box-shadow: var(--shadow); font-weight: 700; transition: transform .15s var(--ease), background .2s, border-color .2s;
  border: 2px solid transparent;
}
.opt:active { transform: scale(.98); }
.opt .n { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; font-weight: 800; color: #1b2230; }
.opt .l { flex: 1; }
.opt .l small { display: block; font-weight: 500; }
.opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.opt.sel .n { animation: pop .3s var(--spring); }
.opt.big { padding: 16px; font-size: 17px; }
.opt.big .n { width: 46px; height: 46px; border-radius: 14px; }
.opt.big .n svg { width: 24px; height: 24px; }
.n.v1 { background: var(--s1); } .n.v2 { background: var(--s2); } .n.v3 { background: var(--s3); }
.n.v4 { background: var(--s4); color: #fff; } .n.v5 { background: var(--s5); color: #fff; } .n.v6 { background: var(--s6); color: #fff; }
.n.fl0 { background: var(--surface-2); color: var(--muted); } .n.flS { background: var(--coral-soft); color: var(--coral); } .n.flM { background: var(--coral); color: #fff; }
.n.calm { background: var(--foam-soft); color: var(--foam-ink); } .n.sym { background: var(--tide-soft); color: var(--tide-ink); }
.ci-foot { display: flex; gap: 10px; padding-top: 10px; }
.ci-foot .btn { flex: 1; }
.ci-done { text-align: center; }
.badge-ok { width: 92px; height: 92px; margin: 0 auto 16px; border-radius: 50%; background: var(--foam-soft); display: grid; place-items: center; animation: pop .5s var(--spring) both; }
.badge-ok svg { width: 48px; height: 48px; stroke: var(--foam-ink); }
.badge-ok path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: dash .5s var(--ease) forwards .35s; }
@keyframes dash { to { stroke-dashoffset: 0; } }
.sum-list { display: grid; gap: 6px; text-align: left; margin: 14px 0; }
.sum-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); width: 100%; text-align: left; font-weight: 600; }
.sum-item .n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #1b2230; flex: none; }
.sum-item span { flex: 1; }

textarea, input[type='text'], input[type='number'], input[type='date'], input[type='time'], select {
  width: 100%; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); outline: none; transition: border-color .2s;
}
textarea:focus, input:focus, select:focus { border-color: var(--primary); }
textarea { min-height: 90px; resize: vertical; }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- segmentado ---------- */
.seg { display: flex; background: var(--surface-2); padding: 4px; border-radius: 16px; gap: 4px; margin-bottom: 16px; }
.seg button { flex: 1; padding: 9px 4px; border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--muted); transition: background .25s var(--ease), color .2s, box-shadow .25s; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.seg.coral button.on { background: var(--coral); color: #fff; }
.tab-pane { animation: rise .4s var(--ease) both; }

/* ---------- calendário ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-head h2 { flex: 1; font-size: 21px; }
.cal-head h2::first-letter { text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid.anim-next { animation: slideL .35s var(--ease); }
.cal-grid.anim-prev { animation: slideR .35s var(--ease); }
.cal-wd { text-align: center; font-size: 11px; font-weight: 800; color: var(--muted); padding: 4px 0 6px; }
.cal-d {
  aspect-ratio: 1; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative;
  font-weight: 700; font-size: 15px; transition: transform .15s var(--ease), background .2s;
}
.cal-d:active { transform: scale(.9); }
.cal-d.out { opacity: .28; }
.cal-d.pre { background: var(--tide-soft); }
.cal-d.post { background: var(--foam-soft); }
.cal-d.menses { background: var(--coral); color: #fff; }
.cal-d.spot { box-shadow: inset 0 0 0 2px var(--coral); }
.cal-d.pred { outline: 2px dashed color-mix(in srgb, var(--coral) 60%, transparent); outline-offset: -3px; }
.cal-d.today::before { content: ''; position: absolute; inset: -2px; border-radius: 16px; border: 2.5px solid var(--primary); }
.cal-d.future { color: var(--muted); }
.cal-d .bar { position: absolute; bottom: 5px; width: 50%; height: 4px; border-radius: 2px; }
.cal-d .bar.v2 { background: var(--s2); } .cal-d .bar.v3 { background: var(--s3); } .cal-d .bar.v4 { background: var(--s4); } .cal-d .bar.v5 { background: var(--s5); } .cal-d .bar.v6 { background: var(--s6); }
.cal-d.menses .bar { background: rgba(255, 255, 255, .85); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; }
.lg-box { width: 14px; height: 14px; border-radius: 5px; }
.lg-line { width: 18px; height: 3px; border-radius: 2px; background: var(--c); }
.lg-dash { width: 18px; border-top: 2px dashed var(--coral); }
.lg-dot { width: 18px; border-top: 2px dotted var(--muted); }
.sw { width: 14px; height: 14px; border-radius: 4px; }

.cycles { display: grid; gap: 12px; }
.cyc { display: grid; grid-template-columns: 64px 1fr 58px; gap: 10px; align-items: center; font-size: 13px; }
.cyc b { font-size: 14px; }
.cyc .len { text-align: right; color: var(--muted); font-weight: 700; }
.cyc-bar { height: 12px; border-radius: 6px; background: var(--surface-2); position: relative; overflow: hidden; }
.cyc-bar i { position: absolute; top: 0; bottom: 0; border-radius: 6px; }
.cyc-bar .m { background: var(--coral); }
.cyc-bar .p { background: var(--tide); }
.cyc-bar .cur { background: var(--primary); width: 3px; border-radius: 2px; }

/* ---------- folha inferior e diálogo ---------- */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(10, 14, 22, .42); animation: fade .25s both; display: flex; align-items: flex-end; justify-content: center; }
.scrim.closing { animation: fade .22s reverse both; }
.sheet {
  width: 100%; max-width: 560px; max-height: 88dvh; overflow: auto; background: var(--bg); border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(env(safe-area-inset-bottom) + 20px); animation: sheet-up .42s var(--ease) both; box-shadow: var(--shadow-lg);
}
.scrim.closing .sheet { animation: sheet-down .22s ease-in both; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet h2 { margin-bottom: 4px; }
.sheet h2::first-letter { text-transform: uppercase; }
.sheet .sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.dialog { text-align: center; }
.dialog .row { margin-top: 18px; }
.dialog .row .btn { flex: 1; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 22px); z-index: 90; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-lg);
  animation: toast 2.6s var(--ease) both; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 20px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- Padrões ---------- */
.status-hero { border-radius: var(--r); padding: 20px; margin-bottom: 14px; position: relative; overflow: hidden; color: var(--ink); }
.status-hero .tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.status-hero h2 { font-size: 22px; margin: 6px 0 8px; position: relative; }
.status-hero p { font-size: 14px; margin: 0; opacity: .9; position: relative; }
.status-hero.info, .status-hero.neutral { background: var(--primary-soft); }
.status-hero.alert { background: var(--tide-soft); }
.status-hero.warn { background: var(--sun-soft); }
.status-hero.ok { background: var(--foam-soft); }
.status-hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .22); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; position: relative; }
.stats div { background: color-mix(in srgb, var(--surface) 60%, transparent); border-radius: 14px; padding: 10px 6px; text-align: center; }
.stats b { display: block; font-size: 22px; font-weight: 800; }
.stats span { font-size: 11px; font-weight: 700; color: var(--muted); line-height: 1.2; display: block; }

.chart { width: 100%; height: auto; overflow: visible; }
.chart .ax { font-size: 10px; fill: var(--muted); font-family: var(--font); font-weight: 600; }
.chart .ax.sm { font-size: 9px; }
.chart .ax.strong { font-weight: 800; font-size: 10.5px; }
.chart .th-sev { stroke: var(--coral); stroke-width: 1.4; stroke-dasharray: 5 4; opacity: .75; }
.chart .th-clear { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 2 3; opacity: .6; }
.chart .draw { stroke-dasharray: 1; animation: draw 1.1s var(--ease) both .1s; }
.chart .draw.slow { animation-duration: 1.6s; animation-delay: .4s; }
.chart .pop { transform-box: fill-box; transform-origin: center; animation: pop .4s var(--spring) both .8s; }
.chart .fade-in { animation: fade 1s both .5s; }
.panel { margin: 0 0 14px; background: var(--surface); border-radius: var(--r); padding: 14px 14px 10px; box-shadow: var(--shadow); }
.panel figcaption { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.panel figcaption b { display: block; font-size: 15px; }
.panel figcaption small { font-size: 12px; }
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--surface-2); color: var(--muted); white-space: nowrap; flex: none; }
.badge.ok { background: var(--tide-soft); color: var(--tide-ink); }
.badge.warn { background: var(--sun-soft); color: var(--sun); }
.badge.sm { padding: 2px 8px; font-size: 10px; }

.dbars { display: grid; gap: 14px; }
.dbar { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
.dbar-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.dbar-head em { font-style: normal; font-size: 10px; font-weight: 800; color: var(--tide-ink); background: var(--tide-soft); padding: 1px 6px; border-radius: 6px; margin-left: 4px; }
.dbar-track { display: flex; align-items: center; gap: 8px; height: 12px; margin-top: 3px; }
.dbar-track i { height: 100%; border-radius: 6px; width: var(--w); min-width: 4px; animation: grow .9s var(--ease) both; animation-delay: calc(var(--i) * 40ms + .1s); }
.dbar-track i.pre { background: var(--tide); }
.dbar-track i.post { background: var(--foam); }
.dbar-track b { font-size: 11px; color: var(--muted); font-weight: 700; }

.dx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin-top: 10px; }
.dx { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.dx i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; flex: none; background: var(--line); color: var(--muted); }
.dx.met { background: var(--tide-soft); }
.dx.met i { background: var(--tide); color: #fff; }
.dx.pme i { background: var(--sun); color: #fff; }

.heat-wrap { overflow-x: auto; margin: 0 -6px; }
.heat { border-collapse: separate; border-spacing: 2px; font-size: 10px; }
.heat th.vert { writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 600; color: var(--muted); padding: 2px 0; height: 92px; text-align: left; white-space: nowrap; }
.heat td { width: 13px; height: 13px; border-radius: 3px; padding: 0; }
.heat td.lbl { width: auto; white-space: nowrap; padding-right: 6px; color: var(--muted); font-weight: 600; }
.heat td.lbl span { display: inline-block; min-width: 20px; margin-left: 4px; text-align: right; color: var(--ink); }
.heat tr.onset td.lbl { color: var(--coral); font-weight: 800; }
.h0, .f0 { background: var(--surface-2); }
.h1 { background: var(--s1); } .h2 { background: var(--s2); } .h3 { background: var(--s3); } .h4 { background: var(--s4); } .h5 { background: var(--s5); } .h6 { background: var(--s6); }
.fM { background: var(--coral); } .fS { background: var(--coral-soft); box-shadow: inset 0 0 0 1.5px var(--coral); }

.empty { text-align: center; padding: 30px 18px; }
.empty .art { width: 110px; height: 110px; margin: 0 auto 14px; border-radius: 32px; overflow: hidden; }
.empty p { color: var(--muted); }

/* ---------- Mais ---------- */
.profile { display: flex; align-items: center; gap: 14px; }
.profile .grow { flex: 1; min-width: 0; }
.profile .avatar { width: 56px; height: 56px; font-size: 22px; }
.list { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 14px; }
.list > a, .list > button, .list > .li, .list > label {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 16px; text-align: left; color: var(--ink); text-decoration: none;
  font-weight: 600; transition: background .15s;
}
.list > * + * { border-top: 1px solid var(--line); }
.list > a:active, .list > button:active { background: var(--surface-2); }
.list i.ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.list i.ic svg { width: 20px; height: 20px; }
.list .t { flex: 1; min-width: 0; }
.list .t small { display: block; font-weight: 500; }
.list .chev { width: 18px; height: 18px; color: var(--muted); flex: none; }
.list input[type='time'], .list select { width: auto; padding: 8px 10px; }

.article { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.article summary { list-style: none; padding: 16px 18px; cursor: pointer; display: flex; gap: 12px; align-items: center; }
.article summary::-webkit-details-marker { display: none; }
.article summary .t { flex: 1; }
.article summary .tag { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--tide-ink); }
.article summary b { display: block; font-size: 16px; }
.article summary small { display: block; }
.article summary .chev { width: 20px; height: 20px; color: var(--muted); transition: transform .3s var(--ease); flex: none; }
.article[open] summary .chev { transform: rotate(90deg); }
.article .body { padding: 0 18px 16px; font-size: 14.5px; animation: rise .35s var(--ease); }
.article .body ul { padding-left: 18px; margin: 0 0 10px; }
.article .body li { margin-bottom: 4px; }
.ref { font-size: 12px; color: var(--muted); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.stat-row div { background: var(--surface-2); border-radius: 14px; padding: 10px; text-align: center; }
.stat-row b { display: block; font-size: 22px; color: var(--tide-ink); }
.stat-row span { font-size: 11px; color: var(--muted); line-height: 1.3; display: block; }

.treat-band { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 8px; background: var(--sun-soft); color: var(--sun); margin: 2px 4px 0 0; }

/* ---------- onboarding ---------- */
.ob { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 24px) 22px calc(env(safe-area-inset-bottom) + 22px); max-width: 520px; margin: 0 auto; }
.ob-body { flex: 1; display: flex; flex-direction: column; justify-content: center; animation: slideL .45s var(--ease) both; }
.ob-body.back { animation-name: slideR; }
.ob-logo { width: 150px; height: 150px; margin: 0 auto 22px; border-radius: 40px; overflow: hidden; box-shadow: 0 20px 50px rgba(123, 104, 217, .4); animation: pop .7s var(--spring) both; }
.ob-logo svg, .empty .art svg { width: 100%; height: 100%; }
.logo-anim .sat { transform-origin: 256px 256px; animation: orbit 14s linear infinite; }
.logo-anim .orbit { transform-origin: 256px 256px; animation: orbit 60s linear infinite reverse; }
.logo-anim .star { transform-box: fill-box; transform-origin: center; animation: twinkle 2.6s ease-in-out infinite; }
.logo-anim .s2 { animation-delay: .9s; } .logo-anim .s3 { animation-delay: 1.7s; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { opacity: .9; transform: scale(1); } 50% { opacity: .2; transform: scale(.5); } }
.ob h1 { text-align: center; font-size: 34px; }
.ob .lead { text-align: center; color: var(--muted); font-size: 16px; margin: 10px 0 0; }
.dots { display: flex; justify-content: center; gap: 6px; margin: 20px 0; }
.dots i { width: 8px; height: 8px; border-radius: 4px; background: var(--line); transition: width .35s var(--ease), background .3s; }
.dots i.on { width: 26px; background: var(--primary); }
.feat { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.feat i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.feat i svg { width: 22px; height: 22px; }
.feat b { display: block; font-size: 16px; }
.feat span { color: var(--muted); font-size: 14px; }

/* ---------- relatório ---------- */
.report .card h1 { font-size: 22px; margin-bottom: 6px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.data th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.data .num { text-align: center; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.chart-grid .panel { box-shadow: none; border: 1px solid var(--line); margin: 0; }

@media print {
  :root { --bg: #fff; --surface: #fff; --shadow: none; }
  .tabbar, .no-print, .toast { display: none !important; }
  .view { padding: 0; }
  .card, .panel { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .chart .draw, .chart .pop, .dbar, .dbar-track i, .stagger > * { animation: none !important; stroke-dasharray: none; }
  body { font-size: 12px; }
}
@media (min-width: 700px) { .insight { flex-basis: 46%; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

/* barra de progresso do check-in */
.pbar { height: 6px; border-radius: 3px; background: var(--surface-2); margin: 14px 0 6px; overflow: hidden; }
.pbar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--primary), var(--tide)); transition: width .45s var(--ease); }

/* check-in por seções */
.ci-count { min-width: 44px; text-align: right; font-size: 13px; font-weight: 800; color: var(--primary); }
.ci-body:has(.srows) { justify-content: flex-start; }
.scale-legend { display: block; margin-top: 4px; font-size: 12px; font-weight: 600; }
.srows { display: grid; gap: 10px; }
.srow { background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); border: 2px solid transparent; transition: border-color .25s, transform .2s var(--ease); animation: rise .45s var(--ease) both; }
.srows .srow:nth-child(2) { animation-delay: .05s; } .srows .srow:nth-child(3) { animation-delay: .1s; } .srows .srow:nth-child(4) { animation-delay: .15s; }
.srows .srow:nth-child(5) { animation-delay: .2s; } .srows .srow:nth-child(n+6) { animation-delay: .25s; }
.srow.done { border-color: color-mix(in srgb, var(--primary) 22%, transparent); }
.srow-t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.srow-t b { font-size: 16px; }
.srow-t .lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.srow.done .lbl { color: var(--primary); }
.srow small { display: block; font-size: 13px; line-height: 1.35; margin: 2px 0 10px; }
.dots6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.d6 { height: 42px; border-radius: 12px; font-weight: 800; font-size: 15px; color: var(--muted); background: var(--surface-2); transition: transform .18s var(--spring), background .2s, color .2s, box-shadow .2s; }
.d6:active { transform: scale(.88); }
.d6.on { color: #1d1b33; transform: scale(1.06); box-shadow: 0 6px 14px rgba(0,0,0,.12); animation: pop .3s var(--spring); }
.d6.on.v1 { background: var(--s1); } .d6.on.v2 { background: var(--s2); } .d6.on.v3 { background: var(--s3); }
.d6.on.v4 { background: var(--s4); color: #fff; } .d6.on.v5 { background: var(--s5); color: #fff; } .d6.on.v6 { background: var(--s6); color: #fff; }
.ci-foot { position: sticky; bottom: 0; padding: 12px 0 calc(env(safe-area-inset-bottom) + 4px); background: linear-gradient(transparent, var(--bg) 30%); }
.ci-foot .btn.grow { flex: 3; }
#ci-next.ready { animation: nudge 1.2s var(--ease) 1; }
@keyframes nudge { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.06); } 60% { transform: scale(.98); } }
.factors .chip { padding: 9px 14px; font-size: 14px; }
.badge-ok { position: relative; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; border-radius: 3px; background: var(--c); opacity: 0;
  animation: burst .9s var(--ease) forwards; animation-delay: calc(.35s + var(--d)); transform: rotate(var(--a)) translateY(0); }
@keyframes burst { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-90px) scale(.4) rotate(180deg); } }

/* mapa do ciclo */
.cmap { display: grid; grid-template-columns: 86px repeat(var(--cols), minmax(0, 1fr)); gap: 2px; margin: 14px 0 4px; align-items: center; }
.cm-lbl { font-size: 11.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.cm-lbl i { width: 6px; height: 6px; border-radius: 50%; background: var(--tide); flex: none; }
.cm-band { height: 5px; border-radius: 3px; background: transparent; margin-bottom: 3px; }
.cm-band.pre { background: var(--tide); } .cm-band.men { background: var(--coral); } .cm-band.post { background: var(--foam); }
.cm-c { aspect-ratio: 1; width: 100%; height: auto; min-height: 0; border: 0; border-radius: 3px; padding: 0; min-width: 0; transition: transform .15s var(--spring), box-shadow .15s;
  animation: cellIn .4s var(--ease) both; animation-delay: calc(var(--c) * 14ms + var(--r) * 22ms); }
.cm-c.sel { transform: scale(1.5); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); z-index: 2; position: relative; }
@keyframes cellIn { from { opacity: 0; transform: scale(.3); } }
.cm-x { font-size: 10px; color: var(--muted); text-align: center; font-weight: 700; overflow: visible; white-space: nowrap; display: flex; justify-content: center; margin-top: 4px; }
.cm-c.h0 { opacity: .55; }
.scale-bar { align-items: center; gap: 4px; }
.scale-bar .sw { width: 22px; height: 12px; }
.tipbubble { position: absolute; z-index: 95; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 700; padding: 7px 11px; border-radius: 10px; pointer-events: none; animation: rise .2s var(--ease); box-shadow: var(--shadow-lg); white-space: nowrap; }
/* toque para ver valores nos gráficos */
svg.scrub { touch-action: pan-y; cursor: crosshair; }
.scrub-g { transition: opacity .2s; pointer-events: none; }
.scrub-line { stroke: var(--ink); stroke-opacity: .25; stroke-width: 1.5; stroke-dasharray: 3 3; }
.scrub-dot { fill: var(--surface); stroke: var(--primary); stroke-width: 3; }
.scrub-tip rect { fill: var(--ink); }
.scrub-tip text { fill: var(--bg); font-family: var(--font); font-weight: 700; }
.scrub-tip .t1 { font-size: 10px; opacity: .75; } .scrub-tip .t2 { font-size: 11.5px; }

/* ---------- novidades v4 ---------- */
.quick { grid-template-columns: repeat(4, 1fr); gap: 8px; }
.qi-sos { background: linear-gradient(135deg, var(--coral), var(--tide)); color: #fff; }
.quick .sos i { animation: sosGlow 2.6s ease-in-out infinite; }
@keyframes sosGlow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--coral) 45%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }

/* hoje no seu ciclo */
.phase-card { position: relative; overflow: hidden; }
.phase-card .tag { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.phase-card h3 { margin: 4px 0 6px; font-size: 19px; }
.phase-card p { margin: 0 0 10px; font-size: 14px; color: var(--muted); position: relative; }
.phase-card.pre { background: linear-gradient(160deg, var(--tide-soft), var(--surface) 70%); }
.phase-card.menses { background: linear-gradient(160deg, var(--coral-soft), var(--surface) 70%); }
.phase-card.post { background: linear-gradient(160deg, var(--foam-soft), var(--surface) 70%); }
.phase-card.mid { background: linear-gradient(160deg, var(--primary-soft), var(--surface) 70%); }
.pc-orb { position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tide) 35%, transparent), transparent 70%); animation: orbFloat 7s ease-in-out infinite; pointer-events: none; }
@keyframes orbFloat { 50% { transform: translate(-16px, 14px) scale(1.15); } }
.pc-list { list-style: none; padding: 0; margin: 0 0 4px; display: grid; gap: 8px; position: relative; }
.pc-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.4; animation: rise .45s var(--ease) both; animation-delay: calc(.25s + var(--i) * 90ms); }
.pc-list li svg { flex: none; margin-top: 1px; color: var(--primary); }
.phase-card .btn { margin-top: 8px; }

/* calendário: ovulação */
.cal-d.ov::before { content: ""; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 2px var(--surface); }
.lg-ov { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

/* fatores */
.fx { display: grid; gap: 10px; margin: 6px 0 10px; }
.fx-row { display: grid; grid-template-columns: 104px 1fr 44px; gap: 10px; align-items: center; animation: rise .4s var(--ease) both; animation-delay: calc(var(--i) * 60ms); }
.fx-l { font-size: 13px; font-weight: 700; line-height: 1.2; }
.fx-l small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.fx-track { position: relative; height: 10px; border-radius: 6px; background: var(--surface-2); }
.fx-track::after { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--line); }
.fx-track i { position: absolute; top: 0; bottom: 0; border-radius: 6px; width: var(--w); animation: grow .7s var(--ease) both .2s; }
.fx-track i.up { left: 50%; background: var(--coral); }
.fx-track i.down { right: 50%; background: var(--foam); }
.fx-row b { font-size: 13px; text-align: right; color: var(--muted); }
.fx-row b.worse { color: var(--coral); } .fx-row b.better { color: var(--foam-ink); }

/* SOS: respiração */
.breath { position: relative; width: 210px; aspect-ratio: 1; margin: 18px auto; display: grid; place-items: center; --d: .8s; }
.b-wave { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--tide) 30%, transparent) 30%, transparent 70%); transform: scale(.5); transition: transform var(--d) ease-in-out, opacity var(--d); opacity: .6; }
.b-wave.w2 { background: radial-gradient(circle, color-mix(in srgb, var(--primary) 22%, transparent) 40%, transparent 72%); transition-delay: .15s; }
.b-core { position: relative; width: 52%; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(140deg, #4b3fb5, #a463d6); color: #fff; display: grid; place-content: center; text-align: center; transform: scale(.78); transition: transform var(--d) ease-in-out; box-shadow: 0 14px 40px -12px var(--primary); }
.b-core b { font-size: 16px; } .b-core small { color: #fff; opacity: .9; font-size: 26px; font-weight: 800; line-height: 1.1; min-height: 1em; }
.breath[data-ph='in'] .b-wave, .breath[data-ph='hold'] .b-wave { transform: scale(1); opacity: 1; }
.breath[data-ph='in'] .b-core, .breath[data-ph='hold'] .b-core { transform: scale(1.1); }
.breath[data-ph='hold'] .b-core { animation: holdPulse 1s ease-in-out infinite alternate; }
@keyframes holdPulse { to { box-shadow: 0 0 0 10px color-mix(in srgb, var(--tide) 25%, transparent), 0 14px 40px -12px var(--primary); } }
.breath:not([data-ph]) .b-core, .breath[data-ph=''] .b-core { animation: idle 3s ease-in-out infinite; }
@keyframes idle { 50% { transform: scale(.84); } }

/* SOS: aterramento */
.g-step { text-align: center; animation: slideL .35s var(--ease); }
.g-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 8px; }
.g-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: all .3s var(--spring); }
.g-dots i.on { width: 22px; border-radius: 4px; background: var(--primary); } .g-dots i.done { background: var(--tide); }
.g-num { font-size: 64px; font-weight: 800; line-height: 1; background: linear-gradient(140deg, var(--primary), var(--tide)); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pop .45s var(--spring); }
.g-step p { margin: 8px 0 14px; }
.g-done { width: 64px; height: 64px; margin: 4px auto 6px; border-radius: 50%; display: grid; place-items: center; background: var(--foam-soft); color: var(--foam-ink); animation: pop .5s var(--spring); }
.g-done svg { width: 30px; height: 30px; }

/* SOS: plano */
.plan { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.plan li { animation: rise .4s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.plan button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.plan button i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; transition: all .25s var(--spring); }
.plan button i svg { width: 14px; height: 14px; opacity: 0; transform: scale(.4); transition: all .25s var(--spring); }
.plan li.done button i { background: var(--foam); border-color: var(--foam); color: #fff; }
.plan li.done button i svg { opacity: 1; transform: none; }
.plan li.done span { text-decoration: line-through; color: var(--muted); }

/* PIN */
.lock { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: grid; place-items: center; padding: 24px; animation: fade .25s both; }
.lock.out { animation: lockOut .38s var(--ease) forwards; }
@keyframes lockOut { to { opacity: 0; transform: scale(1.06); } }
.lock-in { width: 100%; max-width: 320px; text-align: center; }
.lock-logo { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; overflow: hidden; animation: pop .5s var(--spring); }
.lock h2 { margin: 0; } .lock p { color: var(--muted); margin: 6px 0 18px; font-size: 14px; }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin-bottom: 26px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); transition: all .2s var(--spring); }
.pin-dots i.on { background: var(--primary); border-color: var(--primary); transform: scale(1.15); }
.pin-dots.shake { animation: shake .4s; } .pin-dots.shake i { border-color: var(--coral); }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; justify-items: center; }
.pad button { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); font: 700 26px var(--font); cursor: pointer; display: grid; place-items: center; transition: transform .15s var(--spring), background .15s; }
.pad button:active { transform: scale(.9); background: var(--primary-soft); }
.pad button svg { width: 24px; height: 24px; }
.lock-extra { margin-top: 18px; min-height: 36px; }

/* ripple */
.rpl { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .18; transform: scale(0); animation: rpl .55s var(--ease) forwards; }
@keyframes rpl { to { transform: scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pc-orb, .quick .sos i, .b-core { animation: none !important; } }
.btn, .quick a, .quick button, .list a, .list button, .plan button, .checkin-cta { position: relative; overflow: hidden; }
.head .theme-tg { margin-right: 8px; }
.theme-tg svg { animation: spin-in .45s var(--spring); }
.name-card { animation: rise .4s var(--ease) both; }
.name-card input { min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); padding: 0 12px; font: inherit; min-width: 0; }
.link-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; margin-top: 8px; padding: 4px 0; cursor: pointer; text-decoration: underline; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spinr .7s linear infinite; }
@keyframes spinr { to { transform: rotate(360deg); } }
/* conta Google */
.cloud-card .avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.cloud-card.on { background: linear-gradient(160deg, var(--primary-soft), var(--surface) 75%); }
.gbtn { min-height: 44px; display: flex; justify-content: center; }
.row.wrap { flex-wrap: wrap; gap: 8px; }
.ob-cloud { text-align: center; margin-top: 14px; display: grid; gap: 8px; justify-items: center; }
.or { display: flex; align-items: center; gap: 10px; width: 100%; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.badge.sm { display: inline-flex; align-items: center; gap: 3px; }
