/* ── PersonCard stylesheet ────────────────────────────────────────────────
   THE per-person card (person-utils.js renders it; unified modal + panel
   TipperProfile page both mount it). One coherent sheet — no layers. */

:root {
  --pc-bg: #161619;
  --pc-tile: rgba(255, 255, 255, 0.05);
  --pc-line: rgba(255, 255, 255, 0.09);
  --pc-text: #f2f2f5;
  --pc-muted: #9a9aa5;
  --pc-faint: #6a6a73;
  --pc-name: #c084fc;
  --pc-tag: #ff8d9d;
  --pc-fact: #7dd3fc;
  --pc-mint: #d8f3e3;
  --pc-teal: #2dd4bf;
  --pc-accent: #c084fc;
}

/* card shell — the modal supplies the box; on the page pc-card draws it */
.modal-card--pc { padding: 0 !important; background: transparent !important;
  border: none !important; box-shadow: none !important; }
.modal-card--pc .modal-close { z-index: 6; top: 12px; right: 12px; }
.pc-card {
  background: var(--pc-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 20px 18px 16px;
  color: var(--pc-text);
  font-size: 14px;
  line-height: 1.45;
}
.pc-card [data-z] + [data-z] { margin-top: 16px; }
.pc-card button { font: inherit; -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }

/* page shell (TipperProfile) */
.pc-page { max-width: 560px; margin: 0 auto; padding: 0 0 40px; }
.pc-topbar { padding: 6px 2px 10px; }
.pc-back { background: none; border: none; color: var(--pc-muted); font-size: 14px;
  font-weight: 700; cursor: pointer; padding: 8px 6px; }

/* ── head ── */
.pc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pc-badge { display: inline-flex; gap: 4px; font-size: 10px; order: 0; }
.pc-editbtn {
  order: 1; margin-left: auto; background: none; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--pc-muted);
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px;
  padding: 4px 12px; min-height: 28px;
}
.pc-editing .pc-editbtn { color: var(--pc-accent); border-color: rgba(192, 132, 252, 0.5); }
.pc-title { order: 2; flex-basis: 100%; min-width: 0; }
.pc-username { font-size: 22px; font-weight: 800; color: #fff; overflow-wrap: anywhere; line-height: 1.2; }
.pc-idline { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 3px; }
.pc-ainame { background: none; border: none; padding: 0; cursor: pointer;
  color: var(--pc-name); font-weight: 800; font-size: 15px; }
.pc-pill { display: inline-flex; align-items: center; font-size: 10px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; }
.pc-pill--cold { color: #bfdbfe; background: rgba(96, 165, 250, 0.16); }
.pc-pill--aka { color: var(--pc-fact); background: rgba(125, 211, 252, 0.12); }
.pc-why--name { font-size: 12px; color: var(--pc-faint); margin-top: 2px; }

/* ── now tiles ── */
.pc-now { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pc-stat { background: var(--pc-tile); border-radius: 12px; padding: 12px 6px 10px; text-align: center; }
.pc-stat-n { font-size: 22px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pc-stat-n--sm { font-size: 16px; padding-top: 4px; }
.pc-stat-l { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--pc-muted); margin-top: 4px; }
.pc-stat-s { font-size: 11px; color: var(--pc-teal); margin-top: 2px; font-variant-numeric: tabular-nums; }
.pc-stat--live { background: rgba(192, 132, 252, 0.12); box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.35); }
.pc-stat--live .pc-stat-n { color: var(--pc-accent); text-shadow: 0 0 14px rgba(192, 132, 252, 0.45); }

/* ── playbook ── */
.pc-about { margin-bottom: 4px; }
.pc-about-b { font-size: 14px; line-height: 1.5; color: #cfe8d8; padding-left: 0.95em; text-indent: -0.95em; }
.pc-about-b + .pc-about-b { margin-top: 3px; }
.pc-opener { font-size: 13.5px; color: var(--pc-mint); margin-top: 7px;
  padding-left: 1.5em; text-indent: -1.5em; line-height: 1.45; }
.pc-opener::before { content: '💬 '; }
.pc-discover { border: 1px dashed rgba(192, 132, 252, 0.4); background: rgba(192, 132, 252, 0.07);
  border-radius: 12px; padding: 10px 12px; }
.pc-discover-h { font-size: 12px; font-weight: 800; color: #e9d5ff; margin-bottom: 2px; }
.pc-kv { display: flex; align-items: baseline; gap: 9px; padding: 6px 0 0; }
.pc-kv-k { flex: none; background: none; border: none; padding: 0; cursor: pointer;
  font-weight: 800; font-size: 14px; text-align: left; }
.pc-kv-k--tag { color: var(--pc-tag); }
.pc-kv-k--fact { color: var(--pc-fact); }
.pc-kv .pc-why { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--pc-muted);
  overflow-wrap: anywhere; line-height: 1.4; }
.pc-del { flex: none; display: none; background: none; border: none; cursor: pointer;
  color: var(--pc-muted); font-size: 18px; line-height: 1; min-width: 28px; min-height: 24px; }
.pc-editing .pc-del { display: inline-flex; align-items: center; justify-content: center; }
.pc-emptyline { font-size: 13px; color: var(--pc-faint); }
.pc-editrows { margin-top: 12px; }
.pc-row { display: flex; gap: 8px; margin-top: 8px; position: relative; }
.pc-input { flex: 1 1 auto; min-width: 0; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; color: #fff;
  font-size: 16px; padding: 9px 12px; outline: none; }
.pc-input:focus { border-color: rgba(192, 132, 252, 0.5); }
.pc-btn { flex: none; background: rgba(255, 255, 255, 0.08); border: none; border-radius: 10px;
  color: #e8e8ee; font-size: 13px; font-weight: 700; padding: 9px 13px; cursor: pointer; }
.pc-btn--tag { color: var(--pc-tag); background: rgba(255, 80, 100, 0.13); }
.pc-btn--fact { color: var(--pc-fact); background: rgba(125, 211, 252, 0.13); }
.pc-btn--accent { color: var(--pc-fact); background: rgba(125, 211, 252, 0.15); }
.pc-reread { display: block; width: 100%; margin-top: 12px; background: rgba(192, 132, 252, 0.1);
  border: none; border-radius: 10px; color: #e9d5ff; font-size: 13px; font-weight: 700;
  padding: 11px 10px; cursor: pointer; }
.pc-reread:disabled { opacity: 0.55; cursor: default; }
.pc-breathe { animation: pc-breathe 1.6s ease-in-out infinite; }
@keyframes pc-breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ── rhythm ── */
.pc-rhythm { border-top: 1px solid var(--pc-line); padding-top: 12px; }
.pc-dots { display: flex; flex-wrap: wrap; gap: 5px; }
.pc-dot { width: 9px; height: 9px; border-radius: 50%; background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.16); }
.pc-dot.hit { background: var(--pc-accent); box-shadow: none; }
.pc-dots-cap { font-size: 11.5px; color: var(--pc-muted); margin: 5px 0 10px; }
.pc-dots-cap b { color: #fff; }
.pc-spark { display: flex; align-items: flex-end; gap: 3px; height: 44px; }
.pc-spark-bar { flex: 1 1 0; min-height: 2px; background: rgba(255, 255, 255, 0.09);
  border: none; border-radius: 2px 2px 0 0; padding: 0; cursor: pointer; position: relative; }
.pc-spark-bar.hit { background: var(--pc-accent); opacity: 0.85; }
.pc-spark-bar.teal.hit { background: var(--pc-teal); }
.pc-spark-bar.active::after { content: attr(data-v); position: absolute; bottom: 100%; left: 50%;
  transform: translateX(-50%); margin-bottom: 4px; background: #26262c; color: #fff;
  font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px; white-space: nowrap; z-index: 3; }

/* ── collapsed sections ── */
.pc-sec { border-top: 1px solid var(--pc-line); }
.pc-sec-head { display: flex; align-items: center; gap: 8px; min-height: 44px;
  cursor: pointer; list-style: none; }
.pc-sec-head::-webkit-details-marker { display: none; }
.pc-sec-head::marker { content: none; }
.pc-sec-title { font-size: 11px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--pc-muted); }
.pc-hint { margin-left: auto; font-size: 12px; color: var(--pc-faint); font-variant-numeric: tabular-nums; }
.pc-chev { flex: none; width: 7px; height: 7px; border-right: 2px solid var(--pc-faint);
  border-bottom: 2px solid var(--pc-faint); transform: rotate(45deg); transition: transform 0.18s; }
details[open] > summary .pc-chev { transform: rotate(225deg); }
.pc-sec-body { padding: 2px 0 14px; }

/* money */
.pc-hero { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.pc-hero-usd { font-size: 28px; font-weight: 800; color: var(--pc-teal); font-variant-numeric: tabular-nums; }
.pc-hero-sub { font-size: 12px; color: var(--pc-muted); }
.pc-kinds { display: flex; flex-direction: column; gap: 7px; }
.pc-kind { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.pc-kind-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; align-self: center; }
.pc-kind-l { font-size: 13px; font-weight: 700; color: #d6d6de; }
.pc-kind-n { font-size: 14px; font-weight: 800; color: #fff; margin-left: auto; }
.pc-kind-s { font-size: 11.5px; color: var(--pc-faint); width: 108px; text-align: right; }
.pc-meta-line { font-size: 12.5px; color: var(--pc-muted); margin-top: 10px; }
.pc-meta-line b { color: #fff; }

/* privates */
.pc-sess-list { display: flex; flex-direction: column; }
.pc-sess { display: flex; align-items: center; gap: 10px; min-height: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-variant-numeric: tabular-nums; }
.pc-sess:last-child { border-bottom: none; }
.pc-sess-d { font-size: 13px; color: #d6d6de; width: 58px; }
.pc-sess-kind { font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em; border-radius: 5px;
  padding: 2px 7px; color: #e9d5ff; background: rgba(168, 85, 247, 0.22); }
.pc-sess-kind.spy { color: #bae6fd; background: rgba(125, 211, 252, 0.16); }
.pc-sess-tk { margin-left: auto; font-size: 13px; font-weight: 700; color: #fff; }
.pc-more { display: block; width: 100%; background: none; border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 10px; color: var(--pc-muted); font-size: 12.5px; font-weight: 700;
  padding: 8px; margin-top: 8px; cursor: pointer; }

/* history */
.pc-weeks { display: flex; align-items: flex-end; gap: 4px; height: 52px; margin-top: 4px; }
.pc-feed { margin-top: 6px; }
.pc-dayc { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.07em;
  text-transform: uppercase; color: #e9d5ff; background: rgba(168, 85, 247, 0.16);
  border-radius: 999px; padding: 2px 9px; margin: 10px 0 2px; }
.pc-evt { display: flex; align-items: baseline; gap: 8px; min-height: 30px; font-variant-numeric: tabular-nums; }
.pc-evt-t { flex: none; width: 58px; font-size: 11.5px; color: var(--pc-faint); }
.pc-evt-k { flex: 1 1 auto; min-width: 0; font-size: 13px; color: #d6d6de; overflow-wrap: anywhere; }
.pc-evt-k i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 6px; }
.pc-evt-msg { display: block; font-size: 12px; color: var(--pc-mint); }
.pc-evt-a { flex: none; font-size: 12.5px; font-weight: 700; color: #fff; }

/* identity */
.pc-aka { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.pc-aka:empty { display: none; }
.pc-aka-l { font-size: 11px; color: var(--pc-muted); letter-spacing: 0.04em; }
.pc-aka-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  color: var(--pc-fact); background: rgba(125, 211, 252, 0.09);
  border: 1px solid rgba(125, 211, 252, 0.25); border-radius: 999px; padding: 3px 9px; }
.pc-aka-chip button { background: none; border: none; color: var(--pc-muted);
  cursor: pointer; font-size: 14px; padding: 0 0 0 2px; line-height: 1; }
.pc-link-row { margin-top: 6px; }
.pc-link-drop { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px;
  background: #1b1b21; border: 1px solid rgba(125, 211, 252, 0.3); border-radius: 10px;
  overflow: hidden auto; z-index: 10; max-height: 208px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55); }
.pc-ld-row { display: flex; align-items: center; gap: 8px; width: 100%; background: none;
  border: none; padding: 9px 10px; text-align: left; color: #e8e8ee; font-size: 14px; cursor: pointer; }
.pc-ld-row:active, .pc-ld-row:hover { background: rgba(125, 211, 252, 0.1); }
.pc-ld-row .plat-badge { font-size: 9px; }
.pc-ld-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-ld-ai { color: var(--pc-name); font-weight: 700; }
.pc-ld-amt { flex: none; font-size: 12px; color: var(--pc-muted); font-variant-numeric: tabular-nums; }

/* note + skeletons */
.pc-note { min-height: 16px; margin-top: 10px; text-align: center; font-size: 12px; color: var(--pc-muted); }
.pc-note--ok { color: #86efac; }
.pc-note--err { color: #fca5a5; }
.pc-note--flash { animation: pc-flash 0.25s ease; }
@keyframes pc-flash { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; } }
.pc-skel { background: rgba(255, 255, 255, 0.07); border-radius: 6px; animation: pc-breathe 1.4s ease-in-out infinite; }
.pc-skel--n { height: 34px; width: 70%; margin: 4px auto; }
.pc-skel--line { height: 13px; margin-top: 8px; }
.pc-skel--bar { height: 44px; }

/* ── parasocial meter ── */
.pc-meter { display: flex; align-items: center; gap: 8px; margin-top: 8px; cursor: pointer; }
.pc-meter-track { position: relative; flex: 1 1 auto; height: 4px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.pc-meter-fill { display: block; height: 100%; border-radius: 2px; background: var(--pc-mb, #94a3b8);
  transition: width 0.4s ease; }
.pc-meter-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: #161619; }
.pc-meter-band { flex: none; font-size: 10px; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--pc-mb, #94a3b8); }
.pc-meter--noticed  { --pc-mb: #94a3b8; }
.pc-meter--familiar { --pc-mb: #2dd4bf; }
.pc-meter--invested { --pc-mb: #a78bfa; }
.pc-meter--bonded   { --pc-mb: #f472b6; }
.pc-meter--anchor   { --pc-mb: #fbbf24; }
.pc-meter--unrated .pc-meter-band { color: var(--pc-faint); }
.pc-meter-care { flex: none; color: #fca5a5; font-size: 12px; }
.pc-meter-sheet { margin-top: 8px; border: 1px solid var(--pc-line); border-radius: 12px;
  padding: 10px 12px; background: rgba(255, 255, 255, 0.03); }
.pc-ms-head { font-size: 13px; color: #fff; margin-bottom: 6px; text-transform: capitalize; }
.pc-ms-care { border: 1px solid rgba(252, 165, 165, 0.35); background: rgba(252, 165, 165, 0.07);
  border-radius: 8px; padding: 6px 9px; margin-bottom: 8px; }
.pc-ms-care-row { font-size: 12px; color: #fca5a5; }
.pc-ms-unmet { font-size: 11.5px; color: var(--pc-muted); margin-bottom: 8px; }
.pc-ms-chip { display: inline-block; border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 999px; padding: 1px 8px; margin: 2px 2px 0 2px; color: var(--pc-faint); }
.pc-ms-row { padding: 5px 0; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.pc-ms-id { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; margin-right: 6px; }
.pc-ms-id--n { color: #94a3b8; } .pc-ms-id--f { color: #2dd4bf; } .pc-ms-id--i { color: #a78bfa; }
.pc-ms-id--b { color: #f472b6; } .pc-ms-id--a { color: #fbbf24; }
.pc-ms-q { font-size: 12px; color: var(--pc-muted); }

/* ── page mode: full-bleed, no box — the 16px wrapper padding IS the margin ── */
.pc-page .pc-card {
  background: transparent; border: none; border-radius: 0;
  padding: 4px 0 24px;
}
.pc-page { max-width: 620px; }
/* meter: leading label so the bar is never a mystery */
.pc-meter-lead { flex: none; font-size: 9px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--pc-faint); }
/* section icons */
.pc-sec-ic { display: inline-block; margin-right: 7px; font-size: 12px; opacity: 0.9;
  vertical-align: -1px; filter: grayscale(0.15); }
/* richer activity strip */
.pc-actihead { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.pc-acti-l { font-size: 11.5px; color: var(--pc-muted); letter-spacing: 0.02em; }
.pc-acti-r { font-size: 11.5px; color: #cdb4f6; font-variant-numeric: tabular-nums; }
.pc-acti-r b { color: #fff; }
.pc-faint { color: var(--pc-faint); }
.pc-spark { align-items: flex-end; }
.pc-spark-bar { display: flex; align-items: flex-start; justify-content: center; overflow: visible; }
.pc-spark-bar.today { box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.55); }
.pc-spark-bar.today.hit { background: var(--pc-accent); }
.pc-spark-wd { position: absolute; top: 100%; margin-top: 3px; font-size: 8px; font-style: normal;
  color: var(--pc-faint); pointer-events: none; }
.pc-spark { margin-bottom: 14px; }

/* ── reach (off-platform contacts) ── */
.pc-reach-list { display: flex; flex-direction: column; gap: 6px; }
.pc-rc-wrap { display: flex; align-items: center; gap: 6px; }
.pc-rc { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 8px;
  text-decoration: none; padding: 7px 10px; border-radius: 9px;
  background: rgba(125, 211, 252, 0.07); border: 1px solid rgba(125, 211, 252, 0.18); }
.pc-rc:active { background: rgba(125, 211, 252, 0.13); }
.pc-rc--nolink { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
.pc-rc-ic { flex: none; font-size: 13px; }
.pc-rc-v { flex: 0 1 auto; min-width: 0; color: #bae6fd; font-weight: 700; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-rc--nolink .pc-rc-v { color: #e8e8ee; }
.pc-rc-why { flex: 1 1 auto; min-width: 0; font-size: 11.5px; color: var(--pc-muted); overflow-wrap: anywhere; }
.pc-reach-add { align-items: stretch; }
.pc-rc-kind { flex: none; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; color: #e8e8ee; font-size: 13px; padding: 0 8px; }
.pc-reach-add .pc-del { display: none; }
.pc-editing .pc-reach-list .pc-del { display: inline-flex; }
.pc-reach-list .pc-del { display: inline-flex; }
