/* Bloomly — styles. Mobile first; wider layouts are added with min-width queries. */

:root {
  --cream: #FCF9F5;
  --paper: #F6F0E8;
  --ink: #1E1B2E;
  --muted: #6B6578;
  --card: #FFFFFF;
  --line: #EDE6DD;
  --rose: #F8D7DA;
  --lavender: #E4DDF7;
  --sky: #D6EAF8;
  --mint: #D8F0E3;
  --peach: #FBE3D0;
  --accent: #C2456B;
  --accent-dark: #A23558;
  --teal: #2F9C95;
  --plum: #4B1D3F;
  --plum-2: #5E2A50;
  --leaf: #4E8F6B;

  --sans: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --r: 12px;
  --r-lg: 28px;
  --gutter: 16px;
  --shadow: 0 1px 2px rgba(30, 27, 46, .04), 0 8px 24px rgba(30, 27, 46, .06);
  --shadow-lg: 0 30px 80px rgba(30, 27, 46, .18);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 768px) { :root { --gutter: 32px; } }

/* ---------- Type ---------- */
.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.h1, .h2 {
  font-family: var(--sans);
  font-weight: 400;
  letter-spacing: -.03em;
  color: var(--ink);
}
.h1 { font-size: clamp(38px, 7.2vw, 76px); line-height: 1.04; }
.h2 { font-size: clamp(30px, 5vw, 54px); line-height: 1.08; }
.h1 em, .h2 em { font-style: normal; color: var(--accent); }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); line-height: 1.5; max-width: 620px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border-radius: var(--r);
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-danger { background: #B3261E; color: #fff; }
.btn-danger:hover { background: #8E1D17; }
.btn-light { background: var(--cream); color: var(--plum); }
.btn-light:hover { background: #fff; }
.btn-ghost-light { color: var(--cream); border: 1px solid rgba(252, 249, 245, .4); }
.btn-ghost-light:hover { border-color: var(--cream); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 12px; }
.btn-block { width: 100%; }
.link-arrow { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 249, 245, .88);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.nav.scrolled { box-shadow: 0 1px 0 var(--line); }
.nav-inner { display: flex; align-items: center; gap: 12px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 600; font-size: 22px; letter-spacing: -.03em; color: var(--ink); }
.logo svg { width: 30px; height: 30px; }
.nav-links { display: none; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-wallet { display: none; font-size: 15px; color: var(--ink); padding: 8px 10px; border-radius: 8px; }
.nav-wallet:hover { color: var(--accent); }
.nav-burger { width: 44px; height: 44px; border-radius: var(--r); display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); }
.nav-burger span, .nav-burger span::before, .nav-burger span::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s, background .2s; }
.nav-burger span::before, .nav-burger span::after { content: ""; position: absolute; left: 0; }
.nav-burger span::before { top: -6px; }
.nav-burger span::after { top: 6px; }
.nav-burger[aria-expanded="true"] span { background: transparent; }
.nav-burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

.mnav { display: none; border-top: 1px solid var(--line); background: var(--cream); padding: 8px var(--gutter) 20px; max-height: calc(100dvh - 64px); overflow-y: auto; }
.mnav.open { display: block; }
.mnav a, .mnav button.mnav-link { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); text-align: left; }
.mnav .mnav-sub { padding-left: 16px; font-size: 16px; color: var(--muted); }
.mnav-actions { display: grid; gap: 10px; margin-top: 18px; }

.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; padding: 8px 10px; border-radius: 8px; }
.dd-btn svg { width: 10px; transition: transform .2s; }
.dd.open .dd-btn svg { transform: rotate(180deg); }
.dd-menu {
  position: absolute; top: calc(100% + 8px); left: -8px; min-width: 300px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 8px; display: none;
}
.dd.open .dd-menu { display: grid; }
.dd-item { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: 10px; }
.dd-item:hover { background: var(--paper); }
.dd-item .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; }
.dd-item b { display: block; font-weight: 600; font-size: 15px; }
.dd-item small { color: var(--muted); font-size: 13px; }

@media (min-width: 1000px) {
  .nav-links { display: flex; align-items: center; gap: 2px; margin-left: 20px; }
  .nav-links > a { font-size: 15px; padding: 8px 10px; border-radius: 8px; }
  .nav-links > a:hover, .dd-btn:hover { color: var(--accent); }
  .nav-wallet { display: inline-flex; }
  .nav-burger { display: none; }
  .mnav { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { padding: 28px 0 0; }
.new-chip {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--accent); border-radius: 999px; padding: 3px 12px 3px 3px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 22px; max-width: 100%;
}
.new-chip b { background: var(--accent); color: #fff; border-radius: 999px; padding: 3px 10px; font-weight: 500; }
.new-chip:hover { background: var(--rose); }
.hero .h1 { max-width: 15ch; }
.hero .lead { margin-top: 20px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-ctas .btn { flex: 1 1 auto; }
@media (min-width: 560px) { .hero-ctas .btn { flex: 0 0 auto; } }
@media (min-width: 768px) { .hero { padding-top: 56px; } }

/* Tracker chip marquee (stands in for a customer logo strip) */
.marquee { margin-top: 40px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 10px; width: max-content; animation: marquee 36s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.tchip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 15px; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Giant patterned word */
.bloomword { position: relative; margin-top: 28px; }
.bloomword svg { width: 100%; height: auto; overflow: visible; }
.sticker {
  position: absolute; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  background: var(--card); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 6px; padding: 4px 8px;
  white-space: nowrap; transform: rotate(var(--rot, -4deg)); box-shadow: 3px 3px 0 var(--ink);
}
@media (max-width: 599px) { .sticker { font-size: 9px; padding: 3px 6px; } .sticker:nth-of-type(2) { display: none; } }
@media (min-width: 768px) { .sticker { font-size: 12px; padding: 6px 10px; } }

/* Product frame with tabs */
.frame {
  position: relative; z-index: 2;
  background: var(--lavender); border-radius: 24px; padding: 10px;
  box-shadow: var(--shadow-lg);
}
.frame-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 4px 12px; flex-wrap: wrap; }
.frame-dots { display: flex; gap: 6px; }
.frame-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(30, 27, 46, .15); }
.seg { display: inline-flex; background: rgba(255, 255, 255, .6); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 7px 12px; border-radius: 8px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.frame-body { background: var(--cream); border-radius: 16px; padding: 24px 12px; overflow: hidden; }
.hero-frame { margin-top: -1.5%; }
.phones { display: flex; justify-content: center; gap: 24px; }
.phones .mini:nth-child(n+2) { display: none; }
@media (min-width: 760px) { .phones .mini:nth-child(2) { display: block; } }
@media (min-width: 1100px) { .phones .mini:nth-child(3) { display: block; } }

/* Hero: desktop web-app mockup. Drawn at 1040×600 and scaled to fit the frame. */
.hero-frame .frame-body { padding: 12px; }
@media (max-width: 559px) { .frame-note { display: none; } }
.dstage { position: relative; width: 100%; height: 0; overflow: hidden; border-radius: 12px; }
.dslide { position: absolute; top: 0; left: 0; width: 1040px; height: 600px; transform-origin: top left; opacity: 0; transition: opacity .7s ease; }
.dslide.on { opacity: 1; }
.dapp { display: grid; grid-template-columns: 200px 1fr; height: 100%; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 13px; text-align: left; }
.dside { background: var(--paper); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; }
.dside .logo { font-size: 17px; margin: 0 0 16px 4px; }
.dside .logo svg { width: 22px; height: 22px; }
.dnav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 13.5px; }
.dnav svg { width: 18px; height: 18px; }
.dnav.on { background: var(--card); color: var(--accent); font-weight: 600; box-shadow: var(--shadow); }
.dcheck { margin-top: auto; background: var(--accent); color: #fff; border-radius: 12px; padding: 12px 10px; text-align: center; font-weight: 600; font-size: 13px; }
.dcheck small { display: block; font-weight: 500; opacity: .85; margin-top: 2px; }
.dmain { padding: 22px 28px; overflow: hidden; }
.dlabel { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dmain h4 { font-family: var(--sans); font-weight: 400; font-size: 30px; letter-spacing: -.03em; margin: 2px 0 14px; }
.dgrid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; align-items: start; }
.dgrid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.dtiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.dcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; }
.dcard:last-child { margin-bottom: 0; }
.dcard.rose { background: var(--rose); border-color: transparent; }
.dcard.sky { background: var(--sky); border-color: transparent; }
.dcard.mint { background: var(--mint); border-color: transparent; }
.dcard.lav { background: var(--lavender); border-color: transparent; }
.dcard h5 { font-family: var(--sans); font-size: 14px; font-weight: 600; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.dcard h5 span { font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .08em; color: var(--muted); }
.dbig { font-family: var(--sans); font-size: 26px; letter-spacing: -.03em; line-height: 1.1; }
.drow { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.drow:last-child { border-bottom: 0; }
.dhabit { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .7); }
.dhabit:last-child { border-bottom: 0; }
.dhabit i { width: 18px; height: 18px; border-radius: 6px; border: 2px solid #8CC5AE; background: rgba(255, 255, 255, .6); font-style: normal; color: #fff; font-size: 11px; display: grid; place-items: center; }
.dhabit i.on { background: var(--teal); border-color: var(--teal); }
.dbars { display: flex; align-items: flex-end; gap: 8px; height: 110px; }
.dbars div { flex: 1; display: grid; justify-items: center; align-content: end; gap: 3px; height: 100%; font-size: 10px; color: var(--muted); }
.dbars b { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: var(--accent); }
.dhbar { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: center; margin: 6px 0; }
.dhbar span:last-child { height: 8px; border-radius: 8px; background: var(--paper); overflow: hidden; }
.dhbar span:last-child b { display: block; height: 100%; background: var(--teal); border-radius: 8px; }
.dcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; font-size: 13px; }
.dcal .dow { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.dcal .d { height: 40px; display: grid; place-items: center; border-radius: 50%; position: relative; width: 40px; margin: 0 auto; }
.dcal .d.per { background: var(--accent); color: #fff; }
.dcal .d.pred { border: 1.5px dashed var(--accent); color: var(--accent-dark); }
.dcal .d.fer { background: #CBE9E6; }
.dcal .d.ovu::after { content: "✿"; position: absolute; top: -4px; right: -2px; font-size: 11px; color: var(--teal); }
.dcal .d.today { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 700; }
.dcal .d.has::before { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--ink); opacity: .45; }

/* Mini phone mockup (stage tabs) */
.mini {
  width: 280px; max-width: 100%; flex: 0 0 auto;
  background: var(--ink); border-radius: 38px; padding: 9px;
  box-shadow: 0 20px 50px rgba(30, 27, 46, .18);
}
.mini-screen { background: var(--cream); border-radius: 30px; overflow: hidden; height: 540px; display: flex; flex-direction: column; font-size: 12px; }
.mini-top { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 6px; font-weight: 600; font-size: 11px; }
.mini-body { flex: 1; padding: 6px 14px; display: flex; flex-direction: column; gap: 9px; overflow: hidden; }
.mini-tabs { display: flex; justify-content: space-around; padding: 8px 6px 14px; border-top: 1px solid var(--line); background: var(--card); font-size: 9.5px; color: var(--muted); }
.mini-tabs span { display: grid; justify-items: center; gap: 2px; }
.mini-tabs span.on { color: var(--accent); font-weight: 600; }
.mini-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.mini-card.rose { background: var(--rose); border-color: transparent; }
.mini-card.sky { background: var(--sky); border-color: transparent; }
.mini-card.mint { background: var(--mint); border-color: transparent; }
.mini-card.lav { background: var(--lavender); border-color: transparent; }
.mini-card b { font-weight: 600; }
.mini-h { font-family: var(--sans); font-size: 18px; letter-spacing: -.02em; }
.mini-cta { background: var(--accent); color: #fff; border-radius: 12px; text-align: center; padding: 11px; font-weight: 600; margin-top: auto; }
.mini-ring { display: grid; place-items: center; position: relative; }
.mini-ring .ctr { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.mini-ring .ctr b { font-family: var(--sans); font-size: 30px; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.mini-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .7); overflow: hidden; margin-top: 6px; }
.mini-bar i { display: block; height: 100%; background: var(--teal); border-radius: 6px; }
.mini-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mini-chips span { background: rgba(255, 255, 255, .75); border-radius: 999px; padding: 2px 8px; font-size: 10px; }
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; font-size: 10.5px; }
.mini-cal .dow { color: var(--muted); font-size: 9px; padding-bottom: 2px; }
.mini-cal .d { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; position: relative; }
.mini-cal .d.per { background: var(--accent); color: #fff; }
.mini-cal .d.pred { border: 1.5px dashed var(--accent); color: var(--accent); }
.mini-cal .d.fer { background: #CBE9E6; }
.mini-cal .d.ovu::after { content: "✿"; position: absolute; top: -5px; right: -3px; font-size: 9px; color: var(--teal); }
.mini-cal .d.today { box-shadow: inset 0 0 0 1.5px var(--ink); font-weight: 700; }
.mini-cal .wk { grid-column: 1 / -1; background: var(--lavender); border-radius: 6px; font-size: 9px; padding: 1px 6px; text-align: left; color: #5B4A99; }
.mini-legend { display: flex; flex-wrap: wrap; gap: 8px; font-size: 9.5px; color: var(--muted); }
.mini-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }

/* ---------- Generic section ---------- */
.section { padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 120px 0; } }
.section-head { display: grid; gap: 16px; margin-bottom: 40px; }
.section-head.center { text-align: center; justify-items: center; }
.section-head .lead { margin: 0; }
.section-head.center .lead { margin: 0 auto; }

/* Reality */
.reality { text-align: center; position: relative; }
.reality .vine { width: min(420px, 90%); margin: 0 auto 8px; }
.reality .h2 { max-width: 18ch; margin: 16px auto 0; }
.reality .serif-big { font-family: var(--serif); font-size: clamp(30px, 5vw, 54px); line-height: 1.08; letter-spacing: -.02em; color: var(--accent); font-style: italic; }
.reality-copy { max-width: 560px; margin: 28px auto 0; display: grid; gap: 16px; color: var(--muted); font-size: 18px; }
.app-pile { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 32px; }
.app-pile span { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--muted); color: var(--muted); }
.app-pile span:nth-child(odd) { transform: rotate(-3deg); }
.app-pile span:nth-child(even) { transform: rotate(2deg); }

/* Approach — big plum block */
.block {
  background: var(--plum); color: var(--cream); border-radius: var(--r-lg);
  padding: 40px 20px; position: relative; overflow: hidden;
}
@media (min-width: 768px) { .block { padding: 64px 56px; } }
.block .label { color: #F5B8CB; }
.block .h2 { color: var(--cream); margin-top: 14px; max-width: 14ch; }
.block .h2 em { color: #F5B8CB; }
.block-grid { display: grid; gap: 32px; }
@media (min-width: 1000px) { .block-grid { grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; } }
.feat-grid { display: grid; gap: 12px; }
@media (min-width: 600px) { .feat-grid { grid-template-columns: 1fr 1fr; } }
.feat { border-radius: 20px; padding: 20px; color: var(--ink); display: grid; gap: 8px; align-content: start; }
.feat svg { height: 96px; width: auto; margin-bottom: 4px; }
.feat h3 { font-family: var(--sans); font-weight: 600; font-size: 20px; letter-spacing: -.02em; }
.feat p { font-size: 15px; color: #4B4558; }
.feat.rose { background: var(--rose); }
.feat.sky { background: var(--sky); }
.feat.lav { background: var(--lavender); }
.feat.mint { background: var(--mint); }
.block-foot { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; border-top: 1px solid rgba(252, 249, 245, .18); }
.block-foot p { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 28px); }

/* Stages */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; justify-content: flex-start; }
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 700px) { .tabs { justify-content: center; } }
.tab { flex: 0 0 auto; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.stage { display: grid; gap: 28px; margin-top: 32px; align-items: center; }
@media (min-width: 900px) { .stage { grid-template-columns: .8fr 1.2fr; gap: 56px; } }
.stage-copy h3 { font-family: var(--sans); font-weight: 400; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.03em; line-height: 1.1; }
.stage-copy p { color: var(--muted); font-size: 17px; margin-top: 12px; }
.stage-copy ul { list-style: none; margin-top: 18px; display: grid; gap: 10px; }
.stage-copy li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.stage-copy li::before { content: "✿"; color: var(--accent); }
.stage-frame .frame-body { display: grid; place-items: center; padding: 28px 12px; }

/* How it works */
.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: grid; gap: 10px; align-content: start; position: relative; }
.step-num { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .1em; }
.step svg { height: 110px; width: auto; margin: 8px 0; }
.step h3 { font-family: var(--sans); font-weight: 500; font-size: 24px; letter-spacing: -.02em; }
.step p { color: var(--muted); font-size: 15px; }

/* Why */
.why-head { display: grid; gap: 24px; align-items: center; margin-bottom: 40px; }
@media (min-width: 900px) { .why-head { grid-template-columns: 1.2fr .8fr; } }
.why-head svg { width: min(320px, 70%); margin: 0 auto; }
.why-grid { display: grid; gap: 12px; }
@media (min-width: 600px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .why-grid { grid-template-columns: repeat(4, 1fr); } }
.why { border-radius: 20px; padding: 22px; min-height: 200px; display: grid; gap: 12px; align-content: space-between; }
.why p { font-size: 17px; line-height: 1.4; color: #3A3447; }
.why p b { font-weight: 600; color: var(--ink); display: block; font-size: 19px; margin-bottom: 4px; letter-spacing: -.01em; font-family: var(--sans); }
.why svg { width: 44px; height: 44px; }
.why.rose { background: var(--rose); }
.why.sky { background: var(--sky); }
.why.mint { background: var(--mint); }
.why.peach { background: var(--peach); }
.stats { margin-top: 28px; display: grid; gap: 12px; }
@media (min-width: 700px) { .stats { grid-template-columns: 1fr 1fr 1.4fr; } }
.stat { border: 1px solid var(--line); background: var(--card); border-radius: 20px; padding: 20px 22px; }
.stat b { display: block; font-family: var(--sans); font-weight: 400; font-size: 44px; letter-spacing: -.03em; color: var(--accent); line-height: 1.1; }
.stat span { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat.note { display: grid; align-content: center; gap: 8px; background: var(--paper); border-color: transparent; }
.stat.note p { font-size: 15px; color: var(--muted); }

/* FAQ */
.faq-wrap { display: grid; gap: 32px; }
@media (min-width: 900px) { .faq-wrap { grid-template-columns: .8fr 1.2fr; gap: 56px; } }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px 0; font-family: var(--sans); font-size: 19px; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 22px; color: var(--accent); transition: transform .2s; flex-shrink: 0; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 640px; }

/* Closing CTA */
.closing { text-align: center; padding-bottom: 80px; }
.closing .bloomword { margin: 0 auto; max-width: 1100px; }
.closing p { font-size: clamp(18px, 2vw, 22px); color: var(--muted); margin: 16px auto 0; max-width: 520px; }
.closing .hero-ctas { justify-content: center; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 32px; background: var(--paper); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr repeat(3, 1fr); } }
.footer-brand { grid-column: 1 / -1; display: grid; gap: 12px; align-content: start; }
@media (min-width: 900px) { .footer-brand { grid-column: auto; } }
.footer-brand p { color: var(--muted); font-size: 15px; max-width: 320px; }
.footer h4 { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer li a, .footer li button { font-size: 15px; color: var(--ink); text-align: left; }
.footer li a:hover, .footer li button:hover { color: var(--accent); }
.chain-row { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.chain-logo { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.chain-logo:hover { border-color: var(--ink); }
.chain-logo img, .chain-logo .chain-mark { width: 28px; height: 28px; border-radius: 8px; }
.chain-logo span { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.chain-links { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; font-size: 14px; }
.chain-links a { color: var(--accent); }
.chain-links a:hover { text-decoration: underline; }
.contract-addr { font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; }
.disclaimer { margin-top: 24px; font-size: 13px; color: var(--muted); max-width: 820px; }
.copyright { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 1000;
  transform: translate(-50%, 140%); transition: transform .35s cubic-bezier(.3, 1.4, .5, 1);
  background: var(--ink); color: var(--cream); border-radius: 14px; padding: 12px 18px;
  font-size: 14px; max-width: calc(100vw - 32px); width: max-content; text-align: center; box-shadow: var(--shadow-lg);
}
.toast.show { transform: translate(-50%, 0); }
#petals { position: fixed; inset: 0; pointer-events: none; z-index: 900; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* =======================================================================
   APP (tracker) — full screen on phones, a centred phone column on desktop
   ======================================================================= */
.app-overlay { position: fixed; inset: 0; z-index: 100; background: var(--paper); display: none; }
.app-overlay.open { display: block; }
.app-art { display: none; }
.app-panel { position: absolute; inset: 0; background: var(--cream); display: flex; flex-direction: column; overflow: hidden; }
.app-exit-desktop { display: none !important; }

/* App layout. Phones: header → content → check-in → bottom tabs (stacked).
   The sidebar wrapper "dissolves" (display: contents) so its children can be reordered. */
.app-layout { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.app-side { display: contents; }
.app-side .app-head { order: 0; }
.app-main { order: 1; flex: 1; min-height: 0; display: flex; flex-direction: column; container-type: inline-size; }
#dock-checkin { order: 2; }
.app-side .app-dock { order: 3; }
#dock-checkin.not-today { display: none; }
.side-back { display: none !important; }
#head-wallet:empty { display: none; }
.app-side .app-head #head-wallet { order: 1; margin-left: auto; }
.app-side .app-head .head-right { order: 2; }
.screen { width: 100%; margin: 0 auto; }
.today-grid, .two-col, .ins-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.today-grid > *, .two-col > *, .ins-grid > * { min-width: 0; }

/* Wide content area (tablet landscape / desktop): cards side by side */
@container (min-width: 640px) {
  .today-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .two-col { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .me-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ins-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .ins-grid > .stat-grid { grid-column: 1 / -1; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0; }
  .ins-grid .card, .today-grid .card, .two-col .card { margin-bottom: 16px; }
  .ins-grid > .card { margin-bottom: 0; }
}
@container (min-width: 1000px) {
  .ins-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* (Tablet & desktop app rules live at the very end of this file.) */

.app-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: max(14px, env(safe-area-inset-top)) 18px 10px; }
.app-head .logo { font-size: 19px; }
.app-head .logo svg { width: 24px; height: 24px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); font-size: 16px; }
.icon-btn:hover { border-color: var(--ink); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { background: var(--mint); border-color: transparent; color: #1F6E58; }
.pill.warn { background: var(--peach); border-color: transparent; color: #8A4B1D; }
.head-right { display: flex; gap: 8px; align-items: center; }

.app-banner { margin: 0 16px 8px; padding: 10px 12px; border-radius: 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.app-banner.warn { background: var(--peach); }
.app-banner.info { background: var(--sky); }
.app-banner button { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

.app-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding: 4px 16px 24px; }
.app-scroll::-webkit-scrollbar { width: 0; }
.screen-title { font-family: var(--sans); font-weight: 400; font-size: 30px; letter-spacing: -.03em; margin: 6px 2px 14px; }
.screen-title em { font-style: normal; color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }

.app-dock { border-top: 1px solid var(--line); background: var(--card); padding-bottom: env(safe-area-inset-bottom); }
.checkin-wrap { padding: 10px 16px 6px; background: var(--cream); border-top: 1px solid var(--line); }
.checkin {
  width: 100%; min-height: 52px; border-radius: 14px; background: var(--accent); color: #fff;
  font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 16px;
}
.checkin:hover { background: var(--accent-dark); }
.checkin .flame { background: rgba(255, 255, 255, .2); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.checkin.done { background: var(--mint); color: #1F6E58; cursor: default; }
.checkin.soft { background: var(--card); color: var(--ink); border: 1.5px dashed var(--accent); }
.checkin.busy { background: var(--accent-dark); cursor: progress; }
.checkin-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; min-height: 16px; }
.tabbar { display: grid; grid-template-columns: repeat(4, 1fr); }
.tabbar button { display: grid; justify-items: center; gap: 2px; padding: 8px 0 10px; font-size: 11px; color: var(--muted); }
.tabbar svg { width: 22px; height: 22px; }
.tabbar button[aria-current="page"] { color: var(--accent); font-weight: 600; }

/* Cards in the app */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 12px; }
.card.rose { background: var(--rose); border-color: transparent; }
.card.sky { background: var(--sky); border-color: transparent; }
.card.mint { background: var(--mint); border-color: transparent; }
.card.lav { background: var(--lavender); border-color: transparent; }
.card.peach { background: var(--peach); border-color: transparent; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h3 { font-family: var(--sans); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.card-head .tiny { font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.text-btn { font-weight: 600; font-size: 14px; color: var(--accent); padding: 6px 4px; }
.text-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Ring */
.ring-card { text-align: center; padding: 18px 16px 16px; }
.ring { position: relative; width: 230px; max-width: 72vw; margin: 0 auto; aspect-ratio: 1; }
.ring svg { width: 100%; height: 100%; }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; }
.ring-center .k { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ring-center b { font-family: var(--sans); font-weight: 400; font-size: 54px; letter-spacing: -.04em; line-height: 1; }
.phase-pill { margin-top: 4px; display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.phase-Period { background: var(--rose); color: var(--accent-dark); }
.phase-Fertile, .phase-Ovulation { background: #CBE9E6; color: #1E6E68; }
.phase-Luteal { background: var(--lavender); color: #5B4A99; }
.phase-Follicular { background: var(--paper); color: var(--muted); }
.phase-Late { background: var(--peach); color: #8A4B1D; }
.ring-headline { font-family: var(--sans); font-size: 24px; letter-spacing: -.02em; margin-top: 12px; }
.est { display: inline-block; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--muted); vertical-align: middle; margin-left: 6px; }
.ring-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; min-height: 38px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.static { cursor: default; background: rgba(255, 255, 255, .75); border-color: transparent; min-height: 30px; padding: 4px 10px; font-size: 13px; }
.chip-group { margin-bottom: 18px; }
.chip-group > .k { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: block; }

/* Water */
.water { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; }
.glass-svg { width: 92px; height: 120px; }
.glass-fill { transform-box: fill-box; transform-origin: bottom; transition: transform .5s cubic-bezier(.3, 1.2, .5, 1); }
.water-num { font-family: var(--sans); font-size: 30px; letter-spacing: -.03em; line-height: 1.1; }
.water-msg { font-size: 13px; color: #1F5D7A; margin-top: 2px; min-height: 18px; }
.glasses { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.g { width: 22px; height: 28px; border-radius: 4px 4px 7px 7px; border: 1.5px solid #7FB3D1; background: rgba(255, 255, 255, .6); }
.g.on { background: #6FB6DD; border-color: #4C9BC6; }
.water-actions { display: flex; gap: 8px; margin-top: 14px; }
.water-actions .btn { flex: 1; }
.btn-water { background: #2F7FAE; color: #fff; }
.btn-water:hover { background: #256C95; }

/* Habits */
.habit { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .7); width: 100%; text-align: left; }
.habit:last-child { border-bottom: 0; }
.habit .ic { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .7); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.habit .nm { flex: 1; font-size: 15px; }
.tick { width: 28px; height: 28px; border-radius: 9px; border: 2px solid #8CC5AE; background: rgba(255, 255, 255, .6); display: grid; place-items: center; color: transparent; font-size: 15px; flex-shrink: 0; }
.habit[aria-pressed="true"] .tick { background: var(--teal); border-color: var(--teal); color: #fff; }
.habit[aria-pressed="true"] .nm { text-decoration: line-through; text-decoration-color: rgba(30, 27, 46, .3); }
.progress { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .7); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--teal); border-radius: 8px; transition: width .4s; }

/* Pregnancy */
.preg-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.preg-week { font-family: var(--sans); font-size: 34px; letter-spacing: -.03em; line-height: 1.05; }
.preg-fruit { font-size: 54px; line-height: 1; }
.preg-notes { display: grid; gap: 8px; margin-top: 14px; }
.preg-note { background: rgba(255, 255, 255, .7); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.preg-note .k { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #5B4A99; margin-bottom: 2px; }
.kick-big { width: 100%; min-height: 64px; border-radius: 16px; background: var(--accent); color: #fff; font-size: 18px; font-weight: 600; }
.kick-stats { display: flex; justify-content: space-around; text-align: center; margin: 12px 0; }
.kick-stats b { display: block; font-family: var(--sans); font-size: 28px; font-weight: 500; }
.appt { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.appt:last-of-type { border-bottom: 0; }
.appt .dt { font-family: var(--mono); font-size: 12px; background: var(--lavender); border-radius: 8px; padding: 6px 8px; text-align: center; min-width: 64px; }
.appt .tx { flex: 1; font-size: 14px; word-break: break-word; }
.row-form { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
@media (min-width: 380px) { .row-form { grid-template-columns: 140px 1fr auto; } }

/* Forms */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.input { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 16px; }
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { min-height: 72px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
.stepper button { width: 42px; height: 42px; font-size: 20px; }
.stepper output { min-width: 52px; text-align: center; font-weight: 600; }

/* Late / alert card */
.alert { border-radius: 20px; padding: 16px; margin-bottom: 12px; background: var(--peach); }
.alert h3 { font-family: var(--sans); font-weight: 600; font-size: 17px; }
.alert p { font-size: 14px; margin-top: 4px; }
.alert .btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head h3 { font-family: var(--sans); font-weight: 500; font-size: 20px; letter-spacing: -.02em; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { text-align: center; font-family: var(--mono); font-size: 10px; color: var(--muted); padding: 4px 0; }
.cal .day { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 14px; position: relative; border: 1.5px solid transparent; }
.cal button.day:hover { border-color: var(--line); }
.cal .day.out { color: #C4BDB4; }
.cal .day.per { background: var(--accent); color: #fff; }
.cal .day.pred { border: 1.5px dashed var(--accent); color: var(--accent-dark); }
.cal .day.fer { background: #CBE9E6; }
.cal .day.ovu::after { content: "✿"; position: absolute; top: -4px; right: -2px; font-size: 12px; color: var(--teal); }
.cal .day.today { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 700; }
.cal .day.has::before { content: ""; position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--ink); opacity: .45; }
.cal .day.per.has::before { background: #fff; opacity: .8; }
.cal .wkbar { grid-column: 1 / -1; background: var(--lavender); color: #5B4A99; border-radius: 8px; font-size: 11px; padding: 2px 10px; font-weight: 600; }
.cal .day.future { cursor: default; }

/* Insights */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.stat-tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.stat-tile .k { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat-tile b { display: block; font-family: var(--sans); font-weight: 400; font-size: 30px; letter-spacing: -.03em; margin-top: 4px; }
.stat-tile b small { font-size: 14px; color: var(--muted); letter-spacing: 0; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-top: 16px; }
.bars .b { flex: 1; display: grid; justify-items: center; align-content: end; gap: 4px; height: 100%; }
.bars .b i { width: 100%; max-width: 36px; border-radius: 8px 8px 4px 4px; background: var(--accent); display: block; }
.bars .b span { font-size: 10px; color: var(--muted); }
.bars .b em { font-style: normal; font-size: 11px; font-weight: 600; }
.hbar { display: grid; grid-template-columns: 110px 1fr 28px; gap: 8px; align-items: center; font-size: 13px; padding: 4px 0; }
.hbar .tr { height: 10px; border-radius: 10px; background: var(--paper); overflow: hidden; }
.hbar .tr i { display: block; height: 100%; background: var(--teal); border-radius: 10px; }
.badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge { flex: 1; min-width: 80px; border-radius: 16px; padding: 12px 8px; text-align: center; background: var(--paper); color: var(--muted); font-size: 12px; }
.badge b { display: block; font-size: 26px; filter: grayscale(1); opacity: .45; }
.badge.on { background: var(--rose); color: var(--accent-dark); }
.badge.on b { filter: none; opacity: 1; }
.empty { text-align: center; padding: 18px 10px; color: var(--muted); font-size: 14px; }

/* Me */
.list { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin-bottom: 18px; }
.list-title { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 4px 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); min-height: 54px; width: 100%; text-align: left; }
.row:last-child { border-bottom: 0; }
button.row:hover { background: var(--paper); }
.row .l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row .l > span:first-child { font-size: 18px; width: 24px; text-align: center; }
.row .r { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.row .r .input { min-height: 36px; padding: 6px 8px; font-size: 15px; width: auto; }
.row.danger { color: #B3261E; }
.mode-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--paper); border-radius: 14px; padding: 4px; margin-bottom: 18px; }
.mode-seg button { padding: 10px 4px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.mode-seg button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

/* Sheet (bottom drawer) + dialog */
.sheet-root { position: absolute; inset: 0; z-index: 20; display: none; }
.sheet-root.open { display: block; }
.sheet-back { position: absolute; inset: 0; background: rgba(30, 27, 46, .35); opacity: 0; transition: opacity .25s; }
.sheet-root.show .sheet-back { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 90%;
  background: var(--card); border-radius: 26px 26px 0 0; display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .32s cubic-bezier(.3, 1.1, .5, 1);
}
.sheet-root.show .sheet { transform: none; }
.sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 10px auto 4px; flex-shrink: 0; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 18px 10px; }
.sheet-head h3 { font-family: var(--sans); font-weight: 500; font-size: 22px; letter-spacing: -.02em; }
.sheet-body { overflow-y: auto; padding: 4px 18px 18px; }
.sheet-foot { padding: 12px 18px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 8px; }

/* Setup & lock */
.flow { flex: 1; overflow-y: auto; padding: 8px 20px 24px; display: flex; flex-direction: column; }
.flow-steps { display: flex; gap: 6px; margin: 4px 0 22px; }
.flow-steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.flow-steps i.on { background: var(--accent); }
.flow h2 { font-family: var(--sans); font-weight: 400; font-size: 32px; letter-spacing: -.03em; line-height: 1.1; }
.flow h2 em { font-style: normal; color: var(--accent); }
.flow .sub { color: var(--muted); margin: 8px 0 22px; }
.flow-nav { display: flex; gap: 10px; margin-top: auto; padding-top: 20px; }
.flow-nav .btn { flex: 1; }
.goal { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; border: 2px solid var(--line); background: var(--card); text-align: left; width: 100%; margin-bottom: 10px; }
.goal svg { width: 56px; height: 56px; }
.goal b { display: block; font-family: var(--sans); font-weight: 600; font-size: 17px; }
.goal small { color: var(--muted); font-size: 14px; }
.goal[aria-pressed="true"] { border-color: var(--accent); background: #FFF5F7; }
.calc-note { background: var(--lavender); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.warn-box { background: var(--peach); border-radius: 12px; padding: 12px; font-size: 14px; }


/* =======================================================================
   App on tablet & desktop: full screen with a left sidebar.
   Kept last so it overrides the phone styles above.
   ======================================================================= */
@media (min-width: 700px) {
  .app-panel { border-radius: 0; background: transparent; }
  .app-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); }
  .app-side {
    display: flex; flex-direction: column; min-height: 0; overflow-y: auto;
    background: var(--paper); border-right: 1px solid var(--line); padding: 8px 12px 16px;
  }
  .app-side .app-head { flex-wrap: wrap; row-gap: 10px; padding: 14px 6px 20px; }
  .app-side .app-head #head-wallet { order: 3; width: 100%; margin-left: 0; }
  .app-side .head-right [data-action="close-app"] { display: none; }
  .app-side .app-dock { border: 0; background: none; padding: 0; order: 1; }
  .app-side #dock-checkin { order: 2; }
  .app-side .side-back { order: 3; }
  .app-side .tabbar { display: flex; flex-direction: column; gap: 4px; }
  .app-side .tabbar button {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
    font-size: 15px; color: var(--ink); text-align: left;
  }
  .app-side .tabbar button:hover { background: rgba(255, 255, 255, .7); }
  .app-side .tabbar button[aria-current="page"] { background: var(--card); color: var(--accent); box-shadow: var(--shadow); }
  #dock-checkin, #dock-checkin.not-today { display: block; margin-top: auto; }
  #dock-checkin .checkin-wrap { background: none; border: 0; padding: 20px 0 8px; }
  #dock-checkin .checkin { min-height: 0; padding: 14px 12px; font-size: 15px; flex-wrap: wrap; gap: 6px; line-height: 1.3; }
  .side-back { display: inline-flex !important; width: 100%; margin-top: 6px; }
  .me-back { display: none; }
  #banners { padding-top: 16px; }
  .app-banner { margin: 0 32px 8px; }
  .app-scroll { padding: 28px 32px 48px; }
  .screen { max-width: 1160px; }
  .screen-title { font-size: 42px; margin: 4px 0 22px; }
  .ring { width: 260px; }

  /* Sheets become centred dialogs */
  .sheet {
    left: 50%; right: auto; top: 50%; bottom: auto; width: min(600px, calc(100% - 48px)); max-height: 86%;
    border-radius: 24px; opacity: 0; transform: translate(-50%, -46%) scale(.98);
    transition: transform .22s ease, opacity .2s ease; box-shadow: var(--shadow-lg);
  }
  .sheet-root.show .sheet { opacity: 1; transform: translate(-50%, -50%); }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 18px; }

  /* Setup and lock screens: centred, with the illustrations in the background */
  .app-art { display: block; position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: .55; }
  .app-art svg { position: absolute; width: 480px; }
  .app-art .a1 { left: -80px; bottom: -60px; }
  .app-art .a2 { right: -90px; top: -60px; transform: rotate(160deg); }
  #app-view { background: var(--cream); }
  #app-view:has(.flow) { background: transparent; }
  .flow { width: 100%; max-width: 560px; margin: 0 auto; padding-top: 24px; }
}
@media (min-width: 1100px) {
  .app-layout { grid-template-columns: 264px minmax(0, 1fr); }
  .app-side { padding: 8px 16px 20px; }
  .app-scroll { padding: 36px 48px 56px; }
  .app-banner { margin: 0 48px 8px; }
}
