/* PrimeCAD quote page */
.tabs { position: relative; display: inline-flex; gap: 4px; margin-top: 34px; padding: 5px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); }
.tab { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px; border: 0; border-radius: 99px; background: none; color: var(--muted); font: 600 .95rem/1 var(--font-h); cursor: pointer; transition: color .3s; }
.tab[aria-selected="true"] { color: #fff; }
.tab-ink { position: absolute; top: 5px; bottom: 5px; left: 5px; border-radius: 99px; background: var(--btn); box-shadow: 0 8px 24px -8px var(--glow); transition: transform .45s var(--ease), width .45s var(--ease); }

.panel { padding-bottom: 110px; }
.panel[hidden] { display: none; }
.panel.enter { animation: panelIn .6s var(--ease); }
@keyframes panelIn { from { opacity: 0; transform: translateY(18px); } }

.quote-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: start; }
.q-left { position: sticky; top: 96px; display: grid; gap: 24px; }
.q-right { display: grid; gap: 24px; }
.q-card { border-radius: var(--radius-lg); border: 1px solid var(--line); background: linear-gradient(170deg, var(--panel), var(--bg-2)); padding: clamp(20px, 3vw, 30px); }
.q-step { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.q-step > span { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 500 .85rem/1 var(--font-m); color: var(--cyan); border: 1px solid rgba(98,220,255,.35); position: relative; }
.q-step > span::before { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 1px dashed rgba(58,169,255,.35); animation: spin 14s linear infinite; }
.q-step h2 { font-size: 1.25rem; }
.q-step p { color: var(--muted); font-size: .88rem; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full, .check.full { grid-column: 1 / -1; }
.field > span { font-size: .84rem; color: var(--muted); font-weight: 500; }
.field b { color: var(--blue-2); font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(7,9,13,.6); color: var(--text);
  font: inherit; font-size: .95rem; transition: border-color .2s, box-shadow .2s, background .2s; appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%239aa7b8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.field select option { background: var(--panel); }
.field input[type="date"] { color-scheme: dark; }
.field textarea { resize: vertical; min-height: 92px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(148,163,184,.4); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,143,245,.18); background: rgba(7,9,13,.85); }
.field.invalid input, .field.invalid select, .field.invalid textarea, .check.invalid { border-color: #f87171; box-shadow: 0 0 0 4px rgba(248,113,113,.12); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .88rem; color: var(--muted); cursor: pointer; padding: 12px; border-radius: 12px; border: 1px solid transparent; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border-radius: 7px; border: 1.5px solid var(--line-2); background: rgba(7,9,13,.6); display: grid; place-items: center; cursor: pointer; transition: .2s; }
.check input::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0); transition: transform .2s var(--ease); margin-top: -3px; }
.check input:checked { background: var(--blue); border-color: var(--blue); }
.check input:checked::after { transform: rotate(-45deg) scale(1); }
.btn-block { width: 100%; margin-top: 22px; }

/* Dropzone */
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; min-height: 300px; padding: 30px; border-radius: 22px; cursor: pointer; overflow: hidden;
  border: 1.5px dashed rgba(58,169,255,.45); background: radial-gradient(circle at 50% 40%, rgba(0,143,245,.12), transparent 65%), rgba(7,9,13,.4); transition: border-color .3s, background .3s, transform .3s var(--ease); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { outline: 2px solid var(--blue-2); outline-offset: 3px; }
.dropzone:hover, .dropzone.drag { border-color: var(--cyan); background: radial-gradient(circle at 50% 40%, rgba(0,143,245,.22), transparent 65%), rgba(7,9,13,.4); }
.dropzone.drag { transform: scale(1.01); }
.dropzone.invalid { border-color: #f87171; }
.dz-ic { width: 40px; height: 40px; color: var(--blue-2); position: relative; z-index: 1; }
.dropzone strong { font-family: var(--font-h); font-size: 1.1rem; position: relative; }
.dropzone u { color: var(--blue-2); text-underline-offset: 4px; }
.dz-sub { font-size: .82rem; color: var(--dim); max-width: 320px; position: relative; }
.dz-orbit { position: absolute; top: 50%; left: 50%; width: 0; height: 0; }
.dz-orbit span { position: absolute; width: 150px; height: 150px; left: -75px; top: -120px; border-radius: 50%; border: 1px solid rgba(58,169,255,.25); animation: spin 10s linear infinite; }
.dz-orbit span::after { content: ""; position: absolute; top: -4px; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.dz-orbit span + span { width: 220px; height: 220px; left: -110px; top: -155px; animation-duration: 16s; animation-direction: reverse; border-style: dashed; }

/* Viewer */
.viewer { position: relative; height: 380px; border-radius: 22px; overflow: hidden; border: 1px solid var(--line-2);
  background: radial-gradient(circle at 50% 45%, rgba(0,143,245,.18), transparent 65%), linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 28px 28px, #080b10; }
.viewer[hidden] { display: none; }
.viewer canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.viewer-bar { position: absolute; left: 12px; right: 12px; top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vf { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 99px; font: 500 .78rem/1 var(--font-m); background: rgba(7,9,13,.7); border: 1px solid var(--line-2); margin-right: auto; max-width: 100%; min-width: 0; }
.vf span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vbtn { padding: 8px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(7,9,13,.7); color: var(--muted); font: 500 .76rem/1 var(--font-m); cursor: pointer; display: inline-flex; align-items: center; transition: .2s; }
.vbtn[aria-pressed="true"] { color: #fff; border-color: var(--blue); background: rgba(0,143,245,.3); }
.vbtn:hover { color: #fff; border-color: var(--blue-2); }
.viewer-msg { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 10px; padding: 40px; color: var(--muted); font-size: .92rem; }
.viewer-msg[hidden] { display: none; }
.viewer-msg strong { color: var(--text); font-family: var(--font-h); font-size: 1.1rem; }
.viewer-msg .loader { width: 56px; height: 56px; margin: 0 auto 6px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--cyan); animation: spin .9s linear infinite; }
.viewer-msg .step-art { width: 90px; height: 90px; margin: 0 auto 8px; color: var(--blue-2); animation: float 4s ease-in-out infinite; }
.viewer-hint { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); font: 500 .7rem/1 var(--font-m); letter-spacing: .08em; color: var(--dim); white-space: nowrap; }
.model-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0 0; }
.model-stats[hidden], .stats-note[hidden] { display: none; }
.model-stats div { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(7,9,13,.45); }
.model-stats dt { font: 500 .66rem/1 var(--font-m); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.model-stats dd { margin: 0; font: 700 1rem/1.2 var(--font-h); color: var(--text); }
.stats-note { margin-top: 10px; }

/* Custom tab */
.custom-intro { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; margin-bottom: 40px; }
.custom-intro h2 { margin-bottom: 14px; }
.cap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cap { padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(170deg, var(--panel), var(--bg-2)); }
.cap .ic { width: 26px; height: 26px; color: var(--blue-2); margin-bottom: 12px; }
.cap h3 { font-size: 1rem; margin-bottom: 6px; }
.cap p { color: var(--muted); font-size: .88rem; }
.next-card { background: radial-gradient(circle at 80% 0%, rgba(0,143,245,.2), transparent 60%), linear-gradient(170deg, var(--panel), var(--bg-2)); }
.next-card h2 { font-size: 1.4rem; margin-bottom: 22px; }
.next-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; position: relative; }
.next-steps::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: linear-gradient(var(--blue), var(--cyan)); opacity: .5; }
.next-steps li { display: flex; gap: 16px; align-items: center; color: var(--muted); }
.next-steps li span { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--blue); color: var(--cyan); font: 500 .85rem/1 var(--font-m); }
.next-contact { display: grid; gap: 10px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.next-contact a { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 500; }
.next-contact .ic { color: var(--blue-2); }
.file-pick { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; border: 1px dashed var(--line-2); background: rgba(7,9,13,.6); }
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-pick:focus-within { border-color: var(--blue); }
.fp-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 9px; background: rgba(0,143,245,.15); color: var(--blue-2); font-weight: 600; font-size: .88rem; }
.fp-names { font-size: .85rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Dialog */
.send-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 34px; border-radius: 28px; border: 1px solid var(--line-2); background: linear-gradient(170deg, var(--panel-2), var(--bg)); color: var(--text); box-shadow: 0 40px 120px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(0,143,245,.15); }
.send-dialog::backdrop { background: rgba(3,5,8,.7); backdrop-filter: blur(6px); }
.send-dialog[open] { animation: dlgIn .45s var(--ease); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.send-dialog h2 { font-size: 1.6rem; margin-bottom: 8px; }
.dlg-art { position: relative; width: 70px; height: 70px; margin-bottom: 18px; display: grid; place-items: center; }
.dlg-art span { position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(98,220,255,.5); animation: spin 8s linear infinite; }
.dlg-art span + span { inset: 10px; border: 0; background: linear-gradient(135deg, var(--blue-2), var(--blue)); box-shadow: 0 0 30px var(--glow); animation: none; }
.dlg-art .ic { position: relative; width: 26px; height: 26px; color: #fff; }
.attach-note { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(251,191,36,.35); background: rgba(251,191,36,.08); color: #fde68a; font-size: .9rem; }
.dlg-summary { margin: 16px 0 20px; max-height: 210px; overflow: auto; padding: 14px; border-radius: 14px; background: rgba(7,9,13,.7); border: 1px solid var(--line); font: 400 .78rem/1.6 var(--font-m); color: var(--muted); white-space: pre-wrap; word-break: break-word; }
.dlg-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.dlg-actions .btn { flex: 1 1 200px; }
.send-dialog .fine a { color: var(--blue-2); }
.dlg-close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.dlg-close:hover { color: #fff; border-color: var(--blue); }

@media (max-width: 1020px) {
  .quote-grid, .custom-intro { grid-template-columns: 1fr; }
  .q-left { position: static; }
}
@media (max-width: 640px) {
  .tabs { display: flex; width: 100%; }
  .tab { flex: 1; justify-content: center; padding: 12px 10px; font-size: .86rem; }
  .fields, .cap-grid { grid-template-columns: 1fr; }
  .model-stats { grid-template-columns: repeat(2, 1fr); }
  .viewer { height: 320px; }
  .send-dialog { padding: 26px 20px; }
}

/* Instant estimate */
.est-card { position: relative; overflow: hidden; background: radial-gradient(circle at 100% 0%, rgba(0,143,245,.22), transparent 55%), linear-gradient(170deg, var(--panel), var(--bg-2)); border-color: rgba(0,143,245,.35); }
.est-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.est-head h2 { font-size: 1.25rem; }
.est-head p { color: var(--muted); font-size: .88rem; }
.est-orbit { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(98,220,255,.4); display: grid; place-items: center; }
.est-orbit::before { content: "$"; font: 700 1rem/1 var(--font-h); color: var(--cyan); }
.est-orbit span { position: absolute; inset: -6px; border-radius: 50%; border: 1px solid transparent; border-top-color: var(--cyan); animation: spin 2.4s linear infinite; }
.est-total { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; padding: 18px 20px; border-radius: 18px; background: rgba(7,9,13,.6); border: 1px solid var(--line-2); }
.est-total > span { color: var(--muted); font-size: .88rem; }
.est-total small { display: block; font: 500 .68rem/1.4 var(--font-m); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.est-total strong { font: 800 clamp(1.8rem, 4vw, 2.4rem)/1 var(--font-h); background: linear-gradient(180deg, #fff, var(--blue-2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.est-card.is-empty .est-total strong { color: var(--dim); background: none; -webkit-text-fill-color: var(--dim); }
.est-lines { margin: 14px 0 0; display: grid; gap: 2px; }
.est-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 2px; font-size: .9rem; border-bottom: 1px dashed var(--line); }
.est-lines dt { color: var(--muted); }
.est-lines dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.est-lines .neg dd { color: #7ee2a8; }
.est-lines .sub { border-bottom-style: solid; border-color: var(--line-2); }
.est-meta { margin: 14px 0; font-size: .84rem; color: var(--muted); }
.est-card.is-empty .est-meta { padding: 14px; border-radius: 12px; background: rgba(7,9,13,.45); border: 1px dashed var(--line-2); }
.promo-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.promo-field input { flex: 0 1 180px; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line-2); background: rgba(7,9,13,.6); color: var(--text); font: 500 .85rem/1 var(--font-m); letter-spacing: .08em; text-transform: uppercase; }
.promo-field input::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--font-b); }
.promo-field input:focus { outline: none; border-color: var(--blue); border-style: solid; }
.promo-field span { font-size: .82rem; color: var(--muted); }
.promo-field span.ok { color: #7ee2a8; }
.promo-field span.bad { color: #fca5a5; }
.tier-help { grid-column: 1 / -1; margin: -6px 0 0; font-size: .84rem; color: var(--cyan); min-height: 0; }
.tier-help:empty { display: none; }
.toggle-print { padding: 12px 14px; border: 1px solid var(--line-2); background: rgba(0,143,245,.06); }
.ref-line { margin-top: 10px; font-size: .9rem; color: var(--muted); }
.ref-line code { font: 600 .95rem/1 var(--font-m); color: var(--cyan); background: rgba(98,220,255,.1); padding: 4px 8px; border-radius: 6px; letter-spacing: .08em; }
.btn.is-busy { pointer-events: none; opacity: .75; }
.btn.is-busy .ic { animation: spin .8s linear infinite; }

/* Field error messages */
.err-msg { display: flex; gap: 6px; align-items: flex-start; font-size: .82rem; color: #fecaca; line-height: 1.4; }
.err-msg::before { content: "!"; flex: none; width: 16px; height: 16px; border-radius: 50%; background: #dc2626; color: #fff; font: 700 .7rem/16px var(--font-b); text-align: center; margin-top: 1px; }
.check .err-msg { flex-basis: 100%; margin-left: 34px; }
.check:has(.err-msg:not([hidden])) { flex-wrap: wrap; }
.dropzone + .err-msg { margin-top: 10px; }

/* Model units */
.units-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(7,9,13,.45); }
.units-row label { font-size: .88rem; color: var(--muted); font-weight: 500; }
.units-row select { padding: 9px 36px 9px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%239aa7b8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; color: var(--text); font: inherit; font-size: .9rem; appearance: none; -webkit-appearance: none; }
.units-row select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,143,245,.18); }
.units-hint { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: .84rem; color: #fde68a; background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.3); }
.check a { color: var(--blue-2); text-decoration: underline; text-underline-offset: 3px; }

/* Advanced print settings */
.advanced { grid-column: 1 / -1; border: 1px solid var(--line-2); border-radius: 14px; padding: 4px 14px; background: rgba(7,9,13,.35); }
.advanced summary { cursor: pointer; padding: 10px 0; font: 600 .9rem/1.3 var(--font-h); color: var(--blue-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::before { content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .2s; }
.advanced[open] summary::before { transform: rotate(45deg); }
.advanced summary span { color: var(--dim); font-weight: 500; }
.advanced .fields { padding: 6px 0 14px; }

/* ---------- Size estimator (no 3D file) ---------- */
.custom-form { display: grid; gap: 24px; }
.sizer { padding: clamp(20px, 3.2vw, 36px); border-color: rgba(0,143,245,.35); background: radial-gradient(circle at 100% 0%, rgba(0,143,245,.16), transparent 50%), linear-gradient(170deg, var(--panel), var(--bg-2)); }
.sizer-head { max-width: 640px; margin-bottom: 26px; }
.sizer-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 8px; }
.sizer-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(20px, 3vw, 36px); align-items: start; }
.sz-step { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.sz-step:last-child { margin-bottom: 0; }
.sz-step legend { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 0; margin-bottom: 14px; font: 700 1.05rem/1.3 var(--font-h); }
.sz-n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 600 .8rem/1 var(--font-m); color: var(--cyan); border: 1px solid rgba(98,220,255,.45); }
.sz-example { font: 500 .74rem/1 var(--font-b); font-style: normal; color: #fde68a; background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.3); padding: 5px 9px; border-radius: 99px; }

.shape-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shape { position: relative; cursor: pointer; }
.shape input { position: absolute; opacity: 0; pointer-events: none; }
.shape-card { height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(7,9,13,.5); transition: border-color .2s, background .2s, transform .2s var(--ease), box-shadow .2s; }
.shape-card svg { width: 30px; height: 30px; fill: none; stroke: var(--blue-2); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; margin-bottom: 2px; }
.shape-card strong { font: 700 .9rem/1.25 var(--font-h); }
.shape-card em { font-style: normal; font-size: .76rem; color: var(--dim); line-height: 1.35; }
.shape:hover .shape-card { border-color: rgba(58,169,255,.6); transform: translateY(-2px); }
.shape input:checked + .shape-card { border-color: var(--blue); background: rgba(0,143,245,.14); box-shadow: 0 0 0 3px rgba(0,143,245,.18); }
.shape input:checked + .shape-card svg { stroke: var(--cyan); }
.shape input:focus-visible + .shape-card { outline: 2px solid var(--blue-2); outline-offset: 2px; }

.unit-seg { display: inline-flex; padding: 4px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(7,9,13,.5); margin-bottom: 14px; }
.unit-seg label { cursor: pointer; }
.unit-seg input { position: absolute; opacity: 0; pointer-events: none; }
.unit-seg span { display: block; padding: 8px 16px; border-radius: 99px; font: 600 .85rem/1 var(--font-h); color: var(--muted); transition: .2s; }
.unit-seg input:checked + span { background: var(--btn-solid); color: #fff; }
.unit-seg input:focus-visible + span { outline: 2px solid var(--blue-2); }
.dims { display: flex; align-items: flex-end; gap: 8px; }
.dim { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; position: relative; }
.dim > span { font-size: .82rem; color: var(--muted); font-weight: 500; }
.dim input { width: 100%; padding: 14px 42px 14px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(7,9,13,.6); color: var(--text); font: 700 1.15rem/1 var(--font-h); font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.dim input::-webkit-outer-spin-button, .dim input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dim input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,143,245,.18); }
.dim i { position: absolute; right: 12px; bottom: 15px; font: 500 .78rem/1 var(--font-m); font-style: normal; color: var(--dim); pointer-events: none; }
.dim-x { padding-bottom: 14px; color: var(--dim); font-size: 1.1rem; }
.size-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.size-chips > span { font-size: .8rem; color: var(--dim); margin-right: 2px; }
.size-chips button { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(7,9,13,.5); color: var(--muted); font: 600 .8rem/1 var(--font-b); cursor: pointer; transition: .2s; }
.size-chips button:hover, .size-chips button.on { color: #fff; border-color: var(--blue); background: rgba(0,143,245,.2); }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: rgba(7,9,13,.6); }
.stepper button { width: 46px; flex: none; border: 0; background: rgba(255,255,255,.04); color: var(--text); font: 600 1.2rem/1 var(--font-h); cursor: pointer; }
.stepper button:hover { background: rgba(0,143,245,.25); }
.stepper input { flex: 1; min-width: 0; text-align: center; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; font: 700 1.05rem/1 var(--font-h) !important; padding: 12px 6px !important; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.design-only { margin-top: 12px; }

.sizer-result { position: sticky; top: 96px; padding: 22px; border-radius: 22px; border: 1px solid var(--line-2); background: rgba(7,9,13,.55); display: grid; gap: 12px; }
.box-stage { position: relative; height: 200px; border-radius: 16px; display: grid; place-items: center; perspective: 700px; overflow: hidden;
  background: radial-gradient(circle at 50% 55%, rgba(0,143,245,.2), transparent 62%), #080b10; border: 1px solid var(--line); }
.stage-grid { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 20px 20px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 20px 20px;
  mask: radial-gradient(circle at 50% 55%, #000 30%, transparent 75%); -webkit-mask: radial-gradient(circle at 50% 55%, #000 30%, transparent 75%); }
.cuboid { --x: 80px; --y: 30px; --z: 50px; position: relative; width: 0; height: 0; transform-style: preserve-3d; animation: spinBox 16s linear infinite; z-index: 1; }
.cuboid .f { position: absolute; left: 0; top: 0; border: 1.5px solid rgba(98,220,255,.85); background: rgba(0,143,245,.16); box-shadow: inset 0 0 18px rgba(0,143,245,.25); transition: width .5s var(--ease), height .5s var(--ease), transform .5s var(--ease); }
.cuboid .fr, .cuboid .bk { width: var(--x); height: var(--y); }
.cuboid .rt, .cuboid .lt { width: var(--z); height: var(--y); }
.cuboid .tp, .cuboid .bt { width: var(--x); height: var(--z); }
.cuboid .fr { transform: translate(-50%, -50%) translateZ(calc(var(--z) / 2)); }
.cuboid .bk { transform: translate(-50%, -50%) rotateY(180deg) translateZ(calc(var(--z) / 2)); }
.cuboid .rt { transform: translate(-50%, -50%) rotateY(90deg) translateZ(calc(var(--x) / 2)); }
.cuboid .lt { transform: translate(-50%, -50%) rotateY(-90deg) translateZ(calc(var(--x) / 2)); }
.cuboid .tp { transform: translate(-50%, -50%) rotateX(90deg) translateZ(calc(var(--y) / 2)); background: rgba(98,220,255,.22); }
.cuboid .bt { transform: translate(-50%, -50%) rotateX(-90deg) translateZ(calc(var(--y) / 2)); }
@keyframes spinBox { from { transform: rotateX(-24deg) rotateY(0deg); } to { transform: rotateX(-24deg) rotateY(360deg); } }
.compare { text-align: center; font-size: .86rem; color: var(--muted); min-height: 1.3em; }
.price-range { display: grid; gap: 4px; padding: 16px 18px; border-radius: 16px; background: rgba(0,143,245,.08); border: 1px solid rgba(0,143,245,.3); }
.pr-label { font-size: .84rem; color: var(--muted); }
.pr-label small { font: 500 .68rem/1 var(--font-m); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-left: 4px; }
.price-range strong { font: 800 clamp(1.6rem, 3.4vw, 2.3rem)/1.1 var(--font-h); background: linear-gradient(180deg, #fff, var(--blue-2)); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.pr-typ { font-size: .88rem; color: var(--text); }
.sizer-result.is-empty .price-range strong { background: none; -webkit-text-fill-color: var(--dim); color: var(--dim); font-size: 1.3rem; }
.sizer-result.pulse .price-range { animation: pricePulse .6s var(--ease); }
@keyframes pricePulse { 40% { box-shadow: 0 0 0 4px rgba(0,143,245,.25), 0 0 30px rgba(0,143,245,.35); } }
.sizer-result .est-lines { margin: 0; }
.sizer-result .est-meta { margin: 0; }
.link-btn { display: block; margin-top: 10px; padding: 0; border: 0; background: none; color: var(--blue-2); font: 600 .88rem/1.4 var(--font-b); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }

@media (max-width: 1020px) {
  .sizer-grid { grid-template-columns: 1fr; }
  .sizer-result { position: static; }
}
@media (max-width: 640px) {
  .shape-pick { grid-template-columns: 1fr 1fr; }
  .shape-card { padding: 12px; }
  .dims { flex-wrap: wrap; }
  .dim { flex: 1 1 28%; }
  .dim-x { display: none; }
  .dim input { padding: 12px 34px 12px 10px; font-size: 1rem; }
  .box-stage { height: 170px; }
}
@media (prefers-reduced-motion: reduce) { .cuboid { animation: none; transform: rotateX(-24deg) rotateY(-35deg); } }
/* Floating price bar for phones and tablets */
.sizer-mini { display: none; }
@media (max-width: 1020px) {
  .sizer-mini { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; border: 1px solid rgba(0,143,245,.5);
    background: rgba(11,15,21,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--text); box-shadow: 0 16px 40px -12px rgba(0,0,0,.8); cursor: pointer;
    transform: translateY(140%); opacity: 0; pointer-events: none; transition: transform .35s var(--ease), opacity .35s; }
  .sizer-mini.show { transform: none; opacity: 1; pointer-events: auto; }
  .sizer-mini span { font-size: .8rem; color: var(--muted); }
  .sizer-mini strong { font: 800 1.1rem/1 var(--font-h); color: #fff; font-variant-numeric: tabular-nums; }
  .sizer-mini em { margin-left: auto; font-style: normal; font-size: .8rem; color: var(--blue-2); white-space: nowrap; }
}
