/* The Love Story lightbox.
 *
 * HAND WRITTEN, and it is the only stylesheet on this surface that is. Its
 * neighbour love-stories.css is generated by
 * site/build/generate-love-stories-css.py from the two accepted builds and says
 * so at the top; this file exists so that nothing new has to be hand-edited
 * into a generated one. Loaded on the single story view, and (since
 * 2026-10-02) on a post with a core Gallery block in it, which now opens its
 * photographs in this same dialog (inc/photo-download.php says why).
 *
 * ALSO HERE SINCE 2026-10-02: the Download buttons, on the page and in the
 * dialog (.claude/tasks/erdf-photo-download-buttons.md). Every one of them is
 * built by script, so with no script none of those rules matches anything.
 *
 * NO NEW COLOUR, NO NEW TYPEFACE, NO NEW RADIUS. Every value below is a token
 * from tokens.css or a value this theme already uses somewhere else, and where
 * it is the second kind the comment says where it came from. The ground is the
 * fund's own navy, not black: the plates, the ask band and the footer are all
 * --ink-navy, and a black overlay would be the one truly foreign surface on the
 * site.
 *
 * ASTRA'S GLOBAL BUTTON PADDING IS 15px 30px, and this dialog lives on <body>
 * rather than inside .entry-content, so love-stories.css's button reset (which
 * is scoped with :where(.entry-content *)) does not reach it. Every button here
 * therefore sets its own padding, exactly as .dp-x does in donate-popup.css and
 * for the same reason: without it a 44px round control is floored at 74px and
 * the glyph inside it is crushed to nothing.
 */

/* ============================================================
   The triggers: a photograph that opens.

   A button around the image rather than a click handler on it,
   so it is in the tab order, announces itself, and takes the
   Enter key without a line of script. With no script it is a
   button that does nothing and says nothing, and the
   photographs are on the page at the size they always were.
   ============================================================ */
.erdf-ls-story .lb-open {
  display: block; width: 100%; margin: 0;
  padding: 0; border: 0; background: none;   /* Astra: global button padding and border */
  cursor: zoom-in;
  border-radius: var(--r-card);   /* matches the tile, so the focus ring does */
}
.erdf-ls-story .lb-open:focus-visible {
  outline: 3px solid var(--rain-yellow); outline-offset: 2px;
}
/* The opening panel clips to its own square, so an outline outside the button
   is outside the frame and never seen. It goes inside instead. */
.erdf-ls-story .open-photo .lb-open { height: 100%; border-radius: 0; }
.erdf-ls-story .open-photo .lb-open:focus-visible { outline-offset: -5px; }
/* The gallery tile already carries --shadow-card. Hover lifts it to
   --shadow-lift, which is the pair tokens.css ships for exactly this, and is
   the whole hover cue: no zoom, no tint, no motion on the photograph. */
.erdf-ls-story .gal-grid .lb-open img { transition: box-shadow 180ms ease-out; }
.erdf-ls-story .gal-grid .lb-open:hover img { box-shadow: var(--shadow-lift); }

/* A core Gallery block's photographs: the same trigger, wrapped round each
   image by the script. It takes exactly the place core's own gallery CSS
   gives a LINKED image (block-library gallery: `figure.wp-block-image > a`
   grows to fill the figure, and in a cropped gallery it is a flex box the
   image covers), so the rows and the crops are the ones core lays out.
   Astra fills every bare button on :hover and :focus; none of that here. */
.erdf-photos .wp-block-gallery.has-nested-images figure.wp-block-image > .lb-open {
  display: flex; flex-direction: column; flex-grow: 1;
  width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; cursor: zoom-in;
}
.erdf-photos .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) > .lb-open {
  flex: 1 0 0%; height: 100%;
}
.erdf-photos .wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded > .lb-open,
.erdf-photos .wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border > .lb-open {
  flex: 1 1 auto;
}
.erdf-photos .wp-block-gallery .lb-open:hover,
.erdf-photos .wp-block-gallery .lb-open:focus { background: none; }
.erdf-photos .wp-block-gallery .lb-open:focus-visible {
  outline: 3px solid var(--rain-yellow); outline-offset: 2px;
}

/* ============================================================
   Download, on the page.

   REDESIGNED 2026-10-02 (Adam, on the first render, which had a
   labelled button under every photograph: "too many buttons",
   "it will ruin the design"). What the page carries now:
     - ONE "Download all photos" (.pdl-btn below), on a Love Story
       and on an event post, in the quiet tier.
     - On a computer only, a small corner mark on each photograph,
       shown on hover or keyboard focus (.pdi, further down). At
       rest the page is the photographs and nothing else.
     - The large view's labelled Download, which is the dialog's
       (see "The dialog").
   Every one of them is built by script; with no script none of
   these rules matches anything.

   "Download all photos" is THE QUIET TIER, UNCHANGED: .btn
   .btn-quiet from chrome.css, its colour, its type, its 2px
   outline (design-system 2.3). It is a utility, never a call to
   action. What is set here is what the tier needs to survive being
   a <button> under Astra.
   ============================================================ */

/* Astra styles every bare <button> (inline theme CSS, one element and one
   pseudo-class): a shadow at rest, and on :hover and :focus a solid #1F4E79
   fill with white text. The quiet tier is one class, so without these a
   pressed Download button would stay filled dark blue for as long as it held
   focus. Same colours as .btn-quiet and .btn-quiet:hover, restated, nothing
   new. */
.btn.btn-quiet.pdl-btn { box-shadow: none; }
.btn.btn-quiet.pdl-btn:hover,
.btn.btn-quiet.pdl-btn:focus {
  color: var(--erdf-blue-dark); border-color: var(--erdf-blue-dark); background: transparent;
}
.btn.btn-quiet.pdl-btn:hover,
.btn.btn-quiet.pdl-btn:active { background: var(--blue-tint); }
.btn.pdl-btn:focus-visible { outline: 3px solid var(--rain-yellow); outline-offset: 2px; }
.pdl-btn svg { pointer-events: none; }

/* NO TAP HIGHLIGHT, and :active above stands in for it. A phone's browser
   paints its own flash over a pressed control, and it paints the control's
   square box, not its pill: on Chromium a light-blue rectangle
   (rgba(51,181,229,0.4)) round the rounded button. That was the square box in
   the first review's "Getting photos ready" and "Save to Photos" renders: the
   same state set without a tap, or tapped with the highlight off, is clean
   (tmp/download-buttons/box_probe.py). The pill's own tint is the press
   feedback instead, inside its own radius. */
.pdl-btn { -webkit-tap-highlight-color: transparent; }

/* THE THREE STATES, each its own look, so the button says which one it is in
   without the reader having to read it twice.
   busy: the tint, held, with the rest state's navy label (7.7:1). Held rather
   than left to :hover, so it reads the same with a mouse over it, a finger
   lifted off it, or neither.
   ready (phones, the second press): the theme's filled primary, .erdf-btn's own
   colours (erdf.css), so a reader who looked away sees the button has changed
   and that it wants another press. The words are the label's. */
.btn.btn-quiet.pdl-btn[data-state="busy"],
.btn.btn-quiet.pdl-btn[data-state="busy"]:hover,
.btn.btn-quiet.pdl-btn[data-state="busy"]:focus {
  background: var(--blue-tint); color: var(--erdf-blue-dark); border-color: var(--erdf-blue-dark);
  cursor: progress;
}
.btn.btn-quiet.pdl-btn[data-state="ready"],
.btn.btn-quiet.pdl-btn[data-state="ready"]:focus {
  background: var(--erdf-blue); color: #fff; border-color: var(--erdf-blue);
}
.btn.btn-quiet.pdl-btn[data-state="ready"]:hover,
.btn.btn-quiet.pdl-btn[data-state="ready"]:active {
  background: var(--erdf-blue-dark); color: #fff; border-color: var(--erdf-blue-dark);
}

/* "Download all photos" on a Love Story, in the gallery's heading row: the
   heading at the left, the button at the right, and at 390 the button wraps to
   a line of its own under the heading. The row takes over the heading's own
   bottom margin, so the grid starts where it did. */
.erdf-ls-story .pdl-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--sp-2) var(--sp-3); margin: 0 0 var(--sp-3);
}
.erdf-ls-story .pdl-head .gal-h { margin: 0; }

/* ...and on an event post, just above the gallery, at its right edge. The row
   is the gallery's sibling, so a constrained group gives it the gallery's own
   width and the button's right edge lands on the last column's. */
.erdf-photos .pdl-head--gallery {
  display: flex; justify-content: flex-end; margin: 0 0 var(--sp-2);
}

/* ============================================================
   The corner mark: computers only.

   A small download mark in a photograph's top-right corner, on
   the Love Story's opening photograph, its "More photographs"
   tiles and an event gallery's photographs, and NOWHERE ELSE: a
   Love Story card is a link to a story and gets none.

   SHOWN ON HOVER, OR ON KEYBOARD FOCUS of the photograph or the
   mark, and invisible and unpressable otherwise, so the photograph
   is the page at rest and a press in its corner still opens the
   large view. Keyboard focus means :focus-visible, so a photograph
   that has focus back after its large view closes, from a mouse,
   does not light its mark. Where :has() is missing the mark still
   shows on hover and when the mark itself has focus.

   A DARK DISC, OPAQUE --ink-navy, so it reads the same on every
   photograph: a warm-white glyph, and a warm-white ring for the
   photograph that is itself dark. Opaque since design review round 3:
   at 72% the disc took the colour of what was behind it and read
   greyish-purple on the bright red-backdrop tiles. Under the pointer
   it turns --erdf-blue-dark, so the reader sees which mark is
   about to act. 44px (--touch) since the same review, for this
   audience and a laptop trackpad; same 10px inset.

   The tooltip is the theme's type, --font-body, 600, at 14px (the
   theme's own small-button size, erdf.css), on --ink-navy, below
   the mark at its right edge, so it stays inside the photograph's
   frame. Escape puts it away (photo-download.js).
   ============================================================ */
.has-pdi { position: relative; }
.pdi {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: var(--touch); height: var(--touch); margin: 0; padding: 0;   /* Astra: global button padding */
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-badge);
  background: var(--ink-navy);
  border: 1.5px solid rgba(253, 251, 246, 0.7);
  color: var(--warm-white);
  box-shadow: none; cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity 160ms ease-out, background-color 160ms ease-out;
}
.pdi svg { width: 20px; height: 20px; display: block; pointer-events: none; }
/* The glyph's colour, restated one class higher. love-stories.css resets every
   button inside a story's content to `color: inherit` (.erdf-ls button, one
   class and one element), which beat .pdi's one class and painted the glyph
   the page's charcoal at rest: measured rgb(58, 58, 59) on the first round-3
   render, warm-white only under the pointer. */
.has-pdi > .pdi { color: var(--warm-white); }
.has-pdi:hover > .pdi,
.has-pdi:has(:focus-visible) > .pdi,
.pdi:focus-visible { opacity: 1; pointer-events: auto; }
/* Astra fills a hovered or focused button solid #1F4E79 with white text. The
   mark keeps its navy when focused, and takes --erdf-blue-dark only under the
   pointer. */
.pdi:focus { background: var(--ink-navy); border-color: var(--warm-white); color: var(--warm-white); }
.pdi:hover { background: var(--erdf-blue-dark); border-color: var(--warm-white); color: var(--warm-white); }
.pdi:focus-visible { outline: 3px solid var(--rain-yellow); outline-offset: 2px; }
/* A NAVY EDGE BESIDE THE YELLOW FOCUS RING, on a photograph and on its mark
   only (design review round 4, approved 2026-10-02; the site-wide ring is left
   for the pre-launch accessibility pass). Measured before: the ring round a
   focused photograph sat on the cream page at 1.51-1.54:1, and round a mark on
   a bright photograph 76% of it was under 3:1. The navy fills the 2px gap
   between the photograph and the ring, and on the mark it edges the outside of
   the ring too, so the yellow is always next to navy, whatever the photograph.
   The opening panel's ring sits inside its frame, where an outer edge is
   clipped, and is unchanged. */
.erdf-ls-story .lb-open:focus-visible,
.erdf-photos .wp-block-gallery.has-nested-images figure.wp-block-image > .lb-open:focus-visible {
  box-shadow: 0 0 0 2px var(--ink-navy);
}
.has-pdi > .pdi:focus-visible { box-shadow: 0 0 0 2px var(--ink-navy), 0 0 0 7px var(--ink-navy); }
.pdi[data-state="busy"] { cursor: progress; }
/* The opening panel's top-right corner is rounded at 1024 and up (40px from
   1280); the mark sits far enough in that the curve never cuts it. */
.erdf-ls-story .open-photo > .pdi { top: 16px; right: 16px; }

.pdi-tip {
  position: absolute; top: calc(100% + 6px); right: 0;
  padding: 6px 10px;
  border-radius: var(--r-soft);
  background: var(--ink-navy); color: var(--warm-white);
  font-family: var(--font-body); font-weight: 600; font-size: 14px;
  line-height: 1.2; letter-spacing: 0; text-transform: none; white-space: nowrap;
  box-shadow: var(--shadow-card);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 120ms ease-out, visibility 0s linear 120ms;
}
.pdi:hover .pdi-tip,
.pdi:focus-visible .pdi-tip { opacity: 1; visibility: visible; transition: opacity 120ms ease-out; }
.pdi.pdi--hush .pdi-tip { opacity: 0; visibility: hidden; }

/* A device that stops hovering (a tablet's keyboard detached) loses the marks
   again; ls-lightbox.js only builds them where it hovers in the first place. */
@media (hover: none), (pointer: coarse) {
  .pdi { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pdi, .pdi-tip { transition: none; }
}

/* ============================================================
   The dialog
   ============================================================ */
.lb {
  position: fixed; inset: 0; z-index: 200;
  display: flex;
  /* The stage caps. Explicit rather than percentage heights: a percentage
     height needs a definite height on every ancestor, and the one thing this
     dialog must never do is let a tall photograph push the counter off the
     screen. The subtracted figures are this file's own paddings plus the bar. */
  --lb-mw: calc(100vw - 32px);
  --lb-mh: calc(100vh - 132px);
  --lb-mh: calc(100dvh - 132px);
}
.lb[hidden] { display: none; }

.lb-scrim {
  position: absolute; inset: 0; z-index: 0;
  /* The donation popup's scrim geometry, deepened. That one sits under a white
     card and only has to separate it from the page; this one sits under a
     photograph and has to be the room the photograph is in. */
  background: radial-gradient(72% 62% at 50% 45%, rgba(34, 49, 74, 0.94) 0%, rgba(24, 35, 55, 0.98) 100%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.lb-frame {
  position: relative; z-index: 1;
  width: 100%; height: 100%;
  box-sizing: border-box;
  padding: 56px 16px 16px;      /* top clears the close control */
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
}

/* The ground inside the frame is still a way out: a press anywhere that is not
   the picture, the bar or the close control closes the dialog. */
.lb-media {
  display: flex; align-items: center; justify-content: center;
  max-width: 100%;
  /* THE ARROWS STAY PUT (Adam, 2026-10-05). The stage takes every pixel the
     bar does not, so the bar sits at the bottom of the screen whatever the
     photograph's shape. Centred together, a short photograph pulled the arrows
     up and a tall one pushed them down, and a fast second press on Next landed
     on the ground and closed the dialog. The photograph centres inside the
     stage instead; its caps (--lb-mw, --lb-mh) are unchanged. */
  flex: 1 1 auto; min-height: 0; width: 100%;
}

.lb-img {
  display: block; width: auto; height: auto;
  max-width: var(--lb-mw); max-height: var(--lb-mh);
  object-fit: contain;                       /* contained, never cropped */
  border-radius: var(--r-card);
  box-shadow: var(--shadow-lift);
  /* The same warm grade the page gives the photograph, so pressing it changes
     its size and nothing else. */
  filter: var(--warm-photo);
}
/* ...and for the same reason none on a post with a core gallery, whose
   photographs the page shows ungraded. */
.lb--plain .lb-img { filter: none; }

/* ---- the bar: where you are, and the way through ---------- */
.lb-bar {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-3);
  flex: 0 0 auto;
}
.lb-bar[hidden] { display: none; }

.lb-nav, .lb-x {
  display: flex; align-items: center; justify-content: center;
  padding: 0;                    /* Astra: global button padding is 15px 30px */
  border-radius: var(--r-badge);
  background: rgba(253, 251, 246, 0.10);
  border: 1.5px solid rgba(253, 251, 246, 0.55);
  color: var(--warm-white);
  cursor: pointer;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}
.lb-nav { width: 48px; height: 48px; }
.lb-nav svg { width: 22px; height: 22px; display: block; pointer-events: none; }
/* FOCUS LOOKS LIKE REST (2026-10-02). Astra fills any focused button solid
   #1F4E79 (its inline `button:focus`, one element and one pseudo-class, which
   out-ranks these one-class rules), and the dialog puts focus on Close the
   moment it opens, so Close opened as the loudest thing in the room, beside a
   translucent Download and translucent arrows. Measured on staging before
   this change: rgb(31, 78, 121). The keyboard still sees focus: the yellow
   :focus-visible ring below is untouched. Before the hover rule, so hover
   still shows on a focused control. */
.lb-nav:focus, .lb-x:focus {
  background: rgba(253, 251, 246, 0.10); border-color: rgba(253, 251, 246, 0.55); color: var(--warm-white);
}
.lb-nav:hover, .lb-x:hover { background: rgba(253, 251, 246, 0.22); border-color: var(--warm-white); }
.lb-nav:focus-visible, .lb-x:focus-visible { outline: 3px solid var(--rain-yellow); outline-offset: 2px; }
.lb-nav[disabled] { opacity: 0.28; cursor: default; }
.lb-nav[disabled]:hover { background: rgba(253, 251, 246, 0.10); border-color: rgba(253, 251, 246, 0.55); }

.lb-x {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  width: 44px; height: 44px;
}
.lb-x svg { width: 18px; height: 18px; display: block; pointer-events: none; }

/* The enlarged view's Download, ALWAYS LABELLED. The dialog's own control
   idiom, exactly .lb-x and .lb-nav: the same translucent warm-white ground,
   the same 1.5px border, the same hover. A pill rather than a disc because it
   carries a word, and on this button the word is the point. Top left,
   mirroring the close control, in the band the frame's top padding already
   keeps clear. Its hover and focus are restated because Astra fills a focused
   button solid #1F4E79 (see the Download section above). */
.lb-dl {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--touch); margin: 0; padding: 0 18px;   /* Astra: global button padding */
  border-radius: var(--r-pill);
  background: rgba(253, 251, 246, 0.10);
  border: 1.5px solid rgba(253, 251, 246, 0.55);
  box-shadow: none;
  color: var(--warm-white);
  font-family: var(--font-body); font-weight: 600; font-size: var(--fs-sm); line-height: 1.1;
  white-space: nowrap; cursor: pointer;
  transition: background-color 160ms ease-out, border-color 160ms ease-out;
}
.lb-dl[hidden] { display: none; }
.lb-dl svg { width: 18px; height: 18px; flex: 0 0 auto; display: block; }
.lb-dl:hover,
.lb-dl:focus { color: var(--warm-white); background: rgba(253, 251, 246, 0.10); border-color: rgba(253, 251, 246, 0.55); }
.lb-dl:hover,
.lb-dl:active { background: rgba(253, 251, 246, 0.22); border-color: var(--warm-white); }
.lb-dl:focus-visible { outline: 3px solid var(--rain-yellow); outline-offset: 2px; }
.lb-dl[data-state="busy"] { cursor: progress; }
/* Ready, the second press on a phone: the theme's filled primary, as on the
   page (see the Download section), on the dialog's navy. */
.lb-dl[data-state="ready"],
.lb-dl[data-state="ready"]:focus { background: var(--erdf-blue); border-color: var(--erdf-blue); color: #fff; }
.lb-dl[data-state="ready"]:hover,
.lb-dl[data-state="ready"]:active { background: var(--erdf-blue-dark); border-color: var(--erdf-blue-dark); color: #fff; }

/* ON A PHONE, DOWNLOAD SITS UNDER THE ARROWS, centred, where the thumb
   already is (design review 2026-10-02: top left it sat about 300px above a
   centred photograph). Moved by `order` in the frame's column, so the DOM, and
   with it the Tab order, stays the desktop one: Close, Download, the arrows.
   The stage gives up the row it takes (44px and the 12px gap), which is why
   --lb-mh grows by 56px; only when the button exists (lb--dl, set by the
   script that builds it), so a page without photo-download.js keeps every
   pixel of its photograph.
   On the film the button is hidden but KEEPS ITS ROW, so the arrows and the
   counter do not jump up under the reader's finger as the slide changes,
   which is the rule this dialog already keeps for the player. visibility, not
   display: a hidden button is not focusable and not pressable either way. */
@media (max-width: 767px) {
  .lb.lb--dl {
    --lb-mh: calc(100vh - 188px);
    --lb-mh: calc(100dvh - 188px);
  }
  .lb-dl { position: static; order: 3; align-self: center; flex: 0 0 auto; }
  .lb-dl[hidden] { display: inline-flex; visibility: hidden; }
}

/* The counter is set in the gallery heading's idiom (.gal-h): body face, 700,
   xs, uppercase, 0.14em. --plate-legal is the tone this design already uses for
   the quiet line on a navy ground (design-system 2.7). */
.lb-count {
  margin: 0; min-width: 8ch; text-align: center;
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-xs);
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--plate-legal);
}

/* ============================================================
   The video slide.

   The opening panel's facade, rebuilt at dialog size: the
   story's own poster frame, a real link to YouTube over it, and
   the player only after somebody presses. Nothing is requested
   from Google before that, here for the same reason it is not
   on the panel.
   ============================================================ */
.lb-vid { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.lb-vid-poster {
  display: block; width: auto; height: auto;
  max-width: var(--lb-mw); max-height: var(--lb-mh);
  object-fit: contain;
  border-radius: var(--r-card);
  filter: var(--warm-photo);
}
/* The panel's own two-layer scrim (love-stories.css .open-vid-scrim), lightened
   by roughly a third. The panel's figures were measured against a bright page,
   where the frame sits on warm white and the white disc has nothing but the
   photograph to lift off. Here the photograph is already surrounded by the
   dialog's navy, so the same contrast is bought for less: at the panel's own
   values the picture read as fogged rather than vignetted. The SHAPE is
   unchanged, an inner pool under the disc and the words and a gentle vignette
   on the edges, because that shape is what stops a bright photograph from
   swallowing the control. */
.lb-vid-scrim {
  position: absolute; inset: 0; pointer-events: none; border-radius: var(--r-card);
  background:
    radial-gradient(34% 30% at 50% 50%,
      rgba(34, 49, 74, 0.56) 0%, rgba(34, 49, 74, 0.30) 62%, rgba(34, 49, 74, 0) 100%),
    radial-gradient(64% 64% at 50% 46%,
      rgba(34, 49, 74, 0.08) 0%, rgba(34, 49, 74, 0.20) 58%, rgba(34, 49, 74, 0.42) 100%);
}
/* No photograph on the story: the plates' own navy and hatch, in the square the
   panel would have used. */
.lb-vid-plate {
  width: min(var(--lb-mw), var(--lb-mh)); aspect-ratio: 1 / 1;
  border-radius: var(--r-card);
  background-color: var(--erdf-blue-dark);
  background-image: repeating-linear-gradient(72deg,
      rgba(253, 251, 246, 0.085) 0 2px, rgba(253, 251, 246, 0) 2px 13px);
}
.lb-vid-play {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-2); text-decoration: none; color: var(--warm-white); cursor: pointer;
}
.lb-vid-disc {
  width: 72px; height: 72px; border-radius: var(--r-badge);
  background: rgba(34, 49, 74, 0.5); border: 2px solid var(--warm-white);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
  transition: background-color 180ms ease-out, transform 180ms ease-out;
}
.lb-vid-disc svg { width: 32px; height: 32px; margin-left: 4px; }
.lb-vid-play:hover .lb-vid-disc { background: rgba(34, 49, 74, 0.82); }
.lb-vid-play:focus-visible { outline: 3px solid var(--rain-yellow); outline-offset: -6px; }
@media (prefers-reduced-motion: no-preference) {
  .lb-vid-play:hover .lb-vid-disc { transform: scale(1.05); }
}
/* "In their own words" is the client's own wording, carried from the opening
   panel unchanged. */
.lb-vid-label {
  font-family: var(--font-body); font-weight: 700;
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--warm-white); text-shadow: 0 1px 10px rgba(34, 49, 74, 0.78); text-align: center;
}
/* Once the player is in, the film letterboxes INSIDE the frame the poster set,
   which is love-stories.css's own .open-vid iframe rule and the same reasoning:
   the slide keeps the size it had, so the counter and the arrows do not move
   when somebody presses play. The hidden poster is what holds the box open;
   see the note in ls-lightbox.js. Nothing shows in the letterbox because the
   ground behind it is the dialog's own navy. */
.lb-vid iframe {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  display: block; border: 0;
  width: 100%; height: auto; max-height: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-card);
  background: var(--ink-navy);
}

/* ============================================================
   Scroll lock and motion
   ============================================================ */
/* Same mechanism as the donation widget's .dp-locked: a class on <body>, which
   already carries .erdf-ls on this surface, and .erdf-photos on a post with a
   core gallery (inc/photo-download.php). */
.erdf-ls.lb-locked,
.erdf-photos.lb-locked { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .lb { animation: lb-in 160ms ease-out; }
  @keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
  /* The slide change. A short rise and fade, the reveal's own easing and a
     shorter duration, because this one answers a press and must not feel like
     waiting. Under reduced motion the rule does not exist and the picture is
     simply there. */
  .lb-media { opacity: 0; transform: translateY(6px); transition: opacity 200ms ease-out, transform 200ms ease-out; }
  .lb-media.is-in { opacity: 1; transform: none; }
}

/* ============================================================
   Desktop
   ============================================================ */
@media (min-width: 768px) {
  .lb {
    --lb-mw: calc(100vw - 128px);
    --lb-mh: calc(100vh - 168px);
    --lb-mh: calc(100dvh - 168px);
  }
  .lb-frame { padding: 64px 64px 24px; gap: var(--sp-2); }
  .lb-x { top: 24px; right: 24px; }
  .lb-dl { top: 24px; left: 24px; }
  .lb-bar { gap: var(--sp-4); }
}
