html,body{max-width:100%;overflow-x:hidden}
.site-main,.site-header,.site-footer{max-width:100%;overflow-x:clip}

.site-main{min-height:calc(100vh - 220px)}
.mobile-bottom-nav{display:none}
@media (max-width:820px){
  body{padding-bottom:86px}
  .site-header{position:sticky;top:0;z-index:40;background:color-mix(in srgb, var(--bg) 88%, transparent);backdrop-filter:blur(16px)}
  .desktop-tools,.nav-desktop{display:none!important}
  .topbar{flex-direction:row;align-items:center;justify-content:space-between;padding:12px 0}
  .site-actions{width:auto;flex-direction:row;align-items:center}
  .mobile-menu-toggle{display:inline-flex}
  .logo-mark{width:42px;height:42px}
  .logo-title{font-size:22px}
  .logo-sub{display:none}
  .premium-grid,.profile-premium-grid,.footer-row{grid-template-columns:1fr!important}
  .premium-feature-grid{grid-template-columns:1fr 1fr}
  .homepage-seo-clean,.faq-grid{display:none}
  .mobile-bottom-nav{
    display:grid;grid-template-columns:repeat(4,1fr);gap:8px;position:fixed;left:10px;right:10px;bottom:10px;z-index:60;
    padding:10px;border-radius:22px;background:rgba(9,15,27,.94);border:1px solid rgba(138,171,224,.14);backdrop-filter:blur(18px);box-shadow:0 18px 40px rgba(0,0,0,.28)
  }
  .mobile-bottom-link{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:10px 6px;border-radius:16px;color:var(--muted);text-decoration:none;font-weight:700}
  .mobile-bottom-link span{font-size:20px;line-height:1}
  .mobile-bottom-link small{font-size:11px}
  .mobile-bottom-link.active{background:linear-gradient(135deg,rgba(37,99,235,.32),rgba(124,58,237,.24));color:#fff}
  .home-cards{gap:12px}
  .panel{padding:16px}
  .footer-links{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .footer-contact,.footer-meta{display:none}
}

@media (max-width:760px){
  .mobile-bottom-link small{font-size:11px}
  .mobile-bottom-link span{font-size:18px}
}

@media (max-width:820px){
  .site-main{padding-bottom:92px}
  .site-header .container,.site-footer .container,.panel,.premium-shell,.conversion-strip,.feature-compact-grid,.gallery-grid,.faq-grid{max-width:100%;min-width:0}
  .mobile-menu-backdrop{display:block!important;visibility:hidden;opacity:0;pointer-events:none}
  .mobile-menu-backdrop.is-visible{visibility:visible;opacity:1;pointer-events:auto}
  .mobile-menu-drawer{display:block!important;top:0;right:0;left:auto;width:min(88vw,320px);max-width:320px;height:100dvh;overflow-y:auto;overflow-x:hidden;padding:16px 14px 100px;border-radius:0;transform:translate3d(100%,0,0)}
  .mobile-menu-drawer.is-open{transform:translate3d(0,0,0)}
  .mobile-nav,.mobile-menu-tools{grid-template-columns:1fr!important}
  .mobile-nav a,.mobile-menu-submit{min-height:54px;padding:0 14px;font-size:18px;line-height:1.2;white-space:normal}
  .logo{min-width:0;max-width:calc(100vw - 84px)}
  .logo-text-wrap{min-width:0}
  .logo-title,.logo-sub{word-break:break-word}
  .mobile-bottom-nav{left:8px;right:8px;bottom:8px;padding:8px;border-radius:18px;gap:6px}
  .mobile-bottom-link{min-width:0;padding:9px 4px}
  .mobile-bottom-link small{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
}
@media (max-width:560px){
  .mobile-menu-drawer{width:100vw;max-width:100vw}
  .mobile-menu-head{position:sticky;top:0;padding-bottom:10px;background:linear-gradient(180deg,rgba(10,17,29,.98),rgba(10,17,29,.92));z-index:2}
  .mobile-menu-brand-copy span{max-width:160px}
  .gallery-grid{grid-template-columns:1fr!important}
}


@media (max-width:820px){
  body.menu-open{overflow:hidden;touch-action:none;overscroll-behavior:none}
  .desktop-tools,.nav-desktop{display:none!important;visibility:hidden!important;pointer-events:none!important}
  .site-header{isolation:isolate}
  .mobile-menu-backdrop{position:fixed!important;inset:0!important;z-index:79!important}
  .mobile-menu-drawer{position:fixed!important;top:0!important;right:0!important;left:auto!important;bottom:0!important;width:min(86vw,340px)!important;max-width:340px!important;min-width:0!important;margin:0!important;border-left:1px solid var(--line);border-right:0;z-index:80!important}
  .mobile-menu-drawer,.mobile-menu-drawer *{box-sizing:border-box;max-width:100%}
  .mobile-menu-brand{min-width:0}
  .mobile-menu-brand-copy{min-width:0}
  .mobile-menu-brand-copy strong,.mobile-menu-brand-copy span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mobile-nav a,.mobile-menu-submit{white-space:normal!important;word-break:break-word!important}
  .topbar,.site-actions,.logo,.logo-text-wrap{min-width:0}
}
@media (max-width:560px){
  .mobile-menu-drawer{width:100vw!important;max-width:100vw!important}
}

:root[data-theme="light"] .mobile-menu-head{background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(245,248,252,.92))}
