/* 首页输入框「+」面板：与输入卡同一套柔和圆角、轻阴影。
   根屏是四条动作的短菜单，高度随内容走；模块/技能列表由输入框实测固定高度，
   只有中间的 .ham-body 滚动，下沿始终钉在「+」按钮上方。 */

.v-menu__content.home-add-menu-content {
  border-radius: 20px !important;
  overflow: hidden !important;
  border: 1px solid rgba(28, 24, 64, 0.07) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 18px 44px -26px rgba(76, 62, 170, 0.3), 0 4px 14px -10px rgba(28, 24, 64, 0.12) !important;
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
}

.ham-panel {
  position: relative;
  width: 336px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 180px);
  max-height: min(364px, calc(100vh - 180px));
  max-height: min(364px, calc(100dvh - 180px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}

/* 搜索行只在模块/技能列表出现；根屏没有表头，内容从面板顶部开始。 */
.ham-search {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 11px 12px 10px;
  border-bottom: 1px solid rgba(28, 24, 64, 0.06);
}

.ham-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #4a5068;
  cursor: pointer;
}

.ham-back:hover { background: rgba(28, 24, 64, 0.05); }

.ham-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  color: #242940;
}

.ham-search-input::placeholder { color: #a6abbe; }

.ham-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: #b0b6c6;
  cursor: pointer;
}

.ham-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 6px 2px 8px 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(28, 24, 64, 0.24) transparent;
}

.ham-panel--root .ham-body { padding: 8px 2px 8px 6px; }

.ham-body::-webkit-scrollbar { width: 12px; height: 12px; }
.ham-body::-webkit-scrollbar-track { background: transparent; border: 0; }
.ham-body::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 4px solid transparent;
  border-radius: 999px;
  background-color: rgba(28, 24, 64, 0.2);
  background-clip: content-box;
}
.ham-body::-webkit-scrollbar-thumb:hover { background-color: rgba(28, 24, 64, 0.32); }
.ham-body::-webkit-scrollbar-corner { background: transparent; }

.ham-group { display: flex; flex-direction: column; }
/* 没有分组标题后，用极小的行距把三组动作自然分开。 */
.ham-group + .ham-group { margin-top: 4px; }

.ham-row {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border: none;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ham-row:hover:not(:disabled) { background: rgba(28, 24, 64, 0.05); }
.ham-row:disabled { opacity: 0.5; cursor: not-allowed; }

/* 图标只保留线形本身：不加彩色底、不加灰底，统一深墨色。 */
.ham-row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: transparent;
  color: #1f2438;
}

.ham-row-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  color: #242940;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 右侧技术名只是辅助信息：不抢主名称的宽度，窄屏直接收掉。 */
.ham-row-aside {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 38%;
  font-size: 11px;
  line-height: 1.3;
  color: #aeb4c4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ham-row-chevron { color: #b7bccb; flex-shrink: 0; }

.ham-row-tag {
  flex-shrink: 0;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 16px;
}

.ham-auto {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px 10px;
  font-size: 11.5px;
  line-height: 1.4;
  color: #9aa3b6;
  text-align: center;
}

.ham-auto--error { color: #b42318; }

.ham-auto-retry {
  padding: 0 2px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: #5c50cf;
  cursor: pointer;
}

.ham-state {
  padding: 22px 12px;
  text-align: center;
  font-size: 12.5px;
  color: #8c93a5;
}

.ham-state--error { color: #b42318; }

.ham-state--error button {
  margin-left: 6px;
  border: none;
  background: transparent;
  color: #5c50cf;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.ham-foot {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid rgba(28, 24, 64, 0.06);
  background: rgba(255, 255, 255, 0.72);
  font-size: 11.5px;
  color: #9aa3b6;
}

.ham-foot-count {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #7b8296;
}

.ham-foot-note { flex-shrink: 0; color: #a7adbd; }

.ham-foot-limit {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(28, 24, 64, 0.05);
  color: #5b6076;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ham-foot-spacer { flex: 1; }

.ham-foot-link {
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: #5b6076;
  cursor: pointer;
}

.ham-foot-link:hover { color: #242940; }

@media (max-width: 600px) {
  .ham-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 200px);
    max-height: min(340px, calc(100vh - 200px));
    max-height: min(340px, calc(100dvh - 200px));
  }
  .ham-row-aside { display: none; }
  .ham-foot-count { display: none; }
}
