/* ==========================================================================
   Profiles: user popouts, the full profile and the profile editor.
   Every size and color was measured from the live client (dark theme).
   ========================================================================== */
:root {
  --pf-card: var(--bg-surface-high); /* popout + profile card (#242429 in dark) */
  --pf-raised: #2c2d32;          /* status bubble, widget cards, menu cards, save bar */
  --pf-field: rgba(0, 0, 0, 0.122);
  --pf-line: rgba(151, 151, 159, 0.122);
  --pf-line-strong: rgba(151, 151, 159, 0.2);
  --pf-hover-line: rgba(151, 151, 159, 0.439);
}

/* ---------- shared bits ---------- */
.pf-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: none;
  height: 32px;
  min-width: 32px;
  padding: 0 11px;
  border: 1px solid rgba(151, 151, 159, 0.04);
  border-radius: 8px;
  background: rgba(151, 151, 159, 0.12);
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}
.pf-btn:hover { background: rgba(151, 151, 159, 0.16); }
.pf-btn.icon-only { width: 32px; padding: 0; }
.pf-btn.primary { border-color: rgba(255, 255, 255, 0.08); background: var(--brand); color: #fff; }
.pf-btn.primary:hover { background: #4752c4; }
.pf-btn.overlay { border-color: rgba(151, 151, 159, 0.04); background: rgba(0, 0, 0, 0.56); color: #fff; }
.pf-btn.overlay:hover { background: rgba(0, 0, 0, 0.64); }
.pf-btn.white { border-color: rgba(151, 151, 159, 0.12); background: #fff; color: #000; }
.pf-btn.white:hover { background: #e7e7e9; }
.pf-btn.full { width: 100%; }
.pf-btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.pf-btn .ic { display: flex; }

.pf-dot { flex: none; width: 4px; height: 4px; margin: 0 1px; border-radius: 50%; background: var(--text-default); }
.pf-badges { display: flex; align-items: center; gap: 2px; margin: 1px 0; }
.pf-badge { display: block; width: 20px; height: 20px; }

/* banner: the avatar's ring is a hole cut out of it */
.pf-banner { position: relative; background: var(--pf-banner, #5865f2) center / cover no-repeat; }
.pf-banner.has-image { background-image: var(--pf-banner-img); }

/* custom status "thought bubble" */
.pf-bubble-wrap { position: absolute; z-index: 1; display: flex; }
.pf-bubble-wrap::before, .pf-bubble-wrap::after { content: ""; position: absolute; border-radius: 50%; background: var(--pf-raised); }
.pf-bubble-wrap::before { left: 10px; top: -8px; width: 20px; height: 20px; }
.pf-bubble-wrap::after { left: -3px; top: -15px; width: 10px; height: 10px; }
.pf-bubble {
  position: relative;
  display: block;
  max-width: 100%;
  border: 1px solid rgba(151, 151, 159, 0.04);
  border-radius: 16px;
  background: var(--pf-raised);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  text-align: left;
}
.pf-bubble-inner { display: block; padding: 8px 12px; color: var(--text-default); font-size: 14px; line-height: 18px; overflow-wrap: anywhere; }
.pf-bubble-inner .clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pf-bubble-inner .emoji { width: 18px; height: 18px; margin-right: 4px; vertical-align: -4px; }
.pf-bubble .prompt { display: flex; align-items: flex-start; color: var(--text-muted); font-style: italic; }
.pf-bubble .prompt svg { flex: none; width: 16px; height: 16px; margin: 1px 4px 0 0; }
button.pf-bubble:hover, .pf-bubble.editable:hover { background: #313237; }

/* ---------- user popout ---------- */
.upp {
  position: fixed;
  z-index: 56;
  width: 300px;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  background: var(--pf-card);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 24px rgba(0, 0, 0, 0.24);
  animation: upp-in 0.12s ease-out;
}
@keyframes upp-in { from { opacity: 0; transform: translateX(-8px); } }
.upp.account { animation-name: upp-up; }
@keyframes upp-up { from { opacity: 0; transform: translateY(8px); } }
.upp-inner { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 0; max-height: inherit; padding-bottom: 4px; border-radius: 4px; overflow: hidden; }
.upp-bb { position: absolute; top: 8px; right: 12px; z-index: 2; display: flex; gap: 8px; }
.upp-bb button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.56);
  color: #fff;
}
.upp-bb button:hover { background: rgba(0, 0, 0, 0.72); }
.upp-header { position: relative; flex: none; height: 140px; }
.upp-banner {
  height: 105px;
  border-radius: 8px 8px 0 0;
  -webkit-mask: radial-gradient(46px at 56px calc(100% - 4px), transparent 45.5px, #000 46px);
  mask: radial-gradient(46px at 56px calc(100% - 4px), transparent 45.5px, #000 46px);
}
.upp-avatar { position: absolute; left: 16px; top: 61px; width: 80px; height: 80px; border-radius: 50%; cursor: pointer; }
.upp-avatar .av { width: 80px; height: 80px; }
.upp .pf-bubble-wrap { left: 105px; top: 98px; max-width: 179px; }
.upp-body {
  position: relative;
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0 8px 16px;
  padding-right: 8px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 16px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 16px), transparent);
}
.upp.account .upp-body { padding-bottom: 16px; -webkit-mask-image: none; mask-image: none; }
.upp-names { display: flex; flex-direction: column; }
.upp.account .upp-names { margin-bottom: -4px; }
.pf-name-row { display: flex; align-items: center; gap: 4px; min-height: 24px; }
.pf-name { min-width: 0; overflow: hidden; color: var(--text-default); font-size: 20px; font-weight: 600; line-height: 24px; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.pf-name:hover { text-decoration: underline; }
.pf-copy { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--text-subtle); opacity: 0; }
.pf-name-row:hover .pf-copy, .pf-copy:focus-visible { opacity: 1; }
.pf-copy:hover { color: var(--text-strong); }
.pf-tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-height: 24px; color: var(--text-strong); font-size: 14px; line-height: 18px; }
.pf-username { cursor: pointer; }
.pf-username:hover { text-decoration: underline; }
.pf-mutuals { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--text-subtle); font-size: 12px; line-height: 16px; }
.pf-mutuals .pf-dot { margin: 0; background: var(--text-subtle); }
.pf-mutuals button { display: flex; align-items: center; gap: 4px; color: inherit; }
.pf-mutuals button:hover { color: var(--text-strong); text-decoration: underline; }
.upp-bio-wrap { display: flex; flex-direction: column; }
.upp-bio { max-height: 55.25px; overflow: hidden; color: var(--text-strong); font-size: 14px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.upp-bio .emoji { width: 19.25px; height: 19.25px; vertical-align: -5px; }
.upp-fullbio { align-self: flex-start; margin-top: 8px; color: var(--text-strong); font-size: 12px; line-height: 16px; }
.upp-fullbio:hover { text-decoration: underline; }
.upp-card { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 8px; border-radius: 8px; background: var(--pf-raised); color: var(--text-default); font-size: 12px; font-weight: 500; line-height: 16px; cursor: pointer; }
.upp-card:hover { background: #313237; }
.upp-card-icons { display: flex; gap: 4px; }
.upp-card-icons span { position: relative; display: block; width: 24px; height: 24px; overflow: hidden; border-radius: 4px; background: rgba(151, 151, 159, 0.2) center / cover; }
.upp-card-icons span.more::after { content: attr(data-more); position: absolute; inset: 0; display: grid; place-items: center; border-radius: 4px; background: rgba(0, 0, 0, 0.6); color: #e0e0e3; font-size: 12px; font-weight: 500; }
.upp-footer { flex: none; padding: 0 16px 12px; }
.upp-msg { display: flex; align-items: center; height: 46px; padding-left: 15px; border: 1px solid var(--pf-line); border-radius: 8px; background: var(--pf-field); }
.upp-msg input { flex: 1; min-width: 0; height: 44px; padding: 11px 0; border: 0; background: transparent; color: var(--text-default); font: 400 14px/22px var(--font); letter-spacing: inherit; outline: none; }
.upp-msg input::placeholder { color: var(--text-muted); }
.upp-msg button { display: grid; place-items: center; width: 32px; height: 32px; margin-right: 12px; border-radius: 8px; color: var(--text-subtle); }
.upp-msg button:hover { color: var(--text-strong); }

/* account popout: status/accounts menu cards */
.upp-menus { display: flex; flex-direction: column; gap: 12px; }
.upp-menu { padding: 8px; border-radius: 8px; background: var(--pf-raised); }
.upp-menu > div:first-child::after { content: ""; display: block; height: 1px; margin: 8px; background: rgba(151, 151, 159, 0.12); }
.upp-mi { display: flex; align-items: center; height: 32px; border-radius: 8px; color: var(--text-subtle); font-size: 14px; font-weight: 500; line-height: 16px; cursor: pointer; }
.upp-mi:hover, .upp-mi.open { background: rgba(151, 151, 159, 0.122); color: var(--text-strong); }
.upp-mi-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 32px; padding: 8px; }
.upp-mi-main .ic { flex: none; display: grid; place-items: center; width: 16px; height: 16px; }
.upp-mi-main .lbl { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upp-mi-caret { flex: none; display: flex; align-items: center; height: 32px; padding: 0 8px; color: var(--text-subtle); }
.upp-mi-main + .upp-mi-caret.inline { padding: 0 8px 0 0; }
.upp-status-ic { width: 12px; height: 12px; }

/* status menu rows (inside the shared context menu) */
.ctx-menu.status-menu { width: 300px; max-width: 300px; }
.ctx-menu.status-menu .ctx-item { min-height: 36px; }
.ctx-menu.status-menu .ctx-item.tall { min-height: 52px; }
.ctx-menu.status-menu .ctx-icon { width: 20px; height: 20px; align-items: center; justify-content: center; }
.ctx-menu.duration-menu { width: 170px; }
.ctx-menu.switch-menu { width: 220px; }
.status-ic { display: block; }
.status-ic.online { color: var(--status-online); }
.status-ic.idle { color: var(--status-idle); }
.status-ic.dnd { color: var(--status-dnd); }
.status-ic.offline, .status-ic.invisible { color: var(--status-offline); }
.ctx-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ctx-user .name { font-weight: 400; }

/* ---------- full profile modal ---------- */
.fp-layer { position: fixed; inset: 0; z-index: 77; display: grid; place-items: center; }
.fp-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); animation: fade-in 0.15s ease-out; }
.fp-modal { position: relative; display: grid; grid-template-columns: auto auto; height: min(800px, calc(100vh - 32px)); border-radius: 16px; animation: fp-in 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
@keyframes fp-in { from { opacity: 0; transform: scale(0.94); } }
.fp-close { position: absolute; top: 8px; right: 8px; z-index: 3; }
.fp-head-btns { position: absolute; top: 8px; right: 8px; z-index: 3; display: flex; gap: 8px; }
.fp-content {
  position: relative;
  width: 962px;
  height: 100%;
  display: flex;
  border: 1px solid var(--pf-line-strong);
  border-radius: 16px;
  background: var(--bg-base-lower);
}
.fp-modal.editing .fp-content { width: 960px; border-left: 0; border-radius: 0 16px 16px 0; }
.fp-inner { flex: 1; min-width: 0; display: flex; padding: 48px 32px 0 48px; border-radius: inherit; overflow: hidden; }
.fp-card {
  position: relative;
  flex: none;
  width: 400px;
  display: flex;
  flex-direction: column;
  border-radius: 16px 16px 0 0;
  background: var(--pf-card);
  outline: 1px solid rgba(151, 151, 159, 0.04);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.16);
}
.fp-header { position: relative; flex: none; height: 220px; }
.fp-banner-box { position: relative; height: 143px; border-radius: 16px 16px 0 0; overflow: hidden; }
.fp-banner {
  height: 140px;
  border-radius: 16px 16px 0 0;
  -webkit-mask: radial-gradient(68px at 92px 100%, transparent 67.5px, #000 68px);
  mask: radial-gradient(68px at 92px 100%, transparent 67.5px, #000 68px);
}
.fp-avatar { position: absolute; left: 32px; top: 80px; width: 120px; height: 120px; border-radius: 50%; }
.av.s120 { width: 120px; height: 120px; --c: 100px; --r: 20px; --d: 24px; }
.fp-card .pf-bubble-wrap { left: 172px; top: 132px; max-width: 181px; }
.fp-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: -4px;
  padding: 4px 16px 32px 32px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 16px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 16px), transparent);
}
.fp-names { display: flex; flex-direction: column; }
.fp-names .pf-name { font-size: 24px; line-height: 32px; cursor: default; }
.fp-names .pf-name:hover { text-decoration: none; }
.fp-names .pf-tag-row { gap: 4px 6px; min-height: 18px; }
.fp-buttons { display: flex; align-items: center; gap: 8px; }
.fp-section { display: flex; flex-direction: column; gap: 8px; }
.fp-h { color: var(--text-subtle); font-size: 12px; font-weight: 500; line-height: 16px; }
.fp-p { color: var(--text-default); font-size: 14px; line-height: 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fp-p .emoji { width: 19.25px; height: 19.25px; vertical-align: -5px; }
.fp-note { position: relative; margin: -4px -7px 0; }
.fp-note textarea {
  display: block;
  width: 100%;
  min-height: 28px;
  margin: -5px 0;
  padding: 5px 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-default);
  font: 400 14px/18px var(--font);
  letter-spacing: inherit;
  resize: none;
  overflow: hidden;
  outline: none;
}
.fp-note textarea::placeholder { color: var(--text-default); opacity: 1; }
.fp-note textarea:hover { background: var(--pf-field); }
.fp-note textarea:focus { background: var(--pf-field); outline: 2px solid var(--brand); outline-offset: -2px; }
.fp-note textarea:focus::placeholder { color: var(--text-muted); }
.fp-conn-add { display: flex; align-items: center; gap: 2px; margin-top: 4px; color: var(--text-muted); font-size: 12px; font-weight: 500; line-height: 16px; }
.fp-conn-add svg { width: 18px; height: 18px; }
.fp-conn-add:hover { color: var(--text-strong); }

/* right column: tabs */
.fp-side { flex: 1; min-width: 0; display: flex; flex-direction: column; margin: 0 -4px; padding: 20px 4px 0; overflow: hidden; }
.fp-tabs-scroll { flex: none; margin: -4px -4px -14px 28px; padding: 4px 20px 4px 4px; overflow-x: auto; scrollbar-width: none; }
.fp-tabs { display: flex; border-bottom: 1px solid var(--pf-line); }
.fp-tab { position: relative; flex: none; margin: 0 0 -1px 24px; padding: 0 0 16px; color: var(--text-subtle); font-size: 14px; font-weight: 600; line-height: 14px; white-space: nowrap; }
.fp-tab:first-child { margin-left: 0; }
.fp-tab:hover { color: var(--text-default); }
.fp-tab.selected { color: var(--text-strong); }
.fp-tab.selected::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--text-strong); }
.fp-panel { position: relative; flex: 1; min-height: 0; display: flex; padding-left: 32px; overflow: hidden; }
.fp-panel-scroll { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; margin-left: -12px; padding: 20px 8px 16px 0; overflow-y: auto; scrollbar-gutter: stable; }
.fp-panel-scroll.widgets { margin-left: -32px; padding: 20px 8px 16px 32px; }
.fp-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 24px; }
.fp-empty-text { width: 320px; display: flex; flex-direction: column; gap: 8px; text-align: center; }
.fp-empty-text h3 { color: var(--text-strong); font-size: 16px; font-weight: 500; line-height: 20px; }
.fp-empty-text p { color: var(--text-default); font-size: 14px; line-height: 18px; }
.fp-list-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.fp-list-row:hover { background: rgba(151, 151, 159, 0.12); }
.fp-list-row .txt { min-width: 0; display: flex; flex-direction: column; }
.fp-list-row .t1 { overflow: hidden; color: var(--text-strong); font-size: 16px; font-weight: 500; line-height: 20px; white-space: nowrap; text-overflow: ellipsis; }
.fp-list-row .t2 { overflow: hidden; color: var(--text-muted); font-size: 14px; line-height: 18px; white-space: nowrap; text-overflow: ellipsis; }
.fp-server-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--bg-surface-higher); color: var(--text-default); font-size: 14px; font-weight: 600; }

/* board widgets */
.fp-widgets-head { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.fp-widgets-head .title { flex: 1; color: var(--text-subtle); font-size: 14px; font-weight: 600; line-height: 18px; }
.fp-widget { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px; border: 1px solid rgba(151, 151, 159, 0.04); border-radius: 16px; background: var(--pf-raised); }
.fp-widget-head { display: flex; justify-content: space-between; gap: 8px; }
.fp-widget-head h3 { color: var(--text-default); font-size: 14px; font-weight: 500; line-height: 18px; }
.fp-widget-head p { color: var(--text-subtle); font-size: 12px; line-height: 16px; }
.fp-games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fp-game { position: relative; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: rgba(151, 151, 159, 0.08); box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16); cursor: pointer; transition: transform 0.15s; }
.fp-game:hover { transform: translateY(-2px); }
.fp-game svg { display: block; width: 100%; height: 100%; }
.fp-game .rm { position: absolute; top: 4px; right: 4px; opacity: 0; }
.fp-game:hover .rm { opacity: 1; }
.fp-show-more { align-self: flex-start; color: var(--text-subtle); font-size: 14px; font-weight: 500; line-height: 18px; }
.fp-show-more:hover { color: var(--text-strong); text-decoration: underline; }

/* ---------- profile editor (the full profile with its styles panel) ---------- */
.pe-panel {
  position: relative;
  width: 242px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--pf-line-strong);
  border-right-color: var(--pf-line);
  border-radius: 16px 0 0 16px;
  background: var(--pf-card);
}
.fp-modal.collapsed .pe-panel { display: none; }
.pe-head { flex: none; display: flex; align-items: center; gap: 4px; height: 49px; padding: 4px 8px; border-bottom: 1px solid var(--pf-line); }
.pe-head .grow { flex: 1; min-width: 0; padding: 4px 0; }
.pe-select { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 8px 4px 4px 8px; border-radius: 8px; color: var(--text-strong); font-size: 16px; font-weight: 500; line-height: 20px; }
.pe-select:hover, .pe-select.open { background: rgba(151, 151, 159, 0.12); }
.pe-select svg { width: 18px; height: 18px; margin-top: -4px; transition: transform 0.15s; }
.pe-select.open svg { transform: rotate(180deg); }
.pe-icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--text-subtle); }
.pe-icon-btn:hover { background: rgba(151, 151, 159, 0.12); color: var(--text-strong); }
.pe-scroll { flex: 1; min-height: 0; padding: 16px; overflow-y: auto; scrollbar-width: none; }
.pe-scroll::-webkit-scrollbar { display: none; }
.pe-content { display: flex; flex-direction: column; gap: 24px; }
.pe-group { display: grid; grid-template-columns: 100px 100px; gap: 8px; }
.pe-group > h3 { grid-column: 1 / -1; color: var(--text-strong); font-size: 14px; font-weight: 500; line-height: 18px; }
.pe-tile { position: relative; height: 100px; border-radius: 8px; transition: transform 0.15s; }
.pe-tile.bar { grid-column: 1 / -1; height: 42px; }
.pe-tile.tall { grid-column: 1 / -1; height: 100px; }
.pe-tile:hover { transform: scale(1.04); }
.pe-tile-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; background: rgba(151, 151, 159, 0.12); }
.pe-tile:hover .pe-tile-btn { background: rgba(151, 151, 159, 0.16); }
.pe-tile-btn .plus { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-strong); }
.pe-tile-btn .plus svg { width: 24px; height: 24px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)); }
.pe-tile-btn .shade { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); opacity: 0; transition: opacity 0.15s; }
.pe-tile:hover .pe-tile-btn .shade { opacity: 1; }
.pe-tile .del { position: absolute; top: 4px; right: 4px; z-index: 1; opacity: 0; transition: opacity 0.15s; }
.pe-tile:hover .del, .pe-tile .del:focus-visible { opacity: 1; }
.pe-tile .av { width: 72px; height: 72px; }
.pe-empty-av { width: 72px; height: 72px; border-radius: 50%; background: rgba(151, 151, 159, 0.2); }
.pe-skel { position: absolute; left: 20px; top: 12px; width: 60px; height: 88px; border-radius: 4px 4px 0 0; background: #202024; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14); overflow: hidden; }
.pe-skel.square { top: 20px; height: 60px; border-radius: 4px; }
.pe-skel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px; background: rgba(151, 151, 159, 0.2); }
.pe-skel::after { content: ""; position: absolute; left: 6px; top: 14px; width: 18px; height: 18px; border: 2px solid #202024; border-radius: 50%; background: rgba(151, 151, 159, 0.32); }
.pe-skel.square::before { display: none; }
.pe-skel.square::after { left: 21px; top: 21px; }
.pe-swatches { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-between; overflow: hidden; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(151, 151, 159, 0.04); }
.pe-swatch { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; }
.pe-swatch span { width: 24px; height: 24px; border: 2px solid #fff; border-radius: 8px; }
.pe-swatch.empty span { background: transparent !important; border-style: dashed; }
.pe-name-preview { max-width: 100%; padding: 0 8px; overflow: hidden; color: var(--text-default); font-size: 24px; font-weight: 600; line-height: 32px; white-space: nowrap; text-overflow: ellipsis; }

/* inline fields on the card */
.pe-field { position: relative; display: inline-grid; max-width: 100%; border-radius: 8px; }
.pe-field input {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  opacity: 0;
  outline: none;
}
.pe-field .sizer { min-width: 24px; overflow: hidden; white-space: pre; text-overflow: ellipsis; }
.pe-field:hover { background: var(--pf-field); box-shadow: inset 0 0 0 1px var(--pf-hover-line); }
.pe-field:focus-within { background: var(--pf-field); box-shadow: none; outline: 2px solid var(--brand); outline-offset: -2px; }
.pe-field:focus-within input { opacity: 1; }
.pe-field:focus-within .sizer { visibility: hidden; }
.pe-field.name { margin: 0 -7px; padding: 4px 0; font-size: 24px; font-weight: 600; line-height: 32px; color: var(--text-default); }
.pe-field.name input, .pe-field.name .sizer { padding: 0 7px; }
.pe-field.pronouns { margin: 0 -5px; padding: 3px 0; font-size: 14px; line-height: 18px; color: var(--text-strong); }
.pe-field.pronouns input, .pe-field.pronouns .sizer { padding: 0 5px; }
.pe-field .sizer.placeholder { color: var(--text-muted); }
.pe-tag-pill { display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 6px; border: 1px solid rgba(151, 151, 159, 0.04); border-radius: 8px; background: rgba(151, 151, 159, 0.12); color: #a1a2a9; font-size: 12px; line-height: 16px; }
.pe-tag-pill svg { width: 16px; height: 16px; margin-left: 2px; }
.pe-tag-pill:hover { background: rgba(151, 151, 159, 0.16); }
.pe-bio { position: relative; margin: -8px -7px 0; }
.pe-bio .view { display: flex; min-height: 28px; padding: 4px 38px 4px 6px; border: 1px solid transparent; border-radius: 8px; cursor: text; }
.pe-bio .view:hover { border-color: var(--pf-hover-line); background: var(--pf-field); }
.pe-bio .view .ph { color: var(--text-muted); }
.pe-bio .edit { position: relative; padding: 2px 0; border: 1px solid var(--brand); border-radius: 8px; background: var(--pf-field); outline: 2px solid var(--brand); outline-offset: -2px; }
.pe-bio textarea { display: block; width: 100%; padding: 2px 44px 2px 6px; border: 0; background: transparent; color: var(--text-default); font: 400 14px/18px var(--font); letter-spacing: inherit; resize: none; overflow: hidden; outline: none; }
.pe-bio .emoji-btn { position: absolute; top: 1px; right: 1px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--text-subtle); }
.pe-bio .emoji-btn:hover { color: var(--text-strong); }
.pe-bio .count { position: absolute; right: 8px; bottom: 4px; color: var(--text-muted); font-size: 12px; line-height: 16px; }
.pe-edit-btn { position: absolute; z-index: 2; opacity: 0; transition: opacity 0.1s; }
.fp-banner-box:hover .pe-edit-btn, .fp-avatar:hover .pe-edit-btn, .pe-edit-btn:focus-visible { opacity: 1; }
.fp-banner-box .pe-edit-btn { top: 8px; right: 8px; }
.fp-avatar .pe-edit-btn { left: 44px; top: 44px; }
.fp-avatar.editable { cursor: pointer; }
.pe-expand-tab {
  position: absolute;
  left: -18px;
  top: 40px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 36px;
  padding: 4px 4px 4px 2px;
  border: 1px solid var(--pf-line-strong);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: var(--bg-base-lower);
  color: var(--text-strong);
}
.pe-expand-tab:hover { background: #202024; }

/* save bar under the editor */
.pe-savebar {
  position: absolute;
  left: 50%;
  top: calc(100% + 24px);
  width: 500px;
  margin-left: -250px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 50px;
  padding: 8px 8px 8px 12px;
  border: 1px solid var(--pf-line);
  border-radius: 12px;
  background: var(--pf-raised);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
  animation: pe-bar-in 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes pe-bar-in { from { opacity: 0; transform: translateY(16px); } }
.pe-savebar.shake { animation: pe-shake 0.3s; }
@keyframes pe-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.pe-savebar .txt { min-width: 0; overflow: hidden; color: var(--text-strong); font-size: 14px; line-height: 18px; white-space: nowrap; text-overflow: ellipsis; }
.pe-savebar .actions { flex: none; display: flex; gap: 8px; }

/* ---------- small helpers ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.av.s72 { width: 72px; height: 72px; }
.av.s56 { width: 56px; height: 56px; }
.pf-chiplet { display: inline-flex; align-items: center; height: 16px; padding: 0 4px; border-radius: 4px; background: rgba(151, 151, 159, 0.2); color: var(--text-default); font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: 0; }
.pf-anchor-open { text-decoration: underline; }
img.msg-avatar.pf-anchor-open, .member-row.pf-anchor-open, .up-user.pf-anchor-open { text-decoration: none; }
.member-row.pf-anchor-open { background: var(--interactive-bg-selected); }

/* ---------- avatars with decorations ---------- */
.pf-av { position: relative; flex: none; width: var(--s); height: var(--s); }
.pf-av > .av { width: 100%; height: 100%; }
.pf-deco { position: absolute; left: -10%; top: -10%; z-index: 1; width: 120%; height: 120%; pointer-events: none; }
.pf-deco.anim-spin { animation: pf-spin 14s linear infinite; }
.pf-deco.anim-float { animation: pf-float 3s ease-in-out infinite; }
@keyframes pf-spin { to { transform: rotate(360deg); } }
@keyframes pf-float { 50% { transform: translateY(-4%); } }

/* ---------- nameplates (original art) ---------- */
.np { position: relative; display: flex; align-items: center; width: 100%; height: 100%; border-radius: 8px; }
.np-bg { position: absolute; inset: 0; overflow: hidden; border-radius: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--np) 10%, transparent) 0%, color-mix(in srgb, var(--np) 40%, transparent) 100%); }
.np-art { position: absolute; top: 0; right: 0; bottom: 0; width: 80%; opacity: 0.8; -webkit-mask: linear-gradient(to right, transparent, #000 45%); mask: linear-gradient(to right, transparent, #000 45%); }
.np-row { position: relative; display: flex; align-items: center; min-width: 0; height: 100%; margin: 0 32px 0 8px; }
.np-row .pf-av { margin-right: 12px; }
.np-ph { width: 121px; max-width: 60%; height: 14px; border-radius: 8px; background: #706f74; opacity: 0.5; }
.np-name { min-width: 0; overflow: hidden; color: #fff; font-size: 16px; font-weight: 500; line-height: 20px; white-space: nowrap; text-overflow: ellipsis; }
.np-name .pf-name, .np-name-text { font-size: 16px; font-weight: 500; line-height: 20px; color: #fff; }
.np-aurora .np-art { background: linear-gradient(115deg, transparent 15%, #2de2a6 32%, #6a5cff 50%, #2de2a6 68%, transparent 85%) 0 0 / 220% 100%; filter: blur(5px); animation: np-slide 7s linear infinite; }
.np-ember .np-art { background: radial-gradient(circle at 20% 110%, #ffb347 0 18%, transparent 19%) 0 0 / 22px 26px, radial-gradient(circle at 70% 110%, #ff5a1f 0 22%, transparent 23%) 0 0 / 30px 32px, linear-gradient(0deg, rgba(255, 90, 31, 0.55), transparent 80%); animation: np-rise 2.4s linear infinite; }
.np-tide .np-art { background: radial-gradient(ellipse 22px 9px at 50% 100%, rgba(120, 200, 255, 0.85) 60%, transparent 62%) 0 100% / 40px 18px repeat-x, radial-gradient(ellipse 22px 9px at 50% 100%, rgba(63, 120, 255, 0.7) 60%, transparent 62%) 20px 85% / 40px 18px repeat-x; animation: np-wave 3s linear infinite; }
.np-static .np-art { background: repeating-linear-gradient(0deg, rgba(190, 90, 255, 0.85) 0 2px, transparent 2px 5px), linear-gradient(90deg, transparent, rgba(80, 200, 255, 0.6)); animation: np-glitch 1.2s steps(4) infinite; }
.np-sakura .np-art { background: radial-gradient(circle at 30% 40%, #ffd1e0 0 3px, transparent 4px) 0 0 / 26px 21px, radial-gradient(circle at 70% 70%, #ff8fb5 0 2.5px, transparent 3.5px) 0 0 / 34px 17px, linear-gradient(90deg, transparent, rgba(255, 143, 181, 0.45)); animation: np-drift 6s linear infinite; }
.np-grid .np-art { background: repeating-linear-gradient(90deg, rgba(255, 79, 216, 0.75) 0 1px, transparent 1px 14px), repeating-linear-gradient(0deg, rgba(0, 229, 255, 0.6) 0 1px, transparent 1px 10px), linear-gradient(0deg, rgba(156, 39, 176, 0.5), transparent); animation: np-scroll 2s linear infinite; }
@keyframes np-slide { to { background-position: -220% 0; } }
@keyframes np-rise { to { background-position: 0 -26px, 0 -32px, 0 0; } }
@keyframes np-wave { to { background-position: 40px 100%, -20px 85%; } }
@keyframes np-glitch { 25% { transform: translateX(-3px); } 50% { transform: translateX(2px); filter: hue-rotate(40deg); } 75% { transform: translateX(-1px); } }
@keyframes np-drift { to { background-position: 26px 21px, -34px 17px, 0 0; } }
@keyframes np-scroll { to { background-position: 14px 0, 0 10px, 0 0; } }

/* ---------- profile effects ---------- */
.pf-effect { position: absolute; inset: 0; z-index: 3; overflow: hidden; border-radius: inherit; pointer-events: none; }
.pf-effect i { position: absolute; left: var(--x); top: var(--y); width: calc(8px * var(--z)); height: calc(8px * var(--z)); animation: var(--d) linear var(--l) infinite; }
.fx-sparkle i { background: var(--c); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation-name: fx-twinkle; animation-timing-function: ease-in-out; }
.fx-snow i { top: -12px; width: calc(5px * var(--z)); height: calc(5px * var(--z)); border-radius: 50%; background: var(--c); opacity: 0.85; animation-name: fx-fall; }
.fx-bubble i { top: auto; bottom: -16px; width: calc(12px * var(--z)); height: calc(12px * var(--z)); border: 1.5px solid var(--c); border-radius: 50%; animation-name: fx-rise; }
.fx-firefly i { width: calc(4px * var(--z)); height: calc(4px * var(--z)); border-radius: 50%; background: var(--c); box-shadow: 0 0 8px 2px var(--c); animation-name: fx-wander; animation-timing-function: ease-in-out; }
.fx-confetti i { top: -12px; width: 5px; height: 9px; background: var(--c); animation-name: fx-tumble; }
.fx-petal i { top: -12px; width: calc(9px * var(--z)); height: calc(7px * var(--z)); border-radius: 80% 0 80% 0; background: var(--c); animation-name: fx-sway; }
@keyframes fx-twinkle { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
@keyframes fx-fall { from { transform: translate(0, 0); } to { transform: translate(18px, 900px); } }
@keyframes fx-rise { from { transform: translateY(0); opacity: 0.9; } to { transform: translate(-10px, -800px); opacity: 0; } }
@keyframes fx-wander { 0%, 100% { transform: translate(0, 0); opacity: 0.2; } 50% { transform: translate(14px, -18px); opacity: 1; } }
@keyframes fx-tumble { from { transform: translate(0, 0) rotate(var(--r)); } to { transform: translate(-24px, 900px) rotate(calc(var(--r) + 720deg)); } }
@keyframes fx-sway { 0% { transform: translate(0, 0) rotate(var(--r)); } 50% { transform: translate(22px, 450px) rotate(calc(var(--r) + 180deg)); } 100% { transform: translate(-6px, 900px) rotate(calc(var(--r) + 360deg)); } }
.pe-skel .pf-effect i, .pk-mini .pf-effect i { width: calc(4px * var(--z)); height: calc(4px * var(--z)); }

/* ---------- profile frames ---------- */
.pf-frame { position: absolute; inset: -5px; z-index: 4; border-radius: 13px; pointer-events: none; }
.fp-card > .pf-frame { inset: -6px -6px 0; border-bottom: 0 !important; border-radius: 20px 20px 0 0; }
.pf-frame i { position: absolute; width: 14px; height: 14px; }
.pf-frame i:nth-child(1) { left: -5px; top: -5px; }
.pf-frame i:nth-child(2) { right: -5px; top: -5px; }
.pf-frame i:nth-child(3) { left: -5px; bottom: -5px; }
.pf-frame i:nth-child(4) { right: -5px; bottom: -5px; }
.fp-card > .pf-frame i:nth-child(3), .fp-card > .pf-frame i:nth-child(4) { display: none; }
.fr-gilded { border: 3px solid #e6b84a; box-shadow: 0 0 0 1px #8a6417, inset 0 0 0 1px #fff3c4, 0 0 14px rgba(230, 184, 74, 0.45); }
.fr-gilded i { border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 12%, #6ad0ff 13% 45%, #1f6fb2 46% 60%, #e6b84a 61%); box-shadow: 0 0 0 2px #8a6417; }
.fr-neon { border: 2px solid #ff4fd8; box-shadow: 0 0 10px #ff4fd8, inset 0 0 10px rgba(255, 79, 216, 0.6); animation: fr-pulse 2.4s ease-in-out infinite; }
.fr-neon i { display: none; }
@keyframes fr-pulse { 50% { border-color: #ffa3ec; box-shadow: 0 0 18px #ff4fd8, inset 0 0 14px rgba(255, 79, 216, 0.8); } }
.fr-vine { border: 3px solid #4caf68; box-shadow: inset 0 0 0 1px #2d6b3f; }
.fr-vine i { width: 18px; height: 18px; border-radius: 0 80% 0 80%; background: #6fd18a; box-shadow: 0 0 0 2px #2d6b3f; }
.fr-pixel { border: 4px solid #5ad1ff; border-radius: 4px; box-shadow: 4px 4px 0 #1b6b8f; }
.fr-pixel i { width: 8px; height: 8px; background: #fff; }
.fr-frost { border: 2px solid #a8e6ff; box-shadow: 0 0 16px rgba(168, 230, 255, 0.55), inset 0 0 12px rgba(168, 230, 255, 0.35); }
.fr-frost i { background: #e6f8ff; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
.fr-royal { border: 4px double #8a5cf6; box-shadow: 0 0 0 1px #3d2479, 0 0 12px rgba(138, 92, 246, 0.4); }
.fr-royal i { background: #f5c542; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }

/* ---------- display name styles ---------- */
.ns { --ns-c1: #f42098; --ns-c2: #ffc490; --ns-dark: #4a0430; }
.ns .ns-t { display: inline-block; }
.ns.ns-f-zilla { font-family: "Zilla Slab", serif; letter-spacing: 0.03em; }
.ns.ns-f-cherry { font-family: "Cherry Bomb One", cursive; font-weight: 400; letter-spacing: 0.04em; }
.ns.ns-f-chicle { font-family: "Chicle", cursive; font-weight: 400; letter-spacing: 0; }
.ns.ns-f-museo { font-family: "MuseoModerno", sans-serif; letter-spacing: 0.01em; }
.ns.ns-f-medieval { font-family: "MedievalSharp", serif; font-weight: 400; letter-spacing: 0.02em; }
.ns.ns-f-pixel { font-family: "Pixelify Sans", sans-serif; letter-spacing: 0.02em; }
.ns.ns-f-spooky { font-family: "Creepster", cursive; font-weight: 400; letter-spacing: 0.04em; }
.ns.ns-f-playful { font-family: "Playpen Sans", cursive; letter-spacing: 0; }
.ns.ns-f-orbit { font-family: "Orbitron", sans-serif; letter-spacing: 0.03em; }
.ns.ns-f-rocker { font-family: "New Rocker", cursive; font-weight: 400; letter-spacing: 0; }
.ns.ns-f-kalam { font-family: "Kalam", cursive; font-weight: 700; letter-spacing: 0; }
.ns.ns-x-solid .ns-t { color: var(--ns-c1); }
.ns.ns-x-gradient .ns-t { background: linear-gradient(to right bottom, var(--ns-c1) 10%, var(--ns-c2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ns.ns-x-neon .ns-t { color: color-mix(in srgb, var(--ns-c1) 35%, #fff); text-shadow: 0 0 2px #fff, 0 0 6px var(--ns-c1), 0 0 12px var(--ns-c1); }
.ns.ns-x-toon .ns-t { padding-bottom: 2px; color: var(--ns-c1); text-shadow: 1px 0 var(--ns-dark), -1px 0 var(--ns-dark), 0 1px var(--ns-dark), 0 -1px var(--ns-dark), 0 2.5px 0 var(--ns-dark); }
.ns.ns-x-pop .ns-t { padding: 0 0 3px 2px; color: #fff; text-shadow: -1.8px 3px 0 var(--ns-c1); }
.ns.ns-x-gummy .ns-t { color: var(--ns-c1); text-shadow: 0 2px 0 var(--ns-dark), 0 0 1px rgba(255, 255, 255, 0.6); }
.ns.ns-x-prism .ns-t { background: linear-gradient(90deg, #fe9242 0%, #35ed7e 20%, #ffe047 40%, #ff4cd2 60%, #5865f2 80%, #fe9242 100%) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: ns-prism 4s linear infinite; }
@keyframes ns-prism { to { background-position: -200% 0; } }

/* ---------- profile themes ---------- */
.upp.pf-themed { width: 304px; padding: 2px; background: linear-gradient(var(--pf-t1) 105px, var(--pf-t2) 100%); }
.upp.pf-themed .upp-inner { border-radius: 6px; background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)); }
.upp.pf-themed .upp-banner { border-radius: 6px 6px 0 0; }
.upp.pf-themed .pf-bubble, .upp.pf-themed .upp-card, .upp.pf-themed .upp-menu, .upp.pf-themed .pf-bubble-wrap::before, .upp.pf-themed .pf-bubble-wrap::after { background-color: rgba(0, 0, 0, 0.35); }
.fp-modal.pf-themed .fp-content { background: linear-gradient(var(--pf-t1), var(--pf-t2)); }
.fp-modal.pf-themed .fp-inner { background: rgba(0, 0, 0, 0.6); }
.fp-modal.pf-themed .fp-card { background: rgba(0, 0, 0, 0.25); }
.fp-modal.pf-themed .pf-bubble, .fp-modal.pf-themed .pf-bubble-wrap::before, .fp-modal.pf-themed .pf-bubble-wrap::after, .fp-modal.pf-themed .fp-widget, .fp-modal.pf-themed .fp-act-card { background-color: rgba(0, 0, 0, 0.35); }

/* ---------- editor tiles + board ---------- */
.pe-fill { position: absolute; inset: 0; }
.pe-banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pe-skel.wide { left: 20px; right: 20px; top: 16px; width: auto; height: 68px; border-radius: 4px; }
.pe-skel.wide::after { top: 46px; left: 10px; }
.pe-skel .pf-frame { inset: -3px; border-radius: 6px; }
.pe-tile .np { height: 42px; }
.pe-names { gap: 0; }
.pe-tag-row { min-height: 32px; gap: 4px 6px; }
.fp-board-empty { padding: 32px 16px; color: var(--text-muted); font-size: 14px; line-height: 18px; text-align: center; }
.fp-widget-wrap { position: relative; margin-left: -32px; padding-left: 32px; }
.pe-drag { position: absolute; left: 8px; top: 18px; display: flex; width: 24px; height: 24px; padding-left: 4px; color: var(--text-muted); opacity: 0; cursor: grab; }
.fp-widget-wrap:hover .pe-drag { opacity: 1; }
.fp-widget-actions { display: flex; gap: 8px; }
.fp-games { list-style: none; }
.fp-game img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fp-games.single { grid-template-columns: 87px; }
.fp-widget-empty { display: flex; align-items: center; justify-content: center; gap: 8px; height: 116px; border: 1px dashed rgba(151, 151, 159, 0.3); border-radius: 8px; color: var(--text-muted); font-size: 14px; font-weight: 500; }
.fp-widget-empty:hover { border-color: rgba(151, 151, 159, 0.5); color: var(--text-strong); }
.fp-act-head p { color: var(--text-default); font-size: 12px; line-height: 16px; }
.fp-act-head a { color: var(--text-link); }
.fp-act-head a:hover { text-decoration: underline; }
.fp-act-cards { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.fp-act-card { position: relative; display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: var(--pf-raised); }
.fp-act-card img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.fp-act-card .details { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; margin-right: 24px; }
.fp-act-card h4 { color: var(--text-default); font-size: 14px; font-weight: 600; line-height: 18px; }
.fp-act-card .badges { display: flex; flex-wrap: wrap; gap: 0 8px; color: var(--text-subtle); font-size: 12px; line-height: 16px; }
.fp-act-card .badges span { display: flex; align-items: center; gap: 4px; }
.fp-act-more { position: absolute; top: 12px; right: 16px; display: flex; color: var(--text-subtle); }
.fp-act-more:hover { color: var(--text-strong); }
.fp-empty-btns { display: flex; gap: 8px; }

/* ---------- modals opened by profiles ---------- */
.pfm-layer { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px 0; }
.pfm-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); animation: fade-in 0.15s ease-out; }
.pfm { position: relative; display: flex; flex-direction: column; max-height: calc(100vh - 48px); border-radius: 12px; background: var(--pf-card); animation: fp-in 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.pfm.classic { border: 1px solid var(--pf-line-strong); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.16); }
.pfm.new { padding: 8px 0 16px; border: 1px solid var(--pf-line); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24); }
.pfm-head { flex: none; padding: 16px 24px 8px; }
.pfm-head h1 { padding-right: 40px; color: var(--text-strong); font-size: 20px; font-weight: 600; line-height: 24px; }
.pfm-x { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: var(--text-subtle); }
.pfm-x:hover { background: rgba(151, 151, 159, 0.12); color: var(--text-strong); }
.pfm-head.classic { display: flex; align-items: center; justify-content: space-between; height: 40px; padding: 16px 24px 0; border-radius: 12px 12px 0 0; }
.pfm-head.classic h1 { padding: 0; }
.pfm-x.classic { position: static; width: 24px; height: 24px; margin-right: -8px; border-radius: 3px; color: var(--text-strong); opacity: 0.5; }
.pfm-x.classic:hover { background: none; opacity: 1; }
.pfm-body { min-height: 0; overflow-y: auto; }
.pfm.new .pfm-body { padding: 16px 8px 8px 24px; scrollbar-gutter: stable; }
.pfm.classic .pfm-body { display: flex; justify-content: space-between; padding: 8px 24px 0; overflow: hidden; }
.pfm-foot { flex: none; display: flex; flex-direction: row-reverse; gap: 8px; padding: 16px 24px; border-radius: 0 0 12px 12px; background: var(--pf-card); }
.pfm-foot.sep { padding: 24px; border-top: 1px solid var(--pf-line); }
.pfm-foot.action-bar { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 16px 24px 8px; }
.pf-btn.md { height: 40px; min-width: 100px; padding: 0 15px; font-size: 16px; line-height: 20px; }
.pf-btn.md .ic svg { width: 20px; height: 20px; }

/* nameplate picker (604 x 522) */
.pk-nameplate { width: 604px; }
.pfm.pk-nameplate .pfm-body { height: 408px; }
.pk-inv { width: 282px; margin: -4px; padding: 4px; overflow-y: auto; scrollbar-width: none; }
.pk-stack { display: flex; flex-direction: column; gap: 4px; }
.pk-stack h2, .pk-list h2 { color: var(--text-strong); font-size: 16px; font-weight: 500; line-height: 20px; }
.pk-controls { display: flex; gap: 12px; }
.pk-ctrl { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 106px; height: 80px; border-radius: 4px; background: var(--bg-base-lowest); color: var(--text-default); font-size: 12px; line-height: 16px; }
.pk-ctrl svg, .pk-item svg { color: var(--text-subtle); }
.pk-ctrl.selected, .pk-item.selected { box-shadow: inset 0 0 0 2px var(--brand); }
.pk-np-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.pk-np-item { position: relative; display: block; width: 224px; height: 42px; border-radius: 8px; }
.pk-np-item .pk-ring { position: absolute; inset: 0; border-radius: 8px; }
.pk-np-item:hover .pk-ring { box-shadow: inset 0 0 0 1px rgba(151, 151, 159, 0.4); }
.pk-np-item.selected .pk-ring, .pk-np-item.selected:hover .pk-ring { box-shadow: inset 0 0 0 2px var(--brand); }
.pk-np-preview { display: flex; flex-direction: column; gap: 12px; width: 280px; border: 2px solid transparent; }
.pk-np-box { height: 190px; overflow: hidden; border-radius: 8px; background: var(--bg-base-lower); }
.pk-np-rows { width: 224px; margin: -10px auto 0; }
.pk-np-ph { display: flex; align-items: center; height: 42px; padding: 0 8px; opacity: 0.9; }
.pk-np-ph .ph-av { width: 32px; height: 32px; border-radius: 50%; background: rgba(151, 151, 159, 0.2); }
.pk-np-ph .ph-bar { width: 124px; height: 14px; margin-left: 12px; border-radius: 8px; background: rgba(151, 151, 159, 0.12); }
.pk-np-me { height: 42px; }
.pk-np-info { padding: 2px; border-radius: 4px; background: rgba(151, 151, 159, 0.161); }
.pk-np-info .inner { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 2px; background: var(--bg-base-lower); }
.pk-np-info h2 { color: var(--text-strong); font-size: 14px; font-weight: 600; line-height: 18px; }
.pk-np-info .sub { color: var(--text-muted); font-size: 10px; line-height: 12px; }

/* decoration picker (604 x 542) and effect/frame pickers (663 x 802) */
.pk-deco { width: 604px; }
.pfm.pk-deco .pfm-body { height: 428px; }
.pk-list { position: relative; width: 274px; padding-bottom: 16px; overflow-y: auto; }
.pk-list h2 { margin-bottom: 4px; font-weight: 600; }
.pk-grid { display: grid; grid-template-columns: repeat(3, 75.33px); gap: 12px; margin-top: 4px; }
.pk-grid.wide { grid-template-columns: repeat(3, 83.33px); margin-top: 8px; }
.pk-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 80px; border-radius: 4px; background: var(--bg-base-lowest); color: var(--text-strong); font-size: 12px; line-height: 16px; }
.pk-item img { width: 64px; height: 64px; }
.pk-item:hover { background: #18181b; }
.pk-deco-preview { display: flex; align-self: flex-start; margin-top: 24px; border: 2px solid transparent; }
.pk-deco-preview .big { display: grid; place-items: center; width: 208px; height: 208px; border-radius: 4px; background: var(--bg-base-lowest); }
.pk-deco-preview .small { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 56px; height: 208px; margin-left: 12px; padding: 8px; border-radius: 4px; background: var(--bg-base-lowest); }
.pk-effect { width: 663px; }
.pfm.pk-effect .pfm-body { height: 688px; padding: 8px 16px 0 24px; }
.pk-effect .pk-list { width: 298px; margin-top: 2px; padding: 0 0 4px; }
.pk-item.preset { overflow: hidden; }
.pk-mini { position: absolute; inset: 10px 18px 0; border-radius: 4px 4px 0 0; background: #202024; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14); }
.pk-mini .pf-frame { inset: 2px; border-radius: 4px; }
.pk-popout-preview { width: 310px; margin: 6.5px 3px 0 2px; padding-left: 10px; }
.upp.preview { position: relative; z-index: auto; animation: none; }
.upp.preview .pf-name { cursor: default; }
.upp.preview .pf-name:hover { text-decoration: none; }

/* display name style picker (836 x 723) */
.pk-namestyle { width: 836px; }
.pfm.pk-namestyle .pfm-head { position: absolute; top: 12px; right: 12px; z-index: 2; height: auto; padding: 0; }
.pfm.pk-namestyle .pfm-head h1 { display: none; }
.pk-namestyle .pfm-x.classic { width: 32px; height: 32px; margin: 0; padding: 4px; }
.pfm.pk-namestyle .pfm-body { display: grid; grid-template-columns: 424px 410px; height: 632px; padding: 0; border-radius: 12px 12px 0 0; }
.pk-ns-select { padding: 24px 16px 24px 24px; overflow-y: auto; }
.pk-ns-title { margin-bottom: 8px; color: var(--text-strong); font-size: 20px; font-weight: 600; line-height: 24px; }
.pk-ns-sub { margin-top: 24px; }
.pk-ns-sub h2 { margin-bottom: 8px; color: var(--text-strong); font-size: 16px; font-weight: 600; line-height: 20px; }
.pk-ns-grid { display: grid; grid-template-columns: repeat(4, 88px); gap: 8px; }
.pk-ns-tile { position: relative; display: flex; align-items: center; justify-content: center; width: 90px; height: 68px; overflow: hidden; border: 1px solid rgba(151, 151, 159, 0.12); border-radius: 8px; background: rgba(151, 151, 159, 0.08); color: var(--text-default); }
.pk-ns-tile:hover { background: rgba(151, 151, 159, 0.12); }
.pk-ns-tile.selected { border-color: var(--brand); color: var(--text-strong); }
.pk-font-g { font-size: 22px; font-weight: 600; line-height: 26.4px; }
.pk-fx-label { font-size: 16px; font-weight: 500; line-height: 16px; }
.new-dot { position: absolute; top: 5px; right: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 4px var(--brand); }
.pk-ns-colors { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pk-ns-custom { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid transparent; border-radius: 8px; background: rgba(151, 151, 159, 0.12); color: var(--text-default); }
.pk-ns-custom.selected { border-color: #6aa8f4; background: var(--cc); }
.pk-ns-swatch { width: 40px; height: 40px; border: 1px solid transparent; border-radius: 8px; }
.pk-ns-swatch.selected { box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px rgba(0, 0, 0, 0.4); }
.pk-ns-preview { position: relative; display: flex; flex-direction: column; padding: 12px; background: var(--bg-base-lower); }
.pk-ns-bg { position: absolute; inset: 0; background: var(--pf-banner) center / cover; opacity: 0.3; filter: saturate(0.5); -webkit-mask: linear-gradient(#000, transparent 280px); mask: linear-gradient(#000, transparent 280px); }
.pk-ns-cards { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; margin-top: 32px; padding-left: 16px; }
.pk-ns-pop { width: 300px; }
.pk-ns-pop .upp-body { padding-bottom: 8px; -webkit-mask-image: none; mask-image: none; }
.pk-ns-msg { position: relative; z-index: 1; display: flex; gap: 16px; width: 320px; margin: -10px 0 -5px 25px; padding: 20px 24px 20px 17px; border: 1px solid var(--pf-line); border-radius: 8px; background: var(--pf-card); }
.pk-ns-msg .hdr { display: flex; align-items: baseline; gap: 8px; }
.pk-ns-msg .msg-name { color: var(--text-strong); font-size: 16px; font-weight: 500; line-height: 22px; }
.pk-ns-msg .ts { color: var(--text-muted); font-size: 12px; line-height: 16px; }
.pk-ns-msg .txt { color: var(--text-default); font-size: 16px; line-height: 22px; }
.pk-ns-plate { position: relative; z-index: 2; width: 282px; height: 44px; border: 1px solid var(--pf-line); border-radius: 8px; background: var(--pf-raised); }
.pk-ns-plate .np { height: 42px; }
.pk-ns-note { position: relative; display: flex; align-items: center; justify-content: flex-end; padding: 0 16px 16px; }
.pk-ns-note p { color: var(--text-muted); font-size: 12px; line-height: 16px; }
.pk-ns-theme { flex: none; display: flex; gap: 4px; margin-left: 16px; padding: 4px; border-radius: 12px; background: var(--bg-base-lowest); }
.pk-ns-theme button { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 8px; color: var(--text-strong); }
.pk-ns-theme button.on { border-color: rgba(151, 151, 159, 0.04); background: var(--pf-card); }
.pk-ns-preview.light { background: #f6f6f8; }
.pk-ns-preview.light .upp, .pk-ns-preview.light .pk-ns-msg, .pk-ns-preview.light .pk-ns-plate { background: #fff; color: #2e3035; }
.pk-ns-preview.light .pf-name, .pk-ns-preview.light .pf-tag-row, .pk-ns-preview.light .pk-ns-msg .txt, .pk-ns-preview.light .msg-name { color: #2e3035; }
.pk-ns-preview.light .pk-ns-note p { color: #5c5e66; }

/* Select an Image (480 x 527) */
.pk-image { width: 480px; }
.pk-img-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pk-img-opt { position: relative; display: flex; align-items: stretch; justify-content: center; height: 211px; padding: 16px; overflow: hidden; border-radius: 8px; background: rgba(151, 151, 159, 0.16); color: var(--text-strong); }
.pk-img-opt:hover { background: rgba(151, 151, 159, 0.2); }
.pk-img-desc { position: relative; display: grid; align-content: center; justify-items: center; gap: 8px; font-size: 14px; font-weight: 600; line-height: 18px; }
.pk-img-desc .ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: #fff; }
.pk-img-desc .ico.gif { background: rgba(0, 0, 0, 0.6); }
.pk-gif-grid { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; filter: brightness(0.5); }
.pk-gif-grid i:nth-child(1) { background: linear-gradient(135deg, #ff7eb3, #ff758c); }
.pk-gif-grid i:nth-child(2) { background: linear-gradient(135deg, #7afcff, #3f86ed); }
.pk-gif-grid i:nth-child(3) { background: linear-gradient(135deg, #feff9c, #f9a43f); }
.pk-gif-grid i:nth-child(4) { background: linear-gradient(135deg, #a18cd1, #5d4bd4); }
.pk-recent { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.pk-recent-head { display: flex; flex-direction: column; gap: 4px; }
.pk-recent-head h2 { color: var(--text-strong); font-size: 16px; font-weight: 500; line-height: 20px; }
.pk-recent-head p { color: var(--text-muted); font-size: 14px; line-height: 18px; }
.pk-recent-list { display: flex; gap: 8px; margin-top: 4px; list-style: none; }
.pk-recent-list li, .pk-recent-list button, .pk-recent-list img, .pk-recent-list svg { display: block; width: 56px; height: 56px; border-radius: 50%; }
.pk-recent-list img { object-fit: cover; }
.pk-recent-list button:hover { box-shadow: 0 0 0 2px var(--brand); }

/* Add Profile Widget (680 x 603) */
.pk-widget { width: 680px; height: 603px; }
.pfm.pk-widget .pfm-body { flex: 1; padding: 0; overflow: hidden; }
.pk-w-body { display: flex; height: 100%; margin: 4px 0 -16px; border-top: 1px solid var(--pf-line); }
.pk-w-nav { flex: none; display: flex; flex-direction: column; width: 213px; padding: 24px 16px; border-right: 1px solid var(--pf-line); }
.pk-w-nav button { display: flex; align-items: center; width: 180px; height: 40px; margin-bottom: 2px; padding: 8px 12px 8px 8px; border-radius: 8px; color: var(--text-subtle); font-size: 16px; font-weight: 500; line-height: 24px; text-align: left; }
.pk-w-nav button.on { background: rgba(151, 151, 159, 0.16); color: var(--text-strong); }
.pk-w-nav button[disabled] { opacity: 0.5; cursor: not-allowed; }
.pk-w-pane { flex: 1; padding: 24px 8px 24px 24px; overflow-y: auto; }
.pk-w-list { display: flex; flex-direction: column; gap: 12px; list-style: none; }
.pk-w-opt { position: relative; display: block; width: 100%; height: 144.33px; padding: 16px; overflow: hidden; border-radius: 8px; background: rgba(151, 151, 159, 0.12); text-align: left; }
.pk-w-opt:hover:not([disabled]) { background: rgba(151, 151, 159, 0.16); }
.pk-w-opt[disabled] { cursor: default; }
.pk-w-covers, .pk-w-card { display: grid; grid-template-columns: repeat(4, 84.25px); gap: 16px; opacity: 0.2; }
.pk-w-card { grid-template-columns: 84.25px 1fr; align-items: center; }
.pk-w-opt .cover { height: 112.33px; border-radius: 8px; background: rgba(151, 151, 159, 0.6); box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16); }
.pk-w-card .bars { display: flex; flex-direction: column; gap: 9px; }
.pk-w-card .bars span { width: 60%; height: 20px; border-radius: 8px; background: rgba(151, 151, 159, 0.6); }
.pk-w-card .bars span + span { width: 95%; }
.pk-w-title { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-strong); font-size: 16px; font-weight: 500; line-height: 20px; }

/* game picker */
.pk-games { width: 560px; }
.pk-games-search { display: flex; align-items: center; gap: 8px; height: 40px; margin: 0 16px 16px 0; padding: 0 12px; border-radius: 8px; background: var(--pf-field); color: var(--text-muted); }
.pk-games-search input { flex: 1; border: 0; background: transparent; color: var(--text-default); font: 400 16px/20px var(--font); letter-spacing: inherit; outline: none; }
.pk-games-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-right: 16px; list-style: none; }
.pk-game { position: relative; display: flex; flex-direction: column; gap: 6px; width: 100%; color: var(--text-default); font-size: 12px; line-height: 16px; text-align: left; }
.pk-game img { width: 100%; aspect-ratio: 3 / 4; border-radius: 8px; object-fit: cover; box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16); }
.pk-game .check { position: absolute; top: 6px; right: 6px; display: none; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; }
.pk-game[aria-pressed="true"] img { box-shadow: 0 0 0 2px var(--brand); }
.pk-game[aria-pressed="true"] .check { display: grid; }
.pk-games-count { color: var(--text-muted); font-size: 14px; }

/* Set your status (480 x 514) */
.pfm-status { width: 480px; }
.cs-preview { display: flex; justify-content: center; margin: 8px 0 36px; }
.cs-card { position: relative; z-index: auto; animation: none; }
.cs-header { height: 135px; }
.cs-names { padding: 8px 16px 16px; }
.cs-names .pf-name { cursor: default; }
.cs-names .pf-name:hover { text-decoration: none; }
.cs-names .pf-tag-row { min-height: 22px; }
.cs-group { margin-bottom: 20px; }
.cs-label { color: var(--text-default); font-size: 16px; font-weight: 600; line-height: 20px; }
.cs-input-wrap { position: relative; margin-top: 4px; }
.cs-input { display: block; width: 100%; min-height: 47px; padding: 12px 32px 12px 48px; border: 1px solid transparent; border-radius: 8px; background: var(--pf-field); color: var(--text-default); font: 400 16px/20px var(--font); letter-spacing: inherit; resize: none; overflow: hidden; outline: none; }
.cs-input:focus { border-color: var(--text-link); }
.cs-input::placeholder { color: var(--text-muted); }
.cs-emoji { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 46px; height: 46px; padding-left: 4px; border-radius: 8px; color: var(--text-subtle); }
.cs-emoji:hover { color: var(--text-strong); }
.cs-emoji .emoji { width: 24px; height: 24px; margin: 0; }
.cs-clear-text { position: absolute; right: 8px; top: 15px; display: flex; color: var(--text-muted); }
.cs-clear-text:hover { color: var(--text-strong); }
.cs-footer-lead { flex: 1; min-width: 0; }
.cs-select { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 229.69px; height: 40px; margin-left: -12px; padding: 8px 8px 8px 12px; border-radius: 8px; color: var(--text-default); font-size: 16px; font-weight: 500; line-height: 20px; }
.cs-select:hover { background: rgba(151, 151, 159, 0.12); }

/* color picker popout (254 x 314) */
.pf-color { position: fixed; z-index: 95; width: 254px; padding: 16px; border: 1px solid var(--pf-line); border-radius: 4px; background: #202024; box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24); animation: upp-in 0.12s ease-out; }
.pf-color .sat { position: relative; height: 150px; border-radius: 3px; cursor: crosshair; touch-action: none; }
.pf-color .sat-white { position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0)); }
.pf-color .sat-black { position: absolute; inset: 0; border-radius: 3px; background: linear-gradient(to top, #000, rgba(0, 0, 0, 0)); }
.pf-color .sat-ptr { position: absolute; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0, 0, 0, 0.3), 0 0 1px 2px rgba(0, 0, 0, 0.4); pointer-events: none; }
.pf-color .hue { position: relative; height: 8px; margin: 8px 0; border-radius: 3px; background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%); cursor: pointer; touch-action: none; }
.pf-color .hue-ptr { position: absolute; top: -3px; width: 8px; height: 16px; margin-left: -4px; border-radius: 3px; background: #fff; box-shadow: 0 0 2px rgba(0, 0, 0, 0.6); pointer-events: none; }
.pf-color .hex { display: flex; align-items: center; height: 40px; margin-top: 16px; padding: 0 4px; border: 1px solid var(--brand); border-radius: 8px; background: var(--pf-field); }
.pf-color .hash { padding-left: 4px; color: #a1a2a9; font-size: 16px; line-height: 20px; }
.pf-color input { flex: 1; min-width: 0; height: 38px; border: 0; background: transparent; color: var(--text-strong); font: 400 16px/20px var(--font); letter-spacing: inherit; text-transform: lowercase; outline: none; }
.pf-color .dropper { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 4px; color: var(--text-strong); }
.pf-color .dropper:hover { background: rgba(151, 151, 159, 0.12); }
.pf-color .suggested { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.pf-color .suggested button { width: 34px; height: 34px; border: 1px solid #84858d; border-radius: 4px; }

/* listboxes: profile switcher + server tags */
.pf-listbox { position: fixed; z-index: 95; display: flex; flex-direction: column; border: 1px solid var(--pf-line); border-radius: 8px; background: var(--bg-surface-higher); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16); }
.pe-profile-list { width: 262px; max-height: 208px; padding: 4px; }
.pe-tag-list { width: 280px; padding: 8px; }
.lb-search input { width: 100%; height: 40px; padding: 1px 8px 1px 12px; border: 1px solid var(--brand); border-radius: 8px; background: var(--pf-field); color: var(--text-default); font: 400 16px/20px var(--font); letter-spacing: inherit; outline: 2px solid var(--brand); outline-offset: -2px; }
.lb-list { min-height: 0; max-height: 200px; overflow-y: auto; }
.pe-tag-list .lb-list { padding: 4px 0; }
.lb-row { display: flex; align-items: center; gap: 4px; height: 40px; padding: 4px 4px 4px 8px; border-radius: 4px; color: var(--text-strong); font-size: 16px; line-height: 20px; cursor: pointer; }
.lb-row:hover { background: rgba(151, 151, 159, 0.12); }
.lb-row.muted .lb-label { color: #8f9097; }
.lb-lead { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-left: -8px; padding: 4px; }
.lb-logo { width: 20px; height: 20px; }
.lb-server { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 4px; background: var(--brand); color: #fff; font-size: 8px; font-weight: 700; line-height: 1; }
.lb-label { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lb-check { flex: none; display: flex; padding: 4px; }
.pe-tag-pill .pf-chiplet { margin-right: 2px; }
.pe-tag-pill.set { padding-left: 4px; }

/* the shared context menu and tooltip sit above every profile layer */
.ctx-menu { z-index: 100; }
.ctx-menu.submenu { z-index: 101; }
.tooltip { z-index: 110; }

/* ---------- your profile around the app ---------- */
.av img.pf-deco, .av.has-status img.pf-deco { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; border-radius: 0; object-fit: contain; -webkit-mask: none; mask: none; }
.msg-deco { position: absolute; left: 16px; z-index: 1; width: 40px; height: 40px; margin-top: 2px; pointer-events: none; }
.msg-tag { margin: 0 4px 0 -2px; vertical-align: 1px; cursor: default; }
.member-name .ns-t, .up-name .ns-t, .msg-name .ns-t { max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.member-name.ns, .up-name.ns { display: block; }
.up-plate { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.up-plate .np-bg { border-radius: inherit; }
.up-plate .np-art { width: 86%; opacity: 0.4; }
.user-panel.plated .up-user:hover { background: rgba(115, 11, 200, 0.12); }
.user-panel > .up-user, .user-panel > .up-actions { position: relative; }
.profile-avatar[data-action] { cursor: pointer; }

.upp:focus, .fp-modal:focus, .pfm:focus { outline: none; }
.fp-modal:not(.collapsed) .pe-expand-tab { display: none; }
.fp-note textarea::placeholder { color: var(--text-muted); font-style: italic; opacity: 1; }
.pe-tile-btn .np.unset { opacity: 0.5; }
.pk-img-desc .ico { width: auto; height: auto; border-radius: 0; background: none; }
.pk-img-desc .ico.gif { padding: 1px 3px; border-radius: 3px; background: #fff; color: #000; font-size: 10px; font-weight: 800; line-height: 12px; }
.fp-widget [data-pe="widget-remove"] { opacity: 0; }
.fp-widget:hover [data-pe="widget-remove"], .fp-widget [data-pe="widget-remove"]:focus-visible { opacity: 1; }
.pk-item.preset { background: var(--fx-bg, var(--bg-base-lowest)); }
.pk-item.preset .pk-mini { background: rgba(32, 32, 36, 0.75); }
.pk-mini .pf-effect i { width: calc(6px * var(--z)); height: calc(6px * var(--z)); }
.pk-w-opt .cover { background: rgba(151, 151, 159, 0.6) center / cover; }
.pk-w-covers, .pk-w-card { opacity: 0.35; }
.pk-w-plus { display: grid; place-items: center; width: 20px; height: 20px; margin-bottom: 8px; border-radius: 50%; background: #fff; color: #000; }
.pk-w-title { flex-direction: column; align-content: center; }

.pf-color .hash { margin-right: 4px; }
.pe-tile.pf-color-open .pe-tile-btn .shade { opacity: 1; }
.lb-row.muted .lb-label { font-style: italic; }
.pe-tag-pill svg:last-child { transition: transform 0.15s; }
.pe-tag-pill.open svg:last-child { transform: rotate(180deg); }
.pf-tag-badge { width: 12px; height: 12px; margin-right: 2px; }
.cs-select { width: auto; justify-content: flex-start; }
.pk-ns-tile[data-effect="gradient"] .ns { --ns-c1: #2aaea6; --ns-c2: #ffc490; }
.pk-ns-tile[data-effect="neon"] .ns { --ns-c1: #a259ff; }
.pk-ns-tile[data-effect="toon"] .ns { --ns-c1: #ff8fc7; --ns-dark: #69053e; }
.pk-ns-tile[data-effect="pop"] .ns { --ns-c1: #2fbf5f; }
.pk-ns-tile[data-effect="gummy"] .ns { --ns-c1: #ff9ad5; --ns-dark: #7a3cff; }

/* light theme (not measured; follows the app's light tokens) */
html.theme-light { --pf-raised: #f2f2f4; --pf-field: rgba(0, 0, 0, 0.04); --pf-line: rgba(0, 0, 0, 0.1); --pf-line-strong: rgba(0, 0, 0, 0.14); }
html.theme-light .upp { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 12px 24px rgba(0, 0, 0, 0.12); }
html.theme-light .pf-color, html.theme-light .pe-skel, html.theme-light .pk-mini { background: #f2f2f4; }
html.theme-light .upp-card:hover, html.theme-light button.pf-bubble:hover, html.theme-light .pf-bubble.editable:hover { background: #e9e9ec; }
html.theme-light .pe-expand-tab:hover { background: #f2f2f4; }

/* ---------- Switch Accounts rows + Manage Accounts (measured) ---------- */
.ctx-item.ctx-account { min-height: 40px; }
.ctx-user .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctx-user-check { flex: none; display: flex; color: var(--text-strong); }
.ctx-menu.over-modal { z-index: 90; }
.ma-body { padding: 16px 16px 8px 24px; max-height: 360px; overflow-y: auto; } /* + the 8px scrollbar gutter on the right (measured) */
.ma-list { display: flex; flex-direction: column; border-radius: 8px; background: var(--bg-mod-subtle); }
.ma-card { display: flex; align-items: center; padding: 12px 16px; border-radius: 8px; }
.ma-card + .ma-card { border-top: 1px solid var(--border-subtle); border-top-left-radius: 0; border-top-right-radius: 0; }
.ma-card.switchable { cursor: pointer; }
.ma-card.switchable:hover { background: var(--bg-mod-subtle); }
.ma-card:focus-visible { outline: 2px solid var(--text-link); outline-offset: -2px; }
.ma-names { min-width: 0; margin-left: 8px; }
.ma-username { overflow: hidden; color: var(--text-strong); font-size: 16px; font-weight: 600; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
.ma-hint { color: #5eb479; font-size: 14px; font-weight: 600; line-height: 18px; }
.ma-more { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto; border-radius: 8px; color: var(--icon-subtle); }
.ma-more:hover { background: var(--bg-mod-normal); color: var(--text-strong); }

/* ---------- roles in a server popout (measured: roleListContainer 2px down, wrapping, 4px gaps; "Add role" 24px, r8) ---------- */
.upp-roles { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.upp-role { display: flex; align-items: center; gap: 4px; height: 24px; max-width: 100%; padding: 0 8px 0 6px; border: 1px solid var(--border-muted); border-radius: 8px; background: var(--bg-mod-subtle); color: var(--text-default); font-size: 12px; font-weight: 500; line-height: 16px; }
.upp-role-name { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upp-role-dot { flex: none; display: grid; place-items: center; width: 12px; height: 12px; border-radius: 50%; color: transparent; }
.upp-role-x { display: flex; padding: 0; border-radius: 50%; }
.upp-role-x:hover .upp-role-dot, .upp-role-x:focus-visible .upp-role-dot { color: rgba(0, 0, 0, 0.75); }
.upp-role-add { display: flex; align-items: center; justify-content: center; gap: 2px; width: 24px; height: 24px; border-radius: 8px; color: var(--text-subtle); font-size: 12px; line-height: 16px; }
.upp-role-add.show-label { width: auto; padding: 0 4px 0 0; }
.upp-role-add:hover { background: var(--bg-mod-subtle); color: var(--text-strong); }
