/* Original menu controls move into a modal; bottom sheets remain the default. */
@media (max-width: 1050px) {
  dialog.mobile-menu-dialog {
    position:fixed; inset:0; box-sizing:border-box; width:100%; height:100dvh; max-width:none; max-height:none;
    margin:0; padding:0; border:0; border-radius:0; background:transparent; color:#17213b; overflow:hidden;
    font-family:var(--outlo-font-family,Inter,system-ui,sans-serif); font-size:13px; line-height:1.4; box-shadow:none;
  }
  dialog.mobile-menu-dialog:not([open]) { display:none; }
  dialog.mobile-menu-dialog[open] { display:flex; align-items:flex-end; justify-content:center; }
  dialog.mobile-menu-dialog::backdrop { background:transparent; }
  .mobile-menu-dialog .mobile-menu-scrim { position:absolute; inset:0; background:rgb(15 23 42 / .42); opacity:1; transition:opacity 180ms ease; }
  .mobile-menu-dialog[data-menu-phase="opening"] .mobile-menu-scrim { animation:mobileMenuScrimEnter 220ms ease-out; }
  .mobile-menu-dialog[data-menu-phase="closing"] .mobile-menu-scrim { opacity:0; }
  .mobile-menu-dialog .mobile-menu-shell {
    position:relative; z-index:1; display:flex; flex-direction:column; box-sizing:border-box; width:100%; min-width:0; min-height:0;
    max-height:min(86%,680px); border:1px solid #e1e4f2; border-bottom:0; border-radius:14px 14px 0 0;
    background:#f7f8fc; box-shadow:0 -12px 48px rgb(15 23 42 / .15); overflow:hidden; will-change:transform;
  }
  .mobile-menu-dialog[data-menu-phase="closing"] .mobile-menu-shell { pointer-events:none; }
  .mobile-menu-dialog .mobile-menu-header {
    position:relative; display:grid; flex:0 0 auto; grid-template-columns:minmax(0,1fr) 44px; align-items:center; gap:8px;
    box-sizing:border-box; min-height:66px; padding:14px 12px 8px; border-bottom:1px solid #e1e4f2;
    background:linear-gradient(115deg,#eeedfc,#f7f8fe); touch-action:none; user-select:none; cursor:grab;
  }
  .mobile-menu-dialog[data-menu-dragging] .mobile-menu-header { cursor:grabbing; }
  .mobile-menu-dialog .mobile-menu-grip { position:absolute; top:5px; left:calc(50% - 18px); width:36px; height:4px; border-radius:3px; background:#bcc3df; }
  .mobile-menu-dialog .mobile-menu-header-copy { min-width:0; }
  .mobile-menu-dialog .mobile-menu-caption { margin:0 0 2px; color:#69718b; font-size:10px; font-weight:500; line-height:1.3; }
  .mobile-menu-dialog .mobile-menu-title {
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
    margin:0; color:#17213b; font-size:15px; font-weight:650; line-height:1.3; overflow-wrap:anywhere; letter-spacing:-.015em;
  }
  .mobile-menu-dialog .mobile-menu-close {
    display:grid; place-items:center; box-sizing:border-box; width:44px; min-width:44px; height:44px; min-height:44px;
    margin:0; padding:0; border:1px solid #e2e3f2; border-radius:10px; background:#fff; background-image:none;
    color:#5b617a; font:inherit; font-size:25px; font-weight:400; line-height:1; box-shadow:none; cursor:pointer;
  }
  .mobile-menu-dialog .mobile-menu-close:hover { background:#eef0fb; color:#4338ca; transform:none; box-shadow:none; }
  body dialog.mobile-menu-dialog .mobile-menu-close.outlo-close { --outlo-close-size:44px; --outlo-close-icon-size:18px; padding:12px !important; }
  body dialog.mobile-menu-dialog .mobile-menu-close.outlo-close::after { inset:6px !important; }
  .mobile-menu-dialog .mobile-menu-body {
    flex:1 1 auto; min-width:0; min-height:0; padding:5px 10px max(10px,env(safe-area-inset-bottom));
    background:#fff; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y;
    -webkit-overflow-scrolling:touch; scrollbar-width:thin;
  }
  dialog.mobile-menu-dialog .mobile-menu-body > .mobile-menu-panel {
    position:static; inset:auto; display:block; box-sizing:border-box; width:100%; min-width:0; max-width:none; max-height:none;
    margin:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; overflow:visible; transform:none;
  }
  .mobile-menu-dialog :is(a,button):focus-visible { outline:2px solid var(--outlo-brand-accent,#4f46e5); outline-offset:-2px; }
  .mobile-menu-dialog [hidden] { display:none !important; }
  .mobile-menu-dialog :is(button:disabled,[aria-disabled="true"]) { opacity:.5; cursor:default; }
  /* Account navigation enters from its top-right trigger; contextual menus stay below. */
  dialog.mobile-menu-dialog[data-menu-placement="right"][open] { align-items:stretch; justify-content:flex-end; }
  .mobile-menu-dialog[data-menu-placement="right"] .mobile-menu-shell {
    flex:0 0 auto; width:min(88%,360px); height:100%; max-height:100%;
    border:0; border-left:1px solid #e1e4f2; border-radius:16px 0 0 16px;
    box-shadow:-12px 0 48px rgb(15 23 42 / .15);
  }
  .mobile-menu-dialog[data-menu-placement="right"] .mobile-menu-header {
    min-height:64px; padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 10px 16px;
    touch-action:pan-y;
  }
  .mobile-menu-dialog[data-menu-placement="right"] .mobile-menu-grip { display:none; }
  @keyframes mobileMenuScrimEnter { from {opacity:0;} to {opacity:1;} }
}
@media (max-width:1050px) and (prefers-reduced-motion:reduce) {
  .mobile-menu-dialog .mobile-menu-scrim { transition:none; animation:none; }
  .mobile-menu-dialog .mobile-menu-shell { will-change:auto; }
}
