.ui-field {
  display: grid;
  gap: 6px;
  padding: 8px 0;
}

.ui-label {
  font-weight: 600;
  font-size: 14px;
}

.ui-help {
  color: #777;
  font-size: 12px;
}

.ui-input,
.ui-number {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.ui-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.ui-toggle input {
  appearance: none;
  width: 36px;
  height: 22px;
  border-radius: 20px;
  border: 1px solid var(--line);
  position: relative;
  outline: none;
}

.ui-toggle input:before {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 16px;
  height: 16px;
  background: #999;
  border-radius: 50%;
  transition: .2s;
}

.ui-toggle input:checked:before {
  transform: translateX(14px);
  background: #111;
}

.ui-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ui-tag {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}

.ui-tag.active {
  background: #111;
  color: #fff;
}

.ui-accordion {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.ui-accordion summary {
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
  background: #fafafa;
}

.ui-accordion .panel {
  padding: 10px 12px;
}

/* detailGrid.js */
.unl-details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  margin-bottom: 10px;
}

/* summary 栏：左右布局：左标题，右侧全选开关 */
.unl-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

/* 隐藏默认三角箭头（可保留，如需） */
.unl-summary::-webkit-details-marker {
  display: none;
}

.unl-title {
  font-weight: 600;
  margin-left: 30px;
}

.unl-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #333;
}

.unl-actions input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

/* 内容：图片网格容器，最高 100px；超出滚动 */
.unl-grid-wrap {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
}

.unl-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px;
}

.unl-item {
  position: relative;
  width: 100%;
  user-select: none;
}

.unl-item .unl-hit {
  display: block;
  position: relative;
}

.unl-titlebar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  font-size: 13px;
  font-weight: 500;
  color: #111;
  text-align: center;
  padding: 2px 4px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(1px);
  text-shadow:
    -1px -1px 0 white,
    1px -1px 0 white,
    -1px 1px 0 white,
    1px 1px 0 white;

  /* ⬇️ 关键部分：超出自动省略 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unl-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: scale-down;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: block;
}

.unl-item input[type="checkbox"] {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 16px;
  height: 16px;
}

.unl-item {
  cursor: pointer;
}

.unl-item img {
  cursor: pointer;
}


.ui-button {
  display: inline-block;
  padding: 6px 12px;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.42857143;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  -ms-touch-action: manipulation;
  touch-action: manipulation;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background-image: none;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #fff;
  background-color: #467bb7;
  border-color: #567997;
}