.atelier-page .chip.on span { color: rgba(247, 244, 239, 0.72); }
.atelier-page .dropzone:hover,
.atelier-page .dropzone.drag {
  border-color: var(--teal);
}

.atelier-main {
  padding: 1.5rem 4vw 4rem;
  max-width: 1180px;
  margin: 0 auto;
}

.atelier-hero {
  margin-bottom: 2rem;
  max-width: 40rem;
}
.atelier-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--teal-deep);
  margin: 0.35rem 0 0.75rem;
}
.atelier-hero .lead {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0;
}

.atelier-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(300px, 1.15fr);
  gap: 1.75rem;
  align-items: start;
}

.atelier-controls {
  display: grid;
  gap: 1.35rem;
}

.step {
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(10, 107, 110, 0.12);
  padding: 1.15rem 1.2rem 1.25rem;
}
.step h2 {
  font-family: "Syne", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal-deep);
  margin: 0 0 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.step h2 span {
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  background: var(--teal);
  color: var(--cloud);
  font-size: 0.78rem;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  text-align: center;
  min-height: 140px;
  padding: 1rem;
  border: 1.5px dashed rgba(10, 107, 110, 0.45);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.dropzone:hover,
.dropzone.drag {
  border-color: var(--lava);
  background: rgba(255, 255, 255, 0.82);
  transform: scale(1.01);
}
.dropzone.has-file {
  border-style: solid;
  border-color: var(--teal);
}
.dropzone strong {
  font-weight: 700;
  color: var(--teal-deep);
}
.dropzone small {
  color: var(--muted);
  font-size: 0.82rem;
}
.file-name {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: var(--teal-deep);
  font-weight: 600;
}
.orient {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.4rem;
}
.orient .title {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.uploading { opacity: 0.6; pointer-events: none; }

.options {
  display: grid;
  gap: 1.1rem;
}
.loading-opts,
.err-opts {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}
.err-opts { color: var(--lava); }

.opt-group .title {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
  font-weight: 700;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.chip {
  border: 1px solid rgba(10, 107, 110, 0.22);
  background: rgba(255, 255, 255, 0.7);
  color: var(--teal-deep);
  padding: 0.55rem 0.75rem;
  font: 600 0.82rem "Syne", sans-serif;
  cursor: pointer;
  display: inline-flex;
  gap: 0.5rem;
  align-items: baseline;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.chip span {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
}
.chip.on {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: var(--cloud);
}
.chip.on span { color: var(--brass); }

.price-box {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.75rem;
}
.price-box strong {
  font-family: "Fraunces", serif;
  font-size: 1.85rem;
  color: var(--teal-deep);
}

.summary-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px dashed rgba(10, 107, 110, 0.12);
  padding-bottom: 0.3rem;
}
.summary-list strong { color: var(--ink); font-weight: 600; }

.hint {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
#addCustomBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.atelier-preview {
  position: sticky;
  top: 5.5rem;
}
.preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.wall-tones { display: flex; gap: 0.35rem; }
.wall-tones .tone {
  border: 1px solid rgba(10, 107, 110, 0.25);
  background: rgba(255, 255, 255, 0.5);
  color: var(--teal-deep);
  font: 600 0.72rem "Syne", sans-serif;
  padding: 0.3rem 0.55rem;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.wall-tones .tone.on {
  background: var(--teal-deep);
  color: var(--cloud);
  border-color: var(--teal-deep);
}

.wall {
  min-height: min(68vh, 620px);
  display: grid;
  place-items: center;
  padding: 2rem 1.5rem 2.5rem;
  position: relative;
  box-shadow: inset 0 0 80px rgba(18, 16, 16, 0.12);
  transition: background 0.35s ease;
}
.wall.linen {
  background:
    linear-gradient(90deg, rgba(18, 16, 16, 0.03) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, #d9cfc0, #cfc3b1 55%, #c4b8a6);
}
.wall.concrete {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.15), transparent 40%),
    linear-gradient(145deg, #b9b4ad, #9e9890 50%, #8a847c);
}
.wall.ink {
  background:
    radial-gradient(circle at 70% 10%, rgba(10, 107, 110, 0.25), transparent 45%),
    linear-gradient(160deg, #1c2424, #121818 60%, #0d1212);
}

.frame {
  width: min(360px, 82%);
  aspect-ratio: 4 / 5;
  padding: 14px;
  background: var(--frame-oak);
  box-shadow: 0 28px 55px rgba(18, 16, 16, 0.35);
  transition: background 0.35s ease, width 0.35s ease, aspect-ratio 0.35s ease;
}
.frame.noir { background: var(--frame-noir); }
.frame.or { background: linear-gradient(145deg, var(--frame-or), #7d6218); }
.frame.ratio-3-4 { aspect-ratio: 3 / 4; }
.frame.ratio-4-5 { aspect-ratio: 4 / 5; }
.frame.ratio-5-7 { aspect-ratio: 5 / 7; }
.frame.size-sm { width: min(280px, 70%); }
.frame.size-md { width: min(340px, 78%); }
.frame.size-lg { width: min(400px, 88%); }

.frame .mat {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--cloud);
  padding: 10px;
  overflow: hidden;
}
.frame .mat img {
  position: absolute;
  inset: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  object-fit: cover;
  display: none;
  background: #ddd;
}
.frame .mat img.show {
  display: block;
}
.placeholder {
  position: absolute;
  inset: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  padding: 1rem;
  pointer-events: none;
}
.placeholder.hide { display: none; }

.preview-meta {
  position: absolute;
  bottom: 0.85rem;
  left: 0;
  right: 0;
  text-align: center;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(18, 16, 16, 0.55);
}
.wall.ink .preview-meta { color: rgba(240, 237, 232, 0.7); }

.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 40;
  background: var(--teal-deep);
  color: var(--cloud);
  padding: 0.75rem 1.1rem;
  font: 600 0.88rem "Syne", sans-serif;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

@media (max-width: 900px) {
  .atelier-grid { grid-template-columns: 1fr; }
  .atelier-preview { position: static; order: -1; }
  .wall { min-height: 420px; }
}
