/* Portal - match Ted | Social app theme (black + Chirp + social blue). All portal features unchanged. */

:root {
    color-scheme: dark;
    --bg: #000000;
    --bg-elevated: #000000;
    --text: #e7e9ea;
    --text-muted: #71767b;
    --social-border: #2f3336;
    --social-hover: rgba(231, 233, 234, 0.04);
    --social-blue: #1d9bf0;
    --social-blue-hover: #1a8cd8;
    --app-font: 'Chirp', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --portal-accent: var(--social-blue);
    --portal-accent-hover: var(--social-blue-hover);
    --portal-line: var(--social-border);
    --portal-panel: #000000;
    --portal-muted: var(--text-muted);
}

html,
body {
    background: var(--bg) !important;
    color: var(--text) !important;
    font-family: var(--app-font) !important;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.theme-xp {
    --xp-bg0: #000000;
    --xp-bg1: #000000;
    --xp-bg2: #000000;
    --xp-accent: var(--social-blue);
    --xp-line: var(--social-border);
    --xp-text: var(--text);
    --xp-dim: var(--text-muted);
    color: var(--text);
    background: var(--bg) !important;
    background-image: none !important;
}

body.theme-xp .tab-bar .tab-btn {
    background: var(--bg) !important;
    border: 1px solid var(--social-border) !important;
    box-shadow: none !important;
    color: var(--text) !important;
    font-family: var(--app-font) !important;
}

body.theme-xp .tab-bar .tab-btn.active {
    background: var(--social-blue) !important;
    border-color: var(--social-blue) !important;
    color: #fff !important;
    box-shadow: none !important;
}

body.theme-xp .card,
body.theme-xp .tabs-shell,
body.theme-xp #tools-card {
    background: var(--bg) !important;
    border: 1px solid var(--social-border) !important;
    box-shadow: none !important;
}

body.theme-xp .card:hover {
    background: var(--social-hover) !important;
    transform: none;
    box-shadow: none !important;
}

body.theme-xp .card h3 {
    color: var(--text) !important;
    text-shadow: none !important;
    font-family: var(--app-font) !important;
    font-weight: 800 !important;
}

.brand-glow,
.publicDashBrandText,
.portalBrand,
.portalHeroTitle,
.welcomeKicker,
.moduleTitle,
.publicCasinoBannerTitle,
.publicWalletLabel {
    font-family: var(--app-font) !important;
    color: var(--text) !important;
    text-shadow: none !important;
    letter-spacing: -0.02em !important;
}

.brand-glow {
    color: var(--text) !important;
    font-weight: 800 !important;
}

.header-grid,
.tab-bar,
.tabs-shell,
.panel,
.publicDashHeader,
.publicTabBar {
    font-family: var(--app-font) !important;
}

.tab-bar .tab-btn,
.publicTabBtn,
.storage-tabs .storage-btn,
.kit-tab,
.server-tab {
    font-family: var(--app-font) !important;
    border-color: var(--social-border) !important;
}

.tab-bar .tab-btn.active,
.publicTabBtn.active {
    background: var(--social-blue) !important;
    border-color: var(--social-blue) !important;
    color: #fff !important;
}

.btn,
.btn-primary,
.publicDashLogin,
.publicWalletReset,
.publicCasinoAction,
button[type="submit"],
.shop-buy,
.kit-claim-btn {
    font-family: var(--app-font) !important;
    background: var(--social-blue) !important;
    border: 1px solid var(--social-blue) !important;
    color: #fff !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

.btn:hover,
.btn-primary:hover,
.publicDashLogin:hover,
.publicWalletReset:hover,
.publicCasinoAction:hover {
    background: var(--social-blue-hover) !important;
    border-color: var(--social-blue-hover) !important;
}

.panel,
.publicEmptyCard,
.publicCasinoBanner,
.publicWalletBar,
.portalCard,
.portalHeroCard {
    background: var(--bg) !important;
    border: 1px solid var(--social-border) !important;
    box-shadow: none !important;
}

.publicEmptyCard h3,
.publicEmptyCard p,
.publicCasinoBannerSub,
.publicWalletHint,
.portalHeroLead,
.portalHeroCopy {
    font-family: var(--app-font) !important;
    color: var(--text-muted) !important;
}

.publicEmptyCard h3,
.portalHeroTitle {
    color: var(--text) !important;
}

.publicWalletPill {
    background: var(--bg) !important;
    border: 1px solid var(--social-border) !important;
    color: var(--text) !important;
    font-family: var(--app-font) !important;
}

body.portal-themed:not(.social-portal-embed) #casino-items .shop-title,
body.portal-themed:not(.social-portal-embed) #casino-items .qty {
    font-family: var(--app-font) !important;
}

body.portal-themed:not(.social-portal-embed) #casino-items .qty {
    color: var(--text-muted) !important;
}

body.portal-themed:not(.social-portal-embed) #casino-items .shop-title {
    color: var(--text) !important;
}

/* Shop */
.shop-card,
.shop-item,
.shop-grid .card,
.category-pill {
    background: var(--bg) !important;
    border-color: var(--social-border) !important;
    font-family: var(--app-font) !important;
}

.shop-title,
.shop-price,
.shop-cat-title {
    font-family: var(--app-font) !important;
    color: var(--text) !important;
}

.shop-buy,
.category-pill.active {
    background: var(--social-blue) !important;
    border-color: var(--social-blue) !important;
}

/* Storage */
.storage-tabs .storage-btn.active,
.storage-btn.active {
    background: var(--social-blue) !important;
    border-color: var(--social-blue) !important;
}

.storage-item,
.locker-card,
.garage-card {
    border-color: var(--social-border) !important;
    background: var(--bg) !important;
}

/* Modals */
.modalOverlay,
.modal-overlay,
.modal-card,
.modal-content {
    background: rgba(0, 0, 0, 0.85) !important;
}

.modal-card,
.modal-content,
.modal-body {
    background: var(--bg) !important;
    border: 1px solid var(--social-border) !important;
    color: var(--text) !important;
    font-family: var(--app-font) !important;
}

/* Logged-out landing inline theme remap */
body::before {
    display: none !important;
}

/* Portal landing :root overrides when inline vars present */
body.portal-themed {
    --bg: #000000;
    --line: #2f3336;
    --panel0: #000000;
    --panel1: #000000;
    --txt: #e7e9ea;
    --muted: #71767b;
    --blue: #1d9bf0;
    --blue2: #1a8cd8;
    --glow: #1d9bf0;
    --panel: #000000;
    --panel-strong: #000000;
    --text-dim: #71767b;
}

body.portal-themed .tab-bar .tab-btn {
    background: #000000 !important;
    color: #e7e9ea !important;
    border: 1px solid #2f3336 !important;
    box-shadow: none !important;
}

body.portal-themed .tab-bar .tab-btn.active {
    background: #1d9bf0 !important;
    color: #ffffff !important;
    border-color: #1d9bf0 !important;
    box-shadow: none !important;
}

body.portal-themed .btn,
body.portal-themed .action-btn,
body.portal-themed #tab-security button,
body.portal-themed .security-grid .stat-list button {
    background: #1d9bf0 !important;
    color: #ffffff !important;
    border: 1px solid #1d9bf0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body.portal-themed .btn:hover,
body.portal-themed .action-btn:hover,
body.portal-themed #tab-security button:hover {
    background: #1a8cd8 !important;
    border-color: #1a8cd8 !important;
    transform: none !important;
}

body.portal-themed .user-info img {
    box-shadow: none !important;
    border: 1px solid #2f3336;
}

body.portal-themed .coords,
body.portal-themed .cooldown-time,
body.portal-themed #security-zorp .zorp-section-header.full .zorp-state {
    color: #1d9bf0 !important;
    text-shadow: none !important;
}

body.portal-themed .cooldown-time {
    background: rgba(29, 155, 240, 0.12) !important;
    border-color: rgba(29, 155, 240, 0.35) !important;
}

body.portal-themed .badge-kit {
    background: #1d9bf0 !important;
    color: #fff !important;
}

body.portal-themed .publicDashHeader,
body.portal-themed .publicDashShell,
body.portal-themed .publicDashPanel {
    background: #000000 !important;
    border-color: #2f3336 !important;
}

body.portal-themed .publicTabBtn {
    background: #000000 !important;
    color: #e7e9ea !important;
    border-color: #2f3336 !important;
}

body.portal-themed .publicTabBtn.active {
    background: #1d9bf0 !important;
    color: #fff !important;
    border-color: #1d9bf0 !important;
}

body.portal-themed .header-grid {
    border-bottom: 1px solid #2f3336;
    background: #000000;
}

/* -- Portal embed main scene: flat black, no cyan glow -- */
body.social-portal-embed,
body.social-portal-embed .tab-content,
body.social-portal-embed .card,
body.social-portal-embed .sections,
body.social-portal-embed .tabs-shell {
    background: #000000 !important;
    background-image: none !important;
    color: #e7e9ea !important;
    font-family: var(--app-font) !important;
}

body.social-portal-embed *,
body.portal-themed * {
    text-shadow: none !important;
}

body.social-portal-embed .card,
body.social-portal-embed .tabs-shell,
body.social-portal-embed #tools-card,
body.social-portal-embed #profile-stats .profile-wallet-card,
body.social-portal-embed #profile-stats .profile-stats-card,
body.social-portal-embed #profile-storage .card,
body.social-portal-embed #profile-security .card,
body.social-portal-embed #server-info-card,
body.social-portal-embed #server-kits-card,
body.social-portal-embed #playtime-home-card,
body.social-portal-embed .chlg-card,
body.social-portal-embed .lb-card,
body.social-portal-embed #tab-shop .shop-item,
body.social-portal-embed .shop-item:not(.casino-card),
body.social-portal-embed .ebind-card {
    background: #000000 !important;
    border: 1px solid #2f3336 !important;
    box-shadow: none !important;
}

body.social-portal-embed .tab-bar .tab-btn,
body.social-portal-embed .profile-btn,
body.social-portal-embed .storage-btn,
body.social-portal-embed .kit-tab,
body.social-portal-embed .server-tab,
body.social-portal-embed .publicTabBtn {
    background: #000000 !important;
    border: 1px solid #2f3336 !important;
    color: #e7e9ea !important;
    font-family: var(--app-font) !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

body.social-portal-embed .tab-bar .tab-btn.active,
body.social-portal-embed .profile-btn.active,
body.social-portal-embed .storage-btn.active,
body.social-portal-embed .kit-tab.active,
body.social-portal-embed .server-tab.active {
    background: #1d9bf0 !important;
    border-color: #1d9bf0 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body.social-portal-embed .btn,
body.social-portal-embed button.btn,
body.social-portal-embed .save-btn,
body.social-portal-embed .pc-btn,
body.social-portal-embed .kit-claim-btn,
body.social-portal-embed #tab-shop .shop-item button {
    background: #1d9bf0 !important;
    border: 1px solid #1d9bf0 !important;
    color: #ffffff !important;
    font-family: var(--app-font) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    letter-spacing: 0 !important;
}

body.social-portal-embed .btn:hover,
body.social-portal-embed button.btn:hover {
    background: #1a8cd8 !important;
    border-color: #1a8cd8 !important;
    transform: none !important;
}

body.social-portal-embed h1,
body.social-portal-embed h2,
body.social-portal-embed h3,
body.social-portal-embed h4,
body.social-portal-embed .si-title,
body.social-portal-embed .chlg-title,
body.social-portal-embed .lb-title,
body.social-portal-embed .ptr-title,
body.social-portal-embed .ptr-kicker,
body.social-portal-embed .shop-title,
body.social-portal-embed .pc-name,
body.social-portal-embed .brand-glow {
    font-family: var(--app-font) !important;
    color: #e7e9ea !important;
    text-shadow: none !important;
    letter-spacing: -0.02em !important;
}

body.social-portal-embed p,
body.social-portal-embed .ptr-sub,
body.social-portal-embed .chlg-sub,
body.social-portal-embed .qty,
body.social-portal-embed .price,
body.social-portal-embed .si-muted,
body.social-portal-embed .ebind-copy,
body.social-portal-embed label,
body.social-portal-embed .stat-list li {
    font-family: var(--app-font) !important;
    color: #71767b !important;
}

body.social-portal-embed .brand-glow.brand-hero,
body.social-portal-embed .brand-glow.brand-mini,
body.social-portal-embed #server-info-card .si-title,
body.social-portal-embed #server-kits-card .si-title,
body.social-portal-embed .lb-me .me-name,
body.social-portal-embed .slot-banner .chip,
body.social-portal-embed .slot-banner .slot-id-code {
    color: #e7e9ea !important;
    background: #000000 !important;
    border-color: #2f3336 !important;
    box-shadow: none !important;
}

body.social-portal-embed .chlg-fill {
    background: #1d9bf0 !important;
}

body.social-portal-embed .chlg-locked::after,
body.social-portal-embed .ebind-timer,
body.social-portal-embed .kit-row-status {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid #2f3336 !important;
    color: #e7e9ea !important;
    font-family: var(--app-font) !important;
    box-shadow: none !important;
}

body.social-portal-embed #server-kits-card::before {
    display: none !important;
}

body.social-portal-embed #server-kits-card .sk-head h3 {
    font-family: var(--app-font) !important;
    color: #e7e9ea !important;
}

body.social-portal-embed #server-kits-card .sk-head h3::after {
    background: linear-gradient(90deg, transparent, #2f3336, transparent) !important;
}

body.social-portal-embed .sk-sub,
body.social-portal-embed .sk-empty,
body.social-portal-embed .kit-list-loading,
body.social-portal-embed .kit-row-meta {
    color: #71767b !important;
    font-family: var(--app-font) !important;
}

body.social-portal-embed .kit-row-popularity {
    display: inline-flex !important;
    align-items: center;
    align-self: flex-start;
    max-width: 100%;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    color: #1d9bf0 !important;
    border: 1px solid rgba(29, 155, 240, 0.35) !important;
    background: rgba(29, 155, 240, 0.1) !important;
    font-family: var(--app-font) !important;
}

body.social-portal-embed .kit-row {
    background: #000000 !important;
    border-color: #2f3336 !important;
    box-shadow: none !important;
    transform: none !important;
}

body.social-portal-embed .kit-row:hover {
    border-color: #536471 !important;
}

body.social-portal-embed .kit-row-media {
    background: #000000 !important;
    border-color: #2f3336 !important;
    box-shadow: none !important;
}

body.social-portal-embed .kit-row-name {
    font-family: var(--app-font) !important;
    color: #e7e9ea !important;
}

body.social-portal-embed .kit-row-status.ready {
    background: rgba(0, 186, 124, 0.12) !important;
    border-color: rgba(0, 186, 124, 0.35) !important;
    color: #00ba7c !important;
}

body.social-portal-embed .kit-row-status.cooldown {
    background: rgba(255, 173, 31, 0.1) !important;
    border-color: rgba(255, 173, 31, 0.35) !important;
    color: #ffad1f !important;
}

body.social-portal-embed .kit-row-status.locked {
    background: rgba(244, 33, 46, 0.1) !important;
    border-color: rgba(244, 33, 46, 0.35) !important;
    color: #f4212e !important;
}

.kit-unlock-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(16px);
    z-index: 12080;
    max-width: min(420px, 100%);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 186, 124, 0.35);
    background: rgba(0, 0, 0, 0.92);
    color: #00ba7c;
    font-family: var(--app-font, system-ui, sans-serif);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.kit-unlock-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

body.social-portal-embed #profile-stats .card h3::after,
body.social-portal-embed #profile-storage .card h3::after,
body.social-portal-embed #profile-security .card h3::after {
    background: linear-gradient(90deg, transparent, #2f3336, transparent) !important;
}

body.social-portal-embed #profile-stats .profile-stats-top,
body.social-portal-embed .pc-level-badge,
body.social-portal-embed .daily-result-card,
body.social-portal-embed #si-panel,
body.social-portal-embed .modal-content,
body.social-portal-embed .modal-card {
    background: #000000 !important;
    border: 1px solid #2f3336 !important;
    box-shadow: none !important;
}

body.social-portal-embed #si-modal {
    background: rgba(0, 0, 0, 0.88) !important;
    backdrop-filter: blur(8px);
}

body.social-portal-embed #si-head,
body.social-portal-embed .si-field .si-inp,
body.social-portal-embed .si-pill,
body.social-portal-embed input,
body.social-portal-embed select,
body.social-portal-embed textarea {
    background: #000000 !important;
    border: 1px solid #2f3336 !important;
    color: #e7e9ea !important;
    font-family: var(--app-font) !important;
    box-shadow: none !important;
}

body.social-portal-embed .coords,
body.social-portal-embed .cooldown-time,
body.social-portal-embed .chlg-badge,
body.social-portal-embed .lb-row .r-rank,
body.social-portal-embed .pslb-value {
    color: #1d9bf0 !important;
    font-family: var(--app-font) !important;
}

body.social-portal-embed .cooldown-time {
    background: rgba(29, 155, 240, 0.1) !important;
    border: 1px solid rgba(29, 155, 240, 0.28) !important;
}

body.social-portal-embed #casino-items .shop-image-wrap,
body.social-portal-embed .shop-image-wrap {
    border: 1px solid #2f3336 !important;
    background: #000000 !important;
}

body.social-portal-embed .casino-admin-toggle-btn.is-on {
    background: #1d9bf0 !important;
    border-color: #1d9bf0 !important;
}

body.social-portal-embed .user-name,
body.social-portal-embed .header-profile .user-name {
    font-family: var(--app-font) !important;
    color: #e7e9ea !important;
}

body.social-portal-embed .profile-avatar {
    border: 1px solid #2f3336 !important;
    box-shadow: none !important;
}

/* Portal shell - Social back link */
.portal-social-back {
    margin-top: 4px;
}

.portal-social-back .sidebar-item-label,
.portal-social-back .icon svg {
    color: #e7e9ea;
}

body.social-portal-page .portal-social-back:hover {
    background: var(--social-hover);
}

/* Slots in app / portal player */
body.slots-embed {
    background: #000000 !important;
    font-family: var(--app-font) !important;
}

body.slots-embed .hud,
body.slots-embed .bottom-controls,
body.slots-embed .paylog,
body.slots-embed .spin-btn,
body.slots-embed .btn {
    font-family: var(--app-font) !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body.slots-embed .spin-btn {
    background: #1d9bf0 !important;
    border: 1px solid #1d9bf0 !important;
    color: #fff !important;
}

body.slots-embed .stat {
    color: #e7e9ea !important;
}

body.slots-embed .message {
    color: #71767b !important;
}

/* Portal iframe scene - profile + casino layout */
body.social-portal-embed #tab-profile {
    padding: 12px 14px 28px;
    overflow: visible;
}

body.social-portal-embed #tab-profile .profile-shell {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible;
}

body.social-portal-embed #tab-profile .profile-tabs {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex !important;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 0 14px;
    padding: 0 0 10px;
    background: #000000 !important;
    border: none !important;
    border-bottom: 1px solid #2f3336 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    pointer-events: auto;
    isolation: isolate;
}

body.social-portal-embed #tab-profile .profile-sections {
    position: relative;
    z-index: 1;
    isolation: isolate;
}

body.social-portal-embed #tab-profile .profile-section {
    position: relative;
    z-index: 1;
    margin: 0;
}

body.social-portal-embed #tab-profile .profile-btn,
body.social-portal-embed #tab-profile .storage-btn {
    pointer-events: auto;
    touch-action: manipulation;
    position: relative;
    z-index: 1;
}

body.social-portal-embed #profile-storage .storage-card {
    padding: 0;
    margin: 0;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.social-portal-embed #profile-storage .storage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

body.social-portal-embed #profile-storage .storage-title {
    margin: 0;
    font-family: var(--app-font) !important;
    font-size: 1.05rem;
    font-weight: 800;
    color: #e7e9ea !important;
}

body.social-portal-embed #profile-storage .storage-actions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.social-portal-embed #profile-storage .storage-tabs {
    margin: 0 0 12px;
}

body.social-portal-embed #profile-storage .storage-notice,
body.social-portal-embed #profile-storage #storage-notice {
    margin: 0 0 14px !important;
    border-color: #2f3336 !important;
    background: #000000 !important;
    color: #71767b !important;
    font-family: var(--app-font) !important;
    box-shadow: none !important;
}

body.social-portal-embed #profile-storage .storage-section {
    padding-top: 0;
}

body.social-portal-embed #profile-storage .stat-item .name {
    font-family: var(--app-font) !important;
}

@media (max-width: 820px) {
    body.social-portal-embed #tab-profile .profile-tabs {
        top: 0 !important;
        display: flex !important;
        grid-template-columns: none !important;
        margin: 0 0 12px !important;
        padding: 0 0 10px !important;
        border-radius: 0 !important;
        background: #000000 !important;
        border: none !important;
        border-bottom: 1px solid #2f3336 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    body.social-portal-embed #tab-profile .profile-btn {
        min-height: 44px;
        flex: 1 1 0;
        font-size: 14px;
    }
}

@media (max-width: 560px) {
    body.social-portal-embed #profile-storage .storage-header {
        flex-direction: column;
        align-items: stretch;
    }

    body.social-portal-embed #profile-storage .storage-actions-bar {
        justify-content: flex-end;
    }

    body.social-portal-embed #profile-storage .storage-tabs {
        gap: 6px;
    }

    body.social-portal-embed #profile-storage .storage-btn {
        min-height: 44px;
        font-size: 13px;
        padding: 10px 8px;
    }
}

body.social-portal-embed #profile-stats .profile-wallet-card {
    margin-bottom: 14px;
}

body.social-portal-embed #wallet-container .wallet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

body.social-portal-embed #wallet-container .wallet-item {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
}

body.social-portal-embed #wallet-container .wallet-item > span:first-child {
    font-size: 13px;
    line-height: 1.25;
    flex-wrap: wrap;
    max-width: 100%;
}

body.social-portal-embed #wallet-container .wallet-item img.emoji {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

body.social-portal-embed #wallet-container .wallet-item .value {
    font-size: 1.15rem;
    line-height: 1.2;
    width: 100%;
    text-align: left;
    word-break: break-word;
}

@media (max-width: 720px) {
    body.social-portal-embed #wallet-container .wallet-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    body.social-portal-embed #wallet-container .wallet-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    body.social-portal-embed #wallet-container .wallet-item .value {
        width: auto;
        text-align: right;
        flex-shrink: 0;
        font-size: 1.05rem;
    }
}

body.social-portal-embed #profile-stats .profile-stats-top {
    position: relative;
    top: auto;
    margin-top: 0;
}

body.social-portal-embed #tab-casino {
    padding: 12px 14px 28px;
}

body.social-portal-embed #tab-casino .card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.social-portal-embed #tab-casino .casino-banner {
    position: relative;
    overflow: hidden;
    border-radius: 16px !important;
    border: 1px solid rgba(0, 198, 255, 0.42) !important;
    background:
        radial-gradient(circle at 18% 20%, rgba(0, 198, 255, 0.2), transparent 48%),
        linear-gradient(145deg, rgba(8, 18, 36, 0.98), rgba(5, 12, 24, 0.96)) !important;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4), 0 0 22px rgba(0, 198, 255, 0.18) !important;
    margin-bottom: 16px;
    padding: 18px 20px;
}

body.social-portal-embed #tab-casino .banner-title {
    margin: 0;
    text-align: center;
    font-family: 'Orbitron', sans-serif !important;
    letter-spacing: 1.4px !important;
    font-weight: 800 !important;
    font-size: clamp(1.1rem, 3vw, 1.45rem) !important;
    color: #bdefff !important;
    text-shadow: 0 0 14px rgba(0, 198, 255, 0.55) !important;
}

body.social-portal-embed #tab-casino .banner-sub {
    margin: 8px 0 0;
    text-align: center;
    font-family: 'Poppins', sans-serif !important;
    color: rgba(214, 244, 255, 0.9) !important;
    font-size: 0.92rem !important;
    line-height: 1.45 !important;
}

body.social-portal-embed #casino-items .shop-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
}

body.social-portal-embed #casino-items .shop-item.casino-card {
    position: relative;
    min-height: 300px !important;
    padding: 12px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(54, 121, 170, 0.38) !important;
    background: linear-gradient(180deg, #0a1a28 0%, #07131f 100%) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28) !important;
    width: auto !important;
    max-width: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

body.social-portal-embed #casino-items .shop-item.casino-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 198, 255, 0.55) !important;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), 0 0 18px rgba(0, 198, 255, 0.14) !important;
}

body.social-portal-embed #casino-items .shop-item .shop-image-wrap {
    position: relative;
    height: 132px !important;
    min-height: 132px !important;
    margin: 0 !important;
    padding: 12px !important;
    border-radius: 12px !important;
    background: radial-gradient(circle at 50% 18%, rgba(0, 198, 255, 0.14), transparent 58%), #0c1f2f !important;
    border: 1px solid rgba(59, 118, 163, 0.36) !important;
}

body.social-portal-embed #casino-items .shop-item .shop-image {
    max-width: 88% !important;
    max-height: 88% !important;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
}

body.social-portal-embed #casino-items .shop-item .shop-title {
    margin: 10px 0 0 !important;
    min-height: 36px !important;
    font-family: 'Orbitron', sans-serif !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    color: #f1f8ff !important;
    text-align: center;
}

body.social-portal-embed #casino-items .shop-item .qty {
    min-height: 36px !important;
    font-size: 12px !important;
    color: #a8c8dc !important;
    line-height: 1.4 !important;
    text-align: center;
    font-family: 'Poppins', sans-serif !important;
}

body.social-portal-embed #casino-items .shop-item button[data-casino-locked] {
    width: 100%;
    margin-top: 8px;
    min-height: 38px !important;
    border-radius: 10px !important;
    font-family: 'Orbitron', sans-serif !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase;
    background: linear-gradient(180deg, #1cb7ff, #0f7de0) !important;
    border: 1px solid rgba(0, 198, 255, 0.35) !important;
    color: #f7fbff !important;
    box-shadow: none !important;
}

body.social-portal-embed #casino-items .casino-card-new {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(0, 198, 255, 0.4);
    background: rgba(0, 30, 48, 0.9);
    color: #b8ecff;
    font-family: 'Orbitron', sans-serif;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

@media (min-width: 768px) and (max-width: 1099.98px) {
    body.social-portal-embed #casino-items .shop-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767.98px) {
    body.social-portal-embed #casino-items .shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    body.social-portal-embed #casino-items .shop-item.casino-card {
        min-height: 280px !important;
    }

    body.social-portal-embed #casino-items .shop-item .shop-image-wrap {
        height: 108px !important;
        min-height: 108px !important;
    }
}

body.social-portal-embed #casino-items .shop-item[data-casino-locked="1"] {
    display: flex !important;
}

body.social-portal-embed #casino-items .shop-item[hidden] {
    display: none !important;
}


/* Profile > Security - ZORP + Raid Alerts */
body.social-portal-embed #profile-security .security-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 4px;
}

body.social-portal-embed #profile-security .security-panel,
body.social-portal-embed #profile-security .sec-card,
body.social-portal-embed #profile-security .sec-kv,
body.social-portal-embed #profile-security .sec-code-block,
body.social-portal-embed #profile-security .sec-raid-step,
body.social-portal-embed #profile-security .sec-meta-chip {
    background: #000000 !important;
    border-color: #2f3336 !important;
    box-shadow: none !important;
}

body.social-portal-embed #profile-security .sec-card-title,
body.social-portal-embed #profile-security .sec-kv-value,
body.social-portal-embed #profile-security .sec-empty-title {
    font-family: var(--app-font) !important;
    color: #e7e9ea !important;
}

body.social-portal-embed #profile-security .sec-card-desc,
body.social-portal-embed #profile-security .sec-kv-label,
body.social-portal-embed #profile-security .sec-hint,
body.social-portal-embed #profile-security .sec-loading,
body.social-portal-embed #profile-security .sec-code-label,
body.social-portal-embed #profile-security .sec-raid-step,
body.social-portal-embed #profile-security .sec-meta-line {
    font-family: var(--app-font) !important;
    color: #71767b !important;
}

body.social-portal-embed #profile-security .sec-card-icon,
body.social-portal-embed #profile-security .sec-code-value:not(.is-empty) {
    background: rgba(29, 155, 240, 0.12) !important;
    border-color: rgba(29, 155, 240, 0.35) !important;
    color: #1d9bf0 !important;
}

body.social-portal-embed #profile-security .sec-kv-value.accent,
body.social-portal-embed #profile-security .sec-meta-chip svg {
    color: #1d9bf0 !important;
}

body.social-portal-embed #profile-security .sec-btn {
    background: #1d9bf0 !important;
    border-color: #1d9bf0 !important;
    color: #ffffff !important;
    font-family: var(--app-font) !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body.social-portal-embed #profile-security .sec-btn.secondary {
    background: #000000 !important;
    border-color: #2f3336 !important;
    color: #e7e9ea !important;
}

body.social-portal-embed #profile-security .sec-btn.danger {
    background: rgba(244, 33, 46, 0.12) !important;
    border-color: rgba(244, 33, 46, 0.45) !important;
    color: #f4212e !important;
}

body.social-portal-embed #profile-security .sec-badge.good {
    color: #00ba7c !important;
    border-color: rgba(0, 186, 124, 0.35) !important;
    background: rgba(0, 186, 124, 0.1) !important;
}

body.social-portal-embed #profile-security .sec-badge.warn {
    color: #ffd400 !important;
    border-color: rgba(255, 212, 0, 0.35) !important;
    background: rgba(255, 212, 0, 0.08) !important;
}

body.social-portal-embed #profile-security .sec-badge.bad {
    color: #f4212e !important;
    border-color: rgba(244, 33, 46, 0.35) !important;
    background: rgba(244, 33, 46, 0.1) !important;
}

@media (max-width: 560px) {
    body.social-portal-embed #profile-security .sec-actions .sec-btn {
        min-height: 44px;
    }
}

/* -- Support tab (DM-style ticket chat) -- */
body.social-portal-embed #tab-support {
    padding: 12px 14px 20px;
    min-height: min(82vh, 820px);
}

body.social-portal-embed .envelope-floating,
body.social-portal-embed .footer-contact {
    display: none !important;
}

body.social-portal-embed .support-tickets-host,
body.social-portal-embed .support-chat-app {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: min(72vh, 720px);
    height: 100%;
}

body.social-portal-embed .support-chat-layout {
    display: grid;
    grid-template-columns: 1fr;
    flex: 1 1 auto;
    min-height: min(68vh, 640px);
    border: 2px solid #536471;
    border-radius: 16px;
    overflow: hidden;
    background: #050505;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

body.social-portal-embed .support-chat-layout.is-admin {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
}

body.social-portal-embed .support-chat-list {
    display: none;
    flex-direction: column;
    min-height: 0;
    border-right: 1px solid #2f3336;
    background: #000;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: #2f3336 transparent;
}

body.social-portal-embed .support-chat-layout.is-admin .support-chat-list {
    display: flex;
}

body.social-portal-embed .support-chat-list .ticket-list-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px 12px 10px;
    background: rgba(0, 0, 0, 0.94);
    border-bottom: 1px solid #2f3336;
    backdrop-filter: blur(8px);
}

body.social-portal-embed .support-chat-list .ticket-list-header input {
    width: 100%;
    min-height: 40px;
    padding: 0 14px;
    background: #202327;
    border: 1px solid #2f3336;
    color: #e7e9ea;
    border-radius: 999px;
    font-family: var(--app-font) !important;
    font-size: 14px;
}

body.social-portal-embed .support-chat-list .ticket-list-header input:focus {
    outline: none;
    border-color: #1d9bf0;
    background: #000;
}

body.social-portal-embed .support-chat-list .ticket-list-header .meta {
    margin-top: 8px;
    font-size: 12px;
    color: #71767b;
    font-weight: 600;
}

body.social-portal-embed .support-chat-list .ticket-item {
    padding: 0;
    border-bottom: 1px solid #2f3336;
    color: #e7e9ea;
    cursor: pointer;
    transition: background 0.15s ease;
}

body.social-portal-embed .support-chat-list .ticket-item-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
}

body.social-portal-embed .support-chat-list .ticket-item-avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #202327;
    border: 1px solid #2f3336;
    color: #e7e9ea;
    font-size: 13px;
    font-weight: 800;
}

body.social-portal-embed .support-chat-list .ticket-item-main {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

body.social-portal-embed .support-chat-list .ticket-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

body.social-portal-embed .support-chat-list .ticket-item .subject {
    font-size: 15px;
    font-weight: 700;
    color: #e7e9ea;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.social-portal-embed .support-chat-list .ticket-item-meta {
    font-size: 12px;
    color: #71767b;
}

body.social-portal-embed .support-chat-list .ticket-item-preview {
    font-size: 13px;
    line-height: 1.35;
    color: #8b98a5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.social-portal-embed .support-chat-list .status-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    background: rgba(29, 155, 240, 0.18);
    color: #1d9bf0;
    border: 1px solid rgba(29, 155, 240, 0.35);
}

body.social-portal-embed .support-chat-list .status-pill.is-open {
    background: rgba(0, 186, 124, 0.14);
    color: #00ba7c;
    border-color: rgba(0, 186, 124, 0.35);
}

body.social-portal-embed .support-chat-list .status-pill.is-closed {
    background: rgba(113, 118, 123, 0.14);
    color: #71767b;
    border-color: rgba(113, 118, 123, 0.35);
}

body.social-portal-embed .support-chat-list .ticket-item.active,
body.social-portal-embed .support-chat-list .ticket-item:hover {
    background: rgba(231, 233, 234, 0.04);
}

body.social-portal-embed .support-chat-list .ticket-item.active {
    box-shadow: inset 3px 0 0 #1d9bf0;
}

body.social-portal-embed .support-chat-thread {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: #000;
}

body.social-portal-embed .support-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    padding: 0 16px;
    border-bottom: 1px solid #2f3336;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(8px);
}

body.social-portal-embed .support-chat-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

body.social-portal-embed .support-chat-avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 155, 240, 0.14);
    border: 1px solid rgba(29, 155, 240, 0.35);
    color: #1d9bf0;
}

body.social-portal-embed .support-chat-avatar svg {
    width: 20px;
    height: 20px;
}

body.social-portal-embed .support-chat-head .dm-thread-name {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #e7e9ea;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.social-portal-embed .support-chat-sub {
    display: block;
    color: #71767b !important;
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.social-portal-embed .support-chat-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

body.social-portal-embed .support-chat-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    background: rgba(0, 186, 124, 0.14);
    color: #00ba7c;
    border: 1px solid rgba(0, 186, 124, 0.35);
}

body.social-portal-embed .support-chat-status.is-closed {
    background: rgba(113, 118, 123, 0.14);
    color: #71767b;
    border-color: rgba(113, 118, 123, 0.35);
}

body.social-portal-embed .support-chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #2f3336 transparent;
}

body.social-portal-embed .support-chat-messages.is-compose {
    padding: 0;
    overflow-y: auto;
}

/* DM bubbles inside support */
body.social-portal-embed .support-chat-messages .dm-msg {
    display: flex;
    flex-direction: column;
    max-width: min(78%, calc(100% - 24px));
}

body.social-portal-embed .support-chat-messages .dm-msg.incoming {
    align-self: flex-start;
}

body.social-portal-embed .support-chat-messages .dm-msg.outgoing {
    align-self: flex-end;
    align-items: flex-end;
}

body.social-portal-embed .support-chat-messages .dm-msg.is-pending {
    opacity: 0.72;
}

body.social-portal-embed .support-chat-messages .dm-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 100%;
}

body.social-portal-embed .support-chat-messages .dm-msg.incoming .dm-msg-row {
    flex-direction: row;
}

body.social-portal-embed .support-chat-messages .dm-msg.outgoing .dm-msg-row {
    flex-direction: row-reverse;
}

body.social-portal-embed .support-chat-messages .dm-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    object-fit: cover;
    flex: 0 0 32px;
    border: 1px solid #2f3336;
    background: #202327;
}

body.social-portal-embed .support-chat-messages .dm-msg-author {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0 4px 2px;
}

body.social-portal-embed .support-chat-messages .dm-msg-author-name {
    font-size: 12px;
    font-weight: 800;
    /* default only when no inline role colour - match social messages */
    color: var(--text, #e7e9ea);
}
body.social-portal-embed .support-chat-messages .dm-msg-author-name[style*="color"],
body.social-portal-embed .support-chat-messages .dm-msg-author .identity-name-text {
    /* preserve highest-role color (inline !important) */
    font-weight: 800 !important;
}

body.social-portal-embed .support-chat-messages .support-role-tag {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #fff;
    background: var(--tag-color, #1d9bf0);
}

body.social-portal-embed .support-chat-messages .dm-bubble {
    width: max-content;
    max-width: 100%;
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.45;
    word-break: break-word;
    box-sizing: border-box;
}

body.social-portal-embed .support-chat-messages .dm-msg.incoming .dm-bubble {
    background: #3d4144;
    color: #f7f9f9;
    border: none;
    box-shadow: inset 0 0 0 1px #536471;
    border-bottom-left-radius: 6px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

body.social-portal-embed .support-chat-messages .dm-msg.outgoing .dm-bubble {
    background: #1d9bf0;
    color: #fff;
    border: none;
    box-shadow: inset 0 0 0 1px #1a8cd8, 0 4px 16px rgba(29, 155, 240, 0.28);
    border-bottom-right-radius: 6px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

body.social-portal-embed .support-chat-messages .dm-bubble-text p {
    margin: 0;
}

body.social-portal-embed .support-chat-messages .dm-bubble-text p + p {
    margin-top: 6px;
}

body.social-portal-embed .support-chat-messages .dm-bubble-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

body.social-portal-embed .support-chat-messages .dm-msg-time {
    font-size: 11px;
    line-height: 1;
    opacity: 0.78;
}

body.social-portal-embed .support-chat-messages .dm-msg.incoming .dm-msg-time {
    color: #71767b;
}

body.social-portal-embed .support-chat-messages .dm-msg.outgoing .dm-msg-time {
    color: rgba(255, 255, 255, 0.88);
}

body.social-portal-embed .support-chat-messages .msg-media {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    max-width: 100%;
}

body.social-portal-embed .support-chat-messages .msg-media img,
body.social-portal-embed .support-chat-messages .msg-media video {
    width: 100%;
    max-width: 280px;
    border-radius: 12px;
    display: block;
    object-fit: cover;
}

body.social-portal-embed .support-chat-messages .discord-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.social-portal-embed .support-chat-messages .dm-day-divider {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 8px 0 4px;
    pointer-events: none;
}

body.social-portal-embed .support-chat-messages .dm-day-divider-label {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    border: none;
    background: rgba(0, 0, 0, 0.92);
    font-size: 12px;
    font-weight: 700;
    color: #71767b;
    box-shadow: inset 0 0 0 1px #2f3336;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

body.social-portal-embed .support-sys-msg {
    align-self: center;
    max-width: 92%;
    margin: 4px 0;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #2f3336;
    background: rgba(29, 155, 240, 0.08);
    color: #8b98a5;
    font-size: 13px;
    line-height: 1.4;
    text-align: center;
}

body.social-portal-embed .support-typing {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 4px 40px;
    padding: 8px 12px;
    border-radius: 16px;
    background: #202327;
    color: #71767b;
    font-size: 13px;
}

body.social-portal-embed .support-typing-dots {
    display: inline-flex;
    gap: 4px;
}

body.social-portal-embed .support-typing-dots i {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #71767b;
    display: block;
    animation: supportTypingDot 1.2s infinite ease-in-out;
}

body.social-portal-embed .support-typing-dots i:nth-child(2) {
    animation-delay: 0.15s;
}

body.social-portal-embed .support-typing-dots i:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes supportTypingDot {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
    40% { transform: translateY(-3px); opacity: 1; }
}

body.social-portal-embed .support-thread-empty {
    margin: auto;
    max-width: 360px;
    padding: 28px 20px;
    text-align: center;
}

body.social-portal-embed .support-thread-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 155, 240, 0.12);
    border: 1px solid rgba(29, 155, 240, 0.28);
    color: #1d9bf0;
}

body.social-portal-embed .support-thread-empty-icon svg {
    width: 28px;
    height: 28px;
}

body.social-portal-embed .support-thread-empty h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    color: #e7e9ea;
}

body.social-portal-embed .support-thread-empty p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #71767b;
}

body.social-portal-embed .support-new-ticket {
    padding: 20px 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
}

body.social-portal-embed .support-new-ticket-hero {
    text-align: center;
}

body.social-portal-embed .support-new-ticket-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 155, 240, 0.12);
    border: 1px solid rgba(29, 155, 240, 0.28);
    color: #1d9bf0;
}

body.social-portal-embed .support-new-ticket-icon svg {
    width: 32px;
    height: 32px;
}

body.social-portal-embed .support-new-ticket-hero h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    color: #e7e9ea;
}

body.social-portal-embed .support-new-ticket-hero p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #71767b;
}

body.social-portal-embed .support-new-ticket-form {
    padding: 0;
}

body.social-portal-embed .support-chat-compose {
    display: flex;
    border-top: 1px solid #2f3336;
    background: #000;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0));
}

body.social-portal-embed .support-chat-compose .support-compose-inner,
body.social-portal-embed .support-chat-compose .dm-compose-inner {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
}

body.social-portal-embed .support-chat-compose textarea {
    flex: 1 1 auto;
    min-height: 44px;
    max-height: 132px;
    resize: none;
    border-radius: 999px;
    border: 1px solid #6e767d;
    background: #2a2f35;
    color: #f7f9f9;
    padding: 11px 16px;
    font-family: var(--app-font) !important;
    font-size: 15px;
    line-height: 1.35;
}

body.social-portal-embed .support-chat-compose textarea::placeholder {
    color: #71767b;
}

body.social-portal-embed .support-chat-compose textarea:focus {
    outline: none;
    border-color: #1d9bf0;
    background: #000;
}

body.social-portal-embed .support-chat-compose .dm-send-btn,
body.social-portal-embed .support-chat-compose .btn-send {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 999px;
    background: #1d9bf0 !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    transition: filter 0.15s ease, transform 0.1s ease;
}

body.social-portal-embed .support-chat-compose .dm-send-btn:hover,
body.social-portal-embed .support-chat-compose .btn-send:hover {
    filter: brightness(1.06);
}

body.social-portal-embed .support-chat-compose .dm-send-btn:active,
body.social-portal-embed .support-chat-compose .btn-send:active {
    transform: scale(0.96);
}

body.social-portal-embed .ticket-compose-full {
    padding: 0;
}

body.social-portal-embed .ticket-compose-full .compose-field {
    margin-bottom: 14px;
}

body.social-portal-embed .ticket-compose-full .compose-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #e7e9ea;
}

body.social-portal-embed .ticket-compose-full input,
body.social-portal-embed .ticket-compose-full textarea {
    width: 100%;
    box-sizing: border-box;
    background: #202327;
    border: 1px solid #2f3336;
    color: #e7e9ea;
    border-radius: 12px;
    padding: 12px 14px;
    font-family: var(--app-font) !important;
    font-size: 15px;
}

body.social-portal-embed .ticket-compose-full input::placeholder,
body.social-portal-embed .ticket-compose-full textarea::placeholder {
    color: #71767b;
}

body.social-portal-embed .ticket-compose-full input:focus,
body.social-portal-embed .ticket-compose-full textarea:focus {
    outline: none;
    border-color: #1d9bf0;
    background: #000;
}

body.social-portal-embed .ticket-compose-full textarea {
    min-height: 120px;
    resize: vertical;
}

body.social-portal-embed .ticket-compose-full .compose-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

body.social-portal-embed .ticket-compose-full .btn-open-ticket {
    min-height: 44px;
    padding: 0 22px;
    background: #1d9bf0 !important;
    color: #fff !important;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

body.social-portal-embed .support-chat-alert {
    display: none;
}

body.social-portal-embed .support-chat-alert.show {
    display: block;
    margin: 0 0 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(29, 155, 240, 0.45);
    background: rgba(29, 155, 240, 0.2);
    color: #f7f9f9;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

body.social-portal-embed .support-chat-alert.show[data-kind="warn"] {
    background: rgba(255, 212, 0, 0.1);
    border-color: rgba(255, 212, 0, 0.35);
    color: #f7f9f9;
}

body.social-portal-embed .support-chat-alert.show[data-kind="error"] {
    background: rgba(244, 33, 46, 0.1);
    border-color: rgba(244, 33, 46, 0.35);
    color: #f7f9f9;
}

body.social-portal-embed .support-btn-close-ticket,
body.social-portal-embed .support-btn-delete-ticket,
body.social-portal-embed .btn-close-ticket-header {
    border-radius: 999px;
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: var(--app-font) !important;
}

body.social-portal-embed .support-btn-close-ticket,
body.social-portal-embed .btn-close-ticket-header {
    background: #202327 !important;
    border: 1px solid #6e767d !important;
    color: #f7f9f9 !important;
}

body.social-portal-embed .support-btn-close-ticket:hover:not(:disabled),
body.social-portal-embed .btn-close-ticket-header:hover:not(:disabled) {
    border-color: #9ca3af !important;
    background: #2a2f35 !important;
}

body.social-portal-embed .support-btn-close-ticket:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

body.social-portal-embed .support-btn-delete-ticket {
    background: rgba(244, 33, 46, 0.18) !important;
    border: 1px solid rgba(244, 33, 46, 0.65) !important;
    color: #ff8a93 !important;
}

body.social-portal-embed .support-btn-delete-ticket:hover {
    background: rgba(244, 33, 46, 0.28) !important;
    border-color: #f4212e !important;
    color: #fff !important;
}

body.social-portal-embed .support-chat-head-actions {
    flex-shrink: 0;
}

body.social-portal-embed .shop-portal-head h3 {
    margin: 0 0 6px;
    text-align: center;
    font-family: var(--app-font) !important;
    font-weight: 800;
    color: #e7e9ea !important;
}

body.social-portal-embed .shop-portal-desc {
    margin: 0 0 14px;
    text-align: center;
    font-family: var(--app-font) !important;
    color: #71767b !important;
    font-size: 0.92rem;
    line-height: 1.45;
}

@media (max-width: 720px) {
    body.social-portal-embed .support-chat-layout.is-admin {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(140px, 34vh) minmax(0, 1fr);
    }

    body.social-portal-embed .support-chat-list {
        border-right: 0;
        border-bottom: 1px solid #2f3336;
    }
}

/* -- Shop tab (portal embed) -- */
body.social-portal-embed #tab-shop {
    padding: 12px 14px 28px;
}

body.social-portal-embed #tab-shop .shop-portal-card {
    background: #000000 !important;
    border: 1px solid #2f3336 !important;
    box-shadow: none !important;
    padding: 14px;
}

body.social-portal-embed #tab-shop .shop-portal-items {
    margin-top: 4px;
}

body.social-portal-embed #tab-shop .shop-mode-tabs,
body.social-portal-embed #tab-shop #shop-tabs,
body.social-portal-embed #tab-shop #shop-subtabs,
body.social-portal-embed #tab-shop .shop-category-filters {
    margin: 0 0 12px;
}

body.social-portal-embed #tab-shop .shop-filter-label {
    font-family: var(--app-font) !important;
    color: #71767b !important;
}

body.social-portal-embed #tab-shop .shop-category-select {
    background: #000000 !important;
    border: 1px solid #2f3336 !important;
    color: #e7e9ea !important;
    font-family: var(--app-font) !important;
    box-shadow: none !important;
    border-radius: 12px !important;
    min-height: 44px;
}

body.social-portal-embed #tab-shop .shop-category-select:focus {
    border-color: #1d9bf0 !important;
    box-shadow: 0 0 0 1px #1d9bf0 !important;
}

body.social-portal-embed #tab-shop .shop-tab,
body.social-portal-embed #tab-shop .shop-mode-tab {
    background: #000000 !important;
    border: 1px solid #2f3336 !important;
    color: #e7e9ea !important;
    font-family: var(--app-font) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border-radius: 999px !important;
    min-height: 40px;
    padding: 8px 14px !important;
}

body.social-portal-embed #tab-shop .shop-tab.active,
body.social-portal-embed #tab-shop .shop-mode-tab.active {
    background: #1d9bf0 !important;
    border-color: #1d9bf0 !important;
    color: #ffffff !important;
}

body.social-portal-embed #tab-shop .category-title,
body.social-portal-embed #tab-shop .shop-category-section h3 {
    font-family: var(--app-font) !important;
    color: #e7e9ea !important;
    text-shadow: none !important;
    border-color: #2f3336 !important;
}

body.social-portal-embed #tab-shop .shop-grid,
body.social-portal-embed #tab-shop .shop-grid-flat {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)) !important;
    gap: 12px !important;
}

body.social-portal-embed #tab-shop .shop-item {
    background: #000000 !important;
    border: 1px solid #2f3336 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    padding: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    min-height: 0 !important;
}

body.social-portal-embed #tab-shop .shop-image-wrap {
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    border: 1px solid #2f3336;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.social-portal-embed #tab-shop .shop-item-img,
body.social-portal-embed #tab-shop .shop-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    max-height: none !important;
}

body.social-portal-embed #tab-shop .shop-item-name,
body.social-portal-embed #tab-shop .shop-item h4 {
    font-family: var(--app-font) !important;
    color: #e7e9ea !important;
    font-size: 0.92rem !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

body.social-portal-embed #tab-shop .shop-item .qty,
body.social-portal-embed #tab-shop .shop-item .price {
    font-family: var(--app-font) !important;
    color: #71767b !important;
    margin: 0 !important;
}

body.social-portal-embed #tab-shop .shop-item .price {
    color: #1d9bf0 !important;
    font-weight: 700;
}

body.social-portal-embed #tab-shop .shop-item button {
    width: 100%;
    min-height: 40px;
    border-radius: 999px !important;
    background: #1d9bf0 !important;
    border: 1px solid #1d9bf0 !important;
    color: #ffffff !important;
    font-family: var(--app-font) !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    margin-top: auto;
}

body.social-portal-embed #tab-shop .shop-item button:disabled {
    opacity: 0.45;
}

body.social-portal-embed #tab-shop .shop-spend-limit,
body.social-portal-embed #tab-shop .empty-msg {
    font-family: var(--app-font) !important;
    color: #71767b !important;
    border-color: #2f3336 !important;
}

@media (max-width: 560px) {
    body.social-portal-embed #tab-shop .shop-grid,
    body.social-portal-embed #tab-shop .shop-grid-flat {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    body.social-portal-embed #tab-shop .shop-item button {
        min-height: 44px;
    }
}

/* -- Shop buy modals (portal embed) - viewport-fixed, centered in view -- */
body.social-portal-embed #shop-overlay,
body.social-portal-embed #shop-image-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    z-index: 12050 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.88) !important;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
    overscroll-behavior: contain !important;
    box-sizing: border-box !important;
}

body.social-portal-embed #shop-overlay[data-open="1"],
body.social-portal-embed #shop-image-overlay[data-open="1"],
body.social-portal-embed #shop-overlay.shop-overlay-open,
body.social-portal-embed #shop-image-overlay.shop-overlay-open {
    display: flex !important;
}

body.social-portal-embed #shop-overlay.shop-overlay-viewport-sync,
body.social-portal-embed #shop-image-overlay.shop-overlay-viewport-sync {
    bottom: auto !important;
}

body.social-portal-embed #shop-overlay .shop-modal,
body.social-portal-embed #shop-image-overlay .shop-modal {
    position: relative !important;
    z-index: 1 !important;
    width: min(560px, 100%) !important;
    max-width: 100% !important;
    max-height: min(88dvh, calc(100dvh - 24px)) !important;
    margin: auto !important;
    flex: 0 1 auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: #e7e9ea !important;
    background: #000000 !important;
    border: 1px solid #2f3336 !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
}

body.social-portal-embed #shop-overlay .modal-header,
body.social-portal-embed #shop-overlay .modal-body,
body.social-portal-embed #shop-overlay .modal-footer,
body.social-portal-embed #shop-image-overlay .modal-header,
body.social-portal-embed #shop-image-overlay .modal-body {
    color: #e7e9ea !important;
}

body.social-portal-embed #shop-overlay .modal-header,
body.social-portal-embed #shop-image-overlay .modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
}

body.social-portal-embed #shop-overlay .modal-footer,
body.social-portal-embed #shop-image-overlay .modal-footer {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

body.social-portal-embed #shop-overlay .shop-modal .button,
body.social-portal-embed #shop-overlay .shop-modal button,
body.social-portal-embed #shop-image-overlay .shop-modal .button,
body.social-portal-embed #shop-image-overlay .shop-modal button {
    background: #1d9bf0 !important;
    border: 1px solid #1d9bf0 !important;
    color: #ffffff !important;
    font-family: var(--app-font) !important;
    border-radius: 999px !important;
    min-height: 44px !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

body.social-portal-embed #shop-overlay .shop-modal .button.secondary,
body.social-portal-embed #shop-overlay .shop-modal button.secondary,
body.social-portal-embed #shop-image-overlay .shop-modal .button.secondary,
body.social-portal-embed #shop-image-overlay .shop-modal button.secondary {
    background: #000000 !important;
    border-color: #2f3336 !important;
    color: #e7e9ea !important;
}

body.social-portal-embed #shop-overlay.shop-overlay-viewport-sync .shop-modal,
body.social-portal-embed #shop-image-overlay.shop-overlay-viewport-sync .shop-modal {
    max-height: min(88%, calc(100% - 24px)) !important;
}

@media (max-width: 720px) {
    body.social-portal-embed #shop-overlay,
    body.social-portal-embed #shop-image-overlay {
        padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)) !important;
    }

    body.social-portal-embed #shop-overlay .shop-modal,
    body.social-portal-embed #shop-image-overlay .shop-modal {
        width: 100% !important;
        max-height: min(90dvh, calc(100dvh - 20px)) !important;
        border-radius: 16px !important;
    }
}

/* Storage sell/delete when mounted on portal shell */
body.social-portal-embed #storage-sell-overlay,
body.social-portal-embed #storage-delete-overlay,
#storage-sell-overlay,
#storage-delete-overlay {
    align-items: center !important;
    justify-content: center !important;
}

body.social-portal-embed #storage-sell-overlay .modal-content,
body.social-portal-embed #storage-delete-overlay .modal-content,
#storage-sell-overlay .modal-content,
#storage-delete-overlay .modal-content {
    width: min(480px, 100%) !important;
    max-height: min(85dvh, calc(100dvh - 24px)) !important;
    margin: auto !important;
    border-radius: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

body.social-portal-embed #storage-sell-overlay .modal-body,
body.social-portal-embed #storage-delete-overlay .modal-body,
#storage-sell-overlay .modal-body,
#storage-delete-overlay .modal-body {
    flex: 1 1 auto !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
}

body.social-portal-embed #storage-sell-overlay .storage-sell-actions,
body.social-portal-embed #storage-delete-overlay .storage-delete-actions,
#storage-sell-overlay .storage-sell-actions,
#storage-delete-overlay .storage-delete-actions {
    flex-shrink: 0 !important;
    margin-top: auto !important;
}

/* -- Mobile popups / modals (portal embed) -- */
body.social-portal-embed.modalOpen {
    overflow: hidden !important;
}

body.social-portal-embed #products-modal,
body.social-portal-embed #kick-link-success-modal,
body.social-portal-embed #si-modal,
body.social-portal-embed #challenges-modal,
body.social-portal-embed #profile-stats-lb-modal,
body.social-portal-embed #guide-modal,
body.social-portal-embed #force-link-modal,
body.social-portal-embed .tickets-overlay.show {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
    background: rgba(0, 0, 0, 0.88) !important;
    backdrop-filter: blur(8px);
}

body.social-portal-embed #products-modal > div,
body.social-portal-embed #kick-link-success-modal > div,
body.social-portal-embed #si-modal > div,
body.social-portal-embed #challenges-modal .chlg-modal-card,
body.social-portal-embed #profile-stats-lb-panel,
body.social-portal-embed #guide-modal-inner,
body.social-portal-embed #force-link-modal > div,
body.social-portal-embed .tickets-overlay.show .tickets-panel {
    width: 100% !important;
    max-width: 100% !important;
    max-height: min(94dvh, 100%) !important;
    border-radius: 16px 16px 0 0 !important;
    border-color: #2f3336 !important;
    background: #000000 !important;
    color: #e7e9ea !important;
    font-family: var(--app-font) !important;
    box-shadow: none !important;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

body.social-portal-embed #guide-modal-inner {
    max-height: 96dvh !important;
}

body.social-portal-embed #guide-modal-content,
body.social-portal-embed #guide-modal-scroll {
    max-height: calc(96dvh - 56px) !important;
}

body.social-portal-embed #si-modal .si-inp,
body.social-portal-embed #si-modal select,
body.social-portal-embed #products-modal input,
body.social-portal-embed #products-modal select {
    background: #000000 !important;
    border: 1px solid #2f3336 !important;
    color: #e7e9ea !important;
    font-family: var(--app-font) !important;
}

body.social-portal-embed #products-modal button,
body.social-portal-embed #kick-link-success-modal button,
body.social-portal-embed #si-modal .btn,
body.social-portal-embed #challenges-modal button,
body.social-portal-embed #profile-stats-lb-panel button {
    background: #1d9bf0 !important;
    border: 1px solid #1d9bf0 !important;
    color: #ffffff !important;
    font-family: var(--app-font) !important;
    border-radius: 999px !important;
    min-height: 44px;
    box-shadow: none !important;
    text-shadow: none !important;
}

@media (min-width: 721px) {
    body.social-portal-embed #products-modal,
    body.social-portal-embed #kick-link-success-modal,
    body.social-portal-embed #si-modal,
    body.social-portal-embed #challenges-modal,
    body.social-portal-embed #profile-stats-lb-modal,
    body.social-portal-embed #guide-modal,
    body.social-portal-embed .tickets-overlay.show {
        align-items: center !important;
        padding: 16px !important;
    }

    body.social-portal-embed #products-modal > div,
    body.social-portal-embed #kick-link-success-modal > div,
    body.social-portal-embed #si-modal > div,
    body.social-portal-embed #challenges-modal .chlg-modal-card,
    body.social-portal-embed #profile-stats-lb-panel,
    body.social-portal-embed #guide-modal-inner,
    body.social-portal-embed .tickets-overlay.show .tickets-panel {
        width: min(640px, 100%) !important;
        max-height: min(88vh, 92dvh) !important;
        border-radius: 16px !important;
    }
}

/* Portal + legacy embed - fit viewport on all mobile screens */
@media (max-width: 1100px) {
    body.portal-themed,
    body.social-portal-embed,
    body.theme-xp,
    body.social-portal-page {
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
    }

    body.social-portal-embed .sections,
    body.social-portal-embed .tabs-shell,
    body.social-portal-embed .tab-content,
    body.social-portal-embed .header-grid,
    body.social-portal-embed .card,
    body.social-portal-page .portal-main-content,
    body.social-portal-page .layout-grid.layout-portal {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: clip;
        box-sizing: border-box;
    }
}

/* Portal live feed - XP events */
.plf-line--xp .plf-level {
  color: #7dd3fc;
  font-weight: 700;
}
.plf-line--xp .plf-challenge {
  color: #fbbf24;
  font-weight: 700;
}


/* Role-colored identity names - never force theme text color over inline role color */
.identity-name-text {
    /* color comes from inline style (role) */
}
.dm-msg-author .identity-name-text,
.dm-convo-name .identity-name-text,
.dm-thread-name .identity-name-text,
.profile-title .identity-name-text,
.post-author .identity-name-text,
.notification-actor-name .identity-name-text {
    /* keep role color even when parent sets muted text */
}
.dm-msg-author:hover .identity-name-text {
    /* do not wipe role color on hover */
    text-decoration: underline;
}
.dm-msg-author-name[style*="color"] {
    /* live JS-rendered author colors */
}
body.social-portal-embed .support-chat-messages .dm-msg-author-name[style*="color"],
body.social-portal-embed .dm-msg-author .identity-name-text,
body.social-portal-embed .dm-msg-author-name {
    /* allow inline color; only default when no inline */
}
body.social-portal-embed .dm-msg-author .identity-name-text[style],
body.social-portal-embed .dm-msg-author-name[style] {
    /* inline style wins */
}


/* Portal messages: role colours same as social (do not force text colour on names) */
body.social-portal-embed .dm-msg-author,
body.social-portal-embed .support-chat-messages .dm-msg-author {
    color: var(--text-muted, #71767b) !important;
}
body.social-portal-embed .dm-msg-author-name,
body.social-portal-embed .dm-msg-author .identity-name-text,
body.social-portal-embed .support-chat-messages .dm-msg-author-name,
body.social-portal-embed .support-chat-messages .dm-msg-author .identity-name-text,
body.social-portal-embed .dm-convo-name .identity-name-text,
body.social-portal-embed .dm-thread-name .identity-name-text,
body.social-portal-embed .dm-convo-identity .identity-name-text {
    font-weight: 800 !important;
}
body.social-portal-embed .dm-msg-author-name[style*="color"],
body.social-portal-embed .identity-name-text[style*="color"],
body.social-portal-embed .support-chat-messages .dm-msg-author-name[style*="color"] {
    /* inline role colour wins over any theme color:!important on parents */
}
body.social-portal-embed .dm-msg-author-handle {
    color: var(--text-muted, #71767b) !important;
    font-weight: 500 !important;
}
/* Kill forced #e7e9ea on support author name when role colour present */
body.social-portal-embed .support-chat-messages .dm-msg-author-name[style*="color"] {
    font-size: 12px !important;
}


/* 20260811-modbal1 white outline ONLY on dark name colours (not bright customs) */
.identity-name-text.is-dark-name,
.dm-msg-author-name.is-dark-name,
.post-author-name.is-dark-name,
.reel-author-name.is-dark-name,
.identity-name-text[style*="#000000"],
.identity-name-text[style*="color:#000"],
.identity-name-text[style*="color: #000"],
.identity-name-text[style*="#010101"],
.identity-name-text[style*="#0A0A0A"],
.identity-name-text[style*="#0a0a0a"],
.identity-name-text[style*="#111111"],
.dm-msg-author-name[style*="#000000"],
.post-author-name[style*="#000000"],
.reel-author-name[style*="#000000"],
.plf-ign.is-dark-name,
.plf-ign[style*="#000000"],
.plf-ign[style*="color:#000"],
.plf-ign[style*="#010101"],
.plf-ign[style*="#0A0A0A"],
.plf-ign[style*="#111111"] {
  filter: none !important;
  -webkit-text-stroke: 0 !important;
  paint-order: normal !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35) !important;
}
/* Bright custom names: NO white outline */
.plf-ign.is-custom-name:not(.is-dark-name),
.identity-name-text.is-custom-name:not(.is-dark-name),
.dm-msg-author-name.is-custom-name:not(.is-dark-name),
.post-author-name.is-custom-name:not(.is-dark-name) {
  -webkit-text-stroke: 0 !important;
  text-shadow: none !important;
}
