#zodiacEditor {
  --zodiac-ink: #172b46;
  --zodiac-muted: #536780;
  --zodiac-border: #d8e2ee;
  --zodiac-accent: var(--shop-blue, #2b6eff);
  margin: 12px 0 18px;
  color: var(--zodiac-ink);
}

#zodiacEditor label, .zodiac-label {
  font-size: .86rem;
  font-weight: 600;
}

#zodiacEditor input[type=text], #zodiacEditor select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin: 0;
  border: 1px solid var(--zodiac-border);
  border-radius: 7px;
  padding: 8px 11px;
  background: #fff;
  color: var(--zodiac-ink);
  font: inherit;
}

#zodiacEditor > label {
  display: block;
  margin: 0 0 6px;
}

#zodiacEditor #zodiacSign {
  display: block;
  margin: 6px 0 12px;
}

#zodiacOptions {
  margin-top: 12px;
  border: 1px solid var(--zodiac-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 15px #172b4609;
}

#zodiacOptions[hidden], #zodiacEditor[hidden], #zodiacEditor > label[hidden], .zodiac-parts[hidden] {
  display: none;
}

.zodiac-colors, .zodiac-appearance {
  display: grid;
  gap: 12px;
  padding: 12px 16px;
}

.zodiac-color-heading, .zodiac-color-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zodiac-color-heading { justify-content: space-between; }

#zodiacEditor .zodiac-color-switch {
  position: relative;
  min-height: 32px;
  color: var(--zodiac-muted);
  cursor: pointer;
  font-size: .78rem;
  white-space: nowrap;
}

.zodiac-color-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.zodiac-color-switch span {
  position: relative;
  width: 35px;
  height: 20px;
  border: 1px solid #b6c5d7;
  border-radius: 20px;
  background: #e5edf5;
  pointer-events: none;
}

.zodiac-color-switch span::after {
  position: absolute;
  inset: 2px auto auto 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px #172b4640;
  content: '';
}

.zodiac-color-switch input:checked + span {
  border-color: var(--zodiac-accent);
  background: var(--zodiac-accent);
}

.zodiac-color-switch input:checked + span::after { transform: translateX(15px); }
.zodiac-color-switch input:focus-visible + span { outline: 2px solid var(--zodiac-accent); outline-offset: 3px; }

.zodiac-parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: #f0f4f9;
}

.zodiac-parts button, .zodiac-layer-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--zodiac-muted);
  font: 600 .79rem/1.3 var(--shop-font, Montserrat, sans-serif);
  cursor: pointer;
}

.zodiac-parts button[aria-pressed=true] {
  border-color: var(--zodiac-border);
  background: #fff;
  color: var(--zodiac-ink);
  box-shadow: 0 1px 2px #172b460c;
}

.zodiac-parts button::before, #zodiacPalette button {
  border: 1px solid #a6b5c6;
  border-radius: 50%;
  background: var(--zodiac-color);
}

.zodiac-parts button::before {
  width: 12px;
  height: 12px;
  content: '';
}

#zodiacPalette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 3px;
}

#zodiacPalette button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  cursor: pointer;
}

#zodiacPalette button[aria-pressed=true] {
  outline: 2px solid var(--zodiac-accent);
  outline-offset: 2px;
}

#zodiacPalette button[aria-pressed=true]::after {
  width: 12px;
  height: 12px;
  background: #fff;
  mix-blend-mode: difference;
  clip-path: polygon(0 52%, 16% 36%, 40% 60%, 83% 15%, 100% 31%, 40% 90%);
  content: '';
}

.zodiac-custom-color {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
}

#zodiacEditor .zodiac-custom-color label { font-size: .78rem; color: var(--zodiac-muted); }

.zodiac-hex-field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px;
  border: 1px solid var(--zodiac-border);
  border-radius: 7px;
  background: #f9fbfe;
}

:is(#zodiacColor, #zodiacShadowColor) {
  width: 30px;
  height: 30px;
  padding: 3px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

:is(#zodiacColor, #zodiacShadowColor)::-webkit-color-swatch-wrapper { padding: 0; }
:is(#zodiacColor, #zodiacShadowColor)::-webkit-color-swatch { border: 1px solid #abb8c9; border-radius: 5px; }
:is(#zodiacColor, #zodiacShadowColor)::-moz-color-swatch { border: 1px solid #abb8c9; border-radius: 5px; }

#zodiacShadowColor { width: 42px; min-height: 36px; }
#zodiacShadowColor:disabled { opacity: .45; cursor: default; }

#zodiacEditor #zodiacHex {
  width: 7.3ch;
  min-height: 32px;
  border: 0;
  border-radius: 3px;
  padding: 0;
  background: transparent;
  font: 600 .82rem/1.2 ui-monospace, monospace;
  text-transform: uppercase;
}

#zodiacEditor #zodiacHex[aria-invalid=true] { color: #a42436; }

.zodiac-appearance, .zodiac-layer-actions { border-top: 1px solid var(--zodiac-border); }
.zodiac-shadow { display: grid; gap: 6px; }

.zodiac-transform, .zodiac-layer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.zodiac-transform label {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 6px;
}

.zodiac-transform output { color: var(--zodiac-muted); font-variant-numeric: tabular-nums; }
.zodiac-transform input { width: 100%; min-height: 30px; margin: 2px 0 0; accent-color: var(--zodiac-accent); }
.zodiac-layer-actions { padding: 6px 12px; background: #f9fbfe; border-radius: 0 0 12px 12px; }
.zodiac-layer-actions button { color: var(--zodiac-ink); }
.zodiac-layer-actions button:hover { background: #eaf1fb; }
#removeZodiac { color: #9a2837; }
.zodiac-layer-actions svg { width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

#zodiacOptions :is(button,input[type=text],input[type=color],select):focus-visible {
  outline: 2px solid var(--zodiac-accent);
  outline-offset: 2px;
}

.ready-design.with-zodiac-editor .stage .stage-actions { display: flex !important; }
.ready-design.has-zodiac-layer #art { touch-action: none; cursor: grab; }
#zodiacStatus { margin: 8px 0 0; color: #9c2937; font-size: .86rem; }

@media (max-width: 450px) {
  .zodiac-colors, .zodiac-appearance { padding-inline: 12px; }
  #zodiacPalette { gap: 7px; }
  #zodiacPalette button { width: 27px; height: 27px; }
  .zodiac-layer-actions { gap: 5px; padding-inline: 6px; }
}
