#calculator {
  position: relative;
  isolation: isolate;
}

.cc-shell {
  width: min(100%, 1240px);
  margin-inline: auto;
}

.cc-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fbbf24;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cc-kicker::before {
  width: 28px;
  height: 1px;
  background: currentColor;
  content: "";
}

.cc-type-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 20px;
  background: rgba(9, 16, 27, .82);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .22);
}

.cc-type-btn {
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #b9c5d6;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
  transition: border-color .22s ease, background .22s ease, color .22s ease, transform .22s ease;
}

.cc-type-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, .045);
}

.cc-type-btn.is-active {
  border-color: rgba(251, 191, 36, .72);
  background: linear-gradient(135deg, rgba(245, 158, 11, .18), rgba(245, 158, 11, .06));
  color: #fbbf24;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .08), 0 10px 24px rgba(0, 0, 0, .2);
}

.cc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 18px;
  align-items: start;
}

.cc-builder,
.cc-summary {
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(24, 36, 54, .96), rgba(11, 20, 32, .98));
  box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
}

.cc-builder {
  min-width: 0;
  padding: 18px;
}

.cc-summary {
  position: sticky;
  top: 104px;
  padding: 22px;
  border-color: rgba(245, 158, 11, .32);
}

.cc-step {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 17px;
  background: rgba(5, 12, 22, .42);
}

.cc-step + .cc-step { margin-top: 10px; }

.cc-step > summary {
  min-height: 58px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #eef2f7;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  list-style: none;
  user-select: none;
}

.cc-step > summary::-webkit-details-marker { display: none; }

.cc-step > summary::after {
  width: 9px;
  height: 9px;
  margin-left: auto;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s ease, border-color .2s ease;
}

.cc-step[open] > summary::after {
  border-color: #fbbf24;
  transform: rotate(225deg) translate(-2px, -2px);
}

.cc-step-index {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(245, 158, 11, .38);
  border-radius: 10px;
  background: rgba(245, 158, 11, .1);
  color: #fbbf24;
  font-size: 12px;
}

.cc-step-body {
  padding: 2px 16px 18px;
}

.cc-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cc-field-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.cc-field-label,
.cc-group-label {
  display: block;
  margin-bottom: 8px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

.cc-number {
  min-height: 50px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 13px;
  background: rgba(3, 9, 17, .58);
}

.cc-number button {
  border: 0;
  background: rgba(255, 255, 255, .045);
  color: #fbbf24;
  font-size: 22px;
  font-weight: 500;
}

.cc-number button:hover { background: rgba(245, 158, 11, .14); }

.cc-number input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  appearance: textfield;
}

.cc-number input::-webkit-inner-spin-button,
.cc-number input::-webkit-outer-spin-button { appearance: none; }

.cc-range {
  width: 100%;
  height: 4px;
  margin-top: 11px;
  border-radius: 999px;
  outline: none;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  accent-color: #f59e0b;
}

.cc-segmented,
.cc-opening-row,
.cc-glass-grid {
  display: grid;
  gap: 8px;
}

.cc-segmented { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cc-opening-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cc-glass-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.cc-option,
.cc-opening,
.cc-glass-card {
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.cc-option:hover,
.cc-opening:hover,
.cc-glass-card:hover { border-color: rgba(245, 158, 11, .48); color: #fff; }

.cc-option.is-active,
.cc-opening.is-active,
.cc-glass-card.is-active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, .12);
  color: #fbbf24;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .12);
}

.cc-option:disabled,
.cc-opening:disabled,
.cc-glass-card:disabled {
  opacity: .36;
  cursor: not-allowed;
}

.cc-opening-configs { display: grid; gap: 10px; }

.cc-opening-config {
  padding: 11px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 14px;
  background: rgba(0, 0, 0, .13);
}

.cc-opening-title {
  margin-bottom: 8px;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 800;
}

.cc-preview-wrap {
  display: grid;
  grid-template-columns: minmax(250px, .92fr) minmax(0, 1.08fr);
  gap: 14px;
  margin-bottom: 12px;
}

.cc-preview {
  min-height: 260px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(245, 158, 11, .24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 28%, rgba(56, 189, 248, .08), transparent 44%),
    linear-gradient(150deg, #0d1725, #070d16);
}

.cc-scheme {
  width: 100%;
  max-height: 230px;
  aspect-ratio: var(--scheme-ratio, 1.35);
  margin: auto;
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 5px solid #f3b31d;
  border-radius: 5px;
  background: #d7a716;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .32), 0 0 0 1px rgba(251, 191, 36, .22);
}

.cc-scheme--balcony {
  grid-template-columns: minmax(72px, .72fr) minmax(100px, 1.28fr);
  align-items: stretch;
}

.cc-balcony-window {
  min-width: 0;
  min-height: 0;
  display: grid;
  gap: 5px;
}

.cc-balcony-lower {
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .18);
  background: linear-gradient(180deg, rgba(39, 51, 67, .9), rgba(17, 25, 38, .96));
}

.cc-balcony-lower span {
  padding: 4px;
  color: rgba(255, 255, 255, .48);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.cc-scheme--panorama { grid-template-rows: repeat(2, minmax(0, 1fr)); }

.cc-scheme-window-grid,
.cc-scheme-cell-grid { display: grid; gap: 5px; min-width: 0; min-height: 0; }

.cc-pane {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .72);
  background: linear-gradient(145deg, rgba(190, 224, 242, .32), rgba(48, 69, 94, .58));
}

.cc-pane::before,
.cc-pane::after {
  position: absolute;
  left: 8%;
  top: 50%;
  width: 84%;
  height: 1px;
  background: rgba(251, 191, 36, .78);
  content: "";
  opacity: 0;
  transform-origin: center;
}

.cc-pane.is-turn::before { opacity: 1; transform: rotate(32deg); }
.cc-pane.is-turn::after { opacity: 1; transform: rotate(-32deg); }
.cc-pane.is-tilt::before { opacity: 1; transform: rotate(32deg); }
.cc-pane.is-tilt::after { opacity: 1; transform: rotate(-32deg); }

.cc-pane.is-tilt span::after {
  position: absolute;
  left: 50%;
  top: 7%;
  height: 86%;
  width: 1px;
  background: rgba(251, 191, 36, .78);
  content: "";
}

.cc-pane span {
  position: absolute;
  left: 6px;
  bottom: 5px;
  z-index: 2;
  color: rgba(255, 255, 255, .72);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.cc-preview-caption {
  margin-top: 12px;
  color: #94a3b8;
  font-size: 11px;
  text-align: center;
}

.cc-profile-grid {
  max-height: 395px;
  padding-right: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(245, 158, 11, .45) transparent;
}

.cc-profile-card {
  min-height: 116px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  color: #cbd5e1;
  text-align: left;
}

.cc-profile-card:hover { border-color: rgba(245, 158, 11, .48); }

.cc-profile-card.is-active {
  border-color: #f59e0b;
  background: linear-gradient(145deg, rgba(245, 158, 11, .13), rgba(245, 158, 11, .035));
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .12);
}

.cc-profile-brand {
  display: block;
  margin-bottom: 3px;
  color: #fbbf24;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
}

.cc-profile-name { display: block; color: #fff; font-size: 13px; font-weight: 850; }
.cc-profile-spec { display: block; margin-top: 6px; color: #9eacbf; font-size: 10px; line-height: 1.45; }
.cc-profile-note { display: block; margin-top: 5px; color: #f0b64a; font-size: 9px; }

.cc-alerts { display: grid; gap: 7px; margin-top: 12px; }

.cc-alert {
  padding: 10px 12px;
  display: flex;
  gap: 9px;
  border: 1px solid rgba(251, 191, 36, .3);
  border-radius: 12px;
  background: rgba(245, 158, 11, .08);
  color: #f8d994;
  font-size: 11px;
  line-height: 1.45;
}

.cc-alert.is-error {
  border-color: rgba(248, 113, 113, .4);
  background: rgba(127, 29, 29, .17);
  color: #fecaca;
}

.cc-summary-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.cc-summary-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(245, 158, 11, .35);
  border-radius: 13px;
  background: rgba(245, 158, 11, .1);
  color: #fbbf24;
  font-size: 20px;
}

.cc-summary h3 { margin: 0; color: #fff; font-size: 19px; }
.cc-summary-sub { color: #94a3b8; font-size: 10px; }

.cc-summary-list {
  display: grid;
  gap: 9px;
  margin-bottom: 16px;
}

.cc-summary-row {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(148, 163, 184, .13);
  font-size: 11px;
}

.cc-summary-row dt { color: #8fa0b6; }
.cc-summary-row dd { margin: 0; color: #e8edf4; font-weight: 700; text-align: right; }

.cc-price-box {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(245, 158, 11, .4);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, .12), rgba(245, 158, 11, .035));
}

.cc-price-label { color: #a8b5c5; font-size: 11px; }
.cc-price {
  margin-top: 3px;
  color: #fbbf24;
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -.035em;
}

.cc-price.is-bump { animation: cc-price-bump .28s ease-out; }

.cc-price-unit {
  margin-top: 4px;
  color: #e5bd65;
  font-size: 12px;
  font-weight: 800;
}

@keyframes cc-price-bump {
  45% { color: #fff0b4; transform: scale(1.035); }
}

.cc-price-note {
  margin-top: 5px;
  color: #99a8bb;
  font-size: 10px;
  line-height: 1.45;
}

.cc-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #fbbf24, #ed8b00);
  color: #101620;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(245, 158, 11, .17);
}

.cc-submit:hover { filter: brightness(1.06); }

.cc-disclaimer {
  margin-top: 10px;
  color: #7f8da0;
  font-size: 9px;
  line-height: 1.45;
  text-align: center;
}

.cc-mobile-total { display: none; }
.cc-conditional[hidden] { display: none !important; }

@media (max-width: 1023px) {
  .cc-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .cc-preview-wrap { grid-template-columns: 1fr; }
  .cc-preview { min-height: 230px; }
  .cc-profile-grid { max-height: 350px; }
}

@media (max-width: 767px) {
  #calculator { padding-bottom: 96px !important; }
  #calculator .container { padding-inline: 14px !important; }
  #calculator .text-center.mb-16 { margin-bottom: 24px !important; }
  #calculator h2 { font-size: clamp(30px, 9vw, 38px) !important; }
  #calculator h2 + p { max-width: 330px; margin-inline: auto; font-size: 14px !important; }

  .cc-type-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 7px;
    border-radius: 17px;
  }

  .cc-type-btn { min-height: 54px; padding: 8px; font-size: 11px; }
  .cc-layout { display: block; }
  .cc-builder { padding: 10px; border-radius: 19px; }
  .cc-summary { display: none; }

  .cc-step { border-radius: 14px; }
  .cc-step > summary { min-height: 56px; padding-inline: 12px; font-size: 13px; }
  .cc-step-body { padding: 2px 11px 14px; }
  .cc-step:not([open]) .cc-step-body { display: none; }
  .cc-step-index { width: 28px; height: 28px; border-radius: 9px; }

  .cc-preview-wrap { display: block; }
  .cc-preview { min-height: 220px; margin-bottom: 12px; padding: 14px; border-radius: 15px; }
  .cc-field-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cc-field-grid--four { grid-template-columns: 1fr 1fr; }
  .cc-segmented { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cc-option { padding-inline: 5px; font-size: 11px; }
  .cc-opening-row { grid-template-columns: 1fr; }
  .cc-opening { min-height: 44px; text-align: left; }
  .cc-profile-grid { max-height: none; grid-template-columns: 1fr; }
  .cc-profile-card { min-height: 92px; }
  .cc-glass-grid { grid-template-columns: 1fr; }

  .cc-mobile-total {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: max(9px, env(safe-area-inset-bottom));
    z-index: 840;
    min-height: 66px;
    padding: 9px 10px 9px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(245, 158, 11, .42);
    border-radius: 17px;
    background: rgba(8, 15, 25, .96);
    box-shadow: 0 16px 42px rgba(0, 0, 0, .48);
    backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(120%);
    transition: opacity .22s ease, transform .28s cubic-bezier(.22, 1, .36, 1);
  }

  .cc-mobile-total.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .cc-mobile-total small { display: block; color: #96a6ba; font-size: 9px; }
  .cc-mobile-total strong { display: block; color: #fbbf24; font-size: 19px; line-height: 1.2; }
  .cc-mobile-total button {
    min-height: 46px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, #fbbf24, #ed8b00);
    color: #111827;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
  }
}

@media (max-width: 374px) {
  .cc-type-btn { font-size: 10px; }
  .cc-field-grid { grid-template-columns: 1fr; }
  .cc-segmented { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-mobile-total strong { font-size: 17px; }
  .cc-mobile-total button { padding-inline: 11px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .cc-price.is-bump { animation: none; }
  .cc-mobile-total { transition: none; }
}
