.ccmg-mortgage-form-section {
  padding: 102px 0 106px;
  background: #eaf8ff;
}
.ccmg-mortgage-card {
  max-width: 1428px;
  min-height: 864px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
}
.ccmg-mortgage-head {
  padding: 52px 82px 45px;
  text-align: center;
}
.ccmg-mortgage-head h2 {
  margin: 0 0 42px;
  color: #17445f;
  font-size: 62px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: 0;
}
.ccmg-progress {
  position: relative;
  max-width: 1280px;
  height: 56px;
  margin: 0 auto;
}
.ccmg-progress-track {
  position: absolute;
  top: 17px;
  left: 0;
  right: 0;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef3ee;
}
.ccmg-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--mf-progress);
  transition: width .35s ease;
}
.ccmg-progress strong {
  position: absolute;
  top: 33px;
  left: 0;
  min-width: 70px;
  padding: 7px 16px 8px;
  color: #fff;
  border-radius: 22px;
  background: #17445f;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  transform: translateX(-50%);
  transition: left .35s ease;
}
.ccmg-progress strong::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -17px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mf-progress);
  transform: translateX(-50%);
}
.ccmg-progress strong.is-start::before {
  left: 0;
  transform: none;
}
.ccmg-progress strong.is-end::before {
  left: 100%;
  transform: translateX(-100%);
}
.ccmg-mortgage-body {
  position: relative;
  flex: 1;
  padding: 41px 50px 20px;
  border-top: 1px dashed #d7dfe5;
}
.ccmg-form-step {
  display: none;
  opacity: 0;
  transform: translateY(12px);
}
.ccmg-form-step.is-active {
  display: block;
  animation: ccmgStepIn .28s ease forwards;
}
@keyframes ccmgStepIn {
  to { opacity: 1; transform: translateY(0); }
}
.ccmg-form-step h3 {
  margin: 0 0 36px;
  max-width: 100%;
  color: #14243b;
  text-align: center;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: break-word;
}
.ccmg-purchase-assistant-form .ccmg-form-step h3 {
  max-width: 100%;
  font-size: clamp(20px, 1.55vw, 32px);
  white-space: normal;
  overflow-wrap: break-word;
}
.ccmg-option-grid {
  max-width: 650px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
  justify-content: center;
}
.ccmg-option-grid-2 {
  grid-template-columns: repeat(2, minmax(220px, 272px));
}
.ccmg-option-grid-3 {
  max-width: 760px;
  grid-template-columns: repeat(3, minmax(180px, 224px));
}
.ccmg-option-grid-4 {
  max-width: 1016px;
  grid-template-columns: repeat(4, minmax(180px, 224px));
}
.ccmg-option-grid-5 {
  max-width: 850px;
  grid-template-columns: repeat(3, minmax(180px, 224px));
}
.ccmg-option-grid-6 {
  max-width: 850px;
  grid-template-columns: repeat(3, minmax(180px, 224px));
}
.ccmg-option-grid-7 {
  max-width: 1016px;
  grid-template-columns: repeat(4, minmax(180px, 224px));
}
.ccmg-option-grid-8 {
  max-width: 1016px;
  grid-template-columns: repeat(4, minmax(180px, 224px));
}
.ccmg-option-card {
  box-sizing: border-box;
  min-width: 0;
  min-height: 207px;
  padding: 26px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  cursor: pointer;
  border-radius: 24px;
  background: #f7f7f7;
  color: #13243b;
  overflow: hidden;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.ccmg-option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ccmg-option-card:hover {
  transform: translateY(-2px);
}
.ccmg-option-card.is-selected {
  color: #fff;
  background: var(--mf-button);
}
.ccmg-option-icon {
  width: 104px;
  height: 104px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #17445f;
  background: #fff;
  font-size: 38px;
}
.ccmg-option-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.ccmg-option-label {
  display: block;
  width: 100%;
  max-width: 100%;
  text-align: center;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 500;
  white-space: normal;
  overflow: hidden;
  overflow-wrap: break-word;
}
.ccmg-purchase-assistant-form .ccmg-option-label {
  white-space: normal;
  overflow-wrap: break-word;
}
.ccmg-option-grid-4 .ccmg-option-label,
.ccmg-option-grid-5 .ccmg-option-label,
.ccmg-option-grid-6 .ccmg-option-label,
.ccmg-option-grid-7 .ccmg-option-label,
.ccmg-option-grid-8 .ccmg-option-label {
  font-size: 20px;
}
.ccmg-mortgage-form .ccmg-option-grid-5 .ccmg-option-label,
.ccmg-mortgage-form .ccmg-option-grid-6 .ccmg-option-label,
.ccmg-mortgage-form .ccmg-option-grid-7 .ccmg-option-label,
.ccmg-mortgage-form .ccmg-option-grid-8 .ccmg-option-label {
  font-size: 16px;
}
.ccmg-details-grid {
  max-width: 1330px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 32px;
}
.ccmg-details-grid label {
  color: #464646;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
}
.ccmg-details-grid input,
.ccmg-details-grid select {
  width: 100%;
  height: 58px;
  margin-top: 10px;
  padding: 0 22px;
  border: 1px solid #ddd;
  border-radius: 30px;
  background: #f7f7f7;
  color: #14243b;
  font-size: 18px;
  outline: none;
}
.ccmg-details-grid select {
  appearance: none;
  padding-right: 48px;
  background-image: linear-gradient(45deg, transparent 50%, #17445f 50%), linear-gradient(135deg, #17445f 50%, transparent 50%);
  background-position: calc(100% - 24px) 26px, calc(100% - 17px) 26px;
  background-repeat: no-repeat;
  background-size: 7px 7px;
}
.ccmg-details-grid input:focus,
.ccmg-details-grid select:focus {
  border-color: var(--mf-button);
  background: #fff;
}
.ccmg-details-grid select:focus {
  background-image: linear-gradient(45deg, transparent 50%, #17445f 50%), linear-gradient(135deg, #17445f 50%, transparent 50%);
  background-position: calc(100% - 24px) 26px, calc(100% - 17px) 26px;
  background-repeat: no-repeat;
  background-size: 7px 7px;
}
.ccmg-security-note {
  width: fit-content;
  max-width: 100%;
  margin: 39px auto 0;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  background: #e7ecef;
  color: #13243b;
  font-size: 17px;
  line-height: 1.25;
}
.ccmg-security-note i {
  font-size: 20px;
}
.ccmg-form-message {
  min-height: 26px;
  margin-top: 22px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}
.ccmg-form-message.is-error { color: #b42318; }
.ccmg-form-message.is-success { color: #247447; }
.ccmg-form-message.is-info { color: #17445f; }
.ccmg-mortgage-actions {
  min-height: 132px;
  padding: 0 50px 50px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.ccmg-next-btn,
.ccmg-submit-btn,
.ccmg-prev-btn {
  min-width: 168px;
  height: 62px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 32px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ccmg-next-btn,
.ccmg-submit-btn {
  margin-left: auto;
  border: 0;
  color: #FFFFFF;
  background: var(--mf-button);
}
.ccmg-prev-btn {
  border: 2px solid var(--mf-button);
  color: var(--mf-button);
  background: #fff;
}
.ccmg-submit-btn:disabled {
  opacity: .75;
  cursor: wait;
}
.ccmg-hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.ccmg-purchase-assistant-card {
  min-height: 640px;
}
.ccmg-purchase-assistant-card .ccmg-mortgage-head {
  padding-bottom: 36px;
}
.ccmg-purchase-assistant-intro {
  max-width: 820px;
  margin: -18px auto 0;
  color: #59646d;
  font-size: 20px;
  line-height: 1.55;
}
.ccmg-purchase-assistant-embed {
  flex: 1;
  padding: 42px 50px 58px;
  border-top: 1px dashed #d7dfe5;
}
.ccmg-purchase-assistant-embed .built-form {
  width: 100%;
  max-width: 980px;
  min-height: 420px;
  margin: 0 auto;
}
.ccmg-purchase-assistant-embed iframe {
  width: 100%;
  max-width: 100%;
  border: 0;
}
.ccmg-home-search-card {
  min-height: 700px;
}
.ccmg-home-values-card {
  min-height: 680px;
}
.ccmg-home-search-form .ccmg-option-grid-4 {
  max-width: 1016px;
}
.ccmg-single-field-grid {
  max-width: 560px;
  grid-template-columns: 1fr;
}
@media (max-width: 1440px) {
  .ccmg-mortgage-card { max-width: 1120px; }
  .ccmg-mortgage-head h2 { font-size: 54px; }
}
@media (max-width: 1024px) {
  .ccmg-mortgage-form-section { padding: 72px 0; }
  .ccmg-mortgage-card { min-height: 760px; }
  .ccmg-mortgage-head { padding: 42px 42px 35px; }
  .ccmg-mortgage-head h2 { font-size: 46px; }
  .ccmg-option-grid-3 { grid-template-columns: repeat(3, minmax(150px, 224px)); }
  .ccmg-option-grid-4,
  .ccmg-option-grid-5,
  .ccmg-option-grid-6,
  .ccmg-option-grid-7,
  .ccmg-option-grid-8 { grid-template-columns: repeat(2, minmax(180px, 224px)); }
}
@media (max-width: 768px) {
  .ccmg-mortgage-card { border-radius: 18px; min-height: auto; }
  .ccmg-mortgage-head { padding: 34px 24px 28px; }
  .ccmg-mortgage-head h2 {
    font-size: 38px;
    margin-bottom: 32px;
    overflow-wrap: anywhere;
  }
  .ccmg-mortgage-body { padding: 34px 24px 20px; }
  .ccmg-purchase-assistant-embed { padding: 34px 24px 42px; }
  .ccmg-form-step h3 { font-size: 27px; }
  .ccmg-purchase-assistant-form .ccmg-form-step h3 {
    max-width: 100%;
    font-size: clamp(18px, 2.7vw, 24px);
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .ccmg-option-grid { max-width: 100%; }
  .ccmg-option-grid-2 {
    max-width: 520px;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
  .ccmg-option-grid-3 {
    max-width: 660px;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }
  .ccmg-option-grid-4,
  .ccmg-option-grid-5,
  .ccmg-option-grid-6,
  .ccmg-option-grid-7,
  .ccmg-option-grid-8 {
    max-width: 488px;
    grid-template-columns: repeat(2, minmax(180px, 224px));
  }
  .ccmg-mortgage-form .ccmg-option-label {
    font-size: 15px;
  }
  .ccmg-option-card { min-height: 178px; }
  .ccmg-details-grid { grid-template-columns: 1fr; gap: 20px; }
  .ccmg-mortgage-actions { padding: 0 24px 34px; min-height: 108px; }
}
@media (max-width: 575px) {
  .ccmg-mortgage-form-section .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .ccmg-mortgage-card {
    width: 100%;
    max-width: 100%;
  }
  .ccmg-mortgage-head {
    padding: 30px 16px 26px;
  }
  .ccmg-mortgage-head h2 {
    font-size: 26px;
    line-height: 1.1;
  }
  .ccmg-mortgage-body {
    padding: 28px 16px 18px;
  }
  .ccmg-purchase-assistant-intro {
    margin-top: -16px;
    font-size: 16px;
  }
  .ccmg-purchase-assistant-embed {
    padding: 28px 16px 36px;
  }
  .ccmg-form-step h3 {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    font-size: 21px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .ccmg-purchase-assistant-form .ccmg-form-step h3 {
    max-width: 100%;
    font-size: clamp(19px, 4.9vw, 21px);
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .ccmg-option-grid,
  .ccmg-option-grid-2,
  .ccmg-option-grid-3,
  .ccmg-option-grid-4,
  .ccmg-option-grid-5,
  .ccmg-option-grid-6,
  .ccmg-option-grid-7,
  .ccmg-option-grid-8 {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .ccmg-option-card {
    width: 100%;
    min-width: 0;
    min-height: 156px;
    padding: 18px 16px;
    gap: 12px;
  }
  .ccmg-mortgage-form .ccmg-option-label {
    font-size: clamp(13px, 3.1vw, 16px);
  }
  .ccmg-mortgage-actions {
    min-height: 86px;
    padding: 0 16px 28px;
    gap: 10px;
  }
  .ccmg-prev-btn,
  .ccmg-next-btn,
  .ccmg-submit-btn {
    min-width: 0;
    height: 48px;
    padding: 0 18px;
    gap: 8px;
    font-size: 16px;
    letter-spacing: .04em;
  }
}
@media (max-width: 425px) {
  .ccmg-mortgage-form-section { padding: 48px 0; }
  .ccmg-mortgage-form-section .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .ccmg-mortgage-card {
    width: 100%;
    max-width: 100%;
  }
  .ccmg-mortgage-head {
    padding: 30px 16px 26px;
  }
  .ccmg-mortgage-head h2 {
    font-size: clamp(28px, 7.6vw, 32px);
    line-height: 1.1;
  }
  .ccmg-mortgage-body {
    padding: 28px 16px 18px;
  }
  .ccmg-progress strong { min-width: 58px; font-size: 16px; }
  .ccmg-form-step h3 { font-size: 23px; }
  .ccmg-option-grid,
  .ccmg-option-grid-2,
  .ccmg-option-grid-3,
  .ccmg-option-grid-4,
  .ccmg-option-grid-5,
  .ccmg-option-grid-6,
  .ccmg-option-grid-7,
  .ccmg-option-grid-8 {
    max-width: 100%;
  }
  .ccmg-option-card {
    width: 100%;
    min-width: 0;
  }
  .ccmg-option-card {
    min-height: 146px;
    padding: 16px 14px;
    gap: 10px;
    border-radius: 18px;
  }
  .ccmg-option-icon { width: 70px; height: 70px; font-size: 28px; }
  .ccmg-option-icon img { width: 40px; height: 40px; }
  .ccmg-option-label { font-size: 19px; line-height: 1.2; }
  .ccmg-mortgage-form .ccmg-option-label {
    font-size: clamp(12px, 2.9vw, 14px);
  }
  .ccmg-security-note { font-size: 14px; }
  .ccmg-mortgage-actions {
    min-height: 82px;
    padding: 0 16px 28px;
    gap: 10px;
    flex-wrap: nowrap;
  }
  .ccmg-prev-btn,
  .ccmg-next-btn,
  .ccmg-submit-btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 46px;
    padding: 0 12px;
    font-size: 14px;
    letter-spacing: .03em;
  }
  .ccmg-next-btn,
  .ccmg-submit-btn {
    margin-left: 0;
  }
}
