/**
 * =============================================================
 * ARCHIVO: /assets/css/desktop.css
 * Soporte responsivo para PC y Tabletas Grandes (>= 768px)
 * Estilo X / Instagram / Threads sin afectar vistas móviles (< 768px).
 * =============================================================
 */

/* Ocultar elementos exclusivos de escritorio en móvil */
.voki-desktop-rail,
.voki-desktop-right-rail {
  display: none;
}

@media (min-width: 768px) {
  :root {
    --voki-rail-left-w: 76px;
    --voki-rail-right-w: 0px;
    --voki-center-feed-w: 640px;
    --voki-center-wide-w: 880px;
  }

  /* Ocultar barra inferior móvil en tabletas grandes y PC */
  #vokiBottomControls,
  nav.voki-bottom-navbar {
    display: none !important;
  }

  /* Ocultar cabecera móvil redundante en Home (el rail izquierdo ya tiene perfil, notif, ajustes) */
  body.voki-desktop-shell-active[data-voki-route="home"] header.sticky-top > section.d-lg-none {
    display: none !important;
  }

  /* Espaciado del cuerpo principal para respetar los rails laterales */
  body.voki-desktop-shell-active:not(.voki-auth-page) {
    padding-left: var(--voki-rail-left-w) !important;
    padding-right: var(--voki-rail-right-w) !important;
    padding-bottom: 0 !important;
  }

  body.voki-desktop-shell-active.voki-desktop-no-right-rail {
    --voki-rail-right-w: 0px;
  }

  body.voki-desktop-shell-active.voki-auth-page {
    --voki-rail-left-w: 0px;
    --voki-rail-right-w: 0px;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.voki-auth-page .voki-desktop-rail,
  body.voki-auth-page .voki-desktop-right-rail {
    display: none !important;
  }

  /* ================= RAIL IZQUIERDO (TABLET COMPACTO 76px) ================= */
  .voki-desktop-rail {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--voki-rail-left-w);
    z-index: 1025;
    background-color: var(--voki-bg, #09090b);
    border-right: 1px solid var(--voki-divider, #27272a);
    padding: 14px 10px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    transition: width 0.2s ease;
  }

  .voki-desktop-rail::-webkit-scrollbar {
    display: none;
  }

  .voki-rail-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--voki-text, #f4f4f5);
    transition: background-color 0.16s ease;
  }

  .voki-rail-brand:hover {
    background-color: var(--voki-surface-hover, rgba(255, 255, 255, 0.06));
    color: var(--voki-text, #f4f4f5);
  }

  .voki-rail-brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
  }

  .voki-rail-brand-text {
    display: none;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
  }

  .voki-rail-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .voki-rail-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    padding: 11px 12px;
    border-radius: 14px;
    border: none;
    background: transparent;
    color: var(--voki-text, #f4f4f5);
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.12s ease;
    position: relative;
    text-align: left;
  }

  .voki-rail-link:hover {
    background-color: var(--voki-surface-hover, rgba(255, 255, 255, 0.07));
    color: var(--voki-text, #f4f4f5);
  }

  .voki-rail-link:active {
    transform: scale(0.98);
  }

  .voki-rail-link.active {
    font-weight: 700;
    color: var(--voki-text, #ffffff);
    background-color: rgba(var(--bs-primary-rgb, 92, 22, 197), 0.14);
  }

  .voki-rail-link.active i {
    color: var(--bs-primary, #5c16c5);
  }

  .voki-rail-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
  }

  .voki-rail-label {
    display: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .voki-rail-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    font-size: 0.62rem;
    padding: 0.2em 0.45em;
    min-width: 17px;
    line-height: 1;
  }

  .voki-rail-dot-badge {
    position: absolute;
    top: -1px;
    right: -2px;
    width: 10px;
    height: 10px;
  }

  .voki-rail-create-btn {
    margin-top: 10px;
    width: 48px;
    height: 48px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 999px;
    border: none;
    background: var(--bs-primary, #5c16c5);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.96rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(var(--bs-primary-rgb, 92, 22, 197), 0.35);
    transition: transform 0.15s ease, filter 0.15s ease;
    cursor: pointer;
  }

  .voki-rail-create-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
  }

  .voki-rail-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--voki-divider, #27272a);
  }

  .voki-rail-user-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--voki-text, #f4f4f5);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease;
  }

  .voki-rail-user-btn:hover {
    background-color: var(--voki-surface-hover, rgba(255, 255, 255, 0.06));
    border-color: var(--voki-divider, #27272a);
  }

  .voki-rail-user-meta {
    display: none;
    min-width: 0;
    flex: 1;
  }

  /* Popover de cuenta al hacer clic en avatar/perfil del rail izquierdo */
  .voki-desktop-user-popover {
    position: fixed;
    left: 12px;
    bottom: 76px;
    width: 224px;
    z-index: 1090;
    background: var(--voki-surface, #121214);
    border: 1px solid var(--voki-divider, #27272a);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  }

  .voki-popover-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--voki-text, #f4f4f5);
    font-size: 0.88rem;
    font-weight: 600;
    transition: background-color 0.14s ease;
    cursor: pointer;
  }

  .voki-popover-item:hover {
    background: var(--voki-surface-hover, rgba(255, 255, 255, 0.07));
    color: var(--voki-text, #f4f4f5);
  }

  .voki-popover-divider {
    height: 1px;
    background: var(--voki-divider, #27272a);
    margin: 5px 6px;
  }

  /* Tarjeta de Racha Diaria en Rail Derecho */
  .voki-streak-card {
    background: linear-gradient(145deg, rgba(30, 27, 75, 0.42) 0%, rgba(18, 18, 20, 0.95) 100%) !important;
    border-color: rgba(168, 85, 247, 0.28) !important;
  }

  .voki-streak-days-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
  }

  .voki-streak-day-dot {
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    border: 1px solid var(--voki-divider, #27272a);
    background: rgba(255, 255, 255, 0.03);
    color: var(--voki-muted, #a1a1aa);
  }

  .voki-streak-day-dot.done {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    color: #34d399;
  }

  .voki-streak-day-dot.claimable {
    background: rgba(245, 158, 11, 0.24);
    border-color: rgba(245, 158, 11, 0.7);
    color: #fbbf24;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
  }

  .voki-streak-claim-btn {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    border: none;
    color: #ffffff;
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .voki-streak-claim-btn:disabled {
    background: rgba(255, 255, 255, 0.06);
    color: var(--voki-muted, #a1a1aa);
    opacity: 1;
  }

  .voki-streak-timer {
    font-size: 0.72rem;
    letter-spacing: -0.2px;
    user-select: none;
    transition: all 0.25s ease;
    white-space: nowrap;
  }

  .voki-streak-timer.muted {
    color: var(--voki-muted, #a1a1aa);
    font-weight: 500;
  }

  .voki-streak-timer.grace {
    color: #facc15;
    font-weight: 700;
    background: rgba(234, 179, 8, 0.16);
    border: 1px solid rgba(234, 179, 8, 0.35);
    padding: 1px 7px;
    border-radius: 999px;
  }

  /* ================= COLUMNA CENTRAL EN PC Y TABLETAS ================= */
  body.voki-desktop-shell-active:not(.voki-auth-page) > header.sticky-top,
  body.voki-desktop-shell-active:not(.voki-auth-page) > main,
  body.voki-desktop-shell-active:not(.voki-auth-page) > main.container,
  body.voki-desktop-shell-active:not(.voki-auth-page) > .container {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border-left: none !important;
    border-right: none !important;
  }

  /* Hilos, Inicio, Post y Perfil: ancho óptimo de lectura sin estirarse en monitores ultra-anchos */
  body.voki-desktop-shell-active[data-voki-route="home"] > header.sticky-top,
  body.voki-desktop-shell-active[data-voki-route="home"] > main,
  body.voki-desktop-shell-active[data-voki-route="post"] > header.sticky-top,
  body.voki-desktop-shell-active[data-voki-route="post"] > main,
  body.voki-desktop-shell-active[data-voki-route="profile"] > header.sticky-top,
  body.voki-desktop-shell-active[data-voki-route="profile"] > main {
    max-width: 820px !important;
    border-left: 1px solid var(--voki-divider, #27272a) !important;
    border-right: 1px solid var(--voki-divider, #27272a) !important;
  }

  body.voki-desktop-shell-active:not(.voki-auth-page) > main.container {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  body.voki-desktop-shell-active[data-voki-route="home"] > main,
  body.voki-desktop-shell-active[data-voki-route="post"] > main,
  body.voki-desktop-shell-active[data-voki-route="profile"] > main,
  body.voki-desktop-shell-active[data-voki-route="search"] > main {
    min-height: calc(100dvh - 50px);
  }

  /* Evitar recorte o estiramiento raro en imágenes/vídeos de publicaciones en PC */
  body.voki-desktop-shell-active .voki-post-card img:not(.ugc-avatar-base):not(.ugc-frame-layer):not(.rounded-circle),
  body.voki-desktop-shell-active .voki-post-card video {
    max-height: 460px !important;
    object-fit: contain !important;
    background-color: rgba(0, 0, 0, 0.25);
  }

  /* Barra de comentarios inline en /post/:id encima de COMENTARIOS (en PC) */
  body.voki-desktop-shell-active[data-voki-route="post"] #detailCommentBarContainer {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    z-index: 20 !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    border-top: none !important;
    border-bottom: 1px solid var(--voki-divider, #27272a) !important;
    border-left: none !important;
    border-right: none !important;
    background: rgba(255, 255, 255, 0.015) !important;
    transition: border-color 0.15s ease, background-color 0.15s ease;
  }

  body.voki-desktop-shell-active[data-voki-route="post"] #detailCommentBarContainer.voki-comment-drop-active {
    background: rgba(var(--bs-primary-rgb, 92, 22, 197), 0.12) !important;
    outline: 2px dashed var(--bs-primary, #5c16c5);
    outline-offset: -4px;
  }

  /* Explorar: sliders con scrollbar discreto en PC y mejor aprovechamiento de ancho */
  body.voki-desktop-shell-active[data-voki-route="explore"] .explore-slider {
    scrollbar-width: thin;
    scrollbar-color: rgba(161, 161, 170, 0.35) transparent;
    padding-bottom: 16px;
  }
  body.voki-desktop-shell-active[data-voki-route="explore"] .explore-slider::-webkit-scrollbar {
    display: block;
    height: 6px;
  }
  body.voki-desktop-shell-active[data-voki-route="explore"] .explore-slider::-webkit-scrollbar-thumb {
    background: rgba(161, 161, 170, 0.35);
    border-radius: 999px;
  }

  /* ================= CHAT & MATCH VIEWPORTS EN TABLET / PC ================= */
  html body.voki-desktop-shell-active #vokiDesktopLeftRail {
    z-index: 1060 !important;
  }

  html body.voki-desktop-shell-active .chat-inbox-viewport,
  html body.voki-desktop-shell-active .match-viewport {
    left: var(--voki-rail-left-w) !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    width: calc(100vw - var(--voki-rail-left-w)) !important;
  }

  /* Sala de chat tipo Discord: rail izquierdo siempre visible + lista de canales/chats + chat + info lateral */
  html body.voki-desktop-shell-active #chatRoomOverlay {
    left: var(--voki-rail-left-w) !important;
    right: 0 !important;
    width: calc(100vw - var(--voki-rail-left-w)) !important;
    max-width: calc(100vw - var(--voki-rail-left-w)) !important;
    z-index: 1040 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
  }

  html body.voki-desktop-shell-active #chatRoomOverlay #chatRoomContainer {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: auto !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
  }

  /* Vista /chat en PC (>= 1024px): bandeja compacta a la izquierda tipo Discord + escenario a la derecha */
  html body.voki-desktop-shell-active #chatInboxRoot.chat-inbox-viewport {
    position: fixed !important;
    top: 0 !important;
    left: var(--voki-rail-left-w) !important;
    right: auto !important;
    bottom: 0 !important;
    margin: 0 !important;
    z-index: 20 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 400px !important;
    min-width: 400px !important;
    max-width: 400px !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    flex-shrink: 0 !important;
    border-right: 1px solid var(--voki-divider, #27272a);
  }

  html body.voki-desktop-shell-active #chatInboxRoot .inbox-top-header [data-bs-target="#offcanvasUserMenu"],
  html body.voki-desktop-shell-active #inboxSelectedCommunityBar #btnBackToAllChats {
    display: none !important;
  }

  .voki-desktop-inbox-stage {
    flex: 1 1 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px;
    background: radial-gradient(circle at 50% 35%, rgba(var(--bs-primary-rgb, 92, 22, 197), 0.12), transparent 60%), var(--voki-bg, #09090b);
  }

  .voki-desktop-chat-pane {
    display: none;
  }
}

@media (min-width: 1024px) {
  /* Vista /chat en PC (>= 1024px): bandeja compacta a la izquierda tipo Discord + escenario a la derecha */
  html body.voki-desktop-shell-active #chatInboxRoot.chat-inbox-viewport {
    position: fixed !important;
    top: 0 !important;
    left: var(--voki-rail-left-w) !important;
    right: auto !important;
    bottom: 0 !important;
    margin: 0 !important;
    z-index: 20 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 400px !important;
    min-width: 400px !important;
    max-width: 400px !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    flex-shrink: 0 !important;
    border-right: 1px solid var(--voki-divider, #27272a);
  }

  html body.voki-desktop-shell-active #chatInboxRoot .inbox-top-header [data-bs-target="#offcanvasUserMenu"],
  html body.voki-desktop-shell-active #inboxSelectedCommunityBar #btnBackToAllChats {
    display: none !important;
  }

  .voki-desktop-inbox-stage {
    flex: 1 1 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px;
    background: radial-gradient(circle at 50% 35%, rgba(var(--bs-primary-rgb, 92, 22, 197), 0.12), transparent 60%), var(--voki-bg, #09090b);
  }

  .voki-desktop-chat-pane {
    display: flex;
    flex-direction: column;
    width: 400px;
    flex-shrink: 0;
    height: 100%;
    background: var(--voki-bg, #09090b);
    border-right: 1px solid var(--voki-divider, #27272a);
    overflow: hidden;
  }

  html body.voki-desktop-shell-active #chatRoomOverlay #vokiDesktopChatInboxPane #chatInboxRoot {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    z-index: 1 !important;
  }

  html body.voki-desktop-shell-active #chatRoomOverlay #vokiDesktopChatInboxPane #chatInboxRoot .inbox-top-header [data-bs-target="#offcanvasUserMenu"] {
    display: none !important;
  }

  .voki-desktop-chat-pane-header {
    padding: 12px 12px 10px;
    border-bottom: 1px solid var(--voki-divider, #27272a);
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .voki-desktop-chat-pane-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scrollbar-width: thin;
  }

  .voki-desktop-chat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--voki-text, #f4f4f5);
    transition: background-color 0.15s ease;
  }

  .voki-desktop-chat-item:hover {
    background: var(--voki-surface-hover, rgba(255, 255, 255, 0.06));
    color: var(--voki-text, #f4f4f5);
  }

  .voki-desktop-chat-item.active {
    background: rgba(var(--bs-primary-rgb, 92, 22, 197), 0.18);
    border: 1px solid rgba(var(--bs-primary-rgb, 92, 22, 197), 0.35);
  }

  /* Panel derecho desplegable de información de contacto/canal tipo Discord */
  #chatRoomOverlay #modalChatContactInfo.voki-docked-contact-pane {
    display: flex !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 328px !important;
    min-width: 328px !important;
    max-width: 328px !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    z-index: 20 !important;
    background: var(--voki-bg, #09090b) !important;
    border-left: 1px solid var(--voki-divider, #27272a);
    overflow: hidden;
    transition: width 0.2s ease, min-width 0.2s ease, opacity 0.15s ease;
  }

  #chatRoomOverlay #modalChatContactInfo.voki-docked-contact-pane .modal-header {
    padding: 14px 16px !important;
    background: var(--voki-bg, #09090b) !important;
    border-bottom: 1px solid var(--voki-divider, #27272a) !important;
    min-height: 58px;
  }

  #chatRoomOverlay.voki-contact-pane-collapsed #modalChatContactInfo.voki-docked-contact-pane {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    border-left: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  #chatRoomOverlay #modalChatContactInfo.voki-docked-contact-pane .modal-dialog {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    transform: none !important;
  }

  #chatRoomOverlay #modalChatContactInfo.voki-docked-contact-pane .modal-content {
    height: 100% !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  #chatRoomOverlay #modalChatContactInfo.voki-docked-contact-pane .modal-body {
    max-height: none !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
  }

  #chatRoomOverlay #modalChatContactInfo.voki-docked-contact-pane .contact-modal-back-btn {
    display: none !important;
  }

  #chatRoomHeaderInfo {
    cursor: pointer;
    transition: background-color 0.15s ease;
  }

  #chatRoomHeaderInfo:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
  }

  .voki-contact-member-row:hover {
    background-color: rgba(255, 255, 255, 0.07) !important;
  }

  /* Badge estilo Discord para el riel de comunidades (esquina superior izquierda, rojo vivo, número blanco) */
  .discord-rail-badge {
    top: -2px !important;
    left: -2px !important;
    transform: none !important;
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border: 2.5px solid #09090b !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7) !important;
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    font-family: var(--voki-font-mono, monospace) !important;
    letter-spacing: -0.02em !important;
    z-index: 5 !important;
    pointer-events: none !important;
  }
}

@media (min-width: 768px) {

  /* Superposición garantizada de modales en Chat Room PC */
  #modalChatMedia,
  #modalChatStreaks,
  #chatActionModal {
    z-index: 12200 !important;
  }

  /* ================= MODALES CENTRADOS EN PC (EN LUGAR DE BOTTOM SHEETS MÓVILES) ================= */
  .offcanvas-backdrop.show {
    pointer-events: auto !important;
    background-color: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .offcanvas.offcanvas-bottom:not(.voki-create-floating-menu) {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: min(620px, calc(100vw - 48px)) !important;
    max-width: 620px !important;
    height: auto !important;
    max-height: min(86vh, 760px) !important;
    margin: 0 !important;
    border-radius: 20px !important;
    border: 1px solid var(--voki-divider, #27272a) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72) !important;
    transform: translate(-50%, -44%) scale(0.96) !important;
    opacity: 0;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.18s ease !important;
    overflow: hidden;
  }

  .offcanvas.offcanvas-bottom:not(.voki-create-floating-menu).showing,
  .offcanvas.offcanvas-bottom:not(.voki-create-floating-menu).show:not(.hiding) {
    transform: translate(-50%, -50%) scale(1) !important;
    opacity: 1;
  }

  .offcanvas.offcanvas-bottom:not(.voki-create-floating-menu).hiding {
    transform: translate(-50%, -46%) scale(0.96) !important;
    opacity: 0;
  }

  .offcanvas.offcanvas-bottom .drag-handle {
    display: none !important;
  }

  .offcanvas.offcanvas-bottom .offcanvas-header {
    padding-top: 14px !important;
    padding-bottom: 12px !important;
  }

  #offcanvasCreatePost {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: min(660px, calc(100vw - 48px)) !important;
    max-width: 660px !important;
    height: min(82vh, 700px) !important;
    max-height: min(86vh, 760px) !important;
    border: 1px solid var(--voki-divider, #27272a) !important;
  }

  #offcanvasCreatePost .post-config-sheet {
    max-height: calc(100% - 12px);
  }

  #offcanvasComments {
    width: min(640px, calc(100vw - 48px)) !important;
    max-width: 640px !important;
    height: min(80vh, 680px) !important;
  }

  #offcanvasDrafts,
  #offcanvasMkEditor {
    width: min(680px, calc(100vw - 48px)) !important;
    max-width: 680px !important;
    height: min(76vh, 640px) !important;
  }

  /* ================= NOTIFICACIONES EN PC: FLYOUT MODAL LATERAL / FLOTANTE ELEGANTE ================= */
  #offcanvasNotifications.voki-notif-sheet {
    top: 16px !important;
    right: 20px !important;
    bottom: 16px !important;
    left: auto !important;
    width: 440px !important;
    max-width: calc(100vw - 32px) !important;
    height: calc(100vh - 32px) !important;
    max-height: calc(100vh - 32px) !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(15, 15, 20, 0.95) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06) !important;
    transform: translateX(40px) scale(0.96) !important;
    opacity: 0 !important;
    visibility: hidden;
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease, visibility 0.26s !important;
    z-index: 10550 !important;
    overflow: hidden !important;
  }

  #offcanvasNotifications.voki-notif-sheet.showing,
  #offcanvasNotifications.voki-notif-sheet.show:not(.hiding) {
    transform: translateX(0) scale(1) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  #offcanvasNotifications.voki-notif-sheet.hiding {
    transform: translateX(30px) scale(0.97) !important;
    opacity: 0 !important;
    visibility: visible !important;
  }

  #offcanvasNotifications .offcanvas-header {
    padding: 14px 18px !important;
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  #offcanvasNotifications .notif-filter-bar {
    padding: 10px 16px 8px !important;
    background: rgba(0, 0, 0, 0.25) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    overflow-x: auto !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(168, 85, 247, 0.5) rgba(255, 255, 255, 0.04) !important;
  }

  #offcanvasNotifications .notif-filter-bar::-webkit-scrollbar {
    display: block !important;
    height: 5px !important;
  }

  #offcanvasNotifications .notif-filter-bar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 999px !important;
    margin: 0 16px !important;
  }

  #offcanvasNotifications .notif-filter-bar::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.6), rgba(99, 102, 241, 0.6)) !important;
    border-radius: 999px !important;
    transition: background 0.15s ease !important;
  }

  #offcanvasNotifications .notif-filter-bar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #a855f7, #6366f1) !important;
  }

  #offcanvasNotifications .notif-drag-bar {
    display: none !important;
  }

  #offcanvasNotifications .offcanvas-body {
    background: transparent !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    padding: 8px 14px 24px !important;
  }

  #offcanvasNotifications .offcanvas-body::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  #offcanvasPostActions,
  #offcanvasExternalUserActions,
  #offcanvasMemberActions,
  #offcanvasStoreDetails {
    width: min(420px, calc(100vw - 48px)) !important;
    max-width: 420px !important;
  }

  #offcanvasCreate.voki-create-floating-menu {
    background: rgba(5, 6, 10, 0.58) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  #offcanvasCreate.voki-create-floating-menu .voki-create-floating-stage {
    max-width: 480px;
    padding-bottom: 42px;
  }

  #offcanvasCreate.voki-create-floating-menu .voki-create-arc-squircle {
    width: 64px;
    height: 64px;
    border-radius: 21px;
    font-size: 1.75rem;
  }

  #offcanvasCreate.voki-create-floating-menu .voki-create-arc-label {
    font-size: 0.82rem;
  }

  /* Estética de scrollbars sutiles en PC */
  .voki-post-card {
    transition: background-color 0.15s ease;
  }
}

/* ================= ESCRITORIO COMPLETO (>= 1180px): 3 COLUMNAS ================= */
@media (min-width: 1180px) {
  :root {
    --voki-rail-left-w: 248px;
    --voki-rail-right-w: 330px;
  }

  .voki-desktop-rail {
    padding: 16px 14px;
  }

  .voki-rail-brand {
    justify-content: flex-start;
    padding: 8px 12px;
  }

  .voki-rail-brand-text {
    display: inline-block;
  }

  .voki-rail-link {
    justify-content: flex-start;
    padding: 10px 14px;
  }

  .voki-rail-label {
    display: inline-block;
  }

  .voki-rail-create-btn {
    width: 100%;
    height: 46px;
    padding: 0 18px;
  }

  .voki-rail-user-btn {
    justify-content: flex-start;
    padding: 8px 10px;
  }

  .voki-rail-user-meta {
    display: block;
  }

  /* Rail Derecho: Buscador, Amistades y Explorar Comunidades */
  body.voki-desktop-shell-active:not(.voki-desktop-no-right-rail):not(.voki-auth-page) .voki-desktop-right-rail {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--voki-rail-right-w);
    z-index: 1025;
    background-color: var(--voki-bg, #09090b);
    border-left: 1px solid var(--voki-divider, #27272a);
    padding: 16px 18px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .voki-right-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--voki-surface, #121214);
    border: 1px solid var(--voki-divider, #27272a);
    border-radius: 999px;
    padding: 9px 14px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
  }

  .voki-right-search-box:focus-within {
    border-color: var(--bs-primary, #5c16c5);
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb, 92, 22, 197), 0.2);
  }

  .voki-right-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--voki-text, #f4f4f5);
    font-size: 0.88rem;
    width: 100%;
  }

  .voki-right-search-box input::placeholder {
    color: var(--voki-muted, #a1a1aa);
  }

  .voki-right-card {
    background: var(--voki-surface, #121214);
    border: 1px solid var(--voki-divider, #27272a);
    border-radius: 16px;
    padding: 14px;
  }

  .voki-right-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .voki-right-card-title {
    font-size: 0.92rem;
    font-weight: 800;
    margin: 0;
    color: var(--voki-text, #f4f4f5);
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .voki-right-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--voki-text, #f4f4f5);
    transition: background-color 0.15s ease;
  }

  .voki-right-item:hover {
    background-color: var(--voki-surface-hover, rgba(255, 255, 255, 0.06));
    color: var(--voki-text, #f4f4f5);
  }

  .voki-right-item-meta {
    min-width: 0;
    flex: 1;
  }

  .voki-right-item-name {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }

  .voki-right-item-sub {
    font-size: 0.74rem;
    color: var(--voki-muted, #a1a1aa);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .voki-right-quick-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Ocultar buscador duplicado en Explorar cuando el rail derecho ya tiene el buscador real */
  body.voki-desktop-shell-active[data-voki-route="explore"] header.sticky-top .search-bar-wrapper {
    display: none !important;
  }
  body.voki-desktop-shell-active[data-voki-route="explore"] header.sticky-top > div::before {
    content: "Explorar";
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--voki-text, #f4f4f5);
    margin-right: auto;
  }

  /* Dropdown de resultados instantáneos en el buscador del rail derecho */
  .voki-right-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1080;
    background: var(--voki-surface, #121214);
    border: 1px solid var(--voki-divider, #27272a);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
    padding: 8px;
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .voki-right-search-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--voki-muted, #a1a1aa);
    padding: 4px 8px 2px;
  }

  /* Pestañas y mini-buscador dentro de Comunidades */
  .voki-right-tab-pill {
    border: 1px solid var(--voki-divider, #27272a);
    background: transparent;
    color: var(--voki-muted, #a1a1aa);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
  }

  .voki-right-tab-pill.active,
  .voki-right-tab-pill:hover {
    background: rgba(var(--bs-primary-rgb, 92, 22, 197), 0.18);
    border-color: rgba(var(--bs-primary-rgb, 92, 22, 197), 0.45);
    color: var(--voki-text, #f4f4f5);
  }

  .voki-right-channel-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--voki-divider, #27272a);
    border-radius: 10px;
    padding: 6px 10px;
  }

  .voki-right-channel-search:focus-within {
    border-color: var(--bs-primary, #5c16c5);
  }

  .voki-right-channel-search input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--voki-text, #f4f4f5);
    font-size: 0.8rem;
    width: 100%;
  }

  .voki-right-channel-search input::placeholder {
    color: var(--voki-muted, #a1a1aa);
  }

  /* UI mejorada para Descubre más */
  .voki-discover-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .voki-discover-tile {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 11px;
    border-radius: 12px;
    border: 1px solid var(--voki-divider, #27272a);
    background: rgba(255, 255, 255, 0.025);
    text-decoration: none;
    color: var(--voki-text, #f4f4f5);
    transition: transform 0.14s ease, border-color 0.14s ease, background-color 0.14s ease;
  }

  .voki-discover-tile:hover {
    transform: translateY(-1px);
    background: var(--voki-surface-hover, rgba(255, 255, 255, 0.06));
    color: var(--voki-text, #f4f4f5);
  }

  .voki-discover-match:hover { border-color: rgba(244, 63, 94, 0.45); }
  .voki-discover-echo:hover { border-color: rgba(14, 165, 233, 0.45); }
  .voki-discover-ugc:hover { border-color: rgba(234, 179, 8, 0.45); }

  .voki-discover-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
  }

  .voki-discover-match .voki-discover-icon {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(249, 115, 22, 0.18));
    color: #fb7185;
  }

  .voki-discover-echo .voki-discover-icon {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(56, 189, 248, 0.15));
    color: #38bdf8;
  }

  .voki-discover-ugc .voki-discover-icon {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(245, 158, 11, 0.15));
    color: #facc15;
  }

  .voki-discover-meta {
    min-width: 0;
    flex: 1;
  }

  .voki-discover-name {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .voki-discover-sub {
    font-size: 0.72rem;
    color: var(--voki-muted, #a1a1aa);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .voki-discover-arrow {
    font-size: 1.15rem;
    color: var(--voki-muted, #a1a1aa);
    flex-shrink: 0;
  }

  .voki-right-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--voki-surface-hover, rgba(255, 255, 255, 0.05));
    border: 1px solid var(--voki-divider, #27272a);
    color: var(--voki-text, #f4f4f5);
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.12s ease;
  }

  .voki-right-pill:hover {
    border-color: var(--bs-primary, #5c16c5);
    color: var(--voki-text, #f4f4f5);
    transform: translateY(-1px);
  }

  .voki-right-footer {
    font-size: 0.72rem;
    color: var(--voki-muted, #a1a1aa);
    padding: 4px 6px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
  }

  .voki-right-footer a {
    color: var(--voki-muted, #a1a1aa);
    text-decoration: none;
  }

  .voki-right-footer a:hover {
    text-decoration: underline;
  }
}

@media (min-width: 1400px) {
  :root {
    --voki-rail-left-w: 260px;
    --voki-rail-right-w: 360px;
  }
}
