/* =========================================================
   CLICK · MODO OSCURO PRUEBA V1
   Capa independiente: no modifica social.css
   ========================================================= */

.click-theme-toggle{
  position:fixed;
  top:88px;
  right:18px;
  z-index:10050;
  width:78px;
  height:42px;
  padding:0;
  border:0;
  border-radius:999px;
  background:transparent;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  filter:drop-shadow(0 10px 22px rgba(45,35,110,.18));
}
.click-theme-toggle:focus-visible{outline:3px solid rgba(125,82,255,.45);outline-offset:4px}
.click-theme-toggle__track{
  position:relative;
  display:block;
  width:100%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(135deg,#fff8d8,#f3edff);
  border:1px solid rgba(120,93,220,.20);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85),0 8px 24px rgba(84,67,155,.14);
  transition:background .28s ease,border-color .28s ease,box-shadow .28s ease;
  overflow:hidden;
}
.click-theme-toggle__sun,.click-theme-toggle__moon{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:1;
  font-size:16px;
  line-height:1;
  transition:opacity .22s ease,transform .28s ease;
  pointer-events:none;
}
.click-theme-toggle__sun{left:11px;color:#f2a516;opacity:1}
.click-theme-toggle__moon{right:11px;color:#8c74ff;opacity:.38}
.click-theme-toggle__thumb{
  position:absolute;
  top:4px;
  left:4px;
  z-index:2;
  width:34px;
  height:34px;
  border-radius:50%;
  background:linear-gradient(145deg,#ffffff,#fff8df);
  box-shadow:0 5px 14px rgba(70,58,122,.23),inset 0 1px 0 #fff;
  transition:transform .30s cubic-bezier(.2,.8,.2,1),background .28s ease,box-shadow .28s ease;
}

html[data-theme="dark"] .click-theme-toggle__track{
  background:linear-gradient(135deg,#252342,#17182c);
  border-color:rgba(164,133,255,.35);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 10px 28px rgba(0,0,0,.32);
}
html[data-theme="dark"] .click-theme-toggle__thumb{
  transform:translateX(36px);
  background:linear-gradient(145deg,#8e6bff,#6549d8);
  box-shadow:0 7px 18px rgba(98,67,223,.42),inset 0 1px 0 rgba(255,255,255,.25);
}
html[data-theme="dark"] .click-theme-toggle__sun{opacity:.32;transform:translateY(-50%) scale(.88)}
html[data-theme="dark"] .click-theme-toggle__moon{opacity:1;transform:translateY(-50%) scale(1.08);color:#e8e0ff}

/* Base */
html[data-theme="dark"]{color-scheme:dark;background:#0d0f1e}
html[data-theme="dark"] body{
  --ink:#ecebf8;
  --muted:#a5a6ba;
  --line:#34354d;
  --bg:#0f1121;
  --card:#181a2d;
  background:radial-gradient(circle at 18% 0%,rgba(105,71,210,.17),transparent 30%),linear-gradient(180deg,#0f1020 0,#121426 390px,#0d0f1d 100%)!important;
  color:#ecebf8!important;
}
html[data-theme="dark"] body::selection{background:#7756e8;color:#fff}
html[data-theme="dark"] a{color:#b8a4ff}
html[data-theme="dark"] hr{border-color:#33364d}

/* Inputs */
html[data-theme="dark"] :is(input,textarea,select){
  background:#111426!important;
  color:#f1effb!important;
  border-color:#373a54!important;
  box-shadow:none;
}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#777b96!important}
html[data-theme="dark"] :is(input,textarea,select):focus{border-color:#8264ed!important;box-shadow:0 0 0 3px rgba(126,93,238,.14)!important}

/* Global cards / surfaces */
html[data-theme="dark"] :is(
  .classic-box,.post-card,.rail-card,.profile-mini,.composer,.auth-card,.form-box,.rules-page .classic-box,
  .global-profile-card,.global-safety-card,.global-side-menu,.right-rail>section,
  .discover-v1-card,.discover-v1-section-card,.discover-v1-mobile-list,.discover-v1-mobile-popular,.discover-v1-mobile-tags,.discover-v1-mobile-banner,
  .notifications-v4-card,.communities-v2-card,.community-v3-card,.polls-v3-card,.events-v4-card,.games-v3-card,.badges-v2-card,
  .market-v1-card,.edit-profile-v1-card,.profile-premium-v396 .classic-box,
  .guest-login-dialog,.click-user-welcome__card,
  .home-v38-header,.home-v38-hero,.home-v38-stats-band,.home-v38-interests,.home-v38-communities,.home-v38-why article,
  .home-v37-header,.home-v37-hero,.home-v37-trends,.home-v37-communities,.home-v37-safety
){
  background:#181a2d!important;
  color:#efedf8!important;
  border-color:#34364e!important;
  box-shadow:0 16px 42px rgba(0,0,0,.24)!important;
}

/* Broad panel fallbacks for newer modules */
html[data-theme="dark"] body:not(.profile-premium-v396) :is(
  [class$="-card"],[class$="-panel"],[class$="-box"],[class*="-card "],[class*="-panel "]
){border-color:#34364e}

/* Text */
html[data-theme="dark"] :is(h1,h2,h3,h4,h5,h6,strong,b,label){color:#f1effa}
html[data-theme="dark"] :is(p,small,.muted,.sub,.lead){color:#aaaabd}
html[data-theme="dark"] :is(.post-body,.post-author a strong,.comment-content a strong,.comment p){color:#eceaf6!important}
html[data-theme="dark"] :is(.post-author span,.comment small,.post-stats,.composer-bottom){color:#989aaf!important}

/* Top bars */
html[data-theme="dark"] .topbar{
  background:rgba(14,16,31,.96)!important;
  border-bottom-color:#292c43!important;
  box-shadow:0 8px 30px rgba(0,0,0,.28)!important;
  backdrop-filter:blur(18px);
}
html[data-theme="dark"] .topbar-v5-desktop{
  background:rgba(18,20,36,.96)!important;
  border-color:#31334a!important;
  box-shadow:0 10px 34px rgba(0,0,0,.3)!important;
}
html[data-theme="dark"] .topbar-v5-search{background:#111326!important;border-color:#33354e!important}
html[data-theme="dark"] .topbar-v5-search input{background:transparent!important}
html[data-theme="dark"] .topbar-v5-nav a{color:#aaa9bd!important}
html[data-theme="dark"] .topbar-v5-nav a.active{background:#292441!important;color:#cbbaff!important}
html[data-theme="dark"] .topbar-v5-account-menu{background:#191b2e!important;border-color:#35374f!important;box-shadow:0 16px 40px rgba(0,0,0,.35)!important}
html[data-theme="dark"] .topbar-v5-account-menu a{color:#e8e5f4!important}
html[data-theme="dark"] .topbar-v5-account-menu a:hover{background:#24263b!important}

/* Navigation / sidebars */
html[data-theme="dark"] .global-side-menu a{color:#c8c7d5!important;border-color:#2f3147!important}
html[data-theme="dark"] .global-side-menu a:hover{background:#222438!important}
html[data-theme="dark"] .global-side-menu a.active{background:#302747!important;color:#b897ff!important}
html[data-theme="dark"] .global-level-card{background:#22243a!important;border-color:#36384f!important}
html[data-theme="dark"] .global-profile-stats>div+div{border-color:#34364d!important}

/* Feed / comments */
html[data-theme="dark"] .post-stats,
html[data-theme="dark"] .post-actions{border-color:#303247!important}
html[data-theme="dark"] .post-actions button{background:#181a2d!important;color:#aaaec1!important}
html[data-theme="dark"] .post-actions button:hover{background:#222439!important}
html[data-theme="dark"] .post-actions .liked{color:#ff6e91!important}
html[data-theme="dark"] .comments,
html[data-theme="dark"] .comment-form{background:#141628!important;border-color:#303247!important}
html[data-theme="dark"] .report-pop{background:#231d2b!important;border-color:#4b3841!important}
html[data-theme="dark"] .rail-card-header{background:#202338!important;border-color:#35374d!important;color:#d9d7e7!important}
html[data-theme="dark"] .tag{background:#292440!important;border-color:#443b66!important;color:#c7b1ff!important}

/* Mobile nav and menu */
html[data-theme="dark"] .mobile-nav,
html[data-theme="dark"] .mobile-nav-v39{
  background:rgba(18,19,34,.97)!important;
  border-color:#303247!important;
  box-shadow:0 -10px 32px rgba(0,0,0,.38)!important;
  backdrop-filter:blur(18px);
}
html[data-theme="dark"] .mobile-nav-v39 a{color:#9d9daf!important}
html[data-theme="dark"] .mobile-nav-v39 a b{background:#23253a!important;color:#aaa0d7!important}
html[data-theme="dark"] .mobile-nav-v39 a.active{color:#b894ff!important;background:transparent!important}
html[data-theme="dark"] .mobile-nav-v39 a.active b{background:#6f4be0!important;color:#fff!important}
html[data-theme="dark"] .mobile-nav-create b{background:linear-gradient(135deg,#6948dd,#8f57e9)!important;color:#fff!important;box-shadow:0 10px 28px rgba(91,62,210,.45)!important}
html[data-theme="dark"] .mobile-menu-sheet{background:#151729!important;color:#efedf8!important;border-color:#34364d!important}
html[data-theme="dark"] .mobile-full-menu a{color:#dddbe8!important;border-color:#2f3147!important}
html[data-theme="dark"] .mobile-full-menu a:hover,
html[data-theme="dark"] .mobile-full-menu a.active{background:#292440!important;color:#c7b0ff!important}
html[data-theme="dark"] .mobile-security-note{background:#202236!important;border-color:#33364c!important;color:#bbb9c9!important}
html[data-theme="dark"] .mobile-menu-backdrop{background:rgba(4,5,12,.68)!important}

/* Profile */
html[data-theme="dark"] .profile-page-head,
html[data-theme="dark"] .profile-main,
html[data-theme="dark"] .profile-content,
html[data-theme="dark"] .profile-sidebar{color:#eeecf7}
html[data-theme="dark"] .profile-main p{color:#aaaabd!important}
html[data-theme="dark"] .profile-tabs{background:#17192b!important;border-color:#32344a!important}
html[data-theme="dark"] .profile-tabs a{color:#aaa9bd!important}
html[data-theme="dark"] .profile-tabs a.active{color:#c7adff!important;border-color:#8b62f1!important}

/* Landing V38 */
html[data-theme="dark"] .home-v38{
  background:radial-gradient(circle at 15% 0%,rgba(123,69,255,.19),transparent 28%),radial-gradient(circle at 88% 10%,rgba(66,83,169,.18),transparent 28%),linear-gradient(180deg,#101121 0%,#14162a 50%,#0d0f1d 100%)!important;
  color:#efedf8!important;
}
html[data-theme="dark"] .home-v38:before{opacity:.28}
html[data-theme="dark"] .home-v38-copy h1{color:#f5f3ff!important}
html[data-theme="dark"] .home-v38-copy p,
html[data-theme="dark"] .home-v38-feature-row small,
html[data-theme="dark"] .home-v38-band-copy span,
html[data-theme="dark"] .home-v38-community-body p,
html[data-theme="dark"] .home-v38-why p{color:#aaaabd!important}
html[data-theme="dark"] .home-v38-pill{background:#222438!important;border-color:#3a3c55!important;color:#b99bff!important}
html[data-theme="dark"] .home-v38-secondary,
html[data-theme="dark"] .home-v38-login{background:#1a1c30!important;border-color:#3b3e57!important;color:#c5adff!important}
html[data-theme="dark"] .home-v38-feature-row>div{border-color:#35374e!important}
html[data-theme="dark"] .home-v38-interest-card,
html[data-theme="dark"] .home-v38-community-card{background:#1b1d31!important;border-color:#373950!important;box-shadow:0 18px 38px rgba(0,0,0,.28)!important}
html[data-theme="dark"] .home-v38-interest-body a,
html[data-theme="dark"] .home-v38-community-body a{background:#2c2545!important;color:#c0a8ff!important}
html[data-theme="dark"] .home-v38-interest-body small,
html[data-theme="dark"] .home-v38-community-body>div span,
html[data-theme="dark"] .home-v38-section-title small{color:#9698ad!important}
html[data-theme="dark"] .home-v38-chip-row span{background:#22243a!important;border-color:#383a53!important;color:#bba5ff!important}
html[data-theme="dark"] .home-v38-band-cta{background:#22243a!important;border-color:#383a53!important;color:#bca4ff!important}
html[data-theme="dark"] .home-v38-footer{background:linear-gradient(90deg,#262548,#3b2f6f)!important}

/* Landing V37 fallback */
html[data-theme="dark"] .home-v37{background:linear-gradient(180deg,#101121,#14162a 55%,#0d0f1d)!important;color:#efedf8!important}
html[data-theme="dark"] .home-v37-copy h1{color:#f5f3ff!important}
html[data-theme="dark"] .home-v37-copy>p,
html[data-theme="dark"] .home-v37-trust-row small,
html[data-theme="dark"] .home-v37-community-body p,
html[data-theme="dark"] .home-v37-safety p{color:#aaaabd!important}
html[data-theme="dark"] .home-v37-pill,
html[data-theme="dark"] .home-v37-secondary,
html[data-theme="dark"] .home-v37-community-card{background:#1b1d31!important;border-color:#373950!important;color:#efedf8!important}

/* Registration / login / legal */
html[data-theme="dark"] .guest-login-backdrop,
html[data-theme="dark"] .click-user-welcome__backdrop{background:rgba(4,5,12,.74)!important}
html[data-theme="dark"] .guest-login-dialog,
html[data-theme="dark"] .click-user-welcome__card{background:#191b2f!important;color:#efedf8!important;border-color:#3a3c55!important}
html[data-theme="dark"] .guest-login-heading p,
html[data-theme="dark"] .click-user-welcome__content p,
html[data-theme="dark"] .click-user-welcome__content small{color:#aaaabd!important}
html[data-theme="dark"] .click-user-welcome__visual{background:linear-gradient(145deg,#262342,#17192c)!important}

/* Footer */
html[data-theme="dark"] .site-footer{border-color:#303248!important;color:#8f92a8!important}

/* Scrollbars */
html[data-theme="dark"] *{scrollbar-color:#4a3d73 #151729}
html[data-theme="dark"] ::-webkit-scrollbar{width:10px;height:10px}
html[data-theme="dark"] ::-webkit-scrollbar-track{background:#151729}
html[data-theme="dark"] ::-webkit-scrollbar-thumb{background:#4a3d73;border-radius:999px;border:2px solid #151729}

@media(max-width:900px){
  .click-theme-toggle{top:74px;right:12px;width:70px;height:38px}
  .click-theme-toggle__thumb{width:30px;height:30px}
  html[data-theme="dark"] .click-theme-toggle__thumb{transform:translateX(32px)}
  .click-theme-toggle__sun{left:10px;font-size:14px}.click-theme-toggle__moon{right:10px;font-size:14px}
}
@media(max-width:420px){
  .click-theme-toggle{top:70px;right:10px;width:66px;height:36px}
  .click-theme-toggle__thumb{top:3px;left:3px;width:30px;height:30px}
  html[data-theme="dark"] .click-theme-toggle__thumb{transform:translateX(30px)}
}
@media(prefers-reduced-motion:reduce){
  .click-theme-toggle__track,.click-theme-toggle__thumb,.click-theme-toggle__sun,.click-theme-toggle__moon{transition:none!important}
}

/* =========================================================
   CLICK · MODO OSCURO V2 · MÉTODO VISUAL DEL PERFIL
   Perfil de referencia:
   - fondo #171737 -> #12142f
   - panel morado glass rgba(63,58,128) -> rgba(31,31,82)
   - contenido/post casi negro
   ========================================================= */
html[data-theme="dark"] body:not(.profile-premium-v396){
  --ink:#f5f2ff;
  --muted:#bbb6d3;
  --line:rgba(255,255,255,.11);
  --bg:#12142f;
  --card:#17182d;
  background:linear-gradient(180deg,#171737 0%,#17183c 52%,#12142f 100%)!important;
  color:#f5f2ff!important;
}

/* El perfil ya tiene su propia estética oscura premium: no la tapamos. */
html[data-theme="dark"] body.profile-premium-v396{
  background:linear-gradient(180deg,#171737 0%,#17183c 55%,#12142f 100%)!important;
}

/* Superficies principales = el mismo vidrio morado del perfil */
html[data-theme="dark"] body:not(.profile-premium-v396) :is(
  .global-profile-card,.global-side-menu,.global-level-card,.composer,
  .rail-card,.right-rail>section,.classic-box,.profile-mini,
  .discover-v1-card,.discover-v1-section-card,.discover-v1-mobile-list,
  .discover-v1-mobile-popular,.discover-v1-mobile-tags,.discover-v1-mobile-banner,
  .notifications-v4-card,.communities-v2-card,.community-v3-card,
  .polls-v3-card,.events-v4-card,.games-v3-card,.badges-v2-card,.market-v1-card,
  .edit-profile-v1-card,.trends-v3-side-card,.trends-v3-rail-card,
  .trends-v3-more-wrap details,.home-v38-header,.home-v38-hero,
  .home-v38-stats-band,.home-v38-interests,.home-v38-communities,
  .home-v38-why article,.home-v37-header,.home-v37-hero,.home-v37-trends,
  .home-v37-communities,.home-v37-safety
){
  background:linear-gradient(155deg,rgba(63,58,128,.92),rgba(31,31,82,.95))!important;
  border-color:rgba(255,255,255,.13)!important;
  color:#f5f2ff!important;
  box-shadow:0 18px 42px rgba(3,5,28,.20)!important;
  backdrop-filter:blur(16px)!important;
  -webkit-backdrop-filter:blur(16px)!important;
}

/* El composer se parece más a la tarjeta de identidad del perfil. */
html[data-theme="dark"] body:not(.profile-premium-v396) .composer{
  background:linear-gradient(155deg,rgba(70,63,142,.94),rgba(35,33,89,.97))!important;
  border-color:rgba(255,255,255,.14)!important;
}

/* Posts: capa interior oscura, igual que las publicaciones del perfil. */
html[data-theme="dark"] :is(.post-card,.discover-v1-page .post-card,.trends-v3-mini-card){
  background:#17182d!important;
  border-color:rgba(255,255,255,.10)!important;
  color:#f6f3ff!important;
  box-shadow:0 14px 32px rgba(2,4,25,.24)!important;
}
html[data-theme="dark"] :is(.post-head,.post-body,.post-stats,.post-actions,.comments,.comment-form){
  border-color:rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] .comments,
html[data-theme="dark"] .comment-form{
  background:#12142a!important;
}
html[data-theme="dark"] .post-actions button{
  background:transparent!important;
  color:#c4bfd9!important;
}
html[data-theme="dark"] .post-actions button:hover{background:rgba(255,255,255,.055)!important}
html[data-theme="dark"] .post-actions .liked{color:#ff7da2!important}
html[data-theme="dark"] .post-author a strong,
html[data-theme="dark"] .post-body,
html[data-theme="dark"] .comment p,
html[data-theme="dark"] .comment-content a strong{color:#f5f2ff!important}
html[data-theme="dark"] .post-author span,
html[data-theme="dark"] .post-stats,
html[data-theme="dark"] .comment small{color:#aaa6c1!important}

/* Media mantiene contraste pero sin marco blanco brillante. */
html[data-theme="dark"] :is(.post-image-wrap,.post-gallery-v4,.post-media){
  background:#111327!important;
  border-color:rgba(255,255,255,.08)!important;
}

/* Inicio: barras laterales y widgets internos */
html[data-theme="dark"] :is(.global-profile-card,.global-side-menu,.right-rail>section){
  background:linear-gradient(155deg,rgba(63,58,128,.92),rgba(31,31,82,.95))!important;
}
html[data-theme="dark"] .global-side-menu a{
  color:#ded9f2!important;
  border-color:rgba(255,255,255,.07)!important;
  background:transparent!important;
}
html[data-theme="dark"] .global-side-menu a:hover{background:rgba(255,255,255,.07)!important}
html[data-theme="dark"] .global-side-menu a.active{
  background:linear-gradient(135deg,rgba(147,104,255,.25),rgba(216,112,255,.14))!important;
  color:#fff!important;
  box-shadow:inset 0 -2px #b98cff!important;
}
html[data-theme="dark"] :is(.global-profile-stats>div,.mini-stats div){border-color:rgba(255,255,255,.09)!important}
html[data-theme="dark"] .rail-card-header{
  background:rgba(255,255,255,.055)!important;
  border-color:rgba(255,255,255,.08)!important;
  color:#f1edff!important;
}
html[data-theme="dark"] :is(.person-row strong,.rail-title){color:#f3f0ff!important}
html[data-theme="dark"] .person-row span{color:#a9a5bd!important}
html[data-theme="dark"] .tag{background:rgba(142,99,255,.16)!important;border-color:rgba(178,139,255,.25)!important;color:#d3c3ff!important}

/* Botones y pestañas del feed */
html[data-theme="dark"] :is(.feed-tabs a,.home-feed-tabs a,.discover-tabs a){color:#c2bdd6!important}
html[data-theme="dark"] :is(.feed-tabs a.active,.home-feed-tabs a.active,.discover-tabs a.active){
  background:linear-gradient(135deg,rgba(147,104,255,.30),rgba(216,112,255,.16))!important;
  color:#fff!important;
}

/* Inputs: negros/morados, no gris lavado */
html[data-theme="dark"] :is(input,textarea,select){
  background:#111327!important;
  color:#f5f2ff!important;
  border-color:rgba(181,160,255,.22)!important;
}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#8886a3!important}
html[data-theme="dark"] :is(input,textarea,select):focus{
  border-color:#8d6cff!important;
  box-shadow:0 0 0 3px rgba(141,108,255,.15)!important;
}

/* Topbar PC y móvil: como la cabecera del perfil. */
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .topbar-auth{
  background:rgba(22,22,55,.96)!important;
  border-color:rgba(255,255,255,.08)!important;
  box-shadow:0 8px 28px rgba(2,3,18,.25)!important;
  backdrop-filter:blur(18px)!important;
  -webkit-backdrop-filter:blur(18px)!important;
}
html[data-theme="dark"] .topbar-v5-desktop{
  background:rgba(22,22,55,.96)!important;
  border-color:rgba(255,255,255,.09)!important;
  box-shadow:0 10px 30px rgba(2,3,18,.28)!important;
}
html[data-theme="dark"] .topbar-v5-search{
  background:#111327!important;
  border-color:rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] .topbar-v5-nav a{color:#bbb6d0!important;background:transparent!important}
html[data-theme="dark"] .topbar-v5-nav a.active{
  background:linear-gradient(135deg,rgba(147,104,255,.22),rgba(216,112,255,.12))!important;
  color:#fff!important;
}
html[data-theme="dark"] .topbar-v5-account-menu{
  background:linear-gradient(155deg,#2a285c,#191a3c)!important;
  border-color:rgba(255,255,255,.12)!important;
}
html[data-theme="dark"] .topbar-v5-account-menu a{color:#f3f0ff!important}
html[data-theme="dark"] .topbar-v5-account-menu a:hover{background:rgba(255,255,255,.07)!important}
html[data-theme="dark"] .mobile-header-menu,
html[data-theme="dark"] .top-profile-pill{
  background:rgba(255,255,255,.08)!important;
  border-color:rgba(255,255,255,.12)!important;
  color:#eee9ff!important;
}

/* Descubrir y módulos nuevos: evitar tarjetas blancas internas. */
html[data-theme="dark"] body.discover-v1-page{background:linear-gradient(180deg,#171737,#17183c 55%,#12142f)!important;color:#f5f2ff!important}
html[data-theme="dark"] :is(.discover-v1-user-card,.discover-v1-community-card,.discover-v1-mobile-person,
.discover-v1-right-communities>a,.trends-v3-mini-card,.trends-v3-more-list a){
  background:#17182d!important;
  border-color:rgba(255,255,255,.09)!important;
  color:#f3f0ff!important;
}
html[data-theme="dark"] :is(.discover-v1-user-main strong,.discover-v1-community-card strong,.discover-v1-right-person strong,
.discover-v1-right-communities strong,.discover-v1-section-title h2,.discover-v1-title h1,
.trends-v3-mini-body h3,.trends-v3-side-title,.trends-v3-creator-main strong,.trends-v3-commented-list strong){color:#f5f2ff!important}
html[data-theme="dark"] :is(.discover-v1-user-main small,.discover-v1-community-card p,.discover-v1-community-card small,
.discover-v1-right-person small,.discover-v1-right-communities small,.discover-v1-section-title p,
.discover-v1-title p,.trends-v3-mini-user,.trends-v3-ranking-list small,.trends-v3-creator-main small,.trends-v3-commented-list small){color:#aaa6c1!important}
html[data-theme="dark"] :is(.discover-v1-right-person,.discover-v1-right-people){border-color:rgba(255,255,255,.07)!important}
html[data-theme="dark"] :is(.discover-v1-community-icon,.discover-v1-community-arrow,.trends-v3-rank-box){
  background:rgba(146,105,255,.16)!important;
  border-color:rgba(185,149,255,.20)!important;
  color:#c7b0ff!important;
}

/* Popups / modales */
html[data-theme="dark"] :is(.guest-login-dialog,.click-user-welcome__card,.mobile-menu-sheet){
  background:linear-gradient(155deg,#2d2961,#181a3b)!important;
  color:#f5f2ff!important;
  border-color:rgba(255,255,255,.12)!important;
  box-shadow:0 28px 70px rgba(2,3,18,.42)!important;
}
html[data-theme="dark"] :is(.guest-login-backdrop,.click-user-welcome__backdrop,.mobile-menu-backdrop){background:rgba(4,5,18,.72)!important}
html[data-theme="dark"] .click-user-welcome__visual{background:linear-gradient(145deg,#393372,#1f1f4e)!important}
html[data-theme="dark"] :is(.guest-login-heading p,.click-user-welcome__content p,.click-user-welcome__content small){color:#b8b3ca!important}

/* LANDING: también morada, no gris. */
html[data-theme="dark"] .home-v38,
html[data-theme="dark"] .home-v37{
  background:radial-gradient(circle at 15% 0%,rgba(123,69,255,.17),transparent 28%),linear-gradient(180deg,#171737 0%,#17183c 52%,#12142f 100%)!important;
}
html[data-theme="dark"] :is(.home-v38-interest-card,.home-v38-community-card,.home-v37-community-card){
  background:#17182d!important;
  border-color:rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] :is(.home-v38-secondary,.home-v38-login,.home-v37-secondary){
  background:#1b1c3a!important;
  border-color:rgba(255,255,255,.12)!important;
  color:#d5c5ff!important;
}
html[data-theme="dark"] :is(.home-v38-chip-row span,.home-v37-chip-row span,.home-v38-band-cta){
  background:#222246!important;
  border-color:rgba(255,255,255,.10)!important;
  color:#cdbaff!important;
}

/* Barra inferior móvil: misma base oscura del perfil y SIN rectángulos blancos. */
@media(max-width:900px){
  html[data-theme="dark"] .mobile-nav-v39,
  html[data-theme="dark"] .community-v3-page .mobile-nav-v39,
  html[data-theme="dark"] .notifications-v4-page .mobile-nav-v39{
    background:rgba(20,20,48,.97)!important;
    border-color:rgba(255,255,255,.10)!important;
    box-shadow:0 14px 34px rgba(2,3,18,.42)!important;
  }
  html[data-theme="dark"] .mobile-nav-v39 a,
  html[data-theme="dark"] .community-v3-page .mobile-nav-v39 a,
  html[data-theme="dark"] .notifications-v4-page .mobile-nav-v39 a,
  html[data-theme="dark"] .mobile-nav-v39 a:hover,
  html[data-theme="dark"] .mobile-nav-v39 a.active{
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
    color:#aaa5be!important;
  }
  html[data-theme="dark"] .mobile-nav-v39 a b,
  html[data-theme="dark"] .community-v3-page .mobile-nav-v39 a b,
  html[data-theme="dark"] .notifications-v4-page .mobile-nav-v39 a b{
    background:#26264b!important;
    color:#b9abec!important;
    box-shadow:none!important;
  }
  html[data-theme="dark"] .mobile-nav-v39 a span,
  html[data-theme="dark"] .community-v3-page .mobile-nav-v39 a span,
  html[data-theme="dark"] .notifications-v4-page .mobile-nav-v39 a span{color:#aaa5be!important}
  html[data-theme="dark"] .mobile-nav-v39 a.active b,
  html[data-theme="dark"] .community-v3-page .mobile-nav-v39 a.active b,
  html[data-theme="dark"] .notifications-v4-page .mobile-nav-v39 a.active b{
    background:linear-gradient(145deg,#865fff,#6848ee)!important;
    color:#fff!important;
    box-shadow:0 8px 18px rgba(104,72,238,.30)!important;
  }
  html[data-theme="dark"] .mobile-nav-v39 a.active span,
  html[data-theme="dark"] .community-v3-page .mobile-nav-v39 a.active span,
  html[data-theme="dark"] .notifications-v4-page .mobile-nav-v39 a.active span{color:#9d79ff!important}
  html[data-theme="dark"] .mobile-nav-v39 .mobile-nav-create,
  html[data-theme="dark"] .mobile-nav-v39 .mobile-nav-create:hover{
    background:transparent!important;
  }
  html[data-theme="dark"] .mobile-nav-v39 .mobile-nav-create b{
    background:linear-gradient(145deg,#865fff,#6848ee)!important;
    color:#fff!important;
  }
}

/* Textos generales: blanco/morado, no gris claro. */
html[data-theme="dark"] :is(h1,h2,h3,h4,h5,h6,strong,b,label){color:#f5f2ff}
html[data-theme="dark"] :is(p,small,.muted,.sub,.lead){color:#b2aec6}
html[data-theme="dark"] a{color:#c1abff}
html[data-theme="dark"] .site-footer{border-color:rgba(255,255,255,.08)!important;color:#9691aa!important}

/* =========================================================
   CLICK · MODO OSCURO GLOBAL V3
   Misma lógica visual del perfil premium.
   El selector vive DENTRO de los menús, nunca flotante.
   ========================================================= */

/* Oculta cualquier toggle flotante antiguo que pudiera quedar cacheado. */
body > .click-theme-toggle{display:none!important}

/* Toggle integrado en menú */
.click-theme-menu-row{
  width:100%;min-height:48px;border:0;background:transparent;color:inherit;
  display:grid;grid-template-columns:34px minmax(0,1fr) 68px;align-items:center;gap:10px;
  padding:8px 10px;border-radius:13px;font:inherit;text-align:left;cursor:pointer;
}
.click-theme-menu-row:hover{background:rgba(123,82,238,.08)}
.click-theme-menu-copy{min-width:0;display:grid;gap:2px}
.click-theme-menu-copy b,.click-theme-menu-copy strong{font-size:13px;line-height:1.1;color:inherit}
.click-theme-menu-copy small{font-size:10px;line-height:1.15;color:#8b8fa8}
.click-theme-menu-icon{display:grid;place-items:center;font-size:18px}
.click-theme-menu-row .click-theme-toggle__track{width:64px;height:34px;justify-self:end}
.click-theme-menu-row .click-theme-toggle__thumb{top:3px;left:3px;width:28px;height:28px}
.click-theme-menu-row .click-theme-toggle__sun{left:9px;font-size:13px}
.click-theme-menu-row .click-theme-toggle__moon{right:9px;font-size:13px}
html[data-theme="dark"] .click-theme-menu-row .click-theme-toggle__thumb{transform:translateX(30px)}

.topbar-v5-account-menu .click-theme-menu-row{border-top:1px solid #ececf4;border-bottom:1px solid #ececf4;border-radius:0;padding:10px 12px}
.global-side-menu .click-theme-menu-row{margin-top:4px;border-top:1px solid #eeeef6;border-radius:0;padding:12px 10px}
.mobile-full-menu .click-theme-menu-row{grid-template-columns:40px minmax(0,1fr) 68px;border-top:1px solid #ececf4;border-bottom:1px solid #ececf4;border-radius:0;padding:12px 4px}
.mobile-full-menu .click-theme-menu-row>.click-theme-menu-icon{width:38px;height:38px;border-radius:12px;background:#f2edff;color:#6e51e6}

/* Paleta global: exactamente la familia visual del perfil */
html[data-theme="dark"]{background:#12142f!important;color-scheme:dark}
html[data-theme="dark"] body{
  --click-dark-bg:#12142f;
  --click-dark-bg2:#171737;
  --click-dark-panel:rgba(63,58,128,.88);
  --click-dark-panel2:rgba(31,31,82,.90);
  --click-dark-inner:#17182d;
  --click-dark-inner2:#111326;
  --click-dark-text:#f5f2ff;
  --click-dark-muted:#b9b5cd;
  --click-dark-line:rgba(255,255,255,.11);
  --click-dark-accent:#8d65ff;
  background:linear-gradient(180deg,#171737 0%,#17183c 52%,#12142f 100%)!important;
  color:var(--click-dark-text)!important;
}

/* CABECERA: misma sensación oscura del perfil en TODOS los PHP */
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .topbar-auth{
  background:rgba(22,22,55,.95)!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  box-shadow:0 10px 34px rgba(3,4,25,.26)!important;
  backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important;
}
html[data-theme="dark"] .topbar-v5-desktop{
  background:linear-gradient(155deg,rgba(52,48,110,.96),rgba(25,25,69,.98))!important;
  border-color:rgba(255,255,255,.11)!important;
  box-shadow:0 14px 38px rgba(4,5,31,.28)!important;
}
html[data-theme="dark"] .topbar-v5-brandzone,
html[data-theme="dark"] .topbar-v5-search,
html[data-theme="dark"] .topbar-v5-account summary{
  border-color:rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] .topbar-v5-search{background:rgba(13,14,38,.64)!important}
html[data-theme="dark"] .topbar-v5-search input{background:transparent!important;color:#f7f4ff!important}
html[data-theme="dark"] .topbar-v5-search input::placeholder{color:#aaa6c0!important}
html[data-theme="dark"] .topbar-v5-nav a{color:#d8d3ed!important}
html[data-theme="dark"] .topbar-v5-nav a b{color:#b9ace6!important}
html[data-theme="dark"] .topbar-v5-nav a:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}
html[data-theme="dark"] .topbar-v5-nav a.active{background:rgba(116,79,224,.24)!important;color:#d8caff!important}
html[data-theme="dark"] .topbar-v5-account-menu{
  background:linear-gradient(155deg,rgba(63,58,128,.98),rgba(31,31,82,.99))!important;
  border-color:rgba(255,255,255,.13)!important;color:#fff!important;
}
html[data-theme="dark"] .topbar-v5-account-menu a{color:#f4f0ff!important}
html[data-theme="dark"] .topbar-v5-account-menu a:hover{background:rgba(255,255,255,.08)!important}
html[data-theme="dark"] .topbar-v5-account-menu .click-theme-menu-row{border-color:rgba(255,255,255,.10)!important;color:#f4f0ff!important}

/* Header móvil igual al perfil */
html[data-theme="dark"] .topbar-v5-mobile,
html[data-theme="dark"] .topbar-auth-inner{
  background:transparent!important;
}
html[data-theme="dark"] .mobile-header-menu,
html[data-theme="dark"] .top-profile-pill{
  background:rgba(255,255,255,.08)!important;
  color:#eee9ff!important;border-color:rgba(255,255,255,.13)!important;
}
html[data-theme="dark"] .auth-brand-center{filter:drop-shadow(0 7px 16px rgba(0,0,0,.18))}

/* Menú lateral y menú hamburguesa = panel morado del perfil */
html[data-theme="dark"] .global-profile-card,
html[data-theme="dark"] .global-side-menu,
html[data-theme="dark"] .global-safety-card,
html[data-theme="dark"] .mobile-menu-sheet{
  background:linear-gradient(155deg,var(--click-dark-panel),var(--click-dark-panel2))!important;
  border-color:var(--click-dark-line)!important;
  color:#f5f2ff!important;
  box-shadow:0 18px 42px rgba(3,5,28,.20)!important;
}
html[data-theme="dark"] .global-level-card{background:rgba(15,17,49,.54)!important;border-color:var(--click-dark-line)!important}
html[data-theme="dark"] .global-profile-stats>div+div{border-color:var(--click-dark-line)!important}
html[data-theme="dark"] .global-side-menu a,
html[data-theme="dark"] .mobile-full-menu a{color:#ded9ef!important;border-color:rgba(255,255,255,.08)!important}
html[data-theme="dark"] .global-side-menu a:hover,
html[data-theme="dark"] .mobile-full-menu a:hover{background:rgba(255,255,255,.07)!important;color:#fff!important}
html[data-theme="dark"] .global-side-menu a.active,
html[data-theme="dark"] .mobile-full-menu a.active{background:rgba(126,87,235,.25)!important;color:#d5c4ff!important}
html[data-theme="dark"] .global-side-menu .click-theme-menu-row,
html[data-theme="dark"] .mobile-full-menu .click-theme-menu-row{border-color:rgba(255,255,255,.09)!important;color:#f5f2ff!important}
html[data-theme="dark"] .click-theme-menu-copy small{color:#aaa6c0!important}
html[data-theme="dark"] .mobile-full-menu .click-theme-menu-row>.click-theme-menu-icon{background:rgba(255,255,255,.08)!important;color:#d8c9ff!important}
html[data-theme="dark"] .mobile-security-note{background:rgba(13,15,47,.45)!important;border-color:rgba(255,255,255,.10)!important;color:#c9c4da!important}

/* Navegación inferior móvil sin cuadrados blancos */
html[data-theme="dark"] .mobile-nav,
html[data-theme="dark"] .mobile-nav-v39{
  background:rgba(18,19,45,.97)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  box-shadow:0 -12px 34px rgba(4,5,29,.34)!important;
  backdrop-filter:blur(18px)!important;-webkit-backdrop-filter:blur(18px)!important;
}
html[data-theme="dark"] .mobile-nav-v39 a{background:transparent!important;color:#aaa5c0!important}
html[data-theme="dark"] .mobile-nav-v39 a b{background:rgba(255,255,255,.07)!important;color:#bcb3da!important}
html[data-theme="dark"] .mobile-nav-v39 a.active{background:transparent!important;color:#9c70ff!important}
html[data-theme="dark"] .mobile-nav-v39 a.active b{background:#744de0!important;color:#fff!important}
html[data-theme="dark"] .mobile-nav-create{background:transparent!important}
html[data-theme="dark"] .mobile-nav-create b{background:linear-gradient(145deg,#6b4cdd,#8f58ef)!important;color:#fff!important;box-shadow:0 10px 28px rgba(85,59,206,.40)!important}

/* Superficies generales de TODOS los módulos compartidos */
html[data-theme="dark"] body:not(.profile-premium-v396) :is(
  .home-v39-card,.classic-box,.composer,.rail-card,.right-rail>section,.profile-mini,
  .discover-v1-card,.discover-v1-section-card,.discover-v1-mobile-list,.discover-v1-mobile-popular,.discover-v1-mobile-tags,.discover-v1-mobile-banner,
  .communities-v2-titlebar,.communities-v2-featured,.communities-v2-card,.communities-v2-side-card,
  .community-v3-hero,.community-v3-card,.community-v3-side-card,
  .story-v2-hero,.story-v2-topics,.story-v2-card,.story-v2-panel,
  .trends-v3-hero,.trends-v3-board,.trends-v3-side-card,.trends-v3-rail-card,.trends-v3-more-wrap details,
  .polls-v3-hero,.polls-v3-create-panel,.polls-v3-card,.polls-v3-side-card,
  .events-v4-hero,.events-v4-card,.events-v4-side-card,
  .games-v3-hero,.games-v3-picker,.games-v3-card,.games-v3-side-card,
  .badges-v2-hero,.badges-v2-level-card,.badges-v2-equipped,.badges-v2-card,.badges-v2-side-card,
  .market-v1-hero,.market-v1-wallet-card,.market-v1-card,.market-v1-side-card,
  .notifications-v4-hero,.notifications-v4-timeline-card,.notifications-v4-card,.notifications-v4-empty,
  .edit-profile-v1-side,.edit-profile-v1-card,.edit-profile-v1-head,
  .landscape-manager,.rules-page .classic-box
){
  background:linear-gradient(155deg,var(--click-dark-panel),var(--click-dark-panel2))!important;
  border-color:var(--click-dark-line)!important;
  color:var(--click-dark-text)!important;
  box-shadow:0 18px 42px rgba(3,5,28,.20)!important;
}

/* Posts y contenido interior: oscuro más profundo como en perfil */
html[data-theme="dark"] :is(.post-card,.comment-content,.poll-box,.trends-v3-mini-card){
  background:var(--click-dark-inner)!important;
  border-color:rgba(255,255,255,.09)!important;
  color:#f7f4ff!important;
}
html[data-theme="dark"] .post-actions,
html[data-theme="dark"] .comments,
html[data-theme="dark"] .comment-form{
  background:#13152b!important;border-color:rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] .post-actions button{background:rgba(255,255,255,.04)!important;color:#b9b5ca!important}
html[data-theme="dark"] .post-actions button:hover{background:rgba(255,255,255,.08)!important;color:#fff!important}
html[data-theme="dark"] .post-delete-button{background:#3b2536!important;color:#ffb7ca!important}

/* Tipografía */
html[data-theme="dark"] :is(h1,h2,h3,h4,h5,h6,strong,b,label){color:#f7f4ff}
html[data-theme="dark"] :is(p,small,.muted,.sub,.lead){color:#bbb6d0}
html[data-theme="dark"] :is(.post-author span,.comment small,.post-stats,.composer-bottom){color:#aaa6bc!important}
html[data-theme="dark"] :is(.post-body,.comment-content,.post-author a strong,.comment-content a strong){color:#f4f1fb!important}

/* Formularios */
html[data-theme="dark"] :is(input,textarea,select){background:#111326!important;color:#f6f3ff!important;border-color:rgba(255,255,255,.12)!important}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#8f8ba5!important}
html[data-theme="dark"] :is(input,textarea,select):focus{border-color:#8865ef!important;box-shadow:0 0 0 3px rgba(132,96,238,.16)!important}

/* Modales / popup */
html[data-theme="dark"] .guest-login-dialog,
html[data-theme="dark"] .click-user-welcome__card,
html[data-theme="dark"] .post-viewer-modal,
html[data-theme="dark"] .post-viewer-card{
  background:linear-gradient(155deg,rgba(63,58,128,.98),rgba(31,31,82,.99))!important;
  border-color:rgba(255,255,255,.12)!important;color:#f6f3ff!important;
}
html[data-theme="dark"] .guest-login-backdrop,
html[data-theme="dark"] .click-user-welcome__backdrop,
html[data-theme="dark"] .mobile-menu-backdrop{background:rgba(5,6,24,.76)!important}

/* Perfil: conservar exactamente su estilo propio, solo el menú global comparte paleta */
html[data-theme="dark"] body.profile-premium-v396{
  background:linear-gradient(180deg,#171737 0%,#17183c 55%,#12142f 100%)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .topbar-auth{
  background:rgba(22,22,55,.95)!important;border-bottom-color:rgba(255,255,255,.08)!important;
}

/* Landing si el usuario usa el tema antes de iniciar sesión */
html[data-theme="dark"] .home-v38{background:linear-gradient(180deg,#171737 0%,#17183c 52%,#12142f 100%)!important;color:#f5f2ff!important}
html[data-theme="dark"] :is(.home-v38-header,.home-v38-hero,.home-v38-stats-band,.home-v38-interests,.home-v38-communities,.home-v38-why article){background:linear-gradient(155deg,var(--click-dark-panel),var(--click-dark-panel2))!important;border-color:var(--click-dark-line)!important}
html[data-theme="dark"] :is(.home-v38-interest-card,.home-v38-community-card){background:#17182d!important;border-color:rgba(255,255,255,.09)!important}

@media(max-width:900px){
  .click-theme-menu-row--account{display:none}
  html[data-theme="dark"] .topbar-auth{background:rgba(22,22,55,.95)!important}
}

/* =========================================================
   CLICK · MODO OSCURO GLOBAL V4
   Corrección de coherencia: replica el lenguaje del perfil.
   ========================================================= */

/* Fondo general idéntico en espíritu al perfil premium */
html[data-theme="dark"] body:not(.profile-premium-v396){
  background:
    radial-gradient(circle at 18% 8%,rgba(78,211,255,.16),transparent 24%),
    radial-gradient(circle at 84% 12%,rgba(219,91,255,.15),transparent 26%),
    radial-gradient(circle at 50% 95%,rgba(89,51,211,.22),transparent 34%),
    linear-gradient(145deg,#12143f 0%,#1a1b58 36%,#26216c 65%,#10143d 100%)!important;
  background-attachment:fixed!important;
}

/* ---------- CABECERA PC: usa la MISMA barra oscura base del perfil ---------- */
@media (min-width:761px){
  html[data-theme="dark"] body .topbar.topbar-auth{
    background:linear-gradient(180deg,rgba(24,13,62,.98),rgba(17,9,45,.98))!important;
    border:0!important;
    box-shadow:0 9px 28px rgba(11,5,33,.24)!important;
  }
  html[data-theme="dark"] body .topbar.topbar-auth > .topbar-v5-desktop{
    border:1px solid rgba(137,84,234,.34)!important;
    background:linear-gradient(100deg,rgba(43,17,91,.98) 0 18%,rgba(10,8,29,.98) 25% 100%)!important;
    box-shadow:0 16px 42px rgba(8,4,28,.30),inset 0 1px 0 rgba(255,255,255,.035)!important;
  }
  html[data-theme="dark"] .topbar-v5-brandzone{
    background:radial-gradient(circle at 22% 25%,rgba(152,61,255,.26),transparent 38%),linear-gradient(120deg,#35106d,#22084e 72%,#160836)!important;
  }
  html[data-theme="dark"] .topbar-v5-brandzone:after{background:#0b081e!important;border-left:1px solid rgba(154,70,255,.48)!important}
  html[data-theme="dark"] .topbar-v5-tagline{color:#f6efff!important}
  html[data-theme="dark"] .topbar-v5-tagline span:nth-child(2){color:#d8c8ff!important}
  html[data-theme="dark"] .topbar-v5-tagline span:nth-child(3){color:#b99aff!important}
  html[data-theme="dark"] .topbar-v5-search{border-color:rgba(150,121,207,.44)!important;background:rgba(255,255,255,.055)!important}
  html[data-theme="dark"] .topbar-v5-search input{color:#f5f1ff!important}
  html[data-theme="dark"] .topbar-v5-search input::placeholder{color:#958baa!important}
  html[data-theme="dark"] .topbar-v5-search-icon{color:#ab91e5!important}
  html[data-theme="dark"] .topbar-v5-nav a{color:#cfc8e4!important;background:transparent!important}
  html[data-theme="dark"] .topbar-v5-nav a b{color:#d7c8ff!important}
  html[data-theme="dark"] .topbar-v5-nav a:hover{color:#fff!important;background:rgba(255,255,255,.055)!important}
  html[data-theme="dark"] .topbar-v5-nav a.active{color:#fff!important;background:linear-gradient(180deg,rgba(130,64,240,.12),transparent)!important}
  html[data-theme="dark"] .topbar-v5-nav a.active b{color:#bb67ff!important}
  html[data-theme="dark"] .topbar-v5-account summary{border-left-color:rgba(255,255,255,.13)!important}
  html[data-theme="dark"] .topbar-v5-account-menu{background:#17102d!important;border-color:rgba(143,94,222,.34)!important}
}

/* ---------- CABECERA MÓVIL: mismo tratamiento del perfil ---------- */
@media(max-width:760px){
  html[data-theme="dark"] body .topbar.topbar-auth{
    min-height:88px!important;
    background:rgba(30,29,82,.72)!important;
    backdrop-filter:blur(22px)!important;
    -webkit-backdrop-filter:blur(22px)!important;
    border-bottom:1px solid rgba(255,255,255,.16)!important;
    box-shadow:0 16px 38px rgba(7,8,32,.24)!important;
  }
  html[data-theme="dark"] .topbar-auth .topbar-inner{height:88px!important;padding:0 18px!important}
  html[data-theme="dark"] .mobile-header-menu{
    width:52px!important;height:52px!important;border-radius:18px!important;
    background:rgba(255,255,255,.10)!important;color:#fff!important;
    border:1px solid rgba(255,255,255,.10)!important;box-shadow:none!important;
  }
  html[data-theme="dark"] .topbar-auth .auth-brand-center{position:absolute!important;left:50%!important;transform:translateX(-50%)!important;margin:0!important}
  html[data-theme="dark"] .topbar-auth .auth-brand-center img{height:50px!important;width:auto!important;filter:drop-shadow(0 8px 16px rgba(5,5,30,.22))!important}
  html[data-theme="dark"] .top-profile-pill{
    margin-left:auto!important;padding:6px!important;border-radius:50%!important;
    background:rgba(255,255,255,.10)!important;border:1px solid rgba(255,255,255,.18)!important;
    width:58px!important;height:58px!important;justify-content:center!important;
  }
  html[data-theme="dark"] .top-profile-pill .avatar{width:46px!important;height:46px!important;border-radius:14px!important}
  html[data-theme="dark"] .top-profile-pill i{display:none!important}
  html[data-theme="dark"] .mobile-menu-sheet{
    background:linear-gradient(155deg,rgba(63,58,128,.98),rgba(31,31,82,.99))!important;
    border-color:rgba(255,255,255,.13)!important;
    box-shadow:0 22px 58px rgba(3,5,28,.48)!important;
  }
  html[data-theme="dark"] .mobile-menu-head{border-color:rgba(255,255,255,.10)!important}
  html[data-theme="dark"] .mobile-menu-user strong{color:#fff!important}
  html[data-theme="dark"] .mobile-menu-user span{color:#b9b4cf!important}
  html[data-theme="dark"] .mobile-menu-close{background:rgba(255,255,255,.08)!important;color:#fff!important}
  html[data-theme="dark"] .mobile-menu-handle{background:rgba(255,255,255,.22)!important}
}

/* ---------- INICIO V39 ---------- */
html[data-theme="dark"] body.app-home-v39{color:#f7f5ff!important}
html[data-theme="dark"] body.app-home-v39 .home-v39-card{
  background:linear-gradient(155deg,rgba(63,58,128,.88),rgba(31,31,82,.92))!important;
  border-color:rgba(255,255,255,.14)!important;
  box-shadow:0 20px 48px rgba(4,8,34,.22)!important;
}
html[data-theme="dark"] body.app-home-v39 :is(.home-v39-card h3,.home-v39-profile-head strong,.home-v39-community-copy strong,.home-v39-community-tile strong,.home-v39-person-main strong){color:#fff!important}
html[data-theme="dark"] body.app-home-v39 :is(.home-v39-profile-head small,.home-v39-empty-note,.home-v39-community-copy small,.home-v39-community-tile small,.home-v39-person-main small,.home-v39-tags-grid small,.home-v39-composer-meta,.home-v39-composer-meta small){color:#b9b4cf!important}

/* Nivel: legible y con la misma tarjeta glass del perfil */
html[data-theme="dark"] body.app-home-v39 .home-v39-level-block{
  background:linear-gradient(145deg,rgba(83,73,155,.48),rgba(44,38,112,.54))!important;
  border-color:rgba(255,255,255,.16)!important;
}
html[data-theme="dark"] body.app-home-v39 .home-v39-level-block span{color:#d7d1ef!important}
html[data-theme="dark"] body.app-home-v39 .home-v39-level-block b{color:#fff!important;text-shadow:0 1px 8px rgba(0,0,0,.16)!important}
html[data-theme="dark"] body.app-home-v39 .home-v39-level-block div{background:rgba(255,255,255,.13)!important}
html[data-theme="dark"] body.app-home-v39 .home-v39-mini-stats div{
  background:rgba(18,20,54,.48)!important;border-color:rgba(255,255,255,.10)!important
}
html[data-theme="dark"] body.app-home-v39 .home-v39-mini-stats b{color:#fff!important}
html[data-theme="dark"] body.app-home-v39 .home-v39-mini-stats span{color:#b6b0cb!important}

/* Composer: imagen/video y encuesta dejan de ser blancos lavados */
html[data-theme="dark"] body.app-home-v39 .home-v39-composer-card{
  background:linear-gradient(155deg,rgba(70,63,142,.92),rgba(35,33,89,.96))!important;
}
html[data-theme="dark"] body.app-home-v39 .home-v39-composer-top textarea{
  background:#12142f!important;color:#f8f5ff!important;border-color:rgba(255,255,255,.15)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03)!important
}
html[data-theme="dark"] body.app-home-v39 .home-v39-tool-pill{
  background:rgba(17,19,52,.72)!important;border:1px solid rgba(255,255,255,.13)!important;
  color:#ddd4ff!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.03)!important
}
html[data-theme="dark"] body.app-home-v39 .home-v39-tool-pill:hover{background:rgba(123,87,235,.24)!important;color:#fff!important}
html[data-theme="dark"] body.app-home-v39 .home-v39-feed-tabs a{background:rgba(19,21,54,.48)!important;color:#bfb9d4!important}
html[data-theme="dark"] body.app-home-v39 .home-v39-feed-tabs a.active{background:rgba(126,87,235,.28)!important;color:#fff!important}

/* Inicio: comunidades, tags y recomendaciones */
html[data-theme="dark"] body.app-home-v39 :is(.home-v39-community-row,.home-v39-community-tile,.home-v39-tags-grid a){
  background:rgba(17,19,52,.58)!important;border-color:rgba(255,255,255,.10)!important
}
html[data-theme="dark"] body.app-home-v39 .home-v39-tags-grid strong{color:#c6b3ff!important}
html[data-theme="dark"] body.app-home-v39 .home-v39-follow-button{
  background:rgba(124,83,228,.22)!important;color:#e5dbff!important;border:1px solid rgba(190,161,255,.18)!important
}
html[data-theme="dark"] body.app-home-v39 .home-v39-benefit-item{
  background:linear-gradient(155deg,rgba(63,58,128,.82),rgba(31,31,82,.86))!important;border-color:rgba(255,255,255,.12)!important
}
html[data-theme="dark"] body.app-home-v39 .home-v39-benefit-item h3{color:#d4c4ff!important}
html[data-theme="dark"] body.app-home-v39 .home-v39-benefit-item p{color:#b6b1c9!important}

/* ---------- COMUNIDADES ---------- */
html[data-theme="dark"] body.communities-v2-page{color:#f7f5ff!important}
html[data-theme="dark"] body.communities-v2-page :is(.communities-v2-toolbar,.communities-v2-card,.communities-v2-owned,.communities-v2-categories,.communities-v2-points,.communities-v2-create-callout,.communities-v2-empty){
  background:linear-gradient(155deg,rgba(63,58,128,.88),rgba(31,31,82,.92))!important;
  border-color:rgba(255,255,255,.13)!important;color:#f7f5ff!important
}
html[data-theme="dark"] body.communities-v2-page :is(.communities-v2-titlebar h1,.communities-v2-card-title h3 a,.communities-v2-owned h2,.communities-v2-categories h2,.communities-v2-empty strong,.communities-v2-create-callout strong){color:#fff!important}
html[data-theme="dark"] body.communities-v2-page :is(.communities-v2-titlebar p,.communities-v2-card-copy p,.communities-v2-card-copy small,.communities-v2-points p,.communities-v2-create-callout p,.communities-v2-empty p){color:#b9b4cf!important}
html[data-theme="dark"] body.communities-v2-page :is(.communities-v2-filter-form select,.communities-v2-mobile-search){background:#12142f!important;border-color:rgba(255,255,255,.13)!important;color:#f6f3ff!important}
html[data-theme="dark"] body.communities-v2-page .communities-v2-mobile-search input{background:transparent!important;color:#f6f3ff!important}
html[data-theme="dark"] body.communities-v2-page .communities-v2-view-switch{background:rgba(17,19,52,.56)!important;border-color:rgba(255,255,255,.10)!important}
html[data-theme="dark"] body.communities-v2-page .communities-v2-view-switch a{color:#bdb7d2!important}
html[data-theme="dark"] body.communities-v2-page .communities-v2-view-switch a.active{background:rgba(126,87,235,.28)!important;color:#fff!important}
html[data-theme="dark"] body.communities-v2-page .communities-v2-card-action :is(button,a){background:#151735!important;border-color:rgba(255,255,255,.12)!important;color:#d5c4ff!important}
html[data-theme="dark"] body.communities-v2-page .communities-v2-categories a{color:#d8d2e9!important}
html[data-theme="dark"] body.communities-v2-page .communities-v2-categories a:hover{background:rgba(255,255,255,.06)!important}
html[data-theme="dark"] body.communities-v2-page .communities-v2-categories a.active{background:rgba(126,87,235,.25)!important;color:#fff!important}
html[data-theme="dark"] body.communities-v2-page .communities-v2-categories a small{color:#aaa4bd!important}
html[data-theme="dark"] body.communities-v2-page .communities-v2-points>span{color:#d8d2e9!important}
html[data-theme="dark"] body.communities-v2-page .communities-v2-points>strong{color:#b99aff!important}

/* Página individual de comunidad */
html[data-theme="dark"] body.community-v3-page :is(.community-v2-hero,.community-v2-composer-card,.community-v2-rail-card,.community-v2-empty){
  background:linear-gradient(155deg,rgba(63,58,128,.88),rgba(31,31,82,.92))!important;border-color:rgba(255,255,255,.13)!important
}
html[data-theme="dark"] body.community-v3-page :is(.community-v2-title-row h1,.community-v2-rail-title,.community-v2-info-grid b,.community-v2-activity-list strong){color:#fff!important}
html[data-theme="dark"] body.community-v3-page :is(.community-v2-copy p,.community-v2-stats,.community-v2-rules-list li,.community-v2-info-grid span,.community-v2-activity-list p,.community-v2-activity-list small){color:#b9b4cf!important}
html[data-theme="dark"] body.community-v3-page .community-v2-composer-top textarea{background:#12142f!important;border-color:rgba(255,255,255,.13)!important;color:#fff!important}
html[data-theme="dark"] body.community-v3-page .community-v2-composer-tools span{background:#171936!important;border-color:rgba(255,255,255,.11)!important;color:#d7d0e9!important}
html[data-theme="dark"] body.community-v3-page .community-v2-tag-grid a{background:#151735!important;border-color:rgba(255,255,255,.10)!important}
html[data-theme="dark"] body.community-v3-page .community-v2-tag-grid small{color:#aaa5bd!important}

/* ---------- TIENDA: Tu meta + Marcos Premium + productos ---------- */
html[data-theme="dark"] body.market-v1-page :is(.market-v1-wallet-card,.market-v1-tabs,.market-v1-product,.market-v1-history,.market-v1-notice,.market-v1-redeem-card,.market-v1-side-card,.market-v1-frame-zone,.market-v1-frame-card){
  background:linear-gradient(155deg,rgba(63,58,128,.90),rgba(31,31,82,.94))!important;
  border-color:rgba(255,255,255,.13)!important;color:#f7f5ff!important;
  box-shadow:0 18px 42px rgba(3,5,28,.20)!important
}
html[data-theme="dark"] body.market-v1-page :is(.market-v1-wallet-card strong,.market-v1-product h3,.market-v1-section-title h2,.market-v1-redeem-card h2,.market-v1-side-card h2,.market-v1-side-card p b,.market-v1-frame-meta h3,.market-v1-history-list p b,.market-v1-notice strong){color:#fff!important}
html[data-theme="dark"] body.market-v1-page :is(.market-v1-wallet-card span,.market-v1-wallet-card small,.market-v1-product p,.market-v1-history-list p small,.market-v1-notice p,.market-v1-redeem-card>p,.market-v1-redeem-card>small,.market-v1-side-card p,.market-v1-side-card small,.market-v1-frame-copy,.market-v1-frame-meta p){color:#b9b4cf!important}
html[data-theme="dark"] body.market-v1-page .market-v1-tabs button{color:#c9c3dc!important}
html[data-theme="dark"] body.market-v1-page .market-v1-tabs button.active{color:#d5c2ff!important}
html[data-theme="dark"] body.market-v1-page .market-v1-product-icon{background:rgba(255,255,255,.08)!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.10)!important}
html[data-theme="dark"] body.market-v1-page .market-v1-btn.secondary{background:#151735!important;border-color:rgba(255,255,255,.12)!important;color:#d6c5ff!important}
html[data-theme="dark"] body.market-v1-page .market-v1-history-list>div{background:#151735!important;border-color:rgba(255,255,255,.09)!important}

/* Tu meta */
html[data-theme="dark"] body.market-v1-page .market-v1-redeem-value{background:rgba(16,18,48,.62)!important;border:1px solid rgba(255,255,255,.09)!important}
html[data-theme="dark"] body.market-v1-page .market-v1-redeem-value small{color:#b1acc3!important}
html[data-theme="dark"] body.market-v1-page .market-v1-redeem-value strong{color:#c5adff!important}
html[data-theme="dark"] body.market-v1-page .market-v1-redeem-progress{background:rgba(255,255,255,.12)!important}
html[data-theme="dark"] body.market-v1-page .market-v1-redeem-card>button{background:rgba(255,255,255,.08)!important;color:#a9a4ba!important}

/* Marcos premium */
html[data-theme="dark"] body.market-v1-page .market-v1-frame-card{background:linear-gradient(145deg,#17182d,#202049)!important}
html[data-theme="dark"] body.market-v1-page .market-v1-frame-meta span{background:rgba(141,101,255,.18)!important;color:#d3c4ff!important}
html[data-theme="dark"] body.market-v1-page .market-v1-frame-footer>b{color:#c9b7ff!important}

/* ---------- HISTORIAS ---------- */
html[data-theme="dark"] body.click-stories-reddit-v2-page{background:transparent!important;color:#f7f5ff!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page :is(.story-v2-hero,.story-v2-create,.story-v2-featured-card,.story-v2-feed-card,.story-v2-side-card,.story-v2-comments,.story-v2-empty){
  background:linear-gradient(155deg,rgba(63,58,128,.88),rgba(31,31,82,.92))!important;
  border-color:rgba(255,255,255,.13)!important;color:#f7f5ff!important;
  box-shadow:0 16px 38px rgba(4,8,34,.18)!important
}
html[data-theme="dark"] body.click-stories-reddit-v2-page :is(.story-v2-hero h1,.story-v2-section h2,.story-v2-featured-body h3 a,.story-v2-feed-card h2 a,.story-v2-side-card h3,.story-v2-my-list strong,.story-v2-topic-list strong,.story-v2-comment a){color:#fff!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page :is(.story-v2-hero p,.story-v2-hero-action small,.story-v2-create>summary small,.story-v2-section header small,.story-v2-featured-body p,.story-v2-author small,.story-v2-story-copy,.story-v2-my-list small,.story-v2-topic-list small,.story-v2-community-note small,.story-v2-muted,.story-v2-comment small,.story-v2-comment p){color:#b9b4cf!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-topics a{background:#171936!important;border-color:rgba(255,255,255,.11)!important;color:#d8d2e9!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-topics a.active{background:linear-gradient(135deg,#7a4df0,#a84be2)!important;color:#fff!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-create form{border-color:rgba(255,255,255,.10)!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-create label{color:#d8d2e9!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page :is(.story-v2-create input,.story-v2-create textarea,.story-v2-create select,.story-v2-comment-form textarea){background:#12142f!important;border-color:rgba(255,255,255,.13)!important;color:#fff!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-order{background:#171936!important;border-color:rgba(255,255,255,.10)!important;color:#d4cee5!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-card-meta>span,
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-card-meta>a{background:rgba(126,87,235,.22)!important;color:#d4c2ff!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page :is(.story-v2-love,.story-v2-comment-link,.story-v2-read){background:#171936!important;border-color:rgba(255,255,255,.10)!important;color:#d5c9e6!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-love{color:#ff91b0!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-love.active{background:rgba(225,69,113,.18)!important;color:#ff9eb9!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-my-list>a,
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-comment{border-color:rgba(255,255,255,.08)!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-topic-list>a>b{background:rgba(126,87,235,.18)!important;color:#d2c1ff!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-community-note{background:rgba(126,87,235,.15)!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-admin-menu>summary{background:#171936!important;border-color:rgba(255,255,255,.10)!important;color:#ddd4ec!important}
html[data-theme="dark"] body.click-stories-reddit-v2-page .story-v2-admin-menu>div{background:#17182d!important;border-color:rgba(255,255,255,.12)!important}

/* ---------- TAGS Y CHIPS GLOBALES ---------- */
html[data-theme="dark"] :is(.tag,.community-chip,.market-v1-chip,.badge-chip,.topic-chip){
  background:rgba(126,87,235,.18)!important;border-color:rgba(188,157,255,.20)!important;color:#d7c7ff!important
}
html[data-theme="dark"] :is(.tag-cloud,.home-v39-tags-grid,.communities-v2-tag-grid){color:#e9e4f5!important}

/* ---------- OTROS MÓDULOS: evitar superficies blancas residuales ---------- */
html[data-theme="dark"] body:not(.profile-premium-v396) :is(
  .polls-v3-option,.polls-v3-answer,.polls-v3-filter,.events-v4-filter,.events-v4-item,
  .games-v3-game,.games-v3-option,.badges-v2-item,.badges-v2-badge,
  .notifications-v4-item,.edit-profile-v1-section,.explore-v401-card,.explore-v402-card,
  .form-box,.auth-card,.rules-page .classic-box
){background:#17182d!important;border-color:rgba(255,255,255,.10)!important;color:#f6f3ff!important}

/* Contraste seguro para textos claros que el CSS de cada módulo fuerza */
html[data-theme="dark"] body:not(.profile-premium-v396) :is(
  .home-v39-card,.communities-v2-page,.community-v3-page,.market-v1-page,.click-stories-reddit-v2-page,
  .discover-v1-page,.polls-v3-page,.events-v4-page,.games-v3-page,.badges-v2-page,.notifications-v4-page,
  .trends-v3-page,.edit-profile-v1-page
) :is(h1,h2,h3,h4,strong,b){color:#fff}


/* =========================================================
   CLICK · FIX MENÚ + SELECTOR TEMA V5
   Móvil: panel oscuro tipo perfil, sin tarjetas blancas.
   PC: selector de tema legible dentro del menú de cuenta.
   ========================================================= */

/* ---------- PC: menú de cuenta más ancho y selector legible ---------- */
@media (min-width:761px){
  .topbar-v5-account-menu{
    width:236px!important;
    padding:9px!important;
  }
  .topbar-v5-account-menu .click-theme-menu-row{
    min-height:58px!important;
    grid-template-columns:28px minmax(78px,1fr) 64px!important;
    gap:8px!important;
    padding:10px 8px!important;
  }
  .topbar-v5-account-menu .click-theme-menu-icon{
    width:28px!important;
    height:28px!important;
    font-size:17px!important;
  }
  .topbar-v5-account-menu .click-theme-menu-copy{
    min-width:78px!important;
    overflow:visible!important;
  }
  .topbar-v5-account-menu .click-theme-menu-copy b,
  .topbar-v5-account-menu .click-theme-menu-copy strong{
    display:block!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    font-size:12px!important;
    line-height:1.15!important;
    color:inherit!important;
  }
  .topbar-v5-account-menu .click-theme-menu-copy small{
    display:block!important;
    white-space:normal!important;
    font-size:9px!important;
    line-height:1.15!important;
    margin-top:2px!important;
  }
  .topbar-v5-account-menu .click-theme-toggle__track{
    width:62px!important;
    height:34px!important;
  }
}

/* ---------- MÓVIL: menú completo con estética del perfil ---------- */
@media (max-width:760px){
  html[data-theme="dark"] .mobile-menu-sheet{
    left:14px!important;
    right:14px!important;
    bottom:calc(86px + env(safe-area-inset-bottom))!important;
    max-height:min(78dvh,720px)!important;
    padding:10px 12px 14px!important;
    border-radius:28px!important;
    background:linear-gradient(155deg,rgba(68,61,139,.98),rgba(34,34,88,.99))!important;
    border:1px solid rgba(255,255,255,.16)!important;
    box-shadow:0 24px 65px rgba(2,3,24,.48)!important;
  }

  html[data-theme="dark"] .mobile-menu-handle{
    width:52px!important;
    height:5px!important;
    margin:1px auto 10px!important;
    background:rgba(220,214,255,.42)!important;
  }

  html[data-theme="dark"] .mobile-menu-head{
    padding:7px 4px 13px!important;
    border-bottom:1px solid rgba(255,255,255,.11)!important;
  }
  html[data-theme="dark"] .mobile-menu-user strong{
    color:#fff!important;
    font-size:14px!important;
  }
  html[data-theme="dark"] .mobile-menu-user span{
    color:#c3bdd7!important;
    font-size:11px!important;
  }
  html[data-theme="dark"] .mobile-menu-user .avatar{
    border:3px solid #fff!important;
    box-shadow:0 0 0 1px rgba(164,121,255,.65)!important;
  }
  html[data-theme="dark"] .mobile-menu-close{
    width:42px!important;
    height:42px!important;
    background:rgba(255,255,255,.09)!important;
    color:#fff!important;
    border:1px solid rgba(255,255,255,.08)!important;
  }

  html[data-theme="dark"] .mobile-full-menu{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    padding:12px 0 4px!important;
  }

  /* Quita completamente las tarjetas blancas del CSS base */
  html[data-theme="dark"] .mobile-full-menu > a{
    min-height:54px!important;
    padding:10px 12px!important;
    gap:8px!important;
    border:1px solid rgba(255,255,255,.08)!important;
    border-radius:14px!important;
    background:rgba(13,15,50,.34)!important;
    color:#eeeaff!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
  }
  html[data-theme="dark"] .mobile-full-menu > a b{
    color:#cfc2ff!important;
    font-size:17px!important;
  }
  html[data-theme="dark"] .mobile-full-menu > a span{
    color:#f0ecff!important;
    font-weight:800!important;
  }
  html[data-theme="dark"] .mobile-full-menu > a:hover{
    background:rgba(255,255,255,.08)!important;
    border-color:rgba(255,255,255,.14)!important;
  }
  html[data-theme="dark"] .mobile-full-menu > a.active{
    background:linear-gradient(135deg,rgba(132,91,242,.42),rgba(102,74,211,.28))!important;
    border-color:rgba(175,143,255,.42)!important;
    color:#fff!important;
    box-shadow:0 8px 20px rgba(24,18,74,.16)!important;
  }
  html[data-theme="dark"] .mobile-full-menu > a.active b,
  html[data-theme="dark"] .mobile-full-menu > a.active span{
    color:#fff!important;
  }

  /* Selector de tema en una fila completa y legible */
  .mobile-full-menu .click-theme-menu-row--mobile{
    grid-column:1 / -1!important;
    min-height:64px!important;
    grid-template-columns:42px minmax(0,1fr) 68px!important;
    gap:10px!important;
    margin-top:2px!important;
    padding:10px 12px!important;
    border-radius:15px!important;
  }
  html[data-theme="dark"] .mobile-full-menu .click-theme-menu-row--mobile{
    background:rgba(14,15,48,.42)!important;
    border:1px solid rgba(255,255,255,.09)!important;
    color:#fff!important;
  }
  html[data-theme="dark"] .mobile-full-menu .click-theme-menu-row--mobile:hover{
    background:rgba(255,255,255,.08)!important;
  }
  html[data-theme="dark"] .mobile-full-menu .click-theme-menu-row--mobile>.click-theme-menu-icon{
    width:40px!important;
    height:40px!important;
    border-radius:13px!important;
    background:rgba(141,101,255,.18)!important;
    color:#ddceff!important;
  }
  .mobile-full-menu .click-theme-menu-copy{
    min-width:0!important;
    display:grid!important;
    gap:2px!important;
  }
  html[data-theme="dark"] .mobile-full-menu .click-theme-menu-copy strong,
  html[data-theme="dark"] .mobile-full-menu .click-theme-menu-copy b{
    color:#fff!important;
    font-size:14px!important;
    line-height:1.15!important;
    white-space:normal!important;
  }
  html[data-theme="dark"] .mobile-full-menu .click-theme-menu-copy small{
    color:#bbb5d0!important;
    font-size:10px!important;
  }

  /* Salir ocupa toda la fila para evitar huecos raros */
  html[data-theme="dark"] .mobile-full-menu > a[href="/logout.php"]{
    grid-column:1 / -1!important;
    background:rgba(114,35,70,.22)!important;
    border-color:rgba(255,134,169,.14)!important;
  }
  html[data-theme="dark"] .mobile-full-menu > a[href="/logout.php"] span,
  html[data-theme="dark"] .mobile-full-menu > a[href="/logout.php"] b{
    color:#ffb4c9!important;
  }

  html[data-theme="dark"] .mobile-security-note{
    margin-top:10px!important;
    padding:12px 14px!important;
    border-radius:14px!important;
    background:rgba(10,12,42,.48)!important;
    border:1px solid rgba(255,255,255,.08)!important;
    color:#c9c3dc!important;
  }
  html[data-theme="dark"] .mobile-security-note strong{color:#fff!important}

  /* El dock inferior conserva el mismo negro/morado del perfil */
  html[data-theme="dark"] .mobile-nav-v39{
    background:rgba(13,14,38,.97)!important;
    border-color:rgba(255,255,255,.09)!important;
    box-shadow:0 -12px 36px rgba(2,3,24,.42)!important;
  }
}

/* =========================================================
   CLICK · MENÚ LATERAL GLOBAL V6
   Unifica Inicio V39 y renderLeftNav con la estética oscura
   del perfil premium aprobada por el usuario.
   ========================================================= */
@media (min-width:761px){
  /* Fondo/panel principal del rail */
  html[data-theme="dark"] :is(.global-profile-card,.global-side-menu),
  html[data-theme="dark"] body.app-home-v39 :is(.home-v39-profile-card,.home-v39-side-menu){
    background:linear-gradient(155deg,rgba(61,51,126,.98),rgba(38,34,91,.99))!important;
    border:1px solid rgba(181,158,255,.20)!important;
    border-radius:26px!important;
    box-shadow:0 18px 44px rgba(5,7,35,.24)!important;
  }

  /* Identidad */
  html[data-theme="dark"] .global-profile-copy strong,
  html[data-theme="dark"] body.app-home-v39 .home-v39-profile-head strong{
    color:#fff!important;
    text-shadow:0 1px 8px rgba(0,0,0,.12)!important;
  }
  html[data-theme="dark"] .global-profile-copy a,
  html[data-theme="dark"] body.app-home-v39 .home-v39-profile-head a{
    color:#c8a9ff!important;
  }
  html[data-theme="dark"] :is(.global-profile-avatar,.home-v39-profile-head .avatar){
    border:3px solid #fff!important;
    box-shadow:0 0 0 1px rgba(170,130,255,.58),0 8px 20px rgba(7,8,40,.20)!important;
  }

  /* Nivel */
  html[data-theme="dark"] .global-level-card,
  html[data-theme="dark"] body.app-home-v39 .home-v39-level-block{
    background:linear-gradient(145deg,rgba(70,59,143,.56),rgba(42,36,103,.66))!important;
    border:1px solid rgba(199,178,255,.24)!important;
    border-radius:20px!important;
  }
  html[data-theme="dark"] .global-level-card>span,
  html[data-theme="dark"] body.app-home-v39 .home-v39-level-block span{
    color:#d9d0f2!important;
  }
  html[data-theme="dark"] .global-level-card>b,
  html[data-theme="dark"] body.app-home-v39 .home-v39-level-block b{
    color:#fff!important;
    text-shadow:0 1px 8px rgba(0,0,0,.14)!important;
  }
  html[data-theme="dark"] :is(.global-level-progress,.home-v39-level-block>div){
    background:rgba(255,255,255,.13)!important;
  }
  html[data-theme="dark"] :is(.global-level-progress i,.home-v39-level-block>div i){
    background:linear-gradient(90deg,#9557ff,#e07baa)!important;
  }

  /* Mini estadísticas */
  html[data-theme="dark"] .global-profile-stats>div,
  html[data-theme="dark"] body.app-home-v39 .home-v39-mini-stats>div{
    background:rgba(16,18,51,.58)!important;
    border:1px solid rgba(255,255,255,.10)!important;
    border-radius:17px!important;
  }
  html[data-theme="dark"] .global-profile-stats b,
  html[data-theme="dark"] body.app-home-v39 .home-v39-mini-stats b{
    color:#fff!important;
  }
  html[data-theme="dark"] .global-profile-stats span,
  html[data-theme="dark"] body.app-home-v39 .home-v39-mini-stats span{
    color:#bdb5d4!important;
  }

  /* Menú: opciones normales */
  html[data-theme="dark"] .global-side-menu a,
  html[data-theme="dark"] body.app-home-v39 .home-v39-side-menu a{
    min-height:42px!important;
    background:transparent!important;
    color:#c8b9ee!important;
    border:0!important;
    border-radius:15px!important;
    box-shadow:none!important;
    font-weight:800!important;
  }
  html[data-theme="dark"] .global-side-menu a b,
  html[data-theme="dark"] body.app-home-v39 .home-v39-side-menu a span{
    color:inherit!important;
    font-weight:900!important;
  }
  html[data-theme="dark"] .global-menu-icon{
    color:#9f91c8!important;
  }
  html[data-theme="dark"] .global-side-menu a:hover,
  html[data-theme="dark"] body.app-home-v39 .home-v39-side-menu a:hover{
    background:rgba(255,255,255,.055)!important;
    color:#eee8ff!important;
    transform:none!important;
  }

  /* Activo = exactamente el contraste claro del ejemplo */
  html[data-theme="dark"] .global-side-menu a.active,
  html[data-theme="dark"] body.app-home-v39 .home-v39-side-menu a.active{
    background:linear-gradient(135deg,#f5f1ff,#eee8ff)!important;
    color:#6d46df!important;
    border:0!important;
    box-shadow:none!important;
  }
  html[data-theme="dark"] .global-side-menu a.active .global-menu-icon{
    color:#5f45c5!important;
  }

  /* Evita que otros módulos vuelvan a aclarar/ensuciar el rail */
  html[data-theme="dark"] :is(.global-profile-card,.global-side-menu,.home-v39-profile-card,.home-v39-side-menu) *{
    text-decoration-color:currentColor;
  }
}

/* ============================================================
   DARK V7 · módulos pendientes igualados al perfil oscuro
   Juegos · Eventos · Encuestas · Tendencias · Historias · Editar perfil
   ============================================================ */

/* Paleta visual aprobada del perfil */
html[data-theme="dark"] :is(.games-v3-page,.events-v4-page,.polls-v3-page,.trends-v3-page,.click-stories-reddit-v2-page,.edit-profile-v1-page){
  background:radial-gradient(circle at 18% 0%,rgba(104,72,210,.18),transparent 28%),linear-gradient(180deg,#171737 0%,#12142f 100%)!important;
  color:#f4f1ff!important;
}

/* ---------- JUEGOS + popup de preguntas ---------- */
html[data-theme="dark"] :is(
  .games-v3-hero,.games-v3-picker,.games-v3-game-card,
  .games-v3-points-card,.games-v3-how-card,.games-v3-coming-card,.games-v3-mobile-points,
  .games-v3-dialog,.games-v3-dialog-head
){
  background:linear-gradient(145deg,rgba(63,58,128,.92),rgba(31,31,82,.94))!important;
  border-color:rgba(158,137,255,.36)!important;
  color:#f5f2ff!important;
  box-shadow:0 16px 36px rgba(5,5,24,.28)!important;
}
html[data-theme="dark"] :is(.games-v3-hero h1,.games-v3-picker-head h2,.games-v3-game-card h3,.games-v3-points-card h2,.games-v3-how-card h2,.games-v3-coming-card h2,.games-v3-dialog-title h2,.games-v3-question-pane h3,.games-v3-complete h3,.games-v3-no-questions h3,.games-v3-how-card b){color:#fff!important}
html[data-theme="dark"] :is(.games-v3-hero p,.games-v3-picker-head p,.games-v3-game-card p,.games-v3-points-card>span,.games-v3-points-card small,.games-v3-how-card small,.games-v3-coming-card p,.games-v3-coming-card ul,.games-v3-dialog-title small,.games-v3-progress-head,.games-v3-question-meta,.games-v3-complete p,.games-v3-no-questions p,.games-v3-level-row){color:#c6c0dd!important}
html[data-theme="dark"] .games-v3-status{background:#252653!important;color:#c7c0e2!important}
html[data-theme="dark"] .games-v3-status.available{background:#173f35!important;color:#8ae4ad!important}
html[data-theme="dark"] .games-v3-game-icon{background:radial-gradient(circle at 40% 30%,#4f438c,#2a285c)!important}
html[data-theme="dark"] .games-v3-game-card button[disabled]{background:#25264d!important;color:#8587a7!important}
html[data-theme="dark"] :is(.games-v3-level-track,.games-v3-mobile-progress,.games-v3-progress-track){background:#24264d!important}
html[data-theme="dark"] .games-v3-level-row b{background:#2e285e!important;color:#c9b8ff!important}
html[data-theme="dark"] .games-v3-how-card>div>span{background:#2d285d!important}
html[data-theme="dark"] .games-v3-dialog-art{background:linear-gradient(180deg,#322d72,#1c1c49)!important}
html[data-theme="dark"] .games-v3-close{background:#27284f!important;border-color:#494978!important;color:#fff!important}
html[data-theme="dark"] :is(.games-v3-answer,.games-v3-answered-options>div){background:#1c1d46!important;border-color:#494879!important;color:#f4f1ff!important}
html[data-theme="dark"] .games-v3-answer:hover{background:#29265b!important;border-color:#9973ff!important}
html[data-theme="dark"] .games-v3-answered-options>div.selected{background:#302764!important;border-color:#9a70ff!important}
html[data-theme="dark"] .games-v3-answer-result.ok{background:#183b31!important;color:#94e2b0!important}
html[data-theme="dark"] .games-v3-answer-result.bad{background:#493120!important;color:#ffc38f!important}

/* ---------- EVENTOS ---------- */
html[data-theme="dark"] :is(
  .events-v4-create-panel,.events-v4-card,.events-v4-side-card,.events-v4-empty,.events-v4-highlight
){
  background:linear-gradient(145deg,rgba(63,58,128,.90),rgba(31,31,82,.93))!important;
  border-color:rgba(158,137,255,.34)!important;
  color:#f5f2ff!important;
  box-shadow:0 14px 32px rgba(5,5,24,.24)!important;
}
html[data-theme="dark"] :is(.events-v4-create-head h2,.events-v4-section-head h2,.events-v4-card h3,.events-v4-side-card h2,.events-v4-upcoming strong,.events-v4-empty h3){color:#fff!important}
html[data-theme="dark"] :is(.events-v4-create-head p,.events-v4-card p,.events-v4-meta,.events-v4-card small,.events-v4-side-card p,.events-v4-upcoming small,.events-v4-empty p){color:#c6c0dd!important}
html[data-theme="dark"] .events-v4-create-form label>span{color:#ece8ff!important}
html[data-theme="dark"] :is(.events-v4-create-form input,.events-v4-create-form textarea){background:#181a43!important;border-color:#4a4979!important;color:#fff!important}
html[data-theme="dark"] .events-v4-create-head>button{background:#292756!important;border-color:#4a4777!important;color:#f4efff!important}
html[data-theme="dark"] .events-v4-create-actions .secondary{background:#292756!important;border-color:#4a4777!important;color:#d6ccfa!important}
html[data-theme="dark"] .events-v4-categories a{background:#24244f!important;border-color:#464575!important;color:#d7d0ef!important}
html[data-theme="dark"] .events-v4-categories a.active{background:linear-gradient(135deg,#7548ff,#bd5eff)!important;color:#fff!important;border-color:transparent!important}
html[data-theme="dark"] .events-v4-date{background:rgba(23,24,61,.88)!important;color:#fff!important;border-color:rgba(255,255,255,.14)!important}
html[data-theme="dark"] .events-v4-upcoming>div>span{background:#29265a!important;color:#d1c0ff!important}
html[data-theme="dark"] .events-v4-highlight{background:linear-gradient(145deg,#3d387e,#202052)!important}

/* ---------- ENCUESTAS + crear encuesta ---------- */
html[data-theme="dark"] :is(.polls-v3-create-panel,.polls-v3-card,.polls-v3-side-card,.polls-v3-empty,.polls-v3-expiration){
  background:linear-gradient(145deg,rgba(63,58,128,.90),rgba(31,31,82,.93))!important;
  border-color:rgba(158,137,255,.34)!important;
  color:#f5f2ff!important;
  box-shadow:0 14px 32px rgba(5,5,24,.24)!important;
}
html[data-theme="dark"] :is(.polls-v3-create-head h2,.polls-v3-question-field>span,.polls-v3-author strong,.polls-v3-question,.polls-v3-result-label,.polls-v3-result-percent,.polls-v3-side-card h2,.polls-v3-how-list b,.polls-v3-featured-list strong,.polls-v3-ranking strong,.polls-v3-empty h2,.polls-v3-expiration strong){color:#fff!important}
html[data-theme="dark"] :is(.polls-v3-create-head p,.polls-v3-author span,.polls-v3-result-count,.polls-v3-summary,.polls-v3-how-list small,.polls-v3-featured-list small,.polls-v3-ranking small,.polls-v3-empty p,.polls-v3-expiration span){color:#c3bddb!important}
html[data-theme="dark"] :is(.polls-v3-question-field textarea,.polls-v3-option-field input,.polls-v3-expiration select){background:#181a43!important;border-color:#4a4979!important;color:#fff!important}
html[data-theme="dark"] .polls-v3-result-track{background:#25264e!important}
html[data-theme="dark"] .polls-v3-vote-btn{background:#282653!important;border-color:#755ee0!important;color:#d7c9ff!important}
html[data-theme="dark"] .polls-v3-voted{background:#2f2861!important;color:#cbb7ff!important}
html[data-theme="dark"] .polls-v3-community-chip{background:#30285f!important;color:#cebaff!important}
html[data-theme="dark"] .polls-v3-how-list>div>span,
html[data-theme="dark"] .polls-v3-rank{background:#30285f!important;color:#cebaff!important}
html[data-theme="dark"] .polls-v3-result-row:not(.selected):hover{background:#292653!important;border-color:#625995!important}
html[data-theme="dark"] .polls-v3-result-row.is-choice,
html[data-theme="dark"] .polls-v3-result-row:has(input[type="radio"][name="option_id"]:checked){background:linear-gradient(90deg,#332a68,#282655)!important;border-color:#9a70ff!important}
html[data-theme="dark"] .polls-v3-result-row.is-choice .polls-v3-result-label,
html[data-theme="dark"] .polls-v3-result-row:has(input[type="radio"][name="option_id"]:checked) .polls-v3-result-label{color:#fff!important}
html[data-theme="dark"] .polls-v3-tabs a{background:#25254f!important;border-color:#484676!important;color:#d1c9e8!important}
html[data-theme="dark"] .polls-v3-tabs a.active{background:linear-gradient(135deg,#7648ff,#bb59ff)!important;color:#fff!important;border-color:transparent!important}

/* ---------- TENDENCIAS ---------- */
html[data-theme="dark"] :is(.trends-v3-hero,.trends-v3-board,.trends-v3-mini-card,.trends-v3-side-card,.trends-v3-rail-card,.trends-v3-featured-info){
  background:linear-gradient(145deg,rgba(63,58,128,.91),rgba(31,31,82,.94))!important;
  border-color:rgba(158,137,255,.34)!important;
  color:#f5f2ff!important;
  box-shadow:0 14px 32px rgba(5,5,24,.24)!important;
}
html[data-theme="dark"] .trends-v3-featured-info{border-top-color:rgba(158,137,255,.28)!important}
html[data-theme="dark"] :is(.trends-v3-hero h1,.trends-v3-featured-title,.trends-v3-mini-body h3 a,.trends-v3-side-title,.trends-v3-rising-main a,.trends-v3-creator-main strong,.trends-v3-commented-list strong,.trends-v3-featured-info .trends-v3-featured-author){color:#fff!important}
html[data-theme="dark"] :is(.trends-v3-hero p,.trends-v3-featured-info>p,.trends-v3-featured-info .trends-v3-featured-meta,.trends-v3-featured-info .trends-v3-featured-author small,.trends-v3-mini-user,.trends-v3-mini-stats,.trends-v3-ranking-list small,.trends-v3-creator-main small,.trends-v3-commented-list small,.trends-v3-commented-list span){color:#c5bfdc!important}
html[data-theme="dark"] .trends-v3-tabs a,
html[data-theme="dark"] .trends-v3-filter-btn{background:#25254f!important;border-color:#484676!important;color:#d3cbe9!important}
html[data-theme="dark"] .trends-v3-tabs a.active{background:linear-gradient(135deg,#7748ff,#bd58ff)!important;color:#fff!important;border-color:transparent!important}
html[data-theme="dark"] .trends-v3-mini-rank,
html[data-theme="dark"] .trends-v3-rank-box,
html[data-theme="dark"] .trends-v3-rising-main span{background:#30285f!important;color:#cebaff!important}
html[data-theme="dark"] .trends-v3-more-wrap details{background:#23244c!important;border-color:#464575!important}
html[data-theme="dark"] .trends-v3-more-list a{background:#1d1e45!important}
html[data-theme="dark"] .trends-v3-more-list strong{color:#fff!important}
html[data-theme="dark"] .trends-v3-more-list span{color:#bbb5d3!important}
html[data-theme="dark"] .trends-v3-creator-list button,
html[data-theme="dark"] .trends-v3-ghost-btn{background:#25254f!important;border-color:#484676!important;color:#cbb7ff!important}
html[data-theme="dark"] .trends-v3-spark:before{background:#393963!important}

/* ---------- HISTORIAS ---------- */
html[data-theme="dark"] body.click-stories-reddit-v2-page{background:linear-gradient(180deg,#171737,#12142f)!important;color:#f5f2ff!important}
html[data-theme="dark"] :is(
  .story-v2-hero,.story-v2-create,.story-v2-featured-card,.story-v2-feed-card,
  .story-v2-side-card,.story-v2-comments,.story-v2-empty
){
  background:linear-gradient(145deg,rgba(63,58,128,.90),rgba(31,31,82,.93))!important;
  border-color:rgba(158,137,255,.34)!important;
  color:#f5f2ff!important;
  box-shadow:0 12px 30px rgba(5,5,24,.22)!important;
}
html[data-theme="dark"] :is(.story-v2-hero h1,.story-v2-section h2,.story-v2-featured-body h3 a,.story-v2-feed-card h2 a,.story-v2-side-card h3,.story-v2-my-list strong,.story-v2-topic-list strong,.story-v2-comments h2,.story-v2-comment a,.story-v2-create>summary strong){color:#fff!important}
html[data-theme="dark"] :is(.story-v2-hero p,.story-v2-hero-action small,.story-v2-create>summary small,.story-v2-section header small,.story-v2-featured-body p,.story-v2-author small,.story-v2-card-author small,.story-v2-story-copy,.story-v2-my-list small,.story-v2-topic-list small,.story-v2-community-note small,.story-v2-muted,.story-v2-comment small,.story-v2-comment p,.story-v2-empty){color:#c3bddb!important}
html[data-theme="dark"] .story-v2-topics a,
html[data-theme="dark"] .story-v2-order{background:#25254f!important;border-color:#484676!important;color:#d2cae8!important}
html[data-theme="dark"] .story-v2-topics a.active{background:linear-gradient(135deg,#8a4cf2,#a839e1)!important;color:#fff!important;border-color:transparent!important}
html[data-theme="dark"] .story-v2-create form{border-top-color:#494873!important}
html[data-theme="dark"] :is(.story-v2-create input,.story-v2-create textarea,.story-v2-create select,.story-v2-comment-form textarea){background:#181a43!important;border-color:#4a4979!important;color:#fff!important}
html[data-theme="dark"] .story-v2-card-meta>span,
html[data-theme="dark"] .story-v2-card-meta>a{background:#30285f!important;color:#cebaff!important}
html[data-theme="dark"] :is(.story-v2-love,.story-v2-comment-link){background:#25254f!important;color:#d8d0ea!important}
html[data-theme="dark"] .story-v2-love{color:#ff89aa!important}
html[data-theme="dark"] .story-v2-love.active{background:#4a2542!important;color:#ff9ab7!important}
html[data-theme="dark"] .story-v2-read{background:#25254f!important;border-color:#665398!important;color:#cfb9ff!important}
html[data-theme="dark"] .story-v2-my-list>a{border-bottom-color:#44436d!important}
html[data-theme="dark"] .story-v2-topic-list>a>b{background:#30285f!important;color:#cebaff!important}
html[data-theme="dark"] .story-v2-community-note{background:linear-gradient(135deg,#352b70,#252455)!important}
html[data-theme="dark"] .story-v2-community-note strong{color:#d4c2ff!important}
html[data-theme="dark"] .story-v2-comment-form{border-bottom-color:#44436d!important}
html[data-theme="dark"] .story-v2-comment{border-bottom-color:#44436d!important}
html[data-theme="dark"] .story-v2-admin-menu>summary{background:#25254f!important;border-color:#4b4978!important;color:#fff!important}
html[data-theme="dark"] .story-v2-admin-menu>div{background:#1d1e45!important;border-color:#6a4354!important}

/* ---------- EDITAR PERFIL ---------- */
html[data-theme="dark"] .edit-profile-v1-page{background:linear-gradient(180deg,#171737,#12142f)!important;color:#f5f2ff!important}
html[data-theme="dark"] :is(.edit-profile-v1-side,.edit-profile-v1-card,.edit-profile-v1-savebar,.edit-profile-modular-settings){
  background:linear-gradient(145deg,rgba(63,58,128,.91),rgba(31,31,82,.94))!important;
  border-color:rgba(158,137,255,.34)!important;
  color:#f5f2ff!important;
  box-shadow:0 14px 34px rgba(5,5,24,.24)!important;
}
html[data-theme="dark"] :is(.edit-profile-v1-user strong,.edit-profile-v1-head h1,.edit-profile-v1-card-head h2,.edit-profile-v1-avatar-block h2,.edit-profile-v1-fields label>span,.edit-profile-v1-theme label>span,.edit-profile-v1-mini-preview strong,.edit-profile-v1-badge span,.edit-profile-v1-empty strong,.edit-profile-v1-savebar strong,.edit-profile-module-visibility-head strong,.edit-profile-module-row>div strong,.edit-profile-custom-card-copy h3,.edit-profile-custom-card-fields label>span){color:#fff!important}
html[data-theme="dark"] :is(.edit-profile-v1-user span,.edit-profile-v1-head p,.edit-profile-v1-card-head p,.edit-profile-v1-avatar-block p,.edit-profile-v1-fields label>small,.edit-profile-v1-theme label>small,.edit-profile-v1-mini-preview span,.edit-profile-v1-size-note,.edit-profile-v1-empty p,.edit-profile-v1-savebar span,.edit-profile-module-visibility-head span,.edit-profile-module-row>div small,.edit-profile-custom-card-copy p,.edit-profile-custom-card-fields small){color:#c2bcd9!important}
html[data-theme="dark"] .edit-profile-v1-user img{border-color:#e8e1ff!important;box-shadow:0 0 0 1px #7464b2!important}
html[data-theme="dark"] .edit-profile-v1-menu{border-top-color:#55517f!important}
html[data-theme="dark"] .edit-profile-v1-menu a{color:#d5cdef!important}
html[data-theme="dark"] .edit-profile-v1-menu a span{background:#2b285b!important;color:#cfbbff!important}
html[data-theme="dark"] .edit-profile-v1-menu a:hover{background:#302b65!important}
html[data-theme="dark"] .edit-profile-v1-menu a.active{background:#e9e3ff!important;color:#6537d1!important}
html[data-theme="dark"] .edit-profile-v1-side-level{background:linear-gradient(145deg,#302b67,#222253)!important;border-color:#635b99!important}
html[data-theme="dark"] .edit-profile-v1-side-level span{color:#bfb4e3!important}
html[data-theme="dark"] .edit-profile-v1-side-level strong{color:#fff!important}
html[data-theme="dark"] .edit-profile-v1-side-level i{background:#22234c!important}
html[data-theme="dark"] .edit-profile-v1-head-actions a,
html[data-theme="dark"] .edit-profile-v1-savebar a{background:#25254f!important;border-color:#514d80!important;color:#e2dcf2!important}
html[data-theme="dark"] .edit-profile-v1-card-head.badges>strong{background:#30285f!important;color:#d0bdff!important}
html[data-theme="dark"] .edit-profile-v1-avatar-wrap img{border-color:#ece8ff!important}
html[data-theme="dark"] :is(.edit-profile-v1-input,.edit-profile-v1-social-fields label,.edit-profile-v1-mini-preview,.edit-profile-v1-theme select,.edit-profile-v1-badge,.edit-profile-v1-module-row,.edit-profile-module-row,.edit-profile-custom-card-editor,.edit-profile-custom-card-fields input,.edit-profile-custom-card-fields textarea){background:#181a43!important;border-color:#4b4a79!important;color:#fff!important}
html[data-theme="dark"] .edit-profile-v1-input:focus-within,
html[data-theme="dark"] .edit-profile-v1-social-fields label:focus-within{background:#1d1e49!important;border-color:#9b78ff!important;box-shadow:0 0 0 3px rgba(155,120,255,.13)!important}
html[data-theme="dark"] :is(.edit-profile-v1-input input,.edit-profile-v1-input textarea,.edit-profile-v1-social-fields input,.edit-profile-v1-theme select,.edit-profile-custom-card-fields input,.edit-profile-custom-card-fields textarea){color:#fff!important;background:transparent!important}
html[data-theme="dark"] .edit-profile-v1-social-fields i{background:#2c295c!important;color:#d1bdff!important}
html[data-theme="dark"] .edit-profile-v1-upload-small span{background:#2e285f!important;border-color:#66529d!important;color:#d1bdff!important}
html[data-theme="dark"] .edit-profile-v1-check{color:#d2cbe4!important}
html[data-theme="dark"] .edit-profile-v1-theme-icon{background:linear-gradient(135deg,#322c6b,#21214f)!important;color:#d2beff!important}
html[data-theme="dark"] .edit-profile-v1-badge i{background:#2b2a54!important;color:#aaa7c4!important}
html[data-theme="dark"] .edit-profile-v1-badge:hover{border-color:#9576e8!important}
html[data-theme="dark"] .edit-profile-v1-badge.selected{background:linear-gradient(180deg,#362c71,#252352)!important;border-color:#a079ff!important;box-shadow:0 0 0 3px rgba(160,121,255,.12)!important}
html[data-theme="dark"] .edit-profile-v1-empty{background:#23234e!important}
html[data-theme="dark"] .edit-profile-v1-empty>span{background:#30285f!important;color:#d1bdff!important}
html[data-theme="dark"] .edit-profile-module-icon{background:#30285f!important;color:#d1bdff!important}
html[data-theme="dark"] .edit-profile-module-row>label{background:#24244f!important;border-color:#4a4777!important;color:#ded7ee!important}
html[data-theme="dark"] .edit-profile-custom-card-copy>span{color:#c6afff!important}

/* Inputs de estos módulos: placeholder consistente */
html[data-theme="dark"] :is(
  .games-v3-page,.events-v4-page,.polls-v3-page,.click-stories-reddit-v2-page,.edit-profile-v1-page
) :is(input,textarea)::placeholder{color:#8f8bac!important}

/* Evita que CSS de cada módulo vuelva a forzar la barra inferior blanca */
html[data-theme="dark"] :is(.games-v3-page,.events-v4-page,.polls-v3-page) .mobile-nav{background:rgba(18,18,48,.97)!important;border-color:#403d6a!important}

/* ===== V9 · Editar perfil: módulos movibles + Enlaces y redes ===== */
html[data-theme="dark"] .edit-profile-modular-settings{
  background:linear-gradient(145deg,rgba(63,58,128,.94),rgba(31,31,82,.96))!important;
  border-color:rgba(146,128,216,.45)!important;
  box-shadow:0 18px 44px rgba(8,9,35,.24)!important;
}
html[data-theme="dark"] .edit-profile-modular-live{
  background:#2b285b!important;
  border-color:#5c5590!important;
  color:#e9e2ff!important;
}
html[data-theme="dark"] .edit-profile-module-visibility{
  background:rgba(20,21,58,.38)!important;
  border:1px solid rgba(121,111,178,.28)!important;
  border-radius:18px!important;
  padding:12px!important;
}
html[data-theme="dark"] .edit-profile-module-visibility-head strong,
html[data-theme="dark"] .edit-profile-module-row>div strong{
  color:#fff!important;
}
html[data-theme="dark"] .edit-profile-module-visibility-head span,
html[data-theme="dark"] .edit-profile-module-row>div small{
  color:#c5bedf!important;
}
html[data-theme="dark"] .edit-profile-module-row{
  background:linear-gradient(145deg,#22234f,#1a1c45)!important;
  border-color:#4d4978!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
html[data-theme="dark"] .edit-profile-module-icon{
  background:#30285f!important;
  color:#d1bdff!important;
  border:1px solid rgba(145,122,218,.25)!important;
}
html[data-theme="dark"] .edit-profile-module-row>label{
  background:#272653!important;
  border-color:#55507e!important;
  color:#eee9ff!important;
}
html[data-theme="dark"] .edit-profile-module-row>label:has(input:checked){
  background:linear-gradient(145deg,#6c47d8,#4e3bb8)!important;
  border-color:#8d6af0!important;
  color:#fff!important;
}

html[data-theme="dark"] .edit-profile-links-editor{
  background:linear-gradient(145deg,#272653,#1b1c47)!important;
  border-color:#57517f!important;
  box-shadow:0 14px 34px rgba(8,9,35,.18)!important;
}
html[data-theme="dark"] .edit-profile-links-editor-head span,
html[data-theme="dark"] .edit-profile-image-module-copy>span,
html[data-theme="dark"] .edit-profile-custom-card-copy>span{
  color:#c9b4ff!important;
}
html[data-theme="dark"] .edit-profile-links-editor-head h3,
html[data-theme="dark"] .edit-profile-image-module-copy h3,
html[data-theme="dark"] .edit-profile-custom-card-copy h3{
  color:#fff!important;
}
html[data-theme="dark"] .edit-profile-links-editor-head p,
html[data-theme="dark"] .edit-profile-image-module-copy p,
html[data-theme="dark"] .edit-profile-custom-card-copy p{
  color:#c4bdd8!important;
}
html[data-theme="dark"] .edit-profile-links-title span,
html[data-theme="dark"] .edit-profile-image-fields label>span,
html[data-theme="dark"] .edit-profile-custom-card-fields label>span{
  color:#e9e2f8!important;
}
html[data-theme="dark"] .edit-profile-links-title input,
html[data-theme="dark"] .edit-profile-link-row select,
html[data-theme="dark"] .edit-profile-link-row input,
html[data-theme="dark"] .edit-profile-image-fields input[type="text"],
html[data-theme="dark"] .edit-profile-image-fields input:not([type]),
html[data-theme="dark"] .edit-profile-image-fields select,
html[data-theme="dark"] .edit-profile-custom-card-fields input,
html[data-theme="dark"] .edit-profile-custom-card-fields textarea{
  background:#15173a!important;
  border-color:#4d4a76!important;
  color:#fff!important;
}
html[data-theme="dark"] :is(.edit-profile-links-title input,.edit-profile-link-row select,.edit-profile-link-row input,.edit-profile-image-fields input,.edit-profile-image-fields select,.edit-profile-custom-card-fields input,.edit-profile-custom-card-fields textarea):focus{
  background:#1a1c43!important;
  border-color:#9b78ff!important;
  box-shadow:0 0 0 3px rgba(155,120,255,.13)!important;
}
html[data-theme="dark"] .edit-profile-link-row{
  background:#1d1f49!important;
  border-color:#4a4772!important;
}
html[data-theme="dark"] .edit-profile-link-row button{
  background:#30295e!important;
  color:#d7c6ff!important;
}
html[data-theme="dark"] .edit-profile-link-row button[data-link-remove]{
  background:#4b263f!important;
  color:#ffb2c3!important;
}
html[data-theme="dark"] .edit-profile-links-actions small,
html[data-theme="dark"] .edit-profile-image-upload small,
html[data-theme="dark"] .edit-profile-image-preview>div{
  color:#c3bcd8!important;
}
html[data-theme="dark"] .edit-profile-links-actions button{
  background:linear-gradient(145deg,#7047db,#5a3ac0)!important;
  color:#fff!important;
  box-shadow:0 10px 22px rgba(93,62,194,.18)!important;
}
html[data-theme="dark"] .edit-profile-links-limit{
  background:#4a3422!important;
  color:#ffd5a0!important;
}

html[data-theme="dark"] .edit-profile-image-module-editor,
html[data-theme="dark"] .edit-profile-custom-card-editor{
  background:linear-gradient(145deg,#272653,#1b1c47)!important;
  border-color:#57517f!important;
}
html[data-theme="dark"] .edit-profile-image-preview{
  background:linear-gradient(145deg,#1a1c45,#232652)!important;
  border-color:#675b9b!important;
}
html[data-theme="dark"] .edit-profile-image-preview>div span{
  color:#c9b4ff!important;
}
html[data-theme="dark"] .edit-profile-image-preview>div strong{
  color:#fff!important;
}
html[data-theme="dark"] .edit-profile-image-upload{
  background:#1d1e48!important;
  border-color:#655c96!important;
}
html[data-theme="dark"] .edit-profile-image-upload>span{
  color:#d2bdff!important;
}

/* =========================================================
   V11 · Comunidades individuales + publicación no disponible
   Mantener la paleta oscura aprobada del perfil.
   ========================================================= */

/* Página interna de cualquier comunidad */
html[data-theme="dark"] body.community-v3-page{
  background:radial-gradient(circle at 52% 0%,rgba(111,68,223,.18),transparent 34%),linear-gradient(180deg,#171737 0%,#17183c 52%,#12142f 100%)!important;
  color:#f7f4ff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-shell,
html[data-theme="dark"] body.community-v3-page .community-v3-center{
  background:transparent!important;
}

/* Destacados: eliminar la gran placa blanca */
html[data-theme="dark"] body.community-v3-page .community-v3-highlights{
  background:linear-gradient(155deg,#393276,#24245d)!important;
  border:1px solid rgba(255,255,255,.11)!important;
  box-shadow:0 18px 40px rgba(4,5,28,.22)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-section-head h2,
html[data-theme="dark"] body.community-v3-page .community-v3-section-head strong{
  color:#fff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-section-head p,
html[data-theme="dark"] body.community-v3-page .community-v3-section-head small{
  color:#bcb5d3!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-section-head a{
  color:#b993ff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-highlight-card{
  background:linear-gradient(145deg,#321f6c,#49247d)!important;
  border-color:rgba(255,255,255,.10)!important;
  color:#fff!important;
  box-shadow:0 12px 26px rgba(5,5,27,.18)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-highlight-card strong{
  color:#fff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-highlight-card small{
  color:#c8c0da!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-highlight-card:before,
html[data-theme="dark"] body.community-v3-page .community-v3-highlight-glow{
  opacity:.38!important;
}

/* Panel central del feed y sus pestañas */
html[data-theme="dark"] body.community-v3-page .community-v3-feed-panel{
  background:linear-gradient(155deg,#302b68,#20204f)!important;
  border-color:rgba(255,255,255,.11)!important;
  box-shadow:0 18px 42px rgba(4,5,29,.22)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-tabs{
  background:rgba(14,16,45,.34)!important;
  border-bottom-color:rgba(255,255,255,.09)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-tabs a{
  color:#bdb7d2!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-tabs a:hover{
  background:rgba(255,255,255,.07)!important;
  color:#fff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-tabs a.active{
  background:rgba(145,98,255,.22)!important;
  color:#e9ddff!important;
  box-shadow:inset 0 -2px #9a6aff!important;
}

/* Composer dentro del grupo */
html[data-theme="dark"] body.community-v3-page .community-v3-composer{
  background:transparent!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-composer-input textarea{
  background:#111329!important;
  border-color:rgba(255,255,255,.12)!important;
  color:#f7f4ff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-composer-input textarea::placeholder{
  color:#9690ab!important;
}
html[data-theme="dark"] body.community-v3-page .community-v2-tool-pill{
  background:#1b1d42!important;
  border-color:rgba(255,255,255,.11)!important;
  color:#d4cee4!important;
}
html[data-theme="dark"] body.community-v3-page .community-v2-tool-pill:hover{
  background:#282352!important;
  color:#fff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v2-tool-panel{
  background:linear-gradient(145deg,#252457,#1a1b43)!important;
  border-color:rgba(255,255,255,.11)!important;
  color:#f5f2ff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v2-panel-head{
  border-color:rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v2-panel-head strong{
  color:#fff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v2-panel-head button{
  background:rgba(255,255,255,.08)!important;
  color:#e4d9ff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v2-poll-form input,
html[data-theme="dark"] body.community-v3-page .community-v2-feeling-grid button,
html[data-theme="dark"] body.community-v3-page .community-v2-more-grid a{
  background:#15173a!important;
  border-color:rgba(255,255,255,.11)!important;
  color:#eee9f8!important;
}

/* Posts y estado vacío dentro de la comunidad */
html[data-theme="dark"] body.community-v3-page .community-v3-empty,
html[data-theme="dark"] body.community-v3-page .community-v3-post-list .post-card{
  background:#111329!important;
  border-color:rgba(255,255,255,.10)!important;
  color:#f6f3ff!important;
  box-shadow:0 14px 32px rgba(3,4,23,.20)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-empty h2{
  color:#fff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-empty p{
  color:#aaa5bd!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-post-list .post-body,
html[data-theme="dark"] body.community-v3-page .community-v3-post-list .post-author a strong{
  color:#f5f2ff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-post-list .post-author span,
html[data-theme="dark"] body.community-v3-page .community-v3-post-list .post-stats{
  color:#aaa5bd!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-post-list .post-actions,
html[data-theme="dark"] body.community-v3-page .community-v3-post-list .comments,
html[data-theme="dark"] body.community-v3-page .community-v3-post-list .comment-form{
  background:#0e1024!important;
  border-color:rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-post-list .comment-form input{
  background:#171936!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.11)!important;
}

/* Rail derecho del grupo */
html[data-theme="dark"] body.community-v3-page .community-v3-side-card{
  background:linear-gradient(155deg,#393276,#24245d)!important;
  border-color:rgba(255,255,255,.11)!important;
  color:#f7f4ff!important;
  box-shadow:0 16px 34px rgba(4,5,28,.18)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-side-title{
  color:#fff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-rules li,
html[data-theme="dark"] body.community-v3-page .community-v3-activity p,
html[data-theme="dark"] body.community-v3-page .community-v3-muted{
  color:#b8b2c9!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-activity strong{
  color:#f5f2ff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-report-form button{
  background:#f1ecff!important;
  border-color:transparent!important;
  color:#6742d8!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-tags a{
  background:#191b3e!important;
  border-color:rgba(255,255,255,.10)!important;
  color:#d6c7ff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-tags a strong{
  color:#e7dcff!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-tags a small{
  color:#9e98af!important;
}

/* Publicación eliminada/no disponible abierta por URL directa */
html[data-theme="dark"] .click-post-direct-shell{
  color:#f7f4ff!important;
}
html[data-theme="dark"] .click-post-direct-missing{
  background:linear-gradient(155deg,#393276,#24245d)!important;
  border:1px solid rgba(255,255,255,.12)!important;
  color:#f7f4ff!important;
  box-shadow:0 24px 70px rgba(3,4,24,.30)!important;
}
html[data-theme="dark"] .click-post-direct-missing strong{
  color:#fff!important;
}
html[data-theme="dark"] .click-post-direct-missing p{
  color:#bcb5d0!important;
}
html[data-theme="dark"] .click-post-direct-missing a{
  background:linear-gradient(145deg,#7a4fe7,#603cc5)!important;
  color:#fff!important;
  box-shadow:0 10px 24px rgba(91,59,194,.22)!important;
  text-decoration:none!important;
}

/* Mismo tratamiento para el error del visor/modal */
html[data-theme="dark"] .click-post-viewer-error{
  background:linear-gradient(155deg,#393276,#24245d)!important;
  color:#f7f4ff!important;
  border:1px solid rgba(255,255,255,.12)!important;
}
html[data-theme="dark"] .click-post-viewer-error strong{color:#fff!important}
html[data-theme="dark"] .click-post-viewer-error span{color:#bcb5d0!important}
html[data-theme="dark"] .click-post-viewer-error button{
  background:linear-gradient(145deg,#7a4fe7,#603cc5)!important;
  color:#fff!important;
}

@media(max-width:760px){
  html[data-theme="dark"] body.community-v3-page .community-v3-highlights{
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }
  html[data-theme="dark"] body.community-v3-page .community-v3-feed-panel{
    background:#111329!important;
  }
  html[data-theme="dark"] body.community-v3-page .community-v3-side-card{
    background:#181a3d!important;
  }
  html[data-theme="dark"] .click-post-direct-missing{
    margin:34px auto!important;
    width:min(560px,calc(100% - 20px))!important;
    padding:26px 20px!important;
  }
}

/* =========================================================
   V12 · Mi personaje / Avatares
   Fondos, catálogo y controles con la paleta oscura del perfil.
   ========================================================= */
html[data-theme="dark"] body:has(.avatar-manager) .module-hero,
html[data-theme="dark"] body:has(.avatar-manager) .landscape-manager,
html[data-theme="dark"] body:has(.avatar-manager) .avatar-manager,
html[data-theme="dark"] body:has(.avatar-manager) .right-rail .rail-card{
  background:linear-gradient(155deg,#393276,#24245d)!important;
  border-color:rgba(255,255,255,.11)!important;
  color:#f7f4ff!important;
  box-shadow:0 16px 36px rgba(4,5,28,.20)!important;
}

html[data-theme="dark"] body:has(.avatar-manager) .module-hero h1,
html[data-theme="dark"] body:has(.avatar-manager) .landscape-manager-head h2,
html[data-theme="dark"] body:has(.avatar-manager) .avatar-current h2,
html[data-theme="dark"] body:has(.avatar-manager) .rail-card-header{
  color:#fff!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .module-hero p,
html[data-theme="dark"] body:has(.avatar-manager) .landscape-manager-head p,
html[data-theme="dark"] body:has(.avatar-manager) .avatar-current p,
html[data-theme="dark"] body:has(.avatar-manager) .tiny-note{
  color:#bdb6d1!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .module-hero-icon{
  background:#211d50!important;
  color:#c9b3ff!important;
  border:1px solid rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .rail-card-header{
  background:linear-gradient(145deg,#302a68,#211f50)!important;
  border-bottom-color:rgba(255,255,255,.09)!important;
}

/* Avatar actual */
html[data-theme="dark"] body:has(.avatar-manager) .avatar-current{
  border-bottom-color:rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .avatar-current .avatar-xxl{
  border-color:#fff!important;
  box-shadow:0 0 0 2px #7c5af0,0 12px 28px rgba(6,5,31,.32)!important;
  background:#171936!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .avatar-current a{
  color:#c7adff!important;
  font-weight:800!important;
}

/* Catálogo: eliminar fondos blancos */
html[data-theme="dark"] body:has(.avatar-manager) .avatar-catalog-item button,
html[data-theme="dark"] body:has(.avatar-manager) .avatar-catalog-item-visual button{
  background:linear-gradient(145deg,#1a1c45,#242457)!important;
  border:1px solid #62578f!important;
  color:#f5f2ff!important;
  box-shadow:0 10px 24px rgba(3,4,23,.16)!important;
  transition:transform .18s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .avatar-catalog-item button:hover,
html[data-theme="dark"] body:has(.avatar-manager) .avatar-catalog-item-visual button:hover{
  background:linear-gradient(145deg,#33256d,#402878)!important;
  border-color:#9b75ff!important;
  box-shadow:0 13px 28px rgba(75,47,174,.24)!important;
  transform:translateY(-2px)!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .avatar-catalog-item img,
html[data-theme="dark"] body:has(.avatar-manager) .avatar-catalog-item-visual img{
  background:#111329!important;
  border:1px solid rgba(255,255,255,.07)!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .avatar-catalog-item span,
html[data-theme="dark"] body:has(.avatar-manager) .avatar-catalog-item-visual span{
  background:#101229!important;
  color:#f7f4ff!important;
  border:1px solid rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .avatar-catalog-item button:hover span,
html[data-theme="dark"] body:has(.avatar-manager) .avatar-catalog-item-visual button:hover span{
  background:#171535!important;
  color:#dbcfff!important;
}

/* Landscape */
html[data-theme="dark"] body:has(.avatar-manager) .landscape-limit{
  background:#1d1948!important;
  border-color:#65549b!important;
  color:#ccb7ff!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .landscape-preview-shell{
  background:#111329!important;
  border-color:#655b93!important;
  box-shadow:0 14px 32px rgba(3,4,23,.22)!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .landscape-file-button{
  background:linear-gradient(145deg,#231f55,#302765)!important;
  border-color:#705da9!important;
  color:#e4d7ff!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .landscape-file-button:hover{
  background:linear-gradient(145deg,#34286e,#442d7e)!important;
  border-color:#9a75ff!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .landscape-upload-form .classic-button.orange{
  background:linear-gradient(135deg,#8754ff,#b65dff)!important;
  border-color:#9f69ff!important;
  color:#fff!important;
  box-shadow:0 10px 24px rgba(123,78,230,.24)!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .landscape-remove-form .classic-button.light{
  background:#171936!important;
  border-color:#655b93!important;
  color:#d9ccff!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .landscape-remove-form .classic-button.light:hover{
  background:#292354!important;
  border-color:#8c71d7!important;
  color:#fff!important;
}
html[data-theme="dark"] body:has(.avatar-manager) .landscape-safety-note{
  background:#181a3d!important;
  border-color:rgba(255,255,255,.10)!important;
  color:#c3bdd2!important;
}

/* Responsive */
@media(max-width:760px){
  html[data-theme="dark"] body:has(.avatar-manager) .landscape-manager,
  html[data-theme="dark"] body:has(.avatar-manager) .avatar-manager{
    background:linear-gradient(155deg,#322b6c,#20204d)!important;
  }
  html[data-theme="dark"] body:has(.avatar-manager) .avatar-catalog-item button,
  html[data-theme="dark"] body:has(.avatar-manager) .avatar-catalog-item-visual button{
    border-radius:16px!important;
  }
}

/* V15 - Forzar barra inferior móvil oscura en TODAS las páginas cuando el tema es dark */
html[data-theme="dark"] :is(.mobile-nav,.mobile-nav-v39),
html[data-theme="dark"] :is(.community-v3-page,.trends-v3-page,.notifications-v4-page,.discover-v1-page,.games-v3-page,.events-v4-page,.polls-v3-page,.story-v2-page,.market-v1-page,.badges-v2-page,.communities-v2-page) :is(.mobile-nav,.mobile-nav-v39){
  background:linear-gradient(180deg,rgba(10,11,35,.98),rgba(15,17,47,.97))!important;
  border:1px solid rgba(255,255,255,.10)!important;
  box-shadow:0 -14px 34px rgba(3,5,26,.42)!important;
  backdrop-filter:blur(18px)!important;
  -webkit-backdrop-filter:blur(18px)!important;
}

html[data-theme="dark"] :is(.mobile-nav,.mobile-nav-v39) a,
html[data-theme="dark"] :is(.community-v3-page,.trends-v3-page,.notifications-v4-page,.discover-v1-page,.games-v3-page,.events-v4-page,.polls-v3-page,.story-v2-page,.market-v1-page,.badges-v2-page,.communities-v2-page) :is(.mobile-nav,.mobile-nav-v39) a{
  background:transparent!important;
  color:#b6b2ca!important;
}

html[data-theme="dark"] :is(.mobile-nav,.mobile-nav-v39) a b,
html[data-theme="dark"] :is(.community-v3-page,.trends-v3-page,.notifications-v4-page,.discover-v1-page,.games-v3-page,.events-v4-page,.polls-v3-page,.story-v2-page,.market-v1-page,.badges-v2-page,.communities-v2-page) :is(.mobile-nav,.mobile-nav-v39) a b{
  background:rgba(255,255,255,.07)!important;
  color:#c8c2de!important;
  box-shadow:none!important;
}

html[data-theme="dark"] :is(.mobile-nav,.mobile-nav-v39) a span,
html[data-theme="dark"] :is(.community-v3-page,.trends-v3-page,.notifications-v4-page,.discover-v1-page,.games-v3-page,.events-v4-page,.polls-v3-page,.story-v2-page,.market-v1-page,.badges-v2-page,.communities-v2-page) :is(.mobile-nav,.mobile-nav-v39) a span{
  color:#b4afc7!important;
}

html[data-theme="dark"] :is(.mobile-nav,.mobile-nav-v39) a.active,
html[data-theme="dark"] :is(.community-v3-page,.trends-v3-page,.notifications-v4-page,.discover-v1-page,.games-v3-page,.events-v4-page,.polls-v3-page,.story-v2-page,.market-v1-page,.badges-v2-page,.communities-v2-page) :is(.mobile-nav,.mobile-nav-v39) a.active{
  background:transparent!important;
  color:#9f7cff!important;
}

html[data-theme="dark"] :is(.mobile-nav,.mobile-nav-v39) a.active b,
html[data-theme="dark"] :is(.community-v3-page,.trends-v3-page,.notifications-v4-page,.discover-v1-page,.games-v3-page,.events-v4-page,.polls-v3-page,.story-v2-page,.market-v1-page,.badges-v2-page,.communities-v2-page) :is(.mobile-nav,.mobile-nav-v39) a.active b{
  background:linear-gradient(145deg,#6b4cdd,#8f58ef)!important;
  color:#fff!important;
  box-shadow:0 10px 26px rgba(87,62,210,.40)!important;
}

html[data-theme="dark"] :is(.mobile-nav,.mobile-nav-v39) a.active span,
html[data-theme="dark"] :is(.community-v3-page,.trends-v3-page,.notifications-v4-page,.discover-v1-page,.games-v3-page,.events-v4-page,.polls-v3-page,.story-v2-page,.market-v1-page,.badges-v2-page,.communities-v2-page) :is(.mobile-nav,.mobile-nav-v39) a.active span{
  color:#d8cbff!important;
}

html[data-theme="dark"] :is(.mobile-nav,.mobile-nav-v39) .mobile-nav-create,
html[data-theme="dark"] :is(.community-v3-page,.trends-v3-page,.notifications-v4-page,.discover-v1-page,.games-v3-page,.events-v4-page,.polls-v3-page,.story-v2-page,.market-v1-page,.badges-v2-page,.communities-v2-page) :is(.mobile-nav,.mobile-nav-v39) .mobile-nav-create{
  background:transparent!important;
}

html[data-theme="dark"] :is(.mobile-nav,.mobile-nav-v39) .mobile-nav-create b,
html[data-theme="dark"] :is(.community-v3-page,.trends-v3-page,.notifications-v4-page,.discover-v1-page,.games-v3-page,.events-v4-page,.polls-v3-page,.story-v2-page,.market-v1-page,.badges-v2-page,.communities-v2-page) :is(.mobile-nav,.mobile-nav-v39) .mobile-nav-create b{
  background:linear-gradient(145deg,#6b4cdd,#8f58ef)!important;
  color:#fff!important;
  box-shadow:0 12px 28px rgba(86,60,209,.45)!important;
}

/* =========================================================
   V16 · Perfil: conservar personalización, oscurecer contenido UI
   ========================================================= */

/* El perfil sigue usando su propio fondo base. No se reemplaza por el fondo global. */
html[data-theme="dark"] body.profile-premium-v396{
  background:linear-gradient(180deg,#171737 0%,#17183c 55%,#12142f 100%)!important;
  color:#f4f1ff!important;
}

/* Nunca alterar la portada, el fondo personalizado ni sus imágenes/pseudo-fondos. */
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-shell,
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-shell::before,
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-cover,
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-cover::before,
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-cover::after{
  /* Se dejan deliberadamente sin background override para respetar el CSS del perfil. */
}

/* Publicaciones del perfil: PC + móvil */
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-feed-panel .post-card,
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-post-grid .post-card{
  background:#111329!important;
  border:1px solid rgba(255,255,255,.10)!important;
  color:#f6f3ff!important;
  box-shadow:0 12px 30px rgba(5,5,24,.26)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .post-head,
html[data-theme="dark"] body.profile-premium-v396 .post-body{
  background:transparent!important;
  color:#f5f2ff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .post-author a strong,
html[data-theme="dark"] body.profile-premium-v396 .post-author strong{
  color:#fff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .post-author span,
html[data-theme="dark"] body.profile-premium-v396 .post-stats{
  color:#aaa5bf!important;
}
html[data-theme="dark"] body.profile-premium-v396 .post-stats{
  background:#111329!important;
  border-color:rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .post-actions{
  background:#0d0f22!important;
  border-color:rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .post-actions button{
  background:transparent!important;
  color:#bcb5d0!important;
}
html[data-theme="dark"] body.profile-premium-v396 .post-actions button:hover{
  background:rgba(255,255,255,.07)!important;
  color:#fff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .post-actions .liked{color:#ff7398!important}
html[data-theme="dark"] body.profile-premium-v396 .comments,
html[data-theme="dark"] body.profile-premium-v396 .comment-form{
  background:#0d0f22!important;
  border-color:rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .comment-content{
  background:#1c1d3b!important;
  color:#f4f1ff!important;
  border:1px solid rgba(255,255,255,.07)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .comment-content strong,
html[data-theme="dark"] body.profile-premium-v396 .comment-content a strong{color:#fff!important}
html[data-theme="dark"] body.profile-premium-v396 .comment-content small{color:#aaa5bd!important}
html[data-theme="dark"] body.profile-premium-v396 .comment-form input{
  background:#171831!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.12)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .post-delete-button{
  background:#3b2438!important;
  color:#ffb6ca!important;
}

/* Tabs y panel de feed oscuros sin modificar identidad/fondo del perfil */
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-feed-panel{
  background:linear-gradient(155deg,rgba(61,55,125,.92),rgba(31,31,82,.94))!important;
  border-color:rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-tabs{
  background:transparent!important;
  border-color:rgba(255,255,255,.09)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-tabs a{color:#bdb5d2!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-tabs a.active{
  background:rgba(126,87,235,.22)!important;
  color:#e0d5ff!important;
  border-color:#926dff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-empty,
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-info-panel{
  background:#111329!important;
  color:#f5f2ff!important;
  border-color:rgba(255,255,255,.09)!important;
}

/* Barra inferior móvil: forzar el mismo dock oscuro también dentro de perfil.php */
@media(max-width:760px){
  html[data-theme="dark"] body.profile-premium-v396 :is(.mobile-nav,.mobile-nav-v39){
    background:linear-gradient(180deg,rgba(9,10,34,.99),rgba(14,16,45,.98))!important;
    border:1px solid rgba(255,255,255,.10)!important;
    box-shadow:0 -14px 34px rgba(3,5,26,.48)!important;
    backdrop-filter:blur(18px)!important;
    -webkit-backdrop-filter:blur(18px)!important;
  }
  html[data-theme="dark"] body.profile-premium-v396 .mobile-nav-v39 a{
    background:transparent!important;
    color:#aaa5bd!important;
  }
  html[data-theme="dark"] body.profile-premium-v396 .mobile-nav-v39 a b{
    background:rgba(255,255,255,.07)!important;
    color:#c3badc!important;
  }
  html[data-theme="dark"] body.profile-premium-v396 .mobile-nav-v39 a span{color:#aaa5bd!important}
  html[data-theme="dark"] body.profile-premium-v396 .mobile-nav-v39 a.active{background:transparent!important;color:#a37fff!important}
  html[data-theme="dark"] body.profile-premium-v396 .mobile-nav-v39 a.active b{
    background:linear-gradient(145deg,#6b4cdd,#8f58ef)!important;
    color:#fff!important;
  }
  html[data-theme="dark"] body.profile-premium-v396 .mobile-nav-v39 a.active span{color:#d8cbff!important}
  html[data-theme="dark"] body.profile-premium-v396 .mobile-nav-create{background:transparent!important}
  html[data-theme="dark"] body.profile-premium-v396 .mobile-nav-create b{
    background:linear-gradient(145deg,#6b4cdd,#8f58ef)!important;
    color:#fff!important;
    box-shadow:0 12px 28px rgba(86,60,209,.45)!important;
  }
}

/* =====================================================================
   V21 · PERFIL · Herramientas de personalización en modo oscuro
   Solo oscurece la interfaz de edición. NO altera fondo/portada del perfil.
   PC + móvil.
   ===================================================================== */

/* Engranaje + menú Personalizar perfil */
html[data-theme="dark"] body.profile-premium-v396 .profile-settings-trigger{
  background:rgba(27,25,66,.96)!important;
  color:#e7dcff!important;
  border-color:rgba(255,255,255,.15)!important;
  box-shadow:0 12px 30px rgba(5,6,31,.38)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-settings-trigger:hover,
html[data-theme="dark"] body.profile-premium-v396 .profile-settings-trigger[aria-expanded="true"]{
  background:#312b70!important;
  color:#fff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-settings-popover{
  background:linear-gradient(155deg,#40377f 0%,#29275f 58%,#181a43 100%)!important;
  color:#f7f3ff!important;
  border-color:rgba(255,255,255,.12)!important;
  box-shadow:0 24px 60px rgba(4,5,28,.52)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-settings-popover-title{
  color:#c9b9f1!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-settings-popover :is(a,button){
  background:transparent!important;
  color:#f6f2ff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-settings-popover :is(a,button):hover{
  background:rgba(255,255,255,.08)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-settings-option-icon{
  background:rgba(255,255,255,.09)!important;
  color:#d4c2ff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-settings-popover strong{color:#fff!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-settings-popover small{color:#b9b2ca!important}

/* Barra "Organizando perfil" */
html[data-theme="dark"] body.profile-premium-v396 .profile-modular-editbar{
  background:linear-gradient(155deg,rgba(54,44,117,.98),rgba(24,25,65,.98))!important;
  border-color:rgba(203,174,255,.28)!important;
  color:#fff!important;
  box-shadow:0 16px 42px rgba(4,5,28,.38)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-modular-editbar-title small,
html[data-theme="dark"] body.profile-premium-v396 .profile-modular-save-state{color:#c8c0dc!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-modular-editbar-actions button{
  background:rgba(255,255,255,.08)!important;
  color:#f7f3ff!important;
  border-color:rgba(255,255,255,.14)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-modular-editbar-actions button:hover{
  background:rgba(255,255,255,.14)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-modular-editbar-actions button.primary{
  background:linear-gradient(135deg,#7447f2,#a34cf4)!important;
  color:#fff!important;
}

/* Controles que aparecen sobre cada módulo al organizar */
html[data-theme="dark"] body.profile-premium-v396 .profile-module-editor{
  background:rgba(18,16,51,.96)!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.17)!important;
  box-shadow:0 10px 26px rgba(4,5,26,.42)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-editor button{
  background:rgba(255,255,255,.09)!important;
  color:#fff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-editor button:hover{background:rgba(255,255,255,.17)!important}

/* Biblioteca de módulos (Agregar) */
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-backdrop{
  background:rgba(4,5,24,.78)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-panel{
  background:linear-gradient(155deg,#40377f 0%,#29275f 58%,#181a43 100%)!important;
  color:#f5f1ff!important;
  border-color:rgba(255,255,255,.12)!important;
  box-shadow:0 30px 86px rgba(4,5,28,.56)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-panel header{
  border-bottom-color:rgba(255,255,255,.09)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-panel header>div>span{color:#c3aaff!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-panel h2{color:#fff!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-panel header p{color:#b6aec7!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-panel header>button{
  background:rgba(255,255,255,.09)!important;color:#eee6ff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-list>button{
  background:rgba(16,17,48,.72)!important;
  border-color:rgba(255,255,255,.09)!important;
  color:#f4f0ff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-list>button:hover{
  background:rgba(255,255,255,.08)!important;
  border-color:rgba(174,132,255,.32)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-list>button>span{
  background:rgba(134,92,239,.18)!important;color:#d9c6ff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-list strong{color:#fff!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-list small{color:#aaa3bc!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-list>button.is-added>b{
  background:#3a3852!important;color:#9f99af!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-module-library-panel footer a{
  background:rgba(126,87,235,.20)!important;color:#d8c6ff!important;
}

/* Modales de edición de módulos (enlaces, imagen, colores, etc.) */
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-modal-backdrop{
  background:rgba(4,5,24,.80)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-modal-panel{
  background:linear-gradient(155deg,#40377f 0%,#29275f 58%,#181a43 100%)!important;
  color:#f6f2ff!important;
  border-color:rgba(255,255,255,.12)!important;
  box-shadow:0 30px 90px rgba(4,5,28,.58)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-modal-head{
  background:rgba(31,29,73,.96)!important;
  border-bottom-color:rgba(255,255,255,.09)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-modal-head span{color:#c3a8ff!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-modal-head h2{color:#fff!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-modal-head p{color:#b7afc7!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-modal-head>button{
  background:rgba(255,255,255,.09)!important;color:#eee6ff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-field>span{color:#d6cfe4!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-field :is(input,select),
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-link-row :is(select,input){
  background:#12142d!important;
  color:#fff!important;
  border-color:rgba(255,255,255,.13)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-modal-actions{
  border-top-color:rgba(255,255,255,.09)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-modal-actions .secondary{
  background:rgba(255,255,255,.08)!important;color:#ddd5eb!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-link-row,
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-color-grid label,
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-reset-check{
  background:rgba(13,15,44,.62)!important;
  border-color:rgba(255,255,255,.09)!important;
  color:#d8d1e4!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-link-logo{
  background:rgba(126,87,235,.18)!important;color:#d7c5ff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-link-row-top>button,
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-link-logo-file,
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-links-tools>button,
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-file{
  background:rgba(126,87,235,.18)!important;color:#ddceff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-link-row-top>button.danger{
  background:rgba(121,41,66,.38)!important;color:#ffb5c8!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-link-logo-tools>button{
  background:rgba(255,255,255,.08)!important;color:#cfc7d9!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-links-tools small,
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-status{color:#aaa3ba!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-image-preview{
  background:linear-gradient(145deg,#171934,#24204f)!important;
  border-color:rgba(255,255,255,.12)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-color-grid label>span{color:#d6cfe4!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-inline-color-grid input[type="color"]{
  background:#12142d!important;border-color:rgba(255,255,255,.12)!important;
}

/* Editor de fondo personalizado: UI oscura, pero la PREVIEW sigue mostrando la imagen real */
html[data-theme="dark"] body.profile-premium-v396 .profile-background-dialog{
  background:linear-gradient(155deg,#40377f 0%,#29275f 58%,#181a43 100%)!important;
  color:#f7f3ff!important;
  border-color:rgba(255,255,255,.12)!important;
  box-shadow:0 30px 90px rgba(4,5,28,.58)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-background-head{
  border-bottom-color:rgba(255,255,255,.09)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-background-head span{color:#c4aaff!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-background-head h2{color:#fff!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-background-head p{color:#b7afc8!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-background-close{
  background:rgba(255,255,255,.09)!important;color:#eee6ff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-background-file,
html[data-theme="dark"] body.profile-premium-v396 .profile-background-auto{
  background:rgba(13,15,44,.62)!important;
  border-color:rgba(255,255,255,.10)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-background-file span{color:#d9c8ff!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-background-file small,
html[data-theme="dark"] body.profile-premium-v396 .profile-background-auto span,
html[data-theme="dark"] body.profile-premium-v396 .profile-background-size-tip{color:#aaa3ba!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-background-auto strong{color:#fff!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-background-auto button{
  background:rgba(126,87,235,.20)!important;
  color:#dccaff!important;
  border-color:rgba(180,145,255,.28)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-background-upload-status.ok{
  color:#b8f2c6!important;background:rgba(47,116,70,.28)!important;border-color:rgba(112,213,139,.24)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-background-upload-status.error{
  color:#ffc0ce!important;background:rgba(126,43,63,.30)!important;border-color:rgba(255,137,164,.22)!important;
}

/* Módulos opcionales: editor */
html[data-theme="dark"] body.profile-premium-v396 .profile-extra-editor-panel{
  background:linear-gradient(155deg,#40377f 0%,#29275f 58%,#181a43 100%)!important;
  color:#f6f2ff!important;
  border:1px solid rgba(255,255,255,.11)!important;
  box-shadow:0 28px 80px rgba(4,5,28,.56)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-extra-editor-head span{color:#c6aaff!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-extra-editor-head h2{color:#fff!important}
html[data-theme="dark"] body.profile-premium-v396 .profile-extra-editor-close{
  background:rgba(255,255,255,.09)!important;color:#eee6ff!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-extra-editor-form :is(input,textarea){
  background:#12142d!important;color:#fff!important;border-color:rgba(255,255,255,.12)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-extra-row{
  background:rgba(13,15,44,.62)!important;border-color:rgba(255,255,255,.09)!important;
}
html[data-theme="dark"] body.profile-premium-v396 .profile-extra-cancel{
  background:rgba(255,255,255,.08)!important;color:#ddd5eb!important;
}

/* En móvil, mantener el mismo oscuro en hojas inferiores y no volver a blanco */
@media(max-width:900px){
  html[data-theme="dark"] body.profile-premium-v396 :is(.profile-module-library-panel,.profile-inline-modal-panel,.profile-extra-editor-panel,.profile-background-dialog){
    background:linear-gradient(155deg,#3c3478 0%,#27265b 58%,#171941 100%)!important;
  }
  html[data-theme="dark"] body.profile-premium-v396 .profile-settings-popover{
    background:linear-gradient(155deg,#3c3478 0%,#27265b 58%,#171941 100%)!important;
  }
}

/* =========================================================
   V23 · Perfil: fondo automático visible también en modo oscuro
   - NO toca el fondo personalizado.
   - NO cambia la portada.
   - La portada vuelve a generar el ambiente/fondo automático.
   ========================================================= */
html[data-theme="dark"] body.profile-premium-v396 .profile-v396-shell{
  position:relative!important;
  z-index:0!important;
  isolation:isolate;
}

html[data-theme="dark"] body.profile-premium-v396 .profile-v396-shell:not(.has-custom-profile-background)::before{
  content:""!important;
  display:block!important;
  position:fixed!important;
  inset:92px 0 0!important;
  z-index:-1!important;
  pointer-events:none!important;
  background-image:
    linear-gradient(180deg,rgba(14,16,57,.50),rgba(20,20,66,.76)),
    var(--profile-cover-image,linear-gradient(135deg,#233f88,#7240a5 58%,#172250))!important;
  background-size:cover!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
  filter:blur(42px) saturate(1.22)!important;
  transform:scale(1.08)!important;
  opacity:.66!important;
}

/* En móvil también se conserva el fondo automático si el tema es oscuro. */
@media(max-width:900px){
  html[data-theme="dark"] body.profile-premium-v396 .profile-v396-shell:not(.has-custom-profile-background)::before{
    display:block!important;
    inset:70px 0 0!important;
    filter:blur(30px) saturate(1.18)!important;
    transform:scale(1.10)!important;
    opacity:.58!important;
  }
}

/* V29 · Comunidades: conservar las imágenes/fondos de portada en modo oscuro */
html[data-theme="dark"] body.communities-v2-page{
  background:
    radial-gradient(circle at 16% 8%,rgba(95,68,190,.24),transparent 28%),
    radial-gradient(circle at 86% 16%,rgba(110,54,190,.16),transparent 30%),
    linear-gradient(180deg,#151636 0%,#19163e 48%,#21164f 100%)!important;
  background-attachment:fixed!important;
}

/* El selector global oscuro no debe borrar el cover de la comunidad destacada. */
html[data-theme="dark"] body.communities-v2-page .communities-v2-featured{
  background-image:
    linear-gradient(90deg,rgba(14,15,42,.96) 0%,rgba(21,19,58,.76) 45%,rgba(23,17,57,.22) 100%),
    var(--community-feature-image,linear-gradient(135deg,#1a2040,#35367a 52%,#6945bf))!important;
  background-size:cover!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}
html[data-theme="dark"] body.communities-v2-page .communities-v2-featured.theme-anime{
  background-image:linear-gradient(90deg,rgba(15,19,47,.96) 0%,rgba(24,28,67,.75) 46%,rgba(42,34,90,.12) 100%),var(--community-feature-image,linear-gradient(135deg,#181c3d,#213e77,#5a4ac1))!important;
}
html[data-theme="dark"] body.communities-v2-page .communities-v2-featured.theme-videojuegos{
  background-image:linear-gradient(90deg,rgba(15,18,42,.96),rgba(30,20,67,.66),rgba(25,20,70,.08)),var(--community-feature-image,linear-gradient(135deg,#101739,#31236e,#8f38b0))!important;
}
html[data-theme="dark"] body.communities-v2-page .communities-v2-featured.theme-tecnologia{
  background-image:linear-gradient(90deg,rgba(12,22,44,.95),rgba(20,51,91,.67),rgba(17,69,110,.10)),var(--community-feature-image,linear-gradient(135deg,#0d1c37,#164a7d,#1d9ac1))!important;
}
html[data-theme="dark"] body.communities-v2-page .communities-v2-featured.theme-musica{
  background-image:linear-gradient(90deg,rgba(31,17,45,.95),rgba(81,31,72,.62),rgba(118,37,73,.08)),var(--community-feature-image,linear-gradient(135deg,#27122f,#682453,#d05a5a))!important;
}
html[data-theme="dark"] body.communities-v2-page .communities-v2-featured.theme-arte{
  background-image:linear-gradient(90deg,rgba(35,22,54,.94),rgba(82,44,92,.60),rgba(126,74,74,.08)),var(--community-feature-image,linear-gradient(135deg,#452665,#9e4c94,#eba261))!important;
}

/* Página individual de comunidad: conservar su portada real también en dark. */
html[data-theme="dark"] body.community-v3-page .community-v3-hero{
  background-image:linear-gradient(105deg,rgba(18,13,48,.86) 0%,rgba(28,15,70,.58) 48%,rgba(23,16,56,.42) 100%),var(--community-cover-image),linear-gradient(135deg,#2e175f,#7130a8 55%,#a748c1)!important;
  background-size:cover!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.theme-anime{
  background-image:linear-gradient(105deg,rgba(16,10,46,.86) 0%,rgba(39,13,77,.57) 52%,rgba(20,12,50,.40) 100%),var(--community-cover-image),linear-gradient(135deg,#23154f,#6a28a4 55%,#a43fa8)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.theme-arte{
  background-image:linear-gradient(105deg,rgba(30,12,60,.84),rgba(94,35,119,.51),rgba(70,29,60,.38)),var(--community-cover-image),linear-gradient(135deg,#54216d,#a04da1,#dd886a)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.theme-memes{
  background-image:linear-gradient(105deg,rgba(24,15,61,.86),rgba(85,31,112,.52),rgba(45,21,63,.39)),var(--community-cover-image),linear-gradient(135deg,#38236f,#8c3fa7,#c95a86)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.theme-musica{
  background-image:linear-gradient(105deg,rgba(12,18,58,.88),rgba(53,25,112,.54),rgba(25,16,64,.40)),var(--community-cover-image),linear-gradient(135deg,#17255f,#5c36ad,#b64f9d)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.theme-tecnologia{
  background-image:linear-gradient(105deg,rgba(10,23,58,.88),rgba(23,57,112,.54),rgba(14,41,72,.39)),var(--community-cover-image),linear-gradient(135deg,#12325f,#2d69a8,#4a9aa9)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.theme-videojuegos{
  background-image:linear-gradient(105deg,rgba(18,12,56,.88),rgba(52,24,107,.54),rgba(28,17,72,.39)),var(--community-cover-image),linear-gradient(135deg,#22165c,#6330aa,#9b3c97)!important;
}

/* V35 · Portadas de comunidades visibles también en modo oscuro
   Evita que las capas del tema dark oculten la imagen real o el fallback del avatar. */
html[data-theme="dark"] body.community-v3-page .community-v3-hero{
  background-image:
    linear-gradient(105deg,rgba(12,9,35,.54) 0%,rgba(21,12,55,.31) 48%,rgba(18,12,48,.16) 100%),
    var(--community-cover-image),
    linear-gradient(135deg,#2e175f,#7130a8 55%,#a748c1)!important;
  background-size:cover!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.theme-anime{
  background-image:linear-gradient(105deg,rgba(12,8,34,.55),rgba(31,11,62,.30) 52%,rgba(16,9,42,.16)),var(--community-cover-image),linear-gradient(135deg,#23154f,#6a28a4 55%,#a43fa8)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.theme-arte{
  background-image:linear-gradient(105deg,rgba(24,9,45,.52),rgba(74,25,91,.28),rgba(55,20,47,.15)),var(--community-cover-image),linear-gradient(135deg,#54216d,#a04da1,#dd886a)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.theme-memes{
  background-image:linear-gradient(105deg,rgba(18,10,48,.53),rgba(66,22,88,.29),rgba(36,15,51,.15)),var(--community-cover-image),linear-gradient(135deg,#38236f,#8c3fa7,#c95a86)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.theme-musica{
  background-image:linear-gradient(105deg,rgba(8,13,43,.55),rgba(40,18,88,.30),rgba(18,11,51,.16)),var(--community-cover-image),linear-gradient(135deg,#17255f,#5c36ad,#b64f9d)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.theme-tecnologia{
  background-image:linear-gradient(105deg,rgba(7,17,43,.55),rgba(16,43,86,.30),rgba(10,31,57,.15)),var(--community-cover-image),linear-gradient(135deg,#12325f,#2d69a8,#4a9aa9)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.theme-videojuegos{
  background-image:linear-gradient(105deg,rgba(13,8,43,.55),rgba(39,17,86,.30),rgba(21,11,58,.16)),var(--community-cover-image),linear-gradient(135deg,#22165c,#6330aa,#9b3c97)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero::before{
  background:
    radial-gradient(circle at 72% 22%,rgba(185,100,255,.13),transparent 27%),
    linear-gradient(180deg,rgba(7,6,24,.01) 0%,rgba(7,6,24,.05) 48%,rgba(7,6,24,.25) 100%)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero .community-v3-hero-shade{
  background:linear-gradient(180deg,rgba(6,5,24,0) 0%,rgba(6,5,24,.08) 46%,rgba(6,5,24,.52) 100%)!important;
}

/* Portada automática basada en avatar: no permitir que el tema dark la apague. */
html[data-theme="dark"] body.community-v3-page .community-v3-hero.has-auto-cover .community-v3-auto-cover{
  display:block!important;
  background-image:var(--community-auto-cover)!important;
  background-size:cover!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
  opacity:1!important;
  filter:blur(24px) saturate(1.22) brightness(.92)!important;
  transform:scale(1.12)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.has-auto-cover::before{
  background:
    radial-gradient(circle at 72% 22%,rgba(184,104,255,.13),transparent 28%),
    linear-gradient(105deg,rgba(13,9,39,.30),rgba(26,13,58,.16) 52%,rgba(18,11,45,.10)),
    linear-gradient(180deg,transparent 34%,rgba(8,6,30,.22))!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.has-auto-cover .community-v3-hero-shade{
  background:linear-gradient(180deg,rgba(7,5,24,.01) 0%,rgba(7,5,24,.08) 45%,rgba(7,5,24,.48) 100%)!important;
}

@media(max-width:900px){
  html[data-theme="dark"] body.community-v3-page .community-v3-hero.has-auto-cover .community-v3-auto-cover{
    filter:blur(20px) saturate(1.18) brightness(.94)!important;
    transform:scale(1.10)!important;
  }
}

/* ===== V53 · Corrección definitiva de portadas de comunidades en dark =====
   La imagen subida vive en un elemento <img>; el fondo del hero queda solo
   como respaldo/degradado, por lo que nunca debe sustituir la portada real. */
html[data-theme="dark"] body.community-v3-page .community-v3-hero.has-real-cover{
  background-image:linear-gradient(135deg,#2e175f,#7130a8 55%,#a748c1)!important;
  background-color:#2e175f!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.has-real-cover .community-v3-cover-media.is-real-cover{
  display:block!important;
  opacity:1!important;
  visibility:visible!important;
  filter:none!important;
  transform:none!important;
  mix-blend-mode:normal!important;
  z-index:0!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.has-real-cover::before{
  z-index:1!important;
  background:
    radial-gradient(circle at 72% 22%,rgba(185,100,255,.10),transparent 28%),
    linear-gradient(105deg,rgba(12,9,35,.34),rgba(21,12,55,.18) 48%,rgba(18,12,48,.08))!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.has-real-cover .community-v3-hero-shade{
  z-index:1!important;
  background:linear-gradient(180deg,rgba(6,5,24,0),rgba(6,5,24,.05) 48%,rgba(6,5,24,.42) 100%)!important;
}
html[data-theme="dark"] body.community-v3-page .community-v3-hero.has-real-cover .community-v3-hero-content{z-index:2!important}

html[data-theme="dark"] body.communities-v2-page .communities-v2-card-media.is-real-cover,
html[data-theme="dark"] body.communities-v2-page .communities-v2-feature-image.is-real-cover{
  display:block!important;
  opacity:1!important;
  visibility:visible!important;
  filter:none!important;
  mix-blend-mode:normal!important;
}
