/* RedAI-Web – Página de perfil de usuario */
.profile-page .profile-loading,
.profile-page .profile-error {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--neo-muted, #9aa6bf);
}
.profile-page .spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.75rem;
    border: 3px solid var(--neo-border);
    border-top-color: var(--neo-primary, #6366f1);
    border-radius: 50%;
    animation: profile-spin 0.8s linear infinite;
}
@keyframes profile-spin {
    to { transform: rotate(360deg); }
}
.profile-wrap {
    margin-top: 1rem;
}
.profile-banner {
    width: 100%;
    height: 220px;
    border-radius: 16px 16px 0 0;
    background: var(--neo-surface-2, rgba(255,255,255,0.06));
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    z-index: 0;
}
.profile-banner-no-image {
    background: linear-gradient(135deg, #1a1625 0%, #2d2438 40%, #1e1b2e 100%);
}
.profile-banner-initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(4rem, 15vw, 7rem);
    font-weight: 700;
    color: rgba(255,255,255,0.15);
    letter-spacing: 0.02em;
    pointer-events: none;
    z-index: 1;
}
.profile-banner-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.profile-banner-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(139, 92, 246, 0.25);
    border-radius: 50%;
    animation: profileBannerParticleFloat 6s ease-in-out infinite;
    will-change: transform;
}
@keyframes profileBannerParticleFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.4; }
    50% { transform: translateY(-12px) translateX(4px); opacity: 0.8; }
}
.profile-card {
    position: relative;
    z-index: 1;
    background: var(--neo-surface, rgba(255,255,255,0.04));
    border: 1px solid var(--neo-border, rgba(255,255,255,0.08));
    border-top: none;
    border-radius: 0 0 16px 16px;
    padding: 1.5rem 1.5rem 1.5rem;
    padding-top: 4rem;
    margin-bottom: 1rem;
    margin-top: -48px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 1rem;
    row-gap: 0.35rem;
    align-items: start;
}
@media (min-width: 768px) {
    .profile-card {
        grid-template-columns: 1fr 1fr;
    }
    .profile-header-row,
    .profile-public-url-wrap,
    .profile-signature-section {
        grid-column: 1 / -1;
    }
    /* Panel Inicio: grid 2 columnas (bio izq | actividad der, stats ancho completo) */
    .profile-tab-inicio-card {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0 1rem;
        align-items: start;
    }
    .profile-tab-inicio-card .profile-bio-section {
        grid-column: 1;
    }
    .profile-tab-inicio-card .profile-activity-section {
        grid-column: 2;
    }
    .profile-tab-inicio-card .profile-achievements-top-section {
        grid-column: 1 / -1;
    }
    .profile-tab-inicio-card .profile-stats-section {
        grid-column: 1 / -1;
    }
}
/* Cabecera: avatar centrado tocando el banner; nombre y acciones debajo */
.profile-header-row {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: -72px;
    margin-bottom: 0.75rem;
    text-align: center;
}
.profile-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
}
.profile-header-meta {
    width: 100%;
    min-width: 0;
}
.profile-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
/* Contadores sociales (solo seguidores / siguiendo) arriba */
.profile-counters-social {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0.5rem 0 0;
}
.profile-counters-social .counter-social {
    font-size: 0.9rem;
    color: var(--neo-muted);
}
.profile-counters-social .counter-social .counter-num {
    font-weight: 600;
    color: var(--neo-text);
}
/* Nivel global: badge + barra de progreso XP */
.profile-level-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0.5rem 0;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}
.profile-level-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--neo-surface, #0f1116);
    background: linear-gradient(135deg, var(--neo-primary, #6366f1) 0%, var(--neo-secondary, #8b5cf6) 100%);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
    flex-shrink: 0;
}
.profile-level-bar-wrap {
    flex: 1;
    min-width: 80px;
    height: 8px;
    background: var(--neo-surface-2, rgba(255,255,255,0.08));
    border-radius: 999px;
    overflow: hidden;
}
.profile-level-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--neo-primary, #6366f1), var(--neo-secondary, #8b5cf6));
    transition: width 0.35s ease;
}
.profile-level-xp {
    font-size: 0.8rem;
    color: var(--neo-muted, #9aa6bf);
    white-space: nowrap;
}
.profile-avatar {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.95);
    background: var(--neo-surface-2);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.profile-header-actions {
    align-items: center;
}
.profile-counters-social {
    justify-content: center;
}
.profile-badges {
    justify-content: center;
}
.profile-actions-own {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.profile-actions-dropdown-wrap {
    position: relative;
}
.profile-actions-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.profile-actions-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 200px;
    padding: 0.35rem 0;
    background: var(--neo-surface);
    border: 1px solid var(--neo-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 100;
    display: none;
}
.profile-actions-dropdown[aria-hidden="false"] {
    display: block;
}
.profile-actions-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    color: var(--neo-text);
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.profile-actions-item:hover {
    background: var(--neo-bg);
}
.profile-actions-item i {
    width: 1em;
    color: var(--neo-primary);
}
.profile-edit-btn,
.profile-follow-btn,
.profile-unfollow-btn {
    margin-bottom: 0;
}
.profile-display-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--neo-text);
}
.profile-nickname {
    font-size: 0.95rem;
    color: var(--neo-muted);
    margin: 0 0 0.25rem;
}
.profile-username {
    font-size: 0.95rem;
    color: var(--neo-muted);
    margin: 0 0 0.25rem;
}
.profile-status {
    font-size: 0.8rem;
    color: var(--neo-muted);
    margin: 0.15rem 0 0.5rem;
}
.profile-status-online {
    color: var(--neo-success, #22c55e);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.profile-status-online::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: profile-pulse 2s ease-in-out infinite;
}
@keyframes profile-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
/* Estado: debajo de la bio, solo lectura (se edita en Editar perfil) */
.profile-bio-section .profile-current-mood {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--neo-border);
}
.profile-bio-section .profile-current-mood-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--neo-muted);
    margin-bottom: 0.25rem;
}
.profile-bio-section .profile-current-mood-text {
    font-size: 0.925rem;
    color: var(--neo-text);
    line-height: 1.4;
}
.profile-availability-line {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--neo-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.profile-availability-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--neo-muted);
}
.profile-availability-label i {
    margin-right: 0.25rem;
}
.profile-availability-value {
    font-size: 0.9rem;
    color: var(--neo-text);
}
.profile-available-now-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--neo-success, #22c55e);
    color: #fff;
}
.profile-meta {
    font-size: 0.875rem;
    color: var(--neo-muted);
    margin: 0.25rem 0;
}
.profile-bio {
    white-space: pre-wrap;
    margin: 0.5rem 0;
    color: var(--neo-text);
    line-height: 1.55;
    max-width: 100%;
}
.profile-bio.profile-bio-placeholder {
    color: var(--neo-muted);
    font-style: italic;
}
.profile-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0.5rem 0;
}
.profile-badges .badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--neo-primary);
    color: var(--neo-surface);
    opacity: 0.95;
}
.profile-badges .badge.new_account {
    background: var(--neo-secondary, #22d3ee);
    color: #0b0f19;
}
.profile-characters-title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.profile-characters-count {
    font-size: 0.95em;
    font-weight: 400;
    color: var(--neo-muted);
}
.profile-characters-load-more {
    margin-top: 1rem;
}
.profile-counters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem 0;
    border-top: 1px solid var(--neo-border);
}
.profile-counters .counter {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    color: var(--neo-text);
}
.profile-counters .counter i {
    color: var(--neo-primary);
    width: 1em;
}
.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}
/* Modal editar perfil */
.profile-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.profile-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}
.profile-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    max-height: 90vh;
    overflow: visible;
}
.profile-modal.show {
    opacity: 1;
    visibility: visible;
}
.profile-modal-card {
    background: var(--neo-surface);
    border: 1px solid var(--neo-border);
    border-radius: 20px;
    padding: 0;
    max-width: 560px;
    width: 90vw;
    max-height: 90vh;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.profile-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.profile-modal-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.profile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--neo-border);
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    flex-shrink: 0;
}
.profile-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    flex: 1;
}
.profile-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--neo-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.profile-modal-close:hover {
    background: var(--neo-bg);
    color: var(--neo-text);
}
.profile-form-sections {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}
.profile-form-section {
    margin-bottom: 1.5rem;
}
.profile-form-section:last-of-type {
    margin-bottom: 0;
}
.profile-form-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--neo-primary);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--neo-border);
}
.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.profile-form-section .profile-default-btns {
    margin-top: 0.5rem;
}

.profile-edit-appearance-previews {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem 1.5rem;
    align-items: start;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--neo-surface-2, rgba(0,0,0,0.06));
    border-radius: 12px;
}
.profile-edit-preview-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.profile-edit-preview-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--neo-muted, #888);
}
.profile-edit-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid var(--neo-border, rgba(255,255,255,0.1));
}
.profile-edit-avatar-preview.profile-edit-preview-empty {
    background-color: var(--neo-surface-2, rgba(0,0,0,0.08));
    background-image: none;
}
.profile-edit-banner-preview {
    width: 100%;
    max-width: 240px;
    height: 72px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid var(--neo-border, rgba(255,255,255,0.1));
}
.profile-edit-banner-preview.profile-edit-preview-empty {
    background-color: var(--neo-surface-2, rgba(0,0,0,0.08));
    background-image: none;
}

/* Color del nombre y estilos desbloqueables (Editar perfil → Apariencia) */
.profile-name-style-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--neo-border, rgba(255,255,255,0.08));
}
.profile-name-style-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neo-text);
    margin: 0 0 0.35rem 0;
}
.profile-name-style-heading .profile-premium-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    background: linear-gradient(135deg, #b8860b, #daa520);
    color: #fff;
    margin-left: 0.35rem;
}
.profile-name-style-desc {
    font-size: 0.85rem;
    color: var(--neo-muted);
    margin: 0 0 0.75rem 0;
}
.profile-name-color-palette-wrap {
    margin-bottom: 0.75rem;
}
.profile-name-color-palette {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.profile-name-color-swatch {
    aspect-ratio: 1;
    border-radius: 10px;
    border: 2px solid var(--neo-border);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.profile-name-color-swatch:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.profile-name-color-swatch.selected {
    border-color: var(--neo-primary, #6366f1);
    box-shadow: 0 0 0 2px var(--neo-bg), 0 0 0 4px var(--neo-primary);
}
.profile-name-color-custom-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.profile-name-color-custom-label {
    font-size: 0.9rem;
    color: var(--neo-muted);
}
.profile-name-color-hex {
    width: 7.5rem;
    font-family: ui-monospace, monospace;
}
.profile-name-color-preview {
    font-weight: 600;
    font-size: 1.05rem;
}
@media (max-width: 520px) {
    .profile-name-color-palette {
        grid-template-columns: repeat(8, 1fr);
    }
}
.profile-name-color-cooldown {
    color: var(--neo-muted);
    font-style: italic;
}
.profile-name-color-hint-error {
    color: var(--neo-error, #ef4444) !important;
}
.profile-name-advanced-locked p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--neo-muted);
}
.profile-unlockable-styles-modal .profile-modal-card {
    overflow-x: hidden;
}
.profile-unlockable-styles-modal .profile-unlockable-styles-desc {
    margin: 0 0 1.25rem 0;
    font-size: 0.9rem;
    color: var(--neo-muted);
    line-height: 1.4;
}
.profile-unlockable-styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
.profile-unlockable-styles-empty {
    margin: 0;
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--neo-muted);
    line-height: 1.5;
}
.profile-unlockable-style-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--neo-border);
    background: var(--neo-surface-2, rgba(0,0,0,0.06));
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    gap: 0.35rem;
}
.profile-unlockable-style-card.unlocked:hover {
    background: var(--neo-surface-2);
    border-color: var(--neo-primary, #6366f1);
}
.profile-unlockable-style-name {
    font-weight: 600;
    color: var(--neo-text);
    margin-bottom: 0.15rem;
}
.profile-unlockable-style-desc {
    font-size: 0.85rem;
    color: var(--neo-muted);
    line-height: 1.35;
}

/* Estilos de nombre aplicados en la UI (perfil, shoutbox, etc.) */
.user-display-name {
    transition: color 0.15s ease;
}
.user-display-name.name-style-starter-glow {
    text-shadow: 0 0 8px currentColor;
}
.user-display-name.name-style-level5-shine {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.user-display-name.name-style-level10-gradient {
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.user-display-name.name-style-level20-neon {
    color: #22d3ee;
    text-shadow: 0 0 6px #22d3ee, 0 0 12px #22d3ee;
}
.user-display-name.name-style-level30-pulse {
    animation: name-pulse 2s ease-in-out infinite;
}
@keyframes name-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}
.user-display-name.name-style-level50-legend {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

@media (max-width: 480px) {
    .profile-edit-appearance-previews {
        grid-template-columns: 1fr;
    }
    .profile-form-grid {
        grid-template-columns: 1fr;
    }
}
.profile-form .form-group {
    margin-bottom: 1rem;
}
.profile-form .form-group:last-child {
    margin-bottom: 0;
}
.profile-form .form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--neo-text);
}
.profile-form .form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--neo-border);
    background: var(--neo-bg);
    color: var(--neo-text);
    font-size: 1rem;
}
.profile-form .form-textarea {
    min-height: 100px;
    resize: vertical;
}
.profile-form .form-hint.form-char-count {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--neo-muted);
}
.profile-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Checkboxes decorados: caja + tick (marca) personalizados */
.profile-form .checkbox-label input[type="checkbox"],
.profile-availability-checkboxes input[type="checkbox"],
.profile-edit-privacy-toggle input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 2px solid var(--neo-border, rgba(255, 255, 255, 0.2));
    background: var(--neo-surface-2, rgba(255, 255, 255, 0.06));
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.profile-form .checkbox-label input[type="checkbox"]:hover,
.profile-availability-checkboxes input[type="checkbox"]:hover,
.profile-edit-privacy-toggle input[type="checkbox"]:hover {
    border-color: color-mix(in srgb, var(--neo-primary, #6366f1) 50%, var(--neo-border, rgba(255,255,255,.2)));
    background: var(--neo-surface-2, rgba(255, 255, 255, 0.08));
}
.profile-form .checkbox-label input[type="checkbox"]:focus-visible,
.profile-availability-checkboxes input[type="checkbox"]:focus-visible,
.profile-edit-privacy-toggle input[type="checkbox"]:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--neo-primary, #6366f1) 50%, transparent);
    outline-offset: 2px;
}
/* Tick / marca de verificación */
.profile-form .checkbox-label input[type="checkbox"]::after,
.profile-availability-checkboxes input[type="checkbox"]::after,
.profile-edit-privacy-toggle input[type="checkbox"]::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: 2px solid #fff;
    border-top: 0;
    border-left: 0;
    transform: rotate(45deg) scale(0.6);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.profile-form .checkbox-label input[type="checkbox"]:checked,
.profile-availability-checkboxes input[type="checkbox"]:checked,
.profile-edit-privacy-toggle input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--neo-primary, #6366f1), color-mix(in srgb, var(--neo-primary, #6366f1) 75%, #8b5cf6));
    border-color: transparent;
    box-shadow: 0 2px 10px color-mix(in srgb, var(--neo-primary, #6366f1) 40%, transparent);
}
.profile-form .checkbox-label input[type="checkbox"]:checked::after,
.profile-availability-checkboxes input[type="checkbox"]:checked::after,
.profile-edit-privacy-toggle input[type="checkbox"]:checked::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}
/* Tema claro */
html[data-mode="light"] .profile-form .checkbox-label input[type="checkbox"],
html[data-mode="light"] .profile-availability-checkboxes input[type="checkbox"],
html[data-mode="light"] .profile-edit-privacy-toggle input[type="checkbox"] {
    border-color: rgba(0, 0, 0, 0.2);
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
html[data-mode="light"] .profile-form .checkbox-label input[type="checkbox"]:hover,
html[data-mode="light"] .profile-availability-checkboxes input[type="checkbox"]:hover,
html[data-mode="light"] .profile-edit-privacy-toggle input[type="checkbox"]:hover {
    border-color: color-mix(in srgb, var(--neo-primary, #6366f1) 40%, rgba(0,0,0,.2));
}
html[data-mode="light"] .profile-form .checkbox-label input[type="checkbox"]:checked,
html[data-mode="light"] .profile-availability-checkboxes input[type="checkbox"]:checked,
html[data-mode="light"] .profile-edit-privacy-toggle input[type="checkbox"]:checked {
    background: linear-gradient(135deg, var(--neo-primary, #6366f1), #7c3aed);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--neo-primary, #6366f1) 35%, transparent);
}
html[data-mode="light"] .profile-form .checkbox-label input[type="checkbox"]:checked::after,
html[data-mode="light"] .profile-availability-checkboxes input[type="checkbox"]:checked::after,
html[data-mode="light"] .profile-edit-privacy-toggle input[type="checkbox"]:checked::after {
    border-color: #fff;
}

.profile-availability-section {
    margin-top: 1rem;
}
.profile-availability-section .form-group {
    margin-bottom: 0.75rem;
}
.profile-availability-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
}
.profile-availability-checkboxes .checkbox-label {
    margin: 0;
    padding: 0.35rem 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--neo-border);
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
}
.profile-availability-checkboxes .checkbox-label:has(input:checked) {
    border-color: var(--neo-primary);
    background: var(--neo-primary-alpha, rgba(99, 102, 241, 0.15));
}
.profile-availability-now-wrap {
    margin-top: 0.5rem;
}

/* Pestaña Disponibilidad en Editar perfil (decorada) */
.profile-edit-panel-availability .profile-form-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.profile-availability-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--neo-primary-alpha, rgba(99, 102, 241, 0.2)) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: var(--neo-primary, #6366f1);
}
.profile-availability-panel-desc {
    font-size: 0.9rem;
    color: var(--neo-muted);
    margin-bottom: 1.25rem;
    line-height: 1.4;
}
.profile-availability-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}
.profile-availability-card {
    background: var(--neo-surface-2, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--neo-border, rgba(255, 255, 255, 0.08));
    border-radius: 12px;
    padding: 1rem 1.1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.profile-availability-card:hover {
    border-color: var(--neo-border-hover, rgba(255, 255, 255, 0.12));
}
.profile-availability-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--neo-text);
    margin-bottom: 0.65rem;
}
.profile-availability-card-header i {
    color: var(--neo-primary, #6366f1);
    opacity: 0.9;
    font-size: 1rem;
}
.profile-availability-card .form-input {
    width: 100%;
    margin-top: 0;
}
.profile-availability-card .profile-availability-checkboxes {
    margin-top: 0.25rem;
}

/* Selects en disponibilidad: texto visible y flecha legible */
.profile-availability-select {
    min-width: 0;
    padding-right: 2rem;
    background-color: var(--neo-bg);
    color: var(--neo-text);
    border: 1px solid var(--neo-border);
    border-radius: 10px;
    font-size: 0.95rem;
    appearance: auto;
    -webkit-appearance: menulist;
    cursor: pointer;
}
.profile-availability-select option {
    background: var(--neo-bg);
    color: var(--neo-text);
}

/* Card opciones: Ver + Disponible ahora en una sola fila compacta */
.profile-availability-card-options {
    grid-column: 1 / -1;
}
.profile-availability-card-options-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
}
.profile-availability-privacy-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.profile-availability-privacy-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--neo-text);
    white-space: nowrap;
    cursor: default;
}
.profile-availability-privacy-label i {
    color: var(--neo-primary, #6366f1);
    opacity: 0.9;
}
.profile-availability-privacy-select {
    width: auto;
    min-width: 10rem;
    max-width: 100%;
}
.profile-availability-now-wrap {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}
.profile-availability-now-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}
.profile-availability-now-label i {
    color: var(--neo-primary, #6366f1);
}

@media (min-width: 520px) {
    .profile-availability-cards {
        grid-template-columns: 1fr 1fr;
    }
    .profile-availability-card-timezone {
        grid-column: span 2;
        max-width: 320px;
    }
    .profile-availability-card-slots {
        grid-column: span 2;
    }
    .profile-availability-card-options {
        grid-column: span 2;
    }
}
@media (min-width: 720px) {
    .profile-availability-cards {
        grid-template-columns: 1fr 1fr;
    }
    .profile-availability-card-timezone {
        grid-column: span 1;
        max-width: none;
    }
    .profile-availability-card-slots {
        grid-column: span 1;
    }
    .profile-availability-card-options {
        grid-column: span 2;
    }
}

.profile-edit-username-readonly {
    margin: 0;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    color: var(--neo-muted);
    background: var(--neo-bg);
    border: 1px solid var(--neo-border);
    border-radius: 10px;
    font-family: inherit;
}
.profile-file-input {
    padding: 0.35rem 0;
}
.profile-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--neo-border);
}

/* Fila URL + botones predeterminados */
.profile-edit-url-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.profile-default-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.profile-default-btns .btn { flex-shrink: 0; }

/* Modal galería de avatares/banners predeterminados */
.profile-defaults-modal .profile-modal-card {
    max-width: 520px;
    width: 92vw;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.25rem 1rem;
}
.profile-defaults-modal .profile-modal-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    flex-shrink: 0;
}
.profile-defaults-hint {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--neo-muted);
    flex-shrink: 0;
}
.profile-defaults-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    max-height:  min(50vh, 380px);
    margin-bottom: 1rem;
    padding: 2px;
    -webkit-overflow-scrolling: touch;
}
/* Banners: 2 columnas y altura mínima para que se vean bien */
.profile-defaults-modal[data-mode="banner"] .profile-defaults-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.profile-defaults-grid-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--neo-border);
    background: var(--neo-surface-2);
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}
.profile-defaults-modal .profile-defaults-grid-item {
    aspect-ratio: 1;
}
.profile-defaults-modal[data-mode="banner"] .profile-defaults-grid-item {
    aspect-ratio: 600/160;
    min-height: 64px;
}
.profile-defaults-grid-item:hover {
    border-color: var(--neo-primary, #6366f1);
}
.profile-defaults-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-defaults-modal .profile-modal-actions {
    justify-content: space-between;
    flex-shrink: 0;
    margin-bottom: 0;
    padding-top: 0.5rem;
}

/* Modal Ver email (hCaptcha) – interfaz clara y ordenada */
.profile-modal-reveal-email .profile-modal-card-reveal-email {
    max-width: 420px;
    padding: 0;
    overflow: hidden;
}
.profile-modal-reveal-email-header {
    padding: 1.5rem 1.5rem 0.5rem;
    text-align: center;
}
.profile-modal-reveal-email-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--neo-text);
    letter-spacing: -0.02em;
    line-height: 1.3;
}
.profile-modal-reveal-email-hint {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--neo-muted);
    max-width: 32ch;
    margin-left: auto;
    margin-right: auto;
}
.profile-modal-reveal-email-body {
    padding: 1.25rem 1.5rem;
}
.profile-modal-reveal-email-captcha-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 78px;
    padding: 1rem;
    background: var(--neo-bg, rgba(0,0,0,0.2));
    border: 1px solid var(--neo-border);
    border-radius: 12px;
    margin-bottom: 1rem;
}
.profile-modal-reveal-email-captcha-wrap .reveal-email-captcha,
.profile-modal-reveal-email-captcha-wrap iframe {
    max-width: 100%;
}
.profile-modal-reveal-email-result {
    padding: 1rem 1.25rem;
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    border-radius: 12px;
    border: 1px solid var(--neo-border);
    text-align: center;
}
.profile-modal-reveal-email-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--neo-muted);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.profile-modal-reveal-email-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--neo-primary, #6366f1);
    text-decoration: none;
    word-break: break-all;
}
.profile-modal-reveal-email-value:hover {
    text-decoration: underline;
}
.profile-modal-reveal-email-actions {
    padding: 1rem 1.5rem 1.5rem;
    margin-top: 0;
    border-top: 1px solid var(--neo-border);
    background: var(--neo-surface-2, rgba(255,255,255,0.02));
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Modal Reportar usuario */
.profile-modal-report .profile-modal-card {
    max-width: 440px;
}
.profile-modal-report-hint {
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--neo-muted);
}
.profile-modal-report .profile-form {
    padding: 0;
}
.profile-modal-report .profile-modal-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--neo-border);
}

/* Redes y enlaces: bloqueo 30 días */
.profile-form-section-social {
    margin-top: 1.25rem;
}
.profile-form-section-social .profile-social-links-locked {
    margin-bottom: 1rem;
}
.profile-social-links-locked {
    padding: 1rem 1.25rem;
    background: var(--neo-surface-2, rgba(255,255,255,0.06));
    border: 1px solid var(--neo-border);
    border-radius: 12px;
    margin-bottom: 0;
}
.profile-social-fields .profile-social-field label i {
    font-size: 0.8rem;
    margin-right: 0.4rem;
    color: var(--neo-primary);
    width: 1em;
    text-align: center;
}
.profile-social-fields .profile-social-field {
    margin-bottom: 0.75rem;
}
.profile-social-fields .profile-social-field:last-child {
    margin-bottom: 0;
}
.profile-social-lock-msg {
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: var(--neo-text);
}
.profile-social-lock_sub,
.profile-social-lock_thanks {
    margin: 0 0 0.35rem;
    font-size: 0.9rem;
    color: var(--neo-muted);
}
.profile-social-lock_thanks {
    margin-bottom: 0;
}
.profile-social-hint {
    margin-bottom: 1rem;
}
.profile-social-links-edit .form-group label i {
    margin-right: 0.35rem;
    color: var(--neo-primary);
}

/* Enlaces sociales en la vista del perfil */
.profile-social-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.profile-social-links:empty {
    display: none;
}
.profile-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--neo-surface-2, rgba(255,255,255,0.06));
    border: 1px solid var(--neo-border);
    color: var(--neo-muted);
    text-decoration: none;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.profile-social-links a:hover {
    color: var(--neo-primary);
    background: var(--neo-bg);
    border-color: var(--neo-primary);
}
.profile-social-links a i {
    font-size: 1.1rem;
}
.profile-social-links a[href*="youtube"] i { color: #ff0000; }
.profile-social-links a[href*="discord"] i { color: #5865f2; }
.profile-social-links a[href*="twitter"] i,
.profile-social-links a[href*="x.com"] i { color: #1da1f2; }
.profile-social-links a[href*="facebook"] i { color: #1877f2; }

.profile-public-url-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin: 0.75rem 0;
    padding: 0.75rem 1rem;
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    border-radius: 12px;
    border: 1px solid var(--neo-border);
    font-size: 0.9rem;
}
.profile-public-url-label {
    color: var(--neo-muted);
}
.profile-public-url-path {
    font-family: ui-monospace, monospace;
    font-size: 0.9rem;
    color: var(--neo-primary);
    background: var(--neo-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--neo-border);
}
/* Menú de perfil (solo visible para el propio usuario) */
.profile-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 0.75rem 0;
    border-top: 1px solid var(--neo-border);
    border-bottom: 1px solid var(--neo-border);
}
.profile-menu-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    background: var(--neo-surface-2);
    border: 1px solid var(--neo-border);
    color: var(--neo-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s, border-color 0.15s;
}
.profile-menu-item:hover {
    background: var(--neo-bg);
    border-color: var(--neo-primary);
    color: var(--neo-primary);
}
.profile-menu-item i {
    color: var(--neo-primary);
    width: 1em;
}
/* Sección Estadísticas (resto de contadores) */
.profile-stats-section {
    margin-top: 0.35rem;
    padding: 1rem 1.25rem;
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    border-radius: 14px;
    border: 1px solid var(--neo-border);
}
.profile-stats-section .profile-section-title {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--neo-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.profile-counters-rest {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* —— Logros / Badges: destacados (máx. 3) y pestaña Logros —— */
.profile-achievements-top-section {
    margin-top: 0.35rem;
    padding: 1rem 1.25rem;
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    border-radius: 14px;
    border: 1px solid var(--neo-border);
}
.profile-achievements-top-section .profile-section-title {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: var(--neo-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.profile-achievements-top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: center;
}
.profile-achievement-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.profile-achievement-top {
    padding: 0.4rem 0.65rem;
    background: var(--neo-surface, rgba(255,255,255,0.05));
    border: 1px solid var(--neo-border);
    border-radius: 12px;
    transition: transform 0.15s, box-shadow 0.15s;
}
.profile-achievement-top:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}
.profile-achievement-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.2) 100%);
    color: var(--neo-primary, #6366f1);
    font-size: 1rem;
}
.profile-achievement-icon-img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
    border-radius: 10px;
}
.profile-achievement-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--neo-text);
}
.profile-tab-logros .profile-achievements-section {
    padding: 1rem 0;
}
.profile-tab-logros .profile-section-title {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--neo-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.profile-achievements-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.profile-achievement-list-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    border: 1px solid var(--neo-border);
    border-radius: 14px;
}
.profile-achievement-list-item .profile-achievement-icon,
.profile-achievement-list-item .profile-achievement-icon-img {
    flex-shrink: 0;
}
.profile-achievement-list-item .profile-achievement-icon-img {
    width: 2.5rem;
    height: 2.5rem;
}
.profile-achievement-list-item .profile-achievement-icon {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.15rem;
}
.profile-achievement-list-body {
    flex: 1;
    min-width: 0;
}
.profile-achievement-list-body .profile-achievement-name {
    display: block;
    margin-bottom: 0.25rem;
}
.profile-achievement-desc {
    margin: 0;
    font-size: 0.875rem;
    color: var(--neo-muted);
    line-height: 1.45;
}
.profile-achievements-empty {
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--neo-muted);
    font-size: 0.95rem;
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    border: 1px dashed var(--neo-border);
    border-radius: 14px;
}

/* Wallet: barra de balance en el header del perfil (RedCoins, RedTokens, Mensajes) */
.profile-wallet-bar {
    margin-top: 0.75rem;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}
.profile-wallet-bar-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.06) 50%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 999px;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.profile-wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--neo-text);
    background: var(--neo-surface, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--neo-border);
}
.profile-wallet-pill i {
    font-size: 0.9em;
    opacity: 0.95;
}
.profile-wallet-pill-coins i { color: #f59e0b; }
.profile-wallet-pill-tokens i { color: #ef4444; }
.profile-wallet-pill-credits i { color: #10b981; }
.profile-wallet-value {
    font-variant-numeric: tabular-nums;
}
.profile-wallet-label {
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--neo-muted);
}
.profile-stat-item.profile-stat-credits .profile-stat-icon { color: #10b981; background: rgba(16, 185, 129, 0.15); }

/* —— Personaje principal: panel destacado (spotlight) —— */
.profile-signature-section {
    margin-top: 1.25rem;
    width: 100%;
}
.profile-spotlight-inner {
    border-radius: 16px;
    background: linear-gradient(145deg, var(--neo-surface-2, rgba(255,255,255,0.05)) 0%, var(--neo-surface, rgba(255,255,255,0.03)) 100%);
    border: 1px solid var(--neo-border, rgba(255,255,255,0.08));
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}
.profile-spotlight-inner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    background: linear-gradient(180deg, var(--neo-primary, #6366f1), color-mix(in srgb, var(--neo-primary, #6366f1) 60%, transparent));
    opacity: 0.9;
}
.profile-spotlight-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-left: 0.25rem;
}
.profile-spotlight-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--neo-primary, #6366f1) 18%, transparent);
    color: var(--neo-primary, #6366f1);
    font-size: 0.8rem;
}
.profile-spotlight-title {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--neo-text);
}
.profile-spotlight-change {
    margin-left: auto;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--neo-primary, #6366f1);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
.profile-spotlight-change:hover {
    background: color-mix(in srgb, var(--neo-primary, #6366f1) 15%, transparent);
    color: var(--neo-text);
}
.profile-signature-card-wrap {
    margin-bottom: 0;
}
/* Card del personaje dentro del spotlight */
.profile-signature-section.characters-page .profile-signature-grid.characters-grid {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 0;
    max-width: 100%;
}
.profile-signature-section .character-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 200px;
    border-radius: 12px;
    border: 1px solid var(--neo-border);
    overflow: hidden;
    background: var(--neo-surface);
}
.profile-signature-section .character-card .character-image {
    width: 280px;
    min-width: 280px;
    height: auto;
    min-height: 200px;
    flex-shrink: 0;
}
.profile-signature-section .character-card .character-image img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
}
.profile-signature-section .character-card .character-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1rem 1.25rem;
}
.profile-signature-section .character-card .title-row {
    margin-bottom: 0.35rem;
}
.profile-signature-section .character-card .cc-desc {
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.profile-signature-section .character-card .chip-section {
    margin-top: auto;
}
@media (max-width: 639px) {
    .profile-spotlight-inner {
        padding: 1rem;
    }
    .profile-spotlight-header {
        margin-bottom: 0.75rem;
    }
    .profile-signature-section .character-card {
        flex-direction: column;
        min-height: 0;
    }
    .profile-signature-section .character-card .character-image {
        width: 100%;
        min-width: 0;
        height: 180px;
        min-height: 180px;
    }
    .profile-signature-section .character-card .character-image img {
        min-height: 180px;
    }
    .profile-signature-section .character-card .character-content {
        padding: 8px 10px;
    }
}

/* Badges: lista de personajes (grid) — solo logros, compacto */
.profile-char-card .profile-char-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 6px;
    margin: 0;
    padding: 0.4rem 0 0;
    max-width: 100%;
    min-height: 0;
}
.profile-char-card .profile-char-badges .chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    padding: 0 6px;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    border-radius: 6px;
    white-space: nowrap;
    border: 1px solid transparent;
}
.profile-char-card .profile-char-badges .chip.chip-nsfw { background: rgba(239, 68, 68, 0.25); border-color: rgba(239, 68, 68, 0.5); color: #fff; }
.profile-char-card .profile-char-badges .chip.chip-visibility { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.15); color: var(--neo-muted, #94a3b8); }
.profile-char-card .profile-char-badges .chip.chip-unique { background: rgba(34, 211, 238, 0.2); border-color: rgba(34, 211, 238, 0.45); color: #0e7490; }
html[data-mode="dark"] .profile-char-card .profile-char-badges .chip.chip-unique { color: #a5f3fc; }
.profile-char-card .profile-char-badges .chip.chip-featured { background: rgba(124, 58, 237, 0.2); border-color: rgba(124, 58, 237, 0.45); color: var(--neo-text, #fff); }
.profile-char-card .profile-char-badges .chip.chip-pinned { background: rgba(59, 130, 246, 0.2); border-color: rgba(59, 130, 246, 0.45); color: var(--neo-text, #fff); }
.profile-char-card .profile-char-badges .chip.chip-seal { background: linear-gradient(135deg, rgba(124, 58, 237, 0.3), rgba(236, 72, 153, 0.25)); border-color: rgba(124, 58, 237, 0.5); color: var(--neo-text, #fff); font-weight: 600; font-size: 9px; }

.profile-char-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    padding: 0.25rem 0 0;
    font-size: 0.75rem;
    color: var(--neo-muted);
}
.profile-char-stats .profile-char-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}
.profile-char-stats .profile-char-stat i {
    width: 1em;
    opacity: 0.8;
}
/* Placeholder: slot vacío del personaje principal */
.profile-signature-placeholder {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    border: 2px dashed var(--neo-border);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.profile-signature-placeholder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--neo-primary, #6366f1) 12%, transparent);
    color: var(--neo-primary, #6366f1);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}
.profile-signature-placeholder-msg {
    margin: 0;
    color: var(--neo-text);
    font-size: 1rem;
    font-weight: 500;
}
.profile-signature-placeholder-hint {
    margin: 0;
    color: var(--neo-muted);
    font-size: 0.875rem;
}
.profile-signature-choose-btn {
    display: inline-flex;
    margin-top: 0.5rem;
}

/* Modal elegir personaje principal */
.profile-signature-modal .profile-modal-card {
    max-width: 420px;
}
.profile-signature-pick-wrap {
    padding: 0 1.25rem 1.25rem;
}
.profile-signature-pick-hint {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    color: var(--neo-muted);
}
.profile-signature-pick-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 1rem;
}
.profile-signature-pick-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.6rem 0.75rem;
    text-align: left;
    border: 1px solid var(--neo-border);
    border-radius: 12px;
    background: var(--neo-surface-2, rgba(255, 255, 255, 0.04));
    color: var(--neo-text);
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.profile-signature-pick-item:hover {
    background: var(--neo-surface, rgba(255, 255, 255, 0.06));
}
.profile-signature-pick-item.selected {
    border-color: var(--neo-primary, #6366f1);
    background: rgba(99, 102, 241, 0.1);
}
.profile-signature-pick-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--neo-bg);
    background-size: cover;
    background-position: center;
}
.profile-signature-pick-avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neo-muted);
}
.profile-signature-pick-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-signature-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Botón Ver todo / Ver menos en estadísticas */
.profile-section-toggle {
    font-size: 0.85rem;
    color: var(--neo-primary, #6366f1);
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.profile-section-toggle:hover {
    text-decoration: underline;
}
.profile-section-toggle-less {
    margin-top: 0.5rem;
    display: inline-block;
}
.profile-stats-extra {
    margin-top: 0.75rem;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1rem;
}
/* Grid de estadísticas: 2 columnas, iconos grandes y coloridos */
.profile-counters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1rem;
}
@media (min-width: 768px) {
    .profile-counters-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 1024px) {
    .profile-counters-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.profile-stat-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    border-radius: 12px;
    border: 1px solid var(--neo-border);
}
.profile-stat-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    color: var(--neo-muted);
    background: var(--neo-bg, rgba(0,0,0,0.2));
}
.profile-stat-item.profile-stat-coins .profile-stat-icon { color: #f59e0b; background: rgba(245, 158, 11, 0.15); }
.profile-stat-item.profile-stat-tokens .profile-stat-icon.profile-stat-icon-token { color: #ef4444; background: rgba(239, 68, 68, 0.15); }
.profile-stat-item.profile-stat-chats .profile-stat-icon { color: var(--neo-primary, #6366f1); background: rgba(99, 102, 241, 0.15); }
.profile-stat-item.profile-stat-characters .profile-stat-icon { color: #8b5cf6; background: rgba(139, 92, 246, 0.15); }
.profile-stat-num {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--neo-text);
}
.profile-stat-label {
    font-size: 0.8rem;
    color: var(--neo-muted);
    margin-left: auto;
}
.profile-stat-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}
.profile-stat-link:hover .profile-stat-num { color: var(--neo-primary); }
.profile-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
/* Título Personajes: texto y número juntos (no space-between) */
.profile-characters-preview .profile-section-title-row {
    justify-content: flex-start;
    gap: 0.35rem;
}
.profile-characters-preview .profile-characters-count {
    font-weight: 400;
    color: var(--neo-muted);
}
.profile-section-see-all {
    font-size: 0.85rem;
    color: var(--neo-primary, #6366f1);
    text-decoration: none;
    font-weight: 500;
}
.profile-section-see-all:hover {
    text-decoration: underline;
}
/* Actividad reciente (pegada a wallet/stats, sin hueco grande) */
.profile-activity-section {
    margin-top: 0.35rem;
    padding: 1rem 1.25rem;
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    border-radius: 14px;
    border: 1px solid var(--neo-border);
    align-self: start;
}
.profile-activity-section .profile-section-title-row {
    margin-bottom: 0.75rem;
}
.profile-activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.profile-activity-item {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--neo-border);
    font-size: 0.9rem;
    color: var(--neo-text);
}
.profile-activity-item:last-child {
    border-bottom: none;
}
.profile-activity-item.profile-activity-empty {
    color: var(--neo-muted, #9aa6bf);
    font-style: italic;
    border-bottom: none;
}
.profile-activity-time {
    color: var(--neo-muted);
    font-size: 0.8rem;
    margin-left: 0.35rem;
}
/* Personajes: empty state y CTA */
.profile-characters-empty {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    border: 1px dashed var(--neo-border);
}
.profile-characters-empty-msg {
    margin: 0 0 1rem;
    color: var(--neo-muted);
    font-size: 0.95rem;
}
.profile-characters-cta {
    display: inline-flex;
}
.profile-characters-view-all {
    display: inline-flex;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}
/* Grid personajes: 3 columnas cuando hay 1-3 (desktop), 1 en móvil */
.profile-characters-grid.profile-characters-grid-small {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 640px) {
    .profile-counters-grid,
    .profile-stats-extra {
        grid-template-columns: 1fr;
    }
    .profile-characters-grid.profile-characters-grid-small {
        grid-template-columns: 1fr;
    }
}
.profile-bio-wrap {
    margin-top: 0.5rem;
}
.profile-bio-section {
    margin-top: 0.5rem;
    padding: 1rem 1.25rem;
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    border-radius: 14px;
    border: 1px solid var(--neo-border);
    align-self: start;
}
.profile-bio-section .profile-bio-wrap {
    margin-top: 0.5rem;
}
.profile-member-since {
    margin-top: 0.5rem;
    margin-bottom: 0;
}
.profile-member-since {
    color: var(--neo-muted, #94a3b8);
}
.profile-member-since .profile-status-inline {
    font-weight: 600;
}
.profile-member-since .profile-status-inline--online {
    color: #4ade80 !important;
}
.profile-member-since .profile-status-inline--dnd {
    color: #f87171 !important;
}
.profile-member-since .profile-status-inline--away {
    color: #fb923c !important;
}
.profile-member-since .profile-status-inline--offline {
    color: #cbd5e1 !important;
}
html[data-theme="light"] .profile-member-since .profile-status-inline--online,
.theme-light .profile-member-since .profile-status-inline--online {
    color: #15803d !important;
}
html[data-theme="light"] .profile-member-since .profile-status-inline--offline,
.theme-light .profile-member-since .profile-status-inline--offline {
    color: #475569 !important;
}
.profile-member-since .profile-status-inline:empty {
    display: none;
}
.profile-email-wrap {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}
.profile-email-label {
    font-weight: 600;
    color: var(--neo-text);
}
.profile-email-value {
    color: var(--neo-primary, #6366f1);
    text-decoration: none;
}
.profile-email-value:hover {
    text-decoration: underline;
}
.profile-characters-preview {
    margin-top: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--neo-border);
    padding: 1.25rem 1rem;
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    border-radius: 14px;
    border: 1px solid var(--neo-border);
}
.profile-characters-preview .profile-section-title {
    margin-bottom: 1rem;
}
/* Grid y cards de personajes: idénticos al explorador vía .characters-page + .characters-grid (characters.css) */
.profile-characters-preview.characters-page .characters-grid {
    margin-bottom: 1rem;
}

/* Personajes | Minds (perfil — Inicio) */
.profile-creations-wrap {
    margin-top: 1rem;
    padding: 1.25rem 1rem;
    background: var(--neo-surface-2, rgba(255, 255, 255, 0.04));
    border-radius: 14px;
    border: 1px solid var(--neo-border);
}
.profile-creations-switch {
    margin-bottom: 1rem;
}
.profile-creations-switch .explorer-tab {
    cursor: pointer;
    font: inherit;
    background: none;
    border: none;
    padding: 0.25rem 0.35rem;
}
.profile-creations-panel-minds .profile-minds-panel-desc {
    margin: 0.5rem 0 1rem;
    line-height: 1.55;
    color: color-mix(in srgb, var(--neo-text) 90%, transparent);
}
.profile-creations-panel-minds .profile-minds-panel-actions {
    margin-bottom: 0.75rem;
}
.profile-creations-panel-minds .profile-minds-panel-note {
    font-size: 0.88rem;
    margin: 0;
}

/* Teaser Minds (perfil — Inicio) */
.profile-minds-teaser {
    margin-top: 1rem;
    padding: 1.35rem 1.25rem;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--neo-primary, #6366f1) 28%, var(--neo-border));
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--neo-primary, #6366f1) 12%, transparent) 0%,
        var(--neo-surface-2, rgba(255, 255, 255, 0.04)) 48%,
        color-mix(in srgb, var(--neo-accent, #a855f7) 10%, transparent) 100%
    );
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}
.profile-minds-teaser-inner {
    display: flex;
    align-items: stretch;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.profile-minds-teaser-visual {
    position: relative;
    flex: 0 0 auto;
    width: 88px;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-minds-teaser-orbit {
    position: absolute;
    inset: 6px;
    border-radius: 22px;
    border: 2px dashed color-mix(in srgb, var(--neo-primary, #6366f1) 45%, transparent);
    opacity: 0.85;
    animation: profile-minds-orbit-spin 22s linear infinite;
}
@keyframes profile-minds-orbit-spin {
    to {
        transform: rotate(360deg);
    }
}
.profile-minds-teaser-icon-wrap {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    color: var(--neo-text);
    background: linear-gradient(145deg, color-mix(in srgb, var(--neo-primary, #6366f1) 35%, transparent), rgba(0, 0, 0, 0.35));
    border: 1px solid color-mix(in srgb, var(--neo-primary, #6366f1) 40%, transparent);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.profile-minds-teaser-body {
    flex: 1 1 220px;
    min-width: 0;
}
.profile-minds-teaser-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--neo-muted, #94a3b8);
}
.profile-minds-teaser-title {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--neo-text);
}
.profile-minds-teaser-desc {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: color-mix(in srgb, var(--neo-text) 88%, transparent);
    max-width: 42rem;
}
.profile-minds-teaser-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
}
.profile-minds-teaser-link.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 12px;
}
.profile-minds-teaser-link.btn i {
    font-size: 0.85em;
    opacity: 0.9;
}
.profile-minds-teaser-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--neo-text);
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
html[data-mode="light"] .profile-minds-teaser-badge {
    background: color-mix(in srgb, var(--neo-surface) 90%, var(--neo-primary) 8%);
    border-color: color-mix(in srgb, var(--neo-primary) 22%, transparent);
}
@media (max-width: 640px) {
    .profile-minds-teaser {
        padding: 1.1rem 1rem;
    }
    .profile-minds-teaser-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .profile-minds-teaser-visual {
        width: 100%;
        min-height: 72px;
    }
}

.profile-characters-more {
    display: inline-flex;
}
.profile-form .form-hint {
    font-size: 0.8rem;
    color: var(--neo-muted);
    margin-top: 0.25rem;
}

.profile-actions-other {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Móvil */
@media (max-width: 640px) {
    .profile-banner {
        height: 180px;
    }
    .profile-card {
        margin-top: -40px;
        padding: 1rem;
        padding-top: 3.25rem;
    }
    .profile-header-row {
        margin-top: -56px;
        gap: 0.75rem;
    }
    .profile-avatar {
        width: 88px;
        height: 88px;
        border-width: 3px;
        font-size: 1.5rem;
    }
    .profile-display-name {
        font-size: 1.25rem;
    }
    .profile-header-actions {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }
    .profile-actions-own,
    .profile-actions-other {
        width: 100%;
    }
    .profile-actions-dropdown {
        min-width: 180px;
        right: 0;
        left: auto;
    }
    .profile-bio-section,
    .profile-stats-section {
        padding: 0.75rem 0;
    }
    .profile-characters-preview {
        padding: 1rem 0.75rem;
    }
}

/* —— Pestañas perfil (Inicio / Shoutbox) —— */
.profile-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 1rem;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--neo-border);
}
.profile-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--neo-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.profile-tab:hover {
    color: var(--neo-text);
}
.profile-tab.active {
    color: var(--neo-primary);
    border-bottom-color: var(--neo-primary);
}
.profile-tab i {
    font-size: 1rem;
}
@media (max-width: 640px) {
    .profile-tabs {
        padding: 0 1rem;
    }
    .profile-tab span {
        display: none;
    }
    .profile-tab i {
        margin: 0;
    }
}

/* —— Shoutbox —— */
.profile-tab-preferencias {
    padding: 1rem 1.5rem 1.5rem;
}
.profile-preferences-terms-notice {
    font-size: 0.8rem;
    color: var(--neo-muted);
    margin: 0 0 1rem;
    line-height: 1.45;
}
.profile-preferences-terms-notice a {
    color: var(--neo-primary, #6366f1);
    text-decoration: underline;
}
.profile-preferences-empty {
    font-size: 0.9rem;
    color: var(--neo-muted);
    font-style: italic;
}

.profile-tab-shoutbox {
    padding: 1rem 1.5rem 1.5rem;
}
.profile-shoutbox-desc {
    font-size: 0.875rem;
    color: var(--neo-muted);
    margin: 0 0 1rem;
    line-height: 1.45;
}
.profile-shoutbox-owner-actions {
    margin-bottom: 1.5rem;
}
.profile-shoutbox-toolbar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.profile-shoutbox-toolbar-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: var(--neo-surface-2);
    color: var(--neo-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.profile-shoutbox-toolbar-btn:hover {
    background: var(--neo-border);
    color: var(--neo-text);
}
.profile-shoutbox-toolbar-dropdown {
    position: relative;
}
.profile-shoutbox-special-chars {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--neo-surface-2);
    border: 1px solid var(--neo-border);
    border-radius: 10px;
    padding: 0.5rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    z-index: 20;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.profile-shoutbox-special-chars[aria-hidden="true"] {
    display: none;
}
.profile-shoutbox-special-btn {
    padding: 0.4rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--neo-text);
    font-size: 1.1rem;
    cursor: pointer;
}
.profile-shoutbox-special-btn:hover {
    background: var(--neo-border);
}
.profile-shoutbox-emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: var(--neo-surface-2);
    border: 1px solid var(--neo-border);
    border-radius: 10px;
}
.profile-shoutbox-emoji-picker[aria-hidden="true"] {
    display: none;
}
.profile-shoutbox-emoji-btn {
    padding: 0.35rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
}
.profile-shoutbox-emoji-btn:hover {
    background: var(--neo-border);
}
.profile-shoutbox-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}
.profile-shoutbox-media-preview {
    display: none;
    margin-bottom: 0.5rem;
}
.profile-shoutbox-media-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.profile-shoutbox-media-limit-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--neo-muted);
    margin-top: 0.25rem;
}
.profile-shoutbox-image-preview {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border: 1px solid var(--neo-border);
}
.profile-shoutbox-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-shoutbox-image-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.profile-shoutbox-image-remove:hover {
    background: rgba(0, 0, 0, 0.8);
}
.profile-shoutbox-image-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--neo-surface-2);
    color: var(--neo-muted);
    font-size: 0.875rem;
}
.profile-shoutbox-input {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--neo-border);
    background: var(--neo-surface-2);
    color: var(--neo-text);
    font-size: 0.9375rem;
    resize: vertical;
    margin-bottom: 0.5rem;
}
.profile-shoutbox-input:focus {
    outline: none;
    border-color: var(--neo-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--neo-primary) 25%, transparent);
}
.profile-shoutbox-count {
    display: block;
    font-size: 0.75rem;
    color: var(--neo-muted);
    margin-bottom: 0.5rem;
}
.profile-shoutbox-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.profile-shoutbox-item {
    background: var(--neo-surface-2);
    border: 1px solid var(--neo-border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.profile-shoutbox-item-reshout {
    border-left: 3px solid var(--neo-primary, #6366f1);
}
.profile-shoutbox-reshout-header {
    font-size: 0.85rem;
    color: var(--neo-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.profile-shoutbox-reshout-header .fa-repeat {
    color: var(--neo-primary, #6366f1);
}
.profile-shoutbox-reshout-origin-link {
    color: var(--neo-primary, #6366f1);
    font-weight: 600;
    text-decoration: none;
}
.profile-shoutbox-reshout-origin-link:hover {
    text-decoration: underline;
}
.profile-shoutbox-original-wrap {
    background: var(--neo-bg);
    border: 1px solid var(--neo-border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}
.profile-shoutbox-original-wrap .profile-shoutbox-item-body {
    margin-bottom: 0.5rem;
}
.profile-shoutbox-ver-original {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--neo-primary, #6366f1);
    margin-top: 0.5rem;
    text-decoration: none;
}
.profile-shoutbox-ver-original:hover {
    text-decoration: underline;
}
.profile-shoutbox-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.profile-shoutbox-item-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.profile-shoutbox-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--neo-border);
}
.profile-shoutbox-item-author {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--neo-text);
}
.profile-shoutbox-item-time {
    font-size: 0.8rem;
    color: var(--neo-muted);
}
.profile-shoutbox-item-menu-wrap {
    position: relative;
    margin-left: auto;
}
.profile-shoutbox-item-menu-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--neo-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.profile-shoutbox-item-menu-btn:hover {
    background: var(--neo-border);
    color: var(--neo-text);
}
.profile-shoutbox-item-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    min-width: 140px;
    background: var(--neo-surface-2);
    border: 1px solid var(--neo-border);
    border-radius: 10px;
    padding: 0.25rem;
    z-index: 15;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.profile-shoutbox-item-dropdown[aria-hidden="true"] {
    display: none;
}
.profile-shoutbox-item-menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--neo-text);
    font-size: 0.875rem;
    cursor: pointer;
    text-align: left;
}
.profile-shoutbox-item-menu-item:hover {
    background: var(--neo-border);
}
.profile-shoutbox-item-menu-item-danger:hover {
    color: var(--neo-danger, #ef4444);
    background: color-mix(in srgb, var(--neo-danger, #ef4444) 15%, transparent);
}
.profile-shoutbox-edit-wrap {
    margin: 0.25rem 0;
}
.profile-shoutbox-edit-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--neo-border);
    border-radius: 8px;
    background: var(--neo-bg);
    color: var(--neo-text);
    font-size: 0.9375rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 80px;
}
.profile-shoutbox-edit-input:focus {
    outline: none;
    border-color: var(--neo-primary, #6366f1);
}
.profile-shoutbox-edit-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
/* Adjuntar personaje: modal y preview */
.profile-shoutbox-attach-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.profile-shoutbox-attach-modal.show {
    display: flex;
}
.profile-shoutbox-attach-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}
.profile-shoutbox-attach-modal-inner {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    background: var(--neo-bg-elevated, var(--neo-bg));
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}
.profile-shoutbox-attach-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.profile-shoutbox-attach-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--neo-text);
}
.profile-shoutbox-attach-modal-close {
    background: none;
    border: none;
    color: var(--neo-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}
.profile-shoutbox-attach-modal-close:hover {
    color: var(--neo-text);
}
.profile-shoutbox-attach-hint {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    color: var(--neo-muted);
}
.profile-shoutbox-attach-search {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--neo-border);
    border-radius: 8px;
    background: var(--neo-bg);
    color: var(--neo-text);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
}
.profile-shoutbox-attach-search:focus {
    outline: none;
    border-color: var(--neo-primary, #6366f1);
}
.profile-shoutbox-attach-results {
    flex: 1;
    min-height: 120px;
    max-height: 280px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.profile-shoutbox-attach-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--neo-text);
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}
.profile-shoutbox-attach-result-item:hover {
    background: var(--neo-border);
}
.profile-shoutbox-attach-result-item img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}
.profile-shoutbox-attach-result-item .profile-shoutbox-attach-result-name {
    font-weight: 600;
    flex: 1;
    min-width: 0;
}
.profile-shoutbox-attach-result-tags {
    font-size: 0.8rem;
    color: var(--neo-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.profile-shoutbox-attach-empty,
.profile-shoutbox-attach-results:empty + .profile-shoutbox-attach-empty {
    font-size: 0.875rem;
    color: var(--neo-muted);
    padding: 0.5rem 0;
}
/* Modal confirmar eliminar post */
.profile-shoutbox-delete-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 101;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.profile-shoutbox-delete-modal.show {
    display: flex;
}
.profile-shoutbox-delete-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}
.profile-shoutbox-delete-modal-inner {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: var(--neo-bg-elevated, var(--neo-bg));
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    padding: 1.25rem;
}
.profile-shoutbox-delete-modal-inner h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: var(--neo-text);
}
.profile-shoutbox-delete-modal-text {
    margin: 0 0 1.25rem;
    font-size: 0.9375rem;
    color: var(--neo-muted);
    line-height: 1.45;
}
.profile-shoutbox-delete-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.profile-shoutbox-delete-modal-confirm.btn-danger {
    background: var(--neo-error, #dc2626);
    color: #fff;
    border: none;
}
.profile-shoutbox-delete-modal-confirm.btn-danger:hover {
    filter: brightness(1.1);
}
.profile-shoutbox-attachments-preview {
    margin-top: 0.5rem;
}
.profile-shoutbox-attachments-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.profile-shoutbox-attach-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 10px;
    border: 1px solid var(--neo-border);
    background: var(--neo-bg-elevated, color-mix(in srgb, var(--neo-primary, #6366f1) 8%, transparent));
    position: relative;
    max-width: 280px;
}
.profile-shoutbox-attach-card-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.profile-shoutbox-attach-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-shoutbox-attach-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.profile-shoutbox-attach-card-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--neo-text);
}
.profile-shoutbox-attach-card-tags {
    font-size: 0.75rem;
    color: var(--neo-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-shoutbox-attach-card-chat {
    font-size: 0.8rem;
    color: var(--neo-primary, #6366f1);
    text-decoration: none;
}
.profile-shoutbox-attach-card-chat:hover {
    text-decoration: underline;
}
.profile-shoutbox-attach-card-remove {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: var(--neo-border);
    color: var(--neo-muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-shoutbox-attach-card-remove:hover {
    background: var(--neo-danger, #ef4444);
    color: #fff;
}
.profile-shoutbox-item-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.profile-shoutbox-attach-card-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--neo-border);
    background: var(--neo-bg-elevated, color-mix(in srgb, var(--neo-primary, #6366f1) 6%, transparent));
    max-width: 280px;
}
.profile-shoutbox-attach-card-inline-image {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.profile-shoutbox-attach-card-inline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-shoutbox-attach-card-inline-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.profile-shoutbox-attach-card-inline-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--neo-text);
}
.profile-shoutbox-attach-card-inline-tags {
    font-size: 0.75rem;
    color: var(--neo-muted);
}
.profile-shoutbox-attach-card-inline-chat {
    font-size: 0.8rem;
    color: var(--neo-primary, #6366f1);
    text-decoration: none;
}
.profile-shoutbox-attach-card-inline-chat:hover {
    text-decoration: underline;
}
.profile-shoutbox-item-body {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--neo-text);
    white-space: pre-wrap;
    word-break: break-word;
}
.profile-shoutbox-item-body strong {
    font-weight: 700;
}
.profile-shoutbox-item-media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.profile-shoutbox-item-media .profile-shoutbox-item-image-wrap {
    margin-top: 0;
}
.profile-shoutbox-item-image-wrap {
    margin-top: 0.75rem;
    border-radius: 10px;
    overflow: hidden;
    max-width: 100%;
    border: 1px solid var(--neo-border);
}
.profile-shoutbox-item-media .profile-shoutbox-item-image-wrap:first-child {
    margin-top: 0;
}
.profile-shoutbox-item-image {
    max-width: 100%;
    height: auto;
    display: block;
    max-height: 400px;
    object-fit: contain;
}
.profile-shoutbox-reactions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.profile-shoutbox-reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0.35rem 0.5rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--neo-muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.profile-shoutbox-reaction-btn:hover {
    background: var(--neo-border);
    color: var(--neo-text);
}
.profile-shoutbox-reaction-btn-active {
    color: var(--neo-primary);
}
.profile-shoutbox-reaction-btn-active i {
    color: inherit;
}
.profile-shoutbox-reaction-count {
    font-size: 0.8rem;
    min-width: 1em;
}
.profile-shoutbox-item-actions {
    margin-top: 0.5rem;
}
.profile-shoutbox-comments {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--neo-border);
}
.profile-shoutbox-comments-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--neo-muted);
    margin-bottom: 0.5rem;
}
.profile-shoutbox-comment {
    font-size: 0.875rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--neo-border);
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.profile-shoutbox-comment:last-child {
    border-bottom: none;
}
.profile-shoutbox-comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.profile-shoutbox-comment-inner {
    min-width: 0;
}
.profile-shoutbox-comment-header {
    font-weight: 500;
    color: var(--neo-text);
    margin-bottom: 0.25rem;
}
.profile-shoutbox-comment-body {
    color: var(--neo-muted);
    line-height: 1.4;
}
.profile-shoutbox-item-body .mention-link,
.profile-shoutbox-comment-body .mention-link {
    color: var(--neo-primary, #6366f1);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    text-decoration: none;
    padding: 0 2px;
    border-radius: 4px;
    font-weight: 500;
}
.profile-shoutbox-item-body .mention-link:hover,
.profile-shoutbox-comment-body .mention-link:hover {
    color: var(--neo-primary, #818cf8);
    text-decoration: underline;
}
/* Menciones no validadas: texto que parece @user pero no es una mención real (sin enlace, estilo neutro) */
.profile-shoutbox-item-body .mention-unverified,
.profile-shoutbox-comment-body .mention-unverified {
    color: var(--neo-muted, #9aa6bf);
    cursor: default;
    text-decoration: none;
    font-weight: 500;
}
.mention-autocomplete-dropdown {
    position: fixed;
    z-index: 9999;
    background: var(--neo-surface-2, rgba(30, 30, 40, 0.98));
    border: 1px solid var(--neo-border, rgba(255,255,255,0.1));
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    max-height: 240px;
    overflow-y: auto;
    display: none;
}
.mention-autocomplete-dropdown.show {
    display: block;
}
.mention-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
}
.mention-autocomplete-item:hover {
    background: var(--neo-surface, rgba(255,255,255,0.06));
}
.mention-autocomplete-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.mention-autocomplete-name {
    font-weight: 500;
    color: var(--neo-text);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mention-autocomplete-username {
    font-size: 0.85rem;
    color: var(--neo-muted, #9aa6bf);
}
.mention-autocomplete-empty {
    padding: 12px;
    color: var(--neo-muted);
    font-size: 0.9rem;
}
.profile-shoutbox-comment-reply-btn {
    margin-left: 0.5rem;
    padding: 0 6px;
    font-size: 0.8rem;
    color: var(--neo-primary, #6366f1);
    background: none;
    border: none;
    cursor: pointer;
}
.profile-shoutbox-comment-reply-btn:hover {
    text-decoration: underline;
}
.profile-shoutbox-comment-form {
    margin-top: 0.75rem;
}
.profile-shoutbox-comment-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--neo-border);
    background: var(--neo-surface);
    color: var(--neo-text);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}
.profile-shoutbox-empty {
    text-align: center;
    padding: 2rem;
    color: var(--neo-muted);
    font-size: 0.9375rem;
}
.profile-shoutbox-load-more {
    margin-top: 1rem;
}

/* Modal emojis completo */
.profile-shoutbox-emoji-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
}
.profile-shoutbox-emoji-modal-backdrop[aria-hidden="true"] {
    display: none;
}
.profile-shoutbox-emoji-modal {
    position: fixed;
    inset: 10%;
    max-width: 420px;
    max-height: 70vh;
    margin: auto;
    background: var(--neo-surface-2);
    border: 1px solid var(--neo-border);
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
    z-index: 101;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.profile-shoutbox-emoji-modal[aria-hidden="true"] {
    display: none;
}
.profile-shoutbox-emoji-modal-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}
.profile-shoutbox-emoji-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--neo-border);
    flex-shrink: 0;
}
.profile-shoutbox-emoji-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--neo-text);
}
.profile-shoutbox-emoji-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--neo-muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}
.profile-shoutbox-emoji-modal-close:hover {
    background: var(--neo-border);
    color: var(--neo-text);
}
.profile-shoutbox-emoji-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--neo-border);
    flex-shrink: 0;
}
.profile-shoutbox-emoji-tab {
    padding: 0.4rem 0.75rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--neo-muted);
    font-size: 0.8125rem;
    cursor: pointer;
}
.profile-shoutbox-emoji-tab:hover {
    background: var(--neo-border);
    color: var(--neo-text);
}
.profile-shoutbox-emoji-tab.active {
    background: var(--neo-primary);
    color: #fff;
}
.profile-shoutbox-emoji-grid-wrap {
    flex: 1;
    overflow: auto;
    padding: 1rem;
}
.profile-shoutbox-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}
.profile-shoutbox-emoji-modal-btn {
    width: 100%;
    aspect-ratio: 1;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}
.profile-shoutbox-emoji-modal-btn:hover {
    background: var(--neo-border);
}

/* Badge propietario en comentarios */
.profile-shoutbox-comment-owner-badge {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--neo-primary);
    background: color-mix(in srgb, var(--neo-primary) 18%, transparent);
    border-radius: 4px;
}

.profile-shoutbox-item-body em {
    font-style: italic;
}
.profile-shoutbox-item-body del {
    text-decoration: line-through;
}

/* Modal Editar: pestañas */
.profile-edit-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--neo-border);
    padding-bottom: 0.5rem;
}
.profile-edit-tab {
    padding: 0.4rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--neo-muted);
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.9rem;
}
.profile-edit-tab:hover {
    color: var(--neo-text);
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
}
.profile-edit-tab.active {
    color: var(--neo-primary, #6366f1);
    font-weight: 500;
}
.profile-edit-panels .profile-edit-panel {
    display: none;
}
.profile-edit-panels .profile-edit-panel.active {
    display: block;
}
.profile-form-hint {
    font-size: 0.875rem;
    color: var(--neo-muted);
    margin-bottom: 1rem;
}
.profile-preferences-summary {
    font-size: 0.875rem;
    color: var(--neo-muted);
    margin-bottom: 0.75rem;
}
.profile-preferences-accordion {
    margin-bottom: 1rem;
}
.profile-preferences-accordion-item {
    border: 1px solid var(--neo-border);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}
.profile-preferences-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    border: none;
    width: 100%;
    text-align: left;
    font-size: 0.95rem;
    color: var(--neo-text);
}
.profile-preferences-accordion-header:hover {
    background: var(--neo-surface-2, rgba(255,255,255,0.08));
}
.profile-preferences-accordion-header .category-name { flex: 1; }
.profile-preferences-accordion-header .category-toggle { opacity: 0.7; }
.profile-preferences-accordion-body {
    padding: 0.75rem;
    display: none;
}
.profile-preferences-accordion-item.open .profile-preferences-accordion-body { display: block; }
.profile-preferences-search {
    width: 100%;
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--neo-border);
    font-size: 0.9rem;
}
.profile-preferences-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.profile-preferences-chip {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--neo-border);
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--neo-text);
}
.profile-preferences-chip:hover {
    border-color: var(--neo-primary, #6366f1);
    background: rgba(99, 102, 241, 0.1);
}
.profile-preferences-chip.selected {
    border-color: var(--neo-primary);
    background: rgba(99, 102, 241, 0.2);
    color: var(--neo-primary);
}
.profile-preferences-custom-block {
    margin-top: 0.75rem;
    position: relative;
}
.profile-preferences-premium-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--neo-muted);
    margin-bottom: 0.35rem;
}
.profile-preferences-custom-block.profile-preferences-custom-premium-disabled {
    opacity: 0.6;
    pointer-events: none;
}
.profile-preferences-custom-block.profile-preferences-custom-premium-disabled .profile-preferences-custom-wrap {
    filter: grayscale(0.2);
}
.profile-preferences-custom-wrap {
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-preferences-custom-form-wrap {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--surface-2, #f5f5f5);
    border-radius: 8px;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
}
.profile-preferences-custom-form-wrap label { margin: 0; white-space: nowrap; }
.profile-preferences-custom-form-wrap .form-input { min-width: 0; }
.profile-preferences-custom-form-wrap #profilePreferenceCustomName { grid-column: span 1; }
@media (max-width: 520px) {
    .profile-preferences-custom-form-wrap {
        grid-template-columns: 1fr;
    }
}
.profile-preferences-public-section {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: var(--neo-surface-2, rgba(255,255,255,0.04));
    border-radius: 14px;
    border: 1px solid var(--neo-border);
}
.profile-preferences-public .preference-category-block {
    margin-bottom: 0.75rem;
}
.profile-preferences-public .preference-category-block:last-child { margin-bottom: 0; }
.profile-preferences-public .preference-category-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--neo-muted);
    margin-bottom: 0.4rem;
}
.profile-preferences-public .preference-tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.profile-preferences-public .preference-tag-pill {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: var(--neo-surface-2);
    border: 1px solid var(--neo-border);
    color: var(--neo-text);
}
.profile-preferences-public .preference-tag-pill[data-color] {
    border-color: rgba(255,255,255,0.15);
}
.profile-edit-privacy-toggle {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    color: var(--neo-muted);
}
.profile-edit-privacy-toggle input { margin-right: 0.25rem; }

/* ========== MÓVIL: perfil, editar perfil, imágenes y textos ========== */
@media (max-width: 640px) {
    .profile-page .container {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }
    .profile-wrap {
        margin-top: 0.5rem;
    }
    .profile-banner {
        height: 160px;
        border-radius: 12px 12px 0 0;
    }
    .profile-card {
        margin-top: -36px;
        padding: 0.75rem 1rem;
        padding-top: 2.75rem;
        border-radius: 0 0 12px 12px;
    }
    .profile-header-row {
        margin-top: -44px;
        gap: 0.5rem;
    }
    .profile-avatar {
        width: 80px;
        height: 80px;
        border-width: 2px;
        font-size: 1.35rem;
    }
    .profile-display-name {
        font-size: 1.15rem;
        line-height: 1.3;
        word-break: break-word;
    }
    .profile-username,
    .profile-nickname {
        font-size: 0.875rem;
    }
    .profile-header-actions {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }
    .profile-edit-btn,
    .profile-follow-btn,
    .profile-unfollow-btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    .profile-actions-trigger {
        min-height: 44px;
        min-width: 44px;
        padding: 0.5rem 0.75rem;
    }
    .profile-bio {
        font-size: 0.9375rem;
        line-height: 1.5;
        margin: 0.35rem 0;
        word-break: break-word;
    }
    .profile-section-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    .profile-bio-section,
    .profile-activity-section,
    .profile-stats-section {
        padding: 0.5rem 0;
    }
    .profile-counters-grid {
        gap: 0.5rem 0.75rem;
    }
    .profile-stat-item {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
    }
    .profile-tabs {
        padding: 0 0.5rem;
        margin-bottom: 0.75rem;
    }
    .profile-tab {
        padding: 0.75rem 1rem;
        min-height: 44px;
        font-size: 0.875rem;
    }
    .profile-tab-panel {
        padding: 0.75rem 1rem;
    }
    .profile-tab-preferencias,
    .profile-tab-shoutbox {
        padding: 0.75rem 1rem 1rem;
    }
    .profile-preferences-terms-notice {
        font-size: 0.75rem;
        margin: 0 0 0.75rem;
        line-height: 1.5;
    }
    .profile-preferences-public-section {
        padding: 0.75rem 1rem;
        margin-top: 0.5rem;
    }
    .profile-preferences-public .preference-tag-pill {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    .profile-characters-preview {
        padding: 0.75rem 0;
    }
    .profile-characters-grid {
        gap: 0.75rem;
    }
    .profile-signature-section {
        padding: 0.75rem 0;
    }
    .profile-signature-placeholder {
        padding: 1.25rem 1rem;
    }
    .profile-wallet-bar-inner {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    .profile-activity-list {
        padding-left: 1rem;
    }
    .profile-activity-list li {
        font-size: 0.875rem;
        padding: 0.35rem 0;
    }
}

/* Modal Editar perfil — móvil */
@media (max-width: 640px) {
    .profile-modal-backdrop {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: max(0.5rem, env(safe-area-inset-top));
    }
    .profile-modal .profile-modal-card {
        width: 100%;
        max-width: none;
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
        border-radius: 16px;
        margin: auto 0;
    }
    .profile-modal-header {
        position: relative;
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .profile-modal-header h2 {
        font-size: 1.1rem;
        flex: 1;
        min-width: 0;
        padding-right: 2.75rem;
    }
    .profile-modal-close {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    .profile-form-sections {
        padding: 1rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .profile-edit-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        gap: 0.2rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .profile-edit-tabs::-webkit-scrollbar {
        display: none;
    }
    .profile-edit-tab {
        flex-shrink: 0;
        min-height: 44px;
        padding: 0.5rem 0.65rem;
        font-size: 0.8rem;
    }
    .profile-form-section-title {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }
    .profile-form-section .form-group label {
        font-size: 0.875rem;
    }
    .profile-form .form-input,
    .profile-form .form-textarea {
        font-size: 16px; /* evita zoom en iOS */
        padding: 0.5rem 0.65rem;
    }
    .profile-edit-appearance-previews {
        padding: 0.75rem;
        margin-bottom: 1rem;
        gap: 0.75rem;
    }
    .profile-edit-avatar-preview {
        width: 64px;
        height: 64px;
    }
    .profile-edit-banner-preview {
        max-width: 100%;
        height: 56px;
    }
    .profile-preferences-accordion-header {
        padding: 0.6rem 0.75rem;
        font-size: 0.875rem;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .profile-preferences-accordion-header .category-name {
        min-width: 0;
    }
    .profile-preferences-accordion-header .profile-edit-privacy-toggle {
        margin-left: 0;
        font-size: 0.75rem;
    }
    .profile-preferences-accordion-body {
        padding: 0.6rem 0.75rem;
    }
    .profile-preferences-chip {
        padding: 0.3rem 0.55rem;
        font-size: 0.75rem;
    }
    .profile-preferences-custom-form-wrap {
        padding: 0.6rem;
        gap: 0.4rem;
    }
    .profile-modal-actions {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
        margin-top: 1rem;
    }
    .profile-modal-actions .btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }
}

/* Modal avatares/banners predeterminados — móvil */
@media (max-width: 640px) {
    .profile-defaults-modal .profile-modal-card {
        width: 100%;
        max-width: none;
        padding: 1rem;
        max-height: 85vh;
    }
    .profile-defaults-modal .profile-defaults-grid {
        grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
        gap: 8px;
        max-height: min(45vh, 320px);
    }
    .profile-defaults-modal[data-mode="banner"] .profile-defaults-grid {
        grid-template-columns: 1fr;
    }
}

/* Móvil muy estrecho (360px y menos) */
@media (max-width: 400px) {
    .profile-banner {
        height: 140px;
    }
    .profile-card {
        padding: 0.5rem 0.75rem;
        padding-top: 2.25rem;
    }
    .profile-avatar {
        width: 72px;
        height: 72px;
        font-size: 1.2rem;
    }
    .profile-display-name {
        font-size: 1.05rem;
    }
    .profile-tab {
        padding: 0.6rem 0.75rem;
    }
    .profile-modal .profile-modal-card {
        border-radius: 12px;
    }
    .profile-form-sections {
        padding: 0.75rem;
    }
    .profile-edit-tab {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Visitante ha bloqueado al dueño del perfil: vista mínima */
.profile-page--blocked-by-viewer #profileTabInicioCardContent > section:not(#profileBioSection),
.profile-page--blocked-by-viewer #profileCreationsWrap,
.profile-page--blocked-by-viewer .profile-wallet-bar {
    display: none !important;
}
.profile-page--blocked-by-viewer button.counter-social.profile-social-counter--btn {
    opacity: 0.55;
    pointer-events: none;
}
.profile-blocked-by-you-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: var(--neo-text, #e6e9f2);
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}
.profile-header-row + .profile-blocked-by-you-banner {
    margin-top: 0.25rem;
}
.profile-blocked-by-you-banner .fa-ban {
    font-size: 1.25rem;
    color: #f87171;
}
.profile-banner.profile-media-blocked::after,
.profile-avatar.profile-media-blocked::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 20, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    border-radius: inherit;
}
.profile-banner.profile-media-blocked::before,
.profile-avatar.profile-media-blocked::before {
    content: "\f05e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2.5rem, 8vw, 4rem);
    color: rgba(248, 113, 113, 0.95);
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.profile-avatar.profile-media-blocked {
    position: relative;
    overflow: hidden;
}
button.counter.counter-social {
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
    cursor: default;
    padding: 0;
    text-align: left;
}
button.counter.counter-social.profile-social-counter--btn {
    cursor: pointer;
    opacity: 1;
    pointer-events: auto;
}
button.counter.counter-social.profile-social-counter--btn:hover {
    opacity: 0.9;
    text-decoration: underline;
}

/* Modal listas seguidores / siguiendo */
.profile-social-list-modal {
    position: fixed;
    inset: 0;
    z-index: 12020;
    display: none;
}
.profile-social-list-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
}
.profile-social-list-modal-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(420px, 92vw);
    max-height: min(70vh, 520px);
    background: var(--neo-surface, #151a24);
    border: 1px solid var(--neo-border, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.profile-social-list-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--neo-border, rgba(255, 255, 255, 0.08));
}
.profile-social-list-modal-header h2 {
    margin: 0;
    font-size: 1.05rem;
}
.profile-social-list-modal-close {
    background: none;
    border: none;
    color: var(--neo-muted, #9aa6bf);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem;
}
.profile-social-list-modal-body {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
}
.profile-social-list-item {
    margin: 0;
}
.profile-social-list-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 1rem;
    color: inherit;
    text-decoration: none;
}
.profile-social-list-link:hover {
    background: rgba(255, 255, 255, 0.05);
}
.profile-social-list-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--neo-surface-2, rgba(255, 255, 255, 0.06));
}
.profile-social-list-avatar--empty {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--neo-surface-2, rgba(255, 255, 255, 0.06));
    color: var(--neo-muted, #9aa6bf);
}
.profile-social-list-modal-footer {
    padding: 0.5rem 1rem 0.85rem;
    border-top: 1px solid var(--neo-border, rgba(255, 255, 255, 0.06));
}
.profile-social-list-loading,
.profile-social-list-empty {
    padding: 1rem;
    color: var(--neo-muted, #9aa6bf);
    text-align: center;
}
.account-blocked-username-link {
    color: var(--neo-primary, #818cf8);
    text-decoration: none;
    font-weight: 600;
}
.account-blocked-username-link:hover {
    text-decoration: underline;
}
