:root {
  --paper: #f4eee8;
  --ivory: #fbf8f3;
  --bone: #ebe1d8;
  --ink: #291f22;
  --muted: #6d5c5c;
  --line: #d7c9c2;
  --wine: #762f3b;
  --copper: #a26a54;
  --display: Italiana, Georgia, serif;
  --body: 'DM Sans', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible {
  outline: 2px solid var(--wine);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
}

h1 em, h2 em {
  font-weight: 400;
  color: var(--wine);
}

/* Site Header */
.site-header {
  min-height: 74px;
  padding: 0 4.3%;
  display: flex;
  align-items: center;
  gap: 19px;
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  font: 34px/0.9 var(--display);
  letter-spacing: -0.065em;
  white-space: nowrap;
}

.wordmark span {
  color: var(--wine);
}

.header-divider {
  height: 26px;
  width: 1px;
  background: var(--line);
}

.header-caption, .eyebrow, .intro-index, .studio-rule, .preview-head, .stage-top, .stage-bottom, .source-heading, .sample-row > span, .editor-head > span, .section-heading, .field-heading, .handoff-index, .handoff-questions > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.header-caption {
  color: var(--muted);
}

.site-header nav {
  display: flex;
  gap: 27px;
  margin-left: auto;
  align-items: center;
}

.site-header nav a {
  font-size: 12px;
  color: #5c5251;
  white-space: nowrap;
}

.site-header nav a:hover, .site-header nav a[aria-current] {
  color: var(--wine);
}

main {
  max-width: 1600px;
  margin: auto;
}

/* Intro Banner */
.intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 67px 4.3% 53px;
  gap: 30px;
}

.eyebrow {
  margin: 0 0 17px;
  color: var(--wine);
}

.asterisk {
  font-size: 17px;
  vertical-align: -2px;
  margin-right: 5px;
}

h1 {
  font-size: clamp(60px, 7.4vw, 114px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin-bottom: 18px;
}

.intro-copy {
  max-width: 625px;
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}

.intro-index {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: end;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 5px;
}

.studio-rule {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin: 0 4.3%;
  padding: 12px 0;
  color: var(--muted);
}

/* Workbench Grid & Sticky Architecture */
.workbench {
  display: grid;
  grid-template-columns: minmax(390px, 53%) minmax(380px, 47%);
  padding: 38px 4.3% 80px;
  align-items: start;
}

/* Column 1: Static / Sticky Preview */
/* Column 1: Static / Sticky Preview */
.preview-column {
  min-width: 0;
  padding-right: 36px;
}

@media (min-width: 901px) {
  .preview-column {
    position: -webkit-sticky;
    position: sticky;
    top: 14px;
    align-self: start;
    z-index: 10;
    height: calc(100vh - 28px);
    height: calc(100dvh - 28px);
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - 28px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(118, 47, 59, 0.25) transparent;
  }

  .preview-column::-webkit-scrollbar {
    width: 4px;
  }

  .preview-column::-webkit-scrollbar-track {
    background: transparent;
  }

  .preview-column::-webkit-scrollbar-thumb {
    background: rgba(118, 47, 59, 0.25);
    border-radius: 2px;
  }

  .preview-head {
    flex-shrink: 0;
  }

  .stage {
    flex: 1 1 auto;
    width: 100%;
    height: 100% !important;
    max-height: clamp(340px, calc(100vh - 120px), 760px);
    max-height: clamp(340px, calc(100dvh - 120px), 760px);
    aspect-ratio: 1122/1260;
    margin: 0 auto;
  }

  .preview-frame.is-demo {
    flex: 1 1 auto;
    width: 100%;
    height: 100% !important;
    max-height: clamp(340px, calc(100vh - 120px), 760px);
    max-height: clamp(340px, calc(100dvh - 120px), 760px);
    aspect-ratio: 1122/1260;
    margin: 0 auto;
  }

  .preview-toolbar, .stage-zoom-bar {
    flex-shrink: 0;
  }

  .stage-instruction {
    flex-shrink: 0;
    margin: 8px 0 0;
  }
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--wine);
  min-height: 37px;
}

.preview-head .eyebrow {
  margin: 0;
}

.preview-head > span:last-child {
  color: var(--muted);
}

/* Interactive Preview Stage matching Face Studio */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1122/1260;
  background: radial-gradient(ellipse at 48% 32%, #f6efe6, #ded3c8 77%);
  border: 1px solid #c5b5ab;
  border-radius: var(--radius-sm, 6px);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 10px 30px rgba(41, 29, 35, 0.12);
  user-select: none;
  cursor: crosshair;
}

.preview-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1122/1260;
  background: radial-gradient(ellipse at 48% 32%, #f6efe6, #ded3c8 77%);
  border: 1px solid #c5b5ab;
  border-radius: var(--radius-sm, 6px);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 10px 30px rgba(41, 29, 35, 0.12);
  user-select: none;
  cursor: crosshair;
}

.stage:before, .preview-frame:before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  z-index: 2;
  pointer-events: none;
  border-radius: 2px;
}

.stage canvas, .preview-frame canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  position: relative;
  z-index: 0;
  object-fit: contain;
  transform: translateZ(0);
  will-change: transform;
}

.stage canvas.dragging {
  cursor: grabbing;
}

.stage:fullscreen,
.stage.is-stage-fullscreen {
  width: 100vw !important;
  height: 100dvh !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
}

/* Top gradient shade overlay matching Face Studio */
.preview-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(27, 14, 21, 0.35),
    transparent 18%,
    transparent 72%,
    rgba(27, 14, 21, 0.6)
  );
  z-index: 1;
}

/* Top metadata matching Face Studio */
.preview-top, .stage-top {
  position: absolute;
  z-index: 3;
  left: 24px;
  right: 24px;
  top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.preview-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  color: #fff;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9a782;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.preview-no {
  font-size: 9px;
  letter-spacing: 0.18em;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  color: #fff;
}

/* Bottom metadata matching Face Studio */
.preview-bottom, .stage-bottom {
  position: absolute;
  z-index: 3;
  left: 24px;
  right: 24px;
  bottom: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.preview-bottom > div, .stage-bottom > div {
  display: grid;
  gap: 4px;
}

.preview-bottom strong, .stage-bottom strong, #stage-look-name {
  font: 400 clamp(20px, 2.2vw, 32px)/1 var(--display);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  color: #fff;
  letter-spacing: normal;
}

.preview-subdetail, #stage-view-label {
  font-size: 11px;
  letter-spacing: 0.04em;
  opacity: 0.9;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.preview-small {
  font-size: 9px;
  letter-spacing: 0.18em;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  color: #fff;
}

.preview-corner {
  font-size: 24px;
  line-height: 1;
  color: #f4eee8;
}

/* Floating Glassmorphic Stage Actions matching Face Studio */
.compare-btn {
  position: absolute;
  z-index: 4;
  right: 20px;
  top: 56px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(41, 29, 35, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: all 0.2s;
  user-select: none;
  cursor: pointer;
}

.compare-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}

.compare-btn:hover {
  background: rgba(41, 29, 35, 0.9);
  border-color: white;
  transform: translateY(-1px);
}

.compare-btn[aria-pressed="true"],
.compare-btn.active {
  background: var(--wine, #762f3b);
  border-color: #d9a782;
  box-shadow: 0 0 14px rgba(184, 115, 87, 0.45);
  color: #fff;
}

.stage-camera-action {
  position: absolute;
  z-index: 4;
  left: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(41, 29, 35, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  cursor: pointer;
}

.stage-rotate { top: 56px; }
.stage-flip { top: 96px; }
.stage-camera-action svg { width: 16px; height: 16px; display: block; }
.stage-camera-action:hover {
  background: rgba(41, 29, 35, 0.9);
  border-color: white;
  transform: scale(1.05);
}

.stage-fullscreen-fab {
  position: absolute;
  z-index: 4;
  right: 20px;
  bottom: 56px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(41, 29, 35, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.stage-fullscreen-fab:hover {
  background: rgba(41, 29, 35, 0.95);
  border-color: white;
  transform: scale(1.06);
}

.stage-fullscreen-fab svg { width: 16px; height: 16px; display: block; }
.stage-action-tooltip { display: none; }

.stage-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 25px;
  background: radial-gradient(ellipse at 50% 46%, #f7f0e8, #ded0c5);
  pointer-events: none;
}

.placeholder-star {
  font-size: 53px;
  line-height: 1;
  color: var(--copper);
  margin-bottom: 12px;
}

.stage-placeholder strong {
  font: 34px/1.1 var(--display);
}

.stage-placeholder p {
  max-width: 300px;
  color: var(--muted);
  margin: 11px 0 0;
  font-size: 12px;
}

/* Toolbar & Zoom Controls matching Face Studio */
.preview-toolbar, .stage-zoom-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 6px 14px;
  background: var(--card-bg, #fbf7f4);
  border: 1px solid var(--line, #e6ded8);
  border-radius: var(--radius-sm, 6px);
}

.zoom-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--white, #fff);
  border: 1px solid var(--line, #e6ded8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink, #1f1b1c);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s;
}

.zoom-btn:hover {
  border-color: var(--wine, #762f3b);
  background: #fdfaf7;
}

.zoom-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}

.stage-zoom-slider {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 3px;
  background: var(--line, #e6ded8);
  border-radius: 2px;
  accent-color: var(--wine, #762f3b);
  outline: none;
}

.stage-zoom-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--wine, #762f3b);
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--wine, #762f3b);
  cursor: pointer;
}

.zoom-level-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--wine, #762f3b);
  min-width: 36px;
  text-align: right;
  padding: 2px 4px;
  border-radius: 3px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.zoom-level-badge:hover {
  background: rgba(118, 47, 59, 0.08);
}

.stage-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding-left: 8px;
  border-left: 1px solid var(--line, #e6ded8);
}

.quick-btn {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm, 4px);
  background: var(--white, #fff);
  border: 1px solid var(--line, #e6ded8);
  color: var(--ink, #1f1b1c);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.quick-btn:hover {
  border-color: var(--wine, #762f3b);
  color: var(--wine, #762f3b);
}

.stage-instruction {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  margin: 10px 0 18px;
}

/* Source Panel: Canvas Source */
.source-panel {
  border-top: 1px solid var(--ink);
  padding-top: 18px;
}

.source-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--wine);
  margin-bottom: 14px;
}

.source-heading span:last-child {
  color: var(--muted);
}

.source-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: var(--ivory);
  padding: 3px;
  gap: 3px;
}

.source-tabs button {
  border: 0;
  background: transparent;
  min-height: 43px;
  font-size: 12px;
  transition: background 0.16s;
}

.source-tabs button[aria-pressed=true] {
  background: var(--ink);
  color: #fff;
}

.source-tabs button:hover:not([aria-pressed=true]) {
  background: var(--bone);
}

.source-options {
  padding: 14px 0 0;
}

.source-options p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
  margin: 12px 0 0;
}

.sample-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
}

.sample-row > span {
  color: var(--muted);
}

.tone-options, .view-options {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tone-options button {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--tone);
  border: 2px solid var(--ivory);
  box-shadow: 0 0 0 1px #b5a098;
  transition: transform 0.16s, box-shadow 0.16s;
}

.tone-options button:hover {
  transform: scale(1.08);
}

.tone-options button[aria-pressed=true] {
  box-shadow: 0 0 0 2px var(--wine);
}

.view-options {
  gap: 2px;
}

.view-options button {
  border: 1px solid transparent;
  background: transparent;
  padding: 7px 9px;
  font-size: 11px;
  transition: background 0.16s, border-color 0.16s;
}

.view-options button[aria-pressed=true] {
  background: var(--wine);
  color: #fff;
}

.view-options button:hover:not([aria-pressed=true]) {
  border-color: var(--line);
}

.file-button, .camera-actions button {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  padding: 10px 15px;
  border: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s;
}

.file-button:hover, .camera-actions button:hover {
  background: var(--wine);
  border-color: var(--wine);
}

#photo-filename {
  display: inline-block;
  margin-left: 12px;
  color: var(--muted);
  font-size: 11px;
}

.camera-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.camera-actions button:nth-child(2) {
  background: var(--ivory);
  color: var(--ink);
  border-color: var(--line);
}

/* Column 2: Scrollable Options & Editor */
.editor-column {
  border-left: 1px solid var(--line);
  padding-left: 36px;
  min-width: 0;
}

.editor-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 0 26px;
}

.editor-head .eyebrow {
  margin-bottom: 10px;
}

.editor-head h2 {
  font-size: clamp(43px, 4.5vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: 0;
}

.editor-head > span {
  color: var(--copper);
  text-align: right;
  max-width: 120px;
  padding-bottom: 5px;
}

.editor-section {
  border-top: 1px solid var(--ink);
  padding: 21px 0 27px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 17px;
}

.section-heading > span:first-child {
  color: var(--wine);
}

.section-heading > span:last-child {
  margin-left: auto;
  color: var(--muted);
  text-align: right;
}

.section-heading h3 {
  font: 29px/1 var(--display);
  letter-spacing: -0.03em;
  margin: 0;
}

.section-copy {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

/* Curated Sets */
.set-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.set-list button {
  position: relative;
  display: grid;
  text-align: left;
  min-height: 85px;
  padding: 13px 13px 12px;
  background: var(--ivory);
  border: 1px solid var(--line);
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.set-list button:before {
  content: '';
  height: 22px;
  width: 22px;
  position: absolute;
  right: 14px;
  top: 13px;
  border: 2px solid var(--copper);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--ivory);
}

.set-list button:nth-child(2):before {
  border-color: #b89350;
  box-shadow: inset 0 0 0 4px var(--ivory), 0 0 0 2px #b8935055;
}

.set-list button:nth-child(3):before {
  border-radius: 0;
  transform: rotate(45deg);
  width: 15px;
  height: 15px;
  top: 17px;
  right: 19px;
  border-color: #9a9fa4;
}

.set-list button:nth-child(4):before {
  border: 1px dashed var(--line);
}

.set-list strong {
  font: 23px/1 var(--display);
}

.set-list small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}

.set-list button > span {
  position: absolute;
  right: 13px;
  bottom: 11px;
  color: var(--wine);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.set-list button[aria-pressed=true] {
  background: #e9d9d0;
  border-color: var(--wine);
  box-shadow: inset 3px 0 var(--wine);
}

.set-list button:hover:not([aria-pressed=true]) {
  border-color: var(--wine);
}

/* Placements */
.area-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.area-tabs button {
  flex: 1;
  min-width: 65px;
  padding: 10px 9px;
  border: 1px solid var(--line);
  background: var(--ivory);
  font-size: 11px;
}

.area-tabs button[aria-pressed=true] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.placement-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.placement-fields label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.placement-fields select {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 7px;
  border: 1px solid var(--line);
  background: var(--ivory);
  padding: 0 9px;
  border-radius: 0;
  color: var(--ink);
  font-size: 12px;
}

.placement-hint {
  font-size: 11px;
  color: var(--wine);
  background: #eee1d8;
  border-left: 2px solid var(--wine);
  padding: 9px 11px;
  margin: 14px 0 0;
  line-height: 1.5;
}

/* Jewelry Catalog */
.catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.catalog button {
  border: 1px solid var(--line);
  background: var(--ivory);
  padding: 8px 5px;
  min-height: 101px;
  text-align: center;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.catalog button[aria-pressed=true] {
  border-color: var(--wine);
  box-shadow: inset 0 -3px var(--wine);
  background: #f1e4db;
}

.catalog button:disabled {
  opacity: 0.35;
}

.catalog button:hover:not([aria-pressed=true]):not(:disabled) {
  border-color: var(--wine);
}

.catalog canvas {
  display: block;
  width: 42px;
  height: 42px;
  margin: 0 auto 5px;
}

.catalog strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

.catalog small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}

/* Material Fields */
.material-fields {
  padding-top: 22px;
}

.field-heading {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  margin: 0 0 8px;
}

.field-heading small {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0;
}

.color-options {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.color-options button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: var(--ivory);
  font-size: 10px;
  transition: border-color 0.16s, background 0.16s;
}

.color-options button[aria-pressed=true] {
  border-color: var(--wine);
  background: #f0e2d9;
}

.color-options i {
  display: block;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--swatch);
  border: 1px solid #806b6555;
  box-shadow: inset -3px -3px 5px #0003, inset 2px 2px 4px #fff9;
}

/* Sliders & Action Buttons */
.range-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 3px 0 22px;
}

.range-fields label {
  font-size: 11px;
  font-weight: 600;
}

.range-fields output {
  float: right;
  color: var(--wine);
}

.range-fields input {
  display: block;
  width: 100%;
  margin-top: 10px;
  accent-color: var(--wine);
}

.primary-button {
  width: 100%;
  min-height: 49px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--wine);
  background: var(--wine);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  transition: background 0.18s;
}

.primary-button:hover {
  background: #57232d;
}

/* Composition Layers */
.layer-list {
  display: grid;
  gap: 5px;
  max-height: 232px;
  overflow: auto;
}

.layer-list button {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: var(--ivory);
  min-height: 53px;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.layer-list button[aria-pressed=true] {
  border-color: var(--wine);
  box-shadow: inset 3px 0 var(--wine);
}

.layer-list button:hover:not([aria-pressed=true]) {
  border-color: var(--wine);
}

.layer-list canvas {
  width: 30px;
  height: 30px;
}

.layer-list strong {
  display: block;
  font-size: 11px;
}

.layer-list small {
  display: block;
  font-size: 10px;
  color: var(--muted);
}

.layer-list button > span:last-child {
  color: var(--wine);
  font-size: 10px;
}

.empty-layers {
  padding: 19px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12px;
}

.layer-actions {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}

.layer-actions button, .save-actions button {
  border: 1px solid var(--line);
  background: var(--ivory);
  padding: 10px 12px;
  font-size: 11px;
  transition: border-color 0.16s, color 0.16s;
}

.layer-actions button:hover, .save-actions button:hover {
  border-color: var(--wine);
  color: var(--wine);
}

.save-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.save-actions button:last-child {
  grid-column: 1 / -1;
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 700;
  transition: background 0.16s, border-color 0.16s;
}

.save-actions button:last-child:hover {
  background: var(--wine);
  border-color: var(--wine);
}

.studio-status {
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
  min-height: 18px;
  margin: 12px 0 0;
}

/* Consultation Handoff */
.handoff {
  margin: 0 4.3% 50px;
  padding: 40px 0 25px;
  border-top: 1px solid var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 10%;
  align-items: start;
}

.handoff-index, .handoff-questions > span {
  color: var(--wine);
}

.handoff h2 {
  font-size: clamp(43px, 4vw, 68px);
  line-height: 0.99;
  letter-spacing: -0.04em;
  max-width: 670px;
  margin: 17px 0;
}

.handoff p {
  max-width: 570px;
  color: var(--muted);
  font-size: 13px;
}

.handoff-questions {
  border-left: 1px solid var(--line);
  padding-left: 30px;
}

.handoff ul {
  padding: 0;
  margin: 17px 0 0;
  list-style: none;
}

.handoff li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.handoff li:before {
  content: '↗';
  color: var(--wine);
  padding-right: 11px;
}

/* =====================================================================
   Responsive Media Queries: Mobile Sticky Live Preview Pinning
   ===================================================================== */
@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .site-header nav {
    width: 100%;
    margin: 0;
    gap: 18px;
    flex-wrap: wrap;
  }

  .workbench {
    display: flex;
    flex-direction: column;
    padding: 16px 4.3% 60px;
    gap: 0;
  }

  /* Unroll preview column to pin #stage at the top */
  .preview-column {
    display: contents !important;
  }

  .preview-head {
    order: 0;
    margin-bottom: 6px;
    color: var(--wine);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* Sticky live viewfinder matching Nail Studio & Lash Studio */
  #stage.stage {
    order: 1 !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 200 !important;
    width: calc(100% + 8.6%) !important;
    margin-left: -4.3% !important;
    margin-right: -4.3% !important;
    max-width: none !important;
    height: clamp(280px, 46vh, 390px) !important;
    height: clamp(280px, 46svh, 390px) !important;
    aspect-ratio: auto !important;
    border-radius: 0 0 20px 20px !important;
    box-shadow: 0 8px 24px rgba(41, 31, 34, 0.18) !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
  }

  .preview-top {
    top: 10px !important;
    left: 14px !important;
    right: 14px !important;
  }

  .preview-bottom {
    bottom: 10px !important;
    left: 14px !important;
    right: 56px !important;
  }

  .compare-btn {
    top: 42px !important;
    right: 14px !important;
  }

  .stage-fullscreen-fab {
    bottom: 12px !important;
    right: 14px !important;
    width: 32px !important;
    height: 32px !important;
  }

  .preview-toolbar {
    order: 2;
    padding: 10px 0;
    margin-top: 6px;
    position: relative;
    z-index: 10;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .stage-instruction {
    order: 3;
    margin: 8px 0 16px;
  }

  .source-panel {
    order: 4;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ink);
  }

  .editor-column {
    order: 5;
    border-left: 0;
    padding-left: 0;
  }

  .editor-head h2 {
    font-size: 54px;
  }
}

@media (max-width: 680px) {
  .site-header nav {
    gap: 12px 15px;
  }

  .site-header nav a {
    font-size: 11px;
  }

  .header-caption {
    font-size: 8px;
  }

  .intro {
    display: block;
    padding: 49px 5% 38px;
  }

  .intro h1 {
    font-size: clamp(58px, 13vw, 78px);
  }

  .intro-copy {
    font-size: 14px;
  }

  .intro-index {
    display: none;
  }

  .studio-rule {
    margin: 0 5%;
    font-size: 8px;
    gap: 10px;
  }

  .workbench {
    padding: 20px 5% 55px;
  }

  #stage.stage {
    width: calc(100% + 10%) !important;
    margin-left: -5% !important;
    margin-right: -5% !important;
  }

  .stage-top, .stage-bottom {
    left: 13px;
    right: 13px;
    font-size: 8px;
  }

  .preview-toolbar {
    flex-wrap: wrap;
  }

  .preview-toolbar > button:last-child {
    margin-left: 0;
  }

  .zoom-group {
    margin-left: auto;
  }

  .source-heading {
    font-size: 8px;
  }

  .sample-row {
    align-items: start;
    flex-direction: column;
    gap: 7px;
    padding: 10px 0;
  }

  .editor-head h2 {
    font-size: clamp(43px, 10vw, 60px);
  }

  .editor-head > span {
    display: none;
  }

  .section-heading h3 {
    font-size: 25px;
  }

  .section-heading > span:last-child {
    font-size: 8px;
  }

  .catalog {
    grid-template-columns: repeat(4, 1fr);
  }

  .catalog button {
    min-height: 90px;
  }

  .catalog canvas {
    width: 35px;
    height: 35px;
  }

  .handoff {
    margin: 0 5% 35px;
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .handoff-questions {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px 0 0;
  }

  .handoff h2 {
    font-size: 47px;
  }

  .stage-instruction, .source-options p, .section-copy, .placement-hint, .studio-status {
    font-size: 12.5px;
    line-height: 1.6;
  }

  .source-heading, .section-heading > span:last-child {
    font-size: 10px;
  }

  .source-tabs button, .view-options button, .area-tabs button, .placement-fields select, .range-fields label, .layer-actions button, .save-actions button, .primary-button, .camera-actions button, .file-button {
    font-size: 12px;
  }

  .source-tabs button {
    line-height: 1.25;
    white-space: normal;
    min-height: 48px;
  }

  .set-list button {
    min-height: 102px;
  }

  .set-list small, .layer-list small {
    font-size: 11px;
    line-height: 1.35;
  }

  .catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog button {
    min-height: 100px;
  }

  .catalog strong, .layer-list strong {
    font-size: 12px;
  }

  .catalog small {
    font-size: 11px;
    line-height: 1.3;
  }

  .color-options button {
    font-size: 11.5px;
  }

  .preview-toolbar > button, .zoom-group button {
    font-size: 11.5px;
  }
}

@media (max-width: 420px) {
  .preview-toolbar {
    gap: 6px;
  }

  .preview-toolbar > button, .zoom-group button {
    font-size: 10px;
  }

  .zoom-group input {
    width: 50px;
  }

  .source-tabs button {
    font-size: 10px;
  }

  .set-list button {
    min-height: 89px;
    padding: 10px;
  }

  .set-list strong {
    font-size: 20px;
  }

  .set-list small {
    font-size: 9px;
  }

  .catalog {
    grid-template-columns: repeat(2, 1fr);
  }

  .catalog button {
    min-height: 72px;
  }

  .catalog canvas {
    width: 33px;
    height: 33px;
  }

  .range-fields {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .placement-fields {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .intro h1, .intro-copy, .intro-index {
    animation: rise 0.55s both;
  }

  .intro-copy {
    animation-delay: 0.12s;
  }

  .intro-index {
    animation-delay: 0.2s;
  }

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

  .set-list button, .catalog button, .primary-button {
    transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
  }
}
