@font-face {
  font-family: "Proxima Nova";
  src: url("../assets/fonts/ProximaNova-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova";
  src: url("../assets/fonts/ProximaNova-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova";
  src: url("../assets/fonts/ProximaNova-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova";
  src: url("../assets/fonts/ProximaNova-Extrabld.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Proxima Nova";
  src: url("../assets/fonts/ProximaNova-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #eeeeee;
  --surface: #ffffff;
  --surface-soft: #faf7f3;
  --ink: #231f20;
  --muted: #6a6464;
  --muted-2: #6f6862;
  --muted-3: #6f6862;
  --accent: #c5793d;
  --accent-text: #9f5b27;
  --accent-strong: #a8612b;
  --accent-strong-hover: #955423;
  --accent-dark: #a8612b;
  --accent-light: #f78d4d;
  --line: #dadada;
  --line-soft: #e9e5e0;
  --field: #eeeeee;
  --danger: #871515;
  --danger-bg: #ffc8c8;
  --kraft: #bc875a;
  --radius: 7px;
  --shadow: 0 1px 2px #b6b5b5;
  --font: "Proxima Nova", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::selection,
::selection {
  background: #e8c7aa;
  color: var(--ink);
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--accent-text);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-strong-hover);
}

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

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid rgba(197, 121, 61, 0.72);
  outline-offset: 2px;
}

.container {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 20;
  background: var(--surface);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 36px;
  font-size: 11px;
  color: var(--muted);
}

.header-contacts,
.header-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-contacts .phone {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.work-hours {
  color: var(--muted-3);
}

.header-links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--muted);
}

.header-links a:hover {
  color: var(--accent-text);
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  margin-left: 2px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 9px;
  line-height: 1;
}

.header-main {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 88px;
  padding-bottom: 15px;
}

.brand {
  position: absolute;
  left: 50%;
  top: -36px;
  z-index: 2;
  display: block;
  width: 90px;
  height: 92px;
  transform: translateX(-50%);
  transition: transform 0.2s ease;
}

.brand:hover {
  transform: translateX(-50%) translateY(1px);
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
}

.mobile-phone {
  display: none;
}

.main-nav {
  display: flex;
  align-items: flex-end;
  gap: clamp(18px, 2.4vw, 34px);
  padding-bottom: 2px;
}

.main-nav--right {
  justify-content: flex-end;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding-bottom: 0;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.1px;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.is-active {
  border-color: var(--accent);
  color: var(--accent-text);
}

/* ---------- Page intro ---------- */

.breadcrumb-wrap {
  padding-top: 22px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 11px;
}

.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: var(--accent-text);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.page-intro {
  padding: 30px 0 28px;
  text-align: center;
}

.page-intro h1 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(20px, 2.15vw, 26px);
  font-weight: 900;
  letter-spacing: 1.4px;
  line-height: 1.22;
  text-transform: uppercase;
}

.page-lead {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* ---------- Layout ---------- */

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(380px, 1fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 54px;
}

.calc-card,
.preview-card {
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.calc-card {
  overflow: hidden;
}

.preview-card {
  position: sticky;
  top: 20px;
  overflow: hidden;
}

/* ---------- Product switch ---------- */

.product-switch-wrap {
  padding: 20px 30px 0;
}

.product-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  border-radius: 9px;
  background: #f2efeb;
}

.product-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 7px;
  color: #4e453f;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

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

.product-option:hover {
  background: rgba(255, 255, 255, 0.7);
}

.product-option.is-selected {
  background: var(--accent-strong);
  color: #fff;
  box-shadow: 0 2px 7px rgba(197, 121, 61, 0.28);
}

.product-option.is-selected .product-copy small {
  color: #fff;
}

.product-option:focus-within {
  outline: 2px solid rgba(197, 121, 61, 0.55);
  outline-offset: 2px;
}

.product-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
}

.product-icon svg {
  width: 30px;
  height: 30px;
}

.product-copy {
  min-width: 0;
}

.product-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.product-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.2;
  opacity: 1;
}

/* ---------- Form sections ---------- */

.form-section {
  padding: 26px 30px 24px;
  border-bottom: 1px solid var(--line);
}

.form-section:last-of-type {
  border-bottom: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
}

.section-title {
  margin: 0;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.2;
  text-transform: uppercase;
}

.section-note {
  flex: none;
  color: var(--muted-3);
  font-size: 10px;
  letter-spacing: 0.3px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.field-optional {
  color: var(--muted-3);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field--full {
  grid-column: 1 / -1;
}

.size-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  align-items: end;
}

.field--height {
  margin-top: 22px;
}

.field--case-top {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px dashed #e3ddd6;
}

.input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--field);
  color: var(--ink);
  font-size: 14px;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.input::placeholder {
  color: var(--muted-2);
}

.input:hover {
  background: #e9e6e2;
}

.input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(197, 121, 61, 0.12);
  outline: none;
}

.input[type="number"] {
  -moz-appearance: textfield;
}

.input[type="number"]::-webkit-outer-spin-button,
.input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.input.is-invalid {
  border-color: var(--danger);
  background: #fff6f6;
}

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-right: 38px;
}

.input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  color: var(--muted-2);
  font-size: 10px;
  pointer-events: none;
  transform: translateY(-50%);
}

.input--compact {
  width: 94px;
  height: 36px;
  padding: 0 9px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
}

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

.height-head .field-label {
  margin-bottom: 0;
}

.height-value {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 10px;
}

/* ---------- Diameter chips ---------- */

.diameter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.diameter-chip {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #dbc6b2;
  border-radius: 50%;
  background: #fff;
  color: #8a5a34;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.diameter-chip::before {
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  content: "";
}

.diameter-chip::after {
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(197, 121, 61, 0.22);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.diameter-chip:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

.diameter-chip.is-selected {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
  box-shadow: 0 2px 7px rgba(197, 121, 61, 0.34);
}

.diameter-chip.is-selected::after {
  border-color: rgba(255, 255, 255, 0.55);
}

/* ---------- Range ---------- */

.range {
  width: 100%;
  height: 24px;
  margin: 4px 0 0;
  padding: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 23%), #e4dfd9 var(--fill, 23%));
}

.range::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: #e4dfd9;
}

.range::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--accent);
}

.range::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(35, 31, 32, 0.18);
  appearance: none;
}

.range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(35, 31, 32, 0.18);
}

.range:focus-visible {
  outline: none;
}

.range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(197, 121, 61, 0.2), 0 2px 5px rgba(35, 31, 32, 0.18);
}

.range:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(197, 121, 61, 0.2), 0 2px 5px rgba(35, 31, 32, 0.18);
}

.range-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted-3);
  font-size: 9px;
  letter-spacing: 0.3px;
}

.field-hint {
  margin: 8px 0 0;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}

.field-error {
  margin: 6px 0 0;
  padding: 6px 8px;
  border-radius: 5px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 10px;
  line-height: 1.4;
}

/* ---------- Cap options ---------- */

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

.cap-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 8px 10px;
  border: 1px solid #e6e1db;
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

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

.cap-option:hover {
  border-color: #d8b89d;
  transform: translateY(-1px);
}

.cap-option.is-selected {
  border-color: var(--accent);
  background: #fffaf5;
  box-shadow: 0 0 0 2px rgba(197, 121, 61, 0.13);
}

.cap-option:focus-within {
  outline: 2px solid rgba(197, 121, 61, 0.5);
  outline-offset: 2px;
}

.cap-swatch {
  display: block;
  width: 64px;
  height: 46px;
}

.cap-swatch svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cap-copy strong {
  display: block;
  overflow: hidden;
  color: #3f3833;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cap-copy small {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.2;
}

/* ---------- Case construction ---------- */

.construction-note {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border: 1px solid #eee7df;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.construction-icon {
  flex: none;
  color: var(--accent);
}

.construction-icon svg {
  display: block;
  width: 46px;
  height: 52px;
}

.construction-note strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
}

.construction-note p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

/* ---------- Label options ---------- */

.label-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.label-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e6e1db;
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

.label-option:hover {
  border-color: #d8b89d;
}

.label-option.is-selected {
  border-color: var(--accent);
  background: #fffaf5;
  box-shadow: 0 0 0 2px rgba(197, 121, 61, 0.13);
}

.label-option:focus-within {
  outline: 2px solid rgba(197, 121, 61, 0.5);
  outline-offset: 2px;
}

.label-preview {
  display: block;
  flex: none;
  width: 42px;
  height: 56px;
}

.label-preview svg {
  display: block;
  width: 100%;
  height: 100%;
}

.label-copy {
  min-width: 0;
}

.label-copy strong {
  display: block;
  color: #3f3833;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

.label-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.3;
}

/* ---------- Contacts ---------- */

.contacts-section {
  padding-bottom: 28px;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  cursor: pointer;
}

.consent input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.consent a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent.is-invalid {
  color: var(--danger);
}

.submit-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
}

.btn-primary {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent-strong);
  color: #fff;
  box-shadow: 0 2px 7px rgba(197, 121, 61, 0.26);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1;
  text-transform: uppercase;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent-strong-hover);
  color: #fff;
  box-shadow: 0 4px 12px rgba(197, 121, 61, 0.3);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:focus-visible {
  outline: 2px solid #7b451f;
  outline-offset: 2px;
}

.submit-note {
  max-width: 340px;
  margin: 0;
  color: var(--muted-3);
  font-size: 10px;
  line-height: 1.5;
}

.form-error {
  margin: 14px 0 0;
  padding: 8px 10px;
  border-radius: 5px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 11px;
}

/* ---------- 3D preview ---------- */

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 20px 14px;
  border-bottom: 1px solid #efebe6;
}

.preview-kicker {
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.2;
  text-transform: uppercase;
}

.preview-dims {
  margin-top: 4px;
  color: #4e453f;
  font-size: 13px;
  line-height: 1.3;
}

.live-badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid #e5e0da;
  border-radius: 999px;
  background: #fbfaf8;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.5px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6f9f75;
  box-shadow: 0 0 0 3px rgba(111, 159, 117, 0.14);
  animation: live-pulse 2.2s ease-out infinite;
}

@keyframes live-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(111, 159, 117, 0.18);
  }
  55% {
    box-shadow: 0 0 0 5px rgba(111, 159, 117, 0);
  }
}

.stage {
  position: relative;
  height: clamp(340px, 52vh, 520px);
  overflow: hidden;
  background:
    radial-gradient(115% 82% at 50% 8%, #fcfaf7 0%, #f4eee6 42%, #e8dfd4 100%);
  isolation: isolate;
}

.stage::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
  content: "";
  mix-blend-mode: multiply;
  opacity: 0.12;
  pointer-events: none;
}

#tubeCanvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#tubeCanvas:active {
  cursor: grabbing;
}

.preview-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.55s ease;
  pointer-events: none;
}

.preview-fallback svg {
  width: min(220px, 62%);
  height: auto;
  filter: drop-shadow(0 24px 20px rgba(74, 55, 38, 0.12));
}

.preview-card.is-ready .preview-fallback {
  opacity: 0;
}

.stage-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  gap: 6px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(60, 45, 30, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: #4e453f;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  background: #fff;
  color: var(--accent);
  transform: translateY(-1px);
}

.icon-btn[aria-pressed="false"] {
  color: var(--muted-3);
}

.stage-hint {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: 0.2px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.mouse-icon {
  display: block;
}

.mouse-icon svg {
  display: block;
  width: 12px;
  height: 15px;
}

.preview-meta {
  padding: 16px 20px 18px;
}

.dim-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dim-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 5px;
  background: #f6f2ed;
  color: #4e453f;
  font-size: 11px;
}

.dim-pill b {
  color: var(--accent-text);
  font-weight: 600;
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.meta-tag {
  padding: 4px 9px;
  border: 1px solid #e7e2dc;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

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

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 10px;
  border-top: 1px solid #e3e0dc;
  background: var(--surface);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 34px 0 28px;
}

.footer-brand img {
  display: block;
  width: 58px;
  height: 59px;
}

.footer-brand p {
  max-width: 300px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.footer-head {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 28px;
  padding: 3px 0;
  color: #4e453f;
}

.footer-col a:hover {
  color: var(--accent-text);
}

.footer-phone {
  color: var(--ink) !important;
  font-size: 14px;
  font-weight: 600;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0 20px;
  border-top: 1px solid #eee;
  color: var(--muted-3);
  font-size: 10px;
  line-height: 1.4;
}

/* ---------- Dialog ---------- */

.success-dialog {
  width: calc(100% - 32px);
  max-width: 520px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(35, 31, 32, 0.28);
}

.success-dialog::backdrop {
  background: rgba(35, 31, 32, 0.46);
  backdrop-filter: blur(3px);
}

.dialog-inner {
  position: relative;
  padding: 34px 34px 30px;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-2);
  font-size: 22px;
  line-height: 1;
}

.dialog-close:hover {
  background: #f4f0eb;
  color: var(--ink);
}

.dialog-kicker {
  color: var(--accent-text);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.dialog-inner h2 {
  margin: 8px 0 10px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

.dialog-inner > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.dialog-summary {
  display: grid;
  gap: 7px;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-soft);
  font-size: 11px;
}

.dialog-summary .row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.dialog-summary .row span:first-child {
  color: var(--muted-2);
}

.dialog-summary .row span:last-child {
  color: var(--ink);
  font-weight: 600;
  text-align: right;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 20px;
  border: 1px solid #e1dbd4;
  border-radius: var(--radius);
  color: #4e453f;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: #fffaf5;
  color: var(--accent-text);
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .header-main {
    height: 82px;
  }

  .main-nav {
    gap: 18px;
  }

  .main-nav a {
    font-size: 10px;
    letter-spacing: 0.9px;
  }

  .brand {
    width: 82px;
    height: 84px;
    top: -34px;
  }

  .size-grid {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
  }
}

@media (max-width: 1000px) {
  .calculator-layout {
    grid-template-columns: 1fr;
    max-width: 760px;
    gap: 20px;
  }

  .preview-card {
    position: static;
    order: -1;
  }

  .stage {
    height: 420px;
  }

  .main-nav {
    gap: 14px;
  }

  .main-nav a {
    font-size: 9px;
    letter-spacing: 0.7px;
  }

  .header-top {
    gap: 12px;
  }

  .header-contacts,
  .header-links {
    gap: 12px;
  }
}

@media (max-width: 860px) {
  .header-top {
    display: none;
  }

  .header-main {
    height: 70px;
    align-items: center;
    justify-content: center;
    padding-bottom: 0;
  }

  .brand {
    position: static;
    width: 64px;
    height: 66px;
    transform: none;
  }

  .brand:hover {
    transform: translateY(1px);
  }

  .mobile-phone {
    position: absolute;
    right: 0;
    top: 50%;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid #e7dfd7;
    border-radius: 50%;
    background: #fff;
    color: var(--accent);
    transform: translateY(-50%);
  }

  .mobile-phone svg {
    width: 18px;
    height: 18px;
  }

  .mobile-phone:hover {
    border-color: var(--accent);
    background: #fffaf5;
  }

  .main-nav {
    display: none;
  }

  .page-intro {
    padding: 24px 0 22px;
  }

  .page-intro h1 {
    font-size: 20px;
    letter-spacing: 1px;
  }

  .page-lead {
    font-size: 12px;
  }
}

@media (max-width: 620px) {
  .container {
    width: calc(100% - 28px);
  }

  .product-switch-wrap {
    padding: 14px 16px 0;
  }

  .product-switch {
    grid-template-columns: 1fr;
  }

  .product-option {
    padding: 10px 12px;
  }

  .product-icon,
  .product-icon svg {
    width: 26px;
    height: 26px;
  }

  .form-section {
    padding: 22px 16px 20px;
  }

  .section-head {
    gap: 8px;
  }

  .section-note {
    font-size: 9px;
  }

  .size-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .field-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .field--full {
    grid-column: auto;
  }

  .diameter-chip {
    width: 40px;
    height: 40px;
    font-size: 10px;
  }

  .diameter-list {
    gap: 7px;
  }

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

  .label-grid {
    grid-template-columns: 1fr;
  }

  .submit-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .btn-primary {
    width: 100%;
  }

  .preview-head {
    padding: 14px 16px 12px;
  }

  .stage {
    height: 340px;
  }

  .preview-meta {
    padding: 14px 16px 16px;
  }

  .stage-hint {
    left: 12px;
    bottom: 12px;
  }

  .stage-actions {
    top: 12px;
    right: 12px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 28px 0 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 4px;
  }

  .dialog-inner {
    padding: 28px 20px 24px;
  }

  .dialog-inner h2 {
    font-size: 19px;
  }
}

@media (max-width: 380px) {
  .diameter-list {
    gap: 6px;
  }

  .cap-swatch {
    width: 58px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
