/* Money Magnet — Zen & Abundance · v=20260920mm6 */
:root {
  --bg: #faf3e8;
  --bg2: #f3e6d4;
  --card: rgba(255, 253, 248, 0.82);
  --card-solid: #fffdf8;
  --ink: #4a3f35;
  --muted: #9c8d7a;
  --gold: #d4af37;
  --gold-deep: #b8922a;
  --gold-soft: rgba(212, 175, 55, 0.18);
  --champagne: #f7e7c3;
  --border: rgba(212, 175, 55, 0.28);
  --shadow: rgba(158, 127, 84, 0.14);
  --danger: #b85c4a;
  --radius: 22px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
h1, h2, h3, .serif { font-family: "Cormorant Garamond", Georgia, "Noto Serif TC", serif; font-weight: 500; }

.paper-glow, .paper-wash {
  pointer-events: none; position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 78% 8%, rgba(212,175,55,.16), transparent 42%),
    radial-gradient(ellipse at 12% 70%, rgba(247,231,195,.45), transparent 40%),
    linear-gradient(165deg, #faf3e8 0%, #f6ead9 55%, #f3e2cc 100%);
}
.paper-wash { position: absolute; opacity: .9; }

.glass-card, .feature-card, .license-card, .settings-card, .practice-card, .stat-pill {
  border: 1px solid var(--border);
  background: var(--card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 48px var(--shadow);
  border-radius: var(--radius);
}

.section-label {
  margin: 0 0 8px;
  color: var(--gold-deep);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--gold-deep); font-size: 12px; font-weight: 700; letter-spacing: .08em;
  margin: 0 0 16px;
}

.primary-button, .ghost-button, .danger-button, .preview-button, .secondary-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; cursor: pointer; text-decoration: none; border: 0;
  padding: 12px 20px; font-weight: 700; font-size: 14px; transition: .18s ease;
}
.primary-button {
  background: linear-gradient(135deg, #e8c96a, var(--gold));
  color: #3d2c12 !important;
  box-shadow: 0 10px 28px rgba(212,175,55,.35);
}
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.03); }
.ghost-button, .preview-button {
  background: rgba(255,253,248,.7);
  border: 1px solid var(--border);
  color: var(--ink);
}
.danger-button {
  background: rgba(184,92,74,.1);
  border: 1px solid rgba(184,92,74,.35);
  color: var(--danger);
}
.secondary-cta {
  background: transparent; color: var(--gold-deep); font-weight: 700;
  border-bottom: 1px solid rgba(212,175,55,.4); border-radius: 0; padding: 4px 0;
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink); text-decoration: none;
}
.brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, #fffdf8, var(--champagne));
  color: var(--gold-deep); font-size: 18px;
}
.brand strong { display: block; font: 600 16px "Cormorant Garamond", Georgia, serif; letter-spacing: .04em; }
.brand small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }

.language-select {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-solid);
  padding: 8px 28px 8px 12px;
  font-size: 12px;
  cursor: pointer;
}
.language-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }

/* —— Landing —— */
.license-screen { position: relative; z-index: 1; min-height: 100vh; }
.landing-screen { display: block; padding: 0 0 calc(40px + var(--safe-bottom)); overflow: auto; }
.landing-topbar {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: sticky; top: 0; z-index: 30;
  padding-top: var(--safe-top);
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
}
.landing-nav { display: flex; gap: 18px; }
.landing-nav a { color: var(--muted); font-size: 13px; text-decoration: none; }
.landing-nav a:hover { color: var(--ink); }
.landing-top-actions { display: flex; align-items: center; gap: 10px; }
.landing-buy-top { padding: 10px 14px; font-size: 12px; }
.landing-shell { width: min(1100px, calc(100% - 32px)); margin: 0 auto; position: relative; z-index: 2; }
.landing-hero { padding: 56px 0 36px; max-width: 820px; }
.landing-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.15; margin: 0 0 18px; letter-spacing: -.02em;
}
.landing-hero h1 em { color: var(--gold-deep); font-style: italic; }
.landing-lead { color: var(--muted); font-size: 16px; line-height: 1.85; margin: 0 0 24px; }
.landing-cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 22px; }
.landing-trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.landing-trust li {
  border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px;
  background: rgba(255,253,248,.75); color: var(--gold-deep); font-size: 12px; font-weight: 600;
}
.landing-features, .landing-usp { padding: 40px 0 16px; }
.landing-features h2, .landing-usp h2, .landing-unlock h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 20px;
}
.feature-grid, .usp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feature-card { padding: 22px; }
.feature-visual {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px;
  margin-bottom: 14px; background: var(--gold-soft); color: var(--gold-deep);
  font: 700 16px "Cormorant Garamond", Georgia, serif;
}
.feature-visual.goldish { background: linear-gradient(145deg, #fff6df, #f0d78a); }
.feature-card h3 { margin: 0 0 8px; font-size: 20px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.usp-grid article {
  padding: 22px; border: 1px solid var(--border); border-radius: 20px;
  background: rgba(255,253,248,.65);
}
.usp-grid h3 { margin: 0 0 8px; color: var(--gold-deep); font-size: 17px; }
.usp-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }

.landing-unlock { padding: 36px 0 20px; display: grid; place-items: center; }
.license-card {
  width: min(520px, 100%); text-align: center; padding: 36px 28px; position: relative;
}
.license-mark {
  width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  background: linear-gradient(145deg, #fffdf8, var(--champagne));
  color: var(--gold); font-size: 28px;
}
.license-card h2 { font-size: 28px; margin: 0; }
.license-tagline { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.sales-strip {
  margin: 20px 0 12px; padding: 16px; border-radius: 18px;
  border: 1px solid var(--border); background: var(--gold-soft); text-align: left;
}
.sales-price { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sales-price strong { font: 500 28px "Cormorant Garamond", Georgia, serif; color: var(--gold-deep); }
.sales-price span { color: var(--muted); font-size: 12px; }
.sales-buy { width: 100%; }
.license-card form { text-align: left; margin-top: 18px; }
.license-card label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.license-card input {
  width: 100%; margin-bottom: 12px; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff; outline: 0;
}
.license-card input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.license-card .primary-button { width: 100%; }
.license-message { min-height: 20px; margin: 12px 0 0; color: var(--gold-deep); font-size: 13px; }
.license-message.error { color: var(--danger); }
.preview-button { margin-top: 10px; width: 100%; }
.purchase-link {
  display: inline-block; margin-top: 12px; color: var(--gold-deep); font-size: 13px;
  text-decoration: none; border-bottom: 1px solid rgba(212,175,55,.35);
}
.license-help {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; text-align: left;
}
.license-help a { color: var(--gold-deep); }
.landing-footer {
  padding: 28px 0 40px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 13px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.landing-footer a { color: var(--gold-deep); }

@media (max-width: 820px) {
  .landing-nav { display: none; }
  .feature-grid, .usp-grid { grid-template-columns: 1fr; }
  .landing-top-actions .language-label span { display: none; }
  .landing-preview-top { display: none; }
  .landing-hero { padding-top: 32px; }
}

/* —— App shell —— */
.app-shell {
  position: relative; z-index: 1; min-height: 100vh;
  padding-bottom: calc(28px + var(--safe-bottom));
}
.topbar {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: sticky; top: 0; z-index: 40;
  padding-top: var(--safe-top);
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
}
.desktop-nav { display: flex; gap: 22px; }
.desktop-nav a {
  color: var(--muted); text-decoration: none; font-size: 13px; letter-spacing: .04em;
  padding: 28px 2px 22px; border-bottom: 2px solid transparent;
}
.desktop-nav a:hover { color: var(--ink); border-color: var(--gold); }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.edition-pill {
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px;
  background: var(--gold-soft); color: var(--gold-deep); font-size: 11px; font-weight: 700;
}

.trial-banner {
  width: min(1100px, calc(100% - 32px));
  margin: 12px auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px; border-radius: 16px;
  border: 1px solid rgba(184,92,74,.28);
  background: linear-gradient(120deg, rgba(255,240,230,.95), rgba(255,253,248,.9));
  position: sticky; top: calc(76px + var(--safe-top)); z-index: 35;
}
.trial-banner-title { display: block; font-size: 14px; }
.trial-banner p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.trial-banner-btn {
  white-space: nowrap; text-decoration: none; font-weight: 700; font-size: 13px;
  padding: 10px 14px; border-radius: 999px;
  background: linear-gradient(135deg, #e8c96a, var(--gold)); color: #3d2c12;
}

.app-scroll { width: min(920px, calc(100% - 32px)); margin: 0 auto; position: relative; z-index: 2; }
.stats-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  padding: 22px 0 8px;
}
.stat-pill { padding: 16px 18px; text-align: center; }
.stat-pill span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.stat-pill strong { font: 500 28px "Cormorant Garamond", Georgia, serif; color: var(--gold-deep); }

.panel-section { padding: 18px 0 28px; scroll-margin-top: 96px; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 18px;
  margin-bottom: 18px;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin: 0; }
.section-lead { margin: 8px 0 0; color: var(--muted); font-size: 14px; max-width: 46ch; }

.ring-wrap { position: relative; width: 96px; height: 96px; flex: 0 0 96px; }
.progress-ring-svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(212,175,55,.18); stroke-width: 8; }
.ring-fg {
  fill: none; stroke: var(--gold); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 251.2; stroke-dashoffset: 251.2;
  transition: stroke-dashoffset .55s ease;
}
.ring-label {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
}
.ring-label strong { font: 500 20px "Cormorant Garamond", Georgia, serif; color: var(--gold-deep); }
.ring-label small { color: var(--muted); font-size: 11px; }

.practice-list { display: grid; gap: 12px; }
.practice-card {
  padding: 18px 18px 16px; display: grid; gap: 10px;
  transition: border-color .25s, box-shadow .25s, transform .2s;
}
.practice-card.done {
  border-color: rgba(212,175,55,.55);
  box-shadow: 0 14px 36px rgba(212,175,55,.18), inset 0 0 0 1px rgba(212,175,55,.12);
}
.practice-head {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer; user-select: none;
}
.practice-check {
  appearance: none; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--border); background: #fff; flex: 0 0 26px; margin-top: 2px;
  display: grid; place-items: center; transition: .25s ease; cursor: pointer;
}
.practice-check:checked {
  background: var(--gold); border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
  animation: checkPop .35s ease;
}
.practice-check:checked::after {
  content: ""; width: 7px; height: 12px; border: solid #3d2c12;
  border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px);
}
@keyframes checkPop {
  0% { transform: scale(.7); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.practice-emoji { font-size: 22px; line-height: 1; }
.practice-title { display: block; font-weight: 700; font-size: 16px; }
.practice-prompt { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.practice-challenge {
  margin: 0; padding: 10px 12px; border-radius: 12px;
  background: var(--gold-soft); color: var(--ink); font-size: 13px;
}
.practice-note label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.practice-note input {
  width: 100%; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: #fff; outline: 0;
}
.practice-note input:focus { border-color: var(--gold); }

/* Journey */
.milestones {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px;
}
.milestone {
  padding: 14px 12px; text-align: center; border-radius: 16px;
  border: 1px dashed var(--border); background: rgba(255,253,248,.55); opacity: .55;
}
.milestone.earned {
  opacity: 1; border-style: solid;
  background: linear-gradient(160deg, #fffdf8, #f7e7c3);
  box-shadow: 0 10px 28px var(--shadow);
}
.milestone strong { display: block; font: 500 18px "Cormorant Garamond", Georgia, serif; color: var(--gold-deep); }
.milestone span { color: var(--muted); font-size: 11px; }
.journey-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px;
}
.journey-day {
  aspect-ratio: 1; border-radius: 14px;
  display: grid; place-items: center; gap: 2px;
  background: rgba(255,253,248,.55); border: 1px solid rgba(156,141,122,.2);
  color: var(--muted); font-size: 11px; position: relative;
}
.journey-day strong { font: 600 14px "Cormorant Garamond", Georgia, serif; }
.journey-day.completed {
  background: linear-gradient(145deg, #e8c96a, var(--gold));
  border-color: transparent; color: #3d2c12;
  box-shadow: 0 8px 18px rgba(212,175,55,.28);
}
.journey-day.today {
  outline: 2px solid var(--gold);
  animation: pulseToday 1.8s ease-in-out infinite;
  background: #fffdf8; color: var(--gold-deep);
}
.journey-day.future { opacity: .45; }
.journey-day.partial {
  background: rgba(212,175,55,.12); border-color: rgba(212,175,55,.4); color: var(--ink);
}
@keyframes pulseToday {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,.35); }
  50% { box-shadow: 0 0 0 8px rgba(212,175,55,0); }
}

/* Night section + overlay */
.night-controls { display: flex; flex-wrap: wrap; gap: 10px; }
.night-hint { color: var(--muted); font-size: 13px; margin-top: 14px; }
.night-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse at 50% 20%, #2a2118, #120e0a 70%);
  color: #f7e7c3;
  display: grid; place-items: center;
  padding: 24px;
}
.night-overlay .night-affirmation {
  max-width: 28ch; text-align: center;
  font: 500 clamp(1.6rem, 5vw, 2.4rem)/1.45 "Cormorant Garamond", Georgia, serif;
  opacity: 0; transition: opacity 1.4s ease;
}
.night-overlay .night-affirmation.show { opacity: 1; }
.night-exit, .night-ambient {
  position: absolute; top: calc(16px + var(--safe-top));
  border: 1px solid rgba(247,231,195,.28); background: rgba(255,255,255,.06);
  color: #f7e7c3; border-radius: 999px; padding: 10px 14px; cursor: pointer; font-size: 12px;
}
.night-exit { left: 16px; }
.night-ambient { right: 16px; }

/* Settings */
.settings-card { padding: 22px; display: grid; gap: 16px; }
.settings-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.settings-status { min-height: 18px; margin: 0; color: var(--gold-deep); font-size: 13px; }

/* Modal / celebrate */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(58, 45, 32, .45);
  display: grid; place-items: center; padding: 20px;
}
.modal {
  width: min(420px, 100%); padding: 28px 22px; text-align: center; position: relative; overflow: hidden;
}
.modal h2 { margin: 0 0 8px; font-size: 28px; }
.modal > p { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.affirmation-card {
  border-radius: 18px; padding: 28px 20px;
  background: linear-gradient(160deg, #fffdf8, #f7e7c3 70%, #efd9a0);
  border: 1px solid rgba(212,175,55,.35);
  margin-bottom: 16px;
}
.affirmation-eyebrow {
  margin: 0 0 12px; letter-spacing: .2em; text-transform: uppercase;
  font-size: 10px; color: var(--gold-deep); font-weight: 700;
}
.affirmation-text {
  margin: 0; font: 500 22px/1.45 "Cormorant Garamond", Georgia, serif; color: #3d2c12;
}
.affirmation-date { margin: 16px 0 0; color: #8a7350; font-size: 12px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.confetti-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
}

.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom));
  transform: translateX(-50%);
  z-index: 120; padding: 12px 18px; border-radius: 999px;
  background: #3d2c12; color: #f7e7c3; font-size: 13px;
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

/* —— Mobile theme-card home —— */
.home-hub, .panel-toolbar { display: none; }
.home-hub-intro { margin-bottom: 16px; }
.home-hub-intro h2 { margin: 0; font-size: 1.7rem; }
.home-hub-lead { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.theme-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.theme-card {
  appearance: none; border: 1px solid rgba(255,255,255,.35);
  border-radius: 22px; min-height: 118px; padding: 16px;
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  color: #3d2c12; box-shadow: 0 14px 32px var(--shadow);
  transition: transform .15s ease, filter .15s ease;
}
.theme-card:active { transform: scale(.98); }
.theme-card-wide { grid-column: 1 / -1; min-height: 100px; }
.theme-card-icon {
  width: 44px; height: 44px; border-radius: 14px; flex: 0 0 44px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.35); font-weight: 700; font-size: 16px;
}
.theme-card-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.theme-card-body strong { font-size: 16px; }
.theme-card-body small { color: rgba(61,44,18,.72); font-size: 12px; line-height: 1.35; }
.theme-card-chevron { font-size: 24px; opacity: .7; }
.theme-card--today, .theme-card[data-c="today"] {
  background: linear-gradient(145deg, #fff8ea, #f0d78a 55%, #e4c05a);
}
.theme-card--journey, .theme-card[data-c="journey"] {
  background: linear-gradient(145deg, #fffdf8, #f3e0c0 50%, #e8c99a);
}
.theme-card--night, .theme-card[data-c="night"] {
  background: linear-gradient(145deg, #3a2f48, #2a2438 50%, #1c1828);
  color: #f7e7c3; border-color: rgba(247,231,195,.2);
}
.theme-card--night .theme-card-body small { color: rgba(247,231,195,.72); }
.theme-card--night .theme-card-icon { background: rgba(247,231,195,.12); color: #f0d78a; }
.theme-card--settings, .theme-card[data-c="settings"] {
  background: linear-gradient(145deg, #fffdf8, #ebe0d0 60%, #d9cbb6);
}

.panel-toolbar {
  width: min(920px, calc(100% - 32px));
  margin: 10px auto 0;
  align-items: center; gap: 12px;
  position: sticky; top: calc(72px + var(--safe-top)); z-index: 38;
  padding: 10px 12px; border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px); border: 1px solid var(--border);
}
.panel-back {
  border: 0; background: transparent; color: var(--gold-deep);
  font-weight: 700; cursor: pointer; padding: 6px 4px; font-size: 14px;
}
.panel-toolbar strong { font-size: 14px; }

@media (max-width: 820px) {
  body.mobile-card-mode .home-hub { display: block; width: min(920px, calc(100% - 32px)); margin: 18px auto 0; position: relative; z-index: 2; }
  body.mobile-card-mode .desktop-nav { display: none; }
  body.mobile-card-mode .topbar { grid-template-columns: 1fr auto; min-height: 64px; }
  body.mobile-card-mode .edition-pill { display: none; }
  body.mobile-card-mode:not([data-active-panel]) .app-scroll { display: none; }
  body.mobile-card-mode[data-active-panel] .home-hub { display: none; }
  body.mobile-card-mode[data-active-panel] .panel-toolbar { display: flex; }
  body.mobile-card-mode[data-active-panel] .app-scroll { display: block; }
  body.mobile-card-mode[data-active-panel] .panel-section { display: none; padding-top: 8px; }
  body.mobile-card-mode[data-active-panel="panel-today"] .panel-section[data-panel="panel-today"],
  body.mobile-card-mode[data-active-panel="panel-journey"] .panel-section[data-panel="panel-journey"],
  body.mobile-card-mode[data-active-panel="panel-flip"] .panel-section[data-panel="panel-flip"],
  body.mobile-card-mode[data-active-panel="panel-night"] .panel-section[data-panel="panel-night"],
  body.mobile-card-mode[data-active-panel="panel-settings"] .panel-section[data-panel="panel-settings"] {
    display: block;
  }
  body.mobile-card-mode[data-active-panel="panel-today"] .stats-strip { display: grid; }
  body.mobile-card-mode:not([data-active-panel="panel-today"]) .stats-strip { display: none; }
  .journey-grid { grid-template-columns: repeat(7, 1fr); gap: 6px; }
  .milestones { grid-template-columns: repeat(2, 1fr); }
  .section-head { flex-direction: column; }
  .trial-banner { top: calc(64px + var(--safe-top)); }
}

@media (max-width: 430px) {
  .landing-hero h1 { font-size: clamp(2.1rem, 11vw, 3rem); }
  .stats-strip { grid-template-columns: 1fr; }
  .license-card { padding: 28px 18px; }
  .license-help { flex-direction: column; }
}

.ambient-track-picker,.night-track-switch{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
}
.ambient-track-label{font-size:12px;opacity:.75;margin-right:2px}
.track-chip{
  border:1px solid rgba(212,175,55,.35);
  background:rgba(255,255,255,.35);
  color:inherit;
  border-radius:999px;
  padding:8px 14px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
.track-chip.selected{
  background:linear-gradient(135deg,#e8c96a,#d4af37);
  color:#3a2e14;
  border-color:transparent;
}
.night-overlay .track-chip{
  background:rgba(255,255,255,.1);
  color:#f7efdf;
  border-color:rgba(212,175,55,.4);
}
.night-overlay .track-chip.selected{
  background:linear-gradient(135deg,#e8c96a,#d4af37);
  color:#3a2e14;
}
.night-track-switch{position:absolute;top:18px;right:18px;margin-top:48px}
@media(max-width:520px){
  .night-track-switch{position:static;margin:12px auto 0;justify-content:center}
}

.ambient-status{margin:8px 0 0;color:#b45309;font-size:13px;font-weight:700;}

#ambientToggle.is-on,
#ambientToggleNight.is-on,
.ghost-button.is-on,
.night-ambient.is-on {
  background: linear-gradient(135deg, #e8c96a, #d4af37);
  color: #3a2e14;
  border-color: transparent;
  font-weight: 800;
}


/* —— mm6 modules: Pause / Cosmic / Flip / Speech —— */
.header-pause-btn {
  appearance: none; border: 1px solid rgba(212,175,55,.45);
  background: linear-gradient(135deg, rgba(255,253,248,.9), rgba(247,231,195,.55));
  color: var(--gold-deep); font-weight: 700; font-size: 12px;
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
  white-space: nowrap; min-height: 36px;
}
.header-pause-btn:hover { filter: brightness(1.04); }
.hub-pool-chip {
  display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0;
  padding: 8px 14px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold-deep); font-size: 13px; font-weight: 600;
}
.hub-pool-chip strong { font: 500 18px "Cormorant Garamond", Georgia, serif; }
.stat-pill--pool strong { color: var(--gold); }

.cosmic-check-card {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
  margin: 0 0 18px; padding: 20px; position: relative; overflow: hidden;
  border: 1px solid rgba(212,175,55,.35);
  background:
    radial-gradient(ellipse at 20% 20%, rgba(232,201,106,.35), transparent 55%),
    linear-gradient(145deg, #fffdf8, #f7e7c3 60%, #efd9a0);
  box-shadow: 0 0 40px rgba(212,175,55,.22), 0 14px 32px var(--shadow);
}
.cosmic-check-card::before {
  content: ""; position: absolute; inset: -40% auto auto 40%; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,.55), transparent 70%);
  pointer-events: none; animation: cosmicGlow 4.5s ease-in-out infinite;
}
@keyframes cosmicGlow {
  0%,100% { opacity: .45; transform: translate(0,0); }
  50% { opacity: .85; transform: translate(-12px, 8px); }
}
.cosmic-energy-ring { position: relative; width: 120px; height: 120px; }
.cosmic-energy-ring svg { transform: rotate(-90deg); }
.cosmic-ring-bg { fill: none; stroke: rgba(184,146,42,.2); stroke-width: 8; }
.cosmic-ring-fg {
  fill: none; stroke: var(--gold); stroke-width: 8; stroke-linecap: round;
  stroke-dasharray: 326.73; stroke-dashoffset: 326.73;
  filter: drop-shadow(0 0 6px rgba(212,175,55,.65));
  transition: stroke-dashoffset .6s ease;
}
.cosmic-ring-pct {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 600 18px "Cormorant Garamond", Georgia, serif; color: var(--gold-deep);
}
.cosmic-check-visual { position: relative; z-index: 1; min-width: 0; }
.cosmic-check-eyebrow {
  margin: 0 0 6px; font-size: 11px; letter-spacing: .14em; font-weight: 700;
  color: var(--gold-deep); text-transform: uppercase;
}
.cosmic-check-payto { margin: 0 0 4px; font-size: 14px; color: var(--muted); }
.cosmic-check-payto strong { color: var(--ink); }
.cosmic-check-amount {
  margin: 4px 0 8px; font: 500 clamp(1.8rem, 5vw, 2.4rem) "Cormorant Garamond", Georgia, serif;
  color: var(--gold-deep); letter-spacing: .02em;
}
.cosmic-currency { opacity: .7; margin-right: 2px; }
.cosmic-check-purpose, .cosmic-check-date { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.cosmic-edit-btn { margin-top: 10px; }
.cosmic-check-empty { grid-column: 1 / -1; text-align: center; padding: 8px; }
.cosmic-check-empty p { color: var(--muted); margin: 0 0 12px; }
.cosmic-settings .settings-row { display: grid; gap: 6px; margin-bottom: 12px; }
.cosmic-settings input {
  width: 100%; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(255,253,248,.8); font: inherit;
}
.settings-lead-mini { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.cosmic-settings h3 { margin: 0 0 6px; color: var(--gold-deep); font-size: 16px; }

.flip-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.flip-card {
  perspective: 1000px; min-height: 120px; cursor: pointer; border: 0; background: transparent; padding: 0;
  appearance: none; text-align: left; width: 100%;
}
.flip-card-inner {
  position: relative; width: 100%; min-height: 120px; transition: transform .55s ease;
  transform-style: preserve-3d;
}
.flip-card.is-flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 16px; padding: 14px; display: flex; flex-direction: column; justify-content: center; gap: 6px;
  border: 1px solid var(--border); box-shadow: 0 10px 24px var(--shadow);
}
.flip-face-front {
  background: linear-gradient(145deg, #fffdf8, #f0e4d0);
  color: #5a4030;
}
.flip-face-back {
  background: linear-gradient(145deg, #e8c96a, #d4af37 55%, #b8922a);
  color: #3d2c12; transform: rotateY(180deg); font-weight: 600;
}
.flip-face small { font-size: 10px; letter-spacing: .08em; opacity: .75; text-transform: uppercase; }
.flip-face strong { font-size: 14px; line-height: 1.35; font-weight: 600; }
.flip-custom, .flip-history { padding: 18px; margin-bottom: 14px; }
.flip-custom h3, .flip-history h3 { margin: 0 0 10px; color: var(--gold-deep); font-size: 15px; }
.flip-custom label { display: block; font-size: 13px; margin: 8px 0 4px; color: var(--muted); }
.flip-custom input {
  width: 100%; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(255,253,248,.85); font: inherit;
}
.flip-custom .primary-button { margin-top: 12px; }
.flip-hint { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.flip-history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flip-history-list li {
  padding: 10px 12px; border-radius: 12px; background: rgba(255,253,248,.7);
  border: 1px solid var(--border); font-size: 13px;
}
.flip-history-list .from { color: var(--muted); text-decoration: line-through; }
.flip-history-list .to { color: var(--gold-deep); font-weight: 600; }

.speech-controls { padding: 16px; margin-bottom: 14px; display: grid; gap: 10px; }
.speech-row { display: flex; flex-wrap: wrap; gap: 8px; }
.speech-slider-label {
  display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
}
.speech-slider-label input[type=range] { width: 100%; accent-color: var(--gold); }
.speech-toggle { font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.speech-fallback { margin: 0; color: #b45309; font-size: 13px; font-weight: 600; }

.theme-card--flip, .theme-card[data-c="flip"] {
  background: linear-gradient(145deg, #fff8ea, #f3d9a0 45%, #e8c96a);
}
.pause-modal, .cosmic-modal { max-width: 440px; width: min(440px, calc(100% - 28px)); padding: 24px 22px 22px; position: relative; }
.pause-modal h2, .cosmic-modal h2 { margin: 0 0 8px; }
.pause-lead { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.pause-step label { display: block; font-size: 13px; margin: 8px 0 4px; color: var(--muted); }
.pause-step input, .pause-step textarea, .cosmic-modal input {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(255,253,248,.9); font: inherit; margin-bottom: 8px; box-sizing: border-box;
}
.pause-q { margin: 0 0 10px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.pause-outcomes { display: grid; gap: 8px; margin-top: 8px; }
.pause-outcome-label { margin: 12px 0 6px; font-size: 13px; color: var(--muted); }
.modal-close {
  position: absolute; top: 10px; right: 12px; border: 0; background: transparent;
  font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; padding: 4px 8px;
}
.cosmic-modal label { display: block; font-size: 13px; margin: 8px 0 4px; color: var(--muted); }
.cosmic-modal .primary-button { width: 100%; margin-top: 10px; }

@media (max-width: 820px) {
  .header-pause-btn { font-size: 11px; padding: 7px 10px; }
  .cosmic-check-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .cosmic-check-visual { width: 100%; }
  .desktop-nav a[data-open-panel="panel-flip"] { /* ok on desktop */ }
}
@media (max-width: 430px) {
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .flip-grid { grid-template-columns: 1fr 1fr; }
}

.practice-flip-link{margin:8px 0 0;font-size:12px;min-height:36px;}


/* —— Hub language switcher (mobile-first, always visible) —— */
.hub-lang-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 4px 0 18px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card-solid) 92%, var(--gold-soft));
}
.hub-lang-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .04em;
}
.hub-lang-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hub-lang-chip {
  border: 1px solid var(--border);
  background: var(--card-solid);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
}
.hub-lang-chip:hover { border-color: var(--gold); }
.hub-lang-chip.is-active {
  background: linear-gradient(135deg, #e8c96a, var(--gold));
  border-color: transparent;
  color: #3d2c12;
}
body.mobile-card-mode .topbar-lang-select {
  max-width: 92px;
  padding-left: 10px;
  padding-right: 22px;
  font-size: 12px;
  flex-shrink: 0;
}
@media (max-width: 430px) {
  body.mobile-card-mode .header-pause-btn {
    max-width: 4.5em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .hub-lang-bar { flex-direction: column; align-items: stretch; }
  .hub-lang-chips { justify-content: stretch; }
  .hub-lang-chip { flex: 1 1 auto; text-align: center; }
}
