/* ============================================================
   Sol Home – 悩み別導線 CTA Flows
   .sol-consult-* : 相談スタートセクション
   .sol-flow-*    : モーダル / ボトムシート
   ============================================================ */

/* ── 変数 ── */
:root {
  --flow-orange:    #ff7a00;
  --flow-orange-lt: #ff9c42;
  --flow-navy:      #0d1b2a;
  --flow-line:      #06C755;
  --flow-radius:    20px;
  --flow-z:         9998;
}

/* ================================================================
   相談スタートセクション
   ================================================================ */
.sol-consult-section {
  padding: 5rem 1.5rem;
  background: #fff;
  text-align: center;
  border-bottom: 1px solid rgba(17,17,17,.06);
}
.sol-consult-section .container { max-width: 820px; }

.sol-consult-eyebrow {
  display: inline-block;
  font-size: .77rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--flow-orange);
  background: rgba(255,122,0,.1);
  padding: .3rem .95rem;
  border-radius: 999px;
  margin-bottom: .9rem;
}
.sol-consult-heading {
  font-size: clamp(1.65rem, 4vw, 2.3rem);
  font-weight: 900;
  color: var(--flow-navy);
  margin: 0 0 .5rem;
  letter-spacing: -.03em;
}
.sol-consult-heading strong { color: var(--flow-orange); }
.sol-consult-lead {
  font-size: clamp(.88rem, 2vw, .98rem);
  color: #666;
  margin: 0 0 2.2rem;
  line-height: 1.7;
}

.sol-consult-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .9rem;
  max-width: 680px;
  margin: 0 auto;
}
.sol-consult-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  padding: 1.4rem 1.3rem 1.2rem;
  border-radius: 18px;
  border: 2px solid #e5e7eb;
  cursor: pointer;
  text-align: left;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.sol-consult-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.11);
  border-color: var(--flow-orange);
}
.sol-consult-card--primary {
  background: linear-gradient(135deg, var(--flow-orange), var(--flow-orange-lt));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 28px rgba(255,122,0,.32);
}
.sol-consult-card--primary:hover {
  border-color: rgba(255,255,255,.4);
  box-shadow: 0 12px 36px rgba(255,122,0,.44);
}

.sol-consult-card__icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sol-consult-card--primary .sol-consult-card__icon {
  background: rgba(255,255,255,.22);
  color: #fff;
}
.sol-consult-card--outline .sol-consult-card__icon {
  background: rgba(255,122,0,.1);
  color: var(--flow-orange);
}
.sol-consult-card__icon svg { width: 22px; height: 22px; }

.sol-consult-card__label {
  font-size: .94rem;
  font-weight: 900;
  line-height: 1.3;
}
.sol-consult-card__sub {
  font-size: .78rem;
  line-height: 1.5;
}
.sol-consult-card--primary .sol-consult-card__sub { opacity: .82; }
.sol-consult-card--outline .sol-consult-card__sub { color: #777; }

.sol-consult-card__badge {
  position: absolute;
  top: -.6rem; right: .85rem;
  background: var(--flow-navy);
  color: #fff;
  font-size: .64rem;
  font-weight: 800;
  padding: .18rem .62rem;
  border-radius: 999px;
  letter-spacing: .06em;
}
.sol-consult-card--primary .sol-consult-card__badge {
  background: rgba(255,255,255,.28);
}

.sol-consult-note {
  margin-top: 1.3rem;
  font-size: .78rem;
  color: #999;
}

@media (max-width: 560px) {
  .sol-consult-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
  }
}

/* ================================================================
   スクロールロック / 固定CTA非表示
   ================================================================ */
body.sol-flow-open {
  overflow: hidden;
  touch-action: none;
}
body.sol-flow-open .sol-fixed-cta-menu {
  display: none !important;
}

/* ================================================================
   オーバーレイ
   ================================================================ */
.sol-flow-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--flow-z);
  background: rgba(0,0,0,.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.sol-flow-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ================================================================
   モーダル – スマホ: ボトムシート
   ================================================================ */
.sol-flow-modal {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 92svh;
  max-height: 92vh;
  background: #fff;
  border-radius: var(--flow-radius) var(--flow-radius) 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .36s cubic-bezier(.32,.72,0,1);
  overflow: hidden;
}
.sol-flow-overlay.is-open .sol-flow-modal {
  transform: translateY(0);
}

/* ── ドラッグハンドル ── */
.sol-flow-modal::before {
  content: '';
  display: block;
  width: 40px; height: 4px;
  border-radius: 2px;
  background: #d1d5db;
  margin: .7rem auto .2rem;
  flex-shrink: 0;
}

/* ================================================================
   モーダル – デスクトップ: センターモーダル（640px+）
   ================================================================ */
@media (min-width: 640px) {
  .sol-flow-modal {
    position: absolute;
    top: 50%; left: 50%;
    bottom: auto; right: auto;
    transform: translate(-50%, -44%);
    width: 500px;
    max-height: 86svh;
    max-height: 86vh;
    border-radius: var(--flow-radius);
    opacity: 0;
    transition: transform .3s cubic-bezier(.32,.72,0,1), opacity .22s ease;
  }
  .sol-flow-overlay.is-open .sol-flow-modal {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
  .sol-flow-modal::before { display: none; }
}

/* ── ヘッダー ── */
.sol-flow-header {
  padding: .85rem 1.1rem .5rem;
  flex-shrink: 0;
}
.sol-flow-progress {
  display: flex;
  gap: .35rem;
  margin-bottom: .7rem;
}
.sol-flow-progress__dot {
  height: 4px;
  border-radius: 2px;
  flex: 1;
  background: #e5e7eb;
  transition: background .28s ease;
}
.sol-flow-progress__dot.is-done   { background: var(--flow-orange); }
.sol-flow-progress__dot.is-active { background: var(--flow-orange-lt); }

.sol-flow-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.sol-flow-title {
  font-size: 1.03rem;
  font-weight: 900;
  color: var(--flow-navy);
  margin: 0;
  line-height: 1.3;
}
.sol-flow-close {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  color: #555;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.sol-flow-close:hover { background: #e5e7eb; }
.sol-flow-close svg { width: 16px; height: 16px; }

/* ── ボディ ── */
.sol-flow-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: .4rem 1.1rem .6rem;
}

/* ── フッター ── */
.sol-flow-footer {
  padding: .7rem 1.1rem 1.1rem;
  flex-shrink: 0;
  border-top: 1px solid #f0f0f0;
}
.sol-flow-footer-note {
  font-size: .72rem;
  color: #aaa;
  text-align: center;
  margin: .45rem 0 0;
}

/* ── LINEボタン ── */
.sol-flow-line-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--flow-line);
  color: #fff;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: filter .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.sol-flow-line-btn:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  color: #fff;
}
.sol-flow-line-btn svg { width: 21px; height: 21px; flex-shrink: 0; }

/* ================================================================
   都市グリッド（補助金フロー Step 0）
   ================================================================ */
.sol-flow-step-desc {
  font-size: .86rem;
  color: #666;
  margin: .2rem 0 .75rem;
  line-height: 1.6;
}
.sol-city-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-bottom: .5rem;
}
.sol-city-btn {
  display: flex; align-items: center; justify-content: center;
  padding: .6rem .3rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 11px;
  font-size: .82rem;
  font-weight: 700;
  color: #1a2b3c;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.sol-city-btn:hover {
  border-color: var(--flow-orange);
  background: rgba(255,122,0,.05);
  color: var(--flow-orange);
}
.sol-city-btn--wide { grid-column: span 3; }

/* ================================================================
   補助金結果（Step 1）
   ================================================================ */
.sol-subsidy-city-label {
  font-size: .82rem;
  color: #888;
  margin: .2rem 0 .65rem;
}
.sol-subsidy-cards {
  display: flex; flex-direction: column; gap: .55rem;
  margin-bottom: .9rem;
}
.sol-subsidy-card {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .85rem .95rem;
  background: #f8f9fa;
  border-radius: 13px;
  border-left: 4px solid var(--flow-orange);
}
.sol-subsidy-card__amount {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--flow-orange);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}
.sol-subsidy-card__name {
  font-size: .86rem;
  font-weight: 700;
  color: var(--flow-navy);
  margin-bottom: .2rem;
}
.sol-subsidy-card__note {
  font-size: .73rem;
  color: #777;
  line-height: 1.5;
}

.sol-subsidy-total {
  padding: .9rem 1rem;
  background: linear-gradient(135deg, rgba(255,122,0,.1), rgba(255,156,66,.06));
  border-radius: 14px;
  text-align: center;
  margin-bottom: .75rem;
}
.sol-subsidy-total__label { font-size: .78rem; color: #666; margin-bottom: .2rem; }
.sol-subsidy-total__amount {
  font-size: 2rem;
  font-weight: 900;
  color: var(--flow-orange);
  line-height: 1;
}
.sol-subsidy-caution {
  font-size: .71rem;
  color: #aaa;
  line-height: 1.6;
  margin-bottom: .3rem;
}

/* ================================================================
   画像アップロードエリア
   ================================================================ */
.sol-upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 15px;
  padding: 1.8rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
  margin: .4rem 0 .9rem;
  position: relative;
  overflow: hidden;
}
.sol-upload-area:hover, .sol-upload-area.is-drag {
  border-color: var(--flow-orange);
  background: rgba(255,122,0,.04);
}
.sol-upload-area input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}
.sol-upload-area__icon { margin-bottom: .35rem; color: #b0b8c4; }
.sol-upload-area__icon svg { width: 42px; height: 42px; }
.sol-upload-area__main {
  font-size: .9rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: .22rem;
}
.sol-upload-area__sub { font-size: .74rem; color: #aaa; }
.sol-upload-hint {
  font-size: .73rem;
  color: #aaa;
  margin: .25rem 0 0;
  line-height: 1.55;
}

/* ── スキャンアニメーション ── */
.sol-scan-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin: .4rem 0 .7rem;
  background: #e5e7eb;
  min-height: 150px;
}
.sol-scan-wrap img {
  width: 100%; object-fit: cover;
  max-height: 190px; display: block;
  filter: brightness(.68);
}
.sol-scan-placeholder {
  height: 150px;
  background: linear-gradient(135deg, #1a3a6c, #0d1b2a);
}
.sol-scan-line {
  position: absolute; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--flow-orange), transparent);
  animation: sol-scan 1.5s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(255,122,0,.65);
}
@keyframes sol-scan {
  0%   { top: 0; }
  100% { top: 100%; }
}
.sol-scan-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .4rem;
}
.sol-scan-text {
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
.sol-scan-dots { display: flex; gap: .3rem; }
.sol-scan-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--flow-orange-lt);
  animation: sol-dot 1.2s ease-in-out infinite;
}
.sol-scan-dots span:nth-child(2) { animation-delay: .2s; }
.sol-scan-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes sol-dot {
  0%,100% { opacity: .3; transform: scale(.8); }
  50%      { opacity: 1;  transform: scale(1.2); }
}

/* ── 結果ボックス ── */
.sol-result-box {
  background: linear-gradient(135deg, var(--flow-navy), #1a3a6c);
  color: #fff;
  border-radius: 15px;
  padding: 1.15rem 1.1rem;
  margin: .4rem 0 .9rem;
  text-align: center;
}
.sol-result-box__label { font-size: .8rem; color: rgba(255,255,255,.65); margin-bottom: .3rem; }
.sol-result-box__value {
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--flow-orange-lt);
  margin-bottom: .25rem;
  line-height: 1.35;
}
.sol-result-box__note { font-size: .73rem; color: rgba(255,255,255,.55); }

.sol-result-items { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .9rem; }
.sol-result-item {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .75rem .85rem;
  background: #f8f9fa;
  border-radius: 11px;
}
.sol-result-item__check {
  width: 19px; height: 19px;
  border-radius: 50%;
  background: rgba(255,122,0,.12);
  color: var(--flow-orange);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .72rem; font-weight: 900;
}
.sol-result-item__text { font-size: .82rem; line-height: 1.55; color: #333; }
.sol-result-item__text strong { color: var(--flow-navy); }

/* ================================================================
   蓄電池選択グリッド
   ================================================================ */
.sol-battery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .6rem;
  margin: .4rem 0 .8rem;
}
.sol-battery-btn {
  display: flex; flex-direction: column;
  align-items: flex-start; gap: .38rem;
  padding: .95rem .85rem;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, background .18s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.sol-battery-btn:hover {
  border-color: var(--flow-orange);
  background: rgba(255,122,0,.04);
}
.sol-battery-btn__icon { font-size: 1.45rem; line-height: 1; }
.sol-battery-btn__label { font-size: .87rem; font-weight: 800; color: var(--flow-navy); }
.sol-battery-btn__sub   { font-size: .73rem; color: #777; line-height: 1.4; }

/* ── 蓄電池結果 ── */
.sol-battery-result__heading {
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--flow-navy);
  margin-bottom: .75rem;
  line-height: 1.4;
}
.sol-battery-result__heading strong { color: var(--flow-orange); }

/* ================================================================
   アクセシビリティ – モーション軽減
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .sol-scan-line,
  .sol-scan-dots span { animation: none; }
  .sol-flow-overlay,
  .sol-flow-modal { transition-duration: .01ms !important; }
}
