:root {
  --ink: #201b1a;
  --muted: #766d69;
  --paper: #fff8f1;
  --panel: #ffffff;
  --line: #eaded3;
  --red: #a8323b;
  --rose: #d7747b;
  --gold: #b88b48;
  --sage: #708c79;
  --blue: #536f8c;
  --shadow: 0 20px 70px rgba(70, 41, 33, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(216, 116, 123, 0.18), transparent 30%),
    linear-gradient(180deg, #fff8f1 0%, #f8ece3 48%, #fff 100%);
  font-family: Inter, "Helvetica Neue", Arial, system-ui, sans-serif;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 64px);
  background: rgba(255, 248, 241, 0.9);
  border-bottom: 1px solid rgba(234, 222, 211, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  min-width: 184px;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

nav {
  display: flex;
  gap: clamp(14px, 3vw, 34px);
  color: var(--muted);
  font-size: 14px;
}

.nav-cta,
.generate-btn,
.quote-box button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

.nav-cta,
.generate-btn {
  color: #fff;
  background: var(--red);
}

.nav-cta {
  min-width: 96px;
  padding: 0 18px;
}

.studio-shell {
  padding: clamp(34px, 6vw, 76px) clamp(18px, 5vw, 64px);
}

.studio-intro {
  max-width: 1060px;
  margin-bottom: 28px;
}

.eyebrow,
.section-title p {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.studio-intro h1 {
  max-width: 1040px;
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.03;
  letter-spacing: 0;
}

.studio-board {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: stretch;
}

.studio-panel {
  min-width: 0;
  padding: clamp(18px, 2.5vw, 28px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.upload-panel,
.details-panel {
  min-height: 430px;
}

.panel-head {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-head > span {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.panel-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: 0;
}

.panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.upload-drop {
  display: grid;
  min-height: 170px;
  place-items: center;
  align-content: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 22px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(168, 50, 59, 0.08), rgba(184, 139, 72, 0.16)),
    #fff;
  border: 1px dashed rgba(168, 50, 59, 0.45);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
}

.upload-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-drop strong {
  font-size: 24px;
}

.upload-drop span {
  color: var(--muted);
}

.upload-preview {
  display: grid;
  min-height: 150px;
  grid-template-columns: 1fr;
  gap: 12px;
}

.empty-preview {
  display: grid;
  min-height: 150px;
  grid-column: 1 / -1;
  place-items: center;
  color: var(--muted);
  background: #fbf2eb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.preview-tile {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #f1e4da;
}

.reference-card {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
}

.reference-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #f1e4da;
}

.reference-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.reference-image-wrap button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  color: #fff;
  background: rgba(32, 27, 26, 0.72);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.reference-card label {
  font-size: 12px;
}

.reference-controls {
  display: grid;
  gap: 10px;
  align-content: start;
}

.reference-row-head,
.applies-to-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reference-row-head strong,
.reference-row-head span {
  display: block;
}

.reference-row-head strong {
  font-size: 14px;
}

.reference-row-head span {
  max-width: 340px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-card input,
.reference-card select {
  min-height: 38px;
  font-size: 13px;
}

.applies-to-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.applies-to-label {
  margin: 0;
  color: #5b524e;
  font-size: 12px;
  font-weight: 800;
}

.applies-to-head {
  margin-bottom: 8px;
}

.reference-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.reference-actions button {
  min-height: 28px;
  padding: 0 8px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.applies-to-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.applies-to-grid label {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: #fbf2eb;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}

.applies-to-grid input {
  width: auto;
  min-height: auto;
}

.reference-brief {
  margin-top: 14px;
  padding: 14px;
  background: #fff8f1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.reference-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.reference-brief-head span {
  color: var(--muted);
  font-size: 12px;
}

.reference-brief p {
  margin: 10px 0 6px;
}

.reference-brief ul {
  margin: 0;
  padding-left: 20px;
}

.reference-brief li {
  color: #4c4440;
  line-height: 1.65;
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

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

.product-choice-area {
  display: grid;
  gap: 12px;
}

.selected-products-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: 360px;
  min-height: 360px;
  padding: 2px 4px 2px 2px;
  overflow-y: auto;
}

.selected-product-card {
  position: relative;
  display: grid;
  grid-template-rows: 104px auto;
  min-height: 156px;
  align-content: start;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.selected-product-card strong {
  font-size: 14px;
}

.selected-product-card::after {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.selected-product-card.is-selected {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(168, 50, 59, 0.12);
}

.selected-product-card.is-selected::after {
  content: "Selected";
}

.selected-product-card.is-unselected {
  opacity: 0.62;
  border-style: dashed;
}

.selected-product-card.is-unselected::after {
  content: "Not selected";
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
}

.custom-product-art {
  display: grid;
  width: 100%;
  min-height: 102px;
  aspect-ratio: 4 / 3;
  place-items: center;
  color: var(--red);
  background:
    linear-gradient(135deg, rgba(255, 248, 241, 0.95), rgba(231, 200, 185, 0.42)),
    repeating-linear-gradient(45deg, rgba(168, 50, 59, 0.08) 0 1px, transparent 1px 12px);
  border: 1px dashed #dca59b;
  border-radius: 6px;
  font-size: 38px;
  font-weight: 900;
}

.empty-selected-products {
  display: grid;
  grid-column: 1 / -1;
  min-height: 156px;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  background: #fff8f1;
  border: 1px dashed #e7c8b9;
  border-radius: 8px;
  text-align: center;
  line-height: 1.5;
}

.more-products-btn {
  width: 100%;
  min-height: 46px;
  color: var(--red);
  background: #fff8f1;
  border: 1px solid #e7c8b9;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.product-catalog {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  padding: clamp(14px, 3vw, 32px);
  background: rgba(32, 27, 26, 0.48);
}

.product-catalog.is-open {
  display: block;
}

.product-catalog-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  width: min(1040px, 100%);
  max-height: calc(100vh - clamp(28px, 6vw, 64px));
  margin: 0 auto;
  padding: clamp(16px, 3vw, 24px);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(32, 27, 26, 0.24);
}

.product-catalog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.product-catalog-head strong {
  display: block;
  font-family: "Georgia", serif;
  font-size: 24px;
}

.product-catalog-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.product-catalog-head button {
  min-height: 38px;
  padding: 0 14px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.product-catalog-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  max-height: 100%;
  padding: 2px 4px 8px 2px;
  overflow-y: auto;
}

.product-catalog-grid .visual-card {
  grid-template-rows: 118px auto;
  min-height: 176px;
  align-content: start;
}

.product-catalog-grid .card-photo {
  height: 118px;
  min-height: 0;
  aspect-ratio: auto;
}

.custom-product-card {
  display: grid;
  min-height: 142px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 14px;
  color: var(--red);
  background: #fff8f1;
  border: 1px dashed #dca59b;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
}

.custom-product-card span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #fff;
  background: var(--red);
  border-radius: 50%;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.custom-product-card strong {
  color: var(--ink);
  font-size: 14px;
}

.custom-product-card small {
  max-width: 150px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.custom-product-questionnaire {
  position: fixed;
  inset: 0;
  z-index: 25;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(32, 27, 26, 0.42);
}

.custom-product-questionnaire.is-open {
  display: grid;
}

.custom-product-form {
  display: grid;
  gap: 16px;
  width: min(520px, 100%);
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(32, 27, 26, 0.26);
}

.custom-product-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.custom-product-form input,
.custom-product-form textarea {
  width: 100%;
  padding: 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
}

.custom-product-form textarea {
  min-height: 112px;
  resize: vertical;
}

.custom-product-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.custom-product-actions button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.custom-product-actions button:first-child {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.custom-product-actions button:last-child {
  color: #fff;
  background: var(--red);
  border: 0;
}

.custom-product-toast {
  margin: 0;
  padding: 12px 14px;
  color: #fff;
  background: #536f5f;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

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

.visual-card {
  position: relative;
  display: grid;
  min-height: 156px;
  align-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.visual-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.visual-card strong {
  position: relative;
  z-index: 1;
  font-size: 14px;
}

.visual-card.is-selected {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(168, 50, 59, 0.12);
}

.visual-card.is-selected::after {
  content: "Selected";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.card-photo,
.style-swatch {
  display: block;
  width: 100%;
  min-height: 102px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background: #f5eadf;
}

.card-photo {
  height: 100%;
  object-fit: cover;
  border: 1px solid #eaded3;
}

.swatch-romantic {
  background:
    radial-gradient(circle at 24% 24%, #f4b7bb 0 15%, transparent 16%),
    linear-gradient(135deg, #fff5ef, #a8323b);
}

.swatch-garden {
  background:
    radial-gradient(circle at 70% 30%, #f7d5bb 0 13%, transparent 14%),
    linear-gradient(135deg, #708c79, #fff8f1);
}

.swatch-minimal {
  background:
    linear-gradient(90deg, #fff 0 68%, #201b1a 68% 72%, #c7c1bc 72%);
  border: 1px solid #eaded3;
}

.swatch-coastal {
  background:
    radial-gradient(circle at 30% 75%, #fff8f1 0 18%, transparent 19%),
    linear-gradient(135deg, #536f8c, #e8dacb);
}

label {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #5b524e;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(168, 50, 59, 0.12);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.generate-btn {
  width: 100%;
  margin-top: 14px;
}

.is-loading .generate-btn {
  opacity: 0.68;
  pointer-events: none;
}

.form-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.result-band,
.process {
  padding: clamp(42px, 7vw, 86px) clamp(18px, 5vw, 64px);
}

.result-band {
  background: #fff;
}

.section-title {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.12;
  letter-spacing: 0;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
  gap: 20px;
  align-items: start;
}

.progress-shell {
  margin: 0 0 18px;
  padding: 16px;
  background: #fff8f1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.progress-meta strong {
  color: var(--ink);
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: #eaded3;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: inherit;
  transition: width 0.25s ease;
}

.image-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.image-result {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.image-result:hover {
  border-color: rgba(168, 50, 59, 0.55);
  box-shadow: 0 10px 30px rgba(70, 41, 33, 0.12);
}

.image-result.is-empty {
  min-height: 170px;
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff8f1;
}

.image-frame {
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(168, 50, 59, 0.08), rgba(83, 111, 140, 0.12)),
    #f8ece3;
}

.image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-state {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.image-result.is-loading .image-state {
  color: var(--red);
}

.image-result.is-failed .image-state {
  color: var(--red);
}

.image-caption {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.image-caption strong {
  font-size: 15px;
}

.image-caption span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.image-caption a {
  color: var(--red);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.retry-product-btn {
  display: inline-flex;
  align-self: start;
  margin-top: 2px;
  padding: 0;
  color: var(--red);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.keep-sample-btn {
  display: inline-flex;
  align-self: start;
  margin-top: 4px;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.keep-sample-btn.is-kept {
  background: #536f5f;
}

.sample-cart {
  margin-top: 22px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sample-cart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.sample-cart-head p {
  margin: 0 0 4px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sample-cart-head h3 {
  margin: 0;
  font-family: "Georgia", serif;
  font-size: 24px;
}

.sample-cart-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.sample-cart-body {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}

.sample-cart-empty {
  padding: 14px;
  color: var(--muted);
  background: #fff8f1;
  border: 1px dashed #e7c8b9;
  border-radius: 8px;
}

.sample-cart-item {
  display: grid;
  grid-template-rows: 132px auto auto;
  min-width: 220px;
  max-width: 220px;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  scroll-snap-align: start;
}

.sample-cart-item img {
  width: 100%;
  height: 132px;
  object-fit: cover;
  border-radius: 6px;
}

.sample-cart-item strong,
.sample-cart-item span {
  display: block;
}

.sample-cart-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.sample-cart-item button,
.sample-cart-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.sample-cart-item button {
  color: var(--red);
  background: #fff;
  border: 1px solid #e7c8b9;
}

.sample-cart-btn {
  width: 100%;
  margin-top: 14px;
  color: #fff;
  background: var(--ink);
  border: 0;
}

.sample-cart-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.sample-request-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(32, 27, 26, 0.48);
}

.sample-request-modal.is-open {
  display: grid;
}

.sample-request-panel {
  display: grid;
  gap: 14px;
  width: min(680px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(32, 27, 26, 0.26);
}

.sample-request-panel .sample-cart-head button {
  min-height: 38px;
  padding: 0 12px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.sample-request-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sample-request-grid label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
}

.sample-request-grid input,
.sample-request-grid textarea {
  width: 100%;
  padding: 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
}

.sample-notes-field {
  grid-column: 1 / -1;
}

.sample-request-grid textarea {
  min-height: 110px;
  resize: vertical;
}

.product-detail {
  margin: 0 0 24px;
  padding: clamp(18px, 3vw, 28px);
  background: #fff8f1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.product-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.product-detail-head p {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.product-detail-head h3 {
  margin: 0;
  font-size: 28px;
}

.product-detail-head button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
}

#keepDetailSampleBtn {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

#keepDetailSampleBtn.is-kept {
  background: #536f5f;
  border-color: #536f5f;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 18px;
  align-items: start;
}

.prototype-panel,
.single-edit-panel {
  min-width: 0;
}

.prototype-panel h4 {
  margin: 0 0 10px;
  color: var(--red);
}

.prototype-frame {
  display: grid;
  min-height: 420px;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: zoom-in;
}

.prototype-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 760px;
  object-fit: contain;
}

.prototype-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.prototype-options button {
  display: grid;
  min-height: 82px;
  align-content: start;
  gap: 6px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.prototype-options button.is-selected {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(168, 50, 59, 0.12);
}

.prototype-options strong {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
  font-size: 12px;
}

.prototype-options span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.prototype-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  padding: 18px;
  background: rgba(32, 27, 26, 0.72);
}

.prototype-zoom-modal.is-open {
  display: grid;
  place-items: center;
}

.prototype-zoom-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  width: min(1180px, 100%);
  max-height: calc(100vh - 36px);
  padding: 18px;
  background: #fff;
  border-radius: 10px;
}

.prototype-zoom-panel .sample-cart-head {
  margin-bottom: 0;
}

.prototype-zoom-panel .sample-cart-head button {
  min-height: 38px;
  padding: 0 12px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.prototype-zoom-frame {
  min-height: 0;
  overflow: auto;
  background: #fff8f1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.prototype-zoom-frame.is-tile-view {
  width: min(760px, calc(100vw - 72px));
  max-height: min(760px, calc(100vh - 150px));
  aspect-ratio: 1;
  justify-self: center;
  overflow: hidden;
}

.prototype-zoom-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.prototype-zoom-frame.is-tile-view img {
  width: 300%;
  max-width: none;
  transform: translate(calc(var(--tile-col) * -33.333%), calc(var(--tile-row) * -33.333%));
}

.single-edit-panel {
  display: grid;
  gap: 12px;
}

.single-edit-panel textarea {
  min-height: 150px;
}

.proposal {
  min-height: 300px;
  padding: clamp(20px, 3vw, 32px);
  background: #fff8f1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.placeholder {
  color: var(--muted);
  line-height: 1.8;
}

.proposal h3 {
  margin: 0 0 12px;
  font-size: 28px;
}

.proposal h4 {
  margin: 24px 0 8px;
  color: var(--red);
}

.proposal p,
.proposal li {
  color: #4c4440;
  line-height: 1.8;
}

.proposal ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.quote-box {
  position: sticky;
  top: 96px;
  padding: 24px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
}

.quote-box span {
  color: #dfcbc0;
  font-size: 13px;
}

.quote-box strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
}

.quote-box p {
  color: #eadfd4;
  line-height: 1.7;
}

.quote-box button {
  width: 100%;
  color: var(--ink);
  background: #fff;
}

.process {
  background: #f6ece2;
}

.process ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
  border-top: 1px solid rgba(118, 109, 105, 0.25);
}

.process li {
  min-height: 174px;
  padding: 24px 24px 0 0;
  counter-increment: steps;
  border-right: 1px solid rgba(118, 109, 105, 0.25);
}

.process li::before {
  content: "0" counter(steps);
  display: block;
  margin-bottom: 26px;
  color: var(--red);
  font-weight: 900;
}

.process strong,
.process span {
  display: block;
}

.process span {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.75;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(18px, 5vw, 64px);
  color: #eadfd4;
  background: var(--ink);
}

@media (max-width: 1120px) {
  .studio-board,
  .result-layout,
  .product-detail-layout {
    grid-template-columns: 1fr;
  }

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

  .upload-panel,
  .details-panel {
    min-height: auto;
  }

  .quote-box {
    position: static;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
  }

  nav {
    display: none;
  }

  .nav-cta {
    min-width: 86px;
  }

  .studio-intro h1 {
    font-size: 38px;
  }

  .visual-grid,
  .style-choice-grid,
  .selected-products-box,
  .field-grid,
  .image-results,
  .process ol {
    grid-template-columns: 1fr;
  }

  .upload-preview {
    grid-template-columns: 1fr;
  }

  .reference-card {
    grid-template-columns: 1fr;
  }

  .reference-row-head,
  .applies-to-head,
  .product-detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .applies-to-grid {
    grid-template-columns: 1fr;
  }

  .prototype-options {
    grid-template-columns: 1fr;
  }

  .product-catalog {
    padding: 10px;
  }

  .product-catalog-panel {
    max-height: calc(100vh - 20px);
  }

  .product-catalog-head {
    flex-direction: column;
  }

  .process li {
    min-height: auto;
    padding-bottom: 24px;
    border-right: 0;
    border-bottom: 1px solid rgba(118, 109, 105, 0.25);
  }

  footer {
    flex-direction: column;
  }
}
