/* Bloomback website: the same warm look as the app. */
:root {
  --bg: #FFF7F0;
  --surface: #FFFFFF;
  --ink: #3A2E39;
  --muted: #8A7A86;
  --line: #F1E3DA;
  --accent: #F26B5B;
  --accent-ink: #FFFFFF;
  --soft: #FFE6DC;
  --mint: #D3F1E3;
  --mint-ink: #2E6B52;
  --sun: #FFE7A3;
  --radius: 22px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #241B22; --surface: #30252E; --ink: #FBEFF0; --muted: #C2AEBB; --line: #43353F;
    --accent: #FF8A7A; --accent-ink: #241B22; --soft: #4A2F33; --mint: #2C4A3E; --mint-ink: #A8E3C8; --sun: #5A4A22;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.45; font-weight: 500;
}
main { max-width: 560px; margin: 0 auto; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 700; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 19px; }
p { margin: 0; }
a { color: var(--accent); font-weight: 700; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.bold { font-weight: 800; }
.mint-ink { color: var(--mint-ink); }
.accent { color: var(--accent); }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.loading { padding: 40px 0; text-align: center; color: var(--muted); }

.card { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 0 var(--line); }
.card.soft { background: var(--soft); }
.card.mint { background: var(--mint); }
.card.sun { background: var(--sun); }

button, .button {
  font: inherit; cursor: pointer; border: 0; border-radius: 999px; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.primary { background: var(--accent); color: var(--accent-ink); font-weight: 800; padding: 14px 22px; min-height: 48px; }
.primary:disabled { opacity: .5; cursor: default; }
.small-btn { background: var(--soft); color: var(--ink); font-weight: 800; padding: 8px 14px; font-size: 15px; }
.link-btn { background: none; color: var(--muted); font-weight: 800; padding: 8px 4px; }
.danger { background: none; color: #C2412F; font-weight: 800; padding: 8px 4px; }
@media (prefers-color-scheme: dark) { .danger { color: #FF9C8C; } }

.chip {
  background: var(--surface); color: var(--ink); border: 2px solid var(--line);
  padding: 7px 14px; font-weight: 700; font-size: 15px;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tag { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 13px; font-weight: 800; background: var(--soft); }
.tag.mint { background: var(--mint); color: var(--mint-ink); }
.tag.sun { background: var(--sun); }

input[type=text], input[type=email], input:not([type]), textarea {
  font: inherit; width: 100%; color: var(--ink); background: var(--surface);
  border: 2px solid var(--line); border-radius: 18px; padding: 12px 14px; font-weight: 700;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, textarea:focus, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.title-input { font-size: 24px; font-weight: 800; border-color: transparent; background: transparent; padding: 4px 0; min-height: 0; resize: none; line-height: 1.2; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 800; cursor: pointer; }
label.check input { width: 22px; height: 22px; accent-color: var(--accent); margin-top: 2px; flex: none; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.error { color: #C2412F; font-weight: 800; font-size: 15px; }
@media (prefers-color-scheme: dark) { .error { color: #FF9C8C; } }

.avatar {
  flex: none; border-radius: 50%; background: var(--soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 800;
}
.progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); }
.num {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.goal-row { color: inherit; text-decoration: none; font-weight: inherit; }
.hero { border-radius: 28px; padding: 28px 20px; background: linear-gradient(160deg, var(--soft), var(--sun)); }
.hero .flower { font-size: 52px; line-height: 1; }
details > summary { cursor: pointer; font-weight: 800; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: " ▾"; color: var(--muted); }
details[open] > summary::after { content: " ▴"; }
.segmented { display: flex; background: var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.segmented button { flex: 1; background: none; padding: 8px 6px; font-weight: 800; font-size: 15px; color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--surface); }

/* Chat */
.bubbles { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 82%; display: flex; flex-direction: column; gap: 2px; }
.bubble.mine { align-self: flex-end; align-items: flex-end; }
.bubble .text { padding: 10px 14px; border-radius: 18px; background: var(--mint); white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.mine .text { background: var(--soft); }
.composer { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); background: var(--bg); padding: 10px 0; display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { min-height: 48px; }

/* Bottom tabs */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--surface); border-top: 1px solid var(--line);
  display: flex; justify-content: center; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
#tabs a {
  flex: 1; max-width: 140px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 800;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px; position: relative;
}
#tabs a .icon { font-size: 22px; line-height: 1; }
#tabs a[aria-current="page"] { color: var(--accent); }
#tabs .badge {
  position: absolute; top: 0; left: 55%; background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; font-size: 11px; padding: 1px 6px;
}

/* Modal */
#modal { position: fixed; inset: 0; z-index: 20; background: rgba(36, 27, 34, .45); display: flex; align-items: flex-end; justify-content: center; }
#modal[hidden] { display: none; }
#modal .sheet {
  background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  border-radius: 28px 28px 0 0; padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.back { text-decoration: none; font-weight: 800; }

/* Guides */
.card.flush { padding: 0; overflow: hidden; }
.guide-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 10px; }
.topic-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; font-size: 20px; flex: none; }
.guide-label { padding: 12px 16px 0; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
details.guide-row { border-top: 1px solid var(--line); }
.guide-label + details.guide-row { border-top: 0; }
details.guide-row > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; font-size: 16px; font-weight: 700; line-height: 1.35;
}
details.guide-row > summary::after { content: none; }
@media (hover: hover) { details.guide-row:not([open]) > summary:hover { background: var(--bg); } }
.plus {
  flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); color: var(--accent);
  display: grid; place-items: center; font-size: 18px; font-weight: 800; transition: transform .2s ease;
}
details.guide-row[open] > summary .plus { transform: rotate(45deg); }
.guide-answer { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.5; }
.pill-link {
  display: inline-flex; align-items: center; background: var(--mint); color: var(--mint-ink);
  border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 800; text-decoration: none;
}
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-row .chip { white-space: nowrap; flex: none; }
input[type=search] { font: inherit; width: 100%; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 12px 18px; font-weight: 700; }

/* Start page */
.case {
  width: 100%; justify-content: flex-start; gap: 10px; background: var(--surface); color: var(--ink);
  border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; font-weight: 800; font-size: 17px; text-align: left;
}
.case[aria-pressed="true"] { border-color: var(--accent); background: var(--soft); }
.inline-link { background: none; padding: 0; color: var(--accent); font-weight: 700; font-size: inherit; text-decoration: underline; border-radius: 0; display: inline; }
.about img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }

/* Fraud warnings */
.scam-warning { margin-top: 4px; padding: 8px 12px; border-radius: 14px; background: var(--sun); color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.35; }
.safety-line { text-align: center; }

input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #C2412F; }
@media (prefers-color-scheme: dark) { input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #FF9C8C; } }

.secondary { background: var(--surface); color: var(--ink); font-weight: 800; padding: 14px 22px; min-height: 48px; border: 2px solid var(--line); }
a.button { text-align: center; }
.perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-weight: 700; }
.perks li { display: flex; gap: 10px; align-items: flex-start; }
