/* ============================================================================
 * components.css — styles for history-dropdown.js + privacy-filter.js
 * Brand: purple #7C5CFF / #6B4AF0, calm slate text, Space Grotesk headings.
 * Scope these under your own wrapper if class names collide.
 * ============================================================================ */

/* ---- History dropdown ---- */
.hd-panel {
  position: fixed; z-index: 82; width: 344px; max-width: calc(100vw - 24px);
  background: #fff; border: 1px solid rgba(33,26,55,.1); border-radius: 16px;
  box-shadow: 0 24px 60px -20px rgba(33,26,55,.35);
  overflow: hidden; display: flex; flex-direction: column;
  animation: hdPop .18s ease;
}
@keyframes hdPop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.hd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid rgba(33,26,55,.08); }
.hd-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: #211A37; }
.hd-new { display: inline-flex; align-items: center; gap: 6px; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 12.5px; color: #6B4AF0; background: #F2EFFA; padding: 7px 11px; border: 0; border-radius: 8px; cursor: pointer; }
.hd-new:hover { background: #E7DEFB; }
.hd-list { max-height: 330px; overflow-y: auto; padding: 8px; }
.hd-empty { text-align: center; padding: 34px 24px; color: #A8A2BC; font-size: 14px; }
/* .hd-item layout (container + __main + __actions) is defined in the History rows block below. */
.hd-avatar { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #9B86E8, #F4B8A0); color: #fff; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center; }
.hd-meta { flex: 1; min-width: 0; }
.hd-name { display: block; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 14.5px; color: #211A37; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-sub { display: block; font-size: 12px; color: #8C86A0; }
.hd-foot { padding: 11px 16px; border-top: 1px solid rgba(33,26,55,.08); display: flex; align-items: flex-start; gap: 8px; }
.hd-foot p { font-size: 11.5px; color: #8C86A0; line-height: 1.5; margin: 0; }
.hd-foot svg { margin-top: 1px; flex-shrink: 0; }

/* The trigger button (style to taste; this matches the prototype's icon button) */
.hd-btn { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #211A37; border: 1px solid rgba(33,26,55,.1); background: #fff; cursor: pointer; }
.hd-btn:hover { background: #F2EFFA; border-color: #7C5CFF; color: #6B4AF0; }

/* ---- Privacy filter ---- */
.pf-wrap { font-family: system-ui, sans-serif; }
.pf-idle { font-size: 12.5px; color: #A8A2BC; display: flex; align-items: center; gap: 7px; margin: 0; }
.pf-scan { background: #FBFAFF; border: 1px solid rgba(124,92,255,.2); border-radius: 13px; padding: 15px 16px; }
.pf-scan-head { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.pf-spin { width: 15px; height: 15px; border: 2px solid rgba(124,92,255,.3); border-top-color: #7C5CFF; border-radius: 50%; animation: pfSpin .7s linear infinite; display: inline-block; }
@keyframes pfSpin { to { transform: rotate(360deg); } }
.pf-scan-label { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 13.5px; color: #211A37; }
.pf-track { height: 7px; border-radius: 999px; background: rgba(33,26,55,.08); overflow: hidden; }
.pf-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7C5CFF, #F4B8A0); transition: width .12s linear; width: 0; }
.pf-note { font-size: 11.5px; color: #8C86A0; margin: 9px 0 0; }
.pf-ready { display: flex; align-items: center; gap: 11px; background: rgba(127,184,158,.12); border: 1px solid rgba(127,184,158,.4); border-radius: 12px; padding: 12px 14px; }
.pf-check { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: #7FB89E; display: flex; align-items: center; justify-content: center; }
.pf-ready-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 13.5px; color: #2E4F3E; }
.pf-ready-sub { font-size: 11.5px; color: #5E7A6C; }
.pf-link { font-size: 12.5px; font-weight: 600; color: #5E7A6C; white-space: nowrap; background: none; border: 0; cursor: pointer; }
.pf-link:hover { color: #2E4F3E; }
.pf-preview { margin-top: 10px; border: 1px solid rgba(124,92,255,.22); border-radius: 13px; overflow: hidden; }
.pf-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; background: #F7F3FF; border-bottom: 1px solid rgba(124,92,255,.16); }
.pf-preview-title { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 13px; color: #211A37; }
.pf-count { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #6B4AF0; background: rgba(124,92,255,.12); padding: 4px 9px; border-radius: 999px; }
.pf-body { max-height: 172px; overflow-y: auto; padding: 13px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; line-height: 1.7; color: #544C6B; white-space: pre-wrap; word-break: break-word; background: #fff; }
.pf-mask { background: rgba(124,92,255,.16); color: #5B3FD6; font-family: 'Space Grotesk', sans-serif; font-weight: 600; padding: 1px 5px; border-radius: 5px; }
.pf-preview-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 10px 14px; border-top: 1px solid rgba(124,92,255,.16); background: #FBFAFF; }

/* ---- Post-purchase processing (optional, used in demo) ---- */
.ppf-card { text-align: center; padding: 22px 6px 10px; }
.ppf-ring { width: 48px; height: 48px; border-radius: 50%; background: rgba(124,92,255,.12); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.ppf-ring .pf-spin { width: 22px; height: 22px; border-width: 3px; }
.ppf-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 19px; letter-spacing: -.01em; margin: 0; }
.ppf-phase { font-size: 13px; color: #6B6480; margin: 5px 0 0; }
.ppf-track { height: 8px; border-radius: 999px; background: rgba(33,26,55,.08); overflow: hidden; margin: 18px 0 4px; }
.ppf-email { margin-top: 20px; background: #FBFAFF; border: 1px solid rgba(33,26,55,.08); border-radius: 12px; padding: 13px 15px; display: flex; gap: 10px; align-items: flex-start; text-align: left; }
.ppf-email p { font-size: 12px; color: #6B6480; line-height: 1.55; margin: 0; }

/* ── Step 4: Privacy filter (left column) ──────────────────────────────────
   Pending by default; .pf-step--done reveals the green "filtered" status. */
.pf-step { margin: 18px 0 4px; }
.pf-step__label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 16px; color: #211A37;
}
.pf-step__desc {
  margin: 6px 0 0 36px;
  font-size: 13px; color: #8C86A0; line-height: 1.5;
}
.pf-step__status {
  display: none;
  align-items: center; gap: 6px;
  margin: 8px 0 0 36px;
  font-size: 12.5px; font-weight: 600; color: #2E9E6B;
}
.pf-step__status::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  background: #2E9E6B center / 11px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 13l4 4L19 7' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  flex: 0 0 auto;
}
.pf-step--done .pf-step__status { display: inline-flex; }
.pf-step--done .pf-step__label { color: #2E9E6B; }

/* ── Privacy filter: curated green "done" box (step 4) ─────────────────────── */
.pf-greenbox {
  display: flex; align-items: center; gap: 13px;
  margin: 12px 0 2px;
  padding: 13px 14px;
  background: #EAF6EF;
  border: 1px solid rgba(46,158,107,.22);
  border-radius: 14px;
}
.pf-greenbox__check {
  flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 50%;
  background: #2E9E6B;
  display: inline-flex; align-items: center; justify-content: center;
}
.pf-greenbox__text { flex: 1 1 auto; min-width: 0; }
.pf-greenbox__title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 13.5px; color: #20543C; line-height: 1.3;
}
.pf-greenbox__sub { font-size: 12px; color: #5E7A6C; margin-top: 2px; }
.pf-greenbox__btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 12.5px; color: #fff;
  background: #2E7D54; border: 0; border-radius: 999px;
  padding: 9px 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s ease;
}
.pf-greenbox__btn:hover { background: #256544; }
.pf-greenbox__btn svg { flex: 0 0 auto; }

/* ── The same band on the finished Portrait ─────────────────────────────────
   Same anatomy, the design's larger scale: it is the first thing under the
   Portrait's header rather than a chip inside a step. Values from the
   `finished` block of docs/design/hero-flow-component.html. */
.pf-greenbox--result {
  margin: 0 0 18px;
  padding: 14px 16px;
  background: #EEF7F1;
  border-color: rgba(94, 122, 108, .25);
  border-radius: 16px;
}
.pf-greenbox--result .pf-greenbox__check {
  width: 34px; height: 34px;
  background: #4A9E70;
}
.pf-greenbox--result .pf-greenbox__check svg { width: 17px; height: 17px; }
.pf-greenbox--result .pf-greenbox__title { font-size: 14.5px; color: #245239; }
.pf-greenbox--result .pf-greenbox__sub { font-size: 12.5px; color: #4E6B5B; margin-top: 1px; }
.pf-greenbox--result .pf-greenbox__btn {
  font-size: 13.5px;
  background: #2F6B4A;
  padding: 10px 16px;
}
.pf-greenbox--result .pf-greenbox__btn:hover { background: #245239; }

/* The band wraps rather than crushing the button off the card on a phone. */
@media (max-width: 600px) {
  .pf-greenbox--result { flex-wrap: wrap; }
  .pf-greenbox--result .pf-greenbox__btn { width: 100%; justify-content: center; }
}

/* ── Token chip — one hue per entity type so the preview reads at a glance ──── */
.pf-chip {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600; font-size: 11px; letter-spacing: .02em;
  color: #6B4AF0; background: #ECE9FB;      /* fallback = person lavender */
  padding: 1px 6px; border-radius: 6px;
  white-space: nowrap; vertical-align: baseline;
}
.pf-chip--person  { color: #6B4AF0; background: #ECE9FB; }  /* lavender */
.pf-chip--email   { color: #1E6FCC; background: #E4F0FD; }  /* blue */
.pf-chip--phone   { color: #0E8A67; background: #DDF2EA; }  /* green */
.pf-chip--address { color: #B26A00; background: #FAEBD3; }  /* amber */
.pf-chip--url     { color: #B83280; background: #FBE4F1; }  /* pink */
.pf-chip--secret  { color: #C33B2E; background: #FBE5E2; }  /* red */
.pf-chip--account { color: #8A6A16; background: #F3EAD2; }  /* gold */

/* Colour dot next to each legend group header — ties the hue to its category. */
.pf-legend__dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 7px; vertical-align: middle; background: #6B4AF0;
}
.pf-legend__dot--person  { background: #6B4AF0; }
.pf-legend__dot--email   { background: #1E6FCC; }
.pf-legend__dot--phone   { background: #0E8A67; }
.pf-legend__dot--address { background: #B26A00; }
.pf-legend__dot--url     { background: #B83280; }
.pf-legend__dot--secret  { background: #C33B2E; }
.pf-legend__dot--account { background: #8A6A16; }

/* ── Privacy preview modal ─────────────────────────────────────────────────── */
.pf-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(24,18,46,.55);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.pf-modal__card {
  width: 100%; max-width: 880px; max-height: 85vh;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(24,18,46,.32);
}
.pf-modal__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(33,26,55,.08);
}
.pf-modal__title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 18px; color: #211A37; margin: 0; letter-spacing: -.01em;
}
.pf-modal__subtitle { font-size: 12.5px; color: #8C86A0; margin: 4px 0 0; }
.pf-modal__close {
  flex: 0 0 auto;
  width: 30px; height: 30px; border-radius: 8px;
  border: 0; background: transparent; cursor: pointer;
  font-size: 22px; line-height: 1; color: #8C86A0;
}
.pf-modal__close:hover { background: #F2EFFA; color: #211A37; }
.pf-modal__cols {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  flex: 1 1 auto; min-height: 0;
}
.pf-modal__col {
  display: flex; flex-direction: column; min-height: 0;
  padding: 16px 20px;
}
.pf-modal__col + .pf-modal__col { border-left: 1px solid rgba(33,26,55,.08); }
.pf-modal__collabel {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 10.5px; letter-spacing: .08em;
  color: #A8A2BC; margin-bottom: 10px;
}
.pf-modal__transcript {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; line-height: 1.85; color: #544C6B;
  white-space: pre-wrap; word-break: break-word;
}
.pf-modal__legend { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.pf-legend__group { margin-bottom: 14px; }
.pf-legend__grouphead {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 12px; color: #211A37; margin-bottom: 7px;
}
.pf-legend__row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 4px 0; font-size: 12.5px;
}
.pf-legend__row > .pf-chip { flex: 0 0 auto; }
.pf-legend__arrow { color: #C4BEDA; flex: 0 0 auto; }
.pf-legend__value {
  /* A long entity (multi-word name, URL, address…) wraps onto new lines and stays
     fully readable instead of truncating or breaking the row. */
  color: #544C6B; flex: 0 1 auto; min-width: 0;
  white-space: normal; overflow-wrap: anywhere; word-break: break-word;
}
.pf-legend__count { color: #A8A2BC; font-size: 11px; font-weight: 600; flex: 0 0 auto; }
.pf-legend__you {
  flex: 0 0 auto;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 9.5px; letter-spacing: .05em;
  color: #2E7D54; background: #E1F1E8;
  padding: 2px 6px; border-radius: 5px;
}
.pf-modal__foot {
  padding: 13px 22px;
  border-top: 1px solid rgba(33,26,55,.08);
  font-size: 12px; color: #8C86A0;
  background: #FBFAFF;
}
/* Stack the two columns before they get cramped (long entities need the width). */
@media (max-width: 760px) {
  .pf-modal { padding: 12px; }
  .pf-modal__card { max-height: 92vh; }
  .pf-modal__cols { grid-template-columns: 1fr; overflow-y: auto; }
  .pf-modal__col { padding: 14px 16px; }
  .pf-modal__col + .pf-modal__col { border-left: 0; border-top: 1px solid rgba(33,26,55,.08); }
  .pf-greenbox { flex-wrap: wrap; }
}

/* ── History rows: container + clickable main + action buttons (v2 parity) ── */
.hd-item { display: flex; align-items: center; gap: 4px; width: 100%; padding: 2px 4px; border-radius: 12px; background: transparent; cursor: default; }
.hd-item:hover { background: transparent; }
.hd-item__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 10px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.hd-item__main:hover { background: #F7F3FF; }
.hd-item__actions { flex-shrink: 0; display: flex; align-items: center; gap: 4px; }
.hd-act { border: 0; background: transparent; cursor: pointer; font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 600; border-radius: 8px; padding: 6px 9px; line-height: 1; }
.hd-act--delete { color: #B6AFC9; padding: 7px; display: inline-flex; align-items: center; }
.hd-act--delete:hover { color: #D14343; background: #FBEAEA; }
.hd-act:disabled { color: #D2CDE0; cursor: not-allowed; background: transparent; }
.hd-act:disabled:hover { color: #D2CDE0; background: transparent; }
/* Locked rows: while a portrait is generating, every other conversation is
   dimmed and non-interactive (v2 parity). */
.hd-item--locked { opacity: .5; }
.hd-item--locked .hd-item__main { cursor: not-allowed; }
.hd-item--locked .hd-item__main:hover { background: transparent; }
.hd-item--processing .hd-sub { color: #7C5CFF; display: flex; align-items: center; gap: 6px; }
.hd-dot { width: 7px; height: 7px; border-radius: 50%; background: #7C5CFF; display: inline-block; flex: 0 0 auto; animation: hdPulse 1.1s ease-in-out infinite; }
@keyframes hdPulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ---- The Reels Reveal (see maybeRunPortraitReveal in app.js) ------------
   In-card gate between a freshly generated Portrait and the user: the
   overlay lives INSIDE .pp-portrait, which becomes a fixed window while
   gated - the header and the rest of the page stay live. Stage 1
   (.pf-reveal--seal): the card content blurs behind frosted glass; a
   pulsing lock-seal opens the story. Stage 2 (.pf-reveal--reels): three
   timed Midnight story cards, then a white flash hands over. */
.pf-reveal-host { position: relative; }
/* fallback host when the hero card is absent (history-less odd renders) */
.pp-portrait--gated { min-height: 480px; max-height: min(720px, 78vh); overflow: hidden; }
.pf-reveal { position: absolute; inset: 0; z-index: 30; border-radius: inherit; overflow: hidden; font-family: 'Inter', system-ui, sans-serif; }
.pf-reveal__reels, .pf-reveal__flash { display: none; }

/* stage 1: the Seal */
.pf-reveal--seal { background: rgba(247,243,255,.62); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
.pf-reveal__sealwrap { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; padding: 24px; text-align: center; }
.pf-reveal__seal { width: 92px; height: 92px; border-radius: 50%; border: 0; cursor: pointer; position: relative; background: linear-gradient(135deg, #6B4AF0, #3A2F63); display: flex; align-items: center; justify-content: center; box-shadow: 0 16px 38px rgba(79,54,201,.42); }
.pf-reveal__seal svg { width: 38px; height: 38px; }
.pf-reveal__seal::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(124,92,255,.55); animation: pfSealRing 1.8s ease-out infinite; }
@keyframes pfSealRing { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.28); opacity: 0; } }
.pf-reveal__title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 22px; letter-spacing: -.01em; color: #211A37; margin-top: 6px; }
.pf-reveal__sub { font-size: 14px; color: #544C6B; max-width: 300px; }
.pf-reveal__chip { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 12.5px; color: #245239; background: #EEF6F0; border: 1px solid #CBE3D3; border-radius: 999px; padding: 6px 14px; margin-top: 4px; }

/* stage 2: the reels (Midnight) */
.pf-reveal--reels { background: linear-gradient(165deg, #211A37, #37305a); }
.pf-reveal--reels .pf-reveal__sealwrap { display: none; }
.pf-reveal--reels .pf-reveal__reels { display: flex; flex-direction: column; height: 100%; width: 100%; max-width: 430px; margin: 0 auto; padding: 18px 20px; }
.pf-reveal__bars { display: flex; gap: 5px; margin-bottom: 18px; }
.pf-reveal__bar { flex: 1; height: 3px; border-radius: 3px; overflow: hidden; background: rgba(237,234,247,.25); }
.pf-reveal__bar i { display: block; height: 100%; width: 0; border-radius: 3px; background: #fff; }
.pf-reveal__slide { flex: 1 1 auto; display: none; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 0; }
.pf-reveal__slide.is-on { display: flex; animation: pfReelIn .45s ease; }
@keyframes pfReelIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.pf-reveal__eyebrow { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: #A79FD0; margin-bottom: 14px; }
.pf-reveal__big { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: clamp(72px, 18vw, 96px); line-height: 1; letter-spacing: -.03em; background: linear-gradient(120deg, #C9B8FF, #7FB89E); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pf-reveal__cap { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 17px; color: #EDEAF7; margin-top: 12px; }
.pf-reveal__note { font-size: 12.5px; color: #C9C2E2; margin-top: 8px; max-width: 250px; }
.pf-reveal__cats { width: 100%; max-width: 250px; text-align: left; }
.pf-reveal__cat { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: #EDEAF7; margin-bottom: 13px; opacity: 0; transform: translateX(-8px); transition: opacity .35s, transform .35s; }
.pf-reveal__cat.is-in { opacity: 1; transform: none; }
.pf-reveal__cat-ic { width: 30px; height: 30px; border-radius: 9px; background: rgba(237,234,247,.1); display: flex; align-items: center; justify-content: center; font-size: 14px; flex: 0 0 auto; }
.pf-reveal__cat b { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 16px; color: #fff; min-width: 24px; text-align: right; }
.pf-reveal__cat-lbl { flex: 1; min-width: 0; }
.pf-reveal__slide--chat { justify-content: flex-start; }
.pf-reveal__chatwin { flex: 1 1 auto; width: 100%; min-height: 0; overflow: hidden; position: relative; border-radius: 12px; }
.pf-reveal__chatscroll { display: flex; flex-direction: column; gap: 8px; padding: 6px 2px; }
.pf-reveal__fade-t, .pf-reveal__fade-b { position: absolute; left: 0; right: 0; height: 46px; z-index: 2; pointer-events: none; }
.pf-reveal__fade-t { top: 0; background: linear-gradient(#252038, transparent); }
.pf-reveal__fade-b { bottom: 0; background: linear-gradient(transparent, #342e54); }
.pf-reveal__line { align-self: flex-start; max-width: 90%; border-radius: 12px; border-bottom-left-radius: 3px; padding: 7px 11px; font-size: 12px; line-height: 1.5; text-align: left; background: rgba(237,234,247,.08); border: 1px solid rgba(237,234,247,.14); color: #DDD8EE; overflow-wrap: anywhere; }
.pf-reveal__line--you { align-self: flex-end; border-radius: 12px; border-bottom-right-radius: 3px; background: rgba(124,92,255,.24); border-color: rgba(124,92,255,.4); color: #E6E1F6; }
.pf-reveal__tok { display: inline-block; border-radius: 4px; padding: 0 5px; margin: 0 1px; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 9.5px; line-height: 1.6; letter-spacing: .02em; white-space: nowrap; background: rgba(127,184,158,.2); border: 1px solid rgba(127,184,158,.5); color: #A8D8C0; vertical-align: baseline; }
.pf-reveal__foot { font-size: 11px; color: #A79FD0; text-align: center; padding-top: 12px; }

/* handover */
.pf-reveal__flash { position: absolute; inset: 0; z-index: 31; background: #fff; opacity: 0; pointer-events: none; transition: opacity .5s; }
.pf-reveal--reels .pf-reveal__flash { display: block; }
.pf-reveal__flash.is-go { opacity: 1; }
.pp-portrait--revealed { animation: ppPortraitIn .8s cubic-bezier(.2,.7,.2,1); }
@keyframes ppPortraitIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

/* the gate stays, the motion goes */
@media (prefers-reduced-motion: reduce) {
  .pf-reveal__seal::after { animation: none; }
  .pf-reveal__slide.is-on { animation: none; }
  .pf-reveal__cat { transition: none; }
  .pf-reveal__bar i { transition: none !important; }
  .pf-reveal__chatscroll { transition: none !important; transform: none !important; }
  .pf-reveal__flash { transition: none; }
  .pp-portrait--revealed { animation: none; }
}
