
.msheet-btn, .msheet-ov { display: none; }

@media (max-width: 959px) {
  .hdr .wrap { display: flex; justify-content: flex-start; gap: 8px; }
  .hdr .wrap > .logo { margin-right: auto; }
  .hdr .wrap > .btn { flex: none; }

  .msheet-btn {
    display: flex; align-items: center; justify-content: center; flex: none;
    width: 44px; height: 44px; margin: 0 -6px 0 0; 
    color: var(--tx); border-radius: var(--r12);
    touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  }
  .msheet-ico {
    display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
    border-radius: var(--r8); background: var(--bg-elev); border: 1px solid var(--border-strong);
    transition: background-color var(--t-hover) var(--ease-out), border-color var(--t-hover) var(--ease-out), transform var(--t-press) var(--ease-out);
  }
  .msheet-btn:active .msheet-ico { transform: scale(.94); }
  .msheet-btn:focus-visible { outline: 2px solid #b78af7; outline-offset: -2px; }
  @media (hover: hover) and (pointer: fine) {
    .msheet-btn:hover .msheet-ico { background: var(--border-strong); border-color: var(--tx3); }
  }

  .msheet-ov {
    position: fixed; inset: 0; z-index: 290; display: none; align-items: flex-end; justify-content: center; padding: 0;
    background: rgba(12,12,12,0); transition: background-color 170ms var(--ease-out);
    overscroll-behavior: contain; -webkit-tap-highlight-color: transparent;
  }
  .msheet-ov.show { display: flex; }
  .msheet-ov.vis { background: rgba(12,12,12,.88); transition: background-color var(--t-ui) var(--ease-out); }
  .msheet-ov:not(.vis) { pointer-events: none; } 
  .msheet-ov.msheet-seco .msheet { visibility: hidden; transition: none; } 

  .msheet {
    position: relative; width: 100%; max-width: 100%; max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg-surface); border: 1px solid var(--border); border-bottom: 0; border-radius: 24px 24px 0 0;
    padding: 28px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    display: flex; flex-direction: column; gap: 8px;
    transform: translateY(100%); transition: transform 260ms var(--ease-out); 
  }
  .msheet-ov.vis .msheet { transform: none; transition: transform 420ms var(--ease-drawer); } 
  .msheet::before { content: ""; position: absolute; left: 50%; top: 8px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--border-strong); }
  .msheet-grab { position: absolute; left: 0; right: 0; top: 0; height: 28px; touch-action: none; cursor: grab; }
  .msheet-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; touch-action: none; }
  .msheet-marca { display: block; width: 55px; height: 20px; opacity: .92; }
  .msheet-close {
    display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: -15px; 
    border-radius: var(--r8); touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  }
  .msheet-close img { width: 14px; height: 14px; }
  .msheet-close:focus-visible, .msheet-item:focus-visible { outline: 2px solid #b78af7; outline-offset: 2px; }
  .msheet-close:active { transform: scale(.94); }

  .msheet-nav { display: flex; flex-direction: column; margin: 0 -16px; }
  .msheet-item {
    display: flex; align-items: center; min-height: 54px; padding: 0 16px; font-size: 18px; line-height: 24px; font-weight: 500; letter-spacing: -.18px;
    color: var(--tx); border-top: 1px solid var(--border); touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    transition: background-color 120ms var(--ease-out);
  }
  .msheet-item:active { background: var(--bg-elev); }
  .msheet-item:focus-visible { outline-offset: -2px; }
  @media (hover: hover) and (pointer: fine) { .msheet-item:hover { background: var(--bg-elev); } }
  .msheet-cta { width: 100%; margin-top: 12px; flex: none; }
  .msheet-cta img { width: 18px; height: 15.3px; }
  .msheet-top, .msheet-grab { user-select: none; -webkit-user-select: none; }
}

@media (min-width: 768px) and (max-width: 959px) {
  .msheet-ov { justify-content: center; }
  .msheet { width: 520px; max-width: calc(100% - 48px); margin-inline: auto; }
}

@media (max-width: 379px) {
  .hdr .wrap > .btn { min-width: 0; padding: 0 10px; gap: 6px; }
}
@media (max-width: 339px) {
  .hdr .wrap > .btn img { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .msheet-ov, .msheet-ov.vis { transition: background-color var(--t-fast) var(--ease-out); }
  .msheet, .msheet-ov.vis .msheet { transform: none !important; transition: opacity var(--t-fast) ease !important; }
  .msheet-ov:not(.vis) .msheet { opacity: 0; }
  .msheet-ico, .msheet-item { transition: none; }
  .msheet-btn:active .msheet-ico, .msheet-close:active { transform: none; }
}
html.rm .msheet-ov, html.rm .msheet-ov.vis, html.rm .msheet, html.rm .msheet-ov.vis .msheet, html.rm .msheet-ico, html.rm .msheet-item { transition: none !important; }
html.rm .msheet, html.rm .msheet-ov.vis .msheet { transform: none !important; }
html.rm .msheet-btn:active .msheet-ico, html.rm .msheet-close:active { transform: none; }
