/* ============================================================
   V9.9.64 · ESCRITORIO SOLO
   - Elimina la barra lateral azul en PC
   - Mantiene móvil intacto
   - Portada de inicio en cuadrícula a ancho completo
   - Iconos con el mismo diseño visual que la referencia móvil
   - Botón de volver al menú en el resto de pantallas
   ============================================================ */

@media (min-width:1024px){
  :root{--desktop-full-max:1360px}

  /* Sin barra lateral en todo escritorio */
  .layout{
    grid-template-columns:1fr !important;
  }
  .layout > .sidebar,
  .sidebar{
    display:none !important;
    width:0 !important;
    min-width:0 !important;
    max-width:0 !important;
    padding:0 !important;
    margin:0 !important;
    overflow:hidden !important;
    visibility:hidden !important;
  }

  .main{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    padding:18px 22px 24px !important;
  }

  .view,
  body:not(.home-screen) .view{
    width:min(100%,var(--desktop-full-max)) !important;
    margin:0 auto !important;
  }

  body:not(.home-screen) .main{
    background:linear-gradient(180deg,#f6f9fd 0%,#eef4fa 100%) !important;
  }

  .mobile-head,
  .mobile-nav{
    display:none !important;
  }

  /* Botón volver a menú para escritorio */
  .desktop-menu-btn{
    display:inline-flex !important;
    align-items:center !important;
    gap:10px !important;
    padding:11px 16px !important;
    margin:0 0 14px !important;
    border-radius:16px !important;
    border:1px solid #d5e1f0 !important;
    background:#fff !important;
    color:#17365d !important;
    font-weight:800 !important;
    box-shadow:0 10px 24px rgba(17,38,74,.08) !important;
    position:sticky !important;
    top:14px !important;
    z-index:25 !important;
  }
  body.home-screen .desktop-menu-btn{display:none !important}

  /* ============================================================
     INICIO DE ESCRITORIO · a ancho completo, limpio y visual
     ============================================================ */
  body.home-screen,
  body.home-screen .layout,
  body.home-screen .main,
  body.home-screen .launcher-view{
    overflow:hidden !important;
  }

  body.home-screen .main{
    padding:18px 22px 22px !important;
    background:#eef4fb !important;
    display:block !important;
    height:100vh !important;
  }

  body.home-screen .launcher-view{
    height:calc(100vh - 40px) !important;
    background:#eef4fb !important;
  }

  body.home-screen .home-premium-stage{
    height:100% !important;
    min-height:0 !important;
    padding:22px !important;
    border-radius:28px !important;
    background:linear-gradient(180deg,#f8fbff 0%,#eef4fb 100%) !important;
    box-shadow:0 20px 48px rgba(23,54,93,.08) !important;
    border:1px solid rgba(201,218,236,.9) !important;
    overflow:hidden !important;
  }

  /* En escritorio usamos la cuadrícula de accesos a ancho completo */
  body.home-screen .home-premium-art,
  body.home-screen .home-hotspots{
    display:none !important;
  }

  body.home-screen .home-desktop-canvas{
    display:grid !important;
    height:100% !important;
    grid-template-rows:auto 1fr !important;
    gap:18px !important;
  }

  body.home-screen .home-desktop-header{
    padding:0 2px !important;
  }

  body.home-screen .home-desktop-badge{
    display:inline-flex !important;
    padding:8px 14px !important;
    font-size:12px !important;
    font-weight:900 !important;
    letter-spacing:.12em !important;
    text-transform:uppercase !important;
    color:#2e5faa !important;
    background:#eaf2ff !important;
    border:1px solid #d8e4f7 !important;
    border-radius:999px !important;
    margin-bottom:10px !important;
  }

  body.home-screen .home-desktop-header h2{
    margin:0 0 8px !important;
    font-size:clamp(42px,3.6vw,56px) !important;
    line-height:1.02 !important;
    color:#17284d !important;
  }

  body.home-screen .home-desktop-header p{
    margin:0 !important;
    max-width:none !important;
    font-size:18px !important;
    line-height:1.45 !important;
    color:#536684 !important;
  }

  body.home-screen .home-desktop-grid{
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    grid-template-rows:repeat(3,minmax(0,1fr)) !important;
    gap:18px !important;
    min-height:0 !important;
    align-content:stretch !important;
  }

  body.home-screen .home-desktop-tile{
    position:relative !important;
    min-height:0 !important;
    height:100% !important;
    padding:0 !important;
    border:none !important;
    border-radius:28px !important;
    background-color:#ffffff !important;
    background-image:url('images/home-premium-v81-exact-user.png') !important;
    background-repeat:no-repeat !important;
    background-size:463% 585% !important;
    box-shadow:0 16px 34px rgba(23,54,93,.10), inset 0 0 0 1px rgba(222,232,244,.95) !important;
    overflow:hidden !important;
    transform:translateY(0) scale(1) !important;
    transition:transform .18s ease, box-shadow .18s ease !important;
  }

  body.home-screen .home-desktop-tile:hover{
    transform:translateY(-3px) scale(1.01) !important;
    box-shadow:0 20px 40px rgba(23,54,93,.14), inset 0 0 0 1px rgba(205,220,240,.95) !important;
  }

  body.home-screen .home-desktop-tile:focus-visible{
    outline:3px solid #6fb6ff !important;
    outline-offset:3px !important;
  }

  body.home-screen .home-desktop-tile .tile-icon,
  body.home-screen .home-desktop-tile .tile-label,
  body.home-screen .home-desktop-tile .tile-sub{
    position:absolute !important;
    width:1px !important;
    height:1px !important;
    overflow:hidden !important;
    clip:rect(0 0 0 0) !important;
    white-space:nowrap !important;
    clip-path:inset(50%) !important;
  }

  /* Coordenadas de cada acceso usando la portada como sprite */
  body.home-screen .tile-modulos{background-position:5.3% 20.5% !important}
  body.home-screen .tile-apuntes{background-position:35.2% 20.5% !important}
  body.home-screen .tile-tests{background-position:65.7% 20.5% !important}
  body.home-screen .tile-profesor{background-position:95.8% 20.5% !important}
  body.home-screen .tile-oficina{background-position:5.3% 42.2% !important}
  body.home-screen .tile-examen{background-position:35.2% 42.2% !important}
  body.home-screen .tile-progreso{background-position:65.7% 42.2% !important}
  body.home-screen .tile-buscar{background-position:95.8% 42.2% !important}
  body.home-screen .tile-documentos{background-position:5.3% 63.3% !important}
  body.home-screen .tile-esquemas{background-position:35.2% 63.3% !important}
  body.home-screen .tile-videos{background-position:65.7% 63.3% !important}
  body.home-screen .tile-fuentes{background-position:95.8% 63.3% !important}
}

/* Portátiles normales: ajusta el alto para que entren las 3 filas completas */
@media (min-width:1024px) and (max-height:820px){
  body.home-screen .main{padding:14px 18px 18px !important}
  body.home-screen .launcher-view{height:calc(100vh - 30px) !important}
  body.home-screen .home-premium-stage{padding:18px !important}
  body.home-screen .home-desktop-canvas{gap:14px !important}
  body.home-screen .home-desktop-grid{gap:14px !important}
  body.home-screen .home-desktop-header h2{font-size:clamp(34px,3.1vw,46px) !important}
  body.home-screen .home-desktop-header p{font-size:16px !important}
}

/* Equipos más estrechos de escritorio */
@media (min-width:1024px) and (max-width:1260px){
  body.home-screen .home-desktop-grid{gap:14px !important}
  body.home-screen .home-desktop-header h2{font-size:40px !important}
  body.home-screen .home-desktop-header p{font-size:16px !important}
}
