.palette-shelf-dialog {
  width: min(850px, 95vw);
  max-width: 850px;
  max-height: 90vh;
  padding: 25px;
}
.shelf-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 24px;
}
.shelf-layout section {
  min-width: 0;
}
.shelf-layout input:not([type="range"]) {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  padding: 8px;
  font: inherit;
  font-size: 12px;
}
.shelf-layout .panel-heading button {
  font-size: 10px;
  padding: 6px;
}
.shelf-layout label {
  font-size: 11px;
}
.shelf-colors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.shelf-colors button {
  height: 36px;
  border: 3px solid transparent;
  color: white;
  text-shadow: 0 1px 3px #000;
}
.shelf-colors button.active {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--panel);
}
.shelf-color-actions {
  display: flex;
  gap: 6px;
  margin-top: 9px;
}
.shelf-color-actions button {
  font-size: 10px;
  padding: 6px;
}
.shelf-ground {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  font-size: 11px;
}
.shelf-ground i {
  display: block;
  width: 28px;
  height: 25px;
  border-radius: 4px;
  border: 1px solid #0002;
}
.shelf-ground[aria-pressed="true"] {
  border-color: var(--teal);
}
.shelf-mixer {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 15px;
  margin-top: 18px;
  align-items: center;
}
.palette-shelf-dialog .guide-wheel {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  touch-action: none;
  cursor: crosshair;
  margin: auto;
}
.palette-shelf-dialog .guide-wheel-disc {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle, white 0, transparent 70%),
    conic-gradient(from 90deg, red, #ff0, #0f0, #0ff, #00f, #f0f, red);
}
.palette-shelf-dialog .guide-wheel-cursor {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #234;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.shelf-record {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}
.shelf-record > strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.shelf-record-colors {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}
.shelf-record-colors > .vc-swatches {
  flex: 1;
}
.shelf-record-colors > i {
  width: 24px;
  height: 24px;
  border: 1px solid #0003;
  border-radius: 4px;
  flex-shrink: 0;
}
.shelf-record button {
  font-size: 10px;
  padding: 5px 9px;
  margin-right: 5px;
}
.shelf-error {
  color: #b85a42;
  font-size: 11px;
}
.shelf-open {
  margin-top: 8px;
  width: 100%;
  font-size: 11px;
  padding: 7px;
}
.density-ticks {
  display: flex;
  width: 100%;
  justify-content: space-between;
  font-size: 8px;
  color: var(--muted);
  margin-top: 3px;
}
.generator-settings > label:has(#generateDensity) {
  display: block;
}
.generator-settings #generateDensity {
  display: block;
  margin-top: 7px;
}
.collection-badge {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}
.collection-badge svg {
  display: block;
  width: 100%;
  height: 100%;
}
#generateRegionChoices .vc-mini {
  width: 38px !important;
  height: 38px !important;
}
#generateRegionChoices .vc-rows .vc-preview {
  width: 45px;
  height: 45px;
}
.palette-shelf-dialog #shelfRecords {
  max-height: 440px;
  overflow: auto;
  padding: 2px;
}
.palette-shelf-dialog .guide-used-colors {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.palette-shelf-dialog .guide-used-colors button {
  width: 16px;
  height: 16px;
  border: 1px solid #0002;
  border-radius: 50%;
  padding: 0;
  background: var(--saved-color);
}
.palette-shelf-dialog .guide-used-colors > span {
  font-size: 9px;
  color: var(--muted);
}
.palette-shelf-dialog #shelfChip {
  width: 15px;
  height: 15px;
  border-radius: 50%;
}
@media (max-width: 600px) {
  .shelf-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .palette-shelf-dialog {
    padding: 18px;
  }
  .shelf-mixer {
    grid-template-columns: 120px 1fr;
  }
  .shelf-layout h3 {
    font-size: 16px;
  }
}
