:root {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #25222a;
  background: #f8f5ef;
  line-height: 1.5;
  --ink: #25222a;
  --muted: #706b70;
  --line: #e2d9cc;
  --purple: #7a4b9b;
  --pink: #cf5d76;
  --soft: #f4eee8;
}

* { box-sizing: border-box; }
body { margin: 0; }
.shell { max-width: 1100px; margin: auto; padding: 48px 20px 80px; }
.hero { max-width: 790px; margin-bottom: 32px; }
.eyebrow { color: var(--purple); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, serif; }
h1 { font-size: clamp(2.4rem, 6vw, 4.7rem); line-height: 1; margin: .2em 0; }
h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { margin: 0; font-size: 1.2rem; }
.lede { color: var(--muted); font-size: 1.1rem; max-width: 680px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 28px; margin: 20px 0; box-shadow: 0 14px 40px #3d273010; }
.hidden { display: none !important; }
.mode-message { margin: 1rem 0 0; padding: .8rem 1rem; border: 1px solid #c7a8dd; border-radius: .75rem; background: #f3eafa; color: #5c2679; font-weight: 700; }
.section-heading { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.section-heading p { color: var(--muted); margin: 5px 0 0; }
.step { display: grid; place-items: center; min-width: 38px; height: 38px; border-radius: 50%; background: #f0e5f5; color: var(--purple); font-weight: 900; }
form { display: grid; gap: 18px; max-width: 760px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { font-weight: 700; display: grid; gap: 7px; }
input, select, textarea { width: 100%; font: inherit; padding: 12px; border: 1px solid #bdb3aa; border-radius: 10px; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 3px solid #d7b7e8; outline-offset: 2px; }
button { font: inherit; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--purple), var(--pink)); border: 0; border-radius: 999px; padding: 12px 20px; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
.secondary-button { background: #fff; color: var(--purple); border: 1px solid #c7a8dd; }
.demo-reset-controls { margin-top: 18px; }
.demo-reset-controls .helper { margin: 8px 0 0; }
.text-button { color: var(--purple); background: transparent; border: 0; padding: 8px 0; text-decoration: underline; }
.mode-options { display: grid; gap: 11px; border: 0; padding: 0; margin: 0; }
.mode-options legend { font-weight: 800; margin-bottom: 2px; }
.mode-card { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "input text"; gap: 12px; align-items: start; padding: 15px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.mode-card:has(input:checked) { border-color: var(--purple); background: #faf5fc; box-shadow: 0 0 0 2px #eadbf1; }
.mode-card input { grid-area: input; width: auto; margin-top: 4px; }
.mode-card span { grid-area: text; display: grid; gap: 3px; }
.mode-card small { color: var(--muted); font-weight: 500; }
.mode-card em { color: var(--pink); font-family: inherit; font-size: .72em; font-style: normal; text-transform: uppercase; letter-spacing: .08em; }
.helper, .photo-preparation { color: var(--muted); margin: -8px 0 0; }
.consent { grid-template-columns: auto 1fr; align-items: start; font-weight: 500; }
.consent input { width: auto; margin-top: 5px; }
.confirmation { padding: 13px 15px; border-radius: 12px; background: #fff8ec; border: 1px solid #eed5a8; }
.message { min-height: 1.5em; color: #426b57; margin: 0; }
.error { color: #a22935 !important; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.concept { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; min-width: 0; }
.concept img, .concept model-viewer, .build-result model-viewer { display: block; width: 100%; aspect-ratio: 1; background: var(--soft); border-radius: 12px; object-fit: contain; }
.task-status { min-height: 1.5em; margin: 0; color: var(--muted); font-size: .94rem; }
.asset-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0; font-size: .9rem; }
.asset-links a { color: var(--purple); font-weight: 800; }
.build-result { display: grid; gap: 12px; max-width: 520px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.build-result .task-status { margin: 0; }
.gallery-state { display: grid; gap: 8px; justify-items: start; padding: 24px; border: 1px dashed var(--line); border-radius: 16px; background: var(--soft); }
.gallery-state strong { font-size: 1.05rem; }
.gallery-state p { margin: 0; color: var(--muted); }
.gallery-state-loading { background: #faf5fc; border-color: #d9c3e4; }
.gallery-state-network-error, .gallery-state-unavailable { background: #fff8ec; border-color: #eed5a8; }
.gallery-sets { display: grid; gap: 20px; }
.gallery-set { display: grid; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; }
.gallery-set-processing { border-color: #d9c3e4; }
.gallery-set-integrity-error { border-color: #e6b8bd; }
.gallery-set-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gallery-status, .gallery-slot-status { color: var(--muted); font-size: .88rem; font-weight: 800; }
.gallery-status { padding: 5px 10px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.gallery-slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gallery-slot { display: grid; gap: 8px; min-height: 142px; align-content: start; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.gallery-slot h4 { margin: 0; font-family: Georgia, serif; font-size: 1.15rem; }
.gallery-slot-verified { border-color: #b9d7c3; background: #f8fcf8; }
.gallery-slot-processing { background: #faf5fc; }
.gallery-slot-integrity-error, .gallery-slot-unavailable { background: #fffaf7; }
.gallery-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: auto; }
.gallery-action { color: var(--purple); font-size: .9rem; font-weight: 800; }
@media (max-width: 720px) {
  .shell { padding: 28px 14px 60px; }
  .panel { padding: 20px; border-radius: 17px; }
  .form-grid, .grid { grid-template-columns: 1fr; }
  .gallery-slot-grid { grid-template-columns: 1fr; }
  .section-heading { gap: 10px; }
  .step { min-width: 32px; height: 32px; font-size: .85rem; }
}