/* ソエルク「30秒かんたん相談」専用スタイル。既存クラス(.cta-compare 等)には依存せず自己完結させる
   （tpl-soelc-top.php 等 soelc-shell.css 未読込のテンプレートでCTAが崩れる既知事故を避けるため）。
   すべて .soelc-consult 系クラスのみを対象にスコープし、既存の要素セレクタ(button/input/div等)は触らない。 */
.soelc-consult-launcher {
  --scn-navy: #0f2540;
  --scn-navy-hover: #15355f;
  --scn-teal: #14b8a6;
  --scn-teal-deep: #0d9488;
  --scn-amber: #f59e0b;
  --scn-amber-light: #fbbf24;
  position: fixed;
  z-index: 2000;
  right: 16px;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 0 14px;
  height: 52px;
  background: var(--scn-teal-deep);
  color: #fff;
  border: none;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(13, 148, 136, 0.35);
  font: 700 14px/1.2 "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.soelc-consult-launcher:hover { background: var(--scn-teal); box-shadow: 0 10px 28px rgba(13, 148, 136, 0.44); }
.soelc-consult-launcher:active { transform: scale(0.97); }
.soelc-consult-launcher__icon { width: 22px; height: 22px; flex: 0 0 auto; color: #fff; }
.soelc-consult-launcher__icon svg { width: 100%; height: 100%; }
.soelc-consult-launcher__text { white-space: nowrap; }
@media (max-width: 1080px) {
  /* 本番実測：.floating-cta（cta-compare--mobile + cta-assure）の合計高さは約104px（2026-09-17確認）。
     余白を含めてその上に確実にクリアするオフセットを取る（実測に対し+36px）。 */
  .soelc-consult-launcher { bottom: 140px; right: 12px; height: 48px; padding: 0 14px 0 12px; font-size: 13px; }
  .soelc-consult-launcher__icon { width: 20px; height: 20px; }
}
@media (max-width: 360px) {
  .soelc-consult-launcher__text { display: none; }
  .soelc-consult-launcher { width: 48px; height: 48px; padding: 0; justify-content: center; border-radius: 50%; }
}
@media (min-width: 1081px) {
  /* #pn-sticky（記事ページ・PC幅>1080px限定、ほぼ全幅・z-index:9000）に完全に隠れてしまうため、
     記事ページ(is_single())のときだけ上に逃がす。本番実測：#pn-stickyの高さ約140px（2026-09-17確認）。 */
  .soelc-consult-launcher--article { bottom: 172px; }
}

.soelc-consult {
  --scn-navy: #0f2540;
  --scn-navy-hover: #15355f;
  --scn-teal: #14b8a6;
  --scn-amber: #f59e0b;
  --scn-amber-light: #fbbf24;
  --scn-line: #e2e8f0;
  --scn-text: #1e3a5f;
  --scn-muted: #64748b;
  position: fixed;
  inset: 0;
  z-index: 10000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.soelc-consult.is-open { visibility: visible; opacity: 1; transition: opacity 0.25s ease; }
.soelc-consult[hidden] { display: none; }

.soelc-consult__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 37, 64, 0.55);
}

.soelc-consult__dialog {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  max-height: min(88vh, 720px);
  transform: translate(-50%, 100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(6, 22, 44, 0.28);
  overflow: hidden;
}
.soelc-consult.is-open .soelc-consult__dialog { transform: translate(-50%, 0); }
@media (min-width: 640px) {
  .soelc-consult__dialog {
    top: 50%;
    bottom: auto;
    transform: translate(-50%, -46%) scale(0.97);
    opacity: 0;
    border-radius: 18px;
    max-height: min(84vh, 660px);
    transition: transform 0.22s ease, opacity 0.22s ease;
  }
  .soelc-consult.is-open .soelc-consult__dialog { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.soelc-consult__panel {
  overflow-y: auto;
  padding: 20px 22px 28px;
  -webkit-overflow-scrolling: touch;
}

.soelc-consult__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.soelc-consult__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 0;
}
.soelc-consult__brand { font: 700 13px/1.2 "Noto Sans JP", sans-serif; color: var(--scn-muted); }
.soelc-consult__back {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px;
  background: none; border: none; color: var(--scn-navy);
  font: 700 14px/1 "Noto Sans JP", sans-serif; padding: 4px 8px; cursor: pointer; border-radius: 8px;
}
.soelc-consult__back svg { width: 18px; height: 18px; }
.soelc-consult__reset {
  margin-left: auto; background: none; border: none; color: var(--scn-muted);
  font: 500 12.5px/1 "Noto Sans JP", sans-serif; text-decoration: underline; cursor: pointer;
  min-height: 44px; padding: 4px 8px; display: inline-flex; align-items: center;
}
.soelc-consult__close {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: #f1f5f9; border: none; border-radius: 50%; color: #475569; cursor: pointer; flex: 0 0 auto;
}
.soelc-consult__close svg { width: 18px; height: 18px; }
.soelc-consult__back:focus-visible,
.soelc-consult__reset:focus-visible,
.soelc-consult__close:focus-visible { outline: 3px solid var(--scn-teal); outline-offset: 2px; }

.soelc-consult__progress { display: flex; gap: 6px; padding: 14px 22px 0; }
.soelc-consult__dot { flex: 1; height: 4px; border-radius: 2px; background: #e5e7eb; }
.soelc-consult__dot.is-done { background: linear-gradient(90deg, var(--scn-amber), var(--scn-amber-light)); }

.soelc-consult__title { margin: 18px 0 4px; font: 800 20px/1.4 "Zen Kaku Gothic New", "Noto Sans JP", sans-serif; color: var(--scn-navy); }
.soelc-consult__sub { margin: 0 0 14px; font: 500 13.5px/1.6 "Noto Sans JP", sans-serif; color: var(--scn-muted); }
.soelc-consult__feedback {
  margin: 0 0 16px; padding: 10px 14px; background: #f0fdfa; border: 1px solid #ccfbf1; border-radius: 10px;
  font: 500 13.5px/1.6 "Noto Sans JP", sans-serif; color: #0f766e;
}
.soelc-consult__body { margin: 0 0 18px; font: 500 14.5px/1.75 "Noto Sans JP", sans-serif; color: var(--scn-text); }

.soelc-consult__choices { display: flex; flex-direction: column; gap: 10px; }
.soelc-consult__choice {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px;
  padding: 12px 14px; background: #fff; border: 1.5px solid var(--scn-line); border-radius: 12px;
  font: 600 15px/1.4 "Noto Sans JP", sans-serif; color: var(--scn-text); text-align: left; cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.soelc-consult__choice:hover { border-color: var(--scn-amber); background: #fffbeb; }
.soelc-consult__choice:focus-visible { outline: 3px solid var(--scn-teal); outline-offset: 2px; }
.soelc-consult__choice__icon,
.soelc-consult__card__icon { flex: 0 0 auto; width: 30px; height: 30px; color: var(--scn-navy); display: inline-flex; }
.soelc-consult__choice__icon svg,
.soelc-consult__card__icon svg { width: 100%; height: 100%; }
.soelc-consult__choice__label,
.soelc-consult__card__label { flex: 1 1 auto; }
.soelc-consult__choice__chevron,
.soelc-consult__card__chevron { flex: 0 0 auto; width: 18px; height: 18px; color: var(--scn-muted); }

.soelc-consult__cardlist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.soelc-consult__card {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px;
  padding: 12px 14px; background: #f8fafc; border: 1.5px solid var(--scn-line); border-radius: 12px;
  font: 700 14.5px/1.4 "Noto Sans JP", sans-serif; color: var(--scn-navy); text-align: left; cursor: pointer;
  text-decoration: none; transition: border-color 0.15s ease, background-color 0.15s ease;
}
.soelc-consult__card:hover { border-color: var(--scn-teal); background: #f0fdfa; }
.soelc-consult__card:focus-visible { outline: 3px solid var(--scn-teal); outline-offset: 2px; }

.soelc-consult__icon { width: 100%; height: 100%; }

.soelc-consult__primary {
  display: block; width: 100%; min-height: 56px; margin-bottom: 10px;
  background: linear-gradient(135deg, var(--scn-amber), #d97706); color: #fff; border: none; border-radius: 12px;
  font: 800 15.5px/1.3 "Noto Sans JP", sans-serif; cursor: pointer; box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
}
.soelc-consult__primary:hover { transform: translateY(-1px); }
.soelc-consult__primary:focus-visible { outline: 3px solid var(--scn-teal); outline-offset: 2px; }
.soelc-consult__secondary {
  display: block; width: 100%; min-height: 48px; background: none; border: 1.5px solid var(--scn-line); border-radius: 12px;
  font: 600 14px/1.3 "Noto Sans JP", sans-serif; color: var(--scn-muted); cursor: pointer; margin-top: 8px;
}
.soelc-consult__secondary:focus-visible { outline: 3px solid var(--scn-teal); outline-offset: 2px; }

.soelc-consult__cta-wrap { margin-top: 14px; }
.soelc-consult__cta {
  display: flex; align-items: stretch; width: 100%; min-height: 64px; text-decoration: none;
  background: var(--scn-navy); border: 1px solid var(--scn-navy); border-radius: 10px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 37, 64, 0.2);
}
.soelc-consult__cta:hover { background: var(--scn-navy-hover); }
.soelc-consult__cta:focus-visible { outline: 3px solid var(--scn-teal); outline-offset: 2px; }
.soelc-consult__cta-badge {
  display: none; align-items: center; gap: 5px; flex: 0 0 auto; align-self: center; margin-left: 14px;
  padding: 5px 9px; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 5px;
  font: 700 11px/1.2 "Noto Sans JP", sans-serif; color: #fff;
}
@media (min-width: 380px) { .soelc-consult__cta-badge { display: inline-flex; } }
.soelc-consult__cta-label {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 0 10px;
  font: 800 16px/1.25 "Zen Kaku Gothic New", "Noto Sans JP", sans-serif; color: #fff; text-align: center;
}
.soelc-consult__cta-arrow {
  flex: 0 0 auto; width: 56px; display: flex; align-items: center; justify-content: center;
  background: var(--scn-amber); color: var(--scn-navy); font-size: 22px; font-weight: 700;
}
.soelc-consult__assure { margin: 10px 0 0; text-align: center; font: 600 12.5px/1.5 "Noto Sans JP", sans-serif; color: var(--scn-muted); }

.soelc-consult__freelink {
  display: flex; align-items: center; justify-content: center; min-height: 44px; width: 100%;
  margin: 10px auto 0; background: none; border: none; text-decoration: underline;
  color: var(--scn-muted); font: 500 12.5px/1.5 "Noto Sans JP", sans-serif; cursor: pointer;
}
.soelc-consult__freelink:focus-visible { outline: 3px solid var(--scn-teal); outline-offset: 2px; }

.soelc-consult__textarea {
  width: 100%; min-height: 96px; padding: 12px 14px; border: 1.5px solid var(--scn-line); border-radius: 10px;
  font: 500 14px/1.6 "Noto Sans JP", sans-serif; color: var(--scn-text); resize: vertical; box-sizing: border-box;
}
.soelc-consult__textarea:focus-visible,
.soelc-consult__textarea:focus { outline: 3px solid var(--scn-teal); outline-offset: 1px; }
.soelc-consult__free-actions { display: flex; gap: 10px; margin-top: 12px; }
.soelc-consult__free-actions .soelc-consult__secondary,
.soelc-consult__free-actions .soelc-consult__primary { margin: 0; flex: 1 1 0; }

.soelc-consult-inline-cta {
  display: flex; align-items: center; gap: 14px; width: 100%; max-width: 640px;
  padding: 16px 18px; margin: 24px 0; background: #f8fafc; border: 1.5px solid #dce7ef; border-radius: 14px;
  cursor: pointer; text-align: left; box-sizing: border-box;
}
.soelc-consult-inline-cta:hover { border-color: #14b8a6; background: #f0fdfa; }
.soelc-consult-inline-cta:focus-visible { outline: 3px solid #14b8a6; outline-offset: 2px; }
.soelc-consult-inline-cta__icon {
  flex: 0 0 auto; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: #0f2540; color: #fbbf24; border-radius: 10px;
}
.soelc-consult-inline-cta__icon svg { width: 22px; height: 22px; }
.soelc-consult-inline-cta__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.soelc-consult-inline-cta__title { font: 800 15.5px/1.4 "Zen Kaku Gothic New", "Noto Sans JP", sans-serif; color: #0f2540; }
.soelc-consult-inline-cta__sub { font: 500 12.5px/1.5 "Noto Sans JP", sans-serif; color: #64748b; }
.soelc-consult-inline-cta__arrow { flex: 0 0 auto; color: #f59e0b; font-size: 20px; font-weight: 700; }

body.soelc-consult-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .soelc-consult,
  .soelc-consult__dialog,
  .soelc-consult-launcher,
  .soelc-consult__choice,
  .soelc-consult__card,
  .soelc-consult__primary {
    transition: none !important;
  }
}
