/* =====================================================================
   Pulsed layout: a top "deck" with server tiles, floating card panels,
   squircle avatars, a two-row composer and a People dashboard.
   Loaded after app.css and overrides its shell.
   ===================================================================== */
:root { --deck-h: 60px; --gap: 10px; --panel-r: 18px; --sq: 32%; }

/* ---------- shell ---------- */
.app { flex-direction: column; background:
  radial-gradient(1100px 380px at 12% -8%, rgba(245, 197, 24, .07), transparent 70%),
  radial-gradient(900px 420px at 100% 110%, rgba(96, 165, 250, .05), transparent 70%), var(--bg); }
.shell { flex: 1; display: flex; gap: var(--gap); padding: 0 var(--gap) var(--gap); min-height: 0; }
.nav { width: 276px; flex: none; display: flex; min-height: 0; }
.sidebar { flex: 1; width: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--panel-r); overflow: hidden; }
.side-inner { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.drawer-servers { display: none; }
.main { border: 1px solid var(--line); border-radius: var(--panel-r); overflow: hidden; background: var(--bg-1); }

/* ---------- deck (top bar) ---------- */
.deck { height: var(--deck-h); flex: none; display: flex; align-items: center; gap: 12px; padding: 0 calc(var(--gap) + 4px); min-width: 0; position: relative; z-index: 5; }
.deck-brand { display: flex; align-items: center; gap: 8px; font: 800 18px var(--font-display); color: var(--text); letter-spacing: -.01em; flex: none; padding: 6px 8px 6px 2px; border-radius: 10px; }
.deck-brand img { width: 30px; height: 30px; filter: drop-shadow(0 3px 10px rgba(245, 197, 24, .35)); transition: transform .25s; }
.deck-brand:hover img { transform: rotate(-8deg) scale(1.06); }
.deck-servers { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; overflow-x: auto; overflow-y: visible; scrollbar-width: none; padding: 8px 6px 10px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, transparent, #000 10px, #000 calc(100% - 18px), transparent); }
.deck-servers::-webkit-scrollbar { display: none; }
.dtile { position: relative; flex: none; }
.dtile-btn { width: 42px; height: 42px; border-radius: 13px; background: var(--bg-3); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden;
  color: var(--text); font: 700 14px var(--font-display); transition: transform .16s, box-shadow .16s, background .16s, border-color .16s; }
.dtile-btn img, .dtile-btn .av, .dtile-btn .av-img { width: 100%; height: 100%; object-fit: cover; border-radius: 0 !important; }
.dtile-btn:hover { transform: translateY(-2px); border-color: var(--bg-active); background: var(--bg-4); }
.dtile.active .dtile-btn { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); border-color: transparent; }
.dtile.active::after, .dtile.unread::after { content: ''; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); height: 3px; border-radius: 2px; background: var(--gold); }
.dtile.active::after { width: 18px; }
.dtile.unread:not(.active)::after { width: 5px; height: 5px; bottom: -8px; border-radius: 50%; background: var(--text); }
.dtile.home .dtile-btn { background: var(--gold-soft); color: var(--gold); border-color: rgba(245, 197, 24, .25); }
.dtile.action .dtile-btn { background: transparent; border: 1.5px dashed var(--bg-active); color: var(--text-2); }
.dtile.action .dtile-btn:hover { border-color: var(--gold); color: var(--gold); }
.dtile.muted .dtile-btn { opacity: .5; }
.dtile .badge { position: absolute; top: -6px; right: -6px; border: 2.5px solid var(--bg); height: 20px; min-width: 20px; line-height: 15px; border-radius: 10px; font-size: 10.5px; }
.dtile .rail-voice { top: auto; bottom: -5px; right: -5px; }
.dtile-sep { width: 1px; height: 26px; background: var(--line); flex: none; margin: 0 2px; }
.deck-search { flex: none; display: flex; align-items: center; gap: 8px; width: 210px; height: 38px; padding: 0 10px 0 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); font-size: 13.5px; transition: border-color .15s, color .15s; }
.deck-search:hover { border-color: var(--bg-active); color: var(--text-2); }
.deck-search span { flex: 1; text-align: left; }
.deck-search kbd { font: 600 10.5px var(--font); background: var(--bg-3); border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; color: var(--text-2); }
.deck-voice:empty, .deck-me:empty { display: none; }
.me-cluster { display: flex; align-items: center; gap: 2px; }
.me-cluster .icon-btn { width: 36px; height: 36px; border-radius: 10px; }
.me-chip { display: flex; align-items: center; gap: 9px; padding: 3px 12px 3px 3px; margin-left: 4px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); max-width: 210px; transition: border-color .15s; }
.me-chip:hover { border-color: var(--bg-active); }
.me-chip .av { width: 32px; height: 32px; }
.me-chip .av .dot { border-color: var(--bg-2); }
.me-chip .who { min-width: 0; text-align: left; line-height: 1.15; }
.me-chip .who b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-chip .who span { display: block; font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* live voice pill */
.live-pill { display: flex; align-items: center; gap: 2px; height: 40px; padding: 0 4px; border-radius: 14px; background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .35); animation: pillIn .25s ease-out; }
@keyframes pillIn { from { opacity: 0; transform: translateY(-6px); } }
.lp-where { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 8px; border-radius: 10px; color: var(--text); font-weight: 600; font-size: 13.5px; }
.lp-where:hover { background: rgba(52, 211, 153, .12); }
.lp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: lpDot 1.8s ease-out infinite; flex: none; }
@keyframes lpDot { 70%, 100% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } }
.lp-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-count { display: inline-flex; align-items: center; gap: 3px; color: var(--green); font-size: 12px; }
.lp-count svg { width: 12px; height: 12px; }
.lp-btn { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2); }
.lp-btn:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.lp-btn.on { color: var(--green); }
.lp-btn.leave { background: #c93a3a; color: #fff; }
.lp-btn.leave:hover { background: #dc4646; }
:root.reduce-motion .lp-dot { animation: none; }

/* ---------- side panel ---------- */
.panel-head { height: 54px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 16px; border-bottom: 1px solid var(--line); }
.ph-title { display: flex; align-items: center; gap: 8px; font: 700 15px var(--font-display); }
.ph-title svg { color: var(--gold); }
.side-scroll { padding: 10px; }
.side-empty { color: var(--muted); font-size: 13px; padding: 8px 10px; line-height: 1.45; }
.hub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 4px; }
.hub-tile { position: relative; display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: var(--bg-3); border: 1px solid transparent; color: var(--text-2); font-weight: 600; font-size: 13.5px; text-align: left; transition: background .15s, color .15s; }
.hub-tile svg { width: 17px; height: 17px; flex: none; }
.hub-tile:hover { background: var(--bg-4); color: var(--text); }
.hub-tile.active { background: var(--gold-soft); color: var(--gold); border-color: rgba(245, 197, 24, .25); }
.hub-tile .badge, .hub-tile .new-pill { position: absolute; top: 6px; right: 6px; }
.cat { padding: 16px 6px 6px; text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--text-2); gap: 8px; }
.cat span { display: flex; align-items: center; gap: 8px; }
.cat span::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.chan { border-radius: 10px; padding: 6px 8px; gap: 10px; }
.chan > svg:first-child { width: 26px; height: 26px; padding: 5px; border-radius: 8px; background: var(--bg-3); flex: none; transition: background .15s, color .15s; }
.chan:hover { background: var(--bg-3); }
.chan:hover > svg:first-child { background: var(--bg-4); }
.chan.active { background: var(--gold-soft); color: var(--text); box-shadow: inset 3px 0 0 var(--gold); }
.chan.active > svg:first-child { background: var(--gold); color: #111; }
.chan.unread::before { display: none; }
.chan.unread:not(.active)::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.dm-item { border-radius: 12px; padding: 7px 8px; }
.dm-item.active { background: var(--gold-soft); box-shadow: inset 3px 0 0 var(--gold); }
.dm-item.unread .dname { color: var(--text); font-weight: 700; }
.vusers { padding-left: 42px; }

/* server card at the top of the channel list */
.server-card { flex: none; cursor: pointer; border-bottom: 1px solid var(--line); position: relative; outline: none; }
.sc-cover { height: 66px; position: relative; overflow: hidden; background: linear-gradient(120deg, color-mix(in srgb, var(--sc, #f5c518) 55%, transparent), transparent 85%), var(--bg-3); }
.sc-cover .side-banner { position: absolute; inset: 0; background-size: cover; background-position: center; }
.server-card.has-banner .sc-cover { height: 96px; }
.sc-row { display: flex; align-items: flex-end; gap: 10px; padding: 0 12px 12px; margin-top: -20px; position: relative; }
.sc-icon { width: 46px; height: 46px; border-radius: 14px; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--bg-4); border: 3px solid var(--bg-2); font: 800 15px var(--font-display); box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.sc-icon img { width: 100%; height: 100%; object-fit: cover; }
.sc-text { flex: 1; min-width: 0; padding-bottom: 1px; }
.sc-text .name { display: block; font: 800 15.5px var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-text small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }
.on-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block; }
.sc-more { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--text-2); background: var(--bg-3); flex: none; transition: transform .2s; }
.server-card:hover .sc-more { background: var(--bg-4); color: var(--text); }
.boost-bar { margin: 2px 0 6px; }
.boost-bar .bb-lvl { color: var(--gold) !important; }
.boost-bar .bb-track i { background: linear-gradient(90deg, var(--gold), var(--orange)) !important; }

/* ---------- avatars: squircles instead of circles ---------- */
.av .av-img { border-radius: var(--sq); }
.av .dot { right: -3px; bottom: -3px; }
.group-av, .dev-icon { border-radius: var(--sq) !important; }
.qr-who .av { border-radius: var(--sq) !important; }
.qr-who .av .av-img { border-radius: var(--sq); }

/* ---------- chat card ---------- */
.topbar { height: 56px; padding: 0 12px 0 18px; background: transparent; }
.topbar .t-name { font: 700 16px var(--font-display); }
.topbar .t-name svg { color: var(--gold); }
.topbar .menu-btn { display: none !important; }
.chat { background: var(--bg-1); }
.msg { margin: 0 10px; padding: 3px 18px 3px 64px; border-radius: 12px; }
.msg.head { margin-top: 12px; }
.msg:hover { background: rgba(255, 255, 255, .025); }
.msg .m-av { left: 12px; top: 5px; }
.msg .m-time-side { width: 64px; }
.m-meta { gap: 8px; }
.m-meta .m-author { font-weight: 700; }
.msg.mentioned { box-shadow: inset 3px 0 0 var(--gold); }
.day-sep { width: fit-content; margin: 20px auto 8px; padding: 3px 12px; border-radius: 999px; background: var(--bg-3); border: 1px solid var(--line); font-size: 11.5px; color: var(--text-2); }
.day-sep::before, .day-sep::after { display: none; }
.unread-sep { margin: 10px 20px; color: var(--gold); gap: 8px; }
.unread-sep::before { display: none; }
.unread-sep::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.unread-sep span { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: var(--gold-soft); font-size: 11px; font-weight: 700; }
.unread-sep span svg { width: 12px; height: 12px; }
.chan-intro { padding: 24px 20px 10px; }
.ci-card { display: flex; gap: 18px; align-items: center; padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(245, 197, 24, .08), transparent 60%), var(--bg-2); }
.ci-card .ci-icon { width: 64px; height: 64px; border-radius: 20px; background: var(--gold); color: #111; margin: 0; flex: none; display: grid; place-items: center; }
.ci-card .ci-icon svg { width: 30px; height: 30px; }
.ci-card .av.lg { flex: none; }
.ci-kicker { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 2px; }
.ci-card h2 { margin: 0 0 4px; font: 800 26px var(--font-display); letter-spacing: -.01em; }
.ci-card p { margin: 0; color: var(--text-2); }
.ci-actions { margin-top: 12px; display: flex; gap: 8px; }
.jumpbar { border-radius: 12px; margin: 0 20px 6px; }
.app-tag { letter-spacing: .04em; }

/* composer: writing area on top, tools + Send underneath */
.composer { padding: 0 16px 14px; }
.compose-box { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; transition: border-color .15s, box-shadow .15s; }
.compose-box:focus-within { border-color: rgba(245, 197, 24, .5); box-shadow: 0 0 0 3px var(--gold-soft); }
.compose-box textarea { padding: 12px 16px 6px; min-height: 44px; }
.compose-bar { display: flex; align-items: center; gap: 6px; padding: 2px 8px 8px; }
.cb-tools { display: flex; align-items: center; gap: 2px; }
.cb-tools .icon-btn { width: 34px; height: 34px; border-radius: 9px; }
.cb-hint { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.compose-bar .char-count { margin-left: auto; }
.compose-bar .char-count:not(:empty) + .cb-hint { margin-left: 8px; }
.send-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 10px; background: var(--gold); color: #111; font-weight: 700; font-size: 13.5px; flex: none; transition: filter .15s, transform .08s; }
.send-btn:hover { filter: brightness(1.08); }
.send-btn:active { transform: scale(.97); }

/* ---------- people list inside a server ---------- */
.members { background: var(--bg-1); border-left: 1px solid var(--line); padding: 10px; }
.members h4 { display: flex; align-items: center; justify-content: space-between; text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--text-2); margin: 14px 6px 6px; }
.members h4 b { font-size: 11px; background: var(--bg-3); border-radius: 999px; padding: 1px 8px; color: var(--muted); }
.member { border-radius: 12px; }

/* ---------- profile card ---------- */
.profile-card:not(.mini) { width: 340px; background: var(--bg-1); border-radius: 18px; overflow: hidden; }
.popover:has(.profile-card:not(.mini)) { border-radius: 18px; overflow: hidden; }
.pc-hero { display: flex; gap: 14px; align-items: center; padding: 18px 16px 16px; background: var(--pc-bg); position: relative; }
.pc-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .45)); pointer-events: none; }
.pc-hero > * { position: relative; z-index: 1; }
.profile-card .pc-hero .pc-av { margin: 0; }
.profile-card .pc-hero .pc-av .av-img { border: 3px solid rgba(255, 255, 255, .18); }
.profile-card .pc-hero .pc-av .dot { border-color: rgba(0, 0, 0, .55); }
.pc-names { min-width: 0; }
.pc-names h3 { font: 800 21px var(--font-display); text-shadow: 0 2px 8px rgba(0, 0, 0, .4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-names .uname { color: rgba(255, 255, 255, .78) !important; }
.pc-names .badge-row { margin-top: 6px; background: rgba(0, 0, 0, .35); width: fit-content; }
.profile-card:not(.mini) .pc-body { padding: 12px 14px 14px; }
.pc-status { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); padding: 8px 10px; border-radius: 10px; background: var(--bg-2); }
.pc-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.pc-facts div { background: var(--bg-2); border-radius: 10px; padding: 8px 10px; }
.pc-facts small { display: block; color: var(--muted); font-size: 11px; }
.pc-facts b { font-size: 13.5px; }
.profile-card .pc-sec { border-radius: 12px; }
.profile-card .pc-sec h5 { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); }
.profile-card.themed .pc-facts div, .profile-card.themed .pc-status { background: rgba(0, 0, 0, .28); }

/* ---------- People dashboard (home) ---------- */
.people-page { max-width: 1120px; margin: 0 auto; }
.pp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 24px; align-items: center; padding: 22px 24px; border-radius: 20px; border: 1px solid var(--line);
  background: radial-gradient(600px 200px at 0% 0%, rgba(245, 197, 24, .12), transparent 70%), var(--bg-2); }
.pp-greet { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pp-greet h1 { margin: 0; font: 800 26px var(--font-display); letter-spacing: -.01em; }
.pp-greet p { margin: 4px 0 0; color: var(--text-2); }
.pp-greet p b { color: var(--gold); }
.pp-add label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.pp-add-row { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 4px 4px 4px 12px; transition: border-color .15s; }
.pp-add-row:focus-within { border-color: var(--gold); }
.pp-add-row .at { color: var(--muted); font-weight: 700; }
.pp-add-row input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; padding: 8px 0; color: var(--text); font-size: 14.5px; }
.pp-add .res { min-height: 18px; font-size: 13px; margin-top: 6px; }
.pp-cols { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; margin-top: 20px; align-items: start; }
.segs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 14px; }
.seg { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px; color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.seg b { font-size: 11px; background: var(--bg-3); color: var(--muted); padding: 1px 7px; border-radius: 999px; }
.seg:hover { color: var(--text); }
.seg.on { background: var(--gold); color: #111; }
.seg.on b { background: rgba(0, 0, 0, .15); color: #111; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.pcard { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--bg-active); transform: translateY(-1px); }
.pcard.incoming { border-color: rgba(52, 211, 153, .35); }
.pc-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.pc-who b, .pc-who span, .pc-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-who span { color: var(--muted); font-size: 12.5px; }
.pc-who small { color: var(--text-2); font-size: 12.5px; margin-top: 2px; }
.pc-acts { display: flex; align-items: center; gap: 4px; flex: none; }
.pp-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--muted); padding: 50px 20px; border: 1.5px dashed var(--line); border-radius: 18px; }
.pp-empty b { color: var(--text); font-size: 16px; }
.pp-side h4 { margin: 4px 0 10px; font: 700 14px var(--font-display); color: var(--text-2); }
.pp-side .quick-grid { grid-template-columns: 1fr; gap: 8px; }
.pp-side .quick { border-radius: 16px; }

/* ---------- login ---------- */
.auth-stage { grid-template-columns: minmax(0, 440px) minmax(0, 460px); justify-content: center; align-content: center; gap: 72px; }
.auth-card, .auth-card.with-qr { max-width: 440px; flex-direction: column; align-items: stretch; gap: 0; padding: 28px; }
.auth-form[hidden], .auth-qr[hidden] { display: none !important; }
.auth-method { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0, 0, 0, .35); margin-bottom: 22px; }
.auth-method button { display: flex; align-items: center; justify-content: center; gap: 7px; height: 36px; border-radius: 9px; color: #b5bac1; font-weight: 600; font-size: 14px; }
.auth-method button.on { background: var(--gold); color: #111; }
.auth-form h2 { text-align: left; font-size: 28px; }
.auth-form .sub { text-align: left; }
.auth-form .field label { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: #d6d9de; }
.auth-form .field label small { color: #7d838d; font-weight: 500; margin-left: 4px; }
.in-wrap { position: relative; }
.in-wrap .in-pre { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #7d838d; font-weight: 700; pointer-events: none; }
.in-wrap .input { padding-left: 30px; }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: 8px; }
.auth-submit svg { transition: transform .2s; }
.auth-submit:hover svg { transform: translateX(3px); }
.auth-submit.busy svg { visibility: hidden; }
.auth-qr, .auth-card.with-qr .auth-qr { width: 100%; padding: 0; border: 0; align-self: auto; }
.auth-qr h3 { margin-top: 20px; }
.qr-steps { text-align: left; margin: 16px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; width: 100%; }
.qr-steps li { counter-increment: s; display: flex; align-items: center; gap: 10px; font-size: 14px; color: #c9ccd1; }
.qr-steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 8px; background: var(--gold-soft); color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: 12px; flex: none; }
.auth-pitch { color: #fff; animation: authIn .6s .1s cubic-bezier(.2, .9, .25, 1.05) backwards; }
.ap-kicker { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(245, 197, 24, .14); color: var(--gold); font-weight: 700; font-size: 13px; }
.auth-pitch h1 { font: 800 clamp(40px, 4.6vw, 60px)/1.02 var(--font-display); letter-spacing: -.02em; margin: 16px 0 20px; text-shadow: 0 6px 30px rgba(0, 0, 0, .5); }
.auth-pitch h1 em { font-style: normal; color: var(--gold); }
.auth-pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.auth-pitch li { display: flex; align-items: center; gap: 10px; color: #d6d9de; font-size: 16px; }
.auth-pitch li svg { color: var(--gold); }
@media (max-width: 1020px) { .auth-stage { grid-template-columns: minmax(0, 460px); } .auth-pitch { display: none; } }

/* ---------- PulsedX themes ---------- */
:root[data-theme="crypto"] .dtile-btn { border-radius: 4px; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
:root[data-theme="space"] .sidebar, :root[data-theme="space"] .main, :root[data-theme="crypto"] .sidebar, :root[data-theme="crypto"] .main { backdrop-filter: blur(6px); }
:root[data-theme="light"] .app { background: #eef0f4; }

/* ---------- mid widths ---------- */
@media (max-width: 1180px) {
  .deck-search { width: 40px; padding: 0; justify-content: center; }
  .deck-search span, .deck-search kbd { display: none; }
  .me-chip .who { display: none; }
  .me-chip { padding: 3px; }
  .cb-hint { display: none; }
  .pp-hero { grid-template-columns: minmax(0, 1fr); }
  .pp-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) { .lp-name, .lp-count { display: none; } .nav { width: 248px; } }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  :root { --deck-h: 54px; }
  .app { padding-top: 0; }
  .deck { padding: env(safe-area-inset-top) 8px 0; height: calc(var(--deck-h) + env(safe-area-inset-top)); gap: 6px; border-bottom: 1px solid var(--line); background: var(--bg-1); }
  .deck .menu-btn { display: grid; }
  .deck-brand span, .deck-servers, .deck-search { display: none; }
  .deck-brand { margin-right: auto; }
  .me-cluster [data-act=mute], .me-cluster [data-act=deafen], .me-cluster [data-act=settings] { display: none; }
  .live-pill { height: 36px; }
  .live-pill [data-act=camera], .live-pill [data-act=screen], .live-pill [data-act=soundboard] { display: none; }
  .shell { padding: 0; gap: 0; }
  .main { border: 0; border-radius: 0; }
  .nav { width: auto; padding-top: 0; }
  .sidebar { border-radius: 0 18px 18px 0; border-left: 0; width: min(320px, calc(100vw - 48px)); }
  .drawer-servers { display: flex; gap: 8px; overflow-x: auto; padding: calc(12px + env(safe-area-inset-top)) 12px 14px; border-bottom: 1px solid var(--line); flex: none; scrollbar-width: none; }
  .drawer-servers::-webkit-scrollbar { display: none; }
  .msg { margin: 0 4px; padding-left: 58px; padding-right: 10px; }
  .msg .m-av { left: 8px; }
  /* single-row composer on phones */
  .composer { padding: 0 8px max(8px, env(safe-area-inset-bottom)); }
  .compose-box { flex-direction: row; align-items: flex-end; padding: 4px; border-radius: 18px; }
  .compose-bar, .cb-tools { display: contents; }
  .compose-box textarea { order: 1; flex: 1; min-width: 0; padding: 9px 6px; min-height: 38px; }
  .compose-more { order: 0; }
  .cb-tools [data-act=emojiInsert] { order: 2; }
  .compose-bar .char-count { order: 3; align-self: center; }
  .send-btn { order: 4; width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: 13px; }
  .send-btn span { display: none; }
  .chan-intro { padding: 16px 10px 6px; }
  .ci-card { flex-direction: column; align-items: flex-start; padding: 16px; }
  .pp-hero { padding: 16px; border-radius: 16px; }
  .pp-greet .av.lg { width: 56px; height: 56px; }
  .pp-greet h1 { font-size: 21px; overflow-wrap: anywhere; }
  .pp-add-row .btn { padding: 8px 12px; }
  .segs { display: flex; }
  .seg { flex: 1; justify-content: center; padding: 7px 6px; }
  .pcards { grid-template-columns: 1fr; }
  .profile-card:not(.mini) { width: 100%; }
}

/* ---------- settings: our own nav style ---------- */
.modal.wide { border-radius: 20px; }
.settings-nav { width: 220px; padding: 14px 10px; background: var(--bg); border-right: 1px solid var(--line); }
.settings-nav .sn-title { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--gold); padding: 14px 10px 6px; display: flex; align-items: center; gap: 8px; }
.settings-nav .sn-title::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.settings-nav button { border-radius: 10px; padding: 8px 12px; font-weight: 500; }
.settings-nav button.active { background: var(--gold-soft); color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); font-weight: 600; }
.settings-main h2 { font: 800 24px var(--font-display); letter-spacing: -.01em; }
@media (max-width: 760px) {
  .settings-nav { border-right: 0; border-bottom: 1px solid var(--line); }
  .settings-nav .sn-title { display: none; }
  .settings-nav button { flex: none; }
  .modal.wide { border-radius: 0; }
}

/* ---------- channel settings & permissions ---------- */
.cs-form { max-width: 560px; }
.cs-form .hint, .perm-grid .hint { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.cs-form input[type=range] { width: 100%; accent-color: var(--gold); }
.cs-save { margin-top: 18px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); margin: 6px 0 12px; cursor: pointer; }
.toggle-row b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.toggle-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.toggle-row input { display: none; }
.toggle-row.bare { background: none; border: 0; padding: 0; margin: 0; }
.toggle-row input:checked + .switch { background: var(--green); }
.toggle-row input:checked + .switch::after { transform: translateX(18px); }
.private-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); margin-bottom: 16px; }
.private-card.on { border-color: rgba(245, 197, 24, .4); background: linear-gradient(135deg, rgba(245, 197, 24, .1), transparent 70%), var(--bg-2); }
.private-card > div:nth-child(2) { flex: 1; }
.private-card small { display: block; color: var(--text-2); font-size: 13px; margin-top: 2px; }
.pc-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-3); color: var(--text-2); flex: none; }
.private-card.on .pc-ic { background: var(--gold); color: #111; }
.perm-wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.perm-targets { display: flex; flex-direction: column; gap: 3px; padding: 8px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); position: sticky; top: 0; }
.pt-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 6px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.pt { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 9px; color: var(--text-2); text-align: left; font-size: 13.5px; min-width: 0; }
.pt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt .av { width: 22px; height: 22px; }
.pt:hover { background: var(--bg-3); color: var(--text); }
.pt.active { background: var(--gold-soft); color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.pt-sync { margin-top: 8px; justify-content: flex-start; font-size: 12.5px; white-space: normal; text-align: left; }
.pg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.pg-head > div { display: flex; align-items: center; gap: 8px; font: 700 16px var(--font-display); }
.danger-text { color: var(--red) !important; }
.pg-group { margin: 16px 0 4px; font-size: 12px; color: var(--gold); text-transform: none; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.perm-row b { font-size: 14px; }
.perm-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.tri { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.tri button { width: 34px; height: 30px; display: grid; place-items: center; color: var(--muted); font-weight: 800; }
.tri button:hover { color: var(--text); background: var(--bg-3); }
.tri-deny [data-v=deny] { background: #c93a3a; color: #fff; }
.tri-inherit [data-v=inherit] { background: var(--bg-active); color: var(--text); }
.tri-allow [data-v=allow] { background: #1f9d6c; color: #fff; }
.pt-add { width: 280px; max-height: 360px; display: flex; flex-direction: column; }
.pt-add .input { margin-bottom: 6px; }
.pt-list { overflow-y: auto; }
.pt-list button .av { width: 20px; height: 20px; }
.pt-list button[disabled] { opacity: .4; cursor: not-allowed; }
.role-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; }
@media (max-width: 760px) { .perm-wrap { grid-template-columns: 1fr; } .perm-targets { position: static; flex-direction: row; flex-wrap: wrap; } .pt-head { width: 100%; } }

/* ---------- voice + member moderation ---------- */
.vicons .srv, .t-label .srv { color: var(--red); display: inline-flex; }
.to-ic { display: inline-flex; color: var(--orange); margin-left: 4px; vertical-align: -2px; }
.vm-menu { width: 240px; }
.vm-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.vm-head .av { width: 26px; height: 26px; }
.vm-sub { padding: 4px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 4px 0; }
.vm-sub > span { display: flex; align-items: center; gap: 8px; padding: 6px 10px 2px; font-size: 12px; color: var(--muted); }
.vm-sub button { padding-left: 24px !important; }
.to-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.to-grid .radio-card { justify-content: center; padding: 12px 8px; text-align: center; }
.timeout-note { color: var(--orange) !important; }
.nsfw-gate { flex: 1; display: grid; place-items: center; padding: 20px; }
.ng-card { max-width: 420px; text-align: center; padding: 28px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-2); }
.ng-card > svg { width: 44px; height: 44px; color: var(--red); }
.ng-card h2 { font: 800 22px var(--font-display); margin: 10px 0 6px; }
.ng-card p { color: var(--text-2); }
.ng-actions { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }

/* private channels: lock badge on the channel icon */
.ch-ic-lock { position: relative; display: inline-flex; flex: none; }
.ch-ic-lock > i { position: absolute; right: -4px; bottom: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg-2); color: var(--gold); display: grid; place-items: center; }
.ch-ic-lock > i svg { width: 9px; height: 9px; stroke-width: 3; }
.chan > .ch-ic-lock > svg { width: 26px; height: 26px; padding: 5px; border-radius: 8px; background: var(--bg-3); transition: background .15s, color .15s; }
.chan:hover > .ch-ic-lock > svg { background: var(--bg-4); }
.chan.active > .ch-ic-lock > svg { background: var(--gold); color: #111; }
.topbar .t-name .ch-ic-lock > i { background: var(--bg-1); }
.ci-card .ci-icon .ch-ic-lock > i { width: 24px; height: 24px; right: -14px; bottom: -14px; background: var(--bg-2); border: 2px solid var(--gold); }
.ci-card .ci-icon .ch-ic-lock > i svg { width: 12px; height: 12px; }
.topbar .t-name .ch-ic-lock > i svg { width: 9px !important; height: 9px !important; }

/* settings tabs on phones: full-width swipeable strip (the 220px desktop sidebar width must not apply here) */
@media (max-width: 760px) {
  .settings-nav {
    width: 100% !important; max-width: 100vw; flex: none; gap: 6px; padding: 10px 12px;
    overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 28px), transparent);
  }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav button { flex: none; scroll-snap-align: center; padding: 8px 14px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); white-space: nowrap; }
  .settings-nav button.active { box-shadow: none; border-color: rgba(245, 197, 24, .45); }
  .settings-nav hr { display: none; }
  .settings-main { padding-top: 14px; }
}

/* ---------- categories ---------- */
.cat > span svg { width: 12px; height: 12px; transition: transform .15s; margin-right: -2px; }
.cat.collapsed > span svg { transform: rotate(-90deg); }
.cat button[data-act=catMenu] svg { width: 15px; height: 15px; }
.cat[draggable=true] { cursor: grab; }
.cat.drop-above { box-shadow: 0 -2px 0 var(--gold); }
.cat.drop-below { box-shadow: 0 2px 0 var(--gold); }
.cat.drop-cat, .cat-empty.drop-cat { background: var(--gold-soft); border-radius: 8px; }
.cat-empty { margin: 2px 4px 6px; padding: 9px 10px; border: 1.5px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12px; text-align: center; }

/* ---------- server folders ---------- */
.dfolder { display: flex; align-items: center; gap: 8px; flex: none; }
.dfolder.open { padding: 3px 6px 3px 3px; border-radius: 16px; background: color-mix(in srgb, var(--fc) 14%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--fc) 45%, transparent); }
.dfolder-items { display: flex; align-items: center; gap: 8px; }
.dtile.folder .dtile-btn { background: color-mix(in srgb, var(--fc) 22%, var(--bg-3)); border-color: color-mix(in srgb, var(--fc) 40%, transparent); color: var(--fc); }
.dfolder.open .dtile.folder .dtile-btn { background: transparent; border-color: transparent; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 30px; height: 30px; }
.fgrid i { border-radius: 5px; overflow: hidden; background: var(--bg-4); display: grid; place-items: center; font: 800 7px var(--font); font-style: normal; color: var(--text); }
.fgrid i img { width: 100%; height: 100%; object-fit: cover; }
.dtile.dragging { opacity: .4; }
.dtile.drop-before .dtile-btn { box-shadow: -4px 0 0 var(--gold); }
.dtile.drop-after .dtile-btn { box-shadow: 4px 0 0 var(--gold); }
.dtile.drop-into .dtile-btn { box-shadow: 0 0 0 3px var(--gold); transform: scale(1.08); }
.tile-menu { width: 230px; }
.tm-head { display: flex; align-items: center; gap: 6px; padding: 6px 10px 8px; font-weight: 700; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-colors { display: flex; gap: 6px; padding: 6px 10px; }
.tm-colors button { width: 20px !important; height: 20px; padding: 0 !important; border-radius: 50% !important; }
.tm-colors button.on { box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 4px var(--text); }
.tm-sub { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; max-height: 220px; overflow-y: auto; }
.tm-sub > span { display: flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 12px; color: var(--muted); }
.tm-sub button { padding-left: 26px !important; }
.drawer-servers .dfolder.open { padding: 2px 4px 2px 2px; }

/* ---------- forum & media channels ---------- */
.forum-page { max-width: 980px; margin: 0 auto; width: 100%; }
.forum-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(245, 197, 24, .08), transparent 60%), var(--bg-2); }
.fh-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fh-ic { width: 48px; height: 48px; border-radius: 15px; background: var(--gold); color: #111; display: grid; place-items: center; flex: none; }
.fh-ic svg { width: 24px; height: 24px; }
.fh-title h2 { margin: 0; font: 800 22px var(--font-display); }
.fh-title p { margin: 2px 0 0; color: var(--text-2); font-size: 14px; }
.forum-tools { display: flex; align-items: center; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.ft-search { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; color: var(--muted); }
.ft-search input { flex: 1; background: none; border: 0; outline: none; padding: 9px 0; color: var(--text); min-width: 0; }
.ft-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ft-sort { width: auto; }
.ptag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent); }
.ptag.sm { font-size: 11px; padding: 1px 8px; margin-left: 6px; }
button.ptag.on { background: var(--tc); color: #111; }
.ptag button { color: inherit; opacity: .7; display: inline-flex; }
.ptag button:hover { opacity: 1; }
.plist { display: flex; flex-direction: column; gap: 8px; }
.pcard-f { display: flex; gap: 14px; align-items: stretch; text-align: left; padding: 14px 16px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); transition: border-color .15s, transform .15s; width: 100%; }
.pcard-f:hover { border-color: var(--bg-active); transform: translateY(-1px); }
.pcard-f.pinned { border-color: rgba(245, 197, 24, .35); }
.pf-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pf-top { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-top:empty { display: none; }
.pf-pin { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--gold); }
.pf-title { font: 700 16px var(--font-display); }
.pf-prev { margin: 0; color: var(--text-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pf-prev span { color: var(--text); font-weight: 600; }
.pf-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; }
.pf-meta .av { width: 20px; height: 20px; }
.pf-meta span { display: inline-flex; align-items: center; gap: 4px; }
.pf-thumb { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; flex: none; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.mcard { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--bg-3); border: 1px solid var(--line); padding: 0; }
.mcard img, .mcard video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.mcard:hover img, .mcard:hover video { transform: scale(1.04); }
.mc-play { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.mc-info { position: absolute; inset: auto 0 0 0; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); text-align: left; color: #fff; display: flex; flex-direction: column; gap: 2px; }
.mc-info b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.mc-info span { font-size: 12px; opacity: .8; display: inline-flex; align-items: center; gap: 4px; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font: 700 15px var(--font-display); padding: 4px 8px; border-radius: 8px; }
.crumb:hover { background: var(--bg-3); color: var(--text); }
.crumb-sep { color: var(--muted); }
.crumb-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.np-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.np-files { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.np-file { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 8px; background: var(--bg-3); font-size: 12.5px; }
.tag-editor .te-list { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.te-add { display: flex; gap: 6px; }
.te-add .input { flex: 1; }
@media (max-width: 760px) { .forum-head { flex-direction: column; align-items: stretch; } .mgrid { grid-template-columns: repeat(2, 1fr); } .pf-thumb { width: 64px; height: 64px; } .crumb-title { max-width: 30vw; } }

/* ---------- moderation ---------- */
.seg-row { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); flex-wrap: wrap; }
.role-picks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.mod-modal { max-width: 720px !important; }
.mod-panel { padding: 20px; }
.mp-head { display: flex; gap: 14px; align-items: center; position: relative; }
.mp-head h3 { margin: 0; font: 800 22px var(--font-display); }
.mp-head > div > span { color: var(--muted); font-size: 13px; }
.mp-head .x { position: absolute; top: -6px; right: -6px; }
.mp-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mp-flag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--bg-3); color: var(--text-2); font-size: 12px; font-weight: 600; }
.mp-flag.warn { background: rgba(251, 146, 60, .14); color: var(--orange); }
.mp-flag.bad { background: rgba(248, 113, 113, .14); color: var(--red); }
.mp-note { margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: var(--bg-2); color: var(--text-2); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.mp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.mp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mp-cols h4 { margin: 0 0 8px; font-size: 13px; color: var(--text-2); }
.mp-cols section { max-height: 340px; overflow-y: auto; }
.mp-warn { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border-radius: 10px; background: var(--bg-2); margin-bottom: 6px; }
.mp-warn > div { flex: 1; min-width: 0; }
.mp-warn b { display: block; font-size: 13.5px; font-weight: 600; }
.mp-warn small { color: var(--muted); font-size: 12px; }
.mp-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mp-hist li { display: flex; gap: 8px; font-size: 13px; color: var(--text-2); }
.mp-hist li > svg { flex: none; margin-top: 2px; color: var(--muted); }
.mp-hist b { color: var(--text); }
.mp-why { display: block; color: var(--text); font-style: italic; }
.mp-hist small { display: block; color: var(--muted); font-size: 11.5px; }
.mod-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.mod-stats div { padding: 12px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.mod-stats b { display: block; font: 800 22px var(--font-display); }
.mod-stats span { color: var(--muted); font-size: 12px; }
.warn-box { padding: 14px 16px; border-radius: 12px; background: rgba(251, 146, 60, .1); border: 1px solid rgba(251, 146, 60, .35); font-size: 15px; margin-bottom: 8px; }
@media (max-width: 760px) { .mp-cols { grid-template-columns: 1fr; } .mod-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- profiles ---------- */
.pc-pronouns { color: var(--text-2); }
.pc-hero .av .av-img { box-shadow: 0 0 0 3px var(--pc-accent, transparent); }
.socials { display: flex; flex-direction: column; gap: 6px; }
.soc { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 13px; }
.soc b { color: var(--sc); font-weight: 700; min-width: 64px; }
.soc span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.soc svg { color: var(--muted); }
.soc:hover { border-color: var(--sc); }
.soc:hover span { color: var(--text); }
.pc-common .common-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 4px; border-radius: 10px; color: var(--text-2); font-size: 13px; }
.pc-common .common-row:hover { background: var(--bg-3); color: var(--text); }
.pc-common .common-row > svg { margin-left: auto; transform: rotate(-90deg); }
.stack { display: inline-flex; }
.stack i { width: 26px; height: 26px; border-radius: 9px; overflow: hidden; margin-left: -7px; border: 2px solid var(--bg-1); background: var(--bg-4); display: grid; place-items: center; font: 800 9px var(--font); font-style: normal; color: var(--text); }
.stack i:first-child { margin-left: 0; }
.stack i img, .stack i .av, .stack i .av-img { width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 0 !important; }
.stack i.more { background: var(--bg-3); color: var(--text-2); font-size: 10px; }
.pc-full { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 10px; padding: 8px; border-radius: 10px; color: var(--text-2); font-size: 13px; font-weight: 600; border: 1px dashed var(--line); }
.pc-full:hover { color: var(--gold); border-color: var(--gold); }
.fp-modal { max-width: 600px !important; overflow: hidden; }
.full-profile .fp-banner { height: 120px; background: var(--fp-bg); position: relative; }
.full-profile .fp-banner .x { position: absolute; top: 10px; right: 10px; background: rgba(0, 0, 0, .45); color: #fff; }
.fp-top { display: flex; align-items: flex-end; gap: 16px; padding: 0 22px; margin-top: -44px; position: relative; }
.fp-top .av.lg { width: 96px; height: 96px; }
.fp-top .av.lg .av-img { border: 5px solid var(--bg-1); }
.fp-names { flex: 1; min-width: 0; padding-bottom: 4px; }
.fp-names h2 { margin: 0; font: 800 24px var(--font-display); }
.fp-names > span { color: var(--text-2); font-size: 13.5px; }
.fp-tabs { display: flex; gap: 4px; padding: 14px 22px 0; border-bottom: 1px solid var(--line); }
.fp-tabs button { padding: 8px 12px; border-radius: 10px 10px 0 0; color: var(--text-2); font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; }
.fp-tabs button.on { color: var(--text); border-bottom-color: var(--gold); }
.fp-body { padding: 16px 22px 22px; max-height: 52vh; overflow-y: auto; }
.fp-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 12px; text-align: left; cursor: pointer; }
.fp-row:hover { background: var(--bg-2); }
.fp-row > div:not(.av) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fp-row > .av { width: 40px; height: 40px; flex: none; }
.fp-row small { color: var(--muted); }
.fp-sic { width: 40px; height: 40px; border-radius: 12px; overflow: hidden; background: var(--bg-3); display: grid; place-items: center; font: 800 13px var(--font-display); flex: none; }
.fp-sic img { width: 100%; height: 100%; object-fit: cover; }
.soc-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.soc-in { display: flex; align-items: center; gap: 8px; }
.soc-in b { width: 74px; flex: none; color: var(--sc); font-size: 12.5px; }
.color-sw.none { border: 1.5px dashed var(--muted) !important; }
.sp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.sp-av-row { display: flex; gap: 8px; }
.sp-card { width: 100% !important; border: 1px solid var(--line); }
@media (max-width: 760px) { .soc-edit, .sp-grid { grid-template-columns: 1fr; } .sp-preview { order: -1; } }

/* ---------- streaming ---------- */
.go-live .gl-src { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gl-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); text-align: left; }
.gl-opt b { color: var(--text); font-size: 13.5px; } .gl-opt small { color: var(--muted); font-size: 11.5px; }
.gl-opt.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.gl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gl-seg { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.gl-seg button { flex: 1; padding: 7px 4px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--text-2); }
.gl-seg button.on { background: var(--gold); color: #111; }
.gl-seg button:disabled { opacity: .4; cursor: not-allowed; }
.gl-lock { display: flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--muted); font-size: 11.5px; }
.gl-video { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16/9; }
.gl-video video { width: 100%; height: 100%; object-fit: contain; }
.gl-badge, .live-badge { background: #e5484d; color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .04em; padding: 3px 7px; border-radius: 6px; }
.gl-badge { position: absolute; top: 10px; left: 10px; }
.stage { position: relative; }
.stage-view { position: absolute; top: 10px; right: 12px; z-index: 3; display: flex; gap: 6px; }
.stage-view button { display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 8px; background: rgba(0,0,0,.45); color: #ddd; font-size: 12px; font-weight: 600; backdrop-filter: blur(6px); }
.stage-view button.on { background: var(--gold); color: #111; }
.stage-grid .tile[hidden] { display: none !important; }
.tile .t-tools { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; align-items: center; gap: 6px; z-index: 2; pointer-events: none; }
.tile .t-tools > * { pointer-events: auto; }
.tile .tt-spacer { flex: 1; pointer-events: none; }
.tile .viewers { display: flex; align-items: center; gap: 4px; background: rgba(0,0,0,.55); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 7px; border-radius: 6px; }
.tile .tt-btn, .tile .tt-vol { display: flex; align-items: center; gap: 5px; background: rgba(0,0,0,.55); color: #fff; padding: 5px; border-radius: 7px; opacity: 0; transition: opacity .15s; }
.tile:hover .tt-btn, .tile:hover .tt-vol, .tile.focused .tt-btn { opacity: 1; }
.tile .tt-vol input { width: 80px; accent-color: var(--gold); }
.stage-grid.focus-mode { display: flex !important; flex-wrap: wrap; align-content: stretch; gap: 10px; }
.stage-grid.focus-mode .tile { flex: 0 0 170px; height: 100px; aspect-ratio: auto; min-height: 0; }
.stage-grid.focus-mode .tile.focused { flex: 1 1 100%; height: calc(100% - 110px); max-height: none; order: -1; }
.stage-grid.focus-mode .tile:not(.focused) .avatar, .stage-grid.focus-mode .tile:not(.focused) > .av { transform: scale(.55); }
.live-badge { white-space: nowrap; }
.stage-grid.focus-mode .tile:not(.focused) .t-tools .viewers, .stage-grid.focus-mode .tile:not(.focused) .tt-vol { display: none; }
@media (hover: none) { .tile .tt-btn, .tile .tt-vol { opacity: 1; } }
@media (max-width: 700px) { .go-live .gl-src, .gl-row { grid-template-columns: 1fr; } .stage-grid.focus-mode .tile { flex-basis: 120px; height: 76px; } }
.stage-view + .stage-grid { padding-top: 50px; }

/* ---------- in-call activities ---------- */
.stage.with-activity .stage-view { display: none; }
.stage.with-activity .activity-pane { flex: 1; min-height: 0; padding: 14px 16px 0; display: flex; }
.stage.with-activity .stage-grid, .stage.with-activity .stage-grid.focus-mode { flex: 0 0 auto; display: flex !important; flex-wrap: nowrap; overflow-x: auto; justify-content: center; align-content: normal; padding: 10px 16px; gap: 8px; }
.stage.with-activity .stage-grid .tile, .stage.with-activity .stage-grid.focus-mode .tile { flex: 0 0 150px; height: 86px; aspect-ratio: auto; }
.stage.with-activity .stage-grid .tile .av, .stage.with-activity .stage-grid .tile .avatar { transform: translateY(-12px) scale(.5); }
.stage.with-activity .stage-grid .tile .t-label { font-size: 11px; bottom: 5px; left: 5px; max-width: calc(100% - 10px); }
.stage.with-activity .tile .tt-vol, .stage.with-activity .tile .viewers { display: none; }
.act-pick { display: grid; gap: 12px; }
.act-card { display: flex; gap: 14px; padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); }
.act-card .ac-art { flex: 0 0 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; color: #fff; }
.act-card.yt .ac-art { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.act-card.wbc .ac-art { background: linear-gradient(135deg, #60a5fa, #7c3aed); }
.act-card .ac-art svg { width: 30px; height: 30px; }
.act-card .ac-body { flex: 1; min-width: 0; } .act-card b { font-size: 15px; } .act-card small { display: block; color: var(--muted); margin: 3px 0 10px; }
.ac-row { display: flex; gap: 8px; } .ac-row .input { flex: 1; min-width: 0; }
.wt { flex: 1; display: flex; gap: 12px; min-height: 0; }
.wt-player { flex: 1; min-width: 0; border-radius: 12px; overflow: hidden; background: #000; }
.wt-player iframe { width: 100%; height: 100%; border: 0; display: block; }
.wt-side { flex: 0 0 280px; display: flex; flex-direction: column; gap: 10px; min-height: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.wt-head { display: flex; align-items: center; gap: 7px; font-weight: 700; } .wt-head .icon-btn { margin-left: auto; }
.wt-now { display: flex; gap: 10px; align-items: center; }
.wt-now img { width: 96px; border-radius: 8px; aspect-ratio: 16/9; object-fit: cover; }
.wt-now small { color: var(--gold); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.wt-now b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; }
.wt-now span, .wt-q span { display: block; color: var(--muted); font-size: 11.5px; }
.wt-add { display: grid; gap: 6px; } .wt-add-btns { display: flex; gap: 6px; } .wt-add-btns .btn { flex: 1; justify-content: center; }
.wt-qhead { font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.wt-queue { overflow-y: auto; min-height: 0; display: grid; gap: 6px; align-content: start; }
.wt-q { display: flex; gap: 8px; align-items: center; } .wt-q img { width: 60px; border-radius: 6px; aspect-ratio: 16/9; object-fit: cover; }
.wt-q div { flex: 1; min-width: 0; } .wt-q b { display: block; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-empty { color: var(--muted); font-size: 12.5px; margin: 0; }
.wb { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 0; min-width: 0; }
.wb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wb-group { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.wb-group button { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: var(--text-2); }
.wb-group button:hover { background: var(--bg-3); } .wb-group button.on { background: var(--bg-3); color: var(--text); box-shadow: 0 0 0 2px var(--gold) inset; }
.wb-color::after { content: ''; width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.wb-size i { display: block; border-radius: 50%; background: currentColor; }
.wb-spacer { flex: 1; }
.wb-wrap { flex: 1; min-height: 0; display: grid; place-items: center; }
.wb-wrap canvas { background: #12141a; border-radius: 12px; border: 1px solid var(--line); touch-action: none; cursor: crosshair; }
@media (max-width: 800px) {
  .wt { flex-direction: column; } .wt-player { flex: 0 0 auto; aspect-ratio: 16/9; } .wt-side { flex: 1 1 auto; }
  .stage.with-activity .stage-grid .tile { flex-basis: 110px; height: 64px; }
}

/* ---------- webhooks ---------- */
.wh-list { display: grid; gap: 10px; margin-top: 14px; }
.wh { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); overflow: hidden; }
.wh-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.wh-head > svg { margin-left: auto; transition: transform .15s; color: var(--muted); }
.wh.open .wh-head > svg { transform: rotate(180deg); }
.wh-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--bg-3); display: grid; place-items: center; color: var(--text-2); flex: none; }
.wh-meta { min-width: 0; } .wh-meta b { display: block; } .wh-meta span { color: var(--muted); font-size: 12.5px; }
.wh-body { display: none; padding: 4px 14px 14px; border-top: 1px solid var(--line); }
.wh.open .wh-body { display: block; }
.wh-row { display: flex; gap: 16px; align-items: flex-start; margin-top: 12px; }
.wh-avpick { flex: none; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: var(--text-2); }
.wh-avpick img, .wh-avpick > svg { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--bg-3); padding: 0; }
.wh-avpick > svg { padding: 22px; }
.wh-avpick small { font-size: 11px; color: var(--muted); }
.wh-fields { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
.wh-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.wh-card { display: flex; gap: 12px; padding: 14px; max-width: 300px; }
.wh-card b { font-size: 15px; margin-right: 6px; } .wh-card p { color: var(--text-2); font-size: 12.5px; margin: 6px 0 0; }
@media (max-width: 700px) { .wh-row { flex-direction: column; align-items: center; } .wh-fields { grid-template-columns: 1fr; width: 100%; } }

/* ---------- Pulse perks ---------- */
.srv-loading { position: fixed; inset: 0; z-index: 9000; background: #000; cursor: pointer; animation: sl-in .25s ease both; }
.srv-loading iframe { width: 100%; height: 100%; border: 0; pointer-events: none; display: block; }
.srv-loading.out { animation: sl-out .38s ease forwards; }
.sl-skip { position: absolute; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; background: rgba(0,0,0,.55); color: #fff; font-weight: 600; font-size: 13px; backdrop-filter: blur(6px); }
@keyframes sl-in { from { opacity: 0; } } @keyframes sl-out { to { opacity: 0; transform: scale(1.02); } }
.pk-card { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); padding: 14px; margin: 14px 0; }
.pk-head { display: flex; gap: 12px; align-items: flex-start; }
.pk-head > div:nth-child(2) { flex: 1; min-width: 0; } .pk-head b { display: block; font-size: 15px; } .pk-head span { color: var(--muted); font-size: 13px; }
.pk-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--gold), #ff8a3d); color: #111; flex: none; }
.pk-lvl { flex: none; font-size: 11px !important; font-weight: 800; color: var(--gold) !important; border: 1px solid var(--gold); padding: 2px 8px; border-radius: 99px; }
.pk-card.locked .pk-ic { filter: grayscale(1); opacity: .6; }
.pk-lock { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg-3); color: var(--text-2); font-size: 13.5px; }
.pk-lock .btn { margin-left: auto; }
.pk-body { margin-top: 10px; }
.pk-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.pk-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pk-code { display: flex; flex-direction: column; min-width: 0; }
.pk-tabs { display: flex; gap: 4px; align-items: center; margin-bottom: 6px; }
.pk-tabs button { padding: 5px 12px; border-radius: 8px; font-weight: 700; font-size: 12.5px; color: var(--text-2); }
.pk-tabs button.on { background: var(--bg-3); color: var(--text); }
.pk-tabs span { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.pk-code textarea { min-height: 260px; resize: vertical; font: 12.5px/1.55 ui-monospace, 'JetBrains Mono', Consolas, monospace; background: #0b0d12; color: #e6e9ef; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; tab-size: 2; white-space: pre; }
.pk-assets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.pk-asset { width: 34px; height: 34px; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); padding: 0; }
.pk-asset img { width: 100%; height: 100%; object-fit: cover; }
.pk-preview { display: flex; flex-direction: column; gap: 8px; }
.pk-preview iframe { width: 100%; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: 10px; background: #000; }
.pk-preview .btn { align-self: flex-start; }
.select.sm { padding: 4px 8px; font-size: 12.5px; width: auto; display: inline-block; }
@media (max-width: 760px) { .pk-editor { grid-template-columns: 1fr; } .pk-code textarea { min-height: 180px; } }

/* ---------- animated themes: glass panels over the canvas (all 7 themes share these) ---------- */
#theme-fx { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: none; }
:root.fx-on #theme-fx { display: block; }
:root.fx-on body { background: var(--bg); }
:root.fx-on .app { position: relative; z-index: 1; background: transparent !important; }
:root.fx-on .sidebar { background: var(--glass-2) !important; backdrop-filter: blur(14px) saturate(1.15); }
:root.fx-on .main { background: var(--glass-1) !important; backdrop-filter: blur(2px); }
:root.fx-on .chat, :root.fx-on .members, :root.fx-on .topbar, :root.fx-on .page { background: transparent !important; }
:root.fx-on .members { background: var(--glass-3) !important; }
:root.fx-on .stage { background: rgba(0, 0, 0, .35); }
:root.fx-on .compose-box { background: var(--glass-compose) !important; backdrop-filter: blur(10px); }
:root.fx-on .modal, :root.fx-on .popover { background: var(--glass-modal) !important; backdrop-filter: blur(18px); }
:root.fx-on .m-content { text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }

:root[data-theme="crypto"] { --glass-1: rgba(2, 11, 6, .55); --glass-2: rgba(3, 17, 10, .74); --glass-3: rgba(3, 14, 8, .5); --glass-compose: rgba(4, 22, 12, .82); --glass-modal: rgba(3, 17, 10, .94); }
:root[data-theme="space"] { --glass-1: rgba(14, 12, 44, .2); --glass-2: rgba(12, 10, 38, .5); --glass-3: rgba(10, 9, 32, .35); --glass-compose: rgba(35, 31, 85, .7); --glass-modal: rgba(14, 12, 42, .92); }
/* Crypto's monospace is wide: keep the sidebar header and pulse bar on one line */
:root[data-theme="crypto"] .sc-text small, :root[data-theme="crypto"] .sc-text span, :root[data-theme="crypto"] .boost-bar, :root[data-theme="crypto"] .boost-bar * { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-theme="crypto"] .sc-text small, :root[data-theme="crypto"] .boost-bar { display: block; font-size: 11.5px; letter-spacing: -.02em; }

:root[data-theme="cat"] {
  --bg: #1c1417; --bg-1: #221a1d; --bg-2: #2a2024; --bg-3: #33272c; --bg-4: #3d2f35; --bg-hover: #43333a; --bg-active: #4d3a42; --line: #4a3840;
  --text: #fff4f6; --text-2: #efc9d2; --muted: #b08b95; --gold: #ff9eb5; --gold-d: #ff7a9a; --gold-soft: rgba(255, 158, 181, .14);
  --glass-1: rgba(34, 24, 28, .45); --glass-2: rgba(42, 30, 35, .72); --glass-3: rgba(30, 21, 25, .45); --glass-compose: rgba(51, 38, 43, .8); --glass-modal: rgba(42, 30, 35, .95);
}
:root[data-theme="winter"] {
  --bg: #0a1320; --bg-1: #0e1a2b; --bg-2: #122136; --bg-3: #172a44; --bg-4: #1d3452; --bg-hover: #223c5e; --bg-active: #28476e; --line: #2a4466;
  --text: #eef6ff; --text-2: #bcd6f2; --muted: #7f9dbf; --gold: #8fd3ff; --gold-d: #5bbcff; --gold-soft: rgba(143, 211, 255, .14);
  --glass-1: rgba(14, 26, 43, .35); --glass-2: rgba(18, 33, 54, .62); --glass-3: rgba(12, 22, 38, .4); --glass-compose: rgba(23, 42, 68, .78); --glass-modal: rgba(18, 33, 54, .95);
}
:root[data-theme="halloween"] {
  --bg: #0d0710; --bg-1: #140b18; --bg-2: #1a0f1f; --bg-3: #231528; --bg-4: #2d1b33; --bg-hover: #36203d; --bg-active: #412649; --line: #3b2342;
  --text: #fff1e6; --text-2: #eccab4; --muted: #a8869a; --gold: #ff8c1a; --gold-d: #e66f00; --gold-soft: rgba(255, 140, 26, .14); --purple: #b36bff;
  --glass-1: rgba(20, 11, 24, .42); --glass-2: rgba(26, 15, 31, .72); --glass-3: rgba(18, 10, 22, .45); --glass-compose: rgba(35, 21, 40, .82); --glass-modal: rgba(26, 15, 31, .95);
}
:root[data-theme="nebula"] {
  --bg: #07040f; --bg-1: #0d0819; --bg-2: #120b22; --bg-3: #1a1030; --bg-4: #24173f; --bg-hover: #2b1c4c; --bg-active: #34225a; --line: #33205a;
  --text: #f7eeff; --text-2: #d6c4f2; --muted: #9a86c0; --gold: #ff5fd2; --gold-d: #e03bb5; --gold-soft: rgba(255, 95, 210, .14); --blue: #4de8ff;
  --glass-1: rgba(13, 8, 25, .3); --glass-2: rgba(18, 11, 34, .6); --glass-3: rgba(12, 7, 24, .38); --glass-compose: rgba(26, 16, 48, .78); --glass-modal: rgba(18, 11, 34, .95);
}
:root[data-theme="deepsea"] {
  --bg: #01101a; --bg-1: #031822; --bg-2: #05202d; --bg-3: #072a3a; --bg-4: #0a3449; --bg-hover: #0c3d55; --bg-active: #0f4862; --line: #0f4460;
  --text: #e6fbff; --text-2: #aadcea; --muted: #5f98aa; --gold: #3ff0d0; --gold-d: #1fd1b2; --gold-soft: rgba(63, 240, 208, .14); --blue: #4db8ff;
  --glass-1: rgba(3, 24, 34, .35); --glass-2: rgba(5, 32, 45, .66); --glass-3: rgba(3, 22, 32, .42); --glass-compose: rgba(7, 42, 58, .8); --glass-modal: rgba(5, 32, 45, .95);
}
.theme-sw i.th-cat { background: radial-gradient(circle at 30% 35%, #ff9eb5 0 3px, transparent 4px), radial-gradient(circle at 68% 62%, #ff9eb5 0 3px, transparent 4px), linear-gradient(#2b1c22, #170f13); }
.theme-sw i.th-winter { background: radial-gradient(circle at 25% 30%, #fff 0 1.5px, transparent 2px), radial-gradient(circle at 70% 55%, #fff 0 1.5px, transparent 2px), radial-gradient(circle at 45% 80%, #fff 0 1px, transparent 1.5px), linear-gradient(#0b1830, #101d33); }
.theme-sw i.th-halloween { background: radial-gradient(circle at 75% 30%, #ffd9a0 0 5px, rgba(255, 170, 80, .3) 6px, transparent 12px), linear-gradient(#150a1f, #0b0610); }
.theme-sw i.th-nebula { background: radial-gradient(circle at 30% 40%, rgba(255, 60, 200, .8), transparent 55%), radial-gradient(circle at 70% 60%, rgba(70, 220, 255, .7), transparent 55%), #07040f; }
.theme-sw i.th-deepsea { background: radial-gradient(circle at 30% 70%, transparent 2px, rgba(190, 240, 255, .8) 2.5px, transparent 3.5px), radial-gradient(circle at 65% 40%, transparent 1.5px, rgba(190, 240, 255, .8) 2px, transparent 3px), linear-gradient(#063349, #010a12); }
.theme-sw .th-price { position: absolute; top: 4px; right: 6px; font: 800 9px var(--font); background: var(--gold); color: #111; padding: 1px 5px; border-radius: 4px; }

/* ---------- cosmetics: avatar frames ---------- */
@property --cf-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.av.cf::before { content: ''; position: absolute; inset: -3px; border-radius: calc(var(--sq, 50%) + 2px); padding: 3px; z-index: 1; pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.av.cf .dot { z-index: 3; }
.av.frame_gold::before { background: conic-gradient(from var(--cf-a), #f5c518, #fff3b0, #b88a00, #f5c518); animation: cf-spin 3s linear infinite; }
.av.frame_rainbow::before { background: conic-gradient(from var(--cf-a), #ff4d4d, #ffb84d, #f5ff4d, #4dff88, #4dd2ff, #9b4dff, #ff4dd2, #ff4d4d); animation: cf-spin 2.4s linear infinite; }
.av.frame_neon::before { background: #22e3ff; box-shadow: 0 0 10px #22e3ff; animation: cf-breathe 2s ease-in-out infinite; }
.av.frame_fire::before { background: conic-gradient(from var(--cf-a), #ff3d00, #ffb300, #ff6d00, #ffd54f, #ff3d00); animation: cf-spin 1.6s linear infinite, cf-flicker .35s steps(2) infinite; filter: drop-shadow(0 0 4px #ff6d00); }
.av.frame_ice::before { background: linear-gradient(135deg, #e0f7ff, #7fd4ff 40%, #ffffff 55%, #4fb3ff); filter: drop-shadow(0 0 3px #9fe0ff); }
.av.frame_pixel::before { background: repeating-conic-gradient(#5bb03a 0 12.5%, #8a5a32 0 25%); border-radius: 4px; }
@keyframes cf-spin { to { --cf-a: 360deg; } }
@keyframes cf-breathe { 50% { opacity: .55; box-shadow: 0 0 2px #22e3ff; } }
@keyframes cf-flicker { 50% { opacity: .85; } }

/* ---------- cosmetics: avatar decorations ---------- */
.av-deco { position: absolute; inset: -22%; z-index: 2; pointer-events: none; background: center / contain no-repeat; }
.av-deco.deco_halo { filter: drop-shadow(0 0 4px #ffe04d); animation: deco-bob 3s ease-in-out infinite; }
.av-deco.deco_bubbles { animation: deco-float 4s ease-in-out infinite; }
.m-reply .av-deco, .vuser .av-deco, .ac-item .av-deco, .dtile-btn .av-deco, .m-reply .av.cf::before, .vuser .av.cf::before { display: none; }
@keyframes deco-bob { 50% { transform: translateY(-4%); } }
@keyframes deco-float { 50% { transform: translateY(-6%); opacity: .8; } }

/* ---------- cosmetics: name effects ---------- */
.ne { background-size: 200% auto; }
.ne.name_gold, .ne.name_rainbow, .ne.name_fire, .ne.name_ice, .ne.name_galaxy, .ne.srv_name_gold { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: ne-slide 3s linear infinite; }
.ne.name_gold, .ne.srv_name_gold { background-image: linear-gradient(90deg, #d4a200, #fff3b0 25%, #f5c518 50%, #fff3b0 75%, #d4a200); }
.ne.name_rainbow { background-image: linear-gradient(90deg, #ff4d4d, #ffb84d, #f5ff4d, #4dff88, #4dd2ff, #9b4dff, #ff4d4d); animation-duration: 2.2s; }
.ne.name_fire { background-image: linear-gradient(90deg, #ff3d00, #ffb300, #ff6d00, #ffd54f, #ff3d00); filter: drop-shadow(0 0 3px rgba(255, 109, 0, .6)); animation-duration: 1.4s; }
.ne.name_ice { background-image: linear-gradient(90deg, #7fd4ff, #ffffff, #4fb3ff, #e0f7ff, #7fd4ff); }
.ne.name_galaxy { background-image: linear-gradient(90deg, #7b2ff7, #f107a3, #4de8ff, #7b2ff7); animation-duration: 4s; }
.ne.name_neon { color: #7df9ff !important; text-shadow: 0 0 6px #22e3ff, 0 0 14px #22e3ff; animation: ne-neon 2.4s ease-in-out infinite; }
.ne.name_glitch { position: relative; animation: ne-glitch 3.5s steps(1) infinite; }
@keyframes ne-slide { to { background-position: 200% center; } }
@keyframes ne-neon { 50% { text-shadow: 0 0 2px #22e3ff, 0 0 5px #22e3ff; } }
@keyframes ne-glitch { 0%, 88%, 100% { text-shadow: none; transform: none; } 90% { text-shadow: -2px 0 #ff2e63, 2px 0 #08d9d6; transform: translateX(1px); } 93% { text-shadow: 2px 0 #ff2e63, -2px 0 #08d9d6; transform: translateX(-1px); } 96% { text-shadow: -1px 0 #ff2e63, 1px 0 #08d9d6; } }
.reduce-motion .ne, .reduce-motion .av.cf::before, .reduce-motion .av-deco, .reduce-motion .pbg, .reduce-motion .sparkles, .reduce-motion .dtile.sf::before { animation: none !important; }

/* ---------- cosmetics: animated profile backgrounds ---------- */
.pbg { position: absolute; inset: 0; z-index: 0 !important; pointer-events: none; overflow: hidden; }
.pc-hero > .pbg { position: absolute; }
.fp-banner { position: relative; overflow: hidden; }
.pbg.pbg_stars { background-image: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 60% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 80% 20%, #fff, transparent), radial-gradient(1px 1px at 40% 80%, #cfe0ff, transparent), radial-gradient(2px 2px at 90% 60%, #fff, transparent); background-size: 120px 90px; animation: pbg-twinkle 3s ease-in-out infinite, pbg-drift 40s linear infinite; }
.pbg.pbg_snow { background-image: radial-gradient(2px 2px at 10% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 50% 50%, #fff, transparent), radial-gradient(2.5px 2.5px at 80% 10%, #fff, transparent), radial-gradient(1.5px 1.5px at 30% 80%, #fff, transparent); background-size: 90px 90px; animation: pbg-fall 6s linear infinite; }
.pbg.pbg_bubbles { background-image: radial-gradient(circle at 20% 80%, transparent 3px, rgba(200, 245, 255, .7) 4px, transparent 5px), radial-gradient(circle at 70% 40%, transparent 2px, rgba(200, 245, 255, .6) 3px, transparent 4px), radial-gradient(circle at 45% 60%, transparent 4px, rgba(200, 245, 255, .5) 5px, transparent 6px); background-size: 100px 100px; animation: pbg-rise 7s linear infinite; }
.pbg.pbg_aurora { background: linear-gradient(120deg, rgba(0, 255, 170, .35), rgba(0, 140, 255, .3), rgba(180, 0, 255, .3), rgba(0, 255, 170, .35)); background-size: 300% 300%; filter: blur(6px); animation: pbg-aurora 8s ease-in-out infinite; }
.pbg.pbg_embers { background-image: radial-gradient(2px 2px at 15% 90%, #ffb300, transparent), radial-gradient(1.5px 1.5px at 55% 70%, #ff6d00, transparent), radial-gradient(2px 2px at 85% 95%, #ffd54f, transparent), radial-gradient(1.5px 1.5px at 35% 60%, #ff3d00, transparent); background-size: 110px 110px; animation: pbg-rise 4s linear infinite; }
.pbg.pbg_matrix { background-image: repeating-linear-gradient(90deg, transparent 0 10px, rgba(0, 255, 90, .25) 10px 11px, transparent 11px 22px), linear-gradient(180deg, transparent, rgba(0, 255, 90, .18), transparent); background-size: 22px 100%, 100% 60px; animation: pbg-code 2.5s linear infinite; }
@keyframes pbg-twinkle { 50% { opacity: .55; } }
@keyframes pbg-drift { to { background-position: 120px 45px; } }
@keyframes pbg-fall { to { background-position: 10px 90px, -10px 90px, 5px 90px, 0 90px; } }
@keyframes pbg-rise { to { background-position: 0 -100px, 0 -100px, 0 -100px, 0 -110px; } }
@keyframes pbg-aurora { 50% { background-position: 100% 50%; } }
@keyframes pbg-code { to { background-position: 0 0, 0 60px; } }

/* ---------- cosmetics: server ---------- */
.dtile.sf { position: relative; }
.dtile.sf::before { content: ''; position: absolute; width: 50px; height: 50px; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 16px; padding: 3px; pointer-events: none; z-index: 0;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: cf-spin 3s linear infinite; }
.dtile.sf .dtile-btn { position: relative; z-index: 1; }
.dtile.srv_frame_gold::before { background: conic-gradient(from var(--cf-a), #f5c518, #fff3b0, #b88a00, #f5c518); }
.dtile.srv_frame_aurora::before { background: conic-gradient(from var(--cf-a), #00ffaa, #008cff, #b400ff, #ff4dd2, #00ffaa); animation-duration: 4s; }
.sc-cover { position: relative; }
.sc-cover .sparkles { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(2px 2px at 20% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 60%, #fff8c4, transparent), radial-gradient(2px 2px at 45% 80%, #fff, transparent), radial-gradient(1px 1px at 85% 25%, #fff, transparent); background-size: 80px 60px; animation: pbg-twinkle 1.8s ease-in-out infinite, pbg-drift 20s linear infinite; }

/* ---------- Pulse Store ---------- */
.coin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; margin-right: 4px; flex: none;
  background: radial-gradient(circle at 35% 30%, #fff6c2 0 18%, #f5c518 45%, #b88a00 100%); box-shadow: inset 0 0 0 1.5px #9c7600; }
.shop { max-width: 1060px; margin: 0 auto; }
.shop-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 26px 24px; border-radius: 20px; overflow: hidden;
  background: linear-gradient(120deg, rgba(245, 197, 24, .12), rgba(168, 85, 247, .12)); border: 1px solid var(--line); }
.shop-hero h1 { font: 800 34px var(--font-display); margin: 0 0 4px; } .shop-hero h1 span { color: var(--gold); }
.shop-hero p { margin: 0; color: var(--text-2); max-width: 520px; }
.wallet { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); position: relative; }
.wallet .coin { width: 22px; height: 22px; } .wallet b { font: 800 22px var(--font-display); } .wallet span { color: var(--muted); font-size: 12.5px; }
.shop-tabs { display: flex; gap: 6px; margin: 16px 0; overflow-x: auto; scrollbar-width: none; }
.shop-tab { position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2); font-weight: 600; white-space: nowrap; }
.shop-tab.on { background: var(--gold); color: #111; border-color: var(--gold); }
.tab-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red, #f87171); position: absolute; top: 4px; right: 6px; }
.shop-h { margin: 18px 0 10px; font-size: 15px; }
.shop-banner { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; background: var(--gold-soft); border: 1px solid var(--gold); margin-bottom: 14px; cursor: pointer; }
.shop-banner span { margin-left: auto; color: var(--gold); font-weight: 700; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.item-card { display: flex; flex-direction: column; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; transition: transform .15s, border-color .15s; }
.item-card:hover { transform: translateY(-3px); border-color: var(--bg-active); }
.item-card.r-rare { --rc: #60a5fa; } .item-card.r-epic { --rc: #c084fc; } .item-card.r-legendary { --rc: #f5c518; } .item-card.r-common { --rc: #9ca3af; }
.ip { height: 120px; display: grid; place-items: center; position: relative; overflow: hidden; background: radial-gradient(circle at 50% 120%, color-mix(in srgb, var(--rc) 30%, transparent), transparent 70%), var(--bg-3); }
.ip-theme i { position: absolute; inset: 0; }
.ip-name b { font: 800 22px var(--font-display); }
.ip-ptheme { display: flex; gap: 10px; align-items: center; justify-content: center; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.ip-pbg { background: linear-gradient(120deg, #1f2433, #2d2140); } .ip-pbg .av { position: relative; z-index: 1; }
.ip-server .dtile { display: grid; place-items: center; width: 60px; height: 60px; }
.ip-server .dtile-btn { font-weight: 800; }
.ip-server .sc-cover { position: absolute; inset: 0; background: linear-gradient(120deg, #5b3fd6, #1f2433); }
.ip-server b { font: 800 22px var(--font-display); }
.ic-body { padding: 10px 12px 4px; flex: 1; }
.ic-top { display: flex; align-items: center; gap: 8px; } .ic-top b { font-size: 14.5px; }
.rarity { margin-left: auto; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--rc); }
.ic-body p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.owned { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--green); }
.ic-act { padding: 8px 12px 12px; } .ic-act .btn { width: 100%; justify-content: center; }
.quest-block { margin: 14px 0 20px; }
.qb-head { display: flex; align-items: baseline; justify-content: space-between; } .qb-head h3 { margin: 0 0 8px; } .qb-head span { color: var(--muted); font-size: 12.5px; }
.quest { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 8px; }
.quest.done:not(.claimed) { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold-soft); }
.quest.claimed { opacity: .6; }
.q-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--bg-3); color: var(--gold); flex: none; }
.q-main { flex: 1; min-width: 0; } .q-main b { display: block; } .q-main > span { color: var(--muted); font-size: 12.5px; }
.q-bar { height: 6px; border-radius: 9px; background: var(--bg-4); margin: 6px 0 2px; overflow: hidden; } .q-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--orange, #fb923c)); border-radius: 9px; }
.q-main small { color: var(--muted); font-size: 11px; }
.q-reward, .q-claimed { font-weight: 700; color: var(--text-2); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.cos-top { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.cos-top > div { flex: 1; display: grid; gap: 4px; }
.pick-list { display: grid; gap: 6px; } .pick-list .mem-row { width: 100%; text-align: left; }
@media (max-width: 700px) { .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .shop-hero h1 { font-size: 26px; } .ip { height: 96px; } }
