/* PixaCore shared styles — fully self-contained (no /pro/* import) so it works
   inside the cookieless cookieless webview AND on the dashboard + public web. */
/* ---------------------------------------------------------------------------
   Theme tokens — modern, cool-neutral, content-first. Three theme states:
   - default            → light (below)
   - [data-pc-theme=dark] on <html> → dark (explicit user choice, app/theme.js)
   - system dark        → dark via prefers-color-scheme unless user forced light
   The dark palette is intentionally duplicated in both dark blocks — keep them
   in sync when editing. Serif stays for CONTENT (member text, lightbox/film
   text, layers, print); UI chrome uses --pc-display / --pc-sans.
   --------------------------------------------------------------------------- */
:root {
  color-scheme: light;
  --pc-ink: #191b21;
  --pc-dim: #5d6470;
  --pc-faint: #8a919e;
  --pc-accent: #5b57e8;
  --pc-accent-d: #4744c9;
  --pc-accent-2: #23b8e6;
  --pc-accent-soft: #edecfd;
  --pc-danger: #e5484d;
  --pc-danger-d: #c33940;
  --pc-success: #2f9e63;
  --pc-warn-bg: #fff4e5;
  --pc-warn-line: #f7d9ae;
  --pc-warn-ink: #9a5b12;
  --pc-gold: #e0a43c;
  --pc-paper: #f7f8fa;
  --pc-soft: #eceef2;
  --pc-bg: #f1f2f5;
  --pc-surface: #ffffff;
  --pc-surface-glass: rgba(255, 255, 255, 0.82);
  --pc-media-bg: #e7e9ee;
  --pc-line: #e4e7ec;
  --pc-line-strong: #d2d7e0;
  --pc-shadow: 0 2px 8px rgba(18, 22, 34, 0.05), 0 10px 28px rgba(18, 22, 34, 0.07);
  --pc-shadow-lg: 0 8px 24px rgba(18, 22, 34, 0.1), 0 28px 64px rgba(18, 22, 34, 0.16);
  --pc-ring: 0 0 0 3px rgba(91, 87, 232, 0.28);
  --pc-grad: linear-gradient(118deg, var(--pc-accent), var(--pc-accent-2));
  --pc-radius: 14px;
  --pc-radius-sm: 10px;
  --pc-ease: cubic-bezier(.22, .61, .36, 1);
  --pc-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif CJK SC", "Times New Roman", serif;
  /* function-plot curve palette (validated categorical slots, light steps) */
  --pc-plot-1: #2a78d6;
  --pc-plot-2: #eb6834;
  --pc-plot-3: #1baf7a;
  --pc-plot-4: #eda100;
  --pc-plot-5: #e87ba4;
  --pc-plot-6: #008300;
  --pc-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans CJK SC", Helvetica, Arial, sans-serif;
  --pc-display: "Inter", "SF Pro Display", "Segoe UI Variable Display", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans CJK SC", sans-serif;
  --pc-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
/* dark palette (explicit choice) */
:root[data-pc-theme="dark"] {
  color-scheme: dark;
  --pc-ink: #e8eaf1;
  --pc-dim: #9aa2b1;
  --pc-faint: #6a7180;
  --pc-accent: #837eff;
  --pc-accent-d: #a09cff;
  --pc-accent-2: #38cdf5;
  --pc-accent-soft: rgba(131, 126, 255, 0.16);
  --pc-danger: #f2555a;
  --pc-danger-d: #ff7075;
  --pc-success: #46c47c;
  --pc-warn-bg: rgba(224, 164, 60, 0.12);
  --pc-warn-line: rgba(224, 164, 60, 0.35);
  --pc-warn-ink: #ecb45e;
  --pc-gold: #e0a43c;
  --pc-paper: #1b1f28;
  --pc-soft: #20242e;
  --pc-bg: #0e1015;
  --pc-surface: #161920;
  --pc-surface-glass: rgba(22, 25, 32, 0.8);
  --pc-media-bg: #12141a;
  --pc-line: #262b36;
  --pc-line-strong: #353c4a;
  --pc-shadow: 0 2px 8px rgba(0, 0, 0, 0.28), 0 10px 28px rgba(0, 0, 0, 0.32);
  --pc-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4), 0 28px 64px rgba(0, 0, 0, 0.5);
  --pc-ring: 0 0 0 3px rgba(131, 126, 255, 0.35);
  /* function-plot curve palette (same hues, dark-surface steps) */
  --pc-plot-1: #3987e5;
  --pc-plot-2: #d95926;
  --pc-plot-3: #199e70;
  --pc-plot-4: #c98500;
  --pc-plot-5: #d55181;
  --pc-plot-6: #008300;
}
/* dark palette (system preference, unless the user forced light) — keep in sync above */
@media (prefers-color-scheme: dark) {
  :root:not([data-pc-theme="light"]) {
    color-scheme: dark;
    --pc-ink: #e8eaf1;
    --pc-dim: #9aa2b1;
    --pc-faint: #6a7180;
    --pc-accent: #837eff;
    --pc-accent-d: #a09cff;
    --pc-accent-2: #38cdf5;
    --pc-accent-soft: rgba(131, 126, 255, 0.16);
    --pc-danger: #f2555a;
    --pc-danger-d: #ff7075;
    --pc-success: #46c47c;
    --pc-warn-bg: rgba(224, 164, 60, 0.12);
    --pc-warn-line: rgba(224, 164, 60, 0.35);
    --pc-warn-ink: #ecb45e;
    --pc-gold: #e0a43c;
    --pc-paper: #1b1f28;
    --pc-soft: #20242e;
    --pc-bg: #0e1015;
    --pc-surface: #161920;
    --pc-surface-glass: rgba(22, 25, 32, 0.8);
    --pc-media-bg: #12141a;
    --pc-line: #262b36;
    --pc-line-strong: #353c4a;
    --pc-shadow: 0 2px 8px rgba(0, 0, 0, 0.28), 0 10px 28px rgba(0, 0, 0, 0.32);
    --pc-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4), 0 28px 64px rgba(0, 0, 0, 0.5);
    --pc-ring: 0 0 0 3px rgba(131, 126, 255, 0.35);
  /* function-plot curve palette (same hues, dark-surface steps) */
  --pc-plot-1: #3987e5;
  --pc-plot-2: #d95926;
  --pc-plot-3: #199e70;
  --pc-plot-4: #c98500;
  --pc-plot-5: #d55181;
  --pc-plot-6: #008300;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--pc-sans);
  color: var(--pc-ink);
  background: var(--pc-bg);
  -webkit-font-smoothing: antialiased;
}

.pc-root { height: 100%; }

/* ---------- self-made SVG icons ---------- */
.pc-ico { width: 19px; height: 19px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.pc-ico-sm { width: 14px; height: 14px; margin-right: 5px; }
.pc-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  background: var(--pc-surface); border: 1px solid var(--pc-line); color: var(--pc-ink);
  padding: 0; transition: 0.15s;
}
.pc-iconbtn:hover { border-color: var(--pc-accent); color: var(--pc-accent); }
.pc-iconbtn .pc-ico { width: 21px; height: 21px; }

/* ---------- focus-visible ring (accessibility + feedback) ---------- */
.pc-iconbtn:focus-visible, .pc-btn:focus-visible, .pc-select:focus-visible,
.pc-input:focus-visible, .pc-tab:focus-visible, .pc-pixacard:focus-visible,
.pc-railnav-btn:focus-visible, .pc-filterchip:focus-visible, .pc-subtab:focus-visible,
.pc-metachip:focus-visible, .pc-mchip:focus-visible {
  outline: none; box-shadow: var(--pc-ring); border-color: var(--pc-accent);
}

/* ---------- loading / spinner ---------- */
.pc-loading { display: flex; align-items: center; justify-content: center; padding: 60px; }
.pc-loading-sm { padding: 22px; }
.pc-spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--pc-line); border-top-color: var(--pc-accent);
  animation: pc-rot 0.8s linear infinite;
}
@keyframes pc-rot { to { transform: rotate(360deg); } }

/* ---------- shell ---------- */
.pc-shell { display: grid; grid-template-columns: 290px 1fr; grid-template-rows: 1fr; min-height: 100vh; }
.pc-shell.pc-compact { grid-template-columns: 1fr; }

/* mobile sticky top bar — hidden on desktop (rail is a permanent sidebar there) */
.pc-topbar { display: none; }

/* mobile drawer scrim — inert until .show under the responsive breakpoint */
.pc-scrim { display: none; position: fixed; inset: 0; background: rgba(10,12,18,.45); z-index: 39; }

/* ---------- rail ---------- */
.pc-rail {
  background: var(--pc-surface); border-right: 1px solid var(--pc-line);
  display: flex; flex-direction: column; padding: 18px 16px; gap: 14px;
  width: 290px; overflow-y: auto; max-height: 100vh;
}
.pc-rail-close { display: none; margin-left: auto; width: 34px; height: 34px; }
.pc-rail-close .pc-ico { width: 18px; height: 18px; }
/* header profile/account entry — mobile topbar instance (desktop uses the rail nav item) */
.pc-topbar-prof { flex-shrink: 0; }
.pc-topbar-prof.on { border-color: var(--pc-accent); color: var(--pc-accent); }
.pc-brand { font-family: var(--pc-display); font-size: 22px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.pc-logo { color: var(--pc-accent); }
.pc-pixalist { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pc-rail-empty { color: var(--pc-faint); font-size: 14px; line-height: 1.5; padding: 16px 6px; }
.pc-pixacard {
  text-align: left; background: var(--pc-paper); border: 1px solid var(--pc-line);
  border-radius: 12px; padding: 12px 13px; cursor: pointer; transition: 0.15s;
}
.pc-pixacard:hover { border-color: var(--pc-accent); transform: translateY(-1px); }
.pc-pixacard.on { border-color: var(--pc-accent); background: var(--pc-accent-soft); }
/* Type-switch in progress on this card: dim it + show a spinner badge (top-right). */
.pc-pixacard.pc-card-busy { position: relative; opacity: .72; pointer-events: none; }
.pc-card-spin { position: absolute; top: 8px; right: 8px; z-index: 2; display: inline-flex; }
.pc-pc-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 5px; }
.pc-star { color: var(--pc-accent); }
.pc-pc-meta { font-size: 12px; color: var(--pc-faint); margin-top: 3px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pc-pub { color: var(--pc-accent); font-weight: 600; }
.pc-priv { color: var(--pc-faint); font-weight: 600; }
/* --- pixa card preview collage (shared by rail cards + mini-app switcher rows) --- */
.pc-ico-xs { width: 12px; height: 12px; }
.pc-pixacard .pc-pc-title, .pc-switch-row .pc-switch-title { margin-top: 8px; }
.pc-pc-created { font-family: var(--pc-mono); font-size: 10.5px; color: var(--pc-faint); margin-top: 2px; }
.pc-pc-team { display: inline-flex; align-items: center; gap: 3px; }
.pc-pc-team .pc-ico { margin-right: 0; }
.pc-pc-dot { color: var(--pc-line); }
.pc-pc-collage { display: flex; gap: 4px; }
.pc-pc-thumb {
  position: relative; flex: 1 1 0; min-width: 0; max-width: 64px; aspect-ratio: 1 / 1;
  border-radius: 8px; overflow: hidden; background: var(--pc-line);
}
.pc-pc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-pc-vbadge {
  position: absolute; left: 4px; bottom: 4px; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 9px;
  color: #fff; background: rgba(0,0,0,.55); border-radius: 50%;
}
.pc-pc-more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); color: #fff; font-weight: 700; font-size: 15px;
}
.pc-pc-nomedia {
  display: flex; align-items: center; gap: 6px; font-size: 12px;
  color: var(--pc-faint); padding: 10px 2px;
}
.pc-pc-nomedia .pc-ico { margin-right: 0; opacity: .7; }
.pc-foot-label, .pc-lbl, .pc-set-label { font-size: 12px; color: var(--pc-dim); display: block; margin-bottom: 4px; }

/* ---------- buttons / inputs ---------- */
.pc-btn {
  font-family: var(--pc-sans); font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--pc-line); background: var(--pc-surface); color: var(--pc-ink);
  padding: 9px 16px; border-radius: 10px; transition: 0.15s; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.pc-btn .pc-ico { width: 17px; height: 17px; }
.pc-btn:hover { border-color: var(--pc-accent); transform: translateY(-1px); }
.pc-btn:active { transform: translateY(0); }
.pc-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.pc-primary { background: var(--pc-grad); border-color: transparent; color: #fff; box-shadow: 0 2px 12px rgba(91,87,232,.26); }
.pc-primary:hover { background: var(--pc-grad); border-color: transparent; filter: brightness(1.08); box-shadow: 0 4px 18px rgba(91,87,232,.34); }
.pc-ghost { background: transparent; }
/* danger is its own hue (red) — never the brand accent */
.pc-danger { color: var(--pc-danger); border-color: var(--pc-danger); background: transparent; }
.pc-danger:hover { background: var(--pc-danger); border-color: var(--pc-danger); color: #fff; }
.pc-sm { font-size: 12.5px; padding: 6px 11px; }
.pc-block { width: 100%; }
.pc-new { width: 100%; }
.pc-select, .pc-input {
  font-family: var(--pc-sans); font-size: 14px; width: 100%;
  border: 1px solid var(--pc-line); border-radius: 10px; padding: 9px 11px;
  background: var(--pc-surface); color: var(--pc-ink);
}
.pc-select:focus, .pc-input:focus { outline: none; border-color: var(--pc-accent); }
.pc-select:disabled { opacity: 0.6; cursor: progress; }
.pc-langpick { display: block; }
.pc-langstatus { display: block; min-height: 16px; margin-top: 5px; font-size: 12px; line-height: 16px; }
.pc-langstatus.pc-busy { color: var(--pc-dim); }
.pc-langstatus.pc-busy::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; border: 2px solid var(--pc-line); border-top-color: var(--pc-accent); border-radius: 50%; animation: pc-rot 0.7s linear infinite; }
.pc-langstatus.pc-ok { color: var(--pc-success); }
/* generic status inks (profile email row, etc. — every surface) */
.pc-ok { color: var(--pc-success); }
.pc-warn { color: var(--pc-danger); }
.pc-langstatus.pc-err { color: var(--pc-danger); }
.pc-lbl { margin-bottom: 12px; font-weight: 500; }
.pc-lbl input, .pc-lbl select { margin-top: 4px; }
.pc-check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 10px 0; color: var(--pc-dim); cursor: pointer; }

/* ---------- main ---------- */
.pc-main { overflow-y: auto; max-height: 100vh; }
.pc-compact .pc-main { max-height: none; }
.pc-phead {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 26px 32px 18px; border-bottom: 1px solid var(--pc-line); background: var(--pc-surface);
}
.pc-phead h1 { font-family: var(--pc-display); font-weight: 800; font-size: 34px; margin: 0; letter-spacing: -0.02em; line-height: 1.06; }
.pc-sub { color: var(--pc-dim); font-style: italic; margin: 4px 0 0; font-family: var(--pc-serif); }
.pc-chips { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.pc-chip { font-size: 12px; color: var(--pc-dim); background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: 20px; padding: 3px 11px; display: inline-flex; align-items: center; }
.pc-chip-pub { color: var(--pc-accent); border-color: var(--pc-accent); }
.pc-phead-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
/* header action buttons: own SVG over a smaller 2nd-line label (matches the mini-app pixa nav) */
.pc-phead-actions .pc-btn {
  flex-direction: column; gap: 4px; line-height: 1.05;
  padding: 8px 13px; font-size: 10.5px; font-weight: 600;
}
.pc-phead-actions .pc-btn.pc-sm { padding: 7px 11px; font-size: 10.5px; }
.pc-phead-actions .pc-btn .pc-ico { width: 21px; height: 21px; }

/* ---------- tabs ---------- */
.pc-tabs { display: flex; gap: 4px; padding: 0 32px; border-bottom: 1px solid var(--pc-line); background: var(--pc-surface-glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); overflow-x: auto; position: sticky; top: 0; z-index: 10; }
.pc-tab {
  font-family: var(--pc-sans); font-size: 14px; font-weight: 600; color: var(--pc-dim);
  background: none; border: none; border-bottom: 2.5px solid transparent;
  padding: 13px 14px; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
}
.pc-tab .pc-ico { width: 18px; height: 18px; }
.pc-tab:hover { color: var(--pc-ink); }
.pc-tab.on { color: var(--pc-accent); border-bottom-color: var(--pc-accent); }
/* Small busy spinner shown on a single layer tab while its layer recomputes. */
.pc-tab-busy { display: inline-flex; align-items: center; margin-left: 4px; }
.pc-tab-busy::after { content: ''; width: 11px; height: 11px; border: 2px solid var(--pc-line); border-top-color: var(--pc-accent); border-radius: 50%; animation: pc-rot 0.7s linear infinite; }
/* OP-only "+ Add layer" tab (dashboard). */
.pc-tab-add { color: var(--pc-accent); opacity: .85; }
.pc-tab-add:hover { opacity: 1; }
.pc-body { padding: 24px 32px 80px; }
.pc-compact .pc-phead, .pc-compact .pc-tabs { padding-left: 16px; padding-right: 16px; }
.pc-compact .pc-body { padding: 16px 14px 90px; }
.pc-compact .pc-phead h1 { font-size: 24px; }

/* ---------- empty / welcome ---------- */
.pc-empty { text-align: center; color: var(--pc-dim); padding: 50px 24px; max-width: 520px; margin: 0 auto; }
.pc-empty h2, .pc-empty h3 { font-family: var(--pc-display); color: var(--pc-ink); margin: 0 0 10px; }
.pc-empty p { line-height: 1.6; margin: 8px 0; }
/* Renderer "active work" panel (type switching / recompute in progress). */
.pc-render-busy { text-align: center; color: var(--pc-dim); padding: 50px 24px; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pc-render-busy h3 { font-family: var(--pc-display); color: var(--pc-ink); margin: 6px 0 4px; }
.pc-render-busy p { line-height: 1.6; margin: 0; }
.pc-dim { color: var(--pc-faint); font-size: 13.5px; }
.pc-welcome-art { font-size: 56px; color: var(--pc-accent); margin-bottom: 8px; }
.pc-welcome { padding-top: 70px; }

/* ---------- dashboard landing gallery (no pixa open) ---------- */
.pc-galhead { padding: 30px 32px 6px; }
.pc-galhead h1 { font-family: var(--pc-display); font-weight: 800; font-size: 34px; margin: 0; letter-spacing: -0.02em; }
.pc-galsub { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.pc-galcount { font-size: 13px; color: var(--pc-dim); }
.pc-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px; padding: 18px 32px 80px; align-items: start;
}
.pc-galcard {
  text-align: left; background: var(--pc-surface); border: 1px solid var(--pc-line);
  border-radius: var(--pc-radius); padding: 14px; cursor: pointer;
  transition: box-shadow .2s var(--pc-ease), border-color .2s var(--pc-ease);
}
.pc-galcard:hover { border-color: var(--pc-accent); box-shadow: var(--pc-shadow-lg); }
.pc-galcard .pc-pc-collage { margin-bottom: 11px; gap: 6px; }
.pc-galcard .pc-pc-thumb { max-width: none; border-radius: 11px; }
.pc-galcard .pc-pc-title { font-size: 16px; }
.pc-galcard .pc-pc-created { font-size: 12px; color: var(--pc-faint); margin-top: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .pc-galcard { animation: pc-fade .5s var(--pc-ease) both; animation-delay: calc(var(--i, 0) * 35ms); }
}

/* ⭐ featured toggle (dashboard-only) — overlays public cards' top-right corner in the
   gallery and the Featured curation view; .on = currently on the landing showcase. */
.pc-galcard { position: relative; }
.pc-featbtn {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--pc-surface); border: 1px solid var(--pc-line);
  color: var(--pc-faint); box-shadow: var(--pc-shadow); cursor: pointer;
  transition: color .15s var(--pc-ease), border-color .15s var(--pc-ease), transform .15s var(--pc-ease);
}
.pc-featbtn:hover { color: #eab308; border-color: #eab308; transform: scale(1.08); }
.pc-featbtn.on { color: #eab308; border-color: #eab308; }
.pc-featbtn.on svg { fill: #eab308; }
.pc-featbtn .pc-ico { width: 17px; height: 17px; }
.pc-featbtn .pc-busy-spin { position: absolute; inset: 0; margin: auto; }
.pc-railhint { font-size: 12px; color: var(--pc-faint); margin: -4px 0 10px; }
@media (max-width: 840px) {
  .pc-galhead { padding: 22px 18px 4px; }
  .pc-galhead h1 { font-size: 25px; }
  .pc-gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 14px 16px 90px; }
}

/* ---------- timeline (JS masonry collage) ---------- */
/* .pc-timeline is a JS-positioned masonry grid: PixaCore.masonry() absolutely-places
   each .pc-item into the shortest column and sets the container height. Before JS runs
   (or if it fails) the flex fallback still stacks cards in 2 columns. */
.pc-collage { display: block; }
.pc-collage + .pc-collage { margin-top: 0; }
.pc-timeline { position: relative; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; margin-bottom: 8px; }
.pc-timeline .pc-item { flex: 1 1 260px; }
/* quiet technical label — dates must never compete with the moments below them */
.pc-daysep {
  font-family: var(--pc-display); font-size: 12px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--pc-dim); border-bottom: 1px solid var(--pc-line); padding-bottom: 7px; margin: 16px 0 12px;
}
.pc-collage > .pc-daysep:first-child { margin-top: 0; }
.pc-item {
  position: relative; background: var(--pc-surface); border: 1px solid var(--pc-line);
  border-radius: var(--pc-radius); overflow: hidden; box-shadow: var(--pc-shadow); transition: 0.15s;
}
/* masonry owns the card transform → hover lift is box-shadow + an inner media zoom, never
   a card transform (which would knock the card out of its packed position). */
.pc-item:hover { box-shadow: var(--pc-shadow-lg); }
.pc-media { position: relative; background: var(--pc-media-bg); line-height: 0; overflow: hidden; }
.pc-item:hover .pc-media img { transform: scale(1.03); }
/* Collage keeps each image's natural aspect ratio (variable heights = the collage look),
   capped so one tall item can't dominate a column. */
.pc-media img { width: 100%; display: block; max-height: 70vh; object-fit: cover; transition: transform .35s var(--pc-ease); }
.pc-vid .pc-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5); pointer-events: none; }
.pc-durtag { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.7); color: #fff; font-family: var(--pc-mono); font-size: 11px; padding: 2px 6px; border-radius: 5px; }
.pc-map .pc-pin { position: absolute; left: 8px; top: 8px; font-size: 18px; }
.pc-voice { padding: 16px; font-size: 15px; color: var(--pc-accent); display: flex; align-items: center; gap: 8px; }
.pc-voice span { color: var(--pc-dim); }
.pc-file { display: flex; align-items: center; gap: 8px; padding: 16px; text-decoration: none; color: var(--pc-ink); font-size: 14px; }
.pc-file em { color: var(--pc-faint); font-style: normal; font-size: 12px; margin-left: auto; }
.pc-item-body { padding: 13px 15px; }
.pc-text { font-family: var(--pc-serif); font-size: 15.5px; line-height: 1.55; margin: 0; }
/* Rich text moments (markdown + TeX via <vc-markdown>, core.renderItemText):
   inherit the surrounding typography and bridge the vc-* theme tokens onto the
   pc palette so the shadow-DOM styles follow light/dark (outer-tree host rules
   beat the component's :host defaults). */
.pc-text vc-markdown, .pc-lb-textcard vc-markdown {
  font-size: inherit; line-height: inherit; color: inherit; font-family: inherit;
  --text: var(--pc-ink); --text-dim: var(--pc-dim); --accent: var(--pc-accent);
  --border: var(--pc-line); --bg-deep: var(--pc-soft); --bg-surface: var(--pc-surface);
  --font-mono: var(--pc-mono); --radius: var(--pc-radius-sm);
  --red: var(--pc-danger); --orange: var(--pc-gold);
}
/* Lightbox slide sits on the always-dark overlay (its own #f5f0e8 ink, any
   theme) — keep dark-leaning tokens there and undo the plain-text pre-wrap,
   which would otherwise inherit into the shadow DOM and break md layout. */
.pc-lb-textcard vc-markdown {
  text-align: left; white-space: normal;
  --text: #f5f0e8; --text-dim: #c9c2b6; --border: rgba(255, 255, 255, 0.25);
  --bg-deep: rgba(255, 255, 255, 0.12); --bg-surface: rgba(255, 255, 255, 0.07);
}
.pc-orig { background: none; border: none; color: var(--pc-faint); font-size: 11px; cursor: pointer; padding: 4px 0 0; text-decoration: underline; }
.pc-orig.on { color: var(--pc-accent); }
.pc-item-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; font-size: 12px; color: var(--pc-faint); }
.pc-by { font-weight: 600; color: var(--pc-dim); }
.pc-place { color: var(--pc-dim); }
.pc-when { margin-left: auto; font-family: var(--pc-mono); font-size: 11px; letter-spacing: .01em; }
/* Header "Details" toggle off: hide who/when/place (kept in DOM for the lightbox). */
.pc-nometa .pc-item-meta { display: none; }
/* Details toggle: soft-bg pill when on (no inset bar, no underline). */
.pc-metatoggle.on { background: var(--pc-accent-soft); border-color: var(--pc-accent); color: var(--pc-accent); }
.pc-item-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: 0.15s; }
.pc-item:hover .pc-item-tools { opacity: 1; }
.pc-item-tools button { background: var(--pc-surface-glass); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--pc-ink); border: 1px solid var(--pc-line); border-radius: 7px; width: 28px; height: 28px; cursor: pointer; font-size: 13px; }
.pc-item-tools button:hover { border-color: var(--pc-accent); }

/* ---------- quick add ---------- */

/* ---------- editor ---------- */
.pc-editor-hint { color: var(--pc-dim); font-size: 13.5px; margin: 0 0 14px; }
.pc-editlist { display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.pc-editlist > .pc-daysep { margin: 8px 0 0; }
.pc-editlist > .pc-daysep:first-child { margin-top: 0; }
.pc-editrow {
  display: flex; align-items: center; gap: 12px; background: var(--pc-surface);
  border: 1px solid var(--pc-line); border-radius: 12px; padding: 9px 12px; cursor: grab;
}
.pc-editrow.pc-dragging { opacity: 0.5; border-style: dashed; }
.pc-hidden-row { opacity: 0.55; }
.pc-drag { color: var(--pc-faint); font-size: 16px; cursor: grab; }
.pc-edit-thumb { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--pc-paper); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pc-edit-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pc-edit-kind { font-size: 20px; }
/* "Big thumbnails" toggle (arrange header) */
.pc-editlist.pc-bigthumbs .pc-edit-thumb { width: 128px; height: 128px; border-radius: 10px; }
.pc-editlist.pc-bigthumbs .pc-edit-kind { font-size: 44px; }
@media (max-width: 840px) { .pc-editlist.pc-bigthumbs .pc-edit-thumb { width: 96px; height: 96px; } }
.pc-edit-text { flex: 1; font-size: 14px; min-width: 0; }
.pc-edit-sub { font-size: 11.5px; color: var(--pc-faint); margin-top: 2px; }
.pc-edit-acts { display: flex; gap: 4px; }
.pc-edit-acts button { background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: 7px; width: 30px; height: 30px; cursor: pointer; }
.pc-edit-acts button:hover { border-color: var(--pc-accent); }

/* ---------- settings ---------- */
.pc-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; max-width: 900px; }
.pc-card { background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: var(--pc-radius); padding: 18px; box-shadow: var(--pc-shadow); }
.pc-card h3 { margin: 0 0 12px; font-family: var(--pc-display); font-size: 18px; }
.pc-copyrow { display: flex; gap: 8px; }
.pc-copyrow input { flex: 1; font-size: 12px; }
.pc-members { display: flex; flex-direction: column; gap: 6px; }
.pc-member { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 5px 0; border-bottom: 1px solid var(--pc-line); }
.pc-m-right { display: inline-flex; align-items: center; gap: 8px; }
.pc-m-lang { color: var(--pc-faint); font-size: 12px; }
.pc-nudge-modes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pc-nudge-modes .on { background: var(--pc-accent); color: #fff; border-color: var(--pc-accent); }
.pc-nudge-modes .pc-busy { opacity: 0.7; pointer-events: none; }
.pc-nudge-modes button[disabled] { opacity: 0.55; cursor: default; }
.pc-nudge-status { margin: 10px 0 0; min-height: 16px; font-size: 12.5px; }
.pc-spin-sm { width: 13px; height: 13px; border-width: 2px; display: inline-block; vertical-align: -2px; }

/* ---------- places (settings card + location picker overlay) ---------- */
.pc-places-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.pc-place-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--pc-line); gap: 8px; }
.pc-place-name { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-place-acts { display: flex; gap: 4px; flex-shrink: 0; }
.pc-edit-place { font-size: 11.5px; display: block; margin-top: 2px; }
.pc-loc-body { display: flex; gap: 14px; flex: 1; min-height: 0; }
.pc-loc-side { display: flex; flex-direction: column; width: 300px; flex-shrink: 0; min-height: 0; }
.pc-loc-side-bottom { margin-top: auto; padding-top: 10px; }
.pc-loc-hint { font-size: 12.5px; margin: 0; }
.pc-loc-search { position: relative; z-index: 20; margin-bottom: 10px; }
.pc-loc-q { width: 100%; box-sizing: border-box; }
.pc-loc-results { position: absolute; left: 0; right: 0; top: 100%; background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: 0 0 var(--pc-radius) var(--pc-radius); box-shadow: var(--pc-shadow); z-index: 30; max-height: 46vh; overflow-y: auto; }
.pc-loc-result, .pc-loc-nores { display: block; width: 100%; text-align: left; padding: 8px 12px; border: none; background: none; cursor: pointer; font-size: 13px; color: var(--pc-ink); box-sizing: border-box; }
.pc-loc-result:hover { background: var(--pc-bg); }
.pc-loc-result-n { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-right: 8px; border-radius: 50%; background: var(--pc-accent); color: #fff; font-size: 11px; font-weight: 600; flex-shrink: 0; vertical-align: -4px; }
.pc-loc-nores { color: var(--pc-faint); cursor: default; }
.pc-loc-saved { margin-bottom: 10px; min-height: 0; overflow-y: auto; }
.pc-loc-saved-h { margin: 0 0 4px; font-size: 12px; }
.pc-loc-saved-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-loc-saved-item { background: var(--pc-bg); border: 1px solid var(--pc-line); border-radius: 20px; padding: 4px 12px; font-size: 13px; cursor: pointer; color: var(--pc-ink); white-space: nowrap; }
.pc-loc-saved-item:hover { border-color: var(--pc-accent); color: var(--pc-accent); }
.pc-sheet.pc-sheet-loc { max-width: none; width: calc(100vw - 40px); height: calc(100vh - 40px); max-height: none; display: flex; flex-direction: column; overflow: hidden; }
.pc-loc-map { flex: 1; min-height: 0; border-radius: var(--pc-radius); overflow: hidden; border: 1px solid var(--pc-line); position: relative; z-index: 0; }
.pc-loc-pin { font-size: 24px; line-height: 1; text-align: center; }
.pc-loc-pin-dim { font-size: 20px; opacity: .75; cursor: pointer; }
.pc-loc-used-item { color: var(--pc-faint); }
.pc-loc-cand { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pc-accent); color: #fff; font-size: 12px; font-weight: 600; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; box-sizing: border-box; }
.pc-loc-name-row { margin-bottom: 0; }
.pc-chip-places { cursor: pointer; }
.pc-chip-places:hover { border-color: var(--pc-accent); color: var(--pc-accent); }
.pc-placesmap { flex: 1; min-height: 0; border-radius: var(--pc-radius); overflow: hidden; border: 1px solid var(--pc-line); margin-bottom: 8px; position: relative; z-index: 0; }
.pc-placesmap-legend { text-align: center; min-height: 16px; flex-shrink: 0; }
@media (max-width: 700px) {
  .pc-overlay:has(.pc-sheet-loc) { padding: 0; }
  .pc-sheet.pc-sheet-loc { width: 100vw; height: 100dvh; border-radius: 0; padding: 18px 16px; }
  .pc-loc-body { flex-direction: column; }
  .pc-loc-side { width: auto; flex-shrink: 1; }
  .pc-loc-side-bottom { margin-top: 0; }
  .pc-loc-map { min-height: 200px; }
  .pc-loc-hint { display: none; }
}

/* ---------- edit-text sheet (big editor + live md/LaTeX preview or cheatsheet) ---------- */
.pc-sheet.pc-sheet-et { max-width: 1160px; width: calc(100vw - 40px); height: calc(100vh - 40px); max-height: none; display: flex; flex-direction: column; overflow: hidden; }
.pc-et-body { display: flex; gap: 14px; flex: 1; min-height: 0; }
.pc-edittext { flex: 1 1 55%; min-width: 0; resize: none; font: inherit; font-size: 15px; line-height: 1.55; color: var(--pc-ink); background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: var(--pc-radius); padding: 12px 14px; box-sizing: border-box; }
.pc-edittext:focus { outline: none; border-color: var(--pc-accent); }
.pc-et-side { flex: 1 1 45%; min-width: 0; display: flex; flex-direction: column; min-height: 0; gap: 10px; }
.pc-et-half { flex: 1 1 50%; min-height: 0; display: flex; flex-direction: column; }
.pc-et-side-h { margin: 0 0 6px; font-size: 12px; flex-shrink: 0; }
.pc-et-preview { flex: 1; min-height: 0; overflow-y: auto; border: 1px solid var(--pc-line); border-radius: var(--pc-radius); background: var(--pc-paper); padding: 12px 14px; font-size: 15px; line-height: 1.55; overflow-wrap: break-word; white-space: pre-wrap; }
.pc-et-preview:has(vc-markdown) { white-space: normal; }
.pc-et-help { flex: 1; min-height: 0; overflow-y: auto; border: 1px dashed var(--pc-line); border-radius: var(--pc-radius); padding: 12px 14px; font-size: 13px; color: var(--pc-dim); }
.pc-et-help > p { margin: 0 0 10px; }
.pc-et-cheats { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pc-et-cheats td { padding: 5px 8px 5px 0; border-bottom: 1px solid var(--pc-line); vertical-align: top; }
.pc-et-cheats tr:last-child td { border-bottom: none; }
.pc-et-cheats td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--pc-ink); }
.pc-et-cheats td:last-child { white-space: nowrap; text-align: right; }
.pc-et-ltx { margin-top: 10px; }
@media (max-width: 900px) {
  .pc-et-side { display: none; }
}
@media (max-width: 700px) {
  .pc-overlay:has(.pc-sheet-et) { padding: 0; }
  .pc-sheet.pc-sheet-et { width: 100vw; height: 100dvh; border-radius: 0; padding: 18px 16px; }
}

/* Full LaTeX + plot reference overlays (latexSheet / plotSheet — self-scrolling sheets) */
.pc-sheet.pc-sheet-ltx { max-width: 820px; width: calc(100vw - 40px); height: calc(100vh - 40px); max-height: none; overflow-y: auto; }
.pc-ltx-doc { font-size: 14.5px; line-height: 1.55; }
.pc-et-morebtns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pc-plx-h { font-family: var(--pc-display); font-size: 15px; margin: 20px 0 6px; }
.pc-plx-src { margin: 0 0 8px; }
.pc-plx-out { margin: 0 0 4px; }
.pc-plx-note { font-size: 12.5px; }

/* ```plot output (PixaPlot — app/plot.js): SVG graph + legend + error footnote */
.pc-plot { margin: 8px 0; }
.pc-plot-svg { display: block; width: 100%; height: auto; }
.pc-plot-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.pc-plot-key { display: inline-flex; align-items: center; gap: 5px; font-family: var(--pc-mono); font-size: 12px; color: var(--pc-dim); }
.pc-plot-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.pc-plot-errs { font-size: 12px; color: var(--pc-danger); margin-top: 4px; }
.pc-plot-fallback { margin: 8px 0 0; }
@media (max-width: 700px) {
  .pc-overlay:has(.pc-sheet-ltx) { padding: 0; }
  .pc-sheet.pc-sheet-ltx { width: 100vw; height: 100dvh; border-radius: 0; padding: 18px 16px; }
}

/* ---------- multi-select + bulk bar ---------- */
.pc-tl-select { margin-left: auto; }
.pc-item.pc-selectable { cursor: pointer; position: relative; }
.pc-item.pc-selectable .pc-item-tools { display: none; }
.pc-selbadge { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--pc-surface); border: 2px solid var(--pc-line); color: transparent; display: flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; z-index: 3; pointer-events: none; }
.pc-item.pc-selected { outline: 3px solid var(--pc-accent); outline-offset: -3px; }
.pc-item.pc-selected .pc-selbadge { background: var(--pc-accent); border-color: var(--pc-accent); color: #fff; }
.pc-selbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 80; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 8px 12px; background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: 14px; box-shadow: var(--pc-shadow-lg); max-width: calc(100vw - 24px); }
.pc-selbar-n { font-size: 13px; font-weight: 600; margin-right: 4px; white-space: nowrap; }
body.pc-selecting .pc-quickbar { display: none; }
.pc-edit-sel { flex-shrink: 0; accent-color: var(--pc-accent); width: 16px; height: 16px; cursor: pointer; }
.pc-movepick .pc-editrow { cursor: pointer; outline: 1px dashed var(--pc-accent); outline-offset: -1px; }

/* ---------- overlay / sheet ---------- */
.pc-overlay { position: fixed; inset: 0; background: rgba(10, 12, 18, 0.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; backdrop-filter: blur(3px); }
.pc-sheet { background: var(--pc-surface); border-radius: 18px; padding: 26px; max-width: 460px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--pc-shadow-lg); position: relative; }
.pc-sheet h2 { font-family: var(--pc-display); letter-spacing: -0.01em; margin: 0 0 14px; font-size: 24px; }
.pc-sheet-close { position: absolute; top: 14px; right: 14px; background: none; border: none; font-size: 26px; line-height: 1; color: var(--pc-faint); cursor: pointer; }
.pc-sheet-close:hover { color: var(--pc-ink); }
/* overlay confirm (cookieless fallback in PixaCore.confirm) */
.pc-confirm-msg { font-size: 15px; line-height: 1.5; margin: 4px 24px 18px 0; overflow-wrap: anywhere; }
.pc-confirm-btns { display: flex; justify-content: flex-end; gap: 10px; }
.pc-ov-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

/* ---------- layer render host (inline, same-document — see PixaLayers.mountLayer) ---------- */
.pc-layerhost { display: block; }
.pc-layerbox { position: relative; width: 100%; }
.pc-layerroot { display: block; min-height: 40px; }
/* Baseline blending: a generated layer inherits the app's reading rhythm out of the
   box (content column, gutters, theme type/link colors, sane media). Everything here
   is deliberately low-specificity so a type's own CSS overrides it freely. */
.pc-layerroot { max-width: 980px; margin: 0 auto; padding: 18px 16px 40px; box-sizing: border-box; color: var(--pc-ink); font-size: 15px; line-height: 1.55; overflow-wrap: break-word; }
.pc-layerroot img, .pc-layerroot video, .pc-layerroot canvas, .pc-layerroot svg { max-width: 100%; height: auto; }
.pc-layerroot a { color: var(--pc-accent); }
.pc-layerroot h1, .pc-layerroot h2, .pc-layerroot h3 { font-family: var(--pc-serif); line-height: 1.2; }
@media (max-width: 600px) { .pc-layerroot { padding: 14px 12px 32px; } }
/* Print: the WYSIWYG PDF page owns margins; drop the screen gutters/cap. */
.pc-layerroot-print { max-width: none; padding: 0; }
/* An open layer drops the timeline gutters (generated CSS owns its own max-width/padding)
   and flows naturally in the scrolling .pc-main — no fixed-height viewport anymore. */
.pc-body-fill { padding: 0; }
.pc-body-fill .pc-stale-banner { margin: 12px 14px; }
.pc-render-busy { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px 16px; color: var(--pc-dim); font-size: 14px; }
/* "Out of date — regenerate" banner over a stale layer render. */
.pc-stale-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: var(--pc-warn-bg); border: 1px solid var(--pc-warn-line); color: var(--pc-warn-ink); font-size: 13px; }

/* ---------- layer library sheet ---------- */
.pc-lib-sec { margin: 8px 0 4px; }
.pc-lib-new { width: 100%; margin: 14px 0 4px; }
.pc-lib-list { display: flex; flex-direction: column; gap: 8px; }
.pc-lib-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--pc-line); border-radius: 12px; background: var(--pc-paper); }
.pc-lib-ico { width: 26px; height: 26px; flex: none; display: inline-flex; align-items: center; justify-content: center; color: var(--pc-accent); font-size: 20px; }
.pc-lib-meta { flex: 1 1 auto; min-width: 0; }
.pc-lib-meta b { display: block; font-size: 14px; font-weight: 600; }
.pc-lib-meta small { color: var(--pc-dim); font-size: 12px; }
.pc-lib-acts { display: flex; gap: 6px; flex: none; }

/* ---------- builder / preview / refine flow ---------- */
.pc-build { display: flex; flex-direction: column; gap: 4px; }
.pc-bf-head { font-family: var(--pc-display); font-size: 20px; margin: 0 0 6px; }
.pc-bf-name, .pc-bf-fb { width: 100%; }
.pc-bf-namef { margin-bottom: 10px; }
.pc-bf-prog { display: flex; align-items: center; gap: 10px; padding: 24px 8px; color: var(--pc-dim); font-size: 14px; }
/* Builder prompt bars are <vc-input-bar> (mic → transcribe → insert). It renders in a
   shadow root, so only ::part() hooks apply — match the app's accent on Send. The
   -fallback rules style the plain textarea used if the vc bundle fails to load. */
.pc-bf-bar { display: block; margin: 6px 0 4px; }
.pc-bf-bar::part(wrap) { border-color: var(--pc-line); border-radius: var(--pc-radius-sm); background: var(--pc-paper); }
.pc-bf-bar::part(send) { background: var(--pc-accent); border-color: var(--pc-accent); color: #fff; }
.pc-bf-bar-fallback { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.pc-bf-bar-fallback .pc-bf-send { align-self: flex-end; }
.pc-bf-retrybar { margin-top: 4px; }
.pc-bf-preview { border: 1px solid var(--pc-line); border-radius: var(--pc-radius-sm); overflow: auto; max-height: 62vh; margin: 10px 0; background: var(--pc-paper); }
.pc-bf-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.pc-bf-refine { margin-top: 12px; }
.pc-bf-code { margin-top: 12px; }
.pc-bf-code pre { max-height: 260px; overflow: auto; }
.pc-err-code { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--pc-soft); border: 1px solid var(--pc-line); color: var(--pc-danger); font-size: 12px; white-space: pre-wrap; max-height: 180px; overflow: auto; }

/* ---------- form field + code helpers ---------- */
.pc-field { display: block; margin: 0 0 12px; }
.pc-field > label { display: block; font-size: 13px; font-weight: 600; color: var(--pc-dim); margin: 0 0 5px; }
.pc-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; background: var(--pc-soft); border: 1px solid var(--pc-line); border-radius: 8px; padding: 12px; }
.pc-linkbtn { background: none; border: none; color: var(--pc-accent); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }

/* ---------- settings "Layers" card ---------- */
.pc-layerrows { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.pc-layerrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--pc-line); border-radius: 10px; background: var(--pc-paper); }
.pc-layerrow-name { display: inline-flex; align-items: center; gap: 7px; flex: 1 1 auto; min-width: 0; }
.pc-layerrow-name b { font-size: 14px; font-weight: 600; }
.pc-layerrow-acts { display: flex; gap: 6px; flex: none; }

/* ---------- share hub ---------- */
.pc-block { width: 100%; }
.pc-sharerow { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.pc-chip { flex: 1 1 auto; min-width: 84px; padding: 9px 12px; border: 1px solid var(--pc-line);
  background: var(--pc-paper); border-radius: 999px; font-size: 13px; color: var(--pc-ink); cursor: pointer; transition: 0.15s; }
.pc-chip:hover { border-color: var(--pc-accent); color: var(--pc-accent); }

/* ---------- QR / join ---------- */
.pc-qrbox { display: flex; justify-content: center; margin: 16px 0; }
.pc-qrbox img { width: 230px; height: 230px; border-radius: 12px; border: 1px solid var(--pc-line); }
.pc-joincard { max-width: 420px; margin: 8vh auto; background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: 18px; padding: 32px 28px; text-align: center; box-shadow: var(--pc-shadow-lg); }
.pc-joincard h2 { font-family: var(--pc-display); font-size: 26px; margin: 6px 0; }
.pc-joincard #jn-lang, .pc-joincard #st-lang { margin: 16px 0; }
.pc-joincard .pc-block { margin-top: 8px; }

/* ---------- public surface (minimal share page) ---------- */
.pc-public { max-width: 1000px; margin: 0 auto; background: var(--pc-surface); min-height: 100vh; box-shadow: var(--pc-shadow-lg); display: flex; flex-direction: column; }
.pc-public .pc-body { flex: 1; }
.pc-pubhero { text-align: center; padding: 44px 24px 26px; }
.pc-pubhero h1 { font-family: var(--pc-display); font-weight: 800; font-size: 40px; margin: 0; letter-spacing: -0.02em; line-height: 1.04; }
.pc-pubhero .pc-sub { color: var(--pc-dim); margin: 8px 0 0; }
.pc-pubplay { margin-top: 20px; font-size: 17px; padding: 14px 30px; border-radius: 999px; box-shadow: var(--pc-shadow-lg); }
/* Film-only link: no views below — the hero IS the page, centered. */
.pc-public-solo .pc-pubhero { padding-top: 14vh; }
.pc-public-solo .pc-pubplay { font-size: 19px; padding: 16px 38px; }
.pc-pubposter { text-align: center; padding: 20px; }
.pc-pubtabs { justify-content: center; }
.pc-pubfoot { text-align: center; color: var(--pc-faint); font-size: 13px; padding: 26px 20px 30px; border-top: 1px solid var(--pc-line); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pc-pubfoot-cta { color: var(--pc-accent); text-decoration: none; font-size: 14px; font-weight: 600; }
.pc-pubfoot-tools { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pc-pubfoot-tools .pc-select { width: auto; }
.pc-pubfoot-brand { color: var(--pc-faint); text-decoration: none; }
.pc-pubfoot-brand:hover { color: var(--pc-ink); }
.pc-pubfoot-legal { font-size: 12px; color: var(--pc-faint); }
.pc-pubfoot-legal a { color: var(--pc-faint); text-decoration: underline; text-underline-offset: 2px; }
.pc-pubfoot-legal a:hover { color: var(--pc-ink); }
.pc-privacy-del { margin-top: 14px; }
.pc-priv-link { margin-top: 8px; }

/* ---------- anonymous landing page (app.html, no params — app/landing.js) ---------- */
.pc-landing { max-width: 1080px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; padding: 0 24px; }

/* hero */
.pc-landing-hero { text-align: center; padding: 11vh 0 26px; background: radial-gradient(640px 320px at 50% -40px, rgba(99, 95, 240, 0.09), transparent 70%); }
.pc-landing-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: 0.01em; }
.pc-landing-mark { font-size: 22px; color: var(--pc-accent); line-height: 1; }
.pc-landing-hero h1 { font-family: var(--pc-display); font-weight: 800; font-size: clamp(34px, 6vw, 58px); margin: 18px auto 0; max-width: 760px; letter-spacing: -0.02em; line-height: 1.08; }
.pc-landing-tag { color: var(--pc-dim); font-size: 17px; margin: 18px auto 0; max-width: 620px; line-height: 1.6; }
.pc-landing-ctarow { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.pc-landing-cta { display: inline-flex; align-items: center; gap: 9px; font-size: 17px; padding: 14px 28px; border-radius: 999px; text-decoration: none; box-shadow: var(--pc-shadow-lg); }
.pc-cta-plane { width: 17px; height: 17px; flex: 0 0 auto; }
.pc-landing-ghost { display: inline-flex; align-items: center; font-size: 16px; padding: 13px 24px; border-radius: 999px; text-decoration: none; background: transparent; border: 1px solid var(--pc-line-strong); color: var(--pc-ink); }
.pc-landing-ghost:hover { border-color: var(--pc-accent); color: var(--pc-accent); }
.pc-landing-trust { color: var(--pc-faint); font-size: 13px; margin: 14px 0 0; }

/* WhatsApp CTA twin (shown only when a WA number is bound) — ghost outline so the
   hero has ONE loud button; the glyph alone carries the WhatsApp green. */
.pc-landing-cta-wa { background: transparent; border: 1px solid var(--pc-line-strong); color: var(--pc-ink); box-shadow: none; }
.pc-landing-cta-wa:hover { border-color: #23a55b; color: var(--pc-ink); }
.pc-landing-cta-wa .pc-cta-plane { color: #23a55b; }

/* entry QRs: desktop affordance — a phone reader can't scan its own screen, so the
   block hides on narrow viewports (the CTA buttons above do the same job there). */
.pc-landing-qrs { margin-top: 26px; }
.pc-qrs-head { color: var(--pc-faint); font-size: 13px; margin: 0 0 12px; }
.pc-qrs-row { display: flex; justify-content: center; gap: 22px; }
.pc-qrcard { margin: 0; padding: 10px 10px 6px; background: #fff; border: 1px solid var(--pc-line-strong); border-radius: 14px; box-shadow: var(--pc-shadow-lg); }
.pc-qrcard img { display: block; width: 148px; height: 148px; border-radius: 6px; }
/* fixed ink: the card stays white in dark mode (QRs need light ground) */
.pc-qrcard figcaption { font-size: 13px; font-weight: 600; color: #191b21; text-align: center; padding: 6px 0 2px; }
@media (max-width: 700px) { .pc-landing-qrs { display: none; } }

/* chat sign-in (landing + join pages — QR pairing panel, no email/password) */
.pc-signin { margin-top: 22px; }
.pc-landing-signin { background: none; border: 0; padding: 4px; color: var(--pc-dim); font-size: 13px; text-decoration: underline; cursor: pointer; }
.pc-landing-signin:hover { color: var(--pc-ink); }
.pc-signin-msg { color: var(--pc-danger); font-size: 13px; margin: 0; }
.pc-signin-hint { color: var(--pc-faint); font-size: 12px; margin: 8px 0 0; }
.pc-login { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pc-login-head, .pc-login-status { color: var(--pc-dim); font-size: 14px; margin: 10px 0 12px; }
.pc-login-or { color: var(--pc-faint); font-size: 13px; margin: 14px 0 10px; }
.pc-login-ctas { margin-top: 0; }
/* phones can't scan their own screen — the one-tap buttons below do the job there */
@media (max-width: 700px) { .pc-login-qrs { display: none; } .pc-login-or { margin-top: 2px; } }

/* sections */
.pc-landing-sec { padding: 34px 0 8px; }
.pc-landing-sec h2, .pc-landing-band h2 { font-family: var(--pc-display); font-weight: 800; font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -0.01em; text-align: center; margin: 0 0 6px; }
.pc-landing-secsub { color: var(--pc-dim); text-align: center; margin: 0 0 22px; font-size: 15px; }

/* how-it-works diagram: 3 illustrated steps + flow connectors */
.pc-hiw { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: start; gap: 6px; margin-top: 26px; }
.pc-hiw-step { display: flex; flex-direction: column; align-items: center; }
.pc-hiw-art { width: 100%; max-width: 250px; height: auto; display: block; }
.pc-hiw-cap { text-align: center; max-width: 270px; margin-top: 10px; }
.pc-hiw-n { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--pc-accent); color: #fff; font-size: 13px; font-weight: 700; }
.pc-hiw-cap h3 { font-family: var(--pc-display); font-size: 20px; margin: 8px 0 6px; }
.pc-hiw-cap p { margin: 0; color: var(--pc-dim); font-size: 14px; line-height: 1.55; }
.pc-hiw-link { align-self: center; display: flex; align-items: center; justify-content: center; padding: 0 2px; margin-top: -40px; }
.pc-hiw-linkart { display: block; }
.pc-hiw-lh .pc-hiw-linkart { width: 84px; height: auto; }
.pc-hiw-lv { display: none; }
.pc-hiw-lv .pc-hiw-linkart { width: 40px; height: auto; }
.pc-landing-chips { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.pc-landing-chip { background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: 999px; padding: 8px 16px; font-size: 13px; color: var(--pc-dim); }

/* diagram artwork palette — every shape reads from the theme vars */
.pc-hiw-art .hiw-frame { fill: var(--pc-surface); stroke: var(--pc-line-strong); stroke-width: 1.5; }
.pc-hiw-art .hiw-screen, .pc-hiw-art .hiw-tile { fill: var(--pc-soft); stroke: var(--pc-line); stroke-width: 1; }
.pc-hiw-art .hiw-backcard { fill: var(--pc-soft); stroke: var(--pc-line); }
.pc-hiw-art .hiw-backcard2 { fill: var(--pc-surface); stroke: var(--pc-line); opacity: 0.8; }
.pc-hiw-art .hiw-bubble { fill: var(--pc-surface); stroke: var(--pc-line); stroke-width: 1; }
.pc-hiw-art .hiw-bubble-acc { fill: var(--pc-accent-soft); }
.pc-hiw-art .hiw-chip { fill: var(--pc-surface); stroke: var(--pc-line-strong); stroke-width: 1.2; }
.pc-hiw-art .hiw-mute { fill: var(--pc-line-strong); }
.pc-hiw-art .hiw-mute2 { fill: var(--pc-line); }
.pc-hiw-art .hiw-sun { fill: var(--pc-gold); }
.pc-hiw-art .hiw-hill { fill: var(--pc-line-strong); }
.pc-hiw-art .hiw-hill2 { fill: var(--pc-faint); opacity: 0.55; }
.pc-hiw-art .hiw-eq rect { fill: var(--pc-accent); }
.pc-hiw-art .hiw-pin { fill: var(--pc-accent); }
.pc-hiw-art .hiw-pin-dot { fill: #fff; }
.pc-hiw-art .hiw-plane { fill: var(--pc-accent); }
.pc-hiw-art .hiw-avatar-acc { fill: var(--pc-accent-soft); stroke: var(--pc-accent); stroke-width: 1.2; }
.pc-hiw-art .hiw-diamond { fill: var(--pc-accent); }
.pc-hiw-art .hiw-glyph rect, .pc-hiw-art .hiw-glyph path[fill] { fill: var(--pc-dim); }
.pc-hiw-art .hiw-glyph .hiw-lens { fill: var(--pc-surface); stroke: var(--pc-accent); stroke-width: 1.4; }
.pc-hiw-art .hiw-glyphline { stroke: var(--pc-dim); stroke-width: 1.6; fill: none; stroke-linecap: round; }
.pc-hiw-art .hiw-drift { fill: none; stroke: var(--pc-line-strong); stroke-width: 1.4; stroke-dasharray: 3 4; stroke-linecap: round; }
.pc-hiw-art .hiw-route { fill: none; stroke: var(--pc-accent); stroke-width: 1.7; stroke-dasharray: 4 4; stroke-linecap: round; }
.pc-hiw-art .hiw-avatar { stroke: var(--pc-surface); stroke-width: 2.5; }
.pc-hiw-art .hiw-av1 { fill: var(--pc-accent); }
.pc-hiw-art .hiw-av2 { fill: var(--pc-gold); }
.pc-hiw-art .hiw-av3 { fill: var(--pc-line-strong); }
.pc-hiw-art .hiw-avplus { fill: var(--pc-surface); stroke: var(--pc-accent); stroke-width: 1.4; }
.pc-hiw-art .hiw-plus { stroke: var(--pc-accent); stroke-width: 1.6; stroke-linecap: round; }
.pc-hiw-art .hiw-stage { fill: #14161d; }
.pc-hiw-art .hiw-seg1 { fill: #fff; opacity: 0.85; }
.pc-hiw-art .hiw-seg2 { fill: #fff; opacity: 0.4; }
.pc-hiw-art .hiw-seg3 { fill: #fff; opacity: 0.2; }
.pc-hiw-art .hiw-daychip { fill: var(--pc-accent); }
.pc-hiw-art .hiw-onstage { fill: #fff; opacity: 0.9; }
.pc-hiw-art .hiw-onstage-full { fill: #fff; }
.pc-hiw-art .hiw-play { fill: var(--pc-accent); }
.pc-hiw-art .hiw-caption { fill: #fff; opacity: 0.28; }
.pc-hiw-art .hiw-note { fill: none; stroke: var(--pc-gold); stroke-width: 2; stroke-linecap: round; }
.pc-hiw-art .hiw-page { fill: var(--pc-surface); stroke: var(--pc-line-strong); stroke-width: 1.2; }
.pc-hiw-art .hiw-fold { fill: var(--pc-soft); stroke: var(--pc-line-strong); stroke-width: 1; }
.pc-hiw-art .hiw-tr1 { font-family: var(--pc-serif); font-size: 20px; fill: var(--pc-ink); }
.pc-hiw-art .hiw-tr2 { font-family: var(--pc-sans); font-size: 15px; fill: var(--pc-accent); }
.pc-hiw-linkart .hiw-flow { fill: none; stroke: var(--pc-line-strong); stroke-width: 2; stroke-dasharray: 6 7; stroke-linecap: round; animation: pc-hiw-flow 1.5s linear infinite; }
.pc-hiw-linkart .hiw-arrow { fill: var(--pc-accent); }
.pc-hiw-linkart .hiw-sun { fill: var(--pc-gold); }
@keyframes pc-hiw-flow { to { stroke-dashoffset: -13; } }
.pc-hiw-art .hiw-eq rect { transform-box: fill-box; transform-origin: center; animation: pc-hiw-eq 0.9s ease-in-out infinite alternate; }
.pc-hiw-art .hiw-eq rect:nth-child(2) { animation-delay: 0.12s; }
.pc-hiw-art .hiw-eq rect:nth-child(3) { animation-delay: 0.24s; }
.pc-hiw-art .hiw-eq rect:nth-child(4) { animation-delay: 0.36s; }
.pc-hiw-art .hiw-eq rect:nth-child(5) { animation-delay: 0.48s; }
.pc-hiw-art .hiw-eq rect:nth-child(6) { animation-delay: 0.6s; }
@keyframes pc-hiw-eq { from { transform: scaleY(0.55); } to { transform: scaleY(1.15); } }
@media (prefers-reduced-motion: reduce) {
  .pc-hiw-linkart .hiw-flow, .pc-hiw-art .hiw-eq rect { animation: none; }
}

/* featured public pixas */
.pc-fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin-top: 8px; }
.pc-fcard { display: flex; flex-direction: column; background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: var(--pc-radius); overflow: hidden; text-decoration: none; color: var(--pc-ink); box-shadow: var(--pc-shadow); transition: transform 0.18s var(--pc-ease), box-shadow 0.18s var(--pc-ease), border-color 0.18s; }
.pc-fcard:hover { transform: translateY(-3px); box-shadow: var(--pc-shadow-lg); border-color: var(--pc-line-strong); }
.pc-fcard-collage { display: grid; gap: 2px; aspect-ratio: 16 / 10; background: var(--pc-soft); }
.pc-fcard-collage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-fcard-collage.n1 { grid-template-columns: 1fr; }
.pc-fcard-collage.n2 { grid-template-columns: 1fr 1fr; }
.pc-fcard-collage.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.pc-fcard-collage.n3 img:first-child { grid-row: 1 / 3; }
.pc-fcard-collage.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pc-fcard-collage.n0 { display: flex; align-items: center; justify-content: center; }
.pc-fcard-collage.n0 span { font-size: 34px; color: var(--pc-accent); opacity: 0.5; }
.pc-fcard-body { padding: 13px 15px 14px; display: flex; flex-direction: column; gap: 4px; }
.pc-fcard-body h3 { font-family: var(--pc-display); font-size: 18px; margin: 0; letter-spacing: -0.01em; }
.pc-fcard-sub { margin: 0; color: var(--pc-dim); font-size: 13px; line-height: 1.4; }
.pc-fcard-meta { display: flex; align-items: baseline; gap: 8px; color: var(--pc-faint); font-size: 12.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.pc-fcard-go { margin-left: auto; color: var(--pc-accent); font-weight: 600; font-size: 13px; }
.pc-fcard.skel { min-height: 230px; border-style: dashed; animation: pc-skel 1.1s ease-in-out infinite alternate; }
@keyframes pc-skel { from { opacity: 0.45; } to { opacity: 0.9; } }

/* feature row */
.pc-landing-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 20px; }
.pc-landing-feat { display: flex; align-items: flex-start; gap: 12px; background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: 14px; padding: 16px; }
.pc-feat-ic { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 2px; stroke: var(--pc-accent); stroke-width: 1.6; }
.pc-feat-ic .fill { fill: var(--pc-accent); stroke: none; }
.pc-feat-ic .hole { fill: var(--pc-surface); stroke: none; }
.pc-landing-feat h3 { margin: 0 0 4px; font-size: 15px; }
.pc-landing-feat p { margin: 0; color: var(--pc-dim); font-size: 13.5px; line-height: 1.5; }

/* closing CTA band */
.pc-landing-band { background: #12141b; color: #eef0f6; border-radius: 22px; text-align: center; padding: 44px 26px 40px; margin: 40px 0 8px; }
.pc-landing-band h2 { color: inherit; }
.pc-landing-band p { color: #9aa2b1; margin: 6px auto 22px; max-width: 460px; font-size: 15px; line-height: 1.55; }
.pc-landing-band .pc-landing-cta { box-shadow: 0 6px 22px rgba(91, 87, 232, 0.45); }
.pc-landing-band .pc-landing-cta-wa { border-color: rgba(255,255,255,.28); color: #eef0f6; }
.pc-landing-band .pc-landing-cta-wa:hover { border-color: #23a55b; }
.pc-landing-mini { margin: 16px 0 0 !important; font-size: 13px !important; }
.pc-landing .pc-pubfoot { border-top: 0; margin-top: auto; }

/* closed-pixa badges (list cards + headers) */
.pc-closed-badge { display: inline-block; font-size: 11px; font-weight: 600; color: var(--pc-faint); border: 1px solid var(--pc-line); border-radius: 999px; padding: 1px 7px; vertical-align: middle; white-space: nowrap; }
.pc-chip-closed { color: var(--pc-faint); }

/* channel-neutral join page (app.html?join= — what invite QRs encode) */
.pc-join-hero { padding-bottom: 8vh; }
.pc-join-kicker { margin: 26px 0 0; color: var(--pc-faint); font-size: 15px; text-transform: uppercase; letter-spacing: 0.08em; }
.pc-join-title { font-family: var(--pc-display); font-weight: 800; font-size: clamp(30px, 5.5vw, 50px); margin: 8px auto 0; max-width: 720px; letter-spacing: -0.02em; line-height: 1.1; }
.pc-join-sub { color: var(--pc-faint); font-size: 16px; line-height: 1.55; max-width: 460px; margin: 14px auto 0; }
.pc-join-ctas { margin-top: 26px; display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* responsive: diagram stacks vertically, connectors rotate */
@media (max-width: 760px) {
  .pc-landing-hero { padding-top: 7vh; }
  .pc-hiw { grid-template-columns: 1fr; justify-items: center; gap: 4px; }
  .pc-hiw-link { margin-top: 0; padding: 4px 0; }
  .pc-hiw-lh { display: none; }
  .pc-hiw-lv { display: block; }
  .pc-hiw-art { max-width: 230px; }
  .pc-landing-band { margin-top: 28px; }
}

/* ---------- share hub: custom scoped links ---------- */
.pc-share-warn { background: var(--pc-warn-bg); border: 1px solid var(--pc-warn-line); color: var(--pc-warn-ink); border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.45; }
.pc-sharepick { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 12px; }
.pc-sharepick-row { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.pc-sharepick-row input { accent-color: var(--pc-accent); width: 16px; height: 16px; }
.pc-sharelist { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.pc-sharerow { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--pc-line); border-radius: 10px; padding: 8px 10px; }
.pc-sharerow-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-sharerow-main b { font-size: 13.5px; }
.pc-sharerow-main .pc-dim { font-size: 12.5px; }
.pc-sharerow-acts { display: flex; gap: 6px; flex-shrink: 0; }

/* ---------- toast (only when no host toast available) ---------- */
.pc-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1b1f28; color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 14px; z-index: 200; opacity: 0; transition: 0.3s; box-shadow: var(--pc-shadow-lg); }
.pc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.pc-toast.pc-success { background: var(--pc-success); }
.pc-toast.pc-error { background: var(--pc-danger); }

/* ---------- lightbox / gallery viewer ---------- */
.pc-lightbox { position: fixed; inset: 0; background: rgba(12,11,13,.95); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 300; padding: 58px 20px 16px; gap: 12px; animation: pcLbIn 0.25s ease; }
@keyframes pcLbIn { from { opacity: 0; } }
/* slideshow progress (top edge): CSS width transition for timed slides, JS-driven for media */
.pc-lb-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 20px; z-index: 4; color: #fff; background: linear-gradient(rgba(0,0,0,.5), transparent); pointer-events: none; }
.pc-lb-top > * { pointer-events: auto; }
.pc-lb-count { font-size: 13px; opacity: 0.8; letter-spacing: 0.05em; font-variant-numeric: tabular-nums; }
.pc-lb-tools { display: flex; align-items: center; gap: 8px; }
.pc-lb-tbtn { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.22); color: #fff; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 21px; line-height: 1; padding: 0; transition: background 0.15s, border-color 0.15s; }
.pc-lb-tbtn:hover { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.55); }
.pc-lb-tbtn .pc-ico { width: 19px; height: 19px; }
.pc-lb-zoomctl { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; }
.pc-lb-zlvl { background: none; border: none; color: #fff; opacity: 0.75; font-size: 12.5px; min-width: 46px; text-align: center; cursor: pointer; font-variant-numeric: tabular-nums; }
.pc-lb-zlvl:hover { opacity: 1; }
.pc-lb-stage { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; overflow: hidden; }
/* slides stack in the stage; directional slide+fade transitions between them */
.pc-lb-slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: transform 0.45s cubic-bezier(.22,.61,.36,1), opacity 0.45s ease; will-change: transform, opacity; }
.pc-lb-in-next { transform: translateX(7%) scale(.985); opacity: 0; }
.pc-lb-in-prev { transform: translateX(-7%) scale(.985); opacity: 0; }
.pc-lb-out-next { transform: translateX(-7%) scale(.985); opacity: 0; pointer-events: none; }
.pc-lb-out-prev { transform: translateX(7%) scale(.985); opacity: 0; pointer-events: none; }
/* canvas zoomer (image + map slides) */
.pc-lb-canvaswrap { touch-action: none; cursor: zoom-in; }
.pc-lb-canvaswrap.pc-zoomed { cursor: grab; }
.pc-lb-canvaswrap.pc-zoomed:active { cursor: grabbing; }
.pc-lb-canvas { width: 100%; height: 100%; display: block; }
.pc-lb-wait { position: absolute; top: 50%; left: 50%; margin: -14px 0 0 -14px; }
.pc-lb-err { color: #fff; opacity: 0.6; font-size: 14px; }
.pc-lb-vslide video { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 12px 48px rgba(0,0,0,.5); background: #000; outline: none; }
/* voice / file cards */
.pc-lb-card { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fff; text-decoration: none; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); padding: 34px 42px; border-radius: 18px; max-width: min(420px, 86vw); }
.pc-lb-card p { margin: 0; opacity: 0.8; font-size: 14px; }
.pc-lb-card b { font-size: 15px; word-break: break-all; text-align: center; }
.pc-lb-card em { font-style: normal; opacity: 0.6; font-size: 13px; }
.pc-lb-card audio { max-width: 72vw; }
.pc-lb-cardico { font-size: 44px; line-height: 1; }
.pc-lb-fileopen { margin-top: 6px; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; padding: 6px 16px; font-size: 13px; }
.pc-lb-filecard:hover .pc-lb-fileopen { border-color: #fff; }
/* text slides */
.pc-lb-textslide { padding: 4vh 7vw; }
.pc-lb-textcard { max-width: 660px; max-height: 100%; overflow: auto; color: #f5f0e8; font-family: var(--pc-serif); font-size: 20px; line-height: 1.6; padding: 14px 6px; }
.pc-lb-textcard p { margin: 0; white-space: pre-wrap; }
.pc-lb-t-lg { font-size: 26px; line-height: 1.5; text-align: center; }
.pc-lb-t-xl { font-size: 34px; line-height: 1.42; text-align: center; }
.pc-lb-quote { display: block; font-size: 64px; line-height: 0.5; opacity: 0.35; text-align: center; margin-bottom: 16px; }
.pc-lb-textpin { display: block; font-size: 40px; line-height: 1; text-align: center; margin-bottom: 12px; }
/* footer meta */
.pc-lb-foot { flex: 0 0 auto; width: 100%; max-width: 760px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; color: #fff; z-index: 3; }
.pc-lb-meta { min-width: 0; }
.pc-lb-by { font-size: 13px; opacity: 0.85; }
.pc-lb-place { font-size: 12.5px; opacity: 0.75; margin-left: 10px; }
.pc-lb-cap { font-family: var(--pc-serif); font-size: 16px; margin-top: 4px; }
.pc-lb-acts { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.pc-lb-act { display: inline-flex; align-items: center; gap: 6px; color: #fff; opacity: 0.85; text-decoration: none; font-size: 13px; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; padding: 6px 11px; }
.pc-lb-act:hover { opacity: 1; border-color: rgba(255,255,255,.7); }
.pc-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.25); color: #fff; font-size: 30px; line-height: 1; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; padding-bottom: 4px; transition: background 0.15s, border-color 0.15s, opacity 0.4s ease; }
.pc-lb-nav:hover { background: rgba(0,0,0,.6); border-color: rgba(255,255,255,.6); }
.pc-lb-prev { left: 18px; }
.pc-lb-next { right: 18px; }
/* slideshow: chrome fades out after inactivity */
.pc-lb-top, .pc-lb-foot { transition: opacity 0.4s ease; }
@media (max-width: 840px) {
  .pc-lightbox { padding: 54px 10px 12px; }
  .pc-lb-nav { width: 38px; height: 38px; font-size: 24px; }
  .pc-lb-prev { left: 8px; }
  .pc-lb-next { right: 8px; }
  .pc-lb-tbtn { width: 34px; height: 34px; }
  .pc-lb-t-xl { font-size: 27px; }
  .pc-lb-t-lg { font-size: 22px; }
}

/* ============================================================
   Responsive: desktop = permanent rail; mobile = sticky top bar
   + slide-in rail drawer. One shell, two layout modes.
   ============================================================ */
@media (max-width: 840px) {
  .pc-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  /* sticky top bar appears */
  .pc-topbar {
    display: flex; align-items: center; gap: 12px; grid-row: 1;
    position: sticky; top: 0; z-index: 38;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
    background: var(--pc-surface-glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--pc-line);
    box-shadow: var(--pc-shadow);
  }
  .pc-topbar-brand { font-family: var(--pc-display); font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
  .pc-topbar-title { font-family: var(--pc-display); color: var(--pc-dim); font-size: 15px; margin-left: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
  /* mobile header shows the topbar profile button; the drawer's brand-row twin hides */
  /* pixa open (mini-parity view): the pc-route-pixa row replaces the topbar */
  .pc-shell.pc-pixa-open .pc-topbar { display: none; }
  .pc-main > .pc-pixa-head, .pc-main > .pc-pixa-subhead { margin-left: 16px; margin-right: 16px; }
  /* rail becomes an off-canvas drawer */
  .pc-rail {
    position: fixed; inset: 0 auto 0 0; z-index: 40; width: 86%; max-width: 320px;
    transform: translateX(-100%); transition: transform 0.26s cubic-bezier(.4,0,.2,1);
    box-shadow: var(--pc-shadow-lg);
    padding-top: calc(env(safe-area-inset-top, 0px) + 16px);
  }
  .pc-rail.open { transform: none; }
  .pc-rail-close { display: inline-flex; }
  .pc-scrim.show { display: block; }
  .pc-main { grid-row: 2; max-height: none; }
  .pc-phead { flex-direction: column; padding: 18px 18px 14px; }
  .pc-phead h1 { font-size: 25px; }
  .pc-phead-actions { width: 100%; gap: 6px; }
  .pc-phead-actions .pc-btn { flex: 1 1 auto; min-width: 64px; }
  .pc-tabs { padding: 0 10px; }
  .pc-body { padding: 18px 16px 90px; }
  .pc-pubhero h1 { font-size: 30px; }
}

/* very small: tab labels collapse to icon-only to keep the bar one row */
@media (max-width: 480px) {
  .pc-tab .pc-tab-lbl { display: none; }
  .pc-tab { padding: 12px 12px; }
  .pc-tab .pc-ico { width: 21px; height: 21px; }
}

/* ============================================================
   Telegram mini-app (PixaMini) — focused single-pixa surface.
   ============================================================ */
.pc-mini-root { min-height: 100vh; background: var(--pc-bg); }

/* sticky 3-tab top nav: Pixas · Friends · Settings, with an active indicator */
.pc-topnav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: stretch;
  background: var(--pc-surface-glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--pc-line);
  box-shadow: var(--pc-shadow);
  padding: calc(env(safe-area-inset-top, 0px) + 6px) 6px 0;
}
.pc-topnav-tab {
  flex: 1 1 0; display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer; color: var(--pc-dim);
  font-family: var(--pc-sans); font-size: 11px; font-weight: 600;
  padding: 7px 6px 9px; border-bottom: 2.5px solid transparent;
  transition: color .18s var(--pc-ease), border-color .18s var(--pc-ease);
}
.pc-topnav-tab .pc-ico { width: 22px; height: 22px; }
.pc-topnav-tab:hover { color: var(--pc-ink); }
.pc-topnav-tab.on { color: var(--pc-accent); border-bottom-color: var(--pc-accent); }

/* back header for the pixa route (native BackButton works too) — back arrow + nav icons */
.pc-route-pixa {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 6px;
  background: var(--pc-surface-glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--pc-line);
  box-shadow: var(--pc-shadow);
  padding: calc(env(safe-area-inset-top, 0px) + 6px) 10px 6px;
}
.pc-backbtn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; color: var(--pc-accent);
  font-family: var(--pc-sans); font-size: 14px; font-weight: 600; padding: 6px 8px; border-radius: 9px;
}
.pc-backbtn .pc-ico { width: 18px; height: 18px; }
.pc-backbtn:hover { background: var(--pc-paper); }
/* nav row (Timeline · Story? · Make active? · Team? · Settings?) — icon + label, like the list top-nav */
.pc-pixanav {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: flex-end;
  gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.pc-pixanav::-webkit-scrollbar { display: none; }
.pc-pixanav-btn {
  flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer; color: var(--pc-dim);
  font-family: var(--pc-sans); font-size: 10.5px; font-weight: 600; line-height: 1;
  padding: 6px 9px 7px; border-radius: 11px; border: 1px solid transparent;
  transition: color .18s var(--pc-ease), background .18s var(--pc-ease), border-color .18s var(--pc-ease);
}
.pc-pixanav-btn .pc-ico { width: 21px; height: 21px; margin: 0; }
.pc-pixanav-btn:hover { color: var(--pc-ink); }
.pc-pixanav-btn.on { color: var(--pc-accent); background: var(--pc-accent-soft); border-color: var(--pc-accent); }

.pc-mini {
  max-width: 680px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: 12px 14px calc(env(safe-area-inset-bottom, 0px) + 20px);
}
.pc-mini-welcome { margin-top: 40px; }

/* header Type ▾ — the view chooser (sits between the back arrow and the nav buttons) */
.pc-headtype { flex: 0 0 auto; display: flex; align-items: center; }
.pc-typesel {
  width: auto; max-width: 44vw; font-size: 13px; font-weight: 600;
  padding: 6px 26px 6px 11px; border-radius: 9px;
}

/* nav button contributor-count badge (Team) */
.pc-pixanav-btn { position: relative; }
.pc-nav-badge {
  position: absolute; top: 1px; right: 1px;
  min-width: 15px; height: 15px; padding: 0 4px; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 700; line-height: 1; color: #fff;
  background: var(--pc-accent); border-radius: 9px;
}

/* title block (title + active badge on the left, OP settings gear on the right) */
.pc-pixa-head { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 4px; }
.pc-pixa-titlerow { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pc-pixa-titlebox { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; min-width: 0; }
.pc-pixa-titleacts { flex: 0 0 auto; }
.pc-pixa-settings { color: var(--pc-dim); }
.pc-pixa-settings:hover { color: var(--pc-accent); }
.pc-mini-title { font-family: var(--pc-display); font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.pc-pixa-head .pc-sub { margin: 0; }
.pc-pixa-created { font-size: 11px; color: var(--pc-faint); margin: 0; }

/* active badge (kept; was part of the removed meta row) */
.pc-metachip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--pc-dim); background: var(--pc-paper);
  border: 1px solid var(--pc-line); border-radius: 20px; padding: 4px 11px;
}
.pc-metachip .pc-ico { width: 14px; height: 14px; }
.pc-metachip-active { background: var(--pc-accent); border-color: var(--pc-accent); color: #fff; font-weight: 700; }

/* 2nd header (timeline only): alternate-layout switcher + sorter */
.pc-pixa-subhead {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin: 14px 0 4px;
}
.pc-layoutswitch { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.pc-layoutbtn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: 20px;
  padding: 6px 13px; cursor: pointer; color: var(--pc-ink);
  font-family: var(--pc-sans); font-size: 13px; font-weight: 600;
}
.pc-layoutbtn:hover { border-color: var(--pc-accent); color: var(--pc-accent); }
.pc-layoutbtn .pc-ico { width: 15px; height: 15px; }
.pc-pixa-sort { margin-left: auto; }

/* switcher + settings sheets */
.pc-sheet-h { font-family: var(--pc-display); letter-spacing: -0.01em; margin: 0 0 14px; font-size: 22px; }
.pc-switch-list { display: flex; flex-direction: column; gap: 8px; }
.pc-switch-row {
  text-align: left; background: var(--pc-paper); border: 1px solid var(--pc-line);
  border-radius: 12px; padding: 12px 13px; cursor: pointer; transition: 0.15s;
  display: flex; flex-direction: column; gap: 3px;
}
.pc-switch-row:hover { border-color: var(--pc-accent); }
.pc-switch-row.on { border-color: var(--pc-accent); background: var(--pc-accent-soft); }
.pc-switch-title { font-weight: 600; font-size: 15px; }
.pc-switch-meta { font-size: 12px; color: var(--pc-faint); }
.pc-switch-empty { margin: 0 0 4px; }
.pc-switch-new { margin-top: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.pc-switch-new .pc-ico { width: 16px; height: 16px; }
.pc-welcome-new { margin: 8px auto 4px; display: inline-flex; align-items: center; gap: 7px; }
.pc-welcome-new .pc-ico { width: 16px; height: 16px; }
.pc-set-block { margin-bottom: 16px; }
.pc-set-block .pc-foot-label { margin-bottom: 6px; }

/* members strip */
.pc-mini-members {
  display: flex; gap: 8px; overflow-x: auto; padding: 14px 2px 2px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.pc-mini-members::-webkit-scrollbar { display: none; }
.pc-mchip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  background: var(--pc-surface); border: 1px solid var(--pc-line);
  border-radius: 20px; padding: 4px 10px 4px 4px; font-size: 13px; color: var(--pc-ink);
}
.pc-mchip-op { border-color: var(--pc-accent); }
.pc-mavatar {
  width: 24px; height: 24px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  background: var(--pc-paper); color: var(--pc-accent); border: 1px solid var(--pc-line);
}
.pc-mname { white-space: nowrap; }
/* member chip is a visibility toggle: dimmed + struck when that contributor is hidden */
.pc-mchip { cursor: pointer; transition: opacity .15s, filter .15s; }
.pc-mchip-off { opacity: .45; }
.pc-mchip-off .pc-mname { text-decoration: line-through; }
.pc-mkick {
  border: none; background: transparent; color: var(--pc-faint);
  font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px;
}
.pc-mkick:hover { color: var(--pc-accent); }

/* Team overlay (1st-header Team button) */
.pc-team-invite { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 14px; }
.pc-team-invite .pc-ico { width: 18px; height: 18px; margin: 0; }
.pc-team-list { display: flex; flex-direction: column; gap: 2px; }
.pc-team-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 2px; border-bottom: 1px solid var(--pc-line);
}
.pc-team-row:last-child { border-bottom: none; }
.pc-team-id { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.pc-team-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-team-meta { font-size: 12px; color: var(--pc-dim); }
.pc-team-lock { color: var(--pc-faint); display: inline-flex; }
.pc-team-lock .pc-ico { width: 16px; height: 16px; }

/* body */
.pc-mini-body { margin-top: 16px; }
/* mini collage stays 2 cols (core.masonry computes cols from width; the mini host is narrow) */
.pc-mini-timeline .pc-item { flex-basis: 150px; }
/* touch surface: item tools are always visible (no hover) */
.pc-mini-body .pc-item-tools { opacity: 1; }

/* clickable contributors chip (dashboard full view) */
.pc-chip-contrib { cursor: pointer; }
.pc-chip-contrib:hover { border-color: var(--pc-accent); color: var(--pc-accent); }

/* timeline sort toolbar (dashboard full view) */
.pc-tl-sort { display: inline-flex; gap: 6px; }
.pc-tl-sort .pc-btn.on { border-color: var(--pc-accent); color: var(--pc-accent); }

/* contributors popup */
.pc-contrib-list { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 4px; }
.pc-contrib-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 4px; border-bottom: 1px solid var(--pc-line);
}
.pc-contrib-row:last-child { border-bottom: none; }
.pc-contrib-name { flex: 1 1 auto; font-weight: 600; }
.pc-contrib-stat { font-size: 13px; color: var(--pc-dim); white-space: nowrap; }
.pc-mavatar-op { border-color: var(--pc-accent); }

/* ---------- motion: tasteful, smooth, reduced-motion-aware ---------- */
/* NOTE: masonry owns each .pc-item's `transform` (translate into its column), so the
   card reveal must NOT animate transform — it fades opacity only. The lift comes from
   an inner zoom on .pc-media instead, which doesn't touch the card's transform. */
@keyframes pc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pc-overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pc-sheet-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes pc-day-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* smooth active-state transitions for nav/tabs/sort */
  .pc-tab, .pc-navbtn, .pc-tl-sort .pc-btn, .pc-tab-active, .pc-rail-item { transition: color .2s var(--pc-ease), background .2s var(--pc-ease), border-color .2s var(--pc-ease); }
  /* masonry owns transform → only transition box-shadow here (transform stays instant) */
  .pc-item { transition: box-shadow .2s var(--pc-ease); }

  /* day separators slide in */
  .pc-daysep { animation: pc-day-in .4s var(--pc-ease) both; }

  /* timeline cards: scroll-reveal driven by JS (.pc-reveal -> .in). Opacity-only so it
     never fights masonry's transform; the inner media zoom-up adds the "lift" feel. */
  .pc-timeline .pc-item.pc-reveal { opacity: 0; will-change: opacity; }
  .pc-timeline .pc-item.pc-reveal .pc-media img { transform: scale(1.04); transition: transform .55s var(--pc-ease); }
  .pc-timeline .pc-item.pc-reveal.in {
    animation: pc-fade .5s var(--pc-ease) both;
    animation-delay: calc(var(--i, 0) * 35ms);
  }
  .pc-timeline .pc-item.pc-reveal.in .pc-media img { transform: none; transition-delay: calc(var(--i, 0) * 35ms); }

  /* overlay sheets fade + lift in */
  .pc-overlay { animation: pc-overlay-in .2s ease both; }
  .pc-overlay .pc-sheet { animation: pc-sheet-in .28s var(--pc-ease) both; }

  /* pixa card thumbs lift slightly with the card on hover */
  .pc-pc-thumb img { transition: transform .25s var(--pc-ease); }
  .pc-pixacard:hover .pc-pc-thumb img, .pc-switch-row:hover .pc-pc-thumb img { transform: scale(1.05); }

  /* freshly-captured items slide in highlighted */
  .pc-mini-timeline .pc-item.is-new { animation: pc-newitem 1.4s var(--pc-ease) both; }
}

/* ============================================================
   Mini-app v2: list header, pixa actions, friends, stats.
   ============================================================ */

/* Pixas list header: title + filter + create */
.pc-listhead {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 2px 0 12px;
}
.pc-listhead-title { font-family: var(--pc-display); font-size: 22px; font-weight: 700; margin: 0; }
.pc-listhead-acts { display: flex; gap: 8px; flex: 0 0 auto; }
.pc-iconbtn.pc-primary { background: var(--pc-accent); border-color: var(--pc-accent); color: #fff; }
.pc-iconbtn.pc-listfilter.on, .pc-iconbtn.pc-pixa-settings.on { border-color: var(--pc-accent); color: var(--pc-accent); }
.pc-ico-xs { width: 13px; height: 13px; vertical-align: -2px; }

.pc-activefilters { display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; font-size: 12px; }
.pc-link { background: none; border: none; color: var(--pc-accent); cursor: pointer; font-size: 12px; text-decoration: underline; padding: 0; }
.pc-pixalist .pc-livedot { font-size: 12px; }
.pc-pc-team { display: inline-flex; align-items: center; gap: 2px; }
.pc-pub { color: var(--pc-accent); font-weight: 600; }

/* "active pixa" badge — on the list card title and as a header chip */
.pc-active-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; line-height: 1;
  padding: 3px 7px; border-radius: 10px; vertical-align: middle;
  background: var(--pc-accent); color: #fff; white-space: nowrap;
}

/* filter chips (rail + mini-app modal). Soft-pill selected state — accent border +
   accent-soft fill, never a solid block — matching the .on pill convention. */
.pc-filterchips { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-filterchip {
  cursor: pointer; padding: 6px 13px; border-radius: 999px; font-family: var(--pc-sans);
  font-size: 13px; font-weight: 600; line-height: 1; white-space: nowrap;
  background: var(--pc-soft); border: 1px solid transparent; color: var(--pc-dim);
  transition: background .15s var(--pc-ease), color .15s var(--pc-ease), border-color .15s var(--pc-ease);
}
.pc-filterchip:hover { color: var(--pc-ink); background: var(--pc-line); }
.pc-filterchip.on {
  background: var(--pc-accent-soft); border-color: var(--pc-accent); color: var(--pc-accent-d);
}
.pc-filterchip.on:hover { background: var(--pc-accent-soft); }
.pc-sortbtn.on { border-color: var(--pc-accent); color: var(--pc-accent); }


/* welcome empty-state art */
.pc-welcome-art { font-size: 40px; color: var(--pc-accent); opacity: .6; margin-bottom: 6px; }

/* ---- Friends ---- */
.pc-friends-subnav { display: flex; align-items: center; gap: 8px; margin: 2px 0 12px; }
.pc-subtab {
  background: none; border: none; cursor: pointer; color: var(--pc-dim);
  font-family: var(--pc-sans); font-size: 15px; font-weight: 600; padding: 6px 4px;
  border-bottom: 2px solid transparent;
}
.pc-subtab.on { color: var(--pc-accent); border-bottom-color: var(--pc-accent); }
.pc-followme { margin-left: auto; }

.pc-friend-search { margin-bottom: 14px; }
.pc-friend-results { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pc-friend-empty { padding: 4px 2px; }

.pc-friends { display: flex; flex-direction: column; gap: 6px; }
.pc-friend-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--pc-surface); border: 1px solid var(--pc-line);
  border-radius: 12px; padding: 9px 11px;
}
.pc-friend-info { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }
.pc-friend-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-friend-handle { font-size: 12px; color: var(--pc-faint); }
.pc-friend-acts { display: flex; gap: 6px; flex: 0 0 auto; }
.pc-mutual { color: var(--pc-accent); font-size: 12px; }

.pc-avatar {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; background: var(--pc-paper);
  color: var(--pc-accent); border: 1px solid var(--pc-line);
}
.pc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pc-avatar-lg { width: 52px; height: 52px; font-size: 20px; }

.pc-danger { color: var(--pc-faint); }
.pc-danger:hover { color: #fff; background: var(--pc-danger); border-color: var(--pc-danger); }

/* follow suggestions strip */
.pc-friend-suggest { margin-top: 18px; }
.pc-suggest-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 8px 2px 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.pc-suggest-strip::-webkit-scrollbar { display: none; }
.pc-suggest-card {
  flex: 0 0 auto; width: 130px; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center;
  background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: 14px; padding: 12px 10px;
}
.pc-suggest-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pc-suggest-meta { font-size: 11px; color: var(--pc-faint); }
.pc-suggest-follow { margin-top: 4px; }

/* follow-me sheet */
.pc-qrbox { display: flex; justify-content: center; margin: 14px 0; }
.pc-qrbox img { width: 220px; height: 220px; border-radius: 12px; border: 1px solid var(--pc-line); }
.pc-copyrow { display: flex; gap: 8px; }
.pc-copyrow .pc-input { flex: 1 1 auto; font-size: 12px; }

/* friend detail sheet (tap a followed friend) */
.pc-friend-tappable { cursor: pointer; }
.pc-friend-chev { color: var(--pc-faint); font-size: 20px; line-height: 1; padding: 0 2px; }
.pc-friend-detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pc-friend-detail-id { display: flex; flex-direction: column; min-width: 0; }
.pc-friend-detail-name { font-family: var(--pc-display); font-size: 20px; font-weight: 600; }
.pc-friend-detail-stats { display: flex; gap: 8px; margin-bottom: 16px; }
.pc-friend-detail-stats .pc-stat { flex: 1 1 0; }
.pc-friend-shared { margin: -8px 0 16px; font-size: 12px; }
/* account/profile panel head — shared: dashboard Account panel + cookieless profile view */
.pc-acctview { max-width: 540px; margin: 0 auto; padding: 30px 32px 48px; }
.pc-acctview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.pc-acctview-h { font-family: var(--pc-display); font-size: 26px; margin: 0; color: var(--pc-ink); }
.pc-acctview-body { display: flex; flex-direction: column; }
/* cookieless profile view wrapper — same edge gaps as the gallery/Friends mains */
.pc-profilemain { padding: 26px 32px 80px; max-width: 780px; }
@media (max-width: 840px) { .pc-profilemain { padding: 18px 16px 90px; } }
@media (max-width: 640px) { .pc-acctview { padding: 22px 18px 40px; } .pc-acctview-h { font-size: 22px; } }
/* friend-detail facet chips (All / By her / Together | Solo / Team) */
.pc-fchipbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.pc-fchipbar .pc-filterchip { padding: 4px 10px; font-size: 12px; }
.pc-fchip-sep { width: 1px; align-self: stretch; background: var(--pc-line); margin: 2px 4px; }
/* browse-rail "With friend" + crew facet controls */
.pc-railwith { margin-top: 8px; }
.pc-rail-with { width: 100%; }
.pc-railcrew { margin-top: 6px; }
.pc-friend-detail-lbl { margin: 4px 0 8px; }
.pc-friend-detail-pixas { margin-bottom: 8px; }

/* "From friends" section (gallery main panel + friend detail) */
.pc-friendspixas { margin-top: 22px; }
.pc-fp-gallery { margin: 0; padding: 0 32px 80px; }
.pc-fp-gallery .pc-section-label { margin-bottom: 12px; }
.pc-fp-gallery .pc-fp-body {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; align-items: start;
}
.pc-fp-gallery .pc-friendcard .pc-pc-thumb { max-width: none; border-radius: 11px; }
@media (max-width: 840px) {
  .pc-fp-gallery { padding: 0 16px 90px; }
  .pc-fp-gallery .pc-fp-body { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}
.pc-section-label { margin-bottom: 8px; }
.pc-friendcard .pc-switch-title { font-weight: 600; }

/* ---- Settings stats ---- */
.pc-settings { display: flex; flex-direction: column; }
.pc-set-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pc-set-dim { font-size: 12px; color: var(--pc-dim); margin: 4px 0 0; }
.pc-set-lang { margin: 6px 0; }
.pc-statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pc-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: 12px; padding: 12px 6px;
}
.pc-stat b { font-family: var(--pc-display); font-size: 22px; color: var(--pc-accent); }
.pc-stat span { font-size: 11px; color: var(--pc-dim); }

/* opacity + ring only — must NOT animate transform (masonry owns it) */
@keyframes pc-newitem {
  0%   { opacity: 0; box-shadow: 0 0 0 2px var(--pc-accent); }
  30%  { opacity: 1; box-shadow: 0 0 0 2px var(--pc-accent); }
  100% { box-shadow: var(--pc-shadow); }
}

/* ============================================================
   Dashboard shell v2 (PixaCore desktop): rail nav + premium header.
   Reuses the shared pc-* tokens above. Desktop-first, superset of
   the mini-app feature set.
   ============================================================ */

/* rail primary nav: the three destinations (Pixas · Friends · Profile), vertical.
   Selected state = soft-bg pill (never an inset bar / underline). */
.pc-railnav { display: flex; flex-direction: column; gap: 2px; }
.pc-railnav-btn {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  font-family: var(--pc-sans); font-size: 14px; font-weight: 600; color: var(--pc-dim);
  background: transparent; border: none; border-radius: 10px; padding: 9px 11px; cursor: pointer;
  transition: color .15s var(--pc-ease), background .15s var(--pc-ease);
}
.pc-railnav-btn .pc-ico { width: 17px; height: 17px; margin: 0; flex-shrink: 0; }
.pc-railnav-btn:hover { color: var(--pc-ink); background: var(--pc-soft); }
.pc-railnav-btn.on { background: var(--pc-accent-soft); color: var(--pc-accent); }

/* rail context zone building blocks (renderRailBody per-destination content) */
.pc-raillabel {
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--pc-faint); margin: 8px 4px -6px;
}
.pc-railback {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  background: none; border: none; color: var(--pc-dim); font-family: var(--pc-sans);
  font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 8px;
}
.pc-railback:hover { color: var(--pc-accent); background: var(--pc-soft); }
.pc-railback .pc-ico { margin: 0; }
.pc-railpixa {
  background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: 12px;
  padding: 10px 12px;
}
.pc-railpixa .pc-pc-collage { margin-bottom: 8px; }
.pc-railpixa .pc-rp-title { font-weight: 700; font-size: 15px; line-height: 1.25; }
.pc-railpixa .pc-rp-title .pc-star { margin-right: 2px; }
.pc-railpixa .pc-rp-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.pc-railviews { display: flex; flex-direction: column; gap: 1px; }
.pc-railview-btn {
  display: flex; align-items: center; gap: 9px; text-align: left; width: 100%;
  background: transparent; border: none; border-radius: 9px; padding: 7px 10px;
  font-family: var(--pc-sans); font-size: 13.5px; font-weight: 600; color: var(--pc-dim); cursor: pointer;
  transition: color .15s var(--pc-ease), background .15s var(--pc-ease);
}
.pc-railview-btn:hover { color: var(--pc-ink); background: var(--pc-soft); }
.pc-railview-btn.on { background: var(--pc-accent-soft); color: var(--pc-accent); }
.pc-railview-btn .pc-ico { width: 16px; height: 16px; margin: 0; }
.pc-rv-ico { display: inline-flex; width: 18px; justify-content: center; flex-shrink: 0; }
.pc-rv-lbl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-railview-btn .pc-count { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--pc-faint); }
.pc-railview-add { color: var(--pc-accent); opacity: .85; }
.pc-railview-add:hover { opacity: 1; color: var(--pc-accent); }
/* per-layer busy spinner on a rail view row (same look as the old tab spinner;
   the class is toggled by layers.js tabSpin + rendered from state.layerBusy) */
.pc-railview-btn.pc-rv-busy::after {
  content: ''; margin-left: auto; width: 11px; height: 11px; flex-shrink: 0;
  border: 2px solid var(--pc-line); border-top-color: var(--pc-accent);
  border-radius: 50%; animation: pc-rot 0.7s linear infinite;
}
.pc-railtools { display: flex; flex-direction: column; gap: 8px; }
.pc-railtools .pc-tl-sort { display: flex; gap: 6px; }
.pc-railtools .pc-tl-sort .pc-btn { flex: 1 1 0; }
.pc-railtoggles { display: flex; gap: 6px; }
.pc-railtoggles .pc-btn { flex: 1 1 0; }
.pc-railtools .pc-mstrip { margin: 0; }
.pc-railacts { display: flex; flex-direction: column; gap: 6px; }
.pc-railacts .pc-btn { width: 100%; justify-content: center; }
.pc-railacts .pc-btn .pc-count { font-size: 11.5px; font-weight: 700; opacity: .75; margin-left: 2px; }
.pc-railacts .pc-make-active { border-style: dashed; }
.pc-railfoot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.pc-railactive {
  display: flex; align-items: center; gap: 8px; text-align: left; width: 100%;
  background: var(--pc-paper); border: 1px solid var(--pc-line); border-radius: 10px;
  padding: 8px 11px; font-size: 12.5px; color: var(--pc-dim); cursor: pointer;
  transition: border-color .15s var(--pc-ease);
}
.pc-railactive b { color: var(--pc-ink); }
.pc-railactive span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-railactive:hover { border-color: var(--pc-accent); }
/* filter-chip counts (browse context) + gallery filter echo */
.pc-filterchip .pc-chipcount { margin-left: 5px; font-size: 10.5px; font-weight: 700; opacity: .65; }
.pc-filterchip .pc-chipx { margin-left: 6px; font-weight: 700; }

/* rail list controls: compact sort/filter/search bar above the pixa cards */
.pc-railctl { display: flex; flex-direction: column; gap: 7px; }
.pc-railsearch { position: relative; display: flex; align-items: center; }
.pc-railsearch .pc-ico { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--pc-faint); pointer-events: none; }
.pc-railsearch .pc-input { padding-left: 31px; font-size: 13px; }
.pc-railfilters { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-railfilters .pc-filterchip { padding: 4px 10px; font-size: 12px; }
.pc-railsort { display: flex; align-items: center; gap: 6px; }
.pc-railsort .pc-select { font-size: 12.5px; padding: 6px 9px; }

/* premium pixa header: active row sits under the chips */
.pc-phead-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.pc-phead-active .pc-active-badge { padding: 4px 9px; font-size: 11.5px; }

/* Friends MAIN panel: scope lists / search results (rail holds scopes + search) */
.pc-friendsmain { padding: 26px 32px 80px; max-width: 780px; }
.pc-fm-head { margin-bottom: 18px; }
.pc-fm-head h1 { font-family: var(--pc-display); font-weight: 800; font-size: 30px; margin: 0; letter-spacing: -0.02em; }
.pc-fm-head .pc-fm-clear { margin-top: 10px; }
.pc-friendsmain .pc-friend-row { padding: 11px 12px; }
.pc-suggest-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px;
}
.pc-suggest-grid .pc-suggest-card { width: auto; }
@media (max-width: 840px) {
  .pc-friendsmain { padding: 18px 16px 90px; }
  .pc-fm-head h1 { font-size: 24px; }
}

/* friend detail panel rendered in the main area */
.pc-friendpanel { padding: 26px 32px; }
.pc-friendpanel .pc-friend-detail-head { margin-bottom: 18px; }
.pc-friendpanel .pc-friend-back { margin-bottom: 16px; }
.pc-friendpanel .pc-friend-unfollow { margin-left: auto; }
.pc-friend-detail-pixas { display: flex; flex-direction: column; gap: 10px; }

/* rail body wrapper: holds either the pixa list or the friends list */
.pc-railbody { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.pc-fp-body { display: flex; flex-direction: column; gap: 8px; }

/* "Make this my active pixa" button in the pixa header active row */
.pc-make-active {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: var(--pc-surface); border: 1px dashed var(--pc-line); color: var(--pc-dim);
  border-radius: 9px; padding: 6px 12px; font-size: 13px; transition: 0.15s;
}
.pc-make-active:hover { border-color: var(--pc-accent); border-style: solid; color: var(--pc-accent); }
.pc-make-active .pc-ico { width: 15px; height: 15px; }

/* "From friends" cards in the rail / friend panel */
.pc-friendcard {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--pc-surface); border: 1px solid var(--pc-line); border-radius: 12px;
  padding: 8px; transition: 0.15s;
}
.pc-friendcard:hover { border-color: var(--pc-accent); box-shadow: var(--pc-shadow); }
.pc-friendcard .pc-pc-title { margin-top: 6px; font-weight: 600; font-size: 14px; }
.pc-friendcard .pc-pc-meta { margin-top: 2px; font-size: 12px; color: var(--pc-dim); }

/* contributor-visibility toggle strip above the timeline (dashboard) */
.pc-mstrip {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px;
}

/* theme picker — System · Light · Dark segmented control (rail foot, account
   panel, mini Settings). Same soft-pill selected convention as .pc-railnav. */
.pc-themeseg { display: flex; gap: 3px; background: var(--pc-soft); border: 1px solid var(--pc-line); border-radius: 12px; padding: 3px; }
.pc-themeseg-btn {
  flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--pc-sans); font-size: 12.5px; font-weight: 600; color: var(--pc-dim);
  background: transparent; border: none; border-radius: 9px; padding: 7px 6px; cursor: pointer;
  transition: color .15s var(--pc-ease), background .15s var(--pc-ease), box-shadow .15s var(--pc-ease);
}
.pc-themeseg-btn .pc-ico { width: 15px; height: 15px; margin: 0; }
.pc-themeseg-btn:hover { color: var(--pc-ink); }
.pc-themeseg-btn.on { background: var(--pc-surface); color: var(--pc-accent); box-shadow: 0 1px 3px rgba(18,22,34,.12); }
.pc-themeseg-btn:focus-visible { outline: none; box-shadow: var(--pc-ring); }
.pc-themestatus { display: block; min-height: 16px; margin-top: 5px; font-size: 12px; line-height: 16px; }

/* withBusy feedback: inline success tick + spinner inside a button */
.pc-okmark { margin-left: 6px; color: var(--pc-success); font-weight: 700; animation: pc-pop 0.25s ease; }
.pc-busy-spin { margin-left: 6px; }
.pc-busy { opacity: 0.75; pointer-events: none; }
@keyframes pc-pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* =====================================================================
   Print surface (PixaCore.renderForPrint → headless Chrome → vector A4 PDF)
   The standard timeline is JS masonry (absolute-positioned cards + a fixed
   container height) which slices images across page breaks. The print
   document instead lays cards in NORMAL FLOW so Chrome paginates them, with
   per-card break-inside:avoid and images capped to one page height. These
   rules apply only inside .pc-print / under @media print — the live app is
   untouched.
   ===================================================================== */
.pc-print { max-width: 186mm; margin: 0 auto; color: #1a1a1a; }
.pc-print-head { margin: 0 0 10mm; }
.pc-print-head h1 { font-size: 30pt; line-height: 1.1; margin: 0 0 4px; }
.pc-print-sub { font-style: italic; color: #555; font-size: 13pt; margin: 0; }
/* A layer's inlined render, printed in normal flow (renderLayerForPrint). */
#pixa-root { color: #1a1a1a; }
#pixa-root img { max-width: 100%; break-inside: avoid; page-break-inside: avoid; }
/* Normal-flow collage: cards stack, each kept whole across page breaks. */
.pc-print-collage { display: block; }
.pc-print-collage .pc-item {
  display: inline-block; vertical-align: top; width: 100%;
  margin: 0 0 6mm; break-inside: avoid; page-break-inside: avoid;
  box-shadow: none; border: 1px solid #ddd;
}
.pc-print-collage .pc-daysep { margin: 8mm 0 5mm; break-after: avoid; page-break-after: avoid; }
/* Images contain (never crop) and never exceed a single page. */
.pc-print .pc-media img { max-height: 200mm; object-fit: contain; transform: none !important; }
.pc-print .pc-item-tools { display: none !important; }
.pc-print figure, .pc-print .pc-item-body { break-inside: avoid; page-break-inside: avoid; }
/* Drop interactive chrome (buttons, toolbars, member strip) from the print page. */
.pc-print button, .pc-print .pc-tl-toolbar, .pc-print .pc-mstrip { display: none !important; }

@page { size: A4; margin: 12mm; }
@media print {
  html.pc-print-mode body { background: #fff; }
  /* Defensive: if any live grid leaks in, undo masonry's absolute positioning. */
  .pc-timeline { position: static !important; height: auto !important; display: block !important; }
  .pc-timeline .pc-item { position: static !important; transform: none !important; }
}

/* ---------- built-in Map view (GPS tracks + geo items) ---------- */
.pc-mapview { position: relative; height: calc(100vh - 220px); min-height: 320px; }
.pc-mapcanvas { position: absolute; inset: 0; z-index: 0; }
.pc-maplegend { position: absolute; left: 10px; bottom: 10px; z-index: 500; display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.92); box-shadow: 0 1px 6px rgba(0,0,0,.15); font-size: 12px; max-width: calc(100% - 20px); }
.pc-maplegend:empty { display: none; }
.pc-maplegend-user { display: inline-flex; align-items: center; gap: 5px; }
.pc-maplegend-user i { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.pc-maphint { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 500; max-width: min(420px, calc(100% - 32px)); padding: 10px 14px; border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: 0 2px 10px rgba(0,0,0,.18); font-size: 13px; line-height: 1.45; text-align: center; color: #333; }
.pc-mappop-img { display: block; width: 160px; max-width: 100%; border-radius: 8px; }
.pc-mappop-txt { margin-top: 6px; font-size: 12px; max-width: 180px; }
.pc-mappop-place { margin-top: 4px; font-size: 11px; color: #6b7280; }

/* ---------- mini-app quick-add bar + "Added" ack strip ---------- */
.pc-quickbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--pc-surface-glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-top: 1px solid var(--pc-line); box-shadow: 0 -4px 16px rgba(18, 22, 34, 0.1); }
.pc-qb-photo { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid var(--pc-line); border-radius: 50%; background: var(--pc-soft); font-size: 17px; cursor: pointer; }
.pc-qb-text { flex: 1; min-width: 0; border: 1px solid var(--pc-line); border-radius: 19px; padding: 9px 14px; font-family: var(--pc-sans); font-size: 14px; background: var(--pc-paper); }
.pc-qb-text:focus { outline: none; border-color: var(--pc-line-strong); box-shadow: var(--pc-ring); }
.pc-qb-send { flex: 0 0 auto; }
/* Keep the last collage rows reachable above the fixed bar. */
.pc-has-quickbar { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }

/* compact pixa header (core shell ≤840px — mini-app parity) */
.pc-pixanav-more { font-size: 19px; font-weight: 800; line-height: 1; padding-top: 10px; padding-bottom: 11px; }
.pc-moresheet { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pc-moresheet .pc-more-row { justify-content: flex-start; width: 100%; padding: 12px 14px; font-size: 15px; }

/* quick bar on the desktop shell: span the main panel (rail is 290px); the
   camera capture attribute is a no-op on desktop — the gallery picker covers it */
@media (min-width: 841px) {
  .pc-shell:not(.pc-compact) .pc-quickbar { left: 290px; }
  .pc-shell:not(.pc-compact) .pc-qb-cam { display: none; }
}
.pc-addedack { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 70; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-radius: 24px; background: var(--pc-surface); border: 1px solid var(--pc-line); box-shadow: var(--pc-shadow-lg); font-size: 13px; white-space: nowrap; animation: pcAckIn .25s var(--pc-ease); }
.pc-ack-msg { font-weight: 600; color: var(--pc-ink); }
.pc-ack-x { border: none; background: none; font-size: 17px; line-height: 1; color: var(--pc-faint); cursor: pointer; padding: 2px 4px; }
@keyframes pcAckIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ================================================================
   Vendored Leaflet 1.9.4 CSS (leaflet.css, image url()s stripped —
   we never use L.Icon.Default; markers are circleMarker/divIcon).
   Loaded here because tg/*.css is NOT cookieless-exempt.
   ================================================================ */
/* required styles */

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	  -webkit-user-drag: none;
	}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
	background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
	image-rendering: -webkit-optimize-contrast;
	}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
	max-width: none !important;
	max-height: none !important;
	}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
	max-width: none !important;
	max-height: none !important;
	width: auto;
	padding: 0;
	}

.leaflet-container img.leaflet-tile {
	/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
	mix-blend-mode: plus-lighter;
}

.leaflet-container.leaflet-touch-zoom {
	-ms-touch-action: pan-x pan-y;
	touch-action: pan-x pan-y;
	}
.leaflet-container.leaflet-touch-drag {
	-ms-touch-action: pinch-zoom;
	/* Fallback for FF which doesn't support pinch-zoom */
	touch-action: none;
	touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
	-ms-touch-action: none;
	touch-action: none;
}
.leaflet-container {
	-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	z-index: 800;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	}

.leaflet-pane         { z-index: 400; }

.leaflet-tile-pane    { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane  { z-index: 500; }
.leaflet-marker-pane  { z-index: 600; }
.leaflet-tooltip-pane   { z-index: 650; }
.leaflet-popup-pane   { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg    { z-index: 200; }

.leaflet-vml-shape {
	width: 1px;
	height: 1px;
	}
.lvml {
	
	display: inline-block;
	position: absolute;
	}


/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 800;
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}
.leaflet-top,
.leaflet-bottom {
	position: absolute;
	z-index: 1000;
	pointer-events: none;
	}
.leaflet-top {
	top: 0;
	}
.leaflet-right {
	right: 0;
	}
.leaflet-bottom {
	bottom: 0;
	}
.leaflet-left {
	left: 0;
	}
.leaflet-control {
	float: left;
	clear: both;
	}
.leaflet-right .leaflet-control {
	float: right;
	}
.leaflet-top .leaflet-control {
	margin-top: 10px;
	}
.leaflet-bottom .leaflet-control {
	margin-bottom: 10px;
	}
.leaflet-left .leaflet-control {
	margin-left: 10px;
	}
.leaflet-right .leaflet-control {
	margin-right: 10px;
	}


/* zoom and fade animations */

.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	   -moz-transition: opacity 0.2s linear;
	        transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}
.leaflet-zoom-animated {
	-webkit-transform-origin: 0 0;
	    -ms-transform-origin: 0 0;
	        transform-origin: 0 0;
	}
svg.leaflet-zoom-animated {
	will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
	-webkit-transition: none;
	   -moz-transition: none;
	        transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}


/* cursors */

.leaflet-interactive {
	cursor: pointer;
	}
.leaflet-grab {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	cursor:         grab;
	}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
	cursor: crosshair;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
	cursor: move;
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	cursor:         grabbing;
	}

/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
	pointer-events: none;
	}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline-offset: 1px;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}


/* general typography */
.leaflet-container {
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-size: 0.75rem;
	line-height: 1.5;
	}


/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}

.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {
	font-size: 22px;
	}


/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: none;
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: none;
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-scrollbar {
	overflow-y: scroll;
	overflow-x: hidden;
	padding-right: 5px;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	font-size: 13px;
	font-size: 1.08333em;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
	background-image: none;
	}


/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.8);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	line-height: 1.4;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
	text-decoration: underline;
	}
.leaflet-attribution-flag {
	display: inline !important;
	vertical-align: baseline !important;
	width: 1em;
	height: 0.6669em;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	white-space: nowrap;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	background: rgba(255, 255, 255, 0.8);
	text-shadow: 1px 1px #fff;
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}


/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	margin-bottom: 20px;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	line-height: 1.3;
	font-size: 13px;
	font-size: 1.08333em;
	min-height: 1px;
	}
.leaflet-popup-content p {
	margin: 17px 0;
	margin: 1.3em 0;
	}
.leaflet-popup-tip-container {
	width: 40px;
	height: 20px;
	position: absolute;
	left: 50%;
	margin-top: -1px;
	margin-left: -20px;
	overflow: hidden;
	pointer-events: none;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;
	pointer-events: auto;

	-webkit-transform: rotate(45deg);
	   -moz-transform: rotate(45deg);
	    -ms-transform: rotate(45deg);
	        transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;
	color: #333;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	border: none;
	text-align: center;
	width: 24px;
	height: 24px;
	font: 16px/24px Tahoma, Verdana, sans-serif;
	color: #757575;
	text-decoration: none;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
	color: #585858;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	-ms-zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}


/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}


/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-interactive {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}

/* Printing */

@media print {
	/* Prevent printers from removing background-images of controls. */
	.leaflet-control {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		}
	}

/* =====================================================================
   PixaShow — the cinematic film player (tg/show.js). Dark, full-bleed,
   viral-YouTube grammar: Ken Burns on every photo, kinetic type, chapter
   cards, lower-thirds, journey maps. All motion honours .pc-sh-reduced.
   SCALE SYSTEM: the root font-size below is a fluid vmin ramp (15px on
   phones → 34px on 4K); ALL chrome (pills, chips, caption, mini-map,
   credits…) is sized in em so one declaration scales the whole overlay
   for couch-distance viewing. Content type ramps use vmin clamps whose
   minima equal the old mobile sizes — phones render pixel-identical.
   ===================================================================== */
.pc-show {
  position: fixed; inset: 0; z-index: 400; background: #0b0a0c; color: #fff;
  font-family: var(--pc-sans); overflow: hidden; outline: none;
  animation: pcShIn .3s ease;
  font-size: clamp(15px, 1.9vmin + 2px, 34px);
  --shAcc: #ff5a4e; --shAcc2: #ffb547;
}
@keyframes pcShIn { from { opacity: 0; } }
.pc-sh-mood-warm      { --shAcc: #ff6b57; --shAcc2: #ffc46b; }
.pc-sh-mood-energetic { --shAcc: #ff3d71; --shAcc2: #40e0ff; }
.pc-sh-mood-calm      { --shAcc: #6fd3a6; --shAcc2: #9db8ff; }
.pc-sh-mood-epic      { --shAcc: #ffb547; --shAcc2: #ff5a4e; }
.pc-sh-mood-night     { --shAcc: #8f7bff; --shAcc2: #4dd0e1; }

.pc-sh-stage { position: absolute; inset: 0; }
.pc-sh-scene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  transition: transform .6s var(--pc-ease), opacity .6s ease, filter .6s ease; }
.pc-sh-in-next { transform: translateX(7%) scale(1.04); opacity: 0; filter: blur(6px); }
.pc-sh-in-prev { transform: translateX(-7%) scale(1.04); opacity: 0; filter: blur(6px); }
.pc-sh-out-next { transform: translateX(-6%) scale(.97); opacity: 0; filter: blur(4px); pointer-events: none; }
.pc-sh-out-prev { transform: translateX(6%) scale(.97); opacity: 0; filter: blur(4px); pointer-events: none; }

/* chapter-cut accent dip */
.pc-sh-flash { position: absolute; inset: 0; z-index: 6; background: var(--shAcc); opacity: 0; pointer-events: none; }
.pc-sh-flash-on { animation: pcShFlash .55s ease; }
@keyframes pcShFlash { 0% { opacity: 0; } 30% { opacity: .85; } 100% { opacity: 0; } }

/* ---------- top chrome: segmented chapter progress + controls ---------- */
.pc-sh-top { position: absolute; top: 0; left: 0; right: 0; z-index: 10; padding: .67em .93em 1.73em;
  background: linear-gradient(rgba(5,4,6,.72), rgba(5,4,6,0)); transition: opacity .4s, transform .4s; }
.pc-sh-segs { display: flex; gap: .33em; margin-bottom: .6em; }
.pc-sh-seg { flex: 1; height: .23em; border-radius: 4px; background: rgba(255,255,255,.22); overflow: hidden; }
.pc-sh-seg-cap { flex: 0 0 1.73em; }
.pc-sh-segfill { display: block; height: 100%; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--shAcc), var(--shAcc2)); }
.pc-sh-topbar { display: flex; align-items: center; justify-content: space-between; gap: .67em; }
.pc-sh-title { font-size: .9em; font-weight: 700; letter-spacing: .04em; opacity: .85; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.pc-sh-tools { display: inline-flex; gap: .53em; }
.pc-sh-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-width: 2.71em; height: 2.71em;
  padding: 0 .86em; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); cursor: pointer;
  background: rgba(20,18,22,.55); color: #fff; font-size: .93em; font-weight: 600; backdrop-filter: blur(8px); transition: .15s; }
.pc-sh-btn:hover { border-color: var(--shAcc); color: var(--shAcc); }
.pc-sh-btn .pc-ico { width: 1.29em; height: 1.29em; }
/* 🌐 language toggle: lit while the film shows the authors' original languages */
.pc-sh-lang.pc-sh-on { border-color: var(--shAcc); color: var(--shAcc); background: rgba(255,255,255,.14); }
.pc-sh-langnote { position: absolute; top: 7.38em; left: 50%; transform: translateX(-50%); z-index: 9;
  background: rgba(20,18,22,.78); color: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
  padding: .54em 1.23em; font-size: .87em; font-weight: 600; backdrop-filter: blur(8px);
  opacity: 1; transition: opacity .4s; pointer-events: none; }
.pc-sh-langnote-out { opacity: 0; }
.pc-sh-idle .pc-sh-top { opacity: 0; transform: translateY(-8px); pointer-events: none; }

/* tap zones: side thirds navigate; centre is the stage (tap pause / hold) */
.pc-sh-tap { position: absolute; top: 5.6em; bottom: 0; width: 26%; z-index: 8; cursor: pointer;
  -webkit-tap-highlight-color: transparent; }
.pc-sh-tap-prev { left: 0; } .pc-sh-tap-next { right: 0; }

/* ---------- media scenes: blurred fill + full-bleed photo w/ Ken Burns ----------
   The photo box spans the whole stage (width/height 100% + object-fit) so small
   sources UPSCALE to fill big screens (max-* alone never enlarges). The shadow is
   a drop-shadow filter — it follows the contained image's alpha, not the box.
   .pc-sh-fitcover (set by sceneImage when image and screen aspects nearly match)
   flips to cover: true edge-to-edge cinema, crop hidden by the Ken Burns pan. */
.pc-sh-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.pc-sh-blurbg { position: absolute; inset: -40px; background-size: cover; background-position: center;
  filter: blur(42px) brightness(.42) saturate(1.15); transform: scale(1.12); }
.pc-sh-photo { position: relative; width: 100%; height: 100%; object-fit: contain;
  filter: brightness(1) drop-shadow(0 18px 55px rgba(0,0,0,.5)); will-change: transform;
  animation-duration: var(--kbDur, 5200ms); animation-timing-function: linear; animation-fill-mode: both; }
.pc-sh-fitcover { object-fit: cover; }
.pc-sh-kb-in    { animation-name: pcShKbIn; }
.pc-sh-kb-out   { animation-name: pcShKbOut; }
.pc-sh-kb-left  { animation-name: pcShKbLeft; }
.pc-sh-kb-right { animation-name: pcShKbRight; }
@keyframes pcShKbIn    { from { transform: scale(1.0); }              to { transform: scale(1.09); } }
@keyframes pcShKbOut   { from { transform: scale(1.1); }              to { transform: scale(1.0); } }
@keyframes pcShKbLeft  { from { transform: scale(1.07) translateX(2.4%); } to { transform: scale(1.07) translateX(-2.4%); } }
@keyframes pcShKbRight { from { transform: scale(1.07) translateX(-2.4%); } to { transform: scale(1.07) translateX(2.4%); } }
.pc-sh-punch { animation-name: pcShPunch; animation-timing-function: cubic-bezier(.16,.84,.3,1); }
@keyframes pcShPunch { 0% { transform: scale(1.22); filter: brightness(1.35) drop-shadow(0 18px 55px rgba(0,0,0,.5)); } 18% { transform: scale(1.04); filter: brightness(1) drop-shadow(0 18px 55px rgba(0,0,0,.5)); } 100% { transform: scale(1.1); } }
.pc-sh-hero .pc-sh-blurbg { filter: blur(42px) brightness(.3) saturate(1.3); }
.pc-sh-wait { position: absolute; z-index: 3; }
.pc-show .pc-spin { border-color: rgba(255,255,255,.25); border-top-color: #fff; }

.pc-sh-video { position: relative; width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 18px 55px rgba(0,0,0,.5)); }
.pc-sh-unmute { position: absolute; bottom: 8.57em; left: 50%; transform: translateX(-50%); z-index: 9;
  border: 1px solid rgba(255,255,255,.3); background: rgba(15,14,17,.72); color: #fff; font-size: .93em; font-weight: 700;
  padding: .71em 1.29em; border-radius: 999px; cursor: pointer; backdrop-filter: blur(8px); animation: pcShLtIn .4s var(--pc-ease) both; }

/* location pin drop over a map slide */
.pc-sh-pindrop { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -90%); font-size: clamp(46px, 6.4vmin, 92px); z-index: 4;
  animation: pcShPin .8s cubic-bezier(.2,.9,.3,1.3) both .3s; text-shadow: 0 6px 18px rgba(0,0,0,.5); }
@keyframes pcShPin { from { transform: translate(-50%, -340%) scale(.6); opacity: 0; } to { transform: translate(-50%, -90%) scale(1); opacity: 1; } }

/* ---------- intro / chapter cards ---------- */
.pc-sh-introbg { position: absolute; inset: 0; overflow: hidden; filter: blur(26px) brightness(.38) saturate(1.2); transform: scale(1.15); }
.pc-sh-drift { position: absolute; width: 38%; height: 44%; border-radius: 18px; background-size: cover; background-position: center;
  left: calc((var(--k) * 37%) - 8%); top: calc(mod(var(--k), 3) * 33% - 5%); opacity: .9;
  animation: pcShDrift 16s ease-in-out infinite alternate; animation-delay: calc(var(--k) * -2.6s); }
@supports not (top: calc(mod(1, 3) * 1%)) {
  .pc-sh-drift { top: calc((var(--k) * 29%) - 10%); }
}
@keyframes pcShDrift { from { transform: translate(0, 0) rotate(-1.5deg); } to { transform: translate(-4%, 3%) rotate(1.5deg); } }

.pc-sh-introcard, .pc-sh-chcard { position: relative; z-index: 2; text-align: center; padding: 0 6vw; max-width: min(1500px, 92vw); }
.pc-sh-intro-title { font-size: clamp(34px, 8vmin, 120px); font-weight: 900; letter-spacing: -.02em; line-height: 1.04;
  text-shadow: 0 8px 40px rgba(0,0,0,.6); animation: pcShTitle .9s cubic-bezier(.16,.84,.3,1) both .15s; }
.pc-sh-intro-sub { margin-top: .8em; font-size: clamp(15px, 2.4vmin, 36px); font-weight: 600; opacity: .92;
  animation: pcShRise .8s var(--pc-ease) both .55s; }
.pc-sh-intro-meta { margin-top: 1.48em; display: inline-block; font-size: .9em; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: .67em 1.33em; border-radius: 999px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(15,14,17,.45); backdrop-filter: blur(6px); animation: pcShRise .8s var(--pc-ease) both .85s; }
@keyframes pcShTitle { from { transform: scale(1.3); opacity: 0; filter: blur(10px); } to { transform: scale(1); opacity: 1; filter: blur(0); } }
@keyframes pcShRise { from { transform: translateY(26px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.pc-sh-ch-title { font-size: clamp(40px, 10vmin, 150px); font-weight: 900; letter-spacing: -.02em; line-height: 1.02;
  text-transform: uppercase; text-shadow: 0 8px 40px rgba(0,0,0,.6); }
.pc-sh-ch-word { display: inline-block; animation: pcShWordPop .65s cubic-bezier(.16,.84,.3,1.2) both;
  animation-delay: calc(.12s + var(--wi) * .14s); }
.pc-sh-ch-sub { margin-top: .8em; font-size: clamp(15px, 2.4vmin, 36px); font-weight: 700; color: var(--shAcc2);
  letter-spacing: .14em; text-transform: uppercase; animation: pcShRise .7s var(--pc-ease) both .6s; }
.pc-sh-ch-count { margin-top: .77em; font-size: .87em; font-weight: 600; opacity: .75; animation: pcShRise .7s var(--pc-ease) both .8s; }
@keyframes pcShWordPop { from { transform: translateY(.55em) scale(.8) rotate(2deg); opacity: 0; filter: blur(8px); }
  to { transform: translateY(0) scale(1) rotate(0); opacity: 1; filter: blur(0); } }

/* ---------- text scenes: kinetic type + guaranteed-readable scroll ---------- */
.pc-sh-textscene { position: relative; z-index: 2; max-width: min(88vw, 25em); padding: 0 7vw; text-align: center;
  font-family: var(--pc-serif); font-size: clamp(20px, 3.4vmin, 54px); line-height: 1.45; }
.pc-sh-t-lg { font-size: clamp(24px, 4.4vmin, 68px); line-height: 1.35; }
.pc-sh-t-xl { font-size: clamp(30px, 6vmin, 92px); line-height: 1.25; }
.pc-sh-quote { display: block; font-size: 2.2em; line-height: .6; margin-bottom: .35em; color: var(--shAcc); font-weight: 700; }
.pc-sh-word { display: inline-block; animation: pcShWordPop .55s cubic-bezier(.16,.84,.3,1.15) both;
  animation-delay: calc(.1s + var(--wi) * .13s); }
.pc-sh-punchword { color: var(--shAcc); font-weight: 800; animation-name: pcShPunchWord; }
@keyframes pcShPunchWord { 0% { transform: scale(.4); opacity: 0; filter: blur(10px); }
  70% { transform: scale(1.18); opacity: 1; filter: blur(0); } 100% { transform: scale(1); } }

/* the box owns the font so its em/ch geometry tracks the type ramp; the inner
   inherits it. .pc-sh-scrollfit = sceneText measured "fits on this screen":
   no scroll, no edge fades, vertically centred (fixes the half-faded first line). */
.pc-sh-scrollscene { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 6em 7vw 7.4em; }
.pc-sh-scrollbox { max-width: min(92vw, 30em); width: 100%; height: 100%; overflow: hidden; position: relative;
  font-family: var(--pc-serif); font-size: clamp(18px, 2.2vmin, 40px);
  -webkit-mask-image: linear-gradient(transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(transparent, #000 7%, #000 93%, transparent); }
.pc-sh-scrollbox.pc-sh-scrollfit { display: flex; align-items: center; justify-content: center;
  -webkit-mask-image: none; mask-image: none; }
.pc-sh-scrollinner { line-height: 1.7; white-space: pre-wrap; }
.pc-sh-scrolling { animation: pcShScroll var(--scrollDur, 12s) linear both; animation-delay: var(--scrollDelay, 1.4s); }
@keyframes pcShScroll { from { transform: translateY(0); } to { transform: translateY(var(--scroll, -200px)); } }

/* ---------- cards (voice / file / fallback) ---------- */
.pc-sh-cardslide { position: relative; z-index: 2; padding: 0 6vw; }
.pc-sh-card, .pc-sh-voicecard { background: rgba(22,20,25,.82); border: 1px solid rgba(255,255,255,.14);
  border-radius: 1.16em; padding: 1.79em 2.1em; text-align: center; font-size: clamp(19px, 2vmin, 34px); max-width: min(88vw, 33em);
  box-shadow: 0 22px 70px rgba(0,0,0,.5); backdrop-filter: blur(10px); animation: pcShRise .6s var(--pc-ease) both; }
.pc-sh-card p { margin: .63em 0 0; } .pc-sh-card-sub { opacity: .75; font-size: .79em; }
.pc-sh-voicecard { display: flex; flex-direction: column; align-items: center; gap: .74em; }
.pc-sh-voicewho { margin: 0; font-weight: 800; font-size: 1.1em; }
.pc-sh-voicerings { position: relative; width: 5.7em; height: 5.7em; display: flex; align-items: center; justify-content: center; }
.pc-sh-voiceico { font-size: 2.2em; z-index: 2; }
.pc-sh-voicerings i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--shAcc);
  animation: pcShRing 2.1s ease-out infinite; opacity: 0; }
.pc-sh-voicerings i:nth-child(2) { animation-delay: .7s; }
.pc-sh-voicerings i:nth-child(3) { animation-delay: 1.4s; }
@keyframes pcShRing { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.25); opacity: 0; } }

/* ---------- collage (photo bursts) — near-full-bleed on every screen ---------- */
.pc-sh-collage { position: relative; z-index: 2; display: grid; gap: clamp(12px, 1vmin, 26px);
  width: min(94vw, 190vh); height: min(84vh, 100vw); padding: 0 3vw; }
.pc-sh-collage-2 { grid-template-columns: 1fr 1fr; }
.pc-sh-collage-3 { grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; }
.pc-sh-collage-3 .pc-sh-tile:first-child { grid-row: span 2; }
.pc-sh-collage-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pc-sh-tile { border-radius: clamp(12px, 1.2vmin, 28px); overflow: hidden; background: #17151a; box-shadow: 0 14px 44px rgba(0,0,0,.5);
  animation: pcShTile .7s cubic-bezier(.16,.84,.3,1.15) both; animation-delay: calc(var(--ti) * .16s); }
.pc-sh-tile img { width: 100%; height: 100%; object-fit: cover; display: block;
  animation: pcShKbIn 6s linear both; }
@keyframes pcShTile { from { transform: translateY(50px) scale(.86) rotate(-2deg); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- journey (map fly-over) ---------- */
.pc-sh-jmap { position: absolute; inset: 0; filter: saturate(.85) brightness(.9); }
.pc-sh-jmap .leaflet-container { width: 100%; height: 100%; background: #0b0a0c; }
.pc-sh-jlabel { position: absolute; top: 18%; left: 50%; transform: translateX(-50%); z-index: 5; text-align: center;
  font-size: clamp(17px, 2.6vmin, 40px);
  background: rgba(15,14,17,.82); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: .7em 1.5em;
  backdrop-filter: blur(8px); box-shadow: 0 14px 44px rgba(0,0,0,.45); animation: pcShRise .7s var(--pc-ease) both .4s; }
.pc-sh-jlabel span { font-size: 1em; font-weight: 900; letter-spacing: .01em; }
.pc-sh-jlabel em { display: block; font-style: normal; font-size: .74em; font-weight: 700; letter-spacing: .12em;
  color: var(--shAcc2); text-transform: uppercase; margin-top: .18em; }
.pc-sh-jpulse { animation: pcShJPulse 1.4s ease-out infinite; transform-origin: center; }
@keyframes pcShJPulse { 0% { opacity: 1; } 50% { opacity: .55; } 100% { opacity: 1; } }
.pc-sh-jfallback { position: relative; z-index: 2; text-align: center; }
.pc-sh-jarrow { font-size: clamp(54px, 7vmin, 100px); margin-top: .5em; animation: pcShFly 2.2s ease-in-out infinite alternate; }
@keyframes pcShFly { from { transform: translateX(-40px); } to { transform: translateX(40px); } }

/* ---------- lower-third: creator · time · place · mini-map ---------- */
.pc-sh-lower { position: absolute; left: 1.2em; right: 1.2em; bottom: 1.33em; z-index: 9; pointer-events: none; }
.pc-sh-lt-row { display: flex; align-items: flex-end; gap: .67em; flex-wrap: wrap; }
.pc-sh-lt-who, .pc-sh-lt-chip, .pc-sh-lt-map { opacity: 0; transform: translateY(22px); }
.pc-sh-lt-on .pc-sh-lt-who, .pc-sh-lt-on .pc-sh-lt-chip, .pc-sh-lt-on .pc-sh-lt-map.pc-sh-lt-in {
  animation: pcShLtIn .55s cubic-bezier(.16,.84,.3,1.2) both; animation-delay: var(--d, 0ms); }
.pc-sh-lt-out .pc-sh-lt-who, .pc-sh-lt-out .pc-sh-lt-chip, .pc-sh-lt-out .pc-sh-lt-map {
  animation: pcShLtOut .5s ease both; }
@keyframes pcShLtIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pcShLtOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(14px); } }
.pc-sh-lt-who { display: inline-flex; align-items: center; gap: .6em; background: rgba(15,14,17,.78);
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: .4em 1.07em .4em .4em; backdrop-filter: blur(8px);
  font-size: 1em; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.pc-sh-lt-avatar { width: 2.125em; height: 2.125em; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; background: var(--shAcc); color: #fff;
  font-weight: 800; font-size: 1.07em; border: 2px solid rgba(255,255,255,.85); }
.pc-sh-lt-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-sh-lt-chip { display: inline-flex; align-items: center; background: rgba(15,14,17,.72);
  border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: .62em 1.08em; font-size: .87em; font-weight: 700;
  backdrop-filter: blur(8px); letter-spacing: .02em; }
.pc-sh-lt-place { color: var(--shAcc2); }
.pc-sh-lt-map { position: relative; margin-left: auto; width: 8.53em; height: 5.73em; border-radius: .93em; overflow: hidden;
  border: 2px solid rgba(255,255,255,.85); box-shadow: 0 12px 34px rgba(0,0,0,.5); }
.pc-sh-lt-map img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-sh-lt-mapdot { position: absolute; left: 50%; top: 50%; width: .67em; height: .67em; margin: -.34em 0 0 -.34em;
  border-radius: 50%; background: var(--shAcc); border: 2px solid #fff; animation: pcShDot 1.4s ease-out infinite; }
@keyframes pcShDot { 0% { box-shadow: 0 0 0 0 rgba(255,90,78,.55); } 100% { box-shadow: 0 0 0 14px rgba(255,90,78,0); } }

/* ---------- caption strip (scrolls when it overflows — always fully readable) ---------- */
.pc-sh-caption { position: absolute; left: 50%; transform: translateX(-50%); bottom: 7.61em; z-index: 8;
  font-size: 1.03em; max-width: min(86vw, 46.5em); max-height: 6.2em; overflow: hidden; border-radius: 1.03em;
  background: rgba(15,14,17,.78); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px rgba(0,0,0,.45); animation: pcShRise .6s var(--pc-ease) both .5s; }
.pc-sh-caption-inner { padding: .77em 1.29em; line-height: 1.55; text-align: center; white-space: pre-wrap; }
.pc-sh-caption-scroll { animation: pcShScroll var(--scrollDur, 8s) linear both 1.6s; }

/* ---------- outro / end ---------- */
.pc-sh-outro { position: relative; z-index: 2; text-align: center; padding: 0 6vw; }
.pc-sh-outro-head { font-size: .87em; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; opacity: .7;
  animation: pcShRise .6s var(--pc-ease) both; }
.pc-sh-credits { margin-top: 1.47em; display: flex; flex-wrap: wrap; gap: .8em; justify-content: center; max-width: min(88vw, 50em); }
.pc-sh-credit { display: inline-flex; align-items: center; gap: .6em; background: rgba(22,20,25,.8);
  border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: .47em 1.07em .47em .47em;
  animation: pcShWordPop .6s cubic-bezier(.16,.84,.3,1.2) both; animation-delay: calc(.25s + var(--wi) * .12s); }
.pc-sh-credit b { font-size: 1em; } .pc-sh-credit em { font-style: normal; font-size: .83em; opacity: .7; }
.pc-sh-outro-brand { margin-top: 2.27em; font-size: 1em; opacity: .85; animation: pcShRise .7s var(--pc-ease) both 1.2s; }
.pc-sh-outro-brand b { color: var(--shAcc); }
.pc-sh-endcard { position: absolute; left: 50%; bottom: 12%; transform: translateX(-50%); z-index: 12;
  display: flex; gap: .8em; animation: pcShRise .5s var(--pc-ease) both; }
.pc-sh-endcard .pc-sh-btn { height: 3.07em; padding: 0 1.47em; font-size: 1em; }
.pc-sh-endcard .pc-sh-replay { background: var(--shAcc); border-color: var(--shAcc); }
.pc-sh-endcard .pc-sh-replay:hover { color: #fff; filter: brightness(1.1); }

/* ---------- pause / hold / reduced ---------- */
.pc-sh-paused .pc-sh-scene *, .pc-sh-paused .pc-sh-lower *, .pc-sh-paused .pc-sh-drift { animation-play-state: paused !important; }
.pc-sh-paused .pc-sh-top { opacity: 1; transform: none; }
.pc-sh-holding .pc-sh-top { opacity: 0; }
.pc-sh-reduced .pc-sh-scene, .pc-sh-reduced .pc-sh-scene * { animation-duration: .01ms !important; animation-delay: 0ms !important; }
.pc-sh-reduced .pc-sh-scrolling, .pc-sh-reduced .pc-sh-caption-scroll {
  animation-duration: var(--scrollDur, 8s) !important; animation-delay: var(--scrollDelay, 1.4s) !important; }
.pc-sh-reduced .pc-sh-in-next, .pc-sh-reduced .pc-sh-in-prev { transform: none; filter: none; }

/* ---------- film: day-intro contribution stats (donut + legend) ---------- */
.pc-sh-ch-stats { margin-top: 1.47em; display: inline-flex; align-items: center; gap: 1.07em; text-align: left;
  background: rgba(15,14,17,.66); border: 1px solid rgba(255,255,255,.14); border-radius: 1.2em;
  padding: .8em 1.2em; backdrop-filter: blur(8px); animation: pcShRise .7s var(--pc-ease) both 1.05s; }
.pc-sh-donut { width: 4.4em; height: 4.4em; flex: 0 0 auto; opacity: 0; transform: rotate(-10deg) scale(.65);
  animation: pcShDonutIn .6s cubic-bezier(.16,.84,.3,1.2) both 1.2s; }
@keyframes pcShDonutIn { to { opacity: 1; transform: none; } }
.pc-sh-legend { display: flex; flex-direction: column; align-items: flex-start; gap: .33em; }
.pc-sh-leg { display: inline-flex; align-items: center; gap: .62em; font-size: .87em; font-weight: 700;
  animation: pcShRise .5s var(--pc-ease) both calc(1.25s + var(--wi) * .1s); }
.pc-sh-leg i { width: .77em; height: .77em; border-radius: 3px; flex: 0 0 auto; }
.pc-sh-leg span { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-sh-leg b { font-weight: 800; opacity: .72; font-variant-numeric: tabular-nums; }

/* contributor colour ring — film-wide consistent colours (--mcol set inline) */
.pc-sh-lt-who .pc-sh-lt-avatar, .pc-sh-credit .pc-sh-lt-avatar { border-color: var(--mcol, rgba(255,255,255,.85)); }

.pc-sh-flashtext { position: absolute; top: 14%; left: 50%; z-index: 8; pointer-events: none;
  background: linear-gradient(120deg, var(--shAcc), var(--shAcc2)); color: #fff;
  padding: .45em 1.1em; border-radius: .4em; max-width: 86vw; text-align: center;
  font-size: clamp(22px, 5vmin, 80px); font-weight: 900; letter-spacing: .02em; line-height: 1.15;
  text-transform: uppercase; box-shadow: 0 18px 54px rgba(0,0,0,.5);
  transform: translateX(-50%) rotate(-5deg);
  animation: pcShFlashPop .6s cubic-bezier(.16,.9,.26,1.35) both .5s; }
@keyframes pcShFlashPop {
  0% { transform: translateX(-50%) rotate(-14deg) scale(0); opacity: 0; }
  100% { transform: translateX(-50%) rotate(-5deg) scale(1); opacity: 1; } }

/* chapter cover — AI-picked best image full-bleed behind the day card */
.pc-sh-chcover { position: absolute; inset: 0; background-size: cover; background-position: center;
  animation: pcShCoverZoom 7s ease-out both; }
.pc-sh-chcover::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,9,12,.5), rgba(10,9,12,.74)); }
@keyframes pcShCoverZoom { from { transform: scale(1.1); } to { transform: scale(1); } }

/* persistent day chip — stays through every scene of a chapter, pops on change */
.pc-sh-daychip { position: absolute; left: 1.44em; top: 5.76em; z-index: 9; pointer-events: none;
  max-width: 62vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: linear-gradient(120deg, var(--shAcc), var(--shAcc2)); color: #fff;
  font-size: .83em; font-weight: 900; letter-spacing: .14em; text-transform: uppercase;
  padding: .56em 1.2em; border-radius: 999px; box-shadow: 0 8px 26px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(-10px); transition: opacity .4s ease, transform .4s var(--pc-ease); }
.pc-sh-daychip-on { opacity: 1; transform: none; }
.pc-sh-daychip-pop { animation: pcShChipPop .55s cubic-bezier(.16,.84,.3,1.2); }
@keyframes pcShChipPop { 0% { transform: translateY(-16px) scale(.82); } 100% { transform: none; } }
.pc-sh-reduced .pc-sh-daychip-pop { animation: none; }

@media (max-width: 640px) {
  .pc-sh-lt-map { width: 104px; height: 70px; }
  .pc-sh-caption { bottom: 128px; max-height: 84px; }
  .pc-sh-collage { gap: 8px; height: min(78vh, 760px); }
  .pc-sh-unmute { bottom: 150px; }
  .pc-sh-ch-stats { gap: 12px; padding: 10px 14px; }
  .pc-sh-donut { width: 56px; height: 56px; }
}
