:root {
  --bg: #f5f4ef;
  --paper: #fffefa;
  --ink: #252d2b;
  --muted: #858980;
  --line: #e7e7de;
  --accent: #df6d45;
  --accent-light: #fbefe7;
  --green: #315c4b;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid #e58b65;
  outline-offset: 3px;
}
button {
  transition:
    background 0.16s,
    transform 0.16s;
}
button:not(:disabled):active {
  transform: translateY(1px);
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.topbar {
  height: 88px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4.5%;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 29px;
  font-weight: 750;
  letter-spacing: -1.5px;
}
.brand svg {
  width: 34px;
  height: 38px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.brand-dot {
  color: var(--accent);
}
nav {
  display: flex;
  height: 100%;
  gap: 30px;
  align-items: stretch;
}
.nav {
  background: none;
  border: none;
  padding: 0 3px;
  color: #737970;
  font-size: 14px;
  position: relative;
}
.nav.active {
  color: var(--ink);
  font-weight: 650;
}
.nav.active:after {
  content: "";
  position: absolute;
  height: 3px;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent);
  border-radius: 2px;
}
.count {
  padding: 2px 6px;
  background: #e8e9e1;
  border-radius: 5px;
  font-size: 10px;
  margin-left: 4px;
}
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 23px;
  align-items: start;
}
.cart-items {
  margin: 18px 0;
}
.cart-item,
.order-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item strong,
.order-row strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.cart-item p,
.order-row p,
.order-row small,
.cart-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-top: 6px;
}
.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  flex-shrink: 0;
}
.cart-item-actions small {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
  padding: 22px 0;
  margin-top: 12px;
  border-bottom: 1px solid var(--line);
}
.cart-total strong {
  font-size: 28px;
  color: var(--green);
}
#order-form {
  display: grid;
  gap: 16px;
  padding-top: 22px;
}
#order-form label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}
#order-form input,
#order-form textarea {
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  width: 100%;
}
#order-form .phone-field {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
#order-form .phone-prefix { padding-left: 13px; font-size: 16px; font-weight: 600; }
#order-form .phone-field input { border: 0; min-width: 0; flex: 1; padding-left: 5px; }
#order-form textarea {
  resize: vertical;
}
.checkout-options {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 12px;
  min-width: 0;
}
.checkout-options legend {
  font-weight: 700;
  padding: 0 5px;
}
#order-form select,
.business-form input,
.business-form textarea,
.order-actions select,
.login-form input,
#answer-form textarea {
  min-height: 44px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
  color: var(--ink);
  font-size: 16px;
}
.choice-line {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.choice-line input {
  width: 18px !important;
  min-height: 18px !important;
  flex: 0 0 18px;
  margin: 3px 0 0;
}
.choice-line span { display: grid; gap: 4px; }
.choice-line small { color: var(--muted); line-height: 1.4; font-weight: 400; }
.choice-line.disabled-choice { opacity: .55; cursor: not-allowed; }
.suggestions { display: grid; border: 1px solid var(--line); border-radius: 8px; max-height: 200px; overflow-y: auto; }
.suggestions button { background: white; border: 0; border-bottom: 1px solid var(--line); text-align: left; padding: 10px; }
.suggestions button:hover { background: var(--accent-light); }
.address-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order-detail { min-width: 0; flex: 1; }
.order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 15px; }
.order-actions select { width: auto; max-width: 260px; font-size: 13px; }
.order-actions .button { padding: 10px 13px; font-size: 13px; }
.reconcile-box { display: grid; gap: 9px; width: min(100%, 440px); }
.reconcile-box label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.reconcile-box input { min-height: 44px; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: white; color: var(--ink); font-size: 16px; }
.warning-text { color: #a04428 !important; font-weight: 700; }
.business-form { display: grid; gap: 15px; max-width: 760px; }
.business-form label,.login-form label,#answer-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.business-form h2 { margin-top: 20px; }
.business-form textarea { resize: vertical; }
.login-page,.order-page { max-width: 650px; margin: 55px auto; padding: 0 16px; }
.login-form,#answer-form { display: grid; gap: 15px; margin-top: 22px; }
#order-summary { display: grid; gap: 11px; margin: 22px 0; line-height: 1.5; }
#order-actions { display: grid; gap: 14px; margin-top: 20px; }
#order-actions .button { width: fit-content; }
.order-page > .help { margin-top: 12px; }
.legal-page { max-width: 780px; margin: 50px auto; padding: 0 16px; display: grid; gap: 18px; }
.legal-page .card p { white-space: pre-line; line-height: 1.6; margin-top: 12px; }
.checkout-options a,#order-form a { color: var(--green); text-decoration: underline; }
#order-form .help {
  line-height: 1.5;
}
.order-confirmation {
  padding-top: 22px;
}
.order-confirmation h3 {
  color: var(--green);
}
.order-confirmation p {
  line-height: 1.6;
  margin: 12px 0 18px;
}
.local-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #747d72;
}
.local-badge > span {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: #6d927c;
}
main {
  max-width: 1550px;
  margin: auto;
  padding: 0 4.5%;
}
.page-heading {
  padding: 42px 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2.1px;
  font-weight: 650;
  color: var(--accent);
  margin-bottom: 13px;
}
h1 {
  font-size: clamp(28px, 3.2vw, 43px);
  letter-spacing: -1.7px;
  line-height: 1.12;
  font-weight: 650;
}
h1 > span {
  color: var(--accent);
}
.subtitle {
  font-size: 13px;
  color: #7a8076;
  margin-top: 13px;
  line-height: 1.6;
}
.machine {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #dfe2d8;
  border-radius: 12px;
  padding: 15px 17px;
  flex-shrink: 0;
}
.machine-icon {
  font-size: 31px;
  color: #687b68;
}
.machine strong {
  font-size: 12px;
  font-weight: 600;
  display: block;
}
.machine div > span {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.engine-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dc9c69;
  margin-left: 7px;
}
.engine-dot.ready {
  background: #6f997a;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 354px;
  gap: 23px;
  align-items: start;
}
.model-column {
  min-width: 0;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-head {
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
h2 {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.1px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.step {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid #e5e6de;
  padding: 5px 6px;
  border-radius: 5px;
  letter-spacing: 0;
}
.tiny-badge {
  font-size: 8px;
  letter-spacing: 1px;
  color: #8a8f84;
  border: 1px solid #e2e4da;
  padding: 5px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.text-button {
  background: none;
  border: 0;
  padding: 4px 0;
  color: #6c7969;
  font-size: 11px;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.text-button:hover {
  color: var(--accent);
}
.dropzone {
  margin: 22px;
  border: 1.5px dashed #d7dace;
  border-radius: 10px;
  min-height: 364px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  background-image: radial-gradient(#d5d8cc 0.7px, transparent 0.7px);
  background-size: 17px 17px;
  background-color: #f8f8f2;
  padding: 25px;
  transition: background 0.15s;
}
.model-source-switch {
  display: flex;
  gap: 8px;
  margin: 20px 22px 0;
}
.model-source-switch button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f1;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  white-space: normal;
  cursor: pointer;
}
.model-source-switch button.selected {
  background: var(--ink);
  color: white;
}
.makerworld-form {
  margin: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8f8f2;
  display: grid;
  gap: 12px;
}
.makerworld-form label { font-size: 13px; font-weight: 600; }
.makerworld-form input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
.makerworld-form .button { width: 100%; min-height: 44px; }
.makerworld-form small { color: var(--muted); line-height: 1.45; }
.dropzone:hover,
.dropzone.dragover {
  background-color: #f6efe5;
  border-color: var(--accent);
}
.wire-cube {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
  transform: rotate(-7deg);
}
.wire-cube svg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linejoin: round;
}
.wire-cube .cube-back {
  stroke: #d9cbbb;
  stroke-dasharray: 3 4;
  stroke-width: 1;
}
h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.25px;
}
.dropzone p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 9px;
}
.button {
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 13px 18px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}
.button.dark {
  background: var(--ink);
  color: white;
}
.button.dark:hover {
  background: #39483e;
}
.dropzone .button {
  margin-top: 24px;
}
.dropzone small {
  font-size: 9px;
  color: #969b90;
  margin-top: 17px;
}
.button.accent {
  background: var(--accent);
  color: #fff;
}
.button.accent:hover {
  background: #ce5b33;
}
.button.secondary {
  background: #f2f3ec;
  border: 1px solid var(--line);
  color: #5b685b;
}
.button.full {
  width: 100%;
  justify-content: space-between;
}
.examples {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 15px 20px 20px;
  font-size: 10px;
  color: #9b9e94;
  flex-wrap: wrap;
}
.examples button {
  font-size: 10px;
  border: 0;
  background: none;
  color: #647360;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.settings-card fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.settings-section {
  padding: 21px 24px 0;
}
.settings-section.compact {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 18px;
}
.control-label {
  font-size: 12px;
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
}
.helper-tag {
  font-size: 9px;
  color: var(--muted);
  font-weight: 400;
  float: right;
  line-height: 17px;
}
.segmented {
  display: flex;
  background: #f0f1ea;
  padding: 4px;
  border-radius: 8px;
  gap: 3px;
}
.segmented label {
  flex: 1;
  cursor: pointer;
  position: relative;
}
.segmented input,
.quality-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented span {
  display: block;
  text-align: center;
  padding: 8px 5px;
  font-size: 11px;
  border-radius: 5px;
  color: #81887a;
}
.segmented input:checked + span {
  background: var(--paper);
  box-shadow: 0 1px 4px #323f2320;
  color: var(--ink);
  font-weight: 600;
}
.segmented input:focus-visible + span,
.quality-options input:focus-visible + span {
  outline: 2px solid var(--accent);
}
.segmented .material-unavailable {
  cursor: not-allowed;
}
.segmented .material-unavailable > span {
  color: #a9afa4;
  opacity: 0.7;
}
.material-unavailable:is(:hover, :focus-visible)::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 4;
  right: 0;
  bottom: calc(100% + 9px);
  width: max-content;
  max-width: 190px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--ink);
  color: white;
  box-shadow: 0 5px 16px #323f2330;
  font-size: 11px;
  line-height: 1.35;
}
.help {
  font-size: 10px;
  line-height: 1.65;
  color: var(--muted);
  margin: 9px 0 0;
}
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.label-row .text-button {
  padding: 0;
  font-size: 10px;
}
.palette {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.color-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
}
.color-item input {
  width: 42px;
  height: 37px;
  padding: 3px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.color-item input::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-item input::-webkit-color-swatch {
  border: 0;
  border-radius: 5px;
}
.color-number {
  position: absolute;
  z-index: 1;
  top: -4px;
  right: -3px;
  font-size: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.color-hex {
  font-family: ui-monospace, monospace;
  font-size: 7px;
  color: #8b9285;
  margin-top: 6px;
}
.parts {
  margin-top: 12px;
  max-height: 145px;
  overflow: auto;
}
.part-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 5px;
}
.part-row.selected {
  background: var(--accent-light);
  border-color: #edcdb6;
}
.part-name {
  border: 0;
  background: none;
  font-size: 10px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  text-align: left;
  min-width: 0;
  flex: 1;
  padding: 2px;
}
.part-row select {
  max-width: 140px;
  padding: 5px;
  font-size: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
}
.quality-options {
  display: flex;
  gap: 9px;
}
.quality-options label {
  flex: 1;
  position: relative;
  cursor: pointer;
}
.quality-options span {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 5px;
}
.quality-options strong {
  font-size: 11px;
  font-weight: 550;
}
.quality-options small {
  font-size: 9px;
  color: var(--muted);
}
.quality-options input:checked + span {
  border-color: #dcb899;
  background: #fff5eb;
}
.switch-label,
.quantity-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.switch-label strong,
.quantity-label strong {
  font-size: 11px;
  font-weight: 550;
  display: block;
}
.switch-label small,
.quantity-label small {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 6px;
}
.switch-label input {
  appearance: none;
  width: 32px;
  height: 19px;
  border-radius: 12px;
  background: #c6cbbf;
  margin: 0;
  cursor: pointer;
  position: relative;
}
.switch-label input:before {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  background: #fff;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  transition: left 0.15s;
}
.switch-label input:checked {
  background: var(--green);
}
.switch-label input:checked:before {
  left: 16px;
}
.quantity-label input {
  width: 60px;
  border: 1px solid var(--line);
  background: #f8f9f3;
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  font-size: 12px;
}
.quantity-stepper { display: inline-flex; align-items: center; gap: 5px; }
.quantity-stepper button {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}
.quantity-stepper button:disabled { opacity: .4; cursor: default; }
.settings-footer {
  margin-top: 22px;
  padding: 22px 24px;
  border-top: 1px solid var(--line);
}
.settings-footer p {
  font-size: 9px;
  text-align: center;
  color: #969b8f;
  margin-top: 11px;
}
.result-card {
  margin-top: 23px;
}
.result-content {
  padding: 24px;
}
.empty-result {
  display: flex;
  gap: 19px;
  align-items: center;
  padding: 3px 0 20px;
}
.result-icon {
  font-size: 24px;
  background: #f0f2e9;
  color: #89987c;
  border-radius: 10px;
  padding: 11px 15px;
}
.empty-result h3 {
  font-size: 13px;
}
.empty-result p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  margin-top: 7px;
}
.included {
  display: flex;
  gap: 20px;
  font-size: 9px;
  color: #8c9684;
  border-top: 1px solid var(--line);
  padding-top: 17px;
  flex-wrap: wrap;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #8e9488;
  padding: 32px 0 25px;
  gap: 20px;
}
footer > span:first-child {
  font-weight: 650;
  color: #707c6b;
}
.muted {
  color: #9a9f94;
  font-weight: 400;
}
#viewer {
  height: 342px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
#viewer canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}
.viewer-top,
.viewer-bottom {
  background: #f2f1eb;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 14px 20px;
  font-size: 10px;
  color: #838b7a;
}
.viewer-top > span:first-child {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  max-width: 70%;
}
.viewer-label {
  font-size: 8px;
  letter-spacing: 1px;
}
.viewer-bottom {
  font-size: 9px;
  padding-top: 4px;
}
.model-tools {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 23px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.dimensions {
  flex: 1;
}
.field-label {
  font-size: 8px;
  letter-spacing: 0.8px;
  color: var(--muted);
  display: block;
  margin-bottom: 7px;
}
.dimensions strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
}
.dimensions small {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.dimensions strong.too-large {
  color: #bd512f;
}
.scale-label {
  font-size: 9px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.input-unit {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  font-size: 10px;
}
.input-unit input {
  width: 63px;
  padding: 7px;
  background: none;
  border: 0;
  outline: none;
  color: var(--ink);
}
.input-unit > span {
  padding: 0 8px 0 0;
}
.rotate-controls > div {
  display: flex;
  gap: 5px;
}
.rotate-controls button {
  border: 1px solid var(--line);
  background: #f7f8f1;
  border-radius: 5px;
  font-size: 10px;
  padding: 6px;
}
.confirm-row {
  padding: 12px 22px;
  font-size: 10px;
  color: #7c816e;
  background: #f6f4e9;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.6;
}
.confirm-row input {
  accent-color: var(--green);
}
.model-notices p {
  padding: 12px 23px 0;
  font-size: 9px;
  line-height: 1.6;
  color: #969b8e;
}
.running-result {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.progress-copy {
  flex: 1;
  min-width: 180px;
}
.running-result h3 {
  font-size: 13px;
}
.running-result p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 8px;
}
.running-result > .button {
  margin-left: auto;
}
.progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 10px;
}
.progress-head strong {
  color: var(--accent);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.progress-track {
  height: 9px;
  overflow: hidden;
  margin-top: 7px;
  border-radius: 20px;
  background: #e5e9df;
}
.progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.9s linear;
}
.running-result .progress-foot {
  margin-top: 7px;
  font-size: 9px;
}
.spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 2px solid #e5e5d9;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.notice {
  font-size: 12px;
  line-height: 1.7;
  padding: 16px 20px;
  background: #f2f3eb;
  border-radius: 8px;
}
.notice.warning {
  background: #fbefe3;
  color: #9d5d3f;
}
#engine-warning {
  margin-bottom: 20px;
}
.result-model {
  font-size: 11px;
  color: #4f604e;
  overflow-wrap: anywhere;
}
.result-model > span {
  font-size: 10px;
  color: var(--muted);
}
.metrics {
  display: grid;
  grid-template-columns: 1.3fr 1.1fr 0.8fr;
  margin: 23px 0;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}
.metrics > div + div {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.metrics span {
  font-size: 9px;
  color: var(--muted);
  display: block;
  margin-bottom: 9px;
}
.metrics strong {
  font-size: 21px;
  letter-spacing: -0.6px;
  font-weight: 550;
  white-space: nowrap;
}
.metrics small {
  font-size: 12px;
  color: var(--muted);
}
.filament-result > div {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 11px;
  margin: 12px 0;
  color: #89907f;
}
.swatch {
  height: 14px;
  width: 14px;
  background: var(--swatch);
  border: 1px solid #0001;
  border-radius: 4px;
  display: inline-block;
}
.filament-result strong {
  font-weight: 500;
  color: #4b5747;
  margin-left: auto;
  margin-right: 15px;
}
.filament-result > div > span:last-child {
  min-width: 62px;
  text-align: right;
}
.price-total {
  background: #eaf0e6;
  border: 1px solid #dce6d7;
  border-radius: 10px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
}
.price-total.has-unit-price {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.price-total.has-unit-price > div:first-child strong {
  white-space: nowrap;
}
.price-total.has-unit-price .price-note {
  text-align: left;
  margin-top: 4px;
}
.price-per-unit {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-top: 1px solid #d4dfd0;
  margin-top: 14px;
  padding-top: 12px;
  color: #536b50;
  font-size: 12px;
}
.price-total .price-per-unit strong {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
  white-space: nowrap;
}
.cart-minimum-callout {
  margin: 12px 0;
  padding: 18px;
  border: 1px solid #e8d2bd;
  border-radius: 10px;
  background: #fff8f1;
}
.cart-minimum-callout strong {
  color: #745035;
}
.cart-minimum-callout p,
.cart-minimum-note {
  color: #745f4f;
  line-height: 1.5;
}
.cart-minimum-callout p {
  margin: 8px 0 14px;
}
.quantity-hint {
  margin: 12px 0;
  padding: 15px 17px;
  border: 1px solid #d7e5cf;
  border-radius: 10px;
  background: #f4f8ef;
  color: #345843;
}
.quantity-hint p {
  margin: 6px 0 12px;
  line-height: 1.5;
}
.price-total > div > span {
  font-size: 10px;
  color: #6c7b62;
  display: block;
}
.price-total strong {
  font-size: 33px;
  letter-spacing: -1px;
  font-weight: 600;
  display: block;
  margin-top: 7px;
  color: #36533a;
}
.price-note {
  font-size: 9px;
  line-height: 1.7;
  text-align: right;
  color: #84927b;
}
.support-choice {
  margin: 12px 0;
  padding: 15px 17px;
  border: 1px solid #dce6d7;
  border-radius: 10px;
  background: #fbfcfa;
}
.support-choice.is-selected {
  border-color: #aec9a2;
  background: #f3f8ef;
}
.support-choice-control {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  min-height: 44px;
}
.support-choice-control input {
  flex: none;
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: #527e4c;
}
.support-choice-control span {
  min-width: 0;
}
.support-choice-control strong,
.support-choice-control small {
  display: block;
}
.support-choice-control strong {
  color: #40533c;
  font-size: 12px;
  line-height: 1.4;
}
.support-choice-control small,
.support-choice > small {
  color: #7a8775;
  font-size: 10px;
  line-height: 1.5;
}
.support-choice-control small {
  margin-top: 4px;
}
.support-choice > p {
  margin: 12px 0 4px;
  color: #3f6940;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.price-breakdown {
  margin-top: 14px;
  padding: 17px 19px;
  border: 1px solid #dce6d7;
  border-radius: 10px;
  background: #fbfcfa;
  color: #40503d;
}
.price-breakdown-head,
.price-breakdown-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.price-breakdown-head {
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5ebe1;
  font-size: 13px;
}
.price-breakdown-head span {
  color: #75836f;
  font-size: 10px;
  font-weight: 500;
}
.price-breakdown-row {
  padding: 8px 0;
  border-bottom: 1px solid #edf1ea;
  font-size: 11px;
}
.price-breakdown-row > div {
  min-width: 0;
}
.price-breakdown-row strong,
.price-breakdown-row small {
  display: block;
}
.price-breakdown-row strong {
  font-weight: 600;
}
.price-breakdown-row small {
  margin-top: 3px;
  color: #7a8775;
  line-height: 1.4;
}
.price-breakdown-row > span {
  flex-shrink: 0;
  font-weight: 600;
  white-space: nowrap;
}
.price-breakdown > p {
  margin: 11px 0 0;
  color: #75836f;
  font-size: 10px;
  line-height: 1.5;
}
.missing-tariffs {
  padding: 18px;
  background: #f5f2e7;
  border-radius: 10px;
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
}
.missing-tariffs strong {
  font-size: 12px;
}
.missing-tariffs p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 7px;
}
.missing-tariffs .button {
  font-size: 10px;
  flex-shrink: 0;
}
.breakdown {
  font-size: 11px;
  margin-top: 18px;
  color: #6e7967;
}
.breakdown summary {
  cursor: pointer;
  font-size: 10px;
  margin-bottom: 12px;
}
.breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 7px 0;
}
.breakdown strong {
  white-space: nowrap;
  font-weight: 500;
}
.result-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
}
.result-actions > span {
  font-size: 8px;
  color: #9ba38f;
}
.warnings,
.actual-details {
  margin-top: 17px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: #8d9384;
}
.warnings summary,
.actual-details summary {
  cursor: pointer;
}
.warnings p {
  line-height: 1.7;
  margin-top: 10px;
}
.warnings small {
  display: block;
  margin-top: 12px;
  font-size: 8px;
  overflow-wrap: anywhere;
}
.actual-details form {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 15px;
  flex-wrap: wrap;
}
.actual-details label {
  display: flex;
  flex-direction: column;
  font-size: 9px;
  gap: 7px;
  flex: 1;
  min-width: 120px;
}
.actual-details input {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fffefa;
  width: 100%;
  font-size: 11px;
}
.actual-details .button {
  margin-top: 18px;
  font-size: 10px;
}
.currency-badge {
  font-size: 16px;
  background: #e8ecdf;
  border: 1px solid #dce2d2;
  padding: 12px 20px;
  border-radius: 9px;
  color: #66765c;
}
.tariffs-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 24px;
}
.padded {
  padding: 27px;
}
.padded h2 {
  font-size: 16px;
  margin-bottom: 15px;
}
.tariff-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.tariff-fields label {
  font-size: 11px;
  line-height: 1.5;
  color: #76806d;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tariff-fields input {
  padding: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbf5;
  font-size: 13px;
  color: var(--ink);
}
.formula {
  background: #f3f4eb;
  border: 1px solid #e6e9dc;
  border-radius: 8px;
  color: #909b83;
  font-size: 10px;
  line-height: 1.8;
  padding: 15px;
  margin: 25px 0;
}
.remove-tariff {
  border: 0;
  background: none;
  font-size: 20px;
  color: #9da592;
  padding: 4px;
}
.history-row {
  display: flex;
  width: 100%;
  align-items: center;
  text-align: left;
  gap: 20px;
  padding: 23px;
  margin-bottom: 13px;
  border-radius: 11px;
}
.history-row:hover {
  border-color: #cabba3;
  background: #fffdf5;
}
.history-cube {
  font-size: 32px;
  color: #b3bda6;
}
.history-name {
  flex: 1;
  min-width: 0;
}
.history-name strong {
  font-size: 13px;
  font-weight: 550;
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.history-name small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 7px;
}
.status-badge {
  font-size: 9px;
  padding: 5px 8px;
  border-radius: 5px;
  background: #edf0e5;
  color: #76896b;
}
.status-badge.failed {
  background: #faeae2;
  color: #b86e4b;
}
.status-badge.running,
.status-badge.queued {
  background: #f6f0dd;
  color: #ac924d;
}
.history-metrics {
  font-size: 10px;
  color: #88927f;
}
.history-price {
  font-size: 14px;
  font-weight: 550;
  min-width: 95px;
  text-align: right;
}
.history-empty {
  text-align: center;
  padding: 65px 20px;
  color: #7e8874;
}
.history-empty > span {
  font-size: 40px;
  color: #a7b396;
}
.history-empty h2 {
  display: block;
  margin-top: 20px;
  font-size: 20px;
}
.history-empty p {
  font-size: 12px;
  margin: 15px 0 25px;
}
.history-empty .button {
  font-size: 11px;
}
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(680px, 90vw);
  padding: 15px 23px;
  color: #fff;
  background: #345843;
  border-radius: 10px;
  box-shadow: 0 5px 30px #12291b30;
  z-index: 50;
  font-size: 12px;
  line-height: 1.6;
}
#toast.error {
  background: #985332;
}
#loading-overlay {
  position: fixed;
  inset: 0;
  background: #f3f1eab5;
  backdrop-filter: blur(4px);
  z-index: 40;
  display: grid;
  place-items: center;
}
.loading-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 15px 60px #22331715;
  width: min(390px, calc(100vw - 32px));
}
.loading-box strong {
  font-size: 14px;
}
.loading-box p,
.loading-box small {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.loading-box .progress-head {
  margin-top: 8px;
}
@media (min-width: 1450px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 384px;
  }
  .dropzone {
    min-height: 405px;
  }
  #viewer {
    height: 385px;
  }
}
@media (max-width: 1050px) {
  .topbar {
    padding: 0 3%;
    gap: 15px;
  }
  main {
    padding: 0 3%;
  }
  .local-badge {
    display: none;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 316px;
    gap: 17px;
  }
  .card-head {
    padding: 0 18px;
  }
  .settings-section {
    padding-left: 18px;
    padding-right: 18px;
  }
  .settings-footer {
    padding: 18px;
  }
  .machine {
    padding: 12px;
  }
  .machine-icon {
    display: none;
  }
  .page-heading {
    gap: 14px;
  }
  .subtitle {
    font-size: 12px;
  }
  .model-tools {
    gap: 15px;
    padding: 15px;
  }
  .metrics strong {
    font-size: 17px;
  }
  .metrics > div + div {
    padding-left: 12px;
  }
  .result-content {
    padding: 18px;
  }
  .missing-tariffs {
    flex-direction: column;
    align-items: start;
  }
  .examples {
    gap: 10px;
  }
  .examples > span {
    flex-basis: 100%;
    text-align: center;
  }
  .history-metrics {
    display: none;
  }
  .tariffs-grid {
    gap: 16px;
  }
  .padded {
    padding: 22px;
  }
}
@media (max-width: 780px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
  .topbar {
    height: 72px;
  }
  .brand {
    font-size: 24px;
  }
  .brand svg {
    width: 27px;
  }
  nav {
    gap: 19px;
  }
  .nav {
    font-size: 12px;
  }
  .page-heading {
    padding-top: 28px;
    padding-bottom: 24px;
    align-items: start;
    flex-direction: column;
  }
  .machine {
    padding: 9px 13px;
  }
  .machine div > span {
    display: inline;
    margin-left: 12px;
    font-size: 9px;
  }
  .machine strong {
    display: inline;
    font-size: 10px;
  }
  .machine .engine-dot {
    margin-left: 0;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .model-column {
    width: 100%;
    display: contents;
  }
  .model-card {
    order: 0;
    width: 100%;
  }
  .settings-card {
    order: 1;
    width: 100%;
  }
  .result-card {
    order: 2;
    width: 100%;
    margin-top: 0;
  }
  .settings-card fieldset {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .settings-section {
    padding-top: 18px;
  }
  .settings-section.compact {
    margin-top: 15px;
    padding-top: 15px;
  }
  .settings-footer {
    margin-top: 18px;
  }
  .tariffs-grid {
    grid-template-columns: 1fr;
  }
  .dropzone {
    min-height: 325px;
  }
  .local-badge {
    display: none;
  }
  .history-row {
    gap: 12px;
    padding: 17px;
  }
  .history-price {
    min-width: 60px;
    font-size: 12px;
  }
  .history-name strong {
    font-size: 11px;
  }
  .history-name small {
    font-size: 8px;
  }
  .status-badge {
    font-size: 8px;
  }
  .history-cube {
    display: none;
  }
  .currency-badge {
    display: none;
  }
  footer {
    font-size: 8px;
  }
  .result-actions {
    flex-wrap: wrap;
  }
  .metrics strong {
    font-size: 23px;
  }
  .missing-tariffs {
    flex-direction: row;
    align-items: center;
  }
}
@media (max-width: 440px) {
  .cart-item,
  .order-row {
    flex-direction: column;
  }
  .cart-item-actions {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  main {
    padding: 0 14px;
  }
  .topbar {
    padding: 0 16px;
  }
  .brand {
    font-size: 21px;
    gap: 6px;
  }
  nav {
    gap: 14px;
  }
  .nav {
    font-size: 10px;
  }
  h1 {
    font-size: 30px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .subtitle {
    font-size: 11px;
  }
  .settings-card fieldset {
    display: block;
  }
  .metrics strong {
    font-size: 17px;
  }
  .metrics span {
    font-size: 8px;
  }
  .missing-tariffs {
    flex-direction: column;
    align-items: start;
  }
  .history-name small {
    font-size: 7px;
  }
  .history-row {
    padding: 15px 12px;
    gap: 8px;
  }
  .history-price {
    font-size: 10px;
  }
  .history-row > span:last-child {
    display: none;
  }
  .dropzone {
    margin: 14px;
    padding: 20px 12px;
  }
  .dropzone h3 {
    font-size: 14px;
  }
  .model-tools {
    gap: 13px;
  }
  .dimensions {
    flex-basis: 100%;
  }
  .tariff-fields {
    gap: 13px;
  }
  .padded {
    padding: 19px;
  }
  .result-actions > span {
    font-size: 8px;
  }
  .running-result {
    flex-wrap: wrap;
  }
  footer {
    flex-direction: column;
    align-items: start;
    gap: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
  .spinner {
    animation-duration: 2s;
  }
  .progress-track > span {
    transition: none;
  }
}
/* Customer flow: only colour and quantity are primary decisions. */
.smart-defaults {
  margin: 22px 24px 0;
  padding: 14px;
  background: #edf2e8;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.7;
  color: #52694c;
}
.advanced-settings {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.advanced-settings > summary {
  cursor: pointer;
  padding: 19px 24px 0;
  font-size: 12px;
  color: #697662;
}
.advanced-settings[open] {
  padding-bottom: 10px;
}
.transform-options {
  display: flex;
  gap: 20px;
  align-items: center;
}
.dimension-note {
  font-size: 11px;
  line-height: 1.65;
  color: #767e6c;
  max-width: 330px;
}
.file-details {
  padding: 0 23px;
  font-size: 10px;
  color: var(--muted);
}
.file-details summary {
  cursor: pointer;
}
.file-details .model-notices p {
  padding: 10px 0 0;
}
.print-duration {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  font-size: 13px;
  color: #6b7663;
  flex-wrap: wrap;
}
.print-duration strong {
  font-size: 19px;
  color: var(--ink);
}
.print-duration > span {
  font-size: 10px;
  flex-basis: 100%;
}
.technical-details {
  margin-top: 20px;
  color: var(--muted);
  font-size: 11px;
}
.technical-details summary {
  cursor: pointer;
}
.labor-override {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.labor-override label {
  display: grid;
  gap: 6px;
  flex: 1 1 210px;
}
.labor-override input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.labor-override p {
  flex-basis: 100%;
  margin: 0;
}
.technical-metrics {
  grid-template-columns: 1fr 1fr;
}
.color-hex {
  font-family: inherit;
  font-size: 10px;
}
.settings-card fieldset {
  display: block;
}
#calculate {
  font-size: 12px;
}
@media (max-width: 780px) {
  .settings-card fieldset {
    display: block;
  }
}

.owner-menu {
  position: relative;
  align-self: center;
  font-size: 12px;
  color: var(--muted);
}
.owner-menu summary {
  cursor: pointer;
  padding: 12px 0;
}
.owner-menu > div {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  z-index: 20;
  box-shadow: 0 8px 24px #20302015;
}
.owner-menu .nav {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px;
  height: auto;
  border: 0;
}
.owner-menu .nav:after {
  display: none;
}
@media (max-width: 440px) {
  .owner-menu {
    font-size: 10px;
  }
}

.settings-section .control-label {
  font-size: 14px;
}
.quantity-label strong {
  font-size: 14px;
}
.settings-section .help {
  font-size: 12px;
}
.settings-section .quantity-label small {
  font-size: 11px;
}
.palette .color-item input {
  width: 48px;
  height: 44px;
}
.advanced-settings .help {
  font-size: 11px;
}
/* Approved swatches remain easy to tap on narrow touch screens. */
#palette {
  display: block;
  width: 100%;
}
.preset-colors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
  padding: 3px;
}
.preset-color {
  min-width: 0;
  min-height: 76px;
  padding: 7px 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.preset-color[aria-pressed="true"] {
  border: 2px solid var(--accent);
  padding: 6px 4px;
  background: var(--accent-light);
}
.preset-swatch {
  display: grid;
  place-items: center;
  width: 38px;
  height: 32px;
  border-radius: 6px;
  background: var(--swatch);
  border: 1px solid #0002;
  color: white;
  font-size: 22px;
  text-shadow:
    0 1px 3px #000,
    0 0 2px #000;
}
.palette-slots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.slot-button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  padding: 8px;
}
.slot-button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-light);
}
.catalog-card {
  margin-bottom: 24px;
  grid-column: 1 / -1;
}
#tariff-form > section:last-of-type {
  grid-column: 1 / -1;
}
.catalog-row {
  display: grid;
  grid-template-columns: 85px 44px minmax(140px, 1fr) minmax(130px, 150px) 115px 44px;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
}
.catalog-row input,
.catalog-row select {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  padding: 8px;
  font-size: 14px;
}
.catalog-row input[type="color"] {
  padding: 3px;
}
.catalog-price,
.catalog-availability {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
}
.catalog-price span {
  white-space: nowrap;
}
.catalog-availability input[type="checkbox"] {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  accent-color: var(--accent);
}
.remove-catalog-color {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: #f4f0e8;
  font-size: 22px;
}
.catalog-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.analytics-consent {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 8px 30px #0002;
}
.analytics-consent[hidden] { display: none; }
.analytics-consent p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.analytics-consent > div { display: flex; gap: 10px; flex-wrap: wrap; }
.analytics-consent .button { min-height: 44px; }
.technical-details p {
  margin: 15px 0;
  line-height: 1.7;
}
body[data-owner="false"] .file-details {
  display: none;
}
@media (max-width: 780px) {
  .model-column,
  .settings-card,
  .model-card,
  .result-card {
    min-width: 0;
  }
  .workspace {
    gap: 16px;
  }
  #viewer {
    height: clamp(230px, 65vw, 342px);
    touch-action: pan-y;
  }
  .viewer-bottom {
    flex-wrap: wrap;
  }
  .viewer-bottom button {
    min-height: 44px;
  }
  .settings-section {
    padding: 20px;
  }
  .advanced-settings > summary,
  .warnings summary,
  .technical-details summary {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .advanced-settings > summary::before,
  .warnings summary::before,
  .technical-details summary::before {
    content: "▸";
    margin-right: 8px;
  }
  details[open] > summary::before {
    content: "▾";
  }
  .quantity-label input {
    min-height: 44px;
    font-size: 16px;
  }
  .segmented label > span,
  .quality-options label > span {
    min-height: 44px;
  }
  .part-row {
    flex-wrap: wrap;
  }
  .part-name {
    flex-basis: 100%;
    min-height: 44px;
    font-size: 12px;
  }
  .part-row select {
    max-width: 100%;
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }
  .parts {
    max-height: 230px;
  }
  .preset-colors {
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  }
  .result-model {
    font-size: 12px;
  }
  .price-total {
    gap: 12px;
    padding: 18px;
    flex-wrap: wrap;
  }
  .price-total strong {
    font-size: 30px;
    overflow-wrap: anywhere;
  }
  .card-head {
    min-width: 0;
    flex-wrap: wrap;
    height: auto;
    min-height: 64px;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 8px;
  }
  .card-head h2 {
    font-size: 14px;
  }
  .card-head .text-button {
    min-height: 44px;
  }
  input[type="number"],
  input[type="text"],
  select {
    font-size: 16px;
  }
  .catalog-row {
    grid-template-columns: 72px 44px minmax(80px, 1fr) 44px;
    gap: 8px;
  }
  .catalog-row > select { grid-column: 1; grid-row: 1; }
  .catalog-row > input[type="color"] { grid-column: 2; grid-row: 1; }
  .catalog-row > input[type="text"] { grid-column: 3; grid-row: 1; }
  .catalog-row .remove-catalog-color { grid-column: 4; grid-row: 1; }
  .catalog-row .catalog-price {
    grid-column: 1 / 3;
    grid-row: 2;
  }
  .catalog-row .catalog-availability {
    grid-column: 3 / 5;
    grid-row: 2;
  }
}
@media (max-width: 360px) {
  .brand {
    font-size: 20px;
  }
  .topbar {
    gap: 10px;
    padding: 0 14px;
  }
  .nav {
    padding-left: 0;
    padding-right: 0;
  }
  .viewer-bottom {
    padding-left: 14px;
    padding-right: 14px;
  }
  .catalog-row {
    grid-template-columns: 1fr 44px 44px;
  }
  .catalog-row > select { grid-column: 1; grid-row: 1; }
  .catalog-row > input[type="color"] { grid-column: 2; grid-row: 1; }
  .catalog-row .remove-catalog-color { grid-column: 3; grid-row: 1; }
  .catalog-row input[type="text"] {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .catalog-row .catalog-price {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  .catalog-row .catalog-availability {
    grid-column: 1 / -1;
    grid-row: 4;
  }
  .price-note {
    text-align: left;
  }
}
