/* Polyglot AI 5.0.2 - Mobile menu fix */
:root{
  --v502-dock-h:74px;
  --v502-safe-bottom:env(safe-area-inset-bottom,0px);
}
@media (max-width:980px){
  body.v502-menu-open{overflow:hidden!important;touch-action:none!important}
  .sidebar{display:none!important}
  body{padding-bottom:calc(var(--v502-dock-h) + var(--v502-safe-bottom))!important}
  .app-body{padding-bottom:calc(22px + var(--v502-dock-h) + var(--v502-safe-bottom))!important}
  .v502-mobile-dock{
    position:fixed;left:8px;right:8px;bottom:calc(8px + var(--v502-safe-bottom));
    z-index:2200;height:var(--v502-dock-h);display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;padding:7px;
    border:1px solid rgba(255,255,255,.14);border-radius:22px;
    background:rgba(15,25,46,.97);box-shadow:0 18px 50px rgba(0,0,0,.48);
    backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)
  }
  .v502-dock-item{
    min-width:0;border:0;background:transparent;color:#dbe6ff;border-radius:16px;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
    padding:5px 3px;font-size:10px;line-height:1.05;font-weight:750;text-align:center;
    -webkit-tap-highlight-color:transparent
  }
  .v502-dock-item .v502-icon{
    width:25px;height:25px;display:grid;place-items:center;border-radius:10px;
    font-size:18px;background:rgba(255,255,255,.055)
  }
  .v502-dock-item.active,.v502-dock-item:active{
    color:#fff;background:linear-gradient(145deg,rgba(139,92,246,.38),rgba(56,189,248,.14));
    box-shadow:0 0 0 1px rgba(196,181,253,.32) inset
  }
  .v502-menu-backdrop{
    position:fixed;inset:0;z-index:2240;background:rgba(2,6,18,.62);
    backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);
    opacity:0;pointer-events:none;transition:opacity .2s ease
  }
  .v502-menu-sheet{
    position:fixed;left:8px;right:8px;bottom:calc(8px + var(--v502-safe-bottom));
    z-index:2250;max-height:min(72dvh,650px);overflow:hidden;display:flex;flex-direction:column;
    border:1px solid rgba(255,255,255,.16);border-radius:26px;
    background:linear-gradient(165deg,#1b2a49,#111b31 72%);
    box-shadow:0 30px 90px rgba(0,0,0,.65);
    transform:translateY(calc(100% + 40px));opacity:0;pointer-events:none;
    transition:transform .24s cubic-bezier(.2,.8,.2,1),opacity .2s ease
  }
  body.v502-menu-open .v502-menu-backdrop{opacity:1;pointer-events:auto}
  body.v502-menu-open .v502-menu-sheet{transform:translateY(0);opacity:1;pointer-events:auto}
  .v502-sheet-handle{width:44px;height:5px;border-radius:999px;background:rgba(255,255,255,.22);margin:8px auto 3px;flex:none}
  .v502-sheet-head{
    display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
    padding:11px 16px 12px;border-bottom:1px solid rgba(255,255,255,.09);flex:none
  }
  .v502-sheet-head small{display:block;color:#9fb4dc;font-size:10px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;margin-bottom:3px}
  .v502-sheet-head h2{margin:0;color:#fff;font-size:22px;line-height:1.15}
  .v502-sheet-close{
    width:40px;height:40px;flex:none;display:grid;place-items:center;
    border:1px solid rgba(255,255,255,.13);border-radius:14px;background:rgba(255,255,255,.06);
    color:#fff;font-size:23px
  }
  .v502-sheet-content{overflow:auto;-webkit-overflow-scrolling:touch;padding:14px 14px calc(16px + var(--v502-safe-bottom))}
  .v502-sheet-group{margin-bottom:15px}.v502-sheet-group:last-child{margin-bottom:0}
  .v502-sheet-group-title{color:#9fb4dc;font-size:10px;font-weight:850;letter-spacing:.1em;text-transform:uppercase;margin:0 2px 8px}
  .v502-sheet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .v502-sheet-item{
    min-height:64px;border:1px solid rgba(255,255,255,.11);border-radius:17px;
    background:rgba(255,255,255,.045);color:#fff;display:grid;
    grid-template-columns:36px minmax(0,1fr);align-items:center;gap:10px;
    text-align:left;padding:10px 11px;font-size:13px;font-weight:750;line-height:1.25
  }
  .v502-sheet-item .v502-icon{
    width:36px;height:36px;border-radius:12px;display:grid;place-items:center;
    font-size:20px;background:linear-gradient(145deg,rgba(139,92,246,.24),rgba(56,189,248,.10))
  }
  .v502-sheet-item.active{
    border-color:rgba(196,181,253,.42);
    background:linear-gradient(145deg,rgba(139,92,246,.26),rgba(56,189,248,.09))
  }
  .v502-sheet-empty{color:#cbd8ef;text-align:center;padding:28px 10px;font-size:14px}
  .floating-coach,.fab,.ai-fab,.pwa-update-toast{
    bottom:calc(var(--v502-dock-h) + var(--v502-safe-bottom) + 18px)!important;
    z-index:2100!important
  }
}
@media (max-width:390px){
  :root{--v502-dock-h:70px}
  .v502-mobile-dock{left:5px;right:5px;bottom:calc(5px + var(--v502-safe-bottom));padding:6px 5px;gap:3px}
  .v502-dock-item{font-size:9px}
  .v502-dock-item .v502-icon{font-size:17px;width:23px;height:23px}
  .v502-menu-sheet{left:5px;right:5px;bottom:calc(5px + var(--v502-safe-bottom))}
  .v502-sheet-grid{gap:7px}
  .v502-sheet-item{font-size:12px;padding:9px;grid-template-columns:32px minmax(0,1fr)}
  .v502-sheet-item .v502-icon{width:32px;height:32px;font-size:18px}
}