@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700;800;900&family=Instrument+Serif:ital,wght@0,400;1,400&display=swap");

:root {
  --font-ui: "Hanken Grotesk", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-hero: "Instrument Serif", Georgia, "Times New Roman", serif;
  --bg: #f2eee6;
  --panel: #fffdf6;
  --panel-2: #f8f3e9;
  --text: #1d1b18;
  --muted: #6f6961;
  --soft: #d8cebe;
  --line: #dfd6c8;
  --accent: #bf5a32;
  --accent-dark: #9f4523;
  --accent-soft: rgba(191, 90, 50, .10);
  --good: #168246;
  --warn: #b26a00;
  --bad: #b42318;
  --shadow: 0 28px 80px rgba(58, 48, 36, 0.11);
  --radius: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(circle at 65% 18%, rgba(191, 90, 50, .08), transparent 28rem),
    radial-gradient(circle at 15% 80%, rgba(255, 255, 255, .75), transparent 32rem),
    linear-gradient(180deg, #f6f2eb 0%, var(--bg) 100%);
  min-height: 100vh;
}

button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 52px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
}

.brand-mark {
  font-weight: 950;
  font-size: 24px;
  letter-spacing: -0.08em;
  color: #111;
}
.brand-mark::before { content: "▾"; font-size: 18px; margin-right: 4px; }
.brand-mark span { font-size: .72em; letter-spacing: -0.04em; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.nav-cta, button {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 850;
  border-radius: 999px;
  padding: 14px 22px;
  cursor: pointer;
  box-shadow: none;
  transition: .18s ease;
}
button:hover { background: var(--accent-dark); transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.surface-card {
  background: rgba(255, 253, 246, .92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
  padding: 0 12px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #8d8174;
  margin-bottom: 18px;
}
.kicker span { display: inline-block; width: 24px; height: 1px; background: var(--accent); }

h1 {
  margin: 0;
  max-width: 760px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: clamp(44px, 6.5vw, 92px);
  line-height: 1.01;
  letter-spacing: -0.045em;
}
h1 em {
  font-family: var(--font-hero);
  font-weight: 400;
  font-style: italic;
  color: var(--accent);
  letter-spacing: -0.04em;
}

h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.045em;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  max-width: 590px;
  margin: 22px 0 0;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 22px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.hero-stats span { display: grid; gap: 6px; }
.hero-stats strong { font-size: 23px; letter-spacing: -0.04em; }
.hero-stats small { color: #8d8174; font-size: 10px; letter-spacing: .20em; text-transform: uppercase; font-weight: 800; }

.calculator-card { padding: 24px; }

.calc-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 18px;
}
.calc-header p, .customer-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}
.calc-status {
  color: var(--accent);
  border: 1px solid rgba(191, 90, 50, .22);
  background: rgba(191, 90, 50, .08);
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
  white-space: nowrap;
}

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: 18px;
  align-items: stretch;
}

.preview-panel,
.side-panel,
.customer-box {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .38);
  border-radius: 24px;
  padding: 16px;
}

.viewer {
  height: 520px;
  border-radius: 20px;
  border: 1px solid #d4c8b8;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(rgba(52, 45, 35, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 45, 35, .055) 1px, transparent 1px),
    radial-gradient(circle at 58% 45%, rgba(255,255,255,.54), transparent 30%),
    linear-gradient(180deg, #faf5ec 0%, #eee6d7 100%);
  background-size: 24px 24px, 24px 24px, auto, auto;
}
.viewer canvas { display: block; }

.plate-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  pointer-events: none;
  border: 1px solid rgba(29, 27, 24, .12);
  background: rgba(255, 253, 246, .78);
  backdrop-filter: blur(8px);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 850;
}

.viewer-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 26px;
  text-align: center;
  color: var(--muted);
  line-height: 1.45;
  pointer-events: none;
  z-index: 2;
}
.viewer-empty strong { color: var(--text); font-size: 24px; letter-spacing: -0.04em; }
.viewer-empty span { max-width: 330px; }

.upload-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.upload-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}
.upload-button input { display: none; }
.upload-button span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  font-size: 18px;
  line-height: 1;
}

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}
.ghost:hover { background: #fffaf2; }
.small { padding: 10px 13px; font-size: 13px; }
.reset-camera { margin-left: auto; }

.model-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.stat {
  border: 1px solid var(--line);
  background: rgba(248, 243, 233, .78);
  border-radius: 15px;
  padding: 11px;
  min-width: 0;
}
.stat span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.stat strong { font-size: 13px; word-break: break-word; }

.side-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}
.price-box {
  border-radius: 22px;
  background: #fffdf6;
  border: 1px solid var(--line);
  padding: 22px;
}
.price-label { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.price { font-size: clamp(58px, 7vw, 92px); line-height: .88; letter-spacing: -0.075em; margin: 0; }
.price small { font-size: 25px; letter-spacing: -0.02em; }
.price-note { color: var(--muted); line-height: 1.42; margin: 14px 0 0; font-size: 14px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 10px; font-size: 13px; color: var(--muted); }

.settings-stack {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(248, 243, 233, .68);
  padding: 16px;
  display: grid;
  gap: 12px;
}
.settings-title { font-size: 14px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }


.color-field {
  min-width: 0;
}

.color-swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.color-swatch {
  --swatch: #151515;
  appearance: none;
  border: 1px solid #d9cfc0;
  background: #fffdf8;
  color: var(--text);
  border-radius: 14px;
  min-height: 48px;
  padding: 7px 7px 6px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}

.color-swatch:hover {
  background: #fff8ee;
  transform: translateY(-1px);
  border-color: rgba(191, 90, 50, .35);
}

.color-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(191, 90, 50, .12);
  background: #fff8ee;
}

.color-swatch.disabled {
  opacity: .34;
  cursor: not-allowed;
  filter: grayscale(.55);
}

.color-swatch.disabled:hover {
  transform: none;
  background: #fffdf8;
  border-color: #d9cfc0;
}

.swatch-dot {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.32), rgba(0,0,0,.10)),
    var(--swatch);
  border: 1px solid rgba(29,27,24,.22);
}

.color-swatch small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
  line-height: 1.05;
  font-weight: 900;
  color: var(--text);
}

.color-help {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.field {
  display: grid;
  gap: 7px;
  font-size: 14px;
  color: var(--text);
  font-weight: 850;
}

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="url"], select, textarea {
  width: 100%;
  border: 1px solid #d9cfc0;
  background: #fffdf8;
  color: var(--text);
  border-radius: 15px;
  padding: 12px 13px;
  outline: none;
  transition: .15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(191, 90, 50, .10);
}
textarea { min-height: 112px; resize: vertical; }

.slider-field {
  border: 1px solid var(--line);
  background: #fffdf8;
  border-radius: 16px;
  padding: 12px;
}
.slider-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; color: var(--muted); font-weight: 750; }
.slider-head strong { color: var(--text); font-size: 18px; }
input[type="range"] { width: 100%; accent-color: var(--accent); cursor: pointer; }
.range-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; color: var(--muted); font-size: 11px; line-height: 1.2; }
.range-labels span:nth-child(2), .range-labels span:nth-child(3) { text-align: center; }
.range-labels span:last-child { text-align: right; }

.qty-stepper { display: grid; grid-template-columns: 44px minmax(68px, 1fr) 44px; gap: 8px; }
.qty-stepper input { text-align: center; font-weight: 950; }
.qty-btn { border-radius: 14px; padding: 0; font-size: 20px; min-height: 45px; }

.mini-options { display: grid; gap: 9px; }
.toggle { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); background: #fffdf8; border-radius: 16px; padding: 12px; cursor: pointer; user-select: none; }
.toggle input, .consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.toggle strong { display: block; margin-bottom: 3px; }
.toggle small { display: block; color: var(--muted); font-size: 12px; line-height: 1.34; }
.link-button { appearance: none; border: 0; background: transparent; color: var(--accent); width: fit-content; padding: 4px 2px; box-shadow: none; border-radius: 0; font-weight: 850; cursor: pointer; }
.link-button:hover { background: transparent; color: var(--accent-dark); transform: none; }

.calc-breakdown { display: grid; gap: 0; border-top: 1px solid var(--line); }
.row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding: 9px 2px; font-size: 14px; color: var(--muted); }
.row strong { color: var(--text); text-align: right; }

.customer-box {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}
.customer-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.customer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.consent { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 13px; line-height: 1.4; }

.notice { border-radius: 16px; padding: 13px 14px; font-size: 14px; line-height: 1.45; border: 1px solid rgba(178,106,0,.25); background: rgba(178,106,0,.08); color: #5c3900; }
.notice code { font-size: .92em; background: rgba(255,255,255,.55); padding: 1px 5px; border-radius: 6px; }
.success { border-color: rgba(22,130,70,.26); background: rgba(22,130,70,.09); color: #07582b; }
.error { border-color: rgba(180,35,24,.25); background: rgba(180,35,24,.08); color: #7a1710; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.fineprint { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 0; }

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(29, 27, 24, .42);
  backdrop-filter: blur(8px);
}

.confirm-dialog {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 32px 90px rgba(29,27,24,.26);
  padding: 22px;
}

.confirm-dialog h3 {
  margin: 0 0 8px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.confirm-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}


.version-footer {
  margin: 18px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .02em;
}

.version-footer strong {
  color: var(--accent);
}

.hidden { display: none !important; }

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .hero-strip, .calc-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(4, 1fr); }
  .viewer { height: 460px; }
}

@media (max-width: 760px) {
  .page-shell { width: min(100% - 20px, 1180px); padding-top: 14px; }
  .site-nav { margin-bottom: 26px; }
  .hero-stats, .settings-grid, .customer-grid { grid-template-columns: 1fr 1fr; }
  .color-swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calc-header, .customer-head { align-items: stretch; flex-direction: column; }
  .viewer { height: 360px; }
  .model-stats { grid-template-columns: repeat(2, 1fr); }
  .reset-camera { margin-left: 0; }
}

@media (max-width: 520px) {
  h1 { font-size: 42px; }
  .calculator-card { padding: 14px; }
  .preview-panel, .side-panel, .customer-box { padding: 12px; }
  .viewer { height: 315px; }
  .hero-stats, .settings-grid, .customer-grid, .model-stats { grid-template-columns: 1fr; }
  .upload-line button { flex: 1 1 auto; }
  .customer-head button { width: 100%; }
}
.upload-button.dragover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}



/* v8 compact layout overrides */
.calculator-card {
  padding: 18px;
}

.calc-header {
  margin-bottom: 12px;
}

.calc-grid {
  grid-template-columns: minmax(0, .96fr) minmax(420px, .84fr);
  gap: 16px;
  align-items: start;
}

.preview-panel,
.side-panel,
.customer-box {
  padding: 14px;
}

.viewer {
  height: clamp(300px, 35vw, 430px);
  min-height: 0;
}

.upload-line {
  margin-top: 10px;
}

.model-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.stat {
  padding: 9px 10px;
  min-height: auto;
}

.stat span {
  font-size: 10px;
}

.stat strong {
  font-size: 13px;
}

.settings-stack {
  gap: 10px;
}

.settings-title {
  margin-bottom: -2px;
}

.settings-grid.material-row {
  grid-template-columns: 1fr;
}

.color-field {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
}

.color-swatches {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.color-swatch {
  width: 100%;
  height: 42px;
  min-height: 42px;
  border-radius: 13px;
  padding: 7px 9px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  text-align: left;
}

.color-swatch small {
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.swatch-dot {
  width: 17px;
  height: 17px;
  border-radius: 5px;
}

.color-help {
  margin-top: 2px;
}

.slider-field {
  padding: 10px 12px;
}

.range-labels {
  font-size: 10px;
}

.qty-stepper {
  grid-template-columns: 42px minmax(60px, 1fr) 42px;
}

.qty-btn {
  min-height: 42px;
}

.mini-options {
  gap: 8px;
}

.toggle {
  padding: 10px 12px;
}

.calc-breakdown {
  margin-top: 2px;
}

.row {
  padding: 7px 2px;
}

.customer-box {
  margin-top: 16px;
}

.customer-head {
  margin-bottom: 0;
}

@media (min-width: 1081px) {
  .side-panel {
    position: sticky;
    top: 14px;
  }
}

@media (max-width: 1080px) {
  .calc-grid {
    grid-template-columns: 1fr;
  }

  .viewer {
    height: 420px;
  }

  .model-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .color-swatches {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .model-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .color-swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}



/* v11 final compact preview */
.calc-grid {
  align-items: start;
}

.preview-panel {
  align-self: start;
  display: grid;
  gap: 10px;
}

.side-panel {
  align-self: start;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.viewer-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.viewer {
  height: clamp(280px, 30vw, 380px);
  max-height: 380px;
  border-radius: 22px;
}

.viewer-empty strong {
  font-size: 21px;
}

.viewer-empty span {
  max-width: 260px;
  font-size: 13px;
}

.plate-badge {
  bottom: 10px;
  left: 10px;
  padding: 7px 10px;
  font-size: 11px;
}

.upload-button {
  padding: 11px 15px;
}

.ghost.small {
  padding: 10px 13px;
  min-height: 42px;
}

.reset-camera {
  min-width: 72px;
}

.model-stats.compact-stats {
  grid-template-columns: 1.25fr 1.35fr .7fr .7fr;
  gap: 7px;
  margin-top: 0;
}

.compact-stats .stat {
  padding: 8px 9px;
  border-radius: 13px;
}

.compact-stats .stat span {
  margin-bottom: 2px;
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.compact-stats .stat strong {
  font-size: 12px;
  line-height: 1.15;
}

.price-box {
  padding-bottom: 12px;
}

.price {
  font-size: clamp(44px, 5.4vw, 66px);
}

.price-note {
  margin-top: 8px;
}

.pill-row {
  margin-top: 10px;
}

.settings-stack {
  margin-top: 12px;
}

.calc-breakdown {
  margin-top: 12px;
}

@media (min-width: 1081px) {
  .preview-panel {
    position: sticky;
    top: 14px;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 1080px) {
  .viewer {
    height: 380px;
  }
}

@media (max-width: 760px) {
  .preview-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .viewer-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .model-stats.compact-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .viewer {
    height: 330px;
  }
}

@media (max-width: 520px) {
  .viewer {
    height: 290px;
  }

  .viewer-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}



/* v12 fonts */
body,
button,
input,
select,
textarea,
.stat,
.field,
.notice,
.pill,
.row,
.kicker,
.nav-links,
.nav-cta {
  font-family: var(--font-ui);
}

h1 {
  font-family: var(--font-hero);
}

h2,
h3,
.price,
.brand-mark {
  font-family: var(--font-ui);
}

.lead {
  font-family: var(--font-ui);
  font-weight: 500;
}

.kicker,
.hero-stats small,
.calc-status,
.version-footer {
  font-family: var(--font-ui);
}



/* RC1 final polish */
body,
button,
input,
select,
textarea {
  font-family: var(--font-ui);
}

h1 {
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: -0.045em;
}

h1 em {
  font-family: var(--font-hero);
  font-style: italic;
}

.calc-grid {
  align-items: start;
}

.preview-panel {
  align-self: start;
  display: grid;
  gap: 10px;
}

.side-panel {
  align-self: start;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.viewer-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.viewer {
  height: clamp(280px, 30vw, 380px);
  max-height: 380px;
  border-radius: 22px;
}

.model-stats.compact-stats {
  grid-template-columns: 1.25fr 1.35fr .7fr .7fr;
  gap: 7px;
  margin-top: 0;
}

.compact-stats .stat {
  padding: 8px 9px;
  border-radius: 13px;
}

.compact-stats .stat span {
  margin-bottom: 2px;
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.compact-stats .stat strong {
  font-size: 12px;
  line-height: 1.15;
}

.version-footer {
  margin: 18px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.version-footer strong {
  color: var(--accent);
}

@media (max-width: 760px) {
  .preview-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .viewer-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .model-stats.compact-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .viewer {
    height: 330px;
  }
}





/* RC2 final requested layout */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-select {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 12px;
  font-weight: 900;
  outline: none;
}

.calc-grid.final-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(350px, .72fr);
  gap: 18px;
  align-items: start;
}

.preview-panel {
  display: grid;
  gap: 11px;
  align-self: start;
}

.price-panel {
  align-self: start;
  position: sticky;
  top: 14px;
}

.print-settings {
  margin-top: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, .72);
}

.viewer {
  height: clamp(300px, 32vw, 410px) !important;
  max-height: 410px;
}

.viewer-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background: rgba(255, 253, 246, .78);
  backdrop-filter: blur(8px);
  text-align: center;
  color: var(--text);
}

.viewer-loading strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.viewer-loading span {
  color: var(--muted);
  font-size: 13px;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(29,27,24,.14);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.price {
  font-family: var(--font-hero);
  font-weight: 400;
  letter-spacing: -0.035em !important;
  font-variant-numeric: tabular-nums;
}

.price small {
  font-family: var(--font-ui);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-left: 8px;
}

.shipping-note {
  margin: 2px 0 0;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.price-fineprint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 12px 0 0;
}

.cad-box {
  display: grid;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,253,248,.74);
  padding: 14px;
}

.customer-head.compact {
  margin: 0;
}

.file-field input[type="file"] {
  padding: 10px;
  border: 1px dashed var(--soft);
  border-radius: 14px;
  background: #fffdf8;
}

.color-swatches {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.color-swatch {
  height: 40px;
  min-height: 40px;
}

.calc-breakdown .row strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

@media (max-width: 1080px) {
  .calc-grid.final-layout {
    grid-template-columns: 1fr;
  }

  .price-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .color-swatches {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .color-swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}



/* RC3 balanced columns */
.calc-grid.final-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.balanced-column {
  min-height: 100%;
}

.preview-panel,
.price-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-panel {
  position: static;
}

.preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.file-input-hidden {
  display: none !important;
}

.upload-button {
  min-height: 44px;
  white-space: nowrap;
}

.viewer {
  height: clamp(330px, 31vw, 430px) !important;
  max-height: 430px;
}

.settings-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 253, 248, .72);
  padding: 14px;
}

.color-settings {
  flex: 1;
}

.print-settings {
  margin-top: 0;
  flex: 1;
}

.price-box {
  flex: 0 0 auto;
}

.calc-breakdown {
  flex: 0 0 auto;
}

.price-fineprint {
  margin-top: auto;
}

.color-swatches {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.color-swatch {
  height: 40px;
  min-height: 40px;
}

.price {
  font-family: var(--font-hero);
  font-weight: 400;
  letter-spacing: -0.035em !important;
  font-variant-numeric: tabular-nums;
}

.price small {
  font-family: var(--font-ui);
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-left: 8px;
}

@media (max-width: 1080px) {
  .calc-grid.final-layout {
    grid-template-columns: 1fr;
  }

  .balanced-column {
    min-height: auto;
  }

  .color-settings,
  .print-settings {
    flex: 0 0 auto;
  }
}

@media (max-width: 760px) {
  .preview-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .viewer-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .color-swatches {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .color-swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .viewer-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}



/* RC4 hard layout fix */
.page-shell {
  width: min(1320px, calc(100% - 48px));
}

.calculator-card {
  padding: 20px;
}

.calc-header {
  margin-bottom: 18px;
}

.calc-grid.final-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.03fr) minmax(430px, .97fr) !important;
  gap: 28px !important;
  align-items: start !important;
}

.preview-panel,
.price-panel {
  min-width: 0;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.preview-panel,
.side-panel,
.customer-box {
  padding: 18px !important;
}

.preview-toolbar {
  display: grid !important;
  grid-template-columns: minmax(210px, 260px) minmax(0, auto);
  align-items: center !important;
  gap: 14px !important;
}

.upload-button {
  width: 100% !important;
  min-width: 210px !important;
  max-width: 260px !important;
  min-height: 52px !important;
  padding: 0 22px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  overflow: visible !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.upload-plus {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-size: 17px;
  line-height: 1;
  flex: 0 0 auto;
}

.upload-text {
  display: inline-block;
  overflow: visible;
  white-space: nowrap;
  font-size: 15px;
  letter-spacing: .01em;
}

.viewer-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  min-width: 0;
}

.ghost.small {
  min-height: 44px !important;
  padding: 0 16px !important;
}

.reset-camera {
  min-width: 78px !important;
}

.viewer {
  height: clamp(330px, 30vw, 420px) !important;
  max-height: 420px !important;
  border-radius: 24px !important;
}

.model-stats.compact-stats {
  grid-template-columns: 1.2fr 1.35fr .72fr .62fr !important;
  gap: 10px !important;
}

.compact-stats .stat {
  padding: 11px 12px !important;
  min-height: 54px !important;
}

.settings-card {
  padding: 18px !important;
  border-radius: 24px !important;
}

.color-settings {
  flex: 0 0 auto !important;
}

.color-swatches {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.color-swatch {
  height: 45px !important;
  min-height: 45px !important;
  padding: 0 12px !important;
  border-radius: 14px !important;
  grid-template-columns: 20px minmax(0, 1fr) !important;
  gap: 9px !important;
}

.color-swatch small {
  font-size: 12px !important;
}

.swatch-dot {
  width: 18px !important;
  height: 18px !important;
  border-radius: 5px !important;
}

.price-panel {
  gap: 14px !important;
}

.price-box {
  padding: 26px !important;
  border-radius: 26px !important;
}

.price-label {
  margin-bottom: 12px !important;
}

.price {
  display: flex !important;
  align-items: baseline !important;
  gap: 12px !important;
  font-size: clamp(62px, 5.9vw, 88px) !important;
  line-height: .9 !important;
  letter-spacing: -0.025em !important;
  margin: 0 !important;
}

.price small {
  margin-left: 0 !important;
  font-size: 28px !important;
}

.price-note {
  margin-top: 16px !important;
  max-width: 520px;
}

.pill-row {
  margin-top: 16px !important;
  gap: 10px !important;
}

.pill {
  padding: 9px 13px !important;
}

.print-settings {
  padding: 18px !important;
  gap: 16px !important;
}

.settings-title {
  margin-bottom: 10px !important;
  letter-spacing: .14em !important;
}

.field {
  gap: 7px !important;
}

.settings-grid {
  gap: 14px !important;
}

.slider-field {
  padding: 14px 16px !important;
  border-radius: 18px !important;
}

.slider-head {
  margin-bottom: 12px !important;
}

.range-labels {
  margin-top: 10px !important;
  gap: 12px !important;
}

.qty-stepper {
  grid-template-columns: 48px minmax(84px, 1fr) 48px !important;
  gap: 8px !important;
}

.qty-stepper input,
.field select,
.field input {
  min-height: 48px !important;
}

.mini-options {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
}

.toggle {
  padding: 14px 16px !important;
  border-radius: 18px !important;
}

.link-button {
  width: fit-content !important;
  padding: 4px 0 !important;
}

.calc-breakdown {
  padding: 4px 0 0 !important;
  margin-top: 2px !important;
}

.calc-breakdown .row {
  padding: 11px 2px !important;
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 18px !important;
}

.calc-breakdown .row strong {
  min-width: 72px;
  text-align: right;
}

.price-fineprint {
  margin-top: 4px !important;
  padding-top: 4px !important;
}

.customer-box {
  margin-top: 28px !important;
}

.file-input-hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .calc-grid.final-layout {
    grid-template-columns: 1fr !important;
  }

  .preview-toolbar {
    grid-template-columns: minmax(210px, 260px) 1fr;
  }

  .color-swatches {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 24px, 1320px);
  }

  .calculator-card {
    padding: 14px;
  }

  .preview-toolbar {
    grid-template-columns: 1fr !important;
  }

  .upload-button {
    max-width: none !important;
  }

  .viewer-actions {
    justify-content: stretch !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .color-swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .model-stats.compact-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}



/* RC RELEASE 1 final toolbar + layout cleanup */
.preview-toolbar {
  display: grid !important;
  grid-template-columns: 190px minmax(150px, 190px) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
}

.upload-button {
  width: 190px !important;
  min-width: 190px !important;
  max-width: 190px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  overflow: visible !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  border-radius: 999px !important;
}

.upload-plus {
  display: none !important;
}

.upload-text {
  display: block !important;
  overflow: visible !important;
  white-space: nowrap !important;
  font-size: 15px !important;
  line-height: 1 !important;
  letter-spacing: .01em !important;
}

.toolbar-no-model {
  width: 100% !important;
  min-height: 48px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  background: #fffdf8 !important;
}

.toolbar-no-model span {
  display: inline-flex !important;
  align-items: center !important;
}

.toolbar-no-model strong {
  font-size: 13px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.toolbar-no-model small {
  display: none !important;
}

.viewer-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.link-only {
  display: block !important;
  margin-top: -2px !important;
}

.link-only .link-button {
  width: auto !important;
}

.mini-options.link-only {
  padding-top: 0 !important;
}

.calc-grid.final-layout {
  grid-template-columns: minmax(0, 1fr) minmax(430px, 1fr) !important;
  gap: 28px !important;
  align-items: start !important;
}

.preview-panel,
.price-panel {
  gap: 16px !important;
}

.viewer {
  height: clamp(330px, 30vw, 420px) !important;
  max-height: 420px !important;
}

.price-panel .settings-card,
.price-box,
.calc-breakdown {
  width: 100% !important;
}

.price-box {
  padding: 28px !important;
}

.print-settings {
  padding: 20px !important;
}

.slider-field {
  margin-top: 2px !important;
}

.calc-breakdown {
  padding-top: 4px !important;
}

.calc-breakdown .row {
  padding: 11px 2px !important;
}

.color-settings {
  padding: 20px !important;
}

.color-swatches {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.color-swatch {
  height: 45px !important;
}

@media (max-width: 1180px) {
  .calc-grid.final-layout {
    grid-template-columns: 1fr !important;
  }

  .preview-toolbar {
    grid-template-columns: 190px minmax(150px, 190px) 1fr !important;
  }

  .color-swatches {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .preview-toolbar {
    grid-template-columns: 1fr !important;
  }

  .upload-button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .toolbar-no-model {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .viewer-actions {
    justify-content: stretch !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
  }

  .color-swatches {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}



/* RC RELEASE 1 POLISHED - flow + visual cleanup */
.preview-toolbar {
  display: grid !important;
  grid-template-columns: 205px 190px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
}

.upload-button {
  width: 205px !important;
  min-width: 205px !important;
  max-width: 205px !important;
  height: 50px !important;
  min-height: 50px !important;
  padding: 0 18px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 11px !important;
  overflow: visible !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  border-radius: 999px !important;
}

.upload-plus {
  display: inline-grid !important;
  place-items: center !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .22) !important;
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  transform: translateY(-.5px);
}

.upload-text {
  display: inline-block !important;
  overflow: visible !important;
  white-space: nowrap !important;
  font-size: 15px !important;
  line-height: 1 !important;
  letter-spacing: .01em !important;
}

.toolbar-no-model {
  width: 190px !important;
  min-width: 190px !important;
  height: 50px !important;
  min-height: 50px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  background: #fffdf8 !important;
  flex-shrink: 0 !important;
}

.toolbar-no-model span {
  display: inline-flex !important;
  align-items: center !important;
  min-width: 0 !important;
}

.toolbar-no-model strong {
  font-size: 13px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.toolbar-no-model small {
  display: none !important;
}

.viewer {
  position: relative !important;
}

.viewer.no-model-mode canvas {
  opacity: .12;
  filter: blur(1.5px) saturate(.75);
}

.viewer.no-model-mode .plate-badge,
.viewer.no-model-mode .viewer-empty {
  display: none !important;
}

.no-model-screen {
  position: absolute;
  inset: 18px;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  border: 1px dashed rgba(191, 90, 50, .34);
  border-radius: 22px;
  background: rgba(255, 253, 246, .86);
  backdrop-filter: blur(8px);
  padding: 28px;
}

.no-model-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 30px;
  font-family: var(--font-hero);
}

.no-model-screen strong {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.no-model-screen span {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.45;
}

.no-model-scroll {
  margin-top: 4px;
  min-height: 42px;
  padding-inline: 18px !important;
}

.cad-box {
  scroll-margin-top: 24px;
  border-color: rgba(191, 90, 50, .32) !important;
  background: rgba(255, 250, 241, .92) !important;
}

.calc-grid.final-layout {
  grid-template-columns: minmax(0, 1fr) minmax(430px, 1fr) !important;
  gap: 30px !important;
}

.price-box,
.print-settings,
.color-settings,
.calc-breakdown {
  box-shadow: 0 12px 35px rgba(58, 48, 36, 0.035);
}

@media (max-width: 1180px) {
  .preview-toolbar {
    grid-template-columns: 205px 190px minmax(0, 1fr) !important;
  }
}

@media (max-width: 860px) {
  .preview-toolbar {
    grid-template-columns: 1fr 1fr !important;
  }

  .viewer-actions {
    grid-column: 1 / -1;
  }

  .upload-button,
  .toolbar-no-model {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}

@media (max-width: 560px) {
  .preview-toolbar {
    grid-template-columns: 1fr !important;
  }

  .no-model-screen {
    inset: 12px;
    padding: 18px;
  }
}



/* RC RELEASE 2 final cleanup */
.calc-grid.final-layout {
  grid-template-columns: minmax(0, 1fr) minmax(430px, 1fr) !important;
  gap: 32px !important;
  align-items: stretch !important;
}

.preview-panel,
.price-panel {
  min-height: 100% !important;
}

.preview-toolbar {
  display: grid !important;
  grid-template-columns: 230px 190px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
}

.upload-button {
  position: relative !important;
  width: 230px !important;
  min-width: 230px !important;
  max-width: 230px !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 22px 0 56px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  border-radius: 999px !important;
  text-align: left !important;
}

.upload-plus {
  position: absolute !important;
  left: 20px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .22) !important;
  display: grid !important;
  place-items: center !important;
  pointer-events: none !important;
}

.upload-plus::before {
  content: "+" !important;
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  transform: translateY(-1px);
}

.upload-text {
  display: block !important;
  width: 100% !important;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  font-size: 15px !important;
  line-height: 1 !important;
}

.toolbar-no-model {
  width: 190px !important;
  min-width: 190px !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  background: #fffdf8 !important;
  flex-shrink: 0 !important;
}

.toolbar-no-model strong {
  font-size: 13px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.viewer-actions {
  justify-content: flex-end !important;
}

.price-panel {
  display: grid !important;
  grid-template-rows: auto auto auto 1fr !important;
}

.print-settings {
  min-height: 330px !important;
}

.price-fineprint {
  align-self: end !important;
}

.no-model-screen span {
  max-width: 440px !important;
}

.no-model-screen strong {
  font-size: 27px !important;
}

.mini-options,
.link-only,
#showLinkFallback,
#modelLinkWrap {
  display: none !important;
}

@media (max-width: 1180px) {
  .calc-grid.final-layout {
    grid-template-columns: 1fr !important;
  }

  .preview-toolbar {
    grid-template-columns: 230px 190px minmax(0, 1fr) !important;
  }

  .price-panel {
    display: flex !important;
  }
}

@media (max-width: 860px) {
  .preview-toolbar {
    grid-template-columns: 1fr 1fr !important;
  }

  .viewer-actions {
    grid-column: 1 / -1;
  }

  .upload-button,
  .toolbar-no-model {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }
}

@media (max-width: 560px) {
  .preview-toolbar {
    grid-template-columns: 1fr !important;
  }
}



/* BETA 1 stabilization */
.calc-grid.final-layout {
  grid-template-columns: minmax(0, 1fr) minmax(470px, 1fr) !important;
  gap: 36px !important;
  align-items: start !important;
}

.preview-panel,
.price-panel {
  gap: 18px !important;
}

.preview-toolbar {
  display: grid !important;
  grid-template-columns: 245px 195px minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: center !important;
}

.clean-upload-button,
.upload-button.clean-upload-button {
  all: unset;
  box-sizing: border-box !important;
  width: 245px !important;
  height: 54px !important;
  min-height: 54px !important;
  display: grid !important;
  grid-template-columns: 26px max-content !important;
  justify-content: center !important;
  align-items: center !important;
  column-gap: 12px !important;
  border-radius: 999px !important;
  background: var(--accent) !important;
  color: #fff !important;
  font-family: var(--font-ui) !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

.clean-upload-button:hover,
.upload-button.clean-upload-button:hover {
  background: var(--accent-dark) !important;
}

.upload-icon {
  position: static !important;
  display: grid !important;
  place-items: center !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.22) !important;
  pointer-events: none !important;
}

.upload-icon::before {
  content: "+" !important;
  color: #fff !important;
  display: block !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  transform: translateY(-1px) !important;
}

.upload-label {
  display: block !important;
  position: static !important;
  overflow: visible !important;
  white-space: nowrap !important;
  font-size: 15px !important;
  letter-spacing: .01em !important;
  line-height: 1 !important;
}

.upload-plus,
.upload-plus::before,
.upload-text {
  display: none !important;
  content: none !important;
}

.toolbar-no-model {
  width: 195px !important;
  min-width: 195px !important;
  height: 54px !important;
  min-height: 54px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: #fffdf8 !important;
}

.toolbar-no-model strong {
  font-size: 13px !important;
  white-space: nowrap !important;
}

.viewer-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

.ghost.small {
  min-width: 52px !important;
}

.reset-camera {
  min-width: 86px !important;
}

.price-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

.price-box {
  padding: 32px !important;
  border-radius: 28px !important;
}

.price {
  display: flex !important;
  align-items: baseline !important;
  gap: 16px !important;
  font-family: var(--font-hero) !important;
  font-size: clamp(70px, 6.4vw, 96px) !important;
  line-height: .92 !important;
  letter-spacing: .012em !important;
  font-variant-numeric: tabular-nums !important;
}

.price small {
  font-family: var(--font-ui) !important;
  font-size: 30px !important;
  font-weight: 900 !important;
  letter-spacing: .02em !important;
  margin-left: 0 !important;
}

.price-note {
  margin-top: 18px !important;
  line-height: 1.55 !important;
}

.pill-row {
  margin-top: 18px !important;
}

.print-settings {
  padding: 24px !important;
  display: grid !important;
  gap: 20px !important;
  min-height: 0 !important;
}

.field select,
.field input,
.qty-stepper input {
  min-height: 52px !important;
}

.slider-field {
  padding: 18px !important;
}

.range-labels {
  display: grid !important;
  grid-template-columns: repeat(4, max-content) !important;
  justify-content: space-between !important;
  gap: 18px !important;
  overflow: visible !important;
}

.settings-grid {
  gap: 18px !important;
}

.calc-breakdown {
  margin-top: 0 !important;
  padding: 6px 0 0 !important;
}

.calc-breakdown .row {
  padding: 13px 2px !important;
}

.calc-breakdown .row strong {
  min-width: 92px !important;
  text-align: right !important;
}

.price-fineprint {
  margin-top: 0 !important;
  line-height: 1.5 !important;
}

.viewer {
  height: clamp(340px, 31vw, 430px) !important;
}

.no-model-screen span {
  max-width: 440px !important;
}

@media (max-width: 1180px) {
  .calc-grid.final-layout {
    grid-template-columns: 1fr !important;
  }

  .preview-toolbar {
    grid-template-columns: 245px 195px minmax(0, 1fr) !important;
  }
}

@media (max-width: 880px) {
  .preview-toolbar {
    grid-template-columns: 1fr 1fr !important;
  }

  .clean-upload-button,
  .upload-button.clean-upload-button,
  .toolbar-no-model {
    width: 100% !important;
    min-width: 0 !important;
  }

  .viewer-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

@media (max-width: 560px) {
  .preview-toolbar {
    grid-template-columns: 1fr !important;
  }
}



/* BETA 2 final corrective pass */

/* Fix: kicker text was inheriting the decorative-line span width and wrapping into the hero headline. */
.kicker {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: auto !important;
  max-width: 100% !important;
  white-space: nowrap !important;
}

.kicker > span:first-child {
  display: inline-block !important;
  width: 24px !important;
  min-width: 24px !important;
  height: 1px !important;
  background: var(--accent) !important;
}

.kicker > span:not(:first-child) {
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  white-space: nowrap !important;
}

.site-nav {
  margin-bottom: 44px !important;
  min-height: 44px !important;
  overflow: visible !important;
}

.brand-mark {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 1px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  letter-spacing: -0.045em !important;
  position: relative !important;
  z-index: 2 !important;
}

.brand-mark::before {
  content: none !important;
  display: none !important;
}

.hero-strip {
  align-items: end !important;
  gap: 42px !important;
  margin-bottom: 32px !important;
  overflow: visible !important;
}

.hero-strip h1,
h1 {
  line-height: .98 !important;
  max-width: 820px !important;
}

.lead {
  max-width: 720px !important;
}

/* Upload button: new isolated classes only. No inherited old upload-plus rules. */
.preview-toolbar {
  display: grid !important;
  grid-template-columns: 258px 205px minmax(230px, 1fr) !important;
  gap: 16px !important;
  align-items: center !important;
}

.upload-button-final {
  all: unset !important;
  box-sizing: border-box !important;
  appearance: none !important;
  width: 258px !important;
  min-width: 258px !important;
  height: 54px !important;
  min-height: 54px !important;
  display: grid !important;
  grid-template-columns: 26px auto !important;
  justify-content: center !important;
  align-items: center !important;
  column-gap: 12px !important;
  border-radius: 999px !important;
  background: var(--accent) !important;
  color: #fff !important;
  font-family: var(--font-ui) !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-align: center !important;
}

.upload-button-final:hover {
  background: var(--accent-dark) !important;
  transform: translateY(-1px) !important;
}

.upload-icon-final {
  display: grid !important;
  place-items: center !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.22) !important;
  pointer-events: none !important;
  position: static !important;
}

.upload-icon-final::before {
  content: "+" !important;
  display: block !important;
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  transform: translateY(-1px) !important;
}

.upload-label-final {
  display: block !important;
  position: static !important;
  overflow: visible !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  letter-spacing: .005em !important;
}

/* Disable all old upload implementations. */
.upload-button:not(.upload-button-final),
.clean-upload-button:not(.upload-button-final),
.upload-plus,
.upload-plus::before,
.upload-text,
.upload-icon:not(.upload-icon-final),
.upload-icon:not(.upload-icon-final)::before,
.upload-label:not(.upload-label-final) {
  all: unset !important;
  display: none !important;
  content: none !important;
}

.toolbar-no-model {
  width: 205px !important;
  min-width: 205px !important;
  height: 54px !important;
  min-height: 54px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: #fffdf8 !important;
  box-sizing: border-box !important;
}

.toolbar-no-model strong {
  font-size: 13px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* Right side spacing pass. */
.calc-grid.final-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(500px, 1fr) !important;
  gap: 42px !important;
  align-items: start !important;
}

.price-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
}

.price-box,
.print-settings,
.calc-breakdown {
  border-radius: 28px !important;
}

.price-box {
  padding: 34px !important;
}

.print-settings {
  padding: 26px !important;
  display: grid !important;
  gap: 24px !important;
}

.settings-grid {
  gap: 22px !important;
}

.field {
  gap: 9px !important;
}

.field select,
.field input,
.qty-stepper input {
  min-height: 54px !important;
}

.slider-field {
  padding: 20px !important;
}

.range-labels {
  margin-top: 14px !important;
  display: grid !important;
  grid-template-columns: repeat(4, max-content) !important;
  justify-content: space-between !important;
  column-gap: 22px !important;
}

.qty-stepper {
  gap: 10px !important;
  grid-template-columns: 54px minmax(92px, 1fr) 54px !important;
}

.qty-btn {
  min-height: 54px !important;
}

.calc-breakdown .row {
  padding: 14px 2px !important;
}

.calc-breakdown .row strong {
  min-width: 100px !important;
  text-align: right !important;
}

.price {
  display: flex !important;
  align-items: baseline !important;
  gap: 18px !important;
  font-family: var(--font-hero) !important;
  font-size: clamp(72px, 6.2vw, 100px) !important;
  line-height: .92 !important;
  letter-spacing: .018em !important;
  font-variant-numeric: tabular-nums !important;
}

.price small {
  font-family: var(--font-ui) !important;
  font-size: 30px !important;
  font-weight: 900 !important;
  letter-spacing: .02em !important;
}

.price-note {
  margin-top: 20px !important;
  line-height: 1.6 !important;
}

.pill-row {
  margin-top: 20px !important;
  gap: 12px !important;
}

.viewer-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  min-width: 0 !important;
}

.viewer-actions .ghost.small {
  min-width: 54px !important;
  min-height: 46px !important;
}

.viewer-actions .reset-camera {
  min-width: 88px !important;
}

/* Color label spacing. */
.color-swatches {
  gap: 11px !important;
}

.color-swatch {
  height: 46px !important;
  min-height: 46px !important;
  padding: 0 12px !important;
}

.color-swatch small {
  font-size: 12px !important;
}

@media (max-width: 1240px) {
  .calc-grid.final-layout {
    grid-template-columns: 1fr !important;
  }

  .preview-toolbar {
    grid-template-columns: 258px 205px minmax(230px, 1fr) !important;
  }
}

@media (max-width: 900px) {
  .preview-toolbar {
    grid-template-columns: 1fr 1fr !important;
  }

  .upload-button-final,
  .toolbar-no-model {
    width: 100% !important;
    min-width: 0 !important;
  }

  .viewer-actions {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

@media (max-width: 620px) {
  .preview-toolbar {
    grid-template-columns: 1fr !important;
  }

  .hero-strip {
    grid-template-columns: 1fr !important;
  }

  .kicker {
    white-space: normal !important;
  }
}



/* BETA 3 stable layout - controls inside preview window */
.preview-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, .82fr) !important;
  align-items: center !important;
  gap: 16px !important;
}

.upload-button-final {
  all: unset !important;
  box-sizing: border-box !important;
  appearance: none !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 56px !important;
  display: grid !important;
  grid-template-columns: 28px max-content !important;
  justify-content: center !important;
  align-items: center !important;
  column-gap: 12px !important;
  border-radius: 999px !important;
  background: var(--accent) !important;
  color: #fff !important;
  font-family: var(--font-ui) !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

.upload-button-final:hover {
  background: var(--accent-dark) !important;
  transform: translateY(-1px) !important;
}

.upload-icon-final {
  display: grid !important;
  place-items: center !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.22) !important;
  position: static !important;
}

.upload-icon-final::before {
  content: "+" !important;
  display: block !important;
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  transform: translateY(-1px) !important;
}

.upload-label-final {
  display: block !important;
  min-width: 0 !important;
  overflow: visible !important;
  white-space: nowrap !important;
  line-height: 1 !important;
}

.toolbar-no-model {
  width: 100% !important;
  min-width: 0 !important;
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  display: grid !important;
  grid-template-columns: 20px minmax(0, max-content) !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px !important;
  background: #fffdf8 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.toolbar-no-model strong {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  font-size: 13px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* XYZ/Reset are now part of the preview window. */
.viewer {
  position: relative !important;
  overflow: hidden !important;
}

.viewer-overlay-actions {
  position: absolute !important;
  z-index: 8 !important;
  top: 14px !important;
  right: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  min-width: 0 !important;
  pointer-events: auto !important;
}

.viewer-overlay-actions .ghost.small {
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  background: rgba(255, 253, 246, .88) !important;
  color: var(--text) !important;
  border: 1px solid rgba(223, 214, 200, .94) !important;
  backdrop-filter: blur(8px) !important;
  box-shadow: 0 8px 24px rgba(58, 48, 36, .06) !important;
}

.viewer-overlay-actions .reset-camera {
  min-width: 76px !important;
}

/* Keep old toolbar action layouts from affecting the overlay. */
.preview-toolbar > .viewer-actions:not(.viewer-overlay-actions) {
  display: none !important;
}

/* Less cramped DE/EN and right column */
.calc-grid.final-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(520px, 1fr) !important;
  gap: 44px !important;
  align-items: start !important;
}

.price-panel {
  display: flex !important;
  flex-direction: column !important;
  gap: 26px !important;
}

.price-box {
  padding: 36px !important;
}

.print-settings {
  padding: 28px !important;
  display: grid !important;
  gap: 26px !important;
}

.settings-grid {
  gap: 24px !important;
}

.slider-field {
  padding: 22px !important;
}

.range-labels {
  margin-top: 14px !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, auto)) !important;
  justify-content: space-between !important;
  column-gap: 24px !important;
  white-space: nowrap !important;
}

.field select,
.field input,
.qty-stepper input {
  min-height: 56px !important;
}

.qty-stepper {
  grid-template-columns: 56px minmax(92px, 1fr) 56px !important;
  gap: 12px !important;
}

.qty-btn {
  min-height: 56px !important;
}

.calc-breakdown .row {
  padding: 15px 2px !important;
  gap: 22px !important;
}

.calc-breakdown .row strong {
  min-width: 108px !important;
  text-align: right !important;
}

.price {
  letter-spacing: .02em !important;
}

.price-note {
  line-height: 1.65 !important;
  max-width: none !important;
}

/* Hero guard */
.kicker > span:not(:first-child) {
  width: auto !important;
  height: auto !important;
  background: transparent !important;
}

.brand-mark::before {
  content: none !important;
  display: none !important;
}

@media (max-width: 1280px) {
  .calc-grid.final-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 720px) {
  .preview-toolbar {
    grid-template-columns: 1fr !important;
  }

  .viewer-overlay-actions {
    top: 10px !important;
    right: 10px !important;
    gap: 6px !important;
  }

  .viewer-overlay-actions .ghost.small {
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 11px !important;
  }

  .viewer-overlay-actions .reset-camera {
    min-width: 66px !important;
  }
}



/* RC FINAL hard guards */
.price-panel {
  min-width: 0 !important;
}

.field span,
.toggle strong,
.color-swatch small,
.pill,
.price-note,
.notice,
.fineprint {
  overflow-wrap: anywhere;
}

.toolbar-no-model strong {
  overflow-wrap: normal !important;
}

@media (min-width: 1281px) {
  .calc-grid.final-layout {
    grid-template-columns: minmax(0, 1fr) minmax(540px, 1fr) !important;
    gap: 46px !important;
  }
}

.version-footer strong {
  letter-spacing: .02em;
}



/* RC FINAL FIX - price table, material translations, disclaimer */
.field select#material {
  width: 100% !important;
  min-width: 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

.price-breakdown-card,
.calc-breakdown.price-breakdown-card {
  border: 1px solid var(--line) !important;
  border-radius: 24px !important;
  background: rgba(255, 253, 248, .72) !important;
  padding: 14px 18px !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.price-breakdown-card .row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  align-items: center !important;
  gap: 28px !important;
  padding: 14px 0 !important;
  border-bottom: 1px solid var(--line) !important;
}

.price-breakdown-card .row:last-child {
  border-bottom: 0 !important;
}

.price-breakdown-card .row span {
  min-width: 0 !important;
  color: var(--muted) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.price-breakdown-card .row strong {
  min-width: 92px !important;
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
}

.privacy-note {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, .62);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.privacy-note p {
  margin: 0;
}

.consent {
  margin-top: 2px;
}

.price-fineprint {
  color: var(--muted) !important;
  line-height: 1.55 !important;
}

@media (min-width: 1281px) {
  .calc-grid.final-layout {
    grid-template-columns: minmax(0, 1fr) minmax(560px, 1fr) !important;
  }
}

@media (max-width: 620px) {
  .price-breakdown-card .row {
    gap: 14px !important;
  }

  .price-breakdown-card .row strong {
    min-width: 70px !important;
  }
}
