:root {
  color-scheme: light;
  --purple-950: #1d0a35;
  --purple-900: #2d104f;
  --purple-800: #421875;
  --purple-700: #5d2893;
  --purple-600: #7840ad;
  --lavender-100: #f3eafd;
  --lavender-50: #faf7fd;
  --gold-500: #dcae44;
  --gold-300: #f1d481;
  --green-700: #276c55;
  --ink: #231a2d;
  --muted: #6f6579;
  --line: rgba(66, 24, 117, 0.13);
  --surface: #ffffff;
  --shadow: 0 16px 48px rgba(45, 16, 79, 0.11);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% -5%, rgba(220, 174, 68, .16), transparent 24rem),
    radial-gradient(circle at 94% 5%, rgba(120, 64, 173, .16), transparent 30rem),
    #f8f5fb;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 12px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(255,255,255,.35);
  background: rgba(45, 16, 79, .94);
  color: white;
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(241, 212, 129, .75);
  border-radius: 50%;
  background: linear-gradient(145deg, #6f34a4, #321051);
  color: var(--gold-300);
  font-family: Georgia, serif;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.07);
}
.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, serif; font-size: 1.05rem; }
.brand small { color: #d9cde5; font-size: .75rem; }
.plan-chip, .install-button {
  border: 1px solid rgba(241, 212, 129, .45);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,.08);
  color: #f8e8b9;
  font-size: .78rem;
  font-weight: 750;
  white-space: nowrap;
}
.install-button { cursor: pointer; font: inherit; }

main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 80px; }
.welcome {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 36px;
  padding: clamp(26px, 5vw, 58px);
  border-radius: 32px;
  background:
    linear-gradient(125deg, rgba(35, 9, 60, .98), rgba(85, 31, 126, .93)),
    #321051;
  color: white;
  box-shadow: var(--shadow);
}
.welcome::after {
  content: "✦";
  position: absolute;
  right: 4%;
  top: -24%;
  color: rgba(241, 212, 129, .12);
  font-size: 18rem;
  line-height: 1;
  transform: rotate(18deg);
}
.welcome > * { position: relative; z-index: 1; }
.welcome-label, .section-kicker, .eyebrow, .premium-kicker, .dialog-kicker {
  color: var(--gold-300);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.welcome h1 {
  max-width: 720px;
  margin: 10px 0 12px;
  font-family: Georgia, serif;
  font-size: clamp(2rem, 5.4vw, 4.3rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.welcome p { max-width: 690px; margin: 0; color: #e7deef; font-size: clamp(1rem, 1.6vw, 1.16rem); }
.summary-card {
  display: grid;
  grid-template-columns: repeat(3, 82px);
  overflow: hidden;
  border: 1px solid rgba(241, 212, 129, .35);
  border-radius: 20px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}
.summary-card div { padding: 16px 10px; text-align: center; }
.summary-card div + div { border-left: 1px solid rgba(255,255,255,.12); }
.summary-card strong, .summary-card span { display: block; }
.summary-card strong { color: var(--gold-300); font-size: 1.6rem; }
.summary-card span { color: #ddd1e7; font-size: .72rem; text-transform: uppercase; }

.section-nav {
  display: flex;
  gap: 10px;
  margin: 18px 0 46px;
  overflow-x: auto;
  scrollbar-width: none;
}
.section-nav::-webkit-scrollbar { display: none; }
.section-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.84);
  color: var(--purple-900);
  font-size: .88rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}
.content-section { margin-top: 62px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-kicker { color: var(--purple-700); }
.section-heading h2, .premium-lock h2, .emotional-hero h2 {
  margin: 5px 0 0;
  color: var(--purple-950);
  font-family: Georgia, serif;
  font-size: clamp(1.72rem, 3vw, 2.5rem);
  line-height: 1.12;
}
.section-count { color: var(--muted); font-size: .88rem; font-weight: 700; white-space: nowrap; }
.section-intro { max-width: 720px; margin: -8px 0 22px; color: var(--muted); }

.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.guide-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 9px 32px rgba(45, 16, 79, .07);
}
.guide-cover-wrap { position: relative; min-height: 100%; background: var(--lavender-100); }
.guide-cover { width: 100%; height: 100%; min-height: 260px; object-fit: cover; object-position: top center; }
.guide-copy { display: flex; flex-direction: column; align-items: flex-start; padding: 22px; }
.guide-copy .eyebrow { color: var(--purple-600); letter-spacing: .07em; }
.guide-copy h3 { margin: 7px 0 8px; color: var(--purple-950); font-family: Georgia, serif; font-size: 1.35rem; line-height: 1.15; }
.guide-copy p { margin: 0 0 20px; color: var(--muted); font-size: .91rem; }
.card-actions { display: flex; align-items: center; gap: 9px; margin-top: auto; }
.button, .icon-button, .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.button { min-height: 44px; padding: 11px 15px; }
.button-primary { background: var(--purple-800); color: white; }
.icon-button { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--lavender-50); color: var(--purple-800); }

.audio-list { display: grid; gap: 12px; }
.audio-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.93);
  box-shadow: 0 8px 26px rgba(45, 16, 79, .055);
}
.track-number {
  display: grid;
  place-items: center;
  align-self: start;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--purple-800), var(--purple-600));
  color: white;
  font-weight: 850;
}
.track-number svg { width: 22px; height: 22px; }
.audio-heading { display: flex; justify-content: space-between; gap: 16px; }
.audio-heading h3 { margin: 0 0 3px; color: var(--purple-950); font-size: 1rem; line-height: 1.3; }
.audio-heading p { margin: 0; color: var(--muted); font-size: .86rem; }
.duration { color: var(--purple-700); font-size: .78rem; font-weight: 800; white-space: nowrap; }
audio { width: 100%; height: 38px; margin-top: 12px; accent-color: var(--purple-700); }

.premium-lock {
  position: relative;
  overflow: hidden;
  margin-top: 76px;
  padding: clamp(26px, 5vw, 52px);
  border: 2px solid var(--gold-500);
  border-radius: 30px;
  background: linear-gradient(145deg, #23093e, #4d1978 62%, #2a0c48);
  color: white;
  box-shadow: 0 24px 70px rgba(50, 12, 80, .24);
}
.premium-glow { position: absolute; top: -140px; right: -100px; width: 340px; height: 340px; border-radius: 50%; background: rgba(241, 212, 129, .18); filter: blur(30px); }
.premium-lock > * { position: relative; z-index: 1; }
.premium-kicker { display: inline-flex; align-items: center; gap: 7px; }
.premium-lock h2 { max-width: 720px; color: white; font-size: clamp(2rem, 4vw, 3.4rem); }
.premium-lock > p { max-width: 720px; color: #e6d9ef; font-size: 1.02rem; }
.premium-pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; }
.premium-pill-row span { padding: 8px 11px; border: 1px solid rgba(241,212,129,.28); border-radius: 999px; background: rgba(255,255,255,.08); color: #f4e5b7; font-size: .8rem; font-weight: 750; }
.locked-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.locked-preview-grid .guide-card { grid-template-columns: 1fr; min-height: 0; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.95); }
.locked-preview-grid .guide-cover-wrap { height: 170px; }
.locked-preview-grid .guide-cover { min-height: 170px; filter: saturate(.65); }
.cover-lock { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(35, 9, 62, .56); color: white; }
.cover-lock svg { width: 34px; height: 34px; }
.button-lock { width: 100%; margin-top: auto; background: var(--lavender-100); color: var(--purple-800); }
.button-gold { background: linear-gradient(135deg, #f2d779, #d9a92c); color: #281139; box-shadow: 0 8px 24px rgba(220,174,68,.25); }

.emotional-hero {
  margin-top: 74px;
  padding: clamp(30px, 6vw, 64px);
  border-radius: 30px;
  background:
    radial-gradient(circle at 80% 20%, rgba(241,212,129,.22), transparent 20rem),
    linear-gradient(135deg, #260c44, #5c268b);
  color: white;
  box-shadow: var(--shadow);
}
.emotional-hero > span { display: inline-flex; align-items: center; gap: 7px; color: var(--gold-300); font-size: .8rem; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; }
.emotional-hero h2 { color: white; font-size: clamp(2.2rem, 5vw, 4rem); }
.emotional-hero p { max-width: 740px; margin-bottom: 0; color: #e6dbee; font-size: 1.03rem; }
.premium-section { padding-top: 8px; }

footer { display: grid; place-items: center; gap: 14px; padding: 38px 20px calc(38px + env(safe-area-inset-bottom)); background: var(--purple-950); color: #d8cde2; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: white; font-family: Georgia, serif; }
footer p { max-width: 690px; margin: 0; font-size: .78rem; }

.upgrade-dialog {
  width: min(520px, calc(100% - 28px));
  padding: 30px;
  border: 1px solid rgba(220,174,68,.6);
  border-radius: 26px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 32px 90px rgba(25, 5, 45, .45);
}
.upgrade-dialog::backdrop { background: rgba(25, 7, 42, .72); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 12px; right: 14px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--lavender-100); color: var(--purple-900); font-size: 1.5rem; cursor: pointer; }
.dialog-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 16px; border-radius: 17px; background: var(--purple-900); color: var(--gold-300); }
.dialog-icon svg { width: 26px; height: 26px; }
.dialog-kicker { display: block; color: var(--purple-700); }
.upgrade-dialog h2 { margin: 7px 0 10px; color: var(--purple-950); font-family: Georgia, serif; font-size: 2rem; line-height: 1.08; }
.upgrade-dialog p { color: var(--muted); }
.upgrade-dialog ul { padding-left: 20px; color: var(--purple-950); }
.upgrade-dialog li { margin: 8px 0; }
.dialog-cta { width: 100%; margin-top: 8px; }
.upgrade-dialog small { display: block; margin-top: 10px; color: var(--muted); text-align: center; }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(390px, calc(100% - 36px));
  padding: 13px 16px;
  border: 1px solid rgba(241, 212, 129, .45);
  border-radius: 14px;
  background: var(--purple-950);
  color: white;
  font-size: .86rem;
  font-weight: 700;
  box-shadow: 0 14px 38px rgba(29, 10, 53, .3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .welcome { grid-template-columns: 1fr; }
  .summary-card { width: fit-content; }
  .guide-grid { grid-template-columns: 1fr; }
  .locked-preview-grid { grid-template-columns: 1fr; }
  .locked-preview-grid .guide-card { grid-template-columns: 120px 1fr; }
  .locked-preview-grid .guide-cover-wrap, .locked-preview-grid .guide-cover { height: auto; min-height: 220px; }
}

@media (max-width: 620px) {
  .topbar { min-height: 68px; padding: 10px 16px; }
  .brand strong { font-size: .94rem; }
  .brand small, .plan-chip { display: none; }
  .install-button { padding: 7px 10px; font-size: .74rem; }
  main { width: min(100% - 24px, 1180px); padding-top: 14px; }
  .welcome { gap: 24px; padding: 27px 22px; border-radius: 23px; }
  .welcome h1 { font-size: 2.35rem; }
  .summary-card { grid-template-columns: repeat(3, 72px); }
  .summary-card div { padding: 12px 6px; }
  .summary-card strong { font-size: 1.35rem; }
  .section-nav { margin-bottom: 38px; }
  .content-section { margin-top: 48px; }
  .section-heading { align-items: start; }
  .section-count { margin-top: 8px; }
  .guide-card { grid-template-columns: 112px minmax(0, 1fr); min-height: 218px; }
  .guide-cover { min-height: 218px; }
  .guide-copy { padding: 17px 15px; }
  .guide-copy h3 { font-size: 1.14rem; }
  .guide-copy p { font-size: .82rem; }
  .guide-copy .eyebrow { font-size: .64rem; }
  .button { padding: 10px 12px; font-size: .82rem; }
  .audio-card { grid-template-columns: 42px minmax(0, 1fr); gap: 11px; padding: 14px 12px; }
  .track-number { width: 42px; height: 42px; border-radius: 13px; font-size: .82rem; }
  .audio-heading h3 { font-size: .94rem; }
  .audio-heading p { display: none; }
  audio { height: 36px; }
  .premium-lock { padding: 26px 16px; border-radius: 24px; }
  .premium-lock h2 { font-size: 2.2rem; }
  .locked-preview-grid .guide-card { grid-template-columns: 100px 1fr; }
  .locked-preview-grid .guide-cover-wrap, .locked-preview-grid .guide-cover { min-height: 210px; }
  .upgrade-dialog { padding: 26px 20px; }
}

@media (max-width: 400px) {
  .welcome h1 { font-size: 2.05rem; }
  .guide-card { grid-template-columns: 96px minmax(0, 1fr); }
  .guide-cover { min-height: 224px; }
  .card-actions { gap: 6px; }
  .icon-button { width: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
