/* ============================================================
   Little Life Vault — Digital Builder
   Warm Archive + Premium Minimalist
   ============================================================ */

:root {
  /* Palette */
  --cream: #F7F1E7;        /* warm ivory / cream background */
  --cream-deep: #EFE7D8;   /* alt sections / cards */
  --paper: #FCF8F1;        /* form fields / lighter paper */
  --sage: #9CAF98;         /* soft sage accent */
  --sage-deep: #7E9179;    /* sage for text/hover */
  --taupe: #8A7C6B;        /* warm taupe body text */
  --taupe-soft: #A99C8B;   /* muted taupe */
  --charcoal: #33302B;     /* dark charcoal headings */
  --charcoal-soft: #4A463F;
  --line: #E2D8C7;         /* hairline borders */
  --line-strong: #D3C6B1;
  --danger: #B4655A;

  /* Type */
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Metrics */
  --maxw: 1080px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px -28px rgba(51, 48, 43, 0.35);
  --shadow-soft: 0 8px 26px -18px rgba(51, 48, 43, 0.3);
}

* { box-sizing: border-box; }

/* Ensure the [hidden] attribute always wins over author display rules
   (e.g. .privacy-banner/.view use display:flex, which would otherwise
   override the UA [hidden] { display:none } rule). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--taupe);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--charcoal);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

.view { min-height: 100vh; }

/* ---------------- Buttons ---------------- */
.btn {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.72rem 1.5rem;
  cursor: pointer;
  transition: all 0.18s ease;
  background: none;
  color: var(--charcoal);
  white-space: nowrap;
}
.btn-primary {
  background: var(--charcoal);
  color: var(--cream);
}
.btn-primary:hover { background: #211f1b; transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--charcoal-soft);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--charcoal); color: var(--charcoal); }
.btn-lg { padding: 0.95rem 2.2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
/* Full-width card CTA — reads as a solid button, not a text link */
.btn-block { display: block; width: 100%; text-align: center; padding-top: 0.85rem; padding-bottom: 0.85rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-danger { color: var(--danger); border-color: rgba(180,101,90,0.4); }
.btn-danger:hover { background: var(--danger); color: var(--cream); border-color: var(--danger); }

/* ---------------- Landing: header ---------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.2rem, 5vw, 3.5rem);
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 0.55rem; }
.brand-mark { color: var(--sage-deep); font-size: 1.1rem; }
.brand-name { font-family: var(--serif); font-size: 1.15rem; color: var(--charcoal); font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: 1.8rem; font-size: 0.92rem; }
.site-nav a { color: var(--taupe); transition: color 0.15s; }
.site-nav a:hover { color: var(--charcoal); }

/* ---------------- Hero ---------------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.2rem, 5vw, 3.5rem) clamp(3rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.eyebrow, .section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  color: var(--sage-deep);
  font-weight: 600;
  margin-bottom: 1.1rem;
}
.hero-title {
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
}
.hero-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  line-height: 1.4;
  color: var(--charcoal-soft);
  max-width: 30ch;
  margin-bottom: 1.3rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.6;
  max-width: 40ch;
  margin-bottom: 2rem;
  color: var(--taupe);
}
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.hero-benefit {
  font-size: 0.9rem;
  color: var(--sage-deep);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 1.2rem;
}
.hero-note {
  font-size: 0.85rem;
  color: var(--taupe-soft);
  border-left: 2px solid var(--sage);
  padding-left: 0.9rem;
  max-width: 40ch;
}

/* Hero decorative card */
.hero-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  transform: rotate(-1.5deg);
}
.hero-card-frame {
  background: var(--cream-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.9rem;
}
.hero-card-photo {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(156,175,152,0.5), transparent 60%),
    linear-gradient(135deg, var(--cream), var(--cream-deep));
  border: 1px solid var(--line);
}
.hero-card-lines { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.9rem; }
.hero-card-lines span { height: 7px; border-radius: 4px; background: var(--line-strong); }
.hero-card-lines span:nth-child(1) { width: 85%; }
.hero-card-lines span:nth-child(2) { width: 65%; }
.hero-card-lines span:nth-child(3) { width: 75%; }
.hero-card-caption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--charcoal-soft);
  margin-top: 1.1rem;
  text-align: center;
}

/* ---------------- Sections ---------------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.2rem, 5vw, 3.5rem);
}
.section-alt {
  max-width: none;
  background: var(--cream-deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section-title {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 400;
  margin-bottom: 2.9rem;
  max-width: 20ch;
}
/* Section header with an eyebrow, title, and a calm subtitle line. */
.section-head { margin-bottom: 2.9rem; }
.section-head .section-title { margin-bottom: 0.7rem; }
.section-sub {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.6;
  color: var(--taupe);
  max-width: 48ch;
}

/* How it works */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.feature {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem 2rem;
  box-shadow: var(--shadow-soft);
}
.feature-num { font-family: var(--serif); color: var(--sage-deep); font-size: 1.4rem; }
.feature h3 { font-size: 1.3rem; margin: 0.9rem 0 0.7rem; }
.feature p { font-size: 0.96rem; line-height: 1.7; }

/* What you save */
#save > * { max-width: 840px; margin-left: auto; margin-right: auto; }
.save-head { text-align: center; margin-bottom: 2rem; }
.save-head .section-title { max-width: none; margin: 0.6rem auto 0.7rem; }
.save-intro { color: var(--taupe); font-size: 1.05rem; }
.save-list {
  list-style: none;
  margin: 0;
  padding: 0.6rem 2.2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2.6rem;
}
.save-list li {
  padding: 0.85rem 0 0.85rem 1.6rem;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: 1rem;
  color: var(--charcoal-soft);
}
.save-list li:nth-last-child(-n+2) { border-bottom: none; }
.save-list li::before {
  content: "◦";
  position: absolute;
  left: 0;
  color: var(--sage-deep);
  font-size: 1.3rem;
  line-height: 1.4;
}

/* Receive */
.receive-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
.receive-item { padding: 1.9rem 1.8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-soft); }
.receive-item h3 { font-size: 1.2rem; margin-bottom: 0.55rem; }
.receive-item p { font-size: 0.96rem; line-height: 1.7; }

/* Compare */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; align-items: stretch; }
.plan {
  position: relative;            /* anchor the "Most complete" badge */
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem 2.2rem;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
/* Premium: a gentle warm highlight — elevated and inviting, never a harsh block */
.plan-featured {
  background: linear-gradient(180deg, #3D3931 0%, #2F2C27 100%);
  border: 1.5px solid rgba(156, 175, 152, 0.72);
  box-shadow: 0 24px 56px -34px rgba(32, 28, 23, 0.62);
}
/* Subtle "recommended" badge, straddling the top edge of the Premium card */
.plan-badge {
  position: absolute;
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sage-deep);
  color: var(--cream);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}
.plan-tag { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem; font-weight: 600; color: var(--sage-deep); }
.plan-name { font-family: var(--serif); font-size: 1.55rem; color: var(--charcoal); margin: 0.45rem 0 0.7rem; }
.plan-desc { font-size: 0.95rem; line-height: 1.6; color: var(--taupe); margin: 0 0 1.5rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.plan ul li { padding: 0.72rem 0; border-bottom: 1px solid var(--line); font-size: 0.97rem; color: var(--charcoal-soft); }
.plan ul li:last-child { border-bottom: none; }
.plan-price { font-family: var(--serif); font-size: 2rem; color: var(--charcoal); margin: auto 0 0; } /* auto pushes the pricing block to the card bottom → aligned buttons */
.plan-cta {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin-top: 1.2rem;
}
.plan .btn-block {
  margin: 0;
  line-height: 1.25;
  white-space: normal;
}
.plan-footnote { font-size: 0.82rem; line-height: 1.5; color: var(--taupe-soft); text-align: center; margin: 0; }
.plan-featured .plan-tag { color: #C8D6BF; }
.plan-featured .plan-name,
.plan-featured .plan-price { color: var(--cream); }
.plan-featured .plan-desc,
.plan-featured .plan-footnote { color: rgba(247, 241, 231, 0.78); }
.plan-featured ul li {
  color: rgba(247, 241, 231, 0.88);
  border-bottom-color: rgba(247, 241, 231, 0.18);
}
.plan-featured .btn-primary {
  background: var(--cream);
  color: var(--charcoal);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 14px 30px -22px rgba(0, 0, 0, 0.8);
}
.plan-featured .btn-primary:hover {
  background: #FFF8EA;
  color: var(--charcoal);
}

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 0.8rem; max-width: 760px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 0.3rem 1.7rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.faq details[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
  padding-bottom: 0.7rem;
}
.faq summary {
  cursor: pointer;
  padding: 1.15rem 0;
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--charcoal);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  outline: none;
}
/* Subtle, brand-consistent focus ring — never a thick black outline */
.faq summary:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: 6px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--sage-deep);
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;        /* keep the +/- aligned on the right */
}
.faq details[open] summary::after { content: "–"; }
/* Answer: clear separation from the question, comfortable spacing */
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p {
  margin: 0;
  padding: 1.1rem 0 1.1rem;
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--taupe);
  max-width: 62ch;
}

/* CTA */
.cta {
  text-align: center;
  padding: clamp(4rem, 9vw, 7rem) 1.5rem;
  background: var(--cream-deep);
  border-top: 1px solid var(--line);
}
.cta-title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 400; margin-bottom: 0.8rem; }
.cta-sub { font-size: 1.1rem; margin-bottom: 2rem; color: var(--taupe); }

/* Footer */
.site-footer {
  text-align: center;
  padding: 3rem 1.5rem 3.5rem;
  border-top: 1px solid var(--line);
}
.footer-copy { font-family: var(--serif); font-size: 1.05rem; color: var(--charcoal-soft); letter-spacing: 0.02em; margin-bottom: 0.7rem; }
.footer-privacy { font-size: 0.85rem; color: var(--taupe-soft); max-width: 46ch; margin: 0 auto; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin-top: 1.6rem;
}
.footer-links a { font-size: 0.82rem; color: var(--taupe); transition: color 0.15s ease; }
.footer-links a:hover { color: var(--charcoal); }

/* ============================================================
   LEGAL / CONTENT PAGES (privacy, terms, refunds, contact)
   Uses the same tokens as the rest of the site.
   ============================================================ */
.legal-main {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.2rem, 5vw, 2rem) clamp(3rem, 7vw, 5rem);
}
.legal-head { margin-bottom: 2.6rem; }
.legal-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin: 0.6rem 0 0.6rem;
}
.legal-updated { font-size: 0.85rem; color: var(--taupe-soft); }
.legal-body p { font-size: 1rem; line-height: 1.75; color: var(--taupe); margin: 0 0 1.2rem; }
.legal-body h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--charcoal);
  margin: 2.6rem 0 0.9rem;
}
.legal-body ul { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.legal-body li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.4rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--taupe);
}
.legal-body li::before {
  content: "◦";
  position: absolute;
  left: 0;
  color: var(--sage-deep);
  font-size: 1.2rem;
  line-height: 1.5;
}
.legal-body a { color: var(--sage-deep); text-decoration: underline; text-underline-offset: 2px; }
.legal-body a:hover { color: var(--charcoal); }
.legal-body strong { color: var(--charcoal); font-weight: 600; }
.legal-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.8rem 2rem;
  margin: 1.6rem 0;
}
.legal-card p { margin: 0 0 0.5rem; }
.legal-card p:last-child { margin-bottom: 0; }

/* ============================================================
   BUILDER
   ============================================================ */
.builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 5vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 20;
}
.builder-header-right { display: flex; align-items: center; gap: 1rem; }
.save-status { font-size: 0.82rem; color: var(--sage-deep); min-width: 5rem; text-align: right; }

/* Progress */
.progress {
  display: flex;
  gap: 0.5rem;
  max-width: 760px;
  margin: 0 auto;
  padding: 1.6rem clamp(1.2rem, 5vw, 2rem) 0.4rem;
}
.progress-step { flex: 1; text-align: center; cursor: pointer; }
.progress-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background 0.25s;
}
.progress-step.done .progress-bar { background: var(--sage); }
.progress-step.active .progress-bar { background: var(--charcoal); }
.progress-name {
  font-size: 0.72rem;
  margin-top: 0.5rem;
  color: var(--taupe-soft);
  letter-spacing: 0.02em;
}
.progress-step.active .progress-name { color: var(--charcoal); font-weight: 600; }
.progress-step.done .progress-name { color: var(--sage-deep); }

/* Step body */
.builder-main {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.2rem, 5vw, 2rem) 8rem;
}
.step-head { margin-bottom: 2rem; }
.step-kicker { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem; color: var(--sage-deep); font-weight: 600; }
.step-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 400; margin: 0.6rem 0 0.7rem; }
.step-intro { font-size: 1.02rem; color: var(--taupe); max-width: 48ch; }

/* Fields */
.field { margin-bottom: 1.6rem; }
.field-group-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--charcoal);
  margin: 2.4rem 0 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.field label { display: block; font-size: 0.9rem; font-weight: 500; color: var(--charcoal-soft); margin-bottom: 0.45rem; }
.field .hint { font-size: 0.8rem; color: var(--taupe-soft); font-weight: 400; margin-left: 0.3rem; }
.field input[type="text"],
.field input[type="date"],
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--charcoal);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 92px; line-height: 1.6; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--sage-deep);
  box-shadow: 0 0 0 3px rgba(156,175,152,0.18);
}
.field input::placeholder, .field textarea::placeholder { color: var(--taupe-soft); }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 0.8rem; margin-top: 0.35rem; }

.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }

/* Image upload */
.uploader {
  display: flex;              /* block box so the dashed border never fragments */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 1.6rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.uploader:hover, .uploader.dragover {
  border-color: var(--sage-deep);
  background: #FBF6EC;
}
.uploader input[type="file"] { display: none; }
.uploader-icon { font-size: 1.6rem; color: var(--sage-deep); }
.uploader-text { font-size: 0.92rem; color: var(--taupe); margin-top: 0.4rem; }
.uploader-text strong { color: var(--charcoal); font-weight: 600; }
.uploader-sub { font-size: 0.78rem; color: var(--taupe-soft); margin-top: 0.25rem; }

.thumb {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--cream);
}
.thumb-img { display: block; width: 100%; object-position: center; }
/* Fill frame (cover): fixed 4/3 frame, crop from center to fill — album card. */
.thumb.mode-cover { aspect-ratio: 4 / 3; }
.thumb.mode-cover .thumb-img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
/* Fit full photo (contain): frame follows the photo's own shape — no gutters. */
.thumb.mode-contain .thumb-img { position: relative; height: auto; }

/* Fit-mode controls sit below the photo — clean, not over the image. */
.fit-controls {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
}
.fit-btn {
  font-family: var(--sans);
  font-size: 0.78rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.36rem 0.9rem;
  cursor: pointer;
  color: var(--taupe);
  background: var(--paper);
  white-space: nowrap;
  transition: all 0.15s ease;
}
.fit-btn:hover { border-color: var(--charcoal); color: var(--charcoal); }
.fit-btn.active { background: var(--charcoal); color: var(--cream); border-color: var(--charcoal); }
.thumb-actions {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: flex;
  gap: 0.45rem;
}
.thumb-btn {
  font-family: var(--sans);
  font-size: 0.78rem;
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  background: rgba(51,48,43,0.82);
  color: var(--cream);
  backdrop-filter: blur(2px);
}
.thumb-btn:hover { background: var(--charcoal); }
.thumb-btn.remove:hover { background: var(--danger); }

/* Photo moment block */
.photo-moment {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1.4rem;
  background: var(--cream-deep);
}
.photo-moment-head { font-family: var(--serif); font-size: 1.1rem; color: var(--charcoal); margin-bottom: 1rem; }

/* Builder footer */
.builder-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.2rem, 5vw, 3rem);
  background: rgba(247,241,231,0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  z-index: 20;
}
.step-label { font-size: 0.85rem; color: var(--taupe-soft); }

/* ---------------- Preview step ---------------- */
.preview-intro { margin-bottom: 2rem; }
.preview-doc {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.preview-page {
  padding: clamp(1.8rem, 5vw, 3.2rem);
  border-bottom: 1px solid var(--line);
}
.preview-page:last-child { border-bottom: none; }
.preview-cover { text-align: center; padding-top: clamp(2.5rem, 7vw, 4.5rem); padding-bottom: clamp(2.5rem, 7vw, 4.5rem); }
.preview-cover .pv-kicker { color: var(--sage-deep); }
.preview-cover h2 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 400; margin: 0.8rem 0; }
.pv-kicker { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem; font-weight: 600; color: var(--sage-deep); margin-bottom: 0.9rem; }
.pv-h { font-family: var(--serif); font-size: 1.6rem; color: var(--charcoal); font-weight: 500; margin-bottom: 1.2rem; }
.pv-row { margin-bottom: 1.1rem; }
.pv-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--taupe-soft); margin-bottom: 0.2rem; }
.pv-value {
  font-size: 1.02rem;
  color: var(--charcoal-soft);
  white-space: pre-wrap;      /* keep line breaks the user typed */
  overflow-wrap: anywhere;    /* break very long words so text never overflows */
  word-break: break-word;
}
.pv-value.serif { font-family: var(--serif); font-style: italic; font-size: 1.15rem; }
/* User-entered text everywhere in the preview must stay inside its card. */
.preview-cover h2, .pv-photo-cap, .pv-photo-date, .pv-label {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.preview-doc, .preview-page { overflow: hidden; }
.pv-empty { color: var(--taupe-soft); font-style: italic; }
.pv-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; align-items: start; }
.pv-photo-frame { background: var(--cream-deep); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.7rem; }
.pv-photo-media {
  position: relative;
  width: 100%;
  border-radius: 5px;
  overflow: hidden;
  background: var(--cream);
}
.pv-photo-img { display: block; width: 100%; object-position: center; }
/* Fill frame (cover): fixed 4/3, crop from center. */
.pv-photo-frame.mode-cover .pv-photo-media { aspect-ratio: 4 / 3; }
.pv-photo-frame.mode-cover .pv-photo-img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
/* Fit full photo (contain): frame follows the photo's shape — no gutters. */
.pv-photo-frame.mode-contain .pv-photo-img { position: relative; height: auto; }
.pv-photo-cap { font-size: 0.85rem; color: var(--taupe); margin-top: 0.5rem; text-align: center; font-style: italic; }
.pv-photo-date { font-size: 0.75rem; color: var(--taupe-soft); text-align: center; }

.preview-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2rem;
}

/* Privacy banner */
.privacy-banner {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 560px;
  width: calc(100% - 2rem);
  background: var(--charcoal);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow);
  z-index: 60;
}
.privacy-banner p { font-size: 0.85rem; }
.privacy-banner .btn-ghost { border-color: rgba(255,255,255,0.3); color: var(--cream); flex-shrink: 0; }
.privacy-banner .btn-ghost:hover { border-color: var(--cream); background: rgba(255,255,255,0.1); }

/* Toast */
.toast {
  position: fixed;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--charcoal);
  color: var(--cream);
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 70;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-card { max-width: 340px; margin: 0 auto; }
  .cards-3 { grid-template-columns: 1fr; }
  .compare, .receive-grid { grid-template-columns: 1fr; }
  .compare { gap: 1.8rem; }
  #compare .plan.plan-featured {
    background: linear-gradient(180deg, #3D3931 0%, #2F2C27 100%);
    background-color: #2F2C27;
    color: var(--cream);
    border: 1.5px solid rgba(156, 175, 152, 0.72);
    box-shadow: 0 24px 56px -34px rgba(32, 28, 23, 0.62);
  }
  #compare .plan.plan-featured .plan-tag { color: #C8D6BF; }
  #compare .plan.plan-featured .plan-name,
  #compare .plan.plan-featured .plan-price { color: var(--cream); }
  #compare .plan.plan-featured .plan-desc,
  #compare .plan.plan-featured .plan-footnote { color: rgba(247, 241, 231, 0.78); }
  #compare .plan.plan-featured ul li {
    color: rgba(247, 241, 231, 0.88);
    border-bottom-color: rgba(247, 241, 231, 0.18);
  }
  #compare .plan.plan-featured .btn-primary {
    background: var(--cream);
    color: var(--charcoal);
    border-color: rgba(255, 255, 255, 0.22);
  }
  .site-nav { gap: 1rem; }
  /* Hide the text links on mobile but keep the "Start building" CTA button. */
  .site-nav a:not(.btn) { display: none; }
}
@media (max-width: 620px) {
  .plan { padding: 2.1rem 1.5rem; }
  .plan-cta { gap: 1rem; margin-top: 1.15rem; }
  .save-list { grid-template-columns: 1fr; padding: 0.4rem 1.5rem; }
  .save-list li:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .save-list li:last-child { border-bottom: none; }
  .fields-2 { grid-template-columns: 1fr; }
  .pv-photos { grid-template-columns: 1fr; }
  .progress-name { display: none; }
  .builder-footer { padding: 0.8rem 1.2rem; }
  .step-label { display: none; }
  .site-nav .btn { padding: 0.55rem 1.1rem; }
}

/* Final pricing mobile override: keep the actual Premium card container dark. */
@media (max-width: 860px) {
  #compare .plan.plan-featured {
    background: linear-gradient(180deg, #3D3931 0%, #2F2C27 100%) !important;
    background-color: #2F2C27 !important;
    color: var(--cream) !important;
    border-color: rgba(156, 175, 152, 0.72) !important;
    box-shadow: 0 24px 56px -34px rgba(32, 28, 23, 0.62) !important;
  }

  #compare .plan.plan-featured .plan-badge {
    background: var(--sage-deep) !important;
    color: var(--cream) !important;
  }

  #compare .plan.plan-featured .plan-tag {
    color: #C8D6BF !important;
  }

  #compare .plan.plan-featured .plan-name,
  #compare .plan.plan-featured .plan-price {
    color: var(--cream) !important;
  }

  #compare .plan.plan-featured .plan-desc,
  #compare .plan.plan-featured .plan-footnote {
    color: rgba(247, 241, 231, 0.78) !important;
  }

  #compare .plan.plan-featured ul li {
    color: rgba(247, 241, 231, 0.88) !important;
    border-bottom-color: rgba(247, 241, 231, 0.18) !important;
  }

  #compare .plan.plan-featured .btn-primary {
    background: var(--cream) !important;
    color: var(--charcoal) !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
  }
}

@media (max-width: 768px) {
  .hero-actions {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    width: 100% !important;
  }

  .hero-actions > a.btn.btn-primary,
  .hero-actions > a.btn.btn-ghost {
    display: inline-flex !important;
    width: fit-content !important;
    max-width: calc(100vw - 48px) !important;
    flex: 0 0 auto !important;
    align-self: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-content: center !important;
    text-align: center !important;
  }
}
