/* 限界度チェック — Light SaaS風（ぱうう型リファレンス準拠）
   白背景・カードUI・グリーン系アクセント・信頼感優先 */

:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --ink: #1c2430;
  --ink-sub: #5c6672;
  --line: #e6e8ea;
  --accent: #0f766e;        /* teal green: CTA */
  --accent-dark: #115e59;
  --accent-soft: #e6f2f0;
  --warn: #b45309;
  --bar-from: #14b8a6;
  --bar-to: #f59e0b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .07), 0 8px 24px rgba(16, 24, 40, .05);
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 16px 16px 64px; }

/* PR表記: 明瞭表示（ステマ規制対応） */
.pr-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: #374151;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; margin-bottom: 14px;
}
.pr-chip {
  display: inline-flex; align-items: center; justify-content: center;
  background: #374151; color: #fff;
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
  border-radius: 4px; padding: 2px 7px; line-height: 1.4; white-space: nowrap;
}
.offer-card .pr-chip { background: #6b7280; }

/* 画面切り替え */
.screen { display: none; opacity: 0; transform: translateY(8px); }
.screen.active { display: block; animation: fadein .3s ease forwards; }
@keyframes fadein { to { opacity: 1; transform: none; } }

.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; margin-bottom: 8px; }

h1 { font-size: 26px; font-weight: 700; line-height: 1.45; margin-bottom: 14px; }
h2 { font-size: 21px; font-weight: 700; line-height: 1.55; margin: 14px 0 18px; }
h3 { font-size: 14px; color: var(--ink-sub); font-weight: 700; letter-spacing: .04em; margin-bottom: 10px; }

.lead { color: var(--ink-sub); font-size: 14.5px; margin-bottom: 24px; }
.micro { color: var(--ink-sub); font-size: 12px; margin-top: 12px; }
.accent { color: var(--accent); }

/* カード */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin: 12px 0;
}

/* ボタン */
.btn {
  display: block; width: 100%; text-align: center; cursor: pointer;
  border: none; border-radius: 10px;
  font-family: inherit; font-size: 15.5px; font-weight: 700;
  padding: 14px 18px; min-height: 44px;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(15, 118, 110, .25); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--accent-soft); }

/* ===== 質問画面 ===== */
.quiz-grid { display: block; }
@media (min-width: 880px) {
  .quiz-grid { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
}

.progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.btn-back {
  background: #fff; border: 1px solid var(--line); color: var(--ink-sub);
  border-radius: 8px; width: 38px; height: 38px; min-width: 38px; font-size: 15px; cursor: pointer;
}
.progress-track { flex: 1; height: 6px; background: #e9ebec; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .3s ease; }
.progress-label { font-size: 12px; color: var(--ink-sub); min-width: 42px; text-align: right; font-weight: 700; }

.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  background: #fff; border: 1.5px solid var(--line); color: var(--ink);
  border-radius: var(--radius); padding: 14px 16px; min-height: 44px;
  font-family: inherit; text-align: left; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.choice:hover { border-color: var(--accent); }
.choice.selected { border-color: var(--accent); background: var(--accent-soft); }
.choice .c-main { display: block; font-size: 15px; font-weight: 700; }
.choice .c-sub { display: block; font-size: 12.5px; color: var(--ink-sub); margin-top: 2px; }

/* ライブプレビュー */
.preview { margin-top: 16px; }
@media (min-width: 880px) { .preview { margin-top: 0; position: sticky; top: 16px; } }
.preview .eyebrow { margin-bottom: 4px; }
.pv-count { font-size: 12px; color: var(--ink-sub); margin-bottom: 12px; }
.pv-bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.pv-bar-label { font-size: 12px; color: var(--ink-sub); min-width: 84px; }
.pv-bar-track { flex: 1; height: 8px; background: #eceeef; border-radius: 4px; overflow: hidden; }
.pv-bar-fill { height: 100%; width: 0; border-radius: 4px; background: var(--accent); transition: width .35s ease; }
.pv-bar-num { font-size: 12px; font-weight: 700; min-width: 26px; text-align: right; }
.pv-hint {
  background: var(--accent-soft); border-radius: 10px;
  padding: 10px 12px; font-size: 12.5px; margin-top: 12px; color: var(--ink);
}
.pv-hint b { color: var(--accent-dark); }

/* ===== 結果画面 ===== */
.result-grid { display: block; }
@media (min-width: 880px) {
  .result-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
}

.best-label { color: #b91c1c; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.result-name { font-size: 28px; font-weight: 700; margin: 4px 0 8px; }
.result-desc { color: var(--ink-sub); font-size: 14.5px; margin-bottom: 14px; }

.match-big { display: flex; align-items: center; gap: 14px; margin: 10px 0 16px; }
.match-num { font-size: 40px; font-weight: 700; color: var(--ink); font-family: Inter, system-ui, sans-serif; }
.match-track { flex: 1; height: 10px; background: #eceeef; border-radius: 5px; overflow: hidden; }
.match-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--bar-from), var(--bar-to)); transition: width .6s ease; }

.type-rank .tr-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px;
}
.type-rank .tr-row:last-child { border-bottom: none; }
.tr-badge {
  width: 24px; height: 24px; min-width: 24px; border-radius: 6px;
  background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.tr-name { font-weight: 700; }
.tr-sub { font-size: 11.5px; color: var(--ink-sub); display: block; }
.tr-pct { margin-left: auto; font-weight: 700; color: var(--warn); font-family: Inter, system-ui, sans-serif; }

/* 案件カード */
.offer-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 10px 0; background: #fff; }
.offer-card.top { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.offer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.offer-name { font-size: 16.5px; font-weight: 700; }
.offer-pct {
  background: var(--accent-soft); color: var(--accent-dark);
  border-radius: 20px; font-size: 12px; font-weight: 700; padding: 3px 10px; white-space: nowrap;
}
.offer-desc { font-size: 13px; color: var(--ink-sub); margin: 8px 0; }
.offer-points { list-style: none; margin: 10px 0 14px; }
.offer-points li { font-size: 13px; padding-left: 22px; position: relative; margin: 4px 0; }
.offer-points li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.cta-box { margin: 16px 0; }
.cta-note { font-size: 12px; color: var(--ink-sub); margin-top: 8px; }

.soft-block { background: var(--accent-soft); border: none; }
.share-row { display: flex; gap: 10px; margin-top: 16px; }
.share-row .btn { flex: 1; font-size: 13.5px; padding: 12px; }
.disclaimer { margin-top: 22px; line-height: 1.9; }
