:root {
  /* Clears the iOS status bar / notch / Dynamic Island when installed as a
     standalone PWA — without this, the hamburger menu and chips render
     under the system UI and become unclickable on a real device. */
  --safe-top: env(safe-area-inset-top, 0px);
  /* User-customizable via Profile > Appearance. Defaults to brand
     bubblegum pink; overridden inline by JS from the saved preference. */
  --accent-name: #f8b6f6;
  --accent-menu: #f8b6f6;
  /* Header/menu background, toggled black or white via Profile >
     Appearance — the bottom tab bar deliberately stays solid black
     regardless, this only controls the top header and the drawer menu. */
  --header-bg: #0b0b0b;
  --header-text: #fff;
  --pink: #ec5c9d;
  --pink-deep: #e0439a;
  --pink-pale: #fbdce9;
  --purple: #9b8ce0;
  --purple-pale: #e4dff8;
  --teal: #4fb8c9;
  --teal-pale: #d7f0f4;
  --lime: #b7c93f;
  --lime-pale: #eaf0cf;
  --ink: #1a1a1a;
  --paper: #faf9f7;
  --muted: #8a8a8a;
  --surface: #fff;
  --surface-border: #f0eeee;
  --paper-border: #efece9;

  /* Official brand palette (from the brand doc) — used on the Stars Align
     screens. Deliberately not applied app-wide yet: the rest of the app
     uses a different, heavier-color system built earlier, and switching
     everything is a separate decision. Philosophy here is 88-90% black &
     white; color is a sparing accent, not a background fill. */
  --brand-black: #000000;
  --brand-white: #ffffff;
  --brand-bubblegum: #f8b6f6; /* primary brand, CTAs, active states */
  --brand-barbie: #f165dd; /* secondary UI, soft cards, fills, tags */
  --brand-cyan: #9bf9ff; /* editorial links & spiritual, secondary highlights */
  --brand-lime: #c5ff51; /* celebration ONLY: streaks, achievements, success */
  --brand-hotpink: #f133ca; /* primary actions only */
  --brand-purple: #e247f0; /* mental only */
  --brand-yellow: #ffe98a; /* social & intellectual only */
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---------- DARK THEME ----------
   Promisa's actual palette (near-black surfaces, blush ink, sparing pink/
   gold accent) ported onto Aligned's token names, so the rest of the CSS —
   which already reads almost everything through these variables — inherits
   it for free. The already-dark chrome (hero/tabbar/menu, ~#0b0b0b) and the
   Stars Align cosmic screens (scoped reset above) intentionally don't move;
   this is about the light card surfaces around them going dark to match. */
:root[data-theme="dark"] {
  --paper: #14111a;
  --paper-border: #241f2c;
  --surface: #1c1722;
  --surface-border: #2c2532;
  --ink: #f1e7ef;
  --muted: #a696a8;
  --pink-pale: #3d2233;
  --purple-pale: #2b2440;
  --teal-pale: #16323a;
  --lime-pale: #262c1a;
}
html[data-theme="dark"] body { background: #050505; }

/* Bespoke pastel-tinted surfaces that don't route through the shared
   --surface/--paper tokens (kept as their own tints on purpose, in both
   themes) still need a dark counterpart of that same tint. */
html[data-theme="dark"] .insight-card { background: #241a30; border-color: #34253f; }
html[data-theme="dark"] #screen-mind .insight-card { background: #211f33; border-color: #2f2c47; }
html[data-theme="dark"] #screen-spirit .insight-card { background: #16262c; border-color: #1f3840; }
html[data-theme="dark"] #screen-journey .insight-card { background: #22270f; border-color: #313a17; }
html[data-theme="dark"] .ritual-row { background: #231e30; }
html[data-theme="dark"] .sleep-pill-short { background: #3a2c14; color: #f0c987; }

/* Header/menu background toggle (Profile > Appearance) — independent of
   the app-wide Dark Mode setting above. Only the top header and the
   hamburger drawer flip; the bottom tab bar always stays solid black.
   Scoped to the core black header chrome (.hero/.simple-header/.body-hero/
   .menu-panel) — the bespoke cosmic Stars Align headers keep their own
   dark treatment regardless, since they're a deliberate different look. */
html.theme-header-light {
  --header-bg: #ffffff;
  --header-text: #1a1a1a;
}
html.theme-header-light .chip { border-color: rgba(0,0,0,0.18); }
html.theme-header-light .chip-text small { color: #666; }
html.theme-header-light .icon-btn.bell,
html.theme-header-light .back-btn,
html.theme-header-light .menu-open-btn-float,
html.theme-header-light .back-btn-light { background: rgba(0,0,0,0.06); }
html.theme-header-light .progress-ring-card { border-color: rgba(0,0,0,0.12); background: rgba(0,0,0,0.03); }
html.theme-header-light .ring-track { stroke: rgba(0,0,0,0.12); }
html.theme-header-light .body-hero-subtitle,
html.theme-header-light .body-hero-tagline,
html.theme-header-light .progress-ring-label,
html.theme-header-light .progress-ring-caption,
html.theme-header-light .simple-header p { color: #555; }
html.theme-header-light .menu-panel-head { border-bottom-color: rgba(0,0,0,0.1); }
html.theme-header-light .menu-item,
html.theme-header-light .menu-category-head { color: #1a1a1a; }
html.theme-header-light .menu-item-featured { color: var(--accent-name); }
html.theme-header-light .menu-category-stars .menu-category-head { color: #d6199c; }
html.theme-header-light .menu-theme-toggle { border-top-color: rgba(0,0,0,0.1); color: #1a1a1a; }
html.theme-header-light .greeting,
html.theme-header-light .chip,
html.theme-header-light .body-hero-tab { color: var(--header-text); }
html.theme-header-light .chip-text small { color: #666; }
html.theme-header-light .menu-close { background: rgba(0,0,0,0.06); color: #1a1a1a; }

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #d9d9d9;
  color: var(--ink);
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.phone {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--paper);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

@media (min-width: 431px) {
  body { padding: 24px 0; }
  .phone {
    min-height: 900px;
    border-radius: 40px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    overflow: hidden;
  }
}

.screen { flex: 1; padding-bottom: 96px; }
.screen.hidden { display: none; }

/* ---------- HERO / HEADER ---------- */
.hero {
  background: var(--header-bg);
  color: var(--header-text);
  padding: calc(20px + var(--safe-top)) 20px 26px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-btn {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chips { display: flex; gap: 10px; margin-left: auto; }

.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 12px;
  padding: 6px 12px;
  color: #fff;
}

.chip-icon { font-size: 15px; color: var(--pink); }
.chip-icon.flame { color: var(--pink); }

.chip-text { display: flex; flex-direction: column; line-height: 1.1; }
.chip-text strong { font-size: 15px; font-weight: 700; }
.chip-text small { font-size: 10px; color: #c9c9c9; }

.hero-mid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 18px;
}

/* Home greeting only — every other headline in the app stays Playfair
   Display per instruction. This is a scoped, one-screen typography
   treatment, not a system-wide font change. */
.greeting {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  color: #fff;
  font-size: 54px;
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin: 0;
}

.greeting .name {
  font-family: "Alex Brush", cursive;
  text-transform: none;
  color: var(--accent-name);
  font-weight: 400;
  font-size: 76px;
  line-height: 1;
  display: inline-block;
  margin-top: 6px;
}

.bell {
  position: relative;
  flex-shrink: 0;
  color: var(--header-text);
  background: rgba(255,255,255,0.12);
  width: 34px; height: 34px;
  border-radius: 50%;
}
.bell .dot {
  position: absolute;
  top: 2px; right: 2px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pink);
  border: 1.5px solid var(--header-bg);
}

.quote-card {
  margin: 0 0 22px;
  background: var(--brand-bubblegum);
  border-radius: 18px;
  padding: 24px 22px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.1);
}
.quote-card p {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 22px;
  line-height: 1.35;
  color: var(--ink);
}
.quote-card .accent { color: var(--brand-barbie); font-style: italic; }

/* ---------- CONTENT ---------- */
.content { padding: 18px 18px 8px; }

.today-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.today-label { font-weight: 800; font-size: 13px; letter-spacing: 0.06em; }
.today-date { color: var(--pink-deep); font-weight: 600; font-size: 13px; }

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cat-card {
  border: none;
  border-radius: 16px;
  padding: 16px 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease;
}
.cat-card:active { transform: scale(0.97); }
.cat-body { background: var(--pink-pale); }
.cat-mind { background: var(--purple-pale); }
.cat-spirit { background: var(--teal-pale); }
.cat-journey { background: var(--lime-pale); }

.cat-arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  margin-bottom: 4px;
}
.cat-body .cat-arrow { background: var(--pink); color: #fff; }
.cat-mind .cat-arrow { background: var(--purple); color: #fff; }
.cat-spirit .cat-arrow { background: var(--teal); color: #fff; }
.cat-journey .cat-arrow { background: var(--lime); color: #fff; }

.cat-title { font-weight: 700; font-size: 17px; }
.cat-body .cat-title { color: var(--pink-deep); }
.cat-mind .cat-title { color: #6a5ac0; }
.cat-spirit .cat-title { color: #2f8a9a; }
.cat-journey .cat-title { color: #7c8a1e; }

.cat-sub { font-size: 12px; color: var(--muted); margin-bottom: 4px; }

.cat-dots { display: flex; align-items: center; gap: 4px; }
.cat-dots i { display: block; border-radius: 4px; }
.cat-dots i.on { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.cat-dots i.bar { flex: 1; height: 5px; border-radius: 3px; position: relative; overflow: hidden; }
.cat-dots i.fill { position: absolute; inset: 0 auto 0 0; height: 100%; border-radius: 3px; width: 0%; transition: width 0.25s ease; }
.cat-body .cat-dots i.on,
.cat-body .cat-dots i.fill { background: var(--pink); }
.cat-body .cat-dots i.bar { background: rgba(236,92,157,0.25); }
.cat-mind .cat-dots i.on,
.cat-mind .cat-dots i.fill { background: var(--purple); }
.cat-mind .cat-dots i.bar { background: rgba(155,140,224,0.3); }
.cat-spirit .cat-dots i.on,
.cat-spirit .cat-dots i.fill { background: var(--teal); }
.cat-spirit .cat-dots i.bar { background: rgba(79,184,201,0.28); }
.cat-journey .cat-dots i.on,
.cat-journey .cat-dots i.fill { background: var(--lime); }
.cat-journey .cat-dots i.bar { background: rgba(197,255,81,0.35); }

.banner {
  margin-top: 16px;
  border-radius: 18px;
  min-height: 172px;
  padding: 22px;
  display: flex;
  align-items: flex-end;
  background-image: url("https://images.unsplash.com/photo-1504681869696-d977211a5f4c?w=1200&q=80&auto=format&fit=crop");
  background-size: cover;
  background-position: center 45%;
  position: relative;
  overflow: hidden;
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(10,6,18,0.75) 0%, rgba(10,6,18,0.15) 45%, transparent 65%),
    radial-gradient(circle at 12% 105%, rgba(8,5,14,0.6) 0%, transparent 45%);
}
.banner p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #fff;
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.rituals-card {
  margin-top: 18px;
  background: var(--surface);
  border-radius: 18px;
  padding: 18px 18px 14px;
  border: 1px solid var(--surface-border);
}
.rituals-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.rituals-head h2 {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin: 0;
}
.rituals-progress { font-size: 11.5px; color: var(--accent-name); font-weight: 700; }

.rituals-list { list-style: none; margin: 0; padding: 0; }
.ritual {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #f2f0f0;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-radius: 8px;
}
.ritual:last-child { border-bottom: none; }
.ritual:active { background-color: #fbf5f8; }

.check {
  width: 21px; height: 21px;
  border-radius: 6px;
  border: 2px solid #e3c3d3;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), background-color 0.15s ease, border-color 0.15s ease;
}
.ritual.done .check,
.ritual-detail.done .check { background: var(--accent-name); border-color: var(--accent-name); transform: scale(1.08); }
.ritual.done.ritual-cat-body .check { background: var(--pink); border-color: var(--pink); }
.ritual.done.ritual-cat-mind .check { background: var(--purple); border-color: var(--purple); }
.ritual.done.ritual-cat-spirit .check { background: var(--teal); border-color: var(--teal); }
.ritual.done.ritual-cat-journey .check { background: var(--lime); border-color: var(--lime); }

.ritual-name { flex: 1; font-size: 14.5px; font-weight: 500; }
.ritual.done .ritual-name { color: var(--ink); }
.chev { color: var(--muted); font-size: 18px; }

.view-all {
  display: block;
  text-align: center;
  margin-top: 8px;
  padding-top: 10px;
  color: var(--accent-name);
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
}

.blog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  margin-bottom: 12px;
}
.blog-head h2 { font-size: 13px; font-weight: 800; letter-spacing: 0.05em; margin: 0; }
.blog-head a { color: var(--pink-deep); font-size: 13px; font-weight: 700; text-decoration: none; }

.blog-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.blog-scroll::-webkit-scrollbar { display: none; }

.blog-card {
  flex: 0 0 128px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease;
}
.blog-card:active { transform: scale(0.96); }
.blog-card img {
  width: 128px;
  height: 128px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  object-fit: cover;
  background: #eee;
  display: block;
}
.blog-card span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- SIMPLE (STUB) HEADERS ---------- */
.simple-header {
  background: var(--header-bg);
  color: var(--header-text);
  /* Top padding clears the absolutely-positioned hamburger button (which
     sits at 20px + safe-top, ~34px tall) so the title renders below it
     instead of behind/through it. */
  padding: calc(66px + var(--safe-top)) 20px 26px;
  position: relative;
}

/* Menu button — fixed at top-left on every screen, clear of the system
   status bar/notch when installed as a standalone PWA. Color customizable
   via Profile > Appearance. */
.menu-open-btn { color: var(--header-text); }
.menu-open-btn-float {
  position: absolute;
  top: calc(20px + var(--safe-top));
  left: 20px;
  background: rgba(255,255,255,0.1);
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.simple-header h1 {
  font-family: "Playfair Display", serif;
  font-size: 32px;
  margin: 0 0 6px;
}
.simple-header p { margin: 0; color: #cfcfcf; font-size: 13.5px; }

.stub-content { padding-top: 28px; }
.stub-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 36px 24px;
  text-align: center;
}
.stub-icon { font-size: 32px; display: block; margin-bottom: 14px; }
.stub-card h3 { margin: 0 0 8px; font-size: 17px; font-family: "Playfair Display", serif; }
.stub-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

/* ---------- BACK BUTTON (shared) ---------- */
.back-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-bottom: 14px;
  margin-left: 46px; /* clears the fixed-position hamburger to its left */
  flex-shrink: 0;
}

/* ---------- BODY CATEGORY SCREEN ---------- */
.body-hero {
  background: var(--header-bg);
  color: var(--header-text);
  /* Clears the absolutely-positioned hamburger button (20px + safe-top,
     ~34px tall) so the category label doesn't render behind it. */
  padding: calc(60px + var(--safe-top)) 20px 26px;
  position: relative;
}
.body-hero-tab {
  display: block;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #fff;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--pink);
  width: 52px;
  margin: 0 auto 20px;
}

.body-hero-title {
  font-family: "Playfair Display", serif;
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 8px;
}
.body-hero-subtitle {
  margin: 0 0 10px;
  color: #b8b8b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.body-season-line {
  margin: 0 0 22px;
  color: #d8d8d8;
  font-size: 12.5px;
  line-height: 1.4;
}

.body-hero-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.body-hero-copy { flex: 1; min-width: 190px; }
.body-hero-copy h2 {
  font-family: "Playfair Display", serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 8px;
}
.body-hero-copy .accent { color: var(--pink); }
.body-hero-tagline {
  margin: 0;
  color: var(--pink);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.progress-ring-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  padding: 14px;
  width: 148px;
  flex-shrink: 0;
  text-align: center;
}
.progress-ring-label {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #d8d8d8;
  margin-bottom: 8px;
}
.progress-ring { position: relative; width: 96px; height: 96px; margin: 0 auto; }
.progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255,255,255,0.15); stroke-width: 9; }
.ring-fill {
  fill: none;
  stroke: var(--pink);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  transition: stroke-dashoffset 0.4s ease;
}
.progress-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.progress-ring-text strong { font-size: 19px; font-weight: 700; }
.progress-ring-text span { font-size: 9px; color: #cfcfcf; }
.progress-ring-caption { margin: 8px 0 0; font-size: 11px; color: #cfcfcf; line-height: 1.35; }

/* ---------- SECTION HEADS ---------- */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-head-spaced { margin-top: 28px; }
.section-head h2 { font-size: 12.5px; font-weight: 800; letter-spacing: 0.05em; margin: 0; }
.section-count { font-size: 11.5px; font-weight: 700; color: var(--pink-deep); }
.section-link { font-size: 12.5px; font-weight: 700; color: var(--pink-deep); text-decoration: none; }

/* ---------- RITUAL TILES (icon grid) ---------- */
.ritual-tiles {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.ritual-tiles::-webkit-scrollbar { display: none; }

.ritual-tile {
  position: relative;
  flex: 0 0 96px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.ritual-tile:active { transform: scale(0.96); }

.ritual-tile-learn {
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #0b0b0b;
  color: #fff;
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  padding: 0;
}
.ritual-tile-learn svg { margin-left: 1px; }

.ritual-tile-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--pink-pale);
  color: var(--pink-deep);
  display: flex; align-items: center; justify-content: center;
}
.ritual-tile.done .ritual-tile-icon { background: var(--pink); color: #fff; }

.ritual-tile-name { font-size: 12px; font-weight: 700; line-height: 1.25; }
.ritual-tile-frac { font-size: 10.5px; color: var(--muted); }

.ritual-tile-state {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid #e3c3d3;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.ritual-tile.done .ritual-tile-state { background: var(--pink); border-color: var(--pink); }

/* ---------- HABIT CARDS ---------- */
.habit-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.habit-scroll::-webkit-scrollbar { display: none; }

.habit-card {
  flex: 0 0 138px;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  transition: transform 0.15s ease;
}
.habit-card:active { transform: scale(0.96); }
.habit-card-media { height: 78px; }
.habit-movement .habit-card-media { background: linear-gradient(160deg, #ff9fc4, #e0439a); }
.habit-nutrition .habit-card-media { background: linear-gradient(160deg, #f6d78c, #8fb96a); }
.habit-sleep .habit-card-media { background: linear-gradient(160deg, #c6b6f2, #6a5ac0); }
.habit-beauty .habit-card-media { background: linear-gradient(160deg, #f3c9c0, #c98a75); }
.habit-home .habit-card-media { background: linear-gradient(160deg, #d7e4c8, #8ba36c); }
.habit-womens .habit-card-media { background: linear-gradient(160deg, #f3b8cf, #c25b8c); }

.habit-card-body { padding: 12px; position: relative; }
.habit-card-body h3 { margin: 0 0 3px; font-size: 13.5px; font-family: "Playfair Display", serif; }
.habit-card-body p { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.35; padding-right: 16px; }
.habit-arrow { position: absolute; right: 10px; bottom: 10px; color: var(--pink-deep); font-weight: 700; font-size: 13px; }

/* ---------- FROM WELL WITH BRIELLE (body-filtered) ---------- */
.wwb-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.wwb-scroll::-webkit-scrollbar { display: none; }

.wwb-card {
  flex: 0 0 152px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.15s ease;
}
.wwb-card:active { transform: scale(0.96); }
.wwb-card img { width: 100%; height: 100px; object-fit: cover; display: block; background: #eee; }
.wwb-card-body { padding: 10px 12px 12px; }
.wwb-card-body h3 {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wwb-read-more { font-size: 11px; font-weight: 700; color: var(--pink-deep); }

/* ---------- SHOP MY FAVORITES ---------- */
.shop-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}
.shop-scroll::-webkit-scrollbar { display: none; }

.shop-card {
  flex: 0 0 128px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.15s ease;
}
.shop-card:active { transform: scale(0.96); }
.shop-card-media { height: 100px; }
.shop-media-1 { background: linear-gradient(160deg, #cfe0ea, #6f9cb0); }
.shop-media-2 { background: linear-gradient(160deg, #f6b8c4, #d1637e); }
.shop-media-3 { background: linear-gradient(160deg, #dcd4ea, #8b7db0); }
.shop-media-4 { background: linear-gradient(160deg, #e9e5df, #a89a86); }
.shop-card-body { padding: 10px 12px 12px; }
.shop-card-body h4 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-price { font-size: 12px; font-weight: 700; color: var(--pink-deep); }

/* ---------- FOLLOW WWB ---------- */
.follow-card {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.follow-head h3 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: 14.5px;
  font-weight: 600;
}
.follow-head p {
  margin: 1px 0 0;
  font-size: 10.5px;
  color: var(--muted);
}

.follow-links { display: flex; flex-direction: row; gap: 16px; flex-shrink: 0; }
.follow-links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--ink);
}
.follow-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--pink-pale);
  color: var(--pink-deep);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.follow-links span:not(.follow-icon) {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--muted);
}

/* ---------- TAB BAR ---------- */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  background: #0b0b0b;
  display: flex;
  align-items: flex-start;
  padding: 10px 6px calc(10px + env(safe-area-inset-bottom));
  z-index: 10;
}

.tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--accent-menu);
  opacity: 0.55;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 0;
  cursor: pointer;
  font-family: inherit;
}
.tab.active { color: var(--accent-menu); opacity: 1; }
.tab svg { color: inherit; }

.tab-center { color: #fff; }
.fab {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-menu);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 1px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  transition: transform 0.15s ease;
}
.tab-center:active .fab { transform: scale(0.92); }

/* ---------- STREAK BADGE ---------- */
.streak-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--pink-pale);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
}
.streak-badge strong { color: var(--pink-deep); font-weight: 800; }

/* ---------- CHECK-IN CARD ---------- */
.checkin-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 24px;
}
.checkin-card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-family: "Playfair Display", serif;
  font-weight: 600;
}
.checkin-options { display: flex; justify-content: space-between; gap: 6px; }
.checkin-option {
  flex: 1;
  background: var(--paper);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 8px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.checkin-option:active { transform: scale(0.94); }
.checkin-option.selected { background: var(--pink-pale); border-color: var(--pink); }
.checkin-emoji { font-size: 18px; }
.checkin-option span:last-child { font-size: 9.5px; font-weight: 600; color: var(--muted); }
.checkin-note { margin: 12px 0 0; font-size: 12px; color: var(--pink-deep); font-weight: 600; min-height: 15px; }

/* ---------- INSIGHT CARD ---------- */
.insight-card {
  background: #faf7fb;
  border: 1px solid #f0eaf3;
  border-radius: 16px;
  padding: 16px;
  margin: 20px 0 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}
.insight-card strong { color: var(--pink-deep); }
.insight-card .insight-label {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--pink-deep);
  margin-bottom: 6px;
}

/* ---------- CHALLENGES ---------- */
/* Accent (--dim) is set inline per dimension; everything else rides the
   theme-aware surface/ink tokens so it adapts to light + dark on its own. */
.challenge-card {
  --dim: #ec5c9d;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.challenge-card-done { border-color: var(--dim); }
.challenge-head { display: flex; gap: 12px; align-items: flex-start; }
.challenge-emoji { font-size: 26px; line-height: 1; flex-shrink: 0; }
.challenge-title { margin: 0 0 3px; font-size: 16px; color: var(--ink); }
.challenge-blurb { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.challenge-meta {
  display: flex; gap: 8px; align-items: center;
  font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
}
.challenge-btn {
  appearance: none; border: none; cursor: pointer;
  background: var(--dim); color: #fff;
  font-size: 14px; font-weight: 600;
  padding: 12px 16px; border-radius: 12px; width: 100%;
  transition: filter .15s ease, transform .1s ease;
}
.challenge-btn:hover { filter: brightness(1.06); }
.challenge-btn:active { transform: scale(.98); }
.challenge-btn-ghost {
  background: transparent; color: var(--dim);
  border: 1px solid var(--surface-border); font-weight: 600; padding: 10px 16px;
}
.challenge-progress { display: flex; flex-direction: column; gap: 6px; }
.challenge-progress-bar {
  height: 8px; background: var(--surface-border); border-radius: 99px; overflow: hidden;
}
.challenge-progress-bar > span {
  display: block; height: 100%; background: var(--dim); border-radius: 99px;
  transition: width .4s ease;
}
.challenge-progress-label { font-size: 12px; color: var(--muted); }
.challenge-days { display: flex; flex-direction: column; gap: 8px; }
.challenge-day {
  appearance: none; cursor: pointer; text-align: left; width: 100%;
  display: flex; gap: 10px; align-items: center;
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: 12px; padding: 11px 12px;
  font-size: 13px; line-height: 1.35; color: var(--ink);
  transition: border-color .15s ease;
}
.challenge-day:hover { border-color: var(--dim); }
.challenge-day-check {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--dim); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.challenge-day.done { border-color: var(--dim); }
.challenge-day.done .challenge-day-check { background: var(--dim); }
.challenge-day.done .challenge-day-label { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--surface-border); }
.challenge-day-label em { font-style: normal; font-weight: 700; margin-right: 5px; color: var(--dim); }
.challenge-day.done .challenge-day-label em { color: var(--muted); }

/* ---------- TOOLS LIST ---------- */
.tools-list { display: flex; flex-direction: column; gap: 8px; }
.tool-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
}
.tool-row-disabled { opacity: 0.55; cursor: default; }
.tool-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--pink-pale);
  color: var(--pink-deep);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tool-body { flex: 1; display: flex; flex-direction: column; }
.tool-body strong { font-size: 13px; }
.tool-body small { font-size: 11px; color: var(--muted); margin-top: 1px; }
.tool-arrow { color: var(--pink-deep); font-weight: 700; }

/* ---------- VIDEO MODAL ---------- */
.video-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.video-modal.hidden { display: none; }
.video-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.video-modal-card {
  position: relative;
  z-index: 1;
  width: min(92%, 380px);
  background: #0b0b0b;
  border-radius: 16px;
  padding: 14px;
}
.video-modal-close {
  position: absolute;
  top: -14px; right: -6px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #fff;
  border: none;
  color: #000;
  font-size: 13px;
  cursor: pointer;
}
.video-modal-frame { position: relative; width: 100%; padding-top: 56.25%; border-radius: 10px; overflow: hidden; }
.video-modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.video-modal-title { margin: 10px 2px 2px; color: #fff; font-size: 12.5px; font-weight: 600; }

/* ---------- AVATAR BUILDER ---------- */
.avatar-modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.avatar-modal.hidden { display: none; }
.avatar-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.avatar-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 30px rgba(0,0,0,0.25);
}
@media (min-width: 480px) {
  .avatar-modal { align-items: center; }
  .avatar-modal-card { border-radius: 22px; }
}
.avatar-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.avatar-modal-head h3 { margin: 0; font-family: "Playfair Display", serif; font-size: 20px; color: var(--ink); }
.avatar-modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--surface-border);
  color: var(--ink); font-size: 13px; cursor: pointer; flex-shrink: 0;
}

.avatar-preview-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 16px; }
.avatar-preview {
  width: 120px; height: 120px; border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  border: 3px solid var(--surface);
}
.avatar-random-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: 999px; padding: 8px 14px;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ink);
  cursor: pointer;
}
.avatar-random-btn:active { transform: scale(0.97); }

.avatar-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.avatar-tabs::-webkit-scrollbar { display: none; }
.avatar-tab {
  flex: 0 0 auto;
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: 999px; padding: 7px 14px;
  font: inherit; font-size: 12.5px; font-weight: 700; color: var(--muted);
  cursor: pointer; white-space: nowrap;
}
.avatar-tab.active { background: var(--accent-name); border-color: var(--accent-name); color: #fff; }

.avatar-panel {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 16px;
}
.avatar-option {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 2px solid transparent; border-radius: 14px;
  background: none; padding: 6px 2px; cursor: pointer;
}
.avatar-option.active { border-color: var(--accent-name); background: var(--surface); }
.avatar-option-visual {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 50%;
  overflow: hidden; display: block;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
}
.avatar-option-visual .avatar-svg { width: 100%; height: 100%; }
.avatar-option-label { font-size: 10.5px; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.2; }
.avatar-option.active .avatar-option-label { color: var(--ink); }
.avatar-option-label.price { color: var(--accent-name); }
/* Locked items: dim the art, float a lock/crown badge on the corner. */
.avatar-option.locked .avatar-option-visual { opacity: 0.5; filter: grayscale(0.35); }
.avatar-lock {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0,0,0,0.62); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; z-index: 2;
}
.avatar-lock.crown { background: #b8860b; color: #fff; font-size: 12px; }

.avatar-toggles { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.avatar-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: 999px; padding: 8px 14px;
  font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.avatar-toggle-dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--surface-border); background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.avatar-toggle.on .avatar-toggle-dot { background: var(--accent-name); border-color: var(--accent-name); }
.avatar-modal.avatar-disabled .avatar-preview,
.avatar-modal.avatar-disabled .avatar-tabs,
.avatar-modal.avatar-disabled .avatar-panel,
.avatar-modal.avatar-disabled .avatar-random-btn,
.avatar-modal.avatar-disabled #avatar-blush-toggle { opacity: 0.4; pointer-events: none; }

.avatar-actions { display: flex; gap: 10px; }
.avatar-reset-btn {
  flex: 0 0 auto;
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: 12px; padding: 12px 18px;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.avatar-save-btn {
  flex: 1;
  background: var(--accent-name); color: #fff; border: none;
  border-radius: 12px; padding: 12px;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.avatar-save-btn:active, .avatar-reset-btn:active { transform: scale(0.98); }

/* ----- Glow Up Studio: game HUD, views, mini-game ----- */
.studio-hud {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: 16px; padding: 10px 12px; margin-bottom: 14px;
}
.hud-wallet { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.hud-coin { font-size: 16px; }
.hud-wallet strong { font-family: "Playfair Display", serif; font-size: 18px; color: var(--ink); }
.hud-level { flex: 1; min-width: 0; }
.hud-level-row { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.hud-level-row span:first-child { color: var(--ink); }
.hud-xp-track { height: 7px; border-radius: 999px; background: var(--paper-border); overflow: hidden; }
.hud-xp-fill { height: 100%; width: 0; border-radius: 999px; background: var(--accent-name); transition: width 0.35s ease; }
.hud-daily {
  flex-shrink: 0;
  background: var(--accent-name); color: #fff; border: none;
  border-radius: 999px; padding: 8px 12px;
  font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer;
}
.hud-daily.claimed { background: var(--surface-border); color: var(--muted); }
.hud-daily:active { transform: scale(0.96); }

.studio-views {
  display: flex; gap: 6px; padding: 4px;
  background: var(--paper-border); border-radius: 999px; margin-bottom: 16px;
}
.studio-view {
  flex: 1; border: none; background: none; border-radius: 999px; padding: 9px;
  font: inherit; font-size: 13px; font-weight: 800; color: var(--muted); cursor: pointer;
}
.studio-view.active { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.studio-view-panel.hidden { display: none; }

.avatar-toggle-premium.on { border-color: #d4a017; }
.avatar-toggle-premium.on .avatar-toggle-dot { background: #d4a017; border-color: #d4a017; }

/* Play view */
.studio-game-hint { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.studio-game-hint strong { color: var(--ink); }
.studio-boards { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }
.studio-board { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.studio-board-label { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }
.studio-board-face { width: 92px; height: 92px; }
.studio-board-arrow { align-self: center; padding-top: 14px; font-size: 20px; color: var(--muted); }
.studio-result {
  text-align: center; padding: 12px; border-radius: 14px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--surface-border);
  display: flex; flex-direction: column; gap: 3px;
}
.studio-result.hidden { display: none; }
.studio-result strong { font-family: "Playfair Display", serif; font-size: 18px; color: var(--ink); }
.studio-result span { font-size: 12.5px; font-weight: 700; color: var(--accent-name); }
.studio-result.perfect { background: var(--accent-name); border-color: var(--accent-name); }
.studio-result.perfect strong, .studio-result.perfect span { color: #fff; }

/* Toast — transient feedback for unlocks, daily, etc. */
.studio-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px);
  background: #0b0b0b; color: #fff; border-radius: 999px; padding: 9px 16px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap; max-width: 90%;
  overflow: hidden; text-overflow: ellipsis;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; z-index: 5;
}
.studio-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- MENU DRAWER ---------- */
.menu-drawer { position: fixed; inset: 0; z-index: 60; }
.menu-drawer.hidden { display: none; }
.menu-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }

.menu-panel {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 80%;
  max-width: 300px;
  background: var(--header-bg);
  color: var(--header-text);
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 16px 0 44px rgba(0,0,0,0.45);
  animation: menuSlideIn 0.22s ease;
}
/* The nav list scrolls on its own; Dark Mode stays pinned below it,
   always reachable without scrolling through every dimension group. */
.menu-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 0 12px;
}
@keyframes menuSlideIn {
  from { transform: translateX(-16px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.menu-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.menu-brand { font-family: "Playfair Display", serif; font-size: 19px; font-weight: 600; color: var(--brand-barbie); }
.menu-close {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
}

.menu-group { display: flex; flex-direction: column; margin-bottom: 8px; }
.menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #ececec;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 10px;
  border-radius: 10px;
  cursor: pointer;
}
.menu-item:active { background: rgba(255,255,255,0.08); }
.menu-item-main { font-size: 15px; }
.menu-item-featured { color: var(--accent-name); }

.menu-category { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 4px; margin-top: 4px; }
.menu-category-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 10px;
  cursor: pointer;
}
.menu-category-head span:nth-child(2) { flex: 1; text-align: left; }
.menu-chevron { color: #8f8f8f; font-size: 13px; transition: transform 0.2s ease; }
.menu-category.open .menu-chevron { transform: rotate(180deg); }

.menu-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.dot-body { background: var(--pink); }
.dot-mind { background: var(--purple); }
.dot-spirit { background: var(--brand-cyan, #9bf9ff); }
.dot-journey { background: var(--lime); }
.dot-stars { background: #ff4fd8; box-shadow: 0 0 6px rgba(255,79,216,0.8); }

.menu-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
  padding: 14px 10px calc(16px + env(safe-area-inset-bottom));
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.menu-theme-toggle-top {
  border-top: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-top: 0;
  padding: 4px 10px 16px;
}
.theme-toggle {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  border: none;
  position: relative;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.theme-toggle.on { background: var(--pink); }
.theme-toggle.on .theme-toggle-knob { transform: translateX(18px); }

.menu-category-stars {
  background: linear-gradient(90deg, rgba(255,79,216,0.1), transparent);
  border-radius: 10px;
  border-top: none;
}
.menu-category-stars .menu-category-head { font-weight: 800; color: #ff8fe0; }

.menu-subitems {
  display: none;
  flex-direction: column;
  padding: 2px 0 8px 8px;
}
.menu-category.open .menu-subitems { display: flex; }
.menu-subitems .menu-item {
  font-size: 13px;
  font-weight: 500;
  color: #b8b8b8;
  padding: 8px 10px 8px 20px;
  position: relative;
}
.menu-subitems .menu-item::before {
  content: "";
  position: absolute;
  left: 8px; top: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #4a4a4a;
  transform: translateY(-50%);
}
.menu-subitems .menu-item-featured { color: var(--accent-name); font-weight: 700; }
.menu-subitems .menu-item-featured::before { display: none; }

/* ---------- JOURNAL: TODAY'S PROMPT ---------- */
.journal-prompt-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}
.journal-shuffle {
  background: color-mix(in srgb, var(--accent-name) 18%, white);
  color: var(--accent-name);
  border: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.journal-shuffle:active { transform: scale(0.92); }
.journal-prompt-text {
  margin: 0 0 8px;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.4;
}
.journal-prompt-hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ---------- JOURNAL: WRITE ---------- */
.journal-write-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 8px;
}
.journal-write-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-family: "Playfair Display", serif;
  font-weight: 600;
}
.journal-textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  background: var(--paper);
  border: 1px solid var(--paper-border);
  border-radius: 12px;
  padding: 12px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
}
.journal-textarea:focus { outline: none; border-color: var(--accent-name); }
.journal-write-actions { margin-top: 10px; }
.journal-write-actions small { display: block; margin-bottom: 10px; color: var(--muted); font-size: 11.5px; }
.journal-write-buttons { display: flex; gap: 8px; }
.manifest-save-status { margin: 10px 0 0; min-height: 15px; font-size: 12px; font-weight: 600; color: #2f8a9a; }
.journal-btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 11px 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.journal-btn:active { transform: scale(0.97); }
.journal-btn-ghost { background: color-mix(in srgb, var(--accent-name) 18%, white); color: var(--accent-name); }
.journal-btn-primary { background: var(--accent-name); color: #fff; }

/* ---------- JOURNAL: ENTRIES FEED (free-write + check-ins) ---------- */
.journal-entry {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}
.journal-entry-date { font-size: 11px; font-weight: 700; color: var(--accent-name); letter-spacing: 0.05em; }
.journal-entry-body { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.journal-entry-emoji { font-size: 22px; }
.journal-entry-text { font-size: 13.5px; font-weight: 600; }

.journal-entry-write { padding: 15px 16px; }
.journal-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.journal-entry-delete {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}
.journal-entry-delete:hover { color: var(--accent-name); }
.journal-entry-prompt {
  margin: 8px 0 0;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 12.5px;
  color: var(--muted);
}
.journal-entry-write-body {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
}

/* ---------- PROMPT LIBRARY ---------- */
.prompt-library-sub {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.prompt-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 18px;
  scrollbar-width: none;
}
.prompt-filter-row::-webkit-scrollbar { display: none; }
.prompt-filter-pill {
  flex-shrink: 0;
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 20px;
  cursor: pointer;
}
.prompt-filter-pill.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.prompt-dimension-group { margin-bottom: 22px; }
.prompt-dimension-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}
.prompt-dimension-label-body { color: var(--pink-deep); }
.prompt-dimension-label-mind { color: #6a5ac0; }
.prompt-dimension-label-spirit { color: #2f8a9a; }
.prompt-dimension-label-journey { color: #7c8a1e; }

.prompt-dimension-cards { display: flex; flex-direction: column; gap: 10px; }
.prompt-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 14px 16px;
  border-left-width: 4px;
}
.prompt-card-body { border-left-color: var(--pink); }
.prompt-card-mind { border-left-color: var(--purple); }
.prompt-card-spirit { border-left-color: var(--teal); }
.prompt-card-journey { border-left-color: var(--lime); }

.prompt-card-topic {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}
.prompt-card-text-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.prompt-card-text {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink);
}
.prompt-card-use {
  display: inline-block;
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pink-deep);
}
.prompt-card-locked {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--surface-border);
  font-size: 11px;
  color: var(--muted);
}
.prompt-card-locked svg { flex-shrink: 0; }
.prompt-card-locked-btn {
  width: 100%;
  background: none;
  border: none;
  border-top: 1px dashed var(--surface-border);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.prompt-card-locked-btn:hover span { text-decoration: underline; }

/* ---------- AFFIRMATIONS ---------- */
.affirmation-locked-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  margin-bottom: 22px;
}
.affirmation-locked-card p { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.affirmation-unlock-btn {
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 24px;
  padding: 11px 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.personalized-affirmations-intro {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.affirmation-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }

.affirmation-card {
  position: relative;
  background: var(--pink-pale);
  border-radius: 16px;
  padding: 18px 44px 18px 18px;
}
.affirmation-card-text {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}
.affirmation-card-tag {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pink-deep);
  margin-bottom: 8px;
}
.affirmation-card-body { background: var(--pink-pale); }
.affirmation-card-mind { background: var(--purple-pale); }
.affirmation-card-spirit { background: var(--teal-pale); }
.affirmation-card-journey { background: var(--lime-pale); }
.affirmation-card-manifestation { background: var(--pink-pale); }
.affirmation-card-personal { background: linear-gradient(160deg, var(--pink-pale), var(--purple-pale)); }

.affirmation-heart {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--pink-deep);
  cursor: pointer;
  padding: 2px;
}
.affirmation-heart.active { transform: scale(1.1); }

.affirmation-dimension-group { margin-bottom: 20px; }
.affirmation-locked-row { margin-top: 8px; margin-bottom: 0; border: none; padding-top: 0; }

/* ---------- COLORING BOOK ---------- */
.coloring-content { padding-top: 18px; }

.coloring-palette {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 4px;
  scrollbar-width: none;
}
.coloring-palette::-webkit-scrollbar { display: none; }
.coloring-swatch {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--surface-border);
  cursor: pointer;
  padding: 0;
}
.coloring-swatch.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.coloring-spectrum {
  position: relative;
  overflow: hidden;
  background: conic-gradient(from 0deg, #ff4d6d, #ffd23f, #6bff8f, #4dd2ff, #b06bff, #ff4dd8, #ff4d6d);
  display: flex;
  align-items: center;
  justify-content: center;
}
.coloring-spectrum::after {
  content: "+";
  position: absolute;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  pointer-events: none;
}
.coloring-spectrum input[type="color"] {
  position: absolute;
  inset: -6px;
  width: 150%;
  height: 150%;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
}
.coloring-eraser {
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coloring-canvas-wrap {
  background: #fff;
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 10px;
  margin-bottom: 16px;
}
.coloring-canvas { display: block; width: 100%; height: auto; }
.coloring-canvas.hidden { display: none; }

.c-region {
  fill: #fff;
  stroke: #1a1a1a;
  stroke-width: 1.4;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.1s ease;
}
.c-outline { fill: none; stroke: #1a1a1a; stroke-width: 1.4; pointer-events: none; }
.c-decor { fill: none; stroke: #1a1a1a; stroke-width: 1; opacity: 0.5; pointer-events: none; }

.coloring-actions { display: flex; gap: 10px; margin-bottom: 10px; }
.coloring-action-btn {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
}
.coloring-action-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }

@media print {
  body * { visibility: hidden; }
  #screen-coloring, #screen-coloring * { visibility: visible; }
  #screen-coloring {
    position: absolute; inset: 0; padding: 0; background: #fff;
  }
  .menu-open-btn-float, .back-btn, .simple-header p,
  .prompt-filter-row, .coloring-palette, .coloring-actions, .astro-footnote,
  .coloring-canvas.hidden { display: none !important; }
  .coloring-canvas-wrap { border: none; padding: 0; }
  .tabbar { display: none !important; }
}

/* ---------- MANIFESTING HUB ---------- */
.manifest-daily-card { text-align: center; }
.manifest-daily-card .prompt-card-text {
  font-size: 18px;
  line-height: 1.4;
  font-weight: 600;
  margin: 8px 0 14px;
}
.manifest-affirm-btn {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.manifest-method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.manifest-method {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 14px;
}
.manifest-method-icon {
  display: inline-block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.manifest-method strong { display: block; font-size: 14px; margin-bottom: 4px; }
.manifest-method p { font-size: 12px; line-height: 1.4; color: var(--muted); margin: 0; }

.manifest-moon-list { display: flex; flex-direction: column; gap: 8px; }
.manifest-moon {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 12px 14px;
}
.manifest-moon-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }
.manifest-moon strong { display: block; font-size: 14px; margin-bottom: 2px; }
.manifest-moon p { font-size: 12px; line-height: 1.4; color: var(--muted); margin: 0; }

.manifest-speak-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.manifest-speak-line {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  font-style: italic;
  margin: 0;
}
.stars-reveal-soft {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--surface-border);
  box-shadow: none;
}

/* ---------- VISION BOARD ---------- */
.vb-content { padding-top: 16px; }
.vb-intention-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 14px;
}
.vb-intention-label input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1px solid var(--surface-border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
}
.vb-composer {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
}
.vb-composer textarea {
  width: 100%;
  min-height: 60px;
  resize: vertical;
  border: none;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.vb-tone-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.vb-tone {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--surface-border);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.vb-tone.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.vb-add-words {
  margin-left: auto;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
}
.vb-toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.vb-tool {
  flex: 1;
  min-width: 72px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 11px 8px;
  border-radius: 12px;
  cursor: pointer;
}
.vb-tool-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.vb-sticker-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 12px;
}
.vb-sticker-tray.hidden { display: none; }
.vb-sticker-btn {
  width: 40px; height: 40px;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  background: var(--paper);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
}
/* Free-form collage canvas — tiles are absolutely placed and can overlap. */
.vb-grid {
  position: relative;
  height: 460px;
  margin-bottom: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background:
    radial-gradient(circle at 1px 1px, var(--surface-border) 1px, transparent 1.4px) 0 0 / 22px 22px,
    var(--surface);
  touch-action: pan-y; /* empty canvas still scrolls the page on touch */
}
.vb-tile {
  position: absolute;
  width: 140px;
  min-height: 82px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: grab;
  background: var(--paper);
  box-shadow: 0 3px 10px rgba(0,0,0,0.10);
  touch-action: none; /* touching a tile drags it, doesn't scroll */
  transform-origin: center center;
  transition: box-shadow 0.12s ease;
}
.vb-tile.vb-moving { cursor: grabbing; box-shadow: 0 12px 26px rgba(0,0,0,0.28); }
.vb-tile.vb-selected { z-index: 5; outline: 2px solid var(--accent, #E247F0); outline-offset: 2px; }
.vb-handle {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  line-height: 1;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 6;
  touch-action: none;
}
.vb-tile.vb-selected .vb-handle { display: flex; }
.vb-rotate { top: 5px; left: 50%; transform: translateX(-50%); cursor: grab; }
.vb-resize { bottom: 5px; right: 5px; cursor: nwse-resize; }
.vb-tile-photo { padding: 0; height: 140px; background: var(--surface); }
.vb-tile-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Stickers are transparent floating add-ons — no card, just the art. */
.vb-tile-sticker {
  width: 84px;
  min-height: 84px;
  height: 84px;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}
.vb-tile-sticker.vb-selected { outline-offset: 6px; }
.vb-tile-words { padding: 16px 14px; }
.vb-tile-words p {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
  line-height: 1.35;
  color: #3a2a3a;
}
.vb-tile-sticker span { font-size: 60px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.22)); }
.vb-tone-pink { background: #F8B6F6; }
.vb-tone-lav { background: #C9B6FF; }
.vb-tone-sky { background: #B6E3FF; }
.vb-tone-mint { background: #B6FFE0; }
.vb-tone-gold { background: #FFE98A; }
.vb-del {
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vb-empty {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 8px 20px 20px;
  line-height: 1.5;
}
.vb-empty.hidden { display: none; }

@media print {
  body.vb-printing * { visibility: hidden; }
  body.vb-printing #screen-visionboard,
  body.vb-printing #screen-visionboard * { visibility: visible; }
  body.vb-printing #screen-visionboard {
    position: absolute; inset: 0; padding: 0; background: #fff;
  }
  body.vb-printing .menu-open-btn-float,
  body.vb-printing .back-btn,
  body.vb-printing .simple-header p,
  body.vb-printing .vb-composer,
  body.vb-printing .vb-toolbar,
  body.vb-printing .vb-sticker-tray,
  body.vb-printing .vb-empty,
  body.vb-printing .vb-del { display: none !important; }
  body.vb-printing .tabbar { display: none !important; }
}

/* ---------- SLEEP ---------- */
.sleep-summary-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
}
.sleep-summary-empty { text-align: center; padding: 8px 4px 4px; }
.sleep-summary-empty .stub-icon { font-size: 28px; display: block; margin-bottom: 10px; }
.sleep-summary-empty h3 { margin: 0 0 4px; font-size: 15px; font-family: "Playfair Display", serif; }
.sleep-summary-empty p { margin: 0 0 14px; font-size: 12.5px; color: var(--muted); }
.sleep-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sleep-summary-main strong { font-size: 20px; font-family: "Playfair Display", serif; }
.sleep-summary-main small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.sleep-pill { font-size: 11px; font-weight: 800; padding: 5px 10px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.sleep-pill-good { background: var(--pink-pale); color: var(--pink-deep); }
.sleep-pill-short { background: #f5f0e3; color: #9a7b1e; }
.sleep-summary-edit-row { margin-top: 12px; }

.sleep-time-row { display: flex; gap: 10px; margin-bottom: 14px; }
.sleep-time-field { flex: 1; }
.sleep-time-field label { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.sleep-time-field input {
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--paper-border);
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
}
.sleep-time-field input:focus { outline: none; border-color: var(--pink); }
.sleep-quality-label { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.sleep-form-actions { margin-top: 14px; }
#sleep-log-form.hidden { display: none; }

.sleep-stats-row { display: flex; gap: 8px; }
.sleep-stat {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
}
.sleep-stat strong { display: block; font-size: 19px; font-family: "Playfair Display", serif; color: var(--pink-deep); }
.sleep-stat span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 4px; }

.sleep-bars {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 16px 10px 12px;
}
.sleep-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.sleep-bar-track { width: 100%; height: 80px; background: var(--paper); border-radius: 4px; overflow: hidden; display: flex; align-items: flex-end; }
.sleep-bar-fill { width: 100%; background: var(--pink); border-radius: 3px 3px 0 0; }
.sleep-bar-fill.short { background: #e0c26a; }
.sleep-bar-label { font-size: 8.5px; color: var(--muted); }

/* ---------- GAMES HUB ---------- */
.game-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 14px;
  text-decoration: none;
  color: var(--ink);
}
.game-card-media {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--pink-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.game-card-body h3 { margin: 0 0 4px; font-size: 15px; font-family: "Playfair Display", serif; }
.game-card-body p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.game-card-cta { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 700; color: var(--pink-deep); }
.game-card-disabled { opacity: 0.55; }
.game-card-disabled .game-card-media { background: var(--paper); }

/* ---------- WELLNESS CAFÉ (game) ---------- */
.cafe-scene {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  margin-bottom: 18px;
}
.cafe-scene svg { display: block; width: 100%; height: 118px; }

.cafe-stats-row { display: flex; gap: 8px; margin-bottom: 20px; }
.cafe-stat {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
}
.cafe-stat strong { display: block; font-size: 19px; font-family: "Playfair Display", serif; color: var(--pink-deep); }
.cafe-stat span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 4px; }

/* Café's ingredient picker reuses .checkin-option's pill look but needs its
   own layout: up to 9 options wrapping onto multiple rows, unlike the fixed
   5-across mood check-ins that own .checkin-options normally. */
#cafe-ingredient-options {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}
#cafe-ingredient-options .checkin-option {
  flex: 0 1 auto;
  min-width: 68px;
  padding: 8px 10px;
}

@keyframes cafeIngredientPop {
  0% { transform: scale(0.82); }
  55% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
#cafe-ingredient-options .checkin-option.selected {
  animation: cafeIngredientPop 0.32s ease;
}

.cafe-glass-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--paper-border);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 16px 0 10px;
}
.cafe-glass-emoji { font-size: 24px; flex-shrink: 0; }
.cafe-glass-fill { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.cafe-glass-fill.pop { animation: cafeIngredientPop 0.32s ease; }

.cafe-recipe-cost { margin: 0 0 18px; font-size: 12.5px; font-weight: 600; color: var(--muted); }

.cafe-price-row { display: flex; align-items: center; justify-content: center; gap: 22px; }
.cafe-price-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--pink-pale);
  color: var(--pink-deep);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
}
.cafe-price-btn:active { transform: scale(0.92); }
.cafe-price-value { font-size: 26px; font-weight: 700; font-family: "Playfair Display", serif; min-width: 64px; text-align: center; }

#cafe-planning.hidden,
#cafe-brewing.hidden,
#cafe-results.hidden { display: none; }

/* ---------- CAFÉ: TODAY'S VIBE (shown up front, before ingredients) ---------- */
.cafe-vibe-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--pink-pale);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.cafe-vibe-emoji { font-size: 30px; flex-shrink: 0; }
.cafe-vibe-label { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; color: var(--pink-deep); margin-bottom: 2px; }
.cafe-vibe-copy { margin: 0; font-size: 13px; line-height: 1.4; color: var(--ink); }

/* ---------- CAFÉ: LIVE WELLNESS BENEFITS (fill in as ingredients are picked) ---------- */
.cafe-benefits-list { margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.cafe-benefit-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--paper-border);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
  animation: cafeBenefitIn 0.25s ease;
}
.cafe-benefit-item strong { color: var(--pink-deep); flex-shrink: 0; }
@keyframes cafeBenefitIn {
  0% { opacity: 0; transform: translateY(-4px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---------- CAFÉ: BREWING / SIPPING ANIMATION ---------- */
.cafe-brewing-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 32px 20px;
  text-align: center;
}
.cafe-brewing-glass {
  font-size: 52px;
  display: inline-block;
}
@keyframes cafeBrewShake {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  20% { transform: rotate(-9deg) translateY(-2px); }
  40% { transform: rotate(8deg) translateY(0); }
  60% { transform: rotate(-7deg) translateY(-1px); }
  80% { transform: rotate(5deg) translateY(0); }
}
.cafe-brewing-glass.cafe-glass-mixing { animation: cafeBrewShake 0.9s ease-in-out; }
@keyframes cafeBrewServedBounce {
  0% { transform: scale(0.85); }
  55% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.cafe-brewing-glass.cafe-glass-served { animation: cafeBrewServedBounce 0.5s ease; }
@keyframes cafeBrewTilt {
  0% { transform: rotate(0deg) translateY(0); }
  30% { transform: rotate(0deg) translateY(-5px); }
  55% { transform: rotate(-24deg) translateY(2px); }
  100% { transform: rotate(-24deg) translateY(2px); }
}
.cafe-brewing-glass.cafe-glass-sipping { animation: cafeBrewTilt 0.8s ease-in-out forwards; }

/* The day-track no longer runs on one long timer — the customer-service
   phase is player-paced (tap speed varies), so JS nudges this marker
   forward in short discrete hops at each beat/customer instead of one
   fixed-duration glide. Keep this transition short; it's reused for every
   hop, not stretched across the whole sequence. */
.cafe-daytrack {
  position: relative;
  height: 4px;
  background: linear-gradient(90deg, #ffd9a8, #cdeaff, #2b2440);
  border-radius: 999px;
  margin: 2px 4px 22px;
}
.cafe-daytrack-emoji {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  font-size: 17px;
  transition: left 0.5s ease;
}

.cafe-brewing-ingredients {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
  margin: 12px 0 2px;
}
.cafe-brewing-ingredient {
  font-size: 21px;
  opacity: 0;
  animation: cafeIngredientDrop 0.4s ease forwards;
}
@keyframes cafeIngredientDrop {
  0% { opacity: 0; transform: translateY(-10px) scale(0.6); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- CAFÉ: WALK-UP STAND SCENE ----------
   Lemonade-Stand-style: customers walk in from the right, cross the
   sidewalk toward your counter, pause there (tap them before the ring
   closes), then walk on off the left side — instead of a static target
   just appearing in place. */
.cafe-customers-row {
  position: relative;
  height: 96px;
  margin-top: 18px;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent 0%, transparent 68%, var(--surface-border) 68%, var(--surface-border) calc(68% + 2px), var(--paper) calc(68% + 2px));
}
.cafe-stand-counter {
  position: absolute;
  left: 20%;
  bottom: 10px;
  margin-left: -25px;
  width: 50px;
  height: 30px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-top: 3px solid var(--pink);
  border-radius: 6px 6px 3px 3px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.cafe-stand-glass { font-size: 20px; margin-top: -16px; }

.cafe-customer {
  position: absolute;
  bottom: 10px;
  margin-left: -23px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.cafe-customer-pink { background: var(--pink-pale); }
.cafe-customer-purple { background: var(--purple-pale); }
.cafe-customer-teal { background: var(--teal-pale); }
.cafe-customer-lime { background: var(--lime-pale); }

/* Tappable version: bigger hit target; the countdown ring only appears
   once they've actually arrived at the counter (via .cafe-customer-arrived),
   not while they're still walking in. */
.cafe-customer-tap {
  border: none;
  cursor: pointer;
  box-shadow: 0 0 0 3px var(--surface-border);
  transition: transform 0.12s ease, left 0.6s ease-out;
}
.cafe-customer-tap:active { transform: scale(0.92); }
.cafe-customer-tap.cafe-customer-arrived::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid var(--pink);
  transform: scale(1);
  animation: cafeCustomerCountdown linear forwards;
  animation-duration: var(--cafe-customer-window, 1200ms);
}
@keyframes cafeCustomerCountdown {
  0% { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.35); }
}
.cafe-customer-tap.cafe-customer-served {
  animation: cafeBrewServedBounce 0.4s ease;
  box-shadow: 0 0 0 3px var(--pink);
  cursor: default;
}
.cafe-customer-tap.cafe-customer-missed {
  box-shadow: 0 0 0 3px var(--surface-border);
  opacity: 0.55;
  cursor: default;
}

.cafe-customer.cafe-customer-declined { opacity: 0.6; transition: opacity 0.25s ease; }

.cafe-tip-popup {
  position: absolute;
  top: -4px;
  left: 50%;
  font-size: 13px;
  font-weight: 800;
  color: var(--pink-deep);
  animation: cafeTipFloat 0.75s ease forwards;
  pointer-events: none;
  white-space: nowrap;
}
@keyframes cafeTipFloat {
  0% { opacity: 0; transform: translate(-50%, 0); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -26px); }
}

.cafe-decline-popup {
  position: absolute;
  top: -4px;
  left: 50%;
  font-size: 11px;
  font-weight: 800;
  color: #9a7b1e;
  animation: cafeTipFloat 0.75s ease forwards;
  pointer-events: none;
  white-space: nowrap;
}

.cafe-tip-tally { margin: 10px 0 0; font-size: 12.5px; font-weight: 700; color: var(--pink-deep); min-height: 16px; text-align: center; }
.cafe-customers-empty { font-size: 12.5px; color: var(--muted); }

.cafe-brewing-label { margin: 16px 0 14px; font-size: 14px; font-weight: 700; color: var(--ink); transition: opacity 0.15s ease; }
.cafe-brewing-track {
  width: 100%;
  height: 10px;
  background: var(--paper);
  border: 1px solid var(--paper-border);
  border-radius: 999px;
  overflow: hidden;
}
.cafe-brewing-fill {
  height: 100%;
  width: 0%;
  background: var(--pink);
  border-radius: 999px;
  transition: width 0.85s ease;
}

@keyframes cafeResultsReveal {
  0% { opacity: 0; transform: scale(0.94) translateY(6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
#cafe-results { animation: cafeResultsReveal 0.35s ease; }

.cafe-best-day-callout { margin: 10px 0 0; font-size: 12.5px; font-weight: 700; color: var(--pink-deep); }
.cafe-limited-badge { font-size: 9px; color: var(--pink); line-height: 1; margin-bottom: 1px; }

.cafe-event-line { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; }
.cafe-event-line.cafe-event-down { color: #9a7b1e; }
.cafe-event-line.cafe-event-up { color: var(--pink-deep); }
.cafe-stock-line { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: #9a7b1e; }
.cafe-price-reaction-line { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; }
.cafe-price-reaction-line.cafe-price-good { color: var(--pink-deep); }
.cafe-price-reaction-line.cafe-price-bad { color: #9a7b1e; }
.cafe-vibe-match-line { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--pink-deep); }
.cafe-tip-bonus-line { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--ink); }

.cafe-results-story { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.cafe-reset-link {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- MIND HABIT CARDS ---------- */
.habit-mindfulness .habit-card-media { background: linear-gradient(160deg, #c9bff2, #6a5ac0); }
.habit-journaling .habit-card-media { background: linear-gradient(160deg, #e6c9a8, #a8763a); }
.habit-focus .habit-card-media { background: linear-gradient(160deg, #a8d4e6, #3a7ea8); }
.habit-emotional .habit-card-media { background: linear-gradient(160deg, #f2c9d9, #c96a8f); }
.habit-growth .habit-card-media { background: linear-gradient(160deg, #cfe6a8, #7a9e3a); }
.habit-restreflection .habit-card-media { background: linear-gradient(160deg, #d8c9f2, #4a3a6a); }

/* ---------- MIND SCREEN THEME (reuses Body's structural classes, purple accent) ---------- */
#screen-mind .body-hero-tab { border-bottom-color: var(--purple); }
#screen-mind .body-hero-copy .accent { color: var(--purple); }
#screen-mind .body-hero-tagline { color: var(--purple); }
#screen-mind .ring-fill { stroke: var(--purple); }

/* Mind's rituals are a vertical list of full-width rows, not a horizontal
   row of square tiles — a different shape from Body, not a recolor of it.
   Completion is the icon turning into a checkmark, not a separate dot. */
#screen-mind .ritual-tiles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible;
  padding-bottom: 0;
}

.ritual-row {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #f8f6fd;
  border-radius: 16px;
  padding: 13px 16px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.ritual-row:active { transform: scale(0.985); }
.ritual-row.done { background: var(--purple-pale); }

.ritual-row-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface);
  color: #6a5ac0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.ritual-row.done .ritual-row-icon { background: var(--purple); color: #fff; }

.ritual-row-name {
  flex: 1;
  min-width: 0;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 15.5px;
  color: var(--ink);
}
.ritual-row.done .ritual-row-name { color: #5a4a99; }

.ritual-row-frac { flex-shrink: 0; font-size: 11.5px; color: #9086b3; }

.ritual-row .ritual-tile-learn {
  position: static;
  width: 24px; height: 24px;
  background: var(--surface);
  color: #6a5ac0;
  box-shadow: 0 1px 3px rgba(90, 70, 160, 0.15);
  flex-shrink: 0;
}

#screen-mind .checkin-option.selected { background: var(--purple-pale); border-color: var(--purple); }
#screen-mind .checkin-note { color: #6a5ac0; }

#screen-mind .insight-card { background: #f5f3fb; border-color: #ece8f7; }
#screen-mind .insight-card strong,
#screen-mind .insight-label { color: #6a5ac0; }

#screen-mind .streak-badge { background: var(--purple-pale); }
#screen-mind .streak-badge strong { color: #6a5ac0; }

#screen-mind .section-count,
#screen-mind .section-link,
#screen-mind .view-all,
#screen-mind .habit-arrow,
#screen-mind .wwb-read-more,
#screen-mind .shop-price { color: #6a5ac0; }

#screen-mind .tool-icon { background: var(--purple-pale); color: #6a5ac0; }

/* ---------- SPIRIT HABIT CARDS ---------- */
.habit-nature .habit-card-media { background: linear-gradient(160deg, #a8e0c9, #2f8a6a); }
.habit-ritual .habit-card-media { background: linear-gradient(160deg, #f2d9a8, #b8823a); }
.habit-sacredmovement .habit-card-media { background: linear-gradient(160deg, #a8d9d4, #2f7a8a); }
.habit-kindness .habit-card-media { background: linear-gradient(160deg, #f2c9c0, #c9705a); }
.habit-purpose .habit-card-media { background: linear-gradient(160deg, #c9dce6, #3a6a8a); }
.habit-energyspace .habit-card-media { background: linear-gradient(160deg, #d4e6a8, #6a8a3a); }
.habit-manifestation .habit-card-media { background: linear-gradient(160deg, #f2c9a8, #c9603a); }

/* ---------- RITUAL ORBS (Spirit): a wrapping cluster of glowing circles,
   not a scroll row (Body) or a vertical list (Mind) — a third, distinct
   shape so completion feels like lighting up, not ticking a box. ---------- */
#screen-spirit .ritual-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 12px;
  overflow: visible;
  padding-bottom: 0;
  justify-content: flex-start;
}

.ritual-orb {
  width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-align: center;
  cursor: pointer;
}
.ritual-orb:active { transform: scale(0.96); }

.ritual-orb-icon {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--teal-pale);
  color: #2f8a9a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}
.ritual-orb.done .ritual-orb-icon {
  background: radial-gradient(circle at 32% 28%, #a6ecf5, var(--teal) 72%);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(79, 184, 201, 0.16), 0 6px 16px rgba(47, 138, 154, 0.35);
}

.ritual-orb-name { font-size: 11.5px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.ritual-orb.done .ritual-orb-name { color: #2f8a9a; }
.ritual-orb-frac { font-size: 10px; color: #7a9aa0; }

.ritual-orb .ritual-tile-learn {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #0b0b0b;
}

/* ---------- SPIRIT SCREEN THEME (reuses Body's structural classes, teal accent) ---------- */
#screen-spirit .body-hero-tab { border-bottom-color: var(--teal); }
#screen-spirit .body-hero-copy .accent { color: var(--teal); }
#screen-spirit .body-hero-tagline { color: #2f8a9a; }
#screen-spirit .ring-fill { stroke: var(--teal); }

#screen-spirit .checkin-option.selected { background: var(--teal-pale); border-color: var(--teal); }
#screen-spirit .checkin-note { color: #2f8a9a; }

#screen-spirit .insight-card { background: #f0f9fa; border-color: #dcf0f2; }
#screen-spirit .insight-card strong,
#screen-spirit .insight-label { color: #2f8a9a; }

#screen-spirit .streak-badge { background: var(--teal-pale); }
#screen-spirit .streak-badge strong { color: #2f8a9a; }

#screen-spirit .section-count,
#screen-spirit .section-link,
#screen-spirit .view-all,
#screen-spirit .habit-arrow,
#screen-spirit .wwb-read-more,
#screen-spirit .shop-price { color: #2f8a9a; }

#screen-spirit .tool-icon { background: var(--teal-pale); color: #2f8a9a; }

/* ---------- JOURNEY HABIT CARDS ---------- */
.habit-milestones .habit-card-media { background: linear-gradient(160deg, #e6d98c, #a8923a); }
.habit-adventure .habit-card-media { background: linear-gradient(160deg, #f2b88c, #c9703a); }
.habit-becoming .habit-card-media { background: linear-gradient(160deg, #c5ff9e, #7c8a1e); }
.habit-vision .habit-card-media { background: linear-gradient(160deg, #a8c9e6, #3a6a9e); }
.habit-storytelling .habit-card-media { background: linear-gradient(160deg, #e6c9d9, #a85a7a); }
.habit-celebrations .habit-card-media { background: linear-gradient(160deg, #f2d97a, #c9963a); }

/* ---------- RITUAL PATH (Journey): a vertical timeline, not a scroll row
   (Body), a list (Mind), or a cluster (Spirit) — milestones along a line,
   fitting for a category about progress over time. ---------- */
#screen-journey .ritual-tiles {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: visible;
  padding-bottom: 0;
  position: relative;
}
#screen-journey .ritual-tiles::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: var(--lime-pale);
  z-index: 0;
}

.path-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  cursor: pointer;
}
.path-item:active { transform: scale(0.99); }

.path-marker {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--lime-pale);
  color: #7c8a1e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.path-item.done .path-marker { background: var(--lime); border-color: var(--lime); color: #fff; }

.path-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.path-name { font-weight: 700; font-size: 14.5px; color: var(--ink); }
.path-item.done .path-name { color: #5f6b17; }
.path-frac { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.path-item .ritual-tile-learn {
  position: static;
  background: var(--surface);
  color: #7c8a1e;
  box-shadow: 0 1px 3px rgba(124, 138, 30, 0.2);
  flex-shrink: 0;
}

/* ---------- JOURNEY SCREEN THEME (reuses Body's structural classes, lime accent) ---------- */
#screen-journey .body-hero-tab { border-bottom-color: var(--lime); }
#screen-journey .body-hero-copy .accent { color: #b7c93f; }
#screen-journey .body-hero-tagline { color: #b7c93f; }
#screen-journey .ring-fill { stroke: var(--lime); }

#screen-journey .checkin-option.selected { background: var(--lime-pale); border-color: var(--lime); }
#screen-journey .checkin-note { color: #7c8a1e; }

#screen-journey .insight-card { background: #f9fbf0; border-color: #eef4d8; }
#screen-journey .insight-card strong,
#screen-journey .insight-label { color: #7c8a1e; }

#screen-journey .streak-badge { background: var(--lime-pale); }
#screen-journey .streak-badge strong { color: #7c8a1e; }

#screen-journey .section-count,
#screen-journey .section-link,
#screen-journey .view-all,
#screen-journey .habit-arrow,
#screen-journey .wwb-read-more,
#screen-journey .shop-price { color: #7c8a1e; }

#screen-journey .tool-icon { background: var(--lime-pale); color: #7c8a1e; }

/* ---------- STARS ALIGN COLLECTION: COSMIC LISA FRANK THEME ----------
   Scoped to this feature only (habit tiles, the two intake/results screens,
   and the astrology/numerology/human-design detail screens) — the rest of
   the app stays on the restrained black/white brand system. This is the
   one place saturated color, glow, and a starfield are the point. */
:root {
  --cosmic-1: #050505;
  --cosmic-2: #0c0a0d;
  --cosmic-3: #100a0e;
  --cosmic-glow-1: rgba(255, 79, 216, 0.28);
  --cosmic-glow-2: rgba(77, 232, 255, 0.2);
  --cosmic-pink: #ff4fd8;
  --cosmic-cyan: #4de8ff;
  --cosmic-gold: #ffd23f;
  --cosmic-text-muted: #f0c6e6;
}

/* This whole collection is already fixed-dark/cosmic on its own terms, so it
   opts out of the app-wide light/dark toggle: pin the shared surface tokens
   back to their light values here even when the rest of the app is dark. */
[data-theme="dark"] #screen-habit-astrology,
[data-theme="dark"] #screen-habit-numerology,
[data-theme="dark"] #screen-habit-humandesign,
[data-theme="dark"] #screen-stars-intake,
[data-theme="dark"] #screen-stars-results {
  --surface: #fff;
  --surface-border: #f0eeee;
  --paper: #faf9f7;
  --paper-border: #efece9;
  --ink: #1a1a1a;
  --muted: #8a8a8a;
  --pink-pale: #fbdce9;
  --purple-pale: #e4dff8;
  --teal-pale: #d7f0f4;
  --lime-pale: #eaf0cf;
}

.cosmic-bg {
  background-image:
    radial-gradient(1.6px 1.6px at 10% 15%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 35% 65%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 60% 25%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 80% 75%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 92% 40%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 20% 85%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 48% 10%, #fff, transparent),
    radial-gradient(120% 90% at 12% 0%, var(--cosmic-glow-1), transparent 45%),
    radial-gradient(120% 90% at 90% 100%, var(--cosmic-glow-2), transparent 50%),
    linear-gradient(155deg, var(--cosmic-1) 0%, var(--cosmic-2) 55%, var(--cosmic-3) 100%);
  background-repeat: repeat;
  background-size: 300px 300px;
}

.neon-title {
  color: #fff;
  text-shadow:
    0 0 4px rgba(255,255,255,0.85),
    0 0 14px var(--cosmic-pink),
    0 0 28px var(--cosmic-pink);
}

/* ---------- SPIRIT: ASTROLOGY / NUMEROLOGY / HUMAN DESIGN HABIT CARDS ---------- */
.habit-astrology .habit-card-media,
.habit-numerology .habit-card-media,
.habit-humandesign .habit-card-media {
  position: relative;
  background-image:
    radial-gradient(1.4px 1.4px at 15% 20%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 40% 70%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 70% 30%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 85% 80%, #fff, transparent),
    radial-gradient(120% 90% at 12% 0%, var(--cosmic-glow-1), transparent 45%),
    radial-gradient(120% 90% at 90% 100%, var(--cosmic-glow-2), transparent 50%),
    linear-gradient(155deg, var(--cosmic-1) 0%, var(--cosmic-2) 55%, var(--cosmic-3) 100%);
}
.habit-astrology .habit-card-media::after,
.habit-numerology .habit-card-media::after,
.habit-humandesign .habit-card-media::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
}
.habit-astrology .habit-card-media::after { background: var(--cosmic-cyan); box-shadow: 0 0 8px var(--cosmic-cyan); }
.habit-numerology .habit-card-media::after { background: var(--cosmic-gold); box-shadow: 0 0 8px var(--cosmic-gold); }
.habit-humandesign .habit-card-media::after { background: var(--cosmic-pink); box-shadow: 0 0 8px var(--cosmic-pink); }

/* ---------- ASTROLOGY / NUMEROLOGY / HUMAN DESIGN SCREENS ---------- */
.astro-header.simple-header {
  background-image:
    radial-gradient(1.6px 1.6px at 12% 20%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 30% 70%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 55% 35%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 78% 15%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 90% 60%, #fff, transparent),
    radial-gradient(120% 90% at 12% 0%, var(--cosmic-glow-1), transparent 45%),
    radial-gradient(120% 90% at 90% 100%, var(--cosmic-glow-2), transparent 50%),
    linear-gradient(155deg, var(--cosmic-1) 0%, var(--cosmic-2) 60%, var(--cosmic-3) 100%);
}
.astro-header h1 {
  color: #fff;
  text-shadow: 0 0 4px rgba(255,255,255,0.85), 0 0 14px var(--cosmic-pink), 0 0 28px var(--cosmic-pink);
}
.astro-header p { color: var(--cosmic-text-muted); }
.astro-content { padding-top: 24px; }

.astro-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.astro-fields label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.astro-fields .astro-field-wide { grid-column: 1 / -1; }
.astro-fields input {
  border: 1.5px solid var(--brand-black);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13.5px;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
}
.astro-fields input:focus { outline: none; border-color: var(--cosmic-pink); box-shadow: 0 0 0 3px rgba(255,79,216,0.15); }

.astro-info-card {
  background: linear-gradient(160deg, #f7f0ff, #ffffff);
  border: 1.5px solid var(--brand-black);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 22px;
}
.astro-info-title {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--cosmic-pink);
  margin-bottom: 8px;
}

/* ---------- HABIT SCREEN CONTENT (Spirit sub-topics) ---------- */
.tip-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.tip-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border: 1px solid #f0eeee;
  border-radius: 14px;
  padding: 12px 14px;
}
.tip-row-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--teal-pale);
  color: #2f8a9a;
  font-weight: 800;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.tip-row p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink); }

/* ---------- NOTIFICATIONS ---------- */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.notif-item:active { transform: scale(0.98); }
.notif-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand-bubblegum);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.notif-body { flex: 1; min-width: 0; }
.notif-body strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.notif-body p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.notif-empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 13.5px; }

/* ---------- APPEARANCE PICKER (Profile) ---------- */
.profile-identity-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.profile-avatar {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--accent-name);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: "Playfair Display", serif;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.profile-avatar.has-avatar { background: transparent; color: transparent; }
.avatar-svg { display: block; width: 100%; height: 100%; }
.profile-avatar-edit {
  position: absolute;
  right: 0; bottom: 0;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--accent-name);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--surface);
  z-index: 2;
}
.profile-avatar-btn {
  margin-top: 4px;
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-name);
  cursor: pointer;
}
.profile-avatar-btn:active { opacity: 0.6; }
.profile-identity-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-identity-text strong { font-family: "Playfair Display", serif; font-size: 19px; }
.profile-identity-text span { font-size: 12.5px; color: var(--muted); }

.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.profile-stat {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 12px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.profile-stat strong { font-family: "Playfair Display", serif; font-size: 19px; }
.profile-stat span { font-size: 10.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.02em; }

.profile-form-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.profile-field { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.profile-field-wide { grid-column: 1 / -1; }
.profile-field input,
.profile-field textarea {
  border: 1.5px solid var(--surface-border);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink);
  background: var(--paper);
  resize: none;
}
.profile-field input:focus,
.profile-field textarea:focus { outline: none; border-color: var(--accent-name); }
.profile-save-btn {
  grid-column: 1 / -1;
  background: var(--accent-name);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}
.profile-save-btn:active { transform: scale(0.98); }
.profile-save-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  min-height: 14px;
  text-align: center;
}

.appearance-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
}
.appearance-hint { margin: 0 0 18px; font-size: 12.5px; color: var(--muted); }

.premium-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
}
.premium-card.hidden { display: none; }
.premium-card .waitlist-row { margin-bottom: 4px; }
.premium-card-unlocked {
  background: linear-gradient(160deg, #f7f0ff, #ffffff);
  border-color: var(--brand-black);
}
.premium-card-unlocked .astro-info-title { color: var(--cosmic-pink); display: block; font-size: 13px; font-weight: 800; margin-bottom: 6px; }

.swatch-group { margin-bottom: 18px; }
.swatch-group:last-child { margin-bottom: 0; }
.swatch-label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em; color: var(--muted); margin-bottom: 10px; }
.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  transition: transform 0.15s ease;
}
.swatch:active { transform: scale(0.9); }
.swatch.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--ink);
}
.swatch-custom {
  position: relative;
  overflow: hidden;
  background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
  display: flex; align-items: center; justify-content: center;
}
.swatch-custom input[type="color"] {
  position: absolute;
  inset: -4px;
  width: 40px; height: 40px;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0;
}

.header-theme-options { display: flex; gap: 10px; }
.header-theme-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid var(--surface-border);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.header-theme-option.active { border-color: var(--accent-name); background: var(--paper); }
.header-theme-swatch {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid var(--surface-border);
  flex-shrink: 0;
}
.header-theme-swatch-black { background: #0b0b0b; }
.header-theme-swatch-white { background: #ffffff; }

.habit-read-more {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #f0eeee;
  border-radius: 14px;
  padding: 10px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 22px;
}
.habit-read-more img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #eee; }
.habit-read-more-text { flex: 1; min-width: 0; }
.habit-read-more-text strong { display: block; font-size: 13px; margin-bottom: 2px; }
.habit-read-more-text span { font-size: 11.5px; color: var(--pink-deep); font-weight: 700; }

.prompt-card {
  background: linear-gradient(160deg, #f7f0ff, #ffffff);
  border: 1.5px solid var(--brand-black);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 22px;
  text-align: center;
}
.prompt-card-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--cosmic-pink); margin-bottom: 10px; }
.prompt-card-text { font-family: "Playfair Display", serif; font-style: italic; font-size: 18px; line-height: 1.4; margin: 0 0 14px; }
.prompt-card textarea {
  width: 100%;
  min-height: 70px;
  border: 1.5px solid var(--brand-black);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
}
.astro-info-card p { margin: 0; font-size: 13px; line-height: 1.55; color: #444; }

.astro-houses { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.astro-house {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid #eee0fa;
  border-radius: 14px;
  padding: 12px 14px;
}
.astro-house-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--cosmic-pink), #ff9de3);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.astro-house-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.astro-house-body strong { font-size: 13px; color: var(--ink); }
.astro-house-body small { font-size: 11px; color: var(--muted); margin-top: 1px; }
.astro-house input {
  width: 92px;
  border: 1px solid #e0d0f2;
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 12px;
  font-family: inherit;
  color: var(--ink);
  flex-shrink: 0;
}
.astro-house input:focus { outline: none; border-color: var(--cosmic-pink); }

.astro-notes { margin-bottom: 16px; }
.astro-notes textarea {
  width: 100%;
  border: 1.5px solid var(--brand-black);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  resize: vertical;
}
.astro-notes textarea:focus { outline: none; border-color: var(--cosmic-pink); }

.astro-footnote { font-size: 12px; color: var(--muted); line-height: 1.5; text-align: center; margin: 4px 0 8px; }
.astro-footnote a { color: #b8189e; font-weight: 700; text-decoration: underline; text-decoration-color: var(--cosmic-cyan); }

/* Numerology */
.numerology-card {
  background-image:
    radial-gradient(1.4px 1.4px at 15% 25%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 50% 75%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 85% 20%, #fff, transparent),
    radial-gradient(120% 90% at 12% 0%, var(--cosmic-glow-1), transparent 45%),
    radial-gradient(120% 90% at 90% 100%, var(--cosmic-glow-2), transparent 50%),
    linear-gradient(160deg, var(--cosmic-1) 0%, var(--cosmic-2) 60%, var(--cosmic-3) 100%);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 8px;
}
.numerology-label { display: block; font-size: 12px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.numerology-input-row { display: flex; gap: 10px; }
.numerology-input-row input {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  background: rgba(255,255,255,0.92);
}
.numerology-input-row input:focus { outline: none; box-shadow: 0 0 0 3px rgba(77,232,255,0.4); }
.numerology-btn {
  background: linear-gradient(135deg, var(--cosmic-pink), var(--cosmic-2));
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 18px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 0 14px rgba(255,79,216,0.5);
}
.numerology-btn:active { transform: scale(0.97); }

.numerology-text-input {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  background: rgba(255,255,255,0.92);
}
.numerology-text-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(77,232,255,0.4); }
.numerology-hint { margin: 10px 0 0; font-size: 11px; color: var(--cosmic-text-muted); line-height: 1.4; }

.numerology-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.numerology-results-grid.hidden { display: none; }

.numerology-result-card {
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%, #fff, transparent),
    radial-gradient(120% 90% at 15% 0%, var(--cosmic-glow-1), transparent 45%),
    radial-gradient(120% 90% at 90% 100%, var(--cosmic-glow-2), transparent 50%),
    linear-gradient(160deg, var(--cosmic-1) 0%, var(--cosmic-2) 60%, var(--cosmic-3) 100%);
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
}
.numerology-result-card.hidden { display: flex; flex-direction: column; align-items: center; opacity: 0.35; }
.numerology-result-number {
  display: block;
  font-family: "Playfair Display", serif;
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 6px rgba(255,255,255,0.7), 0 0 22px var(--cosmic-cyan);
}
.numerology-result-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--cosmic-gold);
  margin-top: 4px;
}
.numerology-result-type {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--cosmic-text-muted);
  margin-top: 2px;
}
.numerology-result-copy { margin: 8px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--cosmic-text-muted); }

/* Compatibility */
.compat-card {
  background-image:
    radial-gradient(1.4px 1.4px at 15% 25%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 50% 75%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 85% 20%, #fff, transparent),
    radial-gradient(120% 90% at 12% 0%, var(--cosmic-glow-1), transparent 45%),
    radial-gradient(120% 90% at 90% 100%, var(--cosmic-glow-2), transparent 50%),
    linear-gradient(160deg, var(--cosmic-1) 0%, var(--cosmic-2) 60%, var(--cosmic-3) 100%);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 22px;
}
.compat-person input { margin-top: 8px; }
.compat-person input.numerology-text-input,
.compat-person input[type="date"] {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  background: rgba(255,255,255,0.92);
}
.compat-person input:focus { outline: none; box-shadow: 0 0 0 3px rgba(77,232,255,0.4); }
.compat-divider {
  text-align: center;
  color: var(--cosmic-text-muted);
  font-size: 13px;
  margin: 14px 0;
}
.compat-btn { width: 100%; margin-top: 16px; padding: 12px; }

.compat-results.hidden { display: none; }
.compat-result-card {
  background-image:
    radial-gradient(1.4px 1.4px at 20% 30%, #fff, transparent),
    radial-gradient(120% 90% at 15% 0%, var(--cosmic-glow-1), transparent 45%),
    radial-gradient(120% 90% at 90% 100%, var(--cosmic-glow-2), transparent 50%),
    linear-gradient(160deg, var(--cosmic-1) 0%, var(--cosmic-2) 60%, var(--cosmic-3) 100%);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  margin-bottom: 12px;
}
.compat-result-eyebrow { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; color: var(--cosmic-gold); margin-bottom: 10px; }
.compat-signs-row { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 10px; }
.compat-sign { font-family: "Playfair Display", serif; font-size: 26px; color: #fff; text-shadow: 0 0 10px var(--cosmic-cyan); }
.compat-sign-number { font-size: 30px; }
.compat-heart { color: var(--cosmic-pink); font-size: 16px; text-shadow: 0 0 8px var(--cosmic-pink); }
.compat-result-label { display: block; font-size: 14px; color: #fff; margin-bottom: 6px; }
.compat-result-copy { margin: 0; font-size: 12px; line-height: 1.5; color: var(--cosmic-text-muted); }

/* Human Design */
.hd-types { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.hd-type {
  background: var(--surface);
  border: 1px solid #f0e6fa;
  border-left: 4px solid var(--cosmic-pink);
  border-radius: 10px;
  padding: 14px 16px;
}
.hd-type:nth-child(2) { border-left-color: var(--cosmic-cyan); }
.hd-type:nth-child(3) { border-left-color: var(--cosmic-gold); }
.hd-type:nth-child(4) { border-left-color: var(--brand-black); }
.hd-type:nth-child(5) { border-left-color: var(--cosmic-pink); }
.hd-type strong { display: block; font-size: 13.5px; margin-bottom: 4px; color: var(--brand-black); }
.hd-type p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* ---------- STARS ALIGN BANNER / INTAKE / RESULTS ---------- */
.stars-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-decoration: none;
  color: #fff;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 25%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 40% 70%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 70% 20%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 90% 60%, #fff, transparent),
    radial-gradient(120% 90% at 12% 0%, var(--cosmic-glow-1), transparent 45%),
    radial-gradient(120% 90% at 90% 100%, var(--cosmic-glow-2), transparent 50%),
    linear-gradient(155deg, var(--cosmic-1) 0%, var(--cosmic-2) 55%, var(--cosmic-3) 100%);
  border-radius: 18px;
  padding: 18px 20px;
  margin: 20px 0 0;
  box-shadow: 0 0 0 1.5px rgba(255,79,216,0.4), 0 6px 24px rgba(255,95,196,0.3);
  transition: transform 0.15s ease;
}
.stars-banner:active { transform: scale(0.98); }
.stars-banner-eyebrow { font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; color: var(--cosmic-gold); }
.stars-banner-title {
  font-family: "Playfair Display", serif;
  font-size: 19px;
  font-weight: 600;
  margin-top: 2px;
  color: #fff;
  text-shadow: 0 0 4px rgba(255,255,255,0.7), 0 0 14px var(--cosmic-pink);
}
.stars-banner-sub { font-size: 12px; color: var(--cosmic-text-muted); line-height: 1.4; margin-top: 2px; }
.stars-banner-cta { font-size: 12.5px; font-weight: 700; color: var(--cosmic-cyan); margin-top: 10px; }
.stars-banner-cta::after { content: ""; display: inline-block; width: 28px; height: 3px; background: var(--cosmic-cyan); box-shadow: 0 0 6px var(--cosmic-cyan); margin-left: 8px; vertical-align: middle; }

/* The three pillars of the collection, front and center under the banner —
   not buried among the free habit cards. */
.stars-pillar-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.stars-pillar {
  background: #0b0b0d;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.stars-pillar:active { transform: scale(0.96); }
.stars-pillar-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  margin-bottom: 2px;
}
.stars-pillar-astrology .stars-pillar-icon { background: rgba(155,249,255,0.15); color: var(--cosmic-cyan); box-shadow: 0 0 10px rgba(155,249,255,0.25); }
.stars-pillar-numerology .stars-pillar-icon { background: rgba(255,210,63,0.15); color: var(--cosmic-gold); box-shadow: 0 0 10px rgba(255,210,63,0.25); }
.stars-pillar-humandesign .stars-pillar-icon { background: rgba(255,79,216,0.15); color: var(--cosmic-pink); box-shadow: 0 0 10px rgba(255,79,216,0.25); }
.stars-pillar-compatibility .stars-pillar-icon { background: rgba(224,67,154,0.18); color: #e0439a; box-shadow: 0 0 10px rgba(224,67,154,0.28); }
.stars-pillar-title { font-size: 12px; font-weight: 700; color: #fff; }
.stars-pillar-sub { font-size: 10px; color: var(--cosmic-text-muted); }

.stars-reveal-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--cosmic-pink), var(--cosmic-2));
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 15px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  margin: 4px 0 12px;
  box-shadow: 0 0 18px rgba(255,79,216,0.45);
}
.stars-reveal-btn:active { transform: scale(0.98); }

.stars-snapshot-row { display: flex; gap: 12px; margin-bottom: 8px; }
.stars-snapshot-card {
  flex: 1;
  background: linear-gradient(160deg, #fbf3ff, #ffffff);
  border: 1.5px solid #e6d0f7;
  border-radius: 18px;
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stars-snapshot-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #9a7ab8;
  margin-top: 8px;
}
.stars-snapshot-value {
  font-family: "Playfair Display", serif;
  font-size: 20px;
  color: var(--brand-black);
  margin-top: 4px;
}
.stars-snapshot-copy { font-size: 11.5px; color: #666; line-height: 1.4; margin: 8px 0 0; }
#stars-sun-card .stars-snapshot-symbol {
  background: linear-gradient(135deg, var(--cosmic-pink), #ff9de3);
  color: #fff;
  border-radius: 50%;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 14px rgba(255,79,216,0.5);
}
#stars-lifepath-card .stars-snapshot-symbol {
  background: linear-gradient(135deg, var(--cosmic-cyan), #9df5ff);
  color: #1a3d4a;
  border-radius: 50%;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 14px rgba(77,232,255,0.55);
}

.product-card {
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 14px;
  color: #fff;
  background-image:
    radial-gradient(1.4px 1.4px at 15% 20%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 45% 70%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 80% 30%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 92% 80%, #fff, transparent),
    radial-gradient(120% 90% at 12% 0%, var(--cosmic-glow-1), transparent 45%),
    radial-gradient(120% 90% at 90% 100%, var(--cosmic-glow-2), transparent 50%),
    linear-gradient(155deg, var(--cosmic-1) 0%, var(--cosmic-2) 55%, var(--cosmic-3) 100%);
}
.product-astrology { box-shadow: 0 0 0 1.5px rgba(77,232,255,0.5), 0 8px 26px rgba(61,10,58,0.4); }
.product-humandesign { box-shadow: 0 0 0 1.5px rgba(255,79,216,0.5), 0 8px 26px rgba(61,10,58,0.4); }
.product-numerology { box-shadow: 0 0 0 1.5px rgba(255,210,63,0.55), 0 8px 26px rgba(61,10,58,0.4); }

.product-eyebrow {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  border-radius: 20px;
  color: var(--cosmic-1);
}
.product-astrology .product-eyebrow { background: var(--cosmic-cyan); }
.product-humandesign .product-eyebrow { background: var(--cosmic-pink); color: #fff; }
.product-numerology .product-eyebrow { background: var(--cosmic-gold); }

.product-card h3 {
  font-family: "Playfair Display", serif;
  font-size: 19px;
  margin: 8px 0 2px;
  text-shadow: 0 0 10px rgba(255,255,255,0.35);
}
.product-price { font-size: 13px; font-weight: 700; color: var(--cosmic-text-muted); }
.product-bullets { list-style: none; margin: 12px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.product-bullets li { font-size: 12.5px; line-height: 1.4; padding-left: 16px; position: relative; color: #e8dbfa; }
.product-astrology .product-bullets li::before { content: ""; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--cosmic-cyan); }
.product-humandesign .product-bullets li::before { content: ""; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--cosmic-pink); }
.product-numerology .product-bullets li::before { content: ""; position: absolute; left: 0; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--cosmic-gold); }

.product-cta {
  width: 100%;
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 12px;
  padding: 12px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: default;
}

.waitlist-card {
  background: linear-gradient(160deg, #f7f0ff, #ffffff);
  border: 1.5px solid var(--brand-black);
  border-radius: 16px;
  padding: 18px;
  margin: 4px 0 20px;
  text-align: center;
}
.waitlist-card h3 { margin: 0 0 6px; font-family: "Playfair Display", serif; font-size: 16px; color: #1a1a1a; }
.waitlist-card p { margin: 0 0 14px; font-size: 12.5px; color: #555; line-height: 1.4; }
.waitlist-row { display: flex; gap: 8px; }
.waitlist-row input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid #e2d8ee;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 13.5px;
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
}
.waitlist-row input:focus { outline: none; border-color: var(--cosmic-pink); box-shadow: 0 0 0 3px rgba(255,79,216,0.15); }
.waitlist-btn {
  background: var(--cosmic-pink);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.waitlist-btn:active { transform: scale(0.97); }
.waitlist-btn:disabled { opacity: 0.6; cursor: default; }
.waitlist-success { margin: 10px 0 0; font-size: 12.5px; font-weight: 700; color: #1a9b6b; }
.waitlist-success.hidden { display: none; }

/* ---------- RITUALS TAB: the daily-use loop across every dimension ---------- */
.rt-summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid #f0eeee;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.rt-summary-ring { width: 56px; height: 56px; flex-shrink: 0; }
.rt-summary-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rt-ring-track { fill: none; stroke: #f0eeee; stroke-width: 9; }
.rt-ring-fill {
  fill: none;
  stroke: var(--accent-name);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  transition: stroke-dashoffset 0.3s ease;
}
.rt-summary-text { display: flex; flex-direction: column; gap: 3px; }
.rt-summary-text strong { font-size: 15.5px; font-weight: 700; }
.rt-summary-text span { font-size: 12px; color: var(--muted); line-height: 1.4; }

.rt-add-toggle {
  width: 100%;
  background: color-mix(in srgb, var(--accent-name) 18%, white);
  color: var(--accent-name);
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
}
.rt-add-toggle:active { transform: scale(0.98); }

.rt-add-form {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.rt-add-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e6e2e0;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}
.rt-add-form select {
  border: 1px solid #e6e2e0;
  border-radius: 10px;
  padding: 9px 8px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}
.rt-add-submit {
  background: var(--accent-name);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.rt-group { margin-bottom: 22px; }
.rt-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.rt-group-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim-color); flex-shrink: 0; }
.rt-group-name { font-size: 12.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); }
.rt-group-count { font-size: 12px; font-weight: 700; color: var(--dim-color); margin-left: auto; }

.rt-group-rows { display: flex; flex-direction: column; gap: 8px; }
.rt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #f0eeee;
  border-left: 3px solid var(--dim-color);
  border-radius: 12px;
  padding: 11px 13px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.rt-row:active { background-color: #faf9f7; }
.rt-row.done { background-color: #faf9f7; }
.rt-row.done .rt-row-name { color: var(--muted); text-decoration: line-through; text-decoration-color: #d8d4d0; }

.rt-row-check {
  width: 21px; height: 21px;
  border-radius: 6px;
  border: 2px solid #e3d9df;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.rt-row.done .rt-row-check { background: var(--dim-color); border-color: var(--dim-color); }

.rt-row-name { flex: 1; font-size: 13.5px; font-weight: 500; min-width: 0; }
.rt-row-frac { font-size: 11.5px; color: var(--muted); flex-shrink: 0; }
.rt-row-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 4px;
  flex-shrink: 0;
}

/* ---------- TODAY: pace selector + plan + "next hour" prompt ---------- */
.pace-card {
  background: #fff;
  border: 1px solid #f0eeee;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}
.pace-card h2 { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.04em; }
.pace-options { display: flex; gap: 6px; }
.pace-option {
  flex: 1;
  background: var(--paper);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 10px 4px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.pace-option:active { transform: scale(0.96); }
.pace-option.selected { background: var(--pink-pale); border-color: var(--pink); color: var(--pink-deep); }
.pace-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }

#today-plan-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 6px; }
.today-plan-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #f0eeee;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.today-plan-row:active { background-color: #fbf5f8; }
.today-plan-row.bonus { border-style: dashed; border-color: #e3c3d3; }
.today-plan-row .check { flex-shrink: 0; }
.today-plan-name { flex: 1; font-size: 13.5px; font-weight: 600; min-width: 0; }
.today-plan-row.done .today-plan-name { color: #888; }
.today-plan-tag {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--pink-deep);
  background: var(--pink-pale);
  border-radius: 20px;
  padding: 3px 8px;
  flex-shrink: 0;
}

.hour-prompt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}
.hour-option {
  background: #fff;
  border: 1px solid #f0eeee;
  border-radius: 12px;
  padding: 12px 10px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.hour-option:active { transform: scale(0.96); }
.hour-option.selected { background: var(--pink-pale); border-color: var(--pink); }

.hour-recommendation {
  background: #fff;
  border: 1.5px solid var(--pink);
  border-radius: 16px;
  padding: 16px;
  margin-top: 14px;
}
.hour-recommendation-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: var(--pink-deep); margin-bottom: 6px; }
.hour-recommendation h3 { margin: 0 0 4px; font-family: "Playfair Display", serif; font-size: 18px; }
.hour-recommendation p { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.hour-recommendation-actions { display: flex; align-items: center; gap: 12px; }
.hour-recommendation-btn {
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.hour-recommendation-btn.done { background: #ddd; color: #777; }
.hour-recommendation-link { font-size: 12.5px; font-weight: 700; color: var(--pink-deep); text-decoration: none; }

/* ========================================================================
   WELCOME / SETUP (first-run onboarding)
   A self-contained dark overlay pinned inside the .phone column. Uses its
   own fixed dark palette (not the app theme tokens) so the welcome is one
   consistent, premium brand moment regardless of light/dark mode.
   ======================================================================== */
.beta-gate {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(248,182,246,0.22), transparent 60%),
    radial-gradient(90% 60% at 50% 110%, rgba(155,140,224,0.16), transparent 60%),
    #0b0b0b;
  color: #fff;
  padding: 24px;
  text-align: center;
}
.beta-gate.hidden { display: none; }
.beta-gate-inner { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; }
.beta-gate-brand { font-family: "Alex Brush", cursive; font-size: 40px; color: #f8b6f6; margin-bottom: 18px; }
.beta-gate-inner h1 { font-family: "Playfair Display", serif; font-size: 24px; margin: 0 0 10px; }
.beta-gate-inner p { font-size: 13.5px; color: rgba(255,255,255,0.75); line-height: 1.5; margin: 0 0 20px; }
.beta-gate-inner input {
  width: 100%;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1.5px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 15px;
  font-family: inherit;
  margin-bottom: 12px;
}
.beta-gate-inner input::placeholder { color: rgba(255,255,255,0.45); text-transform: none; letter-spacing: normal; }
.beta-gate-inner input:focus { outline: none; border-color: #f8b6f6; }
.beta-gate-btn {
  width: 100%;
  background: #f8b6f6;
  color: #1a1a1a;
  border: none;
  border-radius: 12px;
  padding: 13px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}
.beta-gate-btn:active { transform: scale(0.98); }
.beta-gate-error { color: #ff8fa8; font-size: 12.5px; margin: 12px 0 0; }
.beta-gate-error.hidden { display: none; }
.beta-gate-footnote { font-size: 12px; color: rgba(255,255,255,0.55); margin: 18px 0 0 !important; }
.beta-gate-footnote a { color: #f8b6f6; font-weight: 700; text-decoration: underline; }

.onboard {
  /* Setup always opens on the bubblegum brand pink, independent of whatever
     accent is saved app-wide; the "Make it yours" step live-updates this. */
  --onb-accent: #f8b6f6;
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255,122,41,0.22), transparent 60%),
    radial-gradient(90% 60% at 50% 110%, rgba(155,140,224,0.16), transparent 60%),
    #0b0b0b;
  color: #fff;
  overflow-y: auto;
  animation: onb-fade 0.4s ease both;
}
.onboard.hidden { display: none; }
@keyframes onb-fade { from { opacity: 0; } to { opacity: 1; } }

.onb-inner {
  width: 100%;
  max-width: 430px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: calc(16px + var(--safe-top)) 26px calc(24px + env(safe-area-inset-bottom, 0px));
}

/* ---- Top bar: back / progress dots / skip ---- */
.onb-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  margin-bottom: 8px;
}
.onb-back, .onb-skip {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-family: inherit;
  padding: 4px;
  display: flex;
  align-items: center;
}
.onb-back[hidden], .onb-skip[hidden] { display: none; }
.onb-back { margin-left: -4px; }
.onb-skip {
  margin-left: auto;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.onb-skip:hover { color: #fff; }
.onb-dots { display: flex; gap: 7px; }
.onb-dots i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  transition: width 0.3s ease, background 0.3s ease;
}
.onb-dots i.active { width: 20px; border-radius: 4px; background: var(--onb-accent); }
.onb-dots i.done { background: rgba(255,255,255,0.5); }

/* ---- Stage / steps ---- */
.onb-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 0;
}
.onb-step { display: none; animation: onb-step-in 0.45s cubic-bezier(.2,.7,.2,1) both; }
.onb-step.active { display: block; }
@keyframes onb-step-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.onb-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--onb-accent);
  margin: 0 0 14px;
}
.onb-title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 40px;
  line-height: 1.04;
  letter-spacing: 0.01em;
  margin: 0 0 16px;
  color: #fff;
}
.onb-tagline {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
  margin: 0;
  max-width: 22em;
}
.onb-tagline em { font-family: "Alex Brush", cursive; font-style: normal; font-size: 22px; color: var(--onb-accent); }
.onb-help {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255,255,255,0.55);
  margin: 14px 0 0;
  max-width: 24em;
}
.onb-help-top { margin: -4px 0 20px; }

/* ---- Welcome step ---- */
.onb-orbs { display: flex; gap: 12px; margin-bottom: 30px; }
.onb-orb {
  width: 34px; height: 34px;
  border-radius: 50%;
  filter: blur(0.3px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.4);
  animation: onb-float 3.4s ease-in-out infinite;
}
.onb-orb.orb-body { background: var(--pink); }
.onb-orb.orb-mind { background: var(--purple); animation-delay: 0.4s; }
.onb-orb.orb-spirit { background: var(--teal); animation-delay: 0.8s; }
.onb-orb.orb-journey { background: var(--lime); animation-delay: 1.2s; }
@keyframes onb-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.onb-wordmark {
  font-family: "Alex Brush", cursive;
  font-weight: 400;
  font-size: 76px;
  line-height: 1;
  color: var(--onb-accent);
  margin: 0 0 18px;
}

/* ---- Text / date inputs ---- */
.onb-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.16);
  border-radius: 16px;
  padding: 16px 18px;
  color: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.onb-input::placeholder { color: rgba(255,255,255,0.38); }
.onb-input:focus { border-color: var(--onb-accent); background: rgba(255,255,255,0.09); }
/* Date field: keep the native picker usable on a dark surface */
.onb-input[type="date"] { color-scheme: dark; }

/* ---- Focus pillars (multi-select) ---- */
.onb-pillars { display: flex; flex-direction: column; gap: 10px; }
.onb-pillar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 14px 16px;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.1s ease;
}
.onb-pillar:active { transform: scale(0.99); }
.onb-pillar-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.dot-body { background: var(--pink); }
.dot-mind { background: var(--purple); }
.dot-spirit { background: var(--teal); }
.dot-journey { background: var(--lime); }
.onb-pillar-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.onb-pillar-text strong { font-size: 16px; font-weight: 700; }
.onb-pillar-text small { font-size: 12.5px; color: rgba(255,255,255,0.55); }
.onb-pillar-check {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  flex: none;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.onb-pillar.selected { border-color: var(--onb-accent); background: rgba(255,122,41,0.12); }
.onb-pillar.selected .onb-pillar-check { background: var(--onb-accent); border-color: var(--onb-accent); }
.onb-pillar.selected .onb-pillar-check::after {
  content: "";
  position: absolute;
  left: 8px; top: 4px;
  width: 6px; height: 11px;
  border: solid #0b0b0b;
  border-width: 0 2.4px 2.4px 0;
  transform: rotate(45deg);
}

/* ---- Pace (single-select) ---- */
.onb-paces { display: flex; flex-direction: column; gap: 10px; }
.onb-pace {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 15px 18px;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.1s ease;
}
.onb-pace:active { transform: scale(0.99); }
.onb-pace strong { font-size: 16px; font-weight: 700; }
.onb-pace small { font-size: 12.5px; color: rgba(255,255,255,0.55); }
.onb-pace.selected { border-color: var(--onb-accent); background: rgba(255,122,41,0.12); }
.onb-pace.selected small { color: rgba(255,255,255,0.75); }

/* ---- Ready step ---- */
.onb-ready-mark {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--onb-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
  box-shadow: 0 12px 34px rgba(255,122,41,0.4);
  animation: onb-pop 0.5s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes onb-pop { from { transform: scale(0); } to { transform: scale(1); } }
.onb-ready-name { font-family: "Alex Brush", cursive; text-transform: none; font-size: 58px; color: var(--onb-accent); }

/* ---- Actions ---- */
.onb-actions { padding-top: 18px; }
.onb-cta {
  width: 100%;
  background: var(--onb-accent);
  color: #0b0b0b;
  border: none;
  border-radius: 16px;
  padding: 17px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.2s ease, filter 0.2s ease;
}
.onb-cta:hover { filter: brightness(1.05); }
.onb-cta:active { transform: scale(0.98); }
.onb-cta:disabled { opacity: 0.4; cursor: default; filter: none; }

/* Replay-setup menu entry */
.menu-item-replay {
  margin-top: 14px;
  font-size: 13px !important;
  color: var(--muted) !important;
  opacity: 0.85;
}

/* Home category card highlighted when chosen as a focus pillar in setup */
.cat-card.cat-focused { box-shadow: 0 0 0 2px var(--accent-name), 0 6px 18px rgba(0,0,0,0.08); }

/* ---------- FEATURE TOUR (separate from first-run onboarding — a short,
   revisit-anytime overview of what's in the app) ---------- */
.tour-modal { position: fixed; inset: 0; z-index: 55; display: flex; align-items: center; justify-content: center; padding: 20px; }
.tour-modal.hidden { display: none; }
.tour-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.tour-card {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  background: var(--surface);
  border-radius: 20px;
  padding: 28px 22px 22px;
  text-align: center;
}
.tour-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--paper);
  border: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.tour-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 18px; }
.tour-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-border); }
.tour-dot.active { background: var(--pink); width: 16px; border-radius: 3px; }
.tour-body { min-height: 148px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tour-emoji { font-size: 34px; margin-bottom: 10px; }
.tour-title { margin: 0 0 8px; font-size: 19px; font-family: "Playfair Display", serif; color: var(--ink); }
.tour-copy { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.tour-actions { display: flex; gap: 10px; margin-top: 20px; }
.tour-actions #tour-back-btn[hidden] { display: none; }

/* ---- Setup: colour palette picker ---- */
.onb-swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px 12px;
  margin-top: 4px;
}
.onb-swatch {
  aspect-ratio: 1;
  border-radius: 50%;
  border: none;
  background: var(--sw);
  cursor: pointer;
  position: relative;
  padding: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  transition: transform 0.12s ease;
  outline: 2px solid transparent;
  outline-offset: 3px;
}
.onb-swatch:active { transform: scale(0.92); }
.onb-swatch.selected { outline-color: #fff; transform: scale(1.06); }
.onb-swatch.selected::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 7px; height: 13px;
  margin: -8px 0 0 -3px;
  border: solid rgba(0,0,0,0.55);
  border-width: 0 2.6px 2.6px 0;
  transform: rotate(45deg);
}

/* ---- Setup: email consent checkbox ---- */
.onb-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.onb-consent input { position: absolute; opacity: 0; width: 0; height: 0; }
.onb-consent-box {
  flex: none;
  width: 24px; height: 24px;
  margin-top: 1px;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.32);
  background: rgba(255,255,255,0.05);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.onb-consent input:checked + .onb-consent-box {
  background: var(--onb-accent);
  border-color: var(--onb-accent);
}
.onb-consent input:checked + .onb-consent-box::after {
  content: "";
  position: absolute;
  left: 8px; top: 4px;
  width: 6px; height: 11px;
  border: solid #0b0b0b;
  border-width: 0 2.4px 2.4px 0;
  transform: rotate(45deg);
}
.onb-consent input:focus-visible + .onb-consent-box { outline: 2px solid var(--onb-accent); outline-offset: 2px; }
.onb-consent-text {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,0.82);
  font-weight: 500;
}

/* ==================================================================
   GAMIFICATION FX — reward toast, confetti/sparkle burst, cosmic sparkles
   Pure-CSS, GPU-friendly transforms, all gated by prefers-reduced-motion
   in JS (nothing spawns when reduced motion is requested).
   ================================================================== */

/* Global reward toast — earned Coins/XP from anywhere in the app. Sits just
   above the studio toast's slot but styled to feel celebratory. */
.reward-toast {
  position: fixed; left: 50%; bottom: 78px; transform: translate(-50%, 12px) scale(0.96);
  background: linear-gradient(120deg, #F165DD, #9b8ce0);
  color: #fff; border-radius: 999px; padding: 10px 18px;
  font-size: 13px; font-weight: 800; white-space: nowrap; max-width: 92%;
  overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 8px 26px rgba(155, 140, 224, 0.45);
  opacity: 0; pointer-events: none; z-index: 90;
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.reward-toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.reward-toast-spark { display: inline-block; animation: reward-spark-twinkle 1.4s ease-in-out infinite; }
@keyframes reward-spark-twinkle {
  0%, 100% { transform: scale(0.9); opacity: 0.75; }
  50%      { transform: scale(1.2); opacity: 1; }
}

/* Full-screen confetti/sparkle overlay. Never intercepts taps. */
.fx-layer {
  position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 95;
}
.fx-bit {
  position: fixed; top: -24px; left: 0; will-change: transform, opacity;
  animation-name: fx-fall; animation-timing-function: cubic-bezier(0.4, 0.2, 0.5, 1);
  animation-fill-mode: forwards; opacity: 0;
}
.fx-confetti { border-radius: 2px; }
.fx-star {
  top: 0; line-height: 1; text-shadow: 0 0 6px rgba(201, 184, 255, 0.9);
  animation-name: fx-drift; animation-timing-function: ease-out;
}
@keyframes fx-fall {
  0%   { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  8%   { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx, 0), var(--ty, 100vh)) rotate(var(--spin, 360deg)); }
}
@keyframes fx-drift {
  0%   { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.4); }
  15%  { opacity: 1; transform: translate(0, 0) rotate(30deg) scale(1.15); }
  100% { opacity: 0; transform: translate(var(--tx, 0), var(--ty, 40vh)) rotate(var(--spin, 200deg)) scale(0.6); }
}

/* Ambient mystical sparkles seeded inside cosmic surfaces (Stars Align, etc.).
   Positioned absolutely within a relatively-positioned host. */
.cosmic-spark {
  position: absolute; pointer-events: none; color: #fff;
  text-shadow: 0 0 6px rgba(201, 184, 255, 0.95), 0 0 12px rgba(155, 140, 224, 0.6);
  opacity: 0; transform: scale(0.5);
  animation-name: cosmic-twinkle; animation-iteration-count: infinite;
  animation-timing-function: ease-in-out; z-index: 2;
}
@keyframes cosmic-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  40%      { opacity: 0.95; transform: scale(1.1) rotate(15deg); }
  60%      { opacity: 0.6; transform: scale(0.9) rotate(-10deg); }
}
/* Keep the banner's own text above the sparkle layer. */
.stars-banner > *:not(.cosmic-spark) { position: relative; z-index: 3; }

@media (prefers-reduced-motion: reduce) {
  .reward-toast-spark, .fx-bit, .cosmic-spark { animation: none !important; }
  .cosmic-spark { display: none; }
}

/* ============================================================
   THE CIRCLE · COMMUNITY
   Local-first community rooms. Core rooms are permanent; member-
   made rooms are temporary and fade once their last member leaves.
   Rooms support polls (voting) and a comments-off mode.
   ============================================================ */

/* Start-a-group button */
.comm-new-btn {
  width: 100%;
  border: 1.5px dashed color-mix(in srgb, var(--accent-name) 55%, var(--surface-border));
  background: color-mix(in srgb, var(--accent-name) 8%, var(--surface));
  color: var(--accent-name);
  border-radius: 16px;
  padding: 15px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 24px;
}
.comm-new-btn:active { transform: scale(0.98); }
.comm-new-plus { font-size: 18px; line-height: 1; }

.comm-section-title {
  font-family: "Playfair Display", serif;
  font-size: 18px;
  margin: 0 0 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.comm-section-sub {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.comm-group-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }

/* Group row card */
.comm-group-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.comm-group-card:active { transform: scale(0.99); }
.comm-group-card.has-unread { border-color: var(--pink); }
/* Unread pill on the right of a room card: a count, or "@" for a mention */
.comm-unread {
  flex-shrink: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--pink);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}
.comm-unread.is-mention { background: var(--pink-deep); }
.comm-group-avatar {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: var(--accent-soft, var(--pink-pale));
}
.comm-group-main { flex: 1; min-width: 0; overflow: hidden; }
.comm-group-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 7px;
}
.comm-group-blurb {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.comm-group-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.comm-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
}
.comm-badge-core { background: var(--lime-pale); color: #6c7a1a; }
.comm-badge-joined { background: color-mix(in srgb, var(--accent-name) 20%, white); color: var(--accent-name); }
.comm-badge-nocomments { background: var(--purple-pale); color: #5b4bb0; }
.comm-group-members::before { content: "● "; color: #4caf50; font-size: 9px; }

.comm-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 20px 10px;
  border: 1px dashed var(--surface-border);
  border-radius: 16px;
}

/* ---------- CHAT VIEW ---------- */
.comm-chat-header { padding-right: 56px; }
.comm-chat-header h1 { font-size: 22px; }
.comm-chat-menu-btn {
  position: absolute;
  top: calc(20px + var(--safe-top));
  right: 18px;
  background: rgba(255,255,255,0.12);
  color: var(--header-text);
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
/* Leave room above tabbar + fixed composer for the last message. */
.comm-chat-content { padding-bottom: 150px; }
.comm-thread { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }

.comm-day-divider {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  margin: 6px 0;
}

.comm-msg { display: flex; gap: 9px; max-width: 85%; }
.comm-msg-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  margin-top: 14px;
}
.comm-msg-body { min-width: 0; }
.comm-msg-author { font-size: 11.5px; font-weight: 700; color: var(--muted); margin: 0 0 3px 3px; }
.comm-bubble {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 4px 16px 16px 16px;
  padding: 10px 13px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink);
  word-wrap: break-word;
}
.comm-msg-time { font-size: 10px; color: var(--muted); margin: 4px 0 0 4px; }

/* @-mentions inside a message bubble */
.comm-mention { color: var(--pink-deep); font-weight: 600; }
.comm-mention.is-me {
  background: var(--pink-pale);
  color: var(--pink-deep);
  padding: 0 4px;
  border-radius: 5px;
}
.comm-msg.is-self .comm-mention { color: #fff; text-decoration: underline; }
.comm-msg.is-self .comm-mention.is-me { background: rgba(255,255,255,.28); color: #fff; }

/* Own messages: right-aligned, accent bubble */
.comm-msg.is-self { margin-left: auto; flex-direction: row-reverse; }
.comm-msg.is-self .comm-msg-author { display: none; }
.comm-msg.is-self .comm-bubble {
  background: var(--accent-name);
  border-color: var(--accent-name);
  color: #fff;
  border-radius: 16px 4px 16px 16px;
}
.comm-msg.is-self .comm-msg-time { text-align: right; }

/* Reactions (lightweight voting on advice) */
.comm-reacts { display: flex; gap: 6px; margin: 6px 0 0 3px; flex-wrap: wrap; }
.comm-react {
  border: 1px solid var(--surface-border);
  background: var(--surface);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.comm-react.is-on { background: color-mix(in srgb, var(--accent-name) 14%, white); border-color: var(--accent-name); color: var(--accent-name); font-weight: 700; }

/* ---------- POLL CARD ---------- */
.comm-poll {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 14px;
  max-width: 100%;
  width: 100%;
}
.comm-poll-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; color: var(--accent-name); text-transform: uppercase; }
.comm-poll-q { font-size: 14.5px; font-weight: 700; color: var(--ink); margin: 5px 0 12px; }
.comm-poll-opt {
  position: relative;
  border: 1px solid var(--surface-border);
  border-radius: 11px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  overflow: hidden;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--paper);
}
.comm-poll-opt-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: color-mix(in srgb, var(--accent-name) 16%, white);
  z-index: 0;
  transition: width 0.5s ease;
}
.comm-poll-opt.is-voted .comm-poll-opt-fill { background: color-mix(in srgb, var(--accent-name) 30%, white); }
.comm-poll-opt-label, .comm-poll-opt-pct { position: relative; z-index: 1; font-weight: 600; }
.comm-poll-opt-pct { color: var(--muted); font-size: 12px; }
.comm-poll.has-voted .comm-poll-opt { cursor: default; }
.comm-poll-total { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---------- COMPOSER ---------- */
.comm-composer, .comm-composer-off {
  position: fixed;
  bottom: calc(60px + env(safe-area-inset-bottom));
  left: 0; right: 0;
  max-width: 430px;
  margin: 0 auto;
  z-index: 9;
  background: var(--paper);
  border-top: 1px solid var(--surface-border);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.comm-composer-off { justify-content: center; color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: center; }

/* @-mention autocomplete popover — floats just above the composer */
.comm-mention-pop {
  position: absolute;
  left: 12px; right: 12px;
  bottom: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.comm-mention-pop.hidden { display: none; }
.comm-mention-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.comm-mention-opt:hover, .comm-mention-opt:active { background: var(--pink-pale); }
.comm-mention-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.comm-poll-btn {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 50%;
  width: 38px; height: 38px;
  font-size: 17px;
  cursor: pointer;
  flex-shrink: 0;
}
.comm-input {
  flex: 1;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 10px 15px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  min-width: 0;
}
.comm-input:focus { outline: none; border-color: var(--accent-name); }
.comm-send-btn {
  background: var(--accent-name);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.comm-send-btn:active { transform: scale(0.93); }

/* ---------- MODALS / SHEETS ---------- */
.comm-modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; }
.comm-modal.hidden { display: none; }
.comm-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.comm-modal-card {
  position: relative;
  z-index: 1;
  width: calc(100% - 40px);
  max-width: 390px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 22px;
  padding: 22px;
}
.comm-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.comm-modal-head h3 { margin: 0; font-family: "Playfair Display", serif; font-size: 21px; }
.comm-modal-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 4px 0 18px; }
.comm-field-label { display: block; font-size: 12px; font-weight: 700; color: var(--ink); margin: 14px 0 7px; }
.comm-field-optional { color: var(--muted); font-weight: 500; }
.comm-modal-input { width: 100%; box-sizing: border-box; }

.comm-emoji-row { display: flex; gap: 8px; flex-wrap: wrap; }
.comm-emoji-opt {
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--surface-border);
  background: var(--surface);
  font-size: 20px;
  cursor: pointer;
}
.comm-emoji-opt.is-sel { border-color: var(--accent-name); background: color-mix(in srgb, var(--accent-name) 12%, white); }

.comm-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 13px 15px;
  margin-top: 18px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.comm-toggle-text strong { display: block; font-size: 13.5px; color: var(--ink); }
.comm-toggle-text small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.comm-toggle-switch {
  width: 44px; height: 26px;
  border-radius: 999px;
  background: var(--surface-border);
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}
.comm-toggle-switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.comm-toggle-row[data-on="true"] .comm-toggle-switch { background: var(--accent-name); }
.comm-toggle-row[data-on="true"] .comm-toggle-switch::after { transform: translateX(18px); }

.comm-create-confirm { width: 100%; margin-top: 22px; padding: 13px; font-size: 14px; }

.comm-add-option {
  background: none;
  border: none;
  color: var(--accent-name);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 0;
  margin-top: 4px;
}
.comm-poll-option-input { margin-bottom: 8px; }

/* Bottom sheet (group options) */
.comm-modal .comm-sheet {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 1;
  max-width: 430px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  padding: 10px 14px calc(20px + env(safe-area-inset-bottom));
}
.comm-sheet-grab { width: 40px; height: 4px; border-radius: 999px; background: var(--surface-border); margin: 4px auto 10px; }
.comm-sheet-item {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  padding: 15px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  font-family: inherit;
  cursor: pointer;
  margin-bottom: 8px;
  text-align: center;
}
.comm-sheet-danger { color: #d14343; }
.comm-sheet-cancel { color: var(--muted); background: none; border: none; }

/* Dark-header theme parity for chat menu button */
html.theme-header-light .comm-chat-menu-btn { background: rgba(0,0,0,0.06); color: #111; }

/* ---- Setup: email subscribe status line ---- */
.onb-status {
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 600;
  margin: 12px 0 0;
  min-height: 18px;
}
.onb-status.ok { color: #b6ffce; }
.onb-status.err { color: #ffb3c7; }
.onb-status.pending { color: rgba(255,255,255,0.6); }

/* ---- Setup: "skip setup / dive in" text link (welcome step only) ---- */
.onb-textlink {
  display: block;
  width: 100%;
  margin-top: 14px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  padding: 6px;
  transition: color 0.2s ease;
}
.onb-textlink:hover { color: rgba(255,255,255,0.85); }
.onb-textlink[hidden] { display: none; }

/* ==================== INTERACTIVE HOUSES WHEEL (Stars Align) ==================== */
.astro-wheel-card {
  position: relative;
  border: 1.5px solid var(--brand-black);
  border-radius: 20px;
  padding: 14px 14px 8px;
  margin-bottom: 20px;
  overflow: hidden;
}
.astro-wheel-svg { display: block; width: 100%; height: auto; font-family: inherit; }
.astro-wheel-svg text { font-family: inherit; }
.astro-wheel-hint { text-align: center; color: var(--cosmic-text-muted); font-size: 12px; margin: 8px 0 4px; }

.astro-ring { fill: none; stroke: rgba(255,143,240,0.32); stroke-width: 1; }
.astro-ring-out { stroke: rgba(255,143,240,0.65); stroke-width: 1.5; }
.astro-ring-core { stroke: rgba(155,249,255,0.4); }
.astro-wedge { fill: rgba(255,79,216,0.05); stroke: rgba(255,143,240,0.16); stroke-width: 0.5; cursor: pointer; transition: fill 0.15s ease; }
.astro-wedge-filled { fill: rgba(226,71,240,0.16); }
.astro-wedge-active { fill: rgba(255,79,216,0.34); stroke: var(--cosmic-pink); stroke-width: 1.5; }
.astro-spoke { stroke: rgba(255,143,240,0.2); stroke-width: 0.75; pointer-events: none; }
.astro-num { fill: #fff; font-size: 11px; font-weight: 700; text-anchor: middle; dominant-baseline: central; pointer-events: none; opacity: 0.78; }
.astro-sign-glyph { fill: var(--cosmic-cyan); font-size: 17px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.astro-sign-empty { fill: rgba(255,255,255,0.22); pointer-events: none; }
.astro-planet-glyph { fill: var(--cosmic-gold); font-size: 11px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.astro-axis circle { fill: #170a1c; stroke: var(--cosmic-pink); stroke-width: 1.5; }
.astro-axis text { fill: #fff; font-size: 8px; font-weight: 800; text-anchor: middle; dominant-baseline: central; letter-spacing: 0.02em; pointer-events: none; }
.astro-moon path { fill: #f4c8ff; opacity: 0.92; }
.astro-moon-star { fill: #fff; }

.astro-editor { background: linear-gradient(160deg, #1a0f22, #0d0712); border: 1.5px solid var(--cosmic-pink); border-radius: 16px; padding: 14px; margin-bottom: 22px; box-shadow: 0 0 24px rgba(255,79,216,0.18); }
.astro-editor.hidden { display: none; }
.astro-editor-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.astro-editor-titles { display: flex; flex-direction: column; }
.astro-editor-house { color: #fff; font-weight: 800; font-size: 15px; }
.astro-editor-sub { color: var(--cosmic-text-muted); font-size: 12px; margin-top: 1px; }
.astro-editor-close { flex: 0 0 auto; background: var(--cosmic-pink); color: #fff; border: none; border-radius: 20px; padding: 6px 15px; font-family: inherit; font-weight: 700; font-size: 12px; cursor: pointer; }
.astro-editor-close:active { transform: scale(0.96); }
.astro-editor-label { display: block; color: var(--cosmic-text-muted); font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin: 12px 0 8px; }
.astro-glyph-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.astro-planet-row { grid-template-columns: repeat(5, 1fr); }
.astro-glyph-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; background: rgba(255,255,255,0.05); border: 1.5px solid rgba(255,143,240,0.25); border-radius: 10px; color: #fff; cursor: pointer; font-family: inherit; }
.astro-glyph-btn:active { transform: scale(0.95); }
.astro-glyph-sym { font-size: 16px; line-height: 1; }
.astro-glyph-name { font-size: 8.5px; color: var(--cosmic-text-muted); letter-spacing: 0.02em; }
.astro-glyph-on { background: rgba(255,79,216,0.3); border-color: var(--cosmic-pink); box-shadow: 0 0 10px rgba(255,79,216,0.4); }
.astro-glyph-on .astro-glyph-name { color: #fff; }
.astro-glyph-elsewhere { opacity: 0.5; }
.astro-glyph-elsehouse { position: absolute; top: -6px; right: -5px; background: var(--cosmic-cyan); color: #08131a; font-size: 8px; font-weight: 800; border-radius: 8px; padding: 1px 4px; line-height: 1.3; }

.astro-placements { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.astro-place-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--surface); border: 1.5px solid var(--brand-black); border-radius: 12px; padding: 9px 11px; cursor: pointer; font-family: inherit; }
.astro-place-row:active { transform: scale(0.99); }
.astro-place-active { border-color: var(--cosmic-pink); box-shadow: 0 0 0 3px rgba(255,79,216,0.15); }
.astro-place-num { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(155deg, var(--cosmic-pink), #ff9de3); }
.astro-place-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.astro-place-body strong { font-size: 12.5px; color: var(--ink); }
.astro-place-body small { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.astro-place-tags { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; max-width: 46%; }
.astro-place-empty { font-size: 11px; color: var(--muted); font-style: italic; }
.astro-chip { font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 20px; white-space: nowrap; }
.astro-chip-sign { background: var(--purple-pale); color: #6a3f8f; }
.astro-chip-planet { background: var(--teal-pale); color: #1f6b78; }

/* ---- Poster-faithful wheel additions ---- */
.astro-wheel-card { padding: 10px 6px 6px; margin-left: -12px; margin-right: -12px; }
.astro-ring-num { stroke: rgba(255,143,240,0.4); }
.astro-house-icon { fill: none; stroke: #ff96ef; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.astro-house-icon .astro-icon-glyph { fill: #ff96ef; stroke: none; font-size: 14px; font-weight: 800; text-anchor: middle; dominant-baseline: central; }
.astro-hname { fill: #f6c9ff; font-size: 8.5px; font-style: italic; font-weight: 600; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.astro-theme { fill: #e4c2f2; font-size: 7.5px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.astro-num { font-size: 14px; opacity: 0.9; }
.astro-box { fill: rgba(180,120,220,0.16); stroke: rgba(255,143,240,0.35); stroke-width: 1; pointer-events: none; }
.astro-box-filled { fill: rgba(226,71,240,0.24); stroke: var(--cosmic-pink); }
.astro-box-sign { fill: var(--cosmic-cyan); font-size: 13px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.astro-box-planet { fill: var(--cosmic-gold); font-size: 9px; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.astro-core-star { fill: #fff; opacity: 0.95; }
.astro-axis circle { r: 15px; }

/* Honeypot: off-screen bot trap on the newsletter step (not display:none, so
   bots that skip hidden fields still fill it). Real users never see it. */
.onb-hp {
  position: absolute !important;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ===================== Mood check-in grid ===================== */
/* The dimension check-ins moved from a 5-across scale to a 12-mood grid; this
   modifier only lands on those four containers (added in JS), so the café and
   sleep pickers that also use .checkin-options keep their original flex row. */
.checkin-options.checkin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.checkin-grid .checkin-option { padding: 9px 2px; }
.checkin-grid .checkin-emoji { font-size: 20px; }
.checkin-grid .checkin-option span:last-child { font-size: 9px; }

/* ===================== Mood Trends ===================== */
/* The app has no global .hidden rule (it's always component-scoped), so the
   empty state and the body need their own hidden rules to toggle correctly. */
.mt-empty.hidden,
#mt-body.hidden { display: none; }

.mt-range { display: flex; gap: 8px; }
.mt-range-pill {
  flex: 1;
  padding: 9px 0;
  border: 1.5px solid var(--purple-pale);
  background: var(--paper);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.mt-range-pill:active { transform: scale(0.96); }
.mt-range-pill.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.mt-summary { display: flex; gap: 8px; margin-top: 18px; }
.mt-stat {
  flex: 1;
  background: var(--paper);
  border: 1px solid var(--purple-pale);
  border-radius: 14px;
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.mt-stat strong { font-size: 20px; line-height: 1; color: var(--ink); }
.mt-stat span { font-size: 10px; color: var(--muted); font-weight: 600; }

.mt-bars { display: flex; flex-direction: column; gap: 11px; }
.mt-bar-row { display: flex; align-items: center; gap: 10px; }
.mt-bar-emoji { font-size: 18px; width: 22px; text-align: center; }
.mt-bar-label { font-size: 12px; font-weight: 600; width: 76px; color: var(--ink); }
.mt-bar-track {
  flex: 1;
  height: 10px;
  background: var(--purple-pale);
  border-radius: 999px;
  overflow: hidden;
}
.mt-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #b7a9ec, var(--purple));
}
.mt-bar-count { font-size: 12px; font-weight: 700; color: var(--muted); width: 22px; text-align: right; }

.mt-recent { display: flex; flex-direction: column; gap: 8px; }
.mt-recent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--purple-pale);
  border-radius: 12px;
  padding: 10px 12px;
}
.mt-recent-emoji { font-size: 20px; }
.mt-recent-main { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.mt-recent-main strong { font-size: 13px; color: var(--ink); }
.mt-recent-main small { font-size: 11px; color: var(--muted); }
.mt-recent-date { font-size: 11px; color: var(--muted); font-weight: 600; }

.mt-empty { text-align: center; padding: 48px 24px; }
.mt-empty-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.mt-empty h3 { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
.mt-empty p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Local "+points" float rising from a tapped ritual tile (see floatReward). */
.point-float {
  position: fixed; z-index: 96; pointer-events: none;
  font-size: 14px; font-weight: 800; color: #F165DD;
  text-shadow: 0 1px 2px rgba(0,0,0,0.18);
  white-space: nowrap; will-change: transform, opacity;
  animation: point-float-rise 1.15s ease-out forwards;
}
@keyframes point-float-rise {
  0%   { opacity: 0; transform: translateY(4px) scale(0.8); }
  20%  { opacity: 1; transform: translateY(-4px) scale(1.05); }
  100% { opacity: 0; transform: translateY(-34px) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .point-float { display: none; } }

/* ---- Custom icon art (replaces glyphs when files exist in assets/astro) ---- */
.astro-glyph-img { width: 22px; height: 22px; object-fit: contain; display: block; }
.astro-chip-img { width: 14px; height: 14px; object-fit: contain; display: inline-block; vertical-align: -2px; }
.astro-box-img { pointer-events: none; }

/* ---------- Achievements / badges grid (Profile) ---------- */
.badge-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-top: 12px;
}
.badge {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 4px; padding: 14px 8px 12px; border-radius: 16px;
  background: var(--card, #fff); border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.badge-icon {
  font-size: 26px; line-height: 1;
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; margin-bottom: 2px;
}
.badge.earned .badge-icon {
  background: linear-gradient(135deg, #fbdce9, #e4dff8);
  box-shadow: 0 0 0 1px rgba(241, 101, 221, 0.25), 0 4px 12px rgba(155, 140, 224, 0.25);
}
.badge.locked { opacity: 0.55; }
.badge.locked .badge-icon { background: rgba(0,0,0,0.05); filter: grayscale(1); }
.badge-title { font-size: 11.5px; font-weight: 800; color: var(--ink, #1a1a1a); }
.badge.locked .badge-title { color: var(--muted, #8a8a8a); }
.badge-desc { font-size: 10px; font-weight: 600; color: var(--muted, #9a9a9a); line-height: 1.3; }

:root[data-theme="dark"] .badge {
  background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08);
}
:root[data-theme="dark"] .badge.earned .badge-icon {
  background: linear-gradient(135deg, #3d2233, #2b2440);
}
:root[data-theme="dark"] .badge.locked .badge-icon { background: rgba(255,255,255,0.06); }
:root[data-theme="dark"] .badge-title { color: #f0eef5; }

/* ---------- Style the Shelf (rewards catalog) ---------- */
.shelf-wallet {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--muted, #8a8a8a);
  margin: 4px 0 14px;
}
.shelf-wallet-coin { font-size: 16px; }
.shelf-wallet strong { color: #F165DD; font-size: 15px; }

.shelf-stage {
  position: relative; border-radius: 20px; padding: 22px 18px 0;
  background: linear-gradient(160deg, #fbdce9, #e4dff8);
  min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.shelf-scene {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center;
  gap: 6px 12px; min-height: 60px; position: relative; z-index: 2;
}
.shelf-piece {
  font-size: 40px; line-height: 1; background: none; border: none; cursor: pointer;
  padding: 0 2px; filter: drop-shadow(0 4px 4px rgba(0,0,0,0.12));
  transition: transform 0.15s ease;
}
.shelf-piece:hover, .shelf-piece:active { transform: translateY(-3px) scale(1.06); }
.shelf-plank {
  height: 14px; margin: 4px -18px 0; background: linear-gradient(#c98a5e, #a56a41);
  box-shadow: 0 6px 10px rgba(0,0,0,0.18); position: relative; z-index: 1;
}
.shelf-empty-hint {
  position: absolute; inset: 0; margin: auto; height: fit-content; text-align: center;
  padding: 0 28px; font-size: 12.5px; font-weight: 600; color: rgba(90,60,80,0.7);
  display: flex; align-items: center; justify-content: center; z-index: 0;
}

.shelf-catalog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.shelf-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 6px 10px; border-radius: 16px; cursor: pointer;
  background: var(--card, #fff); border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04); text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.shelf-item:active { transform: scale(0.97); }
.shelf-item.placed { border-color: rgba(241,101,221,0.5); box-shadow: 0 0 0 1px rgba(241,101,221,0.35); }
.shelf-item.locked { opacity: 0.9; }
.shelf-item.locked .shelf-item-emoji { filter: grayscale(0.7); opacity: 0.7; }
.shelf-item-emoji { font-size: 30px; line-height: 1; }
.shelf-item-name { font-size: 11.5px; font-weight: 800; color: var(--ink, #1a1a1a); }
.shelf-tag { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.shelf-tag.price { background: #f3edff; color: #7a5bd6; }
.shelf-tag.place { background: #fbe4f4; color: #d13ba8; }
.shelf-tag.on { background: #F165DD; color: #fff; }

.shelf-toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 12px);
  background: #0b0b0b; color: #fff; border-radius: 999px; padding: 9px 16px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap; max-width: 90%;
  opacity: 0; pointer-events: none; z-index: 92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.shelf-toast.show { opacity: 1; transform: translate(-50%, 0); }

:root[data-theme="dark"] .shelf-item { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
:root[data-theme="dark"] .shelf-item-name { color: #f0eef5; }
:root[data-theme="dark"] .shelf-tag.price { background: #2b2440; color: #c9b8ff; }
