/* =====================================================
   KOTARU HEADER — style-4
   ===================================================== */
:root {
    --ktr-bg:       #0e0e14;
    --ktr-bg2:      #16161f;
    --ktr-bg3:      #1e1e2a;
    --ktr-border:   rgba(255,255,255,.08);
    --ktr-accent:   #e91e8c;
    --ktr-accent-a: rgba(233,30,140,.15);
    --ktr-text:     #f0f0f5;
    --ktr-muted:    #7a7a90;
    --ktr-h:        68px;
    --ktr-ease:     .22s ease;
}

/* ── Sticky ── */
.ktr-wrap {
    position: sticky;
    top: 0;
    z-index: 1000;
    will-change: top;
    transform: translateZ(0);
}
/* Fallback CSS para admin bar (el JS lo sobreescribe con el valor exacto) */
body.admin-bar .ktr-wrap { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .ktr-wrap { top: 46px; }
}

/* ── Lector: header fixed solo en móvil, top controlado por JS ── */
@media (max-width: 900px) {
    body.ktr-is-reader .ktr-wrap.is-reader-wrap {
        position: fixed;
        left: 0;
        right: 0;
        transform: translate3d(0, 0, 0);
        transition: top .42s cubic-bezier(.22,1,.36,1), transform .42s cubic-bezier(.22,1,.36,1);
    }

    body.ktr-reader-hide .ktr-wrap.is-reader-wrap {
        transform: translate3d(0, calc(-100% - 12px), 0);
    }
}

/* El plugin usa z-index:10021 en .lm-user-bar-item — nuestro overlay y drawer
   deben estar por encima para taparlo cuando el menú nav está abierto */

/* ── Barra principal ── */
.th {
    background: var(--ktr-bg) !important;
    border-bottom: 1px solid var(--ktr-border);
    box-shadow: 0 2px 24px rgba(0,0,0,.55);
}

.ktr-bar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    height: var(--ktr-h);
    display: flex !important;
    align-items: center;
    gap: 8px;
    float: none !important;
}

/* ── Columnas ── */
.ktr-left   { flex:0 0 auto; }
.ktr-center { flex:1 1 auto; display:flex; justify-content:center; overflow:hidden; }
.ktr-right  { flex:0 0 auto; display:flex; align-items:center; gap:2px; }

/* ── Buscar móvil (solo ≤600px, pegado a Ruleta) ── */
.ktr-search-mobile-btn { display: none !important; }
@media (max-width: 600px) {
    .ktr-search-mobile-btn { display: flex !important; }
    .ktr-search-center { display: none !important; }
}

/* ── Icono SVG Ruleta ── */
.ktr-ruleta-svg {
    width: 20px; height: 20px;
    display: block;
    transition: transform .6s ease;
}
.ktr-ruleta-btn:hover .ktr-ruleta-svg { transform: rotate(180deg); }
.ktr-ruleta-btn { color: var(--ktr-muted); }
.ktr-ruleta-btn:hover { color: var(--ktr-accent); }
.ktr-ruleta-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1;
}
.ktr-ruleta-count {
    font-size: 11px;
    font-weight: 800;
    color: var(--ktr-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: .03em;
}
.ktr-ruleta-count.is-ready {
    color: var(--ktr-accent);
}
.ktr-ruleta-sub {
    font-size: 9px;
    color: var(--ktr-muted);
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ── Buscador centrado ── */
.ktr-search-center {
    flex-direction: row !important;
    gap: 8px !important;
    padding: 8px 18px !important;
    background: rgba(255,255,255,.06) !important;
    border: 1px solid var(--ktr-border) !important;
    border-radius: 999px !important;
    font-size: 13px !important;
    color: var(--ktr-muted) !important;
    letter-spacing: 0 !important;
    width: min(340px, 100%) !important;
    justify-content: flex-start !important;
    transition: border-color var(--ktr-ease), background var(--ktr-ease) !important;
}
.ktr-search-center i { font-size: 15px !important; color: var(--ktr-accent) !important; }
.ktr-search-center:hover {
    background: rgba(255,255,255,.1) !important;
    border-color: var(--ktr-accent) !important;
    color: var(--ktr-text) !important;
}

@media (max-width: 600px) {
    /* En móvil mostrar solo el ícono, sin el texto pill */
    .ktr-search-center {
        width: auto !important;
        padding: 8px !important;
        background: transparent !important;
        border-color: transparent !important;
        border-radius: 10px !important;
        justify-content: center !important;
    }
    .ktr-search-center span { display: none; }
    .ktr-search-center i { font-size: 20px !important; }
}

/* ── Botón Ruleta (legacy, por si se usa en otro lado) ── */
.ktr-side-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--ktr-muted);
    text-decoration: none;
    font-size: 10px;
    letter-spacing: .5px;
    padding: 6px 10px;
    border-radius: 10px;
    transition: color var(--ktr-ease), background var(--ktr-ease);
    white-space: nowrap;
}
.ktr-side-btn i { font-size: 20px; line-height: 1; }
.ktr-side-btn:hover { color: var(--ktr-accent); background: var(--ktr-accent-a); }

/* ── Logo (solo imagen, sin texto) ── */
.ktr-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    z-index: 10030;
}
.ktr-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: opacity var(--ktr-ease);
}
.ktr-logo-link:hover .ktr-logo-img { opacity: .85; }
.ktr-logo-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--ktr-text);
    transition: color var(--ktr-ease);
}
.ktr-logo-link:hover .ktr-logo-name { color: var(--ktr-accent); }

/* ── Botones icono derecha ── */
.ktr-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--ktr-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 10px;
    letter-spacing: .4px;
    padding: 6px 10px;
    border-radius: 10px;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
    transition: color var(--ktr-ease), background var(--ktr-ease);
    flex-shrink: 0;
}
.ktr-icon-btn i { font-size: 18px; line-height: 1; display:block; }
.ktr-icon-btn:hover { color: var(--ktr-text); background: rgba(255,255,255,.06); }

/* Separador + estilo especial del botón Menú */
.ktr-burger {
    border-left: 1px solid var(--ktr-border);
    border-radius: 0;
    padding-left: 14px;
    margin-left: 4px;
}
.ktr-burger i { font-size: 22px; }
.ktr-burger:hover { color: var(--ktr-text); background: transparent; }

/* ── Plugin #lm-user-bar ── */
#lm-user-bar {
    float: none !important;
    margin: 0 !important;
    flex-shrink: 0;
    align-self: center;
}
/* Campana de notificaciones visible junto al avatar */

/* El cierre de drops cuando nav abre se maneja solo en JS (closeProfileDrop) */

/* Ocultar los items del plugin cuando el drawer móvil está abierto
   (tienen z-index:10021 que supera al drawer z-index:1001) */
@media (max-width: 900px) {
    body.ktr-nav-open #lm-user-bar {
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* Reactivar avatar de perfil en móvil (el plugin lo oculta, nosotros lo restauramos) */
@media (max-width: 650px) {
    #lm-user-bar .lm-user-bar-item.is-profile { display: flex !important; }
}

/* Bell drop y profile drop: anclar al viewport en móvil para que no se salgan */
@media (max-width: 900px) {
    #lm-bell-drop,
    #lm-profile-drop {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        top: var(--ktr-h) !important;
        max-height: calc(100dvh - var(--ktr-h));
        overflow-y: auto;
        border-radius: 0 !important;
        z-index: 10025 !important; /* por encima del drawer (1001) */
    }
}
/* Ocultar Ruleta y Ranking del menú de perfil (ya están en el nav principal) */
.lm-pdrop-item:has(.bi-stars),
.lm-pdrop-item:has(.bi-trophy) { display: none !important; }

/* ── Neutralizar estilos móviles del plugin sobre .centernav ── */
/* El plugin aplica flex-wrap:wrap y anchos fijos a .th .centernav en móvil,
   lo que rompe nuestro layout de flex row. Los anulamos aquí. */
.th .ktr-bar.centernav {
    flex-wrap: nowrap !important;
    display: flex !important;
    align-items: center !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    gap: 8px !important;
}
.th .ktr-bar.centernav > .searchx {
    display: contents !important;
    flex: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    order: unset !important;
    clear: none !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ── Ancla invisible del plugin ── */
.ktr-right > .searchx:empty {
    display: contents !important;
    width: 0 !important; padding: 0 !important; margin: 0 !important;
}

/* ── Búsqueda ── */
.ktr-search-wrap { position: relative; flex-shrink: 0; }

.ktr-search-panel {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 300px;
    background: var(--ktr-bg2);
    border: 1px solid var(--ktr-border);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,.6);
    z-index: 600;
}
.ktr-search-panel.is-open { display: block; }

.ktr-search-panel form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--ktr-border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color var(--ktr-ease), box-shadow var(--ktr-ease);
}
.ktr-search-panel form:focus-within {
    border-color: var(--ktr-accent);
    box-shadow: 0 0 0 3px var(--ktr-accent-a);
}
.ktr-search-input {
    flex: 1; min-width: 0;
    background: transparent !important;
    border: none !important; outline: none !important; box-shadow: none !important;
    color: var(--ktr-text) !important;
    font-size: 14px;
    padding: 10px 12px !important;
    height: auto !important; width: auto !important;
}
.ktr-search-input::placeholder { color: var(--ktr-muted); }
.ktr-search-btn {
    background: var(--ktr-accent);
    border: none; cursor: pointer;
    padding: 10px 12px; color: #fff; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    transition: background var(--ktr-ease);
}
.ktr-search-btn:hover { background: #c0177a; }

/* ============================================================
   MENÚ — DROPDOWN en desktop / DRAWER en móvil
   ============================================================ */

/* --- DROPDOWN DESKTOP (>900px) --- */
.ktr-drawer {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;        /* borde derecho alineado con el botón Menú */
    left: auto;
    width: 220px;
    background: var(--ktr-bg2);
    border: 1px solid var(--ktr-border);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,.6);
    z-index: 1001;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity var(--ktr-ease), transform var(--ktr-ease);
}
/* El dropdown se posiciona respecto a .ktr-right */
.ktr-right { position: relative; }

.ktr-drawer.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Ocultar cabecera del drawer en desktop (innecesaria) */
.ktr-drawer-head { display: none; }

/* Menú dentro del dropdown */
.ktr-drawer-body { padding: 8px 0; }

/* ── Drawer: sistema de paneles ── */
/* Desktop: solo panel principal como flex normal */
.ktr-drawer-body  { display: flex; flex-direction: column; overflow-y: auto; }
.ktr-drawer-panel { display: none; }

/* Móvil: todos los paneles se superponen (position absolute),
   solo el activo es visible */
@media (max-width: 900px) {
    .ktr-drawer {
        /* Contenedor de referencia para los paneles absolutos */
        position: fixed;
    }
    .ktr-drawer-body,
    .ktr-drawer-panel {
        position: absolute;
        inset: 0;
        display: none;
        flex-direction: column;
        overflow-y: auto;
        background: var(--ktr-bg2);
    }
    .ktr-panel-active {
        display: flex !important;
    }
}

/* ── Fila perfil + campana ── */
.ktr-drawer-profile-row {
    display: none;
    align-items: center;
    border-bottom: 1px solid var(--ktr-border);
    flex-shrink: 0;
}
@media (max-width: 900px) { .ktr-drawer-profile-row { display: flex; } }

.ktr-drawer-profile {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    color: var(--ktr-text);
    cursor: pointer;
    text-align: left;
    min-width: 0;
    transition: background var(--ktr-ease);
}
.ktr-drawer-profile:hover { background: rgba(255,255,255,.05); }

/* Avatar con frame premium */
.ktr-dprow-avatar {
    position: relative;
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 50%;
}
.ktr-dprow-avatar.is-premium {
    background: linear-gradient(135deg, #f5c518, #e91e8c, #9c27b0);
    padding: 2px;
}
.ktr-drawer-profile-avatar {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--ktr-bg3);
}
/* Avatar sin frame premium */
.ktr-dprow-avatar:not(.is-premium) .ktr-drawer-profile-avatar {
    width: 38px; height: 38px;
}
/* Avatar con marco del plugin (lm_get_framed_avatar_html) en la fila del drawer */
.ktr-dprow-avatar .ktr-drawer-framed-avatar,
.ktr-dprow-avatar .lm-framed-avatar,
.ktr-dprow-avatar .lm-avatar-frame {
    width: 38px !important; height: 38px !important;
    display: block !important;
}
.ktr-dprow-avatar .ktr-drawer-framed-avatar img,
.ktr-dprow-avatar .lm-framed-avatar img,
.ktr-dprow-avatar .lm-avatar-frame img {
    width: 100% !important; height: 100% !important;
    border-radius: 50%; object-fit: cover; display: block;
}

.ktr-dprow-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ktr-dprow-tier {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--ktr-muted);
}
.ktr-dprow-tier.is-premium {
    color: #f5c518;
}
.ktr-dprow-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--ktr-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ktr-drawer-profile-arrow { font-size: 11px; color: var(--ktr-muted); flex-shrink: 0; }

/* Campana en la fila de perfil */
.ktr-drawer-bell {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 48px;
    align-self: stretch;
    background: transparent;
    border: none;
    border-left: 1px solid var(--ktr-border);
    color: var(--ktr-muted);
    font-size: 18px;
    cursor: pointer;
    transition: color var(--ktr-ease), background var(--ktr-ease);
}
.ktr-drawer-bell:hover { color: var(--ktr-text); background: rgba(255,255,255,.05); }
.ktr-drawer-notif-badge {
    position: absolute; top: 8px; right: 6px;
    background: var(--ktr-accent); color: #fff;
    font-size: 9px; font-weight: 700;
    min-width: 15px; height: 15px;
    border-radius: 20px; padding: 0 3px;
    display: flex; align-items: center; justify-content: center;
}

/* ── Botón Volver en sub-paneles ── */
.ktr-drawer-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--ktr-border);
    color: var(--ktr-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    text-align: left;
    flex-shrink: 0;
    transition: color var(--ktr-ease), background var(--ktr-ease);
}
.ktr-drawer-back:hover { color: var(--ktr-text); background: rgba(255,255,255,.04); }
.ktr-drawer-back i { font-size: 15px; }

/* ── Sub-panel cabecera de perfil ── */
.ktr-dpanel-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--ktr-border);
    flex-shrink: 0;
}
.ktr-dpanel-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}
.ktr-dpanel-avatar.is-premium {
    background: linear-gradient(135deg, #f5c518, #e91e8c, #9c27b0);
    padding: 2px;
}
.ktr-dpanel-avatar img,
.ktr-dpanel-avatar .ktr-drawer-framed-avatar img,
.ktr-dpanel-avatar .lm-framed-avatar img,
.ktr-dpanel-avatar .lm-avatar-frame img {
    width: 100% !important; height: 100% !important;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: var(--ktr-bg3);
}
/* Marco del plugin en sub-panel: escalar al tamaño del contenedor */
.ktr-dpanel-avatar .ktr-drawer-framed-avatar,
.ktr-dpanel-avatar .lm-framed-avatar,
.ktr-dpanel-avatar .lm-avatar-frame {
    width: 52px !important; height: 52px !important;
    display: block !important;
}
.ktr-dpanel-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.ktr-dpanel-tier {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--ktr-muted);
}
.ktr-dpanel-tier.is-premium { color: #f5c518; }
.ktr-dpanel-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--ktr-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ktr-dpanel-email {
    font-size: 11px;
    color: var(--ktr-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Links del sub-panel de perfil */
.ktr-dpanel-links { flex-shrink: 0; }
.ktr-dpanel-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: var(--ktr-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid var(--ktr-border);
    transition: color var(--ktr-ease), background var(--ktr-ease);
}
.ktr-dpanel-item:hover { color: var(--ktr-text); background: rgba(255,255,255,.05); }
.ktr-dpanel-item > span:first-child { /* icono */
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: rgba(233,30,140,.12);
    border-radius: 8px;
    font-size: 16px;
    color: var(--ktr-accent);
    flex-shrink: 0;
}
.ktr-dpanel-item > span:nth-child(2) { flex: 1; }
.ktr-dpanel-item > i:last-child { font-size: 11px; color: var(--ktr-muted); }

.ktr-dpanel-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(220,53,69,.12);
    color: #e05c6a;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(220,53,69,.25);
    transition: background var(--ktr-ease);
    flex-shrink: 0;
}
.ktr-dpanel-logout:hover { background: rgba(220,53,69,.22); }

/* Sub-panel notificaciones */
.ktr-dpanel-notif-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ktr-text);
    border-bottom: 1px solid var(--ktr-border);
    flex-shrink: 0;
}
#ktr-notif-drop-slot { flex: 1; overflow-y: auto; }
/* El bell drop dentro del slot debe perder su posición fixed */
#ktr-notif-drop-slot #lm-bell-drop {
    position: static !important;
    width: 100% !important;
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    max-height: none !important;
}

/* Ícono de casa en Inicio del menú + estilo del primer item */
.ktr-drawer-menu > li:first-child > a {
    color: var(--ktr-text) !important;
    font-weight: 600;
}
.ktr-drawer-menu > li:first-child > a::before {
    font-family: 'bootstrap-icons';
    content: "\F447";
    margin-right: 8px;
    color: var(--ktr-accent);
    font-size: 16px;
}

.ktr-drawer-auth {
    display: none; /* solo móvil */
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ktr-border);
}
.ktr-drawer-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--ktr-ease), color var(--ktr-ease);
}
.ktr-drawer-auth-btn.is-login {
    background: var(--ktr-accent);
    color: #fff;
}
.ktr-drawer-auth-btn.is-login:hover { background: #c0177a; }
.ktr-drawer-auth-btn.is-register {
    background: rgba(255,255,255,.07);
    color: var(--ktr-text);
    border: 1px solid var(--ktr-border);
}
.ktr-drawer-auth-btn.is-register:hover { background: rgba(255,255,255,.12); }

@media (max-width: 900px) {
    .ktr-drawer-profile { display: flex; }
    .ktr-drawer-auth    { display: flex; }
}

/* ── Banner Hazte Premium en drawer ── */
.ktr-drawer-premium-banner {
    display: none; /* solo aparece en el drawer móvil */
    align-items: center;
    gap: 12px;
    margin: 12px 12px 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(245,197,24,.12), rgba(233,30,140,.18));
    border: 1px solid rgba(245,197,24,.3);
    text-decoration: none;
    color: var(--ktr-text);
    transition: background var(--ktr-ease), border-color var(--ktr-ease);
    flex-shrink: 0;
}
.ktr-drawer-premium-banner:hover {
    background: linear-gradient(135deg, rgba(245,197,24,.2), rgba(233,30,140,.28));
    border-color: rgba(245,197,24,.55);
    color: var(--ktr-text);
}
.ktr-dpb-icon {
    flex-shrink: 0;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5c518, #e91e8c);
    font-size: 16px;
    color: #fff;
}
.ktr-dpb-text {
    flex: 1;
    display: flex; flex-direction: column; gap: 2px;
    min-width: 0;
}
.ktr-dpb-text strong {
    font-size: 13px; font-weight: 700;
    color: #f5c518;
}
.ktr-dpb-text span {
    font-size: 11px;
    color: var(--ktr-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ktr-dpb-arrow { font-size: 11px; color: var(--ktr-muted); flex-shrink: 0; }

@media (max-width: 900px) {
    .ktr-drawer-premium-banner { display: flex; }
}

.ktr-drawer-menu {
    list-style: none;
    margin: 0; padding: 0;
}
.ktr-drawer-menu > li { border-bottom: 1px solid var(--ktr-border); }
.ktr-drawer-menu > li:last-child { border-bottom: none; }

.ktr-drawer-menu > li > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    color: var(--ktr-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--ktr-ease), background var(--ktr-ease);
}
.ktr-drawer-menu > li > a:hover {
    color: var(--ktr-text);
    background: var(--ktr-accent-a);
    border-left: 3px solid var(--ktr-accent);
    padding-left: 17px;
}

/* Submenú */
.ktr-drawer-menu ul {
    list-style: none; margin: 0; padding: 0;
    background: rgba(0,0,0,.2);
    display: none;
}
.ktr-drawer-menu > li.is-sub-open > ul { display: block; }
.ktr-drawer-menu ul li a {
    display: block;
    padding: 10px 20px 10px 32px;
    color: var(--ktr-muted);
    font-size: 13px;
    text-decoration: none;
    transition: color var(--ktr-ease), background var(--ktr-ease);
}
.ktr-drawer-menu ul li a:hover { color: var(--ktr-text); background: rgba(255,255,255,.04); }

/* Overlay desactivado — el drawer no oscurece el fondo */
.ktr-overlay { display: none !important; }

/* ============================================================
   MODAL DE BÚSQUEDA CENTRADO
   ============================================================ */
.ktr-search-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(5,5,10,.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
}
.ktr-search-modal.is-open { display: flex; }

.ktr-search-modal-box {
    width: min(640px, 92vw);
    animation: ktrSearchIn .18s ease;
}

@keyframes ktrSearchIn {
    from { opacity:0; transform:translateY(-16px) scale(.97); }
    to   { opacity:1; transform:translateY(0) scale(1); }
}

.ktr-search-modal-form {
    display: flex;
    align-items: center;
    background: var(--ktr-bg2);
    border: 1px solid rgba(233,30,140,.4);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,.7), 0 0 0 1px rgba(233,30,140,.1);
    overflow: hidden;
    padding: 0 16px;
    gap: 10px;
}

.ktr-search-modal-icon {
    font-size: 20px;
    color: var(--ktr-accent);
    flex-shrink: 0;
}

.ktr-search-modal-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--ktr-text) !important;
    font-size: 18px;
    font-weight: 400;
    padding: 18px 0 !important;
    height: auto !important;
    width: 100% !important;
    caret-color: var(--ktr-accent);
}
.ktr-search-modal-input::placeholder { color: var(--ktr-muted); }

.ktr-search-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    background: rgba(255,255,255,.08);
    border: none; border-radius: 50%;
    color: var(--ktr-muted);
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
    transition: color var(--ktr-ease), background var(--ktr-ease);
}
.ktr-search-modal-close:hover { color: var(--ktr-text); background: rgba(255,255,255,.14); }

.ktr-search-modal-hint {
    margin: 10px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--ktr-muted);
    letter-spacing: .3px;
}

/* Resultados live search del tema — ocultos (usamos nuestro propio sistema) */
#live-search_sb { display: none !important; }

/* ============================================================
   TARJETAS DE RESULTADOS DE BÚSQUEDA
   ============================================================ */
.ktr-search-results {
    margin-top: 10px;
    max-height: 58vh;
    overflow-y: auto;
    border-radius: 14px;
    border: 1px solid var(--ktr-border);
    background: var(--ktr-bg2);
    box-shadow: 0 16px 48px rgba(0,0,0,.6);
    scrollbar-width: thin;
    scrollbar-color: var(--ktr-accent) transparent;
}
.ktr-search-results:empty { display: none; }

.ktr-result-list {
    list-style: none;
    margin: 0; padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ktr-result-item { border-radius: 10px; overflow: hidden; }

.ktr-result-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    text-decoration: none;
    border-radius: 10px;
    transition: background var(--ktr-ease);
}
.ktr-result-link:hover { background: rgba(255,255,255,.05); }

.ktr-result-thumb {
    width: 52px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    background: var(--ktr-bg3);
}
.ktr-result-no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ktr-muted);
    font-size: 20px;
}

.ktr-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ktr-result-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--ktr-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ktr-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ktr-result-genres {
    font-size: 11px;
    color: var(--ktr-muted);
}

.ktr-result-status {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--ktr-accent);
    background: var(--ktr-accent-a);
    padding: 2px 7px;
    border-radius: 20px;
}

.ktr-no-results {
    text-align: center;
    padding: 24px 16px;
    color: var(--ktr-muted);
    font-size: 13px;
    margin: 0;
}

/* ============================================================
   MOBILE DOCK
   ============================================================ */
.ktr-mobile-dock,
.ktr-mobile-utility,
.ktr-reader-dock,
.ktr-reader-sheet {
    display: none;
}

@media (max-width: 900px) {
    html,
    body,
    .mainholder {
        overflow-x: hidden;
    }

    #teaser1,
    #teaser2 {
        display: none !important;
    }

    .ktr-wrap {
        transition: top .42s cubic-bezier(.22,1,.36,1);
    }

    .ktr-wrap:not(.is-reader-wrap) {
        display: none !important;
    }

    body.ktr-mobile-dock-visible .mainholder {
        padding-bottom: 122px;
        padding-bottom: calc(122px + env(safe-area-inset-bottom));
    }

    body.ktr-mobile-utility-visible .mainholder {
        padding-bottom: 122px;
        padding-bottom: calc(122px + env(safe-area-inset-bottom));
    }

    body.ktr-reader-sheet-open {
        overflow: hidden;
    }

    .ktr-mobile-utility {
        display: flex;
        position: fixed;
        top: 12px;
        top: calc(12px + env(safe-area-inset-top));
        right: 12px;
        width: auto;
        max-width: calc(100vw - 24px);
        transform: translate3d(0, -18px, 0);
        opacity: 0;
        pointer-events: none;
        transition: transform .28s cubic-bezier(.22,1,.36,1), opacity .22s ease;
        z-index: 1007;
    }

    .ktr-mobile-utility.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translate3d(0, 0, 0);
    }

    body.admin-bar .ktr-mobile-utility {
        top: 54px;
        top: calc(54px + env(safe-area-inset-top));
    }

    body.ktr-mobile-chrome-hidden .ktr-mobile-utility.is-visible {
        opacity: 0;
        pointer-events: none;
        transform: translate3d(0, -18px, 0);
    }

    .ktr-mobile-wallet {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        padding: 9px 13px;
        border-radius: 18px;
        text-decoration: none;
        color: #fff4fb;
        background:
            linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04)),
            radial-gradient(circle at 12% 20%, rgba(255,114,190,.18), transparent 40%),
            radial-gradient(circle at 86% 82%, rgba(117,86,255,.16), transparent 44%),
            rgba(16,14,24,.9);
        border: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 16px 34px rgba(0,0,0,.32), 0 0 20px rgba(233,30,140,.12);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    .ktr-mobile-wallet-icon {
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 13px;
        background: linear-gradient(135deg, rgba(233,30,140,.88), rgba(117,86,255,.78));
        box-shadow: 0 12px 24px rgba(233,30,140,.22);
        color: #fff;
        font-size: 16px;
        flex-shrink: 0;
    }

    .ktr-mobile-wallet-copy {
        display: flex;
        flex-direction: column;
        min-width: 0;
        line-height: 1.05;
    }

    .ktr-mobile-wallet-copy small {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: rgba(255,255,255,.58);
    }

    .ktr-mobile-wallet-copy strong {
        font-size: 15px;
        font-weight: 800;
        color: #fff;
        font-variant-numeric: tabular-nums;
    }

    .ktr-mobile-dock {
        display: flex;
        align-items: stretch;
        gap: 6px;
        position: fixed;
        left: 50%;
        bottom: 14px;
        bottom: calc(14px + env(safe-area-inset-bottom));
        width: min(420px, calc(100vw - 22px));
        padding: 10px 9px;
        border-radius: 28px;
        background:
            linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03)),
            radial-gradient(circle at 18% 20%, rgba(255,114,190,.17), transparent 34%),
            radial-gradient(circle at 84% 78%, rgba(117,86,255,.16), transparent 34%),
            rgba(16,14,24,.88);
        border: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 20px 44px rgba(0,0,0,.42), 0 0 0 1px rgba(255,255,255,.02), inset 0 1px 0 rgba(255,255,255,.05);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        transform: translate(-50%, 26px);
        opacity: 0;
        pointer-events: none;
        transition: transform .3s cubic-bezier(.22,1,.36,1), opacity .24s ease;
        z-index: 1006;
        isolation: isolate;
    }

    .ktr-mobile-dock::before {
        content: "";
        position: absolute;
        inset: 1px;
        border-radius: inherit;
        border: 1px solid rgba(255,255,255,.04);
        pointer-events: none;
    }

    .ktr-mobile-dock.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, 0);
    }

    body.ktr-mobile-chrome-hidden .ktr-mobile-dock.is-visible {
        opacity: 0;
        pointer-events: none;
        transform: translate(-50%, 24px);
    }

    .ktr-mobile-dock-item {
        position: relative;
        z-index: 1;
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-height: 68px;
        padding: 10px 6px;
        border-radius: 20px;
        border: none;
        text-decoration: none;
        color: rgba(240,240,245,.68);
        background: transparent;
        font-family: inherit;
        cursor: pointer;
        transition: color .22s ease, background .22s ease, transform .22s ease, box-shadow .22s ease;
    }

    .ktr-mobile-dock-item--search {
        flex: 1.08 1 0;
    }

    .ktr-mobile-dock-item--search .ktr-mobile-dock-icon {
        color: #ffd0e7;
        background: linear-gradient(135deg, rgba(233,30,140,.14), rgba(117,86,255,.14));
        border-color: rgba(233,30,140,.2);
    }

    .ktr-mobile-dock-item.is-context-hidden {
        display: none !important;
    }

    .ktr-mobile-dock-item:hover {
        color: var(--ktr-text);
        transform: translateY(-1px);
    }

    .ktr-mobile-dock-icon {
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 14px;
        background: rgba(255,255,255,.05);
        border: 1px solid rgba(255,255,255,.05);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
        font-size: 17px;
        transition: background .22s ease, border-color .22s ease, box-shadow .22s ease, color .22s ease;
    }

    .ktr-mobile-dock-wheel-svg {
        width: 18px;
        height: 18px;
        display: block;
    }

    .ktr-mobile-dock-label {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .02em;
        white-space: nowrap;
    }

    .ktr-mobile-dock-copy {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        line-height: 1.05;
    }

    .ktr-mobile-dock-meta {
        font-size: 9px;
        font-weight: 700;
        letter-spacing: .03em;
        color: rgba(240,240,245,.54);
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
    }

    .ktr-mobile-dock-meta [data-lm-countdown] {
        display: block;
        min-width: 54px;
        text-align: center;
    }

    .ktr-mobile-dock-meta.is-ready {
        color: #ffd0e7;
    }

    .ktr-mobile-dock-item.is-active,
    .ktr-mobile-dock-item.is-search-open,
    .ktr-mobile-dock-item[aria-current="page"] {
        color: #fff;
        background: linear-gradient(135deg, rgba(233,30,140,.18), rgba(117,86,255,.16));
        box-shadow: 0 14px 28px rgba(18,10,25,.22), 0 0 18px rgba(233,30,140,.12);
    }

    .ktr-mobile-dock-item.is-active .ktr-mobile-dock-icon,
    .ktr-mobile-dock-item.is-search-open .ktr-mobile-dock-icon,
    .ktr-mobile-dock-item[aria-current="page"] .ktr-mobile-dock-icon {
        color: #fff;
        background: linear-gradient(135deg, rgba(233,30,140,.86), rgba(117,86,255,.72));
        border-color: rgba(255,255,255,.16);
        box-shadow: 0 10px 24px rgba(233,30,140,.24), inset 0 1px 0 rgba(255,255,255,.12);
    }

    .ktr-mobile-dock-item.is-active .ktr-mobile-dock-meta,
    .ktr-mobile-dock-item.is-search-open .ktr-mobile-dock-meta,
    .ktr-mobile-dock-item[aria-current="page"] .ktr-mobile-dock-meta {
        color: rgba(255,255,255,.8);
    }

    .ktr-reader-dock {
        display: flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        left: 50%;
        bottom: 30px;
        bottom: calc(30px + env(safe-area-inset-bottom));
        width: min(404px, calc(100vw - 24px));
        padding: 9px;
        border-radius: 26px;
        background:
            linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03)),
            radial-gradient(circle at 18% 18%, rgba(255,114,190,.15), transparent 34%),
            radial-gradient(circle at 82% 82%, rgba(117,86,255,.14), transparent 32%),
            rgba(14,12,21,.9);
        border: 1px solid rgba(255,255,255,.08);
        box-shadow: 0 20px 40px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.04);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        transform: translate(-50%, 18px);
        opacity: 0;
        pointer-events: none;
        transition: transform .24s cubic-bezier(.22,1,.36,1), opacity .2s ease;
        z-index: 1007;
    }

    .ktr-reader-dock.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, 0);
    }

    .ktr-reader-dock-item {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 50px;
        padding: 0 12px;
        border: 1px solid rgba(255,255,255,.08);
        border-radius: 18px;
        background: rgba(255,255,255,.04);
        color: #f4eef4;
        font-size: 13px;
        font-weight: 700;
        font-family: inherit;
        cursor: pointer;
        transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
    }

    .ktr-reader-dock-item:hover {
        transform: translateY(-1px);
        border-color: rgba(233,30,140,.22);
        background: linear-gradient(135deg, rgba(233,30,140,.12), rgba(117,86,255,.12));
        box-shadow: 0 14px 24px rgba(0,0,0,.24);
    }

    .ktr-reader-dock-icon {
        width: 28px;
        height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 11px;
        background: rgba(255,255,255,.06);
        color: #ffd0e7;
        font-size: 14px;
    }

    .ktr-reader-sheet {
        position: fixed;
        inset: 0;
        z-index: 1008;
        opacity: 0;
        pointer-events: none;
        transition: opacity .22s ease;
    }

    .ktr-reader-sheet.is-open {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .ktr-reader-sheet-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(6,5,10,.62);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }

    .ktr-reader-sheet-card {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0 auto;
        width: min(520px, 100%);
        max-height: min(72vh, 560px);
        display: flex;
        flex-direction: column;
        padding: 10px 14px 16px;
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
        border-radius: 28px 28px 0 0;
        border: 1px solid rgba(255,255,255,.08);
        border-bottom: none;
        background:
            linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025)),
            radial-gradient(circle at top left, rgba(255,114,190,.14), transparent 34%),
            radial-gradient(circle at bottom right, rgba(117,86,255,.12), transparent 34%),
            rgba(18,16,28,.96);
        box-shadow: 0 -18px 46px rgba(0,0,0,.36);
        transform: translateY(26px);
        transition: transform .28s cubic-bezier(.22,1,.36,1);
    }

    .ktr-reader-sheet.is-open .ktr-reader-sheet-card {
        transform: translateY(0);
    }

    .ktr-reader-sheet-handle {
        width: 54px;
        height: 5px;
        border-radius: 999px;
        background: rgba(255,255,255,.14);
        margin: 0 auto 12px;
    }

    .ktr-reader-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255,255,255,.06);
        color: #fff;
    }

    .ktr-reader-sheet-head strong {
        font-size: 15px;
        font-weight: 800;
        letter-spacing: .01em;
    }

    .ktr-reader-sheet-close {
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        border: 1px solid rgba(255,255,255,.08);
        background: rgba(255,255,255,.05);
        color: rgba(255,255,255,.72);
        cursor: pointer;
    }

    .ktr-reader-sheet-close:hover {
        background: rgba(255,255,255,.1);
        color: #fff;
    }

    .ktr-reader-sheet-body {
        overflow-y: auto;
        padding-top: 12px;
        scrollbar-width: thin;
        scrollbar-color: var(--ktr-accent) transparent;
    }

    .ktr-reader-sheet-empty {
        margin: 0;
        padding: 22px 10px;
        text-align: center;
        color: rgba(240,240,245,.64);
        font-size: 13px;
    }

    .ktr-reader-chapter-list {
        display: grid;
        gap: 8px;
    }

    .ktr-reader-chapter-link {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        min-height: 58px;
        padding: 10px 12px;
        border-radius: 18px;
        border: 1px solid rgba(255,255,255,.06);
        background: rgba(255,255,255,.03);
        color: #f2eef6;
        text-decoration: none;
        transition: border-color .2s ease, background .2s ease, transform .2s ease;
    }

    .ktr-reader-chapter-link:hover {
        transform: translateY(-1px);
        border-color: rgba(233,30,140,.18);
        background: linear-gradient(135deg, rgba(233,30,140,.08), rgba(117,86,255,.08));
    }

    .ktr-reader-chapter-link.is-current {
        border-color: rgba(233,30,140,.24);
        background: linear-gradient(135deg, rgba(233,30,140,.14), rgba(117,86,255,.12));
        box-shadow: 0 14px 28px rgba(16,10,25,.22);
    }

    .ktr-reader-chapter-badge {
        min-width: 42px;
        padding: 8px 10px;
        border-radius: 14px;
        background: rgba(255,255,255,.05);
        color: #ffd0e7;
        font-size: 11px;
        font-weight: 800;
        text-align: center;
        letter-spacing: .04em;
    }

    .ktr-reader-chapter-copy {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .ktr-reader-chapter-title {
        font-size: 13px;
        font-weight: 700;
        color: #fff;
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ktr-reader-chapter-meta {
        font-size: 11px;
        color: rgba(240,240,245,.56);
    }

    .ktr-reader-chapter-arrow {
        color: rgba(255,255,255,.34);
        font-size: 14px;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    /* Convertir en drawer lateral en móvil */
    .ktr-drawer {
        position: fixed;
        top: 0; right: -100%;
        width: min(300px, 88vw);
        height: 100dvh;
        border-radius: 0;
        border-left: 1px solid var(--ktr-border);
        z-index: 1001;
        box-shadow: -4px 0 40px rgba(0,0,0,.7);
        opacity: 1;
        pointer-events: none;
        transform: none;
        transition: right var(--ktr-ease);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    /* Admin bar offset se aplica via JS (applyAdminBarOffset) */
    .ktr-drawer.is-open {
        right: 0;
        pointer-events: auto;
    }
    /* Mostrar cabecera del drawer en móvil */
    .ktr-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid var(--ktr-border);
        flex-shrink: 0;
    }
    .ktr-drawer-logo { display:flex; align-items:center; text-decoration:none; }
    .ktr-drawer-logo img { height:32px; width:auto; object-fit:contain; }
    .ktr-drawer-logo span { font-size:15px; font-weight:800; letter-spacing:2px; text-transform:uppercase; color:var(--ktr-text); }
    .ktr-drawer-close {
        display:flex; align-items:center; justify-content:center;
        width:34px; height:34px;
        background:rgba(255,255,255,.06); border:1px solid var(--ktr-border);
        border-radius:50%; cursor:pointer; color:var(--ktr-muted); font-size:15px;
        transition:color var(--ktr-ease), background var(--ktr-ease);
    }
    .ktr-drawer-close:hover { color:var(--ktr-text); background:rgba(255,255,255,.1); }
    .ktr-drawer-body { flex:1; overflow-y:auto; padding:8px 0; }
}

/* ═══════════════════════════════════════════════════
   LECTOR INMERSIVO MÓVIL — imágenes edge-to-edge
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Quitar márgenes laterales del wrapper */
    #content.readercontent .wrapper {
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    /* Quitar todo borde/padding/radio del área de imágenes */
    #content.readercontent #readerarea {
        padding: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    /* Quitar radios de las imágenes */
    #content.readercontent #readerarea img,
    #content.readercontent #readerarea img:first-child,
    #content.readercontent #readerarea img:last-child,
    #content.readercontent #readerarea img:first-child:last-child {
        border-radius: 0 !important;
    }
    /* Quitar padding lateral del postarea y chapterbody */
    #content.readercontent .postarea,
    #content.readercontent .chapterbody {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
}

@media (max-width: 900px) {
    /* Ocultar campana del header en móvil — va en el drawer */
    #lm-user-bar .lm-user-bar-item.is-bell { display: none !important; }
}

@media (max-width: 600px) {
    .ktr-bar { padding: 0 12px 0 0; gap: 4px; } /* sin padding izquierdo → Ruleta al borde */
    .ktr-logo-img { height: 38px; }
    .ktr-side-btn span, .ktr-icon-btn span { display: none; }
    .ktr-side-btn, .ktr-icon-btn { padding: 8px; }
    .ktr-burger { padding: 8px 10px; }
    .ktr-ruleta-btn {
        gap: 2px;
        padding-inline: 4px;
    }
    .ktr-ruleta-btn .ktr-ruleta-copy {
        display: flex !important;
    }
    .ktr-ruleta-btn .ktr-ruleta-sub {
        display: none !important;
    }
    .ktr-ruleta-btn .ktr-ruleta-count {
        font-size: 9px;
        line-height: 1;
        letter-spacing: 0;
    }
}
