/* ===== 手机抽屉目录：一级分类卡片 + 二级功能宫格（2026-10-18）=====
   手机端不再复刻 PC 侧栏的纵向长列表：
   - 一级目录以 2 列卡片展示，直接看到分类和内容概览；
   - 点分类进入抽屉内的二级宫格，CDN 管理独立成一张卡片；
   - 当前栏目、当前 CDN 功能都有明确的选中态。
   只作用于 .drawer-menu，PC 侧栏不受影响。
*/
html body .drawer-menu {
  width: min(88vw, 360px) !important;
  max-width: 360px;
  background: #fff;
  --k8m-text: #1d2433;
  --k8m-sub: #7c8698;
  --k8m-line: #edf0f5;
  --k8m-blue: #2563eb;
  --k8m-blue-soft: #eef4ff;
  --k8m-muted-bg: #f4f6fa;
}
html body .drawer-menu .el-drawer__body {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
}
html body .drawer-menu .drawer-menu-top {
  flex: 0 0 64px;
  width: 100% !important;
  height: 64px;
  padding: 0 16px 0 18px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--k8m-line);
}
html body .drawer-menu .drawer-menu-logo {
  height: 30px;
  max-width: 152px;
  margin: 0;
}
html body .drawer-menu .k8m-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f4f6fa;
  color: #667085;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
html body .drawer-menu .k8m-close:active {
  background: #e9edf4;
}
html body .drawer-menu .k8m-close span {
  position: relative;
  width: 14px;
  height: 14px;
  display: block;
}
html body .drawer-menu .k8m-close span::before,
html body .drawer-menu .k8m-close span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  width: 1.5px;
  height: 14px;
  border-radius: 2px;
  background: currentColor;
}
html body .drawer-menu .k8m-close span::before {
  transform: rotate(45deg);
}
html body .drawer-menu .k8m-close span::after {
  transform: rotate(-45deg);
}
html body .drawer-menu .drawer-menu-list-top {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
}
html body .drawer-menu .k8m-nav {
  height: 100%;
  box-sizing: border-box;
  padding: 18px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ---------- 一级目录 ---------- */
html body .drawer-menu .k8m-head {
  margin: 0 2px 16px;
}
html body .drawer-menu .k8m-title {
  color: #101828;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}
html body .drawer-menu .k8m-subtitle {
  margin-top: 4px;
  color: #98a2b3;
  font-size: 12.5px;
  line-height: 1.5;
}
html body .drawer-menu .k8m-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
html body .drawer-menu .k8m-card {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 82px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 9px;
  border: 1px solid var(--k8m-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.035);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, border-color 0.15s, transform 0.12s;
}
html body .drawer-menu .k8m-card:active {
  transform: scale(0.985);
  background: #f8faff;
}
html body .drawer-menu .k8m-card.is-active {
  border-color: #b9ceff;
  background: linear-gradient(180deg, #f3f7ff 0%, #fff 100%);
}
html body .drawer-menu .k8m-card.is-cdn .k8m-icon {
  background: #e9f1ff;
  color: #1d4ed8;
}
html body .drawer-menu .k8m-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #f2f6ff;
  color: #2f6bff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}
html body .drawer-menu .k8m-icon .iconfont {
  font-size: 17px;
  line-height: 1;
}
html body .drawer-menu .k8m-card.is-active .k8m-icon {
  background: #e4eeff;
  color: #1d4ed8;
}
html body .drawer-menu .k8m-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
html body .drawer-menu .k8m-name {
  color: var(--k8m-text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html body .drawer-menu .k8m-card.is-active .k8m-name {
  color: #1d4ed8;
}
html body .drawer-menu .k8m-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  color: #98a2b3;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
html body .drawer-menu .k8m-arrow {
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  margin-right: 3px;
  border-top: 1.5px solid #c2cad8;
  border-right: 1.5px solid #c2cad8;
  transform: rotate(45deg);
}
html body .drawer-menu .k8m-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--k8m-line);
}
html body .drawer-menu .k8m-foot-link {
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
  text-decoration: none;
  padding: 6px 0;
}
html body .drawer-menu .k8m-foot-ver {
  color: #c0c6d1;
  font-size: 10.5px;
}

/* ---------- 二级功能宫格 ---------- */
html body .drawer-menu .k8m-subhead {
  margin: 0 2px 14px;
}
html body .drawer-menu .k8m-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 11px 0 8px;
  border: 0;
  border-radius: 10px;
  background: var(--k8m-muted-bg);
  color: #667085;
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
html body .drawer-menu .k8m-back:active {
  background: #e9edf4;
}
html body .drawer-menu .k8m-back-icon {
  width: 7px;
  height: 7px;
  border-left: 1.5px solid #667085;
  border-bottom: 1.5px solid #667085;
  transform: rotate(45deg);
}
html body .drawer-menu .k8m-subtitle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 2px 16px;
}
html body .drawer-menu .k8m-icon.is-lg {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 20px;
}
html body .drawer-menu .k8m-icon.is-lg .iconfont {
  font-size: 20px;
}
html body .drawer-menu .k8m-subname {
  flex: 1 1 auto;
  min-width: 0;
  color: #101828;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html body .drawer-menu .k8m-subcount {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--k8m-muted-bg);
  color: #98a2b3;
  font-size: 11px;
  line-height: 1.5;
}
html body .drawer-menu .k8m-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
html body .drawer-menu .k8m-items.is-cdn {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
html body .drawer-menu .k8m-item {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--k8m-line);
  border-radius: 12px;
  background: #fff;
  color: var(--k8m-text);
  font-family: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s, border-color 0.15s;
}
html body .drawer-menu .k8m-item:active {
  background: #f7f9ff;
}
html body .drawer-menu .k8m-items.is-cdn .k8m-item {
  min-height: 72px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 8px 4px;
  text-align: center;
}
html body .drawer-menu .k8m-item-icon {
  flex: 0 0 auto;
  color: #8a94a6;
  font-size: 16px;
  line-height: 1;
}
html body .drawer-menu .k8m-item-index {
  flex: 0 0 auto;
  min-width: 18px;
  padding: 2px 4px;
  border-radius: 6px;
  background: var(--k8m-muted-bg);
  color: #98a2b3;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}
html body .drawer-menu .k8m-item-name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--k8m-text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html body .drawer-menu .k8m-items.is-cdn .k8m-item-name {
  flex: 0 0 auto;
  width: 100%;
  font-size: 11.5px;
}
html body .drawer-menu .k8m-item.is-active {
  border-color: #b9ceff;
  background: var(--k8m-blue-soft);
}
html body .drawer-menu .k8m-item.is-active .k8m-item-name {
  color: #1d4ed8;
  font-weight: 600;
}
html body .drawer-menu .k8m-item.is-active .k8m-item-icon {
  color: #1d4ed8;
}
html body .drawer-menu .k8m-item.is-active .k8m-item-index {
  background: #dbe8ff;
  color: #1d4ed8;
}
html body .drawer-menu .k8m-tip {
  margin: 16px 2px 0;
  color: #b0b8c6;
  font-size: 11px;
  line-height: 1.6;
}
