/* ================================================================
   18-profile.css: the profile page (#profile-page, #pp-*) and its Setup subpage (#setup-content, .su-*).
   Single source of styling for both (owner 2026-09-27 redesign): the old #pp-* rules in 14-feed.css and
   the inline style="" attributes in index.html were deleted, nothing here is an override layer.
   Scale: spacing 4/8/12/16/24; controls 34px tall, radius 8px; cards radius var(--win-radius);
   type 20/13/12/11/10. Accent colors always via var(--blue) + color-mix so every accent + dark mode work.
   ================================================================= */

/* ── Page frame ─────────────────────────────────────────────────── */
#profile-page::-webkit-scrollbar { width: 5px; }
#profile-page::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }
#profile-page-inner { display: flex; flex-direction: column; min-height: 100%; position: relative; }

/* Back-nav bar: overlaid on the banner (absolute, soft top scrim); only the button takes pointer events. */
#profile-page-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.38), rgba(0,0,0,0));
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  pointer-events: none;
}
#profile-back-btn {
  background: rgba(0,0,0,0.42); border: none; cursor: pointer;
  font-size: 12px; font-weight: 700; color: #fff;
  padding: 6px 14px; border-radius: 999px; transition: background 0.12s;
  pointer-events: auto;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
#profile-back-btn:hover { background: rgba(0,0,0,0.62); }

/* ── Banner ("'Me' Totem") ──────────────────────────────────────── */
#pp-banner {
  width: 100%; height: 160px; flex-shrink: 0;
  background: linear-gradient(135deg, #3574c4 0%, #5848a0 60%, #1a8a8a 100%);
  position: relative; overflow: hidden;
}
#pp-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Overlay edit buttons: exist only in edit mode (#profile-page.pp-editing, set by 13f _ppRenderTab while the
   Setup subpage is open). 13f still sets inline display '' (own) / 'none' (other) so they never show on
   anyone else's profile. Same dark pill idiom for both, so they read as one family of controls. */
.pp-overlay-btn {
  display: none;
  align-items: center; justify-content: center; gap: 6px;
  background: rgba(0,0,0,0.55); color: #fff;
  border: 1px solid rgba(255,255,255,0.35); border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1.2;
  padding: 6px 12px; cursor: pointer; white-space: nowrap;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  transition: background 0.12s;
}
.pp-overlay-btn:hover { background: rgba(0,0,0,0.75); }
.pp-overlay-btn .ico { width: 12px; height: 12px; }
#pp-banner-edit-btn { position: absolute; bottom: 12px; right: 12px; z-index: 4; }
#profile-page.pp-editing #pp-banner-edit-btn { display: inline-flex; }

/* Banner picker (swatches + upload), anchored above the banner button */
#pp-banner-picker {
  display: none; position: absolute; bottom: 48px; right: 12px; z-index: 5;
  flex-direction: column; align-items: stretch; gap: 8px;
  background: rgba(30,30,30,0.94);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 12px;
  padding: 12px;
}
#pp-banner-picker.open { display: flex; }
.pp-banner-swatches { display: grid; grid-template-columns: repeat(4, 36px); gap: 6px; }
.pp-banner-swatch {
  width: 36px; height: 24px; border-radius: 6px; cursor: pointer;
  border: 2px solid transparent; transition: border-color 0.12s, transform 0.1s;
}
.pp-banner-swatch:hover { transform: scale(1.1); }
.pp-banner-swatch.active { border-color: #fff; }
.pp-banner-picker-label { font-size: 10px; color: rgba(255,255,255,0.6); text-align: center; font-weight: 700; }
.pp-banner-upload-btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 32px;
  border: 1px solid rgba(255,255,255,0.2); border-radius: 8px;
  background: rgba(255,255,255,0.08); color: #fff; cursor: pointer;
}
.pp-banner-upload-btn:hover { background: rgba(255,255,255,0.16); }

/* ── Hero: centered stack (avatar over the banner edge, name, handle, actions) ── */
#pp-hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 8px; padding: 0 16px 16px;
  border-bottom: 1px solid var(--line);
}
#pp-avatar-wrap {
  position: relative; z-index: 2;
  margin-top: -48px;
  width: 96px; height: 96px; box-sizing: border-box; padding: 4px;
  border-radius: 16px; background: var(--card);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
#pp-avatar {
  width: 88px; height: 88px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; color: #fff;
  background-size: cover; background-position: center;
}
/* "Rat avatar": full-face overlay on the avatar in edit mode (same family as the banner button). */
#pp-avatar-edit-btn {
  position: absolute; inset: 4px; z-index: 3;
  border-radius: 12px; border: none; padding: 4px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
#profile-page.pp-editing #pp-avatar-edit-btn { display: flex; }

/* Avatar picker: drops down under the avatar, centered on it */
#pp-avatar-picker {
  display: none; position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  z-index: 130; flex-direction: column; gap: 8px;
  width: 240px; padding: 12px; box-sizing: border-box;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.pp-picker-row { display: flex; gap: 6px; align-items: center; }
.pp-picker-input {
  flex: 1; min-width: 0; min-height: 32px; padding: 6px 10px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--txt); font-size: 12px;
}
.pp-picker-input:focus { outline: none; border-color: var(--blue); }
.pp-picker-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 32px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg2); color: var(--dim); cursor: pointer; font-size: 12px;
}
.pp-picker-btn:hover { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 55%, transparent); }

#pp-identity { display: flex; flex-direction: column; align-items: center; gap: 2px; }
#pp-name   { font-size: 20px; font-weight: 800; color: var(--txt); line-height: 1.2; overflow-wrap: anywhere; }
/* Level badge under the handle (owner 2026-10-03, js/13f-profile-page.js palLevelFor): the word, then a thin bar for the
   way to the next level. It warms from the theme colour towards gold as the level rises (data-level 1..9). */
#pp-level { display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; cursor: default; }
#pp-level .pp-level-word {
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em; padding: 1px 8px; border-radius: 999px;
  color: var(--lv-ink); border: 1px solid color-mix(in srgb, var(--lv-ink) 45%, transparent);
  background: color-mix(in srgb, var(--lv-ink) 10%, transparent);
}
#pp-level .pp-level-bar { width: 64px; height: 4px; border-radius: 2px; overflow: hidden; background: color-mix(in srgb, var(--faint) 25%, transparent); }
#pp-level .pp-level-bar > span { display: block; height: 100%; background: var(--lv-ink); }
#pp-level { --lv-ink: var(--theme); }
#pp-level[data-level="4"], #pp-level[data-level="5"] { --lv-ink: color-mix(in srgb, var(--theme) 50%, #c99a2e); }
#pp-level[data-level="6"], #pp-level[data-level="7"] { --lv-ink: #c99a2e; }
#pp-level[data-level="8"], #pp-level[data-level="9"] { --lv-ink: #b8860b; }
#pp-level[data-level="9"] .pp-level-word { box-shadow: 0 0 8px color-mix(in srgb, #c99a2e 55%, transparent); }
#pp-handle { font-size: 13px; color: var(--blue); }

/* Action row: own-profile buttons or the other-user cluster, one centered wrapping row */
#pp-hero-actions {
  position: relative;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
  margin-top: 4px;
}
#pp-other-actions { display: none; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }

.pp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 30px; padding: 5px 14px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--dim);
  font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.pp-btn .ico { width: 13px; height: 13px; }
.pp-btn:hover {
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 55%, transparent);
  background: color-mix(in srgb, var(--blue) 8%, transparent);
}
/* #profile-page prefix: outranks the global `body.dark-mode button { color: var(--dim) }` (01-tokens). */
/* "Setup mock-computes" while the Setup subpage is open (it replaces the old Setup tab, owner 2026-10-02). */
#profile-page #pp-edit-bio-btn.active { color: var(--theme); border-color: var(--theme); background: color-mix(in srgb, var(--theme) 10%, transparent); }
#profile-page .pp-btn-green { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 8%, transparent); }
#profile-page .pp-btn-green:hover { color: var(--green); border-color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
#profile-page .pp-btn-red { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); }
#profile-page .pp-btn-red:hover { color: var(--red); border-color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }
#pp-dots-btn { padding: 5px 10px; font-size: 13px; letter-spacing: 0.05em; }

/* Spy-Gyps: state carried by the data attribute 13f sets */
#pp-spy-btn[data-active="1"] { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 50%, transparent); }
/* "Peer / Creep" (owner 2026-10-02; js/10g-settings-profile.js palPeerCreepHtml): the shared segmented look
   (.seg-toggle, css/20-theme.css); a lit Peer reads green, a lit Creep red. Used on profiles, the profile
   pop-up card, user lists and the Swoll of Follows suggestions. */
.pc-toggle { flex-shrink: 0; }
.pc-toggle .vba-seg { cursor: pointer; }
body .pc-toggle .vba-seg.on[data-v="peer"]  { color: var(--green); }
body .pc-toggle .vba-seg.on[data-v="creep"] { color: var(--red); }
#pp-pc-slot { display: inline-flex; align-items: center; }
/* On a profile it is the main relationship control: as tall and legible as the buttons beside it (it read as a
   faint grey pill and was overlooked, owner 2026-10-02 round 8). */
#profile-page #pp-pc-slot .pc-toggle { min-height: 30px; padding: 3px; border-color: var(--line); font-size: 12px; }
#profile-page #pp-pc-slot .pc-toggle .vba-seg { padding: 4px 14px; opacity: 0.8; color: var(--txt); }
#profile-page #pp-pc-slot .pc-toggle .vba-seg:hover { opacity: 1; background: rgba(127,127,127,0.14); }
#pp-follows-you {
  font-size: 10px; color: var(--faint);
  padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px;
}

/* Dots dropdown: anchored under the action row's right edge; 13f toggles inline display block/none */
#pp-dots-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 100;
  min-width: 160px; padding: 6px 0;
  background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  text-align: left;
}

/* ── About: bio, meta, tags, stats, cards ───────────────────────── */
/* Visibility handshake: 13f shows these with style.display = '' and hides with 'none', so the HIDDEN state
   is the inline style="display:none" in index.html and the rules here define only the VISIBLE display. */
#pp-about { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 0; }
#pp-user-note {
  font-size: 11px; color: var(--amber); text-align: center;
  background: color-mix(in srgb, var(--amber) 8%, transparent);
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
}
#pp-mutuals { font-size: 11px; color: var(--dim); text-align: center; }
#pp-bio {
  font-size: 13px; color: var(--dim); line-height: 1.55; font-style: italic;
  text-align: center; max-width: 520px; margin: 0 auto; overflow-wrap: anywhere;
}
#pp-bio-edit { display: flex; flex-direction: column; gap: 8px; }
.pp-edit-label { font-size: 11px; font-weight: 700; color: var(--faint); }
.pp-edit-input {
  width: 100%; box-sizing: border-box; min-height: 34px; padding: 7px 11px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg0); color: var(--txt); font-size: 12px; font-family: var(--mono);
}
.pp-edit-input:focus { outline: none; border-color: var(--blue); }
textarea.pp-edit-input { resize: vertical; line-height: 1.4; }
.pp-edit-actions { display: flex; justify-content: flex-end; gap: 8px; }
#pp-bio-error { font-size: 10px; color: var(--red); }

>>>

#pp-tags { flex-wrap: wrap; justify-content: center; gap: 4px; }   /* 13f sets display flex/none */
#pp-tags .fp-tag-chip { margin: 0; }

/* Stat cells: number above label, equal widths, one row. 13f shows the row with inline display flex and
   each cell with inline '' (-> this .pp-stat rule) or 'none'. Hidden cells take no width, so the visible
   ones always share the row evenly. */
#pp-stats-row { gap: 8px; }
.pp-stat {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 4px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: var(--win-radius); background: var(--card);
  transition: border-color 0.12s;
}
.pp-stat[onclick] { cursor: pointer; }
.pp-stat[onclick]:hover { border-color: color-mix(in srgb, var(--blue) 55%, transparent); }
.pp-stat-n { font-size: 18px; font-weight: 800; color: var(--txt); line-height: 1.1; }
.pp-stat-l { font-size: 10px; color: var(--faint); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
#pp-stats { display: none; }   /* legacy stats line: kept as a JS target only */

/* Cards (pinned post, heatmap) */
.pp-card {
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--win-radius); background: var(--card);
}
.pp-card-label { font-size: 11px; font-weight: 700; color: var(--faint); letter-spacing: 0.04em; margin-bottom: 8px; }
#pp-pinned-content { font-size: 12px; color: var(--dim); }
/* 56 day cells, 7 per column, oldest at the left: a contribution grid (cells are 8px divs from 13f) */
#pp-heatmap-grid {
  display: grid; grid-template-rows: repeat(7, 8px); grid-auto-flow: column; grid-auto-columns: 8px;
  gap: 3px; justify-content: center;
}
/* The grid is small (8 weeks); a full-width card left it floating in empty space, so the card hugs it. */
#pp-heatmap { align-self: center; width: fit-content; }

/* Personal rows (Sex axes, Zodiac, Sexed exes, Me gem): a key/value card, shown directly (owner 2026-10-04) */
#pp-unfurl {
  display: flex; flex-direction: column; gap: 8px;
  margin: 12px 16px 0; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--win-radius); background: var(--card);
}
.pp-kv { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 12px; }
.pp-kv-k { font-size: 11px; font-weight: 700; color: var(--faint); white-space: nowrap; }
.pp-kv-v { color: var(--txt); text-align: right; overflow-wrap: anywhere; }
/* "Yeti's sitey" (owner 2026-10-05): the user's own website, one link on the profile. */
.pp-site-link { color: var(--accent, var(--blue)); font-weight: 700; text-decoration: none; cursor: pointer; }
.pp-site-link:hover { text-decoration: underline; }
#pp-unfurl-me-gem-link { color: var(--blue); text-decoration: none; cursor: pointer; }
#pp-unfurl-me-gem-link:hover { text-decoration: underline; }

/* ── Tabs ───────────────────────────────────────────────────────── */
/* Tabs wrap onto centered rows instead of scrolling: a hidden-scrollbar strip clipped the last tabs
   ("Some Memos") with no visible way to reach them. */
#pp-tabs {
  display: flex; flex-wrap: wrap; justify-content: center; flex-shrink: 0;
  margin: 16px 16px 0;
  border-bottom: 1px solid var(--line);
}
body.dark-mode #pp-tabs { background: transparent; }   /* 01-tokens paints it; the redesign has no bar fill */
.pp-tab {
  flex: 0 1 auto;
  padding: 10px 12px 9px; margin-bottom: -1px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.03em; white-space: nowrap;
  color: var(--faint); background: transparent;
  border: none; border-bottom: 2px solid transparent;
  cursor: pointer; transition: color 0.13s, border-color 0.13s;
}
.pp-tab:hover { color: var(--dim); }
.pp-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

/* Tab content: left padding matches feed-scroll for avatar clearance */
#pp-posts-list { display: flex; flex-direction: column; gap: 8px; padding: 16px 12px 80px 20px; overflow-x: visible; }
#pp-setup-host { padding: 16px 12px 80px 20px; }
.pp-potd-win { display: flex; flex-direction: column; }

/* ================================================================
   Setup subpage ("Setup mock-computes" button): grouped settings cards.
   Every row is label (left) + control (right); stacked under 460px of column width.
   Save buttons sit at the right end of a field's last line.
   ================================================================= */
#setup-content { container-type: inline-size; display: flex; flex-direction: column; gap: 16px; }
.su-card {
  border: 1px solid var(--line); border-radius: var(--win-radius); background: var(--card);
  overflow: hidden;
}
.su-row {
  display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 8px 16px; align-items: start;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.su-row:first-child { border-top: none; }
.su-label { font-size: 12px; font-weight: 700; color: var(--txt); line-height: 1.3; padding-top: 8px; }
.su-ctl { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
@container (max-width: 460px) {
  .su-row { grid-template-columns: minmax(0, 1fr); }
  .su-label { padding-top: 0; }
}

/* Fields */
.su-field { display: flex; align-items: center; gap: 8px; }
.su-field > .su-input { flex: 1; min-width: 0; }
.su-input {
  width: 100%; box-sizing: border-box; min-height: 34px; padding: 7px 11px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg2); color: var(--txt); font-size: 12px; font-family: var(--mono);
}
.su-input:focus { outline: none; border-color: var(--blue); }
.su-input::placeholder { color: var(--faint); }
textarea.su-input { resize: none; line-height: 1.4; }
.su-end { display: flex; justify-content: flex-end; }
.su-save {
  flex-shrink: 0; min-height: 34px; padding: 7px 14px;
  border: none; border-radius: 8px;
  background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap;
  cursor: pointer; transition: filter 0.12s, opacity 0.12s;
}
.su-save:hover { filter: brightness(1.08); }
.su-save:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
/* "E-Vast Save" appears only once its setting was changed (owner 2026-10-02; js/14c-setup.js _suRefresh). Hidden
   in place (keeps the field from jumping when it appears), except the Sig's own row, which collapses. */
#setup-content .su-save:not(.su-dirty) { visibility: hidden; pointer-events: none; }
#setup-content .su-end:has(> .su-save:not(.su-dirty)) { display: none; }
/* Leaving with that change unsaved: "?" and a short flash in the theme colour (once; the next click leaves). */
#setup-content .su-save.su-ask::after { content: '?'; }
#setup-content .su-save.su-flash { animation: su-ask-flash 0.45s ease-in-out 3; }
@keyframes su-ask-flash {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--theme) 0%, transparent); filter: none; }
  50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--theme) 45%, transparent); filter: brightness(1.25); }
}
@media (prefers-reduced-motion: reduce) { #setup-content .su-save.su-flash { animation: none; outline: 3px solid var(--theme); } }
.su-ghost {
  min-height: 30px; padding: 5px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--dim); font-size: 11px; font-weight: 600; white-space: nowrap;
  cursor: pointer; transition: color 0.12s, border-color 0.12s;
}
.su-ghost:hover { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 55%, transparent); }
.su-status { font-size: 10px; color: var(--faint); min-height: 12px; }
.su-color {
  flex-shrink: 0; width: 34px; height: 34px; padding: 2px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); cursor: pointer;
}
/* File picker: the label IS the button (its hidden <input type=file> keeps id + onchange) */
.su-file {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 5px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--dim); font-size: 11px; font-weight: 600; white-space: nowrap;
  cursor: pointer; transition: color 0.12s, border-color 0.12s;
}
.su-file:hover { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 55%, transparent); }
.su-file .ico { width: 12px; height: 12px; }
.su-file-name { font-size: 11px; color: var(--accent); font-family: var(--mono); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Palindrome fields = unified Segments (PalSegment mounted by 14c over the hidden input, owner 2026-09-29).
   The segment keeps its left | right cells; here it only gets the field frame of this page. Its blinking
   carets show ONLY in the focused field (every mounted segment keeps its last render, carets included). */
#setup-content .su-seg-cell {
  flex: 1; min-width: 0; min-height: 34px; padding: 5px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg2);
  font-size: 12px; box-sizing: border-box;
}
#setup-content .su-seg-cell:focus-within { border-color: var(--theme); }
#setup-content .su-seg-cell:not(:focus-within) :is(.typing-cursor, .typing-cursor-mirror) { visibility: hidden; }
#setup-content .su-seg-nosuggest .suggest-handle { display: none; }
/* Always one connected palindrome here, so no Unify button; a compact frame. */
#setup-content .su-seg-cell .btn-connect { display: none; }
#setup-content .su-seg-cell.fc-cell { min-height: 34px; padding: 4px 10px; }
/* Each half on ONE line: suggest handle, letters, handle (they stacked vertically outside the composer's context). */
#setup-content .su-seg-cell :is(.fc-cell-left, .fc-cell-right) { display: flex; align-items: center; gap: 2px; }
#setup-content .su-seg-cell .fc-cell-left  { justify-content: flex-end; }
#setup-content .su-seg-cell .fc-cell-right { justify-content: flex-start; }
/* Search spots are out of flow at their text position (css/13). Setup fields are normally JOINED (14c sets
   connected; 09c _feedCellJoin), where that applies unchanged; only a split half's one-line flex row takes them back
   in flow as ordinary flex items. */
#setup-content .su-seg-cell :is(.fc-cell-left, .fc-cell-right) > .suggest-handle { position: relative; margin: 0; }

.su-row-inline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.su-danger-sub { font-weight: 600; opacity: 0.75; margin-left: 4px; }

/* Switch rows: the real checkbox (id + onchange kept) drawn as a toggle */
/* The switch sits right after its text (owner 2026-09-29: "I ax A.I." had it at the far right edge). */
.su-switch { display: inline-flex; align-self: flex-start; align-items: center; justify-content: flex-start; gap: 12px; font-size: 12px; color: var(--txt); cursor: pointer; }
.su-switch .su-sub { display: block; font-size: 10px; color: var(--faint); margin-top: 1px; }
.su-row-inline .su-sub { font-size: 10px; color: var(--faint); }
.su-switch input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  position: relative; flex-shrink: 0; margin: 0;
  width: 36px; height: 20px; border-radius: 999px;
  background: var(--line); cursor: pointer; transition: background 0.15s;
}
.su-switch input[type="checkbox"]::before {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.15s;
}
.su-switch input[type="checkbox"]:checked { background: var(--blue); }
.su-switch input[type="checkbox"]:checked::before { transform: translateX(16px); }
.su-switch input[type="checkbox"]:focus-visible { outline: 2px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; }

/* Chip grid (Sex axes): each chip is a label around a visually hidden radio, the checked one highlighted */
.su-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.su-chip { position: relative; cursor: pointer; }
.su-chip input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
/* Toot buttons share the chip surface (owner 2026-10-06). */
button.su-chip { padding: 0; border: none; background: none; font: inherit; color: inherit; text-align: inherit; }
.su-chip span {
  display: inline-block; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg2); color: var(--dim); font-size: 11px; font-weight: 600; white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.su-chip:hover span { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 45%, transparent); }
.su-chip input[type="radio"]:checked + span,
.su-chip.active span {
  background: color-mix(in srgb, var(--blue) 12%, transparent);
  border-color: color-mix(in srgb, var(--blue) 60%, transparent);
  color: var(--blue);
}
.su-chip input[type="radio"]:focus-visible + span,
button.su-chip:focus-visible span { outline: 2px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; }

/* Read-only value pill (El cycle, set by the system) */
.su-pill {
  display: inline-flex; align-items: center; align-self: flex-start;
  min-height: 34px; padding: 0 14px; box-sizing: border-box;
  border: 1px dashed var(--line); border-radius: 8px;
  background: var(--bg0); color: var(--dim);
  font-family: var(--mono); font-size: 13px; font-weight: 700;
}

/* Account card: full-width action rows, the danger zone visually separated */
.su-act {
  display: block; width: 100%; padding: 13px 16px; box-sizing: border-box;
  border: none; border-top: 1px solid var(--line);
  background: transparent; color: var(--txt);
  font-size: 12px; font-weight: 600; text-align: left; cursor: pointer;
  transition: background 0.12s;
}
.su-act:first-child { border-top: none; }
.su-act:hover { background: color-mix(in srgb, var(--blue) 7%, transparent); }
.su-act.su-danger {
  color: var(--red);
  border-top: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  background: color-mix(in srgb, var(--red) 5%, transparent);
}
.su-act.su-danger:hover { background: color-mix(in srgb, var(--red) 12%, transparent); }

/* Dark mode: the accent (--blue) is LIGHT there, and the global `body.dark-mode button { color: var(--dim) }`
   (css/01-tokens.css) outranks these class rules, so filled accent buttons get the dark page tone as text. */
body.dark-mode .su-save,

/* ── Compact profile header (owner 2026-09-29: "WAY too big and empty ... be more compact") ──────────────────
   Was a centered vertical stack: 160px banner, 96px avatar, name, handle, buttons, a divider, "Joined", three
   full-width stat cards and two rows of tabs (~335px before any content). Now: a shorter banner, the avatar on
   the left with name/handle beside it and the actions on the right, bio + meta left-aligned under them, the
   stats as one row of small chips, and the tabs left-aligned with tighter padding, wrapping to a second row only
   when they do not fit (a sideways-scrolling strip hid "Setup" off the right edge). Overrides the rules above. */
/* Owner 2026-09-30: the background picture a bit taller, with rounded bottom corners. */
#pp-banner { height: 132px; border-radius: 0 0 18px 18px; }
#pp-hero {
  flex-direction: row; flex-wrap: wrap; align-items: flex-end; text-align: left;
  gap: 8px 12px; padding: 0 16px 6px; border-bottom: none;
}
#pp-avatar-wrap { margin-top: -36px; width: 72px; height: 72px; padding: 3px; border-radius: 12px; }
#pp-avatar { width: 66px; height: 66px; border-radius: 9px; font-size: 22px; }
#pp-avatar-edit-btn { inset: 3px; border-radius: 9px; }
#pp-avatar-picker { left: 0; transform: none; }
#pp-identity { flex: 1 1 160px; min-width: 0; align-items: flex-start; }
#pp-name { font-size: 17px; }
#pp-hero-actions { margin: 0 0 0 auto; justify-content: flex-end; }
#pp-other-actions { justify-content: flex-end; }

#pp-about { gap: 6px; padding: 2px 16px 0; }
#pp-user-note, #pp-mutuals { text-align: left; }
#pp-bio { text-align: left; margin: 0; max-width: none; font-size: 12px; line-height: 1.45; }
>>>


#pp-stats-row { flex-wrap: wrap; gap: 6px; }
.pp-stat {
  flex: 0 0 auto; flex-direction: row; align-items: baseline; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
}
.pp-stat-n { font-size: 13px; }
.pp-stat-l { font-size: 11px; }
.pp-card { padding: 8px 12px; }
#pp-heatmap { align-self: flex-start; }
>>>


#pp-tabs { justify-content: flex-start; margin: 8px 16px 0; }
.pp-tab { padding: 7px 8px 6px; }
#pp-posts-list { padding-top: 10px; }

/* "Semantic it names..." (owner 2026-09-29): a reserved slot in each identity row, visible while the row is
   hovered (or the button is focused), so the row never reflows; the overlay lists the names top to bottom. */
#setup-content .su-names-slot {
  flex-shrink: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: var(--dim); font: inherit; font-size: 11px; font-weight: 600; white-space: nowrap;
  cursor: pointer; visibility: hidden;
}
#setup-content .su-row:hover .su-names-slot, #setup-content .su-names-slot:focus-visible { visibility: visible; }
#setup-content .su-names-slot:hover { color: var(--theme); border-color: var(--theme); }
.setup-names-modal { position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.62); }
.setup-names-modal[hidden] { display: none; }
.setup-names-box {
  width: min(360px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 64px)); display: flex; flex-direction: column;
  gap: 8px; padding: 16px; border: 1px solid var(--glass-border); border-radius: 16px; background: var(--card);
  box-shadow: 0 12px 48px rgba(0,0,0,0.18);
}
.setup-names-box .fpm-claim-list { flex: 1; min-height: 0; overflow-y: auto; max-height: none; }
.setup-names-box .fpm-claim-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; font: inherit; }

/* Userbar maker (owner 2026-09-29): icon-only swatches that each draw a userbar from the Sig text. */
#setup-content .sig-maker { flex-wrap: wrap; gap: 6px; align-items: center; }
#setup-content .sig-swatch {
  width: 40px; height: 16px; border-radius: 3px; cursor: pointer; padding: 0;
  border: 1px solid rgba(0,0,0,0.45);
  background: linear-gradient(90deg, var(--sw-a), var(--sw-b));
  box-shadow: inset 0 8px 0 rgba(255,255,255,0.18);
}
#setup-content .sig-swatch:hover, #setup-content .sig-swatch.active { outline: 2px solid var(--theme); outline-offset: 2px; }
#setup-content .sig-swatch[data-style="theme"]  { --sw-a: var(--theme); --sw-b: #101010; }
#setup-content .sig-swatch[data-style="ember"]  { --sw-a: #ff7a18; --sw-b: #af002d; }
#setup-content .sig-swatch[data-style="ocean"]  { --sw-a: #6dd5ed; --sw-b: #2193b0; }
#setup-content .sig-swatch[data-style="forest"] { --sw-a: #38ef7d; --sw-b: #11998e; }
#setup-content .sig-swatch[data-style="violet"] { --sw-a: #8e2de2; --sw-b: #4a00e0; }
#setup-content .sig-swatch[data-style="gold"]   { --sw-a: #ffd200; --sw-b: #f7971e; }
#setup-content .sig-swatch[data-style="noir"]   { --sw-a: #555555; --sw-b: #111111; }
#setup-content .su-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; }
@keyframes su-need-glow { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 40% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 55%, transparent); } }
#setup-content .su-need { animation: su-need-glow 0.85s ease-in-out 1; }

/* PM Imp (owner 2026-09-30): the composer / reader dialogs and the joke 404 page (js/12d-pm-imp.js). */
#pp-pmimp-btn { margin-left: auto; }
.pmimp-overlay {
  position: fixed; inset: 0; z-index: 9600; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.35);
}
.pmimp-card {
  width: min(520px, calc(100vw - 32px)); padding: 14px 16px 16px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--glass-border); box-shadow: 0 12px 40px rgba(0,0,0,0.25); color: var(--txt);
}
.pmimp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pmimp-head .ico { width: 16px; height: 16px; color: var(--theme); }
.pmimp-title { font-weight: 800; letter-spacing: 0.03em; }
.pmimp-to { color: var(--faint); font-size: 12px; }
.pmimp-x { margin-left: auto; border: none; background: none; color: var(--faint); cursor: pointer; padding: 4px; border-radius: 6px; }
.pmimp-x:hover { color: var(--txt); background: color-mix(in srgb, var(--theme) 10%, transparent); }
.pmimp-cell { min-height: 44px; }
.pmimp-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.pmimp-spacer { flex: 1; }
.pmimp-joke {
  font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; cursor: pointer;
  border: 1px dashed color-mix(in srgb, var(--theme) 50%, var(--line)); background: none; color: var(--dim);
}
.pmimp-send {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 18px; border-radius: 999px; cursor: pointer;
  border: none; background: var(--theme); color: #fff; font-size: 12px; font-weight: 700;
}
.pmimp-send:disabled { opacity: 0.5; cursor: default; }
.pmimp-send .ico { width: 14px; height: 14px; }
.pmimp-text { font-size: 18px; line-height: 1.4; padding: 6px 2px 2px; overflow-wrap: anywhere; }
.pmimp-overlay.pmimp-404 { background: var(--bg); z-index: 9700; }
.pmimp-404-page { position: relative; text-align: center; }
.pmimp-404-page .pmimp-x { position: fixed; top: 16px; right: 16px; }
.pmimp-404-code { font-size: min(34vw, 260px); font-weight: 900; line-height: 1; color: var(--theme); letter-spacing: -0.04em; }
.pmimp-404-msg { font-size: 18px; font-weight: 700; color: var(--dim); margin-top: 8px; }

/* 'DIY' ID: heading at the top of Setup, and the letters-left countdown beside each palindrome field (2026-10-04) */
.su-page-title { font-size: 15px; font-weight: 800; color: var(--txt); margin: 2px 2px 10px; }
.su-countdown { flex: none; min-width: 1.2em; font-size: 12px; font-weight: 700; color: var(--theme, var(--blue));
  font-variant-numeric: tabular-nums; text-align: center; }
.su-countdown:empty { display: none; }
.su-countdown-full { color: var(--red); white-space: nowrap; }

/* E-Vast Save (owner 2026-10-06, twice: "insanely huge"): a small pill as tall as a line of text, lighter weight;
   in the Sig row it sits at the right end of the swatch line instead of on a line of its own. More specific than
   the compaction rule in css/20-theme.css, which loads later. */
#setup-content .su-ctl .su-save { padding: 1px 8px; min-height: 0; height: 20px; line-height: 18px; border-radius: 10px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.01em; }
#setup-content .su-ctl .sig-save-end { margin-left: auto; }

/* Userbars pixel-exact on every display (owner 2026-10-06): sized by --ub-w / --ub-h (js/14c-setup.js _ubSyncScale) so
   each bar pixel covers a whole number of screen pixels; image-rendering: pixelated then never splits a stroke. */
.fp-sig-image { width: var(--ub-w, 350px); height: var(--ub-h, 20px); max-width: none; image-rendering: pixelated; }
.fp-motto-bottom { width: var(--ub-w, 350px) !important; height: calc(19px * var(--ub-k, 1)) !important; max-width: none !important; }
#setup-content .sig-crop canvas { width: var(--ub-w, 350px); height: var(--ub-h, 20px); max-width: none; aspect-ratio: auto; }

#setup-post-preview { margin-bottom: 14px; }
#setup-post-preview button { pointer-events: none; }
/* Keep related choices in their own columns (owner 2026-10-06). */
#setup-sex-axes-group { grid-auto-flow: column; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(7, auto); align-items: start; }
#setup-sex-axes-group .su-chip:nth-child(1) { grid-column: 1; grid-row: 1; }
#setup-sex-axes-group .su-chip:nth-child(2) { grid-column: 1; grid-row: 2; }
#setup-sex-axes-group .su-chip:nth-child(3) { grid-column: 2; grid-row: 1; }
#setup-sex-axes-group .su-chip:nth-child(4) { grid-column: 2; grid-row: 2; }
#setup-sex-axes-group .su-chip:nth-child(5) { grid-column: 2; grid-row: 3; }
#setup-sex-axes-group .su-chip:nth-child(n+6) { grid-column: 3; }
#setup-sex-axes-group .su-chip span { white-space: normal; }
