/* ============================================================
   Level cosmetics (Stage 5, 29.11.2026) — badges, name colours, avatar frames,
   profile covers, titles. Ids come from forum_api/cosmetics_lib.php; markup
   from assets/cosmetics/cosmetics.js. Animations stop with reduced motion.
   ============================================================ */

/* ---- level badge ---- */
.pbc-lv { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 800; line-height: 1.5;
  letter-spacing: .2px; white-space: nowrap; vertical-align: middle; position: relative; overflow: hidden; border: 1px solid transparent; font-family: 'Manrope', sans-serif; }
.pbc-lv.is-big { font-size: 12px; padding: 3px 10px; }
.pbc-b-classic { color: var(--accent); background: rgba(var(--accent-rgb), .12); border-color: rgba(var(--accent-rgb), .3); }
.pbc-b-outline { color: var(--accent); background: transparent; border-color: var(--accent); }
.pbc-b-solid { color: var(--btn-text, #fff); background: var(--accent); }
.pbc-b-bronze { color: #fff; background: linear-gradient(135deg, #B8692E, #E8A86B); }
.pbc-b-copper { color: #fff; background: linear-gradient(135deg, #9A3412, #F97316); }
.pbc-b-amber { color: #451A03; background: linear-gradient(135deg, #F59E0B, #FCD34D); }
.pbc-b-silver { color: #1F2937; background: linear-gradient(135deg, #CBD5E1, #F8FAFC 50%, #94A3B8); }
.pbc-b-platinum { color: #0F172A; background: linear-gradient(135deg, #E5E7EB, #FFFFFF 45%, #A1A1AA); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.pbc-b-ice { color: #083344; background: linear-gradient(135deg, #A5F3FC, #F0FDFF 50%, #67E8F9); }
.pbc-b-gold { color: #5B3A00; background: linear-gradient(135deg, #F59E0B, #FDE68A 50%, #F59E0B); }
.pbc-b-rose { color: #4C0519; background: linear-gradient(135deg, #F9A8D4, #FFE4E6 50%, #FB7185); }
.pbc-b-emerald { color: #022C22; background: linear-gradient(135deg, #10B981, #A7F3D0 50%, #059669); }
.pbc-b-legend { color: #fff; background: linear-gradient(90deg, #7C3AED, #DB2777, #F59E0B, #7C3AED); background-size: 300% 100%; animation: pbcFlow 4s linear infinite; }
.pbc-b-flame { color: #fff; background: linear-gradient(90deg, #991B1B, #F97316, #FACC15, #F97316, #991B1B); background-size: 300% 100%; animation: pbcFlow 3s linear infinite; }
.pbc-b-diamond { color: #0C4A6E; background: linear-gradient(90deg, #E0F2FE, #67E8F9, #FFFFFF, #A5B4FC, #E0F2FE); background-size: 300% 100%; animation: pbcFlow 4s linear infinite; }
.pbc-b-gold::after, .pbc-b-rose::after, .pbc-b-emerald::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.75), transparent); animation: pbcSweep 2.6s ease-in-out infinite; }

/* ---- name colour (only for users without a staff role colour) ---- */
.pbc-n { -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important; }
.pbc-n-pro { background-image: linear-gradient(90deg, var(--accent), var(--warn, #F5B54A)); }
.pbc-n-sky { background-image: linear-gradient(90deg, #3B82F6, #6366F1); }
.pbc-n-mint { background-image: linear-gradient(90deg, #0D9488, #22C55E); }
.pbc-n-ocean { background-image: linear-gradient(90deg, #2563EB, #06B6D4); }
.pbc-n-sunset { background-image: linear-gradient(90deg, #F97316, #EC4899); }
.pbc-n-forest { background-image: linear-gradient(90deg, #16A34A, #14B8A6); }
.pbc-n-violet { background-image: linear-gradient(90deg, #7C3AED, #EC4899); }
.pbc-n-gold { background-image: linear-gradient(90deg, #B45309, #F59E0B, #FDE68A, #F59E0B, #B45309); background-size: 250% 100%; animation: pbcFlow 3.5s linear infinite; }
.pbc-n-rainbow { background-image: linear-gradient(90deg, #EF4444, #F59E0B, #22C55E, #06B6D4, #6366F1, #EC4899, #EF4444); background-size: 300% 100%; animation: pbcFlow 5s linear infinite; }
.pbc-n-diamond { background-image: linear-gradient(90deg, #0EA5E9, #A5F3FC, #6366F1, #A5F3FC, #0EA5E9); background-size: 250% 100%; animation: pbcFlow 3.5s linear infinite; }

/* ---- title ---- */
.pbc-ttl { font-size: 11.5px; font-weight: 700; color: var(--text-dim); font-style: italic; white-space: nowrap; }
.pbc-ttl::before { content: '“'; } .pbc-ttl::after { content: '”'; }

/* ---- avatar frame: a wrapper around the existing avatar ---- */
.pbc-av { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; vertical-align: middle; --fw: 2px; --ring-bg: var(--card); }
.pbc-av > :first-child { position: relative; z-index: 1; border-radius: 50%; }
.pbc-av.is-ring::before { content: ''; position: absolute; inset: calc(var(--fw) * -1.6); border-radius: 50%; z-index: 0; }
.pbc-av.is-ring::after { content: ''; position: absolute; inset: calc(var(--fw) * -.55); border-radius: 50%; background: var(--ring-bg); z-index: 0; }
.pbc-av .pbc-deco { position: absolute; z-index: 2; top: -.55em; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: calc(var(--fw) * 5.5); line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); pointer-events: none; }
.pbc-f-plain > :first-child { box-shadow: 0 0 0 calc(var(--fw)*.6) var(--ring-bg), 0 0 0 calc(var(--fw)*1.5) var(--accent); }
.pbc-f-double > :first-child { box-shadow: 0 0 0 calc(var(--fw)*.5) var(--ring-bg), 0 0 0 calc(var(--fw)*1.05) var(--accent), 0 0 0 calc(var(--fw)*1.55) var(--ring-bg), 0 0 0 calc(var(--fw)*2.1) var(--accent); }
.pbc-f-dash > :first-child { outline: calc(var(--fw)*.8) dashed var(--accent); outline-offset: calc(var(--fw)*.6); }
.pbc-f-neon > :first-child { box-shadow: 0 0 0 calc(var(--fw)*.6) var(--ring-bg), 0 0 0 calc(var(--fw)*1.3) #22D3EE, 0 0 calc(var(--fw)*4) #22D3EE; }
.pbc-f-ocean::before { background: conic-gradient(from 200deg, #1D4ED8, #06B6D4, #1D4ED8); }
.pbc-f-sunset::before { background: conic-gradient(from 200deg, #F97316, #EC4899, #F97316); }
.pbc-f-rainbow::before { background: conic-gradient(#EF4444, #F59E0B, #22C55E, #06B6D4, #6366F1, #EC4899, #EF4444); }
.pbc-f-spin::before { background: conic-gradient(var(--accent), #22D3EE, #A78BFA, #F472B6, var(--accent)); animation: pbcSpin 3.2s linear infinite; }
.pbc-f-comet::before { background: conic-gradient(transparent 0 55%, rgba(var(--accent-rgb), .25) 70%, var(--accent) 97%, #fff 100%); animation: pbcSpin 1.8s linear infinite; }
.pbc-f-pulse > :first-child { animation: pbcPulse 2s ease-in-out infinite; }
.pbc-f-gold::before { background: conic-gradient(#FDE68A, #F59E0B, #FFF7D6, #D97706, #FDE68A); animation: pbcSpin 4s linear infinite; }
.pbc-f-diamond::before { background: conic-gradient(#E0F2FE, #67E8F9, #FFFFFF, #A5B4FC, #E0F2FE); animation: pbcSpin 3s linear infinite; }
.pbc-f-fire::before { background: conic-gradient(#7F1D1D, #EF4444, #F97316, #FDE047, #F97316, #EF4444, #7F1D1D); animation: pbcSpin 2.2s linear infinite; }

/* ---- profile cover ---- */
.pbc-cv { position: relative; overflow: hidden; }
.pbc-cv-none { background: linear-gradient(135deg, var(--chip), var(--card-border)); }
.pbc-cv-ocean { background: linear-gradient(135deg, #1D4ED8, #06B6D4); }
.pbc-cv-sunset { background: linear-gradient(135deg, #F97316, #DB2777); }
.pbc-cv-forest { background: linear-gradient(135deg, #15803D, #0D9488); }
.pbc-cv-night { background: linear-gradient(135deg, #312E81, #7C3AED); }
.pbc-cv-graphite { background: linear-gradient(135deg, #1F2937, #475569); }
.pbc-cv-aurora { background: linear-gradient(120deg, #0EA5E9, #8B5CF6, #EC4899, #10B981, #0EA5E9); background-size: 400% 400%; animation: pbcDrift 12s ease-in-out infinite; }
.pbc-cv-wave { background: linear-gradient(135deg, #0369A1, #22D3EE); }
.pbc-cv-wave::after { content: ''; position: absolute; inset: 0; background: repeating-radial-gradient(circle at 50% 160%, rgba(255,255,255,0) 0 18px, rgba(255,255,255,.16) 19px 21px); background-size: 200% 100%; animation: pbcSlide 9s linear infinite; }
.pbc-cv-stars { background: radial-gradient(120% 120% at 70% 0%, #1E1B4B, #0B1026); }
.pbc-cv-stars::before, .pbc-cv-stars::after { content: ''; position: absolute; inset: 0; background-image:
  radial-gradient(1.5px 1.5px at 12% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 28% 70%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 44% 22%, #fff 50%, transparent 51%),
  radial-gradient(1px 1px at 61% 55%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 77% 35%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 90% 75%, #fff 50%, transparent 51%),
  radial-gradient(1px 1px at 35% 45%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 85% 15%, #fff 50%, transparent 51%); }
.pbc-cv-stars::after { transform: translate(7%, 18%); animation: pbcTwinkle 3s ease-in-out infinite; }
.pbc-cv-grid { background: linear-gradient(180deg, #0F172A, #1E293B); }
.pbc-cv-grid::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(34,211,238,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(34,211,238,.25) 1px, transparent 1px); background-size: 18px 18px; }
.pbc-cv-grid::after { content: ''; position: absolute; top: 0; bottom: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(34,211,238,.35), transparent); animation: pbcScan 4s ease-in-out infinite; }
.pbc-cv-gold { background: radial-gradient(120% 140% at 20% 0%, #FDE68A, #F59E0B 45%, #92400E); }
.pbc-cv-gold::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.35) 45%, transparent 60%); background-size: 250% 100%; animation: pbcSlide 5s linear infinite; }
.pbc-cv-cosmos { background: radial-gradient(60% 90% at 25% 30%, #DB2777, transparent 70%), radial-gradient(60% 90% at 75% 70%, #4F46E5, transparent 70%), #0B1026; animation: pbcHue 10s linear infinite; }
.pbc-cv-lava { background: linear-gradient(120deg, #7F1D1D, #DC2626, #F97316, #FACC15, #DC2626, #7F1D1D); background-size: 300% 300%; animation: pbcDrift 7s ease-in-out infinite; }

@keyframes pbcFlow { to { background-position: 300% 0; } }
@keyframes pbcSweep { 0% { left: -60%; } 55%, 100% { left: 130%; } }
@keyframes pbcSpin { to { transform: rotate(360deg); } }
@keyframes pbcPulse { 0%, 100% { box-shadow: 0 0 0 calc(var(--fw)*.6) var(--ring-bg), 0 0 0 calc(var(--fw)*1.3) var(--accent), 0 0 0 0 rgba(var(--accent-rgb), .5); }
  50% { box-shadow: 0 0 0 calc(var(--fw)*.6) var(--ring-bg), 0 0 0 calc(var(--fw)*1.3) var(--accent), 0 0 0 calc(var(--fw)*3.5) rgba(var(--accent-rgb), 0); } }
@keyframes pbcDrift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes pbcSlide { to { background-position: -200% 0; } }
@keyframes pbcTwinkle { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes pbcScan { 0% { left: -30%; } 100% { left: 100%; } }
@keyframes pbcHue { to { filter: hue-rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .pbc-lv, .pbc-lv::after, .pbc-n, .pbc-av::before, .pbc-av > :first-child, .pbc-cv, .pbc-cv::before, .pbc-cv::after { animation: none !important; }
}

/* ---- Profil › Bezaklar picker ---- */
.pbc-pk-load { padding: 30px 16px; text-align: center; color: var(--text-dim); }
.pbc-pk-sec { margin-bottom: 20px; }
.pbc-pk-sec h3 { margin: 0 2px 10px; font: 800 15px 'Manrope', sans-serif; color: var(--text); display: flex; align-items: baseline; gap: 8px; }
.pbc-pk-sec h3 small { font-size: 12px; font-weight: 700; color: var(--text-dim); }
.pbc-pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.pbc-pk-opt { position: relative; padding: 0; border: 2px solid transparent; border-radius: 14px; background: var(--chip); color: var(--text); cursor: pointer; overflow: hidden;
  text-align: left; font-family: 'Manrope', sans-serif; -webkit-tap-highlight-color: transparent; }
.pbc-pk-opt.is-sel { border-color: var(--accent); }
.pbc-pk-opt.is-sel::before { content: '✓'; position: absolute; z-index: 3; left: 6px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent);
  color: var(--btn-text, #fff); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.pbc-pk-opt.is-busy { opacity: .6; pointer-events: none; }
.pbc-pk-opt > span { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 5px 8px 7px; }
.pbc-pk-opt > span b { font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbc-pk-opt > span em { font-style: normal; font-size: 10px; font-weight: 800; color: var(--text-dim); white-space: nowrap; }
.pbc-pk-opt.is-lock .pbc-pk-sw, .pbc-pk-opt.is-lock .pbc-pk-fr { filter: grayscale(.85) brightness(.85); opacity: .5; }
.pbc-pk-sw { height: 54px; }
.pbc-pk-fr { height: 60px; display: grid; place-items: center; --ring-bg: var(--chip); }
.pbc-pk-fr .pbc-av { --ring-bg: var(--chip); }
.pbc-pk-av { width: 34px; height: 34px; border-radius: 50%; background: #DBEAFE; color: #1E3A8A; display: grid; place-items: center; font: 800 12px 'Manrope', sans-serif; }
.pbc-pk-nm { font: 800 16px 'Manrope', sans-serif; }
.pbc-pk-ttl { display: flex; gap: 8px; }
.pbc-pk-ttl input { flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 1px solid var(--card-border); background: var(--chip); color: var(--text); padding: 0 12px; font: 600 16px 'Manrope', sans-serif; }
.pbc-pk-ttl input:focus { outline: none; border-color: var(--accent); }
.pbc-pk-ttl input:disabled { opacity: .55; }
.pbc-pk-ttl button { height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--accent); color: var(--btn-text, #fff); font: 800 14px 'Manrope', sans-serif; cursor: pointer; }
.pbc-pk-note { margin: 8px 2px 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }

/* ---- forum profile pop-up ---- */
.forum-profile-card.pbc-has-cover { position: relative; overflow: hidden; }
.pbc-pop-cover { position: absolute; left: 0; right: 0; top: 0; height: 78px; z-index: 0; }
.forum-profile-card.pbc-has-cover .forum-slider { position: relative; z-index: 1; }
/* the slider clips its overflow; give top-of-ring decorations (crown, gem, flame) room */
.forum-profile-card .forum-slider { padding-top: 16px; margin-top: -16px; }
.forum-profile-card .pbc-av { --ring-bg: var(--bg-elevated, var(--card)); margin: 0 auto 14px; }
.forum-profile-card .pbc-av > .forum-profile-avatar, .forum-profile-card .pbc-av > .forum-profile-avatar-fallback { margin: 0; border: 0; }
.forum-profile-card.pbc-has-cover .forum-profile-avatar, .forum-profile-card.pbc-has-cover .forum-profile-avatar-fallback { border: 3px solid var(--bg-elevated, var(--card)); }
.pbc-pop-ttl { text-align: center; margin-top: 2px; }
.pbc-pop-lv { display: block; width: fit-content; margin: 0 auto 10px; }
/* a framed avatar inside comment gutters / rows keeps its own size */
.forum-comment-gutter .pbc-av, .ul-ava .pbc-av, .v3f-trow-main .pbc-av, .v3f-urow .pbc-av, .v3f-lb-row .pbc-av { flex: none; }

/* ============================================================
   Staff badges (Stage 5b) — supervisor / superadmin. Custom text + icon + one of 27 styles.
   Ported from the approved demo; ids = COS_SB_STYLES in forum_api/cosmetics_lib.php.
   ============================================================ */

  .pbc-sb { --h: 18px; display: inline-flex; align-items: center; gap: 4px; height: var(--h); padding: 0 8px; border-radius: 999px; font: 800 10.5px/1 'Manrope', sans-serif;
    letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; vertical-align: middle; position: relative; overflow: hidden; isolation: isolate; }
  .pbc-sb.is-big { --h: 28px; padding: 0 13px; font-size: 12.5px; gap: 6px; }
  .pbc-sb .ic { display: inline-grid; place-items: center; font-size: 1.05em; letter-spacing: 0; }
  .pbc-sb.is-noup { text-transform: none; letter-spacing: .02em; }
  /* static */
  .pbc-sb-ceo { color: #fff; background: #0a0a0a; border: 1px solid #4a4f57; box-shadow: 0 0 0 1px rgba(255,255,255,.06); padding-left: 2px; }
  .pbc-sb-ceo .ic { width: calc(var(--h) - 4px); height: calc(var(--h) - 4px); border-radius: 50%; background: linear-gradient(135deg, #fff, #9aa3ad); color: #0a0a0a; font-size: .8em; }
  .pbc-sb-dev { color: #FF5050; background: rgba(255,80,80,.15); }
  .pbc-sb-tint { color: var(--accent); background: rgba(var(--accent-rgb), .15); }
  .pbc-sb-solid { color: #fff; background: var(--accent); }
  .pbc-sb-outline { color: var(--accent); border: 1.5px solid var(--accent); background: transparent; }
  .pbc-sb-ink { color: #fff; background: #111827; border: 1px solid var(--accent); }
  .pbc-sb-ocean { color: #fff; background: linear-gradient(90deg, #1D4ED8, #06B6D4); }
  .pbc-sb-sunset { color: #fff; background: linear-gradient(90deg, #F97316, #DB2777); }
  .pbc-sb-violet { color: #fff; background: linear-gradient(90deg, #7C3AED, #C026D3); }
  .pbc-sb-emerald { color: #fff; background: linear-gradient(90deg, #047857, #10B981); }
  .pbc-sb-ruby { color: #fff; background: linear-gradient(90deg, #991B1B, #EF4444); }
  .pbc-sb-gold { color: #5B3A00; background: linear-gradient(135deg, #F59E0B, #FDE68A 50%, #F59E0B); }
  .pbc-sb-silver { color: #1F2937; background: linear-gradient(135deg, #CBD5E1, #F8FAFC 50%, #94A3B8); }
  .pbc-sb-terminal { color: #22C55E; background: #0B0F0A; border: 1px solid #14532D; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; letter-spacing: .02em; }
  /* animated */
  .pbc-sb-shine { color: #5B3A00; background: linear-gradient(135deg, #F59E0B, #FDE68A 50%, #F59E0B); }
  .pbc-sb-ceoshine { color: #fff; background: #0a0a0a; border: 1px solid #4a4f57; }
  .pbc-sb-shine::after, .pbc-sb-ceoshine::after { content: ''; position: absolute; inset: 0 auto 0 -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.8), transparent); animation: pbcSb_sweep 2.4s ease-in-out infinite; z-index: -1; }
  .pbc-sb-ceoshine::after { background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); z-index: 0; }
  .pbc-sb-flow { color: #fff; background: linear-gradient(90deg, #EF4444, #F59E0B, #22C55E, #06B6D4, #6366F1, #EC4899, #EF4444); background-size: 300% 100%; animation: pbcSb_flow 5s linear infinite; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
  .pbc-sb-pulse { color: #fff; background: var(--accent); animation: pbcSb_pulse 2s ease-in-out infinite; overflow: visible; }
  .pbc-sb-neon { color: #FF4FD8; background: #12001A; border: 1px solid #FF4FD8; text-shadow: 0 0 6px #FF4FD8; animation: pbcSb_flicker 3.5s linear infinite; }
  .pbc-sb-glitch { color: #fff; background: #0F172A; }
  .pbc-sb-glitch .tx { animation: pbcSb_glitch 2.2s steps(1) infinite; }
  .pbc-sb-fire { color: #fff; background: linear-gradient(90deg, #7F1D1D, #EF4444, #F97316, #FACC15, #F97316, #EF4444, #7F1D1D); background-size: 300% 100%; animation: pbcSb_flow 3s linear infinite; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
  .pbc-sb-aurora { color: #fff; background: linear-gradient(120deg, #0EA5E9, #8B5CF6, #EC4899, #10B981, #0EA5E9); background-size: 400% 400%; animation: pbcSb_drift 8s ease-in-out infinite; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
  .pbc-sb-ring { color: var(--text); background: var(--card); }
  .pbc-sb-ring::before { content: ''; position: absolute; left: 50%; top: 50%; width: 300%; aspect-ratio: 1; background: conic-gradient(var(--accent), #22D3EE, #A78BFA, #F472B6, var(--accent)); animation: pbcSb_spinc 3s linear infinite; z-index: -2; }
  @keyframes pbcSb_spinc { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
  .pbc-sb-ring::after { content: ''; position: absolute; inset: 1.5px; border-radius: 999px; background: var(--card); z-index: -1; }
  .pbc-sb-holo { color: #312E81; background: linear-gradient(115deg, #E0E7FF, #FBCFE8, #CFFAFE, #FEF9C3, #E0E7FF); background-size: 300% 300%; animation: pbcSb_drift 5s ease-in-out infinite; border: 1px solid rgba(255,255,255,.7); }
  .pbc-sb-stars { color: #fff; background: radial-gradient(120% 140% at 70% 0%, #312E81, #0B1026); }
  .pbc-sb-stars::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 15% 30%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 40% 75%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 70% 25%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 88% 65%, #fff 50%, transparent 51%); animation: pbcSb_twinkle 2.6s ease-in-out infinite; z-index: -1; }
  .pbc-sb-scan { color: #22C55E; background: #0B0F0A; border: 1px solid #14532D; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; letter-spacing: .02em; }
  .pbc-sb-scan::after { content: ''; position: absolute; top: 0; bottom: 0; width: 30%; left: -30%; background: linear-gradient(90deg, transparent, rgba(34,197,94,.45), transparent); animation: pbcSb_scan 2.2s linear infinite; z-index: -1; }
  .pbc-sb-ice { color: #083344; background: linear-gradient(90deg, #A5F3FC, #F0FDFF, #67E8F9, #F0FDFF, #A5F3FC); background-size: 300% 100%; animation: pbcSb_flow 4s linear infinite; }
  @keyframes pbcSb_sweep { 0% { left: -60%; } 55%, 100% { left: 130%; } }
  @keyframes pbcSb_flow { to { background-position: 300% 0; } }
  @keyframes pbcSb_drift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
  @keyframes pbcSb_spin { to { transform: rotate(360deg); } }
  @keyframes pbcSb_twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
  @keyframes pbcSb_scan { to { left: 110%; } }
  @keyframes pbcSb_pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .55); } 60% { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); } }
  @keyframes pbcSb_flicker { 0%, 18%, 22%, 60%, 64%, 100% { opacity: 1; } 20%, 62% { opacity: .55; } }
  @keyframes pbcSb_glitch { 0%, 84%, 100% { text-shadow: none; transform: none; } 86% { text-shadow: -2px 0 #F43F5E, 2px 0 #22D3EE; transform: translateX(1px); } 90% { text-shadow: 2px 0 #F43F5E, -2px 0 #22D3EE; transform: translateX(-1px); } 94% { text-shadow: -1px 0 #F43F5E, 1px 0 #22D3EE; } }
  @media (prefers-reduced-motion: reduce) { .pbc-sb, .pbc-sb *, .pbc-sb::before, .pbc-sb::after { animation: none !important; } }

  
/* ---- Bezaklar: live preview pinned at the top (Stage 5b) ---- */
/* pinned by JS (the Profil screens scroll inside a modal with overflow:hidden / transformed
   parents, where CSS sticky can't work); --pv-top = how far below the screen top it rests */
.pbc-prev { position: relative; --pv-top: 8px; z-index: 6; margin: 0 0 18px; will-change: transform; background: var(--card); border: 1px solid var(--card-border); border-radius: 18px; overflow: hidden;
  box-shadow: 0 8px 22px rgba(15,23,42,.12); }
html.ui3:not(.tg-mobile) .pbc-prev { --pv-top: 87px; } /* below the 75px sticky desktop header */
html.ui3.tg-mobile .pbc-prev { --pv-top: calc(6px + max(env(safe-area-inset-top, 0px), var(--s3-safe-top, 0px)) + var(--s3-content-top, 46px)); }
.pbc-prev-probe { position: fixed; left: -9999px; width: 1px; height: 1px; top: var(--pv-top); visibility: hidden; pointer-events: none; }
/* card body copies the forum profile pop-up */
.pbc-prev-card { position: relative; text-align: center; padding: 18px 16px 14px; background: var(--bg-elevated, var(--card)); }
.pbc-prev-cover { position: absolute; left: 0; right: 0; top: 0; height: 64px; z-index: 0; }
.pbc-prev-card > * { position: relative; z-index: 1; }
.pbc-prev-card > .pbc-prev-cover { position: absolute; z-index: 0; }
.pbc-prev-av { width: fit-content; margin: 0 auto 10px; }
.pbc-prev-av .pbc-av { --ring-bg: var(--bg-elevated, var(--card)); }
.pbc-prev-av .pbc-pk-av { width: 64px; height: 64px; font-size: 21px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--accent); box-sizing: border-box; }
.pbc-prev-card.has-cover .pbc-prev-av .pbc-pk-av { border: 3px solid var(--bg-elevated, var(--card)); }
.pbc-prev-av .pbc-av .pbc-pk-av { border: 0; }
.pbc-prev-nm { font: 700 18px 'Space Grotesk', sans-serif; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbc-prev-ttl { margin-top: 2px; }
.pbc-prev-un { font-size: 13px; color: var(--text-dim); margin-top: 1px; }
.pbc-prev-pills { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 8px; }
.pbc-prev-pills:empty { display: none; }
.pbc-prev-role { padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--chip); color: var(--text-dim); }

/* ---- Bezaklar: staff badge editor ---- */
.pbc-sb-up { display: inline-flex; align-items: center; gap: 6px; margin: 10px 2px 12px; font: 700 13px 'Manrope', sans-serif; color: var(--text-dim); cursor: pointer; }
.pbc-sb-icons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pbc-sb-icons button { min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px; border: 2px solid transparent; background: var(--chip); color: var(--text);
  font: 800 15px 'Manrope', sans-serif; cursor: pointer; }
.pbc-sb-icons button.is-on { border-color: var(--accent); }
.pbc-sb-grp { font: 800 12px 'Manrope', sans-serif; color: var(--text-dim); margin: 4px 2px 8px; }
.pbc-sb-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 12px; }
.pbc-sb-opt .pbc-pk-fr { height: 54px; padding: 0 6px; overflow: hidden; }
.pbc-sb .tx { position: relative; }
