/* ============================================================
   Guest-page themes  (<body class="event-body theme-{slug}">)
   Shared neutral base (same family as the public site: Inter, ink focus, plain controls) + per theme:
   colours, title fonts and decorations only.
   Colour rule: --ev-accent is decoration (rules, ornaments, tints). Anything that carries text uses
   --ev-fill / --ev-on-fill, chosen per theme for ≥4.5:1 contrast. --ev-muted is ≥4.5:1 on --ev-page.
   ============================================================ */
.event-body {
  --ev-font: "Inter", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif;
  --ev-page: #ffffff;
  --ev-text: #222222;
  --ev-muted: #6A6A6A;
  --ev-line: color-mix(in srgb, var(--ev-text) 13%, transparent);
  --ev-line-strong: color-mix(in srgb, var(--ev-text) 30%, transparent);
  --ev-hero-bg: #F7F7F7;
  --ev-hero-text: #3F3F3F;
  --ev-title-font: var(--ev-font);
  --ev-title-weight: 700;
  --ev-title-size: clamp(2rem, 6vw, 3.25rem);
  --ev-title-color: #222222;
  --ev-title-transform: none;
  --ev-title-spacing: -.02em;
  --ev-kicker-font: 600 .8rem/1.3 var(--ev-font);
  --ev-kicker-color: #6A6A6A;
  --ev-sub-font: 500 1.05rem/1.45 var(--ev-font);
  --ev-accent: #FF3D8B;
  --ev-fill: #D81B67;
  --ev-on-fill: #ffffff;
  --ev-tab-bg: transparent;
  --ev-tab-text: var(--ev-text);
  --ev-tab-active-bg: var(--ev-text);
  --ev-tab-active-text: var(--ev-page);
  --ev-dz-bg: var(--ev-card-bg);
  --ev-dz-border: var(--ev-line-strong);
  --ev-dz-drag: color-mix(in srgb, var(--ev-accent) 10%, var(--ev-card-bg));
  --ev-card-bg: #ffffff;
  --ev-tile-bg: #F2F2F2;
  --ev-tile-radius: 10px;
  --ev-radius: 14px;
  --ev-shadow: rgba(0, 0, 0, .02) 0 0 0 1px, rgba(0, 0, 0, .04) 0 2px 6px 0, rgba(0, 0, 0, .1) 0 4px 8px 0;
  --ev-ease: cubic-bezier(.16, 1, .3, 1);
  /* app.css tokens, re-pointed so shared components (cards, alerts, lightbox…) follow the theme — no sage leftovers */
  --ink: var(--ev-text); --muted: var(--ev-muted); --line: var(--ev-line); --light: var(--ev-tile-bg);
  --brand: var(--ev-fill); --brand-dark: var(--ev-fill); --brand-soft: color-mix(in srgb, var(--ev-accent) 12%, var(--ev-card-bg));
  --font-head: var(--ev-font); --font-body: var(--ev-font); --radius: var(--ev-radius); --shadow: var(--ev-shadow);
  background: var(--ev-page);
  color: var(--ev-text);
  font: 400 16px/1.5 var(--ev-font);
  accent-color: var(--ev-fill);
  caret-color: var(--ev-fill);
  -webkit-font-smoothing: antialiased;
}
.event-body ::selection { background: color-mix(in srgb, var(--ev-accent) 30%, transparent); color: inherit; }
.event-body :focus-visible { outline: 2px solid var(--ev-text); outline-offset: 2px; }
.event-body h1, .event-body h2, .event-body h3 { color: inherit; font-family: var(--ev-font); letter-spacing: -.01em; text-wrap: balance; }
.event-body p { text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* controls */
.event-body input[type=text], .event-body input[type=email], .event-body select, .event-body textarea {
  min-height: 48px; padding: 12px 14px; border: 1px solid var(--ev-line-strong); border-radius: 10px; background: var(--ev-card-bg); color: var(--ev-text); font: 400 16px/1.35 var(--ev-font); box-shadow: none; }
.event-body input::placeholder, .event-body textarea::placeholder { color: var(--ev-muted); opacity: 1; }
.event-body input:focus, .event-body select:focus, .event-body textarea:focus { outline: none; border-color: var(--ev-text); box-shadow: inset 0 0 0 1px var(--ev-text); }
.event-body .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: 0; border-radius: 10px;
  background: var(--ev-fill); color: var(--ev-on-fill); font: 600 16px/1.2 var(--ev-font); box-shadow: none; transition: filter .15s ease; }
.event-body .btn:hover, .event-body .btn:focus-visible { background: var(--ev-fill); color: var(--ev-on-fill); filter: brightness(.9); }
.event-body .btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.event-body .btn-ghost, .event-body .btn-ghost:hover { background: transparent; color: var(--ev-text); box-shadow: inset 0 0 0 1px var(--ev-line-strong); filter: none; }
.event-body .btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--ev-text); }
.ev-link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: inherit; font: 600 14px/1.2 var(--ev-font); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.ev-link-btn svg { width: 16px; height: 16px; }
.ev-chip-btn { min-height: 40px; padding: 8px 16px; border: 1px solid var(--ev-line-strong); border-radius: 99px; background: var(--ev-card-bg); color: var(--ev-text); font: 600 14px/1 var(--ev-font); cursor: pointer; }
.ev-chip-btn[aria-pressed="true"] { background: var(--ev-text); color: var(--ev-page); border-color: var(--ev-text); }
.event-body .card { background: var(--ev-card-bg); border: 1px solid var(--ev-line); border-radius: var(--ev-radius); box-shadow: none; }
.event-body .muted, .event-body .empty, .event-body label { color: var(--ev-muted); }
.event-body .hidden { display: none !important; }

/* ---------- hero ---------- */
.event-body .event-hero { position: relative; overflow: hidden; text-align: center; padding: 48px 0 40px; background: var(--ev-hero-bg); color: var(--ev-hero-text); }
.ev-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.ev-hero-inner { position: relative; z-index: 1; }
.ev-kicker { font: var(--ev-kicker-font); color: var(--ev-kicker-color); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 10px; text-wrap: balance; }
.event-body .event-hero h1.ev-title {
  font-family: var(--ev-title-font); font-weight: var(--ev-title-weight); font-size: var(--ev-title-size);
  color: var(--ev-title-color); text-transform: var(--ev-title-transform); letter-spacing: var(--ev-title-spacing);
  line-height: 1.12; margin: 0 auto 8px; max-width: 900px; overflow-wrap: anywhere; }
.ev-subtitle { font: var(--ev-sub-font); margin-bottom: 14px; }
.event-body .event-hero .meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 6px; font-size: 14px; }
.ev-meta-item { display: inline-flex; align-items: center; gap: 6px; color: inherit !important; }
#up-as-text { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-meta-item .ev-link-btn { min-height: 32px; margin: -6px 0; font-size: inherit; font-weight: 500; }
.ev-meta-item svg { width: 16px; height: 16px; flex: none; }
.event-body .event-hero a.ev-meta-item { text-decoration: underline; text-underline-offset: .18em; }

/* ---------- body: upload first, then albums + photos ---------- */
.ev-body { padding-top: 20px; padding-bottom: 72px; }
.ev-notice { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--ev-line); border-radius: 12px; background: var(--ev-card-bg); color: var(--ev-text); font-size: 14px; line-height: 1.45; }
.ev-notice > svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ev-muted); }
.ev-notice > span { flex: 1; }
.ev-notice-warn { border-color: #E8C25C; background: #FFF8E1; color: #5B4300; }
.owner-hint .ev-link-btn { flex: none; min-height: 0; margin: -2px 0; }

.ev-chal { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; height: 100%; padding: 8px 14px 8px 8px; border: 1px solid var(--ev-line-strong); border-radius: 12px; background: var(--ev-card-bg); color: var(--ev-text); font: 500 15px/1.35 var(--ev-font); text-align: left; overflow-wrap: anywhere; cursor: pointer; transition: border-color .15s ease; }
.ev-chal:hover { border-color: var(--ev-text); }
.ev-chal-dot { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--ev-tile-bg); color: var(--ev-text); }
.ev-chal-dot svg { width: 18px; height: 18px; }
.ev-chal .i-done, .ev-chal.is-done .i-todo { display: none; }
.ev-chal.is-done .i-done { display: block; }
.ev-chal.is-done .ev-chal-dot { background: var(--ev-fill); color: var(--ev-on-fill); }
.ev-chal.is-done { color: var(--ev-muted); }
/* on the page: one row of small chips that scrolls sideways; the number opens everybody's photos */
.ev-challenges { display: flex; align-items: center; gap: 4px 14px; margin: 0 0 14px; }
.ev-chal-head { display: flex; flex: none; align-items: baseline; gap: 8px; }
.ev-chal-head h2 { margin: 0; font: 600 15px/1.3 var(--ev-font); }
.ev-chal-head span { font-size: 13px; white-space: nowrap; }
.ev-chal-list { display: flex; flex: 1 1 0; order: 1; gap: 8px; min-width: 0; margin: 0; padding: 2px 0; overflow-x: auto; list-style: none; scrollbar-width: none; }
.ev-chal-all { order: 2; flex: none; }
.ev-chal-list li { display: flex; flex: none; max-width: min(400px, 76vw); border: 1px solid var(--ev-line-strong); border-radius: 24px; background: var(--ev-card-bg); overflow: hidden; transition: border-color .15s ease; }
.ev-chal-list li:hover { border-color: var(--ev-text); }
.ev-chal-list .ev-chal { flex: 1 1 auto; gap: 8px; width: auto; min-width: 0; min-height: 44px; height: auto; padding: 4px 16px 4px 5px; border: 0; border-radius: 0; background: none; font-size: 14px; line-height: 1.3; }
.ev-chal-list .ev-chal-dot { width: 32px; height: 32px; }
.ev-chal-list .ev-chal-dot svg { width: 16px; height: 16px; }
.ev-chal-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-chal-see { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 5px; min-width: 48px; padding: 0 12px 0 10px; border: 0; border-left: 1px solid var(--ev-line); background: none; color: var(--ev-text); font: 600 13px/1 var(--ev-font); font-variant-numeric: tabular-nums; cursor: pointer; }
.ev-chal-see:hover { background: var(--ev-tile-bg); }
.ev-chal-see svg { width: 16px; height: 16px; }
.event-body :is(.ev-chal-list .ev-chal, .ev-chal-see):focus-visible { outline: 2px solid var(--ev-text); outline-offset: -3px; border-radius: 22px; } /* inside: the chip clips it */
.ev-challenges.is-open { flex-wrap: wrap; }
.is-open .ev-chal-list { flex: 1 0 100%; order: 3; flex-wrap: wrap; overflow: visible; }
.is-open .ev-chal-list li { max-width: 100%; }
.is-open .ev-chal-text { white-space: normal; overflow-wrap: anywhere; }
.is-open .ev-chal-all { margin-left: auto; }
@media (max-width: 759px) {
  .ev-challenges { flex-wrap: wrap; }
  .upload-panel:has(+ .ev-challenges) { margin-bottom: 4px; }
  .ev-challenges { row-gap: 0; }
  .ev-chal-head { flex: 1 1 auto; min-height: 44px; align-items: center; }
  .ev-chal-list { flex: 1 0 calc(100% + 32px); order: 3; margin: 0 -16px; padding: 2px 16px; scroll-padding: 0 16px; }
  .is-open .ev-chal-list { flex-basis: 100%; margin: 0; padding: 2px 0; }
}
/* the photos of one challenge */
.ev-chal-view { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 16px; padding: 14px; border: 1px solid var(--ev-line); border-radius: 12px; background: var(--ev-card-bg); color: var(--ev-text); scroll-margin-top: 14px; }
.ev-chal-view[hidden] { display: none; }
.ev-chal-view-head { flex: 1 1 180px; min-width: 0; }
.ev-chal-view-head h2 { margin: 0; font: 600 18px/1.3 var(--ev-font); overflow-wrap: anywhere; }
.ev-chal-view-head h2:focus { outline: none; }
.ev-chal-view-acts { display: flex; flex-wrap: wrap; gap: 8px; }
#chal-view-add[hidden] { display: none; }
.is-chal-view .media-grid .chal-tag { display: none; }
.up-others { margin: 14px 0 0; font-size: 14px; }
.up-others > strong { display: block; overflow-wrap: anywhere; }
.up-others .up-thumbs button { flex: none; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.up-others .up-thumbs img { display: block; width: 72px; height: 72px; }
.upload-panel { margin: 0 0 14px; } /* unboxed: the drop zone is the only container (no card inside a card) */
.album-pick { position: relative; min-width: 0; margin: 0; padding: 0; border: 0; }
.album-pick-row { position: relative; display: flex; flex-wrap: wrap; gap: 8px; max-height: 212px; margin: -3px; padding: 3px; overflow-y: auto; }
.event-body .album-opt { position: relative; display: block; max-width: 100%; margin: 0; cursor: pointer; }
.album-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.album-opt > span { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-height: 44px; padding: 8px 16px; border: 1px solid var(--ev-line-strong); border-radius: 10px; background: var(--ev-card-bg); color: var(--ev-text); font: 500 15px/1.25 var(--ev-font); transition: background .15s ease, color .15s ease, border-color .15s ease; }
.album-opt > span > span { min-width: 0; overflow-wrap: anywhere; }
.album-opt svg { display: none; flex: none; width: 16px; height: 16px; stroke-width: 3; }
.album-opt:hover > span { border-color: var(--ev-text); }
.album-opt input:checked + span { padding-left: 12px; border-color: var(--ev-fill); background: var(--ev-fill); color: var(--ev-on-fill); font-weight: 600; }
.album-opt input:checked + span svg { display: block; }
.album-opt input:focus-visible + span { outline: 2px solid var(--ev-text); outline-offset: 1px; }
@media (forced-colors: active) { .album-opt input:checked + span { outline: 3px solid Highlight; } }
.up-next { margin: 14px 0 0; font-size: 14px; }
.up-next .muted { display: block; margin-bottom: 6px; }
.ev-chal.up-next-btn { height: auto; max-width: 420px; }
.up-next-btn .ic { display: grid; }
.name-dialog h2 { margin: 0 0 6px; font: 600 20px/1.25 var(--ev-font); }
.event-body .name-dialog p { margin: 0 0 14px; font-size: 15px; }
.event-body .name-dialog h2 { margin-bottom: 14px; overflow-wrap: anywhere; }
.name-field { margin: 0 0 16px; }
.name-field[hidden] { display: none; }
.event-body .name-field > label { display: block; margin: 0 0 6px; color: var(--ev-text); font: 600 14px/1.3 var(--ev-font); }
.event-body .name-dialog input[type=text] { width: 100%; margin: 0; }

/* the newest photos, right under the title */
.ev-latest { margin: 0 0 16px; }
.ev-latest[hidden] { display: none; }
.ev-latest-row { display: flex; gap: 6px; min-height: 92px; padding: 4px; margin: -4px; overflow-x: auto; scrollbar-width: none; }
.ev-latest-row::-webkit-scrollbar { display: none; }
.ev-latest-item { position: relative; flex: none; width: 84px; height: 84px; padding: 0; border: 0; border-radius: var(--ev-tile-radius); overflow: hidden; background: var(--ev-tile-bg); cursor: zoom-in; }
.ev-latest-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ev-latest-item.is-new { animation: new-tile 2.4s ease-out; }
.ev-latest-play { position: absolute; left: 6px; bottom: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .6); }
.ev-latest-play::before { content: ""; position: absolute; left: 8px; top: 6px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent #fff; }
@media (max-width: 759px) { .ev-latest-row { margin: -4px -16px; padding: 4px 16px; } }
@media (min-width: 760px) { .ev-latest-item { width: 104px; height: 104px; } .ev-latest-row { min-height: 112px; gap: 8px; } }
.event-body .dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; padding: 22px 16px; border: 2px dashed var(--ev-dz-border); border-radius: 12px; background: var(--ev-dz-bg); text-align: center; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.event-body .dropzone:hover, .event-body .dropzone.drag { background: var(--ev-dz-drag); border-color: var(--ev-fill); }
.event-body .dropzone strong { display: block; color: var(--ev-text); font: 600 18px/1.3 var(--ev-font); }
.event-body .dropzone .icon-circle { position: relative; display: grid; place-items: center; width: 52px; height: 52px; margin: 0 0 4px; border-radius: 50%; background: var(--ev-fill); color: var(--ev-on-fill); box-shadow: none; }
.event-body .dropzone .icon-circle svg { width: 24px; height: 24px; }
@media (max-width: 600px) { .event-body .dropzone { padding: 16px; gap: 4px; } .event-body .dropzone .icon-circle { width: 46px; height: 46px; } }

/* the album has photos: a slim box for the mouse (drag and drop), a plain full-width button on phones */
.event-body .dropzone { position: relative; }
.dropzone .i-cam, .dropzone.is-slim .i-up { display: none; }
.dropzone.is-slim .i-cam { display: block; }
.event-body .dropzone.is-slim { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 4px 12px; min-height: 64px; padding: 10px 16px; }
.event-body .dropzone.is-slim .icon-circle { width: 40px; height: 40px; margin: 0; }
.event-body .dropzone.is-slim .icon-circle svg { width: 20px; height: 20px; }
.event-body .dropzone.is-slim strong { min-width: 0; font-size: 16px; overflow-wrap: anywhere; }
.event-body .dropzone.is-slim #upload-hint { display: none; } /* still read out: aria-describedby */
#up-in { color: var(--ev-muted); font-weight: 500; }
@media (max-width: 759px) {
  .event-body .dropzone.is-slim { flex-wrap: nowrap; gap: 10px; min-height: 56px; padding: 8px 16px; border: 0; background: var(--ev-fill); color: var(--ev-on-fill); transition: filter .15s ease; }
  .event-body .dropzone.is-slim:hover, .event-body .dropzone.is-slim.drag { background: var(--ev-fill); filter: brightness(.94); }
  .event-body .dropzone.is-slim strong { color: inherit; }
  .event-body .dropzone.is-slim .icon-circle { width: 24px; height: 24px; background: none; }
  .event-body .dropzone.is-slim .icon-circle svg { width: 24px; height: 24px; }
  .dropzone.is-slim #up-in { display: block; max-width: 70vw; color: inherit; font-size: 13px; line-height: 1.3; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dropzone.is-slim.is-nudge .icon-circle::after { display: none; }
  .dropzone.is-slim.is-nudge::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: fab-flash .85s ease-out .12s both; }
}

.up-summary { margin-top: 12px; padding: 14px; border-radius: 12px; background: color-mix(in srgb, var(--ev-accent) 8%, var(--ev-card-bg)); }
.up-sum-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; font-size: 15px; }
.up-sum-row strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.up-sum-row .muted { font-size: 14px; font-variant-numeric: tabular-nums; }
.up-sum-bar { height: 6px; margin: 10px 0 2px; border-radius: 6px; background: var(--ev-line); overflow: hidden; }
.up-sum-bar span { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--ev-fill); transition: width .4s var(--ev-ease); }
.up-thanks { display: block; font: 600 16px/1.35 var(--ev-font); }
.up-thumbs { display: flex; gap: 6px; margin: 10px 0 2px; overflow-x: auto; scrollbar-width: none; }
.up-thumbs img { flex: none; width: 56px; height: 56px; border-radius: 8px; object-fit: cover; animation: up-pop .5s var(--ev-ease) both; }
.up-thumbs img:nth-child(2) { animation-delay: .05s; } .up-thumbs img:nth-child(3) { animation-delay: .1s; } .up-thumbs img:nth-child(4) { animation-delay: .15s; }
@keyframes up-pop { from { opacity: 0; transform: scale(.85); } }
.up-failed { margin: 8px 0 0; color: #B42318; font-size: 14px; }
.up-sum-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 10px; }
.event-body .upload-list { margin: 10px 0 0; }
.event-body .upload-item { padding: 8px 6px 8px 12px; border: 1px solid var(--ev-line); border-radius: 10px; background: var(--ev-card-bg); color: var(--ev-text); }
.event-body .upload-item .row { flex-wrap: nowrap; gap: 8px; }
.up-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: 14px; }
.event-body .upload-item .status { flex: none; font-size: 13px; font-variant-numeric: tabular-nums; }
.event-body .upload-item .bar { margin: 6px 6px 0 0; height: 4px; background: var(--ev-line); }
.event-body .upload-item .bar span { background: var(--ev-fill); }
.event-body .upload-item.done .bar span { background: #0B7A52; }
.event-body .upload-item.cancelled { opacity: .6; }
.event-body .upload-item.failed { border-color: #F2B8B5; }
.event-body .upload-item.failed .status { color: #B42318; }
.up-cancel { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -12px -4px -12px 0; border: 0; border-radius: 50%; background: none; color: var(--ev-muted); cursor: pointer; }
.up-cancel:hover { color: var(--ev-text); background: var(--ev-line); }
.up-cancel svg { width: 16px; height: 16px; }

/* album tabs: the owner's names + a separate count badge */
.event-body .tabs { position: relative; gap: 8px; padding: 2px 0 12px; }
@media (min-width: 760px) { .event-body .tabs { flex-wrap: wrap; max-height: 226px; overflow-y: auto; } } /* no sideways scrolling with a mouse */
@media (max-width: 759px) { .event-body .tabs { margin: 0 -16px; padding-inline: 16px; } }
.event-body .tab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px 8px 16px; border: 1px solid var(--ev-line-strong); border-radius: 99px;
  background: var(--ev-tab-bg); color: var(--ev-tab-text); font: 600 15px/1.2 var(--ev-font); box-shadow: none; }
.event-body .tab .count { margin: 0; padding: 2px 8px; border-radius: 99px; background: var(--ev-line); color: inherit; opacity: 1; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.event-body .tab.active { background: var(--ev-tab-active-bg); color: var(--ev-tab-active-text); border-color: transparent; }
.event-body .tab.active .count { background: var(--ev-tab-active-text); color: var(--ev-tab-active-bg); } /* inverted badge: full contrast in every theme */

.gallery-tools { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; }
.gallery-tools[hidden] { display: none; }
.gallery-tools .spacer { flex: 1; }
.gallery-tools label { margin: 0; color: var(--ev-muted); font-weight: 500; }
.gallery-tools select { width: auto; min-height: 40px; padding: 6px 34px 6px 14px; border-radius: 99px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* phones: three per row, like the phone's own gallery */
@media (max-width: 480px) { .event-body .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; } .event-body .media-grid .media-item { border-radius: min(var(--ev-tile-radius), 8px); } }
@media (min-width: 481px) and (max-width: 759px) { .event-body .media-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); } }
.event-body .media-item { background: var(--ev-tile-bg); border-radius: var(--ev-tile-radius); }
.event-body .media-item .play { left: 8px; right: auto; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; font-weight: 600; }
.event-body .media-item .play::before { content: ""; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent currentColor; }
.event-body .media-item.locked .lock { color: #fff; }
.event-body .media-item.locked .lock svg { width: 28px; height: 28px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); }
.event-body .empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; text-align: center; }
.event-body .empty svg { width: 36px; height: 36px; opacity: .6; }
.event-body .empty p { margin: 0; max-width: 32ch; font-size: 15px; }
.ev-load-error { padding: 28px 16px; text-align: center; }
.ev-load-error p { margin: 0 auto 12px; max-width: 40ch; }

/* a photo that answers a challenge */
.chal-tag { position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 4px; max-width: calc(100% - 12px); padding: 3px 8px 3px 5px; border-radius: 99px; background: rgba(0, 0, 0, .68); color: #fff; font: 600 11px/1.3 var(--ev-font); text-align: left; pointer-events: none; }
.chal-tag .ic { display: grid; flex: none; }
.chal-tag svg { width: 13px; height: 13px; }
.chal-tag:not(.is-mini) { border-radius: 10px; line-height: 1.2; }
.chal-tag:not(.is-mini) > span:last-child { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.chal-tag.is-mini { padding: 4px; top: 5px; left: 5px; }
.media-item.is-hidden .chal-tag { display: none; } /* the "hidden" badge is there */
.media-grid.is-selecting .chal-tag { max-width: calc(100% - 46px); }
@media (min-width: 760px) { .chal-tag:not(.is-mini) { top: 8px; left: 8px; max-width: calc(100% - 16px); font-size: 12px; padding: 4px 10px 4px 7px; } .chal-tag:not(.is-mini) svg { width: 14px; height: 14px; } }

/* owner selection */
.media-grid.is-selecting .media-item { cursor: pointer; }
.media-grid.is-selecting .media-item::after { content: ""; position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .25); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.media-grid.is-selecting .media-item.is-selected { outline: 3px solid var(--ev-fill); outline-offset: -3px; }
.media-grid.is-selecting .media-item.is-selected::after { background: var(--ev-fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.sel-bar { position: fixed; z-index: 120; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; width: min(640px, calc(100vw - 24px)); padding: 8px 8px 8px 16px;
  border-radius: 99px; background: #222; color: #fff; box-shadow: 0 12px 30px -8px rgba(0, 0, 0, .45); font-size: 14px; font-weight: 600; }
.sel-bar[hidden] { display: none; }
.sel-bar .spacer { flex: 1; }
.sel-act { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .12); color: #fff; font: 600 14px/1 var(--ev-font); cursor: pointer; }
.sel-act svg { width: 16px; height: 16px; }
.sel-act:hover { background: rgba(255, 255, 255, .22); }
.sel-act:disabled { opacity: .4; cursor: default; }
.sel-danger:not(:disabled):hover { background: #C62828; }
body.is-selecting .fab-wrap, body.is-selecting .chat-wrap { display: none; }
@media (max-width: 560px) { .sel-act { padding: 0 10px; } #sel-count { font-size: 13px; } }

/* ---------- lightbox: neutral black, Romanian labels, drawn icons ---------- */
.event-body .lightbox { background: rgba(10, 10, 10, .96); }
.event-body .lb-btn { display: grid; place-items: center; width: 48px; height: 48px; background: rgba(255, 255, 255, .14); }
.event-body .lb-btn:hover, .event-body .lb-btn:focus-visible { background: rgba(255, 255, 255, .28); }
.event-body .lb-btn svg { width: 24px; height: 24px; }
.event-body .lightbox :focus-visible { outline-color: #fff; }
.event-body .lightbox .lb-bar { font-size: 14px; }
.lightbox .lb-act { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; border: 0; border-radius: 99px; padding: 0 14px; font: 600 13px/1 var(--ev-font, system-ui); cursor: pointer; background: rgba(255, 255, 255, .16); color: #fff; white-space: nowrap; text-decoration: none; }
.lightbox .lb-act svg, .lightbox .lb-act .ic svg { width: 16px; height: 16px; display: block; }
.lightbox .lb-act:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.lightbox .lb-act-danger:hover { background: #C62828; }
.lightbox .lb-act:disabled { opacity: .5; cursor: wait; }
.lb-text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.lb-chal { border: 0; font: inherit; text-align: left; cursor: pointer; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 12px 4px 8px; border-radius: 99px; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600; overflow-wrap: anywhere; }
.lb-chal[hidden] { display: none; }
.lb-chal:hover { background: rgba(255, 255, 255, .28); }
.lb-chal svg { flex: none; width: 16px; height: 16px; }
.lb-msg { padding: 4px 10px; border-radius: 99px; background: #C62828; color: #fff; font-weight: 600; }
.lb-msg.is-ok { background: #0B7A52; }
.lb-msg[hidden] { display: none; }
@media (max-width: 560px) { .lightbox .lb-bar { flex-wrap: wrap; row-gap: 8px; } .lightbox .lb-bar .lb-text { width: 100%; } }

/* ---------- demo album: theme picker at the top (views/partials/theme-picker.php) ---------- */
.demo-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 12px; padding: 8px max(16px, env(safe-area-inset-left)); background: #1D1D20; color: #F3F3F4; font: 500 14px/1.2 "Inter", system-ui, sans-serif; }
.demo-bar a { color: #F3F3F4; text-decoration: none; }
.event-body .demo-bar :focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.demo-back { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 44px; padding: 0 12px 0 6px; border-radius: 99px; }
.demo-back svg { width: 18px; height: 18px; }
.demo-back:hover { background: #34343A; }
.demo-themes { position: relative; display: flex; flex: 1; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; justify-content: safe center; }
.demo-themes::-webkit-scrollbar { display: none; }
.demo-themes a { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 0 16px 0 10px; border-radius: 99px; white-space: nowrap; transition: background .15s ease; }
.demo-themes a:hover { background: #34343A; }
.demo-themes a[aria-current] { background: #fff; color: #222; font-weight: 600; }
.demo-themes i { width: 22px; height: 22px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.demo-themes a[aria-current] i { box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }
.demo-note { flex: none; color: #C3C3CB; font-size: 13px; }
@media (max-width: 1100px) { .demo-bar { flex-wrap: wrap; gap: 0 4px; padding-top: 4px; padding-bottom: 6px; } .demo-note { order: -1; flex: 0 0 100%; padding: 4px 0 2px; text-align: center; font-size: 12px; } }
@media (max-width: 600px) { .demo-back { padding: 0 10px; } .demo-back span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } .demo-themes { margin-right: -16px; padding-right: 16px; justify-content: flex-start; } }

/* ---------- footer: the vendor mark, quietly ---------- */
.event-footer { padding: 28px 16px calc(28px + env(safe-area-inset-bottom)); text-align: center; font-size: 13px; }
.event-footer a { display: inline-flex; align-items: center; gap: 6px; color: var(--ev-muted); text-decoration: none; }
.event-footer a:hover { color: var(--ev-text); }
.event-footer .ev-promo { margin: 0 0 18px; }
.event-footer .ev-promo a { flex-wrap: wrap; justify-content: center; min-height: 44px; color: var(--ev-text); text-decoration: underline; text-underline-offset: .25em; }
.event-footer .lang-switch { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.event-footer .lang-switch a { justify-content: center; min-width: 44px; min-height: 44px; }
.event-footer .lang-switch a[aria-current] { color: var(--ev-text); font-weight: 700; text-decoration: underline; text-underline-offset: .3em; }
.ev-made-mark { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; letter-spacing: -.02em; color: var(--ev-text); }
.ev-made-mark svg { width: 16px; height: 16px; color: #FF3D8B; }
body.has-fab .event-footer, body:has(.chat-wrap) .event-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---------- PIN page ---------- */
.ev-pin { padding: 28px 16px 48px; }
.ev-pin-card { max-width: 420px; margin: 0 auto; padding: 24px; text-align: center; }
.ev-pin-card h2 { margin: 0 0 8px; font-size: 1.35rem; font-weight: 700; }
.ev-pin-card p { margin: 0 0 18px; font-size: 15px; }
.event-body .pin-input { min-height: 56px; text-align: center; font: 600 1.5rem/1 ui-monospace, SFMono-Regular, Consolas, monospace !important; letter-spacing: .3em; text-transform: uppercase; }
.event-body .pin-input::placeholder { letter-spacing: .3em; opacity: .5; }

/* ================= themes ================= */

/* ---------------- Classic = the ClipeDeVis look (white, ink, one pink) ---------------- */
.theme-classic {
  --ev-page: #ffffff; --ev-text: #222222; --ev-muted: #6A6A6A;
  --ev-hero-bg: #F7F7F7; --ev-hero-text: #3F3F3F;
  --ev-title-color: #222222; --ev-kicker-color: #6A6A6A;
  --ev-accent: #FF3D8B; --ev-fill: #D81B67; --ev-on-fill: #ffffff;
  --ev-tile-bg: #F2F2F2; --ev-tile-radius: 12px;
}
.theme-classic .event-hero::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 56px; height: 3px; margin-left: -28px; border-radius: 3px 3px 0 0; background: var(--ev-accent); }

/* ---------------- Wedding ---------------- */
.theme-wedding {
  --ev-page: #FBF6EE; --ev-text: #4A3B2E; --ev-muted: #6E5B47;
  --ev-hero-bg: radial-gradient(ellipse at 50% 0%, #FFFDF8 0%, #F7EEDF 70%, #F1E4CF 100%);
  --ev-hero-text: #6B5642;
  --ev-title-font: "Great Vibes", cursive; --ev-title-weight: 400; --ev-title-size: clamp(2.6rem, 9vw, 4.6rem); --ev-title-color: #5B4636; --ev-title-spacing: 0;
  --ev-kicker-font: 600 .85rem/1.3 "Cormorant Garamond", serif; --ev-kicker-color: #7A5C30;
  --ev-sub-font: italic 600 1.25rem/1.4 "Cormorant Garamond", serif;
  --ev-accent: #B8945A; --ev-fill: #7A5C30; --ev-on-fill: #ffffff;
  --ev-tab-bg: #F2E8D8; --ev-tab-active-bg: #7A5C30; --ev-tab-active-text: #ffffff;
  --ev-dz-bg: #FFFDF8; --ev-dz-border: #CDB68C;
  --ev-card-bg: #FFFDF8; --ev-tile-bg: #F2E8D8; --ev-tile-radius: 4px;
}
.theme-wedding .event-hero { padding: 80px 0 52px; }
.theme-wedding .event-hero::before, .theme-wedding .event-hero::after { content: ""; position: absolute; pointer-events: none; z-index: 1; }
.theme-wedding .event-hero::before { inset: 14px; border: 1px solid #C9AE7E; }
.theme-wedding .event-hero::after { inset: 20px; border: 1px solid rgba(201, 174, 126, .5); }
.theme-wedding .deco-corner { position: absolute; top: 6px; width: clamp(84px, 20vw, 210px); opacity: .95; }
.theme-wedding .deco-corner.tl { left: 6px; transform: scaleY(-1); }
.theme-wedding .deco-corner.tr { right: 6px; transform: scale(-1, -1); }
.theme-wedding .deco-rings { position: absolute; top: 32px; left: 50%; width: 52px; transform: translateX(-50%); }
.theme-wedding .ev-hero-inner { padding-inline: clamp(16px, 14vw, 180px); }
.theme-wedding .media-item { box-shadow: 0 0 0 5px #fff, 0 6px 18px rgba(91, 70, 54, .14); }
.theme-wedding .media-grid { gap: 14px; }
@media (max-width: 480px) { .event-body.theme-wedding .media-grid { gap: 9px; } .theme-wedding .media-item { box-shadow: 0 0 0 3px #fff, 0 3px 10px rgba(91, 70, 54, .14); } }

/* ---------------- Christening ---------------- */
.theme-baptism {
  --ev-page: #F7FBFE; --ev-text: #2F4F66; --ev-muted: #4F6F86;
  --ev-hero-bg: linear-gradient(180deg, #D7ECFA 0%, #EAF4FC 55%, #FBEFF5 100%);
  --ev-hero-text: #2F5876;
  --ev-title-font: "Quicksand", sans-serif; --ev-title-weight: 700; --ev-title-color: #2F5876;
  --ev-kicker-font: 700 .8rem/1.3 "Quicksand", sans-serif; --ev-kicker-color: #A8467A;
  --ev-sub-font: 600 1.1rem/1.4 "Quicksand", sans-serif;
  --ev-accent: #7FB3D5; --ev-fill: #3E6A8A; --ev-on-fill: #ffffff;
  --ev-tab-bg: #E6F2FB; --ev-tab-active-bg: #3E6A8A; --ev-tab-active-text: #ffffff;
  --ev-dz-border: #A9CBE3; --ev-tile-bg: #E6F2FB; --ev-tile-radius: 18px;
}
.theme-baptism .event-hero { padding: 52px 0 70px; }
.theme-baptism .deco-cloud { position: absolute; width: 220px; }
.theme-baptism .deco-cloud.c1 { left: -40px; bottom: -14px; width: 300px; }
.theme-baptism .deco-cloud.c2 { right: -30px; bottom: -6px; width: 260px; }
.theme-baptism .deco-cloud.c3 { left: 42%; bottom: -30px; width: 240px; opacity: .8; }
.theme-baptism .deco-star { position: absolute; animation: twinkle 3s ease-in-out infinite; }
.theme-baptism .deco-star:nth-of-type(2n) { animation-delay: 1.2s; }
@keyframes twinkle { 50% { opacity: .35; transform: scale(.8); } }

/* ---------------- Birthday: dark plum text on the sunny gradient (white failed contrast) ---------------- */
.theme-birthday {
  --ev-page: #FFF8FB; --ev-text: #3B2440; --ev-muted: #7A5876;
  --ev-hero-bg: linear-gradient(120deg, #FF8FBA 0%, #FFA488 50%, #FFD36B 100%);
  --ev-hero-text: #3B2440;
  --ev-title-font: "Baloo 2", sans-serif; --ev-title-weight: 800; --ev-title-size: clamp(2.2rem, 7vw, 3.6rem); --ev-title-color: #3B2440; --ev-title-spacing: -.01em;
  --ev-kicker-font: 700 .85rem/1.3 "Baloo 2", sans-serif; --ev-kicker-color: #3B2440;
  --ev-sub-font: 600 1.15rem/1.4 "Baloo 2", sans-serif;
  --ev-accent: #FF6FA5; --ev-fill: #C2185B; --ev-on-fill: #ffffff;
  --ev-tab-bg: #FFE3EE; --ev-tab-text: #7E1E48; --ev-tab-active-bg: #C2185B; --ev-tab-active-text: #ffffff;
  --ev-dz-border: #F59BBE; --ev-tile-bg: #FFE3EE; --ev-tile-radius: 16px;
}
.theme-birthday .deco-balloons { position: absolute; right: 3%; top: 8px; width: clamp(80px, 14vw, 150px); animation: float 6s ease-in-out infinite; }
.theme-birthday .deco-confetti { position: absolute; inset: 0; opacity: .9;
  background-image:
    radial-gradient(circle, #fff 2px, transparent 2.5px), radial-gradient(circle, #FFE45C 2.5px, transparent 3px),
    radial-gradient(circle, #5CC8FF 2px, transparent 2.5px), radial-gradient(circle, #ffffff 1.5px, transparent 2px);
  background-size: 90px 70px, 130px 110px, 110px 90px, 60px 80px;
  background-position: 10px 20px, 50px 5px, 80px 50px, 30px 40px;
  /* confetti stays at the edges so it never sits behind the words */
  -webkit-mask-image: linear-gradient(90deg, #000 0 14%, transparent 30% 70%, #000 86%); mask-image: linear-gradient(90deg, #000 0 14%, transparent 30% 70%, #000 86%); }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------------- Party (dark) ---------------- */
.theme-party {
  --ev-page: #0D0716; --ev-text: #EDE6FF; --ev-muted: #A79BC4;
  --ev-hero-bg: radial-gradient(ellipse at 50% 120%, #4B137A 0%, #1C0B2E 55%, #0D0716 100%);
  --ev-hero-text: #DCD2F5;
  --ev-title-font: "Bungee", sans-serif; --ev-title-weight: 400; --ev-title-size: clamp(1.8rem, 6vw, 3rem); --ev-title-color: #ffffff; --ev-title-spacing: 0;
  --ev-kicker-font: 700 .8rem/1.3 "Outfit", sans-serif; --ev-kicker-color: #5CF2FF;
  --ev-sub-font: 500 1.1rem/1.4 "Outfit", sans-serif;
  --ev-accent: #FF2BD6; --ev-fill: #B5179E; --ev-on-fill: #ffffff;
  --ev-tab-bg: #1E1230; --ev-tab-text: #E4DAFA; --ev-tab-active-bg: #B5179E; --ev-tab-active-text: #ffffff;
  --ev-dz-bg: #170E26; --ev-dz-border: #6A3B94; --ev-dz-drag: #23133A;
  --ev-card-bg: #170E26; --ev-tile-bg: #1E1230; --ev-tile-radius: 10px;
  --ev-line: rgba(237, 230, 255, .14); --ev-line-strong: rgba(237, 230, 255, .32);
}
.theme-party .event-hero h1.ev-title { /* the theme's signature: neon gradient lettering, kept on purpose */
  background: linear-gradient(90deg, #FF5CE1, #FFE45C 50%, #5CF2FF); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 43, 214, .45)); }
.theme-party .deco-glow { position: absolute; inset: -40%; background:
  radial-gradient(circle at 20% 60%, rgba(255,43,214,.35), transparent 30%), radial-gradient(circle at 80% 40%, rgba(92,242,255,.25), transparent 28%);
  animation: glow 8s ease-in-out infinite alternate; }
.theme-party .deco-spark { position: absolute; filter: drop-shadow(0 0 6px currentColor); animation: twinkle 2.4s ease-in-out infinite; }
.theme-party .deco-spark:nth-of-type(2n) { animation-delay: .9s; }
@keyframes glow { to { transform: translateX(6%) rotate(8deg); } }
.theme-party .ev-notice-warn { background: #2A2108; border-color: #6B5410; color: #F6DE8D; }

/* ---------------- Elegant ---------------- */
.theme-elegant {
  --ev-page: #F7F5F0; --ev-text: #1D1A16; --ev-muted: #6E675B;
  --ev-hero-bg: linear-gradient(180deg, #151515 0%, #0B0B0B 100%);
  --ev-hero-text: #E9DDC1;
  --ev-title-font: "Playfair Display", serif; --ev-title-weight: 700; --ev-title-color: #F3E9D2;
  --ev-title-transform: uppercase; --ev-title-spacing: .08em; --ev-title-size: clamp(1.6rem, 5vw, 2.8rem);
  --ev-kicker-font: 600 .85rem/1.3 "Cormorant Garamond", serif; --ev-kicker-color: #D4B271;
  --ev-sub-font: italic 500 1.2rem/1.4 "Cormorant Garamond", serif;
  --ev-accent: #C9A45C; --ev-fill: #111111; --ev-on-fill: #E8D3A2;
  --ev-tab-bg: #ECE7DC; --ev-tab-text: #3B352B; --ev-tab-active-bg: #111111; --ev-tab-active-text: #E8D3A2;
  --ev-dz-border: #CDBB93; --ev-tile-bg: #ECE7DC; --ev-tile-radius: 0;
}
.theme-elegant .event-hero { padding: 60px 0 52px; }
.theme-elegant .deco-fan { position: absolute; left: 50%; bottom: -2px; width: min(520px, 90vw); transform: translateX(-50%); opacity: .2; }
.theme-elegant .deco-line { position: absolute; left: 8%; right: 8%; height: 0; border-top: 1px solid #C9A45C; }
.theme-elegant .deco-line.top { top: 22px; } .theme-elegant .deco-line.bottom { bottom: 22px; }
.theme-elegant .deco-line::before, .theme-elegant .deco-line::after { content: "◆"; position: absolute; top: -9px; color: #C9A45C; font-size: 12px; }
.theme-elegant .deco-line::before { left: -14px; } .theme-elegant .deco-line::after { right: -14px; }

/* ---------------- phones: the header takes ~40% of the screen, the upload panel is in view ---------------- */
@media (max-width: 600px) {
  .event-body .event-hero { padding: 30px 0 24px; }
  .event-body .event-hero h1.ev-title { font-size: min(var(--ev-title-size), 2.4rem); }
  .ev-subtitle { font-size: 1rem; margin-bottom: 8px; }
  .theme-wedding .event-hero { padding: 54px 0 30px; }
  .theme-wedding .event-hero h1.ev-title { font-size: 2.7rem; }
  .theme-wedding .deco-rings { top: 22px; width: 38px; }
  .theme-wedding .deco-corner { width: 76px; opacity: .8; }
  .theme-wedding .ev-hero-inner { padding-inline: 64px; }
  .theme-baptism .event-hero { padding: 32px 0 46px; }
  .theme-baptism .deco-cloud.c1 { width: 200px; } .theme-baptism .deco-cloud.c2 { width: 170px; } .theme-baptism .deco-cloud.c3 { display: none; }
  .theme-birthday .deco-balloons { width: 64px; opacity: .55; }
  .theme-elegant .event-hero { padding: 40px 0 34px; }
  .theme-elegant .deco-line.top { top: 14px; } .theme-elegant .deco-line.bottom { bottom: 14px; }
  .theme-elegant .deco-fan { opacity: .14; }
  .event-body .event-hero .meta { gap: 4px 14px; font-size: 13px; }
  .ev-body { padding-top: 14px; }

}
@media (prefers-reduced-motion: reduce) {
  .ev-deco * { animation: none !important; }
  .up-thumbs img, .up-sum-bar span { animation: none; transition: none; }
}

/* ---------- confirm / notice dialog (js/dialog.js) ---------- */
.ymd-dialog { width: min(400px, calc(100vw - 32px)); padding: 24px 20px 20px; border: 1px solid var(--ev-line); border-radius: 18px; background: var(--ev-card-bg); color: var(--ev-text);
  font: 400 16px/1.5 var(--ev-font); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .5); overscroll-behavior: contain; }
.ymd-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.ymd-dialog p { margin: 0 0 20px; overflow-wrap: anywhere; }
.ymd-dialog-actions { display: flex; gap: 10px; }
.ymd-dialog-actions .btn { flex: 1; min-width: 0; }
.event-body .ymd-danger, .event-body .ymd-danger:hover, .event-body .ymd-danger:focus-visible { background: #C62828; color: #fff; }
@media (prefers-reduced-motion: no-preference) { .ymd-dialog[open] { animation: ymd-dialog-in .18s ease-out; } }
@keyframes ymd-dialog-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- messages for the hosts: one row on the page, the wall in a dialog (js/wishes.js) ---------- */
.ev-wishes { display: flex; align-items: center; gap: 8px 12px; margin: 0 0 16px; padding: 8px 12px 8px 8px; border: 1px solid var(--ev-line); border-radius: 12px; background: var(--ev-card-bg); }
.ev-wishes[hidden] { display: none; }
.ev-wishes-main { display: flex; flex: 1 1 auto; align-items: center; gap: 12px; min-width: 0; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ev-text); font: 400 14px/1.35 var(--ev-font); text-align: left; cursor: pointer; }
.ev-wishes-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--ev-accent) 16%, var(--ev-card-bg)); color: var(--ev-text); }
.ev-wishes-ic svg { width: 21px; height: 21px; }
.ev-wishes-text { display: block; min-width: 0; }
.ev-wishes-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.ev-wishes-title strong { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.ev-wishes-main:hover strong { text-decoration: underline; text-underline-offset: .2em; }
.ev-wishes-n { color: var(--ev-muted); font-size: 13px; white-space: nowrap; }
.ev-wishes-snip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-wishes .ev-chip-btn { flex: none; min-height: 44px; }
.is-chal-view .ev-wishes { display: none; } /* looking at one challenge */
@media (max-width: 480px) { .ev-wishes-ic { display: none; } .ev-wishes { padding-left: 14px; } .ev-wishes .ev-chip-btn { padding-inline: 14px; } }

.wish-dialog { width: min(1040px, calc(100vw - 40px)); max-width: none; height: min(860px, calc(100dvh - 40px)); max-height: none; padding: 0; border: 1px solid var(--ev-line); border-radius: 18px; background: var(--ev-page); color: var(--ev-text); font: 400 16px/1.5 var(--ev-font); box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .5); overflow: hidden; }
.wish-dialog[open] { display: flex; flex-direction: column; }
.wish-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.has-wishes-open { overflow: hidden; }
.wish-head { display: flex; flex: none; align-items: center; gap: 12px; padding: 12px 12px 12px 24px; border-bottom: 1px solid var(--ev-line); background: var(--ev-card-bg); }
.event-body .wish-head h2 { flex: 1; min-width: 0; margin: 0; font: 600 20px/1.25 var(--ev-font); overflow-wrap: anywhere; }
.wish-x { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.wish-x:hover { background: var(--ev-line); }
.wish-x svg { width: 20px; height: 20px; }
.wish-scroll { flex: 1; min-height: 0; padding: 20px 24px calc(28px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
.wish-note { display: flex; gap: 10px; margin: 0 0 16px; font-size: 14px; color: var(--ev-muted); }
.wish-note svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.wish-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 20px; }
.wish-bar[hidden], .wish-form[hidden], .wish-thanks[hidden], .wish-empty[hidden], .wish-list[hidden], .wish-err[hidden], .wish-left[hidden], .wish-photo[hidden], .wish-photo-chosen[hidden], .wish-dialog .ev-chip-btn[hidden] { display: none; }
.wish-bar .btn svg { width: 18px; height: 18px; }
.wish-form { max-width: 620px; margin: 0 0 24px; padding: 18px; border: 1px solid var(--ev-line); border-radius: 14px; background: var(--ev-card-bg); }
.event-body .wish-form label { display: block; margin: 0 0 6px; color: var(--ev-text); font: 600 14px/1.3 var(--ev-font); }
.event-body .wish-form textarea, .event-body .wish-form input[type=text] { display: block; width: 100%; margin: 0 0 14px; }
.event-body .wish-form textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.wish-left { margin: -8px 0 12px; font-size: 13px; }
.wish-photo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; }
.wish-photo .ev-chip-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.wish-photo .ev-chip-btn svg { width: 18px; height: 18px; }
.wish-photo-chosen { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; font-size: 14px; }
.wish-photo-chosen img { flex: none; width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.wish-photo-chosen span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wish-voice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
.wish-voice[hidden], .wish-rec-on[hidden], .wish-voice-have[hidden] { display: none; }
.wish-voice .ev-chip-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-align: left; line-height: 1.2; }
.wish-voice .ev-chip-btn svg { flex: none; width: 18px; height: 18px; }
.wish-voice > .muted { flex: 1 0 100%; }
.wish-rec-on { display: flex; flex: 1 0 100%; align-items: center; gap: 12px; min-height: 52px; padding: 4px 6px 4px 16px; border-radius: 99px; background: color-mix(in srgb, var(--ev-accent) 12%, var(--ev-card-bg)); }
.wish-rec-on i { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #D92D20; animation: wish-rec 1.2s ease-in-out infinite; }
@keyframes wish-rec { 50% { opacity: .25; } }
.wish-rec-level { flex: 1; height: 6px; border-radius: 6px; background: var(--ev-line); overflow: hidden; }
.wish-rec-level b { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--ev-fill); transform: scaleX(0); transform-origin: left; transition: transform .1s linear; }
.wish-rec-time { flex: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.event-body .wish-rec-on .btn { flex: none; border-radius: 99px; }
.wish-voice-have { display: flex; flex: 1 0 100%; align-items: center; gap: 6px; }
#wish-voice-player { flex: 1; min-width: 0; }
.wish-player { display: flex; align-items: center; gap: 12px; padding: 4px 16px 4px 4px; border-radius: 99px; background: color-mix(in srgb, var(--ev-accent) 12%, var(--ev-card-bg)); }
.wish .wish-player { margin: 0 0 12px; }
.wish-play { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--ev-fill); color: var(--ev-on-fill); cursor: pointer; }
.wish-play:hover { filter: brightness(.9); }
.wish-play svg { width: 20px; height: 20px; }
.wish-play[aria-busy="true"] { opacity: .6; }
.wish-player input[type=range] { flex: 1; min-width: 0; width: 60px; height: 32px; margin: 0; padding: 0; border: 0; background: none; accent-color: var(--ev-fill); cursor: pointer; }
.wish-player-time { flex: none; font-size: 13px; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .wish-rec-on i { animation: none; } }
.wish-err { margin: 0 0 12px; color: #B42318; font-size: 14px; }
.theme-party .wish-err { color: #FF9C92; }
.wish-acts { display: flex; gap: 10px; }
.wish-acts .btn { flex: 1 1 0; min-width: 0; }
.wish-form.is-busy { opacity: .75; }
.wish-thanks { margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ev-accent) 12%, var(--ev-card-bg)); font-weight: 600; }
.wish-empty { margin: 32px 0; text-align: center; }
.wish-list { columns: 3 250px; column-gap: 16px; margin: 0 0 12px; padding: 0; list-style: none; }
.wish { position: relative; display: inline-block; width: 100%; margin: 0 0 16px; padding: 18px; border: 1px solid var(--ev-line); border-radius: var(--ev-radius); background: var(--ev-card-bg); break-inside: avoid; }
.wish-img { display: block; width: calc(100% + 36px); margin: -18px -18px 14px; padding: 0; border: 0; border-radius: var(--ev-radius) var(--ev-radius) 0 0; background: var(--ev-tile-bg); overflow: hidden; cursor: zoom-in; }
.wish-img img { display: block; width: 100%; max-height: 280px; object-fit: cover; }
.event-body .wish-text { margin: 0 0 12px; white-space: pre-line; overflow-wrap: anywhere; }
.wish-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.wish-author { min-width: 0; font: 700 15px/1.3 var(--ev-font); overflow-wrap: anywhere; }
.theme-wedding .wish-author { font: 400 25px/1.2 "Great Vibes", cursive; }
.theme-elegant .wish-author { font: 600 17px/1.3 "Playfair Display", serif; }
.theme-baptism .wish-author { font-family: "Quicksand", sans-serif; }
.theme-birthday .wish-author { font-family: "Baloo 2", sans-serif; }
.wish-meta { font-size: 12.5px; }
.wish-badge { display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 99px; background: var(--ev-line); font: 600 12px/1.5 var(--ev-font); }
.wish.is-hidden > :not(.wish-note-acts):not(.wish-badge) { opacity: .45; }
.wish-note-acts { display: flex; gap: 2px; margin: 8px 0 -10px -12px; }
.wish-act { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ev-muted); cursor: pointer; }
.wish-act:hover { background: var(--ev-line); color: var(--ev-text); }
.wish-act svg { width: 17px; height: 17px; }
.wish.is-new { animation: wish-new 2.4s ease-out; }
@keyframes wish-new { 0%, 40% { border-color: var(--ev-fill); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ev-accent) 30%, transparent); } }
.up-wish strong { display: block; font: 600 15px/1.35 var(--ev-font); }
@media (max-width: 640px) {
  .wish-dialog { inset: 0; width: 100%; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .wish-head { padding: 8px 8px 8px 16px; }
  .wish-scroll { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
  .wish-form { padding: 14px; }
  .wish-acts { position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom)); margin: 0 -14px -14px; padding: 10px 14px 14px; border-radius: 0 0 14px 14px; background: var(--ev-card-bg); }
}
@media (prefers-reduced-motion: no-preference) { .wish-dialog[open] { animation: ymd-dialog-in .2s ease-out; } }
@media (prefers-reduced-motion: reduce) { .wish.is-new { animation: none; } }

/* ---------------- theme picker (checkout / admin) ---------------- */
.theme-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.theme-opt { position: relative; display: block; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; margin: 0; font-weight: 400; background: #fff; transition: border-color .2s; }
.theme-opt:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.theme-opt input { position: absolute; opacity: 0; pointer-events: none; }
.theme-opt:has(input:focus-visible) { outline: 2px solid var(--ink, #222); outline-offset: 2px; }
.owner-themes { margin-top: 18px; }
.theme-swatch { height: 74px; display: grid; place-items: center; font-size: 1.15rem; padding: 22px 6px 6px; text-align: center; line-height: 1.1; }
.theme-opt-body { padding: 8px 10px 10px; }
.theme-opt-body strong { display: block; font-family: var(--font-head); font-size: .95rem; }
.theme-opt-body .tp { font-size: .82rem; color: var(--muted); }
.theme-opt-body .tp.extra { color: var(--brand); font-weight: 700; }
.theme-opt .preview-link { position: absolute; top: 6px; right: 6px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.theme-opt .preview-link:hover { background: var(--ink); color: #fff; }
.sw-classic  { background: #F7F7F7; color: #222; font-family: "Inter", var(--font-head); font-weight: 700; box-shadow: inset 0 -3px 0 #FF3D8B; }
.sw-wedding  { background: radial-gradient(ellipse at 50% 0%, #FFFDF8, #F1E4CF); color: #5B4636; font-family: "Great Vibes", cursive; font-size: 1.7rem; box-shadow: inset 0 0 0 5px #FBF6EE, inset 0 0 0 6px #C9AE7E; }
.sw-baptism  { background: linear-gradient(180deg, #D7ECFA, #FBEFF5); color: #2F5876; font-family: "Quicksand", sans-serif; font-weight: 700; }
.sw-birthday { background: linear-gradient(120deg, #FF8FBA, #FFA488, #FFD36B); color: #3B2440; font-family: "Baloo 2", sans-serif; font-weight: 800; }
.sw-party    { background: radial-gradient(ellipse at 50% 120%, #4B137A, #0D0716); color: #FF5CE1; font-family: "Bungee", sans-serif; text-shadow: 0 0 10px rgba(255,43,214,.7); font-size: 1rem; }
.sw-all      { background: linear-gradient(100deg, #F7F7F7 0 16.6%, #F1E4CF 16.6% 33.3%, #D7ECFA 33.3% 50%, #FF8FBA 50% 66.6%, #3A1260 66.6% 83.3%, #111 83.3%); color: #222; font-family: "Inter", sans-serif; font-weight: 700; padding: 6px; }
.sw-all span { background: #fff; border-radius: 99px; padding: 5px 12px; font-size: .95rem; }
.sw-elegant  { background: #111; color: #F3E9D2; font-family: "Playfair Display", serif; text-transform: uppercase; letter-spacing: .1em; font-size: .9rem; box-shadow: inset 0 -3px 0 #C9A45C; }

/* ---------- floating upload button: a labelled pill (nobody has to guess what the camera means) ---------- */
.fab-wrap { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.fab-wrap > * { pointer-events: auto; }
.fab-upload { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 18px; border: 0; border-radius: 99px; cursor: pointer;
  background: var(--ev-fill); color: var(--ev-on-fill); font: 600 16px/1 var(--ev-font, system-ui);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, .35), 0 0 0 3px color-mix(in srgb, var(--ev-page) 70%, transparent); transition: transform .25s var(--ev-ease, ease-out), opacity .2s ease, visibility .2s; -webkit-tap-highlight-color: transparent; }
.fab-upload:hover { transform: translateY(-2px); }
.fab-upload:active { transform: scale(.97); }
.fab-upload:focus-visible { outline: 3px solid var(--ev-text); outline-offset: 3px; }
.fab-upload svg { width: 24px; height: 24px; flex: none; }
.fab-upload { visibility: visible; }
.at-box .fab-upload { visibility: hidden; opacity: 0; transform: translateY(8px); }
.fab-upload.busy svg { animation: fab-breathe 1.6s ease-in-out infinite; }
@keyframes fab-breathe { 50% { opacity: .45; } }
/* the nudge (event.js): the camera "clicks" and a soft flash leaves the button */
.fab-upload.is-nudge svg, .dropzone.is-nudge .icon-circle svg { animation: fab-click .7s var(--ev-ease, ease-out); }
.fab-upload.is-nudge::after, .dropzone.is-nudge .icon-circle::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: fab-flash .85s ease-out .12s both; }
@keyframes fab-click { 0%, 100% { transform: none; } 22% { transform: scale(.78); } 48% { transform: scale(1.16) rotate(-6deg); } }
@keyframes fab-flash { 0% { opacity: .55; box-shadow: 0 0 0 0 var(--ev-fill); } 100% { opacity: 0; box-shadow: 0 0 0 14px var(--ev-fill); } }

/* ---------- "Ana added 3 photos" (event.js): photos other guests add while the page is open ---------- */
.event-body .tabs, .gallery-tools, .media-grid { scroll-margin-top: 14px; }
.ev-news { position: fixed; z-index: 89; bottom: calc(86px + env(safe-area-inset-bottom)); left: 16px; right: 16px; display: flex; justify-content: center; pointer-events: none; }
.ev-news-btn { pointer-events: auto; display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 48px; padding: 6px 16px 6px 8px; border: 1px solid var(--ev-line); border-radius: 99px; background: var(--ev-card-bg); color: var(--ev-text); font: 600 15px/1.25 var(--ev-font); text-align: left; cursor: pointer; box-shadow: 0 10px 28px -8px rgba(0, 0, 0, .4); animation: news-in .45s var(--ev-ease, ease-out); }
.ev-news-btn[hidden] { display: none; }
.ev-news-btn > span:last-of-type { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ev-news-btn svg { flex: none; width: 18px; height: 18px; }
.ev-news-thumbs { display: flex; flex: none; }
.ev-news-thumbs img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--ev-tile-bg); box-shadow: 0 0 0 2px var(--ev-card-bg); }
.ev-news-thumbs img + img { margin-left: -14px; }
/* surprise albums (Surprise.php): a blurred hint until opened */
img.veil { filter: blur(9px) saturate(1.1); transform: scale(1.3); }
.media-item:hover img.veil { transform: scale(1.3); }
.up-others .up-thumbs button { overflow: hidden; }
.up-thumbs img.veil { transform: none; filter: blur(4px); }
.ev-news-thumbs img.veil { transform: none; filter: blur(3px); }
.veil-mark { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; pointer-events: none; }
.veil-mark svg { width: 26px; height: 26px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .55)); }
body:has(.fab-status:not([hidden])) .ev-news { bottom: calc(132px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .ev-news, body:has(.fab-status:not([hidden])) .ev-news { bottom: 20px; left: 300px; right: 300px; } } /* between the chat and the upload button */
@media (max-width: 600px) { body:has(.chat-wrap[data-state="open"]) .ev-news { display: none; } }
body:has(.demo-bar) :is(.tabs, .media-grid, .ev-chal-view) { scroll-margin-top: 92px; }
@keyframes news-in { from { opacity: 0; transform: translateY(14px); } }
body.is-selecting .ev-news, body:has(.lightbox:not(.hidden)) .ev-news, body:has(.chat-wrap[data-state="open"][data-full="1"]) .ev-news { display: none; }
.media-item.is-new { animation: new-tile 2.4s ease-out; }
.event-body .media-item.is-new:focus:not(:focus-visible) { outline: none; }
@keyframes new-tile { 0%, 45% { outline: 3px solid var(--ev-fill); outline-offset: 2px; } 100% { outline: 3px solid transparent; outline-offset: 2px; } }
.fab-status { border: 0; cursor: pointer; padding: 8px 14px; border-radius: 99px; font: 600 13px/1.2 var(--ev-font, system-ui); background: var(--ev-card-bg, #fff); color: var(--ev-text); box-shadow: 0 8px 24px -6px rgba(0, 0, 0, .3); white-space: nowrap; }
.fab-status.is-done { background: #E8F6EF; color: #0B6B48; }
.fab-status.is-failed { background: #FDECEE; color: #B42318; }
.fab-status[hidden] { display: none; }
body:has(.lightbox:not(.hidden)) .fab-wrap { display: none; }
@media (prefers-reduced-motion: reduce) { .ev-news-btn { animation: none; } .fab-upload { transition: none; } .fab-upload.busy svg { animation: none; } }

/* ---------- guest chat bubble (bottom-left; quieter than the upload pill) ---------- */
.chat-wrap { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 91; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.chat-bubble { position: relative; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--ev-line-strong, rgba(0,0,0,.2)); cursor: pointer; display: grid; place-items: center;
  background: var(--ev-card-bg, #fff); color: var(--ev-text); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .35); transition: transform .25s var(--ev-ease, ease-out); -webkit-tap-highlight-color: transparent; }
.chat-bubble:hover { transform: translateY(-2px); }
.chat-bubble:active { transform: scale(.96); }
.chat-bubble:focus-visible { outline: 3px solid var(--ev-text); outline-offset: 3px; }
.chat-bubble svg { width: 24px; height: 24px; }
.chat-wrap[data-state="open"] .chat-bubble { background: var(--ev-fill); color: var(--ev-on-fill); border-color: transparent; }
.chat-bubble.has-unread { animation: chat-nudge 2.4s ease-in-out 1; } /* once: the upload button is the one that should stand out */
@keyframes chat-nudge { 0%, 85%, 100% { transform: none; } 90% { transform: rotate(-10deg); } 95% { transform: rotate(8deg); } }
.chat-unread { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #D92D20; color: #fff; font: 700 12px/22px var(--ev-font, system-ui); text-align: center; box-shadow: 0 0 0 2px var(--ev-card-bg, #fff); }
.chat-unread[hidden] { display: none; }
.chat-panel { width: min(380px, calc(100vw - 32px)); height: min(520px, calc(100vh - 120px)); height: min(520px, calc(100dvh - 120px)); display: flex; flex-direction: column;
  background: var(--ev-card-bg, #fff); color: var(--ev-text); border-radius: 16px; box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .45), 0 0 0 1px var(--ev-line, rgba(0,0,0,.06)); overflow: hidden;
  animation: chat-in .22s var(--ev-ease, ease-out); transform-origin: bottom left; }
.chat-panel[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.chat-head { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 16px; background: var(--ev-fill); color: var(--ev-on-fill); font: 600 15px/1.2 var(--ev-font, inherit); }
.chat-head .spacer { flex: 1; }
.chat-x { display: grid; place-items: center; border: 0; background: rgba(255, 255, 255, .16); color: inherit; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.chat-x:hover { background: rgba(255, 255, 255, .3); }
.chat-x svg { width: 18px; height: 18px; }
.chat-x:focus-visible { outline-color: currentColor; }
.chat-note { padding: 8px 14px; font-size: 13px; background: #FFF4D6; color: #5B4300; }
.chat-note.is-quiet { padding: 5px 14px; background: none; color: var(--ev-muted); text-align: center; border-bottom: 1px solid var(--ev-line); }
.chat-owner-bar { display: flex; justify-content: flex-end; padding: 0 10px; border-bottom: 1px solid var(--ev-line); }
.chat-owner-bar .ev-link-btn { font-size: 13px; color: var(--ev-muted); }
.chat-owner-bar .ev-link-btn:hover { color: #B42318; }
.chat-list { list-style: none; margin: 0; padding: 14px 12px 6px; flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { flex: 1; display: grid; place-items: center; padding: 20px; text-align: center; color: var(--ev-muted); font-size: 14px; }
.chat-empty[hidden] { display: none; }
.chat-list:empty { flex: 0 0 auto; padding: 0; }
.chat-msg { position: relative; align-self: flex-start; max-width: 86%; padding: 8px 12px 9px; border-radius: 14px 14px 14px 4px; background: color-mix(in srgb, var(--ev-text) 7%, transparent); transition: transform .15s ease-out; }
.chat-msg.is-mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: color-mix(in srgb, var(--ev-accent) 16%, transparent); }
.chat-msg.is-host { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ev-accent) 60%, transparent); }
.chat-meta { display: flex; align-items: center; gap: 6px; min-height: 18px; font-size: 12px; margin-bottom: 2px; }
.chat-meta strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.chat-meta time { margin-right: auto; color: var(--ev-muted); font-variant-numeric: tabular-nums; }
.chat-host { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--ev-fill); color: var(--ev-on-fill); }
/* message actions: small icons, 44px tap areas that don't stretch the row */
.chat-rep, .chat-react-btn, .chat-edit, .chat-del { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; margin: -13px -8px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ev-muted); cursor: pointer; opacity: .8; }
.chat-rep svg, .chat-react-btn svg, .chat-edit svg, .chat-del svg { width: 16px; height: 16px; }
.chat-rep:hover, .chat-rep:focus-visible, .chat-react-btn:hover, .chat-react-btn:focus-visible, .chat-edit:hover, .chat-edit:focus-visible { opacity: 1; color: var(--ev-text); }
.chat-del:hover, .chat-del:focus-visible { opacity: 1; color: #B42318; }
@media (hover: hover) { .chat-msg:not(:hover):not(:focus-within) .chat-rep, .chat-msg:not(:hover):not(:focus-within) .chat-react-btn, .chat-msg:not(:hover):not(:focus-within) .chat-edit, .chat-msg.is-mine:not(:hover):not(:focus-within) .chat-del { opacity: 0; } }
/* your own messages have up to four icons: on small phones they move below the name */
.chat-acts { display: inline-flex; align-items: center; gap: 6px; flex: none; margin-left: auto; height: 18px; }
.chat-msg.is-mine .chat-meta { flex-wrap: wrap; row-gap: 10px; }
.chat-edited { margin-left: 6px; font-size: 11px; font-style: italic; color: var(--ev-muted); white-space: nowrap; }
.chat-msg.is-editing { outline: 2px solid var(--ev-accent); outline-offset: 2px; }
.chat-msg.is-swiping::before { content: ""; position: absolute; left: -26px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); background: var(--ev-fill);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14 4 9l5-5'/%3E%3Cpath d='M4 9h10.5a5.5 5.5 0 0 1 0 11H11'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14 4 9l5-5'/%3E%3Cpath d='M4 9h10.5a5.5 5.5 0 0 1 0 11H11'/%3E%3C/svg%3E") center / contain no-repeat; }
.chat-msg.is-flash { animation: chat-flash 1.4s ease-out; }
@keyframes chat-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--ev-fill); } 100% { box-shadow: 0 0 0 3px transparent; } }
.chat-quote { display: flex; flex-direction: column; gap: 1px; width: 100%; min-width: 0; max-width: 100%; overflow: hidden; text-align: left; margin: 2px 0 4px; padding: 6px 10px; border: 0; border-left: 3px solid var(--ev-accent); border-radius: 6px;
  background: color-mix(in srgb, var(--ev-text) 6%, transparent); color: inherit; font: inherit; font-size: 13px; cursor: pointer; }
.chat-quote strong { font-size: 12px; color: var(--ev-text); }
.chat-quote span { color: var(--ev-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-quote.is-deleted { font-style: italic; color: var(--ev-muted); cursor: default; }
.chat-replybar { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 10px; border-left: 3px solid var(--ev-accent); border-radius: 8px; background: color-mix(in srgb, var(--ev-text) 6%, transparent); font-size: 13px; }
.chat-replybar[hidden] { display: none; }
.chat-replybar-q { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-replybar-label { color: var(--ev-muted); font-size: 12px; }
.chat-replybar-q > span:last-child { color: var(--ev-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-replybar-x { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; cursor: pointer; color: var(--ev-muted); }
.chat-replybar-x svg { width: 16px; height: 16px; }
.chat-text { font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-form { padding: 10px 12px 12px; border-top: 1px solid var(--ev-line); display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.chat-panel, .chat-panel * { box-sizing: border-box; }
.chat-send-row, .chat-replybar, .chat-msg { min-width: 0; }
.chat-form input, .chat-form textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--ev-line-strong); background: transparent; color: inherit; font: inherit; font-size: 16px; min-height: 44px; }
.chat-form input { font-size: 15px; }
.chat-send-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-send-row textarea { flex: 1; min-width: 0; }
.chat-form textarea { resize: none; max-height: 120px; line-height: 1.35; overflow-y: hidden; } /* chat.js makes it scroll past 120px */
.chat-send { flex: 0 0 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--ev-fill); color: var(--ev-on-fill); }
.chat-send:disabled { opacity: .5; cursor: wait; }
.chat-send svg { width: 20px; height: 20px; }
.chat-err { font-size: 13px; color: #B42318; }
.theme-party .chat-err, .theme-party .up-failed { color: #FF8A80; }
.chat-err[hidden] { display: none; }
body:has(.lightbox:not(.hidden)) .chat-wrap { display: none; }

/* ---------- chat: links, big emojis, GIFs, "latest" button ---------- */
.chat-text a { color: inherit; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--ev-accent); }
.chat-text.is-big { font-size: 40px; line-height: 1.2; }
.chat-text.is-mid { font-size: 28px; line-height: 1.25; }
.chat-text.is-big .chat-edited, .chat-text.is-mid .chat-edited { vertical-align: middle; }
.chat-gif { position: relative; width: fit-content; max-width: 100%; margin-top: 4px; border-radius: 10px; overflow: hidden; background: color-mix(in srgb, var(--ev-text) 8%, transparent); }
.chat-gif.is-sticker { background: none; border-radius: 0; }
.chat-gif img { display: block; width: auto; height: auto; max-width: min(100%, 260px); max-height: 240px; }
.chat-gif.is-sticker img { max-width: min(100%, 140px); max-height: 140px; }
.chat-gif .chat-text { display: block; padding: 8px 12px; font-style: italic; color: var(--ev-muted); }
.chat-gif-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border: 2px solid #fff; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font: 700 14px/1 system-ui, sans-serif; cursor: pointer; }
.chat-latest-row { position: relative; height: 0; z-index: 2; }
.chat-latest { position: absolute; right: 12px; bottom: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--ev-line-strong); border-radius: 99px; background: var(--ev-card-bg, #fff); color: var(--ev-text); font: 600 13px/1 var(--ev-font, system-ui); box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .4); cursor: pointer; }
.chat-latest[hidden] { display: none; }
.chat-latest span:empty { display: none; }
.chat-latest svg { width: 18px; height: 18px; flex: none; }

/* ---------- chat: emoji / GIF / sticker picker (emoji.js, gifs.js) ---------- */
.chat-emoji { flex: 0 0 40px; width: 40px; height: 44px; margin: 0 -4px 0 -6px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ev-muted); cursor: pointer; display: grid; place-items: center; }
.chat-emoji svg { width: 25px; height: 25px; }
.chat-emoji:hover, .chat-emoji[aria-expanded="true"] { color: var(--ev-text); }
.chat-emoji[aria-expanded="true"] { background: color-mix(in srgb, var(--ev-accent) 18%, transparent); }
.chat-picker { --pick-h: min(270px, 44vh); height: var(--pick-h); display: flex; flex-direction: column; min-height: 0; margin: 0 -4px -4px; }
@supports (height: 1dvh) { .chat-picker { --pick-h: min(270px, 44dvh); } }
.chat-wrap[data-full="1"] .chat-picker { --pick-h: min(340px, 48vh); }
.chat-wrap[data-kb] .chat-picker { --pick-h: max(110px, min(240px, calc(var(--kb-h) - 190px))); }
.chat-picker[hidden], .chat-pane[hidden], .emo-tones[hidden], .emo-nav[hidden] { display: none; }
/* low screens (phone held sideways): the picker takes the whole panel, above the rest only the composer stays */
@media (max-height: 480px) {
  .chat-wrap[data-state="open"][data-picker]:not([data-kb]) .chat-head, .chat-wrap[data-state="open"][data-picker]:not([data-kb]) .chat-bubble { display: none; }
  .chat-wrap[data-state="open"][data-picker]:not([data-kb]):not([data-full="1"]) { bottom: 8px; }
  .chat-wrap[data-state="open"][data-picker]:not([data-kb]):not([data-full="1"]) .chat-panel { height: calc(100vh - 16px); height: calc(100dvh - 16px); }
  .chat-wrap[data-state="open"][data-picker]:not([data-kb]) .chat-picker { --pick-h: max(150px, calc(100vh - 100px)); }
  .chat-wrap[data-state="open"][data-picker]:not([data-kb]) .chat-picker .emo-nav { margin-top: 0; }
  .chat-wrap[data-picker] .chat-latest { display: none; }
}
/* room for the messages while picking */
.chat-wrap[data-picker] #chat-name, .chat-wrap[data-picker] .chat-owner-bar { display: none; }
.chat-wrap[data-picker][data-kb] .chat-head { display: none; }
.chat-tabs { display: flex; flex: none; gap: 4px; margin-bottom: 6px; }
.chat-tab { flex: 1; min-height: 40px; padding: 0 6px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ev-muted); font: 600 14px/1 var(--ev-font, system-ui); cursor: pointer; }
.chat-tab:hover { color: var(--ev-text); }
.chat-tab[aria-selected="true"] { color: var(--ev-text); border-bottom-color: var(--ev-accent); }
.chat-pane { flex: 1; min-height: 0; }
.emo, .gifs { display: flex; flex-direction: column; min-height: 0; }
.emo *, .gifs * { box-sizing: border-box; }
.emo-top { display: flex; flex: none; gap: 6px; }
.emo .emo-search, .gifs .emo-search { flex: 1; width: 100%; min-width: 0; min-height: 40px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--ev-line-strong); background: transparent; color: inherit; font: inherit; font-size: 16px; }
.gifs .emo-search { flex: none; }
.emo-tone { flex: 0 0 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: none; font-size: 20px; line-height: 1; cursor: pointer; }
.emo-tone:hover { background: color-mix(in srgb, var(--ev-text) 8%, transparent); }
.emo-tones { display: flex; flex: none; justify-content: flex-end; gap: 2px; padding-top: 4px; }
.emo-tones .emo-e { width: 40px; flex: none; }
.emo-tones .emo-e[aria-pressed="true"] { background: color-mix(in srgb, var(--ev-accent) 24%, transparent); }
.emo-nav { display: flex; flex: none; margin: 4px 0 0; border-bottom: 1px solid var(--ev-line); }
.emo-tab { flex: 1; min-width: 0; height: 38px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 17px; line-height: 1; cursor: pointer; filter: grayscale(1); opacity: .65; }
.emo-tab:hover, .emo-tab[aria-current="true"] { filter: none; opacity: 1; }
.emo-tab[aria-current="true"] { border-bottom-color: var(--ev-accent); }
.emo-grid { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
.emo-h { padding: 8px 4px 2px; font-size: 12px; font-weight: 600; color: var(--ev-muted); }
.emo-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
.emo-e { height: 42px; padding: 0; border: 0; border-radius: 10px; background: none; color: inherit; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; font-size: 25px; line-height: 1; cursor: pointer; overflow: hidden; }
.emo-e:hover { background: color-mix(in srgb, var(--ev-text) 9%, transparent); }
.emo-e:focus-visible, .emo-tab:focus-visible, .gifs-g:focus-visible { outline: 2px solid var(--ev-text); outline-offset: -2px; }
.emo-note { grid-column: 1 / -1; padding: 22px 12px; text-align: center; font-size: 14px; color: var(--ev-muted); }
.emo-note .ev-link-btn { display: block; margin: 4px auto 0; }
.gifs-grid { flex: 1; min-height: 0; margin-top: 8px; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); grid-auto-rows: 96px; gap: 6px; align-content: start; }
.gifs-g { padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: color-mix(in srgb, var(--ev-text) 8%, transparent); cursor: pointer; }
.gifs-g img { display: block; width: 100%; height: 100%; object-fit: cover; }
#chat-pane-sticker .gifs-g img { object-fit: contain; padding: 6px; }
.gifs-g:hover { box-shadow: inset 0 0 0 2px var(--ev-accent); }
.gifs-g:hover img { opacity: .85; }
.gifs[aria-busy="true"] .gifs-grid:empty { background: linear-gradient(color-mix(in srgb, var(--ev-text) 6%, transparent) 0 0); border-radius: 8px; }
.gifs-by { flex: none; padding-top: 4px; text-align: right; font-size: 11px; color: var(--ev-muted); }
.react-picker .react-more { display: grid; place-items: center; color: var(--ev-text); }
.react-more svg { width: 20px; height: 20px; }
.react-all { position: fixed; z-index: 200; width: min(340px, calc(100vw - 16px)); height: min(340px, 48vh); padding: 10px; border-radius: 16px; background: var(--ev-card-bg, #fff); color: var(--ev-text); box-shadow: 0 16px 44px -10px rgba(0, 0, 0, .5), 0 0 0 1px var(--ev-line-strong); animation: react-pop .18s var(--ev-ease, ease-out); font-family: var(--ev-font, system-ui); }
@media (max-width: 370px) { .react-picker button { width: 40px; } .react-picker { gap: 0; } }
@media (prefers-reduced-motion: reduce) { .react-all { animation: none; } }

/* ---------- chat dark mode (chat.js; only the chat and the pop-ups opened from it, the album keeps its theme) ----------
   The theme's accent stays and lightly tints the surface. --ev-line* are set again: on .event-body they are already computed from the light text. */
.chat-panel.is-dark, .react-picker.is-dark, .react-all.is-dark {
  color-scheme: dark;
  --ev-card-bg: color-mix(in srgb, var(--ev-accent) 5%, #1B1B1E);
  --ev-text: #F3F3F4;
  --ev-muted: #B4B4BC;
  --ev-line: rgba(255, 255, 255, .14);
  --ev-line-strong: rgba(255, 255, 255, .32);
}
.chat-panel.is-dark .chat-head { background: color-mix(in srgb, var(--ev-accent) 9%, #29292E); color: var(--ev-text); }
.chat-panel.is-dark .chat-x { background: rgba(255, 255, 255, .1); }
.chat-panel.is-dark .chat-x:hover { background: rgba(255, 255, 255, .2); }
.chat-panel.is-dark .chat-note:not(.is-quiet) { background: #2A2108; color: #F6DE8D; }
.chat-panel.is-dark .chat-err, .chat-panel.is-dark .chat-del:hover, .chat-panel.is-dark .chat-del:focus-visible, .chat-panel.is-dark .chat-owner-bar .ev-link-btn:hover { color: #FF8F7A; }
.theme-elegant .chat-panel.is-dark { --ev-fill: #C9A45C; --ev-on-fill: #1D1A16; } /* its fill is black */
.chat-dark-btn .i-sun, .chat-panel.is-dark .chat-dark-btn .i-moon { display: none; }
.chat-panel.is-dark .chat-dark-btn .i-sun { display: block; }

/* ---------- privacy line, report, not-open-yet page ---------- */
.up-privacy { margin: 8px 2px 0; font-size: 13px; line-height: 1.4; color: var(--ev-muted); text-align: center; }
.up-privacy a, .ev-notice a { color: inherit; text-decoration: underline; text-underline-offset: .18em; }
.event-footer .ev-privacy { margin: 6px 0 0; }
.event-footer .ev-privacy a { min-height: 44px; text-decoration: underline; text-underline-offset: .25em; }
.report-dialog h2 { margin: 0 0 6px; font: 600 20px/1.25 var(--ev-font); }
.event-body .report-dialog p { margin: 0 0 10px; font-size: 15px; }
.event-body .report-opt { display: flex; align-items: center; gap: 12px; min-height: 48px; color: var(--ev-text); font: 500 16px/1.35 var(--ev-font); cursor: pointer; }
.report-opt input { flex: none; width: 20px; height: 20px; margin: 0; }
.report-dialog .ymd-dialog-actions { margin-top: 14px; }
.ev-pin-card .ev-soon-date { margin: 0 0 10px; font: var(--ev-title-weight) clamp(1.7rem, 6vw, 2.4rem)/1.15 var(--ev-title-font); color: var(--ev-text); }
.ev-pin-card .ev-soon-ok { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: #E7F6EF; color: #04503A; font-size: 15px; font-weight: 600; }
.ev-soon-ok svg { flex: none; width: 20px; height: 20px; }

/* ---------- chat full screen ---------- */
.chat-full-btn .i-shrink, .chat-wrap[data-full="1"] .chat-full-btn .i-expand { display: none; }
.chat-wrap[data-full="1"] .chat-full-btn .i-shrink { display: block; }
.chat-wrap[data-state="open"][data-full="1"] { inset: 0; left: 0; right: 0; bottom: 0; top: 0; z-index: 150; gap: 0; }
.chat-wrap[data-state="open"][data-full="1"] .chat-panel { width: 100%; height: 100%; border-radius: 0; box-shadow: none; animation: none; }
.chat-wrap[data-state="open"][data-full="1"] .chat-bubble { display: none; }
.chat-wrap[data-full="1"] .chat-head { padding-top: max(8px, env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
.chat-wrap[data-full="1"] .chat-list, .chat-wrap[data-full="1"] .chat-form, .chat-wrap[data-full="1"] .chat-note, .chat-wrap[data-full="1"] .chat-owner-bar {
  padding-left: max(12px, calc((100% - 760px) / 2)); padding-right: max(12px, calc((100% - 760px) / 2)); }
.chat-wrap[data-full="1"] .chat-form { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.chat-wrap[data-full="1"] .chat-msg { max-width: min(86%, 560px); }
body:has(.chat-wrap[data-state="open"][data-full="1"]) { overflow: hidden; }
/* phone keyboard is up (chat.js): fill exactly the part of the screen above it */
.chat-wrap[data-state="open"][data-kb] { top: calc(var(--kb-top, 0px) + 8px); bottom: auto; height: calc(var(--kb-h) - 16px); }
.chat-wrap[data-state="open"][data-kb][data-full="1"] { top: var(--kb-top, 0px); bottom: auto; height: var(--kb-h); }
.chat-wrap[data-state="open"][data-kb] .chat-panel, .chat-wrap[data-state="open"][data-kb]:not([data-full="1"]) .chat-panel { flex: 1 1 0; height: auto; min-height: 0; }
.chat-wrap[data-kb] .chat-form { padding-bottom: 12px; }
.chat-wrap[data-kb="tight"] .chat-head, .chat-wrap[data-kb="tight"] #chat-name:not(:focus) { display: none; } /* landscape: no room */
body:has(.chat-wrap[data-state="open"][data-full="1"]) .fab-wrap { display: none; }

/* ---------- emoji reactions (chat messages + photos) ---------- */
.react-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.react-chip { min-height: 36px; border: 1px solid var(--ev-line-strong); background: var(--ev-card-bg, #fff); color: var(--ev-text); border-radius: 99px; padding: 4px 12px; font: 600 13px/1.4 var(--ev-font, system-ui); cursor: pointer; font-variant-numeric: tabular-nums; }
.react-chip.is-mine { border-color: var(--ev-fill); background: color-mix(in srgb, var(--ev-accent) 16%, var(--ev-card-bg, #fff)); }
.react-picker { position: fixed; z-index: 200; display: flex; flex-wrap: nowrap; gap: 2px; padding: 4px; border-radius: 99px; background: var(--ev-card-bg, #fff); box-shadow: 0 10px 30px -6px rgba(0, 0, 0, .4), 0 0 0 1px rgba(0, 0, 0, .08); animation: react-pop .18s var(--ev-ease, ease-out); white-space: nowrap; }
.react-picker button { flex: none; border: 0; background: none; cursor: pointer; font-size: 24px; line-height: 1; width: 44px; height: 44px; border-radius: 50%; transition: transform .12s; }
.react-picker button:hover, .react-picker button:focus-visible { transform: scale(1.2); outline: none; background: color-mix(in srgb, var(--ev-text) 8%, transparent); }
.react-picker button.is-mine { background: color-mix(in srgb, var(--ev-accent) 22%, transparent); }
@keyframes react-pop { from { opacity: 0; transform: translateY(6px) scale(.94); } }
.react-burst { position: absolute; left: 50%; top: 50%; font-size: 72px; line-height: 1; pointer-events: none; transform: translate(-50%, -50%); animation: react-burst .8s ease-out forwards; z-index: 3; }
.chat-msg .react-burst { font-size: 36px; }
@keyframes react-burst { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 60% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -70%) scale(1); } }
#lb-content { position: relative; }
/* pinching zooms the photo (event.js zoomable), never the page; the comments still scroll */
.lightbox { touch-action: none; overflow: hidden; }
.lightbox .lb-c-list { touch-action: pan-y; }
.lightbox #lb-content img { touch-action: none; will-change: transform; }
.lightbox #lb-content img.is-zoomed { cursor: grab; }
.lightbox #lb-content img.is-zoomed:active { cursor: grabbing; }
/* motion photos: the clip plays exactly over the photo */
.lightbox .lb-motion { position: absolute; top: 18px; left: 14px; z-index: 2; }
.lightbox .lb-motion[hidden] { display: none; }
.lightbox .lb-motion[aria-busy="true"] svg { animation: motion-spin 1.2s linear infinite; }
.lightbox .motion-clip { position: absolute; max-width: none; max-height: none; object-fit: cover; background: none; opacity: 0; transition: opacity .25s; pointer-events: none; }
.lightbox .motion-clip.is-on { opacity: 1; }
.lightbox img.has-motion { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.media-item .motion-tag { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; pointer-events: none; }
.media-item .motion-tag svg { width: 15px; height: 15px; display: block; }
.media-item .motion-tag .ic { display: grid; }
.media-grid.is-selecting .motion-tag { display: none; }
.media-item:has(.motion-tag) .chal-tag { max-width: calc(100% - 46px); }
@keyframes motion-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lightbox .lb-motion[aria-busy="true"] svg { animation: none; opacity: .5; } }
.media-item .react-badge { position: absolute; left: 6px; bottom: 6px; background: rgba(0, 0, 0, .62); color: #fff; border-radius: 99px; padding: 1px 8px; font: 700 12px/1.6 system-ui, sans-serif; pointer-events: none; }
.media-item .react-badge.is-mine { box-shadow: 0 0 0 1.5px #fff; }
.event-body .media-item .play + .react-badge, .event-body .media-item:has(.play) .react-badge { left: auto; right: 6px; }
.lightbox .lb-reacts { position: absolute; left: 50%; bottom: 66px; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: rgba(0, 0, 0, .6); z-index: 2; }
.lightbox .lb-reacts[hidden] { display: none; }
/* comments under the open photo: a panel on the right, a sheet at the bottom on phones */
.lightbox .lb-count:not(:empty) { margin-left: 2px; padding: 1px 7px; border-radius: 99px; background: rgba(255, 255, 255, .22); font-size: 12px; }
.lightbox .lb-act[hidden] { display: none; }
.lb-comments { position: absolute; z-index: 4; top: 0; right: 0; bottom: 0; width: 360px; display: flex; flex-direction: column; background: #161616; color: #eee; border-left: 1px solid rgba(255, 255, 255, .1); font: 14px/1.45 var(--ev-font, system-ui), sans-serif; }
.lb-comments[hidden] { display: none; }
.lb-comments header { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 18px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.lb-comments h2 { margin: 0; font-size: 16px; color: #fff; }
.lightbox .lb-comments .lb-c-close { position: static; width: 40px; height: 40px; }
.lb-c-note { margin: 12px 18px 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .08); font-size: 13px; }
.lb-c-list { list-style: none; margin: 0; padding: 8px 18px; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.lb-c-list li { position: relative; padding: 10px 34px 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.lb-c-list li:last-child { border-bottom: 0; }
.lb-c-list li.lb-c-empty { padding: 24px 0; border: 0; color: #aaa; text-align: center; }
.lb-c-list p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.lb-c-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lb-c-head strong { color: #fff; }
.lb-c-head time { color: #999; font-size: 12px; }
.lb-c-host { padding: 0 6px; border-radius: 99px; background: rgba(255, 255, 255, .18); font-size: 11px; font-weight: 700; }
.lb-c-react { margin: -6px -4px -6px auto; align-self: center; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 99px; background: none; color: #999; cursor: pointer; }
.lb-c-react svg { width: 17px; height: 17px; }
.lb-c-react:hover, .lb-c-react:focus-visible { background: rgba(255, 255, 255, .12); color: #fff; outline: none; }
.lb-c-react.has-mine { color: var(--ev-accent, #ff5fa2); }
.lb-c-edit { margin: -6px -4px; align-self: center; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 99px; background: none; color: #999; cursor: pointer; }
.lb-c-edit.is-first { margin-left: auto; }
.lb-c-edit svg { width: 15px; height: 15px; }
.lb-c-edit:hover, .lb-c-edit:focus-visible { background: rgba(255, 255, 255, .12); color: #fff; outline: none; }
.lb-c-edited { color: #999; font-size: 12px; font-style: italic; }
.lb-c-list li.is-editing { background: rgba(255, 255, 255, .06); box-shadow: -18px 0 0 rgba(255, 255, 255, .06), inset 3px 0 0 var(--ev-accent, #ff5fa2); }
.lb-c-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 10px; background: rgba(255, 255, 255, .08); font-size: 13px; color: #ddd; }
.lb-c-bar[hidden] { display: none; }
.lb-c-bar-x { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 99px; background: none; color: #bbb; cursor: pointer; }
.lb-c-bar-x svg { width: 16px; height: 16px; }
.lb-c-bar-x:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.lb-c-list .react-chips { margin-top: 6px; }
.lb-c-list .react-chip { min-height: 30px; padding: 2px 10px; border-color: rgba(255, 255, 255, .18); background: #242424; color: #eee; }
.lb-c-list .react-chip.is-mine { border-color: var(--ev-accent, #ff5fa2); background: color-mix(in srgb, var(--ev-accent, #ff5fa2) 22%, #242424); }
.lb-c-list .react-burst { left: 40%; top: 50%; font-size: 36px; }
.lb-c-del { position: absolute; top: 8px; right: 0; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 99px; background: none; color: #aaa; cursor: pointer; }
.lb-c-del svg { width: 16px; height: 16px; }
.lb-c-del:hover { background: #C62828; color: #fff; }
.lb-c-form { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(255, 255, 255, .1); display: grid; gap: 8px; }
.lb-c-form[hidden] { display: none; }
.event-body .lb-c-form input[type=text], .lb-c-form input { width: 100%; margin: 0; min-height: 44px; box-sizing: border-box; border: 1px solid rgba(255, 255, 255, .2); border-radius: 22px; padding: 0 16px; background: #262626; color: #fff; font: 16px/1 var(--ev-font, system-ui), sans-serif; }
.lb-c-form input::placeholder { color: #999; }
.lb-c-form input[hidden] { display: none; }
.lb-c-row { display: flex; gap: 8px; }
.lightbox .lb-c-send { min-height: 44px; background: #fff; color: #111; }
.lightbox .lb-c-send:hover { background: #ddd; color: #111; }
.lb-c-err { margin: 0; color: #ff8a80; font-size: 13px; }
.lb-c-err[hidden] { display: none; }
@media (min-width: 900px) {
  .lightbox.has-comments { padding-right: 360px; box-sizing: border-box; }
  .lightbox.has-comments img, .lightbox.has-comments video { max-width: calc(96vw - 360px); }
  .lightbox.has-comments .lb-next { right: 374px; }
  .lightbox.has-comments .lb-close { display: none; }
  .lightbox.has-comments .lb-bar { right: 360px; }
  .lightbox.has-comments .lb-reacts { left: calc(50% - 180px); }
}
@media (max-width: 899px) {
  .lb-comments { top: auto; left: 0; width: auto; height: min(62vh, 520px); border-left: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .5); }
}
.lb-react { border: 0; background: none; color: #fff; cursor: pointer; display: flex; align-items: center; gap: 3px; height: 44px; min-width: 44px; padding: 0 8px; border-radius: 99px; font: 700 13px/1 system-ui, sans-serif; transition: transform .12s, background .12s; }
.lb-react .e { font-size: 22px; line-height: 1; }
.lb-react:hover { background: rgba(255, 255, 255, .14); }
.lb-react:active { transform: scale(.92); }
.lb-react.is-mine { background: rgba(255, 255, 255, .26); }
@media (max-width: 560px) { .lightbox .lb-reacts { bottom: 100px; } .lb-react { min-width: 40px; padding: 0 6px; } .lb-react .e { font-size: 20px; } }
@media (prefers-reduced-motion: reduce) { .react-picker, .react-burst { animation: none; } .react-burst { display: none; } }
@media (max-width: 560px) {
  /* open on a phone: the panel takes the width; the upload button steps aside */
  .chat-wrap[data-state="open"] { right: max(16px, env(safe-area-inset-right)); }
  .chat-panel { width: 100%; }
  /* the header already has a close button, so the toggle bubble steps aside and the panel takes its room */
  .chat-wrap[data-state="open"] .chat-bubble { display: none; }
  .chat-wrap[data-state="open"]:not([data-full="1"]) .chat-panel { height: min(600px, calc(100vh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); height: min(600px, calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); }
  body:has(.chat-wrap[data-state="open"]) .fab-wrap { display: none; }
  .fab-upload { height: 52px; padding: 0 18px 0 16px; font-size: 15px; }
  .chat-bubble { width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .chat-bubble, .chat-panel { transition: none; animation: none; } .chat-bubble.has-unread { animation: none; } }

/* ---------- owner moderation (hide / delete) ---------- */
.event-body .media-item.is-hidden img { opacity: .35; filter: grayscale(1); }
.media-item .hidden-badge { position: absolute; left: 8px; top: 8px; background: rgba(0, 0, 0, .72); color: #fff; border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 700; }

/* ================= TV slideshow ================= */
.slideshow { cursor: none; font-family: "Inter", system-ui, sans-serif; }
.slideshow.show-cursor { cursor: default; }
.ss-title { left: clamp(20px, 3vw, 48px); top: clamp(16px, 2.4vw, 36px); font-family: "Inter", system-ui, sans-serif; font-size: clamp(1.4rem, 2.4vw, 2.6rem); font-weight: 700; letter-spacing: -.01em; }
.ss-corner { right: clamp(16px, 2vw, 40px); bottom: clamp(16px, 2vw, 40px); width: auto; padding: clamp(10px, 1vw, 18px); border-radius: 16px; background: #fff; color: #222; text-align: center; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }
.ss-corner img { display: block; width: clamp(150px, 22vh, 300px); height: auto; }
.ss-corner strong { display: block; max-width: clamp(150px, 22vh, 300px); margin-top: 8px; font: 700 clamp(.9rem, 1.6vh, 1.25rem)/1.25 "Inter", system-ui, sans-serif; }
.ss-corner .ss-pin { display: block; margin-top: 2px; font: 600 clamp(.85rem, 1.5vh, 1.15rem)/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .14em; color: #555; }
.ss-caption { position: absolute; left: clamp(20px, 3vw, 48px); bottom: clamp(20px, 3vw, 48px); z-index: 5; max-width: 55vw; padding: 10px 18px; border-radius: 99px; background: rgba(0, 0, 0, .55); color: #fff; font: 600 clamp(1rem, 1.8vw, 1.6rem)/1.2 "Inter", system-ui, sans-serif;
  opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
.ss-caption.show { opacity: 1; transform: none; }
.ss-hint { position: absolute; left: 50%; top: clamp(16px, 2.4vw, 36px); z-index: 6; transform: translateX(-50%); padding: 8px 16px; border-radius: 99px; background: rgba(255, 255, 255, .14); color: #fff; font: 500 15px/1.2 "Inter", system-ui, sans-serif; transition: opacity .8s ease; }
.ss-hint.gone { opacity: 0; }
/* waiting screen: a giant QR + PIN the whole room can scan */
.ss-empty { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; gap: clamp(24px, 5vw, 96px); padding: 6vh 6vw; text-align: left; }
.ss-empty[hidden], .slideshow.has-slides .ss-empty { display: none; }
.ss-empty-qr { flex: none; padding: clamp(14px, 1.6vw, 28px); border-radius: 24px; background: #fff; }
.ss-empty-qr img { display: block; width: min(52vh, 40vw); height: auto; }
.ss-empty-copy { max-width: 32ch; }
.ss-empty-copy b { display: block; font: 700 clamp(2rem, 4.4vw, 4.6rem)/1.08 "Inter", system-ui, sans-serif; letter-spacing: -.02em; }
.ss-empty-copy .ss-empty-pin { display: inline-block; margin-top: clamp(14px, 2vh, 28px); padding: 10px 20px; border-radius: 14px; background: rgba(255, 255, 255, .12); font: 600 clamp(1.2rem, 2.2vw, 2.2rem)/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .16em; }
.slideshow.has-slides .ss-corner { display: block; }
.slideshow:not(.has-slides) .ss-corner { display: none; }
.slideshow:not(.has-slides) .ss-title { display: none; }
/* messages for the hosts between the photos */
.ss-wish blockquote { position: relative; max-width: min(1100px, 78vw); margin: 0; padding: clamp(28px, 4vw, 72px); border-radius: 28px; background: rgba(0, 0, 0, .5); text-align: center; text-wrap: balance; }
.ss-wish p { margin: 0; font: 500 clamp(1.8rem, 3.6vw, 3.8rem)/1.3 var(--ss-wish-font, "Inter", system-ui, sans-serif); overflow-wrap: anywhere; white-space: pre-line; }
.ss-wish .is-long p { font-size: clamp(1.4rem, 2.5vw, 2.6rem); }
.ss-wish footer { margin-top: clamp(14px, 2vw, 32px); font: 600 clamp(1.1rem, 1.8vw, 1.9rem)/1.2 "Inter", system-ui, sans-serif; opacity: .85; }
.ss-wish footer::before { content: "— "; }
/* comments popping up over the photo (slideshow.php → popComments) */
.ss-comment { position: absolute; z-index: 3; max-width: min(30vw, 460px); padding: clamp(10px, 1vw, 18px) clamp(14px, 1.4vw, 24px); border-radius: 22px 22px 22px 6px; background: rgba(255, 255, 255, .94); color: #1c1c1c; box-shadow: 0 12px 40px rgba(0, 0, 0, .45); opacity: 0; transform: rotate(var(--tilt, 0deg)) scale(.5); transform-origin: 0 100%; transition: opacity .35s ease, transform .5s cubic-bezier(.2, 1.6, .4, 1); }
.ss-comment.show { opacity: 1; transform: rotate(var(--tilt, 0deg)) scale(1); }
.ss-comment b { display: block; margin-bottom: 2px; font: 700 clamp(.8rem, 1.1vw, 1.15rem)/1.2 "Inter", system-ui, sans-serif; color: #666; }
.ss-comment span { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; font: 600 clamp(1.05rem, 1.7vw, 1.9rem)/1.25 var(--ss-wish-font, "Inter", system-ui, sans-serif); overflow-wrap: anywhere; }
.ss-react { position: absolute; z-index: 3; line-height: 1; pointer-events: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)); animation: ss-react-up 2.8s ease-out forwards; }
@keyframes ss-react-up {
  0% { opacity: 0; transform: translate(0, 0) scale(.3); }
  15% { opacity: 1; transform: translate(0, -10%) scale(1.15); }
  25% { transform: translate(0, -30%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--drift, 0), -250%) scale(.9); }
}
@media (prefers-reduced-motion: reduce) { .ss-react { animation: ss-react-fade 2.4s ease forwards; } }
@keyframes ss-react-fade { 0%, 100% { opacity: 0; } 20%, 75% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ss-comment { transition: opacity .4s ease; transform: none; } .ss-comment.show { transform: none; } }
.slideshow.theme-wedding, .slideshow.theme-elegant { --ss-wish-font: "Cormorant Garamond", serif; }
.slideshow.theme-baptism { --ss-wish-font: "Quicksand", sans-serif; }
.slideshow.theme-birthday { --ss-wish-font: "Baloo 2", sans-serif; }
.slideshow.theme-party { --ss-wish-font: "Outfit", sans-serif; }
/* theme accents on the TV */
.slideshow.theme-classic { background: #111; }
.slideshow.theme-wedding { background: #1F1810; }
.slideshow.theme-wedding .ss-title, .slideshow.theme-wedding .ss-empty-copy b { font-family: "Great Vibes", cursive; font-weight: 400; letter-spacing: 0; }
.slideshow.theme-wedding .ss-title { font-size: clamp(2rem, 3.4vw, 3.6rem); color: #F3E3C2; }
.slideshow.theme-wedding .ss-empty-copy b { font-size: clamp(3rem, 6.4vw, 6.6rem); color: #F3E3C2; }
.slideshow.theme-baptism { background: #13212C; }
.slideshow.theme-baptism .ss-title, .slideshow.theme-baptism .ss-empty-copy b { font-family: "Quicksand", sans-serif; color: #D7ECFA; }
.slideshow.theme-birthday { background: #2A1420; }
.slideshow.theme-birthday .ss-title, .slideshow.theme-birthday .ss-empty-copy b { font-family: "Baloo 2", sans-serif; color: #FFD36B; }
.slideshow.theme-party { background: #0D0716; }
.slideshow.theme-party .ss-title, .slideshow.theme-party .ss-empty-copy b { font-family: "Bungee", sans-serif; font-weight: 400; color: #FF5CE1; text-shadow: 0 0 16px rgba(255,43,214,.7); }
.slideshow.theme-elegant { background: #0B0B0B; }
.slideshow.theme-elegant .ss-title, .slideshow.theme-elegant .ss-empty-copy b { font-family: "Playfair Display", serif; text-transform: uppercase; letter-spacing: .08em; color: #F3E9D2; }
.slideshow.theme-elegant .ss-corner { box-shadow: 0 0 0 2px #C9A45C, 0 10px 40px rgba(0, 0, 0, .5); }
@media (prefers-reduced-motion: reduce) { .ss-caption { transition: opacity .3s; transform: none; } }

/* ---------- scrollbars: the page, the chat and any other box on guest pages ----------
   Slim rounded thumb in the theme's text colour, no arrows, no white track. Only with a mouse: phones keep their
   own overlay bars. A body rule also styles the page's own bar, so each theme's colours reach it. */
@media (pointer: fine) {
  .event-body::-webkit-scrollbar { width: 14px; height: 14px; }
  .event-body *::-webkit-scrollbar { width: 12px; height: 12px; }
  .event-body::-webkit-scrollbar-track { background: var(--ev-page); }
  .event-body *::-webkit-scrollbar-track, .event-body *::-webkit-scrollbar-corner { background: transparent; }
  .event-body::-webkit-scrollbar-button, .event-body *::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
  .event-body::-webkit-scrollbar-thumb, .event-body *::-webkit-scrollbar-thumb { min-height: 44px; border: 3px solid transparent; border-radius: 99px; background: color-mix(in srgb, var(--ev-text) 50%, transparent) content-box; }
  .event-body::-webkit-scrollbar-thumb:hover, .event-body *::-webkit-scrollbar-thumb:hover,
  .event-body::-webkit-scrollbar-thumb:active, .event-body *::-webkit-scrollbar-thumb:active { background-color: var(--ev-accent); }
  /* Firefox */
  @supports not selector(::-webkit-scrollbar) {
    .event-body, .event-body * { scrollbar-color: color-mix(in srgb, var(--ev-text) 50%, transparent) transparent; }
    .event-body *:not(.up-thumbs, .tabs, .ev-chal-list) { scrollbar-width: thin; }
    html:has(> .theme-party) { scrollbar-color: #7E7590 #0D0716; } /* the dark theme: the page's bar is read from <html> */
  }
}

/* photo viewer: a challenge label makes the bottom bar taller, the reactions move up with it */
.lightbox:has(.lb-chal:not([hidden])) .lb-reacts { bottom: 100px; }
@media (max-width: 560px) { .lightbox:has(.lb-chal:not([hidden])) .lb-reacts { bottom: 140px; } }

/* ---------- chat: voice messages (voice.js) ---------- */
.chat-mic { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: var(--ev-fill); color: var(--ev-on-fill); }
.chat-mic svg { width: 21px; height: 21px; }
.chat-mic:focus-visible, .chat-rec-x:focus-visible { outline: 2px solid var(--ev-accent); outline-offset: 2px; }
.chat-mic[hidden] { display: none; }
/* microphone while the box is empty, send once there is text (like WhatsApp) */
.chat-form.can-voice:not(.has-text) .chat-send-row > .chat-send { display: none; }
.chat-form.has-text .chat-mic { display: none; }
/* recording: the bar takes the place of the composer */
.chat-rec { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 0 0 2px; }
.chat-rec[hidden] { display: none; }
.chat-form.is-recording .chat-send-row > :not(.chat-rec) { display: none !important; }
.chat-rec-x { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: none; color: var(--ev-muted); cursor: pointer; }
.chat-rec-x svg { width: 20px; height: 20px; }
.chat-rec-x:hover { color: #D92D20; }
.chat-rec-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #E5484D; animation: chat-rec-blink 1.2s ease-in-out infinite; }
@keyframes chat-rec-blink { 50% { opacity: .25; } }
.chat-rec-time { flex: none; font-size: 15px; font-variant-numeric: tabular-nums; }
.chat-rec-level { flex: 1; min-width: 30px; height: 6px; border-radius: 99px; background: var(--ev-line); overflow: hidden; }
.chat-rec-level i { display: block; height: 100%; background: var(--ev-fill); transform-origin: left; transform: scaleX(0); transition: transform .1s linear; }
.chat-rec-send { margin-left: auto; }
@media (prefers-reduced-motion: reduce) { .chat-rec-dot { animation: none; } .chat-rec-level i { transition: none; } }
/* the player in a message */
.voice-player { display: flex; align-items: center; gap: 10px; width: min(260px, 100%); margin-top: 4px; }
.voice-play { flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--ev-fill); color: var(--ev-on-fill); cursor: pointer; }
.voice-play svg { width: 18px; height: 18px; }
.voice-play[aria-busy="true"] { opacity: .6; }
.voice-play:focus-visible { outline: 2px solid var(--ev-accent); outline-offset: 2px; }
.voice-player input[type=range] { flex: 1; min-width: 0; height: 24px; margin: 0; accent-color: var(--ev-fill); background: none; border: 0; padding: 0; }
.voice-time { flex: none; font-size: 13px; color: var(--ev-muted); font-variant-numeric: tabular-nums; }

/* ---------- online invitation (/i/{token}, views/event/invite.php) ---------- */
.ev-inv { max-width: 560px; margin: 0 auto; padding: 28px 16px 48px; display: grid; gap: 18px; }
.ev-inv .alert { margin: 0; }
.ev-inv h2 { margin: 0 0 6px; font-size: 1.3rem; font-weight: 700; }
.ev-inv-image { display: block; width: 100%; height: auto; border-radius: var(--ev-radius); box-shadow: var(--ev-shadow); }
.ev-inv-message { margin: 4px 0; text-align: center; font: var(--ev-sub-font); color: var(--ev-text); }
.ev-inv-details { padding: 6px 20px; }
.ev-inv-row { display: flex; gap: 14px; padding: 14px 0; }
.ev-inv-row + .ev-inv-row { border-top: 1px solid var(--ev-line); }
.ev-inv-row > svg { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--ev-accent); }
.ev-inv-row > div { display: grid; justify-items: start; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.ev-inv-row .ev-link-btn { min-height: 36px; padding: 0; }
.ev-inv-schedule { line-height: 1.6; }
.ev-inv-rsvp, .ev-inv-album { padding: 22px 20px; }
.ev-inv-rsvp .muted { margin: 0 0 14px; }
.ev-inv-form { display: grid; gap: 14px; }
.ev-inv-form .field { display: grid; gap: 6px; margin: 0; }
.ev-inv-form label { font-size: 14px; font-weight: 600; }
.event-body .ev-inv input[type=number] { min-height: 48px; width: 100%; padding: 12px 14px; border: 1px solid var(--ev-line-strong); border-radius: 10px; background: var(--ev-card-bg); color: var(--ev-text); font: 400 16px/1.35 var(--ev-font); }
.ev-inv-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
.ev-inv-choice label { position: relative; display: block; cursor: pointer; }
.ev-inv-choice input { position: absolute; opacity: 0; inset: 0; }
.ev-inv-choice span { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px; border: 1px solid var(--ev-line-strong); border-radius: 12px; color: var(--ev-text); font-weight: 600; text-align: center; }
.ev-inv-choice input:checked + span { background: var(--ev-fill); border-color: var(--ev-fill); color: var(--ev-on-fill); }
.ev-inv-choice input:focus-visible + span { outline: 2px solid var(--ev-text); outline-offset: 2px; }
.ev-inv-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; align-items: end; }
.ev-inv-form:has(input[name=attending][value="0"]:checked) .ev-inv-people { display: none; }
.ev-inv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ev-inv-privacy { margin: 0 !important; text-align: center; }
.ev-inv-answer { margin: 6px 0 14px; font-size: 16px; line-height: 1.5; color: var(--ev-text); }
.ev-inv-acts { gap: 8px 16px; }
.ev-inv-album { text-align: center; }
.ev-inv-album > svg { width: 34px; height: 34px; color: var(--ev-accent); margin-bottom: 6px; }
.ev-inv-album .muted { margin: 0 0 16px; }
.ev-inv-teaser { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; font-size: 14px; text-align: left; }
.ev-inv-teaser svg { flex: none; width: 22px; height: 22px; }
.ev-inv-hint { color: var(--ev-muted); font-weight: 400; }
.ev-inv-names { margin: -6px 0 14px; padding-left: 20px; color: var(--ev-text); line-height: 1.6; }
.event-body .rp-row select { min-height: 48px; }
.ev-inv-safe { display: flex; gap: 12px; margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--ev-accent) 9%, var(--ev-card-bg)); color: var(--ev-text); font-size: 14px; line-height: 1.5; }
.ev-inv-safe > svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--ev-accent); }
.ev-inv-safe > div { display: grid; gap: 2px; }
.ev-inv-safe a { color: inherit; text-decoration: underline; text-underline-offset: .18em; }
.ev-pin-card .ev-soon-invite { margin-top: 18px; }

/* invitation: countdown, deadline, preview, the guest's personal link */
.ev-inv-countdown { display: inline-block; margin-top: 2px; padding: 2px 10px; border-radius: 99px; background: color-mix(in srgb, var(--ev-accent) 12%, var(--ev-card-bg)); color: var(--ev-text); font-size: 13px; font-weight: 600; }
.ev-inv-left { color: var(--ev-text); font-weight: 600; }
.ev-inv-mylink { display: flex; gap: 12px; margin-top: 16px; padding: 14px 16px; border: 1px dashed var(--ev-line-strong); border-radius: 12px; color: var(--ev-text); font-size: 14px; line-height: 1.5; }
.ev-inv-mylink > svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--ev-accent); }
.ev-inv-mylink > div { display: grid; gap: 4px; min-width: 0; }
.ev-inv-mylink-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

/* ---------- "Continue with Google / Apple" (views/partials/social-buttons.php): the providers' own button colours ---------- */
.social-login { display: grid; gap: 10px; }
.social-login .social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; transform: none; }
.social-login .social-google, .social-login .social-google:hover, .social-login .social-google:focus-visible { background: #fff; color: #1f1f1f; border: 1px solid #747775; }
.social-login .social-google:hover { background: #f2f2f2; }
.social-login .social-apple, .social-login .social-apple:hover, .social-login .social-apple:focus-visible { background: #000; color: #fff; border: 1px solid #000; }
.social-login .social-apple:hover { background: #222; }
.social-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 13px; opacity: .7; }
.social-or::before, .social-or::after { content: ""; flex: 1; border-top: 1px solid currentColor; opacity: .35; }
.checkout-social { margin: 0 0 22px; }
.checkout-social p { margin: 0 0 10px; }
/* the optional sign-in under the upload box, and "Signed in as … · Sign out" */
.up-social { margin: 14px auto 0; max-width: 420px; text-align: center; }
.up-social p { margin: 0 0 10px; color: var(--ev-muted); }
.up-account { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; font-size: 14px; color: var(--ev-muted); }
.up-account svg { width: 16px; height: 16px; }
