:root {
    --bg:#09090b; --bg2:#121214; --bg3:#0e0e11; --bg4:#17171b; --fg:#fafafa; --fg2:#d4d4d8; --mut:#a1a1aa; --mut2:#71717a; --bd:#27272a; --bd2:#3f3f46; --ov:255,255,255;
    --acc:#a855f7; --acc-rgb:168,85,247; --acc2:#7c3aed; --acc2-rgb:124,58,237; --acc-soft:#d8b4fe; --acc-soft2:#e9d5ff; --on-acc:#fff;
    --amb-top:#1e1b4b; --glow2-rgb:37,99,235; --glow3-rgb:219,39,119; --shadow-rgb:0,0,0; --bg-rgb:9,9,11; --amb-rgb:30,27,75;
    color-scheme: dark;
}
/* Temas: Morado (por defecto) · Negro · Blanco. Se elige en la cabecera y se recuerda en el navegador. */
html[data-theme="black"] {
    --bg:#000; --bg2:#0b0b0c; --bg3:#060606; --bg4:#131315; --bd:#232326; --bd2:#34343a;
    --acc:#fafafa; --acc-rgb:250,250,250; --acc2:#a1a1aa; --acc2-rgb:161,161,170; --acc-soft:#e4e4e7; --acc-soft2:#fff; --on-acc:#09090b;
    --amb-top:#18181b; --bg-rgb:0,0,0; --amb-rgb:24,24,27; --glow2-rgb:161,161,170; --glow3-rgb:113,113,122;
}
html[data-theme="white"] {
    --bg:#f6f6f7; --bg2:#fff; --bg3:#f0f0f2; --bg4:#e9e9ec; --fg:#09090b; --fg2:#27272a; --mut:#52525b; --mut2:#71717a; --bd:#e4e4e7; --bd2:#d4d4d8; --ov:0,0,0;
    --acc:#09090b; --acc-rgb:9,9,11; --acc2:#3f3f46; --acc2-rgb:63,63,70; --acc-soft:#3f3f46; --acc-soft2:#09090b; --on-acc:#fff;
    --amb-top:#e4e4e7; --bg-rgb:246,246,247; --amb-rgb:228,228,231; --glow2-rgb:161,161,170; --glow3-rgb:212,212,216; --shadow-rgb:24,24,27;
    color-scheme: light;
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--bg); color: var(--fg); height: 100vh; display: flex; overflow: hidden; }
.app-container { display: flex; width: 100%; height: 100%; }

/* Sidebar */
.sidebar { width: 250px; background-color: var(--bg2); border-right: 1px solid var(--bd); display: flex; flex-direction: column; padding: 24px; }
.logo { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 40px; }
.logo-icon { color: var(--acc); }
nav ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
nav li { padding: 12px 16px; border-radius: 8px; color: var(--mut); cursor: pointer; transition: all 0.2s ease; font-weight: 500; }
nav li:hover { color: var(--fg); background-color: rgba(var(--ov), 0.05); }
nav li.active { color: var(--fg); background-color: var(--bg4); border-left: 3px solid var(--acc); }

.referral-box { margin-top: auto; background-color: var(--bg4); padding: 16px; border-radius: 12px; border: 1px solid var(--bd); text-align: center; }
.referral-box p { font-size: 14px; color: var(--mut); margin-bottom: 12px; }
.referral-box button { width: 100%; background: transparent; color: var(--acc); border: 1px solid var(--acc); padding: 8px; border-radius: 6px; cursor: pointer; font-weight: 600; transition: all 0.2s ease; }
.referral-box button:hover { background: rgba(var(--acc-rgb), 0.1); }

/* Main Content & SPA Transitions */
.content { flex: 1; display: flex; flex-direction: column; padding: 32px 48px; overflow-y: auto; background: transparent; position: relative; z-index: 1; }
.view-section { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 48px; }
.tabs { display: flex; gap: 32px; border-bottom: 1px solid var(--bd); padding-bottom: 8px; }
.tab { color: var(--mut); cursor: pointer; font-weight: 500; transition: color 0.2s ease; position: relative; }
.tab:hover { color: var(--fg); }
.tab.active-tab { color: var(--fg); }
.tab.active-tab::after { content: ''; position: absolute; bottom: -9px; left: 0; width: 100%; height: 2px; background-color: var(--fg); }
.connect-wallet { background-color: transparent; color: var(--fg); border: 1px solid var(--bd2); padding: 8px 16px; border-radius: 20px; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.2s ease; }
.connect-wallet:hover { border-color: var(--acc); box-shadow: 0 0 10px rgba(var(--acc-rgb), 0.2); }

.section-top { margin-bottom: 40px; }
.eyeline { color: var(--mut); text-transform: uppercase; letter-spacing: 0.15em; font-size: 11px; margin-bottom: 12px; font-weight: 600; }
.section-top h2 { font-size: clamp(28px, 4vw, 36px); letter-spacing: -0.05em; line-height: 1; margin-bottom: 12px; }
.section-top p { font-size: 14px; color: var(--mut); line-height: 1.6; }

.ego-banner { background-color: var(--bg2); border: 1px solid var(--bd); border-radius: 16px; padding: 32px; text-align: center; }
.ego-banner h2 { font-size: 24px; margin-bottom: 8px; font-weight: 700; }
.ego-banner p { color: var(--mut); margin-bottom: 24px; font-size: 14px; }
.ego-btn { width: auto !important; padding: 12px 32px !important; margin-top: 0 !important; display: inline-block; }

.stats-container { display: flex; gap: 24px; margin-bottom: 48px; }
.stat-box { background-color: var(--bg2); border: 1px solid var(--bd); border-radius: 12px; padding: 20px; flex: 1; transition: transform 0.2s ease; }
.stat-box:hover { transform: translateY(-3px); border-color: var(--bd2); }
.stat-box p { color: var(--mut); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; font-weight: 600; }
.stat-box h2 { font-size: 28px; font-weight: 800; color: var(--fg); letter-spacing: -0.05em; }

.ranking-section { margin-bottom: 48px; }
.ranking-section .page-h { font-size: 32px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.05em; }
.subtitle { color: var(--mut); margin-bottom: 40px; font-size: 14px; }
.ranking-table { display: flex; flex-direction: column; gap: 8px; }
.rank-row { display: flex; align-items: center; justify-content: space-between; background-color: var(--bg2); border: 1px solid var(--bd); padding: 16px 24px; border-radius: 12px; transition: background 0.2s ease, transform 0.2s; }
.rank-row:hover { background-color: var(--bg4); transform: scale(1.01); border-color: var(--bd2); }
.rank-left { display: flex; align-items: center; gap: 20px; }
.rank-pos { color: var(--mut); font-weight: 700; width: 24px; font-size: 18px; }
.rank-name { font-weight: 700; font-size: 16px; color: var(--fg); }
.rank-community { font-size: 12px; color: var(--acc); margin-top: 4px; font-weight: 500; }
.rank-amount { font-weight: 800; font-size: 18px; color: var(--fg); letter-spacing: -0.03em; }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.pill { background: transparent; color: var(--acc); border: 1px solid var(--acc); border-radius: 20px; padding: 8px 16px; font-size: 12px; font-weight: 600; transition: all 0.2s ease; cursor: pointer; }
.pill.active { background: var(--acc2); color: var(--on-acc); box-shadow: 0 0 10px rgba(var(--acc-rgb),0.3); }
.pill.secondary { color: var(--fg); border-color: var(--bd2); background: transparent; box-shadow: none; }
.pill.secondary:hover { border-color: var(--fg); background: rgba(var(--ov),0.05); }

/* Muro de Logros Actualizado (Claimed vs Unclaimed) */
.leaderboard-section .page-h { font-size: 32px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.05em; }
.achievements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.achievement-card { background-color: var(--bg2); border: 1px solid var(--bd); border-radius: 16px; padding: 24px; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; display: flex; flex-direction: column; gap: 16px; }

.achievement-card.claimed:hover { transform: translateY(-5px); border-color: var(--bd2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.achievement-card.claimed:hover .whatsapp { box-shadow: 0 0 15px rgba(37, 211, 102, 0.2); }
.achievement-card.claimed:hover .discord { box-shadow: 0 0 15px rgba(88, 101, 242, 0.2); }
.achievement-card.claimed:hover .telegram { box-shadow: 0 0 15px rgba(0, 136, 204, 0.2); }
.achievement-card.claimed:hover .xbox { box-shadow: 0 0 15px rgba(16, 124, 16, 0.2); }
.achievement-card.claimed:hover .x-twitter { box-shadow: 0 0 15px rgba(var(--ov), 0.1); }
.achievement-card.claimed:hover .custom { box-shadow: 0 0 15px rgba(250, 204, 21, 0.2); }

.achievement-card.unclaimed { border-style: dashed; opacity: 0.7; }
.achievement-card.unclaimed:hover { opacity: 1; border-style: solid; border-color: var(--acc); box-shadow: 0 0 20px rgba(var(--acc-rgb),0.15); transform: translateY(-5px); cursor: pointer; }
.unclaimed-badge { background-color: rgba(161, 161, 170, 0.1); color: var(--mut); }

.card-header { display: flex; justify-content: flex-start; }
.badge { font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.card-body h3 { font-size: 18px; font-weight: 700; color: var(--fg2); margin-bottom: 8px; }
.card-body .description { font-size: 13px; color: var(--mut); line-height: 1.5; }

.card-footer { margin-top: auto; display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--bd); }
.user-avatar { font-size: 24px; }
.owner-info { display: flex; flex-direction: column; gap: 2px; }
.owner-info span { font-size: 11px; color: var(--mut); text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em; }
.owner-info strong { font-weight: 700; font-size: 12px; text-transform: none; }
.owner-name { color: var(--fg); }

.whatsapp { background-color: rgba(37, 211, 102, 0.1); color: #25D366; }
.discord { background-color: rgba(88, 101, 242, 0.1); color: #5865F2; }
.telegram { background-color: rgba(0, 136, 204, 0.1); color: #0088cc; }
.xbox { background-color: rgba(16, 124, 16, 0.1); color: #107C10; }
.x-twitter { background-color: rgba(var(--ov), 0.1); color: var(--fg); }
.custom { background-color: rgba(250, 204, 21, 0.1); color: #facc15; }

.whatsapp-text { color: #25D366 !important; }
.discord-text { color: #5865F2 !important; }
.telegram-text { color: #0088cc !important; }
.xbox-text { color: #107C10 !important; }
.x-twitter-text { color: var(--fg) !important; }
.custom-text { color: #facc15 !important; }

/* Modales */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; z-index: 100; backdrop-filter: blur(4px); }
.modal-bg.open { display: flex; }
.modal { width: min(400px, 100%); background: var(--bg2); border: 1px solid var(--bd); border-radius: 16px; padding: 32px; position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.modal-header { color: var(--mut); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; font-weight: 600; }
.modal h2 { font-size: 24px; margin-bottom: 8px; font-weight: 800; letter-spacing: -0.03em; }
.modal-desc { font-size: 13px; color: var(--mut); line-height: 1.5; margin-bottom: 24px; }
.modal label { display: block; color: var(--mut); font-size: 11px; text-transform: uppercase; margin: 16px 0 8px; font-weight: 600; }
.modal input, .modal select { width: 100%; background: var(--bg); border: 1px solid var(--bd); color: var(--fg); padding: 12px 16px; border-radius: 8px; outline: none; transition: border-color 0.2s; font-weight: 500; }
.modal input:focus, .modal select:focus { border-color: var(--acc); }

.color-picker { -webkit-appearance: none; border: 1px solid var(--bd); border-radius: 8px; padding: 0 !important; width: 44px !important; height: 44px !important; background: var(--bg); cursor: pointer; }
.color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.color-picker::-webkit-color-swatch { border: none; border-radius: 6px; }

.close { position: absolute; right: 24px; top: 24px; border: 0; background: none; color: var(--mut); font-size: 24px; cursor: pointer; }
.close:hover { color: var(--fg); }
.action-btn { width: 100%; margin-top: 24px; background: transparent; color: var(--acc); border: 1px solid var(--acc); padding: 12px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: background 0.2s, box-shadow 0.2s; }
.action-btn:hover { background: rgba(var(--acc-rgb), 0.1); box-shadow: 0 0 15px rgba(var(--acc-rgb),0.2); }
.crypto-box { background: var(--bg); padding: 16px; border-radius: 8px; border: 1px solid var(--bd2); text-align: center; font-family: monospace; color: var(--acc); word-break: break-all; font-weight: 600; }
.spinner { width: 28px; height: 28px; border: 3px solid rgba(var(--acc-rgb),0.3); border-radius: 50%; border-top-color: var(--acc); animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Añadidos: errores de formulario, estados y diseño responsive ---- */
.form-error { color: #f87171; font-size: 13px; margin-top: 16px; line-height: 1.4; }
.action-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.achievements-grid { min-width: 0; }
.modal { max-height: 92vh; overflow-y: auto; }

/* =====================================================================
   AMBIENTE: glows suaves de fondo + animaciones sutiles
   ===================================================================== */
.app-container { position: relative; z-index: 1; }
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
    background: radial-gradient(circle at 50% 0%, var(--amb-top) 0%, var(--bg) 42%); }
.ambient span { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .32; will-change: transform; }
.ambient span:nth-child(1) { width: 480px; height: 480px; background: var(--acc2); top: -160px; left: 18%; animation: drift1 26s ease-in-out infinite alternate; }
.ambient span:nth-child(2) { width: 420px; height: 420px; background: #2563eb; bottom: -180px; right: 8%; opacity: .2; animation: drift2 32s ease-in-out infinite alternate; }
.ambient span:nth-child(3) { width: 320px; height: 320px; background: #db2777; top: 45%; left: -120px; opacity: .12; animation: drift3 38s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(140px, 90px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-160px, -80px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(220px, -120px) scale(1.2); } }

.logo-icon { display: inline-block; animation: logoGlow 4s ease-in-out infinite; }
@keyframes logoGlow { 0%,100% { filter: drop-shadow(0 0 2px rgba(var(--acc-rgb),.35)); transform: translateY(0); } 50% { filter: drop-shadow(0 0 10px rgba(var(--acc-rgb),.85)); transform: translateY(-2px); } }

.section-top h2 { background: linear-gradient(90deg, var(--fg) 0%, var(--acc-soft) 50%, var(--fg) 100%); background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: textSheen 8s linear infinite; }
@keyframes textSheen { to { background-position: -200% 0; } }

.stat-box { position: relative; overflow: hidden; animation: riseIn .6s cubic-bezier(.2,.8,.2,1) both; }
.stat-box:nth-child(2) { animation-delay: .08s; } .stat-box:nth-child(3) { animation-delay: .16s; }
.stat-box::after { content: ''; position: absolute; left: 12%; right: 12%; top: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--acc-rgb),.9), transparent); opacity: .35; transition: opacity .3s; }
.stat-box:hover { box-shadow: 0 8px 30px -12px rgba(var(--acc-rgb),.45); }
.stat-box:hover::after { opacity: 1; }

.ego-banner { position: relative; overflow: hidden; animation: riseIn .7s .2s cubic-bezier(.2,.8,.2,1) both; }
.ego-banner::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
    background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, rgba(var(--acc-rgb),.85) 85%, transparent 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
    animation: spinAng 7s linear infinite; }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spinAng { to { --ang: 360deg; } }
.ego-btn { animation: ctaPulse 3.2s ease-in-out infinite; }
@keyframes ctaPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(var(--acc-rgb),0); } 50% { box-shadow: 0 0 22px 2px rgba(var(--acc-rgb),.32); } }

.rank-row, .achievement-card { animation: riseIn .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.rank-row.top1 { border-color: rgba(250,204,21,.35); box-shadow: 0 0 28px -10px rgba(250,204,21,.45); }
.rank-row.top2 { border-color: rgba(203,213,225,.28); box-shadow: 0 0 24px -12px rgba(203,213,225,.35); }
.rank-row.top3 { border-color: rgba(217,119,6,.3); box-shadow: 0 0 24px -12px rgba(217,119,6,.4); }
.rank-row.top1 .rank-pos { color: #facc15; text-shadow: 0 0 10px rgba(250,204,21,.6); }
.rank-row.top2 .rank-pos { color: #cbd5e1; text-shadow: 0 0 10px rgba(203,213,225,.45); }
.rank-row.top3 .rank-pos { color: #d97706; text-shadow: 0 0 10px rgba(217,119,6,.5); }

.achievement-card.claimed { box-shadow: 0 0 26px -14px var(--glow, rgba(var(--acc-rgb),.5)); }
.achievement-card.unclaimed:hover .user-avatar { animation: wiggle .5s; }
@keyframes wiggle { 25% { transform: rotate(-12deg); } 75% { transform: rotate(10deg); } }

.pill, .action-btn, .connect-wallet, .referral-box button { -webkit-tap-highlight-color: transparent; }
.pill:active, .action-btn:active, .connect-wallet:active, .referral-box button:active { transform: scale(.96); }
.pill.active { animation: pillGlow 3s ease-in-out infinite; }
@keyframes pillGlow { 0%,100% { box-shadow: 0 0 8px rgba(var(--acc-rgb),.25); } 50% { box-shadow: 0 0 16px rgba(var(--acc-rgb),.5); } }

.modal-bg.open { animation: fadeBg .25s ease-out; }
.modal-bg.open .modal { animation: popIn .35s cubic-bezier(.2,.9,.3,1.2); }
@keyframes fadeBg { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
.modal { box-shadow: 0 20px 40px rgba(0,0,0,.5), 0 0 40px -18px rgba(var(--acc-rgb),.5); }
.spinner { box-shadow: 0 0 14px rgba(var(--acc-rgb),.35); }
.crypto-box { transition: box-shadow .3s, border-color .3s; }
.crypto-box:hover { border-color: var(--acc); box-shadow: 0 0 16px -4px rgba(var(--acc-rgb),.5); }
.modal.success { animation: successGlow 1.6s ease-out; border-color: rgba(37,211,102,.55); box-shadow: 0 20px 40px rgba(0,0,0,.5), 0 0 50px -8px rgba(37,211,102,.55); }
@keyframes successGlow { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.7); } 100% { box-shadow: 0 20px 40px rgba(0,0,0,.5), 0 0 50px -8px rgba(37,211,102,.55); } }

.form-error { color: #f87171; font-size: 13px; margin-top: 16px; line-height: 1.4; }
.action-btn:disabled { opacity: .5; cursor: not-allowed; }
.modal { max-height: 92vh; max-height: 92dvh; overflow-y: auto; }

/* Barra inferior: oculta en escritorio */
.bottom-nav { display: none; }

/* =====================================================================
   MÓVIL (html.is-mobile lo pone js/device.js)
   ===================================================================== */
html.is-mobile body { height: auto; min-height: 100vh; min-height: 100dvh; overflow-x: hidden; overflow-y: auto; display: block; }
html.is-mobile .app-container { flex-direction: column; height: auto; min-height: 100dvh; }
html.is-mobile .ambient span { filter: blur(60px); }
html.is-mobile .ambient span:nth-child(1) { width: 320px; height: 320px; left: -60px; }
html.is-mobile .ambient span:nth-child(2) { width: 280px; height: 280px; right: -80px; }
html.is-mobile .ambient span:nth-child(3) { display: none; }

/* Barra superior compacta */
html.is-mobile .sidebar { position: sticky; top: 0; z-index: 40; width: 100%; flex-direction: row; align-items: center; justify-content: space-between;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px; border-right: 0; border-bottom: 1px solid var(--bd);
    background: rgba(var(--bg-rgb),.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
html.is-mobile .logo { margin: 0; font-size: 17px; }
html.is-mobile .sidebar nav { display: none; }
html.is-mobile .referral-box { margin: 0; padding: 0; background: none; border: 0; }
html.is-mobile .referral-box p { display: none; }
html.is-mobile .referral-box button { width: auto; padding: 8px 14px; border-radius: 20px; font-size: 13px; }

html.is-mobile .content { overflow: visible; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
html.is-mobile header { display: none; }                       /* la navegación pasa a la barra inferior */
html.is-mobile .section-top { margin-bottom: 24px; }
html.is-mobile .section-top h2 { font-size: 30px; }
html.is-mobile .eyeline { margin-bottom: 8px; }

/* Estadísticas: el total arriba a ancho completo, las otras dos en fila */
html.is-mobile .stats-container { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
html.is-mobile .stat-box { padding: 16px; }
html.is-mobile .stat-box:first-child { grid-column: 1 / -1; }
html.is-mobile .stat-box:first-child h2 { font-size: 34px; }
html.is-mobile .stat-box h2 { font-size: 24px; }
html.is-mobile .ego-banner { padding: 24px 18px; }
html.is-mobile .ego-banner h2 { font-size: 21px; }
html.is-mobile .ego-btn { width: 100% !important; }

/* Ranking y filtros */
html.is-mobile .ranking-section .page-h, html.is-mobile .leaderboard-section .page-h { font-size: 26px; }
html.is-mobile .community-filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 20px; padding: 2px 16px 8px;
    scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding: 0 16px; }
html.is-mobile .community-filters::-webkit-scrollbar { display: none; }
html.is-mobile .pill { flex: 0 0 auto; padding: 9px 16px; scroll-snap-align: start; }
html.is-mobile .rank-row { padding: 14px; }
html.is-mobile .rank-row:hover { transform: none; }
html.is-mobile .rank-left { gap: 10px; min-width: 0; }
html.is-mobile .rank-pos { width: 20px; font-size: 16px; }
html.is-mobile .rank-name { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42vw; }
html.is-mobile .rank-amount { font-size: 16px; }
html.is-mobile .achievements-grid { grid-template-columns: 1fr; gap: 14px; }
html.is-mobile .achievement-card { padding: 20px; }

/* Barra inferior flotante */
html.is-mobile .bottom-nav { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 50;
    gap: 4px; padding: 6px; border-radius: 22px; background: var(--bg4); border: 1px solid var(--bd);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(0,0,0,.55), 0 0 30px -14px rgba(var(--acc-rgb),.55);
    animation: navUp .6s cubic-bezier(.2,.9,.3,1.1) both; }
@keyframes navUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 0; border-radius: 16px;
    background: transparent; color: var(--mut); font-size: 11px; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color .2s, background .2s, transform .15s; }
.bottom-nav button:active { transform: scale(.92); }
.bottom-nav .bn-icon { font-size: 19px; transition: transform .25s; }
.bottom-nav button.active { color: var(--fg); background: rgba(var(--acc-rgb),.16); box-shadow: inset 0 0 14px rgba(var(--acc-rgb),.2); }
.bottom-nav button.active .bn-icon { transform: translateY(-2px) scale(1.12); }
.bottom-nav .bn-claim { color: var(--acc-soft); animation: ctaPulse 3.2s ease-in-out infinite; }

/* Modal como hoja inferior */
html.is-mobile .modal-bg { align-items: flex-end; padding: 0; }
html.is-mobile .modal { width: 100%; border-radius: 22px 22px 0 0; padding: 26px 20px calc(26px + env(safe-area-inset-bottom)); max-height: 94dvh; border-bottom: 0; }
html.is-mobile .modal::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--bd2); margin: -12px auto 16px; }
html.is-mobile .modal-bg.open .modal { animation: sheetUp .38s cubic-bezier(.2,.9,.3,1); }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
html.is-mobile .modal input, html.is-mobile .modal select { font-size: 16px; }   /* evita el zoom automático de iOS */
html.is-mobile .close { top: 18px; right: 18px; }

/* Respeta a quien pide menos movimiento */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .ambient span { animation: none !important; }
}

/* =====================================================================
   PANTALLA DE BIENVENIDA + SELECTOR DE IDIOMA
   ===================================================================== */
html.splash-open, html.splash-open body { overflow: hidden !important; }

.splash { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
    padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom)); cursor: pointer; outline: none;
    background: radial-gradient(circle at 50% 38%, rgba(var(--amb-rgb),.92) 0%, rgba(var(--bg-rgb),.97) 62%);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    transition: opacity .55s ease, transform .55s ease, filter .55s ease; -webkit-tap-highlight-color: transparent; }
.splash[hidden] { display: none; }
.splash.leaving { opacity: 0; transform: scale(1.04); filter: blur(6px); pointer-events: none; }
.splash-glow { position: absolute; left: 50%; top: 40%; width: 420px; height: 420px; max-width: 90vw; max-height: 90vw; transform: translate(-50%, -50%);
    border-radius: 50%; background: radial-gradient(circle, rgba(var(--acc2-rgb),.38) 0%, rgba(var(--acc2-rgb),0) 68%); filter: blur(10px);
    animation: splashBreath 5s ease-in-out infinite; pointer-events: none; }
@keyframes splashBreath { 0%,100% { opacity: .65; transform: translate(-50%, -50%) scale(.92); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } }

.splash-center { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.splash-logo { font-size: 76px; line-height: 1; animation: splashFloat 4.5s ease-in-out infinite, logoGlow 4s ease-in-out infinite; }
@keyframes splashFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.splash-title { font-size: clamp(30px, 8vw, 44px); font-weight: 800; letter-spacing: -0.05em;
    background: linear-gradient(90deg, var(--fg) 0%, var(--acc-soft) 50%, var(--fg) 100%); background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: textSheen 8s linear infinite; }
.splash-tap { margin-top: 26px; font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--acc-soft2);
    animation: tapPulse 2.4s ease-in-out infinite; }
@keyframes tapPulse { 0%,100% { opacity: .45; text-shadow: 0 0 0 rgba(var(--acc-rgb),0); } 50% { opacity: 1; text-shadow: 0 0 18px rgba(var(--acc-rgb),.8); } }

.splash-bottom { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.splash-credit { font-size: 11px; letter-spacing: .08em; color: var(--fg); opacity: .38; cursor: default; }

.splash-center, .splash-bottom { animation: riseIn .8s .1s cubic-bezier(.2,.8,.2,1) both; }

/* Selector ES | EN */
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg4); border: 1px solid var(--bd); }
.lang-switch button { border: 0; background: transparent; color: var(--mut); font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .08em;
    padding: 6px 13px; border-radius: 999px; cursor: pointer; transition: color .2s, background .2s, box-shadow .2s, transform .15s; -webkit-tap-highlight-color: transparent; }
.lang-switch button:hover { color: var(--fg); }
.lang-switch button:active { transform: scale(.94); }
.lang-switch button.active { color: var(--on-acc); background: var(--acc2); box-shadow: 0 0 14px rgba(var(--acc-rgb),.45); }
.lang-switch button:focus-visible { outline: 2px solid var(--acc-soft); outline-offset: 2px; }

.header-right { display: flex; align-items: center; gap: 12px; }
.lang-switch-top { display: none; }

/* Móvil: el idioma pasa a la barra superior (el botón Reclamar ya está en la barra inferior) */
html.is-mobile .lang-switch-top { display: inline-flex; }
html.is-mobile .sidebar .referral-box { display: none; }
html.is-mobile .splash-logo { font-size: 68px; }

/* =====================================================================
   CRÉDITOS (blanco / azul) — el brillo baja y vuelve a subir
   ===================================================================== */
.credits-section .page-h { font-size: 32px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.05em; }
.credits-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

.credit-card { --blue: #60a5fa; --blue-soft: #93c5fd; position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 150px; padding: 26px;
    border-radius: 16px; background: linear-gradient(160deg, rgba(var(--glow2-rgb),.12), var(--bg2) 55%); border: 1px solid rgba(96,165,250,.28);
    color: var(--fg); text-decoration: none; cursor: pointer; overflow: hidden; -webkit-tap-highlight-color: transparent;
    animation: riseIn .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 90ms);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.credit-card::before { content: ''; position: absolute; left: 10%; right: 10%; top: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(147,197,253,.9), transparent); opacity: .5; }
.credit-card:hover, .credit-card:focus-visible { transform: translateY(-5px); border-color: var(--blue); outline: none;
    box-shadow: 0 12px 34px -12px rgba(96,165,250,.6), 0 0 26px -10px rgba(147,197,253,.5); }
.credit-card:active { transform: scale(.98); }

.credit-name { font-size: clamp(26px, 3.4vw, 32px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.1;
    background: linear-gradient(90deg, var(--fg) 0%, #93c5fd 45%, #3b82f6 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    animation: creditDim 4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1s); }
.credit-card.alt .credit-name { background: linear-gradient(90deg, #3b82f6 0%, #93c5fd 55%, var(--fg) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
/* el brillo baja y vuelve a subir (cada tarjeta desfasada para que no pulsen a la vez) */
@keyframes creditDim {
    0%, 100% { opacity: 1;   filter: drop-shadow(0 0 12px rgba(96,165,250,.85)) brightness(1.15); }
    50%      { opacity: .42; filter: drop-shadow(0 0 2px rgba(96,165,250,.15))  brightness(.8); }
}
.credit-role { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #bfdbfe; }
.credit-link { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--blue-soft, #93c5fd); }
.credit-link > span:first-child { padding: 4px 10px; border-radius: 999px; background: rgba(96,165,250,.14); border: 1px solid rgba(96,165,250,.3); }
.credit-arrow { transition: transform .25s ease; }
.credit-card:hover .credit-arrow, .credit-card:focus-visible .credit-arrow { transform: translate(3px, -3px); }

html.is-mobile .credits-section .page-h { font-size: 26px; }
html.is-mobile .credits-grid { grid-template-columns: 1fr; gap: 14px; }
html.is-mobile .credit-card { min-height: 0; padding: 22px; }
html.is-mobile .credit-card:hover { transform: none; }

/* Barra inferior con 5 botones: texto más compacto, nunca se corta */
.bottom-nav button { min-width: 0; padding-left: 2px; padding-right: 2px; }
.bottom-nav button > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.is-mobile .bottom-nav { left: 8px; right: 8px; gap: 2px; }
html.is-mobile .bottom-nav button { font-size: 10.5px; }

/* Vista previa del precio en vivo (formulario de pago) */
.rate-preview { margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 12px; line-height: 1.5; white-space: pre-line;
    color: #bfdbfe; background: rgba(var(--glow2-rgb),.1); border: 1px solid rgba(96,165,250,.25); }

/* =====================================================================
   CUENTAS, PERFILES Y FORO (mismo lenguaje visual: tarjetas var(--bg2), borde var(--bd), acento var(--acc))
   ===================================================================== */
.forum-section .page-h { font-size: 32px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.05em; }
.forum-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.search-input, .modal textarea, .account-form textarea, .account-form input { background: var(--bg); border: 1px solid var(--bd); color: var(--fg); padding: 12px 16px; border-radius: 8px; outline: none; font-weight: 500; font-size: 14px; transition: border-color .2s; }
.search-input { flex: 1; min-width: 200px; }
.search-input:focus, .modal textarea:focus, .account-form textarea:focus, .account-form input:focus { border-color: var(--acc); }
.modal textarea { width: 100%; resize: vertical; min-height: 140px; line-height: 1.5; }
.new-post-btn { width: auto !important; margin: 0 !important; padding: 12px 22px !important; }
.modal-wide { width: min(640px, 100%); }
.modal .help { margin: 6px 0 0; font-size: 12px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.form-actions .action-btn { flex: 1; min-width: 140px; }

.note { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; color: #bfdbfe; background: rgba(var(--glow2-rgb),.1); border: 1px solid rgba(96,165,250,.25); }
.note.ok { color: #86efac; background: rgba(37,211,102,.08); border-color: rgba(37,211,102,.3); }
.note.error { color: #fca5a5; background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.3); }

.post-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.post-card { display: block; text-decoration: none; color: inherit; background: var(--bg2); border: 1px solid var(--bd); border-radius: 14px; padding: 18px 22px;
    animation: riseIn .45s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms); transition: background .2s, border-color .2s, transform .2s; }
.post-card:hover, .post-card:focus-visible { background: var(--bg4); border-color: var(--bd2); transform: translateY(-2px); outline: none; }
.post-card.pinned { border-color: rgba(var(--acc-rgb),.45); box-shadow: 0 0 22px -12px rgba(var(--acc-rgb),.7); }
.post-card-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.post-title { font-size: 18px; font-weight: 700; color: var(--fg); letter-spacing: -0.02em; margin-bottom: 6px; overflow-wrap: anywhere; }
.post-excerpt { font-size: 13px; color: var(--mut); line-height: 1.5; margin-bottom: 10px; overflow-wrap: anywhere; }
.post-meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--mut); }
.cat-badge, .mini-badge { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.cat-badge { color: var(--acc-soft); background: rgba(var(--acc-rgb),.12); border: 1px solid rgba(var(--acc-rgb),.28); }
.mini-badge { color: var(--fg2); background: rgba(var(--ov),.07); border: 1px solid var(--bd2); }
.mini-badge.pin { color: #facc15; border-color: rgba(250,204,21,.35); background: rgba(250,204,21,.08); }
.mini-badge.staff { color: #93c5fd; border-color: rgba(96,165,250,.4); background: rgba(96,165,250,.1); }
.mini-badge.publisher { color: #86efac; border-color: rgba(37,211,102,.35); background: rgba(37,211,102,.08); }
.mini-badge.st-draft { color: var(--mut); } .mini-badge.st-hidden, .mini-badge.st-deleted { color: #fca5a5; border-color: rgba(248,113,113,.35); }
.empty-row { justify-content: center; color: var(--mut); font-style: italic; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }
.pager-info { font-size: 12px; color: var(--mut); }
.pill:disabled { opacity: .4; cursor: not-allowed; }

.back-link { display: inline-block; margin-bottom: 18px; color: var(--mut); font-size: 13px; font-weight: 600; text-decoration: none; }
.back-link:hover { color: var(--fg); }
.post-full, .profile-card { background: var(--bg2); border: 1px solid var(--bd); border-radius: 16px; padding: 28px; }
.post-heading { font-size: clamp(24px, 4vw, 32px) !important; letter-spacing: -0.04em; line-height: 1.15; margin: 8px 0 12px !important; overflow-wrap: anywhere; }
.post-body { margin-top: 20px; color: var(--fg2); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.post-body p { margin-bottom: 14px; } .post-body ul { margin: 0 0 14px 22px; } .post-body li { margin-bottom: 4px; }
.post-body h3 { font-size: 18px; margin: 18px 0 8px; }
.post-body code { font-family: monospace; font-size: .92em; padding: 2px 6px; border-radius: 6px; background: var(--bg); border: 1px solid var(--bd); color: var(--acc-soft); }
.post-body a { color: var(--acc); text-decoration: underline; text-underline-offset: 3px; }
.post-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--bd); }

.avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; overflow: hidden; border-radius: 50%; background: var(--bd); color: var(--acc-soft2); font-weight: 700; width: 1.9em; height: 1.9em; font-size: 14px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.author { display: inline-flex; align-items: center; gap: 8px; } .author .avatar { width: 22px; height: 22px; font-size: 11px; }
.author-link { color: var(--fg); font-weight: 600; text-decoration: none; } .author-link:hover { color: var(--acc-soft); }
.profile-card { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.profile-card .avatar { width: 72px; height: 72px; font-size: 28px; }
.profile-info { min-width: 0; } .profile-bio { margin-top: 10px; font-size: 14px; color: var(--fg2); line-height: 1.6; overflow-wrap: anywhere; }
.sub-heading { font-size: 14px; text-transform: uppercase; letter-spacing: .12em; color: var(--mut); margin: 28px 0 10px; font-weight: 700; }
.account-form { display: flex; flex-direction: column; gap: 6px; max-width: 560px; margin: 20px 0; }
.account-form label { color: var(--mut); font-size: 11px; text-transform: uppercase; font-weight: 600; margin-top: 10px; }
.account-form .form-actions { margin-top: 16px; } .account-form .action-btn { margin-top: 0; }
.login-card { max-width: 520px; }

/* botón de acceso */
.auth-top { display: none; }
.connect-wallet.logged { padding: 5px 14px 5px 6px; } .connect-wallet .avatar { width: 24px; height: 24px; font-size: 11px; }
.auth-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
html.is-mobile .auth-top { display: inline-flex; padding: 6px 12px; font-size: 12px; }
html.is-mobile .auth-top.logged { padding: 4px 10px 4px 4px; }
html.is-mobile .auth-name { max-width: 70px; }

/* aviso breve */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); z-index: 400; opacity: 0; pointer-events: none; padding: 11px 18px; border-radius: 12px; font-size: 13px; font-weight: 600;
    background: var(--bg4); border: 1px solid var(--bd2); color: var(--fg); box-shadow: 0 10px 30px rgba(0,0,0,.55); transition: opacity .25s, transform .25s; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.error { border-color: rgba(248,113,113,.5); color: #fca5a5; }
html.is-mobile .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }

html.is-mobile .forum-section .page-h { font-size: 26px; }
html.is-mobile .post-card { padding: 16px; } html.is-mobile .post-card:hover { transform: none; }
html.is-mobile .post-full, html.is-mobile .profile-card { padding: 20px 16px; }
html.is-mobile .profile-card { flex-direction: column; text-align: center; align-items: center; }
html.is-mobile .profile-card .post-meta { justify-content: center; }
html.is-mobile .forum-toolbar { flex-direction: column; align-items: stretch; } html.is-mobile .new-post-btn { width: 100% !important; }
html.is-mobile .modal textarea { font-size: 16px; }

/* =====================================================================
   ROLES: etiqueta con degradado y brillo que respira (igual que los créditos), anillo en la foto y tarjeta con luz superior
   ===================================================================== */
.role-owner         { --rc: #fbbf24; --rc2: #fde68a; --rc-rgb: 251,191,36; }
.role-administrator { --rc: #f87171; --rc2: #fecaca; --rc-rgb: 248,113,113; }
.role-moderator     { --rc: #60a5fa; --rc2: #bfdbfe; --rc-rgb: 96,165,250; }
.role-publisher     { --rc: #4ade80; --rc2: #bbf7d0; --rc-rgb: 74,222,128; }
.role-tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
    background: rgba(var(--rc-rgb), .12); border: 1px solid rgba(var(--rc-rgb), .35); }
.role-tag { background-image: linear-gradient(90deg, var(--fg) 0%, var(--rc2) 45%, var(--rc) 100%); }
.role-tag { color: transparent; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    /* el relleno degradado va en el texto; el fondo translúcido se recrea con el sombreado */
    box-shadow: inset 0 0 0 100px rgba(var(--rc-rgb), .1); animation: roleDim 4s ease-in-out infinite; }
@keyframes roleDim {
    0%, 100% { opacity: 1;   filter: drop-shadow(0 0 8px rgba(var(--rc-rgb), .85)) brightness(1.15); }
    50%      { opacity: .5;  filter: drop-shadow(0 0 1px rgba(var(--rc-rgb), .15)) brightness(.85); }
}
.post-list .post-card:nth-child(2n) .role-tag { animation-delay: -1s; } .post-list .post-card:nth-child(3n) .role-tag { animation-delay: -2s; }

.connect-wallet .role-tag { margin-left: 8px; padding: 1px 8px; font-size: 9.5px; }
html.is-mobile .auth-top .role-tag { display: none; }

/* anillo luminoso alrededor de la foto de quien tiene rol */
.has-role > .avatar, .has-role .post-byline > .avatar { box-shadow: 0 0 0 2px var(--rc), 0 0 18px -2px rgba(var(--rc-rgb), .7); }

/* tarjeta del foro: foto primero, contenido a la derecha */
.post-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: start; position: relative; overflow: hidden; }
.post-card.no-avatar { grid-template-columns: minmax(0, 1fr); }
.post-card > .avatar { width: 52px; height: 52px; font-size: 20px; }
.post-card-body { min-width: 0; }
.post-card.has-role { border-color: rgba(var(--rc-rgb), .3); background: linear-gradient(160deg, rgba(var(--rc-rgb), .09), var(--bg2) 55%); }
.post-card.has-role::before, .post-full.has-role::before, .profile-card.has-role::before { content: ''; position: absolute; left: 10%; right: 10%; top: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--rc-rgb), .9), transparent); opacity: .55; }
.post-card.has-role:hover, .post-card.has-role:focus-visible { border-color: var(--rc); box-shadow: 0 12px 34px -14px rgba(var(--rc-rgb), .6), 0 0 24px -12px rgba(var(--rc-rgb), .5); }
.post-meta .post-author-name { color: var(--fg); font-weight: 600; }

/* publicación abierta: cabecera con la foto grande y debajo el contenido */
.post-full, .profile-card { position: relative; overflow: hidden; }
.post-full.has-role, .profile-card.has-role { border-color: rgba(var(--rc-rgb), .3); background: linear-gradient(160deg, rgba(var(--rc-rgb), .09), var(--bg2) 55%); }
.post-byline { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--bd); }
.post-byline > .avatar { width: 64px; height: 64px; font-size: 26px; }
.post-byline-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.post-byline-info .author .avatar { display: none; }
.post-byline-info .author-link { font-size: 17px; }
.post-content { min-width: 0; }

html.is-mobile .post-card { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
html.is-mobile .post-card.no-avatar { grid-template-columns: minmax(0, 1fr); }
html.is-mobile .post-card > .avatar { width: 44px; height: 44px; font-size: 17px; }
html.is-mobile .post-byline > .avatar { width: 54px; height: 54px; }
@media (prefers-reduced-motion: reduce) { .role-tag { animation: none; } }

/* =====================================================================
   CRÉDITOS v2 — tarjetas con foto, estado de Discord y auspiciadores
   ===================================================================== */
.cr-label { display: flex; align-items: center; gap: 12px; margin: 34px 0 16px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #93c5fd; }
.cr-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(96,165,250,.45), transparent); }
.credits-section .cr-label:first-of-type { margin-top: 8px; }
.cr-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.cr-card { --blue: #60a5fa; position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 22px; padding: 26px;
    border-radius: 20px; color: var(--fg); text-decoration: none; overflow: hidden; -webkit-tap-highlight-color: transparent;
    background: radial-gradient(120% 140% at 0% 0%, rgba(var(--glow2-rgb),.22), transparent 55%), linear-gradient(160deg, var(--bg4), var(--bg3));
    border: 1px solid rgba(96,165,250,.26); box-shadow: inset 0 1px 0 rgba(var(--ov),.05);
    animation: riseIn .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 90ms);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.cr-card.alt { background: radial-gradient(120% 140% at 100% 0%, rgba(147,197,253,.18), transparent 55%), linear-gradient(160deg, var(--bg4), var(--bg3)); }
.cr-card::before { content: ''; position: absolute; left: 12%; right: 12%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(191,219,254,.9), transparent); opacity: .55; }
.cr-card:hover, .cr-card:focus-visible { transform: translateY(-5px); border-color: var(--blue); outline: none; box-shadow: 0 16px 40px -16px rgba(96,165,250,.65), 0 0 30px -12px rgba(147,197,253,.5); }
.cr-card:active { transform: scale(.98); }
.cr-card .credit-link { grid-column: 1 / -1; margin-top: 10px; }

.cr-avatar { position: relative; flex: none; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #1d4ed8, var(--acc2));
    box-shadow: 0 0 0 3px var(--bg3), 0 0 0 5px rgba(96,165,250,.55), 0 10px 30px -8px rgba(96,165,250,.55); }
.cr-avatar.square { border-radius: 24px; background: var(--bg4); }
.cr-avatar img, .cr-avatar .cr-initial { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.cr-initial { display: grid; place-items: center; font-size: 38px; font-weight: 800; color: #fff; }
.cr-avatar img[hidden] { display: none; }
.cr-person.has-photo .cr-initial { display: none; }
.cr-dot { position: absolute; right: 2px; bottom: 2px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: #747f8d; box-shadow: 0 0 0 4px var(--bg3); }
.cr-dot[data-status="online"] { background: #23a55a; box-shadow: 0 0 0 4px var(--bg3), 0 0 12px 2px rgba(35,165,90,.7); }
.cr-dot[data-status="idle"] { background: #f0b232; }
.cr-dot[data-status="dnd"] { background: #f23f43; }
.cr-body { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.cr-body .credit-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-bottom: 2px; }
.cr-chip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: #bfdbfe; background: rgba(96,165,250,.14); border: 1px solid rgba(96,165,250,.35); }
.cr-chip.gold { color: #fde68a; background: linear-gradient(90deg, rgba(251,191,36,.18), rgba(251,191,36,.06)); border-color: rgba(251,191,36,.45); box-shadow: 0 0 14px -4px rgba(251,191,36,.5); }
.cr-status { max-width: 100%; font-size: 13px; color: #9ca3af; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-person[data-status="online"] .cr-status { color: #4ade80; }
.cr-person[data-status="dnd"] .cr-status { color: #f87171; }
.cr-sponsor { border-color: rgba(251,191,36,.28); }
.cr-sponsor:hover, .cr-sponsor:focus-visible { border-color: #fbbf24; box-shadow: 0 16px 40px -16px rgba(251,191,36,.45), 0 0 30px -12px rgba(251,191,36,.35); }
.cr-sponsor .cr-avatar { width: 76px; height: 76px; box-shadow: 0 0 0 3px var(--bg3), 0 0 0 5px rgba(251,191,36,.5), 0 10px 28px -8px rgba(251,191,36,.35); }
.cr-sponsor .cr-initial { font-size: 30px; }

html.is-mobile .cr-people { grid-template-columns: 1fr; gap: 14px; }
html.is-mobile .cr-card { padding: 20px; gap: 6px 16px; }
html.is-mobile .cr-card:hover { transform: none; }
html.is-mobile .cr-avatar { width: 76px; height: 76px; }
html.is-mobile .cr-sponsor .cr-avatar { width: 64px; height: 64px; }
@media (prefers-reduced-motion: reduce) { .cr-card, .cr-card .credit-name { animation: none; transition: none; } }

/* =====================================================================
   CRÉDITOS v3 — equipo en vertical con foto, aro animado e insignias
   ===================================================================== */
.cr-team { grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 16px; }
.cr-person { --ac: #60a5fa; grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 14px; padding: 30px 22px 22px; cursor: default;
    background: radial-gradient(90% 70% at 50% 0%, color-mix(in srgb, var(--ac) 24%, transparent), transparent 70%), linear-gradient(160deg, var(--bg4), var(--bg3));
    border-color: color-mix(in srgb, var(--ac) 34%, transparent); }
a.cr-person { cursor: pointer; }
.cr-person:hover, .cr-person:focus-visible { border-color: var(--ac); box-shadow: 0 18px 44px -18px color-mix(in srgb, var(--ac) 80%, transparent), 0 0 34px -14px var(--ac); }
.cr-person::before { background: linear-gradient(90deg, transparent, var(--ac), transparent); }
/* destello que cruza la tarjeta al pasar el cursor */
.cr-person::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-18deg); pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(var(--ov),.09), transparent); transition: left .8s cubic-bezier(.2,.8,.2,1); }
.cr-person:hover::after { left: 130%; }

.cr-person .cr-avatar { width: 104px; height: 104px; background: none; box-shadow: 0 14px 34px -12px color-mix(in srgb, var(--ac) 70%, transparent); animation: crFloat 6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.3s); }
/* aro de degradado que gira lentamente */
.cr-person .cr-avatar::before { content: ''; position: absolute; inset: -5px; border-radius: 50%; z-index: 0;
    background: conic-gradient(from 0deg, var(--ac), #fff 18%, var(--ac) 38%, transparent 55%, var(--ac) 75%, #fff 92%, var(--ac)); animation: crSpin 7s linear infinite; }
.cr-person .cr-avatar::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; background: var(--bg3); z-index: 1; }
.cr-person .cr-avatar img { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--bg4); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.cr-person:hover .cr-avatar img { transform: scale(1.07); }
@keyframes crSpin { to { transform: rotate(360deg); } }
@keyframes crFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.cr-person .cr-body { align-items: center; gap: 10px; }
.cr-person .credit-name { background: linear-gradient(90deg, var(--fg) 0%, color-mix(in srgb, var(--ac) 55%, var(--fg)) 50%, var(--ac) 100%); background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: creditDim 4s ease-in-out infinite, crShift 6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1s); }
@keyframes crShift { 0%, 100% { background-position: 0% 0; } 50% { background-position: 100% 0; } }
.cr-person .cr-chip { color: color-mix(in srgb, var(--ac) 40%, var(--fg)); background: color-mix(in srgb, var(--ac) 16%, transparent); border-color: color-mix(in srgb, var(--ac) 45%, transparent); }
.cr-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.cr-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; color: var(--fg2);
    background: rgba(var(--ov),.05); border: 1px solid rgba(var(--ov),.1); animation: crPop .5s cubic-bezier(.2,1.4,.4,1) both; animation-delay: calc(var(--i, 0) * 90ms + 450ms); transition: border-color .25s, background .25s, transform .25s; }
.cr-badge:nth-child(2) { animation-delay: calc(var(--i, 0) * 90ms + 580ms); }
.cr-badge b { font-size: 12px; font-weight: 400; }
.cr-person:hover .cr-badge { border-color: color-mix(in srgb, var(--ac) 55%, transparent); background: color-mix(in srgb, var(--ac) 12%, transparent); }
.cr-badge:hover { transform: translateY(-2px) scale(1.05); }
@keyframes crPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
.cr-person .credit-link { grid-column: auto; margin-top: 2px; justify-content: center; }
/* sponsors: respiración suave del brillo dorado */
.cr-sponsor .cr-avatar { animation: crGlow 4.5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.1s); }
@keyframes crGlow { 0%, 100% { box-shadow: 0 0 0 3px var(--bg3), 0 0 0 5px rgba(251,191,36,.5), 0 10px 28px -8px rgba(251,191,36,.3); }
                    50%      { box-shadow: 0 0 0 3px var(--bg3), 0 0 0 5px rgba(251,191,36,.9), 0 10px 34px -4px rgba(251,191,36,.6); } }
html.is-mobile .cr-team { grid-template-columns: 1fr 1fr; gap: 12px; }
html.is-mobile .cr-person { padding: 22px 12px 16px; gap: 10px; }
html.is-mobile .cr-person .cr-avatar { width: 84px; height: 84px; }
html.is-mobile .cr-person .credit-name { font-size: 22px; }
@media (prefers-reduced-motion: reduce) { .cr-person .cr-avatar, .cr-person .cr-avatar::before, .cr-person .credit-name, .cr-badge, .cr-sponsor .cr-avatar { animation: none !important; } .cr-person::after { display: none; } }

/* =====================================================================
   CHAT GLOBAL
   ===================================================================== */
.chat-section .page-h { font-size: 32px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.05em; }
.chat-box { display: flex; flex-direction: column; border: 1px solid var(--bd); border-radius: 20px; overflow: hidden; background: linear-gradient(180deg, var(--bg2), var(--bg3)); box-shadow: 0 20px 50px -30px rgba(var(--acc-rgb),.5); max-width: 860px; }
.chat-head { display: flex; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--bg4); background: rgba(var(--acc-rgb),.06); }
.chat-live { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #86efac; }
.chat-live i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 10px #22c55e; animation: chatPulse 2s ease-in-out infinite; }
@keyframes chatPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.7); } }
.chat-list { display: flex; flex-direction: column; gap: 10px; height: min(56vh, 520px); min-height: 280px; overflow-y: auto; padding: 18px; scroll-behavior: smooth; overscroll-behavior: contain; }
.chat-list::-webkit-scrollbar { width: 8px; } .chat-list::-webkit-scrollbar-thumb { background: var(--bd2); border-radius: 8px; }
.chat-empty { margin: auto; color: var(--mut2); font-size: 14px; }
.chat-msg { display: flex; align-items: flex-start; gap: 10px; }
.chat-msg .avatar { width: 38px; height: 38px; font-size: 15px; }
.chat-guest-av { background: hsl(var(--h, 260) 45% 28%); color: hsl(var(--h, 260) 90% 85%); }
.chat-bubble { min-width: 0; max-width: min(100%, 640px); padding: 8px 14px 10px; border-radius: 4px 16px 16px 16px; background: var(--bg4); border: 1px solid var(--bd2); }
.chat-msg.has-role .chat-bubble { border-color: color-mix(in srgb, var(--rc) 45%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--rc) 11%, var(--bg4)), var(--bg4) 70%); }
.chat-msg.has-role .avatar { box-shadow: 0 0 0 2px var(--bg3), 0 0 0 4px color-mix(in srgb, var(--rc) 70%, transparent); }
.chat-msg.mine .chat-bubble { border-color: rgba(var(--acc-rgb),.5); }
.chat-msg.fresh { animation: chatIn .35s cubic-bezier(.2,.8,.2,1) both; }
@keyframes chatIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.chat-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 2px; }
.chat-nick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--fg); }
.chat-nick a { color: inherit; text-decoration: none; } .chat-nick a:hover { text-decoration: underline; }
.chat-nick.guest { color: var(--fg2); } .chat-nick em { font-style: normal; font-weight: 600; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--mut2); padding: 1px 7px; border: 1px solid var(--bd2); border-radius: 999px; }
.chat-meta time { font-size: 11px; color: var(--mut2); }
.chat-text { font-size: 14.5px; line-height: 1.45; color: var(--fg2); white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.chat-form { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 12px; border-top: 1px solid var(--bg4); background: var(--bg3); }
.chat-nickrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chat-nickrow input { flex: 0 1 220px; }
.chat-form input, .chat-form textarea { background: var(--bg); border: 1px solid var(--bd); color: var(--fg); padding: 11px 14px; border-radius: 12px; outline: none; font: inherit; font-size: 14px; transition: border-color .2s, box-shadow .2s; }
.chat-form input:focus, .chat-form textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(var(--acc-rgb),.18); }
.chat-row { display: flex; gap: 10px; align-items: flex-end; }
.chat-row textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; line-height: 1.4; }
.chat-send { padding: 11px 20px; flex: none; } .chat-send:disabled { opacity: .5; cursor: not-allowed; }
.chat-as { font-size: 13px; color: var(--mut); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .chat-as strong { color: var(--fg); }
.chat-login { font-size: 12.5px; font-weight: 600; color: var(--acc-soft); text-decoration: none; } .chat-login:hover { text-decoration: underline; }
.chat-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 11.5px; color: var(--mut2); }
.chat-count.over { color: #f87171; font-weight: 700; }
.chat-err { font-size: 13px; color: #fca5a5; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); border-radius: 10px; padding: 8px 12px; }
html.is-mobile .chat-section .page-h { font-size: 26px; }
html.is-mobile .chat-list { height: calc(100dvh - 400px); min-height: 240px; padding: 12px; }
html.is-mobile .chat-form input, html.is-mobile .chat-form textarea { font-size: 16px; }
html.is-mobile .chat-bubble { max-width: calc(100vw - 100px); }
@media (prefers-reduced-motion: reduce) { .chat-live i, .chat-msg.fresh { animation: none; } .chat-list { scroll-behavior: auto; } }

.chat-send.action-btn { width: auto; margin-top: 0; flex: 0 0 auto; }
.chat-row textarea { min-width: 0; width: 100%; }
html.is-mobile .chat-section { padding-bottom: 96px; }

/* =====================================================================
   INSIGNIAS — medallas por rareza (común / rara / épica / legendaria)
   ===================================================================== */
.bd { --c: #94a3b8; --c2: #cbd5e1; --g: 148,163,184; position: relative; display: inline-grid; place-items: center; flex: none; vertical-align: middle; }
.bd.tier-rare { --c: #38bdf8; --c2: #bae6fd; --g: 56,189,248; }
.bd.tier-epic { --c: #c084fc; --c2: var(--acc-soft2); --g: 192,132,252; }
.bd.tier-legendary { --c: #fbbf24; --c2: #fde68a; --g: 251,191,36; }
.bd-ring { position: absolute; inset: 0; border-radius: 32%; background: conic-gradient(from var(--ang, 0deg), var(--c), var(--c2) 20%, var(--c) 40%, rgba(var(--g), .25) 60%, var(--c) 80%, var(--c2)); }
.bd-face { position: absolute; inset: 7%; border-radius: 28%; display: grid; place-items: center; background: radial-gradient(120% 120% at 30% 20%, rgba(var(--g), .28), var(--bg3) 70%); box-shadow: inset 0 0 12px rgba(var(--g), .25); }
.bd-glyph { width: 56%; height: 56%; fill: rgba(var(--g), .18); stroke: var(--c2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(var(--g), .8)); }
.bd-xs { width: 20px; height: 20px; } .bd-xs .bd-face { inset: 9%; } .bd-xs .bd-glyph { stroke-width: 2.1; filter: none; }
.bd-sm { width: 30px; height: 30px; } .bd-md { width: 56px; height: 56px; } .bd-xl { width: 150px; height: 150px; }
.bd-md, .bd-xl { box-shadow: 0 8px 26px -10px rgba(var(--g), .7); border-radius: 32%; }
.bd.is-dim { opacity: .4; filter: grayscale(.8); }
.bd-strip { display: inline-flex; align-items: center; gap: 4px; margin-left: 2px; }
/* brillo que recorre la medalla (rara en adelante) */
.bd-md::after, .bd-xl::after, .bd-xs.tier-epic::after, .bd-xs.tier-legendary::after { content: ''; position: absolute; inset: 0; border-radius: 32%; pointer-events: none;
    background: linear-gradient(115deg, transparent 35%, rgba(var(--ov),.55) 50%, transparent 65%); background-size: 250% 100%; background-position: 160% 0; mix-blend-mode: overlay; animation: bdShine 4.5s ease-in-out infinite; }
.bd.tier-common::after { animation-duration: 7s; opacity: .6; }
.bd.tier-legendary .bd-ring { animation: bdRing 6s linear infinite; }
.bd.tier-epic .bd-ring { animation: bdRing 12s linear infinite; }
@keyframes bdShine { 0%, 55% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes bdRing { to { --ang: 360deg; } }
.bd.tier-legendary.bd-md, .bd.tier-legendary.bd-xl { animation: bdPulse 3.2s ease-in-out infinite; }
@keyframes bdPulse { 0%, 100% { box-shadow: 0 8px 26px -10px rgba(var(--g), .6); } 50% { box-shadow: 0 8px 40px -4px rgba(var(--g), .95); } }
.bd-spark { position: absolute; right: -4%; top: -4%; width: 22%; height: 22%; background: radial-gradient(circle, #fff 0 18%, rgba(var(--ov),0) 60%); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: bdTwinkle 2.4s ease-in-out infinite; }
@keyframes bdTwinkle { 0%, 100% { transform: scale(.4) rotate(0); opacity: .3; } 50% { transform: scale(1.1) rotate(45deg); opacity: 1; } }

/* estantería */
.bd-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 8px; }
.bd-none { color: var(--mut2); font-size: 14px; }
.bd-hint { color: #8b8b95; font-size: 13px; margin: -6px 0 12px; }
.bd-item { --c: #94a3b8; position: relative; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; border: 1px solid var(--bd2); background: linear-gradient(160deg, var(--bg4), var(--bg3));
    transition: transform .25s ease, border-color .25s ease; animation: riseIn .5s cubic-bezier(.2,.8,.2,1) both; }
.bd-item.tier-rare { --c: #38bdf8; } .bd-item.tier-epic { --c: #c084fc; } .bd-item.tier-legendary { --c: #fbbf24; }
.bd-item:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.bd-item.tier-legendary { background: radial-gradient(90% 120% at 0% 0%, rgba(251,191,36,.12), transparent 60%), linear-gradient(160deg, var(--bg4), var(--bg3)); border-color: rgba(251,191,36,.3); }
.bd-item.is-hidden { opacity: .75; }
.bd-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bd-info strong { font-size: 15px; color: var(--fg); }
.bd-info em { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--c); }
.bd-info span { font-size: 12.5px; color: var(--mut); line-height: 1.35; }
.bd-info small { font-size: 11px; color: var(--mut2); margin-top: 2px; }
.bd-eye { grid-column: 1 / -1; justify-self: end; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--bd2); background: transparent; color: var(--fg2); font-size: 12px; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s; }
.bd-eye:hover { background: rgba(var(--acc-rgb),.12); border-color: var(--acc); } .bd-eye:disabled { opacity: .5; cursor: wait; }

/* animación de insignia conseguida */
.bd-unlock { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; background: rgba(5,5,8,.82); backdrop-filter: blur(6px); animation: bdFade .3s ease both; }
.bd-unlock.out { animation: bdFadeOut .28s ease both; }
@keyframes bdFade { from { opacity: 0; } } @keyframes bdFadeOut { to { opacity: 0; } }
.bd-unlock-box { --c: #94a3b8; --g: 148,163,184; position: relative; width: min(420px, 100%); padding: 26px 24px 24px; text-align: center; border-radius: 26px; overflow: hidden;
    background: radial-gradient(90% 60% at 50% 0%, rgba(var(--g), .22), transparent 70%), linear-gradient(170deg, var(--bg4), var(--bg3)); border: 1px solid rgba(var(--g), .45);
    box-shadow: 0 30px 90px -20px rgba(var(--g), .55); animation: bdBox .55s cubic-bezier(.2,1.2,.3,1) both; }
.bd-unlock-box.tier-rare { --c: #38bdf8; --g: 56,189,248; } .bd-unlock-box.tier-epic { --c: #c084fc; --g: 192,132,252; } .bd-unlock-box.tier-legendary { --c: #fbbf24; --g: 251,191,36; }
@keyframes bdBox { from { opacity: 0; transform: translateY(24px) scale(.88); } }
.bd-kicker { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--c); animation: bdUp .5s .15s ease both; }
.bd-stage { position: relative; display: grid; place-items: center; height: 220px; }
.bd-stage .bd { z-index: 2; animation: bdPop .9s .1s cubic-bezier(.2,1.5,.3,1) both; }
@keyframes bdPop { 0% { opacity: 0; transform: scale(.1) rotate(-200deg); } 60% { opacity: 1; transform: scale(1.18) rotate(8deg); } 100% { transform: scale(1) rotate(0); } }
.bd-rays { position: absolute; width: 360px; height: 360px; border-radius: 50%; z-index: 1; opacity: .75;
    background: repeating-conic-gradient(from 0deg, rgba(var(--g), .28) 0 6deg, transparent 6deg 18deg); -webkit-mask: radial-gradient(circle, #000 12%, transparent 62%); mask: radial-gradient(circle, #000 12%, transparent 62%); animation: bdSpin 14s linear infinite, bdFade .8s both; }
@keyframes bdSpin { to { transform: rotate(360deg); } }
.bd-burst { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.bd-burst i { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c);
    transform: rotate(calc(var(--a) * 1deg)) translateY(0); opacity: 0; animation: bdShoot 1.1s calc(.35s + var(--d) * .08s) ease-out both; }
@keyframes bdShoot { 0% { opacity: 1; transform: rotate(calc(var(--a) * 1deg)) translateY(0) scale(1); } 100% { opacity: 0; transform: rotate(calc(var(--a) * 1deg)) translateY(-130px) scale(.2); } }
.bd-unlock-box h2 { margin: 4px 0 4px; font-size: 30px; font-weight: 800; letter-spacing: -.03em; background: linear-gradient(90deg, var(--fg), var(--c)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: bdUp .5s .45s ease both; }
.bd-tier { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--c); border: 1px solid rgba(var(--g), .5); background: rgba(var(--g), .12); animation: bdUp .5s .55s ease both; }
.bd-desc { margin: 12px 0 4px; font-size: 14.5px; color: var(--fg2); line-height: 1.45; animation: bdUp .5s .65s ease both; }
.bd-tip { margin: 0 0 4px; font-size: 12px; color: var(--mut2); animation: bdUp .5s .75s ease both; }
.bd-ok { width: 100%; margin-top: 16px; animation: bdUp .5s .85s ease both; }
@keyframes bdUp { from { opacity: 0; transform: translateY(10px); } }
.bd-unlock-box.tier-legendary .bd-stage .bd-xl { animation: bdPop .9s .1s cubic-bezier(.2,1.5,.3,1) both, bdPulse 3s 1s ease-in-out infinite; }

/* moderación rápida en el chat */
.chat-msg { position: relative; }
.chat-mod { display: none; position: absolute; right: 8px; top: -10px; gap: 6px; z-index: 2; }
.chat-msg:hover .chat-mod, .chat-msg:focus-within .chat-mod { display: flex; }
.chat-mod-btn { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--bd2); background: var(--bg4); color: var(--fg2); font-size: 11.5px; font-weight: 600; cursor: pointer; }
.chat-mod-btn:hover { border-color: var(--acc); } .chat-mod-btn.danger:hover { border-color: #ef4444; color: #fca5a5; }
html.is-mobile .chat-mod { display: flex; position: static; margin-top: 4px; } html.is-mobile .chat-msg { flex-wrap: wrap; }
html.is-mobile .bd-shelf { grid-template-columns: 1fr; } html.is-mobile .bd-xl { width: 128px; height: 128px; } html.is-mobile .bd-stage { height: 190px; } html.is-mobile .bd-rays { width: 300px; height: 300px; }
@media (prefers-reduced-motion: reduce) { .bd-ring, .bd::after, .bd-spark, .bd-rays, .bd-burst i, .bd-item, .bd-unlock-box, .bd-unlock-box * , .bd.tier-legendary { animation: none !important; } .bd-burst { display: none; } }

/* =====================================================================
   PORTADA, PODIO Y ESQUELETOS
   ===================================================================== */
.hero { position: relative; overflow: hidden; margin-bottom: 28px; padding: clamp(26px, 5vw, 48px); border-radius: 24px; border: 1px solid rgba(var(--acc-rgb),.28);
    background: radial-gradient(80% 120% at 0% 0%, rgba(var(--acc-rgb),.2), transparent 60%), radial-gradient(70% 100% at 100% 100%, rgba(var(--glow2-rgb),.14), transparent 60%), linear-gradient(160deg, var(--bg2), var(--bg3));
    animation: riseIn .6s cubic-bezier(.2,.8,.2,1) both; }
.hero::before { content: ''; position: absolute; left: 8%; right: 8%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--acc-rgb),.9), transparent); }
.hero-orbs i { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .5; pointer-events: none; animation: orbFloat 12s ease-in-out infinite; }
.hero-orbs i:nth-child(1) { width: 220px; height: 220px; right: -40px; top: -60px; background: var(--acc); }
.hero-orbs i:nth-child(2) { width: 160px; height: 160px; right: 22%; bottom: -70px; background: #3b82f6; animation-delay: -4s; }
.hero-orbs i:nth-child(3) { width: 120px; height: 120px; left: 38%; top: -50px; background: #ec4899; opacity: .3; animation-delay: -8s; }
@keyframes orbFloat { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-24px, 18px) scale(1.15); } }
.hero > *:not(.hero-orbs) { position: relative; z-index: 1; }
.hero-live { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--acc-soft); background: rgba(var(--acc-rgb),.12); border: 1px solid rgba(var(--acc-rgb),.35); }
.hero-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc); animation: chatPulse 2s ease-in-out infinite; }
.hero-title { margin: 18px 0 12px; max-width: 14ch; font-size: clamp(36px, 7vw, 68px); font-weight: 800; line-height: .98; letter-spacing: -0.06em;
    background: linear-gradient(90deg, var(--fg) 0%, var(--acc-soft2) 40%, var(--acc) 75%, var(--fg) 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: crShift 7s ease-in-out infinite; }
.hero-sub { max-width: 52ch; font-size: clamp(14px, 1.6vw, 16px); line-height: 1.6; color: var(--fg2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-btn { padding: 12px 22px; border-radius: 999px; border: 1px solid var(--bd2); background: rgba(var(--ov),.04); color: var(--fg); font-weight: 600; font-size: 14px; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s, background .2s; }
.hero-btn:hover { transform: translateY(-2px); border-color: var(--acc); background: rgba(var(--acc-rgb),.1); }
.hero-btn.primary { color: var(--on-acc); background: linear-gradient(135deg, var(--acc), var(--acc2)); border-color: transparent; box-shadow: 0 10px 30px -10px rgba(var(--acc-rgb),.8); }
.hero-btn.primary:hover { box-shadow: 0 14px 36px -8px rgba(var(--acc-rgb),.95); background: linear-gradient(135deg, var(--acc), var(--acc2)); filter: brightness(1.06); }

.explore-label { margin: 8px 0 14px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--mut); }
.explore { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 32px; }
.explore-card { --ac: var(--acc); position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px; text-align: left; color: var(--fg); cursor: pointer; border-radius: 16px; border: 1px solid var(--bd); overflow: hidden;
    background: radial-gradient(90% 90% at 0% 0%, color-mix(in srgb, var(--ac) 16%, transparent), transparent 65%), var(--bg2); animation: riseIn .55s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 80ms + 250ms);
    transition: transform .25s, border-color .25s, box-shadow .25s; }
.explore-card:hover { transform: translateY(-4px); border-color: var(--ac); box-shadow: 0 14px 34px -16px var(--ac); }
.explore-card strong { font-size: 16px; } .explore-card > span:last-child { font-size: 12.5px; color: var(--mut); line-height: 1.4; }
.ex-ic { font-size: 24px; transition: transform .3s; } .explore-card:hover .ex-ic { transform: scale(1.2) rotate(-6deg); }

/* ---- podio ---- */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 14px; margin: 8px 0 26px; }
.podium.n1 { grid-template-columns: minmax(0, 320px); justify-content: center; } .podium.n2 { grid-template-columns: repeat(2, 1fr); }
.pod { --pc: #cbd5e1; --pg: 203,213,225; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 22px 12px 0; border-radius: 20px 20px 0 0; overflow: hidden;
    background: linear-gradient(180deg, rgba(var(--pg), .13), rgba(var(--pg), .02)); border: 1px solid rgba(var(--pg), .3); border-bottom: 0; animation: riseIn .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 120ms); }
.pod.p1 { --pc: #facc15; --pg: 250,204,21; order: 2; padding-top: 30px; box-shadow: 0 -14px 50px -18px rgba(250,204,21,.55); }
.pod.p2 { order: 1; } .pod.p3 { --pc: #d97706; --pg: 217,119,6; order: 3; }
.pod-crown { width: 34px; height: 34px; fill: rgba(250,204,21,.2); stroke: #facc15; stroke-width: 1.6; stroke-linejoin: round; filter: drop-shadow(0 0 8px rgba(250,204,21,.8)); animation: crFloat 3.5s ease-in-out infinite; }
.pod-av { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font-size: 30px; background: var(--bg4); box-shadow: 0 0 0 3px var(--bg3), 0 0 0 5px var(--pc), 0 10px 28px -8px rgba(var(--pg), .7); }
.pod.p1 .pod-av { width: 82px; height: 82px; font-size: 38px; animation: bdPulse 3.2s ease-in-out infinite; --g: 250,191,36; }
.pod-name { margin-top: 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 800; letter-spacing: -.02em; color: var(--fg); }
.pod-com { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--mut); }
.pod-amt { margin-top: 4px; font-size: 18px; font-weight: 800; color: var(--pc); text-shadow: 0 0 14px rgba(var(--pg), .5); }
.pod-step { align-self: stretch; margin-top: 12px; display: grid; place-items: center; height: 54px; background: linear-gradient(180deg, rgba(var(--pg), .35), rgba(var(--pg), .08)); border-top: 1px solid rgba(var(--pg), .5); }
.pod.p1 .pod-step { height: 84px; } .pod.p2 .pod-step { height: 66px; } .pod.p3 .pod-step { height: 48px; }
.pod-step span { font-size: 30px; font-weight: 800; color: var(--pc); text-shadow: 0 0 12px rgba(var(--pg), .6); }
.pod::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(var(--ov),.1) 50%, transparent 62%); background-size: 260% 100%; background-position: 160% 0; animation: bdShine 6s ease-in-out infinite; }
.pod.p1::after { animation-duration: 4.5s; }
.ranking-table > .rank-row:first-of-type { margin-top: 0; }

/* ---- esqueletos de carga ---- */
.sk-row, .sk-card { position: relative; overflow: hidden; border-radius: 12px; background: var(--bg2); border: 1px solid var(--bg4); }
.sk-row { height: 68px; } .sk-card { height: 150px; border-radius: 16px; }
.sk-row::after, .sk-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(var(--acc-rgb),.09) 50%, transparent 70%); transform: translateX(-100%); animation: skMove 1.4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 120ms); }
@keyframes skMove { to { transform: translateX(100%); } }

html.is-mobile .hero { padding: 24px 20px; border-radius: 20px; }
html.is-mobile .hero-title { max-width: none; }
html.is-mobile .hero-btn { flex: 1 1 100%; text-align: center; }
html.is-mobile .explore { grid-template-columns: 1fr 1fr; gap: 10px; } html.is-mobile .explore-card { padding: 14px; }
html.is-mobile .podium { gap: 8px; } html.is-mobile .pod { padding: 16px 6px 0; border-radius: 16px 16px 0 0; }
html.is-mobile .pod-av { width: 48px; height: 48px; font-size: 22px; } html.is-mobile .pod.p1 .pod-av { width: 60px; height: 60px; font-size: 28px; }
html.is-mobile .pod-name { font-size: 13px; } html.is-mobile .pod-amt { font-size: 14px; } html.is-mobile .pod-crown { width: 26px; height: 26px; }
@media (prefers-reduced-motion: reduce) { .hero, .hero-orbs i, .hero-title, .hero-dot, .explore-card, .pod, .pod::after, .pod-crown, .pod-av, .sk-row::after, .sk-card::after { animation: none !important; } }
.pod { padding-left: 0; padding-right: 0; }
.pod > :not(.pod-step) { max-width: calc(100% - 20px); }
html.is-mobile .pod { padding-left: 0; padding-right: 0; } html.is-mobile .pod > :not(.pod-step) { max-width: calc(100% - 10px); }

/* ---- Tarjeta + términos ---- */
.card-help{margin:0 0 12px;padding:10px 12px;border:1px solid rgba(var(--ov),.12);border-radius:10px;background:rgba(var(--ov),.04);font-size:.85rem}
.card-help summary{cursor:pointer;font-weight:600}
.card-help ol{margin:8px 0 6px 18px;padding:0;line-height:1.5}
.card-help .card-note{opacity:.7;font-size:.78rem;margin:4px 0 0}
.terms-check{display:flex;gap:8px;align-items:flex-start;margin:12px 0;font-size:.85rem;line-height:1.4;cursor:pointer}
.terms-check input{margin-top:3px;flex:none}
.terms-check a{color:inherit;text-decoration:underline}
.side-terms{display:block;margin-top:10px;font-size:.78rem;color:var(--mut);opacity:.85;text-align:center;text-decoration:underline}
.side-terms:hover{color:var(--fg)}
.side-ads{margin-top:12px;font-size:.82rem;color:var(--acc-soft)}
.terms-section{max-width:760px;margin:0 auto;padding:20px}
.terms-sec{margin:18px 0}
.terms-sec h3{margin:0 0 6px}
.terms-sec p{margin:0;line-height:1.6;opacity:.9}
.terms-sec.key{border-left:3px solid #ff5c5c;padding-left:12px}

/* ---- Publicidad ---- */
.ads-strip{margin:4px 0 22px}
.ads-head{display:flex;justify-content:space-between;align-items:center;margin:0 2px 8px;font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;opacity:.75}
.ads-head a{text-transform:none;letter-spacing:0;color:inherit;text-decoration:underline;font-size:.8rem}
.ads-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px}
.ad-wrap{display:flex;flex-direction:column;gap:4px;min-width:0}
.ad-card{position:relative;display:flex;gap:12px;align-items:center;padding:14px 16px;border-radius:16px;text-decoration:none;color:inherit;background:linear-gradient(135deg,rgba(var(--acc-rgb),.16),rgba(96,165,250,.10));border:1px solid rgba(var(--ov),.12);transition:transform .2s,border-color .2s,box-shadow .2s;min-width:0}
a.ad-card:hover{transform:translateY(-2px);border-color:rgba(var(--acc-rgb),.6);box-shadow:0 10px 30px -12px rgba(var(--acc-rgb),.6)}
.ad-ic{flex:none;width:46px;height:46px;border-radius:13px;display:grid;place-items:center;font-size:1.5rem;background:rgba(var(--ov),.08)}
.ad-tx{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.ad-tx strong{font-size:.95rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ad-bd{font-size:.8rem;opacity:.8;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ad-dom{font-size:.72rem;opacity:.55;font-style:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ad-tag{position:absolute;top:8px;right:10px;font-size:.6rem;letter-spacing:.1em;text-transform:uppercase;opacity:.5}
.ad-empty{border-style:dashed}
.ad-report{align-self:flex-end;background:none;border:0;color:inherit;opacity:.45;font-size:.7rem;cursor:pointer;padding:2px 6px}
.ad-report:hover{opacity:.9}
.ad-report-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:.72rem;opacity:.9}
.ad-rbtn{border:1px solid rgba(var(--ov),.2);background:rgba(var(--ov),.06);color:inherit;border-radius:999px;padding:3px 10px;font-size:.72rem;cursor:pointer}
.ad-rbtn.ghost{opacity:.6}
.ads-section{max-width:820px;margin:0 auto;padding:20px}
.ads-plans{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin:18px 0 6px}
.ads-plan{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:18px 12px;border-radius:16px;border:1px solid rgba(var(--ov),.14);background:rgba(var(--ov),.04);color:inherit;font:inherit}
.ads-plan strong{font-size:1rem}.ads-plan span{font-size:1.6rem;font-weight:800}
.ads-plan.best{border-color:rgba(var(--acc-rgb),.7);background:linear-gradient(135deg,rgba(var(--acc-rgb),.2),rgba(96,165,250,.1))}
.ads-plan em{position:absolute;top:-9px;font-style:normal;font-size:.65rem;background:var(--acc);color:var(--on-acc);border-radius:999px;padding:2px 10px}
.ads-plans.sel .ads-plan{cursor:pointer}.ads-plans.sel .ads-plan.on{border-color:var(--acc);box-shadow:0 0 0 2px rgba(var(--acc-rgb),.35)}
.ads-plans.sel .ads-plan span{font-size:1.2rem}
.ads-slots{text-align:center;opacity:.7;font-size:.85rem;margin:6px 0 18px}
.ads-h{margin:18px 0 8px}
.ads-steps{margin:0 0 18px 20px;padding:0;line-height:1.7}
.ads-rules{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-bottom:18px}
.ads-card{padding:16px 18px;border-radius:16px;border:1px solid rgba(var(--ov),.12);background:rgba(var(--ov),.04);margin-bottom:14px}
.ads-card h3{margin:0 0 8px}.ads-card ul{margin:0;padding-left:18px;line-height:1.55;font-size:.88rem}
.ads-card.ok{border-color:rgba(52,211,153,.4)}.ads-card.no{border-color:rgba(248,113,113,.4)}
.ads-field{display:flex;flex-direction:column;gap:6px;margin:12px 0;font-size:.85rem}
.ads-field input[type=text],.ads-field input[type=url],.ads-field textarea{width:100%;box-sizing:border-box;padding:10px 12px;border-radius:10px;border:1px solid rgba(var(--ov),.15);background:rgba(var(--shadow-rgb),.18);color:inherit;font:inherit}
.ads-count{align-self:flex-end;opacity:.55}
.ads-icons{display:flex;flex-wrap:wrap;gap:6px}
.ads-ic{width:40px;height:40px;border-radius:10px;border:1px solid rgba(var(--ov),.15);background:rgba(var(--ov),.05);font-size:1.2rem;cursor:pointer}
.ads-ic.on{border-color:var(--acc);box-shadow:0 0 0 2px rgba(var(--acc-rgb),.35)}
.ads-mine{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:10px 14px;align-items:center;padding:12px 0;border-top:1px solid rgba(var(--ov),.08)}
.ads-mine-info{display:flex;flex-direction:column;gap:4px;font-size:.8rem}
.ads-acts{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.ads-acts select{padding:9px 10px;border-radius:10px;border:1px solid rgba(var(--ov),.15);background:rgba(var(--shadow-rgb),.2);color:inherit}
.ads-acts .action-btn{width:auto;margin:0;padding:10px 18px}
.ads-link{background:none;border:0;color:inherit;opacity:.6;text-decoration:underline;cursor:pointer;font-size:.8rem}
.ads-chip{align-self:flex-start;padding:3px 10px;border-radius:999px;font-size:.72rem;background:rgba(var(--ov),.1)}
.ads-chip.approved{background:rgba(251,191,36,.25)}.ads-chip.active,.ads-chip.paid{background:rgba(52,211,153,.25)}
.ads-chip.rejected,.ads-chip.removed{background:rgba(248,113,113,.25)}
.ads-why{opacity:.75}
@media (max-width:560px){.ads-mine{grid-template-columns:1fr}.ads-plan span{font-size:1.3rem}}

/* ---- Cartel de mantenimiento ---- */
#maint-banner{position:fixed;top:0;left:0;right:0;z-index:9999;box-sizing:border-box;display:flex;gap:10px;justify-content:center;align-items:center;padding:10px 16px;background:linear-gradient(90deg,#92400e,#b45309);color:#fff;font-size:.88rem;font-weight:600;text-align:center;line-height:1.35;box-shadow:0 4px 18px rgba(0,0,0,.4)}

/* =====================================================================
   CAPA DE RENDIMIENTO (v1)
   Regla: las animaciones infinitas solo mueven `transform` u `opacity` (se componen en la GPU sin repintar).
   Los brillos pasan a ser estáticos; los destellos usan opacity; los glows desenfocados son degradados radiales.
   ===================================================================== */
/* glows de fondo: degradado radial en vez de filter:blur (misma imagen, sin coste de desenfoque) */
.ambient span { filter: none !important; opacity: 1; }
.ambient span:nth-child(1) { background: radial-gradient(circle, rgba(var(--acc2-rgb),.34) 0%, rgba(var(--acc2-rgb),0) 68%); }
.ambient span:nth-child(2) { background: radial-gradient(circle, rgba(var(--glow2-rgb),.26) 0%, rgba(var(--glow2-rgb),0) 68%); opacity: 1; }
.ambient span:nth-child(3) { background: radial-gradient(circle, rgba(var(--glow3-rgb),.16) 0%, rgba(var(--glow3-rgb),0) 68%); opacity: 1; }
.hero-orbs i { filter: none !important; will-change: transform; }
.hero-orbs i:nth-child(1) { background: radial-gradient(circle, rgba(var(--acc-rgb),.55), rgba(var(--acc-rgb),0) 70%); opacity: 1; }
.hero-orbs i:nth-child(2) { background: radial-gradient(circle, rgba(var(--glow2-rgb),.5), rgba(var(--glow2-rgb),0) 70%); opacity: 1; }
.hero-orbs i:nth-child(3) { background: radial-gradient(circle, rgba(var(--glow3-rgb),.32), rgba(var(--glow3-rgb),0) 70%); opacity: 1; }
.splash-glow { filter: none !important; }

/* logo: flota (transform) con brillo estático */
.logo-icon { animation: logoFloat 4s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(var(--acc-rgb),.6)); }
@keyframes logoFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }

/* textos con degradado: estáticos (antes animaban background-position) */
.section-top h2, .splash-title, .hero-title, .cr-person .credit-name { animation: none !important; background-size: 100% 100% !important; }
.cr-person .credit-name { animation: creditFade 4s ease-in-out infinite !important; animation-delay: calc(var(--i, 0) * -1s) !important; }
.credit-name { filter: drop-shadow(0 0 8px rgba(96,165,250,.55)); animation: creditFade 4s ease-in-out infinite; }
@keyframes creditFade { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.role-tag { filter: drop-shadow(0 0 5px rgba(var(--rc-rgb), .6)); animation: creditFade 4s ease-in-out infinite; }
.splash-tap { text-shadow: 0 0 14px rgba(var(--acc-rgb),.7); animation: tapFade 2.4s ease-in-out infinite; }
@keyframes tapFade { 0%,100% { opacity: .45; } 50% { opacity: 1; } }

/* anillos / pulsos de sombra: sombras estáticas; el CTA respira con transform */
.ego-banner::before { animation: none; }
.ego-btn { box-shadow: 0 0 20px 0 rgba(var(--acc-rgb),.28); animation: ctaBreath 3.2s ease-in-out infinite; }
.bottom-nav .bn-claim { animation: none; }
@keyframes ctaBreath { 0%,100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.pill.active { animation: none; }
.cr-sponsor .cr-avatar { animation: none; box-shadow: 0 0 0 3px var(--bg3), 0 0 0 5px rgba(251,191,36,.75), 0 10px 30px -6px rgba(251,191,36,.45); }
.bd.tier-legendary.bd-md, .bd.tier-legendary.bd-xl, .pod.p1 .pod-av { animation: none; }
.bd.tier-legendary .bd-ring, .bd.tier-epic .bd-ring { animation: none; }
.bd-md::after, .bd-xl::after, .bd-xs.tier-epic::after, .bd-xs.tier-legendary::after { mix-blend-mode: normal; background: linear-gradient(115deg, transparent 35%, rgba(var(--ov),.28) 50%, transparent 65%); background-size: 100% 100%; background-position: 0 0; opacity: 0; animation: bdGlint 4.5s ease-in-out infinite; }
.bd.tier-common::after { animation-duration: 7s; }
@keyframes bdGlint { 0%, 60%, 100% { opacity: 0; } 80% { opacity: 1; } }
.pod::after { background: linear-gradient(115deg, transparent 38%, rgba(var(--ov),.1) 50%, transparent 62%); background-size: 100% 100%; background-position: 0 0; transform: translateX(-100%); animation: podShine 6s ease-in-out infinite; will-change: transform; }
.pod.p1::after { animation-duration: 4.5s; }
@keyframes podShine { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* barras móviles: fondo sólido en vez de backdrop-filter sobre contenido que se desplaza */
html.is-mobile .sidebar, html.is-mobile .bottom-nav { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: rgba(var(--bg-rgb),.97) !important; }

/* aislamiento: el contenido que cambia no fuerza repintar el resto */
.view-section { contain: layout style; }
.chat-list { contain: content; overscroll-behavior: contain; }

/* modo lite (CPU/RAM modestas o ahorro de datos): fondo estático, sin movimientos continuos salvo carga */
html.lite .ambient span, html.lite .hero-orbs i, html.lite .pod::after, html.lite .bd::after, html.lite .logo-icon, html.lite .ego-btn,
html.lite .pod-crown, html.lite .cr-person .cr-avatar, html.lite .cr-person .cr-avatar::before, html.lite .credit-name, html.lite .role-tag,
html.lite .splash-tap, html.lite .hero-dot { animation: none !important; }
html.lite .bd::after, html.lite .pod::after { display: none; }

/* movimiento reducido: sin animaciones continuas (el spinner de carga se conserva) */
@media (prefers-reduced-motion: reduce) {
    *:not(.spinner), *:not(.spinner)::before, *:not(.spinner)::after { animation-iteration-count: 1 !important; animation-duration: .01ms !important; animation-delay: 0s !important; scroll-behavior: auto !important; }
}

html.has-maint .app-container{padding-top:var(--maint-h,40px);box-sizing:border-box}
html.has-maint.is-mobile .sidebar{top:var(--maint-h,40px)}

/* ---- Selector de tema ---- */
.theme-switch { display: inline-flex; gap: 6px; align-items: center; padding: 4px; border-radius: 999px; background: rgba(var(--ov),.05); border: 1px solid var(--bd); }
.theme-switch button { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid transparent; cursor: pointer; background-clip: padding-box; transition: transform .15s, border-color .15s; }
.theme-switch button:hover { transform: scale(1.12); }
.theme-switch button[aria-pressed="true"] { border-color: var(--fg); }
.theme-switch button:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.theme-switch .ts-purple { background: linear-gradient(135deg, #a855f7, #6d28d9); }
.theme-switch .ts-white { background: #f6f6f7; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.theme-switch .ts-black { background: #000; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
html.is-mobile .theme-switch button { width: 26px; height: 26px; }

/* ---- ajustes de contraste por tema ---- */
html[data-theme="white"] .hero-orbs i { opacity: .22; }
html[data-theme="white"] .hero-orbs i:nth-child(n) { background: var(--bd2); }
html[data-theme="white"] .modal-bg { background: rgba(24,24,27,.45); }
html[data-theme="white"] .modal, html[data-theme="white"] .toast { box-shadow: 0 20px 40px rgba(24,24,27,.18); }
html[data-theme="white"] .ambient span { opacity: .12; }
html[data-theme="black"] .hero-orbs i { opacity: .18; }
html[data-theme="black"] .hero-orbs i:nth-child(n) { background: var(--bd2); }
html[data-theme="black"] .ambient span { opacity: .07; }
html[data-theme="white"] .cr-card, html[data-theme="white"] .credit-card { --blue: #2563eb; --blue-soft: #1d4ed8; }
html[data-theme="white"] .cr-card::before { background: linear-gradient(90deg, transparent, rgba(37,99,235,.6), transparent); }
html[data-theme="white"] .credit-link { color: #1d4ed8; }
html[data-theme="white"] .credit-link > span:first-child { background: rgba(37,99,235,.1); border-color: rgba(37,99,235,.35); }

/* ---- 3D ligero: moneda del hero + inclinación del podio ---- */
.hero > .coin3d { position: absolute; right: clamp(18px, 7%, 80px); top: 50%; width: clamp(96px, 16vw, 168px); aspect-ratio: 1; margin-top: calc(clamp(96px, 16vw, 168px) / -2); perspective: 700px; pointer-events: none; z-index: 1; }
.coin3d-tilt { width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .25s ease-out; }
.coin3d-spin { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; animation: coinSpin 9s linear infinite; }
.coin3d-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: clamp(44px, 8vw, 84px); color: var(--on-acc); backface-visibility: hidden;
    background: radial-gradient(circle at 32% 28%, var(--acc-soft2), var(--acc) 55%, var(--acc2)); box-shadow: inset 0 0 0 5px rgba(var(--ov),.18), inset 0 0 26px rgba(var(--shadow-rgb),.35), 0 10px 40px -10px rgba(var(--acc-rgb),.6); }
.coin3d-face.front { transform: translateZ(6px); }
.coin3d-face.back { transform: rotateY(180deg) translateZ(6px); }
.coin3d-rim { position: absolute; inset: 0; border-radius: 50%; background: var(--acc2); transform: translateZ(0); }
.coin3d.paused .coin3d-spin { animation-play-state: paused; }
.coin3d.static .coin3d-spin { animation: none; transform: rotateY(-22deg) rotateX(8deg); }
html.lite .coin3d-spin { animation: none !important; transform: rotateY(-22deg) rotateX(8deg); }
@keyframes coinSpin { to { transform: rotateY(360deg); } }
@media (max-width: 640px) { .hero > .coin3d { opacity: .6; right: 14px; top: 16px; margin-top: 0; width: 64px; } .coin3d-face { font-size: 38px; } }
@media (hover: hover) and (pointer: fine) {
    .pod { transition: transform .35s ease; transform-style: preserve-3d; }
    .podium:hover .pod { transform: perspective(900px) rotateX(4deg); }
    .podium .pod:hover { transform: perspective(900px) rotateX(0deg) translateY(-6px) scale(1.02); }
}

/* ---- chat: scroll inteligente, respuestas, estados ---- */
.chat-listwrap { position: relative; }
.chat-pill { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3; padding: 7px 16px; border-radius: 999px; border: 1px solid rgba(var(--acc-rgb),.6); background: var(--acc); color: var(--on-acc); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 24px -8px rgba(var(--acc-rgb),.7); }
.chat-pill[hidden] { display: none; }
.chat-more { align-self: center; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--bd2); background: var(--bg4); color: var(--fg2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; flex: none; }
.chat-more:disabled { opacity: .6; cursor: default; }
.chat-live.off i { background: #f59e0b; box-shadow: 0 0 10px #f59e0b; animation: none; }
.chat-live.off { color: #f59e0b; }
.chat-reply-btn { align-self: center; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--bd2); background: var(--bg4); color: var(--mut); cursor: pointer; font-size: 14px; line-height: 1; opacity: 0; transition: opacity .15s; }
.chat-msg:hover .chat-reply-btn, .chat-reply-btn:focus-visible { opacity: 1; }
@media (hover: none) { .chat-reply-btn { opacity: .7; } }
.chat-quote { display: block; width: 100%; text-align: left; margin: 0 0 6px; padding: 4px 8px; border: 0; border-left: 3px solid rgba(var(--acc-rgb),.7); border-radius: 4px; background: rgba(var(--ov),.06); color: var(--mut); font: inherit; font-size: 12px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-quote strong { color: var(--fg2); }
.chat-msg.flash .chat-bubble { animation: chatFlash 1.4s ease-out; }
@keyframes chatFlash { 0% { box-shadow: 0 0 0 3px rgba(var(--acc-rgb),.6); } 100% { box-shadow: 0 0 0 0 rgba(var(--acc-rgb),0); } }
.chat-msg.local.sending .chat-bubble { opacity: .65; }
.chat-msg.local.failed .chat-bubble { border-color: rgba(239,68,68,.6); }
.chat-state { margin-top: 6px; font-size: 11.5px; color: var(--mut); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chat-state.failed { color: #ef4444; }
.chat-replybar { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 10px; background: rgba(var(--acc-rgb),.1); border-left: 3px solid var(--acc); font-size: 12.5px; color: var(--mut); overflow: hidden; }
.chat-replybar[hidden] { display: none; }
.chat-replybar strong { color: var(--fg); flex: none; }
.chat-reply-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-reply-x { flex: none; border: 0; background: transparent; color: var(--mut); cursor: pointer; font-size: 14px; padding: 2px 6px; }
.chat-verified { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 5px; border-radius: 50%; background: #22c55e; color: #fff; font-size: 10px; font-weight: 800; vertical-align: 1px; }
.chat-form textarea { resize: none; max-height: 140px; }

/* ---- conexiones de perfil ---- */
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.lk-card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--bg4); border: 1px solid var(--bd2); color: var(--fg); text-decoration: none; transition: border-color .2s, transform .2s; }
.lk-card:hover { border-color: rgba(var(--acc-rgb),.6); transform: translateY(-2px); }
.lk-card.is-verified { border-color: rgba(34,197,94,.5); }
.lk-ic { font-size: 22px; flex: none; }
.lk-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lk-body strong, .lk-body a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.lk-body small { color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-verified { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.45); color: #16a34a; font-size: 11px; font-weight: 700; }
html:not([data-theme="white"]) .lk-verified { color: #4ade80; }
.lk-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.lk-row { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--bg4); border: 1px solid var(--bd2); }
.lk-row.is-verified { border-color: rgba(34,197,94,.45); }
.lk-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lk-chip { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(var(--ov),.08); color: var(--mut); border: 1px solid var(--bd2); }
.lk-chip.s-verified { color: #16a34a; border-color: rgba(34,197,94,.45); } .lk-chip.s-pending, .lk-chip.s-available { color: #d97706; border-color: rgba(217,119,6,.45); }
.lk-chip.s-rejected, .lk-chip.s-revoked, .lk-chip.s-expired { color: #ef4444; border-color: rgba(239,68,68,.45); }
.lk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lk-pub { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--mut); margin-right: auto; }
.pill.danger { color: #ef4444; border-color: rgba(239,68,68,.45); }
.lk-note { font-size: 12.5px; color: #ef4444; }
.lk-verify { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; border-top: 1px solid var(--bd); }
.lk-method { display: flex; flex-direction: column; gap: 8px; }
.lk-method h4 { margin: 6px 0 0; font-size: 13px; color: var(--fg2); }
.lk-method p, .lk-small { margin: 0; font-size: 12.5px; color: var(--mut); }
.lk-field small { color: var(--mut); font-size: 11.5px; }
.lk-code { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--bd); }
.lk-code code { flex: 1; min-width: 0; font-size: 12.5px; overflow-wrap: anywhere; color: var(--fg); }
.lk-copy { flex: none; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--bd2); background: var(--bg4); color: var(--fg2); font: inherit; font-size: 11.5px; cursor: pointer; }
.lk-add, .lk-edit { display: flex; flex-direction: column; gap: 8px; }
.lk-add input, .lk-edit input, .lk-method textarea { background: var(--bg); border: 1px solid var(--bd); color: var(--fg); padding: 10px 12px; border-radius: 12px; font: inherit; font-size: 14px; outline: none; }
.lk-add input:focus, .lk-edit input:focus, .lk-method textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(var(--acc-rgb),.18); }
.lk-msg.err { color: #ef4444; font-size: 12.5px; min-height: 0; }
.lk-msg:empty { display: none; }
.lk-title { row-gap: 6px; } .lk-title .lk-body { min-width: 130px; }

/* Emojis estilo iPhone (js/emoji.js) */
img.emo{height:1.15em;width:1.15em;vertical-align:-.22em;display:inline-block;object-fit:contain;-webkit-user-drag:none;user-select:none}

/* ===== Comunidad abierta: comentarios, reportes, subperfiles y grupos (js/social.js) ===== */
.rp-btn { background: none; border: 0; color: var(--mut2); font: inherit; font-size: 12px; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.rp-btn:hover { color: #ef4444; }
.rp-done { font-size: 12px; color: var(--mut); }
.rp-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; margin: 8px 0; border-radius: 12px; background: var(--bg4); border: 1px solid var(--bd2); max-width: 420px; }
.rp-sel, .rp-note, .hd-in, .cm-input, .gm-input { background: var(--bg); border: 1px solid var(--bd); color: var(--fg); padding: 9px 12px; border-radius: 12px; font: inherit; font-size: 14px; outline: none; width: 100%; box-sizing: border-box; }
.rp-sel:focus, .rp-note:focus, .hd-in:focus, .cm-input:focus, .gm-input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(var(--acc-rgb),.18); }
.rp-actions, .cm-form-row, .gp-owner-actions, .hd-row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.post-report { margin-top: 6px; }
.cm-section { margin-top: 28px; }
.cm-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.cm-item { display: flex; gap: 10px; padding: 12px; border-radius: 14px; background: var(--bg4); border: 1px solid var(--bd2); }
.cm-body { flex: 1; min-width: 0; }
.cm-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }
.cm-time { color: var(--mut2); font-size: 11.5px; }
.cm-text, .gm-text { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; color: var(--fg2); }
.cm-actions { display: flex; gap: 8px; margin-top: 4px; }
.cm-del { background: none; border: 0; color: var(--mut2); font: inherit; font-size: 12px; cursor: pointer; }
.cm-del:hover { color: #ef4444; }
.cm-form { display: flex; flex-direction: column; gap: 8px; }
.cm-form-row { justify-content: space-between; }
.cm-rules { color: var(--mut2); font-size: 11.5px; flex: 1; min-width: 160px; }
.cm-login { margin-top: 8px; }
.hd-chips, .hp-others { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.hd-chip { padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--acc-soft); border: 1px solid var(--bd2); background: rgba(var(--acc-rgb),.10); text-decoration: none; }
.hd-chip:hover { border-color: var(--acc); }
html[data-theme="white"] .hd-chip { color: var(--acc2); }
.hd-row { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg4); border: 1px solid var(--bd2); margin-bottom: 10px; }
.hd-row-main { display: flex; flex-direction: column; gap: 2px; } .hd-row-main small { color: var(--mut2); }
.hd-form { display: flex; flex-direction: column; gap: 8px; }
.hd-form label { font-size: 12.5px; color: var(--mut); margin-top: 4px; }
.hd-handle-row { display: flex; align-items: center; gap: 6px; } .hd-at { color: var(--mut2); font-size: 13px; white-space: nowrap; }
.hd-avail { min-height: 18px; font-size: 12.5px; } .hd-ok { color: #16a34a; } .hd-bad { color: #ef4444; } .hd-wait { color: var(--mut2); } .hd-rules { color: var(--mut2); font-size: 11.5px; }
.hd-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.hd-sw { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; }
.hd-sw.on { border-color: var(--fg); box-shadow: 0 0 0 2px var(--bg); }
.hd-links { display: flex; flex-direction: column; gap: 6px; } .hd-link-opt { display: flex; gap: 8px; align-items: center; font-size: 13.5px !important; color: var(--fg2) !important; }
.hd-new { margin-top: 10px; }
/* página pública del subperfil */
.hp { min-height: calc(100vh - 80px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px 16px; border-radius: 20px; --hp: var(--acc); }
.hp-acc-purple { --hp:#a855f7; } .hp-acc-blue { --hp:#3b82f6; } .hp-acc-green { --hp:#22c55e; } .hp-acc-pink { --hp:#ec4899; } .hp-acc-orange { --hp:#f97316; } .hp-acc-red { --hp:#ef4444; } .hp-acc-teal { --hp:#14b8a6; } .hp-acc-gold { --hp:#eab308; } .hp-acc-mono { --hp:#e4e4e7; }
.hp-bg-aurora { background: radial-gradient(circle at 20% 10%, color-mix(in srgb, var(--hp) 35%, transparent), transparent 55%), radial-gradient(circle at 85% 90%, rgba(37,99,235,.28), transparent 55%), var(--bg3); }
.hp-bg-grid { background: linear-gradient(rgba(var(--ov),.05) 1px, transparent 1px) 0 0/28px 28px, linear-gradient(90deg, rgba(var(--ov),.05) 1px, transparent 1px) 0 0/28px 28px, var(--bg3); }
.hp-bg-dots { background: radial-gradient(rgba(var(--ov),.12) 1.5px, transparent 1.5px) 0 0/20px 20px, var(--bg3); }
.hp-bg-sunset { background: linear-gradient(160deg, #3b0764, #9d174d 55%, #c2410c); }
.hp-bg-ocean { background: linear-gradient(160deg, #082f49, #0e7490 60%, #134e4a); }
.hp-bg-plain { background: var(--bg3); }
.hp-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 22px; border-radius: 24px; background: rgba(9,9,11,.62); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid color-mix(in srgb, var(--hp) 45%, transparent); box-shadow: 0 18px 60px rgba(0,0,0,.4); color: #fafafa; }
.hp-av .avatar { box-shadow: 0 0 0 3px var(--hp); }
.hp-title { margin: 6px 0 0; font-size: 26px; text-align: center; } .hp-handle { color: var(--hp); font-weight: 600; }
.hp-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; } .hp-bio { margin: 0; text-align: center; color: #d4d4d8; overflow-wrap: anywhere; white-space: pre-wrap; }
.hp-links { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.hp-link { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); color: #fafafa; text-decoration: none; transition: transform .15s, border-color .15s; }
.hp-link:hover { transform: translateY(-2px); border-color: var(--hp); }
.hp-link-tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .hp-link-ar { color: #a1a1aa; }
.hp-others { justify-content: center; color: #a1a1aa; font-size: 12.5px; } .hp-foot-links { display: flex; gap: 14px; align-items: center; margin-top: 8px; font-size: 12.5px; }
.hp-foot-links .author-link { color: #d4d4d8; } .hp-made { color: rgba(255,255,255,.55); font-size: 12px; text-decoration: none; } .hp-made:hover { color: #fff; }
/* grupos */
.chat-groups { margin-left: auto; font-size: 12px; padding: 4px 12px; }
.chat-head { display: flex; align-items: center; gap: 10px; }
.gp-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 14px 0; }
.gp-form { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--bg4); border: 1px solid var(--bd2); }
.gp-list { display: flex; flex-direction: column; gap: 10px; }
.gp-card { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--bg4); border: 1px solid var(--bd2); text-decoration: none; color: var(--fg); }
.gp-card:hover { border-color: var(--acc); } .gp-card-main { display: flex; flex-direction: column; min-width: 0; } .gp-card-main small { color: var(--mut2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-card-meta { display: flex; gap: 8px; align-items: center; color: var(--mut); font-size: 12.5px; flex: none; }
.gp-invite { max-width: 460px; margin: 40px auto; padding: 28px; text-align: center; border-radius: 20px; background: var(--bg4); border: 1px solid var(--bd2); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.gp-invite-kicker { color: var(--mut); font-size: 13px; }
.gp-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; } .gp-desc { color: var(--mut); }
.gp-info { padding: 14px; border-radius: 14px; background: var(--bg4); border: 1px solid var(--bd2); margin: 10px 0; display: flex; flex-direction: column; gap: 10px; }
.gp-invite-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .gp-link { padding: 4px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--bd); overflow-wrap: anywhere; }
.gp-member { display: flex; align-items: center; gap: 8px; }
.gm-box { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.gm-list { height: min(55vh, 520px); overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--bg3); border: 1px solid var(--bd); }
.gm { display: flex; gap: 8px; align-items: flex-start; } .gm-body { flex: 1; min-width: 0; } .gm-head { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.gm-actions { display: flex; flex-direction: column; opacity: .6; } .gm:hover .gm-actions { opacity: 1; }
.gm-form { display: flex; gap: 8px; align-items: flex-end; } .gm-input { resize: none; }
@media (max-width: 600px) { .hd-row-actions .pill { flex: 1 1 auto; text-align: center; } .gm-actions { opacity: 1; } }
.gp-info[hidden], .note[hidden] { display: none !important; }
@media (max-width: 900px) { #group-content, #groups-content, #invite-content { padding-bottom: 96px; } .hp { min-height: calc(100vh - 220px); } }
a.pill { text-decoration: none; }
.hd-sale { margin: 12px 0; padding: 14px; border-radius: 14px; background: rgba(var(--acc-rgb),.08); border: 1px dashed var(--bd2); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; } .hd-sale p { margin: 0; font-size: 13.5px; color: var(--fg2); }

/* mensaje del ranking */
.rank-msg { font-size: 12px; font-style: italic; color: var(--mut); margin-top: 4px; max-width: 100%; overflow-wrap: anywhere; line-height: 1.35; }
.pod .rank-msg { text-align: center; font-size: 11px; }
.pay-msg { margin-top: 20px; text-align: left; }
.pay-msg[hidden], .pay-msg .note[hidden] { display: none !important; }
.pay-msg input { width: 100%; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(168,85,247,.35); background: rgba(255,255,255,.04); color: inherit; font: inherit; }
.pay-msg-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.pay-msg-row .action-btn { flex: 1; margin: 0; }

/* identidad pública */
.idn-card { margin: 18px 0; padding: 18px; border: 1px solid var(--bd); border-radius: 14px; background: var(--card, rgba(255,255,255,.03)); max-width: 560px; }
.idn-col { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.idn-opt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; font-size: 14px; }
.idn-opt input[type=radio] { accent-color: var(--acc); }
.idn-opt input[type=text], .idn-opt input:not([type]) { flex: 1; min-width: 160px; background: var(--bg); border: 1px solid var(--bd); color: var(--fg); padding: 8px 12px; border-radius: 8px; }
.idn-opt input:disabled { opacity: .45; }
.idn-mini { border-radius: 50%; }
.idn-emojis { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; margin-top: 4px; }
.idn-emojis[hidden] { display: none !important; }
.idn-emoji { font-size: 22px; padding: 8px 0; border-radius: 10px; border: 1px solid var(--bd); background: var(--bg); cursor: pointer; line-height: 1; }
.idn-emoji.on { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc); }
.avatar.emoji { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }

.idn-up { display: inline-flex; align-items: center; gap: 10px; }
.idn-prev img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; }
.idn-prev:empty { display: none; }
.avatar img { object-fit: cover; }
.action-btn.sm { width: auto; margin-top: 0; padding: 6px 12px; font-size: 13px; }

.side-bell { display: block; width: 100%; margin: 10px 0 4px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--bd); background: transparent; color: var(--mut); font: inherit; font-size: 12.5px; cursor: pointer; text-align: center; }
.side-bell:hover { color: var(--fg); border-color: var(--acc); }
.side-bell.on { color: var(--fg); border-color: var(--acc); }
.side-bell[hidden] { display: none; }
.idn-card[hidden]{display:none}

/* accesibilidad: foco siempre visible al navegar con teclado y enlace para saltar el menú */
:focus-visible { outline: 2px solid var(--acc-soft, #d8b4fe); outline-offset: 2px; }
.credit-card:focus-visible, .post-card:focus-visible, .cr-card:focus-visible, .cr-sponsor:focus-visible, [role="button"]:focus-visible { outline: 2px solid var(--acc-soft, #d8b4fe) !important; outline-offset: 3px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 10000; background: var(--acc2, #7c3aed); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; transition: top .15s; }
.skip-link:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }
