/* demo-day.css — the demo-day widget (/assets/demo-day.js). Mobile first: everything is one
   column with ≥40px tap targets; wider screens only get more breathing room.

   ── THEMING ────────────────────────────────────────────────────────────────────────────────
   Nothing below hard-codes a colour, font, radius or shadow. Every one comes from a --dd-*
   token. The defaults derive from the house palette (--cyan, --surface, --text, …), so a
   standard Lunatechs page needs to do nothing at all.

   To match a page that isn't the house dark, set the tokens you care about on :root. A light
   page needs about a dozen, and this is the whole of it:

     :root { --dd-surface: var(--paper-2);  --dd-raised: #fff;     --dd-text: var(--ink);
             --dd-sec: #55606e;             --dd-dim: #6a737f;
             --dd-border: var(--line);      --dd-border-b: #d8d2c4;
             --dd-accent: #1a5fb4;          --dd-on-accent: #fff;  --dd-marker: #8a5d00;
             --dd-media-bg: var(--line);
             --dd-shadow-card: var(--shadow);
             --dd-danger: #b42318;          --dd-danger-line: rgba(180, 35, 24, .4);
             --dd-heart: #c0344b;
             --dd-bad-bg: #fef3f2;          --dd-bad-line: #fecdca;  --dd-bad-fg: #912018;
             --dd-bad-strong: #7a1710;
             --dd-ok-bg: #ecfdf3;           --dd-ok-line: #abefc6;   --dd-ok-fg: #067647; }

   The last six lines are the status colours. They are tuned for a dark page, so a light one
   has to say them — --dd-danger most of all: its default is a pale pink that all but vanishes
   on white, which is the Delete button. Every value in that block clears WCAG AA against the
   surface it lands on; the greys especially are darker than they look like they need to be,
   because --dd-dim carries the @handles and timestamps.

   --dd-* names are PRIVATE to this widget, so putting them on :root is safe even when the
   page's own --surface/--text must stay dark for a shared nav and footer. That is the case
   this exists for: a light event page used to park the widget in its own dark panel because
   it had no other way to make it fit.

   Two rules worth knowing:

   1. Prefer :root. The tint and line tokens derive from their base with color-mix(), so one
      --dd-accent moves the chips, focus rings and glows with it — but that derivation happens
      where the tokens are declared. Setting --dd-accent on a wrapper instead (say #live) does
      retint the plain accent uses, but the derived --dd-accent-soft/-line/-glow keep the :root
      value; set those three too if you theme a subtree rather than the page.
   2. Overriding a derived token directly breaks the link to its base, which is the point —
      set --dd-accent-soft and it stays what you said whatever --dd-accent does.

   Two things make an override actually stick, both of which used to be wrong:

   The tokens are only CONSUMED below, never re-declared on .dd. Until 2026-11 they were
   declared on .dd itself, which silently beat every override set on an ancestor — a
   declaration on the element always wins over an inherited value, however specific the
   ancestor's selector.

   And the defaults below sit in :where(:root), which has ZERO specificity, so a page's own
   :root rule wins whatever the source order. That matters because demo-day.js appends this
   stylesheet to <head> at runtime: it always lands AFTER the page's own CSS, and a plain
   :root here would beat every page override on a tie.
   ───────────────────────────────────────────────────────────────────────────────────────── */
:where(:root) {
  /* palette — each falls back to the house token, then to the style guide's own value */
  --dd-accent: var(--cyan, #22d3ee);              /* primary: buttons, links, "mine" state */
  --dd-accent-2: var(--blue, #3b82f6);            /* the button gradient's far end */
  --dd-on-accent: #06121a;                        /* ink ON a filled accent — move it with --dd-accent */
  --dd-marker: var(--gold, #fbbf24);              /* the run-order number, offers, host tools */
  --dd-surface: var(--surface, #0c1120);          /* cards, forms, panels */
  --dd-raised: var(--surface-raised, #111827);    /* chips and inputs, a step off the surface */
  --dd-text: var(--text, #f0f6ff);
  --dd-sec: var(--text-secondary, #94a3b8);
  --dd-dim: var(--text-dim, #64748b);
  --dd-border: var(--border, rgba(56, 189, 248, .12));
  --dd-border-b: var(--border-bright, rgba(56, 189, 248, .25));

  /* tints, derived — override one to pin it, or just move its base */
  --dd-accent-soft: color-mix(in srgb, var(--dd-accent) 10%, transparent);
  --dd-accent-line: color-mix(in srgb, var(--dd-accent) 55%, transparent);
  --dd-accent-glow: color-mix(in srgb, var(--dd-accent) 18%, transparent);
  --dd-marker-soft: color-mix(in srgb, var(--dd-marker) 8%, transparent);
  --dd-marker-line: color-mix(in srgb, var(--dd-marker) 33%, transparent);
  --dd-marker-flash: color-mix(in srgb, var(--dd-marker) 12%, transparent);
  --dd-quote-bg: color-mix(in srgb, var(--dd-sec) 8%, transparent);

  /* type */
  --dd-font: var(--font-sans, var(--sans, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif));
  --dd-font-mono: var(--font-mono, var(--mono, 'JetBrains Mono', ui-monospace, monospace));

  /* shape — set all six to 0 for square corners (--dd-radius-pill too, or pills stay round) */
  --dd-radius-card: 18px;
  --dd-radius-panel: 16px;
  --dd-radius: 12px;
  --dd-radius-sm: 10px;
  --dd-radius-xs: 8px;
  --dd-radius-pill: 999px;

  /* depth */
  --dd-shadow-card: 0 14px 34px rgba(0, 0, 0, .35);
  --dd-shadow-pop: 0 -8px 24px rgba(0, 0, 0, .45);     /* the @ list, which hangs upward */
  --dd-shadow-toast: 0 10px 30px rgba(0, 0, 0, .5);
  --dd-shadow-accent: 0 4px 18px var(--dd-accent-glow);

  /* photos, posters and the full-screen viewer. These sit behind a photo rather than on the
     page, so they stay dark on a light theme unless you say otherwise. */
  --dd-media-bg: #05070d;                /* letterbox behind a 16:9 photo */
  --dd-media-fg: #fff;                   /* the ▦ count over it */
  --dd-media-scrim: rgba(6, 8, 15, .8);  /* pills over a photo */
  --dd-poster-sat: 78%;                  /* the no-photo poster, hue hashed from the demo id */
  --dd-poster-lum: 17%;                  /* leave it: see the note above the .dd-poster rule */
  --dd-poster-fg: #fff;
  --dd-poster-shadow: 0 2px 20px rgba(0, 0, 0, .45);
  --dd-viewer-bg: #000;
  --dd-viewer-fg: #fff;
  --dd-viewer-btn: rgba(255, 255, 255, .16);
  --dd-viewer-scrim: rgba(0, 0, 0, .65);

  /* status: the toast, the errors that stay put, destructive actions, the ♡ */
  --dd-ok-bg: #0f2a1f;
  --dd-ok-line: rgba(52, 211, 153, .5);
  --dd-ok-fg: #a7f3d0;
  --dd-bad-bg: #2a0f16;
  --dd-bad-line: rgba(244, 63, 94, .55);
  --dd-bad-fg: #fecdd3;
  --dd-bad-strong: #fff;                 /* a link inside an error */
  --dd-danger: #fda4af;
  --dd-danger-line: rgba(244, 63, 94, .45);
  --dd-heart: #fb7185;
  --dd-heart-soft: color-mix(in srgb, var(--dd-heart) 12%, transparent);
  --dd-heart-line: color-mix(in srgb, var(--dd-heart) 50%, transparent);
}
.dd { position: relative; color: var(--dd-text); font-family: var(--dd-font); line-height: 1.5; }
.dd * { box-sizing: border-box; }
.dd button { font: inherit; color: inherit; cursor: pointer; }
.dd-muted { color: var(--dd-dim); font-size: 14px; }
.dd-fine { color: var(--dd-dim); font-size: 12px; margin: 6px 0 0; }
.dd-hint { color: var(--dd-sec); font-size: 14px; margin: 0 0 14px; }
.dd-gold { color: var(--dd-marker); }
.dd-head { margin-bottom: 12px; }
.dd-eyebrow { font-family: var(--dd-font-mono); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--dd-marker); }
.dd-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 0; }
.dd-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dd-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.dd-row.wrap { flex-wrap: wrap; }

/* buttons. Specificity, not !important, keeps these off a page's own button styles — so a
   page can still retheme them through the tokens. */
.dd .dd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: var(--dd-radius); border: none;
  font-family: var(--dd-font-mono); font-weight: 700; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; text-decoration: none;
  color: var(--dd-on-accent); background: linear-gradient(135deg, var(--dd-accent), var(--dd-accent-2)); box-shadow: var(--dd-shadow-accent); }
.dd .dd-btn.ghost { background: transparent; color: var(--dd-sec); border: 1px solid var(--dd-border-b); box-shadow: none; }
.dd .dd-btn.sm { min-height: 40px; padding: 8px 14px; font-size: 12px; }
.dd .dd-btn:disabled { opacity: .55; }
.dd-pill { min-height: 44px; padding: 8px 16px; border-radius: var(--dd-radius-pill); border: 1px solid var(--dd-border-b); background: transparent;
  font-family: var(--dd-font-mono); font-size: 13px; font-weight: 700; color: var(--dd-sec); }
.dd-pill.on { color: var(--dd-accent); border-color: var(--dd-accent-line); background: var(--dd-accent-soft); }
.dd-mini { min-height: 36px; padding: 6px 12px; border-radius: var(--dd-radius-sm); border: 1px solid var(--dd-border-b); background: transparent; font-size: 13px; color: var(--dd-sec); }
.dd-mini.on { color: var(--dd-on-accent); background: var(--dd-accent); border-color: var(--dd-accent); font-weight: 700; }
.dd-mini.danger { color: var(--dd-danger); border-color: var(--dd-danger-line); margin-left: auto; }

/* the list */
.dd-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 760px) { .dd-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dd-demo.open { grid-column: 1 / -1; } }
.dd-demo { background: var(--dd-surface); border: 1px solid var(--dd-border); border-radius: var(--dd-radius-card); overflow: hidden;
  scroll-margin-top: 80px; box-shadow: var(--dd-shadow-card); align-self: start; }
.dd-demo.open { border-color: var(--dd-border-b); }
/* the picture: 16:9 like a video thumbnail */
.dd .dd-hero { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 0; background: var(--dd-media-bg); overflow: hidden; cursor: zoom-in; }
.dd-fitbox { position: absolute; inset: 0; display: block; overflow: hidden; }
.dd-blur { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(26px) brightness(.5) saturate(1.3); }
.dd-fit { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.dd-badge { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: var(--dd-radius-xs); background: var(--dd-media-scrim); color: var(--dd-marker);
  font-family: var(--dd-font-mono); font-weight: 800; font-size: 13px; line-height: 1.2; }
.dd-count { position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: var(--dd-radius-xs); background: var(--dd-media-scrim); color: var(--dd-media-fg);
  font-family: var(--dd-font-mono); font-weight: 700; font-size: 12px; }
/* --h is the hue, hashed from the demo id and set inline per card; the saturation and lightness
   are tokens rather than a hard-coded gradient.

   DON'T raise --dd-poster-lum to suit a light page. The poster stands in for a photo, and a vivid
   dark thumbnail sits on a white page perfectly well — the same way a video thumbnail does. Raised
   into the midtones there is no foreground that works: measured across all 360 hues at 58%, white
   title text falls to 1.2:1 and dark text only reaches 2.1:1, so BOTH fail AA. At the default 17%
   white holds (worst hue 3.1:1, and 9.3:1 for the teaser's number). If you do move it, move
   --dd-poster-fg with it and check the worst hue, not a favourite one. */
.dd .dd-poster { cursor: pointer; display: grid; place-items: center; padding: 28px;
  background: radial-gradient(110% 120% at 0% 0%, hsl(var(--h) calc(var(--dd-poster-sat) + 7%) calc(var(--dd-poster-lum) + 17%) / .9), transparent 60%),
              linear-gradient(135deg, hsl(var(--h) calc(var(--dd-poster-sat) - 8%) var(--dd-poster-lum)), hsl(calc(var(--h) + 55) calc(var(--dd-poster-sat) - 3%) calc(var(--dd-poster-lum) - 8%))); }
.dd-poster-t { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
  font-size: clamp(26px, 8vw, 38px); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; color: var(--dd-poster-fg); text-align: center; text-shadow: var(--dd-poster-shadow); }
/* under it, the title row */
.dd-meta { display: flex; align-items: flex-start; gap: 8px; padding: 14px 14px 0; }
.dd-meta .dd-demo-top { flex: 1; min-width: 0; }
.dd-meta .dd-av { width: 40px; height: 40px; font-size: 16px; margin-top: 2px; }
.dd-body { padding: 4px 14px 14px; }
.dd-strip { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin-top: 12px; padding-bottom: 4px; }
.dd .dd-tile { position: relative; flex: 0 0 78%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--dd-border); border-radius: var(--dd-radius); overflow: hidden; background: var(--dd-media-bg); scroll-snap-align: start; cursor: zoom-in; }
@media (min-width: 760px) { .dd .dd-tile { flex-basis: 32%; } }
/* the photo viewer */
.dd-viewer { position: fixed; inset: 0; z-index: 2000; background: var(--dd-viewer-bg); overflow: hidden; }
.dd-v-blur { inset: -60px; filter: blur(44px) brightness(.35) saturate(1.2); }
.dd-v-bg { position: absolute; inset: 0; }
.dd-v-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.dd-v-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 18px 16px; background: linear-gradient(var(--dd-viewer-scrim), transparent); color: var(--dd-viewer-fg); }
.dd-v-title { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd .dd-v-btn { min-width: 44px; min-height: 44px; border-radius: var(--dd-radius-pill); border: 0; background: var(--dd-viewer-btn); color: var(--dd-viewer-fg); font-size: 22px; line-height: 1; }
.dd .dd-v-prev, .dd .dd-v-next { position: absolute; top: 50%; transform: translateY(-50%); font-size: 30px; }
.dd .dd-v-prev { left: 10px; } .dd .dd-v-next { right: 10px; }
/* the compact row — the whole card header is one big tap target */
.dd-demo-top { display: flex; gap: 12px; align-items: flex-start; width: 100%; min-height: 48px; padding: 0; border: none; background: transparent; text-align: left; color: inherit; }
.dd-row1 { display: flex; align-items: center; gap: 6px; }
.dd-row1 .dd-demo-top { flex: 1; min-width: 0; }
.dd-move { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.dd-move .dd-mini { min-height: 32px; min-width: 40px; padding: 2px 8px; }
.dd-move .dd-mini:disabled { opacity: .3; }
.dd-chev { flex: 0 0 auto; color: var(--dd-dim); font-size: 14px; padding: 12px 2px 0; }
.dd-sum { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; font-size: 15px; color: var(--dd-sec); }
.dd-sum b { font-family: var(--dd-font-mono); font-size: 12px; color: var(--dd-sec); margin-left: 2px; }
.dd-sum-c { font-size: 13px; }
.dd-listbar { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.dd-cemo { width: 1.2em; height: 1.2em; vertical-align: -0.2em; object-fit: contain; }
.dd-num { flex: 0 0 auto; width: 38px; height: 38px; border-radius: var(--dd-radius); font-size: 16px; display: grid; place-items: center;
  font-family: var(--dd-font-mono); font-weight: 800; color: var(--dd-marker); background: var(--dd-marker-soft); border: 1px solid var(--dd-marker-line); }
.dd-demo-head { min-width: 0; flex: 1; }
.dd-demo-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 3px; line-height: 1.22; overflow-wrap: anywhere; }
.dd-demo.open .dd-demo-title { display: block; }
@media (min-width: 640px) { .dd-demo-title { font-size: 21px; } }
.dd-snip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px;
  font-size: 14px; line-height: 1.45; color: var(--dd-sec); overflow-wrap: anywhere; }
.dd-by { display: block; color: var(--dd-sec); font-size: 14px; overflow-wrap: anywhere; }
.dd-handle { color: var(--dd-dim); font-weight: 400; }
.dd-desc { color: var(--dd-sec); margin: 12px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.dd-media { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.dd-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--dd-radius-sm); border: 1px solid var(--dd-border); display: block; }
.dd-media.sm { grid-template-columns: repeat(4, 1fr); }
.dd-form label.dd-checkrow { flex-direction: row; display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 0; font-size: 14px; line-height: 1.35; cursor: pointer; }
.dd-form label.dd-checkrow input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--dd-marker); }
.dd-keep { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--dd-sec); }
.dd-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dd-link { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: var(--dd-radius-pill); border: 1px solid var(--dd-border-b);
  color: var(--dd-accent); text-decoration: none; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dd-offer { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; margin-top: 8px; padding: 8px 12px; border-radius: var(--dd-radius-sm);
  border: 1px solid var(--dd-marker-line); background: var(--dd-marker-soft); color: var(--dd-marker); font-size: 14px; font-weight: 600;
  text-align: left; text-decoration: none; }
.dd-offer span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dd button.dd-offer { color: var(--dd-marker); font: inherit; font-size: 14px; font-weight: 600; }   /* an offer with no link is a button; `.dd button` would make it the text colour */

/* votes */
.dd-votes { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.dd-vlist { flex: 1; min-width: 0; display: flex; gap: 4px; overflow: hidden; }

.dd-votes .dd-more { color: var(--dd-sec); font-size: 15px; letter-spacing: 1px; }
.dd .dd-chip[hidden] { display: none; }
.dd-votes .dd-chip { flex: none; padding: 6px 8px; min-width: 0; }
.dd-votes .dd-chip b { margin-left: 3px; }
.dd-pm { flex: none; display: flex; border: 1px solid var(--dd-border-b); border-radius: var(--dd-radius-pill); background: var(--dd-raised); }
.dd-pm:empty { display: none; }
.dd-votes .dd-pm .dd-chip { min-width: 38px; padding: 6px 4px; border: 0; background: transparent; }
.dd-votes .dd-pm .dd-chip + .dd-chip { border-left: 1px solid var(--dd-border-b); border-radius: 0 var(--dd-radius-pill) var(--dd-radius-pill) 0; }
.dd-cbtn { font-size: 15px; }
.dd-chip { min-height: 40px; min-width: 52px; padding: 6px 12px; border-radius: var(--dd-radius-pill); border: 1px solid var(--dd-border-b); background: var(--dd-raised); font-size: 17px; line-height: 1; }
.dd-chip b { font-family: var(--dd-font-mono); font-size: 13px; margin-left: 4px; color: var(--dd-sec); }
.dd-chip.mine { border-color: var(--dd-accent-line); background: var(--dd-accent-soft); }
.dd-chip.mine b { color: var(--dd-accent); }
.dd-chip.add { color: var(--dd-sec); font-size: 18px; }
.dd-chip.sm { min-height: 32px; min-width: 0; padding: 4px 10px; font-size: 14px; }
.dd-pop { margin-top: 8px; padding: 10px 12px; border-radius: var(--dd-radius); border: 1px solid var(--dd-border-b); background: var(--dd-raised); font-size: 13px; color: var(--dd-sec); }
.dd-pop-h { color: var(--dd-text); font-weight: 600; margin-bottom: 8px; }
.dd-pop-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.dd-mine-e { min-width: 36px; min-height: 36px; border-radius: var(--dd-radius-sm); border: 1px dashed var(--dd-border-b); background: transparent; font-size: 17px; }
.dd-hostrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--dd-border); }

/* comments */
.dd-ctoggle { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 44px; margin-top: 12px; padding: 8px 0; border: none; border-top: 1px solid var(--dd-border);
  background: transparent; color: var(--dd-sec); font-size: 14px; font-weight: 600; text-align: left; }
.dd-comments { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--dd-border); }
.dd-c { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--dd-radius-sm); transition: background .6s; }
.dd-c.flash { background: var(--dd-marker-flash); }
.dd-c-body { min-width: 0; flex: 1; }
.dd-c-meta { font-size: 13px; color: var(--dd-dim); }
.dd-c-meta b { color: var(--dd-text); font-weight: 700; }
.dd-c-text { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 15px; }
.dd-at { color: var(--dd-accent); font-weight: 600; }
.dd-quote { display: block; width: 100%; margin: 4px 0 2px; padding: 6px 10px; border: none; border-left: 3px solid var(--dd-border-b); border-radius: 0 var(--dd-radius-xs) var(--dd-radius-xs) 0;
  background: var(--dd-quote-bg); color: var(--dd-sec); font-size: 13px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-c-acts { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; margin-left: -8px; }
.dd-act { min-height: 36px; padding: 4px 8px; border: none; background: transparent; color: var(--dd-dim); font-size: 13px; border-radius: var(--dd-radius-xs); }
.dd-act.on[data-e="❤️"] { color: var(--dd-heart); background: var(--dd-heart-soft); box-shadow: inset 0 0 0 1px var(--dd-heart-line); }
.dd-react { color: var(--dd-sec); }
.dd-react.on, .dd-act.on { color: var(--dd-accent); background: var(--dd-accent-soft); box-shadow: inset 0 0 0 1px var(--dd-accent-line); }
.dd-mention-hint { padding: 10px 12px; font-size: 13px; color: var(--dd-dim); }
.dd-act:hover { color: var(--dd-sec); }
.dd-confirm { margin-top: 6px; font-size: 14px; color: var(--dd-sec); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dd-av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.dd-av-t { display: grid; place-items: center; background: var(--dd-raised); border: 1px solid var(--dd-border-b); font-size: 13px; font-weight: 700; color: var(--dd-sec); }
.dd-replying { font-size: 13px; color: var(--dd-sec); display: flex; align-items: center; gap: 8px; }
.dd-compose { position: relative; display: flex; gap: 8px; align-items: flex-end; }
/* member lookup on host fields — hangs above the field, clear of a phone keyboard */
.dd-people { position: relative; display: block; flex: 1; min-width: 0; }
.dd-people-slot { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 20; }
.dd-people-slot:empty { display: none; }
.dd-mention-slot { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 20; }
.dd-mention-slot:empty { display: none; }
.dd-input { width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--dd-radius-sm); border: 1px solid var(--dd-border); background: var(--dd-raised);
  color: var(--dd-text); font: inherit; font-size: 16px; /* 16px: below it iOS zooms the page on focus */ resize: vertical; }
.dd-input:focus { outline: none; border-color: var(--dd-accent); }
.dd-mention { border-radius: var(--dd-radius); border: 1px solid var(--dd-border-b); background: var(--dd-raised); overflow: hidden; box-shadow: var(--dd-shadow-pop); max-height: 260px; overflow-y: auto; }
.dd-mention-o { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: none; background: transparent; text-align: left; font-size: 14px; }
.dd-mention-o.sel, .dd-mention-o:hover { background: var(--dd-accent-soft); }

/* sample mode — placeholder content for building a page. Loud on purpose: this must never be
   mistaken for a live list, and it is the only thing on the page saying so. */
.dd-sample, .ddm-sample { display: block; margin: 0 0 12px; padding: 8px 12px; border-radius: var(--dd-radius-sm);
  border: 1px dashed var(--dd-marker-line); background: var(--dd-marker-soft); color: var(--dd-marker);
  font-family: var(--dd-font-mono); font-size: 12px; font-weight: 700; letter-spacing: .04em; line-height: 1.45; }

/* forms + panels */
.dd-form, .dd-panel { background: var(--dd-surface); border: 1px solid var(--dd-border-b); border-radius: var(--dd-radius-panel); padding: 16px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 12px; }
.dd-demo .dd-form { margin: 12px 0 0; background: var(--dd-raised); }
.dd-panel.host { border-color: var(--dd-marker-line); }
.dd-panel .dd-ctoggle { margin: 0; border: none; padding: 0; color: var(--dd-text); }
.dd-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--dd-sec); }
.dd-form input[type=file] { font-size: 14px; color: var(--dd-sec); }
.dd-form-t { font-family: var(--dd-font-mono); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--dd-marker); margin-top: 4px; }
.dd-q { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--dd-border); font-size: 15px; }
.dd-qd { color: var(--dd-sec); font-size: 13px; margin-top: 4px; white-space: pre-line; }
.dd-details summary { cursor: pointer; color: var(--dd-sec); font-size: 14px; min-height: 36px; display: flex; align-items: center; }
.dd-toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 1000; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: var(--dd-radius); background: var(--dd-ok-bg); border: 1px solid var(--dd-ok-line); color: var(--dd-ok-fg); font-size: 14px; box-shadow: var(--dd-shadow-toast); }
.dd-toast.bad { background: var(--dd-bad-bg); border-color: var(--dd-bad-line); color: var(--dd-bad-fg); }
/* errors sit where the person acted and stay until dismissed */
.dd-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: var(--dd-radius-sm);
  background: var(--dd-bad-bg); border: 1px solid var(--dd-bad-line); color: var(--dd-bad-fg); font-size: 14px; line-height: 1.45; }
.dd-note span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dd-note a { color: var(--dd-bad-strong); font-weight: 600; }
.dd-note-x { flex: none; min-width: 32px; min-height: 32px; margin: -6px -6px -6px 0; border: 0; background: none; color: var(--dd-bad-fg); font-size: 15px; }
.dd-ask { margin-top: 10px; padding: 12px; border-radius: var(--dd-radius-sm); border: 1px solid var(--dd-marker-line); background: var(--dd-marker-soft); }
.dd-form label.dd-file { position: relative; display: inline-flex; flex-direction: row; align-self: flex-start; color: var(--dd-text); align-items: center; margin-top: 6px; cursor: pointer; }
.dd-file input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dd-flabel { font-size: 14px; font-weight: 600; color: var(--dd-sec); margin-top: 4px; }
.dd-ask p { margin: 0 0 4px; font-size: 14px; color: var(--dd-text); }

/* ── the mini module (.ddm) ────────────────────────────────────────────────────────────────
   The teaser that goes on an event's landing page. Reads the same --dd-* tokens as the list
   above, so a page that themed the list themes this with nothing extra. Read-only: every row
   is a link through to the full list, so there is nothing here to tap by mistake. */
.ddm { color: var(--dd-text); font-family: var(--dd-font); line-height: 1.5;
  background: var(--dd-surface); border: 1px solid var(--dd-border); border-radius: var(--dd-radius-card);
  padding: 16px; box-shadow: var(--dd-shadow-card); }
.ddm * { box-sizing: border-box; }
.ddm-eyebrow { font-family: var(--dd-font-mono); font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--dd-marker); margin: 0 0 12px; }
.ddm-soon { color: var(--dd-sec); font-size: 15px; margin: 0 0 12px; }
.ddm-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ddm-a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px; margin: 0 -6px;
  border-radius: var(--dd-radius-sm); text-decoration: none; color: inherit; }
.ddm-a:hover { background: var(--dd-accent-soft); }
.ddm-thumb { flex: 0 0 auto; display: block; width: 72px; aspect-ratio: 16 / 9; border-radius: var(--dd-radius-sm);
  overflow: hidden; background: var(--dd-media-bg); }
.ddm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* no photo → the same hue-hashed poster the full list falls back to, with the run order on it */
.ddm-poster { display: grid; place-items: center; font-family: var(--dd-font-mono); font-weight: 800;
  font-size: 15px; color: var(--dd-poster-fg); text-shadow: var(--dd-poster-shadow);
  background: linear-gradient(135deg, hsl(var(--h) calc(var(--dd-poster-sat) - 8%) var(--dd-poster-lum)),
                              hsl(calc(var(--h) + 55) calc(var(--dd-poster-sat) - 3%) calc(var(--dd-poster-lum) - 8%))); }
.ddm-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.ddm-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 15px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.ddm-by { color: var(--dd-sec); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ddm-vibes { flex: 0 0 auto; display: flex; gap: 4px; }
.ddm-chip { font-size: 13px; color: var(--dd-sec); white-space: nowrap; }
.ddm-chip b { font-family: var(--dd-font-mono); font-size: 12px; font-weight: 700; margin-left: 1px; }
.ddm-cemo, .ddm .dd-cemo { width: 1.1em; height: 1.1em; vertical-align: -0.15em; object-fit: contain; }
.ddm-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ddm .ddm-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 16px; border-radius: var(--dd-radius); border: none; text-decoration: none;
  font-family: var(--dd-font-mono); font-weight: 700; font-size: 12px; letter-spacing: .02em; text-transform: uppercase;
  color: var(--dd-on-accent); background: linear-gradient(135deg, var(--dd-accent), var(--dd-accent-2));
  box-shadow: var(--dd-shadow-accent); }
.ddm-more { display: inline-flex; align-items: center; min-height: 44px; color: var(--dd-accent);
  font-size: 14px; font-weight: 600; text-decoration: none; }
.ddm-more:hover { text-decoration: underline; }
/* the vibe chips are the first thing to go when the row gets tight */
@media (max-width: 420px) { .ddm-vibes { display: none; } }

@media (min-width: 640px) {
  .dd-media { grid-template-columns: repeat(3, 1fr); }
  .dd-title { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { .dd-c { transition: none; } }
