:root {
  color-scheme: light;
  --bg: #f5f1ea;
  --ink: #1a1a1a;
  --muted: #6d6761;
  --card: #fff8f1;
  --accent: #ef6b2d;
  --accent-2: #2b8a78;
  --ring: rgba(26, 26, 26, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 28px;
  font-family: "Fira Sans", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 15% -10%, #ffe3c2 0%, rgba(255, 227, 194, 0) 60%),
    radial-gradient(900px 500px at 110% 0%, #d0f1ea 0%, rgba(208, 241, 234, 0) 55%),
    linear-gradient(180deg, #fbf7f2 0%, #f3efe9 100%);
}

.app {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.header {
  display: grid;
  gap: 6px;
}

.title {
  font-size: 32px;
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--muted);
  font-size: 15px;
}

.panel {
  background: var(--card);
  border: 1px solid rgba(26, 26, 26, 0.08);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(26, 26, 26, 0.08);
  display: grid;
  gap: 16px;
}

.row {
  display: grid;
  gap: 16px;
  grid-template-columns: 1.2fr 1fr;
}

@media (max-width: 760px) {
  .row { grid-template-columns: 1fr; }
}

.preview {
  border-radius: 14px;
  min-height: 180px;
  background: var(--accent);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(26, 26, 26, 0.08);
}

.preview::after {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.45);
}

.preview-label {
  position: relative;
  z-index: 1;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #1a1a1a;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.swatches {
  display: grid;
  gap: 10px;
}

.swatch-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}

.swatch {
  border-radius: 12px;
  border: 1px solid rgba(26, 26, 26, 0.08);
  padding: 10px;
  display: grid;
  gap: 8px;
  background: #fff;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.swatch:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(26, 26, 26, 0.12);
}

.swatch-chip {
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(26, 26, 26, 0.08);
}

.swatch-code {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.notice {
  font-size: 13px;
  color: var(--muted);
}

@keyframes floatIn {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.panel, .preview, .swatch {
  animation: floatIn 300ms ease both;
}

.color-chip {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-2);
}
