/* ─── tokens ─── */
:root {
  --brand:        #F68328;   /* PDF-exact brand orange */
  --brand-soft:   #FDE9D9;   /* peach card / soft fill */
  --font-head:    "Quicksand", -apple-system, BlinkMacSystemFont, "Segoe UI",
                  Roboto, "Helvetica Neue", Arial, sans-serif;
  --ink:          #1A1A1A;
  --ink-soft:     #464646;   /* body copy */
  --muted:        #919191;   /* secondary / hints */
  --dot:          #A6A6A6;   /* unwatched progress dot */
  --bg:           #FFFBF7;   /* warm page background — all panels */
  --bg-tint:      #F4F5EE;   /* cool section wash */
  --card:         #FFFFFF;
  --shadow:       0 6px 24px rgba(0,0,0,.08);
  --radius:       16px;
  --radius-sm:    10px;
  --app-vh:       1vh;        /* updated by JS for FB-IAB */
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
  --safe-top:     env(safe-area-inset-top, 0px);
  --bar-h:        58px;       /* floating section-bar height (excl. safe-top) */
  --app-w:        min(420px, 100vw);  /* feed column — caps at the max mobile
                                         width; never fills a wide viewport.
                                         On phones (≤420px) this is 100vw. */
  --app-left:     calc(50% - var(--app-w) / 2);  /* left edge of the centered column */
}

/* ─── reset ─── */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; padding: 0; overflow: hidden; }
html, body { background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font-head);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
img, video { max-width: 100%; height: auto; display: block; }
button {
  font: inherit; color: inherit;
  background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer; text-align: left;
}
a { color: inherit; text-decoration: none; }

/* ─── feed ───────────────────────────────────────────────
   A fixed, horizontally-centered column capped at the max mobile width
   (--app-w). On phones it spans the full viewport; on tablet/desktop it stays
   that same width centered on the page (never stretches to fill the viewport). */
.feed {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--app-w);
  /* fallback then progressive: */
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }

/* ─── panel ─── */
.panel {
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  width: 100%;
  /* min-height guarantees full viewport; JS keeps --app-vh fresh */
  min-height: 100vh;
  min-height: 100svh;
  min-height: calc(var(--app-vh) * 100);
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel__inner {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  /* "safe center" keeps content centred when it fits but falls back to
     top-alignment when it overflows (e.g. large text-zoom) so nothing clips */
  justify-content: safe center;
  gap: clamp(12px, 3vh, 20px);
  padding: clamp(24px, 6vh, 40px)
           clamp(20px, 5vw, 28px)
           calc(clamp(72px, 12vh, 96px) + var(--safe-bottom))
           clamp(20px, 5vw, 28px);
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}
.panel__inner--scroll {
  justify-content: flex-start;
  overflow-y: auto;
  padding-top: calc(clamp(20px, 6vh, 36px) + var(--safe-top));
}
.panel__inner--scroll::-webkit-scrollbar { display: none; }

/* Content panels: editorial content centered in the upper area, the CTA(s)
   pinned to the bottom just above the chat FAB — matches the PDF, where every
   "Sign up as a Marrow Donor Now" button sits at the bottom of the screen. */
.panel__lead {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: safe center;   /* fall back to top-align if it overflows */
  gap: clamp(12px, 3vh, 20px);
}
.panel__inner--scroll .panel__lead {
  justify-content: flex-start;
  overflow-y: auto;
}
.panel__inner--scroll .panel__lead::-webkit-scrollbar { display: none; }
.panel__cta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 2.2vh, 14px);
}
.panel__cta .swipe-back { margin-top: 6px; }

/* panels that carry the floating bar reserve space for it at the top */
.panel--bar .panel__inner {
  padding-top: calc(var(--bar-h) + var(--safe-top) + 14px);
}
.panel--bar .panel__inner--scroll {
  padding-top: calc(var(--bar-h) + var(--safe-top) + 10px);
}

/* every panel — including the welcome screen — uses the flat warm-white --bg */
.panel--title { background: var(--bg-tint); }
.panel--welcome { background: var(--bg); }

/* ─── typography ─── */
/* All headings: rounded Quicksand, brand orange, centered — matches the PDF. */
.title-xl,
.title-lg,
.title-md {
  font-family: var(--font-head);
  color: var(--brand);
  text-align: center;
  margin: 0;
}
.title-xl {
  font-size: clamp(1.75rem, 7.5vw, 2.4rem);
  line-height: 1.2;
  font-weight: 700;
}
.title-lg {
  font-size: clamp(1.5rem, 6.5vw, 2.1rem);
  line-height: 1.22;
  font-weight: 700;
}
/* small section label that sits at the top of each content panel */
.title-md {
  font-size: clamp(1.05rem, 4.2vw, 1.3rem);
  line-height: 1.3;
  font-weight: 600;
}
.body {
  font-size: clamp(0.95rem, 3.8vw, 1.05rem);
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
  text-align: center;
}
.lead {
  font-size: clamp(1.15rem, 4.6vw, 1.4rem);
  line-height: 1.35;
  margin: 0;
  font-weight: 600;
  text-align: center;
}
.lead-em {
  font-size: clamp(1.3rem, 5.4vw, 1.7rem);
  line-height: 1.25;
  font-weight: 700;
  margin: 0;
  text-align: center;
  color: var(--brand);
}
.brand-text { color: var(--brand); }
.eyebrow {
  font-size: clamp(0.8rem, 3.4vw, 0.9rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
  opacity: .85;
}

/* welcome logo */
.brand-logo {
  width: clamp(96px, 28vw, 140px);
  height: auto;
  margin: 0 auto clamp(8px, 3vh, 16px);
}
.panel--welcome .panel__inner { align-items: center; text-align: center; }
.panel--welcome .title-xl { text-align: center; }

/* title panels: center content */
.panel--title .panel__inner { align-items: center; text-align: center; justify-content: center; }
.panel--title .title-xl { color: var(--brand); }

/* swipe hint */
.swipe-hint {
  margin-top: auto;
  text-align: center;
  font-size: clamp(0.85rem, 3.6vw, 0.95rem);
  color: var(--muted);
  padding-top: 24px;
}
.swipe-hint span {
  display: inline-block;
  font-size: 1.4em;
  margin-right: 6px;
  transform: translateY(2px);
  animation: bob 1.6s ease-in-out infinite;
  color: var(--brand);
}
.swipe-back {
  margin-top: clamp(16px, 4vh, 28px);
  text-align: center;
  font-size: clamp(0.78rem, 3.2vw, 0.85rem);
  color: var(--muted);
}
@keyframes bob {
  0%, 100% { transform: translateY(2px); }
  50%      { transform: translateY(-4px); }
}

/* ─── CTA cards (page 2 & 14) ─── */
.cta-card {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 12px;
  padding: clamp(14px, 4vw, 18px) clamp(16px, 4.5vw, 20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  min-height: 64px;
  font: inherit;
  text-align: left;
  transition: transform .15s ease;
}
.cta-card:active { transform: scale(.98); }
.cta-card--primary {
  background: var(--brand);
  color: #fff;
}
.cta-card--ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid #EFE3D5;
}
.cta-card__label {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  font-weight: 700;
  font-size: clamp(0.98rem, 4vw, 1.08rem);
  line-height: 1.2;
}
.cta-card__sub {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  font-size: clamp(0.78rem, 3.2vw, 0.88rem);
  opacity: .85;
  line-height: 1.3;
}
.cta-card__time {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  align-self: center;
  font-size: clamp(0.72rem, 3vw, 0.82rem);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.25);
  white-space: nowrap;
}
.cta-card--ghost .cta-card__time {
  background: var(--brand-soft);
  color: var(--brand);
}
.cta-note {
  margin: -4px 0 0;
  font-size: clamp(0.72rem, 3vw, 0.8rem);
  color: var(--muted);
  text-align: center;
}

/* generic button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: max(44px, 2.75rem);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: clamp(0.95rem, 4vw, 1.05rem);
  width: 100%;
  text-align: center;
  transition: transform .15s ease, background .15s ease;
}
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--ghost   { background: #fff; color: var(--brand); border: 2px solid var(--brand); }

/* ─── stat lines ─── */
.stat-line {
  font-size: clamp(1.3rem, 5.4vw, 1.7rem);
  line-height: 1.25;
  font-weight: 700;
  margin: 0;
  text-align: center;
  color: var(--brand);
}
.stat-line strong { font-weight: 700; }
.stat-num {
  display: inline-block;
  font-size: clamp(2.8rem, 12vw, 4rem);
  font-weight: 900;
  color: var(--brand);
  line-height: 1;
  margin-right: 6px;
  vertical-align: -0.12em;
}

/* ─── method cards (PBSC panel) ─── */
.method-card {
  background: var(--card);
  border: 1px solid #F0E4D5;
  border-radius: var(--radius);
  padding: clamp(14px, 4vw, 18px);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.method-card--alt { background: var(--bg-tint); }
.method-card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: clamp(0.78rem, 3.2vw, 0.88rem);
  font-weight: 700;
  line-height: 1.2;
}
.badge--orange { background: var(--brand); color: #fff; }
.badge--ghost  { background: #fff; color: var(--ink-soft); border: 1px solid #E5DAC9; }

.method-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kpi__num {
  font-size: clamp(1.8rem, 8vw, 2.4rem);
  font-weight: 900;
  color: var(--brand);
  line-height: 1;
}
.kpi__num small {
  font-size: 0.5em;
  font-weight: 700;
  color: var(--ink-soft);
  margin-left: 2px;
}
.kpi__lbl {
  font-size: clamp(0.78rem, 3.2vw, 0.85rem);
  color: var(--ink-soft);
  line-height: 1.3;
}

/* bullet lists */
.bullet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bullet-list li {
  position: relative;
  padding-left: 26px;
  font-size: clamp(0.95rem, 3.8vw, 1.05rem);
  line-height: 1.4;
  color: var(--ink-soft);
}
.bullet-list li::before {
  content: "";
  position: absolute;
  left: 6px; top: .55em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand);
}
.bullet-list--check li::before {
  content: "✓";
  background: transparent;
  color: var(--brand);
  font-weight: 900;
  left: 0; top: 0;
  width: auto; height: auto;
  font-size: 1.1em;
}

/* ─── video panels ─── */
.panel--video { background: #000; }
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.panel__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: clamp(10px, 2.5vh, 16px);
  padding: clamp(20px, 6vh, 36px)
           clamp(20px, 5vw, 28px)
           calc(clamp(80px, 14vh, 110px) + var(--safe-bottom))
           clamp(20px, 5vw, 28px);
  background: linear-gradient(180deg,
    rgba(0,0,0,.25) 0%,
    rgba(0,0,0,0) 25%,
    rgba(0,0,0,0) 55%,
    rgba(0,0,0,.65) 100%);
  color: #fff;
}
.panel__overlay > * { width: 100%; max-width: 520px; margin-inline: auto; }
.on-video { color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.4); }

/* on bar'd video panels, the video + scrim start below the floating bar
   (the opaque bar covers the panel's black strip above this offset) */
.panel--bar.panel--video .bg-video {
  top: calc(var(--bar-h) + var(--safe-top));
  /* explicit height (not auto): <video> is a replaced element, so height:auto
     would size to the clip's intrinsic ratio and leave a gap below */
  height: calc(100% - (var(--bar-h) + var(--safe-top)));
}
.panel--bar .panel__overlay {
  top: calc(var(--bar-h) + var(--safe-top));
}

/* ─── scrollytelling journey sections ───────────────────────
   Each journey section pins its video while the text card(s) scroll up over it.
   The video auto-pauses once a text card covers it (handled in main.js). The
   intro pages and the doctor/experts pages are NOT wrapped in a .vsection, so
   they keep the plain one-screen-per-panel behaviour. */
.vsection {
  position: relative;
  /* height comes from the children: one sticky video (100dvh in flow) plus
     each text card (100dvh) → snap to the section start = video-alone view */
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
/* the video stays pinned at the top while its text card(s) slide over it */
.vmedia {
  position: sticky;
  top: 0;
  scroll-snap-align: none;   /* snapping is driven by .vsection start + .vtext */
}
/* the text card: a near-solid (90% opaque) surface that slides over the video */
.vtext {
  z-index: 1;                                /* paint above the pinned video */
  background: rgba(255, 251, 247, 0.90);     /* var(--bg) #FFFBF7 @ 90% opacity */
}

.back-btn {
  position: absolute;
  top: calc(16px + var(--safe-top));
  left: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.back-btn:active { background: rgba(0,0,0,.65); }
.doctor-name {
  font-size: clamp(1.2rem, 5vw, 1.5rem);
  font-weight: 700;
  margin: 0;
  text-align: center;
  color: var(--brand);
}
.doctor-topic {
  font-size: clamp(1rem, 4vw, 1.15rem);
  font-weight: 600;
  margin: 0;
  text-align: center;
  color: var(--ink-soft);
}

/* doctor video panels (p17–19): cream bg, full-width landscape clip, then
   name / topic / CTA stacked below — matches the PDF (not full-bleed video) */
.panel--doctor { background: var(--bg); }
.doctor-stack {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--bar-h) + var(--safe-top));
  /* reserve room for the bottom-left chat FAB so the CTA sits just above it */
  padding-bottom: calc(96px + var(--safe-bottom));
}
/* video + name + topic, centered in the space above the CTA */
.doctor-feature {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(14px, 3vh, 22px);
}
.feature-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  /* landscape clips (e.g. Dr Joanne) crop slightly toward the top; portrait
     clips are re-laid-out by .is-portrait below (added in JS by orientation). */
  object-position: center 22%;
  background: #000;
  display: block;
}
/* Portrait clips (e.g. Dr Lim, Prof William — 9:16) show as portrait instead of
   being cropped into the 16:9 band: a centred, height-capped portrait card so the
   name/topic and CTA still fit on screen. main.js adds .is-portrait when a clip's
   intrinsic height > width. */
.feature-video.is-portrait {
  width: auto;
  aspect-ratio: 9 / 16;
  height: min(56vh, calc(100dvh - 330px));
  max-width: 100%;
  margin-inline: auto;
  object-position: center;          /* same aspect as source → no crop */
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
}
.doctor-meta {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.5vh, 10px);
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 28px);
}
/* CTA anchored at the bottom, just above the chat FAB (PDF p17–19) */
.doctor-cta {
  width: calc(100% - 2 * clamp(20px, 5vw, 28px));
  max-width: 520px;
  margin-inline: auto;
}

/* peach quote card (voluntary panel, p8) */
.quote-card {
  background: linear-gradient(180deg, var(--brand-soft), #FDDDC8);
  border-radius: var(--radius);
  padding: clamp(20px, 6vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.quote-card .body { color: var(--ink-soft); }

/* ─── steps (panel 14) ─── */
.steps-image {
  width: 100%;
  max-width: 320px;
  margin: 8px auto;
}
/* PBSC infographic (p6) — the original artwork has its own peach rounded card */
.pbsc-image {
  width: 100%;
  max-width: 440px;
  height: auto;
  margin: 4px auto 0;
  display: block;
}
.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;       /* shown only on narrow screens */
  flex-direction: column;
  gap: 12px;
}
.steps-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: clamp(0.95rem, 3.8vw, 1.05rem);
  font-weight: 600;
}
.steps-list__n {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}

@media (max-width: 359px) {
  .steps-image { display: none; }
  .steps-list  { display: flex; }
}

/* ─── doctor grid (experts list) ─── */
/* Vertical cards: full-width 16:9 thumbnail on top, then name (orange) and
   topic (grey) centered below — matches the PDF. */
.doctor-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
}
.doctor-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #F0E4D5;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  transition: transform .15s ease;
}
.doctor-card:active { transform: scale(.99); }
.doctor-card__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--brand);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doctor-card__thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* portrait source clips crop to a 16:9 band — bias toward the top so the
     subject's face is kept in frame rather than centred on the torso */
  object-position: center 28%;
  z-index: 1;     /* covers the initials fallback once the poster loads */
}
.doctor-card__initials {
  color: #fff;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.04em;
  /* shown only if the poster image fails to load (sits behind it) */
}

.doctor-card__name {
  display: block;
  text-align: center;
  font-size: clamp(1.05rem, 4.4vw, 1.25rem);
  font-weight: 800;
  color: var(--brand);
  line-height: 1.2;
  margin: 12px clamp(12px, 4vw, 16px) 0;
}
.doctor-card__topic {
  display: block;
  text-align: center;
  font-size: clamp(0.9rem, 3.6vw, 1rem);
  font-weight: 600;
  color: var(--ink-soft);
  margin: 3px clamp(12px, 4vw, 16px) 14px;
}

/* ─── floating section bar (title + progress dots / back) ─── */
/* Spans the centered feed column, not the full viewport. */
.sectionbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--app-w);
  z-index: 55;
  height: calc(var(--bar-h) + var(--safe-top));
  padding: calc(var(--safe-top) + 8px) 16px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--bg);                 /* opaque warm-white band, like the PDF */
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.sectionbar[hidden] { display: none; }
.sectionbar__title {
  font-family: var(--font-head);
  color: var(--brand);
  font-weight: 600;
  font-size: clamp(1.05rem, 4.2vw, 1.3rem);
  line-height: 1.2;
  text-align: center;
  margin: 0;
}
.sectionbar__dots {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 7px;
}
.sectionbar__dots li {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--dot);
  transition: background .25s ease;
}
.sectionbar__dots li[data-on="true"] { background: var(--brand); }

/* back button (experts pages); hidden in journey mode */
.sectionbar__back {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  margin-top: calc(var(--safe-top) / 2);
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--brand);
  color: var(--brand);
  font-size: 0;            /* hide the text glyph; chevron is drawn below */
  display: none;
  align-items: center;
  justify-content: center;
}
/* CSS-drawn chevron — reliably centered (the ‹ glyph has uneven bearings) */
.sectionbar__back::before {
  content: "";
  width: 9px; height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-radius: 1px;
  transform: translateX(2px) rotate(45deg);   /* points left, optically centered */
}
.sectionbar__back:active { background: var(--brand-soft); }
.sectionbar--experts .sectionbar__dots { display: none; }
.sectionbar--experts .sectionbar__back { display: flex; }

/* ─── play gate (Play button over the current video until audio is unlocked) ─── */
.play-gate {
  position: fixed;            /* top/left set inline by main.js = active video centre */
  transform: translate(-50%, -50%);
  z-index: 58;
  width: 76px; height: 76px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .45));
  animation: pg-pulse 2.2s ease-in-out infinite;
}
.play-gate[hidden] { display: none; }
.play-gate:active { transform: translate(-50%, -50%) scale(.94); animation: none; }
.play-gate svg { width: 100%; height: 100%; display: block; }
.play-gate .pg-disc { fill: rgba(0, 0, 0, .45); stroke: #fff; stroke-width: 2; }
.play-gate .pg-tri  { fill: #fff; }
@keyframes pg-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.07); }
}
@media (prefers-reduced-motion: reduce) { .play-gate { animation: none; } }

/* ─── portrait-only gate ───────────────────────────────────
   Hidden by default; shown only when a phone is held in landscape (short
   landscape viewport). Covers everything incl. the chat FAB (z 99999). */
#rotate-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
  background: var(--bg);
  color: var(--brand);
}
.rotate-gate__icon {
  width: 76px; height: 76px;
  transform-origin: 50% 50%;
  animation: rotate-hint 2.6s ease-in-out infinite;
}
.rotate-gate__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0;
  color: var(--brand);
}
.rotate-gate__sub {
  font-size: 0.95rem;
  margin: 0;
  color: var(--ink-soft);
}
@keyframes rotate-hint {
  0%, 50%   { transform: rotate(0deg); }
  72%, 100% { transform: rotate(-90deg); }
}
@media (prefers-reduced-motion: reduce) {
  .rotate-gate__icon { animation: none; }
}
/* Phones in landscape have a SHORT viewport; desktop & tablet landscape are
   tall, so they never trigger this. */
@media (orientation: landscape) and (max-height: 600px) {
  #rotate-gate { display: flex; }
}

/* ─── wider than the column (tablet / desktop) ─────────────
   The feed stays capped at --app-w and centered. Here we just style the
   surrounding page so the column reads as a distinct surface — a subtle
   neutral backdrop and a soft ambient shadow on the column. NO phone-frame
   bezel, rounded device corners, or hardware chrome. */
@media (min-width: 421px) {   /* once the viewport exceeds --app-w (420px) */
  html, body {
    background: #ECE7E1;   /* soft neutral surround */
  }
  .feed {
    box-shadow: 0 0 50px rgba(0, 0, 0, .10);
  }
}

/* ─── reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .feed { scroll-behavior: auto; }
  .swipe-hint span { animation: none; }
  .cta-card, .btn, .doctor-card { transition: none; }
}

/* ─── BMDP contact widget — bottom-left FAB, matching the PDF ─── */
/* Anchored to the bottom-left of the centered feed column (not the viewport
   edge), so on tablet/desktop it sits just inside the column like on mobile. */
#contact-plugin,
#contact-open {
  right: auto !important;
  left: calc(var(--app-left) + max(18px, env(safe-area-inset-left, 0px))) !important;
  bottom: max(20px, calc(var(--safe-bottom) + 18px)) !important;
  z-index: 99999 !important;
}

/* Hide the "Contact us" pill tooltip (collapsed by default) */
#contact-open .contact-open-label,
#contact-open .contact-open-label.contact-one,
#contact-plugin .contact-open-label {
  display: none !important;
}

/* Closed-state FAB — orange rounded square, white speech-bubble icon + "Chat",
   matching the PDF. */
#contact-open {
  /* display:flex (NO !important) so the icon+label stack renders initially and
     contact.js can still toggle inline display:none/flex when opening/closing. */
  display: flex;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 1px !important;
  width: 66px !important;
  height: 66px !important;
  border-radius: 18px !important;
  background: var(--brand) !important;
  box-shadow: 0 10px 24px rgba(246, 131, 40, .35),
              0 2px 6px rgba(0, 0, 0, .12) !important;
  padding: 7px 0 8px !important;
  transition: transform .18s ease, box-shadow .18s ease;
}
#contact-open:hover  { transform: translateY(-1px); }
#contact-open:active { transform: scale(.96); }

/* neutralize contact.js's inner wrappers so the icon + label can stack */
#contact-open #contact-rotate,
#contact-open .contact-btn1 {
  background: transparent !important;
  border-radius: 0 !important;
  width: auto !important;
  height: auto !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* custom white speech bubble */
#contact-open .chat-bubble {
  width: 30px !important;
  height: 30px !important;
}
#contact-open .chat-bubble circle,
#contact-open .chat-bubble path { fill: #ffffff !important; }

/* "Chat" label under the icon */
#contact-open::after {
  content: "Chat";
  color: #ffffff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
}

/* Expanded state — keep stack of action buttons compact, no labels */
#contact-plugin {
  gap: 10px !important;
}
#contact-plugin .phones {
  width: 56px !important;
  height: 56px !important;
}
#contact-plugin .contact-btn,
#contact-plugin .contact-btn1 {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.18), 0 2px 4px rgba(0,0,0,.08) !important;
}
#contact-plugin .contact-btn svg,
#contact-plugin .contact-btn1 svg {
  width: 56px;
  height: 56px;
}

/* Close ("Hide") button — match the chat-icon FAB look: orange disc, white X */
#contact-plugin #rotate-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  box-shadow: 0 10px 24px rgba(246, 131, 40, .35),
              0 2px 6px rgba(0, 0, 0, .12);
}
#contact-plugin #contact-close {
  background: transparent !important;
  border-radius: 0 !important;
  width: 100% !important;
  height: 100% !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
#contact-plugin #contact-close svg {
  width: 28px !important;
  height: 28px !important;
}
#contact-plugin #contact-close svg ellipse { fill: transparent !important; }
#contact-plugin #contact-close svg rect    { fill: #ffffff !important; }

