:root {
  --bg-1: #ecfeff;
  --bg-2: #fff7ed;
  --ink: #0f172a;
}

.palette-body {
  background:
    radial-gradient(1200px 520px at -15% -10%, rgba(14, 165, 233, 0.18), transparent 52%),
    radial-gradient(900px 520px at 112% 10%, rgba(249, 115, 22, 0.16), transparent 48%),
    linear-gradient(135deg, var(--bg-1) 0%, #f8fafc 42%, var(--bg-2) 100%);
  color: var(--ink);
}

.palette-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), transparent 80%);
}

.swatch {
  animation: card-enter 460ms ease both;
}

.swatch:nth-child(2) { animation-delay: 40ms; }
.swatch:nth-child(3) { animation-delay: 80ms; }
.swatch:nth-child(4) { animation-delay: 120ms; }
.swatch:nth-child(5) { animation-delay: 160ms; }
.swatch:nth-child(6) { animation-delay: 200ms; }
.swatch:nth-child(7) { animation-delay: 240ms; }
.swatch:nth-child(8) { animation-delay: 280ms; }

#export-content {
  white-space: pre;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Examples page: drag-and-drop color customization ── */

.color-source {
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.color-source:hover {
  transform: scale(1.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.color-source:active {
  cursor: grabbing;
}
.color-source.selected {
  outline: 2.5px solid #0f172a;
  outline-offset: 2px;
  transform: scale(1.12);
  box-shadow: 0 0 0 4px rgba(15,23,42,0.15);
}

[data-drop] {
  transition: outline-color 0.15s ease, transform 0.15s ease;
}
[data-drop].drop-hint {
  outline: 2px dashed rgba(15,23,42,0.25);
  outline-offset: 1px;
}
[data-drop].drop-hover {
  outline: 2.5px solid #0ea5e9;
  outline-offset: 1px;
  transform: scale(1.02);
}
[data-drop].drop-active {
  outline: 1.5px dashed rgba(14,165,233,0.45);
  outline-offset: 1px;
  cursor: pointer;
}

.color-applied {
  animation: color-flash 0.35s ease;
}

@keyframes color-flash {
  0%   { opacity: 1; transform: scale(1); }
  50%  { opacity: 0.7; transform: scale(1.03); }
  100% { opacity: 1; transform: scale(1); }
}
