/* ReadyMadePrint - RMP Color Harmony Component Styles */

rmp-color-harmony-studio,
rmp-pantone-studio {
  --rp-ink: #17382e;
  --rp-muted: #64748b;
  --rp-green: #0e7a4a;
  --rp-green-hover: #0a5c37;
  --rp-green-light: #ecfdf5;
  --rp-line: #e2e8f0;
  --rp-paper: #f8fafc;
  --rp-white: #ffffff;
  --rp-surface: #f1f5f9;
  --rp-gold: #d97706;
  --rp-accent-border: #86efac;
  display: block;
  color: var(--rp-ink);
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: var(--rp-white);
  width: 100%;
  box-sizing: border-box;
}

rmp-color-harmony-studio *,
rmp-pantone-studio * {
  box-sizing: border-box;
}

rmp-color-harmony-studio button,
rmp-color-harmony-studio input,
rmp-color-harmony-studio select {
  font: inherit;
}

rmp-color-harmony-studio button {
  cursor: pointer;
  color: inherit;
}

rmp-color-harmony-studio button:focus-visible,
rmp-color-harmony-studio input:focus-visible,
rmp-color-harmony-studio select:focus-visible {
  outline: 3px solid #86efac;
  outline-offset: 2px;
}

.rp-shell {
  max-width: 100%;
  margin: 0 auto;
  padding: 24px;
}

/* Studio Header */
.rp-studio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1.5px solid var(--rp-line);
  margin-bottom: 22px;
}

.rp-header-left {
  flex: 1;
  min-width: 0;
}

.rp-badge-kicker {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--rp-green);
  background: var(--rp-green-light);
  border: 1px solid var(--rp-accent-border);
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.rp-studio-title {
  font: 700 24px/1.25 'Poppins', sans-serif;
  letter-spacing: -0.5px;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.rp-studio-sub {
  color: var(--rp-muted);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0;
  max-width: 780px;
}

.rp-header-right {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rp-pill {
  border: 1px solid var(--rp-line);
  border-radius: 999px;
  background: #f8fafc;
  padding: 6px 12px;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rp-pill-free {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
  font-weight: 700;
}

.rp-quiet {
  border: 1px solid var(--rp-line);
  border-radius: 999px;
  background: white;
  padding: 6px 12px;
  color: #475569;
  font-size: 11.5px;
  font-weight: 500;
  transition: all .15s ease;
}

.rp-quiet:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Source Action Bar */
.rp-source-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid var(--rp-line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 22px;
}

.rp-source-info-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #475569;
}

.rp-source-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* Layout */
.rp-layout {
  display: grid;
  grid-template-columns: minmax(460px, 1.15fr) minmax(360px, 0.85fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 22px;
}

@media (max-width: 1024px) {
  .rp-layout {
    grid-template-columns: 1fr;
  }
}

.rp-card-harmony-deck {
  width: 100%;
  margin-top: 0;
}

.rp-col-left {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.rp-card {
  background: var(--rp-white);
  border: 1px solid var(--rp-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.rp-card-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--rp-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fafafa;
}

.rp-card-head h3 {
  font: 700 14px 'Poppins', sans-serif;
  color: #0f172a;
  margin: 0;
  display: inline-block;
}

.rp-step {
  font: 700 10px 'Poppins', sans-serif;
  color: var(--rp-green);
  background: var(--rp-green-light);
  border: 1px solid var(--rp-accent-border);
  border-radius: 4px;
  padding: 2px 6px;
  margin-right: 8px;
  vertical-align: 1px;
}

.rp-inline {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Stage & Canvas */
.rp-stage-area {
  background: #f1f5f9;
  padding: 18px;
  min-height: 460px;
  display: grid;
  place-items: center;
  position: relative;
}

.rp-stage-wrap {
  position: relative;
  max-width: 100%;
  width: min(100%, 425px);
  aspect-ratio: 1;
  background-color: #fff;
  background-image: linear-gradient(45deg, #eef0eb 25%, transparent 25%),
                    linear-gradient(-45deg, #eef0eb 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #eef0eb 75%),
                    linear-gradient(-45deg, transparent 75%, #eef0eb 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  touch-action: none;
}

.rp-canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: crosshair;
}

.rp-pins {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.rp-pin {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 2px solid white;
  border-radius: 50% 50% 50% 4px;
  transform: translate(-40%, -100%) rotate(-45deg);
  background: var(--rp-green);
  box-shadow: 0 3px 10px rgba(0,0,0,0.35);
  color: white;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 800;
  pointer-events: none;
}

.rp-pin span {
  transform: rotate(45deg);
}

.rp-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 30px;
  color: #64748b;
  pointer-events: none;
}

.rp-empty b {
  font: 700 16px 'Poppins', sans-serif;
  color: #0f172a;
  margin-bottom: 6px;
}

.rp-empty span {
  font-size: 12px;
  line-height: 1.5;
}

.rp-empty-mark {
  margin: 0 auto 12px;
  width: 48px;
  height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--rp-green);
  font-size: 22px;
}

/* 3x Loupe */
.rp-loupe {
  position: absolute;
  z-index: 10;
  width: 128px;
  height: 154px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  padding: 8px;
  pointer-events: none;
  display: none;
}

.rp-loupe canvas {
  display: block;
  width: 110px;
  height: 110px;
  border-radius: 8px;
  image-rendering: pixelated;
  border: 1px solid #e2e8f0;
}

.rp-loupe strong {
  display: block;
  font-size: 11.5px;
  padding-top: 5px;
  color: #0f172a;
  font-family: monospace;
}

.rp-loupe small {
  font-size: 9.5px;
  color: var(--rp-muted);
}

/* Toolbar */
.rp-toolbar {
  padding: 12px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--rp-line);
  background: #fff;
}

.rp-spacer {
  flex: 1;
}

.rp-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  font-weight: 700;
}

.rp-kernel {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
}

.rp-kernel button {
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
  transition: all .15s ease;
}

.rp-kernel button[aria-pressed=true] {
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  color: var(--rp-green);
  font-weight: 700;
}

/* Dropzone & Extraction */
.rp-source {
  padding: 16px 18px;
  background: #fafafa;
  border-top: 1px solid var(--rp-line);
}

.rp-drop {
  border: 1.5px dashed #cbd5e1;
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all .15s ease;
}

.rp-drop:hover,
.rp-drop.is-over {
  background: #ecfdf5;
  border-color: var(--rp-green);
}

.rp-drop-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--rp-green-light);
  display: grid;
  place-items: center;
  color: var(--rp-green);
  font-size: 18px;
  flex-shrink: 0;
}

.rp-drop strong {
  font-size: 12.5px;
  display: block;
  color: #0f172a;
}

.rp-drop small {
  color: var(--rp-muted);
  font-size: 11px;
}

.rp-source-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.rp-status {
  color: var(--rp-green);
  min-height: 18px;
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 8px;
}

/* Buttons */
.rp-button {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all .15s ease;
}

.rp-button:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.rp-button.primary {
  background: var(--rp-green);
  color: white !important;
  border-color: var(--rp-green);
}

.rp-button.primary * {
  color: white !important;
  fill: white !important;
}

.rp-button.primary:hover {
  background: var(--rp-green-hover);
  border-color: var(--rp-green-hover);
}

.rp-button.soft {
  background: var(--rp-green-light);
  color: var(--rp-green);
  border-color: #a7f3d0;
}

.rp-button.soft:hover {
  background: #d1fae5;
}

.rp-button.small {
  padding: 5px 10px;
  font-size: 11.5px;
  border-radius: 6px;
}

.rp-button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* Swatches / Extracted Shades */
.rp-side {
  display: grid;
  gap: 18px;
}

.rp-controls {
  padding: 16px 18px;
}

.rp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; max-height: 520px; overflow-y: auto; align-content: start; }

.rp-swatch { border: 1px solid var(--rp-line); border-radius: 8px; padding: 0; display: flex; flex-direction: column; align-items: stretch; gap: 0; background: white; transition: all .15s ease; overflow: hidden; position: relative; cursor: pointer; }

.rp-swatch:hover {
  border-color: #0e7a4a;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.rp-swatch-color { width: 100%; height: 65px; border-radius: 0; border: 0; border-bottom: 1px solid rgba(0, 0, 0, 0.08); position: relative; flex-shrink: 0; }

.rp-swatch-color .rp-add {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #0e7a4a;
  font-size: 15px;
  font-weight: 700;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.rp-swatch-color .rp-add:hover {
  background: #0e7a4a;
  color: #ffffff;
  border-color: #0e7a4a;
  transform: scale(1.1);
}

.rp-swatch-color .rp-add[aria-pressed=true] {
  background: #0e7a4a;
  border-color: #0e7a4a;
  color: white;
}

.rp-swatch-main { min-width: 0; padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; background: #ffffff; }

.rp-chip-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rp-chip-pantone {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rp-chip-hex-row {
  display: flex;
  align-items: center;
}

.rp-chip-hex {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.rp-chip-thread {
  font-size: 10px;
  font-weight: 600;
  color: #0e7a4a;
  background: #f0fdf4;
  padding: 2px 5px;
  border-radius: 4px;
  border: 1px solid #dcfce7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Reference Search & Filters */
.rp-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 95px;
  gap: 8px;
}

.rp-search-entry {
  grid-column: 1 / -1;
  display: flex;
  min-width: 0;
}

.rp-input,
.rp-select {
  min-width: 0;
  width: 100%;
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  color: #0f172a;
  font-size: 12.5px;
}

.rp-search-entry .rp-input {
  border-radius: 8px 0 0 8px;
  flex: 1;
}

.rp-color-control {
  width: 44px;
  flex: none;
  border: 1px solid #cbd5e1;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.rp-color-control input {
  width: 26px;
  height: 26px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.rp-color-control input::-webkit-color-swatch-wrapper {
  padding: 1px;
}

.rp-color-control input::-webkit-color-swatch {
  border: 1px solid #cbd5e1;
  border-radius: 50%;
}

.rp-color-indicator {
  width: 44px;
  flex: none;
  border: 1px solid #cbd5e1;
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #174E3C;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  transition: background-color 0.18s ease;
}

.rp-search-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.rp-search-actions button {
  flex: 1;
  min-height: 38px;
  font-size: 12.5px;
  font-weight: 600;
  gap: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.rp-search-actions button .rmp-icon-svg {
  width: 17px;
  height: 17px;
}

.rp-search-actions button[data-eyedropper]:hover {
  border-color: #c084fc;
  background: #faf5ff;
  color: #6b21a8;
}

.rp-search-actions button[data-find-designs]:hover {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.rp-reverse-list {
  margin-top: 10px;
  max-height: 220px;
  overflow-y: auto;
  display: grid;
  gap: 6px;
}

.rp-find-result {
  width: 100%;
  text-align: left;
  border: 1px solid var(--rp-line);
  border-radius: 8px;
  background: white;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  transition: all .15s ease;
}

.rp-find-result:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.rp-find-chip {
  display: block;
  width: 32px;
  height: 38px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.rp-find-main b,
.rp-find-values b {
  display: block;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f172a;
}

.rp-find-main small,
.rp-find-values small {
  display: block;
  color: var(--rp-muted);
  font-size: 9.5px;
  margin-top: 2px;
}

.rp-find-values {
  text-align: right;
}

.rp-find-values small {
  color: var(--rp-green);
  font-weight: 700;
}

/* Color Harmony Guide & Calibration Dock */
.rp-card-harmony {
  min-width: 0;
}

.rp-color-studio-dock {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1.5px solid var(--rp-line);
  border-radius: 14px;
  background: #f8fafc;
}

/* Engine 1 & Engine 2: Equal Twin Square Instruments */
.rp-dock-top-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 768px) {
  .rp-dock-top-row {
    grid-template-columns: 1fr;
  }
}

.rp-dock-engine {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  min-width: 0;
  box-sizing: border-box;
}

.rp-dock-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rp-dock-title {
  font-size: 11px;
  font-weight: 800;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rp-dock-badge {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--rp-green);
  background: #ecfdf5;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid #a7f3d0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Engine 1: 360° Circular Hue Wheel (Equal Square) */
.rp-dock-wheel {
  align-items: center;
  justify-content: space-between;
}

.rp-dock-wheel .rp-dock-heading {
  width: 100%;
}

.rp-dock-wheel .rp-wheel-wrap {
  width: 165px;
  height: 165px;
  position: relative;
  margin: 4px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rp-wheel-wrap {
  position: relative;
  width: 165px;
  height: 165px;
  flex: none;
}

.rp-wheel-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  touch-action: none;
  cursor: crosshair;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.rp-wheel-wrap>i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  border: 2.5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.75), 0 2px 5px rgba(0,0,0,0.3);
  pointer-events: none;
}

.rp-dock-hint {
  font-size: 9.5px;
  color: var(--rp-muted);
  text-align: center;
  line-height: 1.35;
  margin: 0;
}

/* Engine 2: 2D Saturation & Brightness Spectrum (Equal Square) */
.rp-dock-spectrum {
  justify-content: space-between;
}

.rp-spectrum-box {
  position: relative;
  width: 100%;
  height: 130px;
  border-radius: 8px;
  overflow: hidden;
  cursor: crosshair;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  margin-top: 2px;
}

.rp-spectrum-box canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  touch-action: none;
}

.rp-spectrum-box i {
  position: absolute;
  left: 70%;
  top: 30%;
  width: 14px;
  height: 14px;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.8), 0 2px 5px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.rp-hue-strip-wrap {
  width: 100%;
  margin-top: 4px;
}

.rp-hue-strip {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  border-radius: 7px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
  margin: 0;
  display: block;
}

.rp-hue-strip::-webkit-slider-runnable-track {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%) !important;
  border: none;
}

.rp-hue-strip::-moz-range-track {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%) !important;
  border: none;
}

.rp-hue-strip::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid #0f172a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  margin-top: -2px;
}

.rp-hue-strip::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid #0f172a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

/* Engine 3: Color Code Calibration - Full Width Bar */
.rp-dock-controls-col {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
}

.rp-spectrum-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
}

.rp-spectrum-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* Row 1: Swatch + Eyedropper + HEX Input + +Add to Palette */
.rp-spectrum-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
}

.rp-spectrum-swatch-wrap i {
  display: block;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  border: 1.5px solid rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 2px 5px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.rp-spectrum-eyedropper-btn {
  height: 36px;
  padding: 0 12px;
  border: 1.5px solid #c4b5fd;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  color: #6d28d9;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  transition: all .18s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.08);
  margin: 0;
  box-sizing: border-box;
}

.rp-spectrum-eyedropper-btn:hover {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  color: #5b21b6;
  border-color: #a78bfa;
  box-shadow: 0 3px 8px rgba(124, 58, 237, 0.2);
  transform: translateY(-1px);
}

.rp-spectrum-eyedropper-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.rp-eyedropper-btn-label {
  display: inline-block;
  line-height: 1;
}

/* Laser-Aligned HEX Input Group - Astra Margin Fix */
.rp-spec-hex-group {
  flex: 1 1 140px;
  max-width: 170px;
  min-width: 110px;
  height: 36px;
  display: inline-flex;
  align-items: stretch;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}

.rp-spec-hex-group:focus-within {
  border-color: #0e7a4a;
  box-shadow: 0 0 0 2px rgba(14, 122, 74, 0.18);
}

.rp-spec-hex-group label {
  margin: 0 !important;
  padding: 0 11px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  color: #334155 !important;
  background: #f1f5f9 !important;
  border-right: 1.5px solid #cbd5e1 !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  height: 100% !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none !important;
  box-sizing: border-box !important;
}

.rp-spec-hex-group input {
  margin: 0 !important;
  padding: 0 10px !important;
  border: none !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  color: #0f172a !important;
  outline: none !important;
  height: 100% !important;
  line-height: 36px !important;
  width: 100% !important;
  min-width: 0 !important;
  letter-spacing: 0.5px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
}

.rp-dock-add-palette-btn {
  height: 36px;
  padding: 0 15px;
  background: linear-gradient(135deg, #0e7a4a 0%, #065f46 100%);
  color: #ffffff;
  border: 1px solid #065f46;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .18s ease;
  box-shadow: 0 1px 3px rgba(14, 122, 74, 0.2);
  margin: 0;
  box-sizing: border-box;
}

.rp-dock-add-palette-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #0e7a4a 100%);
  box-shadow: 0 3px 8px rgba(14, 122, 74, 0.3);
  transform: translateY(-1px);
}

/* Row 2: RGB Inputs + CMYK Chip Readout */
.rp-spectrum-row-rgb {
  display: grid;
  grid-template-columns: 66px 66px 66px 1fr;
  gap: 8px;
  width: 100%;
  height: 36px;
  align-items: center;
  box-sizing: border-box;
}

.rp-spec-rgb-group {
  display: inline-flex;
  align-items: stretch;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  height: 36px;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color .15s, box-shadow .15s;
}

.rp-spec-rgb-group:focus-within {
  border-color: #0e7a4a;
  box-shadow: 0 0 0 2px rgba(14, 122, 74, 0.18);
}

.rp-spec-rgb-group label {
  margin: 0 !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  height: 100% !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none !important;
  box-sizing: border-box !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
}

.rp-spec-r label { background: #fee2e2 !important; color: #b91c1c !important; border-right: 1.5px solid #fca5a5 !important; }
.rp-spec-g label { background: #dcfce7 !important; color: #15803d !important; border-right: 1.5px solid #86efac !important; }
.rp-spec-b label { background: #dbeafe !important; color: #1d4ed8 !important; border-right: 1.5px solid #93c5fd !important; }

.rp-spec-rgb-group input {
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  padding: 0 4px !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  color: #0f172a !important;
  outline: none !important;
  height: 100% !important;
  line-height: 36px !important;
  width: 100% !important;
  min-width: 0 !important;
  text-align: center !important;
  box-sizing: border-box !important;
  -moz-appearance: textfield !important;
}

.rp-spec-rgb-group input::-webkit-inner-spin-button,
.rp-spec-rgb-group input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* CMYK FOGRA39 Readout Chip */
.rp-dock-cmyk-chip {
  display: inline-flex;
  align-items: stretch;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  height: 36px;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  min-width: 0;
}

.rp-dock-cmyk-label {
  margin: 0 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
  color: #475569 !important;
  background: #e2e8f0 !important;
  border-right: 1.5px solid #cbd5e1 !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  padding: 0 9px !important;
  height: 100% !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none !important;
  box-sizing: border-box !important;
}

.rp-dock-cmyk-val {
  padding: 0 10px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  height: 100%;
}

/* Row 3: Live Pantone Match & Quick Find Button */
.rp-dock-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  padding: 0 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  height: 38px;
  box-sizing: border-box;
}

.rp-dock-match-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.rp-dock-pantone-badge {
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
  background: #e2e8f0;
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
}

.rp-dock-pantone-name {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rp-dock-de-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.rp-dock-quick-find {
  font-size: 11.5px;
  font-weight: 700;
  color: #0e7a4a;
  background: #ffffff;
  border: 1.5px solid #86efac;
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}

.rp-dock-quick-find:hover {
  background: #ecfdf5;
  border-color: #0e7a4a;
}

/* High-Specificity Protection against Global Theme Resets */
.rmp-studio rmp-color-harmony-studio .rp-color-studio-dock input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.rmp-studio rmp-color-harmony-studio .rp-spec-input-group input,
rmp-color-harmony-studio .rp-spec-input-group input {
  display: inline-flex !important;
  align-items: center !important;
  min-height: unset !important;
  height: 100% !important;
  max-height: 36px !important;
  margin: 0 !important;
  padding: 0 8px !important;
  border: none !important;
  border-width: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  line-height: normal !important;
  outline: none !important;
}

.rmp-studio rmp-color-harmony-studio .rp-spec-rgb-group input {
  padding: 0 2px !important;
  text-align: center !important;
}

.rmp-studio rmp-color-harmony-studio .rp-dock-add-palette-btn,
rmp-color-harmony-studio .rp-dock-add-palette-btn {
  background: linear-gradient(135deg, #0e7a4a 0%, #065f46 100%) !important;
  background-color: #0e7a4a !important;
  color: #ffffff !important;
  border: 1px solid #065f46 !important;
  border-radius: 8px !important;
  padding: 0 16px !important;
  height: 36px !important;
  min-height: 36px !important;
  box-shadow: 0 1px 3px rgba(14, 122, 74, 0.25) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all .18s ease !important;
}

.rmp-studio rmp-color-harmony-studio .rp-dock-add-palette-btn:hover,
rmp-color-harmony-studio .rp-dock-add-palette-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #0e7a4a 100%) !important;
  background-color: #059669 !important;
  box-shadow: 0 3px 8px rgba(14, 122, 74, 0.35) !important;
}

.rmp-studio rmp-color-harmony-studio .rp-spectrum-eyedropper-btn,
rmp-color-harmony-studio .rp-spectrum-eyedropper-btn {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  border: 1.5px solid #c4b5fd !important;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%) !important;
  background-color: #f5f3ff !important;
  border-radius: 8px !important;
  color: #6d28d9 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.08) !important;
  cursor: pointer !important;
}

.rmp-studio rmp-color-harmony-studio .rp-dock-quick-find,
rmp-color-harmony-studio .rp-dock-quick-find {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 12px !important;
  border: 1px solid #86efac !important;
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-radius: 6px !important;
  color: #0e7a4a !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

/* Active Harmony Base Indicator */
.rp-harmony-base {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1.5px solid var(--rp-line);
  border-radius: 10px;
  background: #f8fafc;
}

.rp-harmony-base>i {
  width: 36px;
  height: 36px;
  flex: none;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.rp-harmony-base b {
  font-size: 13px;
  display: block;
  color: #0f172a;
}

.rp-harmony-base small {
  font-size: 11px;
  color: var(--rp-muted);
  display: block;
  margin-top: 2px;
}

/* 6 Harmony Cards in 3-Column Luxury Studio Grid */
.rp-harmony {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1024px) {
  .rp-harmony {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .rp-harmony {
    grid-template-columns: 1fr;
  }
}

@keyframes rpSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rp-spin {
  animation: rpSpin 0.55s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Custom Slim Scrollbars for Pro Atelier Feel */
.rp-cards::-webkit-scrollbar,
.rp-reverse-list::-webkit-scrollbar,
.rp-palette-list::-webkit-scrollbar {
  width: 5px;
}

.rp-cards::-webkit-scrollbar-track,
.rp-reverse-list::-webkit-scrollbar-track,
.rp-palette-list::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.rp-cards::-webkit-scrollbar-thumb,
.rp-reverse-list::-webkit-scrollbar-thumb,
.rp-palette-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.rp-cards::-webkit-scrollbar-thumb:hover,
.rp-reverse-list::-webkit-scrollbar-thumb:hover,
.rp-palette-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Harmony Card: Luxury Architectural Studio Deck */
.rp-harmony-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-top: 3.5px solid #94a3b8;
  border-radius: 14px;
  padding: 14px 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.rp-harmony-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

/* Theory Chord Color Signatures */
.rp-harmony-card-complementary {
  border-top-color: #f43f5e;
}
.rp-harmony-card-analogous {
  border-top-color: #10b981;
}
.rp-harmony-card-triadic {
  border-top-color: #8b5cf6;
}
.rp-harmony-card-split-complementary {
  border-top-color: #6366f1;
}
.rp-harmony-card-tetradic {
  border-top-color: #0284c7;
}
.rp-harmony-card-monochromatic {
  border-top-color: #2563eb;
}

.rp-harmony-card.is-detected {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.12);
}

.rp-harmony-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.rp-harmony-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.rp-harmony-title-text {
  min-width: 0;
}

.rp-harmony-title-text h4 {
  margin: 0 0 2px 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rp-harmony-badge-pill {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1.5px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  letter-spacing: 0.2px;
  border: 1px solid #e2e8f0;
}

.rp-harmony-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 10px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 2px;
}

.rp-harmony-icon svg {
  width: 30px;
  height: 30px;
  display: block;
}

.rp-harmony-help {
  margin: 0;
  color: var(--rp-muted);
  font-size: 11px;
  line-height: 1.45;
  min-height: 32px;
}

/* Textile Colorway Ribbon Strip */
.rp-harmony-ribbon {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.08);
  width: 100%;
  margin: 2px 0 4px 0;
}

.rp-harmony-ribbon span {
  height: 100%;
  transition: flex 0.2s ease;
}

/* Base Anchor & Accent Swatch Chips */
.rp-harmony-chip {
  width: 100%;
  min-width: 0;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 6px 10px;
  text-align: left;
  display: flex;
  gap: 10px;
  align-items: center;
  color: #1e293b;
  cursor: pointer;
  margin: 0;
  transition: all .15s ease;
  box-sizing: border-box;
}

.rp-harmony-chip:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateX(2px);
}

.rp-harmony-chip i {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.rp-harmony-chip-text {
  flex: 1;
  min-width: 0;
}

.rp-harmony-chip b {
  font-size: 11.5px;
  font-weight: 700;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f172a;
}

.rp-chip-role {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: 1px;
}

.rp-harmony-chip small {
  font-size: 10px;
  color: var(--rp-muted);
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.rp-harmony-add-btn {
  font-size: 10px;
  font-style: normal;
  color: var(--rp-green);
  font-weight: 700;
  flex-shrink: 0;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 3px 8px;
  border-radius: 6px;
  transition: all .15s ease;
}

.rp-harmony-chip:hover .rp-harmony-add-btn {
  background: var(--rp-green);
  color: #ffffff;
  border-color: var(--rp-green);
}

.rp-harmony-base-chip {
  border: 1.5px dashed #cbd5e1;
  background: #f8fafc;
  cursor: default;
}

.rp-harmony-base-chip:hover {
  transform: none;
  border-color: #cbd5e1;
  background: #f8fafc;
}

/* Project Palette Tray */
.rp-palette-list {
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.rp-palette-item {
  border: 1px solid var(--rp-line);
  border-radius: 8px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  background: white;
}

.rp-palette-item i {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.rp-palette-item b {
  font-size: 11px;
  display: block;
  color: #0f172a;
}

.rp-palette-item small {
  font-size: 9.5px;
  color: var(--rp-muted);
  font-family: monospace;
}

.rp-palette-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rp-set-base {
  width: 26px;
  height: 26px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: var(--rp-green);
  font-size: 14px;
}

.rp-remove {
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 16px;
}

.rp-remove:hover {
  color: #ef4444;
}

/* Carry to Next Step Buttons */
.rp-carry-buttons {
  display: flex;
  gap: 8px;
  flex-direction: column;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1.5px solid var(--rp-line);
}

.rp-carry-btn {
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all .15s ease;
}

.rp-carry-btn-primary {
  background: var(--rp-green);
  color: white;
  border: 1px solid var(--rp-green);
}

.rp-carry-btn-primary:hover {
  background: var(--rp-green-hover);
}

.rp-carry-btn-step3 {
  background: #f0fdf4;
  color: #166534;
  border: 1.5px solid #86efac;
}

.rp-carry-btn-step3:hover {
  background: #dcfce7;
}

/* Multi-Format Export Grid */
.rp-export-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.rp-export-grid .rp-button {
  font-size: 11px;
  padding: 8px 10px;
  justify-content: center;
}

.rp-empty-state {
  padding: 20px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  color: var(--rp-muted);
  font-size: 12px;
  text-align: center;
  background: #f8fafc;
}

.rp-notice {
  margin-top: 10px;
  border-radius: 8px;
  padding: 9px 12px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10.5px;
  line-height: 1.45;
}

.rp-notice.warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fef3c7;
}

/* Shop Catalog Dialog */
.rp-dialog {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: none;
  place-items: center;
  padding: 20px;
}

.rp-dialog[open] {
  display: grid;
}

.rp-dialog-card {
  width: min(760px, 100%);
  max-height: min(85vh, 800px);
  overflow-y: auto;
  background: white;
  border-radius: 18px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--rp-line);
}

.rp-dialog-head {
  position: sticky;
  top: 0;
  background: white;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rp-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.rp-dialog-head h3 {
  margin: 0;
  font: 700 16px 'Poppins', sans-serif;
  color: #0f172a;
}

.rp-dialog-body {
  padding: 18px 20px;
}

.rp-catalog-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
  max-height: 480px;
  overflow-y: auto;
}

.rp-catalog-item {
  border: 1.5px solid var(--rp-line);
  border-radius: 10px;
  overflow: hidden;
  text-align: left;
  background: white;
  padding: 0;
  cursor: pointer;
  transition: all .15s ease;
}

.rp-catalog-item:hover {
  border-color: var(--rp-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.rp-catalog-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f1f5f9;
  display: block;
}

.rp-catalog-item span {
  display: block;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rp-hidden {
  display: none !important;
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .rp-studio-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .rp-header-right {
    justify-content: flex-start !important;
  }
  .rp-layout {
    grid-template-columns: 1fr !important;
  }
  .rp-stage-area {
    min-height: unset !important;
    padding: 16px !important;
  }
  .rp-stage-wrap {
    width: min(100%, 500px) !important;
  }
}

@media (max-width: 800px) {
  .rp-dock-top-row {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 650px) {
  .rp-shell {
    padding: 12px !important;
  }
  .rp-studio-title {
    font-size: 20px !important;
  }
  .rp-studio-sub {
    font-size: 12.5px !important;
  }
  .rp-harmony {
    grid-template-columns: 1fr !important;
  }
  .rp-catalog-list {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .rp-export-grid {
    grid-template-columns: 1fr !important;
  }
  .rp-source-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
  .rp-source-actions {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  /* Pro Calibration Dock Mobile Optimization */
  .rp-spectrum-row-top {
    flex-wrap: wrap !important;
    height: auto !important;
    gap: 8px !important;
  }
  .rp-spectrum-row-top .rp-spec-hex-group {
    flex: 1 1 110px !important;
    max-width: none !important;
  }
  .rp-spectrum-row-top .rp-dock-add-palette-btn {
    width: 100% !important;
    height: 36px !important;
    margin-top: 2px !important;
  }
  .rp-spectrum-row-rgb {
    grid-template-columns: repeat(3, 1fr) !important;
    height: auto !important;
    gap: 6px !important;
  }
  .rp-dock-cmyk-chip {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    height: 32px !important;
    margin-top: 2px !important;
  }
  .rp-dock-match-row {
    height: auto !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 8px 10px !important;
  }
  .rp-dock-match-info {
    justify-content: space-between !important;
    width: 100% !important;
  }
  .rp-dock-quick-find {
    width: 100% !important;
    height: 32px !important;
    justify-content: center !important;
  }
}


/* Pulse dot for free/active badges */
.rp-pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
  margin-right: 6px;
  vertical-align: middle;
}

/* v5.5.9 — focused calibration and reference-search refinements. */
rmp-color-harmony-studio .rp-dock-controls-col {
  background: linear-gradient(120deg, #fff 65%, #f3faf6) !important;
  border: 1px solid #dbe7e0 !important;
  box-shadow: 0 6px 20px rgba(23, 56, 46, .04) !important;
}
rmp-color-harmony-studio .rp-spectrum-row-top { flex-wrap: wrap !important; height: auto !important; }
rmp-color-harmony-studio .rp-spectrum-swatch-wrap {
  border-radius: 10px !important; padding: 4px !important; width: 42px !important; height: 42px !important;
  background: #fff !important; border: 1px solid #dbe3df !important; box-shadow: 0 3px 8px #17382e0d !important;
}
rmp-color-harmony-studio .rp-spectrum-swatch-wrap i { border-radius: 6px !important; width: 100% !important; height: 100% !important; display: block !important; }
rmp-color-harmony-studio .rp-copy-button,
rmp-color-harmony-studio .rp-copy-value {
  display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 6px !important;
  min-height: 32px !important; padding: 6px 10px !important; border: 1px solid #dbe5df !important;
  border-radius: 7px !important; background: #fff !important; color: #166044 !important; font: inherit !important;
  font-size: 11px !important; font-weight: 600 !important; line-height: 1.3 !important; cursor: pointer !important;
  transition: background .16s, border-color .16s, box-shadow .16s !important;
}
rmp-color-harmony-studio .rp-copy-value { padding: 4px 7px !important; min-height: 26px !important; font-family: Consolas, monospace !important; }
rmp-color-harmony-studio .rp-copy-button:hover,
rmp-color-harmony-studio .rp-copy-value:hover,
rmp-color-harmony-studio .is-copied { background: #ecfdf5 !important; border-color: #8cc5a7 !important; }
rmp-color-harmony-studio .rp-copy-button:focus-visible,
rmp-color-harmony-studio .rp-copy-value:focus-visible,
rmp-color-harmony-studio .rp-color-indicator:focus-visible { outline: 2px solid #0e7a4a !important; outline-offset: 3px !important; }
rmp-color-harmony-studio .rp-clear-artwork { color: #b42335 !important; border-color: #fecdd3 !important; background: #fff6f7 !important; }
rmp-color-harmony-studio .rp-clear-artwork:hover { background: #ffe9ec !important; }
rmp-color-harmony-studio .rp-cmyk-controls { display: grid !important; grid-template-columns: auto repeat(4, minmax(70px, 1fr)) !important; align-items: center !important; gap: 8px !important; }
rmp-color-harmony-studio .rp-cmyk-caption { font-size: 11px !important; font-weight: 700 !important; color: #42383b !important; padding-right: 4px !important; }
rmp-color-harmony-studio .rp-cmyk-caption small { display: block !important; font-size: 10px !important; color: #64748b !important; font-weight: 400 !important; }
rmp-color-harmony-studio .rp-cmyk-field {
  display: flex !important; align-items: center !important; gap: 4px !important; margin: 0 !important; padding: 0 8px 0 0 !important;
  border: 1px solid #d8e2dc !important; border-radius: 8px !important; overflow: hidden !important; min-width: 0 !important;
  height: 38px !important; background: #fff !important; transition: box-shadow .16s, border-color .16s !important;
}
rmp-color-harmony-studio .rp-cmyk-field > span { align-self: stretch !important; display: grid !important; place-items: center !important; min-width: 28px !important; font-size: 11px !important; font-weight: 700 !important; background: #f1f5f9 !important; }
rmp-color-harmony-studio .rp-cmyk-c > span { color: #086078 !important; background: #e7f7fc !important; }
rmp-color-harmony-studio .rp-cmyk-m > span { color: #a32d70 !important; background: #fcecf5 !important; }
rmp-color-harmony-studio .rp-cmyk-y > span { color: #795f0d !important; background: #fff8d9 !important; }
rmp-color-harmony-studio .rp-cmyk-k > span { color: #fff !important; background: #42383b !important; }
rmp-color-harmony-studio .rp-cmyk-field input {
  width: 100% !important; min-width: 0 !important; height: 100% !important; padding: 4px !important; margin: 0 !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important;
  font: 12px Consolas, monospace !important; color: #191516 !important;
}
rmp-color-harmony-studio .rp-cmyk-field small { color: #64748b !important; font-size: 10px !important; }
rmp-color-harmony-studio .rp-cmyk-field:focus-within { border-color: #0e7a4a !important; box-shadow: 0 0 0 3px #0e7a4a14 !important; }
rmp-color-harmony-studio .rp-cmyk-hint { color: #64748b !important; font-size: 10.5px !important; line-height: 1.5 !important; }
rmp-color-harmony-studio .rp-dock-match-row { height: auto !important; min-height: 42px !important; gap: 8px !important; flex-wrap: wrap !important; }
rmp-color-harmony-studio .rp-dock-match-info { flex: 1 1 230px !important; min-width: 0 !important; flex-wrap: wrap !important; }
rmp-color-harmony-studio .rp-search-entry {
  align-items: center !important; gap: 10px !important; padding: 8px !important; border: 1px solid #d8e4dc !important;
  border-radius: 12px !important; background: #fff !important; box-shadow: 0 4px 16px #17382e06 !important;
}
rmp-color-harmony-studio .rp-search-entry:focus-within { border-color: #0e7a4a !important; box-shadow: 0 0 0 3px #0e7a4a0f !important; }
rmp-color-harmony-studio .rp-search-entry .rp-input { border: 0 !important; border-radius: 6px !important; box-shadow: none !important; padding: 9px 6px !important; font-size: 12px !important; }
rmp-color-harmony-studio .rp-color-indicator {
  width: 58px !important; height: 46px !important; padding: 0 !important; border: 3px solid #fff !important; outline: 1px solid #d8e2dc !important;
  border-radius: 9px !important; display: flex !important; align-items: flex-end !important; overflow: hidden !important; cursor: pointer !important;
  box-shadow: 0 2px 6px #17382e12 !important;
}
rmp-color-harmony-studio .rp-color-indicator span { width: 100% !important; background: #ffffffee !important; color: #244535 !important; font-size: 8px !important; font-weight: 700 !important; line-height: 1.6 !important; text-align: center !important; }
rmp-color-harmony-studio .rp-find-result-group { border: 1px solid #e0e8e3 !important; border-radius: 11px !important; overflow: hidden !important; background: #fff !important; box-shadow: 0 3px 10px #17382e05 !important; }
rmp-color-harmony-studio .rp-find-result-group .rp-find-result { border: 0 !important; border-radius: 0 !important; width: 100% !important; }
rmp-color-harmony-studio .rp-find-chip { border-radius: 8px !important; box-shadow: inset 0 0 0 1px #0000000d !important; }
rmp-color-harmony-studio .rp-find-copy-actions { display: flex !important; gap: 6px !important; padding: 6px 10px 9px !important; background: #f8fbf9 !important; border-top: 1px solid #edf2ef !important; }
@media (max-width: 650px) {
  rmp-color-harmony-studio .rp-cmyk-controls { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  rmp-color-harmony-studio .rp-cmyk-caption { grid-column: 1 / -1 !important; display: flex !important; gap: 8px !important; }
  rmp-color-harmony-studio .rp-dock-match-info { flex-basis: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
  rmp-color-harmony-studio .rp-copy-button,
  rmp-color-harmony-studio .rp-copy-value,
  rmp-color-harmony-studio .rp-cmyk-field { transition: none !important; }
}

rmp-color-harmony-studio button.rp-color-indicator{background:var(--rp-preview-color,#174e3c)!important}

/* Editable CMYK below replaces the former readout. */
rmp-color-harmony-studio .rp-spectrum-row-rgb{grid-template-columns:repeat(3,66px);justify-content:start}

/* v5.5.11 — paired RGB/CMYK calibration groups. */
rmp-color-harmony-studio .rp-color-channels {
  display:flex; align-items:center; flex-wrap:wrap; gap:12px 18px; width:100%;
}
rmp-color-harmony-studio .rp-color-channels .rp-spectrum-row-rgb {
  flex:0 1 270px; min-width:0; width:100%; height:38px !important;
  grid-template-columns:34px repeat(3,minmax(0,1fr)) !important; gap:6px !important;
}
rmp-color-harmony-studio .rp-color-channels .rp-spec-rgb-group { height:38px; }
rmp-color-harmony-studio .rp-color-channels .rp-cmyk-controls { flex:1 1 410px; min-width:0; }
rmp-color-harmony-studio .rp-color-channels .rp-spectrum-row-rgb .rp-cmyk-caption {
  grid-column:auto !important; display:block !important; padding:0 !important;
}
@media(max-width:650px) {
  rmp-color-harmony-studio .rp-color-channels { gap:12px; }
  rmp-color-harmony-studio .rp-color-channels .rp-spectrum-row-rgb { flex-basis:100%; }
  rmp-color-harmony-studio .rp-color-channels .rp-spectrum-row-rgb {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important; height:auto !important;
  }
  rmp-color-harmony-studio .rp-color-channels .rp-spectrum-row-rgb .rp-cmyk-caption {
    grid-column:1 / -1 !important; display:flex !important; gap:8px;
  }
  rmp-color-harmony-studio .rp-color-channels input[type=number] { appearance:textfield; -moz-appearance:textfield; }
  rmp-color-harmony-studio .rp-color-channels input::-webkit-inner-spin-button,
  rmp-color-harmony-studio .rp-color-channels input::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
}

/* Consistent channel fields: RGB 0–255 / CMYK 0–100%. */

rmp-color-harmony-studio .rp-rgb-field {
  display: flex !important; align-items: center !important; gap: 4px !important; margin: 0 !important; padding: 0 8px 0 0 !important;
  border: 1px solid #d8e2dc !important; border-radius: 8px !important; overflow: hidden !important; min-width: 0 !important;
  height: 38px !important; background: #fff !important; transition: box-shadow .16s, border-color .16s !important;
}
rmp-color-harmony-studio .rp-rgb-field > span { align-self: stretch !important; display: grid !important; place-items: center !important; min-width: 28px !important; font-size: 11px !important; font-weight: 700 !important; background: #f1f5f9 !important; }
rmp-color-harmony-studio .rp-cmyk-c > span { color: #086078 !important; background: #e7f7fc !important; }
rmp-color-harmony-studio .rp-cmyk-m > span { color: #a32d70 !important; background: #fcecf5 !important; }
rmp-color-harmony-studio .rp-cmyk-y > span { color: #795f0d !important; background: #fff8d9 !important; }
rmp-color-harmony-studio .rp-cmyk-k > span { color: #fff !important; background: #42383b !important; }
rmp-color-harmony-studio .rp-rgb-field input {
  width: 100% !important; min-width: 0 !important; height: 100% !important; padding: 4px !important; margin: 0 !important;
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: transparent !important;
  font: 12px Consolas, monospace !important; color: #191516 !important;
}
rmp-color-harmony-studio .rp-rgb-field small { color: #64748b !important; font-size: 10px !important; }
rmp-color-harmony-studio .rp-rgb-field:focus-within { border-color: #0e7a4a !important; box-shadow: 0 0 0 3px #0e7a4a14 !important; }

rmp-color-harmony-studio .rp-channel-r > span{background:#ffe4e7!important;color:#be123c!important}
rmp-color-harmony-studio .rp-channel-g > span{background:#ddf7e6!important;color:#08743d!important}
rmp-color-harmony-studio .rp-channel-b > span{background:#e1ebff!important;color:#2454c6!important}
/* Keep channel digits readable alongside the native theme's form rules. */
.rmp-studio rmp-color-harmony-studio .rp-color-channels .rp-rgb-field input,
.rmp-studio rmp-color-harmony-studio .rp-color-channels .rp-cmyk-field input {
  display:block!important;padding:4px!important;font:12px Consolas,monospace!important;
  appearance:textfield!important;-moz-appearance:textfield!important;color:#191516!important;
}
.rmp-studio rmp-color-harmony-studio .rp-color-channels input::-webkit-inner-spin-button,
.rmp-studio rmp-color-harmony-studio .rp-color-channels input::-webkit-outer-spin-button{ -webkit-appearance:none!important;margin:0!important; }

/* ==========================================================================
   PANTONE SEARCH & HERO COLOR DETAILS (CARD 03)
   ========================================================================== */

rmp-color-harmony-studio .rp-search-entry {
  position: relative !important;
  display: flex !important;
  width: 100% !important;
}

rmp-color-harmony-studio .rp-search-clear {
  position: absolute !important;
  right: 50px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 22px !important;
  height: 22px !important;
  border-radius: 50% !important;
  background: #e2e8f0 !important;
  color: #475569 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  display: none;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  cursor: pointer !important;
  z-index: 2 !important;
  transition: all 0.15s ease !important;
}
rmp-color-harmony-studio .rp-search-clear:hover {
  background: #cbd5e1 !important;
  color: #0f172a !important;
}

rmp-color-harmony-studio .rp-pantone-quick-chips {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  align-items: center !important;
  margin-top: 6px !important;
  margin-bottom: 2px !important;
}

rmp-color-harmony-studio .rp-quick-label {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  margin-right: 2px !important;
}

rmp-color-harmony-studio .rp-chip-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 4px 9px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 14px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  min-height: 26px !important;
}
rmp-color-harmony-studio .rp-chip-btn:hover {
  background: #f1f5f9 !important;
  border-color: #0e7a4a !important;
  color: #0e7a4a !important;
  transform: translateY(-1px) !important;
}
rmp-color-harmony-studio .rp-chip-btn i {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(0, 0, 0, 0.15) !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
}

/* HERO PANTONE DETAILS CARD */
rmp-color-harmony-studio .rp-pantone-hero-container {
  margin-top: 14px !important;
}

rmp-color-harmony-studio .rp-pantone-hero {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 16px !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  transition: all 0.2s ease !important;
}
rmp-color-harmony-studio .rp-pantone-hero:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08) !important;
}

rmp-color-harmony-studio .rp-pantone-hero-body {
  display: flex !important;
  gap: 16px !important;
  align-items: flex-start !important;
}

rmp-color-harmony-studio .rp-pantone-swatch-card {
  width: 96px !important;
  height: 96px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15), 0 3px 8px rgba(0, 0, 0, 0.08) !important;
  position: relative !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 6px !important;
}

rmp-color-harmony-studio .rp-pantone-swatch-badge {
  background: rgba(15, 23, 42, 0.78) !important;
  backdrop-filter: blur(4px) !important;
  color: #ffffff !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  padding: 3px 7px !important;
  border-radius: 4px !important;
}

rmp-color-harmony-studio .rp-pantone-hero-meta {
  flex: 1 !important;
  min-width: 0 !important;
}

rmp-color-harmony-studio .rp-pantone-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  margin-bottom: 4px !important;
}

rmp-color-harmony-studio .rp-ptag {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  text-transform: uppercase !important;
  line-height: 1.4 !important;
}
rmp-color-harmony-studio .rp-ptag.rmp-tcx {
  background: #eff6ff !important;
  color: #1e40af !important;
  border: 1px solid #bfdbfe !important;
}
rmp-color-harmony-studio .rp-ptag.rmp-tpg {
  background: #fdf4ff !important;
  color: #86198f !important;
  border: 1px solid #f5d0fe !important;
}
rmp-color-harmony-studio .rp-ptag.rmp-spec {
  background: #f0fdf4 !important;
  color: #166534 !important;
  border: 1px solid #bbf7d0 !important;
}

rmp-color-harmony-studio .rp-pantone-title {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 3px 0 6px !important;
  line-height: 1.25 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

rmp-color-harmony-studio .rp-pantone-codeline {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-bottom: 6px !important;
}

rmp-color-harmony-studio .rp-code-chip {
  font-size: 12px !important;
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  padding: 3px 9px !important;
  border-radius: 6px !important;
  color: #334155 !important;
}
rmp-color-harmony-studio .rp-code-chip b {
  color: #0f172a !important;
}

rmp-color-harmony-studio .rp-pantone-tone {
  font-size: 11.5px !important;
  color: #64748b !important;
  display: flex !important;
  gap: 5px !important;
  align-items: center !important;
}
rmp-color-harmony-studio .rp-pantone-tone strong {
  color: #0f172a !important;
  font-weight: 600 !important;
}

/* Specs Grid */
rmp-color-harmony-studio .rp-pantone-specs-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 8px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  padding: 8px !important;
}

rmp-color-harmony-studio .rp-spec-tile {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 6px 8px !important;
  cursor: pointer !important;
  position: relative !important;
  transition: all 0.15s ease !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  min-height: 52px !important;
}
rmp-color-harmony-studio .rp-spec-tile:hover {
  border-color: #0e7a4a !important;
  background: #f0fdf4 !important;
  box-shadow: 0 2px 4px rgba(14, 122, 74, 0.08) !important;
}

rmp-color-harmony-studio .rp-spec-label {
  font-size: 9.5px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  margin-bottom: 2px !important;
}

rmp-color-harmony-studio .rp-spec-val {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  font-family: Consolas, monospace !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

rmp-color-harmony-studio .rp-copy-icon-btn {
  margin-top: 4px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #0e7a4a !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  cursor: pointer !important;
  text-align: right !important;
  line-height: 1 !important;
}

/* Action Buttons */
rmp-color-harmony-studio .rp-pantone-actions {
  display: grid !important;
  grid-template-columns: 1.3fr 1.15fr 1fr !important;
  gap: 8px !important;
}

rmp-color-harmony-studio .rp-btn-action {
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  min-height: 38px !important;
}

rmp-color-harmony-studio .rp-btn-action.primary {
  background: linear-gradient(135deg, #0e7a4a 0%, #065f46 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: 0 2px 4px rgba(14, 122, 74, 0.2) !important;
}
rmp-color-harmony-studio .rp-btn-action.primary:hover {
  background: linear-gradient(135deg, #108a54 0%, #086b50 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(14, 122, 74, 0.3) !important;
}

rmp-color-harmony-studio .rp-btn-action.secondary {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
}
rmp-color-harmony-studio .rp-btn-action.secondary:hover {
  border-color: #0e7a4a !important;
  color: #0e7a4a !important;
  background: #f0fdf4 !important;
}

rmp-color-harmony-studio .rp-btn-action.ghost {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}
rmp-color-harmony-studio .rp-btn-action.ghost:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Active Highlight for Search Results */
rmp-color-harmony-studio .rp-find-result.is-active-hero {
  border-color: #0e7a4a !important;
  background: #f0fdf4 !important;
  box-shadow: 0 0 0 2px rgba(14, 122, 74, 0.15) !important;
}

/* Empty Hero */
rmp-color-harmony-studio .rp-pantone-empty-hero {
  background: #f8fafc !important;
  border: 1.5px dashed #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 16px 14px !important;
  display: flex !important;
  gap: 12px !important;
  align-items: center !important;
}
rmp-color-harmony-studio .rp-pantone-empty-icon {
  font-size: 28px !important;
  line-height: 1 !important;
}
rmp-color-harmony-studio .rp-pantone-empty-hero b {
  display: block !important;
  font-size: 13px !important;
  color: #0f172a !important;
  margin-bottom: 3px !important;
}
rmp-color-harmony-studio .rp-pantone-empty-hero p {
  margin: 0 !important;
  font-size: 11.5px !important;
  color: #64748b !important;
  line-height: 1.4 !important;
}

@media (max-width: 640px) {
  rmp-color-harmony-studio .rp-pantone-hero-body {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  rmp-color-harmony-studio .rp-pantone-codeline,
  rmp-color-harmony-studio .rp-pantone-tags,
  rmp-color-harmony-studio .rp-pantone-tone {
    justify-content: center !important;
  }
  rmp-color-harmony-studio .rp-pantone-specs-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  rmp-color-harmony-studio .rp-pantone-actions {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   CARRY FORWARD BUTTONS & CATEGORY SPECIFIC STYLES (CARD 04)
   ========================================================================== */

rmp-color-harmony-studio .rp-carry-buttons {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-top: 10px !important;
}

rmp-color-harmony-studio .rp-carry-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  padding: 10px 14px !important;
  border-radius: 9px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-align: center !important;
  border: 1.5px solid transparent !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

rmp-color-harmony-studio .rp-carry-btn:hover {
  transform: translateY(-1.5px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

rmp-color-harmony-studio .rp-carry-btn:active {
  transform: translateY(0) !important;
}

rmp-color-harmony-studio .rp-carry-btn-primary {
  background: linear-gradient(135deg, #0e7a4a 0%, #065f46 100%) !important;
  color: #ffffff !important;
}

rmp-color-harmony-studio .rp-carry-btn-step3 {
  background: linear-gradient(135deg, #4338ca 0%, #312e81 100%) !important;
  color: #ffffff !important;
}





/* Atelier UI refresh — preserve canvas geometry and interaction hooks. */
.rp-shell{padding:24px}.rp-card{border:1px solid #e2e8f0;border-radius:14px;box-shadow:0 4px 20px #0000000a;min-width:0}.rp-layout{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:20px}.rp-card-head{padding:16px}.rp-studio-title{color:#191516}.rp-source-banner{border-radius:14px}.rp-kernel{border-radius:12px;padding:4px}.rp-button,.rp-quiet,.rp-kernel button,.rp-carry-btn{min-height:44px}.rp-toolbar,.rp-source-actions,.rp-header-right{flex-wrap:wrap}.rp-swatch{border-radius:12px}.rp-harmony-card{box-shadow:0 4px 20px #00000006}
@media(max-width:900px){.rp-layout{grid-template-columns:minmax(0,1fr)}.rp-shell{padding:16px}.rp-studio-header,.rp-source-banner{flex-wrap:wrap}.rp-dock-top-row{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.rp-shell{padding:12px}.rp-card-head{flex-wrap:wrap;gap:10px}.rp-source-actions{display:flex;flex-direction:column;align-items:stretch}.rp-export-grid{grid-template-columns:minmax(0,1fr)}.rp-toolbar{gap:8px}}

/* Atelier refinement · 2026-11-02 */
:is(rmp-color-harmony-studio,rmp-pantone-studio) { --rp-ink:#191516; --rp-muted:#5d6470; }
.rp-card { overflow:visible; }
.rp-card-head { background:#fafbfc; border-radius:14px 14px 0 0; }
.rp-card-head h3 { font-size:13px; line-height:1.6; }
.rp-studio-title { font-size:25px; letter-spacing:-.8px; }
.rp-source-banner { padding:16px; background:#f7f8fa; border:1px solid #e2e8f0; }
.rp-source-actions { gap:8px; }
:is(rmp-color-harmony-studio,rmp-pantone-studio) button:not(.rp-pin) { min-height:44px!important; }
:is(rmp-color-harmony-studio,rmp-pantone-studio) :is(.rp-button,.rp-quiet,.rp-kernel button,.rp-source-actions button) { padding:9px 12px!important; border-radius:9px!important; line-height:1.5!important; }
:is(rmp-color-harmony-studio,rmp-pantone-studio) .rp-color-studio-dock input:focus-visible { outline:3px solid #059669!important; outline-offset:3px!important; }
.rp-harmony-add-btn { min-width:44px!important; opacity:1!important; }
.rp-harmony-chip { min-height:58px; }
.rp-palette-actions { gap:8px; }
.rp-palette-actions button { min-width:44px; }
.rp-toolbar { gap:10px; padding:12px; }
.rp-kernel { flex-wrap:wrap; }
.rp-card-head,.rp-inline,.rp-source-bottom { flex-wrap:wrap; }
@media(max-width:900px) { .rp-layout { grid-template-columns:minmax(0,1fr)!important; } .rp-header-right { justify-content:flex-start; } }
@media(max-width:600px) {
 .rp-studio-title { font-size:22px; }
 .rp-shell { padding:14px 10px; }
 .rp-source-actions { width:100%; }
 .rp-source-actions button { width:100%; justify-content:center; }
 .rp-card-head { padding:14px 12px; }
 .rp-toolbar { align-items:flex-start; }
 .rp-kernel { display:flex!important; width:100%; }
 .rp-kernel button { flex:1; }
 .rp-palette-item { grid-template-columns:28px minmax(0,1fr) auto; }
 .rp-search-entry { min-width:0; }
 .rp-color-studio-dock { padding:12px!important; }
}

/* Complete Color Harmony coverage for textile and home workspaces. */
.rp-pantone-actions { display:flex!important; flex-wrap:wrap!important; gap:8px!important; }
.rp-pantone-actions>* { min-width:0!important; flex:1 1 130px; white-space:normal!important; }
.rp-pantone-specs-grid>* { min-width:0; overflow-wrap:anywhere; }
@media(max-width:600px) {
 .rp-pantone-specs-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
 .rp-pantone-hero { min-width:0!important; padding:12px!important; }
 .rp-pantone-hero-container { min-width:0; }
}

rmp-color-harmony-studio .rp-spec-val { white-space:normal!important; overflow-wrap:anywhere!important; text-overflow:clip!important; line-height:1.6; }
