/* ============================================================
   心とお金の健康診断
   preview.html デザイン準拠
   クリーム × ゴールドパレット（温かみ・プレミアム感）
   ============================================================ */

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

:root {
  --bg:          #fffaf4;
  --bg-soft:     #fff6ea;
  --cream:       #fff9ec;
  --gold:        #c79a43;
  --gold-2:      #e4c372;
  --gold-lt:     #f5e3a8;
  --gold-pale:   rgba(199,154,67,.10);
  --brown:       #4a392b;
  --brown-2:     #6b5440;
  --muted:       #8a7a68;
  --text:        #3a2c1e;
  --text-mid:    #5c4c3a;
  --text-lt:     #9a8b7a;
  --line:        rgba(90,70,52,.14);
  --white:       #ffffff;
  --surface:     rgba(255,254,250,.94);

  /* シャドウ */
  --shadow-soft: 0 18px 48px rgba(120,85,38,.09);
  --shadow-sm:   0 6px 18px rgba(67,48,24,.06);
  --shadow-gold: 0 16px 34px rgba(145,97,32,.22);

  /* 角丸 */
  --radius:      24px;
  --radius-sm:   14px;
  --radius-pill: 999px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, #fff8ee 50%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   共通ユーティリティ
   ============================================================ */
.screen        { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* アンバーテキスト（グラデーション） */
.amber {
  color: transparent;
  background: linear-gradient(135deg, #94651e 0%, #c9953f 46%, #e4c674 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* 仕切り線 */
.gold-rule {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 24px 0;
  opacity: .45;
}

/* ============================================================
   カバー画面
   ============================================================ */
#cover {
  position: relative;
  overflow: hidden;
}
#cover.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 56px 20px 72px;
  background:
    radial-gradient(circle at 72% 18%, rgba(228,195,114,.28) 0%, transparent 44%),
    radial-gradient(circle at 22% 82%, rgba(199,154,67,.18) 0%, transparent 38%),
    linear-gradient(160deg, #fff9ee 0%, var(--bg) 55%, #fff5e0 100%);
}

/* 額縁ボーダー */
#cover::before {
  content: '';
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(199,154,67,.22);
  border-radius: 32px;
  pointer-events: none;
  z-index: 0;
}

/* 右下グラデーション装飾 */
#cover::after {
  content: '';
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(228,195,114,.22) 0%, transparent 64%);
  border-radius: 50%;
  pointer-events: none;
}

/* 上部ゴールドライン */
.cover-amber-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--gold-2), var(--gold), transparent);
}

/* カバー内コンテンツ */
.cover-inner {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  padding: 56px clamp(28px, 5vw, 64px) 52px;
  border-radius: 34px;
  text-align: center;
  background:
    radial-gradient(circle at 82% 8%, rgba(228,195,114,.26), transparent 38%),
    linear-gradient(155deg, rgba(255,254,250,.96), rgba(255,248,236,.94) 60%, rgba(255,242,218,.92));
  border: 1px solid rgba(199,154,67,.20);
  box-shadow:
    0 32px 72px rgba(120,85,38,.12),
    inset 0 1px 0 rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
}

/* 装飾ライン＋ダイヤ */
.cover-deco-line,
.hero-deco {
  position: relative;
  width: 104px;
  height: 1px;
  margin: 0 auto 26px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.cover-deco-diamond,
.hero-deco-gem {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  border: 2px solid var(--bg-soft);
  box-shadow: 0 0 0 1px rgba(185,138,59,.3);
}

/* ブランドラベル */
.cover-label,
.result-hero-label,
.quiz-brand {
  margin: 0;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

/* カバータイトル */
.cover-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(36px, 6.5vw, 64px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .07em;
  color: var(--brown);
  margin: 18px 0 20px;
}

/* サブテキスト */
.cover-sub {
  margin: 0 auto;
  max-width: 580px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.95;
}
.cover-sub strong {
  color: var(--brown);
  font-weight: 700;
  background: linear-gradient(transparent 62%, rgba(215,180,106,.35) 62%);
}

/* バッジ群 */
.cover-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 34px;
}
.cover-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  color: var(--brown-2);
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(185,138,59,.22);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  letter-spacing: .03em;
}

/* スタートボタン */
.btn-start {
  position: relative;
  appearance: none;
  border: none;
  cursor: pointer;
  min-width: 260px;
  padding: 18px 36px;
  border-radius: var(--radius-pill);
  color: #fffaf0;
  background: linear-gradient(135deg, #3b2b1d 0%, #6c4b28 42%, #b98a3b 100%);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .08em;
  box-shadow: 0 16px 36px rgba(94,64,28,.26);
  transition: transform .22s ease, box-shadow .22s ease;
}
.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(94,64,28,.30);
}

/* ============================================================
   クイズ画面
   ============================================================ */
#quiz {
  display: none;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255,253,248,.82), rgba(246,239,226,.92));
  /* 横スクロールを完全に封じる */
  overflow-x: hidden;
  width: 100%;
}
#quiz.active { display: flex; }

.quiz-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px clamp(20px, 5vw, 64px);
  background: rgba(255,253,248,.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.quiz-brand {
  font-size: 11px;
  letter-spacing: .16em;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: min(360px, 46vw);
}

.progress-bar {
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(90,70,52,.12);
}

#progress-fill {
  height: 100%;
  width: 1.67%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transition: width .3s ease;
}

#progress-text {
  min-width: 56px;
  color: var(--brown-2);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.quiz-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 52px 20px;
  /* はみ出し防止 */
  min-width: 0;
  overflow-x: hidden;
}

.question-card {
  width: 100%;
  max-width: 740px;
  /* box-sizing が確実に効くよう明示 */
  box-sizing: border-box;
  padding: 48px clamp(24px, 5vw, 52px);
  border-radius: var(--radius);
  background: rgba(255,253,248,.94);
  border: 1px solid rgba(185,138,59,.18);
  box-shadow: var(--shadow-soft);
  /* 内部要素のはみ出し防止 */
  overflow: hidden;
}

.q-number {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: 'Noto Serif JP', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .14em;
}

.q-text {
  margin: 0 0 34px;
  color: var(--brown);
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(18px, 2.8vw, 26px);
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: .045em;
  min-height: 48px;
}

/* ────────────────────────────
   縦型カード型 回答UI
──────────────────────────── */
.choice-ui {
  display: flex;
  flex-direction: column;
  gap: 10px;
  user-select: none;
  /* はみ出し防止 */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.choice-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 14px 18px;
  border-radius: 16px;
  border: 2px solid rgba(90,70,52,.12);
  background: rgba(255,253,248,.85);
  color: var(--brown-2);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .15s, box-shadow .18s;
  box-shadow: 0 2px 10px rgba(90,60,24,.04);
}

.choice-btn:hover {
  border-color: rgba(199,154,67,.38);
  background: linear-gradient(135deg, #fffdf8, #fff8e8);
  box-shadow: 0 6px 20px rgba(94,64,28,.10);
  transform: translateY(-1px);
}

.choice-btn.selected {
  border-color: var(--gold);
  background: linear-gradient(135deg, #fffdf2, #fff3d0);
  box-shadow: 0 0 0 3px rgba(199,154,67,.15), 0 6px 20px rgba(94,64,28,.10);
  transform: translateY(-1px);
}

/* 左の数字バッジ */
.choice-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(199,154,67,.14), rgba(199,154,67,.06));
  border: 1.5px solid rgba(199,154,67,.22);
  color: var(--brown-2);
  font-family: 'Noto Serif JP', serif;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s;
}

.choice-btn.selected .choice-score {
  background: linear-gradient(135deg, #c07c20, var(--gold), var(--gold-2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(145,97,32,.32);
  transform: scale(1.05);
}

.choice-label {
  flex: 1;
  color: var(--brown-2);
}

.choice-btn.selected .choice-label {
  color: var(--brown);
  font-weight: 700;
}

/* オプション（選択肢ボタン） */
.options { display: grid; gap: 12px; }

.options button,
.option-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  width: 100%;
  padding: 17px 20px;
  border-radius: 18px;
  color: var(--text);
  background: #fffaf2;
  border: 1px solid rgba(90,70,52,.14);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  text-align: left;
  box-shadow: 0 8px 24px rgba(67,48,24,.05);
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease;
}
.options button:hover,
.option-btn:hover,
.options button.selected,
.option-btn.selected {
  transform: translateY(-1px);
  border-color: rgba(185,138,59,.42);
  background: linear-gradient(180deg, #fffdf8, #fff3db);
  box-shadow: 0 14px 28px rgba(94,64,28,.12);
}

/* フッター */
.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 5vw, 64px) 26px;
}

.btn-back {
  appearance: none;
  min-width: 130px;
  padding: 12px 18px;
  border: 1px solid rgba(90,70,52,.18);
  border-radius: var(--radius-pill);
  color: var(--brown-2);
  background: rgba(255,253,248,.72);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s;
}
.btn-back:hover:not(:disabled) {
  background: rgba(255,248,236,.95);
}
.btn-back:disabled { opacity: .35; cursor: not-allowed; }

.quiz-count { font-size: 12px; color: var(--muted); font-weight: 600; }
.quiz-count span { color: var(--gold); font-weight: 700; }

/* ============================================================
   ローディング
   ============================================================ */
#loading {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(180deg, var(--bg) 0%, #fff8ee 100%);
}
#loading.active { display: flex; }

.loading-inner {
  width: min(400px, 100%);
  padding: 48px 36px;
  border-radius: 30px;
  background: rgba(255,254,250,.96);
  border: 1px solid rgba(185,138,59,.18);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 3px solid rgba(185,138,59,.18);
  border-top-color: var(--gold);
  animation: spin .9s linear infinite;
}

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

.loading-title {
  margin: 0 0 6px;
  color: var(--brown);
  font-family: 'Noto Serif JP', serif;
  font-size: 22px;
  font-weight: 700;
}

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

/* ============================================================
   結果画面
   ============================================================ */
#result {
  background: #fbf6ed;
}

.result-wrap {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ヒーロー（parts-onlyスタイル） */
.result-hero {
  padding: 52px 0 32px;
}

.result-hero-inner {
  position: relative;
  overflow: hidden;
  padding: 48px clamp(24px, 5vw, 56px);
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 0%, rgba(228,195,114,.34), transparent 44%),
    linear-gradient(135deg, rgba(255,254,250,.98), rgba(255,248,236,.97) 58%, rgba(255,243,220,.95));
  border: 1px solid rgba(199,154,67,.24);
  box-shadow: 0 24px 58px rgba(120,85,38,.10);
  text-align: center;
}

/* 内側額縁ボーダー */
.result-hero-inner::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(199,154,67,.14);
  border-radius: 26px;
  pointer-events: none;
}

/* 装飾パーツ */
.result-hero-part {
  position: absolute;
  pointer-events: none;
  opacity: .7;
}
.result-hero-part-left {
  left: -18px;
  top: 18px;
  width: 120px;
  height: 120px;
  background:
    radial-gradient(circle at 28% 28%, rgba(199,154,67,.12) 0 16%, transparent 17%),
    radial-gradient(circle at 58% 62%, rgba(92,155,211,.10) 0 12%, transparent 13%),
    linear-gradient(135deg, rgba(199,154,67,.12), rgba(199,154,67,.02));
  border-radius: 36% 64% 62% 38% / 38% 46% 54% 62%;
  filter: blur(.2px);
}
.result-hero-part-right {
  right: -26px;
  bottom: -10px;
  width: 150px;
  height: 95px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(199,154,67,.16), rgba(199,154,67,.04));
  transform: rotate(-14deg);
}
.result-hero-part-right::before,
.result-hero-part-right::after {
  content: '';
  position: absolute;
  height: 2px;
  border-radius: 999px;
  background: rgba(199,154,67,.28);
  left: 22px;
  right: 22px;
}
.result-hero-part-right::before { top: 28px; }
.result-hero-part-right::after  { top: 48px; }

.result-hero-label {
  font-size: 11px;
  letter-spacing: .22em;
  font-weight: 700;
  color: #8a7a68;
  margin-bottom: 18px;
}

.result-hero-title {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  color: var(--brown);
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .06em;
}

.result-hero-sub {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 16px auto 0;
  font-size: 14px;
  line-height: 1.95;
  color: var(--muted);
}

/* ミニパーツ装飾 */
.result-mini-parts {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.mini-part { display: inline-block; position: relative; }
.mini-part-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 0 0 5px rgba(199,154,67,.10);
}
.mini-part-line {
  width: 56px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(199,154,67,0), rgba(199,154,67,.55), rgba(199,154,67,0));
}
.mini-part-leaf {
  width: 20px;
  height: 12px;
  border-radius: 100% 0 100% 0;
  transform: rotate(22deg);
  background: linear-gradient(135deg, rgba(92,155,211,.35), rgba(199,154,67,.35));
}

/* ============================================================
   result-section 共通
   ============================================================ */
.result-section {
  position: relative;
  margin-top: 22px;
  padding: 32px clamp(20px, 4vw, 40px);
  border-radius: 28px;
  background: rgba(255,254,250,.96);
  border: 1px solid rgba(90,70,52,.12);
  box-shadow: 0 12px 34px rgba(120,85,38,.06);
}

/* セクション右上装飾ドット */
.result-section::after {
  content: '';
  position: absolute;
  top: 18px;
  right: 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199,154,67,.18) 0 36%, transparent 38%);
  opacity: .8;
  pointer-events: none;
}

.section-header { margin-bottom: 22px; }

.section-title {
  position: relative;
  margin: 0 0 8px;
  padding-left: 18px;
  color: var(--brown);
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(18px, 2.8vw, 24px);
  font-weight: 700;
  letter-spacing: .045em;
}
.section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: .38em;
  width: 7px;
  height: 1.2em;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
}

.section-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* ============================================================
   総合スコア
   ============================================================ */
.total-score-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px 32px;
  align-items: center;
  padding: 28px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fffdf8, #fff8ec);
  border: 1px solid rgba(185,138,59,.18);
}

.score-display { white-space: nowrap; }

.score-big {
  color: var(--brown);
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(52px, 8vw, 80px);
  font-weight: 700;
  line-height: 1;
}

.score-max {
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.score-meter-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.score-meter-track {
  flex: 1;
  height: 10px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(90,70,52,.12);
}

.score-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  transition: width 1.2s ease;
}

.score-pct-label {
  min-width: 46px;
  color: var(--brown-2);
  font-size: 14px;
  font-weight: 700;
}

.total-comment-wrap {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 4px;
}

.level-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  color: #fffdf8;
  background: linear-gradient(135deg, var(--brown), var(--gold));
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .04em;
}
/* レベル別バッジカラー（文字は常に白・コントラスト確保） */
/* 共通：axis-level / case-level / case-mini-level にも適用 */
/* high：ディープローズ（落ち着いたローズ系） */
.level-high,
.axis-level.level-high,
.case-level.level-high,
.case-mini-level.level-high {
  background: linear-gradient(135deg, #a83256, #c44a6e);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(168,50,86,.28);
}

/* mid：テラコッタ（ウォームアース系） */
.level-mid,
.axis-level.level-mid,
.case-level.level-mid,
.case-mini-level.level-mid {
  background: linear-gradient(135deg, #b0522a, #cc6a3c);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(176,82,42,.28);
}

/* low：アンバーゴールド（goldパレットと調和） */
.level-low,
.axis-level.level-low,
.case-level.level-low,
.case-mini-level.level-low {
  background: linear-gradient(135deg, #9a7820, #b8962a);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(154,120,32,.28);
}

/* none：セージグリーン（くすみグリーン系） */
.level-none,
.axis-level.level-none,
.case-level.level-none,
.case-mini-level.level-none {
  background: linear-gradient(135deg, #3d7a5c, #52966f);
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(61,122,92,.28);
}

.total-comment-text {
  color: var(--brown-2);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.8;
}

/* ============================================================
   全体傾向タイプ
   ============================================================ */
.tendency-card {
  border-radius: 22px;
  background: linear-gradient(180deg, #fffefb, #fff8ef);
  border: 1px solid rgba(90,70,52,.12);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.tendency-header {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, rgba(255,248,236,.95), rgba(255,252,245,.90));
  border-bottom: 1px solid rgba(185,138,59,.14);
}

.tendency-emoji { font-size: 36px; line-height: 1; }

.tendency-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 5px;
}

.tendency-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--brown);
}

.tendency-body { padding: 24px 28px; }

.tendency-desc {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.95;
  margin-bottom: 18px;
}

.tendency-msg {
  padding: 18px 22px;
  border-left: 4px solid var(--gold);
  background: rgba(228,195,114,.10);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.tendency-msg-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: .06em;
}

.tendency-msg-text { font-size: 14px; color: var(--brown-2); line-height: 1.9; }

/* ============================================================
   レーダーチャート
   ============================================================ */
.chart-wrap {
  padding: 8px 4px;
  border-radius: 22px;
  background: rgba(255,250,242,.80);
  border: 1px solid rgba(90,70,52,.08);
  overflow: visible;
}

.chart-wrap canvas {
  max-height: 560px;
  width: 100% !important;
  overflow: visible;
}

/* ============================================================
   軸スコアバー
   ============================================================ */
.axis-row { margin-bottom: 20px; }
.axis-row:last-child { margin-bottom: 0; }

/* 上段：emoji ＋ name ＋ level ＋ pct を1行で */
.axis-row-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: nowrap;
}

.axis-emoji { font-size: 16px; flex-shrink: 0; }
.axis-name  { font-size: 14px; font-weight: 700; color: var(--brown); white-space: nowrap; flex-shrink: 0; }

/* descは行を分けて表示 */
.axis-desc  {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 6px 24px; /* emoji幅分インデント */
  line-height: 1.5;
}

/* バッジをname・pctと同行に整列 */
.axis-level {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.axis-pct {
  font-size: 14px;
  font-weight: 700;
  min-width: 44px;
  text-align: right;
  color: var(--gold);
  margin-left: auto;
  flex-shrink: 0;
}

.axis-bar-track {
  height: 8px;
  background: rgba(90,70,52,.12);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.axis-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 1s ease;
}

/* ============================================================
   ケースカード（上位詳細）
   ============================================================ */
.case-card {
  border-radius: 22px;
  background: linear-gradient(180deg, #fffefb, #fff8ef);
  border: 1px solid rgba(90,70,52,.12);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 22px;
  transition: box-shadow .2s;
}
.case-card:hover { box-shadow: var(--shadow-soft); }
.case-card:last-child { margin-bottom: 0; }

.case-card-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(255,248,236,.90), rgba(255,252,245,.85));
  border-bottom: 1px solid rgba(185,138,59,.14);
}

.case-rank-badge {
  font-family: 'Noto Serif JP', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  min-width: 34px;
  flex-shrink: 0;
}

.case-header-info { flex: 1; min-width: 0; }

/* 病名行：病名＋スコアハーフを横並び */
.case-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.case-name {
  font-family: 'Noto Serif JP', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--brown);
  line-height: 1.4;
  flex: 1;
  min-width: 0;
}

.case-icon { margin-right: 5px; }

/* 軽小情報行：軽小タグ＋shortDescの横並び */
.case-header-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.case-axis-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 2px 10px;
  border: 1px solid rgba(199,154,67,.32);
  background: rgba(255,255,255,.70);
  color: var(--gold);
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  white-space: nowrap;
}

.case-short {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
}

.case-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.case-score-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(199,154,67,.32);
  background: linear-gradient(145deg, #fffdf8, #fff6e0);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(145,97,32,.16), inset 0 1px 0 rgba(255,255,255,.90);
}

.case-score-num {
  font-family: 'Noto Serif JP', serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.case-score-num small { font-size: 8px; }

.case-level {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* ボディ */
.case-card-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 20px; }

.section-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.tag-gold   { background: rgba(228,195,114,.15); color: var(--gold); border: 1px solid rgba(199,154,67,.24); }
.tag-dark   { background: var(--brown); color: #fff; }
.tag-danger { background: #fee2e2; color: #b91c1c; }
.tag-care   { background: #d1fae5; color: #065f46; }

.symptom-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.symptom-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.75;
}
.symptom-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
}

.case-body-text { font-size: 14px; color: var(--text-mid); line-height: 1.95; }

/* ── fmt() で生成されるテキスト要素 ── */
.fmt-text {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.95;
  margin: 0 0 8px;
}
.fmt-text:last-child { margin-bottom: 0; }

.fmt-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--brown);
  margin: 14px 0 6px;
  letter-spacing: .04em;
}
.fmt-heading:first-child { margin-top: 0; }

/* ・ 箇条書きリスト */
.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bullet-list li {
  position: relative;
  padding-left: 1.2em;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.75;
}
.bullet-list li::before {
  content: '・';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-weight: 700;
  line-height: 1.75;
}

/* ① 番号付きリスト */
.num-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.num-list li {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.75;
  padding-left: 0;
}

.prognosis-wrap {
  padding: 18px 20px;
  background: #fff9f9;
  border-radius: var(--radius-sm);
  border: 1px solid #fecaca;
}
.prognosis-text,
.prognosis-text .fmt-text,
.prognosis-text .bullet-list li,
.prognosis-text .num-list li { color: #7f1d1d !important; }
.prognosis-text .bullet-list li::before { color: #b91c1c !important; }

.care-wrap {
  padding: 20px 22px;
  background: rgba(228,195,114,.10);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(199,154,67,.22);
}

.advice-box {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(199,154,67,.24);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.75);
  border-left: 4px solid var(--gold);
}
.advice-label { font-size: 11px; font-weight: 700; color: var(--gold); margin-bottom: 7px; letter-spacing: .06em; }
.advice-text  { font-size: 14px; color: var(--brown-2); line-height: 1.9; }

/* ============================================================
   組み合わせ分析カード
   ============================================================ */
.combo-card {
  background: linear-gradient(145deg, #fff8ed, #fffcf5);
  border: 1.5px solid rgba(199,154,67,.28);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 6px 24px rgba(120,85,38,.08);
  transition: box-shadow .25s, transform .2s;
}
.combo-card:hover {
  box-shadow: 0 10px 32px rgba(120,85,38,.14);
  transform: translateY(-2px);
}
.combo-card:last-child { margin-bottom: 0; }

.combo-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 24px 16px;
  background: linear-gradient(135deg, rgba(255,248,232,.92), rgba(255,253,243,.88));
  border-bottom: 1px solid rgba(185,138,59,.14);
}

.combo-icon {
  font-size: 28px;
  line-height: 1;
  padding-top: 3px;
  flex-shrink: 0;
}

.combo-header-info { flex: 1; }

.combo-rank {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .10em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.combo-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--brown);
  line-height: 1.45;
}

.combo-cases {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 24px 0;
}

.combo-case-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--brown-2);
  background: rgba(199,154,67,.12);
  border: 1px solid rgba(199,154,67,.28);
  border-radius: 999px;
  padding: 4px 12px;
}

.combo-body {
  padding: 14px 24px 16px;
  font-size: 13.5px;
  color: var(--text-mid);
  line-height: 1.9;
}
.combo-body .fmt-heading {
  font-weight: 700;
  color: var(--brown);
  margin: 14px 0 6px;
  font-size: 13px;
}
.combo-body .fmt-text {
  margin-bottom: 8px;
}

.combo-quick-care {
  margin: 0 24px 20px;
  background: linear-gradient(135deg, rgba(199,154,67,.08), rgba(199,154,67,.04));
  border: 1px solid rgba(199,154,67,.22);
  border-radius: 14px;
  padding: 14px 18px;
}

.combo-care-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--gold);
  margin-bottom: 7px;
}

.combo-care-text {
  font-size: 13px;
  color: var(--brown-2);
  line-height: 1.8;
  font-weight: 500;
}

@media (max-width: 640px) {
  .combo-card-header { padding: 16px 18px 14px; }
  .combo-cases       { padding: 12px 18px 0; }
  .combo-body        { padding: 12px 18px 14px; }
  .combo-quick-care  { margin: 0 18px 16px; }
  .combo-title       { font-size: 14px; }
}

/* ============================================================
   傾向パターン分析
   ============================================================ */

/* サマリーカード */
.pa-summary-card {
  background: linear-gradient(145deg, rgba(255,248,232,.90), rgba(255,253,243,.85));
  border: 1.5px solid rgba(199,154,67,.24);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.pa-summary-header { margin-bottom: 14px; }

.pa-summary-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .10em;
  color: var(--gold);
  margin-bottom: 8px;
}

.pa-case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pa-case-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--brown-2);
  background: rgba(199,154,67,.10);
  border: 1px solid rgba(199,154,67,.24);
  border-radius: 999px;
  padding: 3px 10px;
}

.pa-axis-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.pa-axis-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}
.pa-axis-row:last-child { margin-bottom: 0; }

.pa-axis-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--brown-2);
  min-width: 80px;
  flex-shrink: 0;
}

.pa-axis-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(199,154,67,.12);
  border-radius: 99px;
  overflow: hidden;
}

.pa-axis-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #c79a43, #e4c372);
  border-radius: 99px;
  transition: width .6s ease;
}

.pa-axis-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  min-width: 24px;
  text-align: right;
}

/* パターンカード */
.pa-pattern-card {
  background: linear-gradient(145deg, #fff8ed, #fffcf5);
  border: 1.5px solid rgba(199,154,67,.26);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 4px 18px rgba(120,85,38,.07);
}
.pa-pattern-card:last-child { margin-bottom: 0; }

.pa-pattern-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 14px;
  background: linear-gradient(135deg, rgba(255,248,232,.92), rgba(255,253,243,.88));
  border-bottom: 1px solid rgba(185,138,59,.12);
}

.pa-pattern-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.pa-pattern-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--brown);
  line-height: 1.45;
}

.pa-pattern-body {
  padding: 14px 20px 12px;
}

.pa-body-text {
  font-size: 13.5px;
  color: var(--text-mid);
  line-height: 1.9;
  margin-bottom: 8px;
}
.pa-body-text:last-child { margin-bottom: 0; }
.pa-body-text strong { color: var(--brown); font-weight: 700; }

.pa-quick-care {
  margin: 0 20px 16px;
  background: linear-gradient(135deg, rgba(199,154,67,.08), rgba(199,154,67,.04));
  border: 1px solid rgba(199,154,67,.20);
  border-radius: 12px;
  padding: 12px 16px;
}

.pa-care-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--gold);
  margin-bottom: 6px;
}

.pa-care-text {
  font-size: 13px;
  color: var(--brown-2);
  line-height: 1.8;
  font-weight: 500;
}

@media (max-width: 640px) {
  .pa-summary-card   { padding: 14px 16px; }
  .pa-pattern-header { padding: 14px 16px 12px; gap: 10px; }
  .pa-pattern-icon   { font-size: 20px; }
  .pa-pattern-title  { font-size: 13px; }
  .pa-pattern-body   { padding: 12px 16px 10px; }
  .pa-quick-care     { margin: 0 16px 14px; }
  .pa-axis-name      { min-width: 70px; font-size: 11px; }
}

/* ============================================================
   全ケース一覧
   ============================================================ */
.case-group { margin-bottom: 24px; }
.case-group:last-child { margin-bottom: 0; }

.case-group-title {
  font-family: 'Noto Serif JP', serif;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(199,154,67,.30);
  color: var(--brown);
}

.case-mini {
  padding: 13px 18px;
  background: rgba(255,253,248,.80);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid rgba(90,70,52,.10);
  transition: border-color .2s, background .2s;
}
.case-mini:hover {
  border-color: rgba(199,154,67,.36);
  background: rgba(255,248,236,.90);
}

.case-mini-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.case-mini-icon  { font-size: 14px; }
.case-mini-name  { font-size: 13px; font-weight: 500; flex: 1; color: var(--brown-2); }
.case-mini-level { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); }
.case-mini-pct   { font-size: 13px; font-weight: 700; min-width: 40px; text-align: right; color: var(--gold); }

/* ============================================================
   まとめ・クロージング
   ============================================================ */
.closing-section {
  background: linear-gradient(180deg, #fffefb, rgba(255,253,248,.95));
}

.closing-stage {
  margin: 0 0 16px;
  color: var(--brown);
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  font-weight: 700;
}

.closing-message-box {
  padding: 24px;
  border-radius: 18px;
  background: rgba(255,253,248,.95);
  border: 1px solid rgba(185,138,59,.18);
  margin-bottom: 20px;
}

.closing-p {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 2;
  margin-bottom: 14px;
}
.closing-p:last-child { margin-bottom: 0; }

.closing-extra {
  margin-top: 18px;
  padding: 22px;
  border-radius: 18px;
  background: rgba(58,44,32,.04);
  border: 1px solid rgba(90,70,52,.08);
}

.closing-extra-title {
  margin: 0 0 12px;
  color: var(--brown);
  font-weight: 700;
  font-size: 14px;
}

.closing-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.closing-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--brown-2);
  line-height: 1.75;
}
.closing-list li::before {
  content: '✓';
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  margin-top: 1px;
  flex-shrink: 0;
}

.no-result { font-size: 14px; color: var(--muted); text-align: center; padding: 20px; }

/* ============================================================
   CTA
   ============================================================ */
.result-cta {
  position: relative;
  overflow: hidden;
  margin-top: 22px;
  padding: 44px clamp(24px, 5vw, 56px);
  border-radius: 32px;
  color: var(--brown);
  background:
    radial-gradient(circle at 18% 0%, rgba(228,195,114,.30), transparent 36%),
    linear-gradient(135deg, #fffefb, #fff6e2 58%, #f7e4bd);
  border: 1px solid rgba(199,154,67,.28);
  box-shadow: 0 18px 46px rgba(120,85,38,.10);
  text-align: center;
}
.result-cta::before {
  content: '';
  position: absolute;
  left: -38px;
  bottom: -34px;
  width: 120px;
  height: 120px;
  border-radius: 42% 58% 54% 46% / 54% 38% 62% 46%;
  background: linear-gradient(135deg, rgba(199,154,67,.10), rgba(92,155,211,.04));
  pointer-events: none;
}
.result-cta::after {
  content: '';
  position: absolute;
  right: 28px;
  top: 24px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(199,154,67,.18);
  border-radius: 50%;
  pointer-events: none;
}

.cta-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  margin: 0 0 12px;
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  color: #9b7a34;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(199,154,67,.24);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  position: relative;
  z-index: 1;
}

.cta-lead {
  position: relative;
  z-index: 1;
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 700;
  color: var(--brown);
  margin: 0 0 10px;
  line-height: 1.55;
}

.cta-sub {
  position: relative;
  z-index: 1;
  margin: 0 auto 26px;
  max-width: 640px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.95;
}

.cta-btns {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0 0 18px;
}

.btn-cta-main,
.btn-cta-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .05em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, border-color .22s ease;
}

.btn-cta-main {
  min-width: 260px;
  color: #fffdf8;
  background: linear-gradient(135deg, #9f7430 0%, var(--gold) 48%, var(--gold-2) 100%);
  box-shadow: var(--shadow-gold);
}
.btn-cta-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(145,97,32,.30);
}

.btn-cta-sub {
  min-width: 200px;
  color: var(--brown);
  background: rgba(255,253,248,.80);
  border: 1px solid rgba(199,154,67,.32);
  box-shadow: 0 10px 26px rgba(120,85,38,.08);
}
.btn-cta-sub:hover {
  transform: translateY(-2px);
  border-color: rgba(199,154,67,.52);
  background: #fffaf0;
  box-shadow: 0 16px 32px rgba(120,85,38,.12);
}

/* 再診断ボタン（静かなスタイル） */
.btn-retake {
  display: inline-block;
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  color: #fffdf8;
  background: linear-gradient(135deg, var(--brown), var(--gold));
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
  transition: transform .22s ease, box-shadow .22s ease;
}
.btn-retake:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(94,64,28,.28);
}

.btn-retake-quiet {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0 auto;
  padding: 8px 14px;
  color: #8a7a68;
  background: transparent;
  border: none;
  box-shadow: none;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color .18s;
}
.btn-retake-quiet:hover { color: var(--brown); }

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 820px) {
  .screen.active { min-height: 100dvh; }

  #cover.active { padding: 34px 16px 56px; }
  #cover::before { inset: 14px; border-radius: 24px; }

  .cover-inner {
    padding: 44px 22px 38px;
    border-radius: 26px;
  }

  .cover-sub { font-size: 14px; text-align: left; }
  .cover-sub br { display: none; }

  .btn-start { width: 100%; min-width: 0; }

  .quiz-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
  }

  .progress-row { width: 100%; min-width: 0; }

  .quiz-body {
    align-items: flex-start;
    padding: 16px 10px 24px;
    overflow-x: hidden;
  }

  .question-card {
    width: 100%;
    max-width: 100%;
    padding: 24px 16px;
    border-radius: 18px;
    overflow: hidden;
  }

  .quiz-footer { padding: 14px 16px 22px; }

  .result-wrap { padding: 0 4px 54px; }

  .result-hero { padding: 20px 0 12px; }
  .result-hero-inner { padding: 30px 16px; border-radius: 22px; }
  .result-hero-inner::before { inset: 8px; border-radius: 16px; }

  .result-section {
    margin-top: 10px;
    padding: 16px 12px;
    border-radius: 16px;
  }

  /* レーダーチャート：スマホでは section のパディング内で最大化 */
  .chart-wrap {
    padding: 4px 0;
    border-radius: 16px;
  }
  .chart-wrap canvas {
    max-height: none !important;
    height: calc(100vw - 56px) !important;
    width: 100% !important;
  }

  .total-score-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }

  .total-comment-wrap { flex-direction: column; align-items: flex-start; }

  .result-cta { padding: 26px 16px; border-radius: 20px; }
}

@media (max-width: 640px) {
  .case-card-header { padding: 14px 14px; }
  .case-card-body   { padding: 18px 14px; }
  .case-header-top  { gap: 6px; margin-bottom: 6px; }
  .case-name        { font-size: 13.5px; }
  .case-score-circle { width: 42px; height: 42px; }
  .case-score-num   { font-size: 12px; }
  .cta-btns { flex-direction: column; align-items: stretch; gap: 12px; }
  .btn-cta-main, .btn-cta-sub { width: 100%; min-width: 0; }
  /* choice-ui: スマホで辺の変更は不要 */
  .choice-btn { padding: 13px 14px; font-size: 14px; }
  /* モバイルではdescは別行のまま（既にblock表示）*/
  .axis-row-header { flex-wrap: wrap; gap: 6px; }
  .axis-desc { margin-left: 22px; }
  /* クイズ画面 */
  .quiz-body { padding: 12px 6px 20px; overflow-x: hidden; }
  .question-card { width: 100%; max-width: 100%; padding: 20px 14px; overflow: hidden; }
}

@media (max-width: 400px) {
  .case-mini-name { font-size: 12px; }
  .cover-title { font-size: 30px; }
  .choice-btn { padding: 11px 12px; font-size: 13px; gap: 10px; }
  .result-wrap { padding: 0 2px 40px; }
  .result-section { padding: 14px 10px; }
  .question-card { width: 100%; max-width: 100%; padding: 16px 10px; overflow: hidden; }
  .axis-name { font-size: 13px; }
  .axis-level { font-size: 10px; padding: 3px 9px; }
  .axis-pct { font-size: 13px; }
  .case-card-header { padding: 14px 12px; }
  .case-card-body   { padding: 14px 12px; }
  .tendency-header { padding: 18px 14px; }
  .tendency-body   { padding: 18px 14px; }
}

/* ============================================================
   PDF ダウンロードボタン
   ============================================================ */
.btn-pdf-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #3b2b1d 0%, #6c4b28 42%, #b98a3b 100%);
  color: #fffaf0;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  border: none;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(94,64,28,.24);
  transition: transform .22s ease, box-shadow .22s ease;
  text-decoration: none;
}
.btn-pdf-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(94,64,28,.30);
}
.btn-pdf-download svg {
  flex-shrink: 0;
}

/* PDF ダウンロードバナー（結果画面上部） */
.pdf-download-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 20px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fffdf8, #fff6e0);
  border: 1px solid rgba(199,154,67,.30);
  box-shadow: 0 8px 24px rgba(120,85,38,.08);
}
.pdf-banner-text strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 4px;
}
.pdf-banner-text span {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .pdf-download-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 16px;
  }
  .btn-pdf-download {
    justify-content: center;
    width: 100%;
  }
}

/* ============================================================
   印刷（PDF出力）専用スタイル
   ============================================================ */
@media print {
  /* 印刷時は結果画面のみ表示 */
  #cover, #quiz, #loading,
  .result-cta, .pdf-download-banner,
  .btn-pdf-download, .btn-retake-quiet,
  .result-section::after { display: none !important; }

  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  body {
    background: #fff !important;
    font-size: 12px;
    line-height: 1.6;
  }

  #result { display: block !important; background: #fff !important; }

  .result-wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 12px 20px !important;
    margin: 0 !important;
  }

  /* ヒーロー */
  .result-hero { padding: 12px 0 8px !important; }
  .result-hero-inner {
    padding: 20px 24px !important;
    border-radius: 12px !important;
    background: #fffaf4 !important;
    border: 1px solid #c79a43 !important;
    box-shadow: none !important;
  }
  .result-hero-part-left,
  .result-hero-part-right { display: none !important; }

  .result-hero-title { font-size: 20px !important; margin: 8px 0 0 !important; }
  .result-hero-sub   { font-size: 11px !important; }

  /* セクション */
  .result-section {
    margin-top: 10px !important;
    padding: 14px 16px !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    border: 1px solid rgba(90,70,52,.18) !important;
    page-break-inside: avoid;
  }

  .section-title { font-size: 14px !important; }
  .section-note  { font-size: 11px !important; }

  /* 総合スコア */
  .score-big { font-size: 48px !important; }
  .total-score-card {
    padding: 14px !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    border: 1px solid rgba(185,138,59,.30) !important;
  }

  /* レーダーチャート */
  .chart-wrap {
    padding: 8px !important;
    border: 1px solid rgba(90,70,52,.12) !important;
    box-shadow: none !important;
  }
  .chart-wrap canvas { max-height: 300px !important; }

  /* ケースカード */
  .case-card {
    page-break-inside: avoid;
    margin-bottom: 10px !important;
    box-shadow: none !important;
    border: 1px solid rgba(90,70,52,.18) !important;
  }
  .case-card-header { padding: 12px 16px !important; }
  .case-card-body   { padding: 12px 16px !important; gap: 12px !important; }
  .case-name        { font-size: 13px !important; }
  .case-body-text,
  .fmt-text         { font-size: 12px !important; }

  /* バッジ・レベル */
  .level-high { background: #a83256 !important; color: #fff !important; }
  .level-mid  { background: #b0522a !important; color: #fff !important; }
  .level-low  { background: #9a7820 !important; color: #fff !important; }
  .level-none { background: #3d7a5c !important; color: #fff !important; }

  /* 軸スコア */
  .axis-bar-track { background: #eee !important; }
  .axis-row { margin-bottom: 10px !important; }

  /* tendency */
  .tendency-card { box-shadow: none !important; border: 1px solid rgba(90,70,52,.15) !important; }
  .tendency-header { padding: 12px 16px !important; }
  .tendency-body   { padding: 12px 16px !important; }
  .tendency-desc, .tendency-msg-text { font-size: 12px !important; }

  /* ページ区切り */
  .result-section.closing-section { page-break-before: always; }

  /* フッター情報 */
  .pdf-footer-note {
    display: block !important;
    text-align: center;
    font-size: 10px;
    color: #8a7a68;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(90,70,52,.15);
  }
}
