:root {
  color: #23201d;
  background: #f7f3eb;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #f7f3eb;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 30px;
}

.hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  color: #1f1b16;
  background: #f0c866;
  box-shadow: 0 18px 35px rgba(87, 57, 8, 0.16);
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 4px;
  color: #9b6d1d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1px;
  color: #191714;
  font-size: 44px;
  line-height: 1;
}

.subtitle {
  margin: 0;
  color: #5c554d;
  font-size: 17px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(183, 131, 39, 0.35);
  border-radius: 999px;
  color: #5e4214;
  background: #fff;
  font-weight: 750;
  white-space: nowrap;
}

.tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  margin-bottom: 22px;
  border: 1px solid rgba(76, 68, 57, 0.12);
  border-radius: 16px;
  background: #fff;
}

.tab {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  color: #514b43;
  background: transparent;
  font-weight: 800;
}

.tab.active {
  color: #191714;
  background: #f0c866;
}

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  gap: 22px;
  align-items: start;
}

.settings-layout {
  display: grid;
  gap: 22px;
}

.panel,
.summary-card {
  border: 1px solid rgba(69, 58, 44, 0.12);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 45px rgba(70, 55, 31, 0.1);
}

.panel {
  padding: 24px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-heading h2,
.breakdown h2 {
  margin-bottom: 0;
  color: #1f1b16;
  font-size: 22px;
}

.package-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.package-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  min-height: 86px;
  padding: 15px;
  border: 1px solid rgba(76, 68, 57, 0.14);
  border-radius: 14px;
  color: #2a251f;
  text-align: left;
  background: #fffdfa;
}

.package-card.selected {
  border-color: #b78327;
  background: #fff8e8;
  box-shadow: inset 0 0 0 2px rgba(183, 131, 39, 0.22);
}

.package-card strong {
  display: block;
  line-height: 1.2;
}

.package-card small {
  display: block;
  margin-top: 8px;
  color: #6b6259;
  font-size: 13px;
  line-height: 1.3;
}

.radio-dot {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 2px solid #c7bda8;
  border-radius: 50%;
  background: #fff;
}

.selected .radio-dot {
  border: 5px solid #b78327;
}

.form-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field,
.setting-field {
  display: grid;
  gap: 7px;
  color: #3a332d;
  font-weight: 800;
}

.field span,
.setting-field span {
  font-size: 14px;
}

.input-shell {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 54px;
  border: 1px solid rgba(76, 68, 57, 0.15);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.input-shell input,
.setting-field input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  border: 0;
  outline: 0;
  color: #201b16;
  background: transparent;
  font-size: 17px;
  font-weight: 750;
}

.input-shell input {
  padding: 0 14px;
}

.input-shell em {
  padding: 0 14px;
  color: #857a6d;
  font-style: normal;
  font-weight: 800;
}

.setting-field input {
  padding: 0 12px;
  border: 1px solid rgba(76, 68, 57, 0.15);
  border-radius: 12px;
  background: #fff;
}

.notice {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #3d352c;
  background: #f5efe2;
  font-weight: 750;
}

.option-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(76, 68, 57, 0.14);
  border-radius: 14px;
  background: #fffdfa;
  color: #2a251f;
}

.option-toggle input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #b78327;
}

.option-toggle strong,
.option-toggle small {
  display: block;
}

.option-toggle small {
  margin-top: 3px;
  color: #6b6259;
  font-size: 13px;
}

.option-toggle.disabled {
  opacity: 0.62;
}

.notice.error {
  color: #7a1717;
  background: #fff0ef;
}

.notice.success {
  color: #23532e;
  background: #edf8ee;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 0 17px;
  border-radius: 13px;
  font-weight: 900;
}

.primary-button {
  border: 1px solid #9e6b16;
  color: #17120b;
  background: #f0c866;
}

.secondary-button {
  border: 1px solid rgba(76, 68, 57, 0.18);
  color: #2f2922;
  background: #fffdfa;
}

.summary-card {
  position: sticky;
  top: 20px;
  padding: 26px;
}

.summary-card.empty {
  display: grid;
  place-items: center;
  min-height: 340px;
  color: #6e6255;
  text-align: center;
}

.total-price {
  margin: 4px 0;
  color: #17120b;
  font-size: 58px;
  font-weight: 950;
  line-height: 1;
}

.selected-package {
  margin-bottom: 22px;
  color: #5f564d;
  font-weight: 800;
}

.breakdown {
  padding: 18px;
  border-radius: 14px;
  background: #211c17;
  color: #fff7e8;
}

.breakdown h2 {
  margin-bottom: 12px;
  color: #fff7e8;
}

.breakdown-row,
.detail {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.detail {
  border-top-color: rgba(76, 68, 57, 0.12);
  color: #60584f;
}

.breakdown-row:first-of-type,
.detail:first-child {
  border-top: 0;
}

.breakdown-row span {
  color: #dfd4c0;
}

.breakdown-row.strong {
  margin-top: 4px;
  padding-top: 13px;
  color: #f1ca67;
  font-size: 18px;
}

.details-list {
  margin-top: 18px;
}

.detail strong {
  color: #211c17;
  text-align: right;
}

.package-settings-list {
  display: grid;
  gap: 16px;
}

.package-settings {
  padding: 18px;
  border: 1px solid rgba(76, 68, 57, 0.12);
  border-radius: 16px;
  background: #fffdfa;
}

.package-settings h3 {
  margin-bottom: 14px;
}

.sticky-actions {
  position: sticky;
  bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(76, 68, 57, 0.12);
  border-radius: 16px;
  background: #fff;
}

footer {
  margin-top: 22px;
  color: #6c6257;
  font-size: 15px;
}

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

  .summary-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 24px, 1220px);
    padding-top: 16px;
  }

  .hero {
    grid-template-columns: auto 1fr;
  }

  .hero-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  h1 {
    font-size: 32px;
  }

  .tabs,
  .tab,
  .package-grid,
  .form-grid,
  .settings-grid,
  .settings-grid.compact {
    width: 100%;
  }

  .tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .package-grid,
  .form-grid,
  .settings-grid,
  .settings-grid.compact {
    grid-template-columns: 1fr;
  }

  .panel,
  .summary-card {
    padding: 18px;
    border-radius: 16px;
  }

  .button-row {
    display: grid;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .total-price {
    font-size: 42px;
  }
}
