/* 工具页汉堡：单列图标列表（HuyTalk 为标准，覆盖各页旧菜单样式） */

.navbar .mobile-menu.ht-drawer-shell,
.mobile-menu.ht-drawer-shell {
  display: none;
  position: absolute;
  top: 100%;
  left: auto !important;
  right: max(0.75rem, env(safe-area-inset-right, 0px)) !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  margin-top: 0.45rem;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  overflow: visible !important;
  z-index: 100102;
}

.mobile-menu.ht-drawer-shell.active {
  display: block !important;
}

.navbar .mobile-menu-toggle {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.2rem;
  height: 2.2rem;
  box-sizing: border-box;
  padding: 0;
  border: 1.5px solid transparent;
  border-radius: 0.42rem;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.navbar .mobile-menu-toggle span {
  display: block;
  flex: 0 0 auto;
  width: 1.35rem;
  height: 2.5px;
  margin: 0 !important;
  border-radius: 2px;
  background-color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.navbar .mobile-menu-toggle:active {
  transform: scale(0.9);
}

.navbar .mobile-menu-toggle.active {
  border-color: #ff3b30;
  background: rgba(255, 59, 48, 0.18);
  animation: ht-drawer-toggle-pop 0.3s ease;
}

.navbar .mobile-menu-toggle.active span {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 1rem !important;
  height: 2.5px !important;
  margin: 0 !important;
  background-color: #ff3b30 !important;
  box-shadow: none !important;
}

.navbar .mobile-menu-toggle.active span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg) !important;
}

.navbar .mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0 !important;
  transform: translate(-50%, -50%) scaleX(0) !important;
}

.navbar .mobile-menu-toggle.active span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg) !important;
}

@keyframes ht-drawer-toggle-pop {
  0% { transform: scale(0.86) rotate(-8deg); }
  70% { transform: scale(1.08) rotate(2deg); }
  100% { transform: scale(1) rotate(0); }
}

.ht-drawer-menu {
  width: min(20.5rem, calc(100vw - 2rem));
  max-height: min(78dvh, 40rem);
  overflow: auto;
  padding: 0.7rem 0.55rem 0.65rem;
  border-radius: 1.45rem;
  background: rgba(18, 18, 20, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(28px) saturate(1.2);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
  -webkit-overflow-scrolling: touch;
}

.ht-drawer-label {
  margin: 0.55rem 0.7rem 0.28rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 226, 216, 0.42);
  opacity: 0;
}

.ht-drawer-label:first-child {
  margin-top: 0.15rem;
}

.navbar .mobile-nav-link.ht-drawer-item,
.ht-drawer-item {
  --d: 0s;
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
  min-height: 3.15rem;
  padding: 0.55rem 0.7rem !important;
  border-radius: 0.95rem;
  color: rgba(255, 255, 255, 0.92) !important;
  text-shadow: none !important;
  text-decoration: none;
  font-size: 0.98rem !important;
  font-weight: 550 !important;
  letter-spacing: 0.01em;
  line-height: 1.2;
  opacity: 0;
  transform: translateY(6px);
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}

.ht-drawer-ico {
  flex: 0 0 2.05rem;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(253, 232, 129, 0.92);
  font-size: 0.82rem;
}

.ht-drawer-item:hover,
.ht-drawer-item:focus-visible {
  background: rgba(255, 255, 255, 0.14) !important;
  outline: none;
}

.ht-drawer-item:hover .ht-drawer-ico,
.ht-drawer-item:focus-visible .ht-drawer-ico {
  background: rgba(255, 255, 255, 0.14);
}

.ht-drawer-item.is-active,
.ht-drawer-item.app-nav-active,
.ht-drawer-item.active,
.ht-drawer-item[aria-current="page"] {
  display: none !important;
}

.ht-drawer-item--muted {
  color: rgba(255, 255, 255, 0.58);
  font-weight: 500;
}

.ht-drawer-item--muted .ht-drawer-ico {
  color: rgba(255, 255, 255, 0.5);
}

@keyframes ht-drawer-row {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ht-drawer-panel {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.mobile-menu.active .ht-drawer-menu {
  animation: ht-drawer-panel 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mobile-menu.active .ht-drawer-item,
.mobile-menu.active .ht-drawer-label {
  animation: ht-drawer-row 0.34s ease both;
  animation-delay: var(--d, 0s);
}

@media (prefers-reduced-motion: reduce) {
  .ht-drawer-menu,
  .ht-drawer-item,
  .ht-drawer-label,
  .navbar .mobile-menu-toggle.active {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
