/* Owner dashboard and the sign-in pages, in the Blisk brand (docs/design/blisk-brand/
 * BRAND.md): the light surface of brand/tokens.css, loaded before this file, black and
 * white for the brand and the primary buttons, Archivo (fonts/blisk.css). Colour is
 * kept for status (live, pending review, failures; the kit's functional colours) and,
 * as secondary accents only, the film palette: photo placeholders by photo id. Never an
 * event's brand. Desktop-first to the DashEvents/DashLive/DashPhotos/DashCreate/DashQR
 * artboards; below 760px it follows DashLiveMobile. */

/* Light and dark: one set of variables, each with its light and its dark value
 * (light-dark()), picked by the page's color-scheme. It follows the system unless the
 * owner chose one on Account (users.theme, <html data-theme>); signed-out pages follow
 * the system. Dark is the kit's dark surface (tokens.css .blisk-dark): black #0E0E0F
 * ground, Grey 900 cards, white #F2F1EC text, Grey 400 secondary text, the functional
 * colours' dark values. Print is always light. */
:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media print { :root, :root[data-theme] { color-scheme: light; } }

:root {
  --bg: light-dark(var(--blisk-white), var(--blisk-black));
  --side: light-dark(#ffffff, var(--blisk-grey-900));
  --card: light-dark(#ffffff, var(--blisk-grey-900));
  --field: light-dark(#faf9f6, #141416);
  --active: light-dark(#e9e8e2, var(--blisk-grey-800));
  --tile: light-dark(var(--blisk-grey-200), var(--blisk-grey-800));
  --border: light-dark(var(--blisk-grey-200), var(--blisk-grey-800));
  --border-strong: light-dark(#cac9c2, var(--blisk-grey-700));
  --ink: light-dark(var(--blisk-black), var(--blisk-white));
  --on-ink: light-dark(var(--blisk-white), var(--blisk-black));
  --body: light-dark(var(--blisk-grey-700), #d6d5cf);
  /* The kit has one secondary text grey per surface: Grey 600 on light (6.7:1), Grey 400 on dark (7.5:1). */
  --muted: light-dark(var(--blisk-grey-600), var(--blisk-grey-400));
  --faint: var(--muted);
  --action-bg: var(--ink);
  --action-text: var(--on-ink);
  --action-hover: light-dark(var(--blisk-grey-700), var(--blisk-grey-200));
  /* Photo overlays (badges, chips on a tile): a plate in the page's surface. */
  --plate: light-dark(rgba(255, 255, 255, 0.94), rgba(14, 14, 15, 0.88));

  /* The kit's functional colours (tokens.css), light and dark surface. */
  --good: light-dark(#2A7348, #5FBF86);
  --good-hover: light-dark(#17622a, #7fd3a2);
  --good-dot: light-dark(#3fa34d, #5FBF86);
  --good-bg: light-dark(#e8f3ea, #15291d);
  --warn: light-dark(#8A5F00, #E0A830);
  --warn-soft: light-dark(#8f6220, #d6a25a);
  --warn-bg: light-dark(#fdf5ea, #2a2112);
  --warn-border: light-dark(#f0dab8, #5a4520);
  --bad: light-dark(#B23A2C, #E8695A);
  --bad-bg: light-dark(#fdeceb, #2d1715);
  --bad-border: light-dark(#eab8b2, #6b2f28);
  /* Text on a filled status colour (approve, a flag, a hovered badge). */
  --on-status: light-dark(#ffffff, var(--blisk-black));

  --r-card: var(--blisk-radius-md);
  --r-control: var(--blisk-radius-sm);
  --r-tile: var(--blisk-radius-sm);
  --side-w: 220px;
  /* The content column: at most --content-w wide, centred between the sidebar and the
     window's edge, --content-gutter on both sides (more on a wide window, the same left and right).
     A page of forms or reading is --form-w wide (.content--narrow), and so is an editor's column
     once its preview goes below it (.content--split). */
  --content-w: 1200px;
  --form-w: 760px;
  --content-gutter: 40px;
  /* Spacing, the same on every page: between cards side by side or one under another
     (--card-gap), between a page's bands (the Overview's health row, its number cards
     and the cards under them: --section-gap), and inside a card (--card-pad). */
  --card-gap: 24px;
  --section-gap: 32px;
  --card-pad: 24px;

  --sans: var(--blisk-font);
  --display: var(--blisk-font);
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

/* Photo placeholders while a thumbnail loads: a film tone picked by the photo's id
   (the `film(id)` class), so a photo keeps its colour from one visit to the next: the
   kit's soft tint on light, its base colour sunk towards black on dark. */
.film-0 { --tile: light-dark(var(--blisk-clay-soft), color-mix(in srgb, var(--blisk-clay) 45%, var(--blisk-black))); }
.film-1 { --tile: light-dark(var(--blisk-slate-soft), color-mix(in srgb, var(--blisk-slate) 45%, var(--blisk-black))); }
.film-2 { --tile: light-dark(var(--blisk-ochre-soft), color-mix(in srgb, var(--blisk-ochre) 45%, var(--blisk-black))); }
.film-3 { --tile: light-dark(var(--blisk-moss-soft), color-mix(in srgb, var(--blisk-moss) 45%, var(--blisk-black))); }
.film-4 { --tile: light-dark(var(--blisk-plum-soft), color-mix(in srgb, var(--blisk-plum) 45%, var(--blisk-black))); }
.film-5 { --tile: light-dark(var(--blisk-olive-soft), color-mix(in srgb, var(--blisk-olive) 45%, var(--blisk-black))); }

/* The kit's logos come black (for light grounds) and white (for dark ones): a page
   carries both and shows the one for its surface. */
.on-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-light { display: none !important; }
  :root:not([data-theme="light"]) .on-dark { display: revert !important; }
}
:root[data-theme="dark"] .on-light { display: none !important; }
:root[data-theme="dark"] .on-dark { display: revert !important; }
@media print { .on-dark { display: none !important; } .on-light { display: revert !important; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--sans); color: var(--ink); background: var(--bg); }
h1, h2 { font-family: var(--display); margin: 0; }
h1 { font-size: 28px; font-weight: var(--blisk-weight-black); line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: 18px; font-weight: var(--blisk-weight-bold); letter-spacing: -0.02em; }
a { color: inherit; }
img { max-width: 100%; }
code, pre { font-family: var(--mono); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.ink { color: var(--ink); }
.center { text-align: center; }
.bad { color: var(--bad); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* --- Shell ------------------------------------------------------------------- */

.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }

.side {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; flex-direction: column;
  padding: 20px 10px 20px;
  background: var(--side);
  border-right: 1px solid var(--border);
}
/* The horizontal lockup, 28px tall: over the kit's 24px minimum, with its clear space
   (a quarter of the mark's height) inside the padding. */
.side__brand { display: block; padding: 0 12px 22px; line-height: 0; }
.side__brand img { display: block; width: auto; height: 28px; }
.side__nav { display: flex; flex-direction: column; gap: 2px; }
.side__link, .side__back {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-tile);
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}
.side__link:hover, .side__back:hover { background: var(--bg); color: var(--ink); }
.side__link.is-active { background: var(--active); color: var(--ink); font-weight: 600; }
.side__link svg, .side__back svg { flex: none; }
.side__label {
  margin: 18px 12px 6px;
  font-size: var(--blisk-size-label); font-weight: var(--blisk-weight-medium); letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side__foot { margin-top: auto; padding: 0 12px; font-size: 13px; color: var(--muted); }
.side__account { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.side__email { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The theme switch beside the email: sun, moon, system (Account → Appearance has it too). */
.themeswitch { display: flex; flex: none; padding: 2px; border-radius: 8px; background: var(--active); }
.themeswitch__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: 6px;
  background: none; color: var(--muted);
  cursor: pointer;
}
.themeswitch__btn:hover { color: var(--ink); }
.themeswitch__btn[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.themeswitch__btn svg { width: 14px; height: 14px; }
.side__help { display: inline-block; margin: 2px 0 6px; }

/* A fold (<details class="fold">): what a first visit doesn't need, one click away. */
.fold > summary {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; list-style: none;
  font-weight: 600; font-size: 14px; color: var(--ink);
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before {
  content: ""; width: 7px; height: 7px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform 120ms;
}
.fold[open] > summary::before { transform: rotate(45deg); }
.fold > summary:hover { text-decoration: underline; }
.fold__body { margin-top: 14px; display: grid; gap: 16px; }
.card.fold > summary { font: 600 15px/1.3 var(--sans); }
.card.fold:not([open]) { padding-block: 16px; }

/* A header's "More" menu (<details class="menu">): the rarer actions under one button. */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu__list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  display: flex; flex-direction: column; min-width: 220px; padding: 6px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.menu__list form { display: block; }
.menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: var(--r-tile);
  background: none; color: var(--ink); font: 500 14px/1.3 var(--sans); text-align: left; text-decoration: none;
  cursor: pointer;
}
.menu__item:hover { background: var(--active); }
.menu__item--danger { color: var(--bad); }

.linkbtn { padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.linkbtn:hover { color: var(--ink); text-decoration: underline; }

.content {
  width: 100%; max-width: calc(var(--content-w) + 2 * var(--content-gutter));
  margin-inline: auto;
  padding: 28px var(--content-gutter) 48px;
}
.content--narrow { max-width: calc(var(--form-w) + 2 * var(--content-gutter)); }

@media (min-width: 761px) { .mobile-only { display: none !important; } }

/* --- Page header ----------------------------------------------------------------- */

.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.head--wrap { flex-wrap: wrap; }
.head--stacked { display: block; }
.head--stacked p { margin: 6px 0 0; }
.head__title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.head__text { min-width: 0; }
.head__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.head__sub { font-size: 14px; color: var(--muted); }
.head__actions { display: flex; gap: 12px; flex: none; }
.head__actions form { display: contents; }

/* --- Controls ----------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  font: 600 14px/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn--primary { background: var(--action-bg); color: var(--action-text); }
.btn--primary:hover { background: var(--action-hover); }
.btn--secondary { background: var(--card); border-color: var(--border-strong); color: var(--ink); }
.btn--secondary:hover { background: var(--bg); }
.btn--quiet { background: transparent; border-color: var(--border); color: var(--muted); }
.btn--quiet:hover { color: var(--ink); background: var(--card); }
.btn--approve { background: var(--good); color: var(--on-status); }
.btn--approve:hover { background: var(--good-hover); }
.btn--danger { background: var(--card); border-color: var(--bad-border); color: var(--bad); }
.btn--danger:hover { background: var(--bad-bg); }
.btn--lg { height: 52px; padding: 0 26px; font: 600 16px/1 var(--display); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: default; pointer-events: none; }

.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  background: var(--card);
  color: var(--ink);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--card-pad);
}
/* Cards one under another in the page's flow; a grid of cards sets its gap to the same. */
.content > .card + .card { margin-top: var(--card-gap); }
.card__title { font: 600 15px/1.3 var(--sans); margin-bottom: 12px; }
.card--tint { background: var(--active); border-color: transparent; }
.card--tint p { margin: 0; }
.empty-card { text-align: center; padding: 40px 24px; }
.empty-card p { margin: 8px 0 18px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px;
  border-radius: 999px;
  font: 700 12px/1 var(--sans); letter-spacing: 0.05em;
  flex: none;
}
.badge--live { background: var(--good-bg); color: var(--good); }
.badge--upcoming { background: var(--active); color: var(--body); }
.badge--ended { background: var(--active); color: var(--faint); }
/* A public demo's header (pipeline/demo.py): its numbers are made up. */
.badge--demo { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-border); }
/* The read-only demo dashboard (web/demo.py): what would change something is drawn disabled. */
[data-demo] [data-demo-off] { cursor: not-allowed; }
[data-demo] [data-demo-off][aria-disabled="true"] { opacity: 0.55; }
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good-dot); }

.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot--good { background: var(--good-dot); }
.dot--bad { background: var(--bad); }

.notice {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--r-control);
  background: var(--good-bg);
  color: var(--good);
  font-size: 14px;
}
.notice--error { background: var(--bad-bg); color: var(--bad); }

/* --- Events list ---------------------------------------------------------------- */

/* One column; two on a wide window. A row: the cover (a film tint without one), the name over
   date · address, and a right-hand column with the status over the counts, right-aligned so
   they line up from row to row. */
.rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 1440px) { .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; } }
.rows > li { display: flex; min-width: 0; }
.row {
  flex: 1; min-width: 0;
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 10px 16px 10px 10px;
  text-decoration: none;
  transition: border-color 120ms;
}
.row:hover { border-color: var(--border-strong); }
.row--ended { background: var(--field); }
.row--ended .row__name { color: var(--body); }
.row__thumb { display: block; width: 48px; height: 48px; overflow: hidden; border-radius: var(--r-tile); background: var(--tile); }
.row__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.row__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row__name { font: 600 16px/1.3 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__meta { font-size: 13px; line-height: 1.4; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__meta > span + span::before { content: " · "; }
.row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.row__side .badge { height: 24px; padding: 0 10px; font-size: 11px; }
.row__stats { display: flex; gap: 14px; font-size: 13px; line-height: 1.2; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row__stats strong { color: var(--ink); font-weight: 700; }

/* --- Overview ----------------------------------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--card-gap); margin-bottom: var(--section-gap); }
.stat__label { font-size: 14px; color: var(--muted); }
.stat__value { font: 700 34px/1.2 var(--display); margin: 2px 0; font-variant-numeric: tabular-nums; }
.stat__sub { font-size: 14px; color: var(--muted); }
.stat__sub.is-good { color: var(--good); }
.stat__sub.is-bad { color: var(--bad); }

/* A grid of cards: each as tall as its own content, not the row's tallest. */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--card-gap); align-items: start;
         margin-block: var(--card-gap); }
.split--single { grid-template-columns: minmax(0, 1fr); }

.status, .banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.status__title, .banner__title { font-weight: 600; font-size: 16px; }
.status__text, .banner__text { font-size: 14px; color: var(--muted); }
.banner--pending { background: var(--warn-bg); border-color: var(--warn-border); text-decoration: none; }
.banner--pending .banner__title, .banner--pending .banner__cta { color: var(--warn); }
.banner--pending .banner__text { color: var(--warn-soft); }
.banner__cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.banner--flagged { background: var(--bad-bg); border-color: var(--bad-border); text-decoration: none; }
.banner--flagged .banner__title, .banner--flagged .banner__cta { color: var(--bad); }
.banner--flagged .banner__text { color: var(--body); }
.banners { display: grid; gap: var(--card-gap); }

/* Guest trust: hide requests and new-photo emails (Overview). Counts and times
   only: no faces, no photos, no addresses. */
.trust { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--card-gap); align-items: start;
         margin: 0 0 var(--card-gap); }
.trust__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.trust__head h2 { margin: 0; font-size: 16px; }
.trust__head svg { color: var(--muted); flex: none; }
.trust__nums { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 12px; }
.trust__num { font: 700 24px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.trust__label { font-size: 13px; color: var(--muted); }
.trust__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.trust__row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.trust__row time { font-variant-numeric: tabular-nums; }
.trust__state { color: var(--muted); white-space: nowrap; }
.trust__side { display: grid; gap: var(--card-gap); align-content: start; }
.trust p { margin: 0; }
.trust .trust__foot { margin-top: 12px; }

.strip__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.strip__all { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; }
.strip__all:hover { color: var(--ink); }
.strip__grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.strip__thumb { display: block; aspect-ratio: 1; border-radius: var(--r-tile); overflow: hidden; background: var(--tile); }
.strip__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.strip p { margin: 0; }

/* --- Photos -------------------------------------------------------------------- */

.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center;
  height: 40px; padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--card);
  color: var(--body);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.chip--pending.is-active { background: var(--warn-bg); border-color: var(--warn-soft); color: var(--warn); }
.chip--flagged.is-active { background: var(--bad-bg); border-color: var(--bad-border); color: var(--bad); }

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px 12px 20px;
  margin-bottom: 16px;
}
.toolbar__all { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; cursor: pointer; }
.toolbar__all input { width: 18px; height: 18px; accent-color: var(--good); }
.toolbar__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.pcell {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--r-control);
  background: var(--tile);
}
.pcell__open { position: absolute; inset: 0; display: block; }
a.pcell__open { cursor: zoom-in; }
.pcell img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pcell--hidden img { opacity: 0.55; }
/* The selection hit area: the corner around the box, big enough for a thumb. */
.pcell__select { position: absolute; top: 0; left: 0; z-index: 1; width: 52px; height: 52px; cursor: pointer; }
.pcell__check { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pcell__box {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.55);
  color: transparent;
}
.pcell::after {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.pcell:has(.pcell__check:checked)::after { box-shadow: inset 0 0 0 3px var(--good); }
.pcell__check:checked + .pcell__box { background: var(--good); border-color: var(--good); color: var(--on-status); }
.pcell:has(.pcell__check:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.pcell__open:focus-visible { outline-offset: -3px; border-radius: inherit; }
.pcell__none {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 12px;
  font-size: 12px; color: var(--faint); text-align: center; word-break: break-all;
}
.pbadge {
  position: absolute; left: 10px; bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--plate);
  font: 700 11px/1 var(--sans); letter-spacing: 0.06em;
  color: var(--muted);
}
/* Guests' opens · downloads (pipeline/photostats.py): top right, on the photo's plate. */
.pstat {
  position: absolute; top: 10px; right: 10px;
  padding: 4px 8px; border-radius: 999px;
  background: var(--plate); color: var(--ink);
  font: 600 11px/1 var(--sans); font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.pcell--flagged .pstat { display: none; }
/* The Photos page's order: a quiet row of links under the tabs. */
.sorts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: -4px 0 16px; }
.sorts__link { color: var(--muted); text-decoration: none; }
.sorts__link:hover { text-decoration: underline; }
.sorts__link.is-active { color: var(--ink); font-weight: 600; }
.pbadge--pending { color: var(--warn); }
.pbadge--failed { color: var(--bad); }
/* Auto-moderation's reason, while the photo waits for the owner. */
.pflag {
  position: absolute; top: 10px; right: 10px; max-width: calc(100% - 56px);
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--bad);
  color: var(--on-status);
  font: 600 11px/1 var(--sans);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pflag svg { flex: none; }
.pflag[hidden] { display: none; }
/* A weak shot (pipeline/quality.py; only published photos, so never beside a flag): a button
   that keeps it in the gallery while weak shots are hidden. */
.pweak {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  padding: 5px 9px;
  border: 0; border-radius: 999px;
  background: var(--warn-bg); color: var(--warn);
  font: 700 11px/1 var(--sans); letter-spacing: 0.04em;
  cursor: pointer;
}
.pweak:hover, .pweak:focus-visible { background: var(--warn); color: var(--on-status); }
.pweak.is-kept { background: var(--plate); color: var(--muted); }
/* Why it's weak, under the badge while it's hovered or focused. */
.pweak__tip {
  position: absolute; top: 40px; right: 8px; left: 8px; z-index: 3;
  display: none;
  padding: 8px 10px;
  border-radius: var(--r-control);
  background: var(--ink); color: var(--on-ink);
  font-size: 12px; line-height: 1.4;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.pweak__tip strong { display: block; font-weight: 600; }
.pweak:hover + .pweak__tip, .pweak:focus-visible + .pweak__tip { display: block; }

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 20px 0 0; }
.footnote { margin: 16px 0 0; }

/* --- Upload ----------------------------------------------------------------------- */

.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 44px 24px;
  border: 2px dashed var(--border-strong);
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone.is-over { border-color: var(--ink); background: var(--active); }
.dropzone__icon {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--active); color: var(--body);
}
.dropzone__title { margin: 0; font: 600 18px/1.3 var(--display); }
.dropzone__or { margin: -4px 0 2px; font-size: 13px; }
.dropzone label.btn:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.dropzone__note { max-width: 460px; margin: 4px 0 0; }

.upload-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 16px; padding: 14px 16px 14px 20px;
}
.upload-summary__text { margin: 0; font-weight: 600; }

.uploads { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.upload {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 16px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
}
.upload__name { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-weight: 600; font-size: 14px; }
.upload__file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload__name small { flex: none; font-weight: 400; color: var(--faint); }
.upload__state { font-size: 13px; color: var(--muted); white-space: nowrap; text-align: right; }
.upload__bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--active); overflow: hidden; }
.upload__bar span { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.2s; }
.upload--done .upload__state { color: var(--good); }
.upload--done .upload__bar span { background: var(--good); }
.upload--processing .upload__state { color: var(--body); }
.upload--duplicate .upload__state { color: var(--faint); }
.upload--rejected .upload__state, .upload--failed .upload__state,
.upload--failed-processing .upload__state { color: var(--bad); }
.upload--rejected .upload__bar, .upload--duplicate .upload__bar { display: none; }

/* --- Forms ------------------------------------------------------------------------ */

.form--card { margin-top: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.field--date { max-width: 300px; }
.field__label { font-weight: 600; font-size: 15px; color: var(--ink); }
.field__help { font-size: 13px; color: var(--faint); line-height: 1.45; }
.field__error { font-size: 13px; color: var(--bad); }
.input {
  width: 100%; height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-control);
  background: var(--field);
  font: 16px/1 var(--sans);
  color: var(--ink);
}
.input:focus { outline: 2px solid var(--ink); outline-offset: -1px; background: var(--card); }
.input[aria-invalid="true"], .input.is-invalid { border-color: var(--bad); }
.input--mono { font: 13px/1 var(--mono); }
.input--prefixed { display: flex; align-items: center; background: var(--active); padding-right: 0; }
.input--prefixed:focus-within { outline: 2px solid var(--ink); outline-offset: -1px; }
.input__prefix { color: var(--muted); white-space: nowrap; flex: none; }
.input--prefixed input {
  flex: 1; min-width: 0; height: 100%;
  padding: 0 16px 0 0;
  border: 0; background: transparent;
  font: 700 16px/1 var(--sans); color: var(--ink);
}
.input--prefixed input:focus { outline: none; }
.rule { border: 0; border-top: 1px solid var(--border); margin: 6px 0 22px; }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 22px; cursor: pointer; }
.toggle--static { cursor: default; }
.toggle__text { display: flex; flex-direction: column; gap: 4px; }
.toggle__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle__switch {
  position: relative; flex: none;
  width: 58px; height: 34px;
  border-radius: 999px;
  background: light-dark(#dcdad3, var(--blisk-grey-700));
  transition: background 150ms;
}
.toggle__switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 28px; height: 28px; border-radius: 50%;
  background: light-dark(#ffffff, var(--blisk-white));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 150ms;
}
.toggle__input:checked + .toggle__switch { background: var(--ink); }
.toggle__input:checked + .toggle__switch::after { transform: translateX(24px); background: var(--on-ink); }
.toggle__input:focus-visible + .toggle__switch { outline: 3px solid var(--ink); outline-offset: 2px; }

.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.form__foot p { margin: 0; max-width: 360px; }

.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; margin: 0 0 20px; }
.facts dt { color: var(--muted); }
/* A long email address breaks rather than pushing the page sideways on a phone. */
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* --- QR & share -------------------------------------------------------------------- */

.share { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--card-gap); align-items: start; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.qr__code {
  width: 100%; max-width: 280px;
  padding: 20px;
  /* Dark modules on white in either mode: what a phone's camera reads. */
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.qr__code svg { display: block; width: 100%; height: auto; }
/* Side by side, stacked when there isn't room for both (a 320 px phone). */
.qr__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; width: 100%; }
.qr p { margin: 0; }
.stack { display: flex; flex-direction: column; gap: var(--card-gap); }
.stack .card p { margin: 10px 0 0; }
.copy { display: flex; gap: 10px; }
.copy .input { height: 48px; }
.copy .btn { height: 48px; min-width: 88px; }
.code {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: var(--r-tile);
  background: var(--bg);
  font-size: 12px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-all;
  color: var(--body);
}

/* --- Sign in ------------------------------------------------------------------------ */

.auth {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px;
}
.auth__brand { margin-bottom: 28px; line-height: 0; }
.auth__brand img { display: block; width: auto; height: 36px; }
.auth__card { width: 100%; max-width: 420px; padding: 32px; }
.auth__card h1 { font-size: 24px; margin-bottom: 8px; }
.auth__card > p { margin: 0 0 16px; }
.auth__card .form { margin-top: 20px; }
.auth__card .field { margin-bottom: 16px; }
.auth__lang { margin: 16px 0 0; }
.auth__lang a { color: var(--muted); }
.auth__icon {
  width: 52px; height: 52px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--active);
}

/* --- Website editor ----------------------------------------------------------------- */

.wsite { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: var(--card-gap); align-items: start; }
.wsite__editor { min-width: 0; }
.wsite__editor > .card + .card, .wsite__editor > .card + form, .wsite__editor > form + .card { margin-top: var(--card-gap); }
.wsite__actions { flex-wrap: wrap; align-items: center; }
.wsite__saving { min-height: 20px; margin: 0 0 8px; }
.wsite__lead { margin: 0 0 12px; }
/* Advanced's groups: folded cards, each with its current state after the title. */
.advgroup > summary { width: 100%; flex-wrap: wrap; }
.advgroup__state { margin-left: auto; font: 400 13px/1.3 var(--sans); color: var(--muted); }
.advgroup .form { display: grid; gap: 16px; }
/* Face search: two lines, then the disclosure with its switch in a fold. */
.facesearch { display: grid; gap: 8px; }
.facesearch__fold .fold__body { gap: 10px; }
.facesearch__nothing { display: grid; gap: 8px; justify-items: start; }
.facesearch__nothing p { margin: 0; }
.guide__pending { display: grid; gap: 8px; justify-items: start; }
.guide__pending p { margin: 0; }
.wsite__custom p + p { margin-top: 12px; }
.notice--warn { background: var(--warn-bg); color: var(--warn); }
.btn--sm { height: 36px; padding: 0 12px; font-size: 13px; }
.input--area { height: auto; min-height: 96px; padding: 12px 16px; line-height: 1.5; resize: vertical; }
.input--color { width: 72px; height: 44px; padding: 4px; cursor: pointer; }
.input--color[data-off] { opacity: 0.35; }
[data-autosave].is-autosaving .form-save { display: none; }

/* The editor's tabs wrap to a second row rather than cut the last one off (the split column is narrow). */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; padding: 4px; border-radius: var(--r-control); background: var(--active); }
.tabs__tab { flex: 1 0 auto; padding: 9px 14px; border-radius: 9px; text-align: center; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--muted); white-space: nowrap; }
.tabs__tab:hover { color: var(--ink); }
.tabs__tab.is-active { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--active); }
.seg__btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 8px; background: none; font: 600 13px/1 var(--sans); color: var(--muted); cursor: pointer; }
.seg__btn.is-active, .seg__btn:has(input:checked) { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.seg--form .seg__btn { padding: 10px 16px; font-size: 14px; }
.seg--form input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg--form .seg__btn:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 1px; }

.choices { display: flex; flex-direction: column; gap: 6px; }
.choice, .check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.choice { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-tile); }
.choice:has(input:checked) { border-color: var(--ink); background: var(--field); }
.choice input, .check input { width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.check { font-size: 14px; color: var(--muted); }
fieldset.field { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
fieldset.field > legend { padding: 0; margin-bottom: 8px; }
.colors { display: flex; flex-wrap: wrap; gap: 24px; }
.colors .field { margin-bottom: 8px; }
.colors + .field__help { display: block; margin-bottom: 22px; }

.tplpick { border: 0; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tplpick legend { margin-bottom: 10px; }
.tplcard { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border-strong); border-radius: var(--r-card); cursor: pointer; }
.tplcard:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tplcard:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.tplcard__input { position: absolute; opacity: 0; }
.tplcard__name { font: 600 15px/1.2 var(--display); }
.tplcard__blurb { font-size: 13px; color: var(--muted); line-height: 1.4; }
/* A phone-width screenshot of each template's seeded demo, top of the page. */
.tplcard__shot {
  display: block;
  width: 100%; height: auto;
  aspect-ratio: 390 / 560;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--tile);
}

/* New event: what kind of event it is (pipeline/eventtypes.py). */
.typepick__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.typecard { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--border-strong); border-radius: var(--r-card); cursor: pointer; }
.typecard:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.typecard:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.typecard__input { position: absolute; opacity: 0; }
.typecard__name { font: 600 15px/1.2 var(--display); }
.typecard__blurb { font-size: 13px; color: var(--muted); line-height: 1.4; }
.typecard:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tplgroup + .tplgroup { margin-top: 20px; }
.tplgroup__title { margin: 0 0 10px; font: 600 13px/1.3 var(--sans); color: var(--muted); }

.imagefield__row { display: flex; align-items: center; gap: 14px; }
.imagefield__preview { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-tile); background: var(--tile); border: 1px solid var(--border); flex: none; }
.imagefield__preview--sm { width: 44px; height: 44px; object-fit: contain; background: var(--card); }
.imagefield__controls { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.imagefield__file { max-width: 100%; font-size: 13px; }

.blocklist { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.blockrow {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--r-tile);
  background: var(--card);
}
.blockrow.is-off .blockrow__text { opacity: 0.5; }
.blockrow.is-dragging { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14); border-color: var(--ink); position: relative; z-index: 2; }
.blockrow--footer { margin-top: 16px; }
.blockrow__handle { display: flex; align-items: center; justify-content: center; width: 28px; height: 36px; color: var(--faint); cursor: grab; touch-action: none; flex: none; }
.blockrow__handle:active { cursor: grabbing; }
.blockrow__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.blockrow__name { font-weight: 600; }
.blockrow__summary { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blockrow__moves { display: flex; gap: 2px; }
.movebtn { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--muted); cursor: pointer; }
.movebtn:hover { color: var(--ink); }
.blockrow:first-child .movebtn[data-move="up"], .blockrow:last-child .movebtn[data-move="down"] { visibility: hidden; }
.blockrow__always { white-space: nowrap; }
.toggle--compact { margin: 0; gap: 0; }
.toggle--compact .toggle__switch { width: 44px; height: 26px; }
.toggle--compact .toggle__switch::after { width: 20px; height: 20px; }
.toggle--compact .toggle__input:checked + .toggle__switch::after { transform: translateX(18px); }
.addblock { display: flex; align-items: flex-end; gap: 12px; }
.addblock .field { flex: 1; margin: 0; }
.addblock .btn { height: 52px; }
.backlink { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; font-size: 14px; color: var(--muted); text-decoration: none; }
.backlink:hover { color: var(--ink); }
.remove-block { margin-top: 12px; }

.rowlist { gap: 10px; }
.rowset { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 8px; align-items: center; }
.rowset--sponsor { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1.2fr); }
.rowset--sponsor .imagefield__preview { grid-column: 1; grid-row: 1; }
.rowset--sponsor input[name$="-name"] { grid-column: 2; grid-row: 1; }
.rowset--sponsor input[name$="-url"] { grid-column: 3; grid-row: 1; }
.rowset--sponsor .imagefield__file, .rowset--sponsor .check, .rowset--sponsor select { grid-column: 2 / -1; }
.rowset--session { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.rowset--session .check { grid-column: 1 / -1; }
.rowset .input { height: 44px; }
.rowset .field__error { grid-column: 1 / -1; }
.rowset:has(input[name$="-remove"]:checked) .input { opacity: 0.4; text-decoration: line-through; }

.domainrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.domainrow__name { font: 600 17px/1.3 var(--mono); overflow-wrap: anywhere; }
.domainform { display: flex; align-items: flex-end; gap: 12px; }
.domainform .field { flex: 1; margin: 0; }
.domainform .btn { height: 52px; }
.dnstable { width: 100%; border-collapse: collapse; margin: 4px 0 12px; font-size: 14px; }
.dnstable th { text-align: left; font-size: 12px; color: var(--faint); font-weight: 600; padding: 0 8px 6px 0; }
.dnstable td { padding: 10px 8px 10px 0; border-top: 1px solid var(--border); vertical-align: middle; overflow-wrap: anywhere; }
.dnstable td .btn { margin-left: 8px; }
#domain form + form { margin-top: 12px; }

.wsite__preview { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.preview-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.preview-bar a { margin-left: auto; font-weight: 600; }
.preview-frame { display: flex; justify-content: center; height: min(78vh, 820px); padding: 12px; border-radius: var(--r-card); background: var(--active); overflow: hidden; }
.preview-frame__iframe { width: 390px; max-width: 100%; height: 100%; border: 0; border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.preview-frame__iframe[data-width="full"] { width: 100%; }

/* --- Tablet ------------------------------------------------------------------------ */

@media (max-width: 1100px) {
  :root { --content-gutter: 28px; }
  .content { padding-block: 24px 40px; }
  /* Four header buttons crowd the title into a narrow column: let them wrap below it. */
  .head { flex-wrap: wrap; }
  .head__title { flex: 1 1 320px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .strip__thumb:nth-child(n+7) { display: none; }
  .share { grid-template-columns: minmax(0, 1fr); }
  .qr { max-width: 480px; }
  .wsite { grid-template-columns: minmax(0, 1fr); }
  .wsite__preview { position: static; }
  /* The editors and QR & share in one column: the form column's width, centred. */
  .content--split { max-width: calc(var(--form-w) + 2 * var(--content-gutter)); }
}

/* --- Phone (DashLiveMobile) ------------------------------------------------------- */

@media (max-width: 760px) {
  .desktop-only { display: none !important; }

  body { font-size: 15px; }
  h1 { font-size: 22px; }

  .shell { display: block; }
  .side {
    position: static; height: auto;
    flex-direction: row; align-items: center; gap: 8px;
    padding: 10px 16px;
    border-right: 0; border-bottom: 1px solid var(--border);
  }
  .side__brand { padding: 0 8px 0 0; flex: none; }
  .side__brand img { height: 24px; }
  .shell--event .side__brand, .side__back, .side__label, .side__foot { display: none; }
  /* Every item on screen: the links wrap to a second row rather than scroll off the edge. */
  .side__nav { flex-direction: row; flex-wrap: wrap; gap: 2px 4px; min-width: 0; }
  .side__link { padding: 8px 12px; font-size: 14px; white-space: nowrap; }
  .side__link--icon svg { display: none; }

  :root { --content-gutter: 16px; --card-gap: 16px; --section-gap: 24px; --card-pad: 16px 18px; }
  .content { padding-block: 18px 32px; }
  .head { margin-bottom: 18px; }
  .head--wrap { align-items: flex-start; }
  .head__title { flex: 1; }
  .head__row { justify-content: space-between; flex-wrap: nowrap; gap: 10px; }
  .head__row h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .head__actions .btn { padding: 0 14px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; }
  .chip { height: 36px; padding: 0 12px; }

  .stat__value { font-size: 28px; }
  .stat__sub { font-size: 13px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .banner__title { font-size: 15px; }
  .strip__head { margin-bottom: 12px; }
  .strip h2 { font-size: 16px; }
  .strip__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .strip__thumb:nth-child(n+5) { display: none; }
  .mobile-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }

  /* The status beside the name; date · address, then the counts, under both. */
  .row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 12px 10px 10px; }
  .row__thumb { width: 44px; height: 44px; grid-row: 1 / span 3; }
  .row__main, .row__side { display: contents; }
  .row__name { grid-column: 2; grid-row: 1; font-size: 15px; }
  .row .badge { grid-column: 3; grid-row: 1; }
  .row__meta { grid-column: 2 / 4; grid-row: 2; }
  .row__stats { grid-column: 2 / 4; grid-row: 3; gap: 12px; font-size: 12px; }

  .toolbar { flex-wrap: wrap; padding: 12px 14px; }
  .toolbar__actions { width: 100%; }
  .toolbar__actions .btn { flex: 1 1 30%; padding: 0 10px; }
  .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .pcell__box { top: 6px; left: 6px; }
  .pcell__select { width: 44px; height: 44px; }
  .pbadge { left: 6px; bottom: 6px; padding: 4px 7px; font-size: 10px; }
  .pflag { top: 6px; right: 6px; max-width: calc(100% - 50px); padding: 4px 6px; font-size: 10px; }
  /* Clear of the checkbox: the label wraps onto two lines on a narrow tile. */
  .pweak { top: 6px; right: 6px; max-width: calc(100% - 44px); padding: 4px 7px; font-size: 10px; line-height: 1.15; text-align: right; }
  /* A phone's tile is too small for more than the reason. */
  .pweak__tip { top: 42px; right: 4px; left: 4px; padding: 6px 8px; font-size: 11px; }
  .pweak__act { display: none; }
  .trust { grid-template-columns: minmax(0, 1fr); }

  .form--card { margin-top: 18px; }
  .field--date { max-width: none; }
  .input__prefix { font-size: 14px; }
  .form__foot { flex-direction: column-reverse; align-items: stretch; }
  .form__foot .btn { width: 100%; }

  .dropzone { padding: 28px 18px; }
  .upload-summary { flex-direction: column; align-items: stretch; text-align: center; }
  .upload { padding: 10px 12px; gap: 6px 10px; }

  .copy .btn { min-width: 72px; padding: 0 12px; }

  .wsite__actions { width: 100%; }
  .wsite__actions form { display: block; }
  .tplcard { padding: 8px; }
  .tplcard__blurb { display: none; }
  .blockrow { flex-wrap: wrap; gap: 8px 10px; }
  .blockrow__text { flex-basis: calc(100% - 100px); }
  .blockrow__moves { margin-left: 36px; }
  .blockrow > .btn { margin-left: auto; }
  .rowset, .rowset--sponsor, .rowset--session { grid-template-columns: minmax(0, 1fr); }
  .rowset--sponsor .imagefield__file, .rowset--sponsor .check,
  .rowset--sponsor input[name$="-name"], .rowset--sponsor input[name$="-url"], .rowset--sponsor select { grid-column: auto; grid-row: auto; }
  .addblock, .domainform { flex-direction: column; align-items: stretch; }
  .preview-frame { height: 70vh; padding: 8px; }
  .dnstable td .btn { margin: 6px 0 0; }
  .auth__card { padding: 24px 20px; }
}

/* --- Analytics (/dashboard/e/{slug}/analytics) -------------------------------------
 * One series per chart, in ink; bars rounded on top and square on the baseline,
 * recessive grid and labels. Peak hours set the busiest bars in ink, the rest pale. */
.analytics__updated { margin: -8px 0 16px; }
.analytics__section { margin-block: var(--card-gap); }
.analytics__sub { font: 600 13px/1.3 var(--sans); color: var(--muted); margin: 16px 0 6px; }
.analytics__sub:first-of-type { margin-top: 0; }
.chart { overflow-x: auto; }
/* A table with many columns scrolls inside its card on a phone, like the charts. */
.table-scroll { overflow-x: auto; }
.chart__svg { display: block; width: 100%; min-width: 560px; height: auto; font: 11px var(--sans); }
.chart__grid { stroke: var(--border); stroke-width: 1; }
.chart__grid--base { stroke: var(--border-strong); }
.chart__ylabel, .chart__xlabel { fill: var(--faint); font-variant-numeric: tabular-nums; }
.chart__value { fill: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart__bar { fill: var(--ink); }
.chart[data-chart="hour of day"] .chart__bar { fill: var(--border-strong); }
.chart[data-chart="hour of day"] .chart__bar--strong { fill: var(--ink); }
.chart__hit { fill: transparent; }
.chart__slot:hover .chart__hit { fill: var(--active); }
.chart__table { margin-top: 8px; font-size: 13px; }
.chart__table summary { cursor: pointer; color: var(--muted); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--border); }
.table td { padding: 8px; border-bottom: 1px solid var(--border); }
.table--compact td, .table--compact th { padding: 4px 8px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table__logo { display: block; max-height: 28px; max-width: 120px; }
.hbars { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.hbars__row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 14px; }
.hbars__track { display: block; height: 8px; border-radius: 4px; background: var(--tile); overflow: hidden; }
.hbars__fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--ink); min-width: 2px; }
.hbars__value { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.hbars__value strong { color: var(--ink); }
/* What worked (pipeline/photostats.py): a band of its own, its cards on the page's spacing. */
.worked { margin-block: var(--section-gap); }
.worked__head { margin-bottom: var(--card-gap); }
.worked__title { font: 700 20px/1.25 var(--sans); margin: 0 0 4px; }
.worked__head p { margin: 0; max-width: 72ch; }
.worked > .card + .card { margin-top: var(--card-gap); }
.worked__more { gap: var(--card-gap); }
.card__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card__row .card__title { margin-bottom: 12px; }
.nexttime { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 15px; line-height: 1.45; }
.nexttime li::marker { color: var(--muted); }
.funnel-table td:first-child { white-space: nowrap; }
.tops { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tops__item { margin: 0; }
.tops__open { display: block; aspect-ratio: 1; border-radius: var(--r-tile); overflow: hidden; background: var(--tile); }
.tops__open img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tops__item figcaption { margin-top: 4px; }
.summary { display: block; width: 100%; resize: vertical; line-height: 1.5; padding: 12px; margin-bottom: 12px; white-space: pre; overflow-x: auto; }
@media (max-width: 760px) {
  .tops { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .hbars__row { grid-template-columns: 96px minmax(0, 1fr) auto; gap: 8px; }
}

/* --- Photos: the Moments panel ----------------------------------------------------- */

.mpanel { margin-bottom: var(--card-gap); }
.mpanel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.mpanel__head p { margin: 0; max-width: 64ch; }
.mlist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; }
.mrow {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--r-tile);
}
.mrow.is-active { background: var(--active); }
.mrow.is-hidden .mrow__cover { opacity: 0.45; }
.mrow__cover { display: block; width: 52px; height: 52px; border-radius: var(--r-tile); overflow: hidden; background: var(--tile); }
.mrow__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mrow__main { display: grid; gap: 4px; min-width: 0; }
.mrow__rename { display: flex; gap: 6px; align-items: center; min-width: 0; }
.mrow__name { height: 36px; min-width: 0; flex: 1 1 auto; max-width: 320px; font-weight: 600; }
.mrow__meta { overflow-wrap: anywhere; }
.mrow__hidden { color: var(--warn); font-weight: 600; }
.mrow__actions { display: flex; gap: 6px; align-items: center; }
.mjoin { display: flex; justify-content: center; padding: 0 8px; }
.mjoin .linkbtn { color: var(--muted); padding: 2px 8px; }
.mview { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.mview p { margin: 0; }
.pcell--cover { outline: 3px solid var(--ink); outline-offset: 2px; }

@media (max-width: 760px) {
  .mpanel__head { flex-direction: column; }
  .mrow { grid-template-columns: 44px minmax(0, 1fr); }
  .mrow__cover { width: 44px; height: 44px; }
  .mrow__actions { grid-column: 2; flex-wrap: wrap; }
}

/* --- Photos: the Highlights tab (web/highlights_view.py) ---------------------------- */

.tabs--inline { display: inline-flex; margin: -8px 0 16px; }
.tabs--inline .tabs__tab { flex: none; padding: 8px 18px; }

.hpanel, .hadd { margin-bottom: var(--card-gap); }
.hpanel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.hpanel__head p { margin: 0; max-width: 72ch; }
.hpanel__head .hpanel__meta { margin-top: 6px; }
.hpanel__actions { display: flex; gap: 10px; flex: none; }
.hpanel__actions form { display: contents; }
.hfloor { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.hfloor label { font-weight: 600; color: var(--ink); }
.hfloor__input { width: 84px; height: 36px; }
.hfloor span { flex-basis: 100%; }

.hgrid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 14px;
}
.hcell {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-control);
  overflow: hidden;
  background: var(--tile);
  touch-action: pan-y;
}
.hcell.is-pinned { box-shadow: inset 0 0 0 2px var(--ink); }
.hcell.is-dragging { z-index: 2; opacity: 0.85; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.hcell__open { position: absolute; inset: 0; display: block; cursor: zoom-in; }
.hcell__open img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hcell.is-pinned .hcell__open img { opacity: 0.96; }
.hcell__pos, .hcell__pin, .pscore {
  position: absolute; z-index: 1;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--plate);
  font: 700 11px/1 var(--sans);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.hcell__pos { top: 8px; left: 8px; min-width: 24px; justify-content: center; }
.hcell__pin { top: 8px; left: 40px; letter-spacing: 0.04em; }
.pscore { right: 8px; bottom: 8px; }
.hcell__drag {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px;
  background: var(--plate);
  color: var(--ink);
  cursor: grab;
  touch-action: none;
}
.hcell.is-dragging .hcell__drag { cursor: grabbing; }
/* The score: what went into it, over the photo while the pointer or focus is on it. */
.hcell__score {
  position: absolute; left: 0; right: 0; bottom: 44px; z-index: 1;
  display: grid; gap: 2px;
  padding: 26px 10px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  color: #fff; font-size: 12px; line-height: 1.35;
  opacity: 0; transition: opacity 0.15s;
  pointer-events: none;
}
.hcell__score strong { font-size: 13px; }
.hcell:hover .hcell__score, .hcell:focus-within .hcell__score { opacity: 1; }
.hcell__actions {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; gap: 4px; justify-content: space-between;
  padding: 6px;
  background: rgba(0, 0, 0, 0.72);
}
.hcell__actions form { display: contents; }
.hbtn {
  height: 32px; min-width: 32px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff; font: 600 12px/1 var(--sans);
  cursor: pointer;
}
.hbtn:hover { background: rgba(255, 255, 255, 0.26); }
.hbtn--text { flex: 1; }
.hbtn--flip svg { transform: scaleX(-1); }
.hbtn--danger:hover { background: var(--bad); }
.hbtn[disabled] { opacity: 0.45; pointer-events: none; }

.toolbar--flat { margin: 12px 0; padding: 10px 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; }
.pgrid--small { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }

@media (max-width: 760px) {
  .tabs--inline { display: flex; margin-top: -4px; }
  .tabs--inline .tabs__tab { flex: 1 0 auto; }
  .hpanel__head { flex-direction: column; }
  .hpanel__actions { width: 100%; flex-wrap: wrap; }
  .hpanel__actions .btn { flex: 1; }
  .hgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pgrid--small { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}

/* --- Analytics: the event report ------------------------------------------------------ */

.report__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.report__actions form { display: contents; }
.report__actions .btn { min-width: 0; }
@media (max-width: 760px) {
  .report__actions .btn { flex: 1 1 100%; white-space: normal; height: auto; min-height: 44px; padding: 10px 14px; }
}

/* --- Account: the portfolio (templates/dashboard/account.html) ------------------------ */

.section-title { font: 600 20px/1.3 var(--display); color: var(--ink); margin: 36px 0 14px; }
.portfolio .card.form .form { margin: 0; }
.portfolio .form__foot { margin-top: 4px; }
.imagefield__preview--round { border-radius: 50%; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist .check { align-items: flex-start; color: var(--body); font-size: 15px; }
.checklist .check input { margin-top: 2px; }
.checklist .check span { min-width: 0; overflow-wrap: anywhere; }
.checklist .check.is-off { color: var(--faint); }

/* The event's video on the Highlights tab (web/highlights_view.py). */
.ereel { margin-bottom: var(--card-gap); }
.ereel__body { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: start; }
.ereel__text { display: grid; gap: 12px; min-width: 0; }
.ereel__text p { margin: 0; }
.ereel__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ereel__actions form { margin: 0; }
.ereel__video { width: 100%; aspect-ratio: 9 / 16; border-radius: var(--r-tile); background: var(--tile); }
@media (max-width: 760px) {
  .ereel__body { grid-template-columns: minmax(0, 1fr); }
  .ereel__video { max-width: 240px; }
}

/* --- Bib numbers (web/bibs_view.py) ------------------------------------------------ */

/* A tile's bibs: bottom right, the numbers; an unlinked one is outlined. */
.pbibs {
  position: absolute; right: 8px; bottom: 8px; max-width: calc(100% - 16px);
  display: flex; flex-wrap: wrap-reverse; justify-content: flex-end; gap: 4px;
  pointer-events: none;
}
.pbib {
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--on-ink);
  font: 700 11px/1 var(--sans); letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.pbib--unlinked { background: var(--plate); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
@media (max-width: 760px) { .pbibs { right: 6px; bottom: 6px; } .pbib { padding: 3px 5px; font-size: 10px; } }

/* The lightbox: the photo's bibs beside its status, and the editor over the photo.
   The viewer stays dark whatever the page, like its other controls. */
.lightbox__bibs { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.lightbox__bib {
  padding: 5px 9px;
  border-radius: 6px;
  background: #fff;
  color: #1c1b18;
  font: 700 12px/1 var(--sans);
  font-variant-numeric: tabular-nums;
}
.lightbox__bib--unlinked { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7); }
.lightbox__bibpanel {
  position: absolute; left: 50%; bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 64px);
  transform: translateX(-50%);
  width: min(560px, calc(100% - 24px));
  max-height: 50vh; overflow: auto;
  padding: 12px;
  border-radius: 12px;
  background: rgba(16, 18, 16, 0.94);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}
.lightbox__bibpanel[hidden] { display: none; }
.lightbox__bibrows { display: grid; gap: 8px; }
.lightbox__bibrow { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; margin: 0; }
.lightbox__bibrow--add { grid-template-columns: 90px minmax(0, 1fr) auto; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.lightbox__bibrow .input { min-height: 40px; padding: 6px 10px; background: #fff; color: #1c1b18; }
.lightbox__bibnote { margin: 8px 0 0; font-size: 13px; color: rgba(255, 255, 255, 0.85); }
.lightbox__bibnote:empty { display: none; }
@media (max-width: 480px) {
  .lightbox__bibrow { grid-template-columns: 72px minmax(0, 1fr); }
  .lightbox__bibrow--add { grid-template-columns: 72px minmax(0, 1fr) auto; }
}

/* The Bibs tab and a photo's bibs page. */
.bpanel__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.bpanel__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bpanel__actions form { margin: 0; }
.bpanel__upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: var(--form-w); }
.bpanel__upload .input { flex: 1 1 240px; min-width: 0; }
.bphoto { display: block; width: 100%; height: auto; border-radius: var(--r-control); }
.bibrow { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; align-items: end;
          padding: 0 0 12px; margin: 0 0 12px; border-bottom: 1px solid var(--border); }
.bibrow__actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.bibrow p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 760px) { .bpanel__head { flex-direction: column; } }

/* --- Sponsors (Analytics, and each sponsor's page) ----------------------------- */
.table__group th { padding-top: 16px; color: var(--ink); font-weight: 600; }
.table [data-sponsor-page] { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.cpm { margin-top: 16px; display: grid; gap: 6px; max-width: 520px; }
.cpm__row { display: flex; gap: 8px; }
.cpm__input { max-width: 160px; }
.cpm__revoke { margin-top: 8px; }
.sponsor-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: var(--card-gap); }
.sponsor-head__logo { max-height: 48px; max-width: 180px; }
.sponsor-share { display: flex; gap: 8px; }
.sponsor-share .input { flex: 1; min-width: 0; }
@media (max-width: 760px) {
  .table[data-sponsor-table] th:nth-child(5), .table[data-sponsor-table] td:nth-child(5) { display: none; }
}

/* A guest's own photo on the Photos page (c.guest_upload): above the status badge. */
.pguest {
  position: absolute; left: 10px; bottom: 38px; padding: 4px 9px; border-radius: 999px;
  background: var(--ink); color: var(--on-ink); font: 600 11px/1 var(--sans); pointer-events: none;
}

/* Two short fields side by side (the guests' moderation bands). */
.row--fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.input--narrow { max-width: 12rem; }

/* QR & share → Group links (web/compliance_view.py). */
.glink { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); }
.glink p { margin: 0; }
.glink--revoked { opacity: 0.6; }
[data-group-link-new] { margin-top: 12px; }
.qr--print { max-width: 520px; margin: 0 auto; text-align: center; }

/* --- Getting started: the guide on the Events page (web/onboarding.py) --------------- */

.guide { margin-bottom: var(--section-gap); }
.guide__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.guide__eyebrow { margin: 0 0 2px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase;
                  letter-spacing: 0.06em; }
.guide__count { margin: 0; font-size: 14px; color: var(--muted); white-space: nowrap; }
.guide__steps { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; }
.guide__step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; padding: 14px 0;
               border-top: 1px solid var(--border); }
.guide__marker {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border-strong); color: var(--muted); font: 600 14px/1 var(--display);
}
.guide__step.is-current .guide__marker { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.guide__step.is-done .guide__marker { background: var(--good-bg); border-color: var(--good-bg); color: var(--good); }
.guide__title { margin: 5px 0 0; font: 600 16px/1.3 var(--display); }
.guide__step:not(.is-current):not(.is-done) .guide__title { color: var(--muted); }
.guide__summary { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.guide__lead { margin: 6px 0 14px; color: var(--body); max-width: 640px; }
.guide__form { display: flex; flex-direction: column; gap: 18px; }
.guide__fields { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.guide__progress { margin: 0 0 12px; font-size: 15px; }
.guide__progress strong { font: 700 20px/1 var(--display); font-variant-numeric: tabular-nums; }
.guide__uploader .dropzone { padding: 24px; }
.guide__preview { display: flex; gap: 28px; align-items: flex-start; }
/* The guest page in a 390 px-wide frame at its own size, not scaled: the phone layout
   (the template's phone CSS, no desktop container) and the gallery as a guest scrolls it. */
.guide__phone {
  flex: none; width: 410px; padding: 10px; border-radius: 40px; background: var(--blisk-black);
  box-shadow: 0 0 0 1px var(--border-strong), 0 8px 24px rgba(28, 27, 24, 0.18);
}
.guide__phone iframe {
  display: block; width: 390px; height: 720px; border: 0; border-radius: 30px; background: var(--card);
}
.guide__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.guide__actions p { flex-basis: 100%; margin: 4px 0 0; }
.guide__preview .guide__actions { flex-direction: column; align-items: flex-start; }
.guide__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px;
               border-top: 1px solid var(--border); }
.guide__foot p { margin: 0; }
.guide-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

@media (max-width: 760px) {
  .guide__head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .guide__fields { grid-template-columns: minmax(0, 1fr); }
  .guide__foot { flex-direction: column; align-items: flex-start; }
}

/* --- The Overview's health row ----------------------------------------------------- */

.health { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; padding: 0; margin-bottom: var(--section-gap);
          overflow: hidden; }
.health__item { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; text-decoration: none;
                border-left: 1px solid var(--border); min-width: 0; }
.health__item:first-child { border-left: 0; }
a.health__item:hover { background: var(--active); }
.health__value { font: 700 20px/1.25 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap;
                 overflow: hidden; text-overflow: ellipsis; }
.health__label { font-size: 13px; color: var(--muted); }
.health__item.is-bad { background: var(--bad-bg); }
.health__item.is-bad .health__value, .health__item.is-bad .health__label { color: var(--bad); }
.health__item.is-warn .health__value { color: var(--warn); }
.health__item.is-good .health__value { color: var(--good); }

@media (max-width: 1100px) { .health { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .health__item:nth-child(4n + 1) { border-left: 0; }
  .health__item:nth-child(n + 5) { border-top: 1px solid var(--border); } }
@media (max-width: 480px) { .health { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health__item { border-left: 0; border-top: 1px solid var(--border); }
  .health__item:nth-child(2n) { border-left: 1px solid var(--border); }
  .health__item:nth-child(-n + 2) { border-top: 0; } }

/* --- Hide requests: the Photos page's Requests tab (web/requests_view.py) --------------- */

/* How many requests wait: beside Photos in the sidebar and on its tab. */
.count-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
  border-radius: 999px;
  background: var(--warn); color: var(--on-status);
  font: 700 11px/1 var(--sans); font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.rqbulk { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
.rqlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.rqrow {
  display: grid; grid-template-columns: auto 120px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 16px 0; border-top: 1px solid var(--border);
}
.rqrow:first-child { border-top: 0; }
.rqrow:not(:has(.rqrow__tick)) { grid-template-columns: 120px minmax(0, 1fr) auto; }
.rqrow__tick { display: flex; align-items: center; }
.rqrow__tick input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.rqrow__photo { position: relative; display: block; width: 120px; max-height: 160px; overflow: hidden; border-radius: var(--r-tile); }
.rqrow__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* The box the guest tapped, over the photo. */
.rqrow__box { position: absolute; border: 2px solid var(--warn); border-radius: 4px; box-shadow: 0 0 0 2px var(--plate); }
.rqrow__main { min-width: 0; display: grid; gap: 4px; }
.rqrow__main p { margin: 0; }
.rqrow__who { font-size: 14px; }
.rqrow__state { color: var(--good); }
.rqrow__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.rqrow__approve { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rqrow__as { display: flex; gap: 12px; margin: 0 4px 0 0; padding: 0; border: 0; }
.badge--blocked { height: 22px; padding: 0 8px; background: var(--bad-bg); color: var(--bad); font-size: 11px; }
@media (max-width: 760px) {
  .rqrow, .rqrow:not(:has(.rqrow__tick)) { grid-template-columns: auto 88px minmax(0, 1fr); }
  .rqrow:not(:has(.rqrow__tick)) { grid-template-columns: 88px minmax(0, 1fr); }
  .rqrow__photo { width: 88px; }
  .rqrow__actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* --- Help ---------------------------------------------------------------------------- */

.help { display: flex; flex-direction: column; gap: var(--card-gap); }
.help__step { display: grid; gap: 14px; }
.help__step h2 { margin-bottom: 6px; }
.help__step p, .help__step ul { margin: 6px 0; color: var(--body); }
.help__shot { margin: 0; max-width: 640px; }
.help__shot img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--r-tile); }
.help__shot figcaption { margin-top: 6px; font-size: 12px; color: var(--faint); }
.help__toc { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.help__disclosure { padding: 12px 14px; border-radius: var(--r-tile); background: var(--field); font-size: 14px; }

/* --- The operator's page (/ops, web/ops_view.py) ------------------------------------ */
.ops-incidents { margin-bottom: var(--section-gap); }
.ops-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ops-list__item { display: grid; gap: 2px; padding-left: 12px; border-left: 3px solid var(--border); }
.ops-list__item.is-open { border-left-color: var(--bad); }
.ops-list__title { font-weight: 600; }
.ops-list__text { font-size: 14px; }
.ops-list__meta { font-size: 13px; color: var(--muted); }
.ops-cleared { margin-top: 16px; }
.ops-cleared summary { cursor: pointer; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.ops-month { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
             margin-bottom: 14px; }
.ops-month .section-title { margin: 0; }
.ops-month__nav { display: flex; gap: 8px; }
.ops-table { min-width: 860px; }
.ops-table td { vertical-align: middle; }
.ops-table__name { display: block; font-weight: 600; }
.ops-table__slug { display: block; font-size: 13px; color: var(--muted); }
.ops-table__platform td { color: var(--muted); }
.ops-table__total th, .ops-table__total td { font-weight: 700; color: var(--ink); border-bottom: 0; }
.ops-prices { margin: 12px 0 0; }
.ops-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--card-gap); align-items: start;
             margin-top: var(--card-gap); }
@media (max-width: 1100px) { .ops-split { grid-template-columns: minmax(0, 1fr); } }
.ops-worked { margin-top: var(--card-gap); }

/* Photographers (pipeline/photographers.py): the event's Photographers card (the Upload page, its
   own page) and a photographer's pages (their events, an event's upload page). */
.footnote + .photographers, .footnote + .photographer__photos { margin-top: var(--card-gap); }
.plist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; }
.plist__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--border);
}
.plist__row:last-child { border-bottom: 1px solid var(--border); }
.plist__name { display: flex; gap: 8px; align-items: center; min-width: 0; }
.plist__name .input { max-width: 22rem; font-weight: 600; }
.plist__meta { grid-column: 1; margin: 0; overflow-wrap: anywhere; }
.plist__email { color: var(--body); }
.plist__actions { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.pstate--active { color: var(--ink); font-weight: 600; }
.pinvite { max-width: 760px; margin-top: 20px; }
.pinvite__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.photographers__privacy { margin: 16px 0 0; }
.rows--single { grid-template-columns: minmax(0, 1fr); }
.row--plain { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; }
.ownlist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 16px 12px; }
.ownlist__item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ownlist__thumb { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--r-tile); background: var(--tile); }
.ownlist__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ownlist__state { font-size: 13px; color: var(--muted); }
.ownlist__state--published { color: var(--good); }
.ownlist__state--waiting { color: var(--warn); }
.ownlist__state--failed { color: var(--bad); }
.ownlist__delete { margin: 0; }
.photographer__token { margin-top: var(--card-gap); }
@media (max-width: 760px) {
  .plist__row { grid-template-columns: minmax(0, 1fr); }
  .plist__actions { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .pinvite__fields { grid-template-columns: minmax(0, 1fr); }
  .ownlist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.photographers__error { margin: 16px 0 0; }
