/* ======== FABボタン ======== */
#lasik-shindan-fab {
  position: fixed;
  bottom: 80px; /* スマホ: sp_foot_btns (62px) の上に配置 */
  right: 20px;
  z-index: 99997;
  background: linear-gradient(135deg, #0288d1, #01579b);
  color: #fff;
  border: none;
  border-radius: 28px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(2, 136, 209, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
  letter-spacing: 0.5px;
  font-family: inherit;
}
#lasik-shindan-fab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 16px rgba(2, 136, 209, 0.35);
}
#lasik-shindan-fab .fab-icon { width: 20px; height: 20px; display: inline-block; }
#lasik-shindan-fab .fab-icon svg { width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#lasik-shindan-fab .fab-pulse {
  position: absolute; top: -3px; right: -3px; width: 12px; height: 12px;
  background: #ff5252; border-radius: 50%; border: 2px solid #fff;
}
#lasik-shindan-fab .fab-pulse::after {
  content: ''; position: absolute; top: -2px; left: -2px; width: 12px; height: 12px;
  background: #ff5252; border-radius: 50%; animation: fabPulse 1.5s ease-out infinite;
}
@keyframes fabPulse { 0%{transform:scale(1);opacity:.7} 100%{transform:scale(2.5);opacity:0} }

/* ======== オーバーレイ ======== */
#lasik-shindan-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 99998; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
#lasik-shindan-overlay.is-active { opacity: 1; pointer-events: auto; }

/* ======== 診断パネル ======== */
#lasik-shindan-panel {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 99999;
  background: #fff; border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.2);
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), visibility 0s 0.35s;
  max-height: 85vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  visibility: hidden;
}
#lasik-shindan-panel.is-open { transform: translateY(0); visibility: visible; transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), visibility 0s 0s; }

.ls-panel-header {
  position: sticky; top: 0; background: linear-gradient(135deg, #0288d1, #01579b);
  color: #fff; padding: 16px 20px; border-radius: 20px 20px 0 0;
  display: flex; align-items: center; justify-content: space-between; z-index: 10;
}
.ls-panel-header h3 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ls-panel-header h3 svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ls-panel-close {
  background: rgba(255,255,255,0.2); border: none; color: #fff; width: 32px; height: 32px;
  border-radius: 50%; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; font-family: inherit;
}
.ls-panel-close:hover { background: rgba(255,255,255,0.35); }
.ls-panel-body { padding: 24px 20px 32px; }

/* ======== ステップ ======== */
.ls-step { display: none; }
.ls-step.is-active { display: block; animation: lsFadeIn 0.3s ease; }
@keyframes lsFadeIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }

.ls-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.ls-progress-label { font-size: 12px; font-weight: 700; color: #0288d1; white-space: nowrap; }
.ls-progress-bar { flex: 1; height: 6px; background: #e3f2fd; border-radius: 3px; overflow: hidden; }
.ls-progress-fill { height: 100%; background: linear-gradient(90deg, #0288d1, #4fc3f7); border-radius: 3px; transition: width 0.4s ease; }

.ls-question { font-size: 16px; font-weight: 700; color: #1a1a1a; margin-bottom: 16px; line-height: 1.5; }

.ls-options { display: flex; flex-direction: column; gap: 10px; }
.ls-option {
  background: #f8f9fa; border: 2px solid #e0e0e0; border-radius: 12px; padding: 14px 16px;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 12px;
  font-family: inherit; font-size: 14px; text-align: left; width: 100%; color: #333;
}
.ls-option:hover { border-color: #0288d1; background: #e3f2fd; }

.ls-opt-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.ls-opt-icon svg { width: 20px; height: 20px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ls-opt-icon--blue  { background: #e3f2fd; } .ls-opt-icon--blue svg  { stroke: #0288d1; }
.ls-opt-icon--teal  { background: #e0f2f1; } .ls-opt-icon--teal svg  { stroke: #00897b; }
.ls-opt-icon--gray  { background: #f5f5f5; } .ls-opt-icon--gray svg  { stroke: #757575; }
.ls-opt-icon--amber { background: #fff8e1; } .ls-opt-icon--amber svg { stroke: #ff8f00; }
.ls-opt-icon--green { background: #e8f5e9; } .ls-opt-icon--green svg { stroke: #43a047; }
.ls-opt-icon--purple{ background: #f3e5f5; } .ls-opt-icon--purple svg{ stroke: #8e24aa; }
.ls-opt-body { flex: 1; }
.ls-opt-title { font-weight: 700; font-size: 14px; display: block; }
.ls-opt-desc { font-size: 12px; color: #777; margin-top: 2px; display: block; }

/* ======== 結果画面 ======== */
.ls-result { display: none; }
.ls-result.is-active { display: block; animation: lsFadeIn 0.4s ease; }
.ls-result-intro { text-align: center; margin-bottom: 20px; }
.ls-result-intro .ls-result-badge {
  display: inline-block; background: linear-gradient(135deg, #ff8f00, #f57c00);
  color: #fff; padding: 4px 16px; border-radius: 20px; font-size: 12px; font-weight: 700; margin-bottom: 8px;
}
.ls-result-intro h4 { font-size: 18px; color: #1a1a1a; margin-bottom: 4px; }
.ls-result-intro p { font-size: 13px; color: #777; }

/* クリニックカード */
.ls-clinic-card {
  border: 2px solid #e0e0e0; border-radius: 14px; padding: 16px; margin-bottom: 12px;
  display: block; text-decoration: none; color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s; position: relative;
}
.ls-clinic-card:hover { border-color: #0288d1; box-shadow: 0 4px 16px rgba(2,136,209,0.15); }
.ls-clinic-card[data-rank="1"] {
  border-color: #ff8f00; background: linear-gradient(135deg, #fff8e1, #fff);
  box-shadow: 0 2px 12px rgba(255,143,0,0.15);
}
.ls-clinic-top { display: flex; align-items: center; gap: 12px; }
.ls-clinic-rank {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #fff;
}
.ls-rank-1 { background: linear-gradient(135deg, #f9a825, #ff8f00); font-size: 15px; }
.ls-rank-2 { background: linear-gradient(135deg, #90a4ae, #607d8b); }
.ls-rank-3 { background: linear-gradient(135deg, #a1887f, #795548); }
.ls-rank-4 { background: #78909c; }

.ls-clinic-info { flex: 1; min-width: 0; }
.ls-clinic-name { font-size: 15px; font-weight: 700; color: #1a1a1a; line-height: 1.3; }
.ls-clinic-card[data-rank="1"] .ls-clinic-name { color: #e65100; font-size: 16px; }
.ls-clinic-match { font-size: 11px; color: #0288d1; font-weight: 600; margin-top: 1px; }
.ls-clinic-card[data-rank="1"] .ls-clinic-match { color: #e65100; }

/* 詳細情報 */
.ls-clinic-details {
  margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f0;
  display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 12px;
}
.ls-clinic-details dt { color: #999; font-weight: 600; white-space: nowrap; }
.ls-clinic-details dd { color: #444; margin: 0; }

/* 特徴タグ */
.ls-clinic-features { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ls-clinic-tag {
  font-size: 11px; padding: 3px 10px; border-radius: 20px;
  background: #f5f5f5; color: #555; white-space: nowrap; line-height: 1.4;
}
.ls-clinic-card[data-rank="1"] .ls-clinic-tag { background: #fff3e0; color: #e65100; }

/* CTA */
.ls-clinic-cta {
  display: block; margin-top: 10px; padding: 10px 0; border-radius: 8px;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #0288d1, #01579b);
  text-decoration: none; text-align: center; transition: opacity 0.2s;
}
.ls-clinic-card[data-rank="1"] .ls-clinic-cta {
  background: linear-gradient(135deg, #ff6d00, #e65100); padding: 12px 0; font-size: 14px;
}
.ls-clinic-cta:hover { opacity: 0.85; }

.ls-note { text-align: center; font-size: 11px; color: #999; margin-top: 16px; line-height: 1.5; }
.ls-retry {
  display: block; margin: 16px auto 0; background: none; border: 1px solid #ccc;
  border-radius: 20px; padding: 8px 24px; font-size: 13px; color: #666;
  cursor: pointer; font-family: inherit; transition: background 0.2s;
}
.ls-retry:hover { background: #f5f5f5; }

/* 各クリニックCTA下の関連記事リンク */
.ls-clinic-review {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  margin-top: 6px; padding: 6px 0;
  font-size: 12px; color: #0288d1; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s; text-decoration: none;
}
.ls-clinic-review:hover { opacity: 0.7; }
.ls-clinic-review svg {
  width: 12px; height: 12px; flex-shrink: 0;
  fill: none; stroke: #0288d1; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.ls-clinic-card[data-rank="1"] .ls-clinic-review { color: #e65100; }
.ls-clinic-card[data-rank="1"] .ls-clinic-review svg { stroke: #e65100; }

/* プロモーションバナー */
.ls-clinic-promo {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 10px; padding: 8px 12px;
  background: linear-gradient(135deg, #fff8e1, #fff3e0);
  border: 1px dashed #ff8f00; border-radius: 8px;
  font-size: 13px; font-weight: 800; color: #e65100;
  text-align: center; line-height: 1.4;
}
.ls-clinic-promo svg {
  width: 16px; height: 16px; flex-shrink: 0;
  fill: none; stroke: #e65100; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

@media (min-width: 600px) {
  #lasik-shindan-fab { bottom: 24px; } /* デスクトップではフッターバーなしなので通常位置 */
  #lasik-shindan-panel { max-width: 460px; left: auto; right: 20px; bottom: 20px; border-radius: 20px; max-height: 80vh; }
  .ls-panel-header { border-radius: 20px 20px 0 0; }
}
