
        /* ================= PERKS ================= */
        /* badges */
        .pc-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
        .pc-badge { display: inline-flex; padding: 3px; border-radius: 5px; background: var(--bg-3); border: 1px solid var(--border); }
        /* profile shell: colours, frame, effect */
        .pc-shell { position: relative; overflow: hidden; border-radius: inherit; }
        .pc-shell.pc-themed { background: linear-gradient(180deg, color-mix(in srgb, var(--pc1) 55%, var(--bg-1)) 0%, color-mix(in srgb, var(--pc2) 45%, var(--bg-1)) 100%); }
        .pc-shell.pc-themed .pc-sec { background: rgba(0,0,0,.28); border-color: rgba(255,255,255,.08); }
        .pc-shell.pc-themed .pc-avatar { border-color: color-mix(in srgb, var(--pc1) 55%, var(--bg-1)); background: color-mix(in srgb, var(--pc1) 55%, var(--bg-1)); }
        .pc-shell.pc-themed .pc-name, .pc-shell.pc-themed .pc-sub { text-shadow: 0 1px 2px rgba(0,0,0,.35); }
        .pc-shell[class*="frame-"]::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3; }
        .frame-neon::after { border: 3px solid transparent; background: linear-gradient(90deg, #22d3ee, #a855f7, #ec4899, #22d3ee) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; background-size: 300% 100%; animation: pk-slide 4s linear infinite; }
        .frame-gold::after { border: 3px solid #d4a72c; box-shadow: inset 0 0 14px rgba(250,204,21,.45); }
        .frame-aurora::after { border: 3px solid transparent; background: linear-gradient(135deg, #34d399, #60a5fa, #c084fc, #f472b6) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; filter: blur(.3px); }
        .frame-glitch::after { border: 2px solid #22d3ee; box-shadow: 3px 0 0 #f43f5e, -3px 0 0 #22d3ee; animation: pk-glitch 2.4s steps(2) infinite; }
        .frame-pixel::after { border: 4px dashed var(--accent); }
        @keyframes pk-slide { to { background-position: 300% 0; } }
        @keyframes pk-glitch { 0%, 88% { transform: none; } 90% { transform: translate(2px, -1px); } 94% { transform: translate(-2px, 1px); } 98% { transform: none; } }
        .pfx { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
                @keyframes pk-fall { from { transform: translateY(0); } to { transform: translateY(200px); } }
        @keyframes pk-rise { from { transform: translateY(0); } to { transform: translateY(-200px); } }
        @keyframes pk-twinkle { from { opacity: .25; } to { opacity: 1; } }
        /* avatar decorations */
        .deco { position: relative; display: inline-block; flex-shrink: 0; line-height: 0; }
        .deco > .user-avatar { width: 100% !important; height: 100% !important; }
        .deco-l { position: absolute; inset: calc(var(--ds) * -0.1); border-radius: 50%; pointer-events: none; z-index: 1; }
        .deco-neon .deco-l { background: conic-gradient(#22d3ee, #a855f7, #ec4899, #facc15, #22d3ee); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); animation: pk-spin 3s linear infinite; filter: drop-shadow(0 0 4px #a855f7); }
        .deco-gold .deco-l { background: conic-gradient(#fde68a, #b45309, #fef3c7, #d97706, #fde68a); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px)); filter: drop-shadow(0 0 3px rgba(250,204,21,.6)); }
        .deco-fire .deco-l { box-shadow: 0 0 0 2px #f97316, 0 0 10px 2px #f97316, 0 -4px 14px 2px #ef4444; animation: pk-flicker 1.2s ease-in-out infinite alternate; }
        .deco-frost .deco-l { box-shadow: 0 0 0 2px #bae6fd, 0 0 12px 2px rgba(125,211,252,.8); background: radial-gradient(circle at 20% 15%, #fff 1.5px, transparent 2px), radial-gradient(circle at 85% 30%, #e0f2fe 1.5px, transparent 2px), radial-gradient(circle at 70% 90%, #fff 1px, transparent 1.5px); }
        .deco-sakura .deco-l { border: 3px dotted #f9a8d4; animation: pk-spin 8s linear infinite; box-shadow: 0 0 8px rgba(244,114,182,.5); }
        .deco-pixel .deco-l { border-radius: 18%; border: 3px solid #4ade80; box-shadow: 3px 3px 0 #166534; }
        .deco-cat .deco-l { inset: calc(var(--ds) * -0.22) 0 0 0; border-radius: 0; background: linear-gradient(135deg, transparent 50%, var(--accent) 50%) 4% 0 / 30% 30% no-repeat, linear-gradient(225deg, transparent 50%, var(--accent) 50%) 96% 0 / 30% 30% no-repeat; }
        .deco-halo .deco-l { inset: calc(var(--ds) * -0.3) 15% auto 15%; height: calc(var(--ds) * 0.22); border-radius: 50%; border: 3px solid #fde047; box-shadow: 0 0 10px #fde047; animation: pk-float 2.4s ease-in-out infinite alternate; }
        @keyframes pk-spin { to { transform: rotate(360deg); } }
        @keyframes pk-flicker { from { filter: brightness(1); } to { filter: brightness(1.4); transform: scale(1.03); } }
        @keyframes pk-float { to { transform: translateY(-3px); } }
        /* display name styles */
        .nm { font-weight: inherit; }
        .nmfx-gradient, .nmfx-shine { background: linear-gradient(90deg, var(--n1, var(--accent)), var(--n2, var(--accent-hi))); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
        .nmfx-shine { background: linear-gradient(90deg, var(--n1, var(--accent)) 0%, #fff 50%, var(--n2, var(--accent-hi)) 100%) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; animation: pk-slide 3s linear infinite; }
        .nmfx-rainbow { background: linear-gradient(90deg, #f43f5e, #f59e0b, #facc15, #4ade80, #22d3ee, #a855f7, #f43f5e) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: pk-slide 5s linear infinite; }
        .nmfx-glow { text-shadow: 0 0 8px var(--n1, var(--accent)); }
        .nmfx-neon { text-shadow: 0 0 4px #fff, 0 0 10px var(--n1, var(--accent)), 0 0 18px var(--n1, var(--accent)); animation: pk-neon 3s ease-in-out infinite; }
        .nmfx-toon { text-shadow: 2px 2px 0 rgba(0,0,0,.65), -1px -1px 0 rgba(0,0,0,.4); letter-spacing: .3px; }
        @keyframes pk-neon { 0%, 92%, 100% { opacity: 1; } 94% { opacity: .55; } 96% { opacity: 1; } 97% { opacity: .7; } }
        .nmf-pixel { font-size: .72em; line-height: 1.6; }
        .nmf-hand { font-size: 1.18em; }
        /* nameplates */
        .np-aurora { background-image: linear-gradient(90deg, rgba(52,211,153,.22), rgba(96,165,250,.22), rgba(192,132,252,.22), rgba(52,211,153,.22)); }
        .np-sunset { background-image: linear-gradient(90deg, rgba(251,146,60,.25), rgba(244,63,94,.22), rgba(168,85,247,.2), rgba(251,146,60,.25)); }
        .np-ocean { background-image: linear-gradient(90deg, rgba(34,211,238,.2), rgba(37,99,235,.24), rgba(34,211,238,.2)); }
        .np-forest { background-image: linear-gradient(90deg, rgba(74,222,128,.18), rgba(22,101,52,.3), rgba(74,222,128,.18)); }
        .np-candy { background-image: linear-gradient(90deg, rgba(244,114,182,.25), rgba(196,181,253,.25), rgba(244,114,182,.25)); }
        .np-space { background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 60%, #fff, transparent), linear-gradient(90deg, rgba(30,27,75,.6), rgba(67,56,202,.35), rgba(30,27,75,.6)); }
        .np-lava { background-image: linear-gradient(90deg, rgba(239,68,68,.28), rgba(249,115,22,.22), rgba(127,29,29,.3), rgba(239,68,68,.28)); }
        /* perk pickers in the profile editor */
        .rfx { color: transparent !important; -webkit-background-clip: text; background-clip: text; background-image: linear-gradient(90deg, var(--rc1), var(--rc2), var(--rc3)); background-size: 100% 100%; }
        .rfx-flow { background-image: linear-gradient(90deg, var(--rc1), var(--rc2), var(--rc3), var(--rc1)); background-size: 200% 100%; animation: rfx-flow 4s linear infinite; }
        @keyframes rfx-flow { to { background-position: -200% 0; } }
        body.nomotion .rfx-flow { animation: none; }
        .stag { display: inline-flex; align-items: center; gap: 4px; height: 16px; padding: 0 6px 0 4px; margin-inline-start: 6px; border-radius: 5px; background: color-mix(in srgb, var(--tg, #5865f2) 30%, var(--bg-3)); border: 1px solid color-mix(in srgb, var(--tg, #5865f2) 55%, transparent); color: var(--bright); font-size: 10.5px; line-height: 1; letter-spacing: .4px; vertical-align: middle; flex-shrink: 0; }
        .stag b { font-weight: 800; } .stag-i { display: block; flex: none; image-rendering: pixelated; }
        .stag-pic { display: block; flex: none; width: 12px; height: 12px; border-radius: 3px; object-fit: cover; }
        .stag-up { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0 0; } .stag-up-img { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-3); }
        .stag-packs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
        .stag-grid { display: flex; gap: 6px; flex-wrap: wrap; } .stag-pick { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-3); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; color: var(--muted); } .stag-pick:hover { border-color: var(--accent); } .stag-pick.on { border-color: var(--accent); background: var(--accent-bg); }
        .stag-prev { margin-top: 10px; min-height: 22px; } .stag-prev .stag { margin: 0; }
        .pk-grid { max-height: 420px; overflow-y: auto; padding: 2px; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
        .pk-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; background: var(--bg-0); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; color: var(--text); font: inherit; font-size: 11.5px; }
        .pk-tile:hover { border-color: var(--border-focus); }
        .pk-tile.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--bright); }
        .pk-tile .deco, .pk-tile > .user-avatar { margin: 6px 0 2px; }
        .pk-fxprev, .pk-frprev { position: relative; display: block; width: 62px; height: 52px; border-radius: 6px; background: var(--bg-3); overflow: hidden; }
        .pk-frprev::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
        .pk-fxprev .pfx { inset: 0 auto auto 0; width: 200%; height: 200%; transform: scale(.5); transform-origin: 0 0; }
        .pk-npprev { display: flex; align-items: center; gap: 5px; width: 72px; height: 26px; padding: 0 5px; border-radius: 5px; background-color: var(--bg-3); margin: 13px 0; }
        .pk-npprev i { width: 16px; height: 16px; border-radius: 50%; background: var(--bg-4); } .pk-npprev b { flex: 1; height: 6px; border-radius: 3px; background: var(--muted); }
        .pk-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 8px; }
        .pk-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); flex: 1; min-width: 130px; }
        .pk-row label.pk-col { flex: 0 0 auto; min-width: 0; }
        .pk-row input[type="color"] { width: 54px; height: 34px; border: 1px solid var(--border); border-radius: 6px; background: transparent; cursor: pointer; }
        .pk-row select.system-input { flex: 1; min-width: 150px; margin: 0; }
        .pk-namepreview { font-size: 22px; font-weight: 800; color: var(--bright); padding: 10px 12px; background: var(--bg-0); border: 1px solid var(--border); border-radius: 8px; }
        /* widgets on the profile card */
        .pcg { display: flex; gap: 10px; align-items: center; }
        .pcg-ic { width: 44px; height: 44px; border-radius: 8px; background: var(--accent-bg); color: var(--accent-hi); display: grid; place-items: center; flex-shrink: 0; }
        .pcg b { display: block; color: var(--bright); } .pcg i { display: block; font-size: 12px; color: var(--muted); }
        .pcg-list { display: flex; flex-wrap: wrap; gap: 5px; }
        .pcg-list span { background: var(--bg-3); border: 1px solid var(--border); border-radius: 4px; padding: 2px 8px; font-size: 12px; color: var(--bright); }
        /* app icons + badge picker */
        .ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
        .ai-pick { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 6px; cursor: pointer; color: var(--text); font: inherit; font-size: 12px; }
        .ai-pick svg, .ai-pick img { width: 46px; height: 46px; border-radius: 12px; image-rendering: pixelated; }
        .ai-pick.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--bright); }
        .bd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 50vh; overflow: auto; }
        .bd-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; background: var(--bg-0); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font-size: 12.5px; color: var(--bright); }
        .bd-item input { accent-color: var(--accent); }
        /* the status dot always sits above a decoration, as expected */
        .deco .sdot, .deco-host .sdot { z-index: 2; }
        .deco-host > .deco-l { z-index: 1; }
        body.compact .msg-avatar .deco { width: 28px !important; height: 28px !important; --ds: 28px !important; }
        .deco-l svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; display: block; }
        .deco-l svg * { transform-box: view-box; }
        .dk-spin { transform-origin: 60px 60px; animation: pk-spin 9s linear infinite; }
        .dk-spin-r { transform-origin: 60px 60px; animation: pk-spin 14s linear infinite reverse; }
        .dk-tw { animation: pk-twinkle 1.4s ease-in-out infinite alternate; }
        .dk-tw2 { animation: pk-twinkle 1.9s ease-in-out .7s infinite alternate; }
        .dk-bob { animation: dk-bob 2.6s ease-in-out infinite alternate; }
        .dk-sway { transform-origin: 60px 12px; animation: dk-sway 2.8s ease-in-out infinite alternate; }
        .dk-rise { animation: dk-rise 3.2s ease-in infinite; }
        .dk-zap { transform-origin: 60px 60px; animation: dk-zap 1.8s steps(1) infinite; }
        .dk-jit { animation: dk-jit 2.2s steps(1) infinite; }
        @keyframes dk-bob { from { transform: translateY(0); } to { transform: translateY(-3px); } }
        @keyframes dk-sway { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
        @keyframes dk-rise { 0% { transform: translateY(6px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-34px); opacity: 0; } }
        @keyframes dk-zap { 0% { transform: rotate(0); opacity: 1; } 25% { transform: rotate(7deg); opacity: .55; } 50% { transform: rotate(-5deg); opacity: 1; } 75% { transform: rotate(11deg); opacity: .75; } }
        @keyframes dk-jit { 0%, 80%, 100% { transform: none; } 84% { transform: translate(2px, -1px); } 90% { transform: translate(-2px, 1px); } }
        .deco-lightning .deco-l { filter: drop-shadow(0 0 3px #38bdf8); }
        .deco-galaxy .deco-l { filter: drop-shadow(0 0 4px rgba(168,85,247,.7)); }
        .deco-crown .deco-l, .deco-partyhat .deco-l { filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
        .deco-bubbles .deco-l { filter: drop-shadow(0 0 2px rgba(125,211,252,.6)); }
        /* more profile effects */
        /* more profile effects, batch 3 */
        @keyframes pk-twk { from { opacity: .15; } to { opacity: 1; } }
        @keyframes pk-drift { from { transform: translate(0, 0); } to { transform: translate(-60px, 200px); } }
        @keyframes pk-wander { 0% { transform: translate(0, 0); } 50% { transform: translate(8px, -10px); } 100% { transform: translate(-6px, 6px); } }
        @keyframes pk-aurora { from { transform: translateX(-12%) skewX(-8deg); } to { transform: translateX(12%) skewX(8deg); } }
        @keyframes pk-flash { 0%, 86%, 100% { opacity: 0; } 87% { opacity: 1; } 88.5% { opacity: .1; } 90% { opacity: .8; } 93% { opacity: 0; } }
        /* more profile frames */
        .frame-rainbow::after { border: 3px solid transparent; background: linear-gradient(90deg, #f43f5e, #f59e0b, #facc15, #4ade80, #22d3ee, #a855f7, #f43f5e) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; background-size: 300% 100%; animation: pk-slide 6s linear infinite; }
        .frame-fire::after { border: 2px solid #f97316; box-shadow: inset 0 0 18px rgba(249,115,22,.55), inset 0 -26px 30px -12px rgba(239,68,68,.5); animation: pk-flame 1.3s ease-in-out infinite alternate; }
        .frame-ice::after { border: 2px solid #bae6fd; box-shadow: inset 0 0 16px rgba(186,230,253,.6), inset 0 0 2px #fff; }
        .frame-holo::after { border: 3px solid transparent; background: linear-gradient(135deg, #f0abfc, #a5f3fc, #fde68a, #c4b5fd, #f0abfc) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; background-size: 200% 200%; animation: pk-holo 5s ease-in-out infinite alternate; }
        .frame-candy::after { border: 4px solid transparent; background: repeating-linear-gradient(45deg, #f472b6 0 8px, #fff 8px 16px) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
        @keyframes pk-flame { from { opacity: .7; } to { opacity: 1; } }
        @keyframes pk-holo { from { background-position: 0 0; } to { background-position: 100% 100%; } }
        /* more nameplates (member list and DMs) */
        .np { background-size: 200% 100%; animation: pk-slide 12s linear infinite; }
        .np-sakura { background-image: radial-gradient(3px 2px at 62% 40%, rgba(249,168,212,.85), transparent), radial-gradient(3px 2px at 78% 70%, rgba(251,207,232,.85), transparent), radial-gradient(2.5px 1.5px at 92% 30%, rgba(244,114,182,.85), transparent), linear-gradient(90deg, rgba(244,114,182,.2), rgba(253,242,248,.12), rgba(244,114,182,.2)); }
        .np-midnight { background-image: radial-gradient(1px 1px at 30% 35%, #fff, transparent), radial-gradient(1px 1px at 80% 65%, #c7d2fe, transparent), linear-gradient(90deg, rgba(15,23,42,.5), rgba(30,58,138,.3), rgba(15,23,42,.5)); }
        .np-gold { background-image: linear-gradient(90deg, rgba(161,98,7,.3), rgba(250,204,21,.28), rgba(254,243,199,.18), rgba(250,204,21,.28), rgba(161,98,7,.3)); }
        .np-holo { background-image: linear-gradient(90deg, rgba(240,171,252,.26), rgba(165,243,252,.26), rgba(253,230,138,.22), rgba(196,181,253,.26), rgba(240,171,252,.26)); }
        .np-matrix { background-image: repeating-linear-gradient(90deg, rgba(34,197,94,.16) 0 2px, transparent 2px 9px), linear-gradient(90deg, rgba(0,0,0,.4), rgba(20,83,45,.32), rgba(0,0,0,.4)); }
        .np-bubbles { background-image: radial-gradient(circle at 64% 60%, transparent 3px, rgba(186,230,253,.6) 3.5px, transparent 4.5px), radial-gradient(circle at 80% 35%, transparent 4px, rgba(186,230,253,.5) 4.5px, transparent 5.5px), radial-gradient(circle at 90% 75%, transparent 2px, rgba(255,255,255,.55) 2.5px, transparent 3.5px), linear-gradient(90deg, rgba(56,189,248,.18), rgba(129,140,248,.18), rgba(56,189,248,.18)); }
        /* more name effects */
        .nmfx-fire { background: linear-gradient(0deg, #ef4444, #f97316 45%, #fde047) 0 0 / 100% 200%; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: pk-burn 1.6s ease-in-out infinite alternate; filter: drop-shadow(0 0 2px rgba(249,115,22,.35)); }
        .nmfx-ice { background: linear-gradient(90deg, #7dd3fc, #0ea5e9, #7dd3fc); -webkit-background-clip: text; background-clip: text; color: transparent !important; filter: drop-shadow(0 0 3px rgba(125,211,252,.55)); }
        .nmfx-glitch { text-shadow: 1.5px 0 #f43f5e, -1.5px 0 #22d3ee; animation: pk-jit 2.6s steps(1) infinite; }
        .nmfx-retro { text-shadow: 1.5px 1.5px 0 var(--n2, #f472b6), 3px 3px 0 rgba(0,0,0,.28); }
        @keyframes pk-burn { from { background-position: 0 0; } to { background-position: 0 100%; } }
        @keyframes pk-jit { 0%, 86%, 100% { text-shadow: 1.5px 0 #f43f5e, -1.5px 0 #22d3ee; } 88% { text-shadow: -2px 1px #f43f5e, 2px -1px #22d3ee; } 92% { text-shadow: 2px -1px #f43f5e, -2px 1px #22d3ee; } }
        /* the profile editor: decorations grouped, and the preview stays in view while scrolling */
        .pk-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); margin: -4px -4px 12px; padding: 0 4px; }
        .pk-tabs::-webkit-scrollbar { display: none; }
        .pk-tab { flex-shrink: 0; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; padding: 8px 10px; cursor: pointer; white-space: nowrap; }
        .pk-tab:hover { color: var(--text); } .pk-tab.on { color: var(--bright); border-bottom-color: var(--accent); }
        .pk-pane:not(.on) { display: none; }
        .pk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
        .pk-chip { background: var(--bg-3); border: 1px solid var(--border); border-radius: 999px; color: var(--text); font: inherit; font-size: 12px; padding: 4px 12px; cursor: pointer; }
        .pk-chip.on { background: var(--accent-bg); border-color: var(--accent); color: var(--bright); }
        .pk-grid[data-cat]:not(.on) { display: none; }
        .pk-shop .pk-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
        .pk-shop .pk-tile { padding: 8px 4px 6px; font-size: 11px; }
        .pk-note { font-size: 11.5px; color: var(--muted); margin: 0 0 8px; }
        .pk-up { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
        .pk-sub { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin: 12px 0 6px; }
        .pe-h + .pk-sub { margin-top: 0; }
        @media (min-width: 861px) { #sp-profile .profile-edit-grid > div:last-child { position: sticky; top: 8px; } }
        @media (max-width: 860px) { #sp-profile .profile-edit-grid > div:last-child { order: -1; } }
        .msg.tools-open .msg-tools { display: flex; }
        .dj-row { flex-wrap: wrap; row-gap: 2px; padding-left: 12px; padding-right: 8px; } .dj-row .vm-name { overflow: visible; flex: 0 0 auto; } .dj-row .dj-btns { margin-inline-start: auto; } .dj-row .badge-pill { flex: none; white-space: nowrap; }
        .dj-row .bot-av .ic { width: 13px; height: 13px; } .dj-row .vm-name { display: inline-flex; align-items: center; gap: 6px; }
        .dj-tile .dj-av { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: #fff; } .dj-tile .dj-av .ic, .dj-tile .dj-av svg { width: 34px; height: 34px; } .dj-tile .tile-name { display: inline-flex; align-items: center; gap: 6px; }
        .dj-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px 40px; } .dj-tile .tile-av { position: static; width: auto; height: auto; background: none; flex: none; } .dj-tile .dj-av { width: 56px !important; height: 56px !important; } .dj-tile .dj-ctl { position: static; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
        .dj-tile .dj-title { color: var(--bright); font-size: 13px; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .dj-tile .dj-sub { color: var(--muted); font-size: 11px; } .dj-tile.blocked .dj-sub { color: var(--accent); cursor: pointer; }
        .dj-btns { display: inline-flex; gap: 4px; } .dj-btns button { background: var(--bg-3); border: 0; color: var(--text); width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; } .dj-btns button:hover { background: var(--hover); } .dj-btns .ic { width: 15px; height: 15px; } .dj-btns.sm { margin-inline-start: 4px; } .dj-btns.sm button { width: 22px; height: 22px; background: none; } .dj-btns.sm .ic { width: 13px; height: 13px; }
        .dj-vol { width: 120px; accent-color: var(--accent); }
        .dj-eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; margin-inline-start: auto; } .dj-eq i { width: 3px; background: var(--accent); border-radius: 1px; animation: djeq 0.9s ease-in-out infinite; } .dj-eq i:nth-child(2) { animation-delay: .2s; } .dj-eq i:nth-child(3) { animation-delay: .4s; }
        @keyframes djeq { 0%, 100% { height: 3px; } 50% { height: 12px; } } .nomotion .dj-eq i { animation: none; height: 8px; }
        #music-mini.blocked { border-color: var(--accent); cursor: pointer; }
        #music-mini { position: fixed; inset-inline-start: 82px; bottom: 76px; max-width: 330px; display: none; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg-3); border: 1px solid var(--border-focus); border-radius: 10px; z-index: 59; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
        #music-mini.show { display: flex; }
        #music-mini .mm-ic { color: var(--accent); } #music-mini .mm-ic .ic { width: 20px; height: 20px; }
        #music-mini .mm-t { min-width: 0; flex: 1; display: flex; flex-direction: column; } #music-mini .mm-t b { color: var(--bright); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; } #music-mini .mm-t span { color: var(--muted); font-size: 11px; }
        #music-mini .mm-b { display: flex; gap: 2px; } #music-mini .mm-b button { background: none; border: 0; color: var(--text); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; } #music-mini .mm-b button:hover { background: var(--hover); } #music-mini .mm-b .ic { width: 16px; height: 16px; }
        #music-mini input { width: 64px; accent-color: var(--accent); }
        @media (max-width: 860px) { #music-mini { inset-inline-start: 8px; bottom: 140px; max-width: calc(100vw - 16px); } }
        #reconnect-bar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 44px 8px 16px; background: #1a5c2e; color: #e9fff0; font-size: 13.5px; position: relative; flex-shrink: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
        #reconnect-bar .btn { background: transparent; border: 1px solid #e9fff0; color: #e9fff0; padding: 3px 12px; }
        #reconnect-bar .btn:hover { background: rgba(255,255,255,.14); }
        #reconnect-bar .rc-x { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #e9fff0; cursor: pointer; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
        #reconnect-bar .rc-x:hover { background: rgba(255,255,255,.14); } #reconnect-bar .rc-x .ic { width: 16px; height: 16px; }
        #stream-mini { position: fixed; inset-inline-end: 16px; bottom: 96px; width: 280px; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--border-focus); border-radius: 10px; overflow: hidden; z-index: 60; box-shadow: 0 8px 28px rgba(0,0,0,.55); cursor: pointer; display: none; }
        #stream-mini.show { display: block; }
        #stream-mini video { width: 100%; height: 100%; object-fit: contain; display: block; }
        #stream-mini .sm-bar { position: absolute; inset: 0 0 auto 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; background: linear-gradient(rgba(0,0,0,.7), transparent); color: #fff; font-size: 12px; opacity: 0; transition: opacity .15s; }
        #stream-mini:hover .sm-bar { opacity: 1; }
        #stream-mini .sm-bar button { background: rgba(0,0,0,.55); border: 0; color: #fff; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; margin-inline-start: 4px; }
        #stream-mini .sm-bar .ic { width: 14px; height: 14px; }
        @media (max-width: 860px) { #stream-mini { width: 170px; bottom: 150px; } #stream-mini .sm-bar { opacity: 1; } }
        .msg:focus-within .msg-tools, .tile:focus-within .tile-tools { display: flex; }
        @media (max-width: 860px) {
            body.members-open #nav-overlay { display: block; }
            #chat-title-heading { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
            .tile-badges { flex-wrap: wrap; max-width: calc(100% - 20px); }
        }
        /* style engine: custom + preset nameplates, banners, rings */
        @keyframes sp-slide { to { background-position-x: var(--spw, 24px); } }
        @keyframes sp-slidey { to { background-position-y: var(--spw, 24px); } }
        @keyframes sp-pulse { 50% { filter: brightness(1.45) saturate(1.2); } }
        @keyframes sp-hue { to { filter: hue-rotate(360deg); } }
        .sp-a-slide { animation: sp-slide 3.2s linear infinite !important; }
        .sp-a-slidey { animation: sp-slidey 3.2s linear infinite !important; }
        .sp-a-pulse { animation: sp-pulse 2.4s ease-in-out infinite !important; }
        .sp-a-hue { animation: sp-hue 7s linear infinite !important; }
        .sp-a-spin { animation: pk-spin 5s linear infinite !important; }
        .np.sp-np { background-position: 0 0; }
        /* art pictures: cover the box and drift slowly; behind a name they fade in from the left with a shade so the name stays readable */
        .cos-art { background-size: cover !important; background-repeat: no-repeat; background-position: 50% 50%; animation: art-drift 38s ease-in-out infinite alternate !important; }
        .cos-art-np { -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.35), #000 55%); mask-image: linear-gradient(90deg, rgba(0,0,0,.35), #000 55%); }
        .np-bg.cos-art-np::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(10,10,16,.88), rgba(10,10,16,.58) 45%, rgba(10,10,16,.2)); }
        .pk-npprev.cos-art b { opacity: 0; }
        @keyframes art-drift { from { background-position: 30% 35%; } to { background-position: 70% 65%; } }
        body.nomotion .cos-art { animation: none !important; }
        .cos-vid { isolation: isolate; }
        .cos-v { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
        .cos-v.on { opacity: 1; }
        .tile .cos-v { filter: brightness(.72); }
        body.nomotion .cos-v { display: none; }
        .pk-gh { margin: 14px 2px 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
        .npr { position: relative; isolation: isolate; margin-block: 3px; border-radius: 8px; }
        .np-bg { position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; display: block; }
        .sp-a-none { animation: none !important; }
        .deco-l.rg { background: var(--rg); -webkit-mask: var(--rm, radial-gradient(farthest-side, transparent calc(100% - var(--rw, 4px)), #000 calc(100% - var(--rw, 4px) + 1px))); mask: var(--rm, radial-gradient(farthest-side, transparent calc(100% - var(--rw, 4px)), #000 calc(100% - var(--rw, 4px) + 1px))); filter: var(--rf, none); }
        .deco-l.rg.sp-a-pulse { animation: sp-pulse 2s ease-in-out infinite !important; }
        .pk-npprev.sp-np { background-color: transparent; }
        .pk-bnprev { display: block; width: 72px; height: 40px; border-radius: 6px; margin: 6px 0; background-color: var(--bg-3); }
        .sp-build { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
        .sp-build .sp-prev { display: flex; align-items: center; justify-content: center; min-height: 54px; margin-bottom: 10px; }
        .sp-build .sp-prev .sp-bar { width: 100%; height: 48px; border-radius: 8px; }
        .sp-build .sp-prev .sp-bn { width: 100%; height: 64px; border-radius: 8px; }
        .sp-build .pk-row label { flex: 1; }
        body.nomotion [class*="sp-a-"] { animation: none !important; }
        body.nomotion .pfx, body.nomotion .pfx::before, body.nomotion .pfx::after, body.nomotion .deco-l, body.nomotion .deco-l *, body.nomotion .nm, body.nomotion .np, body.nomotion .pc-shell::after { animation: none !important; }
    .ph-badge{display:inline-flex;vertical-align:-2px;margin-inline-start:5px;color:var(--muted);opacity:.9}.ph-badge .ic{width:13px;height:13px}.tile-label .ph-badge{color:#fff;margin-inline-start:4px}

/* floating voice card: while you are in a call and the call screen is not showing, a small card keeps the stream and the call buttons in reach */
#vmini{position:fixed;right:16px;bottom:16px;width:300px;z-index:60;background:var(--bg-1);border:1px solid var(--border);border-radius:16px;box-shadow:0 12px 36px rgba(0,0,0,.45);padding:10px;display:none;flex-direction:column;gap:8px}
#vmini.on{display:flex}
#vmini.nop .vm-p{display:none}
@media (min-width:901px){body:has(#vmini.on.nop:not(.moved)) #stream-mini{bottom:116px}}
#vmini .vm-t{display:flex;align-items:center;gap:8px;cursor:pointer;min-width:0}
#vmini .vm-t,#vmini .vm-p{touch-action:none;user-select:none}
#vmini .vm-t{cursor:grab}
#vmini.dragging,#vmini.dragging *{cursor:grabbing!important}
#vmini.dragging{box-shadow:0 18px 48px rgba(0,0,0,.55)}
#vmini .vm-t b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:var(--bright)}
#vmini .vm-t i{width:8px;height:8px;border-radius:50%;background:var(--green);flex:none}
#vmini .vm-p{position:relative;aspect-ratio:16/9;border-radius:10px;overflow:hidden;background:var(--bg-0);display:flex;align-items:center;justify-content:center;gap:6px;cursor:pointer}
#vmini .vm-p video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000}
#vmini .vm-p .user-avatar{flex:none}
#vmini .vm-b{display:flex;justify-content:center;gap:8px}
#vmini .vm-b button{width:44px;height:36px;border-radius:10px;border:0;background:var(--bg-4);color:var(--text);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
#vmini .vm-b button:hover{background:var(--bg-5,#3a3f4d)}
#vmini .vm-b button.off{background:rgba(237,66,69,.22);color:#ff7b7e}
#vmini .vm-b button.active{background:var(--accent);color:#fff}
#vmini .vm-b button.vm-end{background:var(--red);color:#fff}
#vmini .vi{width:20px;height:20px}
#vmini .vm-ov{position:absolute;inset:0;display:flex;align-items:flex-start;gap:6px;padding:8px;pointer-events:none;background:linear-gradient(to bottom,rgba(0,0,0,.45),transparent 38%,transparent 62%,rgba(0,0,0,.5))}
#vmini .vm-live{background:var(--red);color:#fff;font-size:10px;font-weight:800;letter-spacing:.5px;padding:2px 6px;border-radius:4px}
#vmini .vm-view{display:inline-flex;align-items:center;gap:4px;background:rgba(0,0,0,.6);color:#fff;font-size:11px;font-weight:700;padding:2px 7px;border-radius:999px}
#vmini .vm-view svg{width:13px;height:13px}
#vmini .vm-back{pointer-events:auto;position:absolute;left:50%;bottom:8px;transform:translateX(-50%);display:inline-flex;align-items:center;gap:6px;border:0;border-radius:8px;padding:5px 10px;background:rgba(0,0,0,.82);color:#fff;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap;}
#vmini .vm-back:hover{background:var(--accent)}
#vmini .vm-back svg{width:14px;height:14px}
@media (max-width:900px){#vmini.on{display:none}}
        /* ---- classic profile editor: Main Profile panel + one dialog per element ---- */
        .dp-hide { display: none !important; }
        .dp-main { padding: 14px; }
        .dp-mh { font-size: 15px; font-weight: 800; color: var(--bright); margin-bottom: 4px; }
        .dp-main h5 { margin: 16px 0 8px; font-size: 12px; font-weight: 800; color: var(--bright); letter-spacing: .2px; }
        .dp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
        .dp-sq, .dp-row { position: relative; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-0); cursor: pointer; color: var(--text); font: inherit; padding: 0; overflow: hidden; transition: border-color .12s, background .12s; }
        .dp-sq { height: 96px; } .dp-row { height: 46px; justify-content: flex-start; gap: 10px; padding: 0 12px; width: 100%; }
        .dp-sq:hover, .dp-row:hover { border-color: var(--accent); background: var(--bg-3); }
        .dp-sq.dashed { border: 2px dotted var(--border-focus); background: transparent; }
        .dp-plus { width: 22px; height: 22px; border-radius: 50%; background: var(--bright); color: var(--bg-0); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 16px; line-height: 1; flex: none; }
        .dp-sq .dp-plus { position: absolute; }
        .dp-row .dp-plus { margin-inline-start: auto; }
        .dp-row .dp-npbg { position: absolute; inset: 0; border-radius: inherit; opacity: .9; pointer-events: none; }
        .dp-row > *:not(.dp-npbg) { position: relative; }
        .dp-row .dp-nm { font-weight: 700; color: var(--bright); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .dp-namebar { justify-content: center; height: 56px; font-size: 22px; background: var(--bg-3); }
        .dp-mini { width: 62px; height: 78px; border-radius: 6px; background: var(--bg-3); position: relative; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
        .dp-mini i { display: block; height: 4px; border-radius: 2px; background: var(--border-focus); } .dp-mini i:nth-child(2) { width: 60%; } .dp-mini i:nth-child(3) { width: 80%; }
        .dp-mini .dp-mc { width: 16px; height: 16px; border-radius: 50%; background: var(--border-focus); margin-bottom: 2px; }
        .dp-mini .dp-plus { right: 4px; bottom: 4px; width: 18px; height: 18px; font-size: 13px; }
        .dp-swatch { position: absolute; inset: 0; } .dp-swatch b { position: absolute; width: 22px; height: 22px; border: 2px solid #fff; border-radius: 6px; inset-inline-start: 50%; transform: translateX(-50%); } .dp-swatch b:first-child { top: 14px; } .dp-swatch b:last-child { bottom: 14px; }
        .dp-bn { position: absolute; inset: 0; background-size: cover; background-position: center; }
        .dp-av-sq .user-avatar { border-radius: 50%; }
        /* the dialog */
        #dp-dialog .dp-box, #dp-pick .dp-box, #dp-crop .dp-box { background: var(--bg-2); border: 1px solid var(--border-focus); border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); max-width: calc(100vw - 20px); max-height: calc(100vh - 20px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
        #dp-dialog .dp-box { width: 860px; height: min(640px, calc(100vh - 20px)); }
        #dp-dialog .dp-box.sm { width: 640px; }
        .dp-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 8px; }
        .dp-head h3 { margin: 0; font-size: 20px; font-weight: 800; color: var(--bright); }
        .dp-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 22px; line-height: 1; padding: 4px 8px; border-radius: 6px; } .dp-x:hover { color: var(--bright); background: var(--bg-3); }
        .dp-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; padding: 6px 22px 0; }
        .dp-left { overflow-y: auto; padding-inline-end: 6px; }
        .dp-left.pe-card { border: 0; background: none; margin: 0; padding: 0 6px 0 0; }
        .dp-right { overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 0 12px; }
        .dp-left h4 { margin: 14px 0 8px; font-size: 15px; font-weight: 800; color: var(--bright); } .dp-left h4:first-child { margin-top: 4px; }
        .dp-left .pk-grid { max-height: none; overflow: visible; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
        .dp-left .pk-tile { padding: 10px 4px 8px; border-radius: 10px; font-size: 11.5px; }
        .dp-left .pk-tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
        .dp-list .pk-grid { grid-template-columns: 1fr; }
        .dp-list .pk-tile { flex-direction: row; justify-content: flex-start; padding: 8px 12px; gap: 12px; }
        .dp-list .pk-npprev { width: 100%; max-width: 280px; margin: 4px 0; }
        .dp-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 22px; background: var(--bg-1); border-top: 1px solid var(--border); }
        .dp-foot .dp-grow { margin-inline-end: auto; }
        .dp-btn { border: 0; border-radius: 6px; padding: 9px 18px; font: inherit; font-weight: 700; cursor: pointer; background: var(--bg-3); color: var(--bright); }
        .dp-btn:hover { filter: brightness(1.15); } .dp-btn.pri { background: var(--accent); color: #fff; }
        .dp-stagebox { background: var(--bg-0); border-radius: 10px; width: 100%; display: flex; align-items: center; justify-content: center; padding: 26px 0; }
        .dp-avw { position: relative; display: inline-block; line-height: 0; }
        .dp-dot { position: absolute; right: 2%; bottom: 2%; width: 28%; height: 28%; min-width: 9px; min-height: 9px; border-radius: 50%; border: 3px solid var(--bg-0); box-sizing: content-box; z-index: 5; }
        .dp-dot.online { background: #23a55a; } .dp-dot.idle { background: #f0b232; } .dp-dot.offline { background: #80848e; }
        .dp-dot.dnd { background: #f23f43; } .dp-dot.dnd::after { content: ''; position: absolute; left: 22%; right: 22%; top: 42%; height: 16%; background: var(--bg-0); border-radius: 2px; }
        .dp-prevrow { display: flex; gap: 12px; width: 100%; }
        .dp-small { display: flex; flex-direction: column; gap: 12px; padding: 14px 12px; background: var(--bg-0); border-radius: 10px; align-items: center; }
        .dp-card { width: 100%; max-width: 300px; } .dp-card .pc { width: 100%; max-width: 300px; }
        .dp-memlist { width: 100%; background: var(--bg-0); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
        .dp-mrow { position: relative; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px; border-radius: 6px; }
        .dp-mrow .dp-gc { width: 30px; height: 30px; border-radius: 50%; background: rgba(127,127,127,.28); } .dp-mrow .dp-gl { height: 10px; width: 55%; border-radius: 5px; background: rgba(127,127,127,.28); }
        .dp-mrow.me .nm, .dp-mrow.me span { position: relative; font-weight: 700; color: var(--bright); }
        .dp-gc, .dp-gl { display: block; flex: none; } .dp-mrow .np-bg { position: absolute; inset: 0; border-radius: 6px; opacity: .9; pointer-events: none; } .dp-mrow > span { position: relative; z-index: 1; }
        .dp-chat { width: 100%; background: var(--bg-1); border-radius: 10px; padding: 12px; display: flex; gap: 10px; }
        .dp-chat b { color: var(--bright); } .dp-chat small { color: var(--muted); margin-inline-start: 6px; } .dp-chat p { margin: 2px 0 0; font-size: 14px; }
        .dp-fonts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
        .dp-font, .dp-fx { background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px; color: var(--bright); font: inherit; cursor: pointer; padding: 12px 4px; font-size: 18px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 2px; }
        .dp-font small { font: 600 10px var(--font, sans-serif); color: var(--muted); }
        .dp-fxs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .dp-fx { font-size: 14px; padding: 14px 4px; }
        .dp-font:hover, .dp-fx:hover { border-color: var(--border-focus); } .dp-font.on, .dp-fx.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
        .dp-cols { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
        .dp-col { width: 42px; height: 38px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; position: relative; padding: 0; }
        .dp-col.on { border-color: #fff; } .dp-col.on::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
        .dp-pen { width: 42px; height: 38px; border-radius: 8px; background: var(--bg-3); border: 1px solid var(--border); cursor: pointer; position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; color: var(--bright); }
        .dp-pen input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
        .dp-note { display: flex; align-items: center; gap: 10px; background: var(--bg-0); border-radius: 8px; padding: 12px; font-size: 12.5px; color: var(--text); margin-top: 12px; }
        .dp-bnprev { width: 100%; height: 120px; border-radius: 10px; background-size: cover; background-position: center; background-color: var(--accent); }
        .dp-actrow { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
        /* select an image + edit image */
        #dp-pick .dp-box { width: 500px; padding-bottom: 22px; } #dp-pick .dp-head { padding: 22px 24px 12px; }
        .dp-pickrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 24px; height: 210px; }
        .dp-up { background: var(--bg-3); border: 0; border-radius: 8px; color: var(--bright); font: inherit; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer; } .dp-up:hover { filter: brightness(1.2); }
        .dp-up .ic { width: 22px; height: 22px; }
        .dp-gif { background: linear-gradient(135deg, rgba(88,101,242,.5), rgba(235,69,158,.5)), var(--bg-3); }
        .dp-recent { padding: 18px 24px 0; } .dp-recent h4 { margin: 0 0 2px; color: var(--bright); font-size: 16px; } .dp-recent p { margin: 0 0 12px; color: var(--muted); font-size: 12.5px; }
        .dp-rec { display: flex; gap: 10px; flex-wrap: wrap; } .dp-rec button { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; } .dp-rec .user-avatar { border-radius: 50%; } .dp-rec button:hover { box-shadow: 0 0 0 3px var(--accent); }
        #dp-crop .dp-box { width: 520px; }
        .dp-cropstage { position: relative; margin: 10px 24px 0; height: 340px; background: var(--bg-1); border-radius: 8px; overflow: hidden; touch-action: none; cursor: grab; user-select: none; }
        .dp-cropstage img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; -webkit-user-drag: none; pointer-events: none; }
        .dp-cropstage .dp-mask { position: absolute; left: 50%; top: 50%; width: 280px; height: 280px; margin: -140px 0 0 -140px; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.62); border: 3px solid #fff; pointer-events: none; }
        .dp-zoom { display: flex; align-items: center; gap: 12px; padding: 16px 24px 4px; color: var(--bright); } .dp-zoom input { flex: 1; accent-color: var(--accent); } .dp-zoom button { background: none; border: 0; color: var(--bright); cursor: pointer; font-size: 18px; }
        .dp-reset { background: none; border: 0; color: var(--accent-hi, var(--accent)); cursor: pointer; font: inherit; }
        @media (max-width: 760px) {
            #dp-dialog .dp-box { width: 100%; height: calc(100dvh - 12px); }
            .dp-body { grid-template-columns: 1fr; overflow-y: auto; gap: 8px; } .dp-left, .dp-right { overflow: visible; } .dp-right { order: -1; }
            .dp-fonts, .dp-fxs { grid-template-columns: repeat(3, 1fr); } .dp-pickrow { height: 160px; } .dp-cropstage { height: 300px; }
        }
        /* DM rows: every avatar is the same size, with or without a decoration (the phone block below makes them 44px); the room chat is a panel that slides in from the right */
        #sub-item-list .channel-item[data-ctx="dm"] .deco { width: 32px !important; height: 32px !important; --ds: 32px; flex: 0 0 auto; }
        #sub-item-list .channel-item[data-ctx="dm"] .user-avatar { width: 32px !important; height: 32px !important; font-size: 12px !important; flex: 0 0 auto; }
        #sub-item-list .channel-item[data-ctx="dm"] .dm-l { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
        #sub-item-list .channel-item[data-ctx="dm"] .dm-t { display: flex; flex-direction: column; min-width: 0; }
        #sub-item-list .channel-item[data-ctx="dm"] .dm-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        #sub-item-list .channel-item[data-ctx="dm"] .dm-prev:empty { display: none; }
        .vc-chat-back { display: none; }
        @keyframes vc-chat-in { from { transform: translateX(100%); } to { transform: none; } }
        @media (max-width: 700px) {
            .main.stage-split { display: block; }
            .main.stage-split > #chat-view { position: fixed !important; inset: 0; z-index: 90; background: var(--bg-1); border: 0; flex-direction: column; padding: calc(var(--ph-sat, env(safe-area-inset-top, 0px)) + 0px) 0 calc(104px + env(safe-area-inset-bottom)); animation: vc-chat-in .22s ease-out; }
            .main.stage-split > #chat-view .vc-chat-back { display: flex; align-items: center; gap: 8px; flex: none; width: 100%; padding: 12px 14px; background: var(--bg-2); border: 0; border-bottom: 1px solid var(--border); color: var(--bright); font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; text-align: start; }
            .main.stage-split > #chat-view .chat-messages { flex: 1; min-height: 0; }
            body:has(#main.stage-split) #voice-call-screen { display: block !important; position: static; }
            body:has(#main.stage-split) #voice-call-screen > :not(.voice-floating-bar):not(.vc-popover) { display: none !important; }
            body:has(#main.stage-split) #voice-call-screen .voice-floating-bar { z-index: 95; }
            body:has(#main.stage-split) #vc-return { display: none !important; }
        }
        @media (max-width: 430px) {
            body #voice-call-screen .voice-floating-bar { padding-inline: 6px; gap: 2px; }
            body #voice-call-screen .voice-floating-bar .control-pill-btn { width: 46px; height: 46px; }
            body #voice-call-screen .voice-floating-bar .control-pill-btn.danger-leave { width: 58px; height: 50px; border-radius: 16px; }
        }
        /* the chat never scrolls sideways: long words wrap and wide pictures, videos and embeds shrink to fit */
        .chat-messages { overflow-x: hidden; }
        .msg, .msg-body, .msg-text { min-width: 0; max-width: 100%; }
        .msg-text, .msg-body { overflow-wrap: anywhere; word-break: break-word; }
        .msg-body img, .msg-body video, .msg-body iframe, .msg-body canvas, .msg-body svg:not(.ic):not(.vi), .msg-body embed, .msg-body .chat-file, .msg-body .lp-card { max-width: 100%; height: auto; }
        .msg-body iframe { aspect-ratio: 16 / 9; height: auto; }
        .msg-body pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
        .msg-body table { display: block; max-width: 100%; overflow-x: auto; }
        /* watch together */
        .wt-frame.v { aspect-ratio: 9 / 16; height: min(52vh, 520px); width: auto; max-width: 100%; margin: 0 auto; }
        .wt-frame iframe { border: 0; }
        .wt-count { color: var(--muted); font-size: 12px; min-width: 44px; text-align: center; }
        .wt-note { color: var(--muted); font-size: 11.5px; margin-top: 6px; }
        #wt-pick .dp-box { width: 460px; max-width: calc(100vw - 20px); background: var(--bg-2); border: 1px solid var(--border-focus); border-radius: 12px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
        #wt-pick h3 { margin: 0 0 4px; color: var(--bright); font-size: 20px; } #wt-pick p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
        .wt-apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
        .wt-app { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; background: var(--bg-0); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }

        #vc-prejoin { display: none; } #vc-prejoin.open { display: block; position: fixed; inset: 0; z-index: 200; }
        .pj-back { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
        .pj-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--bg-2, #1b1b1f); border-top: 1px solid var(--border, #2a2a2f); color: var(--text, #f2f3f5); border-radius: 22px 22px 0 0; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); min-height: 50vh; display: flex; flex-direction: column; gap: 12px; animation: pj-up .22s ease-out; }
        @keyframes pj-up { from { transform: translateY(100%); } to { transform: none; } }
        .pj-top { display: flex; gap: 8px; align-items: center; } .pj-top .vc-pill { flex: 1; }
        #vc-prejoin .vc-sq { width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--border, transparent); border-radius: 14px; background: var(--bg-0, #0f0f11); color: var(--text, #f2f3f5); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
        #vc-prejoin .vc-sq svg, #vc-prejoin .vc-sq .ico { width: 22px; height: 22px; }
        #vc-prejoin .vc-pill { height: 44px; border-radius: 14px; background: var(--bg-0, #0f0f11); border: 1px solid var(--border, transparent); display: flex; align-items: center; justify-content: center; color: var(--bright, #fff); font-weight: 700; font-size: 17px; min-width: 0; }
        .pj-empty { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--text, #f2f3f5); font-size: 17px; line-height: 1.5; padding: 20px; }
        .pj-who { flex: 1; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-content: center; padding: 10px 0; } .pj-u { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 84px; font-size: 12px; color: #f2f3f5; } .pj-u span { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .pj-bar { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border, #2a2a2f); border-radius: 22px; padding: 10px; }
        .pj-join { flex: 1; height: 56px; border: 0; border-radius: 16px; background: var(--green, #23a55a); color: #fff; font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; } .pj-join:disabled { opacity: .5; }
        .vc-addcard { display: none; }
        @media (max-width: 700px) {
            body #voice-call-screen:has(#stage-members > .tile:only-child):not(.vc-full) .voice-stage-grid { justify-content: center; padding-bottom: calc(210px + env(safe-area-inset-bottom)); }
            body #voice-call-screen #stage-members .tile:only-child { aspect-ratio: 1 / 1; border-radius: 22px; }
            body #voice-call-screen:has(#stage-members > .tile:only-child):not(.vc-full) .vc-addcard { display: flex; align-items: center; gap: 14px; position: fixed; left: 12px; right: 12px; bottom: calc(128px + env(safe-area-inset-bottom)); padding: 14px 16px; border: 0; border-radius: 18px; background: #1b1b1f; color: #f2f3f5; font: inherit; text-align: start; cursor: pointer; z-index: 3; }
            .vc-addcard .vc-addtxt { flex: 1; display: flex; flex-direction: column; gap: 2px; } .vc-addcard b { font-size: 17px; font-weight: 600; } .vc-addcard i { font-style: normal; font-size: 14px; color: #a0a2aa; }
            .vc-addcard .vi, .vc-addcard [data-ic] svg { width: 26px; height: 26px; }
        }
        .wt-res { max-height: 38vh; overflow-y: auto; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
        .wt-res:empty { display: none; }
        .wt-note { color: var(--muted); font-size: 13px; padding: 6px 2px; }
        .wt-res.wt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .wt-grid .wt-hit { flex-direction: column; align-items: stretch; padding: 4px; } .wt-grid .wt-th { width: 100%; } .wt-grid .wt-th img { aspect-ratio: 9/14; } .wt-grid .wt-hit { gap: 6px; }
        #wt-pick .system-input, #wt-pick input { font-size: 16px; }
        .wt-row { display: flex; gap: 8px; } .wt-row .system-input { flex: 1; min-width: 0; } .wt-mine { margin-top: 8px; } .wt-mine .btn { width: 100%; font-size: 12px; }
        .wt-head { font-weight: 700; color: var(--bright); font-size: 15px; padding: 4px 2px; }
        .wt-hit { display: flex; gap: 12px; align-items: center; padding: 4px; background: transparent; border: 1px solid transparent; border-radius: 12px; color: var(--text); font: inherit; text-align: start; cursor: pointer; }
        .wt-hit:hover { background: var(--bg-0); }
        .wt-th { position: relative; width: 132px; flex: none; } .wt-th img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; background: #000; display: block; }
        .wt-th em { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.75); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 5px; border-radius: 5px; }
        .wt-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .wt-tx b { font-size: 14px; font-weight: 600; color: var(--bright); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } .wt-tx i { font-style: normal; font-size: 12px; color: var(--muted); }
        .wt-app b { font-size: 22px; line-height: 1; } .wt-app:hover { border-color: var(--border-focus); } .wt-app.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--bright); }
