/* ============================================================
   AI活用準備度診断 — ざつね屋 本公開ブランドデザイン
   （prices.html / zatuneya-hp と共通トークン準拠）
   ※ クラス名・id は script.js 参照のため一切変更なし。色・アイコン・影・余白のみ刷新。
   ============================================================ */
:root {
  /* brand */
  --teal:        #5BBDC8;
  --teal-dk:     #267882;  /* #46A6B1→#267882 (コントラスト比 5.1:1 確保) */
  --teal-soft:   #EAF6F8;
  --teal-soft2:  #DCF0F2;
  --orange:      #F8981D;
  --orange-dk:   #E28511;
  --orange-soft: #FDF0DE;
  --warm-bg:     #FFF9F0;
  --warm-line:   #F6E4C8;

  /* semantic aliases (旧トークン名を維持しつつブランド色へ) */
  --primary:      #267882;   /* #46A6B1→#267882 (コントラスト比 5.1:1 確保) */
  --primary-dark: #3B929C;
  --accent:       #F8981D;   /* CTA・進捗・強調 → オレンジ */
  --accent-dark:  #E28511;

  /* stages（準備→導入→活用→推進 のグラデーション） */
  --stage-prep:  #839CAA;    /* ブルーグレー */
  --stage-intro: #F8981D;    /* オレンジ */
  --stage-use:   #5BBDC8;    /* ティール */

  --bg:         #EFF4F5;
  --card:       #FFFFFF;
  --card-tint:  #F6FBFC;
  --text:       #575757;
  --heading:    #3C3C3C;
  --text-muted: #5F707A;  /* #839CAA→#5F707A (コントラスト比 5.2:1 確保) */
  --border:     #E1EEF0;
  --success:    #267882;  /* #46A6B1→#267882 */
  --warning:    #A85E00;  /* #E28511→#A85E00 (コントラスト比 4.9:1 確保) */

  --radius: 20px;

  /* SHADOW SYSTEM — 3 tiers (+ colored CTA) */
  --shadow:    0 1px 3px rgba(40,60,70,.05), 0 4px 12px rgba(40,60,70,.05);
  --shadow-2:  0 2px 6px rgba(40,60,70,.06), 0 14px 30px rgba(40,60,70,.10);
  --shadow-3:  0 6px 14px rgba(40,60,70,.10), 0 30px 60px rgba(40,60,70,.16);
  --sh-orange: 0 10px 24px rgba(248,152,29,.32);
  --sh-teal:   0 8px 20px rgba(91,189,200,.30);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans JP', 'Roboto', 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: 'Noto Sans JP', sans-serif; }

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* ── 画面切り替え ── */
.screen { display: none; }
.screen.active { display: block; }

/* ── ページヒーロー装飾（zatuneya-hp works.html / faq.html と同一パターン） ── */
.page-hero.hero-diagonal {
  position: relative;
  overflow: hidden;
  background: linear-gradient(165deg, #fff 0%, #fff 40%, var(--bg) 78%, var(--teal-soft2) 100%);
}
.page-hero.hero-diagonal > .container { position: relative; z-index: 1; }
.corner-diagonal {
  position: absolute; top: 0; right: 0; z-index: 0;
  width: clamp(150px, 28vw, 380px); height: auto;
  pointer-events: none; user-select: none;
}
.skyline-illust {
  display: block; width: 100%; height: clamp(64px, 9vw, 120px);
  object-fit: cover; object-position: center bottom;
  pointer-events: none; user-select: none;
}

/* ── 共通アイコン（モノラインSVG・絵文字禁止） ── */
.ic-svg { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ic-svg svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; fill: none; }

/* ── ウェルカム ── */
.brand {
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--heading);
  letter-spacing: 0.08em;
  padding-top: 12px;
  margin-bottom: 32px;
}
.brand span { color: var(--orange); }

.welcome-hero {
  text-align: center;
  padding: 48px 24px 40px;
  background: var(--card);
  border-radius: 26px;
  box-shadow: var(--shadow-2);
  margin-bottom: 24px;
}

.welcome-icon {
  width: 88px; height: 88px;
  margin: 0 auto 24px;
  border-radius: 26px;
  background: linear-gradient(150deg, var(--teal-soft) 0%, var(--teal-soft2) 100%);
  color: var(--teal-dk);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(70,166,177,.12), 0 10px 24px rgba(70,166,177,.16);
}
.welcome-icon svg { width: 44px; height: 44px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; fill: none; }

.welcome-hero h1 {
  font-size: 27px;
  font-weight: 900;
  color: var(--heading);
  margin-bottom: 16px;
  letter-spacing: 0.01em;
  line-height: 1.45;
}

.welcome-sub {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.95;
}

.welcome-meta {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.welcome-meta span {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal-soft);
  color: var(--teal-dk);
  font-size: 13px; font-weight: 700;
  padding: 8px 16px; border-radius: 999px;
}
.welcome-meta span svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; fill: none; }

.welcome-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ── ボタン（pill型） ── */
.btn-primary {
  display: block;
  width: 100%;
  padding: 17px;
  background: var(--orange);
  color: #fff;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--sh-orange);
}
.btn-primary:hover { background: var(--orange-dk); transform: translateY(-2px); box-shadow: 0 16px 32px rgba(248,152,29,.42); }
.btn-primary:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(248,152,29,.4); }
.btn-primary:disabled {
  background: #D7E3E6;
  color: #9FB2BA;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-large { font-size: 18px; padding: 19px; }

.btn-secondary {
  padding: 13px 24px;
  background: #fff;
  color: var(--teal-dk);
  border: 1.5px solid var(--teal);
  border-radius: 999px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
  text-align: center;
}
.btn-secondary:hover { background: var(--teal-soft); transform: translateY(-2px); }
.btn-secondary:active { transform: translateY(0); }

/* ── クイズ ── */
.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-top: 16px;
}

.block-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-dk);
  letter-spacing: 0.04em;
}

.question-counter {
  font-family: 'Roboto', 'Noto Sans JP', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 700;
}

.progress-bar-wrap {
  height: 8px;
  background: var(--teal-soft2);
  border-radius: 99px;
  margin-bottom: 24px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-dk) 100%);
  border-radius: 99px;
  transition: width 0.35s cubic-bezier(.22,.61,.36,1);
}

.question-card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow-2);
  padding: 32px 24px;
  margin-bottom: 20px;
}

.question-text {
  font-size: 18px;
  font-weight: 900;
  color: var(--heading);
  margin-bottom: 24px;
  line-height: 1.6;
}

.options { display: flex; flex-direction: column; gap: 8px; }

.option-btn {
  width: 100%;
  padding: 16px 20px;
  background: var(--card-tint);
  border: 2px solid var(--border);
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  line-height: 1.5;
}
.option-btn:hover { border-color: var(--teal); background: var(--teal-soft); }
.option-btn.selected {
  border-color: var(--teal-dk);
  background: var(--teal-soft);
  font-weight: 700;
  color: var(--teal-dk);
}

.quiz-nav { display: flex; gap: 12px; }
.quiz-nav .btn-secondary { flex: 0 0 auto; }
.quiz-nav .btn-primary { flex: 1; }

/* ── ローディング ── */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
}

.spinner {
  width: 54px;
  height: 54px;
  border: 4px solid var(--teal-soft2);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 24px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--heading);
  margin-bottom: 8px;
}

.loading-sub { font-size: 14px; color: var(--text-muted); }

/* ── 結果画面 ── */
.final-goal-box {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dk) 100%);
  color: #fff;
  border-radius: 26px;
  padding: 32px 24px;
  margin-top: 24px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: 0 16px 36px rgba(70,166,177,.28);
}

.final-goal-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,.92);
  margin-bottom: 12px;
}
.final-goal-label svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; fill: none; }

.final-goal-text {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.6;
  margin-bottom: 8px;
}

.final-goal-sub {
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.7;
}

/* ── ステージ進捗 ── */
.stage-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--card);
  border-radius: 24px;
  padding: 24px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  flex-wrap: nowrap;
}

.stage-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.stage-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--teal-soft2);
  border: 3px solid var(--teal-soft2);
  transition: all 0.3s;
}

.stage-name {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  text-align: center;
}

.stage-arrow {
  font-size: 14px;
  color: #C4D8DC;
  flex: 0 0 auto;
  margin-top: -14px;
}

.stage-item.active .stage-dot {
  width: 24px;
  height: 24px;
  border-width: 3px;
  box-shadow: 0 4px 10px rgba(40,60,70,.14);
}

.stage-item.active .stage-name {
  font-weight: 900;
  font-size: 12px;  /* ベースと同値で統一 */
}

.stage-item[data-stage="準備期"] { --stage-color: var(--stage-prep); }
.stage-item[data-stage="導入期"] { --stage-color: var(--stage-intro); }
.stage-item[data-stage="活用期"] { --stage-color: var(--stage-use); }
.stage-item[data-stage="推進期"] { --stage-color: var(--teal-dk); }

.stage-item.active .stage-dot { background: var(--stage-color); border-color: var(--stage-color); }
.stage-item.active .stage-name { color: var(--stage-color); }

/* ── スコアカード ── */
.score-card[data-stage="準備期"] { --stage-color: var(--stage-prep); }
.score-card[data-stage="導入期"] { --stage-color: var(--stage-intro); }
.score-card[data-stage="活用期"] { --stage-color: var(--stage-use); }
.score-card[data-stage="推進期"] { --stage-color: var(--teal-dk); }

.score-card {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow-2);
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 20px;
  border-top: 5px solid var(--stage-color, var(--teal));
}

.score-number {
  font-family: 'Roboto', 'Noto Sans JP', sans-serif;
  font-size: 66px;
  font-weight: 900;
  line-height: 1;
  color: var(--stage-color, var(--teal-dk));
  margin-bottom: 4px;
}

.score-label {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.stage-badge {
  display: inline-block;
  padding: 8px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  color: #fff;
}

.stage-badge.badge-prep    { background: var(--stage-prep); }
.stage-badge.badge-intro   { background: var(--stage-intro); }
.stage-badge.badge-use     { background: var(--stage-use); }
.stage-badge.badge-advance { background: var(--teal-dk); }

/* ── セクションカード共通 ── */
.section-card {
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 900;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--border);
}

.section-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex-shrink: 0;
}
.section-icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; fill: none; }

.current-state-header { color: var(--text-muted); }
.stage-goal-header { color: var(--teal-dk); margin-top: 16px; }
.strengths-header { color: var(--success); }
.issues-header { color: var(--warning); }
.actions-header { color: var(--teal-dk); }

.current-state-text {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 0;
  line-height: 1.85;
}

.stage-goal-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--teal-dk);
  line-height: 1.6;
}

/* ── インサイトリスト ── */
.insight-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insight-list li {
  font-size: 14px;
  line-height: 1.7;
  padding: 12px 16px;
  border-radius: 12px;
}

.strengths-list li {
  background: var(--teal-soft);
  color: #2C6E76;
  border-left: 3px solid var(--teal);
}

.issues-list li {
  background: var(--warm-bg);
  color: #8A5A16;
  border-left: 3px solid var(--orange);
}

/* ── 推奨アクション ── */
.actions-card { border-left: 4px solid var(--teal); }

.actions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: action-counter;
}

.actions-list li {
  display: flex;
  gap: 12px;
  font-size: 14px;
  line-height: 1.7;
  align-items: flex-start;
  counter-increment: action-counter;
}

.actions-list li::before {
  content: counter(action-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── CTA ── */
.cta-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: var(--shadow-3);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; top: -90px; right: -70px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(248,152,29,.12), rgba(248,152,29,0) 70%);
  pointer-events: none;
}

.cta-headline {
  position: relative;
  font-size: 20px;
  font-weight: 900;
  color: var(--heading);
  margin-bottom: 8px;
}

.cta-sub {
  position: relative;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.8;
}

.btn-cta {
  display: inline-block;
  width: auto;
  padding: 16px 40px;
  font-size: 17px;
  background: var(--orange);
  border-radius: 999px;
  margin-bottom: 8px;
}
.btn-cta:hover { background: var(--orange-dk); }

.cta-note {
  position: relative;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.cta-prices-link {
  position: relative;
  display: block !important;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal-dk);
  text-decoration: none;
  text-align: center;
}
.cta-prices-link:hover { text-decoration: underline; }

.btn-retry {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 24px;
}

.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: center;
  margin-bottom: 8px;
}
.footer-links a {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--teal-dk);
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }

/* ── ユーティリティ ── */
.hidden { display: none !important; }
.fallback-note { font-size: 12px; color: var(--text-muted); margin-top: 8px; padding: 8px 12px; background: var(--card-tint); border-left: 3px solid var(--border); border-radius: 8px; line-height: 1.7; }
.header-primary { color: var(--teal-dk) !important; }
.card-body { font-size: 14px; line-height: 1.85; color: var(--text); }
.link-btn { display: block; text-align: center; text-decoration: none; margin-top: 16px; }

/* ── CTA ボタン縦並び ── */
.cta-actions {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 10px;
}
.cta-actions a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  text-align: center;
}
.cta-actions a svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; fill: none; }

/* ── レスポンシブ ── */
@media (max-width: 400px) {
  .welcome-hero h1 { font-size: 23px; }
  .score-number { font-size: 54px; }
  .stage-timeline { gap: 4px; padding: 16px 8px; }
  .stage-name { font-size: 12px; }
  .btn-cta { width: 100%; }
}

/* ── 送信失敗の表示（申込み・診断結果の送信） ── */
.send-error { margin: 0 0 16px; padding: 14px 16px; background: var(--orange-soft); border-left: 4px solid var(--warning); border-radius: 12px; line-height: 1.8; font-size: 14px; color: var(--text); }
.send-error__title { margin: 0 0 6px; font-weight: 700; color: var(--warning); }
.send-error__text { margin: 0 0 8px; }
.send-error__retry { margin: 4px 0 8px; }
.send-error__code { margin: 4px 0 0; font-size: 12px; color: var(--text-muted); word-break: break-all; }
.btn-secondary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
