#mortgage-app {
    margin: 40px auto;
    padding: 30px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  }

  #mortgage-app  .tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
  }

  #mortgage-app  .tab {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
  }

  #mortgage-app  .tab.active {
    background: #E30613;
    color: white;
    border-color: #E30613;
  }

  .calc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
  }

  .calc-item {
    flex: 1 1 30%;
    min-width: 250px;
  }

  #mortgage-app label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    font-size: 15px;
  }

  #mortgage-app  input[type="range"] {
    width: 100%;
    accent-color: #E30613;
    margin-bottom: 12px;
  }
  #mortgage-app input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #ccc;
  border-radius: 3px;
  outline: none;
}

#mortgage-app input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: #E30613;
  cursor: pointer;
  margin-top: -5px;
}

#mortgage-app input[type="range"]::-moz-range-thumb {
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: #E30613;
  cursor: pointer;
}
  #mortgage-app  .output {
    font-weight: 600;
    font-size: 16px;
  }

  #mortgage-app .calc-result {
    margin-top: 30px;
    padding: 20px;
    border-radius: 12px;
    background: #f9f9f9;
  }

  #mortgage-app  .calc-result p {
    font-size: 18px;
    margin: 8px 0;
  }

  @media (max-width: 768px) {
    #mortgage-app .calc-row {
      flex-direction: column;
    }
  }
#mortgage-app input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: transparent;
  position: relative;
  z-index: 1;
}

/* Трек с градиентом, стартует с minDown через переменную */
#mortgage-app input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    #E30613 var(--progress, 0%),
    #ccc var(--progress, 0%)
  );
}

/* Бегунок */
#mortgage-app input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: #E30613;
  margin-top: -5px;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

/* Firefox трек */
#mortgage-app input[type="range"]::-moz-range-track {
  height: 4px;
  background: #ccc;
  border-radius: 3px;
}

#mortgage-app input[type="range"]::-moz-range-progress {
  background: #E30613;
  height: 4px;
  border-radius: 3px;
}

#mortgage-app input[type="range"]::-moz-range-thumb {
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: #E30613;
  cursor: pointer;
}

#mortgage-app .mortgage-action {
  text-align: center;
  margin-top: 24px;
}

/* Стили самой кнопки */
#mortgage-app a {
  width: 50%;
  margin: auto;
}

#mortgage-app .mortgage-btn:hover {
  background-color: #C00410;
}

#mortgage-app .mortgage-btn:active {
  transform: scale(0.98);
}
