.jooto-estimate {
  --jt-bg: linear-gradient(155deg, #f5fbff 0%, #ffffff 45%, #fff8ed 100%);
  --jt-card: #ffffff;
  --jt-line: #cfe0ec;
  --jt-text: #1d2b39;
  --jt-sub: #5b6f82;
  --jt-primary: #4dabff;
  --jt-primary-dark: #2f92ea;
  --jt-accent: #ff8a3d;
  --jt-shadow: 0 14px 36px rgba(17, 43, 72, 0.12);
  font-family: "Avenir Next", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  color: var(--jt-text);
  background: var(--jt-bg);
  border: 1px solid var(--jt-line);
  border-radius: 18px;
  box-shadow: var(--jt-shadow);
  max-width: 900px;
  margin: 24px auto;
  padding: 28px;
  animation: jootoEstimateFade 0.5s ease-out;
}

.jooto-estimate__head {
  margin-bottom: 20px;
}

.jooto-estimate__eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: var(--jt-primary);
}

.jooto-estimate__title {
  margin: 8px 0 6px;
  font-size: clamp(24px, 3.3vw, 36px);
  letter-spacing: 0.01em;
}

.jooto-estimate__lead {
  margin: 0;
  color: var(--jt-sub);
  font-size: 14px;
}

.jooto-estimate__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.jooto-estimate__field {
  background: var(--jt-card);
  border: 1px solid #d8e7f2;
  border-radius: 12px;
  padding: 12px;
}

.jooto-estimate__label {
  display: block;
  margin-bottom: 8px;
  color: var(--jt-sub);
  font-weight: 700;
  font-size: 13px;
}

.jooto-estimate input,
.jooto-estimate select {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid #bfd5e4;
  background: #fff;
  color: #1b2e3f;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.jooto-estimate input:focus,
.jooto-estimate select:focus {
  outline: none;
  border-color: var(--jt-primary);
  box-shadow: 0 0 0 4px rgba(77, 171, 255, 0.22);
}

.jooto-estimate__result {
  margin: 20px 0;
  background: var(--jt-card);
  border: 1px solid #dce9f3;
  border-radius: 14px;
  padding: 0 14px 14px;
}

.jooto-estimate__result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--jt-sub);
  font-size: 13px;
  font-weight: 700;
  border-bottom: 2px solid #d5dfeb;
  padding: 12px 0;
}

.jooto-estimate__result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid #dce4ee;
  padding: 14px 0;
}

.jooto-estimate__result-row p {
  margin: 0;
  font-size: clamp(14px, 1.6vw, 18px);
}

.jooto-estimate__result-row strong {
  display: block;
  white-space: nowrap;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1;
}

.jooto-estimate__paybox {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.jooto-estimate__paybox p {
  margin: 0;
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 700;
}

.jooto-estimate__paybox strong {
  border: 4px solid #fb78ba;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
}

.jooto-estimate__button,
.jooto-estimate__submit {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  box-sizing: border-box;
  padding: 12px 20px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.jooto-estimate__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.jooto-estimate__button {
  color: #fff;
  background: linear-gradient(120deg, var(--jt-primary-dark), var(--jt-primary));
}

.jooto-estimate__button:hover {
  color: var(--jt-primary-dark);
  background: #fff;
  border-color: var(--jt-primary);
  transform: translateY(-1px);
}

.jooto-estimate__sample-link {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  color: var(--jt-primary-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.jooto-estimate__sample-link:hover {
  background: none;
  color: #000;
}

.jooto-estimate__submit {
  color: #fff;
  border-color: #fb78ba;
  background: #fb78ba;
  padding: 18px 32px;
  font-size: 17px;
}

.jooto-estimate__submit:hover {
  color: #fb78ba;
  background: #fff;
  border-color: #fb78ba;
  transform: translateY(-1px);
}

.jooto-estimate__button:active,
.jooto-estimate__submit:active {
  transform: translateY(1px);
}

.jooto-estimate__form {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  background: var(--jt-card);
  border: 1px solid #dce8f2;
  border-radius: 14px;
  padding: 16px;
}

.jooto-estimate__form[hidden] {
  display: none !important;
}

.jooto-estimate__form h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.jooto-estimate__form-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  align-items: start;
  gap: 8px;
}

.jooto-estimate__form-label {
  padding-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--jt-sub);
}

.jooto-estimate__field-control {
  display: grid;
  gap: 6px;
}

.jooto-estimate__required {
  color: #e53935;
  margin-left: 3px;
}

.jooto-estimate__agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--jt-sub);
}

.jooto-estimate__agree input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.jooto-estimate__message {
  min-height: 1.4em;
  margin-top: 8px;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 700;
  color: #c0392b;
  background: #fde8e8;
  border: 1px solid #f5b7b1;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.jooto-estimate__message.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.jooto-estimate input.is-invalid,
.jooto-estimate select.is-invalid {
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);
}

.jooto-estimate__input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.jooto-estimate__input-row input {
  flex: 1;
}

.jooto-estimate__suffix {
  white-space: nowrap;
  font-size: 14px;
  color: var(--jt-sub);
}

.jooto-estimate__note {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--jt-sub);
}

.jooto-estimate__field-control > .jooto-estimate__note {
  margin: 0;
}

.jooto-estimate__note--alert {
  color: #e53935;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-line;
}

.jooto-estimate__modal[hidden] {
  display: none !important;
}

.jooto-estimate__modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.jooto-estimate__modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 26, 36, 0.58);
  cursor: pointer;
}

.jooto-estimate__modal-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(11, 32, 52, 0.22);
  overflow: hidden;
}

.jooto-estimate__modal-header,
.jooto-estimate__modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #f7fbff;
}

.jooto-estimate__modal-eyebrow {
  margin: 0 0 4px;
  color: var(--jt-primary-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.jooto-estimate__modal-title {
  margin: 0;
  font-size: 20px;
}

.jooto-estimate__modal-close {
  appearance: none;
  border: 1px solid #cbdceb;
  background: #fff;
  color: var(--jt-text);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.jooto-estimate__modal-body {
  background: #f0f6fb;
  padding: 0;
}

.jooto-estimate__modal-frame {
  display: block;
  width: 100%;
  height: min(72vh, 920px);
  border: 0;
  background: #fff;
}

.jooto-estimate__sample-open-new {
  color: var(--jt-primary-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.jooto-estimate-modal-open {
  overflow: hidden;
}

@keyframes jootoEstimateFade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .jooto-estimate {
    margin: 16px auto;
    padding: 18px;
    border-radius: 14px;
  }

  .jooto-estimate__form-row {
    grid-template-columns: 1fr;
  }

  .jooto-estimate__form-label {
    padding-top: 0;
  }

  .jooto-estimate__result-row p {
    font-size: 14px;
  }

  .jooto-estimate__result-row strong {
    font-size: 22px;
  }

  .jooto-estimate__paybox {
    display: grid;
    gap: 8px;
  }

  .jooto-estimate__paybox p {
    font-size: 22px;
  }

  .jooto-estimate__paybox strong {
    width: fit-content;
    font-size: 34px;
  }

  .jooto-estimate__modal {
    padding: 12px;
  }

  .jooto-estimate__modal-header,
  .jooto-estimate__modal-footer {
    padding: 14px 16px;
  }

  .jooto-estimate__modal-dialog {
    max-height: calc(100vh - 24px);
  }

  .jooto-estimate__modal-frame {
    height: 68vh;
  }
}

.jooto-estimate__result-row.is-hidden { display: none; }

.jooto-estimate .jooto-estimate__button,
.jooto-estimate .jooto-estimate__submit {
  appearance: none !important;
  border-style: solid !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: inherit !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  max-width: 100% !important;
  text-decoration: none !important;
  text-align: center !important;
  vertical-align: middle !important;
  width: auto !important;
}

.jooto-estimate .jooto-estimate__actions {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 14px !important;
  justify-content: flex-start !important;
}

.jooto-estimate .jooto-estimate__button {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(120deg, var(--jt-primary-dark), var(--jt-primary)) !important;
  min-height: 45px !important;
  padding: 12px 20px !important;
}

.jooto-estimate .jooto-estimate__button:hover,
.jooto-estimate .jooto-estimate__button:focus-visible {
  color: var(--jt-primary-dark) !important;
  border-color: var(--jt-primary) !important;
  background: #fff !important;
  transform: translateY(-1px) !important;
}

.jooto-estimate .jooto-estimate__submit {
  color: #fff !important;
  border-color: #fb78ba !important;
  background: #fb78ba !important;
  justify-self: stretch !important;
  min-height: 61px !important;
  min-width: 160px !important;
  padding: 18px 32px !important;
  width: 100% !important;
}

.jooto-estimate .jooto-estimate__submit:hover,
.jooto-estimate .jooto-estimate__submit:focus-visible {
  color: #fb78ba !important;
  border-color: #fb78ba !important;
  background: #fff !important;
  transform: translateY(-1px) !important;
}

.jooto-estimate .jooto-estimate__button:disabled,
.jooto-estimate .jooto-estimate__submit:disabled {
  cursor: not-allowed !important;
  opacity: 0.65 !important;
  transform: none !important;
}

.jooto-estimate .jooto-estimate__sample-link,
.jooto-estimate .jooto-estimate__sample-open-new {
  appearance: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: none !important;
  color: var(--jt-primary-dark) !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  text-transform: none !important;
}

.jooto-estimate .jooto-estimate__sample-link[hidden],
.jooto-estimate__sample-link[hidden] {
  display: none !important;
}

.jooto-estimate .jooto-estimate__sample-link:hover,
.jooto-estimate .jooto-estimate__sample-link:focus-visible {
  background: none !important;
  color: #000 !important;
}

.jooto-estimate [data-license-limit-note].jooto-estimate__note--alert {
  color: #e53935 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
  white-space: pre-line !important;
}

.jooto-estimate .jooto-estimate__message {
  color: #c0392b !important;
  background: #fde8e8 !important;
  border-color: #f5b7b1 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

.jooto-estimate .jooto-estimate__note {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.jooto-estimate input,
.jooto-estimate select {
  box-sizing: border-box !important;
  font-family: inherit !important;
}

.jooto-estimate input:not([type="checkbox"]),
.jooto-estimate select {
  margin: 0 !important;
}

.jooto-estimate .jooto-estimate__field-control {
  display: grid !important;
  gap: 6px !important;
}

.jooto-estimate .jooto-estimate__field-control > .jooto-estimate__note {
  margin: 0 !important;
}

.jooto-estimate .jooto-estimate__field-control > input,
.jooto-estimate .jooto-estimate__field-control > select,
.jooto-estimate .jooto-estimate__field-control > .jooto-estimate__input-row {
  margin: 0 !important;
}

.jooto-estimate .jooto-estimate__agree input[type="checkbox"] {
  flex: 0 0 auto !important;
  margin: 1px 0 0 !important;
}

.jooto-estimate input.is-invalid,
.jooto-estimate select.is-invalid {
  border-color: #e53935 !important;
}

.jooto-estimate .jooto-estimate__modal-dialog,
.jooto-estimate .jooto-estimate__modal-header,
.jooto-estimate .jooto-estimate__modal-footer,
.jooto-estimate .jooto-estimate__modal-body {
  box-sizing: border-box !important;
}

.jooto-estimate .jooto-estimate__modal-title,
.jooto-estimate .jooto-estimate__modal-eyebrow,
.jooto-estimate .jooto-estimate__modal-close {
  font-family: inherit !important;
}

.jooto-estimate__modal:not([hidden]) {
  --jt-primary: #4dabff;
  --jt-primary-dark: #2f92ea;
  --jt-text: #1d2b39;
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: grid !important;
  place-items: center !important;
  width: 100vw !important;
  height: 100vh !important;
  padding: 24px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.jooto-estimate__modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: rgba(15, 26, 36, 0.58) !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.jooto-estimate__modal-dialog {
  position: relative !important;
  z-index: 1 !important;
  width: min(960px, 100%) !important;
  max-height: calc(100vh - 48px) !important;
  display: grid !important;
  grid-template-rows: auto 1fr auto !important;
  border: 0 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 18px 52px rgba(11, 32, 52, 0.22) !important;
  overflow: hidden !important;
}

.jooto-estimate__modal-header,
.jooto-estimate__modal-footer {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 16px 20px !important;
  background: #f7fbff !important;
}

.jooto-estimate__modal-body {
  box-sizing: border-box !important;
  min-height: 0 !important;
  padding: 0 !important;
  background: #f0f6fb !important;
}

.jooto-estimate__modal-frame {
  display: block !important;
  width: 100% !important;
  height: min(72vh, 920px) !important;
  border: 0 !important;
  background: #fff !important;
}

.jooto-estimate__modal-eyebrow {
  margin: 0 0 4px !important;
  color: var(--jt-primary-dark, #2f92ea) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
}

.jooto-estimate__modal-title {
  margin: 0 !important;
  color: var(--jt-text, #1d2b39) !important;
  font-family: inherit !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
}

.jooto-estimate__modal-close {
  appearance: none !important;
  border: 1px solid #cbdceb !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  background: #fff !important;
  color: var(--jt-text, #1d2b39) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  min-height: 40px !important;
  padding: 10px 14px !important;
  text-decoration: none !important;
  width: auto !important;
}

.jooto-estimate__modal-close:hover,
.jooto-estimate__modal-close:focus-visible {
  border-color: var(--jt-primary, #4dabff) !important;
  color: var(--jt-primary-dark, #2f92ea) !important;
  background: #fff !important;
}

.jooto-estimate__sample-link {
  appearance: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: none !important;
  color: var(--jt-primary-dark) !important;
  display: inline !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  text-decoration: underline !important;
  text-transform: none !important;
  text-underline-offset: 3px !important;
}

.jooto-estimate__sample-link:hover,
.jooto-estimate__sample-link:focus-visible {
  background: none !important;
  color: #000 !important;
}

.jooto-estimate__sample-open-new {
  appearance: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: none !important;
  color: var(--jt-primary-dark, #2f92ea) !important;
  display: inline !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  text-decoration: underline !important;
  text-transform: none !important;
  text-underline-offset: 3px !important;
}

.jooto-estimate__sample-open-new:hover,
.jooto-estimate__sample-open-new:focus-visible {
  background: none !important;
  color: #000 !important;
}

body.jooto-estimate-modal-open {
  overflow: hidden !important;
}

@media (max-width: 640px) {
  .jooto-estimate__modal:not([hidden]) {
    padding: 12px !important;
  }

  .jooto-estimate__modal-dialog {
    max-height: calc(100vh - 24px) !important;
  }

  .jooto-estimate__modal-header,
  .jooto-estimate__modal-footer {
    padding: 14px 16px !important;
  }

  .jooto-estimate__modal-frame {
    height: 68vh !important;
  }
}
