@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/instrument.woff2) format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/instrument-italic.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage'; font-style: normal; font-weight: 300 700; font-display: swap; src: url(../fonts/bricolage.woff2) format('woff2'); }

:root {
  --bg: #110e15;
  --bg-2: #18141e;
  --ink: #f4ede4;
  --ink-2: #d9cfc6;
  --muted: #9d93a6;
  --faint: #5f5768;
  --line: rgba(244, 237, 228, 0.09);
  --card: rgba(255, 250, 244, 0.035);
  --card-2: rgba(255, 250, 244, 0.06);
  --c-period: #ff6a57;
  --c-follicular: #7fd6aa;
  --c-ovulation: #ffc95c;
  --c-luteal: #93a9ff;
  --c-pms: #ffa05e;
  --c-steady: #6fcbd9;
  --c-muted: #6f6679;
  --ok: #7fd6aa;
  --warn: #ffa05e;
  --phase: var(--c-luteal);
  --r: 22px;
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Bricolage', 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.5;
  font-optical-sizing: auto;
  min-height: 100dvh;
  overflow-x: hidden;
}
/* Ambient phase glow + grain */
body::before {
  content: '';
  position: fixed; inset: -20vh -30vw auto -30vw; height: 80vh;
  background:
    radial-gradient(60% 55% at 50% 40%, color-mix(in oklab, var(--phase) 26%, transparent), transparent 70%),
    radial-gradient(40% 40% at 85% 10%, color-mix(in oklab, var(--phase) 12%, transparent), transparent 70%);
  pointer-events: none; z-index: 0;
  transition: background 1.2s ease;
  filter: blur(10px);
}
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.06; mix-blend-mode: overlay;
  pointer-events: none; z-index: 100;
}

#app { position: relative; z-index: 1; }
.page { max-width: 480px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 18px calc(110px + env(safe-area-inset-bottom)); }
#app.enter .page > * { animation: rise 0.55s cubic-bezier(.2, .8, .2, 1) both; }
#app.enter .page > *:nth-child(2) { animation-delay: 40ms; }
#app.enter .page > *:nth-child(3) { animation-delay: 90ms; }
#app.enter .page > *:nth-child(4) { animation-delay: 140ms; }
#app.enter .page > *:nth-child(5) { animation-delay: 190ms; }
#app.enter .page > *:nth-child(6) { animation-delay: 240ms; }
#app.enter .page > *:nth-child(n+7) { animation-delay: 290ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

h1, h2, h3, p { margin: 0; }
b { font-weight: 650; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
svg { display: block; }
input, select, textarea { font: inherit; color: var(--ink); }

.display { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.05; font-size: 34px; }
.display.xl { font-size: 52px; }
.h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 2px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; display: block; margin-left: auto; margin-right: auto; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 12px; }
.lead { color: var(--ink-2); font-size: 16px; margin: 10px 0 0; }
.note { color: var(--muted); font-size: 13px; margin-top: 10px; padding: 10px 12px; border-left: 2px solid var(--phase); background: var(--card); border-radius: 0 12px 12px 0; }
.foot { color: var(--faint); font-size: 12.5px; text-align: center; margin: 26px 8px 0; line-height: 1.6; }

.kicker {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.kicker svg { width: 15px; height: 15px; }
.kicker.ok, .k-helps, .k-loves { color: var(--ok); }
.kicker.warn, .k-avoid { color: var(--warn); }
.k-gift { color: var(--c-ovulation); }

/* top bars */
.brandbar { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 2px 0; }
.wordmark { font-family: var(--serif); font-style: italic; font-size: 26px; letter-spacing: 0.01em; }
.date { color: var(--muted); font-size: 13px; }
.top { display: flex; align-items: center; gap: 10px; min-height: 52px; margin-bottom: 12px; }
.top h1 { flex: 1; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.top h1.display { font-size: 34px; font-weight: 400; }
.top-r { display: flex; gap: 6px; align-items: center; min-width: 40px; justify-content: flex-end; }
.icon-btn { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); color: var(--ink); transition: background .2s, transform .15s; }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 10px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
span.icon-btn { visibility: hidden; }

/* dial */
.dial-wrap { position: relative; width: min(330px, 88vw); aspect-ratio: 1; margin: 6px auto 4px; }
.dial { width: 100%; height: 100%; overflow: visible; }
.dial .track { fill: none; stroke: rgba(255, 255, 255, 0.05); stroke-width: 22; }
.dial .arc { fill: none; stroke-width: 15; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: draw 1.1s cubic-bezier(.6, .05, .2, 1) forwards; animation-delay: var(--d); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.dial .tick { fill: rgba(255, 255, 255, 0.22); }
.dial .tick.past { fill: rgba(255, 255, 255, 0.5); }
.dial .marker { animation: pop 0.6s 0.9s cubic-bezier(.3, 1.6, .5, 1) both; transform-box: fill-box; transform-origin: center; }
.dial .marker .dot { fill: var(--ink); stroke: var(--bg); stroke-width: 3; }
.dial .marker .halo { fill: var(--phase); opacity: 0.45; filter: url(#glow); animation: breathe 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pop { from { opacity: 0; transform: scale(0.2); } }
@keyframes breathe { 50% { opacity: 0.8; transform: scale(1.25); } }
.dial-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.dial-l { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.dial-n { font-family: var(--serif); font-size: 104px; line-height: 0.9; letter-spacing: -0.03em; margin-top: 4px; }
.dial-s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.dial-p { font-family: var(--serif); font-style: italic; font-size: 24px; margin-top: 6px; }

/* hero */
.hero { padding: 6px 4px 4px; margin-bottom: 18px; }
.hero .display { font-size: 36px; margin-top: 2px; }
.feels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.feels span { font-size: 13px; padding: 5px 11px; border-radius: 99px; border: 1px solid color-mix(in oklab, var(--phase) 45%, transparent); color: color-mix(in oklab, var(--phase) 70%, var(--ink)); background: color-mix(in oklab, var(--phase) 9%, transparent); }
.hero .btn { margin-top: 18px; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 12px; backdrop-filter: blur(6px); }
.card.subtle { background: transparent; }
.card.subtle p { color: var(--ink-2); }
.card.mini { padding: 14px 16px; margin: 0; }
.card.mini p { font-size: 14.5px; color: var(--ink-2); }
.glow-card { border-color: color-mix(in oklab, var(--phase) 40%, transparent); background: linear-gradient(160deg, color-mix(in oklab, var(--phase) 14%, transparent), var(--card) 60%); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.split > :only-child { grid-column: 1 / -1; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-b { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.row-b .kicker { margin-bottom: 0; }
.row-b + .scale-row, .row-b + .pack { margin-top: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.tips { margin: 0; padding: 0; list-style: none; counter-reset: t; }
.tips li { position: relative; padding: 10px 0 10px 34px; border-top: 1px solid var(--line); color: var(--ink-2); }
.tips li:first-child { border-top: 0; padding-top: 2px; }
.tips li::before { counter-increment: t; content: counter(t); position: absolute; left: 0; top: 9px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--bg); background: var(--phase); }
.tips li:first-child::before { top: 1px; }
.tips.plain li { padding-left: 18px; }
.tips.plain li::before { content: ''; width: 6px; height: 6px; top: 19px; background: var(--phase); opacity: 0.8; }
.tips.plain li:first-child::before { top: 11px; }
.pb-mini { list-style: none; margin: 0; padding: 0; }
.pb-mini li { padding: 8px 0; color: var(--ink-2); display: flex; gap: 10px; align-items: baseline; }
.pb-k { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--card-2); flex: none; }
.pb-k.k-helps, .pb-k.k-loves { color: var(--ok); }
.pb-k.k-avoid { color: var(--warn); }
.pb-k.k-gift { color: var(--c-ovulation); }

/* links & buttons */
.link { display: inline-flex; align-items: center; gap: 2px; color: var(--phase); font-size: 13.5px; font-weight: 600; padding: 4px 0; }
.link svg { width: 15px; height: 15px; }
.link.center { display: flex; justify-content: center; margin-top: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 16px; font-weight: 600; font-size: 15px; transition: transform .15s, background .2s, opacity .2s; }
.btn:active { transform: scale(0.97); }
.btn.wide { width: 100%; }
.btn.sm { height: 38px; padding: 0 14px; border-radius: 12px; font-size: 13.5px; }
.btn.primary { background: var(--phase); color: #160f12; box-shadow: 0 10px 30px -10px color-mix(in oklab, var(--phase) 70%, transparent); }
.btn.ghost { background: var(--card-2); border: 1px solid var(--line); color: var(--ink); }
.btn.ghost.on { border-color: var(--phase); color: var(--phase); }
.btn.danger { background: rgba(255, 106, 87, 0.12); color: var(--c-period); border: 1px solid rgba(255, 106, 87, 0.3); }
.btn[disabled] { opacity: 0.35; pointer-events: none; }
section + .btn.wide, .card + .btn.wide { margin-top: 6px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { padding: 8px 13px; border-radius: 99px; background: var(--card-2); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); transition: all .18s; }
.chip:active { transform: scale(0.95); }
.chip.on { background: var(--phase); border-color: var(--phase); color: #160f12; font-weight: 600; }
.chip.flow-spotting.on, .chip.flow-light.on, .chip.flow-medium.on, .chip.flow-heavy.on, .chip.st-missed.on, .chip.us-argument.on { background: var(--c-period); border-color: var(--c-period); }
.chip.st-ontime.on, .chip.us-great.on { background: var(--c-steady); border-color: var(--c-steady); }
.chip.st-late.on { background: var(--c-ovulation); border-color: var(--c-ovulation); }

/* scale */
.scale-row { margin-top: 12px; }
.scale-lbl { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; background: rgba(0, 0, 0, 0.2); padding: 4px; border-radius: 14px; border: 1px solid var(--line); }
.sc { height: 40px; border-radius: 10px; font-size: 12.5px; color: var(--muted); transition: all .2s; position: relative; }
.sc.fill { background: color-mix(in oklab, var(--phase) 18%, transparent); color: var(--ink-2); }
.sc.on { background: var(--phase); color: #160f12; font-weight: 700; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.timeline li { display: flex; gap: 14px; align-items: flex-start; padding: 6px 0; position: relative; }
.timeline i { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; box-shadow: 0 0 0 4px var(--bg-2); }
.timeline b { display: block; font-weight: 600; }
.timeline span { color: var(--muted); font-size: 13.5px; }

/* alerts */
.alert { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px; border-radius: 14px; background: rgba(255, 106, 87, 0.1); border: 1px solid rgba(255, 106, 87, 0.3); font-size: 14px; color: var(--ink-2); }
.alert svg { width: 20px; height: 20px; flex: none; color: var(--c-period); }
.alert.big { margin: 0 0 12px; padding: 16px; }
.prot { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); }
.prot svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.prot-ok svg { color: var(--ok); }
.prot-note svg { color: var(--c-ovulation); }
.prot-reduced { color: var(--c-period); }

/* pack */
.pack { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-top: 14px; padding: 12px; border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)); border: 1px solid var(--line); }
.pack.small { gap: 5px; padding: 9px; }
.pk { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; position: relative; transition: transform .15s; }
.pack.small .pk { font-size: 0; }
.pk.act { background: radial-gradient(circle at 35% 30%, color-mix(in oklab, var(--c-steady) 85%, white), var(--c-steady) 55%, color-mix(in oklab, var(--c-steady) 60%, black)); color: #0d2328; }
.pk.off { background: transparent; border: 1.5px dashed color-mix(in oklab, var(--c-period) 70%, transparent); color: var(--c-period); }
.pk.past { opacity: 0.32; }
.pk.past.ontime, .pk.past.late, .pk.past.missed { opacity: 1; }
.pk.ontime { box-shadow: inset 0 0 0 2.5px var(--ok); }
.pk.late { box-shadow: inset 0 0 0 2.5px var(--c-ovulation); }
.pk.missed { background: transparent !important; border: 2px solid var(--c-period); color: var(--c-period); }
.pk.missed::after { content: ''; position: absolute; width: 70%; height: 2px; background: var(--c-period); transform: rotate(-45deg); }
.pk.now { outline: 2px solid var(--ink); outline-offset: 3px; transform: scale(1.06); }

/* legend */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 10px 4px 16px; font-size: 12.5px; color: var(--muted); }
.legend.small { margin: 12px 0 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.lg-p { background: var(--c-period); }
.lg-pp { border: 1.5px dashed var(--c-period); }
.lg-fert { background: var(--c-ovulation); }
.lg-pms { background: color-mix(in oklab, var(--c-pms) 35%, transparent); }
.lg-log { width: 5px !important; height: 5px !important; background: var(--ink); }
.lg-brk { background: color-mix(in oklab, var(--c-period) 25%, transparent); }
.lg-flow { background: var(--c-period); }
.lg-miss { border: 2px solid var(--c-period); }
.lg-act { background: var(--c-steady); }
.lg-off { border: 1.5px dashed var(--c-period); }
.lg-ok { box-shadow: inset 0 0 0 2.5px var(--ok); }
.lg-late { box-shadow: inset 0 0 0 2.5px var(--c-ovulation); }

/* calendar */
.cal { padding: 14px 12px; }
.cal-h, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-h span { text-align: center; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding-bottom: 6px; }
.cd { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative; font-size: 15px; font-variant-numeric: tabular-nums; transition: transform .15s; }
.cd:active { transform: scale(0.9); }
.cd.blank { pointer-events: none; }
.cd.future { color: var(--ink-2); }
.cd.p-log, .cd.flow { background: var(--c-period); color: #1a0d0b; font-weight: 650; }
.cd.p-pred { border: 1.5px dashed color-mix(in oklab, var(--c-period) 80%, transparent); color: var(--c-period); }
.cd.fert::before { content: ''; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--c-ovulation); }
.cd.fert { color: var(--c-ovulation); }
.cd.pms { background: color-mix(in oklab, var(--c-pms) 16%, transparent); }
.cd.late { background: color-mix(in oklab, var(--c-period) 12%, transparent); }
.cd.brk { background: color-mix(in oklab, var(--c-period) 18%, transparent); }
.cd.ps-missed { box-shadow: inset 0 0 0 2px var(--c-period); }
.cd.today { outline: 2px solid var(--ink); outline-offset: 2px; }
.cd .logdot { position: absolute; top: 5px; right: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); opacity: .85; }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { border-top: 1px solid var(--line); }
.hist li:first-child { border-top: 0; }
.hist button, .hist li > div { display: flex; flex-direction: column; text-align: left; width: 100%; padding: 10px 0; }
.hist span { color: var(--muted); font-size: 13px; }

/* day */
.ptag { display: inline-block; font-size: 13px; padding: 6px 14px; border-radius: 99px; border: 1px solid color-mix(in oklab, var(--pc) 60%, transparent); color: var(--pc); background: color-mix(in oklab, var(--pc) 10%, transparent); }
.pblock { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pblock > div:first-child { display: flex; flex-direction: column; }
textarea.note-in, .fld input, .fld select, input.search, input.pin-in {
  width: 100%; background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; outline: none; transition: border-color .2s;
}
textarea.note-in { resize: vertical; min-height: 70px; }
textarea:focus, input:focus, select:focus { border-color: var(--phase); }
select option { background: var(--bg-2); }
input.search { margin: 14px 0 12px; }
input.pin-in { width: 140px; letter-spacing: 0.3em; }
.fld { display: block; margin-top: 12px; }
.fld:first-child { margin-top: 0; }
.fld span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.tog { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }
.tog input { width: 20px; height: 20px; accent-color: var(--phase); }

/* insights */
.findings { list-style: none; margin: 0; padding: 0; }
.findings li { padding: 11px 0 11px 22px; border-top: 1px solid var(--line); position: relative; color: var(--ink-2); }
.findings li:first-child { border-top: 0; padding-top: 0; }
.findings li::before { content: '✦'; position: absolute; left: 0; color: var(--phase); font-size: 13px; top: 12px; }
.findings li:first-child::before { top: 1px; }
.chart { width: 100%; height: 140px; margin-top: 4px; }
.chart .ax { fill: var(--faint); font-size: 9px; text-anchor: middle; font-family: var(--sans); }
.progress { height: 8px; border-radius: 9px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin: 6px 0 12px; }
.progress i { display: block; height: 100%; background: var(--phase); border-radius: 9px; transition: width .6s; }
.prow { padding: 12px 0; border-top: 1px solid var(--line); }
.prow:first-of-type { border-top: 0; padding-top: 0; }
.prow-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.prow-h b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 22px; }
.bars { display: grid; grid-template-columns: 52px 1fr 28px; gap: 6px 10px; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.bar { height: 16px; background: rgba(255, 255, 255, 0.05); border-radius: 6px; position: relative; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; opacity: 0.85; }
.bv { font-size: 12px; color: var(--ink-2); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; }
.stats b.sm { font-family: var(--sans); font-size: 14px; font-weight: 600; line-height: 2.4; }
.stats span { font-size: 11.5px; color: var(--muted); }
.clens { display: flex; gap: 8px; align-items: flex-end; height: 96px; margin-top: 14px; }
.clens div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.clens i { width: 100%; max-width: 26px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--c-luteal), color-mix(in oklab, var(--c-luteal) 35%, transparent)); }
.clens span { font-size: 11px; color: var(--muted); }
.stack { display: flex; height: 14px; border-radius: 8px; overflow: hidden; gap: 2px; margin-top: 4px; }

/* menu */
.menu { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.menu button { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); transition: background .2s; }
.menu button:active { background: var(--card-2); }
.menu i { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in oklab, var(--phase) 16%, transparent); color: var(--phase); flex: none; }
.menu i svg { width: 21px; height: 21px; }
.menu div { flex: 1; display: flex; flex-direction: column; }
.menu span { color: var(--muted); font-size: 13px; }
.menu > li > button > svg { width: 18px; height: 18px; color: var(--faint); }

/* pill page */
.pill-hero { padding: 10px 2px 18px; }
.pill-hero .display.xl { margin: 4px 0 12px; }
.comp { display: flex; flex-wrap: wrap; gap: 6px; }
.comp span { padding: 6px 12px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.comp span:first-child { border-color: color-mix(in oklab, var(--c-period) 45%, transparent); }
.comp span:nth-child(2) { border-color: color-mix(in oklab, var(--c-steady) 45%, transparent); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tags span { font-size: 12px; padding: 4px 10px; border-radius: 8px; background: var(--card-2); color: var(--ink-2); }
.fy { border-color: color-mix(in oklab, var(--phase) 35%, transparent); }
.vte { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.vrow { display: grid; grid-template-columns: 1fr 44px; gap: 4px 10px; align-items: center; font-size: 13px; color: var(--muted); }
.vrow span { grid-column: 1 / -1; }
.vrow b { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
.vrow.me span, .vrow.me b { color: var(--ink); }
.vbar { height: 10px; background: rgba(255, 255, 255, 0.05); border-radius: 6px; overflow: hidden; }
.vbar i { display: block; height: 100%; border-radius: 6px; }
.picks { list-style: none; margin: 0; padding: 0; }
.pick { width: 100%; text-align: left; display: flex; flex-direction: column; padding: 11px 12px; border-radius: 14px; border: 1px solid transparent; transition: all .18s; }
.pick span { font-size: 13px; color: var(--ink-2); }
.pick small { font-size: 12px; color: var(--faint); }
.pick.on { border-color: var(--phase); background: color-mix(in oklab, var(--phase) 10%, transparent); }
.pick.on b { color: var(--phase); }
.article p { color: var(--ink-2); margin-top: 12px; }
.article p:first-of-type { margin-top: 0; }
.alert-card { border-color: rgba(255, 106, 87, 0.35); background: rgba(255, 106, 87, 0.06); }
.alert-card > p { color: var(--ink-2); }
.aches { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.aches li { display: flex; gap: 12px; align-items: flex-start; }
.aches b { font-family: var(--serif); font-size: 30px; line-height: 1; width: 28px; color: var(--c-period); flex: none; }
.aches span { color: var(--ink-2); padding-top: 4px; }

/* playbook */
.pblist { list-style: none; margin: 0; padding: 0; }
.pblist li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.pblist li:first-child { border-top: 0; padding-top: 0; }
.pblist p { color: var(--ink-2); }

/* onboarding */
.onb { padding-top: max(30px, env(safe-area-inset-top)); }
.onb-mark { width: 170px; margin: 10px auto 6px; }
.onb-mark .dial-wrap { width: 170px; }
.onb-mark .dial-c { display: none; }
.onb h1.display.xl { text-align: center; font-style: italic; font-size: 60px; }
.onb .lead { text-align: center; margin-bottom: 18px; }
.onb-list { margin: 6px 0 18px; }
.onb .btn.wide { margin-top: 18px; }
.onb h2.display { margin-bottom: 18px; }
.choices { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.choice { text-align: left; padding: 18px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; transition: all .2s; }
.choice b { font-size: 17px; }
.choice span { color: var(--muted); font-size: 14px; }
.choice.on { border-color: var(--phase); background: color-mix(in oklab, var(--phase) 12%, transparent); }
.onb .row-b { margin-top: 22px; }

/* lock */
.lock { display: flex; flex-direction: column; align-items: center; padding-top: 12vh; }
.lock-ic { width: 54px; height: 54px; color: var(--phase); margin-bottom: 8px; }
.lock-ic svg { width: 100%; height: 100%; }
.pin-dots { display: flex; gap: 14px; margin: 26px 0; }
.pin-dots i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--muted); }
.pin-dots i.on { background: var(--phase); border-color: var(--phase); }
.pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px; margin-bottom: 24px; }
.pad button { height: 72px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); font-size: 26px; font-family: var(--serif); }
.pad button:active { background: var(--card-2); }

/* nav */
.nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  width: min(452px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  padding: 7px; border-radius: 26px; background: rgba(24, 20, 30, 0.72); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
}
.nv { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--faint); font-size: 10.5px; font-weight: 600; letter-spacing: .03em; transition: color .2s; }
.nv i { width: 24px; height: 24px; }
.nv i svg { width: 100%; height: 100%; }
.nv.on { color: var(--ink); }
.nv.on i { color: var(--phase); }
.nv-plus i { width: 46px; height: 46px; margin-top: -2px; border-radius: 16px; background: var(--phase); color: #160f12 !important; display: grid; place-items: center; box-shadow: 0 8px 24px -8px color-mix(in oklab, var(--phase) 80%, transparent); }
.nv-plus i svg { width: 24px; height: 24px; }
.nv-plus span { display: none; }

.toast {
  position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200;
  background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-size: 14px; font-weight: 600;
  animation: toast .35s cubic-bezier(.2, 1.4, .4, 1); max-width: calc(100% - 40px); text-align: center;
}
@keyframes toast { from { opacity: 0; transform: translate(-50%, 12px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .dial .arc { stroke-dashoffset: 0; }
}
@media (min-width: 700px) {
  body { font-size: 16px; }
}
