/*
 * ユーザー指定の前版CVR・ヘッダー・追従・スクロールポップ専用スタイル
 * 原本の style.css と追加セクション用 sao-additions.css は変更しません。
 */

:root {
  --sao-line-green: #06c755;
  --sao-line-green-dark: #05a947;
  --sao-phone-blue: #0877b8;
  --sao-phone-blue-dark: #075989;
}

/* Header */
.site-header {
  z-index: 400;
}

.header-inner {
  min-height: 80px;
}

.header-actions {
  gap: 9px;
}

.brand-name img {
  width: 222px;
  height: auto;
}

.sao-header-cta {
  display: flex;
  min-width: 160px;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 7px 16px;
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--white);
  box-shadow: 0 8px 20px rgba(15, 67, 88, 0.16);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.sao-header-cta small {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.92;
}

.sao-header-cta svg {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
}

.sao-header-cta__icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: var(--sao-line-green);
  background: var(--white);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.sao-header-cta--line {
  border-color: rgba(0, 128, 53, 0.12);
  background: linear-gradient(135deg, #08cf5a, var(--sao-line-green-dark));
}

.sao-header-cta--form {
  border-color: rgba(193, 83, 0, 0.12);
  background: linear-gradient(135deg, #ffad1e, #f27600);
}

.sao-header-cta--phone {
  border-color: rgba(5, 74, 117, 0.15);
  background: linear-gradient(135deg, var(--sao-phone-blue), var(--sao-phone-blue-dark));
}

.sao-header-cta:hover,
.sao-header-cta:focus-visible {
  box-shadow: 0 12px 26px rgba(15, 67, 88, 0.22);
  filter: saturate(1.06);
  transform: translateY(-2px);
}

.sao-header-cta:focus-visible,
.sao-cvr-button:focus-visible,
.sao-cvr-phone a:focus-visible,
.floating-cta__button:focus-visible {
  outline: 3px solid #fff36b;
  outline-offset: 3px;
}

/* Hero / final CVR */
.quick-check-copy strong {
  font-size: clamp(35px, 5vw, 55px);
}

.check-form--linkout {
  display: grid;
  gap: 12px;
}

.form-direct-copy {
  text-align: center;
}

.form-direct-copy strong {
  display: block;
  margin-bottom: 5px;
  color: var(--navy-900);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 900;
  line-height: 1.4;
}

.form-direct-copy p {
  margin: 0;
  color: #5d6f78;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.7;
}

.sao-addon-section-cta__note {
  margin: -6px 0 16px;
  color: var(--navy-900);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.form-privacy {
  margin: 0;
  color: #6f7c84;
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.form-privacy a {
  color: var(--blue-800);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sao-cvr-actions {
  display: grid;
  gap: 12px;
}

.sao-cvr-actions--contact {
  scroll-margin-top: 120px;
}

.sao-cvr-button {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 11px 18px;
  border-radius: 14px;
  color: var(--white);
  box-shadow: 0 10px 22px rgba(9, 71, 96, 0.17);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.sao-cvr-button svg {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
}

.sao-cvr-button strong {
  display: grid;
  width: 48px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--sao-line-green-dark);
  background: var(--white);
  font-size: 10px;
}

.sao-cvr-button small {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  opacity: 0.92;
}

.sao-cvr-button--form {
  background: linear-gradient(135deg, #ffab1b, #f27600);
}

.sao-cvr-button--line {
  background: linear-gradient(135deg, #08cf5a, var(--sao-line-green-dark));
}

.sao-cvr-button:hover,
.sao-cvr-button:focus-visible {
  box-shadow: 0 15px 28px rgba(9, 71, 96, 0.23);
  filter: saturate(1.07);
  transform: translateY(-2px);
}

.sao-cvr-phone {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--sao-phone-blue), var(--sao-phone-blue-dark));
  box-shadow: 0 10px 22px rgba(9, 71, 96, 0.17);
}

.sao-cvr-phone__heading {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 16px 7px;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
}

.sao-cvr-phone__heading svg {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
}

.sao-cvr-phone__heading small {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.sao-cvr-phone__numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.32);
}

.sao-cvr-phone__numbers a {
  display: grid;
  min-width: 0;
  min-height: 52px;
  align-content: center;
  padding: 8px 7px;
  color: var(--white);
  background: rgba(4, 77, 118, 0.96);
  text-align: center;
  transition: background 0.18s ease;
}

.sao-cvr-phone__numbers a:hover,
.sao-cvr-phone__numbers a:focus-visible {
  background: rgba(3, 59, 93, 1);
}

.sao-cvr-phone__numbers small,
.sao-cvr-phone__numbers strong {
  display: block;
}

.sao-cvr-phone__numbers small {
  margin-bottom: 2px;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.25;
}

.sao-cvr-phone__numbers strong {
  font-size: clamp(13px, 1.35vw, 16px);
  font-weight: 950;
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
}

/* Floating CTA */
.floating-cta {
  position: fixed;
  z-index: 700;
  left: 50%;
  bottom: 15px;
  display: grid;
  width: min(1120px, calc(100% - 30px));
  grid-template-columns: minmax(205px, 1fr) 190px 210px 190px;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  opacity: 0;
  color: var(--white);
  background: rgba(17, 57, 79, 0.97);
  box-shadow: 0 18px 48px rgba(4, 43, 62, 0.36);
  pointer-events: none;
  transform: translate(-50%, 135%);
  transition: opacity 0.25s ease, transform 0.3s ease;
  backdrop-filter: blur(12px);
}

.floating-cta.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.floating-cta__copy {
  padding-inline: 13px;
}

.floating-cta__copy strong,
.floating-cta__copy span {
  display: block;
}

.floating-cta__copy strong {
  font-size: 17px;
  font-weight: 900;
}

.floating-cta__copy span {
  color: #bcecf5;
  font-size: 10px;
  font-weight: 700;
}

.floating-cta__button {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 13px;
  border-radius: 12px;
  color: var(--white);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.floating-cta__button:hover,
.floating-cta__button:focus-visible {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.floating-cta__button small {
  display: block;
  margin-bottom: 2px;
  font-size: 9px;
  font-weight: 700;
}

.floating-cta__button strong {
  display: grid;
  width: 39px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  color: var(--sao-line-green-dark);
  background: var(--white);
  font-size: 9px;
}

.floating-cta__button svg {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
}

.floating-cta__button--line {
  background: linear-gradient(135deg, #08cf5a, var(--sao-line-green-dark));
}

.floating-cta__button--form {
  background: linear-gradient(135deg, #ffab1b, #f27600);
}

.floating-cta__button--phone {
  background: linear-gradient(135deg, var(--sao-phone-blue), var(--sao-phone-blue-dark));
}

/* Scroll popup */
body.is-popup-open {
  overflow: hidden;
}

body.is-popup-open .floating-cta {
  opacity: 0;
  pointer-events: none;
}

.scroll-consult-popup {
  position: fixed;
  z-index: 900;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.scroll-consult-popup.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.scroll-consult-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 34, 49, 0.7);
  backdrop-filter: blur(5px);
}

.scroll-consult-popup__dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: clamp(30px, 5vw, 46px);
  border: 1px solid rgba(73, 188, 214, 0.28);
  border-radius: 26px;
  outline: none;
  background:
    radial-gradient(circle at 100% 0, rgba(45, 190, 220, 0.13) 0 150px, transparent 152px),
    var(--white);
  box-shadow: 0 28px 80px rgba(2, 32, 48, 0.38);
  text-align: center;
  transform: translateY(24px) scale(0.96);
  transition: transform 0.28s ease;
}

.scroll-consult-popup.is-visible .scroll-consult-popup__dialog {
  transform: translateY(0) scale(1);
}

.scroll-consult-popup__dialog::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--sao-line-green), #0aa6ca, #ff9a13);
  content: "";
}

.scroll-consult-popup__close {
  position: absolute;
  z-index: 2;
  top: 13px;
  right: 13px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #d7e4e8;
  border-radius: 50%;
  color: #43606d;
  background: rgba(255, 255, 255, 0.94);
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.scroll-consult-popup__close:hover,
.scroll-consult-popup__close:focus-visible {
  color: var(--white);
  background: var(--navy-900);
  outline: 3px solid #fff36b;
  outline-offset: 2px;
  transform: rotate(4deg);
}

.scroll-consult-popup__badge {
  display: inline-flex;
  margin: 0 0 13px;
  padding: 6px 17px;
  border-radius: 999px;
  color: #b55300;
  background: #fff0ce;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.05em;
}

.scroll-consult-popup h2 {
  margin: 0 0 12px;
  color: var(--navy-900);
  font-size: clamp(27px, 4.3vw, 40px);
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 1.35;
}

.scroll-consult-popup__dialog>p:not(.scroll-consult-popup__badge, .scroll-consult-popup__note) {
  max-width: 500px;
  margin: 0 auto;
  color: #5b6e77;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.75;
}

.scroll-consult-popup__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 23px;
}

.scroll-consult-popup__button {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 13px;
  color: var(--white);
  box-shadow: 0 9px 19px rgba(8, 70, 94, 0.17);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.scroll-consult-popup__button:hover,
.scroll-consult-popup__button:focus-visible {
  outline: 3px solid #fff36b;
  outline-offset: 2px;
  filter: brightness(1.05);
  transform: translateY(-2px);
}

.scroll-consult-popup__button small {
  display: block;
  margin-bottom: 2px;
  font-size: 9px;
  font-weight: 750;
}

.scroll-consult-popup__button svg {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.scroll-consult-popup__button strong {
  display: grid;
  width: 42px;
  min-height: 29px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  color: var(--sao-line-green-dark);
  background: var(--white);
  font-size: 9px;
}

.scroll-consult-popup__button--line {
  background: linear-gradient(135deg, #08cf5a, var(--sao-line-green-dark));
}

.scroll-consult-popup__button--mail {
  background: linear-gradient(135deg, #ffab1b, #f27600);
}

.scroll-consult-popup__phone {
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid #c6e3ee;
  border-radius: 13px;
  background: #eaf7fc;
}

.scroll-consult-popup__phone-heading {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--sao-phone-blue-dark);
  font-size: 14px;
  font-weight: 950;
}

.scroll-consult-popup__phone-heading svg {
  width: 21px;
  height: 21px;
}

.scroll-consult-popup__phone-heading small {
  display: block;
  margin-top: 1px;
  font-size: 8px;
  font-weight: 750;
}

.scroll-consult-popup__phone-numbers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: #c6e3ee;
}

.scroll-consult-popup__phone-numbers a {
  display: grid;
  min-width: 0;
  min-height: 54px;
  align-content: center;
  padding: 7px;
  color: var(--sao-phone-blue-dark);
  background: var(--white);
  transition: color 0.18s ease, background 0.18s ease;
}

.scroll-consult-popup__phone-numbers a:hover,
.scroll-consult-popup__phone-numbers a:focus-visible {
  color: var(--white);
  background: var(--sao-phone-blue-dark);
  outline: 3px solid #fff36b;
  outline-offset: -3px;
}

.scroll-consult-popup__phone-numbers small,
.scroll-consult-popup__phone-numbers strong {
  display: block;
}

.scroll-consult-popup__phone-numbers small {
  margin-bottom: 2px;
  font-size: 9px;
  font-weight: 750;
}

.scroll-consult-popup__phone-numbers strong {
  font-size: clamp(15px, 2.3vw, 18px);
  font-weight: 950;
  line-height: 1.2;
  white-space: nowrap;
}

.scroll-consult-popup__note {
  margin: 13px 0 0;
  color: #75848b;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.6;
}

@media (max-width: 1080px) {
  .sao-header-cta {
    min-width: 134px;
  }

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

  .floating-cta__copy {
    display: none;
  }
}

@media (max-width: 900px) {
  .sao-header-cta {
    min-width: 116px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .sao-header-cta__icon {
    width: 31px;
    height: 31px;
  }

  .sao-header-cta svg {
    width: 25px;
    height: 25px;
  }

  .sao-cvr-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sao-cvr-phone {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 72px;
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    min-height: 64px;
    flex-wrap: nowrap;
    gap: 6px;
    padding-block: 8px;
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .brand-name img {
    width: min(150px, 74vw);
  }

  .header-actions {
    display: none;
  }

  .sao-header-cta {
    min-width: 0;
    min-height: 42px;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 9px;
    font-size: 10px;
    white-space: nowrap;
  }

  .sao-header-cta small {
    display: none;
  }

  .sao-header-cta__icon {
    width: 25px;
    height: 25px;
    border-radius: 6px;
    font-size: 7px;
  }

  .sao-header-cta svg {
    width: 22px;
    height: 22px;
  }

  .sao-cvr-actions {
    grid-template-columns: 1fr;
  }

  .sao-cvr-phone {
    grid-column: auto;
  }

  .sao-cvr-button {
    min-height: 62px;
    font-size: 15px;
  }

  .floating-cta {
    bottom: 0;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    padding: 5px 5px calc(5px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    background: rgba(16, 55, 76, 0.98);
    transform: translate(-50%, 120%);
  }

  .floating-cta.is-visible {
    transform: translate(-50%, 0);
  }

  .floating-cta__copy {
    display: none;
  }

  .floating-cta__button {
    min-height: 58px;
    gap: 6px;
    padding: 7px 5px;
    border-radius: 9px;
    font-size: 12px;
    text-align: center;
  }

  .floating-cta__button small {
    font-size: 9px;
  }

  .floating-cta__button strong {
    width: 31px;
    height: 27px;
    font-size: 7px;
  }

  .floating-cta__button svg {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 600px) {
  .scroll-consult-popup {
    align-items: center;
    padding: 12px;
  }

  .scroll-consult-popup__dialog {
    display: flex;
    max-height: calc(100dvh - 24px);
    flex-direction: column;
    padding: 30px 17px 22px;
    border-radius: 22px;
  }

  .scroll-consult-popup__close {
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    font-size: 24px;
  }

  .scroll-consult-popup__badge {
    align-self: center;
    margin-bottom: 10px;
    padding: 5px 14px;
    font-size: 11px;
  }

  .scroll-consult-popup h2 {
    font-size: clamp(25px, 8vw, 33px);
  }

  .scroll-consult-popup__actions {
    order: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
  }

  .scroll-consult-popup__button {
    min-height: 50px;
    gap: 6px;
    padding: 8px;
    font-size: 13px;
  }

  .scroll-consult-popup__button small {
    display: none;
  }

  .scroll-consult-popup__button svg {
    width: 23px;
    height: 23px;
  }

  .scroll-consult-popup__button strong {
    width: 32px;
    min-height: 25px;
    font-size: 7px;
  }

  .scroll-consult-popup__phone {
    order: 1;
    margin-top: 16px;
  }

  .scroll-consult-popup__phone-heading {
    min-height: 36px;
  }

  .scroll-consult-popup__phone-numbers a {
    min-height: 52px;
  }

  .scroll-consult-popup__note {
    order: 3;
  }
}

@media (max-width: 600px) and (max-height: 700px) {
  .scroll-consult-popup__dialog {
    padding: 24px 14px 16px;
  }

  .scroll-consult-popup__dialog>p:not(.scroll-consult-popup__badge, .scroll-consult-popup__note) {
    display: none;
  }

  .scroll-consult-popup__badge {
    margin-bottom: 7px;
  }

  .scroll-consult-popup h2 {
    margin-bottom: 0;
    font-size: clamp(23px, 7vw, 29px);
  }

  .scroll-consult-popup__phone {
    margin-top: 12px;
  }

  .scroll-consult-popup__note {
    display: none;
  }
}

@media (max-width: 480px) {
  .header-inner {
    gap: 6px;
  }

  .header-actions {
    gap: 4px;
  }

  .sao-header-cta {
    padding-inline: 6px;
    font-size: 12px;
  }

  .sao-header-cta__icon,
  .sao-header-cta svg {
    display: none;
  }

  .floating-cta__button {
    font-size: 11px;
  }

  .scroll-consult-popup__phone-numbers strong {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .sao-header-cta,
  .sao-cvr-button,
  .floating-cta,
  .floating-cta__button,
  .scroll-consult-popup,
  .scroll-consult-popup__dialog,
  .scroll-consult-popup__button {
    transition: none;
  }
}
