:root {
  --pink: #ff7ea1;
  --pink-deep: #ec5d86;
  --coral: #ffa48c;
  --peach: #ffe2d3;
  --lavender: #c9b6f7;
  --mint: #9fe3cb;
  --cream: #fff6f8;
  --card: #ffffff;
  --ink: #5c4a52;
  --muted: #a8939c;
  --line: #f6e2e9;
  --warn-bg: #fff6ec;
  --warn-line: #ffce92;
  --radius: 20px;
  --shadow: 0 6px 20px rgba(255, 126, 161, .14);
  --shadow-sm: 0 3px 10px rgba(255, 126, 161, .12);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 100% 0, #fff0f3 0, rgba(255,255,255,0) 60%),
    radial-gradient(100% 50% at 0 10%, #fdeffe 0, rgba(255,255,255,0) 55%),
    var(--cream);
  background-attachment: fixed;
  line-height: 1.8;
}
.wrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 16px; }

/* ヘッダー */
.site-header {
  background: linear-gradient(135deg, #ff9bb5 0%, var(--pink) 45%, var(--coral) 100%);
  color: #fff; padding: 26px 0 30px; text-align: center;
  border-radius: 0 0 28px 28px; box-shadow: var(--shadow);
}
.brand { margin: 0; font-size: 1.7rem; letter-spacing: .04em; font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,.08); }
.brand::before { content: "🌷 "; }
.tagline { margin: 6px 0 0; font-size: .92rem; opacity: .96; font-weight: 600; }

main { padding: 22px 16px 44px; }

/* リード */
.lead {
  background: var(--card); border: 2px solid #ffe3ea; border-radius: var(--radius);
  padding: 20px; margin: 4px 0 22px; box-shadow: var(--shadow); text-align: center;
}
.lead-big { margin: 0 0 8px; font-size: 1.25rem; font-weight: 800; line-height: 1.6; color: var(--pink-deep); }
.lead-big::before { content: "✨ "; }
.lead-big::after { content: " ✨"; }
.lead-sub { margin: 0 0 8px; color: var(--coral); font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hint { color: var(--muted); font-size: .84rem; margin: 6px 0 0; }

/* フィールドセット（カード） */
fieldset {
  background: var(--card); border: 2px solid #ffe6ec; border-radius: var(--radius);
  margin: 0 0 18px; padding: 18px 18px 20px; box-shadow: var(--shadow-sm);
}
legend {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; color: var(--pink-deep); padding: 0 8px; font-size: 1.05rem;
}
.parent { border-color: #ffdbe6; }
.parent::before, fieldset::before { }

/* ステップ番号バッジ */
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--pink), var(--coral)); color: #fff;
  font-size: 1rem; font-weight: 800; box-shadow: 0 3px 8px rgba(236,93,134,.3);
}

/* 入力 */
.field { display: block; margin: 14px 0 0; font-size: .95rem; font-weight: 700; color: #6b5560; }
.field select, .field input[type="number"], .field input[type="month"] {
  display: block; width: 100%; margin-top: 8px; padding: 13px 14px;
  font-size: 1rem; border: 2px solid var(--line); border-radius: 14px; background: #fffafc;
  font-family: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field select:focus, .field input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255,126,161,.15); }
.field input[type="number"] { max-width: 200px; }

/* ラジオ・チェック */
.radio, .check {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 6px;
  font-size: .98rem; cursor: pointer; border-radius: 12px; transition: background .15s;
}
.radio:hover, .check:hover { background: #fff3f6; }
.radio input, .check input { margin-top: 2px; width: 20px; height: 20px; flex: none; accent-color: var(--pink); cursor: pointer; }
.stack .radio, .stack .check { border-bottom: 1px dashed var(--line); }
.stack .radio:last-child, .stack .check:last-child { border-bottom: none; }

/* 就労入力 */
.work-fields { margin-top: 10px; padding: 14px; background: #fff4f7; border: 1.5px solid #ffe1ea; border-radius: 16px; }
.work-hint { margin: 0 0 8px; font-size: .84rem; color: var(--muted); }
.work-arrow { margin: 12px 0 4px; font-size: .85rem; color: var(--pink-deep); font-weight: 700; }
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.work-fields .field { margin-top: 4px; }
.work-fields .field input[type="number"] { max-width: none; }

/* 質問見出し */
.q { margin: 16px 0 8px; font-weight: 800; font-size: 1.02rem; color: #6b5560; }

/* 大きな選択肢カード */
.radio.big {
  align-items: flex-start; border: 2.5px solid var(--line); border-radius: 16px;
  padding: 16px; margin: 12px 0; background: #fffafc;
}
.radio.big:hover { background: #fff3f6; }
.radio.big:has(input:checked) { border-color: var(--pink); background: #fff0f5; box-shadow: 0 4px 14px rgba(255,126,161,.2); }
.big-label { line-height: 1.55; }
.big-label strong { font-size: 1.05rem; }
.big-label small { color: var(--muted); display: block; margin-top: 5px; font-size: .86rem; }
.big-label b { color: var(--pink-deep); }

/* 誕生月の案内 */
.birth-note {
  margin: 10px 0 0; padding: 14px 16px; border-radius: 14px; font-size: .9rem;
  color: #6b5560; line-height: 1.7; background: linear-gradient(135deg, #fff3ef, #fdeffe);
  border: 1.5px solid #ffe2ea;
}
.birth-note b { color: var(--pink-deep); }
.april-list { margin: 10px 0; padding-left: 1.3em; }
.april-list li { margin: 6px 0; }
.april-list li::marker { color: var(--coral); }

/* ボタン */
button.primary {
  width: 100%; padding: 17px; font-size: 1.15rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--pink) 0%, var(--coral) 100%);
  border: none; border-radius: 999px; cursor: pointer; margin-top: 8px;
  box-shadow: 0 8px 22px rgba(236,93,134,.32); letter-spacing: .04em;
  transition: transform .12s, box-shadow .12s;
}
button.primary::before { content: "💕 "; }
button.primary:hover { box-shadow: 0 10px 26px rgba(236,93,134,.42); }
button.primary:active { transform: translateY(2px) scale(.99); }

/* 結果 */
.result {
  background: var(--card); border: 2px solid #ffe3ea; border-radius: var(--radius);
  padding: 24px 20px; margin-top: 26px; box-shadow: var(--shadow); text-align: center;
}
.result h2 { margin: 0 0 8px; color: var(--pink-deep); font-size: 1.35rem; font-weight: 800; }
.result h2::before { content: "🎀 "; }
.result-lead { margin: 0 0 8px; font-size: .92rem; text-align: left; }
.result-lead b { color: var(--pink-deep); }
.result-note {
  margin: 0 0 16px; padding: 12px 14px; background: var(--warn-bg);
  border: 1.5px solid var(--warn-line); border-radius: 12px; font-size: .85rem; text-align: left;
}
.result-note b { color: var(--coral); }
.rank-badge {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 128px; height: 128px; border-radius: 50%; margin: 8px 0 10px;
  background: linear-gradient(135deg, #ff9bb5, var(--pink) 55%, var(--coral));
  color: #fff; box-shadow: 0 10px 28px rgba(236,93,134,.38), inset 0 -6px 14px rgba(0,0,0,.06);
  position: relative;
}
.rank-badge::after { content: "✨"; position: absolute; top: 6px; right: 12px; font-size: 1.1rem; }
.rank-letter { font-size: 3.4rem; font-weight: 800; line-height: 1; }
.rank-meta { font-size: .9rem; opacity: .95; margin-top: 2px; }
.rank-desc { margin: 0 0 4px; font-weight: 800; font-size: 1.05rem; color: #6b5560; }
.result h3 { margin: 24px 0 8px; font-size: 1.02rem; color: var(--pink-deep); text-align: left; }
.result h3::before { content: "🌸 "; }
.adj-total { margin: 0 0 10px; font-size: 1.15rem; text-align: left; }
.adj-total strong { color: var(--pink-deep); }
.breakdown { width: 100%; border-collapse: collapse; font-size: .9rem; text-align: left; }
.breakdown td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.breakdown td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; color: var(--pink-deep); }

.warnings { margin: 18px 0; text-align: left; }
.warn {
  background: var(--warn-bg); border: 1.5px solid var(--warn-line); border-radius: 14px;
  padding: 13px 15px; margin: 0 0 10px; font-size: .88rem;
}
.caveat { margin-top: 20px; padding: 16px; background: linear-gradient(135deg, #fff3f6, #fdeffe); border-radius: 14px; text-align: left; }
.caveat p { margin: 0 0 6px; }
.caveat p:last-child { margin-bottom: 0; }
.caveat b { color: var(--pink-deep); }

/* CTA */
.cta {
  background: linear-gradient(135deg, #fff3f6, #fff); border: 2px dashed var(--pink);
  border-radius: var(--radius); padding: 22px 18px; margin-top: 20px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.cta h2 { margin: 0 0 8px; font-size: 1.15rem; color: var(--pink-deep); font-weight: 800; }
.cta h2::before { content: "📩 "; }
.line-btn {
  display: inline-block; margin-top: 10px; padding: 13px 26px; background: #06c755; color: #fff;
  border-radius: 999px; text-decoration: none; font-weight: 800; box-shadow: 0 6px 16px rgba(6,199,85,.3);
}

/* 法務ページ */
.legal {
  background: var(--card); border: 2px solid #ffe6ec; border-radius: var(--radius);
  padding: 24px 20px; margin: 18px 0 24px; box-shadow: var(--shadow-sm); text-align: left;
}
.legal h1 { font-size: 1.4rem; color: var(--pink-deep); margin: 0 0 4px; }
.legal h1::before { content: "🌷 "; }
.legal .legal-meta { color: var(--muted); font-size: .82rem; margin: 0 0 18px; }
.legal h2 { font-size: 1.05rem; color: var(--pink-deep); margin: 22px 0 8px; padding-left: 10px; border-left: 4px solid var(--pink); }
.legal p, .legal li { font-size: .92rem; line-height: 1.85; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal a { color: var(--pink-deep); }
.legal dl { margin: 8px 0; }
.legal dl > div { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 10px 0; }
.legal dt { width: 170px; font-weight: 700; color: #6b5560; }
.legal dd { margin: 0; flex: 1; min-width: 200px; }
.legal-note { background: var(--warn-bg); border: 1.5px solid var(--warn-line); border-radius: 12px; padding: 12px 14px; font-size: .86rem; margin: 16px 0; }
.back-link { display: inline-block; margin: 16px 0 0; color: var(--pink-deep); font-weight: 700; text-decoration: none; }
.back-link::before { content: "← "; }

/* フッター */
.footer-links { font-size: .82rem; margin: 0 0 10px; }
.footer-links a { color: var(--pink-deep); margin-right: 4px; }
.footer-links span { color: var(--muted); margin-right: 4px; }

.site-footer { background: #fdeef2; border-top: 2px solid var(--line); padding: 26px 16px; margin-top: 32px; border-radius: 28px 28px 0 0; }
.disclaimer { font-size: .82rem; color: var(--muted); }
.sources { font-size: .8rem; }
.sources a { color: var(--pink-deep); }
.copy { font-size: .8rem; color: var(--muted); text-align: center; }
.copy::before { content: "🌷 "; }
