/* ============================================================
   ゆる家計ラボ 共通スタイル（親しみ系・緑基調）
   ============================================================ */

:root {
  --green: #b8814a;
  --green-d: #8d6135;
  --green-deep: #5c4023;
  --pale: #f1e6da;
  --lime: #ead1b8;
  --bg: #fffaf0;
  --card: #ffffff;
  --ink: #2f2418;
  --sub: #6b5947;
  --muted: #93816c;
  --line: #e8dbcf;
  --amber: #e8963e;
  --radius: 16px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.8;
}

img { max-width: 100%; display: block; }
a { color: var(--green-d); }

.wrap { max-width: 1020px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 660px; margin: 0 auto; padding: 0 20px; }

/* ---------- ヘッダー / フッター ---------- */

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.logo {
  font-weight: 700; font-size: 19px; color: var(--green-d);
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.logo img { height: 46px; width: auto; display: block; }
.site-nav { display: flex; gap: 18px; align-items: center; }
.site-nav a { color: var(--sub); text-decoration: none; font-size: 13.5px; }
.site-nav a:hover { color: var(--green-d); }
.site-nav .nav-cta {
  background: var(--green); color: #fff; border-radius: 999px;
  padding: 8px 18px; font-weight: 700;
}
.site-nav .nav-cta:hover { background: var(--green-d); color: #fff; }

.site-footer {
  margin-top: 56px; border-top: 1px solid var(--line);
  padding: 28px 0 44px; font-size: 13px; color: var(--sub);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; }
.footer-links a { color: var(--sub); text-decoration: none; }
.footer-links a:hover { color: var(--green-d); }
.pr-note { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.copyright { margin-top: 10px; font-size: 12px; color: var(--muted); }

/* ---------- ボタン ---------- */

.btn {
  display: inline-block; background: var(--green); color: #fff;
  border: none; border-radius: 999px; padding: 14px 30px;
  font-size: 15px; font-weight: 700; font-family: inherit;
  text-decoration: none; cursor: pointer; text-align: center;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--green-d); }
.btn:active { transform: translateY(1px); }
.btn-big { font-size: 17px; padding: 17px 40px; }
.btn-ghost {
  background: #fff; color: var(--green-d); border: 2px solid var(--line);
}
.btn-ghost:hover { background: var(--pale); border-color: var(--green); }

.is-soon { opacity: .55; pointer-events: none; }
.soon-chip {
  display: inline-block; margin-left: 8px; background: #efe6da;
  color: var(--sub); border-radius: 999px; font-size: 11px; padding: 1px 10px;
  vertical-align: middle;
}

/* ---------- LP: ヒーロー ---------- */

.hero { background: var(--pale); padding: 52px 0 60px; }
.hero-flex { display: flex; align-items: center; gap: 20px; }
.hero-main { flex: 1; min-width: 0; }
.hero-girl { display: none; }
.hero h1 { font-size: 32px; line-height: 1.4; letter-spacing: .01em; }
.hero h1 .hl { background: linear-gradient(transparent 62%, var(--lime) 62%); }
.hero-sub { margin: 18px 0 26px; color: var(--sub); font-size: 15px; max-width: 560px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 15px; font-size: 12.5px; color: var(--sub);
}

/* ---------- LP: セクション ---------- */

.sec { padding: 46px 0 8px; }
.sec > .wrap > h2, .sec-title { font-size: 23px; margin-bottom: 6px; }
.sec-lead { color: var(--sub); font-size: 14px; margin-bottom: 22px; }

.feature-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.feat { background: var(--card); border-radius: 18px; padding: 24px 22px; border: 1px solid var(--line); }
.feat-emoji { font-size: 32px; line-height: 1; }
.feat-img { height: 110px; width: auto; display: block; margin: 0 auto 4px; }
.feat h3 { font-size: 16px; margin: 12px 0 6px; }
.feat p { font-size: 13.5px; color: var(--sub); }

.steps { display: grid; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: var(--radius); padding: 18px; border: 1px solid var(--line); }
.step-num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--green); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.step h3 { font-size: 15.5px; }
.step p { font-size: 13.5px; color: var(--sub); }

.cta-band { text-align: center; padding: 40px 0 10px; }
.cta-band p { color: var(--sub); font-size: 13.5px; margin-top: 10px; }

.service-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 30px 26px; text-align: center; max-width: 620px; margin: 0 auto;
}
.service-card .svc-head { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.service-card h3 { font-size: 20px; margin: 8px 0 10px; }
.service-card p { font-size: 14px; color: var(--sub); margin-bottom: 18px; text-align: left; }

.yt-frame { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; }
.yt-frame iframe { width: 100%; height: 100%; border: 0; }
.yt-placeholder {
  border: 2px dashed var(--line); border-radius: 18px; padding: 44px 20px;
  text-align: center; color: var(--sub); font-size: 14px; background: #fff;
}
.yt-placeholder .btn { margin-top: 14px; }

.faq details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 4px 18px; margin-bottom: 10px;
}
.faq summary { padding: 12px 0; font-weight: 700; cursor: pointer; font-size: 14.5px; }
.faq details p { padding: 2px 0 14px; font-size: 13.5px; color: var(--sub); }

/* ---------- 診断: 質問画面 ---------- */

.quiz { padding: 28px 0 40px; }
.q-progress { height: 6px; background: #f0e2ce; border-radius: 999px; overflow: hidden; margin-bottom: 20px; }
.q-progress-bar { height: 100%; background: var(--green); border-radius: 999px; transition: width .25s; }
.q-count { font-size: 14px; font-weight: 700; color: var(--green-d); }
.q-count span { color: var(--muted); font-weight: 500; }
.q-title { font-size: 21px; line-height: 1.5; margin: 6px 0 4px; }
.q-sub { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.q-opts { margin-top: 16px; }
.q-opt {
  display: block; width: 100%; text-align: left; font-family: inherit;
  background: var(--card); border: 2px solid var(--line); border-radius: 14px;
  padding: 15px 18px; margin-bottom: 10px; font-size: 15.5px; color: var(--ink);
  cursor: pointer; transition: border-color .12s, background .12s;
}
.q-opt:hover, .q-opt:focus-visible { border-color: var(--green); background: #faf2e6; }
.q-opt:active { transform: translateY(1px); }
.q-back {
  background: none; border: none; font-family: inherit; color: var(--muted);
  font-size: 13.5px; cursor: pointer; margin-top: 8px; text-decoration: underline;
}
.q-back:hover { color: var(--green-d); }

/* 金額の直接入力 */
.q-free {
  margin-top: 6px; padding: 14px 16px; background: #f8f1e3;
  border: 1px dashed var(--line); border-radius: 14px;
}
.q-free-note { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.q-free-note strong { color: var(--sub); }
.q-free-lead { font-size: 13px; font-weight: 700; color: var(--green-d); margin-bottom: 8px; }
.q-free-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.q-free-row input {
  width: 140px; font-family: inherit; font-size: 16px; padding: 10px 12px;
  border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.q-free-row input:focus { outline: none; border-color: var(--green); }
.q-free-unit { font-size: 13.5px; color: var(--sub); }
.q-free-btn { padding: 10px 16px; font-size: 13.5px; }
.q-free-err { color: #c0562f; font-size: 12px; margin-top: 8px; }

/* ---------- 診断: イントロ ---------- */

.intro { text-align: center; padding: 40px 0 48px; }
.intro-girl { width: 120px; height: auto; display: block; margin: 0 auto 14px; }
.intro h1 { font-size: 26px; line-height: 1.5; }
.intro p { color: var(--sub); font-size: 14.5px; margin: 14px auto 22px; max-width: 480px; }
.intro .hero-chips { justify-content: center; margin: 0 0 26px; }
.intro-privacy { font-size: 12px; color: var(--muted); margin-top: 14px; }
.intro-privacy a { color: var(--muted); }

/* ---------- 診断: 結果画面 ---------- */

.result { padding: 26px 0 44px; }

.r-hero {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 26px 22px; display: flex; gap: 26px; align-items: center;
  flex-direction: column; text-align: center;
}
.score-ring { width: 158px; height: 158px; }
.ring-track { fill: none; stroke: #ecdfcb; stroke-width: 12; }
.ring-fill {
  fill: none; stroke: var(--green); stroke-width: 12; stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: center;
  transition: stroke-dashoffset .8s ease;
}
.ring-num { font-size: 42px; font-weight: 700; fill: var(--ink); text-anchor: middle; font-family: inherit; }
.ring-unit { font-size: 14px; fill: var(--muted); text-anchor: middle; font-family: inherit; }
.r-label { font-size: 12.5px; color: var(--muted); font-weight: 700; letter-spacing: .06em; }
.r-rating { font-size: 21px; font-weight: 700; margin-top: 2px; }
.r-amount-box { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.r-amount { font-size: 36px; font-weight: 700; color: var(--green-d); line-height: 1.3; }
.r-note { font-size: 11.5px; color: var(--muted); margin-top: 10px; }

.r-sec { margin-top: 34px; }
.r-sec > h2 { font-size: 19px; margin-bottom: 14px; }

.cmp-row { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.cmp-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmp-name { font-weight: 700; font-size: 15px; }
.cmp-diff { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 12px; }
.cmp-diff.over { background: #fbe3dc; color: #a8452b; }
.cmp-diff.under { background: #f3e6d0; color: var(--green-d); }
.cmp-diff.even { background: #f1ece3; color: var(--sub); }
.cmp-line { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.cmp-tag { width: 48px; flex-shrink: 0; font-size: 12px; color: var(--muted); }
.cmp-track { flex: 1; height: 14px; background: #f2e9da; border-radius: 999px; overflow: hidden; }
.cmp-fill { height: 100%; border-radius: 999px; }
.cmp-fill.user { background: var(--green); }
.cmp-fill.avg { background: #d9c7ae; }
.cmp-val { width: 86px; flex-shrink: 0; text-align: right; font-size: 13px; font-weight: 700; }
.cmp-note { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.r-src { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

.rank-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; }
.rank-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rank-badge {
  width: 27px; height: 27px; border-radius: 50%; background: var(--green);
  color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.rank-emoji { font-size: 20px; }
.rank-name { font-weight: 700; font-size: 16px; flex: 1; }
.rank-save { font-weight: 700; color: var(--green-d); font-size: 15px; }
.rank-tip { font-size: 13.5px; color: #4a4136; margin-top: 10px; }
.rank-tip strong { color: var(--ink); }
.btn-aff {
  margin-top: 12px; background: #fff; color: var(--green-d);
  border: 2px solid var(--green); font-size: 13.5px; padding: 10px 20px;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-aff:hover { background: var(--pale); }
.pr-chip {
  background: #f1ece1; color: #8a7c67; font-size: 10.5px;
  border-radius: 5px; padding: 1px 7px; font-weight: 700;
}
.r-info { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }

.line-cta {
  background: var(--green-deep); border-radius: 20px; padding: 30px 24px;
  margin-top: 36px; text-align: center; color: #fff;
}
.line-cta h2 { font-size: 20px; }
.cta-girl { width: 92px; height: auto; display: block; margin: 0 auto 10px; }
.line-cta p { font-size: 13.5px; color: rgba(255, 255, 255, .88); margin: 10px auto 18px; max-width: 440px; }
.btn-line { background: #fff; color: var(--green-deep); }
.btn-line:hover { background: var(--lime); }
.line-cta .soon-chip { background: rgba(255, 255, 255, .25); color: #fff; }

.share { text-align: center; }
.share-img {
  width: 100%; max-width: 480px; margin: 0 auto;
  border-radius: 14px; border: 1px solid var(--line);
}
.share-btns { display: flex; justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.share-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

.r-service {
  border: 2px dashed var(--line); border-radius: 20px; padding: 24px 20px;
  margin-top: 36px; text-align: center; background: #fdfaf4;
}
.r-service-head { font-size: 11.5px; color: var(--muted); letter-spacing: .1em; }
.r-service h2 { font-size: 19px; margin: 6px 0 8px; }
.r-service p { font-size: 13.5px; color: var(--sub); margin-bottom: 16px; }

.r-again { display: flex; justify-content: center; gap: 12px; margin-top: 34px; flex-wrap: wrap; }

/* ---------- 法務ページ ---------- */

.legal { padding: 34px 0 20px; }
.legal h1 { font-size: 24px; margin-bottom: 20px; }
.legal h2 { font-size: 17px; margin: 26px 0 8px; color: var(--green-deep); }
.legal p, .legal li { font-size: 14px; color: #423a2f; }
.legal ul { padding-left: 22px; margin: 8px 0; }
.legal .updated { font-size: 12.5px; color: var(--muted); margin-top: 26px; }

/* ---------- レスポンシブ ---------- */

@media (min-width: 760px) {
  .hero h1 { font-size: 42px; }
  .hero-sub { font-size: 16px; }
  .hero-girl { display: block; width: 205px; height: auto; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { flex-direction: column; }
  .r-hero { flex-direction: row; text-align: left; padding: 30px 34px; }
  .intro h1 { font-size: 30px; }
  .sec > .wrap > h2, .sec-title { font-size: 26px; }
}

@media (max-width: 480px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .hero { padding: 38px 0 46px; }
  .hero h1 { font-size: 27px; }
}
