#rd-visualizer {
  --rd-blue: #173b63;
  --rd-orange: #f58220;
  --rd-text: #1f2937;
  --rd-muted: #6b7280;
  --rd-border: #e1e5e9;

  width: 100%;
  max-width: 1180px;
  margin: 0 auto 30px;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--rd-text);
}

#rd-visualizer * {
  box-sizing: border-box;
}

.rd-title {
  margin-bottom: 24px;
}

.rd-eyebrow {
  color: var(--rd-orange);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 7px;
}

.rd-title h2 {
  margin: 0 0 8px;
  color: var(--rd-blue);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
}

.rd-title p {
  margin: 0;
  color: var(--rd-muted);
  font-size: 16px;
}

.rd-grid {
  display: grid;
  grid-template-columns: 1fr .88fr;
  gap: 24px;
  align-items: start;
}

.rd-card {
  background: #fff;
  border: 1px solid var(--rd-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 28px rgba(0,0,0,.055);
}

.rd-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.rd-step {
  color: var(--rd-orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
}

.rd-card h3 {
  margin: 5px 0 0;
  color: var(--rd-blue);
  font-size: 22px;
}

.rd-help {
  margin: 11px 0 18px;
  color: var(--rd-muted);
  font-size: 14px;
  line-height: 1.5;
}

.rd-total-box {
  min-width: 84px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #eef8f1;
  text-align: center;
}

.rd-total-box small {
  display: block;
  color: #777;
  font-size: 10px;
}

.rd-total-box strong {
  display: block;
  margin-top: 3px;
  color: #26834a;
  font-size: 19px;
}

.rd-row {
  display: grid;
  grid-template-columns: 48px minmax(130px,1fr) 96px 30px;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #edf0f2;
}

.rd-swatch {
  width: 48px;
  height: 48px;
  border: 1px solid #d6dade;
  border-radius: 8px;
  background-color: #f2f2f2;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 120px 120px;
}

.rd-select,
.rd-percent {
  width: 100%;
  height: 43px;
  border: 1px solid #d5d9dd;
  border-radius: 8px;
  background: #fff;
  color: #3d4248;
  padding: 8px 10px;
  font-size: 14px;
}

.rd-percent-wrap {
  position: relative;
}

.rd-percent {
  padding-right: 28px;
}

.rd-percent-mark {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #90969e;
  pointer-events: none;
}

.rd-remove {
  border: 0;
  background: transparent;
  color: #a0a6ad;
  cursor: pointer;
  font-size: 22px;
}

.rd-remove:hover {
  color: #c0392b;
}

.rd-add {
  width: 100%;
  min-height: 49px;
  margin-top: 18px;
  border: 1px dashed #aeb8c3;
  border-radius: 9px;
  background: #fafbfc;
  color: var(--rd-blue);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.rd-add span {
  color: var(--rd-orange);
  font-size: 21px;
  margin-right: 6px;
}

.rd-add:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.rd-total-message {
  min-height: 22px;
  margin-top: 11px;
  font-size: 13px;
}

.rd-regenerate {
  border: 1px solid #d7dce1;
  border-radius: 8px;
  background: #fff;
  color: #626971;
  padding: 8px 11px;
  font-size: 12px;
  cursor: pointer;
}

.rd-regenerate:hover {
  background: #f6f7f8;
}

.rd-preview-wrap {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin: 18px auto 15px;
  overflow: hidden;
  border: 7px solid #555b61;
  border-radius: 14px;
  background: #353636;
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
}

#rd-canvas {
  display: block;
  width: 100%;
  height: 260px;
}

.rd-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(255,255,255,.94);
  color: var(--rd-blue);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.rd-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-bottom: 16px;
}

.rd-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #e0e3e6;
  border-radius: 22px;
  background: #fafafa;
  font-size: 11px;
}

.rd-chip-swatch {
  width: 21px;
  height: 21px;
  border: 1px solid #cbd0d5;
  border-radius: 50%;
  background-position: center;
  background-size: 80px 80px;
  background-repeat: no-repeat;
}

.rd-disclaimer {
  border-top: 1px solid #e5e8eb;
  padding-top: 14px;
  color: #737a83;
  font-size: 11px;
  line-height: 1.5;
}

.rd-disclaimer strong {
  color: #50575e;
}

.rd-disclaimer p,
.rd-pool-disclaimer p {
  margin: 3px 0 0;
}

.rd-pool-card {
  margin-top: 24px;
}

.rd-beta-badge {
  padding: 7px 11px;
  border-radius: 18px;
  background: #eef4fa;
  color: var(--rd-blue);
  font-size: 11px;
  font-weight: 700;
}

.rd-pool-layout {
  display: grid;
  grid-template-columns: 270px minmax(0,1fr);
  gap: 24px;
  align-items: start;
}

.rd-pool-controls {
  border-right: 1px solid #eceff2;
  padding-right: 20px;
}

.rd-tool-group {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid #edf0f2;
}

.rd-tool-group:last-child {
  border-bottom: 0;
}

.rd-tool-label {
  display: block;
  margin-bottom: 8px;
  color: var(--rd-blue);
  font-size: 13px;
  font-weight: 700;
}

.rd-small-help {
  margin: -2px 0 12px;
  color: var(--rd-muted);
  font-size: 11px;
  line-height: 1.45;
}

.rd-upload-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 47px;
  padding: 10px 12px;
  border: 1px dashed #aab6c1;
  border-radius: 9px;
  background: #fafbfc;
  color: var(--rd-blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.rd-upload-button:hover {
  background: #f3f6f9;
}

.rd-upload-button input {
  display: none;
}

.rd-upload-button span {
  color: var(--rd-orange);
  font-size: 20px;
}

.rd-photo-name {
  margin-top: 7px;
  color: #878e97;
  font-size: 10px;
  word-break: break-word;
}

.rd-range-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0 5px;
  color: #626a73;
  font-size: 11px;
}

.rd-range-label strong {
  color: var(--rd-blue);
}

#rd-brush-size,
#rd-rubber-opacity {
  width: 100%;
  accent-color: var(--rd-orange);
}

.rd-tool-buttons,
.rd-view-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.rd-secondary-button,
.rd-view-button {
  min-height: 39px;
  border: 1px solid #d7dce1;
  border-radius: 8px;
  background: #fff;
  color: #555d66;
  cursor: pointer;
  font-size: 11px;
}

.rd-secondary-button:hover,
.rd-view-button:hover {
  background: #f7f8f9;
}

.rd-primary-button {
  width: 100%;
  min-height: 46px;
  margin-top: 16px;
  border: 0;
  border-radius: 9px;
  background: var(--rd-orange);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.rd-primary-button:hover {
  filter: brightness(.96);
}

.rd-view-active {
  border-color: var(--rd-blue);
  background: var(--rd-blue);
  color: #fff;
}

.rd-pool-preview-column {
  min-width: 0;
}

.rd-pool-stage {
  position: relative;
  width: 75%;
  max-width: 620px;
  margin: 0 auto;
  overflow: hidden;
  border: 6px solid #62686d;
  border-radius: 12px;
  background: #e6e8ea;
  box-shadow: 0 7px 20px rgba(0,0,0,.12);
  touch-action: none;
}

#rd-pool-canvas {
  display: block;
  width: 100%;
  min-height: 280px;
  background: #e7eaec;
  cursor: crosshair;
}

.rd-pool-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #757d86;
  background: #f4f5f6;
  text-align: center;
  pointer-events: none;
}

.rd-placeholder-icon {
  color: var(--rd-orange);
  font-size: 32px;
}

.rd-pool-placeholder strong {
  color: var(--rd-blue);
  font-size: 14px;
}

.rd-pool-placeholder span {
  font-size: 11px;
}

.rd-mask-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 75%;
  max-width: 620px;
  margin: 9px auto 14px;
  color: #737b84;
  font-size: 11px;
}

.rd-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aab0b6;
}

.rd-pool-disclaimer {
  width: 75%;
  max-width: 620px;
  margin: auto;
  padding-top: 12px;
  border-top: 1px solid #e2e5e8;
  color: #787f87;
  font-size: 10px;
  line-height: 1.5;
}

.rd-pool-disclaimer strong {
  color: #555d65;
}

@media (max-width: 900px) {
  .rd-pool-layout {
    grid-template-columns: 1fr;
  }

  .rd-pool-controls {
    border-right: 0;
    border-bottom: 1px solid #eceff2;
    padding-right: 0;
    padding-bottom: 10px;
  }
}

@media (max-width: 820px) {
  .rd-grid {
    grid-template-columns: 1fr;
  }

  .rd-pool-stage,
  .rd-mask-status,
  .rd-pool-disclaimer {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .rd-card {
    padding: 17px;
  }

  .rd-row {
    grid-template-columns: 40px 1fr 80px 26px;
    gap: 6px;
  }

  .rd-swatch {
    width: 40px;
    height: 40px;
  }

  #rd-canvas {
    height: 220px;
  }

  #rd-pool-canvas {
    min-height: 230px;
  }
}/* ======================================================
   FINAL PAGE CLEANUP
====================================================== */

/* Remove stray theme-generated dots / markers */
#rd-visualizer,
#rd-visualizer *,
#rd-visualizer *::before,
#rd-visualizer *::after {
  list-style: none;
}

#rd-visualizer::before,
#rd-visualizer::after,
.rd-grid::before,
.rd-grid::after,
.rd-card::before,
.rd-card::after,
.rd-pool-card::before,
.rd-pool-card::after {
  content: none !important;
  display: none !important;
}

/* Bring visualizer closer to the top of the page */
#rd-visualizer {
  margin-top: 0 !important;
}

/* Pull Design Tool content closer to the header */
#rd-visualizer {
  margin-top: -110px !important;
}