#shipColorsPanel {
  max-height: min(70vh, 650px);
  overflow-y: auto;
  scroll-margin-block: 12px;
}

#shipColorsPanel .ship-colors-heading,
#shipColorsPanel .ship-colors-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#shipColorsPanel h2 {
  margin: 6px 0 0;
}

#shipColorsPanel .ship-colors-intro {
  margin: 14px 0 18px;
  color: #d9e8f2;
  line-height: 1.5;
}

#shipColorsPanel .ship-colors-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

#shipColorsPanel .ship-color-field {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(125, 249, 255, 0.24);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(12, 29, 49, 0.95), rgba(3, 10, 22, 0.9));
}

#shipColorsPanel .ship-color-field > label {
  color: #eaf8ff;
  font-size: 17px;
  font-weight: 800;
}

#shipColorsPanel .ship-color-field > p {
  min-height: 40px;
  margin: 8px 0 16px;
  color: #b3c8d8;
  font-size: 13px;
  line-height: 1.5;
}

#shipColorsPanel .ship-color-inputs {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

#shipColorsPanel input {
  min-width: 0;
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  border: 1px solid rgba(125, 249, 255, 0.4);
  border-radius: 10px;
  background: #030c1b;
  color: #eaf8ff;
}

#shipColorsPanel input[type="color"] {
  padding: 4px;
  cursor: pointer;
}

#shipColorsPanel input[type="text"] {
  padding: 10px;
  font: 600 15px ui-monospace, Consolas, monospace;
}

#shipColorsPanel input[aria-invalid="true"] {
  border-color: #ff6247;
}

#shipColorsPanel .ship-color-swatches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

#shipColorsPanel .ship-color-swatch {
  position: relative;
  min-height: 44px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: var(--swatch-color);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.3);
}

#shipColorsPanel .ship-color-swatch[aria-pressed="true"] {
  border-color: #fff;
}

#shipColorsPanel .ship-color-swatch[aria-pressed="true"]::after {
  content: '\2713';
  color: #020711;
  font: 900 24px "Segoe UI", sans-serif;
}

#shipColorsPanel .ship-colors-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(125, 249, 255, 0.18);
}

#shipColorsStatus {
  flex: 1 1 240px;
  margin: 0;
  color: #7df9ff;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 760px) {
  #shipColorsPanel .ship-colors-fields { grid-template-columns: 1fr; }
  #shipColorsPanel .ship-color-field > p { min-height: 0; }
  #shipColorsPanel .ship-color-swatches { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 430px) {
  #shipColorsPanel .ship-color-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

#shipColorsPanel .ship-color-original {
  margin-top: 8px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(234, 248, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(234, 248, 255, 0.85);
  font-size: 12px;
  cursor: pointer;
}
#shipColorsPanel .ship-color-original:hover,
#shipColorsPanel .ship-color-original:focus-visible {
  border-color: rgba(73, 245, 255, 0.7);
  color: #fff;
}
