/* CANTAIMY v7.6.96 — consolidated mobile UI integration on top of v7.6.94
   Includes the accepted mobile changes from v7.6.82–v7.6.89 without carrying
   forward the intermediate conflicting overrides. */

.mobile-logout-nav{display:none;}

@media (max-width:820px){
  /* PROFILE: remove oversized hero, keep editable profile + password + logout. */
  #profile .unified-subpage-hero{display:none!important;}
  #profile .unified-subpage-shell{
    width:100%!important;max-width:none!important;margin:0!important;padding:12px 0 0!important;
  }
  #profile .unified-content-panel{width:100%!important;margin:0!important;padding:0!important;}
  #profile .profile-shell{
    width:calc(100vw - 28px)!important;margin:0 auto 118px!important;gap:10px!important;
  }
  #profile .subscription-card{display:none!important;}
  #profile .profile-identity-card{
    padding:14px!important;min-height:100px!important;
    background:linear-gradient(135deg,rgba(255,59,200,.045),rgba(0,232,255,.025))!important;
  }
  #profile .profile-info-card,
  #profile .profile-security-card{padding:14px!important;}
  #profile .profile-security-card .profile-help{
    margin:8px 0 0!important;font-size:11px!important;line-height:1.4!important;opacity:.72!important;
  }
  #profile #changePasswordBtn{
    width:100%!important;min-height:46px!important;margin-top:4px!important;border-radius:12px!important;font-weight:800!important;
  }
  #profile .profile-actions-card{
    display:grid!important;min-height:auto!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;
  }
  #profile #profileAdminBtn{display:none!important;}
  #profile #profileLogoutBtn{
    width:100%!important;min-height:50px!important;height:50px!important;margin:2px 0 0!important;padding:0 18px!important;
    border:1px solid rgba(255,74,157,.52)!important;border-radius:13px!important;
    background:linear-gradient(135deg,rgba(255,45,169,.22),rgba(176,66,255,.18))!important;
    color:#fff!important;font-size:14px!important;font-weight:850!important;letter-spacing:.01em!important;
    box-shadow:0 0 0 1px rgba(255,255,255,.025) inset,0 10px 28px rgba(255,45,169,.10)!important;
  }
  #profile #profileLogoutBtn:active{transform:translateY(1px)!important;}

  /* HOME: compact hero so content starts higher. */
  #home .v6-header{
    gap:8px!important;
    padding:calc(72px + env(safe-area-inset-top)) 16px 10px!important;
  }
  #home .v6-intro h1{
    max-width:300px!important;margin:0 0 8px!important;
    font-size:clamp(25px,7.1vw,32px)!important;line-height:1!important;letter-spacing:-.04em!important;
  }
  #home .v6-search,#home .v670-search{height:44px!important;}
  #home .catalog-searchbox{font-size:13px!important;}

  /* DRAWER: one compact logo, full-height scrolling, above the fixed player. */
  body.mobile-menu-open #home::before,
  body.mobile-menu-open #home > .mobile-top-logo,
  body.mobile-menu-open #home > .mobile-menu-btn{display:none!important;}

  #home .v6-sidebar{
    z-index:60020!important;top:0!important;bottom:0!important;
    height:100dvh!important;max-height:100dvh!important;
    overflow-x:hidden!important;overflow-y:auto!important;
    overscroll-behavior-y:contain!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;
    padding:calc(10px + env(safe-area-inset-top)) 14px calc(22px + env(safe-area-inset-bottom))!important;
  }
  #home .mobile-menu-close{z-index:60030!important;}
  #home .mobile-nav-backdrop:not([hidden]){z-index:60010!important;}
  #home .v6-sidebar .v68-brand{
    min-height:42px!important;height:42px!important;margin:0 0 3px!important;
    padding:0 46px 0 0!important;display:flex!important;align-items:center!important;flex:0 0 42px!important;
  }
  #home .v6-sidebar .v68-logo{width:122px!important;max-width:122px!important;height:auto!important;}
  #home .v6-sidebar .v6-language{flex:0 0 auto!important;margin:1px 0 6px!important;}
  #home .v6-sidebar .v6-nav{
    display:flex!important;flex-direction:column!important;flex:0 0 auto!important;
    min-height:max-content!important;overflow:visible!important;padding:0 0 4px!important;
  }
  #home .v6-sidebar .v6-nav button{min-height:36px!important;}
  #home .v6-sidebar .v6-nav-divider{margin:2px 8px!important;}

  /* LOGOUT: final normal drawer item; it scrolls with the drawer and remains above player. */
  #home .v6-sidebar #mobileLogoutNavBtn.mobile-logout-nav{
    position:static!important;display:flex!important;visibility:visible!important;opacity:1!important;
    flex:0 0 auto!important;min-height:42px!important;width:100%!important;margin:7px 0 4px!important;padding:0 11px!important;
    align-items:center!important;justify-content:flex-start!important;gap:9px!important;
    border:1px solid rgba(255,98,151,.34)!important;border-radius:10px!important;
    background:rgba(255,61,137,.07)!important;color:#ff9bbb!important;font-size:14px!important;font-weight:700!important;box-shadow:none!important;
  }
  #home .v6-sidebar #mobileLogoutNavBtn .v6-nav-icon{color:#ff77ac!important;}
  #home .v6-sidebar #mobileLogoutNavBtn:active{transform:translateY(1px)!important;background:rgba(255,61,137,.12)!important;}
}

@media (max-width:420px){
  #home .v6-header{padding-left:12px!important;padding-right:12px!important;padding-bottom:9px!important;}
  #home .v6-intro h1{max-width:285px!important;font-size:clamp(24px,7.4vw,30px)!important;}
}
