/* Poseidon — black-and-white editorial UI (D-021, P-148). The device picks light or dark (prefers-color-scheme);
   the photos are the only colour, plus a few status signals. No web fonts: system faces load instantly on cellular.
   Every colour lives in the two token blocks below; tests/test_theme.py fails on a colour token with no light
   value, on a token other than a status signal that is not a neutral grey, and on any literal colour outside them
   (hex, rgb, hsl, oklch, color-mix, a named colour...) that is not one of the deliberate few: photo overlays (time
   chip, selection, focus ring, viewer arrows, face count), the white QR card, Venmo's blue, the dialog backdrop,
   the live dot's pulse. */
:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --bg-2: #111113;
  --surface: #18181b;
  --surface-2: #202024;
  --line: #2a2a2e;
  --line-2: #3b3b40;
  --text: #f5f5f5;
  --muted: #a3a3a8;
  --faint: #8e8e94;   /* fine print: 6.04:1 on --bg, 5.44:1 on --surface (WCAG AA 4.5:1, PRD NFR-09); --muted stays above it */
  /* "accent" is the inverse of the page: a white button on black, a black button on white. */
  --accent: #f5f5f5;
  --accent-ink: #0b0b0d;
  --accent-hover: #d9d9dc;
  --accent-soft: rgba(245, 245, 245, 0.12);
  --glass: rgba(11, 11, 13, 0.82);       /* sticky top bar */
  --glass-2: rgba(32, 32, 36, 0.92);     /* floating cart bar */
  --hairline: rgba(255, 255, 255, 0.06);
  --veil: rgba(255, 255, 255, 0.08);     /* round icon buttons */
  --shadow: rgba(0, 0, 0, 0.55);
  --viewer-bg: #000000;
  /* Status signals keep their colour in both modes; each has a darker shade in light mode so it still reads. */
  --live: #ff4d5e;
  --live-ink: #ffd6da;
  --live-line: rgba(255, 77, 94, 0.35);
  --ok: #4ade80;
  --ok-line: rgba(74, 222, 128, 0.5);
  --warn: #fbbf24;
  --warn-ink: #fde68a;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --warn-line: rgba(251, 191, 36, 0.45);
  --bad: #f87171;
  --bad-ink: #1a0505;
  --venmo: #3d95ce;    /* the Venmo tip chips' border; the solid Venmo button is #0070d2 in both modes */
  --venmo-ink: #cfe8fb;
  --radius: 14px;
  --radius-lg: 22px;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
/* Light: the same system inverted. Every text token keeps 4.5:1 on --bg, --bg-2, --surface and --surface-2. */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --bg-2: #fafafa;
    --surface: #f2f2f3;
    --surface-2: #e7e7e9;
    --line: #e4e4e7;
    --line-2: #d0d0d5;
    --text: #0b0b0d;
    --muted: #4f4f56;
    --faint: #636369;   /* 5.97:1 on --bg, 5.33:1 on --surface */
    --accent: #0b0b0d;
    --accent-ink: #ffffff;
    --accent-hover: #2a2a2e;
    --accent-soft: rgba(11, 11, 13, 0.07);
    --glass: rgba(255, 255, 255, 0.85);
    --glass-2: rgba(255, 255, 255, 0.94);
    --hairline: rgba(0, 0, 0, 0.07);
    --veil: rgba(0, 0, 0, 0.06);
    --shadow: rgba(0, 0, 0, 0.14);
    --viewer-bg: #ffffff;
    --live: #e11d48;
    --live-ink: #be123c;
    --live-line: rgba(225, 29, 72, 0.35);
    --ok: #166534;
    --ok-line: rgba(22, 101, 52, 0.45);
    --warn: #a14d07;
    --warn-ink: #7c3a06;
    --warn-soft: rgba(217, 119, 6, 0.1);
    --warn-line: rgba(161, 77, 7, 0.45);
    --bad: #b91c1c;
    --bad-ink: #ffffff;
    --venmo: #0070d2;
    --venmo-ink: #005ea8;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
/* A link inside a sentence is underlined: in black and white the colour alone can't mark it (WCAG 1.4.1). */
p a:not(.btn), .my-orders a { text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---- type ---------------------------------------------------------- */
.display {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.1rem, 7.5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0.15em 0 0.35em;
  text-wrap: balance;
  /* An event name can be one unbreakable token — a 16-18 character @handle is enough at display size — which does not
     fit a 320 px phone: it pushed a live document 25 px sideways (measured 2026-11-12), so the gallery scrolled and
     the sticky bars stopped lining up. break-word only breaks a token that would otherwise overflow, so ordinary
     names wrap exactly as before and the heading's intrinsic size is unchanged. */
  overflow-wrap: break-word;
}
.small-display { font-size: clamp(1.7rem, 5.5vw, 2.3rem); }
.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow.warn { color: var(--warn); }
.lede { color: var(--muted); font-size: 1.05rem; margin: 0 0 1.2rem; max-width: 36rem; }
.muted { color: var(--muted); }
.small { font-size: 0.84rem; }
.fine { color: var(--faint); font-size: 0.8rem; line-height: 1.45; margin: 0.8rem 0 0; }
/* P-162 (h): a status a screen reader announces and the screen does not need (the reminder's confirmation). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0; }
.center { text-align: center; }
.error { color: var(--bad); margin: 0; }
h2 { font-size: 1.12rem; font-weight: 650; margin: 0; letter-spacing: -0.01em; }
h3 { font-size: 1rem; font-weight: 650; margin: 0 0 0.8rem; }

/* ---- buttons ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 46px; padding: 0 1.15rem;
  border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 0.97rem; cursor: pointer;
  text-decoration: none !important; white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-ghost.danger { color: var(--bad); }
.btn-xl { min-height: 58px; font-size: 1.08rem; padding: 0 1.6rem; }
.btn-block { display: flex; width: 100%; }
.btn-chip { min-height: 40px; padding: 0 1rem; font-size: 0.92rem; }
/* NFR-09 asks for 44 px targets. A chip is drawn smaller where its row is height-sensitive — the sticky hour
   bar (36 px) and the tip row (40 px) on a 320 px phone, measured on the live host 2026-11-12 — so extend the
   touch area to 44 px without changing what is drawn. The halo stays inside the 8 px those rows already pad or
   gap by, so no chip steals a neighbouring chip's edge. */
#hourChips .hour-chip, #app .tip-amount { position: relative; }
#hourChips .hour-chip::after, #app .tip-amount::after { content: ""; position: absolute; inset: -6px 0; }
.btn.is-disabled, .btn:disabled { opacity: 0.4; pointer-events: none; }
.btn .ico { width: 22px; height: 22px; }
.link {
  display: inline-flex; align-items: center; vertical-align: middle;
  min-height: 44px; padding: 8px 4px;
  background: none; border: 0; color: var(--accent); cursor: pointer; font-weight: 600;
}
/* The order page's top bar is the one place with no room for a taller control: a 44 px
   "Back to gallery" grew the header and pushed the tip button under the fold on a 390x844
   iPhone (tests/test_ui.py::test_zip_parts_never_push_the_tip_button_below_the_fold, DL-3).
   Keep that bar's own height and give the link back its compact box. */
.topbar .link { display: inline; min-height: 0; padding: 0; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--veil); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.icon-btn svg, .nav svg, .ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn svg { width: 20px; height: 20px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.6rem; }

/* ---- guest layout -------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 18px 12px;
  background: var(--glass);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.wordmark { font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.01em; display: inline-flex; align-items: center; gap: 0.5em; }
/* The mark: Poseidon's trident, its crossbar a lens (docs/BRAND.md). Inline SVG in currentColor (templates/_mark.svg),
   so it is the text colour: white on black in dark mode, black on white in light mode. The glyph is 40:58. */
svg.mark { display: block; flex: none; color: var(--text); }
.wordmark .mark { width: 1.1em; height: 1.6em; }
a.wordmark { color: inherit; text-decoration: none; }
a.wordmark:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
/* Found: the search did its job, so the big Find my photos button steps aside (Retake selfie stays by the results). */
#app.has-found #findBtn, #app.has-found #findNote { display: none; }
.all-loading { text-align: center; margin: 10px 0 0; }
.endorse { letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.72rem; color: var(--faint); }
.endorse b { color: var(--text); font-weight: 650; }
/* A two-part credit ("Powered by Poseidon · Trident Social", templates/_endorse.html) breaks only at the " · ",
   on a narrow phone and on a printed card. */
.credit-part { white-space: nowrap; }
/* Print kit (templates/card.html): room for the two-part credit, and for a long brand. These live here, not in
   card.html's own styles, so the reference install's print pages ("by Trident Social", a short brand) stay byte for
   byte what they were; nothing below matches them (tests/test_endorsement.py measures both credits).
   - Table card: the two-part credit is 21 characters longer than "by Trident Social", so it can take the brandline
     onto one more 8 pt line (16 px), and four cards to a Letter page had none to spare (P-070). A card with it gives
     19 px back: 4 mm of padding above and below instead of 6 mm, 1 mm over the brandline.
   - Handout: the two-part credit takes two 6 pt lines; tighter gaps and leading give the second one back (13 px).
   - A brand over 30 characters (card.html adds .long) is a point smaller with tighter leading, so a 57-character
     brand keeps a handout's URL inside the cut line instead of under overflow:hidden. */
.tcard:has(.credit-part) { padding-top: 4mm; padding-bottom: 4mm; }
.tcard:has(.credit-part) .brandline { margin-top: 1mm; }
.hcard .copy:has(.credit-part) { gap: .6mm; }
.hcard .copy:has(.credit-part) .endorse { line-height: 1.25; margin-top: -0.2mm; }
.hcard .mark.long { font-size: 7pt; line-height: 1.2; }
.tcard .mark.long { font-size: 8pt; line-height: 1.2; }
.live-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.35rem 0.7rem; border-radius: 999px; border: 1px solid var(--live-line); color: var(--live-ink);
}
.live-pill.ended { border-color: var(--line-2); color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255,77,94,0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,77,94,0.55); } 70% { box-shadow: 0 0 0 8px rgba(255,77,94,0); } 100% { box-shadow: 0 0 0 0 rgba(255,77,94,0); } }

.topbar-end { display: inline-flex; align-items: center; gap: 0.9rem; }
.events-link { color: var(--muted); font-size: 0.84rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.events-link:hover { color: var(--text); }
/* the list of events (/events) */
.all-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.event-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--bg-2);
  color: var(--text); text-decoration: none;
}
.event-row:hover { border-color: var(--line-2); background: var(--surface); }
.event-row-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.event-row-name { font-family: var(--display); font-size: 1.15rem; font-weight: 600; }
.event-row .live-pill { flex: none; }

.guest main { max-width: 980px; margin: 0 auto; padding: 0 18px calc(110px + var(--safe-bottom)); }
.hero { padding: 12px 0 0; }
.hero .btn-xl { margin-top: 0.4rem; }
.center-hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 18vh; }
.block { padding: 18px 0 8px; border-top: 1px solid var(--line); margin-top: 8px; scroll-margin-top: 72px; }
.subhead { margin: 1.4rem 0 0.3rem; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 12px; }

/* Compact strip for search-only galleries; highlighted picks get a more photographic treatment. */
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(62vw, 270px);
  gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -18px; padding: 2px 18px 10px; scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip .card { scroll-snap-align: start; aspect-ratio: 3 / 4; }
.strip .card img { width: 100%; height: 100%; object-fit: cover; }

/* Occasion-aware Best highlights are the first photo feature, not a second thumbnail strip. Use edge-to-edge
   previews here; opening a card still shows the full, uncropped photo. */
.best-block { border-top: 2px solid var(--text); padding-top: 22px; }
.best-block .block-head h2 { font: 600 clamp(1.6rem, 5.5vw, 2.2rem)/1.1 var(--display); letter-spacing: -0.02em; }
.best-strip { grid-auto-columns: min(78vw, 370px); gap: 12px; }
.best-strip .card { aspect-ratio: 4 / 5; background: var(--bg-2); }
.best-strip .card img { object-fit: cover; }
@media (max-width: 719px) {
  /* Keep the first photo visible on short phone screens; the viewer still opens the full frame. */
  .guest #latest .card, .guest .best-strip .card { aspect-ratio: 1; }
  /* Best starts the same compact square strip as Latest, so the hero does not hide most of its first image. */
  .guest .best-strip { grid-auto-columns: min(62vw, 270px); gap: 10px; }
}

/* grids */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; } }
.card {
  position: relative; margin: 0; overflow: hidden;
  border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--hairline);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.grid .card { aspect-ratio: 1; }
.grid .card img { width: 100%; height: 100%; object-fit: cover; }
/* The image sits in a button so a keyboard can open the viewer (NFR-09); it fills the card, so the touch layout is unchanged. */
.card > .open { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
/* Keyboard focus (NFR-09, WCAG 2.4.7). It is drawn on the photo, so like the other photo overlays it is a fixed
   two-tone ring, the same in both modes: white between two black hairlines reads on a white jersey and on a night
   sky. It is set 7 px in from the edge, so it never looks like the selection band at the edge, and a selected card
   with focus shows both. The transparent outline is what forced-colours mode draws instead. */
.card > .open:focus-visible { outline: 3px solid transparent; outline-offset: -10px; }
.card > .open:focus-visible::after {
  content: ""; position: absolute; inset: 9px; border-radius: 7px; pointer-events: none;
  border: 3px solid #fff; outline: 2px solid #000; box-shadow: inset 0 0 0 2px #000;
}
.card img { opacity: 0; transition: opacity 0.35s ease; }
.card img.loaded { opacity: 1; }
.card.is-new { animation: arrive 0.6s ease; }
@keyframes arrive { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
.card .time {
  position: absolute; left: 8px; bottom: 8px;
  font-size: 0.72rem; font-weight: 600; padding: 2px 7px; border-radius: 999px;
  /* 0.62, not 0.55: the label sits on whatever the photo happens to be, and over a bright frame 0.55 left the
     time at about 4.4:1 against AA's 4.5 (measured on the live host 2026-11-12). 0.62 clears it on white. */
  /* 0.6, not 0.55: the label sits on whatever the photo happens to be, and over a bright frame 0.55 left the time at
     4.1:1 against AA's 4.5 (measured 2026-11-12). 0.6 is the veil the rest of the photo overlays already use, and it
     clears AA on white. */
  background: rgba(0,0,0,0.6); color: #eee; backdrop-filter: blur(6px);
}
.card .sel {
  position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px;
  border-radius: 50%; border: 2px solid rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.35); display: grid; place-items: center; cursor: pointer;
  backdrop-filter: blur(6px); transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.card .sel::after {
  /* Keep the visible selection disc compact while making its effective target 44 × 44 px. */
  content: ""; position: absolute; inset: -5px;
}
.card .sel svg { width: 16px; height: 16px; stroke: #0b0b0d; stroke-width: 3; fill: none; opacity: 0; }
/* Selected: also on the photo, so also fixed two-tone and the same in both modes (the page-inverse --accent
   vanished on a bright photo in dark mode and on a dark one in light mode): a white band at the card's edge with a
   black inner edge, and a white disc with a dark check and a thin dark rim. */
.card.selected::after {
  content: ""; position: absolute; inset: 0; border-radius: calc(var(--radius) - 1px); pointer-events: none;
  border: 3px solid #fff; box-shadow: inset 0 0 0 2px #000;
}
.card.selected .sel { background: #fff; border-color: #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,0.6); }
.card.selected .sel svg { opacity: 1; }
.card .sel:active { transform: scale(0.9); }
.card .badge {
  position: absolute; top: 8px; left: 8px; font-size: 0.7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
}
.skeleton { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { color: var(--muted); text-align: center; padding: 26px 12px; border: 1px dashed var(--line-2); border-radius: var(--radius); margin: 6px 0; }

/* "Your photos" with other events (D-020): Select all and the other-event links sit above the grid. */
.matches-all #matchesActions { margin: 0 0 12px; }
.elsewhere { margin: 4px 0 16px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.elsewhere h3 { font-size: 0.95rem; margin: 0 0 10px; }
.other-events { display: grid; gap: 8px; }
.other-event {
  display: grid; gap: 2px; padding: 12px 14px; min-height: 56px;
  border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--text); text-decoration: none !important; -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.other-event:hover, .other-event:focus-visible { border-color: var(--accent); }
.other-event:active { transform: scale(0.99); }
.oe-name { font-family: var(--display); font-weight: 600; font-size: 1.08rem; line-height: 1.25; overflow-wrap: anywhere; }
.oe-meta { color: var(--muted); font-size: 0.84rem; }
.oe-cta { color: var(--accent); font-weight: 600; font-size: 0.92rem; margin-top: 4px; }
.elsewhere .btn-block { margin-top: 8px; }
.oe-all { display: block; margin-top: 10px; color: var(--muted); font-size: 0.84rem; font-weight: 600; text-decoration: none; }
.oe-all:hover, .oe-all:focus-visible { color: var(--text); }
.matches-all #matchesMoreBtn { margin-top: 12px; }

.tip-block .tip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.venmo { border-color: var(--venmo); color: var(--venmo-ink); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 1rem; color: var(--faint); font-size: 0.82rem; padding: 28px 0 0; border-top: 1px solid var(--line); margin-top: 26px; }
.foot a { color: var(--muted); }

/* follow block (_socials.html): the photographer's profiles. Glyphs stay one colour (the text colour), never a
   brand colour; the pills are 44 px tap targets. In a footer they are tertiary, like the Privacy link. */
.socials { display: flex; flex-direction: column; gap: 8px; }
.foot .socials { flex-basis: 100%; }
.socials-lead { margin: 0; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.socials-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.social {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; padding: 0 0.95rem;
  border: 1px solid var(--line-2); border-radius: 999px; color: var(--accent); font-weight: 600; font-size: 0.95rem;
}
.social:hover { text-decoration: none; border-color: var(--accent); }
.foot .social { border: 0; padding: 0 0.9rem 0 0; color: var(--muted); font-size: 0.9rem; }  /* both handles on one row at 390 px */
.sico { width: 18px; height: 18px; flex: none; color: var(--text); }
.socials-tipped { padding: 18px 0 8px; border-top: 1px solid var(--line); margin-top: 8px; }
.socials-tipped .handle { color: var(--accent); }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* cart bar */
.cartbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: 640px; margin: 0 auto; padding: 10px 10px 10px 18px;
  border-radius: 999px; background: var(--glass-2); border: 1px solid var(--line-2);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px var(--shadow);
  animation: rise 0.25s ease;
}
@keyframes rise { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.cart-sum { display: flex; flex-direction: column; line-height: 1.2; }
.cart-sum .muted { font-size: 0.84rem; }

/* sheets & viewer (native <dialog>) */
dialog.sheet {
  border: 0; padding: 0; color: var(--text); background: var(--bg-2);
  width: min(560px, 100vw); max-width: 100vw; max-height: 100dvh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin: auto auto 0; box-shadow: 0 -20px 60px var(--shadow);
}
@media (min-width: 720px) { dialog.sheet { margin: auto; border-radius: var(--radius-lg); } }
dialog::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); }  /* dims the page in either mode */
dialog[open] { animation: rise 0.22s ease; }
.sheet-body { padding: 26px 22px calc(22px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 10px; }
.sheet-body h2 { font-family: var(--display); font-size: 1.6rem; margin-bottom: 4px; }
.steps { margin: 0; padding-left: 1.2rem; color: var(--muted); display: grid; gap: 6px; }
.steps li::marker { color: var(--accent); font-weight: 700; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); cursor: pointer; margin: 6px 0; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 1px 0 0; }

dialog.viewer { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; background: var(--viewer-bg); }
dialog.viewer[open] { display: flex; flex-direction: column; }
.viewer-top { display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px; }
/* One fixed-size track, clipped, that the photo is contained in. A percentage max-height in an auto-sized grid row
   resolves to nothing, so on an iPad or a phone held sideways the photo grew past the stage and covered
   "Add to my photos". */
.viewer-stage { flex: 1; min-height: 0; position: relative; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); overflow: hidden; }
.viewer-stage img { width: 100%; height: 100%; object-fit: contain; }
/* The arrows sit on the photo on a phone, so they are photo overlays in both modes (white on a dark veil), like
   the selection circle; a page-coloured arrow vanished on a dark photo in light mode. Where the photo is
   letterboxed (portrait on an iPad, a phone held sideways) they sit on the viewer's white in light mode: the 0.55
   veil keeps the chevron at 4.7:1 there (0.35 was 2.4:1, under WCAG 1.4.11's 3:1). */
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(0,0,0,0.55); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer; display: grid; place-items: center; }
.nav svg { width: 22px; height: 22px; }
.nav.prev { left: 10px; } .nav.next { right: 10px; }
.viewer-actions { padding: 12px 16px calc(14px + var(--safe-bottom)); max-width: 560px; width: 100%; margin: 0 auto; }
.viewer.is-selected #viewerSelect { background: transparent; color: var(--accent); }

.spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; margin: 10px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-bottom)); transform: translateX(-50%); z-index: 60;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 0.92rem;
  padding: 10px 16px; border-radius: 999px; box-shadow: 0 10px 30px var(--shadow);
  max-width: calc(100vw - 32px); text-align: center; animation: rise 0.2s ease;
}

/* order page */
.grid-order .card { aspect-ratio: auto; cursor: default; }
.grid-order .card img { height: auto; aspect-ratio: auto; object-fit: cover; }
.card.owned figcaption { display: flex; gap: 6px; padding: 8px; flex-wrap: wrap; }
.card.owned .btn-chip { flex: 1; min-height: 36px; padding: 0 0.7rem; font-size: 0.84rem; }
/* ZIP parts of a big order (DL-3): a disclosure below the pay panel, chips in a wrapping grid */
.zip-more { margin: 14px 0 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.zip-more summary { cursor: pointer; color: var(--muted); font-size: 0.92rem; }
.zip-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.5rem; margin-top: 0.7rem; }
/* "Your photos · N ready" on the gallery (DL-5): the guest's saved order links for this event */
.my-orders { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; align-items: center; margin: 12px 0 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 0.92rem; }
.my-orders a { color: var(--accent); font-weight: 600; }
.my-orders .forget { margin-left: auto; color: var(--faint); font-weight: 400; font-size: 0.82rem; }

/* prose (privacy) */
.prose { max-width: 640px; margin: 0 auto; padding: 28px 18px 60px; }
.prose h3 { margin: 1.6rem 0 0.4rem; }
.prose p { color: var(--muted); margin: 0; }

/* centered panels (login, demo pay, home) */
.page-center { display: grid; place-items: center; padding: 24px 16px; }
.panel { width: min(420px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 24px; display: flex; flex-direction: column; gap: 10px; }
.home { max-width: 560px; text-align: left; }
.home .home-mark { width: 44px; height: 64px; margin-bottom: 18px; }
.qr-stage .qr-mark { width: 40px; height: 58px; margin-bottom: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.86rem; color: var(--muted); }
.field input {
  min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); font-size: 1rem; outline: none;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field select { min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 1rem; }
.service-booking-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
#serviceBookingStats { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 8px; margin: 12px 0; }
.service-custom-field[hidden] { display: none; }
.service-stat { display: grid; gap: 4px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.service-stat span { color: var(--muted); font-size: .75rem; }
.service-stat strong { font-size: 1.05rem; }
.service-booking-actions { display: grid; gap: 6px; min-width: 160px; }
.service-booking-actions label { display: grid; gap: 3px; color: var(--muted); font-size: .72rem; }
.service-booking-actions input, .service-booking-actions select { min-height: 38px; min-width: 0; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--text); padding: 5px 8px; }
@media (max-width: 640px) { #serviceBookingList li { flex-direction: column; align-items: stretch; } .service-booking-actions { min-width: 0; } .service-booking-actions input, .service-booking-actions select { min-height: 44px; } }
.event-terms { display: grid; grid-template-columns: minmax(0, 15rem) 1fr; gap: 0.6rem 1.2rem; align-items: end; margin-top: 0.9rem; }
@media (max-width: 640px) { .event-terms { grid-template-columns: 1fr; } }

/* ---- photographer dashboard (iPad first) ---------------------------- */
.admin .topbar { padding-left: 22px; padding-right: 22px; }
.admin-top { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px 16px; }
.admin-top .pills { margin-left: 0; justify-content: flex-end; }
@media (max-width: 1020px) {
  .admin-top { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-top #showQr { grid-column: 2; grid-row: 1; }
  .admin-top .pills { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
}
.admin-title { display: flex; flex-direction: column; line-height: 1.25; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.pill { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.8rem; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.pill .dot { background: var(--faint); animation: none; box-shadow: none; }
.pill.ok .dot { background: var(--ok); }
.pill.warn .dot { background: var(--warn); }
.pill.bad .dot { background: var(--bad); }
.pill.ok { color: var(--text); }
.admin-grid {
  display: grid; gap: 16px; padding: 18px 22px 60px; max-width: 1280px; margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row dense;
}
.span-2 { grid-column: span 2; }
.span-3 { grid-column: 1 / -1; }
@media (max-width: 1020px) { .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span-3 { grid-column: 1 / -1; } }
@media (max-width: 700px) {
  .admin-grid { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .span-2, .span-3 { grid-column: auto; }
  .admin .panel-card { padding: 16px; }
  .admin-top { padding-left: 14px; padding-right: 14px; column-gap: 10px; }
  .admin-top #showQr { min-height: 44px; }
  .admin :is(.row-actions .btn, .social-tools .btn-chip, #salesCard .btn-chip,
               .service-booking-actions .btn) { min-height: 44px; }
  .admin .find-order input,
  .admin .find-order .btn { min-height: 44px; }
  .admin .table td.actions .btn-chip { min-height: 44px; }
}
.panel-card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
/* A card's own title is an h2 for the outline; it keeps the size a panel heading had, so nothing looks
   different for being one level up. */
.card-head h2 { font-size: 1rem; font-weight: 650; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.stats > div { background: var(--surface); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; }
.stat { font-family: var(--display); font-size: 1.9rem; font-weight: 600; line-height: 1.1; }
@media (max-width: 520px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stats > div { min-width: 0; padding: 10px; }
  .stat { font-size: clamp(1.4rem, 7vw, 1.9rem); overflow-wrap: anywhere; }
}
.toggle { display: flex; align-items: center; gap: 0.7rem; cursor: pointer; font-size: 0.92rem; }
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); }
.big-status { font-size: 1.05rem; font-weight: 650; margin: 0 0 10px; }
.problems { margin: 0 0 12px; padding-left: 1.1rem; color: var(--bad); font-size: 0.88rem; line-height: 1.45; }
.big-status.ok { color: var(--ok); } .big-status.warn { color: var(--warn); } .big-status.bad { color: var(--bad); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: 0.88rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 150px; border-radius: var(--radius); border: 1.5px dashed var(--line-2);
  background: var(--surface); cursor: pointer; text-align: center; padding: 16px; transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.ico.big { width: 34px; height: 34px; color: var(--accent); }
.progress { margin-top: 10px; background: var(--surface); border-radius: 999px; height: 30px; position: relative; overflow: hidden; }
.progress .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent-soft); border-right: 2px solid var(--accent); transition: width 0.2s; }
.progress span { position: relative; display: block; line-height: 30px; padding: 0 12px; }
.admin-photos { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.admin-photos .card.is-hidden img { opacity: 0.25; filter: grayscale(1); }
.admin-photos .card .hidden-tag { position: absolute; inset: auto 8px 8px auto; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bad); color: var(--bad-ink); }
.admin-photos .card .faces { position: absolute; top: 8px; right: 8px; font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,0.6); color: #fff; }  /* on the photo */
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; padding: 0 8px 8px 0; }
.table td { padding: 10px 8px 10px 0; border-top: 1px solid var(--line); }
.event-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.event-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface); font-size: 0.9rem; }
.event-list li.current { outline: 1.5px solid var(--accent); }
.event-list .meta { color: var(--muted); font-size: 0.78rem; }
.event-list .event-cross { margin-top: 6px; font-size: 0.78rem; }
.danger-zone { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.secret { letter-spacing: 0.04em; }

/* ---- QR screen (shown to guests on the iPad) ------------------------ */
.qr-screen { background: radial-gradient(120% 90% at 50% 0%, var(--surface) 0%, var(--bg) 60%), var(--bg); }
.qr-stage { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 6px; }
.qr-stage .display { font-size: clamp(2rem, 6vmin, 3.8rem); margin-bottom: 0.35em; }
.qr-card { background: #fff; border-radius: 28px; padding: 18px; box-shadow: 0 30px 90px var(--shadow), 0 0 0 1px var(--line-2); }  /* a QR scans best dark on white, in either mode */
.qr-card svg { display: block; width: min(52vmin, 500px); height: auto; }
.qr-steps { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin: 2.2vmin 0 4px; font-weight: 650; color: var(--text); font-size: clamp(0.95rem, 2.2vw, 1.25rem); }
.qr-steps span { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); }
.qr-event { color: var(--muted); margin: 8px 0 0; font-size: 1.05rem; }
.qr-url { color: var(--faint); margin: 0; font-size: 0.9rem; }
.qr-back { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 14px); right: 16px; display: inline-flex; align-items: center; min-height: 44px; color: var(--faint); font-size: 0.85rem; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); }  /* dim (--faint) but readable: no opacity */

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- pay-later (D-007) --------------------------------------------- */
.price-line { margin: 14px 0 0; font-weight: 600; color: var(--text); font-size: 0.95rem; }
.pay-panel {
  margin: 4px 0 18px; padding: 18px; border-radius: var(--radius-lg);
  background: var(--bg-2); border: 1px solid var(--line-2);
  display: flex; flex-direction: column; gap: 10px;
}
.pay-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.pay-amount { font-family: var(--display); font-size: 2.2rem; font-weight: 600; line-height: 1; margin: 4px 0 0; }
.pay-code { display: flex; flex-direction: column; align-items: flex-end; }
.pay-code strong { font: 700 1.5rem/1.1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.12em; color: var(--accent); }
.btn-venmo { background: #0070d2; border-color: #0070d2; color: #fff; }  /* white on it: 4.94:1 (AA); #008cff was 3.39:1 */
.btn-venmo:hover { background: #0068c4; }
.claim { margin-top: 2px; }
.claimed { margin: 0; text-align: center; color: var(--ok); font-weight: 600; }
.tip-via { align-self: center; }

/* dashboard */
.banner { max-width: 1280px; margin: 14px auto 0; padding: 12px 18px; border-radius: var(--radius); font-size: 0.92rem; }
.banner.warn { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn-ink); }
.admin .banner { margin-left: 22px; margin-right: 22px; }
@media (min-width: 1324px) { .admin .banner { margin-left: auto; margin-right: auto; } }
.stat.owed { color: var(--warn); }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table td.code { font: 700 0.9rem ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.08em; }
.table td.actions { white-space: nowrap; text-align: right; }
.table td.actions .btn-chip { min-height: 34px; padding: 0 0.8rem; font-size: 0.82rem; margin-left: 6px; }
.status { display: inline-block; font-size: 0.74rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-2); }
.status-owed { color: var(--warn); border-color: var(--warn-line); }
.status-paid { color: var(--ok); border-color: var(--ok-line); }
.status-refunded, .status-void { color: var(--faint); }
.claim-hint { display: block; font-size: 0.72rem; color: var(--ok); margin-top: 3px; }
.claim-hint.muted { color: var(--muted); }
tr.order-void td, tr.order-refunded td { color: var(--faint); }
/* link test: pay first by Venmo, locked until Mark paid */
.status-pending { color: var(--warn); border-color: var(--warn-line); }
.claim-hint.warn { color: var(--warn); }
.variant-tag { display: inline-block; margin-left: 6px; font: 500 0.72rem var(--sans); letter-spacing: 0; color: var(--muted); }
.table td.num, .table th.num { text-align: right; }

.offline {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 64px); left: 50%; transform: translateX(-50%); z-index: 40;
  padding: 8px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn-ink);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tip-web { flex-basis: 100%; margin: 4px 0 0; }
.tip-web a { color: inherit; text-decoration: underline; }

/* ---- tipping (P-142, TIP-2/TIP-7): a thank-you card in the pay panel, the ask one tap away ---- */
.link-btn { background: none; border: 0; padding: 10px 4px; min-height: 44px; font: inherit; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; display: block; width: 100%; text-align: center; }
.pay-thanks { text-align: center; padding: 4px 0 10px; }
.pay-thanks .eyebrow { margin-bottom: 4px; }
.pay-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.pay-row > :is(#cardBtn, #cardLink, #venmoBtn) { flex: 1 1 220px; min-width: 0; white-space: normal; text-align: center; }
/* P-160: the two payment buttons never touch the amount or the line above them (they did on a priced order). */
.pay-ask .pay-row { margin-top: 14px; }
details.pay-ask > summary { list-style: none; }
details.pay-ask > summary::-webkit-details-marker { display: none; }
details.pay-ask > summary.link-btn { padding: 6px 4px 12px; }
#priceAsk > summary.link-btn { padding: 0 4px; width: fit-content; text-align: left; }
#priceAsk { margin-top: -18px; }
.ask-back { margin: 0 0 8px; text-align: center; font-weight: 600; }
.ask-row { display: flex; gap: 10px; justify-content: center; }
.my-orders .reminder { flex-basis: 100%; color: var(--muted); font-size: 0.86rem; font-weight: 400; }
.find-order { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin: 0 0 12px; }
.find-order label { font-size: 0.86rem; color: var(--muted); }
.find-order input { width: 6.5em; min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: 700 1rem/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.12em; text-transform: uppercase; outline: none; }
.find-order input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sub-head { margin: 14px 0 6px; font-size: 0.95rem; }

/* ---- quality pass 2026-10-11 (G1-G21) ------------------------------- */
/* G12: the home page lists recent public events when none is live */
.home-events { margin-top: 1.6rem; display: flex; flex-direction: column; gap: 10px; }
.home-events .eyebrow { margin-bottom: 2px; }
.home-all { align-self: flex-start; margin-top: 4px; }
.event-row-go { color: var(--muted); font-size: 1.4rem; line-height: 1; flex: none; }
.foot-follow { flex-basis: 100%; }
/* G4: /tipped without the order cookie is never a dead end */
#tipped .row-actions { margin-top: 0.2rem; }
#tipped .my-orders { margin: 0 0 14px; }

/* G8: the photographer above the fold; the venue and date move under the event name */
.byline a { color: inherit; text-decoration: none; text-transform: none; letter-spacing: 0.04em; }
.byline a:hover { text-decoration: underline; }
.hero-meta { margin: -0.15em 0 1.1rem; color: var(--muted); font-size: 0.95rem; }
/* G9: "Send to friends" */
.hero .share-btn { margin-top: 8px; }
.browse-event { display: flex; width: fit-content; margin-top: 2px; }
.browse-event + #priceAsk { margin-top: 0; }
.is-empty .browse-event { display: none; }
/* P-191: reminder prose is gone; the remaining calendar link is a 44 px tap target. Reserve that height so filling
   the empty server-rendered container after JS loads cannot shift the hero. This is the chip only. */
.reminder-cta .fine { margin: 6px 0 0; min-height: 44px; }
.share-btn .ico { width: 18px; height: 18px; }
/* G21: no orphaned "after" at 390 px. "pretty", not "balance": balance broke before a " · " and started a line with it */
.price-line { text-wrap: pretty; }
/* G11: with nothing to show, keep one empty state and defer the tip ask. Browsable galleries
   put that state in All photos; search-only galleries keep it in their latest preview strip. */
.is-empty .tip-block { display: none; }
.is-empty #findBtn { background: transparent; color: var(--text); border-color: var(--line-2); }
.is-empty .strip { display: block; margin: 0; padding: 0 0 10px; }
/* G5: the bundle in the cart */
/* The nudge is the bar's first row, across its whole width; the count and the button stay on one row under it. */
.cartbar { flex-wrap: wrap; row-gap: 6px; }
.cart-nudge { flex-basis: 100%; font-size: 0.84rem; font-weight: 650; color: var(--text); padding: 2px 0 6px; border-bottom: 1px solid var(--line-2); }
.cartbar:has(.cart-nudge:not([hidden])) { border-radius: 24px; padding-top: 12px; }
#getAllBtn { white-space: normal; text-align: center; }
/* G14: the viewer's add button and its running cart side by side */
.viewer-row { display: flex; flex-wrap: wrap; gap: 10px; }
.viewer-row .btn { flex: 1 1 220px; min-width: 0; white-space: normal; text-align: center; }
/* G7: "All photos" by the hour, under a sticky row of jump chips */
.hour-chips {
  position: sticky; top: var(--topbar-h, 62px); z-index: 15;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -18px 10px; padding: 8px 18px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.hour-chips::-webkit-scrollbar { display: none; }
.hour-chip { flex: none; min-height: 36px; }
.hour-chip.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.hour { scroll-margin-top: calc(var(--topbar-h, 62px) + 60px); }
.hour + .hour { margin-top: 20px; }
.hour-head { font-size: 0.95rem; margin: 0 0 10px; }
@media (min-width: 720px) {
  /* G18: a wider column, and every photo keeps its shape: justified rows (each card grows in proportion to its
     aspect ratio, so a row shares one height); the filler keeps the last row at its natural size. */
  .guest main { max-width: 1280px; }
  .guest .grid:not(.grid-order) { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
  .guest .grid:not(.grid-order) .card { aspect-ratio: var(--ar, 1); flex: var(--ar, 1) 1 calc(var(--ar, 1) * 230px); min-width: 0; }
  .guest .grid:not(.grid-order)::after { content: ""; flex: 999 1 0px; }
  /* G6: "Just now" wraps into rows instead of a strip a mouse cannot scroll; no card is cut at the edge */
  .strip { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); overflow: visible; margin: 0; padding: 2px 0 10px; scroll-snap-type: none; }
  .best-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .best-strip .card:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: 1; }
  .best-strip .card:not(:first-child) { aspect-ratio: 1; }
}
/* G10: inside an app's browser, the way out to Safari or Chrome */
.inapp { margin: 18px 0 0; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--warn-line); background: var(--warn-soft); }
.inapp-title { margin: 0; font-weight: 700; color: var(--text); }
.inapp-text { margin: 4px 0 10px; color: var(--muted); font-size: 0.9rem; }
.inapp-row { display: flex; gap: 8px; align-items: center; }
.inapp-link { flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 0.85rem; }
/* G1: "Email me this link" */
.email-link { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; max-width: 30rem; }
.email-link > label.small { color: var(--muted); font-weight: 600; }
.email-row { display: flex; gap: 8px; }
.email-row input { flex: 1 1 auto; min-width: 0; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 1rem; outline: none; }
.email-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check-inline { display: flex; gap: 0.55rem; align-items: center; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--accent); }
.email-link .fine { margin-top: 0; }
/* G13: the dashboard's funnel row */
.funnel { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.funnel li { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); }
.stat-sm { font-family: var(--display); font-size: 1.25rem; font-weight: 600; line-height: 1.15; }
@media (max-width: 700px) { .funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* G20: the QR screen says what guests get */
.qr-offer { margin: 2px 0 0; font-weight: 650; color: var(--text); font-size: clamp(1rem, 2.4vw, 1.35rem); text-wrap: balance; }
.qr-by { margin: 0; color: var(--muted); font-size: 1rem; }
/* ---- P-160/P-161: the first-visit reminder card and equal tip choices ---------------------------------------- */
/* P-161: a guest's first visit gets the reminder as a card after the first photo section, in the page's flow where
   the chip sits for later visits (event.html picks the card or chip before first paint, so nothing jumps). It never covers a
   photo: the P-160 bar, fixed over the bottom of the screen, hid the only photos on a real iPhone's first screen.
   It takes no focus, has no timer, no rise-in and no close button (a guest who wants neither scrolls on). On a
   phone: the heading (which names the time) on one line and two buttons side by side, about the height of the chip
   and its small print; the sentence shows from 720 px wide and is the card's description everywhere. */
.remind-box { margin-top: 12px; }
.remind-box.is-offer > .reminder-cta, .remind-box:not(.is-offer) > .remind-offer { display: none; }
/* P-177: they came back from their own reminder; neither the card nor the chip belongs here. */
.remind-box.is-returning { display: none; }
.remind-offer {
  max-width: 560px; padding: 8px 10px 10px;
  border-radius: var(--radius-lg); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text);
}
.remind-offer h2 { margin: 0 4px; font-family: var(--display); font-size: 1rem; line-height: 1.3; text-wrap: balance; }
/* Headings focused by script (the photos' or the page's after a choice) are not controls: no ring. */
main h1[tabindex="-1"]:focus, #latestHead[tabindex="-1"]:focus { outline: none; }
.remind-text { display: none; margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; line-height: 1.35; text-wrap: pretty; }
.remind-actions { display: flex; gap: 8px; margin-top: 8px; }
.remind-actions .btn { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 8px; font-size: 0.95rem; line-height: 1.2;
  white-space: normal; text-align: center; }
.remind-actions .remind-go { flex-grow: 1.4; }
.remind-actions.has-two-calendars { flex-wrap: wrap; }  /* a computer's browser in a phone-narrow window */
.remind-actions.has-two-calendars .remind-go { flex: 1 1 200px; }
.remind-actions.has-two-calendars .remind-show { flex-basis: 100%; }
/* One-line labels down to 360 px ("Wednesday" too); a 320 px phone wraps them inside the same two buttons. */
@media (max-width: 419px) {
  .remind-actions .btn { padding: 8px 6px; font-size: 0.88rem; white-space: nowrap; }
  .remind-offer h2 { font-size: 0.93rem; letter-spacing: -0.02em; }
}
@media (max-width: 374px) {
  .remind-actions .btn { font-size: 0.86rem; }
  /* The full "Get a reminder for weekday at 11 AM" heading otherwise wraps on Android's 360 px viewport. */
  .remind-offer h2 { font-size: 0.88rem; letter-spacing: -0.025em; }
}
@media (max-width: 339px) { .remind-actions .btn { white-space: normal; } }
/* P-162: the small links in the reminder's small print were 16 px tall targets, half a thumb. The padding and its equal
   negative margin grow the tap area to 44 px without moving the line: nothing re-flows, nothing shifts. */
.reminder-cta .fine a, .remind-help a { color: var(--text); text-decoration: underline; text-underline-offset: 3px;
  display: inline-block; padding: 14px 4px; margin: -14px -4px; }
/* The link's tap area reaches 14 px above its text, which is the 6 px gap under the chip and 8 px of the chip itself: the
   chip keeps the top of that overlap, so a thumb on the chip's bottom edge still opens the chip (P-162). */
.reminder-cta .btn-chip { position: relative; z-index: 1; }
/* Inside an app's browser: Remind opens this how-to in place (open this page in Safari or Chrome, no sign-in). */
.remind-help { margin: 10px 4px 2px; padding-top: 10px; border-top: 1px solid var(--line); }
.reminder-cta .remind-help { max-width: 560px; }
.remind-help-lead { margin: 0; font-weight: 700; font-size: 0.95rem; }
.remind-help-text { margin: 4px 0 10px; color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.remind-help .inapp-link { min-height: 44px; }
.remind-help .remind-copy { min-height: 44px; flex: none; }
.remind-help-status { margin: 6px 0 0; font-size: 0.86rem; font-weight: 600; }
.remind-help-status:empty { display: none; }
.remind-help-alt { margin: 8px 0 0; color: var(--muted); font-size: 0.86rem; line-height: 1.7; }
/* Small guest helper/payment/legal links stay comfortable to tap on phones without adding a new line. */
@media (max-width: 700px) {
  .fine a { display: inline-block; padding: 13px 4px; margin: 0 -4px; vertical-align: middle; position: relative; z-index: 0; }
  /* The reminder CTA owns its own geometry (P-162): keep its 14px tap pad and leave stacking alone so the
     chip above it still wins its own bottom edge for a thumb. */
  .reminder-cta .fine a { padding: 14px 4px; margin: -14px -4px; z-index: auto; }
  .reminder-cta > .btn-chip { min-height: 44px; }
  .guest #elsewhere .oe-all { display: flex; align-items: center; gap: .25em; min-height: 44px; }
  /* Only the gallery header: extend hit reach without growing the sticky bar
     or changing any navigation, checkout, or event directory controls. */
  .guest .topbar:has(+ #app) :is(a.wordmark, a.events-link) { position: relative; }
  .guest .topbar:has(+ #app) :is(a.wordmark, a.events-link)::after {
    content: ""; position: absolute; inset-inline: 0; top: 50%; height: 44px; transform: translateY(-50%);
  }
  .hero .share-btn { min-height: 44px; }
  .foot a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (min-width: 720px) {
  .remind-offer { max-width: 760px; padding: 12px 20px 14px; }
  .remind-offer h2 { margin: 0; font-size: 1.2rem; }
  .remind-text { display: block; }
  .remind-actions { margin-top: 10px; }
  .remind-actions .btn { flex: 0 0 auto; min-height: 46px; padding: 10px 14px; font-size: 0.97rem; white-space: nowrap; }
  .remind-actions.has-two-calendars { display: grid; grid-template-columns: 1fr 1fr auto; }  /* two equal calendars */
  .remind-actions.has-two-calendars .remind-go { min-width: 0; }
}
/* A wide screen: one row, the words beside the buttons. The buttons' column has a fixed width, so swapping the one
   Remind button for the two calendars moves nothing. */
@media (min-width: 1100px) {
  .remind-offer { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) 40rem; column-gap: 24px;
    align-items: center; padding: 12px 14px 12px 20px; }
  .remind-offer h2, .remind-text { grid-column: 1; }
  .remind-actions { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .remind-actions:not(.has-two-calendars) .remind-go { flex: 1 1 auto; }
  .remind-help { grid-column: 1 / -1; }
}
/* The gallery's tip bar when card and Venmo both exist: the amount, then two buttons of one size and weight. */
.tip-amounts { display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
.tip-choice { flex-basis: 100%; margin-top: 4px; }
.pay-row > :is(#tipCardBtn, #tipVenmoBtn) { flex: 1 1 220px; min-width: 0; white-space: normal; text-align: center; }

/* P-178: Instagram picks card */
.social-batch { border-top: 1px solid var(--line); padding: 12px 0; }
.social-batch:first-child { border-top: 0; padding-top: 0; }
.social-batch h4 { margin: 0 0 8px; }
.social-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 6px 0 10px; }
.social-strip button { position: relative; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; aspect-ratio: 4 / 5; }
.social-strip button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.social-strip button.is-picked { border-color: var(--accent); }
.social-strip button .n { position: absolute; top: 6px; left: 6px; font-size: 0.72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,0.6); color: #fff; }  /* on the photo */
.social-strip.alternates button { opacity: 0.55; }
.social-batch textarea { width: 100%; min-height: 64px; font: inherit; border-radius: 10px; padding: 8px 10px; background: var(--bg); color: inherit; border: 1px solid var(--line); }
.social-actions, .social-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }

/* P-199: keep moved secondary gallery controls spaced below the first photo row. */
.gallery-more .jersey-search { margin-top: 10px; }
