/* ============================================================================
   CANVAS STORY, deployed page styles (canvas-story, Link-in-bio): the photos
   ARE the page. A full-frame slide stack (up to 5) auto-advances like a story
   with animated progress hairlines and 600ms crossfades, graded by
   canvas.grade (none/dusk/noir/warm) under a tall multi-stop scrim whose
   strength rides --cv-scrim (canvas.scrim / 100). Identity + links float on
   the lower third: white type, Archivo display cut, frosted white glass at 9%
   and ONE warm accent (--cv-accent) reserved for the kicker tint and the
   dominant CTA bar (link.buttonStyle solid/gradient). Archivo (display) +
   Inter (UI), loaded by the baked HTML's fonts link. Faithful port of the
   cv- block in src/pages/NewEditor/NewEditor.css; KEEP IN PARITY with that
   block and with CanvasPreview.jsx (the markup contract).
   Page-context differences from the editor preview (everything else verbatim):
   - the DOCUMENT scrolls naturally: .cv-scroll is a plain flow column (z 10)
     and the story layers are position: fixed so the photo holds still while
     the page scrolls: stage z 0, grade z 1, scrim z 2, progress z 3, content
     above. (The editor kept the hairlines at z 30 above the sheet; on the
     live page they are photo chrome and the scrolling content passes over
     them.) MOUNTING NOTE: the layers live INSIDE .cv-root, which never gets
     a transform or filter, so position: fixed is viewport-true.
   - editor-only affordances are dropped: the .is-selected outline, the drag
     cursors on .cv-item and .cv-social, and the selection cursor: pointer on
     furniture (kicker, name, handle, bio, progress, empty state, footer).
     Interactive blocks (cta, row, feature, social) keep their pointer
     because gated 18+ blocks render as span wrappers (no href, UA gives
     them no cursor).
   - .ne-frame.is-mobile descendant rules became the @media (max-width:
     520px) block (sibling convention); the editor frame's fake 58px notch
     clearance became real env(safe-area-inset-top/bottom) offsets.
   - desktop (>= 620px) wraps the same canvas into ONE tall centered card
     (520px, radius 34, deep shadow; the Minimal Pro / noir-publisher desktop
     card width) over .cv-backdrop, a viewport-filling blurred STACK of the
     story's photos (.cv-backdrop-slide layers, blur(30px) brightness(0.62)
     on the container + a dark veil, the noir-publisher .nrp-bg-blur +
     .nrp-bg-scrim treatment) that crossfades IN SYNC with the stage (same
     is-active class + 600ms timing, one engine paint drives both). The
     fixed story layers revert to position: absolute inside the card and the
     sheet's photo window becomes 40vh, so the photo lives in the card like
     a story held up over its own afterglow. With no slides the backdrop is
     the plain black floor (no configurable background on canvas).
   - Palette custom properties arrive inline on .cv-root from the client
     (accent, scrim strength); the photo grade arrives as is-grade-* on the
     root, same as the preview.
   VERSION: 1.0
   ========================================================================== */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  min-width: 320px;
  /* base coat under the desktop backdrop (visible only until .cv-backdrop
     paints); the full-bleed root covers it entirely on smaller screens */
  background: #060607;
  color: #ffffff;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
/* client utility (scene convention): hard-hide toggled nodes */
.cv-hidden { display: none !important; }
/* keyboard focus ring in the canvas accent (deploy-only accessibility,
   prototype A11Y spec) */
.cv-root :focus-visible {
  outline: 3px solid var(--cv-accent, #f6a63a);
  outline-offset: 3px;
}

/* ---- Root + tokens ---- */
.cv-root {
  --cv-accent: #f6a63a;
  --cv-scrim: 0.62;
  --cv-ink: #ffffff;
  --cv-dim: rgba(255, 255, 255, 0.68);
  --cv-soft: rgba(255, 255, 255, 0.86);
  --cv-glass: rgba(255, 255, 255, 0.09);
  --cv-glass-hover: rgba(255, 255, 255, 0.15);
  --cv-hairline: rgba(255, 255, 255, 0.17);
  --cv-accent-bright: color-mix(in srgb, var(--cv-accent) 82%, #ffffff);
  --cv-accent-tint: color-mix(in srgb, var(--cv-accent) 52%, #ffffff);
  --cv-cta-ink: #1c1102;
  --cv-ease: cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* NO transform/filter here EVER (fixed layers + the sgate overlay mount
     inside and must stay viewport-true), and NO overflow: hidden outside the
     desktop card mode (the document scrolls). */
  /* the plain black floor under the slides (no configurable background:
     the photos ARE the page; zero slides = black page) */
  background: #060607;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--cv-ink);
  line-height: 1.5;
}
.cv-root ::selection { background: var(--cv-accent); color: #1c1102; }

/* ---- Desktop backdrop (Minimal Pro pattern): a stack of per-slide layers
   (.cv-backdrop-slide), blurred and darkened, fills the viewport behind the
   centered card and CROSSFADES IN SYNC with the story: the client's engine
   toggles the same is-active class on these layers and the stage slides
   from one displayIndex, with the stage's 600ms timing. Blur treatment
   matches noir-publisher (.nrp-bg-blur blur(30px) brightness(0.62) on the
   container, so the whole stack blurs as a group under one unchanged
   recipe, plus the .nrp-bg-scrim veil, here the ::after); the mounting
   follows the shelf .sf-bg-cover idiom (fixed, negative inset + scale so
   the blurred edges never show). The client sets background-image/position
   inline on each layer (never a transform, the overscan must survive);
   with no slides the container mounts empty and the plain black floor
   below paints the stage; one slide (or reduced motion) pins the first
   layer static. Lives INSIDE the transform/filter-free .cv-root, so
   position: fixed is viewport-true and escapes the desktop card's overflow
   clipping; z 0 + first-child order keeps it under the stage. Hidden
   <=619px (window + mobile blocks below) where the story is full-bleed
   anyway. ---- */
.cv-backdrop {
  position: fixed;
  inset: -8%;
  z-index: 0;
  pointer-events: none;
  background: #060607;
  background-size: cover;
  background-position: center;
  filter: blur(30px) brightness(0.62);
  transform: scale(1.12);
}
/* per-slide backdrop layers: the stage crossfade recipe verbatim (same
   is-active class + 600ms timing as .cv-slide) */
.cv-backdrop-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity 600ms var(--cv-ease);
  will-change: opacity;
}
.cv-backdrop-slide.is-active { opacity: 1; }
/* the darkened veil over the blurred photo (noir-publisher scrim ramp);
   z 1 keeps it above the crossfading slide layers */
.cv-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(12, 12, 14, 0.32), rgba(12, 12, 14, 0.68));
}

/* ---- The photo stack: slides + grade + scrim (fixed; the backdrop holds
   still while the document scrolls, shelf convention) ---- */
.cv-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  animation: cv-photo-in 640ms var(--cv-ease) both;
}
.cv-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity 600ms var(--cv-ease);
  will-change: opacity;
}
.cv-slide.is-active { opacity: 1; }
.cv-grade,
.cv-scrim { position: fixed; inset: 0; pointer-events: none; }
.cv-grade { z-index: 1; }
.cv-scrim { z-index: 2; }

/* photo colour grades: filter on the slides + a gradient overlay */
.cv-root.is-grade-dusk .cv-slide { filter: saturate(0.68) contrast(1.05) brightness(0.84); }
.cv-root.is-grade-dusk .cv-grade {
  background: linear-gradient(198deg,
    rgba(21, 29, 46, 0.42) 0%,
    rgba(13, 16, 22, 0.10) 44%,
    rgba(64, 37, 9, 0.20) 82%,
    rgba(64, 37, 9, 0.26) 100%);
}
.cv-root.is-grade-noir .cv-slide { filter: grayscale(0.94) contrast(1.16) brightness(0.86); }
.cv-root.is-grade-noir .cv-grade {
  background: linear-gradient(180deg,
    rgba(6, 7, 9, 0.18) 0%,
    rgba(6, 7, 9, 0.05) 55%,
    rgba(6, 7, 9, 0.22) 100%);
}
.cv-root.is-grade-warm .cv-slide { filter: saturate(1.06) contrast(1.03) brightness(0.92) sepia(0.12); }
.cv-root.is-grade-warm .cv-grade {
  background: linear-gradient(200deg,
    rgba(64, 37, 9, 0.10) 0%,
    rgba(120, 64, 12, 0.14) 60%,
    rgba(140, 74, 16, 0.24) 100%);
}

/* the tall multi-stop story scrim; alphas scale with --cv-scrim and clamp at
   1, so high strengths harden the floor first */
.cv-scrim {
  background: linear-gradient(180deg,
    rgba(7, 8, 10, 0) 0%,
    rgba(7, 8, 10, calc(var(--cv-scrim, 0.62) * 0.03)) 32%,
    rgba(7, 8, 10, calc(var(--cv-scrim, 0.62) * 0.13)) 42%,
    rgba(7, 8, 10, calc(var(--cv-scrim, 0.62) * 0.32)) 51%,
    rgba(7, 8, 10, calc(var(--cv-scrim, 0.62) * 0.61)) 60%,
    rgba(7, 8, 10, calc(var(--cv-scrim, 0.62) * 0.94)) 68%,
    rgba(7, 8, 10, calc(var(--cv-scrim, 0.62) * 1.23)) 77%,
    rgba(7, 8, 10, calc(var(--cv-scrim, 0.62) * 1.42)) 86%,
    rgba(7, 8, 10, calc(var(--cv-scrim, 0.62) * 1.53)) 94%,
    rgba(7, 8, 10, calc(var(--cv-scrim, 0.62) * 1.57)) 100%);
}
/* faint cap so the progress hairlines stay legible on bright skies */
.cv-scrim::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 96px;
  background: linear-gradient(180deg,
    rgba(7, 8, 10, calc(var(--cv-scrim, 0.62) * 0.74)),
    rgba(7, 8, 10, 0));
}

/* ---- Story progress hairlines (fixed photo chrome) ---- */
.cv-progress {
  position: fixed;
  z-index: 3;
  top: 12px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 5px;
}
.cv-progress-seg {
  position: relative;
  height: 2px;
  flex: 1;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}
.cv-progress-seg.is-done { background: rgba(255, 255, 255, 0.92); }
.cv-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.92);
  /* duration comes inline from slideDuration; the client remounts the fill
     node per advance to restart the run */
  animation-name: cv-progress-run;
  animation-timing-function: linear;
  animation-fill-mode: both;
}
@keyframes cv-progress-run { from { width: 0; } to { width: 100%; } }

/* ---- Flow column + bottom-anchored sheet ----
   The page scrolls, not this column: it fills the root (flex: 1) and the
   sheet grows to at least the viewport, never compresses (Bonbon
   load-bearing idiom), so short content still sits on the scrim floor. */
.cv-scroll {
  position: relative;
  z-index: 10;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.cv-sheet {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* the top padding guarantees a photo window above tall content */
  padding: 270px 20px 16px;
  /* frosted follower pill (shared .ne-fpill themed via --fp-*) */
  --fp-bg: rgba(255, 255, 255, 0.09);
  --fp-border: 1px solid rgba(255, 255, 255, 0.2);
  --fp-border-hover: rgba(255, 255, 255, 0.42);
  --fp-text: #ffffff;
  --fp-muted: rgba(255, 255, 255, 0.72);
  --fp-radius: 999px;
}
/* the client may emit these as plain section wrappers (editor drag shells) */
.cv-reorder-stack { display: flex; flex-direction: column; }
.cv-section-item { position: relative; }

/* ---- Identity, lower third ---- */
.cv-kicker {
  margin: 0 0 10px;
  color: var(--cv-accent-tint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: cv-rise 360ms var(--cv-ease) 120ms both;
}
.cv-name {
  font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: #ffffff;
  animation: cv-rise 360ms var(--cv-ease) 140ms both;
}
.cv-handle {
  margin-top: 9px;
  color: var(--cv-dim);
  font-size: 13px;
  font-weight: 600;
  animation: cv-rise 360ms var(--cv-ease) 160ms both;
}
.cv-bio {
  max-width: 330px;
  margin-top: 12px;
  color: var(--cv-soft);
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  animation: cv-rise 360ms var(--cv-ease) 180ms both;
}

/* ---- Links: flat column ---- */
.cv-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 18px;
}
.cv-item { position: relative; }
/* entrance cascade rides the INNER block (editor parity; the wrapper stays
   animation-free) */
.cv-item > * { animation: cv-rise 320ms var(--cv-ease) both; }
.cv-item:nth-child(1) > * { animation-delay: 200ms; }
.cv-item:nth-child(2) > * { animation-delay: 250ms; }
.cv-item:nth-child(3) > * { animation-delay: 300ms; }
.cv-item:nth-child(4) > * { animation-delay: 345ms; }
.cv-item:nth-child(5) > * { animation-delay: 390ms; }
.cv-item:nth-child(6) > * { animation-delay: 430ms; }

/* the ONE dominant CTA bar (buttonStyle solid/gradient) */
.cv-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 20px;
  border-radius: 17px;
  background: var(--cv-accent);
  color: var(--cv-cta-ink);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 18px 34px -20px color-mix(in srgb, var(--cv-accent) 65%, transparent);
  text-decoration: none;
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms var(--cv-ease);
}
.cv-cta:hover { filter: brightness(1.07); transform: translateY(-1px); }
.cv-cta:active { transform: translateY(1px); }
.cv-cta svg { flex: none; }
.cv-cta-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cv-cta-title { overflow-wrap: anywhere; }
.cv-cta-sub { font-size: 12px; font-weight: 600; opacity: 0.72; }

/* quiet frosted glass rows */
.cv-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 16px;
  border: 1px solid var(--cv-hairline);
  border-radius: 17px;
  background: var(--cv-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  font-size: 14px;
  font-weight: 600;
  color: var(--cv-ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms var(--cv-ease);
}
.cv-row:hover {
  background: var(--cv-glass-hover);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}
.cv-row:active { transform: translateY(1px); }
.cv-row-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  color: var(--cv-soft);
}
.cv-row-icon.is-thumb { border-radius: 9px; }
.cv-row-icon img { width: 100%; height: 100%; object-fit: cover; }
.cv-row-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cv-row-copy strong { font-weight: 600; overflow-wrap: anywhere; }
.cv-row-copy small { font-size: 12px; font-weight: 500; color: var(--cv-dim); }
.cv-row-arrow {
  flex: none;
  color: var(--cv-dim);
  transition: color 120ms ease, transform 120ms var(--cv-ease);
}
.cv-row:hover .cv-row-arrow { color: var(--cv-accent-tint); transform: translateX(3px); }

/* featured: taller frosted card, optional cover image */
.cv-feature {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--cv-hairline);
  border-radius: 20px;
  background: var(--cv-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms var(--cv-ease);
}
.cv-feature:hover { background: var(--cv-glass-hover); border-color: rgba(255, 255, 255, 0.28); transform: translateY(-1px); }
.cv-feature:active { transform: translateY(1px); }
.cv-feature-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.cv-feature-media img { width: 100%; height: 100%; object-fit: cover; }
.cv-feature-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.cv-feature-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cv-feature-title { font-size: 15.5px; font-weight: 700; overflow-wrap: anywhere; }
.cv-feature-sub { font-size: 12.5px; color: var(--cv-dim); }
.cv-feature-arrow { flex: none; display: grid; place-items: center; color: var(--cv-dim); }
/* accent finish on an imaged feature: the copy band takes the accent */
.cv-feature.is-solid { background: var(--cv-accent); border-color: transparent; }
.cv-feature.is-solid .cv-feature-sub,
.cv-feature.is-solid .cv-feature-arrow { color: inherit; opacity: 0.72; }

/* gallery: frosted tiles, 2 columns by default */
.cv-gallery { display: flex; flex-direction: column; gap: 8px; }
.cv-gallery-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cv-dim);
}
.cv-gallery-grid {
  display: grid;
  grid-template-columns: repeat(var(--cv-gallery-columns, 2), minmax(0, 1fr));
  gap: 8px;
}
.cv-gallery-tile {
  position: relative;
  border: 1px solid var(--cv-hairline);
  border-radius: 14px;
  overflow: hidden;
  background: var(--cv-glass);
  aspect-ratio: 1 / 1;
}
.cv-gallery-tile img { width: 100%; height: 100%; object-fit: cover; }
.cv-gallery-empty { position: absolute; inset: 0; background: rgba(255, 255, 255, 0.06); }
.cv-gallery-label {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

/* media embeds: the universal engine in a frosted frame */
.cv-media {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--cv-hairline);
  border-radius: 16px;
  background: var(--cv-glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
}
.cv-media-frame {
  width: 100%;
  border: 0;
  border-radius: 10px;
  display: block;
  background: #000000;
  /* deployed fallback only: the client's inline sizing (aspect-ratio or a
     pixel height, or the --cv-media-frame-height var) always wins */
  height: var(--cv-media-frame-height, 220px);
}
.cv-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cv-dim);
  font-size: 13px;
  font-weight: 600;
}
.cv-media-copy { padding: 0 6px 4px; }
.cv-media-title { font-size: 13.5px; font-weight: 700; }
.cv-media-caption { font-size: 12px; color: var(--cv-dim); }

/* header label, quiet text, hairline divider */
.cv-label {
  padding: 6px 2px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cv-dim);
}
.cv-text {
  padding: 2px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--cv-soft);
  white-space: pre-wrap;
}
.cv-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  color: var(--cv-divider-color, rgba(255, 255, 255, 0.38));
}
.cv-divider > span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--cv-divider-color, rgba(255, 255, 255, 0.16));
}
.cv-divider.cv-divider-chars > span {
  width: auto;
  height: auto;
  background: none;
  letter-spacing: 0.35em;
  font-size: 13px;
}

/* ---- Socials + follower pill ---- */
.cv-socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 20px;
  animation: cv-rise 320ms var(--cv-ease) 410ms both;
}
.cv-social {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--cv-hairline);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms var(--cv-ease);
}
.cv-social:hover { background: var(--cv-glass-hover); transform: translateY(-2px); }
.cv-social:active { transform: scale(0.96); }
.cv-social img {
  width: 19px;
  height: 19px;
  object-fit: contain;
  /* full-colour brand marks, house convention (the invert-to-white treatment
     turned detailed logos into blobs on the frosted circles) */
}
.cv-sheet .ne-fpill {
  align-self: center;
  margin-top: 12px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ---- Footer ---- */
.cv-footer {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  animation: cv-rise 320ms var(--cv-ease) 450ms both;
}
.cv-footer-brand { color: #ffffff; }
a.cv-footer-brand:hover { text-decoration: underline; }

/* ---- Empty state ---- */
.cv-empty {
  margin: auto 0;
  padding: 20px 16px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  background: rgba(7, 8, 10, 0.32);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  text-align: center;
}
.cv-empty-title { font-size: 14px; font-weight: 700; color: #ffffff; }
.cv-empty-sub { margin-top: 5px; font-size: 12px; color: var(--cv-dim); }


/* full-bleed window between phone (520) and desktop card (620): no backdrop */
@media (max-width: 619px) { .cv-backdrop, .cv-backdrop-veil { display: none; } }
/* ---- Motion ---- */
@keyframes cv-photo-in { from { opacity: 0.7; transform: scale(1.045); } to { opacity: 1; transform: none; } }
@keyframes cv-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---- Per-link animations (bounce / pulse / glow / shine): the shared
   pc-anim-* classes (pro-card/noir convention, KEEP IN PARITY with
   NewEditor.css). The class sits on the .cv-item wrapper so the inner
   block keeps its cv-rise entrance cascade. ---- */
@keyframes pc-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.pc-anim-bounce { animation: pc-bounce 2s ease-in-out infinite; }
@keyframes pc-scale-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.pc-anim-pulse { animation: pc-scale-pulse 2s ease-in-out infinite; }
.pc-anim-shine { position: relative; overflow: hidden; }
.pc-anim-shine::before {
  content: ''; position: absolute; top: -50%; left: -100%; width: 60%; height: 200%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.03) 75%, transparent 100%);
  transform: skewX(-15deg); animation: pc-shine 4s ease-in-out infinite; z-index: 3; pointer-events: none;
}
@keyframes pc-shine { 0% { left: -100%; opacity: 0; } 10% { opacity: 1; } 50% { left: 100%; opacity: 1; } 55% { opacity: 0; } 100% { left: 100%; opacity: 0; } }
/* Glow: soft pulsing coloured halo; colour from --pc-glow-color (editor control). */
.pc-anim-glow { border-radius: 14px; animation: pc-glow-pulse 2.4s ease-in-out infinite; }
@keyframes pc-glow-pulse {
  0%, 100% { box-shadow: 0 0 12px 2px color-mix(in srgb, var(--pc-glow-color, #e8c6c0) 45%, transparent); }
  50%      { box-shadow: 0 0 28px 6px color-mix(in srgb, var(--pc-glow-color, #e8c6c0) 78%, transparent); }
}

/* ---- MOBILE (replaces the editor's .ne-frame.is-mobile rules): the editor
   frame's fake notch clearance becomes real safe-area offsets ---- */
@media (max-width: 520px) {
  /* the story is full-bleed here; the desktop backdrop never shows */
  .cv-backdrop { display: none; }
  .cv-progress { top: calc(12px + env(safe-area-inset-top, 0px)); }
  .cv-sheet { padding: 320px 18px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .cv-name { font-size: 42px; }
}

/* ---- DESKTOP (>= 620px): the canvas becomes one tall centered card over
   the blurred .cv-backdrop of its own first photo (the Minimal Pro pattern;
   the prototype's 460px card read too thin on flat black, so the card takes
   noir-publisher's desktop width, 520px, and keeps its radius/shadow/ring).
   The fixed story layers revert to absolute so the photo lives INSIDE the
   card; the root card still never gets a transform or filter, so fixed
   layers mounted within (.cv-backdrop, fsheet, sgate) stay viewport-true
   and escape the card's overflow clipping. ---- */
@media (min-width: 620px) {
  body { display: grid; place-items: center; padding: 30px 16px; }
  .cv-root {
    max-width: 520px;
    min-height: min(92vh, 860px);
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 50px 110px -48px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.06);
  }
  .cv-stage,
  .cv-grade,
  .cv-scrim { position: absolute; }
  .cv-progress { position: absolute; top: 14px; left: 18px; right: 18px; }
  .cv-sheet { padding: 40vh 26px 20px; }
}

/* ============================================================================
   Combined follower counter: themed pill (.ne-fpill, via the --fp-* vars set
   on .cv-sheet above) + an ALWAYS DARK breakdown sheet (.ne-fsheet-*).
   KEEP IN PARITY with NewEditor.css.
   ============================================================================ */
.ne-fpill { display: flex; align-items: baseline; justify-content: center; gap: 6px; width: fit-content; margin: var(--fp-margin, 14px auto 0); padding: var(--fp-pad, 8px 16px); background: var(--fp-bg, rgba(0,0,0,0.05)); border: var(--fp-border, 1px solid rgba(0,0,0,0.12)); border-radius: var(--fp-radius, 999px); color: var(--fp-text, inherit); font-family: inherit; line-height: 1; cursor: pointer; transition: border-color .15s, transform .12s, background .15s; }
.ne-fpill:hover { border-color: var(--fp-border-hover, rgba(0,0,0,0.28)); }
.ne-fpill:active { transform: scale(0.97); }
.ne-fpill-num { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.ne-fpill-label { font-size: 12.5px; color: var(--fp-muted, currentColor); opacity: .72; }
.ne-fsheet-overlay { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: flex-end; background: rgba(0,0,0,0.5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.ne-fsheet { width: 100%; max-width: 520px; margin: 0 auto; max-height: 80%; overflow-y: auto; background: #161618; color: #f4f4f6; border-radius: 20px 20px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -16px 44px rgba(0,0,0,0.5); animation: ne-fsheet-up .3s cubic-bezier(.22,.61,.36,1); }
@keyframes ne-fsheet-up { from { transform: translateY(100%); } to { transform: none; } }
.ne-fsheet-grab { width: 38px; height: 4px; border-radius: 999px; background: rgba(255,255,255,0.22); margin: 2px auto 14px; }
.ne-fsheet-total { text-align: center; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.ne-fsheet-sub { text-align: center; font-size: 12.5px; opacity: .6; margin-top: 2px; }
.ne-fsheet-list { display: flex; flex-direction: column; margin-top: 14px; }
.ne-fsheet-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-top: 1px solid rgba(255,255,255,0.08); }
.ne-fsheet-row:first-child { border-top: none; }
.ne-fsheet-ic { width: 28px; height: 28px; flex: none; display: grid; place-items: center; opacity: .85; }
.ne-fsheet-ic img { width: 24px; height: 24px; object-fit: contain; }
.ne-fsheet-name { flex: 1; min-width: 0; font-size: 14.5px; }
.ne-fsheet-count { font-size: 14.5px; font-weight: 700; }
.ne-fsheet-empty { opacity: .6; font-size: 13px; text-align: center; padding: 14px; }
.ne-fsheet-done { width: 100%; margin-top: 16px; min-height: 46px; border: none; border-radius: 12px; background: #ffffff; color: #111111; font-weight: 700; font-size: 14.5px; cursor: pointer; }

/* ---- Inline 18+ warning (adult-flagged LINK blocks) ----
   The client injects .cv-adult-inline INTO the flagged block itself and adds
   has-adult-warning to it, so the block becomes the positioning context and
   the overlay adopts its rounding via border-radius: inherit (fit-wave
   contract, ADULT_WARNING_FIT.md). Canvas skin: near-opaque dark glass over
   the frosted block, accent primary button. Rows (54px) get the compact
   variant keyed below, Portrait convention; the JS measure pass adds
   is-compact / min-height grow for every other short host. */
.has-adult-warning { position: relative; overflow: hidden; }
.cv-adult-inline {
  position: absolute; inset: 0; z-index: 8;
  display: flex; align-items: center; justify-content: center;
  min-height: 100%; padding: 10px;
  background: rgba(10, 11, 15, 0.94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: #ffffff; text-align: center; border-radius: inherit;
}
.cv-adult-inline-inner { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 100%; max-width: 300px; }
.cv-adult-inline-title { display: block; color: #ffffff; font-size: 12px; font-weight: 700; line-height: 1.15; text-transform: uppercase; letter-spacing: 0.04em; }
.cv-adult-inline-body { display: block; color: rgba(255, 255, 255, 0.8); font-size: 11px; font-weight: 500; line-height: 1.28; }
.cv-adult-actions { display: flex; justify-content: center; gap: 8px; width: 100%; }
.cv-adult-btn {
  min-height: 28px; border: none; border-radius: 999px;
  padding: 4px 12px; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700;
}
.cv-adult-btn.secondary { background: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.85); }
.cv-adult-btn.primary { background: var(--cv-accent, #f6a63a); color: var(--cv-cta-ink, #1c1102); }
.cv-row .cv-adult-inline { padding: 7px 10px; }
.cv-row .cv-adult-inline-title { display: none; }
.cv-row .cv-adult-inline-body { color: #ffffff; white-space: nowrap; }
.cv-row .cv-adult-inline-inner { gap: 5px; }
.cv-row .cv-adult-btn { min-height: 21px; padding: 4px 10px; font-size: 10px; }
/* JS fit pass: is-compact lands ON the overlay for ANY host too short for the
   full variant (cta 58px, glass row 54px). Same tight values as the cv-row
   keyed variant above, but the body may wrap and the buttons may stack. */
.cv-adult-inline.is-compact { padding: 7px 10px; }
.cv-adult-inline.is-compact .cv-adult-inline-title { display: none; }
.cv-adult-inline.is-compact .cv-adult-inline-inner { gap: 5px; }
.cv-adult-inline.is-compact .cv-adult-inline-body { color: #ffffff; white-space: normal; }
.cv-adult-inline.is-compact .cv-adult-actions { flex-wrap: wrap; }
.cv-adult-inline.is-compact .cv-adult-btn { min-height: 21px; padding: 4px 10px; font-size: 10px; }

/* FB iOS press-and-hold 18+ confirm (FB_IOS_ADULT_PRESSHOLD.md): the primary
   confirm is a real anchor (long-press opens the native "Open in external
   browser" menu); tap is suppressed and pulses the hint line under the
   buttons. */
.cv-adult-btn.is-holdlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
  text-align: center;
  -webkit-touch-callout: default;
}
.cv-adult-holdhint {
  display: block;
  width: 100%;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}
.cv-adult-holdhint.is-pulsing { animation: bncy-holdpulse 0.6s ease; }
@keyframes bncy-holdpulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .cv-adult-holdhint.is-pulsing { animation: none; }
}

/* ============================================================================
   18+ age gate: CENTERED popup over the whole page (owner-approved mockups,
   template-prototypes/social-18-gate). Markup is shared across all template
   clients (.bncy-sgate-*); this block skins it for THIS design: dark glass
   panel over the photo, hairline border, Archivo display title, solid accent
   Yes button (the cv-cta look). Used for adult PLATFORM SOCIAL icons
   (adult-flagged link blocks use the inline .cv-adult-inline warning above
   instead). The accent var carries a literal fallback on purpose, so the
   skin holds wherever the client mounts the overlay (inside .cv-root per the
   scene convention, or on body).
   ========================================================================== */
.bncy-sgate-overlay {
  position: fixed; inset: 0; z-index: 9990;
  display: flex; align-items: center; justify-content: center; padding: 18px;
  background: rgba(7, 8, 10, 0.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.bncy-sgate {
  width: 300px; max-width: 94vw;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  animation: bncy-sgate-in 0.18s ease;
  background: rgba(16, 17, 22, 0.88);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
  padding: 24px 20px 20px;
  text-align: center;
  color: #ffffff;
}
.bncy-sgate-title {
  color: #ffffff;
  font-family: 'Archivo', 'Inter', system-ui, sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.bncy-sgate-body {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.5;
}
.bncy-sgate-btns { display: flex; gap: 9px; justify-content: center; margin-top: 16px; }
.bncy-sgate-btns button { flex: 1 1 0; }
.bncy-sgate-no {
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  min-height: 38px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.bncy-sgate-no:hover { border-color: rgba(255, 255, 255, 0.34); background: rgba(255, 255, 255, 0.15); }
.bncy-sgate-yes {
  background: var(--cv-accent, #f6a63a);
  color: #1c1102;
  border: none;
  border-radius: 999px;
  min-height: 38px;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 120ms ease, transform 120ms ease;
}
.bncy-sgate-yes:hover { filter: brightness(1.07); }
.bncy-sgate-yes:active { transform: scale(0.97); }
@keyframes bncy-sgate-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
/* FB iOS press-and-hold: the Yes control renders as a real anchor + hint. */
a.bncy-sgate-yes { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; text-decoration: none; text-align: center; -webkit-touch-callout: default; }
.bncy-sgate-holdhint { display: block; margin-top: 10px; color: rgba(255, 255, 255, 0.7); font-size: 11px; font-weight: 500; line-height: 1.35; text-align: center; }
.bncy-sgate-holdhint.is-pulsing { animation: bncy-holdpulse 0.6s ease; }
@media (prefers-reduced-motion: reduce) { .bncy-sgate-holdhint.is-pulsing { animation: none; } }

/* ---- Reduced motion kill switch ---- */
@media (prefers-reduced-motion: reduce) {
  .cv-root *,
  .cv-root *::before,
  .cv-root *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .cv-root .cv-cta:hover,
  .cv-root .cv-cta:active,
  .cv-root .cv-row:hover,
  .cv-root .cv-row:active,
  .cv-root .cv-row:hover .cv-row-arrow,
  .cv-root .cv-feature:hover,
  .cv-root .cv-feature:active,
  .cv-root .cv-social:hover,
  .cv-root .cv-social:active { transform: none; }
  /* per-link animations (noir parity): loops off, glow keeps a static halo */
  .pc-anim-bounce, .pc-anim-pulse { animation: none !important; }
  .pc-anim-shine::before { display: none; }
  .pc-anim-glow { animation: none !important; box-shadow: 0 0 16px 2px color-mix(in srgb, var(--pc-glow-color, #e8c6c0) 55%, transparent); }
  /* overlays that may mount outside .cv-root (sibling parity) */
  .ne-fsheet { animation: none; }
  .bncy-sgate { animation: none; }
}
