.calculator-page-hero {
  padding-bottom: 62px !important;
}

.calculator-page-hero .actions {
  margin-top: 30px;
}

.calculator-page-hero .privacy-note {
  display: inline-flex;
  margin-top: 24px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.calculator-shell {
  --card: #fffdf8;
  --shadow: 0 24px 70px rgba(82, 48, 29, .12);
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 62px !important;
  padding-bottom: 88px !important;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, .75fr);
  gap: 24px;
  align-items: start;
}

.calculator-shell button,
.calculator-shell input,
.calculator-shell select {
  font: inherit;
}

.calculator-shell button,
.calculator-shell label,
.calculator-shell select {
  -webkit-tap-highlight-color: transparent;
}

.calculator-shell .calc-panel {
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(255, 253, 248, .92);
  box-shadow: var(--shadow);
}

.calculator-shell .form-panel {
  padding: clamp(22px, 4vw, 44px);
}

.calculator-shell fieldset {
  min-width: 0;
  margin: 0;
  padding: 0 0 34px;
  border: 0;
}

.calculator-shell fieldset + fieldset {
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.calculator-shell fieldset:last-child {
  padding-bottom: 0;
}

.calculator-shell legend {
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  font-family: "Arial Black", "Segoe UI", Arial, sans-serif;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.15;
}

.calculator-shell .hint {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.calculator-shell .embroidery-manager {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .62);
}

.calculator-shell .embroidery-manager-head,
.calculator-shell .dimension-head,
.calculator-shell .per-embroidery-options-head {
  margin-bottom: 12px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.calculator-shell .embroidery-manager-head strong {
  font-size: 16px;
}

.calculator-shell .embroidery-manager-head span,
.calculator-shell .per-embroidery-options-head span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.calculator-shell .embroidery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calculator-shell .embroidery-tab {
  min-width: 135px;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.calculator-shell .embroidery-tab.is-active {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}

.calculator-shell .embroidery-tab-main,
.calculator-shell .embroidery-tab-remove {
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.calculator-shell .embroidery-tab-main {
  padding: 10px 12px;
  text-align: left;
}

.calculator-shell .embroidery-tab-main strong,
.calculator-shell .embroidery-tab-main small {
  display: block;
}

.calculator-shell .embroidery-tab-main strong {
  font-size: 12px;
}

.calculator-shell .embroidery-tab-main small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.calculator-shell .embroidery-tab-remove {
  width: 34px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.calculator-shell .embroidery-tab-remove:hover {
  background: #f3dec9;
  color: var(--red);
}

.calculator-shell .add-embroidery {
  width: 100%;
  margin-top: 10px;
  padding: 11px 14px;
  border: 1px dashed #bd8d71;
  border-radius: 13px;
  background: transparent;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.calculator-shell .add-embroidery:hover {
  background: #f8eadc;
}

.calculator-shell .add-embroidery:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.calculator-shell .embroidery-manager-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.calculator-shell .dimension-box {
  margin-bottom: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff4e6;
}

.calculator-shell .dimension-head strong {
  font-size: 17px;
}

.calculator-shell .dimension-head span {
  color: var(--muted);
  font-size: 12px;
}

.calculator-shell .workpiece-label {
  display: block;
  margin: 16px 0 8px;
  font-size: 12px;
  font-weight: 900;
}

.calculator-shell .workpiece-switch,
.calculator-shell .size-grid,
.calculator-shell .quantity-grid,
.calculator-shell .options-grid,
.calculator-shell .per-embroidery-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.calculator-shell .workpiece-option,
.calculator-shell .choice,
.calculator-shell .check {
  position: relative;
  cursor: pointer;
}

.calculator-shell .workpiece-option input,
.calculator-shell .choice input,
.calculator-shell .check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.calculator-shell .workpiece-body {
  min-height: 70px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  transition: .2s ease;
}

.calculator-shell .workpiece-body strong {
  font-size: 13px;
}

.calculator-shell .workpiece-body small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.calculator-shell .workpiece-option input:checked + .workpiece-body {
  border-color: var(--sage);
  background: #f3f7ef;
  box-shadow: inset 0 0 0 1px var(--sage);
}

.calculator-shell .dimension-inputs {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.calculator-shell .dimension-inputs > span {
  padding-bottom: 15px;
  font-weight: 900;
}

.calculator-shell .measure-field > span {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 900;
}

.calculator-shell .measure-line {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.calculator-shell .measure-input {
  min-width: 0;
  flex: 1;
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.calculator-shell .measure-input input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--ink);
  appearance: textfield;
}

.calculator-shell .measure-input input::-webkit-inner-spin-button,
.calculator-shell .measure-input input::-webkit-outer-spin-button,
.calculator-shell .stepper input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.calculator-shell .measure-line > small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.calculator-shell .dimension-suggestion {
  min-height: 21px;
  margin: 13px 0 0;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
}

.calculator-shell .dimension-suggestion.is-manual {
  color: var(--berry);
}

.calculator-shell .manual-divider {
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.calculator-shell .manual-divider::before,
.calculator-shell .manual-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.calculator-shell .per-embroidery-options {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffaf4;
}

.calculator-shell .per-embroidery-options-head strong {
  font-size: 14px;
}

.calculator-shell .choice-body {
  min-height: 102px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  transition: .2s ease;
}

.calculator-shell .choice-body strong {
  font-size: 17px;
}

.calculator-shell .choice-body span {
  color: var(--muted);
  font-size: 13px;
}

.calculator-shell .choice input:checked + .choice-body {
  border-color: var(--red);
  background: #fff5ed;
  box-shadow: inset 0 0 0 1px var(--red), 0 9px 24px rgba(201, 87, 63, .1);
  transform: translateY(-2px);
}

.calculator-shell .choice.auto-match::after {
  content: "Подобрано";
  position: absolute;
  right: 12px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--sage);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  pointer-events: none;
}

.calculator-shell .choice input:focus-visible + .choice-body,
.calculator-shell .check input:focus-visible + .check-body,
.calculator-shell .workpiece-option input:focus-visible + .workpiece-body,
.calculator-shell button:focus-visible,
.calculator-shell select:focus-visible,
.calculator-shell input[type="number"]:focus-visible {
  outline: 3px solid rgba(231, 171, 70, .5);
  outline-offset: 3px;
}

.calculator-shell .choice.custom {
  grid-column: 1 / -1;
}

.calculator-shell .choice.custom .choice-body {
  min-height: auto;
  flex-direction: row;
  align-items: center;
}

.calculator-shell .embroidery-count-card {
  min-height: 82px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.calculator-shell .embroidery-count-card span {
  color: var(--muted);
  font-size: 12px;
}

.calculator-shell .embroidery-count-card strong {
  color: var(--red);
  font-size: 34px;
}

.calculator-shell .control-label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 900;
}

.calculator-shell .stepper {
  min-height: 52px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.calculator-shell .stepper button {
  border: 0;
  background: #f8eadc;
  color: var(--ink);
  font-size: 23px;
  cursor: pointer;
}

.calculator-shell .stepper button:hover {
  background: #f0d8c4;
}

.calculator-shell .stepper input {
  width: 100%;
  border: 0;
  background: #fff;
  color: var(--ink);
  text-align: center;
  font-weight: 900;
  appearance: textfield;
}

.calculator-shell select {
  width: 100%;
  min-height: 52px;
  padding: 0 42px 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.calculator-shell .select-row {
  margin-top: 18px;
}

.calculator-shell .check-body {
  min-height: 92px;
  padding: 16px 16px 16px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  position: relative;
  transition: .2s ease;
}

.calculator-shell .per-embroidery-options .check-body {
  min-height: 82px;
}

.calculator-shell .check-body::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 1px solid #bda793;
  border-radius: 6px;
  transform: translateY(-50%);
}

.calculator-shell .check-body strong {
  font-size: 14px;
}

.calculator-shell .check-body span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.calculator-shell .check input:checked + .check-body {
  border-color: var(--sage);
  background: #f3f7ef;
  box-shadow: inset 0 0 0 1px var(--sage);
}

.calculator-shell .check input:checked + .check-body::before {
  content: "✓";
  display: grid;
  place-items: center;
  border-color: var(--sage);
  background: var(--sage);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.calculator-shell .result-panel {
  position: sticky;
  top: 102px;
  overflow: hidden;
}

.calculator-shell .result-top {
  padding: 34px;
  color: #fff;
  background: radial-gradient(circle at 90% 0, rgba(231, 171, 70, .34), transparent 16rem), #3a2a24;
}

.calculator-shell .result-kicker {
  margin: 0 0 8px;
  color: #e7c8b2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.calculator-shell .total {
  min-height: 68px;
  margin: 0;
  font-family: "Arial Black", "Segoe UI", Arial, sans-serif;
  font-size: clamp(42px, 5vw, 62px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
}

.calculator-shell .result-body {
  padding: 28px 30px 30px;
}

.calculator-shell .breakdown {
  margin: 0;
  padding: 0;
  list-style: none;
}

.calculator-shell .breakdown li {
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.calculator-shell .breakdown li strong {
  color: var(--ink);
  white-space: nowrap;
}

.calculator-shell .breakdown li:last-child {
  border-bottom: 0;
}

.calculator-shell .calc-notice {
  margin: 18px 0 0;
  padding: 16px;
  border: 1px dashed #bd8d71;
  border-radius: 16px;
  background: #fff9f0;
  color: var(--muted);
  font-size: 12px;
}

.calculator-shell .calc-notice.is-warning {
  border-color: var(--red);
  background: #fff0ea;
}

.calculator-shell .calc-actions {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.calculator-shell .calc-actions .button {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 13px;
}

.calculator-shell .button.secondary {
  border-color: var(--ink);
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.calculator-shell .button.secondary:hover {
  background: var(--ink);
  color: #fff;
}

.calculator-shell .copy-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--sage);
  text-align: center;
  font-size: 11px;
  font-weight: 900;
}

.calculator-guide {
  max-width: none !important;
  background: #f6e8d9;
  padding-left: max(24px, calc((100vw - 1240px) / 2)) !important;
  padding-right: max(24px, calc((100vw - 1240px) / 2)) !important;
}

.calculator-guide-grid {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: 60px;
  align-items: start;
}

.calculator-guide h2 {
  margin: 12px 0 0;
  font: 700 clamp(30px, 4vw, 52px) / 1.08 "Arial Black", "Segoe UI", Arial, sans-serif;
}

.calculator-guide ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.calculator-guide li + li {
  margin-top: 9px;
}

.calculator-related .cards {
  grid-template-columns: repeat(4, 1fr);
}

.calculator-related .card {
  min-height: 235px;
}

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

  .calculator-shell .result-panel {
    position: static;
  }

  .calculator-guide-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .calculator-related .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .calculator-page-hero {
    padding-bottom: 44px !important;
  }

  .calculator-page-hero .privacy-note {
    align-items: flex-start;
    border-radius: 18px;
  }

  .calculator-shell {
    padding: 28px 12px 60px !important;
  }

  .calculator-shell .form-panel {
    padding: 22px 16px;
    border-radius: 24px;
  }

  .calculator-shell .size-grid,
  .calculator-shell .quantity-grid,
  .calculator-shell .options-grid,
  .calculator-shell .per-embroidery-options-grid,
  .calculator-shell .workpiece-switch {
    grid-template-columns: 1fr;
  }

  .calculator-shell .dimension-head,
  .calculator-shell .embroidery-manager-head,
  .calculator-shell .per-embroidery-options-head {
    display: block;
  }

  .calculator-shell .dimension-head span,
  .calculator-shell .embroidery-manager-head span,
  .calculator-shell .per-embroidery-options-head span {
    display: block;
    margin-top: 4px;
    text-align: left;
  }

  .calculator-shell .embroidery-tabs {
    display: grid;
  }

  .calculator-shell .embroidery-tab {
    width: 100%;
  }

  .calculator-shell .embroidery-tab-main {
    flex: 1;
  }

  .calculator-shell .choice.custom {
    grid-column: auto;
  }

  .calculator-shell .choice.custom .choice-body {
    align-items: flex-start;
    flex-direction: column;
  }

  .calculator-shell .result-top {
    padding: 28px 24px;
  }

  .calculator-shell .result-body {
    padding: 24px 20px;
  }

  .calculator-related .cards {
    grid-template-columns: 1fr;
  }
}

@media print {
  .calculator-page-hero,
  .calculator-shell .form-panel,
  .calculator-guide,
  .calculator-related,
  .calculator-faq,
  header,
  footer,
  .mobile-cta,
  .copy-button {
    display: none !important;
  }

  .calculator-shell {
    display: block;
    padding: 20px !important;
  }

  .calculator-shell .result-panel {
    box-shadow: none;
  }
}

/* VERTICAL_RHYTHM_REPAIR_2026_09_22 */
@media(min-width:701px){
  .calculator-page-hero{padding-bottom:48px!important}
  .calculator-shell{padding-top:38px!important;padding-bottom:64px!important}
}
