#ios-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  display: flex;
  align-items: flex-end;
}
#ios-menu-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.ios-menu-panel {
  width: 100%;
  max-height: 88vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, .12);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
}
#ios-menu-overlay.is-active .ios-menu-panel {
  transform: translateY(0);
}
.ios-menu-handle {
  width: 36px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}
.ios-menu-header {
  padding: 10px 14px 12px;
  border-bottom: 0.5px solid #f3f4f6;
  flex-shrink: 0;
}
.ios-menu-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ios-menu-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f3f4f6;
  color: #374151;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background .15s;
}
.ios-menu-close:hover { background: #e5e7eb; }
.ios-menu-search-wrap { position: relative; }
#ios-search {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  color: #111;
  padding: 0 16px;
  outline: none;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color .15s, background .15s;
}
#ios-search::placeholder { color: #9ca3af; }
#ios-search:focus { border-color: #1d4ed8; background: #fff; }
#ios-search-results {
  margin-top: 8px;
  display: none;
  border-radius: 12px;
  overflow: hidden;
  border: 0.5px solid #e5e7eb;
  background: #fff;
}
#ios-search-results.has-results { display: block; }
.ios-search-item {
  padding: 12px 16px;
  border-top: 0.5px solid #f3f4f6;
  cursor: pointer;
  color: #111;
  font-size: 14px;
  transition: background .12s;
}
.ios-search-item:first-child { border-top: 0; }
.ios-search-item:hover { background: #f9fafb; }
#ios-menu {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 220px;
}
.ios-view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  left: 100%;
  padding: 6px 0 12px;
  transition: left 0.26s ease;
}
.ios-view.active { left: 0; }
.ios-back {
  display: flex;
  align-items: center;
  gap: 6px;
  width: calc(100% - 28px);
  margin: 6px 14px 10px;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  padding: 0 14px;
  cursor: pointer;
  transition: background .15s;
}
.ios-back:hover { background: #e5e7eb; }
.ios-item {
  min-height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 0.5px solid #f3f4f6;
  cursor: pointer;
  transition: background .12s;
}
.ios-item:hover, .ios-item:active { background: #f9fafb; }
.ios-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}
.ios-item-icon--sub {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 12px;
}
.ios-item-title { font-size: 15px; color: #111; flex: 1; }
.ios-item-chevron { color: #9ca3af; font-size: 12px; }
.ios-menu-footer {
  padding: 10px 14px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 0.5px solid #f3f4f6;
  flex-shrink: 0;
}
.ios-menu-support-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: #7c3aed;
  color: #fff !important;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none !important;
  transition: background .15s;
}
.ios-menu-support-btn:hover { background: #6d28d9; }
@media (min-width: 992px) {
  #ios-menu-overlay { display: none !important; }
}
