/* ============================================================================
   ⚠ CANONICAL SOURCE. A byte-identical COPY lives at
   frontend/src/screens/builder/flyer-styles.css (the builder preview imports it
   so the live preview is a faithful TWIN). When you edit this file, re-copy it
   to the frontend; flyers.test.tsx + tests/test_public_flyer_styles.py guard the
   parity.
   ============================================================================
   Flyer callout styles — the CANONICAL, parent-facing server render.
   Single source of truth shared by the public page (linked in base_public.html)
   and the builder live preview (parity guardrail, Phase 6d Task 5).

   AA-HARDENED port of mockups/.../flyers.css. Every text/background pair below
   was verified ≥4.5:1 (normal text) / ≥3:1 (large text & UI). The mockup's coral
   and gold were lightened-for-mood and did NOT all meet AA, so the colors here
   are darkened to pass: coral #B23A0E (white text ≈5.2:1), eyebrow coral #9A3412
   (≈5.9:1 on near-white), ribbon purple #6D28D9 (white text ≈5.9:1), pinboard
   button ink #1f2937, ticket-stub navy #1E2A57, ticket-body blue #1031A3.

   Photo styles (poster / split / pinboard) place text ONLY on a forced dark
   gradient scrim (or a solid dark/light panel away from the image), so contrast
   is guaranteed over ANY uploaded image, not just the dark sample.
   ========================================================================== */

:root {
  --fl-ink: #1a1a1a;          /* body text on light surfaces (>=12:1 on white) */
  --fl-ink-soft: #44464d;     /* secondary text on light (≈8.6:1 on white)     */
  --fl-coral: #B23A0E;        /* solid coral — white text ≈5.2:1               */
  --fl-coral-deep: #8A2C0A;
  --fl-coral-soft: #fdf1ec;   /* tint background                               */
  --fl-coral-text: #9A3412;   /* coral as TEXT on near-white ≈5.9:1            */
  --fl-brand: #1031A3;        /* EUSD blue — white text ≈9:1                   */
  --fl-brand-deep: #0B2370;
  --fl-navy: #1E2A57;
  --fl-line: #d9dde6;
  --fl-leaf-text: #1f5d3f;    /* green as TEXT on near-white ≈5.7:1            */
  --fl-purple: #6D28D9;       /* white text ≈5.9:1                             */
  --fl-purple-deep: #86198F;
}

/* shared bits --------------------------------------------------------------- */
.fl-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  padding: 11px 22px; border-radius: 999px; border: none; cursor: pointer;
  line-height: 1.2; min-height: 44px; box-sizing: border-box;
}
.fl-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fl-eyebrow {
  font-size: 11.5px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; margin: 0 0 7px;
}
.fl-meta-row { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 14px; }
.fl-meta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--fl-ink-soft);
}
.fl-meta svg, .fl-btn svg { flex-shrink: 0; }
/* photo wrappers (the real <img> fills the slot, object-fit cover) */
.fl-photo-img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 1 — CLASSIC --------------------------------------------------------------- */
.fl-classic {
  border-radius: 18px; padding: 24px 26px;
  background: linear-gradient(150deg, var(--fl-coral-soft) 0%, #fff 70%);
  border: 1.5px solid #f0d6cb;
  display: flex; gap: 20px; align-items: center;
  box-shadow: 0 2px 8px rgba(20,30,60,.08);
}
.fl-classic .fl-date {
  flex-shrink: 0; width: 84px; text-align: center; color: #fff;
  background: linear-gradient(160deg, var(--fl-coral), var(--fl-coral-deep));
  border-radius: 14px; padding: 12px 8px;
}
.fl-classic .fl-date .mon { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.fl-classic .fl-date .day { font-size: 36px; font-weight: 700; line-height: .95; }
.fl-classic .fl-date .yr { font-size: 11px; font-weight: 600; }
.fl-classic .fl-title { margin: 0 0 4px; font-size: 22px; color: var(--fl-ink); }
.fl-classic .fl-eyebrow { color: var(--fl-coral-text); }
.fl-classic .fl-btn { background: var(--fl-coral); color: #fff; }

/* 2 — TICKET STUB ----------------------------------------------------------- */
.fl-ticket {
  display: flex; border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 24px rgba(20,30,60,.14); position: relative;
}
.fl-ticket .fl-tk-body {
  flex: 1; padding: 24px 26px;
  background: linear-gradient(135deg, var(--fl-brand) 0%, var(--fl-brand-deep) 100%);
  color: #fff; position: relative;
}
.fl-ticket .fl-tk-body .fl-eyebrow { color: #dce6ff; }
.fl-ticket .fl-tk-body .fl-title { margin: 0 0 12px; font-size: 25px; line-height: 1.05; }
.fl-ticket .fl-tk-body .fl-meta { color: #e6edff; }
.fl-ticket .fl-tk-body .fl-btn { background: #fff; color: var(--fl-brand-deep); }
.fl-ticket .fl-tk-stub {
  flex-shrink: 0; width: 130px; background: var(--fl-navy);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 18px 10px; text-align: center; position: relative;
}
.fl-ticket .fl-tk-stub .lbl { font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #c6cee6; }
.fl-ticket .fl-tk-stub .day { font-size: 40px; font-weight: 700; line-height: .9; }
.fl-ticket .fl-tk-stub .mon { font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.fl-ticket .fl-tk-stub .adm {
  margin-top: 10px; font-size: 9.5px; font-weight: 800; letter-spacing: .12em;
  border: 1.5px dashed #8f9bc4; border-radius: 6px; padding: 4px 7px;
}
.fl-ticket .fl-tk-perf {
  position: absolute; top: 0; bottom: 0; right: 130px; width: 0;
  border-left: 2.5px dashed rgba(255,255,255,.55);
}
.fl-ticket .fl-tk-stub::before,
.fl-ticket .fl-tk-stub::after {
  content: ""; position: absolute; left: -9px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff;
}
.fl-ticket .fl-tk-stub::before { top: -9px; }
.fl-ticket .fl-tk-stub::after { bottom: -9px; }

/* 3 — CALENDAR TEAR-OFF ----------------------------------------------------- */
.fl-cal {
  display: flex; gap: 22px; align-items: center;
  border: 1.5px solid var(--fl-line); border-radius: 18px; padding: 24px;
  background: #fff; box-shadow: 0 2px 8px rgba(20,30,60,.08);
}
.fl-cal .fl-page {
  flex-shrink: 0; width: 128px; border-radius: 12px; overflow: hidden;
  background: #fff; box-shadow: 0 8px 20px rgba(20,30,60,.16);
  position: relative; border: 1px solid #e6e9f0;
}
.fl-cal .fl-page .top {
  background: linear-gradient(var(--fl-coral), var(--fl-coral-deep));
  color: #fff; text-align: center; padding: 9px 0 8px; position: relative;
  font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}
.fl-cal .fl-page .top::before,
.fl-cal .fl-page .top::after {
  content: ""; position: absolute; top: -5px; width: 7px; height: 13px;
  border-radius: 3px; background: #9aa2b8;
}
.fl-cal .fl-page .top::before { left: 28px; }
.fl-cal .fl-page .top::after { right: 28px; }
.fl-cal .fl-page .num {
  font-size: 56px; font-weight: 700; text-align: center; color: var(--fl-ink);
  padding: 12px 0 6px; line-height: 1;
}
.fl-cal .fl-page .dow {
  text-align: center; font-size: 12px; font-weight: 700; color: var(--fl-ink-soft);
  text-transform: uppercase; letter-spacing: .1em; padding-bottom: 12px;
}
.fl-cal .fl-title { margin: 0 0 4px; font-size: 23px; color: var(--fl-ink); }
.fl-cal .fl-eyebrow { color: var(--fl-coral-text); }
.fl-cal .fl-meta-row { flex-direction: column; gap: 7px; }
.fl-cal .fl-btn { background: var(--fl-brand); color: #fff; }

/* 4 — POSTER HERO ----------------------------------------------------------- */
.fl-poster {
  position: relative; border-radius: 20px; overflow: hidden;
  min-height: 320px; display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: 0 12px 30px rgba(20,30,60,.18); color: #fff;
  background: var(--fl-navy);   /* neutral dark base when no photo */
}
.fl-poster .fl-photo-img { position: absolute; inset: 0; }
/* forced legibility scrim — dark enough at the bottom band (where text sits) to
   guarantee >=4.5:1 for white text over ANY image. */
.fl-poster .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(15,20,40,.10) 0%, rgba(15,20,40,.55) 55%, rgba(15,20,40,.86) 100%);
}
.fl-poster .fl-poster-in { position: relative; z-index: 1; padding: 28px 30px; }
.fl-poster .fl-datepill {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  background: #ffffff; color: var(--fl-ink);
  font-weight: 800; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 999px; margin-bottom: 14px;
}
.fl-poster .fl-datepill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fl-coral); }
.fl-poster .fl-title {
  margin: 0 0 10px; font-weight: 700; font-size: 34px; line-height: 1.02;
  letter-spacing: -0.02em; max-width: 14ch;
  text-shadow: 0 2px 12px rgba(0,0,0,.5);
}
.fl-poster .fl-meta-row .fl-meta { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.fl-poster .fl-btn { background: var(--fl-coral); color: #fff; align-self: flex-start; }

/* 5 — POLAROID PINBOARD ----------------------------------------------------- */
.fl-pin {
  border-radius: 18px; padding: 30px 26px;
  background: linear-gradient(135deg, #ece2cf, #e6dcc4);
  border: 1.5px solid #d8cdb4;
  display: flex; gap: 24px; align-items: center; justify-content: center;
  flex-wrap: wrap;
}
.fl-pin .fl-polaroid {
  background: #fff; padding: 11px 11px 16px; border-radius: 3px;
  box-shadow: 0 12px 26px rgba(60,45,20,.28);
  transform: rotate(-4deg); flex-shrink: 0; position: relative;
}
.fl-pin .fl-polaroid .fl-pin-photo { width: 150px; height: 150px; border-radius: 2px; overflow: hidden; }
.fl-pin .fl-polaroid .cap {
  text-align: center; margin-top: 10px; font-size: 15px; color: var(--fl-ink-soft);
}
.fl-pin .fl-polaroid::before {
  content: ""; position: absolute; top: -11px; left: 50%; transform: translateX(-50%) rotate(3deg);
  width: 70px; height: 22px; background: rgba(140,180,200,.55);
  border: 1px solid rgba(120,160,180,.4);
}
.fl-pin .fl-note {
  background: linear-gradient(170deg, #fbf3cf, #f6ebb4);
  padding: 20px 22px; border-radius: 3px; transform: rotate(2deg);
  box-shadow: 0 10px 22px rgba(60,45,20,.2); max-width: 240px; position: relative;
}
.fl-pin .fl-note::before {
  content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--fl-coral), var(--fl-coral-deep));
  box-shadow: 0 2px 3px rgba(0,0,0,.3);
}
.fl-pin .fl-note .fl-eyebrow { color: #7a4a14; margin: 8px 0 6px; }
.fl-pin .fl-note .fl-title { margin: 0 0 8px; font-size: 21px; color: var(--fl-ink); }
.fl-pin .fl-note .fl-meta { display: block; margin-bottom: 4px; font-size: 13.5px; color: var(--fl-ink-soft); }
.fl-pin .fl-note .fl-btn { margin-top: 10px; background: #1f2937; color: #fff; font-size: 13.5px; padding: 9px 18px; }

/* 6 — SPOTLIGHT SPLIT ------------------------------------------------------- */
.fl-split {
  display: flex; border-radius: 18px; overflow: hidden;
  border: 1.5px solid var(--fl-line); background: #fff; box-shadow: 0 2px 8px rgba(20,30,60,.08);
}
.fl-split .fl-split-photo {
  width: 200px; flex-shrink: 0; align-self: stretch; min-height: 180px;
  position: relative; background: #2c3550;   /* dark base behind the photo */
}
.fl-split .fl-split-body { padding: 24px 26px; flex: 1; }
.fl-split .fl-title { margin: 0 0 4px; font-size: 24px; color: var(--fl-ink); }
.fl-split .fl-eyebrow { color: var(--fl-leaf-text); }
.fl-split .fl-when { font-size: 15px; font-weight: 700; color: var(--fl-brand-deep); margin-bottom: 6px; }
.fl-split p { margin: 0 0 16px; font-size: 14.5px; color: var(--fl-ink-soft); line-height: 1.5; }
.fl-split .fl-btn { background: var(--fl-brand); color: #fff; }

/* 7 — SAVE-THE-DATE RIBBON -------------------------------------------------- */
.fl-ribbon {
  display: flex; align-items: center; gap: 20px;
  border-radius: 16px; padding: 18px 24px; color: #fff;
  background: linear-gradient(120deg, var(--fl-purple), var(--fl-purple-deep));
  box-shadow: 0 12px 30px rgba(20,30,60,.18); position: relative; overflow: hidden;
  flex-wrap: wrap;
}
.fl-ribbon .fl-rb-date {
  position: relative; z-index: 1; flex-shrink: 0; text-align: center;
  border-right: 1.5px solid rgba(255,255,255,.35); padding-right: 20px;
}
.fl-ribbon .fl-rb-date .dow { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.fl-ribbon .fl-rb-date .big { font-size: 30px; font-weight: 700; line-height: 1; white-space: nowrap; }
.fl-ribbon .fl-rb-body { position: relative; z-index: 1; flex: 1; }
.fl-ribbon .fl-rb-body .fl-eyebrow { color: #f0e9ff; margin-bottom: 5px; }
.fl-ribbon .fl-rb-body .fl-title { margin: 0; font-size: 21px; }
.fl-ribbon .fl-btn { position: relative; z-index: 1; background: #fff; color: var(--fl-purple); flex-shrink: 0; }

/* upload-mode defensive fallback (unknown style — shape validation prevents this) */
.fl-upload {
  border: 1.5px solid var(--fl-line); border-radius: 18px; padding: 22px 24px;
  background: #f6f9ff;
}
.fl-upload .fl-title { margin: 0 0 6px; font-size: 22px; color: var(--fl-ink); }

/* 8 — UPLOAD AUTO-LAYOUT (two column) -------------------------------------- */
.fl-upload2 {
  border-radius: 18px; overflow: hidden; padding: 22px 26px;
  border: 1.5px solid var(--fl-line); background: #fff; box-shadow: 0 2px 8px rgba(20,30,60,.08);
}
/* Image-on-right (and legacy image-on-left): the flyer image FLOATS to the top
   right and the body text wraps around it, flowing full width once it clears the
   image. overflow:hidden on .fl-upload2 establishes the BFC that contains the float. */
.fl-upload2.side-right .fl-upload2-photo,
.fl-upload2.side-left .fl-upload2-photo {
  float: right; width: var(--figw, 42%); max-width: 260px; margin: 4px 0 14px 22px; background: #fff;
}
/* Author-set size (.figw + --figw, emitted only when image_width != 42;
   % legacy or px): the fixed 260px cap yields to the chosen size. The
   calc guard keeps a px width from overflowing a narrow column (22px =
   the wrap margin). Width stays on the base rule so the later
   mobile/stacking rules (same specificity on width) still win.
   DELIBERATELY .figw only, never .figwm here: a phone-only size override
   (2026-08-03) must never change the desktop render. */
.fl-upload2.side-right .fl-upload2-photo.figw,
.fl-upload2.side-left .fl-upload2-photo.figw { max-width: calc(100% - 22px); }
.fl-upload2.side-right .fl-photo-img,
.fl-upload2.side-left .fl-photo-img {
  width: 100%; height: auto; display: block; object-fit: contain;
  border: 1px solid var(--fl-line); border-radius: 8px;
}
/* Image-on-top: the flyer is the star — WHOLE flyer centered on the white stage, scaled
   to a sensible height, with a divider below it before the text. */
.fl-upload2.side-top .fl-upload2-photo,
.fl-upload2.side-tuck .fl-upload2-photo {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
  width: 100%; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--fl-line);
}
.fl-upload2.side-top .fl-up-fig,
.fl-upload2.side-tuck .fl-up-fig { max-width: 100%; }
.fl-upload2.side-top .fl-photo-img,
.fl-upload2.side-tuck .fl-photo-img {
  width: auto; height: auto; max-width: 100%; max-height: 420px;
  object-fit: contain; border-radius: 8px;
}
.fl-upload2 .fl-upload2-photo .fl-photo-img { cursor: zoom-in; }
.fl-upload2 .fl-upload2-body { color: var(--fl-ink); }
/* Callout titles and body headings are styled by CLASS, never by tag
   (2026-08-05 heading-depth work): the heading LEVEL now follows the
   document — a flyer inside a section with no heading renders its title
   an <h2> instead of an <h3> — while the size must not move. .fl-title is
   the callout title at any level; .md-t1/.md-t2/.md-t3 are the tiers
   markdown_lite emits for the body's own headings, again at any level. */
.fl-upload2 .fl-upload2-body .fl-title { margin: 0 0 8px; font-size: 22px; color: var(--fl-ink); }
.fl-upload2 .fl-upload2-body .md-t1 { margin: 14px 0 4px; font-size: 16px; color: var(--fl-ink); }
.fl-upload2 .fl-upload2-body .md-t2,
.fl-upload2 .fl-upload2-body .md-t3 { margin: 12px 0 4px; font-size: 14.5px; color: var(--fl-ink); }
.fl-upload2 .fl-upload2-body p { margin: 0 0 10px; font-size: 14.5px; color: var(--fl-ink-soft); line-height: 1.55; }
.fl-upload2 .fl-upload2-body ul { margin: 0 0 10px; padding-left: 20px; color: var(--fl-ink-soft); }
/* Body links match .nl-text a's chain (school accent, save-gated AA on the
   white stage) so every content link on the page is ONE color -- the old
   coral read as a third link color beside accent inline links. */
/* :not(.nl-btn) (2026-08-10 flyer link buttons): a body link shown as a
   button keeps .nl-btn's white-on-primary paint -- this rule outranks
   .nl-btn on specificity, so without the exclusion it would repaint the
   button's text accent-on-primary (an AA failure). */
.fl-upload2 .fl-upload2-body a:not(.nl-btn) { color: var(--accent, var(--brand-deep)); font-weight: 600; }
/* Two adjacent button links (2026-08-10 review): blocks join with "" so two
   own-line .nl-btn buttons in a row rendered glued edge-to-edge with no gap.
   Right/bottom margin only -- .nl-btn is inline-flex, so this also wraps a
   run of buttons onto multiple lines with breathing room between rows. */
.fl-upload2 .fl-upload2-body a.nl-btn { margin: 0 8px 10px 0; }

/* "Tuck" layout: the extracted flyer text sits behind a native <details>
   disclosure below the full-width image stage. The default marker triangle
   stays (it IS the expand affordance); default focus outline stays. */
.fl-upload2 .fl-tuck > summary {
  cursor: pointer; padding: 6px 0; font-size: 15px; font-weight: 600;
  color: var(--fl-ink); user-select: none;
}
.fl-upload2 .fl-tuck > summary:hover { text-decoration: underline; }
.fl-upload2 .fl-tuck[open] > summary { margin-bottom: 6px; }

/* figures inside the upload photo column (primary + optional Spanish secondary) */
.fl-upload2 .fl-up-fig { margin: 0; position: relative; }
.fl-upload2.side-top .fl-up-fig + .fl-up-fig,
.fl-upload2.side-tuck .fl-up-fig + .fl-up-fig,
.fl-upload2.side-right .fl-up-fig + .fl-up-fig,
.fl-upload2.side-left .fl-up-fig + .fl-up-fig { margin-top: 8px; }
.fl-upload2 .fl-up-fig figcaption {
  position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 6px;
  background: rgba(15,20,40,.86); color: #fff; font-size: 12px;
}
/* Mobile (preview device class): the flyer NEVER floats — it always stacks on top
   with the text below, matching the @media(max-width:600px) public-page reflow. */
.nl.mobile .fl-upload2.side-right .fl-upload2-photo,
.nl.mobile .fl-upload2.side-left .fl-upload2-photo {
  float: none; width: 100%; max-width: none; margin: 0 0 14px;
  padding-bottom: 14px; text-align: center; border-bottom: 1px solid var(--fl-line);
}
.nl.mobile .fl-upload2.side-right .fl-up-fig,
.nl.mobile .fl-upload2.side-left .fl-up-fig { display: inline-block; }
/* Author-set size (.figw, desktop width) and/or a phone-only override
   (.figwm, --figw-m): either one restores the wrap layout on mobile (Mark
   2026-07-30 + 2026-08-03) instead of the full-width stack — width prefers
   --figw-m when the override is present, falling back to --figw. Untouched
   flyers (neither class) keep the stack above. .figwm never appears in the
   desktop max-width rule above: a phone-only override must never resize a
   default-size flyer on desktop. */
.nl.mobile .fl-upload2.side-right .fl-upload2-photo.figw,
.nl.mobile .fl-upload2.side-left .fl-upload2-photo.figw,
.nl.mobile .fl-upload2.side-right .fl-upload2-photo.figwm,
.nl.mobile .fl-upload2.side-left .fl-upload2-photo.figwm {
  float: right; width: var(--figw-m, var(--figw)); max-width: calc(100% - 22px);
  margin: 4px 0 14px 22px;
  padding-bottom: 0; text-align: left; border-bottom: none;
}
.nl.mobile .fl-upload2.side-right .fl-upload2-photo.figw .fl-up-fig,
.nl.mobile .fl-upload2.side-left .fl-upload2-photo.figw .fl-up-fig,
.nl.mobile .fl-upload2.side-right .fl-upload2-photo.figwm .fl-up-fig,
.nl.mobile .fl-upload2.side-left .fl-upload2-photo.figwm .fl-up-fig { display: block; }

/* responsive reflow (<=600px) — every style stacks, no clipping ------------- */
@media (max-width: 600px) {
  .fl-classic { flex-direction: column; align-items: stretch; text-align: center; gap: 14px; }
  .fl-classic .fl-date { width: auto; align-self: center; padding: 10px 18px; }
  .fl-classic .fl-meta-row { justify-content: center; }
  .fl-cal { flex-direction: column; align-items: stretch; text-align: center; gap: 16px; }
  .fl-cal .fl-page { align-self: center; }
  .fl-cal .fl-meta-row { align-items: center; }
  .fl-split { flex-direction: column; }
  .fl-split .fl-split-photo { width: 100%; height: 170px; min-height: 0; }
  .fl-ticket { flex-direction: column; }
  .fl-ticket .fl-tk-stub { width: 100%; flex-direction: row; gap: 10px; padding: 12px; }
  .fl-ticket .fl-tk-stub::before { display: none; }
  .fl-ticket .fl-tk-stub::after { left: 50%; top: -9px; bottom: auto; transform: translateX(-50%); }
  .fl-ticket .fl-tk-stub .adm { margin-top: 0; }
  .fl-ticket .fl-tk-perf { display: none; }
  .fl-pin { flex-direction: column; gap: 18px; }
  .fl-ribbon { flex-wrap: wrap; gap: 12px; }
  .fl-ribbon .fl-rb-date { border-right: none; border-bottom: 1.5px solid rgba(255,255,255,.35); padding-right: 0; padding-bottom: 10px; width: 100%; }
  .fl-ribbon .fl-btn { width: 100%; justify-content: center; }
  .fl-upload2 { padding: 18px 18px; }
  .fl-upload2.side-right .fl-upload2-photo,
  .fl-upload2.side-left .fl-upload2-photo {
    float: none; width: 100%; max-width: none; margin: 0 0 14px;
    padding-bottom: 14px; text-align: center; border-bottom: 1px solid var(--fl-line);
  }
  .fl-upload2.side-right .fl-up-fig,
  .fl-upload2.side-left .fl-up-fig { display: inline-block; }
  /* Author-set size (.figw) and/or a phone-only override (.figwm): keep the
     wrap at the chosen width on phones (Mark 2026-07-30 + 2026-08-03);
     untouched flyers (neither class) keep the full-width stack above. */
  .fl-upload2.side-right .fl-upload2-photo.figw,
  .fl-upload2.side-left .fl-upload2-photo.figw,
  .fl-upload2.side-right .fl-upload2-photo.figwm,
  .fl-upload2.side-left .fl-upload2-photo.figwm {
    float: right; width: var(--figw-m, var(--figw)); max-width: calc(100% - 22px);
    margin: 4px 0 14px 22px;
    padding-bottom: 0; text-align: left; border-bottom: none;
  }
  .fl-upload2.side-right .fl-upload2-photo.figw .fl-up-fig,
  .fl-upload2.side-left .fl-upload2-photo.figw .fl-up-fig,
  .fl-upload2.side-right .fl-upload2-photo.figwm .fl-up-fig,
  .fl-upload2.side-left .fl-upload2-photo.figwm .fl-up-fig { display: block; }
}
@media (max-width: 320px) {
  .fl-classic, .fl-cal, .fl-pin, .fl-split .fl-split-body, .fl-ticket .fl-tk-body { padding-left: 16px; padding-right: 16px; }
  .fl-poster .fl-poster-in { padding: 20px; }
  .fl-poster .fl-title { font-size: 28px; }
}

/* decorative transforms/animations are purely cosmetic; honor reduced-motion. */
@media (prefers-reduced-motion: reduce) {
  .fl-pin .fl-polaroid, .fl-pin .fl-note { transform: none; }
}
