/* The inbox, the messenger and profiles (people.js), and the unread badges in the rail and the top bar
   (dash-rail.js). Loaded by dashboard.html and studio.html after desk.css; uses the dashboard's colours
   (--card, --ink, --muted, --edge, --accent…), so it follows each login's look, light or dark. */

/* ---------- Unread badges ---------- */
.dash-tab i { position: relative; }
.rail-count { top: -2px; right: -4px; box-shadow: 0 0 0 2px rgba(0,0,0,.18); }
[data-msg-btn] { text-decoration: none; }

/* ---------- The inbox's top bar ---------- */
/* One column that never grows past the panel: the tabs and long names scroll or wrap inside it. */
.pp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.pp-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; min-width: 0; }
.pp-tabs { display: flex; gap: 4px; min-width: 0; max-width: 100%; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--edge); overflow-x: auto; scrollbar-width: none; }
.pp-tabs::-webkit-scrollbar { display: none; }
.pp-tab { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 15px; border-radius: 999px; color: var(--muted); font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pp-tab:hover { color: var(--ink); background: rgba(201,162,74,.12); }
.pp-tab[aria-current="page"] { background: var(--ink); color: var(--panel); }
.pp-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font: 700 11px/1 var(--sans); color: #fff; background: #c0392b; }
.pp-n:empty, .pp-n[hidden] { display: none; }
.pp-bar-end { display: flex; flex-wrap: wrap; gap: 8px; }
.pp svg { flex: none; }
.pp-bar-end .dash-pill svg, .pp-hero-actions .dash-pill svg { width: 17px; height: 17px; }
.pp-status { margin: 0; }
.pp-status:empty { display: none; }
.pp-hint { margin: 0; font-size: 12.5px; color: var(--muted); }
.pp-empty { list-style: none; margin: 0; padding: 14px 6px; color: var(--muted); font-size: 14px; }
.pp-note { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Faces and "online" ---------- */
.pp-face {
  width: var(--s); height: var(--s); flex: none; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  font: 600 calc(var(--s) * .36)/1 var(--sans); color: #fff8ea; background: hsl(var(--hue, 30) 34% 38%);
}
.pp-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-face-wrap { position: relative; display: inline-grid; flex: none; justify-self: start; align-self: start; width: max-content; }
.pp-dot { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: #3aa357; box-shadow: 0 0 0 2px var(--card); }
.pp-presence { color: var(--muted); }
.pp-presence.is-online { color: #2f7d45; font-weight: 600; }
.dark-ui .pp-presence.is-online { color: #86d49e; }

/* ---------- Conversations beside the open one ---------- */
.pp-two { display: grid; grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); gap: 16px; height: min(76vh, 820px); min-height: 520px; }
.pp-threads { min-height: 0; overflow-y: auto; padding: 8px; border-radius: 22px; background: var(--card); border: 1px solid var(--edge); scrollbar-width: thin; }
.pp-threads ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pp-thread { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; color: var(--ink); text-decoration: none; }
.pp-thread:hover { background: rgba(201,162,74,.1); }
.pp-thread[aria-current="true"] { background: rgba(201,162,74,.22); }
.pp-thread-body { display: grid; gap: 2px; min-width: 0; }
.pp-thread-body b { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-snip { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-thread.is-unread .pp-snip { color: var(--ink); font-weight: 600; }
.pp-thread-end { display: grid; justify-items: end; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ---------- One conversation ---------- */
.pp-chat { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; min-width: 0; min-height: 0; border-radius: 22px; background: var(--card); border: 1px solid var(--edge); overflow: hidden; }
.pp-pick { grid-row: 1 / -1; display: grid; place-items: center; align-content: center; gap: 12px; padding: 30px; text-align: center; color: var(--muted); }
.pp-pick svg { width: 44px; height: 44px; opacity: .45; }
.pp-pick p { margin: 0; max-width: 24em; }
.pp-pick a { color: var(--accent); }
.pp-chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--edge); }
.pp-back { display: none; }
.pp-back svg { width: 22px; height: 22px; }
.pp-chat-who { display: grid; gap: 4px; min-width: 0; flex: 1; }
.pp-name, .pp-chat-who > b { font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-name:hover { text-decoration: underline; }
.pp-chat-who small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; }

.pp-msgs { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; overscroll-behavior: contain; scrollbar-width: thin; }
.pp-day { align-self: center; margin: 10px 0 4px; padding: 3px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--muted); background: rgba(201,162,74,.13); }
.pp-first, .pp-older { align-self: center; margin: 8px 0; color: var(--muted); font-size: 13.5px; text-align: center; }
.pp-msg { align-self: flex-start; display: grid; justify-items: start; gap: 3px; max-width: min(78%, 560px); }
.pp-msg.is-mine { align-self: flex-end; justify-items: end; }
.pp-text {
  margin: 0; padding: 9px 14px; border-radius: 18px 18px 18px 6px; background: rgba(90,64,30,.08); color: var(--ink);
  font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
}
.dark-ui .pp-text { background: rgba(255,255,255,.08); }
.is-mine .pp-text { border-radius: 18px 18px 6px 18px; background: var(--accent); color: #fff8ea; }
.dark-ui .is-mine .pp-text { color: #1b140e; }
.is-removed .pp-text, .dark-ui .is-removed .pp-text { background: transparent; border: 1px dashed var(--edge-strong); color: var(--muted); font-style: italic; }
.pp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 6px; font-size: 11px; color: var(--muted); }
.pp-act { min-height: 24px; padding: 0; border: 0; background: none; font: inherit; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; opacity: 0; transition: opacity .2s; }
.pp-msg:hover .pp-act, .pp-msg:focus-within .pp-act, .pp-act:focus-visible { opacity: 1; }
.pp-act--danger { color: #a33b2b; }
.dark-ui .pp-act--danger { color: #f0a6a0; }
.pp-reported { font-style: italic; }
.pp-seen { align-self: flex-end; margin: -2px 6px 0; font-size: 11px; color: var(--muted); }
.pp-report-form { display: grid; gap: 8px; width: min(340px, 100%); margin-top: 4px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--edge-strong); background: var(--panel); font-size: 13px; color: var(--ink); }
.pp-report-form input { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--edge-strong); background: var(--card); color: var(--ink); font: 14px var(--sans); }

.pp-compose { display: flex; align-items: flex-end; gap: 10px; padding: 12px 14px 6px; border-top: 1px solid var(--edge); }
.pp-compose textarea {
  flex: 1; min-width: 0; min-height: 46px; max-height: 180px; resize: none; padding: 12px 16px; border-radius: 23px;
  border: 1px solid var(--edge-strong); background: var(--panel); color: var(--ink); font: 15px/1.4 var(--sans);
}
.pp-compose textarea::placeholder { color: var(--muted); }
.pp-compose .dash-pill { min-height: 46px; padding: 0 20px; }
.pp-compose .dash-pill[disabled] { opacity: .6; cursor: default; }
.pp-chat > .pp-hint { padding: 2px 18px 12px; font-size: 11.5px; }
.pp-chat > .pp-note { padding: 14px 18px; border-top: 1px solid var(--edge); }

/* ---------- Notices ---------- */
.pp-notice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pp-notice-list a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.pp-notice-list a:hover { background: rgba(201,162,74,.1); }
.pp-notice-list i { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(201,162,74,.16); color: var(--accent); }
.pp-notice-list svg { width: 18px; height: 18px; }
.pp-notice-list span { display: grid; gap: 2px; font-size: 14.5px; overflow-wrap: anywhere; }
.pp-notice-list small { font-size: 12px; color: var(--muted); }
.pp-notice-list .is-new a { background: rgba(201,162,74,.12); font-weight: 600; }

/* ---------- People ---------- */
.pp-search { display: grid; gap: 8px; }
.pp-search input { width: 100%; max-width: 520px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--edge-strong); background: var(--card); color: var(--ink); font: 15px var(--sans); }
.pp-search .pp-hint { padding: 0 6px; }
.pp-grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pp-grid .pp-empty { grid-column: 1 / -1; }
.pp-card { display: grid; gap: 14px; align-content: space-between; padding: 16px; border-radius: 22px; background: var(--card); border: 1px solid var(--edge); }
.pp-card-top { display: flex; align-items: center; gap: 13px; min-width: 0; color: var(--ink); text-decoration: none; }
.pp-card-top > span:last-child { display: grid; justify-items: start; gap: 5px; min-width: 0; }
.pp-card-top b { font-size: 15.5px; overflow-wrap: anywhere; }
.pp-card-top:hover b { text-decoration: underline; }
.pp-card-top small { font-size: 12.5px; }
.pp-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-card-actions .dash-pill { flex: 1; min-height: 38px; }

/* ---------- Reported messages ---------- */
.pp-reports > ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 14px; }
.pp-report { display: grid; gap: 10px; }
.pp-report.is-done { opacity: .72; }
.pp-report-head, .pp-report-note, .pp-report-done { margin: 0; font-size: 14.5px; }
.pp-report-head small { margin-left: 6px; color: var(--muted); font-size: 12.5px; }
.pp-report-head a, .pp-reports .link-btn { color: var(--accent); }
.pp-report-note, .pp-report-done { color: var(--muted); }
.pp-context { display: grid; gap: 4px; padding: 10px 14px; border-radius: 14px; background: rgba(90,64,30,.05); font-size: 13.5px; color: var(--muted); }
.dark-ui .pp-context { background: rgba(255,255,255,.04); }
.pp-context p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pp-quote { margin: 0; padding: 12px 16px; border-left: 3px solid #c0392b; border-radius: 4px 14px 14px 4px; background: rgba(192,57,43,.07); color: var(--ink); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pp-quote small { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); white-space: normal; }
.pp-report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

/* ---------- A profile ---------- */
.pp-crumb { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; }
.pp-crumb .link-btn { color: var(--accent); }
.pp-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 26px; align-items: start; padding: clamp(20px, 3vw, 34px); }
.pp-hero-face .pp-dot { width: 20px; height: 20px; right: 6px; bottom: 6px; box-shadow: 0 0 0 3px var(--card); }
.pp-hero-name { margin: 0; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.05; color: var(--ink); overflow-wrap: anywhere; }
.pp-hero-name small { font: 500 15px var(--sans); color: var(--muted); }
.pp-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.pp-bio { margin: 14px 0 0; max-width: 46em; white-space: pre-line; overflow-wrap: anywhere; }
.pp-contact { margin: 10px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.pp-contact a { color: inherit; }
.pp-chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pp-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.pp-hero-main > .form-status { margin: 10px 0 0; }
.pp-hero-main > .form-status:empty { display: none; }
.pp-cols { align-items: start; }
.pp-books, .pp-orders, .pp-library { list-style: none; margin: 0; padding: 0; }
.pp-book { display: grid; gap: 7px; padding: 12px 0; border-bottom: 1px dashed var(--edge-strong); }
.pp-book:last-child, .pp-orders li:last-child { border-bottom: 0; }
.pp-book-title { font: 600 19px/1.2 var(--serif); color: var(--ink); }
.pp-book-title a { color: inherit; text-decoration-color: var(--edge-strong); text-underline-offset: 3px; }
.pp-book-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.pp-as { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pp-orders li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--edge-strong); }
.pp-orders a { display: grid; gap: 2px; min-width: 0; color: var(--ink); text-decoration: none; }
.pp-orders a:hover b { text-decoration: underline; }
.pp-orders small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-total { font-weight: 600; white-space: nowrap; }
.pp-due { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: #e7dcf0; color: #4b2a6a; font-size: 14px; }
.pp-sub { margin: 18px 0 8px; font: 600 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pp-library { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; font-size: 14px; }
.pp-library li::before { content: "•"; margin-right: 8px; color: var(--accent); }

/* ---------- Phones and narrow windows: one pane at a time ---------- */
@media (max-width: 860px) {
  /* The frame is a screen tall; the rail is the bottom tab bar (desk.css, Phones), so the panel takes all of it. */
  .dash-body .dash-app:has(.pp) { grid-template-rows: minmax(0, 1fr); }
  .pp-two { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .pp-two.is-open .pp-threads, .pp-two:not(.is-open) .pp-chat { display: none; }
  /* An open conversation is the whole screen, like a messaging app: the name and a back arrow at the top, the
     messages, and the box to write in at the bottom, kept above the keyboard (people.js sets --pp-vv-top/-h
     from the visible part of the screen). It covers the tab bar; the arrow goes back to the list. */
  .pp-two.is-open .pp-chat {
    position: fixed; z-index: 60; left: 0; right: 0; top: var(--pp-vv-top, 0px); height: 100vh; height: var(--pp-vv-h, 100dvh); min-height: 0;
    border: 0; border-radius: 0; padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
  }
  html:has(.pp-two.is-open) { overflow: hidden; }
  .pp-two.is-open .pp-chat-head { min-height: 56px; padding: max(6px, env(safe-area-inset-top)) 16px 6px 8px; gap: 8px; }
  .pp-back { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); }
  .pp-two.is-open .pp-compose { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .pp-two.is-open .pp-compose textarea { min-height: 48px; padding: 12px 16px; border-radius: 24px; font-size: 16px; }
  .pp-two.is-open .pp-chat > .pp-hint { display: none; }
  .pp-two.is-open .pp-chat > .pp-note { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .pp-profile-btn { display: none; }
  .pp-act { opacity: 1; }
}
@media (hover: none) { .pp-act { opacity: 1; } }
@media (max-width: 640px) {
  .pp-tabs { width: 100%; }
  .pp-bar-end { width: 100%; }
  .pp-bar-end .dash-pill { flex: 1; }
  .pp-hero { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pp-msgs { padding: 12px; }
  .pp-msg { max-width: 88%; }
  .pp-compose { padding: 10px 10px 6px; }
  .pp-compose .dash-pill { padding: 0 16px; }
  .pp-orders li { grid-template-columns: minmax(0, 1fr) auto; }
  .pp-orders .pp-total { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { .pp-act { transition: none; } }

/* The publisher's People list links each name to their profile. */
.team-top b a { color: inherit; text-decoration-color: var(--edge-strong); text-underline-offset: 3px; }

/* The publisher's and marketing's People list: each card opens the person's control panel. */
.team-card.is-link { cursor: pointer; transition: box-shadow .2s, transform .2s; }
.team-card.is-link:hover { box-shadow: 0 16px 30px -22px rgba(0,0,0,.45); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .team-card.is-link { transition: none; } .team-card.is-link:hover { transform: none; } }

/* ---------- The control panel (admins and marketing) ---------- */
/* The ID card: a banner of soft teal, green and gold light (each person's own, from people.js
   aurora()), the face over its edge, round icon buttons, the numbers and a big Message bar. */
.pc-id { --pc-in: clamp(6px, 1.6vw, 18px); padding: 14px 14px 18px; }
.pc-id-banner {
  position: relative; isolation: isolate; overflow: hidden; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  min-height: 176px; padding: 16px 18px; border-radius: 22px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  background:
    radial-gradient(34% 60% at var(--g1x) var(--g1y), rgba(228,224,150,.82), transparent 72%),
    radial-gradient(40% 80% at var(--g2x) var(--g2y), hsl(var(--gh) 58% 42% / .85), transparent 70%),
    radial-gradient(55% 90% at var(--g3x) var(--g3y), #46b26f, transparent 72%),
    linear-gradient(125deg, #0d3b37 0%, #1f7253 50%, #0f4a42 100%);
  background-size: 150% 150%; background-position: 0% 0%;
  animation: pc-drift 24s ease-in-out infinite alternate;
}
.pc-id-banner::after { /* film grain */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .38; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes pc-drift { to { background-position: 100% 70%; } }
.pc-id-kicker, .pc-id-chips .tag {
  color: #fbf3dc; background: rgba(10,26,25,.34); border: 1px solid rgba(255,255,255,.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
}
.pc-id-kicker { flex: none; margin: 0; padding: 6px 12px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.pc-id-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.pc-id-chips .tag { padding: 5px 12px; }
.pc-id-chips .tag::before { width: 7px; height: 7px; background: #f0d38c; box-shadow: 0 0 8px rgba(240,211,140,.9); }
.pc-id-chips .tag--proof::before { background: #d6c2f2; box-shadow: 0 0 8px rgba(214,194,242,.9); }
.pc-id-chips .tag--sent::before { background: #a6d8ea; box-shadow: 0 0 8px rgba(166,216,234,.9); }
.pc-id-chips :is(.tag--paid, .tag--published)::before { background: #a7e3ae; box-shadow: 0 0 8px rgba(167,227,174,.9); }
.pc-id-chips .tag--awaiting_payment::before { background: #f5b971; box-shadow: 0 0 8px rgba(245,185,113,.9); }
.pc-id-chips .tag--cancelled::before { background: #f0a6a0; box-shadow: 0 0 8px rgba(240,166,160,.9); }

.pc-id-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 10px 24px; padding: 0 var(--pc-in); }
.pc-id-face { margin-top: -62px; }
.pc-id-face .pp-face { box-shadow: 0 0 0 6px var(--card), 0 22px 34px -20px rgba(16,36,35,.75); }
.pc-id-face .pp-dot { width: 22px; height: 22px; right: 8px; bottom: 8px; box-shadow: 0 0 0 4px var(--card); }
.pc-id-who { min-width: 0; padding-top: 16px; }
.pc-id-name { margin: 0; font: 600 clamp(30px, 3.2vw, 42px)/1.05 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
.pc-id-name small { font: 500 15px var(--sans); color: var(--muted); }
.pc-id-handle { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.pc-id-handle a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.pc-id-handle a:hover { color: var(--ink); text-decoration: underline; }
.pc-copy { position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: -6px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.pc-copy::before { content: ""; position: absolute; inset: -7px; }
.pc-copy:hover { background: rgba(201,162,74,.16); color: var(--ink); }
.pc-copy svg { width: 16px; height: 16px; }
.pc-id-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.pc-id-bio { margin: 16px var(--pc-in) 0; }

.pc-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-bottom: 4px; }
.pc-act { position: relative; display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; }
.pc-act-ico {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--edge-strong); background: var(--card); color: var(--ink);
  transition: transform .18s, background .18s, border-color .18s, box-shadow .18s;
}
.pc-act-ico svg { width: 21px; height: 21px; }
.pc-act:hover .pc-act-ico { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 10px 18px -12px rgba(16,36,35,.6); }
.pc-act:focus-visible { outline: none; }
.pc-act:focus-visible .pc-act-ico { outline: 2px solid var(--gold); outline-offset: 3px; }
.pc-act--solid .pc-act-ico { background: var(--ink); border-color: var(--ink); color: var(--card); }
.pc-act--danger .pc-act-ico { color: #8f1d1d; border-color: rgba(143,29,29,.4); }
.pc-act--danger:hover .pc-act-ico { background: rgba(143,29,29,.08); border-color: #8f1d1d; }
.pc-act.is-on .pc-act-ico { background: #f5e3b3; border-color: #c49a45; color: #6a4a0c; }
.pc-act[disabled] { opacity: .5; cursor: progress; }
.pc-act-tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; z-index: 5; transform: translate(-50%, 4px);
  padding: 6px 11px; border-radius: 9px; white-space: nowrap; font-size: 12.5px; font-weight: 500; line-height: 1.3;
  color: var(--card); background: var(--ink); box-shadow: 0 10px 20px -10px rgba(0,0,0,.45);
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
.pc-act-tip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--ink); }
.pc-act:is(:hover, :focus-visible) .pc-act-tip { opacity: 1; transform: translate(-50%, 0); }
.pc-act:last-child .pc-act-tip { left: auto; right: 0; transform: translateY(4px); }
.pc-act:last-child .pc-act-tip::after { left: auto; right: 19px; }
.pc-act:last-child:is(:hover, :focus-visible) .pc-act-tip { transform: none; }
.pc-act-short { display: none; }

.pc-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 22px var(--pc-in) 0; padding-top: 16px; border-top: 1px solid var(--edge-strong); }
.pc-stat { display: grid; justify-items: center; align-content: start; gap: 3px; min-width: 0; padding: 10px 8px 12px; border-radius: 18px; text-align: center; color: var(--ink); text-decoration: none; transition: background .18s; }
.pc-stat:hover { background: rgba(201,162,74,.12); }
.pc-stat-big { display: inline-flex; align-items: center; gap: 10px; }
.pc-stat-big svg { width: 24px; height: 24px; flex: none; color: var(--kicker); }
.pc-stat-big b { font: 500 32px/1 var(--sans); letter-spacing: -.01em; }
.pc-stat-label { margin-top: 4px; font-size: 14.5px; }
.pc-stat small { font-size: 12px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }

.pc-id-cta { display: grid; gap: 10px; margin: 14px 0 0; }
.pc-cta {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 68px; padding: 8px 76px; border: 0; border-radius: 999px; text-align: center; text-decoration: none; cursor: pointer;
  font: 500 19px/1.2 var(--sans); color: #fbf3dc;
  background: linear-gradient(100deg, #0e2221 0%, #163a37 45%, #2f544b 72%, #8c8a63 100%) 0 0 / 140% 100%;
  box-shadow: 0 18px 30px -20px rgba(16,36,35,.85), inset 0 1px 0 rgba(255,255,255,.08);
  transition: background-position .5s ease;
}
.pc-cta::after { /* a sheen that runs across on hover */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.16) 45%, transparent 60%);
  transform: translateX(-100%); transition: transform .8s ease;
}
.pc-cta:hover { background-position: 100% 0; }
.pc-cta:hover::after { transform: translateX(100%); }
.pc-cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.pc-cta-dot { position: absolute; left: 9px; top: 50%; display: grid; place-items: center; width: 50px; height: 50px; margin-top: -25px; border-radius: 50%; background: #fbf3dc; color: #13302f; transition: transform .25s; }
.pc-cta-dot svg { width: 24px; height: 24px; stroke-width: 2; }
.pc-cta:hover .pc-cta-dot { transform: translateX(6px); }
.pc-cta-text { display: grid; gap: 2px; }
.pc-cta-text small { font-size: 12.5px; font-weight: 400; color: rgba(251,243,220,.72); }
.pc-cta.is-off { cursor: not-allowed; color: var(--muted); background: transparent; border: 1.5px dashed var(--edge-strong); box-shadow: none; }
.pc-cta.is-off::after { display: none; }
.pc-cta.is-off .pc-cta-dot { background: var(--edge); color: var(--muted); }
.pc-cta.is-off:hover .pc-cta-dot { transform: none; }
.pc-cta.is-off .pc-cta-text small { color: var(--muted); }
.pc-id .pc-nomsg { margin: 0; padding: 0 var(--pc-in); }
.pc-id > :is(.pp-access, .invite-result, .form-status) { margin: 14px var(--pc-in) 0; }
.pc-id > .form-status:empty { display: none; }

.dash-app.dark-ui .pc-act--danger .pc-act-ico { color: #f0a6a0; border-color: rgba(240,166,160,.4); }
.dash-app.dark-ui .pc-cta:not(.is-off) { box-shadow: 0 0 0 1px rgba(240,211,140,.28), 0 18px 30px -20px #000; }

@media (max-width: 1180px) {
  .pc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 8px; }
}
@media (max-width: 980px) {
  .pc-id-top { grid-template-columns: auto minmax(0, 1fr); }
  .pc-acts { grid-column: 1 / -1; justify-content: flex-start; padding-top: 6px; }
}
@media (min-width: 1100px) {
  .pc-id-cta:has(.pc-nomsg) { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 22px; }
}
/* No hover on phones and tablets: the words sit under each round button instead. */
@media (max-width: 760px), (hover: none) {
  .pc-act-tip { display: none; }
  .pc-act-short { display: block; max-width: 76px; font-size: 12px; line-height: 1.2; text-align: center; color: var(--ink); }
  .pc-act--danger .pc-act-short { color: #8f1d1d; }
  .dash-app.dark-ui .pc-act--danger .pc-act-short { color: #f0a6a0; }
}
@media (max-width: 760px) {
  .pc-id { padding: 10px 10px 14px; }
  .pc-id-banner { min-height: 132px; padding: 12px; border-radius: 18px; flex-wrap: wrap; }
  .pc-id-kicker { font-size: 12px; }
  .pc-id-chips { flex: 1 1 100%; justify-content: flex-end; }
  .pc-id-top { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .pc-id-face { margin-top: -50px; }
  .pc-id-face .pp-face { --s: 96px !important; }
  .pc-id-face .pp-dot { width: 18px; height: 18px; right: 4px; bottom: 4px; }
  .pc-id-who { padding-top: 6px; }
  .pc-id-name { font-size: 28px; }
  .pc-id-handle { font-size: 14px; }
  .pc-id-meta { font-size: 13px; }
  .pc-acts { justify-content: space-between; gap: 4px; padding-top: 10px; }
  .pc-stats { margin-top: 16px; padding-top: 10px; }
  .pc-stat { padding: 8px 2px 10px; }
  .pc-stat-big { gap: 6px; }
  .pc-stat-big svg { width: 18px; height: 18px; }
  .pc-stat-big b { font-size: 24px; }
  .pc-stat-label { font-size: 13px; }
  .pc-cta { min-height: 60px; padding: 8px 62px; font-size: 17px; }
  .pc-cta-dot { width: 44px; height: 44px; margin-top: -22px; left: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .pc-id-banner { animation: none; }
  .pc-act-ico, .pc-cta, .pc-cta::after, .pc-cta-dot { transition: none; }
}
.pc-wide { min-width: 0; }
.pc-books { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pc-book { display: grid; gap: 10px; padding: 14px 0; border-bottom: 1px dashed var(--edge-strong); }
.pc-book:last-child { border-bottom: 0; }
.pc-book-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.pc-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; counter-reset: step; }
.pc-steps li { position: relative; display: grid; gap: 2px; padding: 8px 10px 8px 30px; border-radius: 12px; background: rgba(90,64,30,.05); font-size: 12.5px; color: var(--muted); }
.dark-ui .pc-steps li { background: rgba(255,255,255,.04); }
.pc-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 8px; top: 9px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font: 700 10px/1 var(--sans); border: 1px solid var(--edge-strong); }
.pc-steps li.is-done { color: var(--ink); background: rgba(58,163,87,.12); }
.pc-steps li.is-done::before { content: "✓"; background: #3aa357; border-color: #3aa357; color: #fff; }
.pc-steps b { font-size: 12.5px; }
.pc-steps small { font-size: 11.5px; color: var(--muted); }
.pc-sale { margin: 0; font-size: 14px; }
.pc-sale small { color: var(--muted); }
.pc-book-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }   /* 30 Nov 2026: pill buttons (dash-pill) */
.pc-book-actions .dash-pill { min-height: 38px; padding: 0 18px; }
.pc-book-actions .link-btn, .pc-line a, .pc-list a { color: var(--accent); }
.pc-add { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--edge); }
.pc-form { display: grid; gap: 10px; align-content: start; }
.pc-form .field { margin: 0; }
.pc-form select, .pc-form input[type=file] { max-width: 100%; }
.pc-form .dash-pill { justify-self: start; }
.pc-form .pp-sub { margin-top: 0; }
.pc-line { margin: 0 0 6px; font-size: 14px; }
.pc-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; }
.pc-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--edge-strong); font-size: 14px; }
.pc-list li:last-child { border-bottom: 0; }
.pc-list li > span { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.pc-list small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pc-meetings { list-style: none; margin: 14px 0 0; padding: 0; display: grid; }
.pc-meetings li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 0; border-top: 1px dashed var(--edge-strong); }
.pc-meetings li > span { display: grid; gap: 2px; flex: 1 1 260px; min-width: 0; }
.pc-meetings small { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.pc-meetings li.is-past, .pc-meetings li.is-cancelled { opacity: .65; }
.pc .invite-result { margin-top: 12px; }
.dash-pill--danger { color: #8f1d1d; border-color: rgba(143,29,29,.35); }

/* A meeting card in a conversation */
.pp-meet { display: grid; gap: 4px; min-width: 220px; }
.pp-meet b { font-size: 15px; }
.pp-meet-when { font-weight: 600; }
.pp-meet-note { white-space: pre-wrap; }
.pp-meet .dash-pill { justify-self: start; margin-top: 6px; min-height: 36px; text-decoration: none; }
.is-mine .pp-meet .dash-pill { background: #fff8ea; border-color: #fff8ea; color: var(--burgundy); }
.pp-msg.is-cancelled .pp-meet { text-decoration: line-through; opacity: .7; }

@media (max-width: 860px) {
  .pc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pc-add { grid-template-columns: minmax(0, 1fr); }
}
.pp-meet-host { font-size: 11.5px; opacity: .8; }
.copy-row[hidden] { display: none; }
.pp-access { display: grid; gap: 8px; justify-items: start; margin-top: 14px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--edge-strong); background: rgba(201,162,74,.08); font-size: 14px; }
.pp-access p { margin: 0; }
.pp-access .pc-form { width: 100%; }

/* ---------- Your photo when your profile is open (it has no rail button; dashboard.js sets aria-current) ---------- */
.dash-me[aria-current="page"] { box-shadow: 0 0 0 2px var(--gold-hi), 0 0 0 6px rgba(240,211,140,.22); }
.dash-chip[aria-current="page"] { border-color: var(--gold); background: rgba(201,162,74,.14); }

/* =====================================================================
   The messenger (chat.js): like WhatsApp and Telegram. Sizes and layout here; Gilded Night's colours in gilded.css.
   ===================================================================== */
.pp-chat [hidden], .pp-menu [hidden], .pp-dlg [hidden], .pp-viewer [hidden] { display: none !important; }
.pp-ib {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer; text-decoration: none;
}
.pp-ib:hover, .pp-ib.is-on { color: var(--ink); background: rgba(201,162,74,.14); }
.pp-ib:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.pp-ib svg { width: 21px; height: 21px; }

/* The list of conversations: a search box on top, then the rows (pinned first), and Archived */
.pp-threads { display: flex; flex-direction: column; overflow: hidden; }
.pp-threads > ul { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; align-content: start; } /* rows keep their height: a short list doesn't spread down the panel */
.pp-threads-find { padding: 2px 2px 8px; }
.pp-threads-find input {
  width: 100%; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--edge-strong);
  background: var(--panel); color: var(--ink); font: 14px var(--sans);
}
.pp-thread-li { position: relative; }
.pp-thread-li[hidden] { display: none; }
.pp-thread-end { align-content: center; }
.pp-thread-icons { display: flex; align-items: center; gap: 4px; min-height: 20px; }
.pp-ic { display: inline-grid; color: var(--muted); }
.pp-ic svg { width: 15px; height: 15px; }
.pp-thread.is-muted .pp-n { background: var(--muted); }
.pp-snip .pp-ticks { display: inline-flex; vertical-align: -3px; margin-right: 3px; color: var(--muted); }
.pp-snip .pp-ticks .pp-tick { width: 17px; height: 15px; }
.pp-snip .pp-ticks[data-s="read"] { color: #2b8fc4; }
.pp-thread-more {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 26px; height: 26px; display: grid; place-items: center;
  padding: 0; border: 0; border-radius: 50%; background: var(--panel); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s;
}
.pp-thread-more svg { width: 16px; height: 16px; }
.pp-thread-li:hover .pp-thread-more, .pp-thread-more:focus-visible { opacity: 1; }
.pp-thread-li:hover .pp-thread-end { visibility: hidden; }
.pp-arch-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 6px 10px; border: 0; border-radius: 16px;
  background: none; color: var(--ink); font: 600 14.5px var(--sans); text-align: left; cursor: pointer;
}
.pp-arch-row:hover { background: rgba(201,162,74,.1); }
.pp-arch-row > svg { width: 20px; height: 20px; }
.pp-arch-ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(201,162,74,.14); color: var(--accent); }
.pp-arch-ic svg { width: 20px; height: 20px; }
.pp-arch-n { margin-left: auto; color: var(--muted); font-size: 12.5px; font-weight: 500; }

/* The conversation: its head (name, online or typing…, search, options), the messages, the box to write in */
.pp-chat { position: relative; }
.pp-head-tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.pp-head-tools .pp-profile-btn { margin: 0 6px; }
.pp-flags { display: inline-flex; align-items: center; gap: 4px; }
.pp-flag { display: inline-grid; color: var(--muted); }
.pp-flag svg { width: 14px; height: 14px; }
.pp-flag--word { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.pp-presence.is-typing { font-style: italic; }
.pp-dots { display: inline-flex; gap: 2px; margin-left: 2px; vertical-align: 2px; }
.pp-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: pp-dot 1.2s infinite ease-in-out; }
.pp-dots i:nth-child(2) { animation-delay: .15s; }
.pp-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pp-dot { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }

.pp-body { position: relative; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); }
.pp-body > .pp-msgs { min-height: 0; gap: 3px; }
.pp-chat.is-finding .pp-msgs { padding-top: 62px; }
.pp-day { position: sticky; top: 6px; z-index: 2; background: var(--panel); box-shadow: 0 2px 10px -4px rgba(0,0,0,.25); }
.pp-unread { align-self: stretch; margin: 10px 0; padding: 5px 12px; border-radius: 10px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--accent); background: rgba(201,162,74,.12); }

/* One message: a bubble, the time and ticks inside it (bottom right), reactions under it, its options beside it */
.pp-msg { position: relative; margin-top: 5px; touch-action: pan-y; }
.pp-msg.is-cont { margin-top: 0; }
.pp-msg > .pp-text { position: relative; display: block; min-width: 64px; max-width: 100%; padding: 7px 10px 7px 12px; white-space: normal; }
.pp-msg.is-run:not(.is-mine) > .pp-text { border-bottom-left-radius: 8px; }
.pp-msg.is-run.is-mine > .pp-text { border-bottom-right-radius: 8px; }
.pp-msg.is-cont:not(.is-mine) > .pp-text { border-top-left-radius: 8px; }
.pp-msg.is-cont.is-mine > .pp-text { border-top-right-radius: 8px; }
.pp-msg > .pp-text.pp-meet { display: grid; padding: 9px 14px; }
.pp-meet > .pp-stamp { float: none; top: 0; justify-self: end; margin: 2px -4px 0 0; }
.pp-words { white-space: pre-wrap; overflow-wrap: anywhere; }
.pp-words a { color: inherit; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.pp-stamp {
  float: right; position: relative; top: 6px; display: inline-flex; align-items: center; gap: 3px; margin: 0 -4px 0 12px;
  font-size: 11px; line-height: 1.6; white-space: nowrap; opacity: .72;
}
.pp-edited, .pp-stamp .pp-reported { font-style: italic; }
.pp-ticks { display: inline-flex; }
.pp-tick { width: 16px; height: 15px; }
.pp-tick--two { width: 19px; }
.pp-ticks[data-s="failed"] svg { width: 15px; height: 15px; color: #c0392b; }
.is-mine .pp-ticks[data-s="read"] { color: #a9e8ff; }
.pp-msg.is-removed .pp-words { font-style: italic; }
.pp-msg.is-jumbo > .pp-text { background: transparent; box-shadow: none; padding: 0 2px; }
.pp-msg.is-jumbo .pp-words { font-size: 40px; line-height: 1.15; }
.pp-msg.is-jumbo .pp-stamp { top: 0; }
.pp-fwd { display: flex; align-items: center; gap: 5px; margin: -1px 0 3px; font-size: 12px; font-style: italic; opacity: .75; }
.pp-fwd svg { width: 14px; height: 14px; }
.pp-quote-in {
  display: grid; gap: 1px; width: 100%; min-width: 0; margin: 0 0 6px; padding: 6px 10px; border: 0; border-left: 3px solid currentColor;
  border-radius: 8px; background: color-mix(in srgb, currentColor 10%, transparent); color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.pp-quote-in b { font-size: 12.5px; }
.pp-quote-in span { font-size: 13px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-msg.is-flash > .pp-text { animation: pp-flash 1.8s ease-out; }
@keyframes pp-flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent), 0 0 24px rgba(201,162,74,.6); } 100% { box-shadow: none; } }
.pp-more {
  position: absolute; top: 2px; right: -34px; width: 28px; height: 28px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--edge); border-radius: 50%; background: var(--panel); color: var(--muted); cursor: pointer; opacity: 0; transition: opacity .15s;
}
.is-mine > .pp-more { right: auto; left: -34px; }
.pp-more svg { width: 16px; height: 16px; }
.pp-msg:hover > .pp-more, .pp-more:focus-visible, .pp-more[aria-expanded="true"] { opacity: 1; }
.pp-reacts { position: relative; z-index: 1; display: flex; gap: 4px; margin: -8px 8px 0; }
.is-mine > .pp-reacts { justify-content: flex-end; }
.pp-react {
  display: inline-flex; align-items: center; gap: 3px; min-height: 26px; padding: 0 7px; border: 2px solid var(--card); border-radius: 999px;
  background: var(--panel); color: var(--ink); font: 600 11px var(--sans); cursor: pointer;
}
.pp-react span { font-size: 14px; line-height: 1; }
.pp-react.is-mine { background: rgba(201,162,74,.24); }
.pp-failed { margin: 2px 4px 0; font-size: 12px; color: #c0392b; }
.pp-failed .link-btn { min-height: 0; padding: 0; font-size: 12px; color: inherit; }
.pp-msg.is-pending > .pp-text { opacity: .85; }
/* swipe right to reply (phones) */
.pp-msg.is-swiping > :is(.pp-text, .pp-reacts) { transform: translateX(var(--swipe, 0)); }
.pp-msg > :is(.pp-text, .pp-reacts) { transition: transform .2s; }
.pp-msg.is-swiping > :is(.pp-text, .pp-reacts) { transition: none; }
.pp-msg.is-swiping::before {
  content: "↩"; position: absolute; left: 0; top: 50%; translate: 0 -50%; width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(201,162,74,.18); color: var(--accent); font-size: 16px; opacity: .5;
}
.pp-msg.is-swiping.is-ready::before { opacity: 1; background: var(--accent); color: var(--panel); }
@media (pointer: coarse) { .pp-msg { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; } }

/* Photos, files, voice notes */
.pp-file { position: relative; }
.pp-msg > .pp-text:has(.pp-file--photo) { padding: 4px; }
.pp-msg > .pp-text:has(.pp-file--photo) > :is(.pp-words, .pp-quote-in, .pp-fwd) { display: block; margin: 5px 7px 2px; }
.pp-msg > .pp-text:has(.pp-file--photo) > .pp-quote-in { width: auto; }
.pp-msg > .pp-text:has(.pp-file--photo) > .pp-stamp { margin-right: 4px; }
.pp-photo {
  display: block; width: min(300px, 64vw); max-height: 360px; aspect-ratio: var(--ar, 4 / 3); padding: 0; border: 0; border-radius: 14px;
  overflow: hidden; background: color-mix(in srgb, currentColor 8%, transparent); cursor: zoom-in;
}
.pp-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pp-text.is-photo-only > .pp-stamp {
  position: absolute; right: 10px; bottom: 9px; top: auto; float: none; margin: 0; padding: 1px 7px; border-radius: 10px;
  background: rgba(0,0,0,.48); color: #fff; opacity: 1;
}
.pp-file--file { display: flex; align-items: center; gap: 4px; margin: 1px 0 4px; }
.pp-doc {
  display: flex; align-items: center; gap: 10px; min-width: 0; max-width: min(320px, 62vw); padding: 8px 12px 8px 8px; border-radius: 12px;
  background: color-mix(in srgb, currentColor 9%, transparent); color: inherit; text-decoration: none;
}
.pp-doc-ic { position: relative; width: 40px; height: 44px; flex: none; display: grid; place-items: center; }
.pp-doc-ic svg { width: 38px; height: 38px; opacity: .8; }
.pp-doc-ic em { position: absolute; bottom: 7px; font: 700 8.5px/1 var(--sans); letter-spacing: .03em; font-style: normal; }
.pp-doc-t { display: grid; min-width: 0; }
.pp-doc-t b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-doc-t small { font-size: 11.5px; opacity: .75; }
a.pp-doc:hover b { text-decoration: underline; }
.pp-doc-dl { color: inherit; }
.pp-voice { display: grid; grid-template-columns: 40px minmax(110px, 1fr) auto auto; align-items: center; gap: 8px; width: min(300px, 66vw); padding: 2px 0 4px; }
.pp-play { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; cursor: pointer; }
.pp-play svg { width: 18px; height: 18px; }
.pp-vwave { display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer; }
.pp-vwave i { flex: 1; min-width: 2px; max-width: 4px; height: calc(var(--h) * 28px); border-radius: 2px; background: currentColor; opacity: .3; }
.pp-vwave i.is-on { opacity: 1; }
.pp-vtime { font-size: 11.5px; font-variant-numeric: tabular-nums; opacity: .8; }
.pp-speed { min-width: 34px; height: 24px; padding: 0 6px; border: 0; border-radius: 999px; background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; font: 700 11px var(--sans); cursor: pointer; }
.pp-progress { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 12px; background: rgba(0,0,0,.28); }
.pp-progress::before {
  content: ""; position: absolute; width: 48px; height: 48px; border-radius: 50%;
  background: conic-gradient(#fff calc(var(--p, 0) * 360deg), rgba(255,255,255,.28) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
}
.pp-progress .pp-ib { position: relative; color: #fff; }
.pp-bookcard {
  display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; padding: 6px; border-radius: 12px; max-width: 320px;
  background: color-mix(in srgb, currentColor 9%, transparent); color: inherit; text-decoration: none;
}
.pp-bookcard img { width: 42px; height: 60px; object-fit: cover; border-radius: 3px; box-shadow: 0 4px 10px -4px rgba(0,0,0,.5); }
.pp-bookcard-t { display: grid; gap: 2px; min-width: 0; }
.pp-bookcard-t b { font: 600 15px/1.2 var(--serif); }
.pp-bookcard-t small { font-size: 11.5px; opacity: .75; }

/* Search in a conversation, the jump button, dropping files, short notes */
.pp-find {
  position: absolute; z-index: 5; top: 8px; left: 10px; right: 10px; display: flex; align-items: center; gap: 2px; padding: 3px 4px 3px 12px;
  border: 1px solid var(--edge-strong); border-radius: 999px; background: var(--solid, var(--panel)); box-shadow: 0 12px 30px -14px rgba(0,0,0,.45);
}
.pp-find-ic { display: grid; color: var(--muted); }
.pp-find-ic svg { width: 18px; height: 18px; }
.pp-find input { flex: 1; min-width: 0; min-height: 38px; padding: 0 8px; border: 0; background: transparent; color: var(--ink); font: 15px var(--sans); outline: none; }
.pp-find-n { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pp-find .pp-ib { width: 36px; height: 36px; }
.pp-find-list {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: min(50vh, 380px); overflow-y: auto; list-style: none; margin: 0; padding: 6px;
  border: 1px solid var(--edge-strong); border-radius: 18px; background: var(--solid, var(--panel)); box-shadow: 0 24px 50px -20px rgba(0,0,0,.5);
}
.pp-find-hit { display: grid; gap: 2px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: 14px var(--sans); text-align: left; cursor: pointer; }
.pp-find-hit:hover, .pp-find-hit.is-on { background: rgba(201,162,74,.14); }
.pp-find-hit small { font-size: 11.5px; color: var(--muted); }
.pp-find-hit span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pp-jump {
  position: absolute; z-index: 4; right: 16px; bottom: 14px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--edge-strong); border-radius: 50%; background: var(--solid, var(--panel)); color: var(--ink); cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.5);
}
.pp-jump svg { width: 20px; height: 20px; }
.pp-jump .pp-n { position: absolute; top: -6px; right: -4px; }
.pp-drop {
  position: absolute; z-index: 6; inset: 8px; display: grid; place-items: center; border: 2px dashed var(--accent); border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--ink); font-weight: 600; pointer-events: none;
}
.pp-drop span { display: inline-flex; align-items: center; gap: 8px; }
.pp-drop svg { width: 22px; height: 22px; }
.pp-toast {
  position: absolute; z-index: 7; left: 50%; bottom: 14px; translate: -50% 0; width: max-content; max-width: min(90%, 460px); margin: 0;
  padding: 9px 14px; border-radius: 12px; border-left: 3px solid #c0392b; background: var(--solid, var(--panel)); color: var(--ink);
  font-size: 13.5px; box-shadow: 0 14px 30px -12px rgba(0,0,0,.5);
}
.pp-toast.is-ok { border-left-color: #2f9e6a; }

/* Writing: a strip for a reply or an edit, the waiting photos and files, emoji, the row, recording */
.pp-compose { display: grid; gap: 8px; align-items: stretch; padding: 10px 12px 6px; }
.pp-row { display: flex; align-items: flex-end; gap: 4px; min-width: 0; }
.pp-row .pp-ib { height: 46px; width: 40px; }
.pp-row textarea { overflow-y: hidden; scrollbar-width: thin; }
.pp-send {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center; margin-left: 4px; padding: 0; border: 0; border-radius: 50%;
  background: var(--accent); color: #fff8ea; cursor: pointer;
}
.pp-send svg { width: 22px; height: 22px; }
.pp-send[disabled] { opacity: .6; cursor: default; }
.pp-send:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pp-mic { touch-action: none; }
.pp-ctx { display: flex; align-items: center; gap: 8px; padding: 6px 4px 6px 12px; border-left: 3px solid var(--accent); border-radius: 12px; background: rgba(201,162,74,.1); }
.pp-ctx-t { display: grid; flex: 1; min-width: 0; }
.pp-ctx-t b { font-size: 12.5px; color: var(--accent); }
.pp-ctx-t span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-ctx .pp-ib { width: 34px; height: 34px; }
.pp-tray { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.pp-tray-item { display: flex; align-items: center; gap: 8px; flex: none; max-width: 240px; padding: 5px 2px 5px 5px; border: 1px solid var(--edge); border-radius: 14px; background: var(--panel); }
.pp-tray-item img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; }
.pp-tray-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 9px; background: rgba(201,162,74,.14); color: var(--accent); }
.pp-tray-ic svg { width: 22px; height: 22px; }
.pp-tray-t { display: grid; min-width: 0; font-size: 13px; }
.pp-tray-t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-tray-t small { color: var(--muted); font-size: 11.5px; }
.pp-tray-item .pp-ib { width: 32px; height: 32px; }
.pp-emoji { display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: 250px; border: 1px solid var(--edge); border-radius: 16px; background: var(--panel); overflow: hidden; }
.pp-emoji-tabs { display: flex; gap: 2px; padding: 4px; border-bottom: 1px solid var(--edge); overflow-x: auto; scrollbar-width: none; }
.pp-emoji-tabs button { width: 38px; height: 34px; flex: none; border: 0; border-radius: 10px; background: none; font-size: 18px; cursor: pointer; opacity: .6; }
.pp-emoji-tabs button[aria-selected="true"] { opacity: 1; background: rgba(201,162,74,.18); }
.pp-emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); padding: 4px; overflow-y: auto; scrollbar-width: thin; }
.pp-emoji-grid button { height: 40px; border: 0; border-radius: 10px; background: none; font-size: 24px; line-height: 1; cursor: pointer; }
.pp-emoji-grid button:hover, .pp-emoji-grid button:focus-visible { background: rgba(201,162,74,.16); outline: none; }
.pp-rec { display: flex; align-items: center; gap: 10px; min-height: 46px; padding-left: 2px; }
.pp-rec-x { color: #c0392b; }
.pp-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e0483a; animation: pp-rec 1s infinite; }
@keyframes pp-rec { 50% { opacity: .25; } }
.pp-rec-time { min-width: 38px; font: 600 14px var(--sans); font-variant-numeric: tabular-nums; color: var(--ink); }
.pp-rec-wave { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 2px; height: 32px; overflow: hidden; color: var(--accent); }
.pp-rec-wave i { flex: none; width: 3px; height: calc(var(--h) * 30px); border-radius: 2px; background: currentColor; }
.pp-rec-hint { font-size: 12.5px; color: var(--muted); white-space: nowrap; translate: var(--dx, 0) 0; }
.pp-rec.is-cancel .pp-rec-hint { color: #c0392b; }
.pp-rec.is-locked .pp-rec-hint { display: none; }
.pp-rec:not(.is-locked) .pp-rec-x, .pp-rec:not(.is-locked) [data-rec-send] { visibility: hidden; }

/* Menus (a message's or a conversation's options): beside the button on computers, a sheet from the bottom on phones */
.pp-menu:not(.dash-sheet) {
  position: fixed; inset: auto; margin: 0; padding: 6px; min-width: 220px; max-width: min(340px, 94vw); border: 1px solid var(--edge-strong); border-radius: 16px;
  background: var(--solid, var(--panel)); color: var(--ink); box-shadow: 0 24px 60px -20px rgba(0,0,0,.6);
}
.pp-menu:not(.dash-sheet)::backdrop { background: transparent; }
.pp-menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.pp-menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 6px 12px 6px 10px; border: 0; border-radius: 10px;
  background: none; color: var(--ink); font: 500 14.5px/1.3 var(--sans); text-align: left; text-decoration: none; cursor: pointer;
}
.pp-menu-item:hover, .pp-menu-item:focus-visible { background: rgba(201,162,74,.14); outline: none; }
.pp-menu-item i { width: 22px; flex: none; display: grid; place-items: center; color: var(--muted); }
.pp-menu-item svg { width: 19px; height: 19px; }
.pp-menu-item.is-danger, .dash-sheet-row.is-danger { color: #a33b2b; }
.pp-menu-item.is-danger i { color: inherit; }
.pp-menu--sheet .pp-menu-item { min-height: 52px; font-size: 16px; }
.pp-react-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin: 0 0 6px; padding: 2px 2px 8px; border-bottom: 1px solid var(--edge); }
.pp-react-bar button { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; font-size: 24px; line-height: 1; cursor: pointer; transition: transform .12s; }
.pp-react-bar button:hover, .pp-react-bar button:focus-visible, .pp-react-bar button.is-on { background: rgba(201,162,74,.2); transform: scale(1.1); outline: none; }
.pp-react-bar .pp-react-more { color: var(--muted); }
.pp-react-more svg { width: 20px; height: 20px; }
.pp-menu--sheet .pp-react-bar { justify-content: space-between; }

/* Windows: forward, delete, mute, alerts (a sheet on phones, centred on computers) */
.pp-dlg .dash-sheet-head h2 { font-size: 21px; }
.pp-dlg-text { margin: 0 8px 10px; font-size: 14px; color: var(--muted); }
.pp-dlg-search { width: 100%; min-height: 44px; margin: 4px 0 8px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--edge-strong); background: var(--card); color: var(--ink); font: 15px var(--sans); }
.pp-dlg .dash-sheet-in, .pp-menu { text-align: left; }
ul.pp-pick { list-style: none; margin: 0; padding: 0; max-height: min(50vh, 420px); overflow-y: auto; display: grid; gap: 2px; justify-items: stretch; }
.pp-pick-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; cursor: pointer; }
.pp-pick-row:hover { background: rgba(201,162,74,.1); }
.pp-pick-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.pp-pick-row > span:last-child { display: grid; min-width: 0; }
.pp-pick-row b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-pick-row small { font-size: 12px; color: var(--muted); }
.pp-dlg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--edge); }
.pp-dlg-n { font-size: 13px; color: var(--muted); }
.pp-alerts { display: grid; gap: 4px; }
.pp-switch { display: flex; align-items: flex-start; gap: 12px; padding: 10px 8px; border-radius: 12px; cursor: pointer; }
.pp-switch:hover { background: rgba(201,162,74,.08); }
.pp-switch input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--accent); }
.pp-switch span { display: grid; gap: 2px; }
.pp-switch small { font-size: 13px; color: var(--muted); }
@media (min-width: 641px) {
  .pp-dlg { inset: 0; width: min(460px, 92vw); height: fit-content; max-height: 82vh; margin: auto; border-radius: 22px; }
  .pp-dlg[open] { animation: pp-pop .18s var(--ease, ease-out) both; }
  .pp-dlg .dash-sheet-in::before { display: none; }
}
@keyframes pp-pop { from { opacity: 0; transform: scale(.97); } }

/* A photo, full screen */
.pp-viewer { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6,5,8,.96); color: #fff; }
.pp-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.pp-viewer::backdrop { background: rgba(6,5,8,.9); }
.pp-viewer-top { display: flex; align-items: center; gap: 6px; padding: max(8px, env(safe-area-inset-top)) 10px 8px 16px; }
.pp-viewer-who { flex: 1; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-viewer .pp-ib { color: #fff; }
.pp-viewer .pp-ib:hover { background: rgba(255,255,255,.14); }
.pp-viewer img { place-self: center; max-width: 100%; max-height: 100%; object-fit: contain; padding: 0 8px 12px; }
.pp-viewer-prev, .pp-viewer-next { position: absolute; top: 50%; translate: 0 -50%; width: 48px; height: 48px; background: rgba(255,255,255,.1); }
.pp-viewer-prev { left: 10px; }
.pp-viewer-next { right: 10px; }

/* Reported: the photo */
.pp-report-photo { display: block; margin-top: 8px; }
.pp-report-photo img { display: block; max-width: min(260px, 100%); max-height: 220px; border-radius: 10px; }
.pp-report-file { display: inline-block; margin-top: 6px; }
.pp-versions { margin: 4px 0 0; padding-left: 18px; }
.pp-versions li { margin: 2px 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.pp-versions small { color: var(--muted); }

/* Phones: the bubbles a little wider, the options button hidden (press and hold instead), round buttons a touch bigger */
@media (max-width: 860px) {
  .pp-two.is-open .pp-row textarea { font-size: 16px; }
  .pp-thread-more { opacity: 0; pointer-events: none; }
  .pp-thread-li:hover .pp-thread-end { visibility: visible; }
  .pp-head-tools .pp-ib { width: 42px; height: 42px; }
}
@media (hover: none) { .pp-more { opacity: 0; } .pp-msg:hover > .pp-more { opacity: 0; } .pp-more:focus-visible { opacity: 1; } }
@media (max-width: 640px) {
  .pp-photo { width: min(260px, 66vw); }
  .pp-voice { width: min(270px, 70vw); grid-template-columns: 38px minmax(80px, 1fr) auto; }
  .pp-voice .pp-speed { grid-column: 3; grid-row: 1; display: none; }
  .pp-row .pp-ib { width: 36px; }
  .pp-rec-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pp-dots i, .pp-rec-dot, .pp-msg.is-flash > .pp-text { animation: none; }
  .pp-msg > :is(.pp-text, .pp-reacts), .pp-react-bar button { transition: none; }
}
html.calm .pp-dots i, html.calm .pp-rec-dot { animation: none; }

/* 30 Nov 2026: the dashboard's other link buttons are pills too (dash-pill--sm: rows of small actions, the back links) */
.dash-pill--sm { min-height: 32px; padding: 0 14px; font-size: 12.5px; text-decoration: none; }
.pp-crumb, .team-actions, .st-proof-btns, .pp-report-actions, .pc-line--acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gwi-rep-bh { flex-wrap: wrap; gap: 8px; }
.pp-older { display: flex; justify-content: center; }
.dash-body .dash-main :is(.pc-book-actions, .pp-crumb, .st-proof-btns) { gap: 8px; }
.st-more summary.dash-pill { display: inline-flex; width: fit-content; max-width: 100%; list-style: none; min-height: 34px; padding: 0 16px; }
.st-more summary.dash-pill::-webkit-details-marker { display: none; }

/* ---------- Phones: no zoom when a box is tapped (30 Nov 2026) ----------
   An iPhone zooms the page in when you tap a text box whose letters are smaller than 16px, and stays zoomed after the
   keyboard closes; the bottom tab bar (position: fixed) then slides with the page. So on phones and touch screens
   every box in the dashboard and the studio is 16px: nothing zooms. */
@media (max-width: 860px), (pointer: coarse) {
  .dash-body :is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"], [type="reset"], [type="image"]), select, textarea) { font-size: 16px; }
}
