.msheet-ov {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(17, 17, 20, 0.42);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.msheet {
  width: 100%;
  max-width: 640px;
  max-height: 92dvh;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 44px rgba(17, 17, 20, 0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.msheet-grab {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 0 5px;
  cursor: grab;
  touch-action: none; 
}
.msheet-grab:active {
  cursor: grabbing;
}
.msheet-grab span {
  display: block;
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: var(--line-strong);
}
.msheet-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.msheet .modal-h,
.msheet .rv-sd-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
}
.msheet .drawer-b,
.msheet .rv-sd-body {
  overflow: visible; 
  height: auto;
}
.msheet .rv-sd-head,
.msheet .rv-sd-body,
.msheet .rv-sd-foot {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}
@media (max-width: 768px) {
  .app[data-type="rf"] {
    height: 100dvh;
  }
  .side,
  .side.collapsed {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100dvh;
    width: min(86vw, 300px);
    max-width: 300px;
    align-items: stretch;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
  }
  .side.side-m-open {
    transform: translateX(0);
    box-shadow: 12px 0 48px rgba(17, 17, 20, 0.22);
  }
  .side.collapsed .nav,
  .side.collapsed .side-top {
    padding: var(--sp-6) var(--sp-8) var(--sp-2);
    align-items: stretch;
  }
  .side.collapsed .nav-lbl,
  .side.collapsed .ws-name,
  .side.collapsed .nav a .cnt,
  .side.collapsed .nav-h {
    display: revert;
  }
  .side.collapsed .nav a {
    width: auto;
    height: auto;
    justify-content: flex-start;
    padding: var(--sp-6) var(--sp-8);
  }
  .side-backdrop {
    position: fixed;
    inset: 0;
    z-index: 290;
    background: rgba(17, 17, 20, 0.4);
    animation: rBackdropIn 0.2s ease;
  }
  @keyframes rBackdropIn {
    from {
      opacity: 0;
    }
  }
  .m-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: var(--sp-10);
    height: 52px;
    padding: 0 var(--sp-12);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .m-burger {
    width: 40px;
    height: 40px;
    margin-left: -6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: var(--r-sm);
    background: transparent;
    border: 1px solid transparent;
    flex: none;
  }
  .m-burger:active {
    background: var(--accent-tint);
  }
  .m-burger span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--t2);
  }
  .m-topbar-title {
    font-weight: var(--fw-semibold);
    font-size: var(--text-md);
    letter-spacing: -0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .main {
    width: 100%;
  }
  .wrap {
    padding: var(--sp-16) var(--sp-16) 64px;
    max-width: 100%;
  }
}
@media (max-width: 768px) {
  .ov {
    place-items: end center;
    padding: 0;
  }
  .modal {
    width: 100% !important;
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    animation: rSheetUp 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  }
  @keyframes rSheetUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }
  .ox-fab {
    bottom: calc(16px + env(safe-area-inset-bottom, 0));
    right: 14px;
  }
}
