.dd {
  position: relative;
}
.dd-trigger {
  appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  transition:
    background-color .12s ease,
    border-color .12s ease,
    box-shadow .12s ease;
}
.dd-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.skin-panel .dd-trigger:disabled {
  background: var(--sunken);
  color: var(--ink-2);
  cursor: not-allowed;
}
.dd-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dd-value.is-placeholder {
  color: var(--ink-3);
}
.dd-chevron {
  flex: none;
  color: inherit;
  transition: transform .15s ease;
}
.dd-trigger.is-open .dd-chevron {
  transform: rotate(180deg);
}
.skin-panel .dd-trigger,
.skin-pill .dd-trigger {
  color: var(--ink);
}
.skin-panel .dd-chevron,
.skin-pill .dd-chevron {
  color: var(--ink-3);
}
.skin-pill .dd-trigger {
  padding: 0 8px 0 4px;
}
.skin-chrome .dd-trigger {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--ink);
  font-size: var(--fs-md);
  font-weight: 600;
}
.skin-chrome .dd-chevron {
  color: var(--ink);
}
.dd-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 180px;
  max-width: 320px;
  width: max-content;
  background: var(--sunken);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--float);
  padding: 6px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dd-list {
  overflow-y: auto;
  min-height: 0;
  max-height: 180px;
}
.dd-search {
  flex: none;
  height: 32px;
  margin: 0 0 6px;
  padding: 0 10px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: var(--fs-md);
  font-family: inherit;
  outline: none;
}
.dd-search::placeholder {
  color: var(--ink-3);
}
.dd-search:focus {
  border-color: var(--accent);
}
.dd-group {
  padding: 8px 10px 4px;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink-3);
  cursor: default;
}
.dd-group:not(:first-child) {
  margin-top: 4px;
  border-top: 1px solid var(--line);
}
.dd-empty {
  padding: 8px 10px;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  white-space: nowrap;
}
.skin-chrome .dd-menu,
.skin-panel .dd-menu {
  min-width: 100%;
}
.dd .dd-menu.is-flip {
  left: auto;
  right: 0;
}
.dd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  font-size: var(--fs-md);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.dd-item:hover,
.dd-item.is-active {
  background: var(--sunken);
}
.dd-item.is-selected {
  color: var(--accent);
  font-weight: 600;
}
.dd-item.is-disabled {
  color: var(--ink-3);
  cursor: not-allowed;
}
.dd-item.is-disabled:hover {
  background: none;
}
.dd-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dd-check {
  flex: none;
  color: var(--accent);
}
.dd-item.is-two-line {
  height: auto;
  min-height: 36px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.dd-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.dd-item-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.dd-item-meta {
  flex: none;
  font-size: var(--fs-xs);
  color: var(--ink-3);
  font-weight: 400;
}
.dd-item-desc {
  font-size: var(--fs-xs);
  color: var(--ink-3);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dd-menu:has(.is-two-line) .dd-list {
  max-height: 260px;
}
@media (pointer: coarse) {
  .dd-trigger {
    min-height: 44px;
  }
  .dd-item {
    min-height: 44px;
  }
  .dd-search {
    height: auto;
    min-height: 44px;
    font-size: 16px;
  }
}
.combo {
  position: relative;
}
.combo-field {
  position: relative;
}
.combo .combo-input {
  display: block;
  padding-right: 32px;
}
.combo.is-invalid .combo-input {
  border-color: var(--crit);
}
.combo-toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--ink-3);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.combo-toggle:hover {
  color: var(--ink);
}
.combo-chevron {
  flex: none;
  pointer-events: none;
  transition: transform .15s ease;
}
.combo.is-open .combo-chevron {
  transform: rotate(180deg);
}
.combo-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  background: var(--sunken);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--float);
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
}
.combo-group + .combo-group {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.combo-group-label {
  padding: 4px 10px 2px;
  font-size: var(--fs-xs);
  color: var(--ink-3);
}
.combo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  font-size: var(--fs-md);
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.combo-item:hover,
.combo-item.is-active {
  background: var(--sunken);
}
.combo-item.is-selected {
  color: var(--accent);
  font-weight: 600;
}
.combo-item-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo-item-count {
  flex: none;
  font-size: var(--fs-xs);
  font-weight: 400;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.combo-check {
  flex: none;
  color: var(--accent);
}
.combo-item.is-extra {
  color: var(--accent);
  font-weight: 600;
}
.combo-item.is-extra:hover,
.combo-item.is-extra.is-active {
  background: var(--accent-tint);
}
.combo-empty {
  padding: 8px 10px;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  white-space: nowrap;
}
.combo-status {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--ink-2);
}
.combo-status.is-bad {
  color: var(--crit);
}
.combo-status.is-new {
  color: var(--accent);
}
.combo-fix {
  margin-left: 6px;
  padding: 1px 8px;
  font: inherit;
  font-size: var(--fs-sm);
  line-height: 1.4;
  cursor: pointer;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
}
.combo-fix:hover {
  background: var(--sunken);
}
@media (pointer: coarse) {
  .combo-item {
    min-height: 44px;
  }
  .combo-toggle {
    width: 44px;
  }
  .combo .combo-input {
    padding-right: 46px;
  }
}
