:root {
  color-scheme: light;
  --ink: #24372c;
  --muted: #5d675e;
  --paper: #faf7f2;
  --line: #d9d2c8;
  --focus: #ba8b39;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, sans-serif;
}

.customizer {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  width: min(1120px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px);
}

.preview-card {
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgb(72 52 35 / 12%);
  background: #eee1d2;
}

.stick-preview {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
}

.photo-preview {
  aspect-ratio: 3 / 4;
  background: #eee1d2;
}

.photo-preview > img,
.paint-overlay {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.photo-preview > img { object-fit: cover; }

.paint-overlay { pointer-events: none; }

.photo-tone {
  opacity: 0;
  mix-blend-mode: color;
}

.photo-shade {
  fill: #000;
  opacity: 0;
  mix-blend-mode: multiply;
}

.eyebrow {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 4px;
}

h1 {
  margin: 16px 0;
  font-family: Georgia, serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 400;
  line-height: 1.08;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.controls { margin-top: 22px; }

.color-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

label > span {
  display: block;
  font-weight: 700;
}

label > small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.color-field {
  position: relative;
  display: flex;
  align-items: center;
}

.color-swatch {
  position: absolute;
  left: 12px;
  z-index: 1;
  width: 24px;
  height: 24px;
  border: 1px solid rgb(36 55 44 / 25%);
  border-radius: 50%;
  pointer-events: none;
}

select {
  width: 100%;
  min-height: 48px;
  padding: 10px 38px 10px 48px;
  border: 1px solid #aaa59d;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.primary-button {
  flex: 1 1 220px;
  background: var(--ink);
  color: #fff;
}

.secondary-button {
  background: transparent;
  color: var(--ink);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.summary { margin: 18px 0 0; font-size: 14px; }
.note { margin-top: 24px; font-size: 12px; }
.status { min-height: 20px; font-size: 12px; }

button:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .customizer {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 16px;
  }

  .preview-card { max-height: 58vh; }
  .stick-preview { max-height: 58vh; }
}

@media (max-width: 420px) {
  .color-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }
}
