/**
 * Sample Forever Pages — enlarge-only type floors.
 * Keeps gate + page content ≥14px; body copy ~18–20px.
 * Load after each sample's inline <style>.
 */
:root {
  --sr-min: 0.875rem;   /* 14px */
  --sr-body: 1.175rem;  /* ~18.8px */
  --sr-body-tight: 1.125rem; /* 18px */
  --sr-ls: 0.1em;
}

/* ——— Universal floors for shared sample chrome ——— */
.demo-top-bar-text,
.demo-top-bar-link,
.demo-top-bar-close,
.loader-sub,
.loader-enter,
.loader-enter-arrow,
.loader-song-hint,
.loader-song-hint em,
.hero-eyebrow,
.hero-subtitle,
.hero-date,
.hero-scroll span,
.hero-dresscode span,
.banner-item-sub,
.letter-label,
.scripture-ref,
.ifeanyi-label,
.message-from-badge span,
.page-footer,
.page-footer p,
.demo-footer,
.demo-footer p,
.date-item-date,
.pg-divider-icon,
.pg-counter,
.pg-num,
.vt-number,
.movie-btn,
.movie-chapter,
.gb-card-brand,
.gb-card-time,
.gb-card-name,
.gb-wall-title,
.gb-wall-title span,
.gb-submit,
.gb-subtitle,
.gb-photo-drop-label,
.gb-form-row label,
.gb-cta p,
.fpv-wall-title,
.fpv-wall-title span,
.fpv-subtitle,
.fpv-name-row label,
.fpv-review-btn,
.fpv-unsupported,
.fpv-empty,
.fpv-perm-denied,
.counter-unit,
.counter-label,
.song-label,
.song-artist,
.music-info,
.music-info-text,
.music-time,
.photo-card-label,
.video-poster-cta-mark,
.video-theater-eyebrow,
.video-poster-cta-meta,
.video-poster-cta-meta span,
.video-theater-sub,
.video-theater-sub strong,
.partnership-pitch-eyebrow,
.partnership-cta-pill,
.footer-tagline,
.tl-year,
.tl-card-inner p,
.tl-photo-date,
.cd-unit,
.tile-label,
.wish-from,
.gallery-header,
.gallery-header p,
.video-hint,
.demo-footer-note,
.couple-stat-text {
  font-size: var(--sr-min) !important;
  letter-spacing: var(--sr-ls) !important;
}
.demo-footer-note {
  font-size: var(--sr-body-tight) !important;
  letter-spacing: 0.02em !important;
  text-transform: none !important;
}

/* Body / reading copy — ~18–20px */
.letter-body p,
.letter-content p,
.message-body p,
.couple-body p,
.blessing-text,
.scripture-text,
.gb-card-body,
.gb-card-message,
.gb-card p,
.letter-body,
.letter-content,
.message-body,
.wish-text,
.wish-card p,
.story-text,
.story-body p,
.about-text p,
.timeline-text,
.tl-card-inner,
.chapter-body p,
.intro-text,
.hero-tagline,
.hero-content > p:not(.subtitle):not(.hero-soundtrack-note) {
  font-size: var(--sr-body) !important;
  line-height: 1.75 !important;
}

/* Slightly denser body where layout is tight */
.couple-stat-text,
.blessing-text,
.gb-subtitle {
  font-size: var(--sr-body-tight) !important;
}

/* Photo labels that were 8px — keep uppercase but readable */
.photo-card-label:not(.pg-hero .photo-card-label) {
  font-size: var(--sr-min) !important;
  letter-spacing: 0.14em !important;
}

/* Hero scroll hint */
.hero-scroll span {
  font-size: var(--sr-min) !important;
  letter-spacing: 0.18em !important;
}

/* Guestbook / form chrome */
.gb-form-row label,
.gb-form-row input,
.gb-form-row textarea,
.gb-form input,
.gb-form textarea,
.gb-form button,
.gb-submit {
  font-size: var(--sr-min) !important;
}

/* Music bar on samples */
.music-bar,
.music-info,
.music-info-text,
.music-time {
  font-size: var(--sr-min) !important;
}
.music-info,
.music-info-text {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: min(52vw, 22rem) !important;
}
@media (max-width: 600px) {
  .music-info,
  .music-info-text {
    letter-spacing: 0.04em !important;
    max-width: min(48vw, 14rem) !important;
  }
}

/* Gate / enter */
.loader-sub {
  font-size: var(--sr-min) !important;
  letter-spacing: 0.35em !important;
}
.loader-enter {
  font-size: var(--sr-min) !important;
  letter-spacing: 0.35em !important;
  padding: 1rem 2.4rem !important;
}
.loader-enter-arrow {
  font-size: var(--sr-min) !important;
}
.loader-song-hint,
.loader-song-hint em {
  font-size: var(--sr-min) !important;
  line-height: 1.45 !important;
  max-width: 16rem !important;
}

/* Ensure enter gate actually leaves the viewport after dismiss */
.page-loader.hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.page-loader.hidden.is-dismissed,
.page-loader.is-dismissed {
  display: none !important;
}

/* Demo top bar */
.demo-top-bar {
  flex-wrap: wrap !important;
  gap: 0.5rem 1rem !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.demo-top-bar-text {
  font-size: var(--sr-min) !important;
  line-height: 1.4 !important;
}
.demo-top-bar-link {
  font-size: var(--sr-min) !important;
  white-space: nowrap !important;
}

/* Brand / logo — never wrap */
.gb-card-brand,
.nav-logo,
.brand-mark,
.demo-footer a,
.page-footer a {
  white-space: nowrap !important;
}

/* Prevent horizontal overflow from enlarged type */
html,
body {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* Floating chrome clearance on samples with music/chat */
body:has(.music-bar) {
  padding-bottom: 0;
}
body:has(.music-bar) .page-footer,
body:has(.music-bar) .demo-footer,
body:has(.music-bar) footer {
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)) !important;
}
@media (max-width: 768px) {
  body:has(.music-bar) .page-footer,
  body:has(.music-bar) .demo-footer,
  body:has(.music-bar) footer {
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* Charlee birthday timeline dates/years */
.tl-photo-date,
.tl-year {
  font-size: var(--sr-min) !important;
}

/* Forever-pages-demo countdown / tiles */
.cd-unit,
.tile-label,
.wish-from {
  font-size: var(--sr-min) !important;
}

/* Gerald anniversary extras */
.letter-label span,
.song-label,
.song-artist,
.counter-unit,
.counter-label,
.partnership-pitch-eyebrow,
.partnership-cta-pill,
.footer-tagline,
.hero-subtitle {
  font-size: max(var(--sr-min), 0.875rem) !important;
}

/* Voice notes (injected by forever-pages-voice.js) */
.fpv-subtitle,
.fpv-name-row label,
.fpv-wall-title,
.fpv-review-btn {
  font-size: var(--sr-min) !important;
  letter-spacing: var(--sr-ls) !important;
}

/* Charlee: clear floating music control from hero intro on narrow screens */
@media (max-width: 480px) {
  body:has(.music-player) .hero-content {
    padding-bottom: 5.5rem !important;
    padding-right: 4.5rem !important;
    box-sizing: border-box !important;
  }
  body:has(.music-player.visible) .hero {
    padding-bottom: 4rem !important;
  }
}
