* {
  box-sizing: border-box;
  /* Kill the grey tap-flash mobile browsers paint on tappable elements. */
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary-color: #4c7cf5;
  --primary-light: #e8f1ff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow: 0 1px 3px rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}

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

button,
input {
  font: inherit;
}

/* Tappable elements: no long-press text selection or iOS callout menu.
   Body text (headings, bio description) stays selectable for copying. */
a,
button {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.bio-public {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  background: var(--gray-50);
}

/* Desktop-only scan-to-open QR badge. Hidden by default (mobile, editor
   preview); the desktop layout block (min-width:760px) overrides to flex. */
.bio-qr-badge { display: none; }

.phone-inner {
  --primary-color: var(--bio-accent, #4c7cf5);
  /* Readable label colour for anything filled with the accent. White was
     hardcoded, which is unreadable on a light accent — Charcoal's #fafafa put
     white text on near-white and the label vanished (1.04:1). 24 of the 29
     catalog accents actually need black, and the accent is user-editable, so
     it has to be derived rather than tabulated. See the @supports block below;
     this literal is the pre-relative-colour fallback and matches the old
     behaviour exactly. */
  --bio-accent-fg: #fff;
  /* People paste raw URLs as titles. Without this a single unbreakable token
     pushes the profile name, section headers and share CTA past the frame and
     gives the whole page 302px of horizontal scroll. `anywhere` rather than
     `break-word` on purpose: only `anywhere` also shrinks min-content size, so
     flex and grid containers stop being forced wide by the token. Inherited,
     so this one declaration covers every label below it. */
  overflow-wrap: anywhere;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  padding: max(28px, env(safe-area-inset-top)) 14px max(22px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #eef4ff 0%, #fff 320px);
  position: relative;
}

/* Derive black-or-white from the accent's own lightness.
   `calc((48 - l) * infinity)` drives the result to ±infinity, which clamps to
   L=100 (white) for accents darker than the threshold and L=0 (black) for
   lighter ones — no colour in between is ever produced.
   48 is not arbitrary: tools/bio-audit/palette-lint.mjs computes the WCAG-best
   foreground for every catalog accent, and a sweep of thresholds showed 47.5–49
   is the only band where the CSS agrees with WCAG on all 29. At 48 the worst
   case is Lavender at 4.70:1; every palette clears 4.5:1. */
@supports (color: lch(from red calc((48 - l) * infinity) 0 0)) {
  .phone-inner,
  .bio-sheet-scope {
    --bio-accent-fg: lch(from var(--bio-accent, #4c7cf5) calc((48 - l) * infinity) 0 0);
  }
}

/* ── Interaction vocabulary ────────────────────────────────────────────────
   ONE gesture for every tappable surface on the page. These grew apart per
   component (-1px here, -2px there, four different shadow recipes), so a link
   row, an Amazon card and a tour date all animated differently for the same
   user intent. Anything that is pressed now reads from these.

   Two shadows, not one: a card-coloured surface needs a neutral drop shadow,
   while an accent-FILLED control (link buttons, "Listen on X", Subscribe) wants
   the glow tinted with its own colour — a black shadow under a saturated fill
   reads as dirt. */
.phone-inner {
  /* Row rhythm. Every page-level "one tap goes to one destination" row reads
     this floor, so a link row, a tour date, a "Listen on Spotify" row and a
     dropdown bar are the same height instead of 47/50/56/58. The value is
     34px of fixed chrome (padding + borders) plus ONE line that tracks
     --bio-fs: rows whose height comes from a fixed-px child (a 32px thumb, a
     24px DSP logo, the 24px chevron chip) then grow at the same rate as the
     rows whose height comes from their label, which is what actually pulled
     them apart at the large text-size settings. */
  --bio-row-min: calc(34px + var(--bio-fs, 1) * 16px);
  /* Minimum tap target. A finger is a physical size, so unlike --bio-row-min
     this must NOT scale with type. */
  --bio-tap-min: 44px;
  /* Resting depth for a card-coloured surface. One flat 1px shadow left a
     white card on a pale background with no edge at all; a contact shadow
     plus a wide, tucked-under one gives it a floor to sit on without a visible
     halo. Black, not tinted: on a dark page a tinted shadow would glow. */
  --bio-rest-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 8px 18px -12px rgb(0 0 0 / .2);
  --bio-lift: -1px;
  --bio-lift-shadow: 0 2px 4px rgb(0 0 0 / .06), 0 12px 24px -10px rgb(0 0 0 / .26);
  --bio-lift-shadow-accent: 0 6px 18px -6px color-mix(in srgb, var(--bio-accent, #4c7cf5) 55%, transparent);
  --bio-focus-ring: 2px solid var(--bio-accent, #4c7cf5);
}

#populatedContent {
  width: min(100%, 360px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  /* Vertical spacing between blocks. Driven by the Theme "Block spacing"
     slider via --bio-gap (10–38px); 14px when unset. */
  gap: var(--bio-gap, 14px);
}

/* Footer region (Amazon disclosure + "Build yours with LinkTwin" pill + the
   Report · Privacy links) sits at the BOTTOM of the screen, not directly under
   the last block. .phone-inner owns the height (100vh mobile / 560px editor
   mock) but is a block box, so #populatedContent has to be made a stretching
   flex child before margin-top:auto has any free space to eat. On the desktop
   public page #populatedContent is a floating auto-height card (see the
   min-width:760px block) — there margin-top:auto resolves to 0 and the footer
   keeps sitting right under the content, which is what that layout wants. */
.phone-inner {
  display: flex;
  flex-direction: column;
}
.phone-inner > #populatedContent {
  flex: 1 1 auto;
  min-height: 0;
}
.bio-page-footer {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

.phone-inner[data-theme-bg="gradient-blue"] {
  background: linear-gradient(180deg, #eef4ff 0%, #fff 320px);
}

.phone-inner[data-theme-bg="white"] {
  background: #fff;
}

.phone-inner[data-theme-bg="dark"] {
  background: linear-gradient(135deg, #1f2937, #111827);
}

.phone-inner[data-theme-bg="peach"] {
  background: linear-gradient(135deg, #fce7f3, #fbcfe8);
}

/* Preset themes (each pairs with a coupled accent set via the theme picker) */
.phone-inner[data-theme-bg="indigo"] { background: linear-gradient(160deg, #e9edff, #f5f7ff); }
.phone-inner[data-theme-bg="mono"]   { background: linear-gradient(160deg, #eef0f3, #fafafa); }
.phone-inner[data-theme-bg="sunset"] { background: linear-gradient(160deg, #fde8d8, #fbf3ea); }
.phone-inner[data-theme-bg="mint"]   { background: linear-gradient(160deg, #e2f5ec, #f1faf6); }
.phone-inner[data-theme-bg="rose"]   { background: linear-gradient(160deg, #fde2ec, #fbecf3); }

/* Custom background: the editor stores ONE base colour (--bio-bg) and we
   auto-derive the soft two-stop gradient from it (lighten ~30% toward white),
   mirroring the look of the named presets above without a second picker. */
.phone-inner[data-theme-bg="custom"] {
  background: linear-gradient(160deg, var(--bio-bg, #eef4ff), color-mix(in srgb, var(--bio-bg, #eef4ff) 70%, #fff));
}

.phone-inner[data-theme-font="sans"] {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.phone-inner[data-theme-font="serif"] {
  font-family: Georgia, "Times New Roman", serif;
}

/* Curated Google Font ("g:Family") — the stack is supplied inline as
   --bio-font-family by BioPageRenderer::themeAttrs (closed allowlist). These
   render at face value; the handwritten optical tuning above does not apply. */
.phone-inner[data-theme-font="custom"] {
  font-family: var(--bio-font-family, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

/* Heading (primary) font — an optional SECOND family scoped to the profile name
   and every block/section heading. The stack is supplied inline as
   --bio-heading-font-family by BioPageRenderer::themeAttrs (closed allowlist,
   legacy or curated). When the var is absent (no heading font chosen), `inherit`
   falls back to the body font cascading from .phone-inner — the historic
   single-font look, so existing bios are unaffected.
   Scope = name + titles (matches the editor's "Name & titles" sub-label):
   the Heading text block (.section-header), the links-group title, and the
   heading of every block that has one (email capture, contact, tour, music,
   video, calendly). Link-button labels stay on the body font for readability. */
.bio-name,
.bio-link-section-title,
.section-header,
.bio-email-heading,
.bio-contact-title,
.bio-tour-title,
.bio-music-title,
.bio-video-title,
.bio-cald-title {
  font-family: var(--bio-heading-font-family, inherit);
}

.phone-inner[data-theme-font="display"] {
  font-family: Poppins, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.phone-inner[data-theme-font="mono"] {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.phone-inner[data-theme-font="handwritten"] {
  font-family: Caveat, "Comic Sans MS", cursive;
  /* Caveat is a light, slanted script — at the same px it reads smaller and
     fainter than the bold sans/display families, so the name and labels look
     undersized. font-size-adjust forces the x-height up, which acts on the font
     itself and so lifts EVERY element uniformly (--bio-fs body text and fixed-px
     widget labels alike), not just the ones that opt into the size variable.
     0.62 ≈ Caveat's natural ratio (~0.5) scaled up ~1.2x to match the prominence
     of the other families. Tune to taste; lower = smaller. Browsers without
     support fall back to the un-bumped look. */
  font-size-adjust: 0.62;
}

/* Icon fonts must opt OUT of the handwritten optical scale. font-size-adjust is
   inherited, and icon glyphs (Material Symbols, Font Awesome) fill the em box —
   a large intrinsic x-height — so the adjustment shrinks them. This bites the
   editor chrome too (FABs, block tools, chevrons all live inside .phone-inner).
   Pin icons back to their literal font-size in every font mode. */
.phone-inner .material-symbols-outlined,
.phone-inner .material-symbols-rounded,
.phone-inner .material-symbols-sharp,
.phone-inner i {
  font-size-adjust: none;
}

/* Caveat is a slanted script: its descenders (g, y, p, parens) ink just past a
   tight numeric line-box, so on titles that clip (overflow:hidden, needed for
   the line-clamp / ellipsis) the tails get sheared off — "Sugar" reads as
   "Suqar". A roomier line-height seats the descender INSIDE the line-box.
   Handwritten only; the other families fit their line-box and are spacing-tuned.
   No padding-bottom here — that extends the clip region past the box and exposes
   the top of the next clamped line. */
.phone-inner[data-theme-font="handwritten"] .bio-music-title,
.phone-inner[data-theme-font="handwritten"] .amazon-title,
.phone-inner[data-theme-font="handwritten"] .bio-video-title,
.phone-inner[data-theme-font="handwritten"] .bio-link-row-title {
  line-height: 1.6;
}

.bio-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  /* --bio-profile-top (px, default 0) is the user-set "space above" the
     avatar/name/bio cluster, additive to the layout's default top padding. */
  padding: calc(10px + var(--bio-profile-top, 0px)) 0 14px;
  text-align: center;
}

/* Hero cover banner — full-bleed 4:1 image above the avatar. The avatar
   pulls up to overlap the banner's lower edge (Linktree-style header). */
.bio-cover {
  /* Bleed past the .phone-inner padding (28px top / 14px sides) so the
     banner reaches the device edges. #populatedContent is ≤360px centered,
     so 100vw is clamped by max-width — calc against the content box. */
  width: calc(100% + 28px);
  margin: -28px -14px 0;
  aspect-ratio: 4 / 1;
  background-size: cover;
  background-position: center;
  background-color: var(--gray-100);
}

.bio-profile--hero {
  padding-top: 0;
  gap: 8px;
}

.bio-profile--hero .bio-avatar {
  margin-top: -36px;
}

/* Portrait layout — the header photo IS the header: a full-bleed image with the
   avatar/name/tagline/socials cluster overlaid at its BOTTOM over a dark
   gradient. Built as a 1-cell grid: a ::before spacer holds the photo's crop
   ratio (the MINIMUM height) and the .bio-portrait-content cluster shares that
   same cell, pinned to the bottom (align-self:end). Because a grid cell sizes to
   max(spacer, content), a short bio sits at the bottom over a tall photo, and a
   long bio grows the box DOWNWARD instead of clipping the avatar off the top.
   The photo itself is an absolute layer (.bio-portrait, inset:0) that fills the
   grown box. */
.bio-profile--portrait {
  position: relative;
  display: grid;
  /* Bleed past the .phone-inner padding, same mechanics as .bio-cover. */
  width: calc(100% + 28px);
  margin: -28px -14px 0;
  /* No padding/gap here — the cluster carries its own; the spacer owns height. */
  padding: 0;
  overflow: hidden;
}

/* Public page on a phone: the column is capped at 360px, but phones are wider
   (393–430px), so "column + 28px" left a 2–21px strip of page background on
   each side of the header (Banner, Overlay and Combined alike). Bleed to the viewport instead; the column is
   centred, so half the difference either way lands on the screen edges.
   .phone-inner clips the few px a desktop scrollbar adds to 100vw. Public only:
   the editor's phone mock (no .bio-public) is exactly column + 28px wide, and
   the desktop card (min-width:760px) keeps its own geometry. */
@media (max-width: 759px) {
  .bio-public .bio-cover,
  .bio-public .bio-profile--portrait,
  .bio-public .bio-profile--combined .bio-portrait {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }
  .bio-public .phone-inner { overflow-x: clip; }
}

/* Ratio spacer: enforces the photo's height as the cell MINIMUM (so the box is
   at least one crop tall) while letting the cluster grow it. The ratio arrives
   inline as --bio-portrait-ratio (per cfg.portrait_ratio); 4/5 is the no-JS
   fallback. Must NOT live as aspect-ratio on the box itself, or the box height
   becomes definite and stops growing with the content. */
.bio-profile--portrait::before {
  content: '';
  grid-area: 1 / 1;
  aspect-ratio: var(--bio-portrait-ratio, 4 / 5);
  /* "Space above" adds to the photo's height too, not just to the cluster's
     padding: otherwise the bottom-pinned cluster never moves on a tall cover
     (its padding stays inside the photo's height and the slider is dead). */
  margin-top: var(--bio-profile-top, 0px);
}

/* Cluster wrapper: inert everywhere by default (children act as direct
   .bio-profile items → classic/banner layouts unchanged). The --portrait rule
   below promotes it to the real bottom-pinned grid cell. */
.bio-portrait-content { display: contents; }

.bio-profile--portrait .bio-portrait-content {
  grid-area: 1 / 1;          /* same cell as the spacer → cell = max(both) */
  align-self: end;           /* pin the cluster to the photo's bottom */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  /* Top padding becomes the avatar's margin from the top edge once a long bio
     grows the box; bottom padding lifts the socials off the edge.
     --bio-profile-top (px, default 0) adds the user-set "space above". */
  padding: calc(28px + var(--bio-profile-top, 0px)) 14px 18px;
  text-align: center;
  position: relative;        /* paint above the absolute .bio-portrait photo */
  z-index: 1;
}

.bio-profile--portrait .bio-avatar { margin-bottom: 4px; }

.bio-portrait {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--gray-100);
  /* Dissolve the photo's bottom edge into whatever theme background sits
     behind it (mask reveals the real bg, so gradients work too) instead of
     ending on a hard line — the link.me look. Eased over ~160px: still ~55%
     opaque under the socials, fully gone at the edge; the name/tagline zone
     above stays fully backed. */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 160px), rgb(0 0 0 / 0.55) calc(100% - 64px), transparent);
          mask-image: linear-gradient(to bottom, #000 calc(100% - 160px), rgb(0 0 0 / 0.55) calc(100% - 64px), transparent);
}

.bio-portrait-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bio-portrait-vid.is-fallback {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  /* Kill the motion up front (before the JS fallback runs); the poster still —
     the .bio-portrait background-image — shows through. */
  .bio-portrait-vid { display: none; }
}

.bio-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 45%, rgb(0 0 0 / 0.72));
  pointer-events: none;
}

/* Combined layout — a ratio-driven full-bleed HEADER photo at the TOP (the
   portrait look as a finite in-flow block, not an absolute fill), a circular
   avatar straddling its lower edge, then name/tagline/socials in NORMAL flow
   below on the theme background. Unlike --portrait the text is NOT over the
   image, so no mask/scrim and no white-text override — derived when BOTH a
   header image and an avatar are present. */
.bio-profile--combined {
  padding-top: 0;            /* header bleeds to the top edge, like --hero */
  gap: 8px;
}

/* Header block: in-flow (NOT absolute), full-bleed, ratio-driven height. Same
   bleed mechanics as --portrait (28px top / 14px sides). The aspect-ratio is
   supplied inline per cfg.portrait_ratio; 4/5 here is just a no-JS fallback. */
.bio-profile--combined .bio-portrait {
  /* relative (not static): stays in normal flow as a top band, but is the
     containing block for the absolute .bio-portrait-vid — otherwise a header
     video escapes to #populatedContent / .phone-inner and covers the page. */
  position: relative;
  inset: auto;
  width: calc(100% + 28px);
  margin: -28px -14px 0;
  aspect-ratio: 4 / 5;
  /* No dissolve: the header ends on the theme background as a clean block edge,
     because content sits below it rather than over it. */
  -webkit-mask-image: none;
          mask-image: none;
}

/* Drop the dark portrait scrim — text no longer sits on the image. */
.bio-profile--combined .bio-portrait::after { content: none; }

/* Avatar straddles the header's bottom edge (same overlap idiom as --hero):
   half of it over the seam, so the overlap scales with the chosen size. */
.bio-profile--combined .bio-avatar {
  margin-top: calc(var(--bio-av, 84px) / -2);
  position: relative;
  z-index: 1;
}

/* Avatar diameter is a per-profile size tier (cfg.avatar_size → bio-av-* class
   on .bio-profile). Applies the same in classic / overlay / banner. */
.bio-profile.bio-av-small  { --bio-av: 64px; }
.bio-profile.bio-av-medium { --bio-av: 108px; }
.bio-profile.bio-av-large  { --bio-av: 152px; }

.bio-avatar {
  width: var(--bio-av, 84px);
  height: var(--bio-av, 84px);
  flex-shrink: 0;   /* never let the flex column squash it into an ellipse/sliver */
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: calc(var(--bio-fs, 1) * 26px);
  font-weight: 600;
  border: 3px solid #fff;
  /* The avatar is the one thing on the page that should clearly float. */
  box-shadow: 0 1px 3px rgb(0 0 0 / .10), 0 10px 22px -10px rgb(0 0 0 / .32);
}

.bio-name {
  /* --bio-name-scale (per-element, 0.7–1.6) multiplies on top of the theme's
     overall --bio-fs so the name scales proportionally with the chosen text size. */
  font-size: calc(var(--bio-fs, 1) * var(--bio-name-scale, 1) * 17px);
  line-height: 1.25;
  font-weight: 700;
  /* A long name breaks into even lines instead of leaving one word alone. */
  text-wrap: balance;
  /* Colour precedence: per-element --bio-name-color → legacy combined
     --bio-profile-text → theme body colour --bio-text → default ink. */
  color: var(--bio-name-color, var(--bio-profile-text, var(--bio-text, var(--gray-900))));
}

.bio-tagline {
  padding: 0 20px;
  font-size: calc(var(--bio-fs, 1) * var(--bio-bio-scale, 1) * 13px);
  line-height: 1.45;
  /* No orphaned last word under a centred tagline. `pretty`, not `balance`:
     the owner's own line breaks (pre-line below) must stay where they are. */
  text-wrap: pretty;
  color: var(--bio-bio-color, var(--bio-profile-text, var(--bio-text, var(--gray-600))));
  white-space: pre-line;   /* keep user's line breaks; collapse runs of spaces */
}

.bio-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

.bio-social {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  text-decoration: none;
  transition: transform .12s ease, opacity .12s ease;
}
/* Ink for the Plain style (tiles/brand paint over this). Two classes on purpose:
   the editor stylesheet's `.phone-inner a { color: inherit }` is (0,1,1) and
   outranked a bare `.bio-social`, so inside the editor canvas — and the theme
   mockup — the marks took the surrounding DASHBOARD's text colour instead of
   their own. With a dark dashboard over a light palette that is near-invisible.
   The value tracks the palette (like the plain-text block at --bio-text below):
   a fixed --gray-700 also disappeared on every dark palette, since those set
   --bio-text but still render as data-theme-bg="custom", so the
   [data-theme-bg="dark"] override further down never fires for them.
   Tile/brand (0,3,0) and the dark/linktwin/portrait overrides still win. */
.bio-socials .bio-social {
  color: var(--bio-text, var(--gray-700, #374151));
}
/* The mark stays 38px — this row is an identity strip, not a button bar, and
   growing the circles would dominate the header. The TAP area is what has to
   clear 44px, so it is expanded invisibly instead: 38 + 3px on each side. The
   icons sit 10px apart, so neighbouring hit areas still cannot overlap. */
.bio-social::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
}
@media (hover: hover) {
  .bio-social:hover { transform: translateY(var(--bio-lift)); opacity: .85; }
}
.bio-social i { font-size: 20px; line-height: 1; color: inherit; }
.bio-social img { width: 24px; height: 24px; object-fit: contain; }
.bio-social .bio-social-mk {
  width: 22px; height: 22px; display: inline-block;
  background: currentColor;
  -webkit-mask: var(--mk) center / contain no-repeat;
          mask: var(--mk) center / contain no-repeat;
}
/* Icon glyph/image is decoration — let the tap fall through to the anchor so
   long-press can't fire the iOS image callout, selection, or a drag ghost. */
/* Contact / Calendly as a socials-row icon (cfg.placement === 'socials'):
   a <button> on the public page, so strip the UA button chrome. The tiles and
   brand styles still paint over this (higher specificity). */
button.bio-social {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}
.bio-social svg { width: 20px; height: 20px; }
/* Editor: the icon sits inside its widget's .block (click → edit modal). */
.bio-socials .block { padding: 0; margin: 0; width: auto; border-radius: 50%; }
.bio-social i,
.bio-social img,
.bio-social svg,
.bio-social .bio-social-mk {
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none;
}

/* A — colour tiles: white tile + full-colour logo / brand-colour mark */
.bio-socials[data-social-style="tiles"] .bio-social {
  background: #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.18);
  color: var(--brand, #374151);
}

/* B — brand tiles: brand-colour tile + white glyph */
.bio-socials[data-social-style="brand"] .bio-social {
  background: var(--brand, #374151);
  color: var(--glyph, #fff);
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.18);
}

.bio-blocks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.block {
  background: #fff;
  box-shadow: var(--bio-rest-shadow, 0 1px 3px rgba(0, 0, 0, .06));
  border-radius: var(--r-card, 14px);
  padding: 0;
  position: relative;
  overflow: hidden;
}

.bio-public-block {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.section-header {
  font-size: calc(var(--bio-fs, 1) * 13px);
  font-weight: 700;
  /* Explicit, so the editor canvas (which would otherwise inherit the
     dashboard's 45px line-height) and the public page wrap a long heading
     with the same leading. */
  line-height: 1.2;
  color: var(--bio-text, var(--gray-900));
  margin: 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Lines typed with Enter are stored as \n: keep them, like .bio-text-body. */
.section-header-text {
  white-space: pre-wrap;
}

.section-header + .block {
  margin-top: -16px;
}

.bio-profile + .block {
  margin-top: 0;
}

.section-header--large {
  font-size: calc(var(--bio-fs, 1) * 15px);
}

.section-header--medium {
  font-size: calc(var(--bio-fs, 1) * 13px);
}

.section-header--small {
  font-size: calc(var(--bio-fs, 1) * 11px);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--gray-700);
}

/* Heading Bold toggle: bold (700) is the default; an explicit "normal" override
   drops the heading to a regular weight. */
.section-header--weight-normal {
  font-weight: 400;
}

.section-header--align-left {
  justify-content: flex-start;
}

/* justify-content places the icon + text row; text-align lines up the lines
   of a heading that wraps (inherited by .section-header-text). */
.section-header--align-center {
  justify-content: center;
  text-align: center;
}

.section-header--align-right {
  justify-content: flex-end;
  text-align: right;
}

/* Heading block: per-block pixel size, optional colour, and optional
   icon/emoji (applies on the editor canvas and the public page alike). The
   attribute selector outranks the legacy .section-header--large/medium/small
   font-size so old bios that still carry those classes are unaffected. */
.section-header[style*="--bio-head-fs"] { font-size: var(--bio-head-fs); }
.bio-head-iconwrap { display: inline-flex; align-items: center; line-height: 0; }
.bio-head-iconwrap .material-symbols-outlined { font-size: 1.1em; line-height: 1; }

.bio-text-body {
  /* Per-block font size set via --bio-text-fs (editor slider + renderer),
     still scaled by the theme's global --bio-fs. Falls back to 13px. */
  font-size: calc(var(--bio-fs, 1) * var(--bio-text-fs, 13px));
  line-height: 1.5;
  /* Key the body colour on the theme's text colour so it adapts to dark
     palettes (Midnight, Charcoal, …). Palette themes set --bio-text; legacy
     pages without it fall back to gray-700 (and the [data-theme-bg=dark]
     override below still flips plain text to white). */
  color: var(--bio-text, var(--gray-700));
  white-space: pre-wrap;
}

/* Body-text lists (ul/ol/li from the WYSIWYG). white-space:normal inside the
   list so pre-wrap newlines around it don't add stray gaps; explicit list-style
   restores bullets/numbers in case a theme reset stripped them. Alignment is
   inherited from the .bio-text-body--align-* class. */
.bio-text-body ul,
.bio-text-body ol {
  white-space: normal;
  margin: 4px 0;
  /* Marker inside the content box, no gutter: the block's font size is
     user-scalable (11–28px, times the theme's --bio-fs), so any fixed outside
     indent is either too narrow (marker spills out of the card) or, once wide
     enough for the largest size, a big dead margin at the small ones. */
  list-style-position: inside;
  padding-left: 0;
  text-align: inherit;
}
/* position in the shorthand: a bare `list-style: disc` would reset it to outside */
.bio-text-body ul { list-style: disc inside; }
.bio-text-body ol { list-style: decimal inside; }
.bio-text-body li { margin: 2px 0; }
/* Centre / right alignment: pull the marker inside the text flow and drop the
   left indent so the bullet/number rides with the centred (or right-aligned)
   text instead of floating at the far left. text-align is inherited from the
   .bio-text-body--align-* class on the block. */
.bio-text-body--align-center ul,
.bio-text-body--align-center ol,
.bio-text-body--align-right ul,
.bio-text-body--align-right ol {
  list-style-position: inside;
  padding-left: 0;
}

.bio-text-body--small {
  font-size: calc(var(--bio-fs, 1) * 11px);
}

.bio-text-body--medium {
  font-size: calc(var(--bio-fs, 1) * 13px);
}

.bio-text-body--large {
  font-size: calc(var(--bio-fs, 1) * 15px);
}

.bio-text-body--bold {
  font-weight: 700;
}

.bio-text-body--align-left {
  text-align: left;
}

.bio-text-body--align-center {
  text-align: center;
}

.bio-text-body--align-right {
  text-align: right;
}

/* Flat widgets (heading, divider, plain text): no white .block surface and
   no overflow clipping — they're too short for the editor toolbar otherwise. */
.block.bio-flat-block {
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

/* Plain text sits on the PAGE background (not on a card) — key its colour on
   the page bg, not the card style: immersive cards can pair with light pages. */
.phone-inner[data-theme-bg="dark"] .bio-text-block--plain .bio-text-body,
.phone-inner[data-theme-bg="linktwin"] .bio-text-block--plain .bio-text-body {
  color: rgb(255 255 255 / .85);
}

.bio-text-body--bg-card {
  /* Theme-adaptive card fill: a translucent tint of the page's text colour, so
     it reads as a subtle card on EVERY palette — a soft dark tint on light
     pages, a soft light tint on dark palettes (Midnight/Charcoal/…). Replaces
     the old hardcoded white --gray-50, which clashed on dark custom palettes
     (they set data-theme-bg="custom", not "dark", so the override below never
     fired). Falls back to gray-900 for legacy pages with no --bio-text. */
  background: color-mix(in srgb, var(--bio-text, var(--gray-900)) 8%, transparent);
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

/* Legacy keyword "dark"/"linktwin" pages carry no --bio-text, so the
   color-mix above would tint dark-on-dark (invisible). Keep the explicit
   glassy white card for them. */
.phone-inner[data-theme-bg="dark"] .bio-text-body--bg-card,
.phone-inner[data-theme-bg="linktwin"] .bio-text-body--bg-card {
  background: rgb(255 255 255 / .12);
  color: #fff;
  box-shadow: none;
}

/* Free background colour (chosen via the formatting toolbar). The colour
   itself is set inline (background-color); this only supplies the card
   padding/radius so text doesn't sit flush against the fill edge. Applies
   to both the Text body and the Heading. */
.bio-text-body--bg-custom,
.section-header--bg-custom {
  border-radius: 10px;
  padding: 12px;
}

.bio-divider {
  padding: 6px 0;
}

.bio-divider .bio-divider-line {
  /* Reads as a real separator, not a barely-there hairline. .14 was too soft
     for the job people use a divider for. Keyed on the theme text colour so a
     dark palette (Midnight, Charcoal, …: data-theme-bg="custom" with a light
     --bio-text) gets a light rule; pages without --bio-text keep the legacy
     black .55. */
  --bio-divider-color: color-mix(in srgb, var(--bio-text, #000) 55%, transparent);
  border: 0;
  /* Theme-keyed hairline: a translucent version of the page foreground, NOT a
     fixed gray. Light pages get a subtle dark rule; dark/immersive pages flip
     to a translucent white one below — same convention as .bio-text-block.
     Neutral on purpose (accent-tinted dividers read as noise). */
  border-top: 1px solid var(--bio-divider-color);
  margin: 0;
  /* Neutralise Bootstrap's `hr` reboot (the25-app.css, loaded by the dashboard
     layout on the editor page only — the public page doesn't load Bootstrap).
     Bootstrap sets `background-color: currentColor; opacity: .25` on every
     <hr>, which fills this element's box with a solid currentColor bar and
     drowns the dashed/dotted/space variants. The public page is unaffected
     (no Bootstrap), so these are a harmless no-op there. */
  background-color: transparent;
  opacity: 1;
}

.phone-inner[data-theme-bg="dark"] .bio-divider .bio-divider-line,
.phone-inner[data-theme-bg="linktwin"] .bio-divider .bio-divider-line {
  /* .20 read too soft on the dark gradient — bumped so it registers as a real
     separator against #1f2937/#111827. */
  --bio-divider-color: rgb(255 255 255 / .75);
  border-top-color: var(--bio-divider-color);
}

.bio-divider--solid .bio-divider-line {
  border-top-style: solid;
}

.bio-divider--dashed .bio-divider-line {
  border-top-style: dashed;
}

.bio-divider--dotted .bio-divider-line {
  border-top: 0;
  height: 3px;
  background-image: radial-gradient(circle, var(--bio-divider-color) 1px, transparent 1.25px);
  background-repeat: repeat-x;
  background-position: left center;
  background-size: 7px 3px;
}

.bio-divider--space .bio-divider-line {
  border-top: 0;
  height: 14px;
}

/* "Space" is a blank gap, so border-top-width (what Thickness normally sets) is
   invisible — the control would be dead. Map Thickness to the gap HEIGHT instead
   so thin/medium/thick actually change the spacing. Compound parent selector
   (0,3,0) outranks the plain --space rule (0,2,0) above. */
/* Heights sit ON TOP of the 26px inter-block flex gap (#populatedContent), so
   small values barely register — thin was ~10px against a 26px gap = "no
   effect". Stepped up so each tier is clearly perceptible. */
/* Thin "Empty space" is meant as a barely-there gap — the 12px line on top of
   the block's own 6px 0 padding read as a full separator. Drop the padding and
   shrink the line so Thin is a genuine hairline-of-space. Medium/thick stay
   tall (they're for deliberate breathing room). */
.bio-divider--space.bio-divider--thin   { padding: 0 !important; }
.bio-divider--space.bio-divider--thin   .bio-divider-line { height: 0; }
.bio-divider--space.bio-divider--medium .bio-divider-line { height: 16px; }
.bio-divider--space.bio-divider--thick  .bio-divider-line { height: 30px; }

.bio-divider--thin .bio-divider-line {
  border-top-width: 1px;
}

.bio-divider--medium .bio-divider-line {
  border-top-width: 2px;
}

.bio-divider--thick .bio-divider-line {
  border-top-width: 3px;
}

.bio-divider--dotted.bio-divider--thin .bio-divider-line {
  height: 3px;
  background-size: 7px 3px;
  background-image: radial-gradient(circle, var(--bio-divider-color) 1px, transparent 1.25px);
}

.bio-divider--dotted.bio-divider--medium .bio-divider-line {
  height: 4px;
  background-size: 9px 4px;
  background-image: radial-gradient(circle, var(--bio-divider-color) 1.5px, transparent 1.75px);
}

.bio-divider--dotted.bio-divider--thick .bio-divider-line {
  height: 5px;
  background-size: 11px 5px;
  background-image: radial-gradient(circle, var(--bio-divider-color) 2px, transparent 2.25px);
}

/* The .block frame clips to --r-card (overflow:hidden). Link rows sit flush
   against that frame and carry a radius of their own, so the frame's corner arc
   shaves the outer corners of the first and last rows -- on a grid, one corner
   off each of the four tiles. It was invisible while rows were card-coloured
   with a hairline edge; an accent outline makes every shaved corner obvious.
   The rows own their surface and outline, so the frame has nothing left to clip.
   (Single links got this treatment already; the dropdown panel keeps its own
   overflow:hidden for the collapse animation and is unaffected.) */
.bio-link-block {
  padding: 0;
  min-width: 0;
  overflow: visible;
  /* The rows own their surface, so the frame behind them must not paint one.
     .block's default is a white plate, which showed through the gaps between
     rows as a white band on every palette whose page is not white (Midnight,
     Plum, any custom dark background). Single links already had this; the
     multi-row layouts were left behind. */
  background: transparent;
  box-shadow: none;
}

.bio-link-section-title {
  font-size: calc(var(--bio-fs, 1) * 13px);
  font-weight: 600;
  /* Muted, but derived from the palette's own text colour. A fixed --gray-700
     is dark grey on a dark palette (Midnight, Plum, Cyber all render as
     data-theme-bg="custom", so the [data-theme-bg="dark"] rescue further down
     never fires for them). 72% keeps it quieter than body copy. */
  color: color-mix(in srgb, var(--bio-text, var(--gray-700)) 72%, transparent);
  padding: 4px 8px 8px;
}

.bio-link-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.bio-link-block--layout-grid .bio-link-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  /* Matches the 14px block rhythm (#populatedContent's --bio-gap default). A
     grid tile and a Single Link are the same object to a visitor, so stacking
     one above the other at 14px while sitting two side by side at 8px made the
     column read tighter than the page it sits in. */
  gap: 14px;
}

/* ── Link rows are BUTTONS ─────────────────────────────────────────────────
   A link row is the thing this whole page exists to be tapped. It used to be
   painted with --bio-card, the token that means "passive container you read"
   — the same surface as the Text block and the Image frame beside it — so it
   announced itself as content rather than as a control.

   The Music block already encodes the rule this follows (see the "Listen on X"
   pills further down): the CARD carries the identity, the ACCENT carries the
   one thing you press. A link row has no container/control split — the row IS
   the control — so it takes accent.

   Two emphases, because the Music block has ONE destination and a Links block
   has N. A Single Link is a featured CTA and fills solid. A multi-link list or
   grid would become a wall of one colour at five rows, so those keep the card
   surface and take an accent outline instead. Both read as pressable at rest,
   which is what matters: bio is a mobile surface and hover does not exist there.

   Surface, label and edge resolve through --bl-row-* so that the per-link
   --bl-* overrides (Colours toolbar) keep winning by CASCADE rather than by
   selector weight — no specificity arms race with the theme rules below. */
.bio-link-row {
  --bl-row-bg: var(--bio-card, #fff);
  /* Palette-aware edge: a fixed gray-100 becomes a bright white outline on
     dark custom cards (Vaporwave, Midnight, Plum, …). Tint from the theme's
     foreground instead so light cards get a quiet dark edge and dark cards a
     quiet light one. Explicit per-link --bl-border overrides still win below. */
  --bl-row-border: color-mix(in srgb, var(--bio-text, var(--gray-900)) 10%, transparent);
  --bl-row-bw: 1px;
  --bl-row-fg: var(--bio-text, var(--gray-700));

  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: var(--bl-bw, var(--bl-row-bw)) solid var(--bl-border, var(--bl-row-border));
  border-radius: var(--r-row, 8px);
  background: var(--bl-bg, var(--bl-row-bg));
  min-width: 0;
  overflow: hidden;
  /* Keep a consistent row height whether or not a thumbnail is shown:
     32px thumb + 8px+8px padding + 2px borders = 50px (border-box). The
     thumbnail-less row floors here; taller content (large font) still grows.
     The floor itself now scales with the text size (--bio-row-min) so the row
     keeps pace with the text-driven rows around it. */
  min-height: var(--bio-row-min, 50px);
}

/* Single Link — the featured CTA. Solid accent, with the derived black-or-white
   foreground so the label clears 4.5:1 on every catalog accent (see the
   --bio-accent-fg @supports block at the top of this file). */
.bio-link-block--single .bio-link-row {
  --bl-row-bg: var(--bio-accent, #4c7cf5);
  --bl-row-fg: var(--bio-accent-fg, #fff);
  --bl-row-border: transparent;
}

/* A custom link background is a button fill in its own right. Derive the
   black-or-white foreground from that fill, just as --bio-accent-fg does for
   the theme's primary CTA. An explicit per-link text colour still wins through
   --bl-text below. This applies to a Single Link's block-level style and a
   Multi Link row's individual style alike. */
@supports (color: lch(from red calc((48 - l) * infinity) 0 0)) {
  .phone-inner .bio-link-block--single[style*="--bl-bg"] .bio-link-row,
  .phone-inner .bio-link-row[style*="--bl-bg"] {
    --bl-row-fg: lch(from var(--bl-bg) calc((48 - l) * infinity) 0 0);
  }
}

/* Multi-link rows keep the passive card surface and its quiet text-tint edge
   (the --bl-row-* defaults above). They used to take an accent outline plus an
   8% accent wash to read as pressable, but that made a Multi Link the only
   block on the page wearing the accent as a border: Product, Amazon, Video and
   Text all sit on the plain card edge, so the links block looked like an error
   state rather than a control. The empty-state placeholder never carried the
   accent either, so the preview promised one thing and the filled block
   delivered another. Pressability is carried by the chevron and the row's own
   card, the same way the Product cards manage it.

   Single Link still fills solid accent (above) — one featured CTA per page is
   the emphasis this block set was meant to have. */

/* Chevron — the "this goes somewhere" glyph the DSP rows already carry and
   link rows never did. No margin-left:auto: .bio-link-body is flex:1 so the
   chevron lands at the right edge on its own, and when a per-link alignment
   collapses the body (--bl-flex) the chevron travels with the label instead of
   being stranded. Grid tiles are centred column cells and get none. */
/* Dropdown panel rows are horizontal despite living in a --layout-grid
   block (see the flex-direction override further down), so they take the
   chevron too. */
.bio-link-block:not(.bio-link-block--layout-grid) .bio-link-row::after,
.bio-link-block--dropdown .bio-link-dropdown-panel .bio-link-row::after {
  content: "›";
  flex: 0 0 auto;
  font-size: calc(var(--bio-fs, 1) * 20px);
  font-weight: 400;
  line-height: 1;
  /* This selector is more specific than the shared label rule below, so it
     must read the resolved link foreground directly. `currentColor` would
     inherit the row's default ink (dark in a custom filled CTA) even when the
     title correctly uses --bl-text / --bl-row-fg. */
  color: var(--bl-text, var(--bl-row-fg));
  opacity: .5;
}

/* Featured single links are filled CTAs, so their chevron uses the exact same
   high-contrast foreground as the label — like the Music and Subscribe
   buttons. Multi-link chevrons stay subdued to preserve their list hierarchy. */
.bio-link-block--single .bio-link-row::after { opacity: 1; }

/* Label + chevron read the row's resolved foreground DIRECTLY rather than
   inheriting it. The row is an <a>, and anchor-level colour rules in both this
   stylesheet and the editor's compete for it; a token read on the elements that
   actually paint text is immune to who wins that fight. */
.bio-link-row-title,
.bio-link-row::after {
  color: var(--bl-text, var(--bl-row-fg));
}

.bio-link-block--layout-grid .bio-link-row {
  flex-direction: column;
  text-align: center;
}

.bio-link-thumb {
  width: 32px;
  height: 32px;
  border-radius: var(--r-thumb, 8px);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  flex-shrink: 0;
  overflow: hidden;
}

.bio-link-thumb img,
.amazon-thumb img,
.bio-video-thumb img,
.bio-music-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bio-link-block--layout-grid .bio-link-thumb {
  /* Text scales with --bio-fs, so keep the grid artwork in proportion too.
     Clamp the result so large type does not let a logo dominate the tile. */
  width: clamp(40px, calc(var(--bio-fs, 1) * 40px), 56px);
  height: clamp(40px, calc(var(--bio-fs, 1) * 40px), 56px);
}

/* Artwork size on grid tiles — config.gridThumb is the artwork's share of the
   tile width (25-100), emitted as the unitless --blg plus --blg-ramp, a 0→1
   value that only leaves 0 over the last fifth of the range. The row's padding
   fades out along that ramp and the label takes the exact same padding back, so
   sliding to 100 arrives at true edge-to-edge fill continuously instead of
   snapping. Blocks without --blg keep the type-scaled default above. */
.bio-link-block--layout-grid[style*="--blg"]:not(.bio-link-block--dropdown) .bio-link-thumb {
  width: calc(var(--blg) * 1%);
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: calc(var(--r-thumb, 8px) * (1 - var(--blg-ramp, 0)));
}

.bio-link-block--layout-grid[style*="--blg"]:not(.bio-link-block--dropdown) .bio-link-row {
  padding: calc(8px * (1 - var(--blg-ramp, 0))) calc(10px * (1 - var(--blg-ramp, 0)));
  gap: calc(10px * (1 - var(--blg-ramp, 0)));
  overflow: hidden;
}

.bio-link-block--layout-grid[style*="--blg"]:not(.bio-link-block--dropdown) .bio-link-body {
  padding: calc(8px * var(--blg-ramp, 0)) calc(10px * var(--blg-ramp, 0));
}

/* Link thumbnails can be either edge-to-edge artwork or a self-contained
   logo. Treating both as `cover` can crop a logo's own rounded tile (Instagram
   is the obvious example). The optimized asset directory is our curated brand
   icon catalog, so those marks keep their complete intrinsic canvas; arbitrary
   SVG uploads/artwork retain the normal `cover` behavior. */
.bio-link-thumb img[src*="/static/images/optimized/"] {
  object-fit: contain;
}

.bio-link-thumb:has(> img[src*="/static/images/optimized/"]) {
  overflow: visible;
  background: transparent;
}

/* Photo fit on a link thumb (see the shared "Photo fit" section below). The
   cell is square and normally crops; opting out needs the stacking + clipping
   context the blurred layer sits in. Declared here, after the curated-icon
   rules above, so a fitted upload keeps its clip even when that rule would
   have released it. */
.bio-link-thumb[data-fit] {
  position: relative;
  overflow: hidden;
}
.bio-link-thumb[data-fit] > img { position: relative; z-index: 1; }

.bio-link-body {
  min-width: 0;
  flex: 1;
  max-width: 100%;
}

.bio-link-row-title {
  font-size: calc(var(--bio-fs, 1) * 13px);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bio-link-block--layout-plain .bio-link-thumb {
  display: none;
}
/* ...but an icon the owner picked for a link is not a thumbnail: the renderer
   prints its cell on a text-only list too, and it shows. */
.bio-link-block--layout-plain .bio-link-thumb.bio-link-thumb--icon {
  display: flex;
}

/* ─── Single Link block ───────────────────────────────────────────────────
   One link with optional per-link colours. The wrapper carries the user's
   palette as --bl-* custom props (BioPageRenderer::styleAttr / editor JS);
   each override is gated behind an attribute-presence selector so it ONLY
   fires when the user actually set that property — leaving the theme cascade
   (dark/immersive row styling) untouched otherwise. */
.bio-link-block--single .bio-link-list { gap: 0; }
/* A Single Link is already its own full-width, rounded .bio-link-row. The
   generic .block frame otherwise clips that row to --r-card, which can differ
   from --r-row and cuts into the row's custom border (most visibly on pill
   corners). Let the row own the visible surface and outline. */
.block.bio-link-block--single {
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.bio-link-block--single[style*="--bl-bg"]     .bio-link-row { background: var(--bl-bg); }
.bio-link-block--single[style*="--bl-text"]   .bio-link-row,
.bio-link-block--single[style*="--bl-text"]   .bio-link-row-title { color: var(--bl-text); }
.bio-link-block--single[style*="--bl-border"] .bio-link-row { border-color: var(--bl-border); border-style: solid; }
.bio-link-block--single[style*="--bl-bw"]     .bio-link-row { border-width: var(--bl-bw); border-style: solid; }
/* Per-link text alignment (Colors toolbar). Wins over the theme-level
   label-alignment rule via the .phone-inner prefix + later source order. */
.phone-inner .bio-link-block--single[style*="--bl-align"] .bio-link-row-title { text-align: var(--bl-align); width: 100%; }

/* ─── Multi-link blocks: per-link colours ──────────────────────────────────
   Each link inside a Links block can carry its OWN palette
   (config.links[].style → --bl-* on the .bio-link-row element, see
   BioPageRenderer::links + editor bioApplyStyleVarsTo). Same attribute-gated
   pattern as single links, but the vars live on each row so one block can mix
   differently-styled links. The .phone-inner prefix matches the single-link
   rules' specificity so an explicit choice wins over the base row styling. */
.phone-inner .bio-link-row[style*="--bl-bg"]     { background: var(--bl-bg); }
.phone-inner .bio-link-row[style*="--bl-text"]   { color: var(--bl-text); }
.phone-inner .bio-link-row[style*="--bl-text"]   .bio-link-row-title { color: var(--bl-text); }
.phone-inner .bio-link-row[style*="--bl-border"] { border-color: var(--bl-border); border-style: solid; }
.phone-inner .bio-link-row[style*="--bl-bw"]     { border-width: var(--bl-bw); border-style: solid; }
.phone-inner .bio-link-row[style*="--bl-align"]  { text-align: var(--bl-align); }
.phone-inner .bio-link-row[style*="--bl-align"] .bio-link-row-title { text-align: var(--bl-align); width: 100%; }

/* ─── Alignment follows the icon/thumbnail too ─────────────────────────────
   text-align (above) only shifts the LABEL; the thumbnail is a separate flex
   item, so without this the icon stays pinned left when the row is centered or
   right-aligned. --*-flex carries the same choice mapped to a flexbox keyword
   (BioPageRenderer::styleAttrFromStyle + editor bioApplyStyleVars). For ROW
   layouts it drives justify-content (the icon+label group shifts together) and
   the body stops growing so it can; for the GRID's COLUMN cells it drives
   align-items (the stacked icon/label shift on the cross axis). */
/* Single link — vars live on the block wrapper */
.bio-link-block--single[style*="--bl-flex"] .bio-link-row  { justify-content: var(--bl-flex); }
.bio-link-block--single[style*="--bl-flex"] .bio-link-body { flex: 0 1 auto; }
/* Multi-link rows in a horizontal layout (thumbnail / dropdown) — per-row vars */
.phone-inner .bio-link-block:not(.bio-link-block--layout-grid) .bio-link-row[style*="--bl-flex"]                 { justify-content: var(--bl-flex); }
.phone-inner .bio-link-block:not(.bio-link-block--layout-grid) .bio-link-row[style*="--bl-flex"] .bio-link-body { flex: 0 1 auto; }
/* Grid section alignment + per-link alignment inside a grid (column cells) */
.bio-link-block--grid[style*="--bs-flex"] .bio-link-row        { align-items: var(--bs-flex); }
.bio-link-block--layout-grid .bio-link-row[style*="--bl-flex"] { align-items: var(--bl-flex); }

/* …but the chevron does NOT travel with the label. Once --bl-flex shrinks the
   body, the chevron becomes the group's trailing item and drifts inward — worst
   on left-align, where a short title parks it mid-row. Take it out of flow and
   pin it to the row's right edge so alignment is measured against the WHOLE
   button: left sits exactly where an unaligned row sits, centre is a true
   centre. */
.phone-inner .bio-link-block:not(.bio-link-block--layout-grid) .bio-link-row[style*="--bl-flex"],
.bio-link-block--single[style*="--bl-flex"] .bio-link-row {
  position: relative;
}
.phone-inner .bio-link-block:not(.bio-link-block--layout-grid) .bio-link-row[style*="--bl-flex"]::after,
.bio-link-block--single[style*="--bl-flex"] .bio-link-row::after {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}
/* An aligned link's chevron is out of the flex flow. Without a bounded body,
   a long label can expand under that fixed glyph on a narrow phone. Reserve its
   20px icon plus a 16px breathing gap only in this absolute-chevron layout;
   unaligned rows keep their full normal flex width. */
.phone-inner .bio-link-block:not(.bio-link-block--layout-grid) .bio-link-row[style*="--bl-flex"] .bio-link-body,
.bio-link-block--single[style*="--bl-flex"] .bio-link-body {
  max-width: calc(100% - var(--bio-fs, 1) * 20px - 26px);
}
/* Right-align is the one case where the label would run into the pinned
   chevron, so that row alone reserves its width. (Two selectors per case: the
   renderer writes "--bl-flex:flex-end", CSSOM's setProperty in the editor
   re-serialises it with a space.) */
.phone-inner .bio-link-block:not(.bio-link-block--layout-grid) .bio-link-row[style*="--bl-flex:flex-end"],
.phone-inner .bio-link-block:not(.bio-link-block--layout-grid) .bio-link-row[style*="--bl-flex: flex-end"],
.bio-link-block--single[style*="--bl-flex:flex-end"] .bio-link-row,
.bio-link-block--single[style*="--bl-flex: flex-end"] .bio-link-row {
  padding-right: calc(10px + var(--bio-fs, 1) * 14px);
}

/* Consecutive single links sit a constant ~10px apart — tighter than the
   inter-block gap — so a stack of individual links reads as a tight group, not
   scattered cards. The negative margin tracks --bio-gap so the net stays 10px
   whatever the Theme "Block spacing" slider is set to (never overlaps). */
.bio-link-block--single + .bio-link-block--single { margin-top: calc(10px - var(--bio-gap, 14px)); }

/* ─── Links grid: no white card surface by default ─────────────────────────
   The grid's cells (.bio-link-row) are the visible surface; the wrapper must
   stay transparent so only the grid tiles show against the page background
   (the white .block card peeked through the inter-cell gaps otherwise). A
   user-set section background (--bs-bg, below) re-introduces a panel on top. */
.bio-link-block--grid {
  background: transparent;
  box-shadow: none;
}

/* Grid tiles are content cards, not one-line rows. Pill keeps their corners
   soft instead of turning each tall tile into a capsule; dropdown sub-links
   remain row pills. */
.bio-link-block--layout-grid:not(.bio-link-block--dropdown) .bio-link-row {
  border-radius: var(--r-card, 14px);
}

/* ─── Links grid: section-level colours (a panel behind the grid) ───────── */
.bio-link-block--grid[style*="--bs-bg"]     { background: var(--bs-bg); }
.bio-link-block--grid[style*="--bs-border"] { border-color: var(--bs-border); border-style: solid; }
.bio-link-block--grid[style*="--bs-bw"]     { border-width: var(--bs-bw); border-style: solid; }
.bio-link-block--grid[style*="--bs-pad"]    { padding: var(--bs-pad); border-radius: var(--r-card, 14px); }
.bio-link-block--grid[style*="--bs-text"] .bio-link-section-title,
.bio-link-block--grid[style*="--bs-text"] .bio-link-row-title { color: var(--bs-text); }
/* Per-section text alignment (Colors toolbar) — overrides the grid's default
   centered cells (and the section title) when the user picks an alignment. */
.bio-link-block--grid[style*="--bs-align"] .bio-link-row,
.bio-link-block--grid[style*="--bs-align"] .bio-link-row-title,
.bio-link-block--grid[style*="--bs-align"] .bio-link-section-title { text-align: var(--bs-align); }

/* ─── Multi-links: Carousel layout ─────────────────────────────────────────
   The grid's tiles laid out in ONE horizontally swipeable strip. Native
   scroll-snap does the paging (no JS on touch); --blc = tiles per view, a
   fraction so the next tile always peeks in from the right edge — the peek is
   the only cue a visitor gets that the row moves. Arrows exist for mouse
   users (the25-bio-public.js scrolls one tile per click, hides them at the
   ends) and disappear on touch screens. The tiles themselves reuse every grid
   rule (--blg artwork size, per-link colours, theme shapes). */
.bio-link-block--carousel   { --blc: 2.25; }
.bio-link-block--carousel-s { --blc: 3.25; }
.bio-link-block--carousel-l { --blc: 1.25; }

.bio-link-carousel {
  position: relative;
  min-width: 0;
}

.bio-link-block--carousel .bio-link-list {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  /* Room for the tile outline/shadow that the strip would otherwise clip. */
  padding: 2px;
  margin: -2px;
  scroll-padding-inline: 2px;
}
.bio-link-block--carousel .bio-link-list::-webkit-scrollbar { display: none; }

.bio-link-block--carousel .bio-link-row {
  flex: 0 0 calc((100% - 10px * (var(--blc) - 1)) / var(--blc));
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.bio-link-carousel-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--bio-text, #1f2937) 12%, transparent);
  border-radius: 50%;
  background: var(--bio-card, #fff);
  color: var(--bio-text, var(--gray-700));
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: opacity .15s ease;
}
.bio-link-carousel-arrow--prev { left: -6px; }
.bio-link-carousel-arrow--prev svg { transform: rotate(180deg); }
.bio-link-carousel-arrow--next { right: -6px; }
.bio-link-carousel:hover .bio-link-carousel-arrow,
.bio-link-carousel-arrow:focus-visible { opacity: 1; }
.bio-link-carousel-arrow[hidden] { display: none; }
/* No hover on touch screens: swiping is the interaction, arrows are noise. */
@media (hover: none) {
  .bio-link-carousel-arrow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bio-link-block--carousel .bio-link-list { scroll-behavior: auto; }
}

/* Mobile bleed: on a phone there are no arrows, so the strip runs to the
   screen edge and the viewport cuts the last tile — the cut then reads as
   "more to the right" rather than "cropped by a box". The negative margin
   undoes the page column's 14px side padding, the inner padding restores it
   so the first tile still lines up with the column, and scroll-padding makes
   every snap land on the column edge. Shared with the Amazon/Product carousel
   below. Not on desktop: the page sits in a clipped phone card there and the
   arrows do the job. A painted section panel (--bs-pad) keeps its strip
   inside the panel — bleeding past a box looks wrong. */
@media (max-width: 759px) {
  .bio-link-block--carousel:not([style*="--bs-pad"]) { overflow: visible; }
  .bio-link-block--carousel:not([style*="--bs-pad"]) .bio-link-list,
  .bio-amazon-block--layout-carousel .amazon-grid {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
    scroll-padding-inline: 14px;
  }
}

/* ─── Multi-links: Dropdown layout ─────────────────────────────────────────
   A "main link" header (looks like a single link) that toggles a panel of the
   block's links below it. the25-bio-public.js flips [hidden] + aria-expanded on
   tap; in the editor canvas the panel renders open so the owner sees the rows. */
.bio-link-block--dropdown .bio-link-dropdown-head,
.bio-calendly-block--button .bio-link-dropdown-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  min-height: var(--bio-row-min, 50px);
  /* --bl-* = the shared colour toolbar (emitted on the block wrapper). */
  border: var(--bl-bw, 1px) solid var(--bl-border, color-mix(in srgb, var(--bio-text, #1f2937) 12%, transparent));
  border-radius: var(--r-row, 8px);
  background: var(--bl-bg, var(--bio-card, #fff));
  color: var(--bl-text, var(--bio-text, var(--gray-700)));
  font: inherit;
  cursor: pointer;
  text-align: var(--bl-align, left);
  box-sizing: border-box;
}
/* The dropdown header follows the rows in its panel: now that they sit on the
   passive card edge, the header does too (the base rule above already paints
   it). It briefly wore an accent outline + 8% wash to match the multi-link
   contract; that contract is gone, and keeping it here would leave the header
   as the one accent-bordered thing on the page. Per-block --dt-* overrides
   still win by cascade (further down). */
.bio-link-block--dropdown .bio-link-dropdown-title,
.bio-calendly-block--button .bio-link-dropdown-title {
  flex: 1;
  min-width: 0;
  font-size: calc(var(--bio-fs, 1) * 13px);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bio-link-block--dropdown .bio-link-dropdown-caret,
.bio-calendly-block--button .bio-link-dropdown-caret {
  display: flex;
  align-items: center;
  /* Inherit the header's (theme/section-adaptive) text colour so the chevron is
     always legible against the card background; dim it slightly for hierarchy.
     The SVG strokes with currentColor, so this is what it picks up. */
  color: inherit;
  opacity: .6;
  transition: transform .2s ease;
  flex-shrink: 0;
}
.bio-link-block--dropdown .bio-link-dropdown-head[aria-expanded="true"] .bio-link-dropdown-caret,
.bio-calendly-block--button .bio-link-dropdown-head[aria-expanded="true"] .bio-link-dropdown-caret {
  transform: rotate(180deg);
}
/* Calendly "Booking button" panel: same expand/collapse animation as the
   multi-link dropdown, but it wraps the embed instead of link rows (so no
   row gap / list padding). */
.bio-calendly-block--button .bio-link-dropdown-panel.bio-calendly-panel {
  box-sizing: border-box;
  overflow: hidden;
  transition: height .28s ease, opacity .28s ease;
}
/* Spacing below the button lives on the child (not panel padding) so a collapsed
   height:0 panel clips it completely — no leftover sliver under the button. */
.bio-calendly-block--button .bio-calendly-panel > * { margin-top: 8px; }
.bio-calendly-block--button .bio-link-dropdown-panel[hidden] { display: none; }
/* Collapsed booking-button panel: clipped to 0 height but still display:block so
   opening it can animate to the placeholder's real dimensions before Calendly
   starts loading the calendar. */
.bio-calendly-block--button .bio-link-dropdown-panel.bio-calendly-panel--collapsed { height: 0; opacity: 0; }
/* Warm-up stage. Calendly's page only boots while its iframe is actually being
   painted: Chrome throttles a cross-origin frame that is clipped, zero-area or
   offscreen, and a collapsed panel is all three (measured — no postMessage at
   all in 20s). So the panel parks the embed at full size, fixed in the viewport,
   behind the page at 1% opacity, where it boots unthrottled and invisibly. Once
   Calendly reports its height the panel returns to the plain collapsed state
   with a ready embed inside, so the tap opens onto a painted calendar. The
   element never moves in the DOM — reparenting an iframe reloads it. */
.bio-calendly-block--button .bio-link-dropdown-panel.bio-calendly-panel--warming {
  height: 0;
  opacity: 1;
  overflow: visible;
}
.bio-calendly-block--button .bio-calendly-panel--warming > .bio-calendly-frame-wrap {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  opacity: .01;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .bio-calendly-block--button .bio-link-dropdown-panel.bio-calendly-panel { transition: none; }
}

/* ── Calendly embeds ───────────────────────────────────────────────────────
   Calendly creates a cross-origin iframe after its widget script arrives. The
   generic .bio-flat-block intentionally has overflow:visible, so the calendar
   itself owns clipping + rounding. Keeping Calendly's widget as the direct host
   preserves the native auto-scan/size behavior used by the editor and public
   page, while the CSS-only loader avoids a featureless white rectangle. */
/* Positioning context for the inline layout's skeleton overlay, which is a
   SIBLING of the widget (see BioPageRenderer::calendly). */
.bio-calendly-block--inline { width: 100%; position: relative; }
.bio-calendly-widget,
/* Compatibility for a cached page whose older HTML has not yet gained the
   dedicated widget class: it still receives rounded clipping immediately. */
.bio-calendly-block--inline > .calendly-inline-widget {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-media, 12px);
  background: var(--bio-card, #fff);
}
.bio-calendly-frame-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--r-media, 12px);
  background: var(--bio-card, #fff);
}
.bio-calendly-frame-wrap .calendly-inline-widget {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 0;
  background: var(--bio-card, #fff);
}
/* Loading shell: a skeleton of Calendly's "Select a Day" view. Shared by both
   layouts — inside .bio-calendly-frame-wrap for the booking button, as a sibling
   of the widget for the inline layout (hence the two visibility selectors). */
.bio-calendly-loading {
  --bio-skel: color-mix(in srgb, var(--bio-text, #1f2937) 10%, var(--bio-card, #fff));
  --bio-skel-hi: color-mix(in srgb, var(--bio-text, #1f2937) 18%, var(--bio-card, #fff));
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 22px 18px;
  box-sizing: border-box;
  color: color-mix(in srgb, var(--bio-text, #1f2937) 62%, transparent);
  background: var(--bio-card, #fff);
  font-size: calc(var(--bio-fs, 1) * 11px);
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.bio-calendly-frame-wrap.is-loading .bio-calendly-loading,
.bio-calendly-widget.is-loading ~ .bio-calendly-loading,
.bio-calendly-frame-wrap.is-error .bio-calendly-loading,
.bio-calendly-widget.is-error ~ .bio-calendly-loading {
  opacity: 1;
  visibility: visible;
}
.bio-cal-skel {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.bio-cal-skel > *,
.bio-cal-skel span { flex-shrink: 0; }
.bio-cal-skel-title,
.bio-cal-skel-month,
.bio-cal-skel-tz,
.bio-cal-skel-nav > span,
.bio-cal-skel-dow span,
.bio-cal-skel-grid span {
  display: block;
  border-radius: 5px;
  background: linear-gradient(100deg, var(--bio-skel) 30%, var(--bio-skel-hi) 46%, var(--bio-skel) 62%) 0 0 / 240% 100%;
  animation: bio-cal-skel-sheen 1.5s ease-in-out infinite;
}
.bio-cal-skel-title { width: 130px; height: 15px; border-radius: 7px; }
.bio-cal-skel-nav { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; }
.bio-cal-skel-nav > span { width: 10px; height: 10px; border-radius: 3px; }
.bio-cal-skel-month { width: 92px; height: 12px; }
.bio-cal-skel-dow,
.bio-cal-skel-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; width: 100%; }
.bio-cal-skel-dow span { height: 8px; border-radius: 4px; }
/* Day cells: a fixed 30px disc centred in its column, so the grid keeps the
   airy rhythm of Calendly's real day picker instead of a wall of circles. */
.bio-cal-skel-grid { row-gap: 12px; }
.bio-cal-skel-grid span { width: 30px; height: 30px; border-radius: 50%; justify-self: center; }
.bio-cal-skel-tz { width: 150px; height: 11px; margin-top: 2px; }
/* Failure: drop the skeleton (nothing is coming) and let the message carry it. */
.bio-calendly-frame-wrap.is-error .bio-cal-skel,
.bio-calendly-widget.is-error ~ .bio-calendly-loading .bio-cal-skel { display: none; }
.bio-calendly-frame-wrap.is-error .bio-calendly-loading-text,
.bio-calendly-widget.is-error ~ .bio-calendly-loading .bio-calendly-loading-text {
  font-size: calc(var(--bio-fs, 1) * 12px);
}
@keyframes bio-cal-skel-sheen { to { background-position: -140% 0; } }
@media (prefers-reduced-motion: reduce) {
  .bio-cal-skel-title,
  .bio-cal-skel-month,
  .bio-cal-skel-tz,
  .bio-cal-skel-nav > span,
  .bio-cal-skel-dow span,
  .bio-cal-skel-grid span { animation: none; }
}

/* ── Calendly demo (editor-only placeholder) ─────────────────────────────────
   A static mock of Calendly's "Select a Day" view shown before the owner adds
   their link. Themed via the bio --bio-* vars so it doubles as a colour preview.
   pointer-events:none so a click falls through to the block's edit handler. */
.bio-calendly-demo {
  position: relative;
  background: var(--bio-card, #fff);
  color: var(--bio-text, #1a1a1a);
  border: 1px solid color-mix(in srgb, var(--bio-text, #1f2937) 12%, transparent);
  border-radius: var(--r-card, 14px);
  padding: 18px 16px 14px;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.bio-calendly-demo .bio-cald-ribbon {
  position: absolute;
  top: 14px;
  right: -34px;
  transform: rotate(45deg);
  background: #4d5055;
  color: #fff;
  padding: 4px 40px;
  text-align: center;
  line-height: 1.1;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.bio-calendly-demo .bio-cald-ribbon span { display: block; font-size: 6px; letter-spacing: .5px; opacity: .85; text-transform: uppercase; }
.bio-calendly-demo .bio-cald-ribbon strong { display: block; font-size: 10px; font-weight: 700; }
.bio-calendly-demo .bio-cald-title { text-align: center; font-weight: 700; font-size: calc(var(--bio-fs, 1) * 15px); margin-bottom: 12px; }
.bio-calendly-demo .bio-cald-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; }
.bio-calendly-demo .bio-cald-month { font-weight: 600; font-size: calc(var(--bio-fs, 1) * 13px); }
.bio-calendly-demo .bio-cald-arrow { font-size: 18px; line-height: 1; color: var(--gray-300); }
.bio-calendly-demo .bio-cald-arrow--on { color: var(--bio-accent, #5b6ef5); }
.bio-calendly-demo .bio-cald-dow,
.bio-calendly-demo .bio-cald-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.bio-calendly-demo .bio-cald-dow { margin-bottom: 4px; }
.bio-calendly-demo .bio-cald-dow span { text-align: center; font-size: 9px; font-weight: 600; color: var(--gray-400); text-transform: capitalize; }
.bio-calendly-demo .bio-cald-day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  font-size: calc(var(--bio-fs, 1) * 12px);
  color: var(--gray-400);
  border-radius: 50%;
}
.bio-calendly-demo .bio-cald-day.is-avail {
  color: var(--bio-accent, #5b6ef5);
  font-weight: 600;
  background: color-mix(in srgb, var(--bio-accent, #5b6ef5) 13%, transparent);
}
.bio-calendly-demo .bio-cald-dot {
  position: absolute;
  bottom: 4px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--bio-accent, #5b6ef5);
}
.bio-calendly-demo .bio-cald-tz { margin-top: 12px; font-size: 11px; color: var(--gray-500); display: flex; align-items: center; gap: 6px; }
.bio-calendly-demo .bio-cald-globe { font-size: 12px; }
.bio-calendly-demo-hint {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  color: var(--gray-500);
  pointer-events: none;
}
/* Editor-only hint under the Booking button (the calendar isn't shown in the
   editor — it expands on the live page). */
.bio-calendly-editor-hint {
  margin-top: 8px;
  text-align: center;
  font-size: 11px;
  color: var(--gray-500);
  pointer-events: none;
}
/* Expanded panel: a single-column list of regular-looking link rows beneath the
   header, regardless of the grid layout class on the wrapper (3-class selectors
   beat the grid's 2-class rules). */
.bio-link-block--dropdown .bio-link-dropdown-panel.bio-link-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* padding (not margin) so the top spacing is clipped along with the rows when
     the panel animates to height:0 — no lingering gap above a collapsed panel. */
  padding-top: 6px;
  /* Indent the sub-links so they read as nested under the dropdown header. */
  padding-left: 16px;
  box-sizing: border-box;
  overflow: hidden;
  transition: height .28s ease, opacity .28s ease;
}
.bio-link-block--dropdown .bio-link-dropdown-panel[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  .bio-link-block--dropdown .bio-link-dropdown-panel.bio-link-list { transition: none; }
}
.bio-link-block--dropdown .bio-link-dropdown-panel .bio-link-row {
  flex-direction: row;
  text-align: left;
}
.bio-link-block--dropdown .bio-link-dropdown-panel .bio-link-thumb {
  width: 32px;
  height: 32px;
}
/* Editor-only placeholder rows (shown before the owner adds real links). */
.bio-link-block--dropdown .bio-link-dropdown-panel--demo .bio-link-row,
.bio-link-block--carousel .bio-link-carousel--demo .bio-link-row { opacity: .6; }
/* Section colour overrides extend to the dropdown header. */
.bio-link-block--grid[style*="--bs-text"] .bio-link-dropdown-title,
.bio-link-block--grid[style*="--bs-text"] .bio-link-dropdown-head { color: var(--bs-text); }

/* ─── Dropdown Title header: per-block colours (--dt-*) ─────────────────────
   Set on the .bio-link-dropdown-head element itself (config.titleStyle), so
   the collapsed header can be styled independently of the section panel and
   the links inside. Attribute-gated like every other bio palette. */
.bio-link-block--dropdown .bio-link-dropdown-head[style*="--dt-bg"]     { background: var(--dt-bg); }
.bio-link-block--dropdown .bio-link-dropdown-head[style*="--dt-text"]   { color: var(--dt-text); }
.bio-link-block--dropdown .bio-link-dropdown-head[style*="--dt-text"] .bio-link-dropdown-title { color: var(--dt-text); }
.bio-link-block--dropdown .bio-link-dropdown-head[style*="--dt-border"] { border-color: var(--dt-border); border-style: solid; }
.bio-link-block--dropdown .bio-link-dropdown-head[style*="--dt-bw"]     { border-width: var(--dt-bw); border-style: solid; }
.bio-link-block--dropdown .bio-link-dropdown-head[style*="--dt-align"]  { text-align: var(--dt-align); }
.bio-link-block--dropdown .bio-link-dropdown-head[style*="--dt-align"] .bio-link-dropdown-title { text-align: var(--dt-align); }

.bio-thumb-fallback {
  font-size: calc(var(--bio-fs, 1) * 10px);
  font-weight: 700;
  text-transform: uppercase;
}

/* ─── Link icons (Helpers\BioIcons) ────────────────────────────────────────
   Inline SVG on a 24-unit grid: the outline in currentColor, the one filled
   shape (.bi-a) in the page's accent, so an icon follows the palette of
   whatever surface it sits on. */
.bi {
  display: inline-block;
  flex: none;
  vertical-align: middle;
}
.bi .bi-a { fill: var(--bio-accent, #5b6ef5); }

/* The picture a link or track shows when it has none: the link or music icon
   in the thumbnail cell's own (muted) text colour. */
.bio-thumb-fallback .bi {
  display: block;
  width: 22px;
  height: 22px;
}

.bio-music-block--layout-compact .bio-thumb-fallback .bi,
.bio-link-thumb .bio-thumb-fallback .bi {
  width: 18px;
  height: 18px;
}

/* An icon the owner picked for a link (config.links[].icon) replaces the
   thumbnail: no tile behind it, drawn in the label's colour (the same picks
   and dark-page defaults as .bio-link-row-title) and scaled with the cell, so
   a grid tile's artwork slot gets a large one. */
.bio-link-thumb.bio-link-thumb--icon {
  background: transparent;
  color: var(--bl-text, var(--bs-text, var(--bl-row-fg)));
}
.phone-inner[data-theme-bg="dark"] .bio-link-thumb--icon { color: var(--bl-text, var(--bs-text, var(--bio-name-color, #f3f4f6))); }
.phone-inner[data-theme-bg="linktwin"] .bio-link-thumb--icon { color: var(--bl-text, var(--bs-text, #fff)); }
.bio-link-thumb--icon .bi {
  width: 68%;
  height: 68%;
  min-width: 18px;
  min-height: 18px;
}
/* A tile whose link shows no icon at all ('none') is its label alone: centred
   in the tile, not left at the top where the artwork would have been. (The
   label's box otherwise stretches to fill the tile, text at its top.) */
.bio-link-block--layout-grid:not(.bio-link-block--dropdown) .bio-link-row:not(:has(> .bio-link-thumb)) {
  justify-content: center;
}
.bio-link-block--layout-grid:not(.bio-link-block--dropdown) .bio-link-row:not(:has(> .bio-link-thumb)) > .bio-link-body {
  flex: 0 1 auto;
}

/* ─── Stickers (Helpers\BioStickers) ───────────────────────────────────────
   A brand token stuck on a block's corner or beside the profile header,
   printed as <img> by BioPageRenderer. Decoration only: never a tap target, so
   a tap on it reaches the link underneath, and never animated. */
.bio-sticker {
  --bio-sticker: 48px;
  position: absolute;
  z-index: 3;
  width: var(--bio-sticker);
  height: var(--bio-sticker);
  max-width: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transform: rotate(var(--tilt, 0deg));
}
.bio-sticker--s { --bio-sticker: 36px; }
.bio-sticker--m { --bio-sticker: 48px; }
.bio-sticker--l { --bio-sticker: 64px; }

/* On a block: the root frames it and must not clip it (most block roots clip
   to their rounded corners). Half the sticker hangs above or below the edge,
   a quarter past the side: a full half there would run off a phone screen,
   whose column leaves only ~15px either side. */
.block.has-sticker { overflow: visible; }
.bio-sticker--tl, .bio-sticker--tr { top: calc(var(--bio-sticker) / -2); }
.bio-sticker--bl, .bio-sticker--br { bottom: calc(var(--bio-sticker) / -2); }
.bio-sticker--tl, .bio-sticker--bl { left: calc(var(--bio-sticker) / -4); }
.bio-sticker--tr, .bio-sticker--br { right: calc(var(--bio-sticker) / -4); }

/* On the avatar: centred on its rim at 45 degrees (top-right, bottom-left).
   The wrapper is exactly the avatar's width, and its bottom edge is the
   avatar's bottom edge: the avatar's top moves with each layout's negative
   margin (Banner, legacy hero), so the spots are measured from the bottom,
   and the Overlay layout's 4px gap moves from the avatar to the wrapper. */
.bio-avatar-stickers {
  position: relative;
  flex-shrink: 0;
}
.bio-avatar-stickers > .bio-avatar { margin-bottom: 0; }
.bio-profile--portrait .bio-avatar-stickers { margin-bottom: 4px; }
.bio-sticker--avatar-tr {
  left: calc(var(--bio-av, 84px) * .8536 - var(--bio-sticker) / 2);
  bottom: calc(var(--bio-av, 84px) * .8536 - var(--bio-sticker) / 2);
}
.bio-sticker--avatar-bl {
  left: calc(var(--bio-av, 84px) * .1464 - var(--bio-sticker) / 2);
  bottom: calc(var(--bio-av, 84px) * .1464 - var(--bio-sticker) / 2);
}

/* After the name: inline, sized to the name's type, and its vertical margins
   cancel its extra height so the line keeps the name's own leading. */
.bio-sticker--name-end {
  position: static;
  display: inline-block;
  width: var(--bio-sticker-em);
  height: var(--bio-sticker-em);
  margin: calc((1.25em - var(--bio-sticker-em)) / 2) 0 calc((1.25em - var(--bio-sticker-em)) / 2) .2em;
  vertical-align: middle;
}
.bio-sticker--name-end.bio-sticker--s { --bio-sticker-em: 1.4em; }
.bio-sticker--name-end.bio-sticker--m { --bio-sticker-em: 1.75em; }
.bio-sticker--name-end.bio-sticker--l { --bio-sticker-em: 2.2em; }

/* Edge-to-edge media like the video block: no white .block surface (it made the
   immersive white caption invisible and peeked out at the rounded corners);
   overflow visible so the hover lift/shadow isn't clipped. */
.bio-image {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

/* No frame background: a light fill bleeds through the rounded-corner
   antialiasing as a halo around dark images. The empty-state placeholder
   carries its own gray fill instead. */
.bio-image .bio-image-frame {
  width: 100%;
  overflow: hidden;
  /* Corner roundness: numeric px radius set per-block via --bio-img-radius
     (editor slider + BioPageRenderer); falls back to 12px. */
  border-radius: var(--bio-img-radius, 12px);
  transition: transform .18s ease, box-shadow .18s ease;
}

.bio-image .bio-image-placeholder {
  background: var(--gray-100);
}

.bio-image-link {
  /* Must fill the frame: .bio-image-img uses height:100%, which only
     resolves against a sized parent. When an image has a click
     destination it's wrapped in this <a> (the editor never wraps), so
     without an explicit size here the anchor collapses to auto height,
     the img falls back to natural size, and object-fit:cover is moot —
     the image renders small/letterboxed instead of filling the frame. */
  display: block;
  width: 100%;
  height: 100%;
}

@media (hover: hover) {
  /* Hover lift only when the image is clickable (has a destination link). */
  .bio-image:has(.bio-image-link):hover .bio-image-frame {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgb(0 0 0 / .35);
  }
}

.bio-image-frame { position: relative; }
/* The frame's own overflow clips the blurred backdrop to the rounded corners. */
.bio-image-frame[data-fit] { overflow: hidden; }
.bio-image-frame[data-fit] > .bio-image-img,
.bio-image-frame[data-fit] > .bio-image-link { position: relative; z-index: 1; }
/* A clickable image is wrapped in an <a>, so the shared child selector misses
   it — the frame's fit has to reach one level deeper here. */
.bio-image-frame[data-fit][data-fit] .bio-image-img { object-fit: contain; }

.bio-image .bio-image-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-image--aspect-original .bio-image-frame {
  aspect-ratio: auto;
}

.bio-image--aspect-original .bio-image-img {
  height: auto;
  object-fit: contain;
}

.bio-image--aspect-square .bio-image-frame {
  aspect-ratio: 1 / 1;
}

.bio-image--aspect-landscape .bio-image-frame {
  aspect-ratio: 16 / 9;
}

.bio-image--aspect-tall .bio-image-frame {
  aspect-ratio: 9 / 16;
}

.bio-image .bio-image-caption {
  padding: 8px 12px 12px;
  font-size: calc(var(--bio-fs, 1) * 12px);
  /* Muted, but muted AGAINST THE PALETTE. A flat --gray-500 stayed gray on a
     red or navy page and dropped out of readable contrast; fading the theme's
     own body ink keeps the caption secondary on every palette. */
  color: color-mix(in srgb, var(--bio-text, var(--gray-500)) 72%, transparent);
  text-align: center;
}

/* The Amazon block is a frame-less container — its product cards are the cards,
   so the wrapper drops the white .block surface/shadow and lets them float on
   the page background (and not clip their own shadows). */
.bio-amazon-block {
  background: transparent;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

.amazon-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.bio-amazon-block--layout-carousel .amazon-grid {
  grid-template-columns: none;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.bio-amazon-block--layout-carousel .amazon-card {
  flex: 0 0 110px;
  scroll-snap-align: start;
}

.bio-amazon-block--layout-list .amazon-grid {
  grid-template-columns: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bio-amazon-block--layout-list .amazon-card {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 8px 10px;
}

.bio-amazon-block--layout-list .amazon-thumb {
  width: 44px;
  height: 44px;
  aspect-ratio: 1;
  margin: 0;
  flex-shrink: 0;
}

.bio-amazon-block--layout-list .amazon-title {
  margin-top: 0;
  min-height: 0;
  -webkit-line-clamp: 2;
}

.amazon-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bio-card, #fff);
  box-shadow: var(--bio-rest-shadow, 0 1px 3px rgba(0, 0, 0, .06));
  border-radius: var(--r-card, 14px);
  padding: 8px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  overflow: hidden;
}

/* immersive backdrop — hidden in the default white style */
.amazon-bg { display: none; }

.amazon-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-media, 12px);
  overflow: hidden;
  background: linear-gradient(135deg, #f4f6f9, #e9edf2);
}
.amazon-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.amazon-thumb[data-fit] > img { position: relative; z-index: 1; }
/* Product shots sit on white; a fitted one against the tile's grey gradient
   reads as a mistake, so plain "Fit" keeps a clean white bed. */
.amazon-thumb[data-fit="contain"] { background: #fff; }

/* neutral fallback tile (no product image) — faint Amazon smile, not the old yellow box */
/* Standard product tile (no image / no icon) — a NEUTRAL box icon, not the
   Amazon logo, so the cards don't read as Amazon-branded. */
.amazon-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef1f6, #e3e8f0);
}
.amazon-thumb--empty::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f466";   /* fa-box */
  font-size: 40px;
  color: var(--primary-color, #4c7cf5);
  opacity: .9;
}
.bio-amazon-block--layout-list .amazon-thumb--empty::before { font-size: 24px; }

/* Category-icon tile — a clean, compliant alternative to scraped product images */
.amazon-thumb--icon { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eef1f6, #e3e8f0); }
.amazon-thumb--icon i { font-size: 40px; line-height: 1; color: var(--primary-color, #4c7cf5); opacity: .92; }
.bio-amazon-block--layout-list .amazon-thumb--icon i { font-size: 24px; }

.amazon-title {
  font-size: calc(var(--bio-fs, 1) * 12px);
  font-weight: 600;
  color: var(--bio-text, var(--gray-800));
  line-height: 1.32;
  padding: 0 2px 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Amazon smile badge — bottom-left of the image */
.amz-smile {
  position: absolute;
  left: 7px;
  bottom: 7px;
  width: 30px;
  height: 22px;
  z-index: 2;
  border-radius: 7px;
  background: rgba(255, 255, 255, .94) url(../images/optimized/amazon_tinylogo.svg) center / 16px no-repeat;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .16);
}

.amz-badge {
  position: absolute;
  z-index: 2;
  font-size: calc(var(--bio-fs, 1) * 9px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .05em;
}

/* "Ad" marker — top-right of the image */
.amz-badge.amz-ad {
  top: 7px;
  right: 7px;
  padding: 2px 6px;
  background: rgba(20, 26, 34, .55);
  color: #fff;
  border-radius: 6px;
}
.amz-badge.amz-ad.amz-ad-section {
  position: static;
  background: rgb(17 24 39 / 0.78);
  text-transform: uppercase;
  padding: 2px 5px;
}

/* List layout: thumb on the left, title (+ price beneath it) on the right.
   A grid rather than a flex row so the price can sit UNDER the title instead
   of beside it — side by side, "$55.89 $89.99" ate half the row and left a
   sliver of the title. Cards without a price: the title alone, centred. */
.bio-amazon-block--layout-list .amazon-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  grid-auto-rows: auto;
  align-items: center;
  align-content: center;
  column-gap: 12px;
  row-gap: 3px;
}
.bio-amazon-block--layout-list .amazon-thumb { grid-column: 1; grid-row: 1 / span 2; }
.bio-amazon-block--layout-list .amazon-title { grid-column: 2; grid-row: 1; }
.bio-amazon-block--layout-list .amazon-thumb { width: 58px; height: 58px; flex: 0 0 58px; border-radius: var(--r-media, 12px); }
.bio-amazon-block--layout-list .amazon-title { flex: 1 1 auto; padding: 0; }
.bio-amazon-block--layout-list .amz-smile { left: 4px; bottom: 4px; width: 22px; height: 16px; background-size: 12px; border-radius: 5px; }
.bio-amazon-block--layout-list .amz-badge.amz-ad { top: 4px; right: 4px; }

/* Product block price line — sits under .amazon-title in grid/carousel.
   margin-top tucks it against the title (the card's flex gap is 8px). */
.product-price {
  font-size: calc(var(--bio-fs, 1) * 13px);
  font-weight: 700;
  color: var(--bio-text, var(--gray-900));
  line-height: 1;
  padding: 0 2px 2px;
  margin-top: -4px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
/* Former price, struck through beside the price. Quieter and lighter than the
   price itself so the current one still reads first (matches the course card's
   .bio-course-compare treatment). */
.product-price-was {
  font-weight: 600;
  color: var(--ba-price-was, color-mix(in srgb, currentColor 55%, transparent));
}
/* Section colours (Amazon + Product). One prefix serves both levels: the block
   sets --ba-* on itself, a per-product override sets the same names on its own
   .amazon-card and wins by the ordinary custom-property cascade. Every fallback
   is the pre-existing value, so an unstyled block renders exactly as before. */
.amazon-card {
  background: var(--ba-bg, var(--bio-card, #fff));
  /* No `inherit` fallback: --ba-text is unset on most cards, and `inherit`
     walks up to body's --gray-900 instead of the theme's text colour, so
     titles rendered near-black on dark themes. */
  color: var(--ba-text, var(--bio-text, var(--gray-900)));
  border: var(--ba-bw, 0) solid var(--ba-border, transparent);
}
.amazon-card .amazon-title,
.amazon-card .product-price { color: var(--ba-text, var(--bio-text, var(--gray-900))); }
/* Per-card (or block-level) price colour; the struck former price follows it
   through currentColor. The immersive card theme re-declares it below with
   its own white fallback. */
.amazon-card .product-price { color: var(--ba-price, var(--ba-text, var(--bio-text, var(--gray-900)))); }
.amazon-card .amazon-title  { text-align: var(--ba-align, left); }
/* The price row is a flex line (price + struck former price), so it follows the
   alignment through justify-content rather than text-align. */
.amazon-card .product-price { justify-content: var(--ba-flex, flex-start); }

/* Artwork size — the thumb's share of the card width (25-100). List layout
   rides its own fixed 58px thumb, so it opts out. */
.bio-amazon-block--layout-grid .amazon-thumb,
.bio-amazon-block--layout-carousel .amazon-thumb {
  width: calc(var(--ba-img, 100) * 1%);
  align-self: center;
}

/* Product-card copy is a block-level choice. It deliberately leaves the
   image, required sponsored label, and list layout's price placement alone. */
.bio-amazon-block--align-center .amazon-title {
  text-align: center;
}
.bio-amazon-block--align-center .product-price {
  text-align: center;
  justify-content: center;
}
/* List layout: the price sits under the title (grid row 2), full width, so
   a struck former price can wrap onto its own line instead of squeezing
   the title. When there is no price, row 2 is empty and the title centres
   against the thumb via align-content. Left-aligned to the title. */
.bio-amazon-block--layout-list .product-price {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  padding: 0;
  align-self: start;
  justify-content: var(--ba-flex, flex-start);
}
.bio-amazon-block--layout-list .amazon-card:has(.product-price) .amazon-title { align-self: end; }

/* =====================================================================
   Photo fit (shared)
   Every cropping media surface can opt out of the crop: data-fit="contain"
   shows the whole image against the surface's own background, and
   data-fit="blur" fills the resulting bars with a blurred copy of the image.
   The container must already be position:relative + overflow:hidden — every
   surface that opts in is.
   ===================================================================== */
/* The attribute is repeated to out-specify each surface's own
   `.bio-x-media img { object-fit: cover }`, which would otherwise win on
   source order alone. */
[data-fit="contain"][data-fit] > img,
[data-fit="blur"][data-fit] > img {
  object-fit: contain;
}

/* Surfaces that paint their photo as a CSS background rather than an <img>
   (the header photo and the avatar) need the same switch on background-size. */
.bio-portrait[data-fit],
.bio-avatar[data-fit] {
  background-size: contain !important;
  background-repeat: no-repeat;
  background-position: center;
}
/* The blurred layer is a child, so these two need a stacking + clipping context.
   Only the avatar lacks a position: .bio-portrait is already absolute (overlay)
   or relative (banner), and forcing `relative` on it here pulled the overlay
   photo out of its inset:0 fill — it collapsed to zero height and vanished. */
.bio-portrait[data-fit],
.bio-avatar[data-fit] { overflow: hidden; }
.bio-avatar[data-fit] { position: relative; }
/* Stays absolute (inset:0) so it keeps filling the header in both layouts. */
.bio-portrait[data-fit] > .bio-portrait-vid { z-index: 1; }
/* …and the text scrim stays above both the blur layer and the video. */
.bio-portrait[data-fit]::after { z-index: 2; }

.bio-fit-blur {
  position: absolute;
  /* Overscanned so the blur's soft edge never shows the container's corner. */
  inset: -8%;
  z-index: 0;
  background-position: center;
  background-size: cover;
  filter: blur(18px) saturate(1.08);
  transform: scale(1.04);
}

/* Course block — a single editorial offer card rather than a product shelf.
   The outer .block remains editor/reorder chrome; the inner card is the real
   public surface (and becomes the link when a destination exists), inheriting
   the page's card, text, radius and accent. */
.block.bio-course-block {
  min-width: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.bio-course-card {
  display: grid;
  grid-template-columns: minmax(112px, 38%) minmax(0, 1fr);
  /* Author-set via an inline --bio-course-h; the fallback is the original fixed
     card height, so pre-slider cards render unchanged. */
  min-height: var(--bio-course-h, 210px);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--bio-text, #111827) 9%, transparent);
  border-radius: var(--r-card, 14px);
  background: var(--bio-card, #fff);
  color: var(--bio-text, #111827);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
  text-align: left;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.bio-course-card--image-right { grid-template-columns: minmax(0, 1fr) minmax(112px, 38%); }
.bio-course-card--image-right .bio-course-media { order: 2; }
.bio-course-card--image-right .bio-course-content { order: 1; }

/* Image on top: one column, the artwork banner-cropped by object-fit rather
   than by a second upload preset. */
.bio-course-card--image-top {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}
.bio-course-card--image-top .bio-course-media {
  min-height: 0;
  height: var(--bio-course-h, 210px);
}

.bio-course-media {
  position: relative;
  min-width: 0;
  min-height: var(--bio-course-h, 210px);
  overflow: hidden;
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--primary-color, #4c7cf5) 13%, #f8fafc),
    color-mix(in srgb, var(--primary-color, #4c7cf5) 28%, #e2e8f0));
}

.bio-course-media img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.bio-course-media-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color, #4c7cf5);
  font-size: 42px;
  opacity: .8;
}

/* Sits over the artwork so it reads at a glance in every image position. */
.bio-course-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  max-width: calc(100% - 20px);
  padding: 4px 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bio-course-badge, var(--primary-color, #4c7cf5));
  color: var(--bio-accent-fg, #fff);
  font-size: calc(var(--bio-fs, 1) * 10px);
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* A custom badge colour is not the accent, so the accent's foreground no
   longer applies; white reads on every picker-dark default. */
.bio-course-badge[style*="--bio-course-badge"] { color: #fff; }

.bio-course-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  /* Row spacing lives in `gap`, not in per-child margins, because the CTA is
     pushed down by `margin-top: auto` — which resolves to ZERO once a long
     title fills the column, leaving the button welded to the text. A gap is
     applied on top of that free space, so the separation survives. */
  gap: 10px;
  padding: 18px;
}

.bio-course-title {
  color: var(--bio-text, #111827);
  font-family: var(--bio-heading-font-family, inherit);
  font-size: calc(var(--bio-fs, 1) * 17px);
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.bio-course-description {
  color: color-mix(in srgb, var(--bio-text, #111827) 76%, transparent);
  font-size: calc(var(--bio-fs, 1) * 12px);
  line-height: 1.42;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.bio-course-prices {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  /* Its own row spacing comes from the column's gap. */
  margin: 2px 0 0;
}

.bio-course-price {
  color: var(--primary-color, #4c7cf5);
  font-size: calc(var(--bio-fs, 1) * 16px);
  font-weight: 800;
  line-height: 1;
}

.bio-course-compare {
  color: color-mix(in srgb, var(--bio-text, #111827) 55%, transparent);
  font-size: calc(var(--bio-fs, 1) * 13px);
  line-height: 1;
}

.bio-course-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--bio-tap-min, 44px);
  margin-top: auto;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--primary-color, #4c7cf5) 72%, #111827);
  border-radius: var(--r-row, 8px);
  background: var(--primary-color, #4c7cf5);
  color: var(--bio-accent-fg, #fff);
  font-size: calc(var(--bio-fs, 1) * 12px);
  font-weight: 750;
  line-height: 1.15;
  text-align: center;
}

@media (hover: hover) {
  a.bio-course-card:hover {
    transform: translateY(var(--bio-lift));
    border-color: color-mix(in srgb, var(--primary-color, #4c7cf5) 44%, transparent);
    box-shadow: 0 14px 28px -14px color-mix(in srgb, var(--primary-color, #4c7cf5) 54%, rgba(15, 23, 42, .3));
  }
}

@media (max-width: 355px) {
  .bio-course-card,
  .bio-course-card--image-right {
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
  }
  .bio-course-card--image-right { grid-template-columns: minmax(0, 1fr) minmax(96px, 34%); }
  .bio-course-card--image-top { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .bio-course-card--image-top .bio-course-media { min-height: 0; }
  .bio-course-content { gap: 8px; padding: 14px; }
  .bio-course-title { font-size: calc(var(--bio-fs, 1) * 15px); }
  .bio-course-description { font-size: calc(var(--bio-fs, 1) * 11px); }
  .bio-course-prices { margin: 1px 0 0; }
  /* Narrow phones tighten the padding but NOT the tap floor. */
  .bio-course-cta { padding: 7px 9px; }
}

/* =====================================================================
   IMMERSIVE card style (theme-wide, set via data-theme-card on .phone-inner).
   Every clickable surface — link rows, Amazon cards, tour events, email —
   becomes the same dark accent-glow card: rich accent base + a LINEAR accent
   highlight (aspect-robust: grid squares AND wide rows look the same) + a
   depth vignette + a floating thumb. Media (image/video) is light-touch only.
   Music card is already dark, so it is intentionally NOT in this group.
   ===================================================================== */
.phone-inner[data-theme-card="immersive"] .bio-link-row,
.phone-inner[data-theme-card="immersive"] .amazon-card,
.phone-inner[data-theme-card="immersive"] .bio-tour-event,
.phone-inner[data-theme-card="immersive"] .bio-email-block {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  /* border: 0, not transparent — the ::before/::after overlays only cover the
     padding box, so a kept-but-transparent border ring leaks the raw gradient
     as a 1px light line at the card edge. */
  border: 0;
  background: linear-gradient(155deg,
    color-mix(in srgb, var(--primary-color, #4c7cf5) 84%, #fff) 0%,
    var(--primary-color, #4c7cf5) 48%,
    color-mix(in srgb, var(--primary-color, #4c7cf5) 80%, #000) 100%);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--primary-color, #4c7cf5) 58%, transparent);
}
.phone-inner[data-theme-card="immersive"] .bio-link-row::before,
.phone-inner[data-theme-card="immersive"] .amazon-card::before,
.phone-inner[data-theme-card="immersive"] .bio-tour-event::before,
.phone-inner[data-theme-card="immersive"] .bio-email-block::before {
  content: "";
  position: absolute;
  /* -1px overshoot: at fractional DPR the hover translateY can leave a
     1-device-px sliver of raw gradient at the edge if the overlay snaps
     differently than the background. overflow:hidden clips the excess. */
  inset: -1px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(170deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, 0) 24%);
  opacity: 1;
}
.phone-inner[data-theme-card="immersive"] .bio-link-row::after,
.phone-inner[data-theme-card="immersive"] .amazon-card::after,
.phone-inner[data-theme-card="immersive"] .bio-tour-event::after,
.phone-inner[data-theme-card="immersive"] .bio-email-block::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .20) 100%);
}
/* Content sits above the glow/vignette layers */
.phone-inner[data-theme-card="immersive"] .bio-link-thumb,
.phone-inner[data-theme-card="immersive"] .bio-link-body,
.phone-inner[data-theme-card="immersive"] .amazon-thumb,
.phone-inner[data-theme-card="immersive"] .amazon-title,
.phone-inner[data-theme-card="immersive"] .product-price,
.phone-inner[data-theme-card="immersive"] .bio-tour-main,
.phone-inner[data-theme-card="immersive"] .bio-tour-map,
.phone-inner[data-theme-card="immersive"] .bio-email-preview { position: relative; z-index: 1; }
/* Text → white / light */
.phone-inner[data-theme-card="immersive"] .bio-link-row-title,
.phone-inner[data-theme-card="immersive"] .amazon-title,
.phone-inner[data-theme-card="immersive"] .product-price,
.phone-inner[data-theme-card="immersive"] .bio-tour-venue,
.phone-inner[data-theme-card="immersive"] .bio-tour-day,
.phone-inner[data-theme-card="immersive"] .bio-email-heading,
.phone-inner[data-theme-card="immersive"] .bio-email-description,
.phone-inner[data-theme-card="immersive"] .bio-email-success,
.phone-inner[data-theme-card="immersive"] .bio-contact-success,
.phone-inner[data-theme-card="immersive"] .bio-video-title { color: #fff; }
.phone-inner[data-theme-card="immersive"] .amazon-card .product-price { color: var(--ba-price, #fff); }
.phone-inner[data-theme-card="immersive"] .bio-tour-month,
.phone-inner[data-theme-card="immersive"] .bio-tour-city { color: rgb(255 255 255 / .72); }
/* Caption sits on the PAGE bg (image block is frame-less) — key on page bg. */
.phone-inner[data-theme-bg="dark"] .bio-image-caption,
.phone-inner[data-theme-bg="linktwin"] .bio-image-caption { color: rgb(255 255 255 / .72); }
/* Thumbnails: glassy on dark; amazon thumb floats */
.phone-inner[data-theme-card="immersive"] .bio-link-thumb { background: rgb(255 255 255 / .12); color: #fff; }
.phone-inner[data-theme-card="immersive"] .amazon-thumb { box-shadow: 0 16px 32px -12px rgba(0, 0, 0, .7); }
.phone-inner[data-theme-card="immersive"] .amazon-thumb--empty,
.phone-inner[data-theme-card="immersive"] .amazon-thumb--icon { background: rgba(255, 255, 255, .16); }
.phone-inner[data-theme-card="immersive"] .amazon-thumb--empty::before,
.phone-inner[data-theme-card="immersive"] .bio-thumb-fallback .bi,
.phone-inner[data-theme-card="immersive"] .amazon-thumb--icon i { color: #fff; opacity: .9; }
/* "Past" tour tag on dark */
.phone-inner[data-theme-card="immersive"] .bio-tour-past { background: rgb(255 255 255 / .14); color: rgb(255 255 255 / .7); }
/* Compact list / dropdown are ONE panel: the immersive accent card belongs to
   the panel, not to every row (a card per row is what "cards" is for). */
.phone-inner[data-theme-card="immersive"] .bio-tour-block--layout-list .bio-tour-event,
.phone-inner[data-theme-card="immersive"] .bio-tour-drop .bio-tour-event {
  background: none;
  box-shadow: none;
  border-bottom: 1px solid rgb(255 255 255 / .16);
}
.phone-inner[data-theme-card="immersive"] .bio-tour-block--layout-list .bio-tour-event::before,
.phone-inner[data-theme-card="immersive"] .bio-tour-block--layout-list .bio-tour-event::after,
.phone-inner[data-theme-card="immersive"] .bio-tour-drop .bio-tour-event::before,
.phone-inner[data-theme-card="immersive"] .bio-tour-drop .bio-tour-event::after { content: none; }
.phone-inner[data-theme-card="immersive"] .bio-tour-block--layout-list .bio-tour-event:last-child,
.phone-inner[data-theme-card="immersive"] .bio-tour-drop .bio-tour-event:last-child { border-bottom: 0; }
.phone-inner[data-theme-card="immersive"] .bio-tour-block--layout-list .bio-tour-list,
.phone-inner[data-theme-card="immersive"] .bio-tour-dropwrap,
.phone-inner[data-theme-card="immersive"] .bio-tour-drop {
  color: #fff;
  border: 0;
  background: linear-gradient(155deg,
    color-mix(in srgb, var(--primary-color, #4c7cf5) 84%, #fff) 0%,
    var(--primary-color, #4c7cf5) 48%,
    color-mix(in srgb, var(--primary-color, #4c7cf5) 80%, #000) 100%);
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--primary-color, #4c7cf5) 58%, transparent);
}
.phone-inner[data-theme-card="immersive"] .bio-tour-drop .bio-tour-list { border-top-color: rgb(255 255 255 / .16); }
.phone-inner[data-theme-card="immersive"] .bio-tour-dropwrap .bio-tour-drop { background: none; box-shadow: none; }
/* Email inputs stay readable (glassy) */
.phone-inner[data-theme-card="immersive"] .bio-email-block input { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .2); }
.phone-inner[data-theme-card="immersive"] .bio-email-block input::placeholder { color: rgb(255 255 255 / .6); }
/* No extra 1px light border on near-black backgrounds: the accent-gradient
   cards are visible on their own, and the rim read as an "edge leak". */

.bio-amazon-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;     /* center the chip so it never clips the rounded edge */
  margin-top: 10px;
}

.deeplink-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: calc(var(--bio-fs, 1) * 11px);
  font-weight: 600;
  color: var(--primary-color);
}

.bio-amazon-count {
  font-size: calc(var(--bio-fs, 1) * 11px);
  color: var(--gray-400);
}

.bio-video-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bio-video-card {
  position: relative;
  border-radius: var(--r-media, 12px);
  overflow: hidden;
  display: block;
  cursor: pointer;
}
/* transition + hover lift: shared interaction block below */

/* Video blocks render edge-to-edge (no boxy .block frame); overflow:visible so the hover lift/shadow isn't clipped. */
.block.bio-video-block { background: transparent; border: none; overflow: visible; }

.bio-video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  overflow: hidden;
}

/* Photo fit on a video card (see the shared "Photo fit" section). Only a
   hand-uploaded thumbnail is ever anything but 16:9, so the attribute appears
   on those cards alone. The cell already clips and is positioned; the image
   just needs to sit above the blurred backdrop.

   isolation keeps that z-index INSIDE the thumb. Without it the lifted image
   also outranks the card's own overlays — the title bar and the play badge are
   positioned siblings at z-index auto — and a Fit/Blur thumbnail buried both. */
.bio-video-thumb[data-fit] { isolation: isolate; }
.bio-video-thumb[data-fit] > img { position: relative; z-index: 1; }
.bio-video-thumb[data-fit]::after { z-index: 2; }

.bio-video-thumb::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 34px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28.57 20'%3E%3Cpath d='M27.97 3.12C27.64 1.89 26.68.93 25.45.6 23.22 0 14.29 0 14.29 0S5.35 0 3.12.6C1.89.93.93 1.89.6 3.12 0 5.35 0 10 0 10s0 4.65.6 6.88c.33 1.23 1.3 2.19 2.53 2.52C5.35 20 14.29 20 14.29 20s8.93 0 11.16-.6c1.23-.33 2.19-1.3 2.52-2.52.6-2.23.6-6.88.6-6.88s0-4.65-.6-6.88Z' fill='%23FF0000'/%3E%3Cpath d='M11.43 14.29 18.85 10l-7.42-4.29v8.57Z' fill='%23fff'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0.85;
  transition: opacity .15s, transform .15s;
  pointer-events: none;
}
@media (hover: hover) {
  .bio-video-card:hover .bio-video-thumb::after { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.bio-video-block--no-play .bio-video-thumb::after {
  display: none;
}

/* Inline-embed card: hide the play badge once the iframe is playing. */
.bio-video-card.is-playing .bio-video-thumb::after { display: none; }
.bio-video-card--embed { cursor: pointer; }
/* ...and the title bar with it. It is absolutely positioned over the bottom of
   the thumb, which is exactly where the player's timeline sits: left in place it
   stays on screen over the video and takes every tap meant for the scrubber. */
.bio-video-card.is-playing .bio-video-body { display: none; }
.bio-video-card.is-playing { cursor: default; }
/* A compact row's 116px thumb is too small to hold a player (YouTube's floor is
   200px), so a playing row opens up to the full card width. */
.bio-video-block--layout-compact .bio-video-card.is-playing { display: block; }
/* A grid tile (~170px on a 360px screen) is too small as well, but opening it
   in place would reshuffle the grid, so the player goes in a full-width stage
   above the tiles and the tapped tile stays put, ringed as the one playing. */
.bio-video-stage {
  grid-column: 1 / -1;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-media, 12px);
  overflow: hidden;
  background: #000;
}
.bio-video-card.is-staged { cursor: default; outline: 2px solid var(--bio-accent, #4c7cf5); outline-offset: 2px; }
.bio-video-card.is-staged .bio-video-thumb::after { display: none; }

.bio-video-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 12px 10px;
  background: linear-gradient(to top, rgb(0 0 0 / 0.75) 0%, rgb(0 0 0 / 0.35) 60%, transparent 100%);
}

.bio-video-title {
  font-size: calc(var(--bio-fs, 1) * 13px);
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bio-video-rotator-tag {
  margin-top: 4px;
  font-size: calc(var(--bio-fs, 1) * 10px);
  font-weight: 600;
  color: rgb(255 255 255 / 0.8);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.bio-video-block--layout-compact .bio-video-list {
  gap: 8px;
}

/* The compact row is a ~35%-media card: at 360px that is a 116px thumbnail in a
   ~67px row. The old 96px thumb was 29% of the card, which read as a stamp glued
   to an empty white slab -- worst on a one-line title -- and left the play badge
   covering a third of the artwork. 116px is the ceiling: past it the remaining
   text column is too narrow and a normal two-line video title starts to clamp.
   No border: the hero and grid cards don't have one either, and on a coloured
   page a flat gray hairline reads as unfinished, so the row carries its weight
   with a shadow like every other pressable. */
.bio-video-block--layout-compact .bio-video-card {
  display: flex;
  align-items: stretch;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / .10), 0 6px 14px rgb(0 0 0 / .06);
}

.bio-video-block--layout-compact .bio-video-thumb {
  /* aspect-ratio 16/9 sets the row's floor height; align-items:stretch fills any
     extra a three-line title would add, so the artwork is never letterboxed by
     white slivers. */
  flex: 0 0 116px;
}

.bio-video-block--layout-compact .bio-video-thumb::after {
  width: 26px;
  height: 18px;
}

.bio-video-block--layout-compact .bio-video-body {
  position: static;
  background: none;
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  /* Centre the title against the thumbnail rather than top-aligning it: a
     one-line title next to a 65px thumb otherwise floats at the top edge. */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bio-video-block--layout-compact .bio-video-title {
  color: var(--gray-800);
  text-shadow: none;
  line-height: 1.32;
}

.bio-video-block--layout-compact .bio-video-rotator-tag {
  color: var(--primary-color);
}

.bio-video-block--layout-grid .bio-video-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.bio-video-block--layout-grid .bio-video-title {
  font-size: calc(var(--bio-fs, 1) * 12px);
}

.bio-video-block--layout-grid .bio-video-thumb::after {
  width: 36px;
  height: 25px;
}

/* A grid tile is only ~85-118px tall, so a two-line title overlay reached the
   middle of the thumbnail and covered the centred play badge. The caption
   takes a slimmer fade, and while a title is shown the badge sits in the
   middle of the picture left ABOVE the caption instead of the whole tile. */
.bio-video-block--layout-grid .bio-video-body {
  padding: 16px 8px 8px;
}
.bio-video-block--layout-grid .bio-video-card:has(> .bio-video-body) .bio-video-thumb::after {
  top: calc(50% - 16px * var(--bio-fs, 1));
}

.bio-music-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* The music cards are the cards — the wrapper drops the white .block surface
   (it bled through at the dark cards' rounded corners, same artifact as the
   image block) and stays overflow-visible so card shadows aren't clipped. */
.block.bio-music-block {
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
}

.bio-music-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-card, 14px);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #fff;
  min-width: 0;
  isolation: isolate;
}

.bio-music-card::before {
  content: "";
  position: absolute;
  inset: -10%;
  background-image: var(--bio-music-cover, none);
  background-size: cover;
  background-position: center;
  filter: blur(28px) saturate(1.3) brightness(0.55);
  transform: scale(1.18);
  z-index: 0;
  pointer-events: none;
}

.bio-music-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.15), rgb(0 0 0 / 0.55));
  z-index: 0;
  pointer-events: none;
}

.bio-music-card > * {
  position: relative;
  z-index: 1;
}

/* Music follows the theme-wide card style.
   IMMERSIVE = cover-art blur (::before) washed with the accent tint (::after) —
   so it keeps album texture but reads as the theme, matching the other cards. */
.phone-inner[data-theme-card="immersive"] .bio-music-card {
  background: linear-gradient(150deg,
    color-mix(in srgb, var(--primary-color, #4c7cf5) 44%, #111a2e) 0%,
    color-mix(in srgb, var(--primary-color, #4c7cf5) 20%, #080c16) 100%);
}
.phone-inner[data-theme-card="immersive"] .bio-music-card::after {
  background: linear-gradient(150deg,
    color-mix(in srgb, var(--primary-color, #4c7cf5) 72%, transparent) 0%,
    color-mix(in srgb, var(--primary-color, #4c7cf5) 40%, transparent) 56%,
    rgba(8, 12, 22, .58) 100%);
}
/* WHITE = clean white card; drop the blur + vignette, dark text, light chips. */
.phone-inner[data-theme-card="white"] .bio-music-card {
  background: var(--bio-card, #fff);
  color: var(--bio-text, #1d2430);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
}
.phone-inner[data-theme-card="white"] .bio-music-card::before,
.phone-inner[data-theme-card="white"] .bio-music-card::after { display: none; }
.phone-inner[data-theme-card="white"] .bio-music-title { color: var(--bio-text, #1d2430); }
.phone-inner[data-theme-card="white"] .bio-music-artist {
  color: color-mix(in srgb, var(--bio-text, #1d2430) 62%, transparent);
}
/* Only visible where the artwork is missing or transparent, but a pinned light
   plate on a dark card is a bright hole exactly then. */
.phone-inner[data-theme-card="white"] .bio-music-thumb[data-fit] { position: relative; overflow: hidden; }
.bio-music-thumb[data-fit] > img { position: relative; z-index: 1; }

.bio-music-thumb {
  background: color-mix(in srgb, var(--bio-text, #1d2430) 6%, var(--bio-card, #fff));
}
/* Icon chips sit on the card surface; list-style "Listen on X" rows below are
   primary actions and deliberately use the theme accent instead. */
.phone-inner[data-theme-card="white"] .bio-music-block:not(.bio-music-block--dsp-list) .bio-music-dsp-pill {
  background: color-mix(in srgb, var(--bio-text, #1d2430) 6%, var(--bio-card, #fff));
}
/* Drop the dark-card text-shadow on the white card (else title/artist look embossed). */
.phone-inner[data-theme-card="white"] .bio-music-title,
.phone-inner[data-theme-card="white"] .bio-music-artist { text-shadow: none; }
.bio-music-thumb {
  border-radius: var(--r-thumb, 8px);
  overflow: hidden;
  flex-shrink: 0;
  background: rgb(255 255 255 / 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(255 255 255 / 0.85);
  font-size: calc(var(--bio-fs, 1) * 11px);
  font-weight: 700;
  text-transform: uppercase;
}

.bio-music-body {
  flex: 1;
  min-width: 0;
}

.bio-music-title {
  font-size: calc(var(--bio-fs, 1) * 14px);
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
}

.bio-music-artist {
  font-size: calc(var(--bio-fs, 1) * 12px);
  color: rgb(255 255 255 / 0.75);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
}

.bio-music-dsps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bio-music-dsp-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.18);
  overflow: hidden;
}

.bio-music-dsp-pill img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;
}

/* Per-DSP visual size tweaks for the round-chip context (moved here from the
   editor stylesheet — single source). Brand SVGs ship with very different
   internal padding, so each is nudged to a consistent visual weight. The
   dsp-list row variant resets the transform below. */
.bio-music-dsp-pill.bio-music-dsp-spotify     img { transform: scale(1.10); }
.bio-music-dsp-pill.bio-music-dsp-youtube     img { transform: scale(0.65); }
.bio-music-dsp-pill.bio-music-dsp-tidal       img { transform: scale(0.80); }
.bio-music-dsp-pill.bio-music-dsp-deezer      img { transform: scale(0.85); }
.bio-music-dsp-pill.bio-music-dsp-amazonStore img { transform: scale(0.85); }
.bio-music-dsp-pill.bio-music-dsp-soundcloud  img { transform: scale(0.85); }

.bio-music-dsp-label {
  display: none;
}

.bio-music-block--layout-big .bio-music-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}

.bio-music-block--layout-big .bio-music-thumb {
  width: var(--bio-music-cover-size, 65%);
  max-width: var(--bio-music-cover-max, 200px);
  aspect-ratio: 1 / 1;
  border-radius: var(--r-media, 12px);
  box-shadow: 0 12px 28px -8px rgb(0 0 0 / 0.55);
  margin-bottom: 16px;
}

.bio-music-block--layout-big .bio-music-body {
  width: 100%;
  text-align: center;
  margin-bottom: 16px;
}

/* Three lines, not the base two: the title sits full-width under the cover and
   the card has vertical room, while a long release name at a large global font
   ("Reckless (30th Anniversary / Deluxe Edition)") lost its ending on two lines.
   Compact keeps two — there the title shares the row with the cover. */
.bio-music-block--layout-big .bio-music-title {
  font-size: calc(var(--bio-fs, 1) * 16px);
  -webkit-line-clamp: 3;
}

.bio-music-block--layout-big .bio-music-dsps {
  justify-content: center;
  gap: 8px;
}

/* The body already spaces the rows by 16px; the list variant's own margin-top
   stacked on top of it and made the title→rows gap 22px, off the 8px scale. */
.bio-music-block--layout-big.bio-music-block--dsp-list .bio-music-dsps {
  margin-top: 0;
}

.bio-music-block--layout-big .bio-music-dsp-pill {
  width: 36px;
  height: 36px;
}

.bio-music-block--layout-compact .bio-music-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  padding: 12px;
  align-items: center;
}

.bio-music-block--layout-compact .bio-music-thumb {
  grid-row: 1 / span 2;
  width: 64px;
  height: 64px;
  box-shadow: 0 4px 10px -4px rgb(0 0 0 / 0.4);
}

.bio-music-block--layout-compact .bio-music-body,
.bio-music-block--layout-compact .bio-music-dsps {
  grid-column: 2;
}

.bio-music-block--layout-compact .bio-music-title {
  font-size: calc(var(--bio-fs, 1) * 15px);
  /* The title is the card's primary identifier. Keep the compact card short,
     but do not discard most of a long podcast/release name on its first line. */
  -webkit-line-clamp: 2;
}

.bio-music-block--layout-compact .bio-music-dsp-pill {
  width: 26px;
  height: 26px;
}

.bio-music-block--dsp-list .bio-music-dsps {
  grid-column: 1 / -1;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

/* "Listen on X" rows are the Music Link's primary actions. The artwork card
   remains on the Card colour; each destination uses Accent, matching Subscribe
   and other explicit CTAs. */
.bio-music-block--dsp-list .bio-music-dsp-pill {
  justify-content: flex-start;
  width: 100%;
  height: auto;
  padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--bio-accent, #4c7cf5) 72%, #111827);
  border-radius: var(--r-row, 8px);
  background: var(--bio-accent, #4c7cf5);
  box-shadow: none;
  font-size: calc(var(--bio-fs, 1) * 13px);
  font-weight: 600;
  color: var(--bio-accent-fg, #fff);
  gap: 12px;
  min-height: var(--bio-row-min, 50px);
}

.bio-music-block--dsp-list .bio-music-dsp-pill img {
  width: 24px;
  height: 24px;
  /* One silhouette for the column. The catalog mixes transparent circular marks
     with full-bleed square art and opaque raster tiles (anghami.jpg), so without
     a radius the square ones render as hard 90° corners beside circles. */
  border-radius: 6px;
  transform: none; /* neutralize the per-DSP chip scale nudges in row context */
}

.bio-music-block--dsp-list .bio-music-dsp-label {
  display: inline-block;
  flex: 1;
  min-width: 0;
  text-align: left;
  /* One line, always: the stack reads as a list only when every row is the
     same height. The label is the bare platform name (≤14 chars), which fits
     at every text size; the ellipsis is the guard for a future long name or
     translation, not something a current catalog entry reaches. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Use the same readable Accent foreground as the label. A translucent arrow
   would drop below the 3:1 non-text contrast floor on several editable colours. */
.bio-music-block--dsp-list .bio-music-dsp-pill::after {
  content: "›";
  font-size: calc(var(--bio-fs, 1) * 22px);
  font-weight: 400;
  color: var(--bio-accent-fg, #fff);
  line-height: 1;
  margin-left: auto;
}

/* Standalone Music/Podcast gate — NEUTRAL rows, no accent at all.
   A solid accent fill is the SINGLE-CTA treatment (.bio-link-block--single),
   and N stacked accent buttons give every destination the same maximum
   emphasis while burying the artwork the page exists to show. The obvious
   alternative was the multi-link contract (8% accent wash + accent outline),
   but on the gate that outline is --bio-accent at FULL strength: the row still
   reads blue, just hollow, and the wash tints the fill off-neutral too. The
   gate has no owner theme to express — themeAttrs((object) []) hands it the
   default accent — so the accent here signals nothing and only competes with
   the cover art.
   These are therefore the values the rows carried before 5f5d48f70: surface
   and edge mixed from the card's own ink, so they still follow --bio-card /
   --bio-text on a themed card, with no accent in the chain. The music block
   INSIDE a bio keeps the fill: there it is one card among many on a page the
   owner themed, and the accent is their choice. Hover/press states are shared
   with .bio-link-row and need no override. */
.bio-music-block--gate.bio-music-block--dsp-list .bio-music-dsp-pill {
  border: 1px solid color-mix(in srgb, var(--bio-text, #1d2430) 10%, transparent);
  background: color-mix(in srgb, var(--bio-text, #1d2430) 6%, var(--bio-card, #fff));
  color: var(--bio-text, #1d2430);
}

/* Quiet grey on any card colour, and over the 3:1 non-text floor. .62 is what
   this chevron carried before the fill; currentColor keeps it mixed from the
   row's own ink rather than pinning a grey. */
.bio-music-block--gate.bio-music-block--dsp-list .bio-music-dsp-pill::after {
  color: currentColor;
  opacity: .62;
}

.bio-email-block {
  background: var(--bio-card, #fff);
  border: 1px solid color-mix(in srgb, var(--bio-text, #1f2937) 12%, transparent);
  border-radius: var(--r-card, 14px);
  overflow: hidden;
}

.bio-email-preview {
  padding: 16px;
}

.bio-email-heading {
  font-weight: 600;
  font-size: calc(var(--bio-fs, 1) * 15px);
  color: var(--bio-text, var(--gray-900));
  margin-bottom: 4px;
}

/* A card heading with no supporting copy needs a little more separation from
   the first field. Scope it to the card layout so compact forms keep their
   intentionally tight, single-row rhythm. When a description follows, its
   10px margin still sets the effective gap. */
.bio-email-block--layout-card .bio-email-heading {
  margin-bottom: 8px;
}

.bio-email-description {
  font-size: calc(var(--bio-fs, 1) * 13px);
  color: color-mix(in srgb, var(--bio-text, #1f2937) 75%, transparent);
  margin-bottom: 10px;
  line-height: 1.4;
}

/* Email alignment is local to its copy. Inputs remain left-aligned and the
   submit button remains centred, irrespective of this presentation choice. */
.bio-email-block--align-center .bio-email-heading,
.bio-email-block--align-center .bio-email-description {
  text-align: center;
}

/* Field colours follow the theme, not a fixed gray ramp — same tokens as
   .bio-contact-input, so a contact form and an email capture sitting on the
   same page read as one card set instead of themed-vs-white. */
.bio-email-input-preview,
.bio-email-preview input {
  width: 100%;
  /* The same floor as the Subscribe button beside or below it: at 36px the
     field was a shorter box than its own button in the compact row, and a
     thin target for a thumb. */
  min-height: var(--bio-tap-min, 44px);
  border: 1px solid color-mix(in srgb, var(--bio-text, #1f2937) 18%, transparent);
  border-radius: var(--r-row, 8px);
  background: color-mix(in srgb, var(--bio-card, #fff) 92%, #fff);
  padding: 8px 12px;
  color: var(--bio-text, #1f2937);
  font-size: calc(var(--bio-fs, 1) * 13px);
  line-height: 1.2;
}

/* The editor renders inert divs in place of the live inputs. Let both forms
   grow with the page font size: a 36px border-box minus 16px padding leaves
   only 18px for text, which is too short at the 20px text-size setting. */
.bio-email-input-preview {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  color: color-mix(in srgb, var(--bio-text, #1f2937) 45%, transparent);
}

.bio-email-preview input {
  display: block;
  height: auto;
  margin-bottom: 8px;
}

.bio-email-preview input::placeholder {
  color: color-mix(in srgb, var(--bio-text, #1f2937) 45%, transparent);
}

/* Same focus cue as the contact form's fields (.bio-contact-input:focus). */
.bio-email-preview input {
  transition: border-color .12s ease, box-shadow .12s ease;
}
.bio-email-preview input:focus {
  outline: none;
  border-color: var(--bio-accent, #5b6cff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bio-accent, #5b6cff) 22%, transparent);
}

.bio-email-btn {
  /* flex, not block: the 44px tap floor below has to centre the label rather
     than hang it off the top edge. width:100% keeps the card-form layout and
     the compact row still overrides it to width:auto. */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--bio-tap-min, 44px);
  border: 0;
  color: var(--bio-accent-fg, #fff);
  text-align: center;
  padding: 9px;
  border-radius: var(--r-row, 8px);
  font-weight: 600;
  font-size: calc(var(--bio-fs, 1) * 14px);
  background: var(--bio-accent, #5b6cff);
  cursor: pointer;
}

/* Lift + accent glow come from the shared interaction block. */
@media (hover: hover) {
  .bio-email-btn:hover { filter: brightness(1.08); }
}

/* Loading: hide label, spin a ring in its place. Text stays in flow (transparent)
   so button height doesn't jump.
   Email capture only. The contact form has its own busy treatment — the
   .is-sending veil with .bio-contact-busy — so giving its submit button a
   second spinner here would draw one underneath the other. */
.bio-email-btn.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.bio-email-btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bio-email-spin .6s linear infinite;
}

@keyframes bio-email-spin {
  to { transform: rotate(360deg); }
}

.bio-email-success {
  text-align: center;
  padding: 12px 0;
  font-weight: 600;
  font-size: calc(var(--bio-fs, 1) * 14px);
  animation: bio-form-reveal .28s cubic-bezier(.2,.8,.25,1) both;
}

.bio-email-success-check {
  width: 36px;
  height: 36px;
  line-height: 36px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--bio-accent, #5b6cff);
  color: var(--bio-accent-fg, #fff);
  font-size: 18px;
  animation: bio-form-check .34s cubic-bezier(.2,1.5,.35,1) .06s both;
}

.bio-email-status {
  min-height: 16px;
  margin-top: 8px;
  font-size: calc(var(--bio-fs, 1) * 12px);
  color: var(--gray-500);
}

/* Don't reserve a dead strip below the button before there's a message. */
.bio-email-status:empty {
  display: none;
}

/* Consent checkbox. Stays out of the layout until the visitor has typed a
   valid address (the reveal is in the page's email script), so an opt-in form
   is a single field until it needs to be two. [hidden] needs the explicit
   rule because display:flex would otherwise win over the attribute. */
.bio-email-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 10px;
  font-size: calc(var(--bio-fs, 1) * 12px);
  line-height: 1.4;
  color: color-mix(in srgb, var(--bio-text, #1f2937) 75%, transparent);
  text-align: left;
  cursor: pointer;
}
.bio-email-consent[hidden] {
  display: none;
}
/* The text-input rules above (.bio-email-preview input) also match this box:
   they set display:block, width:100%, min-height:36px, a border, 12px padding
   and a bottom margin. Left alone that inflates the checkbox into a 36px-tall
   bordered slab, which is what pushed it out of line with its own label. Every
   one of those has to be undone explicitly — being later in the file isn't
   enough for properties the checkbox rule doesn't mention. */
.bio-email-consent input[type="checkbox"] {
  display: inline-block;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  /* Centre the box on the first line of label text rather than its top edge:
     half the line box, minus half the control. */
  margin: calc((1.4em - 15px) / 2) 0 0;
  accent-color: var(--bio-accent, #5b6cff);
  cursor: pointer;
}
.bio-email-consent a {
  color: inherit;
  text-decoration: underline;
}

/* Editor preview: a drawn box, never a real input — the owner shouldn't be
   able to tick their own visitors' consent. */
.bio-email-consent--preview .bio-email-consent-box {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: calc((1.4em - 15px) / 2);
  border: 1.5px solid color-mix(in srgb, var(--bio-text, #1f2937) 40%, transparent);
  border-radius: 3px;
}

/* Compact layout: optional heading above a single inline row. The email
   field flexes to fill, the Subscribe button hugs its label. Without this
   the card-form rules above (.bio-email-preview input + .bio-email-btn are
   both display:block; width:100%) make input and button split the row
   ~50/50 and the input's margin-bottom offsets it from the button centre. */
.bio-email-compact {
  display: flex;
  gap: 8px;
  align-items: center;
}
.bio-email-compact input {
  flex: 1;
  min-width: 0;
  width: auto;
  margin-bottom: 0;
}
.bio-email-compact .bio-email-input-preview {
  flex: 1;
  min-width: 0;
  width: auto;
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bio-email-compact .bio-email-btn {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 9px 16px;
}

.bio-amazon-disclosure,
.bio-disclosure,
.bio-footer {
  text-align: center;
  /* --bio-footer-color is emitted for custom backgrounds (luminance-derived in
     BioPageRenderer) so footer text stays readable on any bg; presets fall back
     to gray-500 and keep their own per-theme overrides below. */
  color: var(--bio-footer-color, var(--gray-500));
  /* Legal/footer chrome is pinned to a fixed system font + size so a theme's
     custom font family or font-size scale (--bio-font-family / --bio-fs) never
     enlarges or restyles the disclosure & footer links. */
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  line-height: 1.4;
  margin: 16px 10px 0;
}

.bio-footer a {
  font-weight: 700;
}

/* The "footer"-positioned Amazon disclosure now closes the CONTENT column (it is
   the owner's statement about the owner's links) instead of sitting inside our
   .bio-page-footer chrome. As a direct child of #populatedContent it already gets
   the column's --bio-gap above it, so the rule's own 16px top margin would double
   the space and detach it from the links it describes. The "under products"
   position is nested inside the Amazon block and keeps the default. */
#populatedContent > .bio-amazon-disclosure {
  margin-top: 0;
}

.phone-inner[data-theme-bg="dark"] .bio-name,
.phone-inner[data-theme-bg="dark"] .section-header {
  /* --bio-name-color (a per-profile name override) wins over the dark default;
     it only resolves under .bio-profile, so the other grouped titles keep #f3f4f6. */
  color: var(--bio-name-color, #f3f4f6);
}
/* Link labels: the dark default must not repaint an owner-picked colour. These
   rules weigh the same as the custom-colour rules and come later in the file,
   so they read the picks through the cascade instead: a link's own text colour
   (--bl-text, Single Link or Multi Link row), then its Multi Link section's
   (--bs-text), then the dark default -- the same precedence as a light page. */
.phone-inner[data-theme-bg="dark"] .bio-link-row-title {
  color: var(--bl-text, var(--bs-text, var(--bio-name-color, #f3f4f6)));
}
.phone-inner[data-theme-bg="dark"] .bio-link-section-title {
  color: var(--bs-text, var(--bio-name-color, #f3f4f6));
}

.phone-inner[data-theme-bg="dark"] .bio-tagline,
.phone-inner[data-theme-bg="dark"] .bio-text-body,
.phone-inner[data-theme-bg="dark"] .bio-footer,
.phone-inner[data-theme-bg="dark"] .bio-disclosure {
  color: var(--bio-bio-color, #9ca3af);
}

/* A white card on a dark background reads as a hole, hence the wash. Scoped
   to the OUTLINE variant: a Single Link is filled with the accent, which needs
   no rescuing, and repainting it here would undo the fill. */
.phone-inner[data-theme-bg="dark"][data-theme-card="white"] .bio-link-block:not(.bio-link-block--single) .bio-link-row {
  --bl-row-bg: rgb(255 255 255 / 0.08);
}

/* Plain style on a dark theme → light marks (tiles/brand carry their own contrast). */
.phone-inner[data-theme-bg="dark"] .bio-socials[data-social-style="plain"] .bio-social {
  color: #e5e7eb;
}

/* ===== LinkTwin preset — dark hero look: glowing navy + blue→cyan gradient ===== */
.phone-inner[data-theme-bg="linktwin"] {
  background:
    radial-gradient(at 22% 16%, rgba(0, 110, 255, .34) 0%, transparent 48%),
    radial-gradient(at 84% 62%, rgba(0, 194, 255, .24) 0%, transparent 52%),
    radial-gradient(at 58% 110%, rgba(0, 102, 255, .18) 0%, transparent 50%),
    linear-gradient(160deg, #111c34 0%, #0A0F1C 58%);
}
.phone-inner[data-theme-bg="linktwin"] .bio-tagline,
.phone-inner[data-theme-bg="linktwin"] .bio-text-body,
.phone-inner[data-theme-bg="linktwin"] .bio-footer,
.phone-inner[data-theme-bg="linktwin"] .bio-disclosure { color: var(--bio-bio-color, #9ca3af); }
.phone-inner[data-theme-bg="linktwin"] .bio-link-row-title { color: var(--bl-text, var(--bs-text, #fff)); }  /* picked colours win, see the dark rule */
.phone-inner[data-theme-bg="linktwin"] .section-header { color: #f3f4f6; }  /* same as the dark preset; a picked heading colour still wins */
.phone-inner[data-theme-bg="linktwin"] .bio-socials[data-social-style="plain"] .bio-social { color: #e5e7eb; }
/* Signature: gradient name + gradient buttons (double attr beats the button-style rules) */
.phone-inner[data-theme-bg="linktwin"] .bio-name {
  /* Signature gradient name — unless a per-profile --bio-name-color is set, in
     which case it fills the text with that solid colour (text-fill-color wins). */
  background: var(--bio-name-color, linear-gradient(135deg, #4aa6ff, #00C2FF));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: var(--bio-name-color, transparent);
}
.phone-inner[data-theme-bg="linktwin"][data-theme-card="white"] .bio-link-row {
  /* The gradient is the preset's DEFAULT fill: a link's own background,
     border and text colour (--bl-*, Colours toolbar) still win. */
  background: var(--bl-bg, linear-gradient(135deg, #0066FF, #00C2FF));
  border-color: var(--bl-border, transparent);
  color: var(--bl-text, #fff);
  box-shadow: 0 10px 24px -12px rgba(0, 140, 255, .55);
}

/* Headings do NOT take the accent. Accent means "press this" now that link
   rows are buttons, and a heading is the one thing on the page you cannot
   press -- painting both the same colour makes the page's loudest element the
   one with nothing behind it.
   This only ever reached legacy bios: data-theme-btn is emitted only when the
   theme carries no numeric `radius` (BioPageRenderer::themeAttrs), and the
   editor removes the attribute outright, so anything saved since the Theme
   modal was reworked never had accent headings in the first place. */

/* Portrait (Overlay) layout: the name + bio sit ON the photo, so their DEFAULT
   colour is decided by that surface — light text over the scrim — not by the
   theme body colour. --bio-text is chosen to read on the page's flat
   background; inheriting it here put a palette's dark ink (grape #2a1b3d,
   ocean #0c2a3a, …) on a mid-tone photo, which the text-shadow alone could not
   rescue. Only the light palettes broke, so the same setting was legible or not
   depending on the theme.
   An EXPLICIT user colour still wins: cfg.name_color / cfg.bio_color (the
   swatches beside Display name and Bio in Edit Profile) and the legacy combined
   cfg.profile_text. Clearing those resets to this readable default rather than
   to the theme's body ink. --combined (Banner) is unaffected: its text sits
   below the photo on the theme background, where --bio-text is correct.
   Placed AFTER the dark/linktwin theme blocks and at matching specificity so it
   wins the cascade; the explicit background + text-fill reset still undoes the
   linktwin gradient-name treatment. */
.phone-inner .bio-profile--portrait .bio-name {
  color: var(--bio-name-color, var(--bio-profile-text, #fff));
  background: none;
  -webkit-text-fill-color: var(--bio-name-color, var(--bio-profile-text, #fff));
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.4);
}

.phone-inner .bio-profile--portrait .bio-tagline {
  color: var(--bio-bio-color, var(--bio-profile-text, #fff));
  text-shadow: 0 1px 3px rgb(0 0 0 / 0.4);
}

.phone-inner .bio-profile--portrait .bio-socials[data-social-style="plain"] .bio-social {
  color: #fff;
}

/* Ambient backdrop (portrait layout, public render): the header photo blurred
   behind the desktop card — link.me's glow. Hidden on mobile (the card fills
   the viewport); never emitted in the editor canvas. */
.bio-ambient {
  display: none;
}

/* Shape = corner radius only (Rounded default / Pill / Square). Fill is owned
   by the White/Immersive card style above. The shape sets four radius vars and
   every card surface reads var(--r-*, <its own px>): rows/inputs go full pill,
   big cards & media soften (never circle), small in-row thumbs go circular.
   Rounded sets NOTHING — the per-element fallbacks ARE today's exact values,
   so legacy pages render pixel-identical. Identity elements (avatar, social
   circles, badges/tags) deliberately don't participate. */
.phone-inner[data-theme-btn="pill"] {
  --r-row: 999px;
  --r-card: 26px;
  --r-media: 22px;
  --r-thumb: 50%;
}

.phone-inner[data-theme-btn="square"] {
  --r-row: 0;
  --r-card: 0;
  --r-media: 0;
  --r-thumb: 0;
}

/* Font size (theme.fontSize → data-theme-size). Medium sets nothing — text
   declarations read calc(var(--bio-fs, 1) * <px>), so absent attr = today. */
.phone-inner[data-theme-size="small"] { --bio-fs: .9; }
.phone-inner[data-theme-size="large"] { --bio-fs: 1.15; }

@media (min-width: 760px) {
  /* Full-bleed theme background. */
  .bio-public {
    padding: 0;
    align-items: flex-start;
  }
  .bio-public .phone-inner {
    min-height: 100vh;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    /* Center the content card vertically AND horizontally. min-height (not
       height) keeps the page scrollable: when the card is taller than the
       viewport the container grows to fit and the centering becomes a no-op
       instead of clipping the top of the card. */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  /* The SURROUND ("rest of the background") reads as frosted glass over the
     theme background. Scoped to .bio-public so the editor phone preview (no
     .bio-public wrapper) keeps the plain mobile look. */
  .bio-public .phone-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: rgb(255 255 255 / 0.5);
    -webkit-backdrop-filter: blur(40px) saturate(120%);
            backdrop-filter: blur(40px) saturate(120%);
  }
  .bio-public .phone-inner[data-theme-bg="dark"]::after {
    background: rgb(0 0 0 / 0.4);
  }

  /* Portrait glow: blurred header photo fills the surround. Painted above the
     element's theme background but below the ::after veil (pseudo paints after
     children at the same z-index), which we swap from frosted-white to a soft
     dark scrim so the glow shows through. */
  .bio-public .bio-ambient {
    display: block;
    position: fixed;
    inset: -80px;            /* overscan so the blur has no bright edges */
    z-index: 0;
    background-size: cover;
    background-position: center;
    filter: blur(64px) saturate(1.2) brightness(0.85);
    pointer-events: none;
  }
  .bio-public .phone-inner:has(.bio-ambient)::after {
    background: rgb(0 0 0 / 0.3);
  }
  /* Header videos already animate a large media layer. In some Chromium builds
     backdrop-filter makes the whole desktop page jank, so video-header pages use
     the same dark veil without sampling/blurring the pixels behind it. */
  .bio-public .phone-inner:has(#populatedContent.bio-content--portrait-video)::after {
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
  }

  /* The content CARD shows the chosen theme background CRISP (same as the
     phone), lifted off the frosted surround with rounded corners + shadow.
     Corners are cut with clip-path (NOT overflow:hidden): overflow clips the
     background and the full-bleed photo through different antialiasing
     paths, which leaves a bright 1px halo of card background along the
     rounded corners when a dark image sits on a light theme. clip-path cuts
     everything through one identical path. The shadow must be a drop-shadow
     filter — clip-path would clip an outer box-shadow away. */
  .bio-public #populatedContent {
    position: relative;
    z-index: 1;
    /* Content-height floating card — cancel the mobile flex:1 stretch so it
       doesn't grow to fill the viewport. */
    flex: 0 0 auto;
    width: min(100%, 480px);
    margin: 48px auto;
    padding: 32px 26px;
    border-radius: 30px;
    clip-path: inset(0 round 30px);
    filter: drop-shadow(0 20px 35px rgb(0 0 0 / 0.28));
  }
  /* Minimum card height, so a page with a profile and one or two blocks reads
     as a PAGE instead of a squat banner floating mid-screen — the desktop twin
     of the phone's 100vh / the editor mock's 560px. It also gives the footer's
     margin-top:auto the free space it needs to push the branding pill down to
     the card's bottom edge. Capped to the viewport minus the 48px margins so
     the whole card still fits on a laptop screen without scrolling.
     :has(> .bio-page-footer) scopes this to real bio pages — the music-link
     gate reuses .bio-public/.phone-inner/#populatedContent for its splash and
     must stay compact. */
  .bio-public #populatedContent:has(> .bio-page-footer) {
    min-height: min(720px, calc(100vh - 96px));
  }
  /* Desktop video headers are sensitive to filtered ancestors in some Chromium
     forks. Keep static pages on the crisper clip-path/drop-shadow path, but put
     animated portrait videos on cheaper overflow clipping + box-shadow. */
  .bio-public #populatedContent.bio-content--portrait-video {
    overflow: hidden;
    clip-path: none;
    filter: none;
    box-shadow: 0 20px 35px rgb(0 0 0 / 0.28);
  }
  /* When the video unloads to its poster (stutter/reduced-motion), the page is
     static again — JS adds .bio-portrait-video-fallback to <html>, so restore
     the crisper clip-path/drop-shadow path the static-photo headers use. */
  .bio-portrait-video-fallback .bio-public #populatedContent.bio-content--portrait-video {
    overflow: visible;
    clip-path: inset(0 round 30px);
    filter: drop-shadow(0 20px 35px rgb(0 0 0 / 0.28));
    box-shadow: none;
  }
  /* Cover must bleed past the desktop card's 32px/26px padding (not the mobile 28/14). */
  .bio-public #populatedContent .bio-cover {
    width: calc(100% + 52px);
    margin: -32px -26px 0;
  }
  /* Portrait bleeds 1px PAST the padding on top/sides so the card background
     can't peek through as a hairline at fractional zoom/viewport widths. */
  .bio-public #populatedContent .bio-profile--portrait {
    width: calc(100% + 54px);
    margin: -33px -27px 0;
  }
  /* Combined: the bleed lands on the in-flow header band, not the profile box. */
  .bio-public #populatedContent .bio-profile--combined .bio-portrait {
    width: calc(100% + 54px);
    margin: -33px -27px 0;
  }
  .bio-public .phone-inner[data-theme-bg="gradient-blue"] #populatedContent { background: linear-gradient(180deg, #eef4ff 0%, #fff 320px); }
  .bio-public .phone-inner[data-theme-bg="white"]         #populatedContent { background: #fff; }
  .bio-public .phone-inner[data-theme-bg="dark"]          #populatedContent { background: linear-gradient(135deg, #1f2937, #111827); }
  .bio-public .phone-inner[data-theme-bg="peach"]         #populatedContent { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
  .bio-public .phone-inner[data-theme-bg="indigo"]        #populatedContent { background: linear-gradient(160deg, #e9edff, #f5f7ff); }
  .bio-public .phone-inner[data-theme-bg="mono"]          #populatedContent { background: linear-gradient(160deg, #eef0f3, #fafafa); }
  .bio-public .phone-inner[data-theme-bg="sunset"]        #populatedContent { background: linear-gradient(160deg, #fde8d8, #fbf3ea); }
  .bio-public .phone-inner[data-theme-bg="mint"]          #populatedContent { background: linear-gradient(160deg, #e2f5ec, #f1faf6); }
  .bio-public .phone-inner[data-theme-bg="rose"]          #populatedContent { background: linear-gradient(160deg, #fde2ec, #fbecf3); }
  .bio-public .phone-inner[data-theme-bg="linktwin"]      #populatedContent { background: radial-gradient(at 22% 16%, rgba(0,110,255,.34) 0%, transparent 48%), radial-gradient(at 84% 62%, rgba(0,194,255,.24) 0%, transparent 52%), radial-gradient(at 58% 110%, rgba(0,102,255,.18) 0%, transparent 50%), linear-gradient(160deg, #111c34 0%, #0A0F1C 58%); }
  .bio-public .phone-inner[data-theme-bg="custom"]        #populatedContent { background: var(--bio-bg, #eef4ff); }

  /* "View on mobile" badge — desktop only. Deliberately quiet: a small bare
     QR tucked into the bottom-right corner, dimmed at rest so the eye stays on
     the links in the centre. It brightens to full on hover for anyone who
     actually wants to scan it. No card / shadow — just the QR's own white
     quiet zone, which is all a scanner needs. */
  .bio-qr-badge {
    display: flex;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 40;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: .7;
    transition: opacity .25s ease;
  }
  @media (hover: hover) {
    .bio-qr-badge:hover {
      opacity: 1;
    }
  }
  .bio-qr-badge__code {
    display: block;
    width: 92px;
    height: 92px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.12);
  }
  .bio-qr-badge__label {
    margin: 0;
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: .02em;
    text-align: center;
    text-shadow: 0 1px 3px rgb(0 0 0 / 0.55), 0 0 1px rgb(0 0 0 / 0.4);
  }
}

/* ============================================================
   Rendered-element hover / press / focus states.

   ONE gesture, driven by the --bio-lift* tokens at the top of
   this file. Every tappable surface used to carry its own
   hand-tuned recipe (-1px vs -2px, four shadow formulas), which
   made the same intent animate differently depending on which
   block you were pointing at.

   Hover sits behind @media (hover: hover) throughout: on touch,
   :hover latches after a tap and the surface stays lifted until
   you press something else. :active and :focus-visible are the
   states that actually matter on mobile and for keyboards, and
   they are unconditional.
   ============================================================ */

/* Resting depth for the card-coloured rows and panels that draw their own
   surface (their .block wrapper is frame-less, so the .block shadow never
   reaches them). Accent-FILLED rows are left flat on purpose: a grey shadow
   under a saturated fill reads as dirt. :where() keeps the row selectors at one
   class, so the hover and press rules below still win.
   (.bio-contact-card and .bio-tour-event lead the list on purpose: the static
   contract tests read a card's own rule as the first "<selector> {" at the
   start of a line, and this group must not be mistaken for it.) */
.bio-contact-card,
.bio-tour-event,
:where(.bio-link-block:not(.bio-link-block--single)) .bio-link-row,
:where(.bio-link-block--dropdown, .bio-calendly-block--button) .bio-link-dropdown-head {
  box-shadow: var(--bio-rest-shadow);
}

/* Neutral-surface pressables: card-coloured, so a black drop shadow. */
.amazon-card,
.bio-tour-event--link,
.bio-video-card,
a.bio-course-card,
.bio-phone-cta,
.bio-contact-trigger,
.bio-share-cta {
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

/* Accent-FILLED pressables: the glow takes the accent's own colour. */
a.bio-link-row,
.bio-music-block--dsp-list .bio-music-dsp-pill,
.bio-email-btn,
.bio-contact-submit {
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, filter .14s ease;
}

@media (hover: hover) {
  .amazon-card:hover,
  .bio-tour-event--link:hover,
  .bio-video-card:hover,
  .bio-phone-cta:hover,
  .bio-contact-trigger:hover,
  .bio-share-cta:hover {
    transform: translateY(var(--bio-lift));
    box-shadow: var(--bio-lift-shadow);
  }

  a.bio-link-row:hover,
  .bio-music-block--dsp-list .bio-music-dsp-pill:hover,
  .bio-email-btn:hover,
  .bio-contact-submit:hover {
    transform: translateY(var(--bio-lift));
    box-shadow: var(--bio-lift-shadow-accent);
  }
}

/* Press. Hover is the only feedback most of these had, and touch never fires
   it — with -webkit-tap-highlight-color killed globally at the top of this
   file, tapping the controls this page exists for did nothing visible until
   the destination opened. Settling back to 0 reads as the button going down. */
.amazon-card:active,
.bio-tour-event--link:active,
.bio-video-card:active,
a.bio-course-card:active,
.bio-phone-cta:active,
.bio-contact-trigger:active,
.bio-share-cta:active,
a.bio-link-row:active,
.bio-music-block--dsp-list .bio-music-dsp-pill:active,
.bio-email-btn:active,
.bio-contact-submit:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Accent fills darken on press; neutral surfaces have no fill to darken. */
a.bio-link-row:active,
.bio-music-block--dsp-list .bio-music-dsp-pill:active,
.bio-email-btn:active,
.bio-contact-submit:active {
  filter: brightness(.94);
}

/* Keyboard focus. Until now exactly one element on the whole page had a focus
   ring (the DSP pill), so tabbing a bio was invisible. */
.bio-link-row:focus-visible,
.bio-link-dropdown-head:focus-visible,
.bio-music-dsp-pill:focus-visible,
.amazon-card:focus-visible,
.bio-tour-event--link:focus-visible,
.bio-video-card:focus-visible,
.bio-course-card:focus-visible,
.bio-image-link:focus-visible,
.bio-social:focus-visible,
.bio-phone-cta:focus-visible,
.bio-contact-trigger:focus-visible,
.bio-contact-submit:focus-visible,
.bio-share-cta:focus-visible,
.bio-email-btn:focus-visible,
.bio-join-cta:focus-visible {
  outline: var(--bio-focus-ring);
  outline-offset: 2px;
}

/* Music DSP icon chip (big/compact round chips) keeps a scale, not a lift —
   it is a round icon, and a 1px vertical nudge on a 40px circle reads as a
   rendering glitch rather than a press. */
.bio-music-dsp-pill {
  transition: transform .12s ease, box-shadow .14s ease, filter .14s ease;
}
@media (hover: hover) {
  .bio-music-block:not(.bio-music-block--dsp-list) .bio-music-dsp-pill:hover {
    transform: scale(1.08);
  }
}

/* Music card: NO whole-card hover — the card itself isn't clickable (the
   title, DSP pills and CTA inside are; they keep their own states). */

@media (prefers-reduced-motion: reduce) {
  .amazon-card,
  .bio-tour-event--link,
  .bio-video-card,
  a.bio-course-card,
  .bio-phone-cta,
  .bio-contact-trigger,
  .bio-share-cta,
  a.bio-link-row,
  .bio-music-dsp-pill,
  .bio-email-btn,
  .bio-contact-submit {
    transition: box-shadow .14s ease, border-color .14s ease;
  }
  @media (hover: hover) {
    .amazon-card:hover,
    .bio-tour-event--link:hover,
    .bio-video-card:hover,
    a.bio-course-card:hover,
    .bio-phone-cta:hover,
    .bio-contact-trigger:hover,
    .bio-share-cta:hover,
    a.bio-link-row:hover,
    .bio-music-dsp-pill:hover,
    .bio-email-btn:hover,
    .bio-contact-submit:hover,
    .amazon-card:active,
    .bio-tour-event--link:active,
    .bio-video-card:active,
    a.bio-course-card:active,
    .bio-phone-cta:active,
    .bio-contact-trigger:active,
    .bio-share-cta:active,
    a.bio-link-row:active,
    .bio-music-dsp-pill:active,
    .bio-email-btn:active,
    .bio-contact-submit:active {
      transform: none;
    }
  }
}

/* ---------- Tour dates block ---------- */
/* Frame-less wrapper like amazon/video/music: the tour EVENT rows are the
   cards. overflow:visible so the row hover glow isn't clipped at the wrapper
   edge (the clip rendered as a hard light line under the hovered row). */
.block.bio-tour-block { padding: 0; min-width: 0; background: transparent; border: none; box-shadow: none; overflow: visible; }
.bio-tour-title {
  font-size: calc(var(--bio-fs, 1) * 13px);
  font-weight: 600;
  color: var(--gray-700);
  padding: 4px 8px 8px;
}
.bio-tour-list { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bio-tour-event {
  position: relative;   /* anchors the corner badge */
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--bio-text, #1f2937) 12%, transparent);
  border-radius: var(--r-card, 14px);
  background: var(--bio-card, #fff);
  color: var(--bio-text, var(--gray-900));
  min-width: 0;
  min-height: var(--bio-row-min, 50px);
}
.bio-tour-main { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; text-decoration: none; color: inherit; }
.bio-tour-date { flex: 0 0 auto; width: 42px; text-align: center; line-height: 1.1; }
.bio-tour-day { display: block; font-size: calc(var(--bio-fs, 1) * 18px); font-weight: 700; color: var(--bio-text, var(--gray-900)); }
.bio-tour-month { display: block; font-size: calc(var(--bio-fs, 1) * 10px); font-weight: 600; color: var(--bio-text, var(--gray-500)); text-transform: uppercase; letter-spacing: .03em; }
.bio-tour-body { flex: 1 1 auto; min-width: 0; }
.bio-tour-venue { font-weight: 600; font-size: calc(var(--bio-fs, 1) * 14px); color: var(--bio-text, var(--gray-900)); }
/* Second line: [badge] [past] city · time. Pills never shrink; the text
   truncates. Keeps every card at exactly two lines. */
.bio-tour-city { font-size: calc(var(--bio-fs, 1) * 12px); color: var(--bio-text, var(--gray-600)); margin-top: 2px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.bio-tour-city-text { flex: 1 1 auto; min-width: 0; }
.bio-tour-badge,
.bio-tour-soldout,
.bio-tour-past {
  flex: 0 0 auto;
  font-size: calc(var(--bio-fs, 1) * 9px);
  line-height: 1.5;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}
/* Free-text status badge: a tag pinned to the card's top-LEFT corner, over
   the date column, like the Course badge. Left because the right edge already
   carries the ticket/map icons, and the tag is read before the venue name. The
   colour is per-event (--bio-tour-badge, set inline); the pill is a low-alpha
   tint of it so it reads on any theme. .bio-tour-soldout is the legacy class
   name, same look. */
.bio-tour-badge {
  position: absolute;
  top: 0;
  left: 12px;
  transform: translateY(-70%);   /* hangs off the card edge, above the day number */
  z-index: 2;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 999px;
  background: var(--bio-card, #fff);   /* under the tint: opaque over the card edge */
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bio-text, #1f2937) 12%, transparent);
}
.bio-tour-badge,
.bio-tour-soldout { background: #fee2e2; color: #b91c1c; }
@supports (background: color-mix(in srgb, red 14%, transparent)) {
  .bio-tour-badge {
    color: var(--bio-tour-badge, #b91c1c);
    /* Tint layered over the card colour so the pill stays opaque where it
       overlaps the card's top edge. */
    background: linear-gradient(color-mix(in srgb, var(--bio-tour-badge, #b91c1c) 14%, transparent), color-mix(in srgb, var(--bio-tour-badge, #b91c1c) 14%, transparent)) var(--bio-card, #fff);
  }
}
.bio-tour-past { background: var(--gray-100); color: var(--gray-500); }

/* Compact list layout — ONE panel card with flat, hairline-divided rows.
   The panel (not each row) carries the surface, so the block stays legible on a
   photo/gradient theme while the rows themselves stay dense. */
.bio-tour-block--layout-list .bio-tour-list,
.bio-tour-drop {
  gap: 0;
  border-radius: var(--r-card, 14px);
  overflow: hidden;
  background: var(--bio-card, #fff);
  border: 1px solid color-mix(in srgb, var(--bio-text, #1f2937) 12%, transparent);
}
.bio-tour-block--layout-list .bio-tour-event,
.bio-tour-drop .bio-tour-event {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--bio-text, #1f2937) 12%, transparent);
  background: transparent;
  box-shadow: none;
  padding: 9px 12px;
}
.bio-tour-block--layout-list .bio-tour-event:last-child,
.bio-tour-drop .bio-tour-event:last-child { border-bottom: 0; }
.bio-tour-block--layout-list .bio-tour-main,
.bio-tour-drop .bio-tour-main { gap: 10px; }
.bio-tour-block--layout-list .bio-tour-date,
.bio-tour-drop .bio-tour-date { width: 32px; }
.bio-tour-block--layout-list .bio-tour-day,
.bio-tour-drop .bio-tour-day { font-size: calc(var(--bio-fs, 1) * 15px); }
.bio-tour-block--layout-list .bio-tour-month,
.bio-tour-drop .bio-tour-month { font-size: calc(var(--bio-fs, 1) * 9px); }
.bio-tour-block--layout-list .bio-tour-venue,
.bio-tour-drop .bio-tour-venue { font-size: calc(var(--bio-fs, 1) * 13px); }
.bio-tour-block--layout-list .bio-tour-city,
.bio-tour-drop .bio-tour-city { font-size: calc(var(--bio-fs, 1) * 11px); }
/* Flat rows have no card edge to straddle: the tag sits inside the row. The
   list gap grows a little so a card's tag never touches the card above. */
/* Only a badged card needs room above it for the hanging tag; cards without
   one keep the normal gap. */
.bio-tour-block--layout-cards .bio-tour-list { gap: 10px; }
.bio-tour-block--layout-cards .bio-tour-event:has(> .bio-tour-badge) { margin-top: 6px; }
.bio-tour-block--layout-list .bio-tour-badge,
.bio-tour-drop .bio-tour-badge,
.phone-inner[data-theme-card="immersive"] .bio-tour-badge { top: 4px; left: 8px; transform: none; box-shadow: none; }
/* Immersive cards clip their overlays (overflow: hidden), so the tag sits
   inside the card there, on a light pill over the dark glass. */
.phone-inner[data-theme-card="immersive"] .bio-tour-badge { background: rgb(255 255 255 / .92); }
/* A long venue name must never push the ticket/map cluster off the card. */
.bio-tour-venue { overflow-wrap: anywhere; }
.bio-tour-city-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Dropdown layout — the whole block collapses to one summary bar. Native
   <details>/<summary>, so it works with no JS and inside a cached page. */
.bio-tour-drop { color: var(--bio-text, var(--gray-900)); }
.bio-tour-drophead {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px 11px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: calc(var(--bio-fs, 1) * 14px);
  -webkit-tap-highlight-color: transparent;
  /* The bar summarises the rows it hides, so it must not read lighter than
     them: same floor as an event row. */
  min-height: var(--bio-row-min, 50px);
  box-sizing: border-box;
}
.bio-tour-drophead::-webkit-details-marker { display: none; }
.bio-tour-drophead:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.bio-tour-drophead-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The count is a quiet chip, not a second sentence: it reads as metadata and
   stops the bar from looking like two competing labels. */
.bio-tour-dropcount {
  flex: 0 0 auto;
  font-weight: 600;
  font-size: calc(var(--bio-fs, 1) * 11px);
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 10%, transparent);
  opacity: .78;
}
/* CSS chevron in its own round chip: a bare 8px tick reads as a stray mark and
   gives the tap nothing to land on. No icon font (the Material subset is
   allow-listed and the public page must not depend on it). */
.bio-tour-chev {
  margin-left: auto;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 8%, transparent);
  position: relative;
  transition: transform .18s ease, background-color .18s ease;
}
.bio-tour-chev::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 1px;
  opacity: .75;
  transform: translate(-50%, -70%) rotate(45deg);
}
@media (hover: hover) {
  .bio-tour-drophead:hover .bio-tour-chev { background: color-mix(in srgb, currentColor 16%, transparent); }
}
.bio-tour-drop[open] .bio-tour-chev { transform: rotate(180deg); }
.bio-tour-drop .bio-tour-list { border-top: 1px solid color-mix(in srgb, var(--bio-text, #1f2937) 12%, transparent); gap: 0; }
/* A long tour is the reason this layout exists: 25 dates must not open into a
   page-length wall. Past ~5 rows the body scrolls inside the card. */
.bio-tour-drop[open] .bio-tour-list { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }

/* Cover image. Two readings, both fused to the block's own surface:
   thumb — rides inside the dropdown bar, costs no extra height;
   cover — a full-width banner above the rows, height on a slider. */
/* The artwork is INSET inside the card and rounded in its own right — the same
   treatment the Music card gives a cover. Edge-to-edge full bleed made the
   image read as a screenshot pasted into the block rather than as its art. */
.bio-tour-cover {
  line-height: 0;
  position: relative;
  overflow: hidden;
  padding: 12px;
  border-radius: var(--r-media, 12px);
}
.bio-tour-cover img {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  height: var(--bio-tour-cover-h, 180px);
  object-fit: cover;
  border-radius: var(--r-media, 12px);
  box-shadow: 0 12px 28px -10px rgb(0 0 0 / .45);
}
/* Fit / Blur: the padding box is the frame, so the blurred backdrop has to sit
   under the inset image, not under the whole padded box. */
.bio-tour-cover[data-fit] > img { object-fit: contain; }
.bio-tour-cover[data-fit] > .bio-fit-blur { inset: 12px; border-radius: var(--r-media, 12px); }
/* Dropdown with a cover: the WRAPPER is the card (poster on top, bar under it),
   because a closed <details> renders only its <summary> — a banner inside it
   would stay hidden until the block was opened. */
.bio-tour-dropwrap {
  border-radius: var(--r-card, 14px);
  overflow: hidden;
  background: var(--bio-card, #fff);
  border: 1px solid color-mix(in srgb, var(--bio-text, #1f2937) 12%, transparent);
  color: var(--bio-text, var(--gray-900));
}
.bio-tour-drop--incard { border: 0; border-radius: 0; background: none; }
.bio-tour-dropwrap .bio-tour-cover { padding-bottom: 0; }
.bio-tour-dropwrap .bio-tour-drophead { padding-top: 12px; }
/* Cards / compact list: the banner is its own surface above the rows. */
.bio-tour-block--layout-cards .bio-tour-cover,
.bio-tour-block--layout-list .bio-tour-cover {
  padding: 0;
  margin-bottom: 8px;
}
.bio-tour-block--layout-cards .bio-tour-cover[data-fit] > .bio-fit-blur,
.bio-tour-block--layout-list .bio-tour-cover[data-fit] > .bio-fit-blur { inset: 0; }
.bio-tour-dropthumb {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: color-mix(in srgb, currentColor 8%, transparent);
}
.bio-tour-dropthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* The thumb makes the bar a card-height row, so it needs the tighter padding
   the neighbouring link/course cards use. */
.bio-tour-drop .bio-tour-drophead:has(.bio-tour-dropthumb) { padding: 10px 12px; }

/* The card IS the ticket link. The <a> only wrapped the date + venue column, so
   the padding, the gap around the ticket glyph and (in the cards layout) the
   whole card edge were dead pixels — even though the entire card lifts on hover
   and presses on tap. A stretched pseudo element hands the anchor the card's
   full box without nesting anchors inside it; the map pin stays a separate tap
   target by sitting one layer above the stretch. Editor-only markup renders
   .bio-tour-main as a div, so the a. prefix keeps the canvas untouched. */
.bio-tour-event { position: relative; }
a.bio-tour-main::after { content: ""; position: absolute; inset: 0; }
.bio-tour-map { position: relative; z-index: 1; }

/* Ticket / map icons + interactive hover (card opens tickets, 📍 opens the map) */
.bio-tour-ico { font-size: 15px; line-height: 1; flex: 0 0 auto; transition: transform .12s ease; }
@media (hover: hover) {
  /* Icons react only to a DIRECT hover, not to hovering the row. */
  .bio-tour-ico:hover { transform: scale(1.18); }
}
/* The pin was a 23x27 hit box wedged against the ticket link. It gets the full
   tap floor; the row is already taller than 44px, so only the venue column
   gives up width (it ellipsises). */
.bio-tour-map {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--bio-tap-min, 44px);
  min-height: var(--bio-tap-min, 44px);
  text-decoration: none;
  padding: 4px;
  border-radius: 8px;
  transition: transform .12s ease;
}
@media (hover: hover) {
  a.bio-tour-map:hover { transform: scale(1.18); }
}
@media (hover: hover) {
  /* .bio-tour-event--link transition + hover lift: shared interaction block above */
  /* Immersive cards carry an accent glow at rest — hovering must deepen that
     glow, not swap it for a flat dark shadow (the glow visibly "popped off"). */
  .phone-inner[data-theme-card="immersive"] .bio-tour-event--link:hover,
  .phone-inner[data-theme-card="immersive"] .amazon-card:hover {
    box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--primary-color, #4c7cf5) 72%, transparent);
  }
}

/* ============================================================================
   PAGE CHROME — the "Join @alias on LinkTwin" pill, the Join/Share modals, and
   the Report·Privacy legal footer. (The Share BUTTON is now a deletable body
   block — see .bio-share-block / BioPageRenderer::share().)
   Rendered by BioPageRenderer::joinCta()/legalFooter()/chromeModals(); driven by
   the25-bio-chrome.js. The modals are neutral white cards (legible on any theme).
   ============================================================================ */

/* #populatedContent is the offset parent for absolutely-positioned children
   (ambient backdrop, cover bleed, QR badge). */
#populatedContent { position: relative; }

/* --- Modal shell (Join + Share share this)
   Scoped to [data-bio-modal] so this never collides with the bio EDITOR's
   own `.bio-modal` card class — the editor page loads this public stylesheet
   for its live preview, and an unscoped `.bio-modal` here leaked
   align-items/justify-content/position onto the editor's modal, breaking its
   docked-panel layout. Public modals always carry data-bio-modal. */
.bio-modal[data-bio-modal] {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.bio-modal[data-bio-modal].is-open { display: flex; }
.bio-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 16, .55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: bioFade .18s ease;
}
.bio-modal__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  color: #1f2430;
  border-radius: 22px;
  padding: 26px 22px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .4);
  font-size: 15px;
  line-height: 1.45;
  font-size-adjust: none;
  animation: bioPop .2s cubic-bezier(.2, .8, .25, 1);
}
.bio-modal__close {
  position: absolute;
  /* The sheet's content is a widget block, and .block is position:relative with
     an auto z-index — so with both elements unlayered the one later in the DOM
     (the block) paints over this button and swallows the clicks in the corner
     it overlaps. Padding the heading clear of the button was never enough: the
     block's BOX still spans the full width underneath it. */
  z-index: 2;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6b7280;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
@media (hover: hover) {
  .bio-modal__close:hover { background: #f3f4f6; color: #111; }
}
@keyframes bioFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bioPop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes bioSheet { from { transform: translateY(100%); } to { transform: none; } }

/* --- Join (acquisition) modal */
.bio-modal__card--join { text-align: left; }
.bio-modal__logo { height: 28px; width: auto; max-width: 160px; display: block; margin-bottom: 16px; }
.bio-modal__logo-text { font-size: 20px; font-weight: 800; margin-bottom: 16px; color: #0d1b2e; }
/* Brand ink and blue (the Site 6 --s6-ink / --s6-blue), not a generic black. */
.bio-modal__title { font-size: 24px; line-height: 1.18; font-weight: 800; letter-spacing: -.01em; margin: 0 0 8px; color: #0d1b2e; text-wrap: balance; }
/* The highlighted half of the headline: its own line, brand blue. */
.bio-modal__title em { display: block; font-style: normal; color: #0967f2; }
.bio-modal__sub { margin: 0 0 16px; color: #4b5563; font-size: 14.5px; }
/* App logos — the destinations LinkTwin opens straight inside the native app. */
.bio-modal__apps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}
.bio-modal__app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #f3f4f6;
  color: #11141b;
  font-size: 19px;
}
/* Click-limit interstitial: the app icons themselves, full-bleed tiles like a
   home screen, then a "100+" tile. One row at every width: the tiles shrink to fit. */
.bio-modal__apps--tiles { flex-wrap: nowrap; gap: 8px; }
.bio-modal__app--tile,
.bio-modal__app--more {
  flex: 0 1 40px;
  min-width: 0;
  width: auto;
  height: auto;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
}
.bio-modal__app--tile { background: none; box-shadow: 0 1px 3px rgb(13 27 46 / .16); }
.bio-modal__app--tile img { width: 100%; height: 100%; display: block; }
.bio-modal__app--more {
  background: #e6f0ff;
  color: #0648b5;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -.02em;
}

/* Bio variant's picture: the tilted wall of template pages from the /home-bio
   hero (.b6-wall in the25-site6-bio.css), small, in a rounded window. The grid
   is wider and taller than the window and turned, so the columns run off every
   edge; each track holds its cards twice and drifts by half its height, so the
   loop has no seam. Columns 2 and 4 drift down, 1 and 3 up. */
.bio-join-wall {
  --bjw-gap: 8px;
  position: relative;
  height: 196px;
  margin: 0 0 18px;
  overflow: hidden;
  border-radius: 16px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgb(9 103 242 / .16), transparent 60%),
    linear-gradient(160deg, #e6f0ff, #f4f7fb 75%);
  /* Safari: keep the turned, animated grid inside the rounded corners */
  isolation: isolate;
}
.bio-join-wall__grid {
  position: absolute;
  top: -64px;
  bottom: -64px;
  left: 50%;
  width: max(408px, calc(100% + 52px));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--bjw-gap);
  transform: translateX(-50%) rotate(-7deg);
}
.bio-join-wall__col { min-width: 0; }
.bio-join-wall__track {
  display: grid;
  gap: var(--bjw-gap);
  animation: bioJoinWallUp var(--bjw-t, 44s) linear infinite;
  will-change: transform;
}
.bio-join-wall__col:nth-child(2) .bio-join-wall__track { --bjw-t: 56s; animation-name: bioJoinWallDown; }
.bio-join-wall__col:nth-child(3) .bio-join-wall__track { --bjw-t: 40s; animation-delay: -14s; }
.bio-join-wall__col:nth-child(4) .bio-join-wall__track { --bjw-t: 50s; animation-name: bioJoinWallDown; animation-delay: -22s; }
.bio-join-wall__track img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 844;
  border-radius: 10px;
  background: #dfe6f0;
  object-fit: cover;
  object-position: top center;
  box-shadow: 0 0 0 1px rgb(13 27 46 / .08), 0 12px 24px -14px rgb(13 27 46 / .5);
}
@keyframes bioJoinWallUp {
  from { transform: translateY(0); }
  to   { transform: translateY(calc(-50% - var(--bjw-gap) / 2)); }
}
@keyframes bioJoinWallDown {
  from { transform: translateY(calc(-50% - var(--bjw-gap) / 2)); }
  to   { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .bio-join-wall__track { animation: none; }
}

/* Bio variant's three reasons, one short line each, with the site's own icons
   (Helpers\Site6Icons). The bio page does not load the25-site6.css, so the
   icon size and the bolt-yellow accent shape are set here. */
.bio-join-points { list-style: none; margin: 14px 0 20px; padding: 0; display: grid; gap: 10px; }
.bio-join-points li { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 1.3; font-weight: 600; color: #1f2430; }
.bio-join-points .s6-ico { flex: 0 0 22px; width: 22px; height: 22px; color: #0d1b2e; }
.bio-join-points .s6-ico-a { fill: #ffd60a; }
/* A short phone (an SE, or a browser with its toolbars showing): a lower wall
   and a smaller headline, so the sheet fits without scrolling. */
@media (max-height: 700px) {
  .bio-join-wall { height: 150px; }
  .bio-modal__card--join .bio-modal__title { font-size: 22px; }
}
/* Music/Podcast gate variants: platform logos on white chips, and more of them
   (up to ten podcast apps), so the tiles are smaller and wrap to a second row
   inside the same modal width. */
.bio-modal__apps--logos { gap: 8px; }
.bio-modal__app--logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  padding: 5px;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
  overflow: hidden;
}
.bio-modal__app--logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* Same per-brand weight nudges the public DSP chips carry — these SVGs' own
   padding differs enough that untouched they read as different sizes. */
.bio-modal__app--logo[data-dsp="youtube"]    img { transform: scale(0.72); }
.bio-modal__app--logo[data-dsp="tidal"]      img { transform: scale(0.82); }
.bio-modal__app--logo[data-dsp="deezer"]     img { transform: scale(0.88); }
.bio-modal__app--logo[data-dsp="soundcloud"] img { transform: scale(0.88); }
.bio-modal__app--logo[data-dsp="spotify"]    img { transform: scale(1.06); }
.bio-modal__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 18px;
  border-radius: 999px;
  background: #0967f2;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 18px -8px rgb(9 103 242 / .7);
  transition: transform .12s ease, background .12s ease;
}
@media (hover: hover) {
  .bio-modal__cta:hover { transform: translateY(-1px); background: #0648b5; color: #fff; }
}
.bio-modal__note { margin: 9px 0 0; text-align: center; font-size: 12.5px; color: #6b7280; }
/* Under the centred note, Learn more centres too. */
.bio-modal__note + .bio-modal__link { display: block; width: fit-content; margin: 8px auto 0; }
.bio-modal__link {
  display: inline-block;
  margin-top: 14px;
  color: #11141b;
  font-weight: 600;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Over-click-limit interstitial (BioPageRenderer::clickLimitModal).
   LinkTwin's advertisement space, built like a pre-roll: the card IS the Join
   modal's pitch (same classes, so it inherits that look), and the only thing
   added is the secondary Continue control under the sign-up button. While the
   countdown runs it is quiet grey text; once ready it becomes an outlined
   button, so the sign-up button stays the one filled action throughout. */
/* The landing page's two-line slogan: second line on its own row, brand blue
   (the25-home5.css --h4-blue). */
/* A CENTRED card at every width, like the Subscribe modal — not a bottom sheet
   on phones. The base shell's ≤560px rule docks every [data-bio-modal] to the
   bottom edge, so the geometry is restated here at higher specificity. */
.bio-modal.bio-limit[data-bio-modal] { align-items: center; padding: 16px; }
.bio-modal[data-bio-modal] .bio-limit-card {
  max-width: 400px;
  max-height: calc(100vh - 32px);
  border-radius: 22px;
  padding-bottom: 26px;
  animation: bioPop .2s cubic-bezier(.2, .8, .25, 1);
}
@media (prefers-reduced-motion: reduce) {
  .bio-modal[data-bio-modal] .bio-limit-card { animation: none; }
}
/* The centred card is 32px narrower than the sheet, which dropped the sixth app
   tile alone onto a second row. One row always: the tiles shrink to fit. */
.bio-limit-card .bio-modal__apps { flex-wrap: nowrap; gap: 8px; }
.bio-limit-card .bio-modal__app { flex: 0 1 40px; min-width: 0; height: auto; aspect-ratio: 1; }
/* 21px, not the modal's 24: the second line has to hold one row on a 360px
   phone, or "app." drops alone onto a third. balance covers narrower screens. */
.bio-limit-title { font-size: 21px; text-wrap: balance; }
.bio-limit-title span { display: block; color: #0967f2; }
.bio-limit-continue {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 10px;
  padding: 11px 18px;
  border: 1.5px solid #11141b;
  border-radius: 999px;
  background: transparent;
  color: #11141b;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.bio-limit-continue:disabled {
  border-color: transparent;
  color: #8a919e;
  font-weight: 600;
  cursor: default;
}
.bio-limit-continue:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}
.bio-limit-card:focus { outline: none; }
.bio-limit-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .bio-limit-overlay,
  .bio-limit-card { animation: none; }
  .bio-limit-continue { transition: none; transform: none; }
}

/* --- Share modal */
.bio-modal__card--share { text-align: center; }
.bio-share__head { font-size: 17px; font-weight: 800; color: #11141b; margin-bottom: 16px; }
/*
   The sheet is rendered outside .phone-inner so its fixed overlay is never
   clipped by the desktop phone card. Recreate just the profile typography on
   the preview itself: controls stay a stable system UI, while the identity
   card still feels like the shared page.
*/
.bio-share-theme[data-theme-font="sans"] .bio-share__preview {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.bio-share-theme[data-theme-font="serif"] .bio-share__preview {
  font-family: Georgia, "Times New Roman", serif;
}
.bio-share-theme[data-theme-font="display"] .bio-share__preview {
  font-family: Poppins, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.bio-share-theme[data-theme-font="mono"] .bio-share__preview {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
.bio-share-theme[data-theme-font="handwritten"] .bio-share__preview {
  font-family: Caveat, "Comic Sans MS", cursive;
  font-size-adjust: .62;
}
.bio-share-theme[data-theme-font="custom"] .bio-share__preview {
  font-family: var(--bio-font-family, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}
.bio-share__preview {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: #0f1320;
  background-position: center;
  background-size: cover;
  color: #fff;
  border-radius: 16px;
  padding: 20px 16px;
  margin-bottom: 18px;
}
/* Image/video headers always receive this strong scrim. The name sits near the
   darker end of the gradient, so white text remains legible even on an all-white
   photo; the image still reads as a recognisable profile cue. */
.bio-share__preview--header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgb(6 10 20 / .72) 0%, rgb(6 10 20 / .86) 100%);
}
.bio-share__preview-blur {
  position: absolute;
  z-index: 0;
  inset: -10%;
  background-position: center;
  background-size: cover;
  filter: blur(18px) saturate(1.08);
  transform: scale(1.06);
}
.bio-share__avatar,
.bio-share__name,
.bio-share__handle,
.bio-share__video-mark {
  position: relative;
  z-index: 2;
}
.bio-share__avatar {
  width: var(--bio-share-avatar-size, 54px);
  height: var(--bio-share-avatar-size, 54px);
  flex: 0 0 auto;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  background-size: cover;
  background-position: center;
  box-shadow: 0 3px 12px rgb(0 0 0 / .28);
  margin-bottom: 8px;
}
.bio-share__avatar--initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: calc(var(--bio-share-avatar-size, 54px) * .42);
  font-weight: 700;
}
.bio-share__name {
  font-family: var(--bio-heading-font-family, inherit);
  font-weight: 800;
  font-size: 16px;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgb(0 0 0 / .45);
}
.bio-share__handle { font-size: 13px; opacity: .8; text-shadow: 0 1px 2px rgb(0 0 0 / .45); }
.bio-share__video-mark {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  border: 1px solid rgb(255 255 255 / .8);
  border-radius: 50%;
  background: rgb(0 0 0 / .28);
  color: #fff;
  font-size: 9px;
}
.bio-share__video-mark i { margin-left: 1px; }
.bio-share__copy {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid #e3e6ec;
  border-radius: 12px;
  background: #f7f8fa;
  padding: 10px 12px;
  margin-bottom: 16px;
  cursor: pointer;
  text-align: left;
}
.bio-share__copy-url { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: #5b6472; }
.bio-share__copy-btn { flex: 0 0 auto; font-weight: 700; font-size: 13px; color: #11141b; white-space: nowrap; }
.bio-share__copy.is-copied { border-color: #16a34a; }
.bio-share__copy.is-copied .bio-share__copy-btn { color: #16a34a; }

.bio-share__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 8px; }
.bio-share__item { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: #3a4150; }
.bio-share__icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1320;
  color: #fff;
  font-size: 20px;
  transition: transform .12s ease;
}
@media (hover: hover) {
  .bio-share__item:hover .bio-share__icon { transform: translateY(-2px); }
}
.bio-share__label { font-size: 11px; font-weight: 600; }
.bio-share__item--x .bio-share__icon { background: #000; }
.bio-share__item--facebook .bio-share__icon { background: #1877f2; }
.bio-share__item--whatsapp .bio-share__icon { background: #25d366; }
.bio-share__item--linkedin .bio-share__icon { background: #0a66c2; }
.bio-share__item--telegram .bio-share__icon { background: #26a5e4; }
.bio-share__item--reddit .bio-share__icon { background: #ff4500; }
.bio-share__item--messenger .bio-share__icon { background: #0084ff; }
.bio-share__item--email .bio-share__icon { background: #6b7280; }
.bio-share__native {
  margin-top: 18px;
  width: 100%;
  padding: 12px;
  border: 1px solid #e3e6ec;
  border-radius: 12px;
  background: #fff;
  color: #11141b;
  font-weight: 700;
  cursor: pointer;
}
@media (hover: hover) {
  .bio-share__native:hover { background: #f7f8fa; }
}

/* --- Bottom Share button (sits just above the marketing Join pill). A ghost
   pill that inherits the theme text colour so it reads on any background. */
/* Share BLOCK — a deletable body block (BioPageRenderer::share). The wrapper
   centers the pill button within the full-width block; inter-block spacing comes
   from the canvas/page --bio-gap, so the button itself carries no margin. */
.bio-share-block { display: flex; justify-content: var(--bl-flex, center); }
.bio-share-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  min-height: var(--bio-tap-min, 44px);
  border-radius: 999px;
  /* --bl-* = the shared colour toolbar (emitted on the block wrapper). */
  background: var(--bl-bg, transparent);
  /* Theme text, not a fixed dark grey. The named dark presets get an override
     further down, but a CUSTOM dark background got none — the button kept dark
     grey text on a dark bg and effectively disappeared. --bio-text is the
     per-theme primary text colour every other block already reads, and since the
     border derives from currentColor it starts tracking the theme too. */
  color: var(--bl-text, var(--bio-text, #1f2937));
  border: var(--bl-bw, 1.5px) solid var(--bl-border, color-mix(in srgb, currentColor 26%, transparent));
  font-family: inherit;
  font-weight: 700;
  font-size: calc(var(--bio-fs, 1) * 13px);
  cursor: pointer;
  transition: background .12s ease;
}
/* Lift + shadow come from the shared interaction block; this adds the tint —
   only over the default transparent fill: a background picked in the colour
   toolbar (--bl-bg) stays put on hover. */
@media (hover: hover) {
  .bio-share-cta:hover {
    border-color: var(--bl-border, color-mix(in srgb, currentColor 44%, transparent));
    background: var(--bl-bg, color-mix(in srgb, currentColor 7%, transparent));
  }
}
.bio-share-cta svg { flex: 0 0 auto; }

/* --- Bottom "Join @alias on LinkTwin" pill */
.bio-join-cta {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 34px auto 0;
  /* Left padding trimmed so the logo tile sits evenly in the round end. */
  padding: 5px 16px 5px 6px;
  min-height: var(--bio-tap-min, 44px);
  border-radius: 999px;
  /* Deliberately QUIET chrome. The pill used to be a solid near-black chip with a
     drop shadow, which made LinkTwin's own branding the highest-contrast element
     on the page — it out-shouted the owner's content, especially on a saturated
     background. It now wears the same outlined, currentColor-derived language as
     .bio-share-cta and .bio-legal: present and legible, never the visual anchor.
     Deriving from currentColor also means it reads correctly on light AND dark
     themes without a per-theme override. */
  background: transparent;
  /* Derived from --bio-footer-color, the SAME luminance-derived token the legal
     links use — not currentColor. currentColor here inherits a fixed gray-900
     from the page root, which does not track the theme at all, so on a custom
     dark background the pill rendered near-black on near-black. --bio-footer-color
     is computed per background (light text on dark, dark text on light) and this
     pill is footer chrome sitting in the same zone as those links, so it should
     answer to the same token. */
  border: 1px solid color-mix(in srgb, var(--bio-footer-color, var(--gray-500)) 34%, transparent);
  color: var(--bio-footer-color, var(--gray-500));
  /* Pinned to a fixed system font + size: the "Join @alias on LinkTwin" pill is
     LinkTwin chrome, so a theme's custom font / font-scale must not restyle it. */
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
/* The branded part: the LinkTwin mark on a small white tile, so its navy
   outline and yellow bolt read on any page background. */
.bio-join-cta__mark {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(13 27 46 / .1), 0 1px 2px rgb(13 27 46 / .12);
}
.bio-join-cta__mark img { display: block; width: 19px; height: 19px; transition: transform .2s cubic-bezier(.2, .8, .25, 1.4); }
@media (hover: hover) {
  .bio-join-cta:hover {
    border-color: color-mix(in srgb, var(--bio-footer-color, var(--gray-500)) 60%, transparent);
    background: color-mix(in srgb, var(--bio-footer-color, var(--gray-500)) 9%, transparent);
  }
  .bio-join-cta:hover .bio-join-cta__mark img { transform: rotate(-10deg) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .bio-join-cta__mark img { transition: none; }
}

/* --- Editor-only: trash/restore control wrapping the branding pill ----------
   ONLY rendered in the bio EDITOR (BioPageRenderer::brandingEditorWrap) — the
   public page emits the bare .bio-join-cta. Lets a paid owner hide the pill
   from their live page (cfg.hideBranding); free owners get an upgrade modal.

   The pill is effectively an undeletable-without-a-plan BLOCK, so it wears the
   same chrome as one: the pill stays centred in the row and the trash floats
   at the row's right edge, vertically centred, matching .block-toolbar on a
   .bio-flat-block (the Share button right above it). Inline-flexing the button
   next to the pill pushed the pill off-centre and read as a second button. */
.bio-branding-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}
.bio-branding-wrap .bio-join-cta { margin: 0; }
.bio-branding-wrap.is-branding-hidden .bio-join-cta { opacity: .4; }
.bio-branding-remove {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  /* Mirrors .block-tool: solid-ish white, no backdrop-filter (see the note
     there — blurred layers per block wreck integrated-GPU frame times). */
  background: rgba(255, 255, 255, .96);
  color: var(--gray-600, #4b5563);
  cursor: pointer;
  line-height: 0;
  opacity: .4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  transition: background .1s ease, color .1s ease, opacity .15s ease;
}
@media (hover: hover) {
  .bio-branding-wrap:hover .bio-branding-remove { opacity: 1; }
}
@media (hover: hover) {
  .bio-branding-remove:hover { background: #fff; color: var(--danger-color, #dc2626); }
}
@media (hover: hover) {
  .bio-branding-wrap.is-branding-hidden .bio-branding-remove:hover { color: var(--gray-700, #374151); }
}
.bio-branding-remove .material-symbols-outlined { font-size: 15px; }
.bio-branding-hidden-note {
  flex-basis: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400, #9ca3af);
}

/* --- Report · Privacy legal footer (always shown) */
.bio-legal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px auto 4px;
  /* Pinned to a fixed system font + size — Report · Privacy are platform links,
     not user content, so the theme's font / font-scale must not affect them. */
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 11px;
  color: var(--bio-footer-color, var(--gray-500));
}
.bio-legal a { color: inherit; text-decoration: none; }
@media (hover: hover) {
  .bio-legal a:hover { text-decoration: underline; }
}

/* Dark / LinkTwin themes: the pill needs no override any more — it derives from
   currentColor, so it inverts with the text colour on its own. Only the legal
   text still needs lightening. */
.phone-inner[data-theme-bg="dark"] .bio-legal,
.phone-inner[data-theme-bg="linktwin"] .bio-legal { color: #9ca3af; }
/* Dark presets don't set --bio-text, so they still need their own light value —
   but an owner-chosen --bio-text must win over the preset default, hence the var
   rather than a bare colour (this rule outranks the base one on specificity). */
.phone-inner[data-theme-bg="dark"] .bio-share-cta,
.phone-inner[data-theme-bg="linktwin"] .bio-share-cta { color: var(--bl-text, var(--bio-text, #e5e7eb)); }

body.bio-modal-open { overflow: hidden; }

/* Mobile: modals slide up as bottom sheets */
@media (max-width: 560px) {
  .bio-modal[data-bio-modal] { align-items: flex-end; padding: 0; }
  .bio-modal__card {
    max-width: none;
    max-height: 90vh;
    border-radius: 22px 22px 0 0;
    padding-bottom: max(26px, env(safe-area-inset-bottom));
    animation: bioSheet .22s cubic-bezier(.2, .8, .25, 1);
  }
}

/* ============================================================
   Phone, Google Maps & Contact form blocks
   ============================================================ */

/* ---------- Phone number block ---------- */
.bio-phone-block { width: 100%; }
.bio-phone-cta {
  display: flex;
  align-items: center;
  justify-content: var(--bl-flex, center);
  gap: 9px;
  width: 100%;
  padding: 13px 18px;
  min-height: var(--bio-row-min, 50px);
  border-radius: var(--r-row, 8px);
  /* --bl-* = the shared colour toolbar (emitted on the block wrapper). */
  background: var(--bl-bg, var(--bio-card, #fff));
  color: var(--bl-text, var(--bio-text, #1f2937));
  border: var(--bl-bw, 1.5px) solid var(--bl-border, color-mix(in srgb, currentColor 22%, transparent));
  font-family: inherit;
  font-weight: 600;
  font-size: calc(var(--bio-fs, 1) * 14px);
  text-decoration: none;
  cursor: pointer;
  /* transform / box-shadow / border-color: shared interaction block above. */
  transition: background .12s ease;
}
@media (hover: hover) {
  .bio-phone-cta:hover { border-color: var(--bl-border, color-mix(in srgb, currentColor 40%, transparent)); }
}
.bio-phone-cta svg { flex: 0 0 auto; }
.bio-phone-cta__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Google Maps block ---------- */
.bio-map-block { width: 100%; }
.bio-map-frame-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--r-media, 12px);
  overflow: hidden;
  background: var(--gray-100, #f3f4f6);
}
.bio-map-frame {
  display: block;
  width: 100%;
  border-radius: var(--r-media, 12px);
  overflow: hidden;
  background: var(--gray-100, #f3f4f6);
}
.bio-map-frame-wrap .bio-map-frame { border-radius: 0; }
.bio-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--gray-600, #4b5563);
  background: color-mix(in srgb, var(--gray-100, #f3f4f6) 88%, transparent);
  font-size: calc(var(--bio-fs, 1) * 12px);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}
.bio-map-frame-wrap.is-loading .bio-map-loading { opacity: 1; }
.bio-map-loading-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid color-mix(in srgb, currentColor 24%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: bio-map-spin .8s linear infinite;
}
@keyframes bio-map-spin { to { transform: rotate(360deg); } }
.bio-map-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 180px;
  border-radius: var(--r-media, 12px);
  background: var(--gray-100, #f3f4f6);
  border: 1px dashed var(--gray-300, #d1d5db);
  color: var(--gray-500, #6b7280);
}
.bio-map-demo-pin { font-size: 34px; color: var(--bio-accent, #ef4444); }
.bio-map-demo-hint { font-size: calc(var(--bio-fs, 1) * 12px); }
/* Shown only when the public script decides Google is unreachable and drops the
   frame (filtered DNS, blocked network, offline) — see probeMapEmbeds(). */
.bio-map-offline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  text-align: center;
  background: var(--gray-100, #f3f4f6);
  color: var(--gray-600, #4b5563);
}
.bio-map-offline[hidden] { display: none; }
.bio-map-offline-pin { display: flex; color: var(--bio-accent, #ef4444); }
.bio-map-offline-pin svg { width: 26px; height: 26px; }
.bio-map-offline-text {
  font-size: calc(var(--bio-fs, 1) * 13px);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.bio-map-offline-cta {
  font-size: calc(var(--bio-fs, 1) * 12px);
  font-weight: 600;
  color: var(--bio-accent, #ef4444);
  text-decoration: underline;
}
/* Address caption under the frame: always rendered, so the written location and
   the Maps-app hand-off survive whatever the embed does. */
.bio-map-cta {
  display: flex;
  align-items: center;
  justify-content: var(--bl-flex, center);
  gap: 7px;
  margin-top: 8px;
  color: var(--bl-text, inherit);
  font-size: calc(var(--bio-fs, 1) * 13px);
  font-weight: 600;
  text-decoration: none;
  opacity: .85;
}
@media (hover: hover) {
  .bio-map-cta:hover { opacity: 1; text-decoration: underline; }
}
.bio-map-cta svg { flex: 0 0 auto; color: var(--bio-accent, #ef4444); }
.bio-map-cta__label { overflow-wrap: anywhere; }
/* The "Button and address" toolbar styles the caption too: a fill or a stroke
   turns it into a chip (padded so the colour reads as a surface, at full
   strength), and a width on its own draws the stroke in the caption's colour.
   With none of them set it stays the plain text line above. */
.bio-map-cta {
  background: var(--bl-bg, transparent);
  border: var(--bl-bw, 0px) solid var(--bl-border, currentColor);
  border-radius: var(--r-row, 8px);
}
.bio-map-cta[style*="--bl-bg"],
.bio-map-cta[style*="--bl-border"],
.bio-map-cta[style*="--bl-bw"]:not([style*="bw:0px"]):not([style*="bw: 0px"]) {
  padding: 9px 14px;
  opacity: 1;
}
.bio-map-cta[style*="--bl-border"] { border-width: var(--bl-bw, 2px); }

/* Two style hosts from the shared colour toolbar, both as --bl-* on the element
   itself: config.style on the frame (border only), config.ctaStyle on the
   Directions button + caption (fill, text, border, alignment). */
.bio-map-frame-wrap { border: var(--bl-bw, 0px) solid var(--bl-border, transparent); }
.bio-map-directions {
  display: flex;
  align-items: center;
  justify-content: var(--bl-flex, center);
  gap: 8px;
  margin-top: 10px;
  padding: 12px 18px;
  border-radius: var(--r-row, 8px);
  background: var(--bl-bg, var(--bio-accent, #ef4444));
  color: var(--bl-text, var(--bio-accent-fg, #fff));
  border: var(--bl-bw, 0px) solid var(--bl-border, transparent);
  font-family: inherit;
  font-weight: 600;
  font-size: calc(var(--bio-fs, 1) * 14px);
  text-decoration: none;
  cursor: pointer;
  transition: opacity .12s ease;
}
@media (hover: hover) {
  .bio-map-directions:hover { opacity: .9; }
}
.bio-map-directions svg { flex: 0 0 auto; }
.bio-map-directions__label { overflow-wrap: anywhere; }
/* A colour with no explicit width still needs a visible stroke. */
.bio-map-frame-wrap[style*="--bl-border"],
.bio-map-directions[style*="--bl-border"] { border-width: var(--bl-bw, 2px); }


/* ---------- Contact form block ---------- */
.bio-contact-block { width: 100%; }
.bio-contact-card {
  background: var(--bio-card, #fff);
  border: 1px solid color-mix(in srgb, var(--bio-text, #1f2937) 12%, transparent);
  border-radius: var(--r-card, 14px);
  padding: 16px;
}
.bio-contact-title {
  font-weight: 700;
  font-size: calc(var(--bio-fs, 1) * 15px);
  color: var(--bio-text, #1f2937);
  margin-bottom: 12px;
}
.bio-contact-field { margin-bottom: 10px; }
.bio-contact-label {
  display: block;
  font-size: calc(var(--bio-fs, 1) * 12px);
  font-weight: 600;
  color: color-mix(in srgb, var(--bio-text, #1f2937) 75%, transparent);
  margin-bottom: 4px;
}
.bio-contact-req { color: var(--bio-accent, #ef4444); }
.bio-contact-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: var(--r-row, 8px);
  border: 1px solid color-mix(in srgb, var(--bio-text, #1f2937) 18%, transparent);
  background: color-mix(in srgb, var(--bio-card, #fff) 92%, #fff);
  color: var(--bio-text, #1f2937);
  font-family: inherit;
  font-size: calc(var(--bio-fs, 1) * 13px);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
/* Border plus a soft ring in the page's accent: the border change alone was a
   1px cue, easy to miss on a phone in daylight. */
.bio-contact-input:focus {
  border-color: var(--bio-accent, #6366f1);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bio-accent, #6366f1) 22%, transparent);
}
textarea.bio-contact-input {
  resize: vertical;
  min-height: 84px;
  border-radius: var(--r-media, 12px);
}
.bio-contact-submit {
  width: 100%;
  margin-top: 6px;
  padding: 11px 18px;
  min-height: var(--bio-tap-min, 44px);
  border: none;
  border-radius: var(--r-row, 8px);
  background: var(--bio-accent, #6366f1);
  color: var(--bio-accent-fg, #fff);
  font-family: inherit;
  font-weight: 700;
  font-size: calc(var(--bio-fs, 1) * 14px);
  cursor: pointer;
  /* transform / box-shadow / filter: shared interaction block above. */
}
@media (hover: hover) {
  .bio-contact-submit:hover { filter: brightness(1.05); }
}
/* Sending: cover the form with an opaque card-coloured veil carrying the
   editor's 44px .spinner-ring (gray track, accent head). Opaque rather than a
   blur — the fields underneath keep their layout, so the form doesn't resize
   and the veil reads the same on every theme. */
.bio-contact-form { position: relative; }
.bio-contact-form.is-sending > *:not(.bio-contact-busy) { pointer-events: none; }
.bio-contact-busy {
  position: absolute;
  inset: -4px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-card, 14px);
  background: var(--bio-card, #fff);
  animation: bio-form-reveal .16s ease both;
}
.bio-contact-busy-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid color-mix(in srgb, var(--bio-text, #1f2937) 14%, transparent);
  border-top-color: var(--bio-accent, #5b6cff);
  border-radius: 50%;
  animation: bio-contact-spin .9s linear infinite;
}
@keyframes bio-contact-spin { to { transform: rotate(360deg); } }
.bio-contact-status {
  margin-top: 8px;
  font-size: calc(var(--bio-fs, 1) * 12px);
  color: var(--bio-accent, #ef4444);
  text-align: center;
}
/* Kept in step with .bio-email-success — the two blocks show the same
   confirmation (same reveal animation via the shared bio-form-* keyframes), so
   a theme change has to land on both at once. The check disc takes the theme
   accent rather than a hardcoded green. */
.bio-contact-success {
  text-align: center;
  padding: 12px 0;
  font-weight: 600;
  font-size: calc(var(--bio-fs, 1) * 14px);
  animation: bio-form-reveal .28s cubic-bezier(.2,.8,.25,1) both;
}

.bio-contact-success-check {
  width: 36px;
  height: 36px;
  line-height: 36px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--bio-accent, #5b6cff);
  color: var(--bio-accent-fg, #fff);
  font-size: 18px;
  animation: bio-form-check .34s cubic-bezier(.2,1.5,.35,1) .06s both;
}
@keyframes bio-form-reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bio-form-check  { from { opacity: 0; transform: scale(.5); }     to { opacity: 1; transform: none; } }

/* Motion is decoration here: the spinner keeps a static ring, the confirmation
   just appears. */
@media (prefers-reduced-motion: reduce) {
  .bio-contact-busy { animation: none; }
  .bio-contact-busy-spinner { animation: none; }
  .bio-contact-success,
  .bio-contact-success-check,
  .bio-email-success,
  .bio-email-success-check { animation: none; }
  .bio-contact-overlay__panel { animation: none; }
}

/* Contact: button + modal layout */
.bio-contact-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 13px 18px;
  min-height: var(--bio-row-min, 50px);
  border-radius: var(--r-row, 8px);
  background: var(--bio-card, #fff);
  color: var(--bio-text, #1f2937);
  border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent);
  font-family: inherit;
  font-weight: 600;
  font-size: calc(var(--bio-fs, 1) * 14px);
  cursor: pointer;
  /* transform / box-shadow / border-color: shared interaction block above. */
}
@media (hover: hover) {
  .bio-contact-trigger:hover { border-color: color-mix(in srgb, currentColor 40%, transparent); }
}
.bio-contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.bio-contact-overlay[hidden] { display: none; }
.bio-contact-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(2px);
}
.bio-contact-overlay__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bio-card, #fff);
  border-radius: 16px;
  padding: 22px 20px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  animation: bioContactPop .2s cubic-bezier(.2,.8,.25,1);
}
@keyframes bioContactPop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.bio-contact-overlay__close {
  position: absolute;
  z-index: 2;
  top: 10px; right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: var(--gray-400, #9ca3af);
  cursor: pointer;
}
@media (hover: hover) {
  .bio-contact-overlay__close:hover { background: color-mix(in srgb, var(--bio-text, #1f2937) 8%, transparent); color: var(--bio-text, #1f2937); }
}
/* Keep the heading clear of the close button. */
.bio-contact-overlay__panel .bio-contact-title { padding-right: 34px; }
.bio-contact-overlay__panel .bio-contact-card { border: none; padding: 0; background: transparent; }
/* Calendly modal (socials-row icon): the embed runs edge to edge under a title
   row that also holds the close button. Calendly needs every pixel of width on
   a phone, so the panel drops its side padding. */
.bio-calendly-overlay .bio-contact-overlay__panel { max-width: 460px; padding: 0; overflow-x: hidden; }
.bio-contact-overlay__title {
  padding: 16px 52px 12px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--bio-text, #1f2937);
}
.bio-calendly-overlay .bio-calendly-frame-wrap { border-radius: 0; }

/* Editor preview: keep the inline contact card inert (clicks open the modal) */

/* Honeypot: hidden from humans (and assistive tech) but present for bots.
   Off-screen rather than display:none so naive bots still "see" + fill it. */
.bio-hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
/* Turnstile interaction-only widget: no footprint until a challenge appears. */
.bio-contact-captcha:empty { display: none; }
.bio-contact-captcha { margin-top: 6px; }

/* ---------------------------------------------------------------------------
   iOS focus-zoom guard — keep last in this file.

   Safari on iOS zooms the whole page in whenever the user taps a field that
   renders below 16px, and it does not zoom back out. The viewport directives
   that look like they prevent this (maximum-scale=1, user-scalable=no) have
   been ignored by iOS since iOS 10, so sizing the field at 16px is the only
   thing that works. 15px is not close enough — the threshold is exactly 16.

   This has to be !important and last because the rules it overrides are
   themselves !important and live inside mobile media queries (e.g. the 15px
   .form-control rule in this file, and per-widget class rules down to 12px).
   The :not() chain both skips controls that never receive text (checkboxes,
   buttons, sliders) and lifts specificity above the id-scoped one-offs.
--------------------------------------------------------------------------- */
@media (max-width: 900px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="submit"]):not([type="button"]):not([type="image"]),
    textarea,
    select,
    .form-control,
    .form-select,
    [contenteditable="true"],
    .select2-container .select2-search__field { font-size: 16px !important; }
}

/* ============================================================================
   TOP BAR — Share / Subscribe as card chrome (BioPageRenderer::content()).
   A widget with config.position === 'topbar' leaves the page body and renders
   here instead, pinned to the card's top-right corner (Linktree-style). The
   placement is exclusive: there is never both a topbar button and a body block
   for the same widget. #populatedContent is the offset parent (declared above).
   ============================================================================ */
.bio-topbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
}
/* The editor wraps each topbar item in a .block; strip the body-block box so
   the buttons sit flush next to each other on both surfaces. */
.bio-topbar .block { padding: 0; margin: 0; width: auto; }

/* Chrome, not content: neutral surface + fixed metrics, like the public modals.
   Themed card/text colours made this invisible — a blue bio painted a blue pill
   onto its blue header photo — and --bio-fs blew a 14px label up to 19px on a
   large-text page. The hairline border keeps the button readable on a white
   header too. */
.bio-topbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, .10);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  color: #11141b;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px -4px rgba(8, 10, 16, .45);
  transition: transform .12s ease, box-shadow .12s ease;
}
@media (hover: hover) {
  .bio-topbar-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -4px rgba(0, 0, 0, .3); }
}
.bio-topbar-btn:active { transform: translateY(0); }
.bio-topbar-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.bio-topbar-btn--icon { width: 40px; height: 40px; border-radius: 50%; }
.bio-topbar-btn--pill {
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .bio-topbar-btn { transition: none; }
  @media (hover: hover) {
    .bio-topbar-btn:hover { transform: none; }
  }
}

/* --- Subscribe modal (topbar pill). Same open/close contract as the
   Join/Share modals, but it is a CENTRED card at every width — the same
   treatment the Contact and Calendly socials-row icons get from
   .bio-contact-overlay — rather than a bottom sheet on phones. The base
   shell's ≤560px rule docks every [data-bio-modal] to the bottom edge, so
   the geometry is restated here at higher specificity. */
.bio-modal--sheet[data-bio-modal] { align-items: center; padding: 16px; }
.bio-modal[data-bio-modal] .bio-modal__card--sheet {
  max-width: 420px;
  max-height: 88vh;
  border-radius: 16px;
  padding: 22px 20px 20px;
  animation: bioContactPop .2s cubic-bezier(.2, .8, .25, 1);
}
/* The modal carries the page's theme (accent, font, radius) so the Subscribe
   button matches the bio it came from — but the card itself is a neutral white
   card like every other public modal, so the surface colours are forced back to
   the modal's own. Without this the block's themed card/text vars paint a dark
   theme's colours onto white. */
.bio-sheet-scope { display: contents; }
.bio-modal__card--sheet { --bio-card: #fff; --bio-text: #1f2430; }
/* The widget renders its own bordered card. Inside the modal that card IS the
   modal, so strip the inner one — otherwise it reads as a box in a box. */
.bio-modal__card--sheet .bio-email-block {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.bio-modal__card--sheet .bio-email-preview { padding: 0 !important; }
/* Keep the heading clear of the close button. */
.bio-modal__card--sheet .bio-email-heading { padding-right: 34px; }
@media (prefers-reduced-motion: reduce) {
  .bio-modal__card--sheet { animation: none; }
}

/* ── Section rhythm ────────────────────────────────────────────────────────
   Every block sat one --bio-gap from its neighbours, so a heading floated
   midway between the section it closes and the one it opens. A heading now
   stands a little further from what is above it and a little closer to what is
   below, both as fractions of the owner's Block spacing, so the page reads as
   groups at any slider setting.
   A heading block is the .block whose child is .section-header (it has no
   class of its own). Dividers are left out on both sides: a divider is the
   owner setting a distance by hand.
   Public page only (.bio-public). The editor canvas spaces its blocks with its
   own margin and must not change a block's margin when its neighbour changes:
   a margin that moves during a drag is what the selection ring mis-measures.
   The weight stays at one class + the scope, so the tighter single-link
   stacking keeps its own margin. */
.bio-public :where(#populatedContent) > :where(.block:not(:has(> .section-header)):not(.bio-divider)) + :where(.block:has(> .section-header)) {
  margin-top: calc(var(--bio-gap, 14px) * .4);
}
.bio-public :where(#populatedContent) > :where(.block:has(> .section-header)) + :where(.block:not(:has(> .section-header)):not(.bio-divider)) {
  margin-top: calc(var(--bio-gap, 14px) * -.3);
}

/* ── First paint ───────────────────────────────────────────────────────────
   Blocks rise into place in order, once, when the page opens. Public page only
   (.bio-public): the editor canvas must never move under the owner's pointer.
   The profile header is left out so the first thing a visitor sees is there
   from the first frame. `backwards`, not `both`: when a block's animation ends
   nothing of it stays applied, so no transform is left to disturb a sheet or
   an embed inside the block. */
@media (prefers-reduced-motion: no-preference) {
  .bio-public #populatedContent > .block {
    animation: bio-block-in .42s cubic-bezier(.2, .7, .2, 1) backwards;
    animation-delay: .24s;
  }
  .bio-public #populatedContent > .block:nth-child(2) { animation-delay: 0s; }
  .bio-public #populatedContent > .block:nth-child(3) { animation-delay: .05s; }
  .bio-public #populatedContent > .block:nth-child(4) { animation-delay: .1s; }
  .bio-public #populatedContent > .block:nth-child(5) { animation-delay: .15s; }
  .bio-public #populatedContent > .block:nth-child(6) { animation-delay: .2s; }
}
@keyframes bio-block-in {
  from { opacity: 0; transform: translateY(10px); }
}

/* TikTok "Tap ··· → Open in browser" overlay (BioRenderController::tiktokOverlay,
   shown by the25-bio-public.js after a tap inside TikTok). */
.bio-tiktok-open { display: none; position: fixed; inset: 0; z-index: 10000; flex-direction: column; align-items: flex-end; background: #faf8f5; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.bio-tiktok-open.is-open { display: flex; }
.bio-tiktok-open button { position: absolute; top: 12px; left: 12px; padding: 8px 12px; border: 0; background: none; font-size: 32px; line-height: 1; color: #1a1a1a; cursor: pointer; }
.bio-tiktok-open svg { margin: 20px 28px 0 0; animation: bio-tt-bounce 1.2s ease-in-out infinite; }
.bio-tiktok-open p { align-self: stretch; margin: 20px 32px 0; font-size: 20px; font-weight: 700; line-height: 1.4; color: #1a1a1a; text-align: center; }
@keyframes bio-tt-bounce { 50% { transform: translateY(-8px); } }
/* A tap carried out of TikTok (?open), on its way to the app: "Redirecting..."
   instead of the page (html.bio-opening, BioRenderController::openingHead). */
.bio-tiktok-open .bio-tiktok-wait { display: none; align-self: auto; margin: 0; font-size: 16px; font-weight: 600; color: #6b7280; }
html.bio-opening .bio-public { visibility: hidden; }
html.bio-opening .bio-tiktok-open { display: flex; justify-content: center; align-items: center; }
html.bio-opening .bio-tiktok-open > * { display: none; }
html.bio-opening .bio-tiktok-open > .bio-tiktok-wait { display: block; }
@media (prefers-reduced-motion: reduce) { .bio-tiktok-open svg { animation: none; } }
