/* ===========================================================================
   結婚相談所 相性診断 — ポータル型UI

   mock/portal.html のデザインを本番に移植したもの。
   セレクタは app.js が生成する DOM の契約（.view / .option / .result-card 等）に
   合わせてある。モック側の名前（.screen / .opt / .pick 等）とは対応関係が違うので、
   モックの CSS をそのまま貼り戻さないこと。

   配色・図版はすべて自前。写真アセットは使っていない（図版はインラインSVG）。
   =========================================================================== */

:root {
  --bg:          #ffffff;
  --bg-tint:     #fdf4f6;
  --bg-warm:     #faf7f3;
  --surface:     #ffffff;
  --ink:         #33303a;
  --ink-mid:     #6a6570;
  --ink-soft:    #9b96a2;
  --rule:        #e7e0e2;
  --rule-soft:   #f0eaec;
  --rose:        #d94a72;
  --rose-deep:   #b53559;
  --rose-ink:    #c03e64;
  --rose-pale:   #fceef2;
  --gold:        #a9853f;
  --gold-ink:    #806128;
  --gold-bg:     #2f2a26;
  --on-rose:     #ffffff;
  --kv-ink:      #4a2233;
  --kv-glow:     rgba(255,255,255,.65);
  --check:       #58a887;
  --warn:        #b0741c;
  --warn-bg:     #fdf3e2;
  --shadow-sm:   0 1px 3px rgba(51,48,58,.07);
  --shadow:      0 2px 14px rgba(51,48,58,.09);
  --gothic: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, "Noto Sans JP", sans-serif;

  /* 図版パレット（SVGから参照） */
  --art-sky-a:  #ffeaf0;
  --art-sky-b:  #f4c2d4;
  --art-glow:   rgba(255,255,255,.92);
  --art-far:    #eab6c9;
  --art-mid:    #d98fae;
  --art-near:   #bd6b8f;
  --art-tint:   #fdf1f5;
  --kv-veil:    rgba(255,255,255,.86);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #17151a;
    --bg-tint:   #221b1f;
    --bg-warm:   #1e1b1d;
    --surface:   #1e1c22;
    --ink:       #ece9ee;
    --ink-mid:   #b3aeb8;
    --ink-soft:  #837e8b;
    --rule:      #383440;
    --rule-soft: #2b2830;
    --rose:      #e57a99;
    --rose-deep: #d16284;
    --rose-ink:  #ef92ac;
    --rose-pale: #2c2028;
    --gold:      #cfae66;
    --gold-ink:  #cfae66;
    --gold-bg:   #262019;
    --on-rose:   #1b1116;
    --kv-ink:    #f7e8ee;
    --kv-glow:   rgba(0,0,0,.55);
    --check:     #6fc4a0;
    --warn:      #e0b364;
    --warn-bg:   #2a2218;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
    --shadow:    0 2px 14px rgba(0,0,0,.45);
    --art-sky-a: #2b1d26;
    --art-sky-b: #39232f;
    --art-glow:  rgba(255,214,229,.20);
    --art-far:   #5a3a4b;
    --art-mid:   #74475b;
    --art-near:  #915a73;
    --art-tint:  #241a1f;
    --kv-veil:   rgba(16,13,17,.84);
  }
}

:root[data-theme="dark"] {
  --bg:        #17151a;
  --bg-tint:   #221b1f;
  --bg-warm:   #1e1b1d;
  --surface:   #1e1c22;
  --ink:       #ece9ee;
  --ink-mid:   #b3aeb8;
  --ink-soft:  #837e8b;
  --rule:      #383440;
  --rule-soft: #2b2830;
  --rose:      #e57a99;
  --rose-deep: #d16284;
  --rose-ink:  #ef92ac;
  --rose-pale: #2c2028;
  --gold:      #cfae66;
  --gold-ink:  #cfae66;
  --gold-bg:   #262019;
  --on-rose:   #1b1116;
  --kv-ink:    #f7e8ee;
  --kv-glow:   rgba(0,0,0,.55);
  --check:     #6fc4a0;
  --warn:      #e0b364;
  --warn-bg:   #2a2218;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow:    0 2px 14px rgba(0,0,0,.45);
  --art-sky-a: #2b1d26;
  --art-sky-b: #39232f;
  --art-glow:  rgba(255,214,229,.20);
  --art-far:   #5a3a4b;
  --art-mid:   #74475b;
  --art-near:  #915a73;
  --art-tint:  #241a1f;
  --kv-veil:   rgba(16,13,17,.84);
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--gothic);
  font-size: 15px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 92px; /* フローティングCTA分 */
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }

:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ── ヘッダ ───────────────────────────────────────────────── */
.hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--rule); background: var(--surface);
  position: sticky; top: 0; z-index: 40;
}
.hd-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; letter-spacing: .02em; }
.hd-logo .mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--rose); color: var(--on-rose);
  display: grid; place-items: center; font-size: 13px;
}
.hd-logo em { font-style: normal; color: var(--rose-ink); }

/* アイコンメニュー（4カテゴリ） */
.navrow {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--rule); background: var(--surface);
}
.navrow button {
  display: grid; justify-items: center; gap: 5px;
  padding: 11px 4px; font-size: 11px; line-height: 1.4; color: var(--ink-mid);
  border-right: 1px solid var(--rule-soft); text-align: center;
  transition: background .18s, color .18s;
}
.navrow button:last-child { border-right: none; }
.navrow button:hover { background: var(--rose-pale); color: var(--rose-ink); }
.navrow svg { width: 20px; height: 20px; stroke: var(--rose); fill: none; stroke-width: 1.6; }

/* ── メインビジュアル ─────────────────────────────────────── */
.kv { position: relative; }
.kv-art { height: 236px; position: relative; overflow: hidden; background: var(--art-sky-b); }
@media (min-width: 900px) { .kv-art { height: 360px; } }

.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.kv-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 38%, var(--kv-veil) 100%);
}

.kv-copy {
  position: absolute; inset: auto 0 0 0; padding: 0 18px 20px;
  color: var(--kv-ink); text-shadow: 0 1px 12px var(--kv-glow);
  font-weight: 800; font-size: 17px; line-height: 1.6; letter-spacing: .02em;
}
/* 見出しはKVの下端から上に伸びる。ブラウザ既定の h1（2em）のままだと
   SPで3行になり、KVの高さを超えて上のナビに被る。必ず親のサイズを継がせること */
.kv-copy h1 { font-size: inherit; font-weight: inherit; line-height: inherit; }
@media (min-width: 900px) { .kv-copy { font-size: 30px; padding-bottom: 34px; max-width: 1080px; margin: 0 auto; left: 0; right: 0; } }

.kv-badge {
  display: inline-block; background: var(--rose); color: var(--on-rose);
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  padding: 3px 12px; border-radius: 3px; margin-bottom: 9px;
}
.kv-sub {
  font-size: 12.5px; font-weight: 700; line-height: 1.7; margin-top: 8px;
  letter-spacing: .01em; opacity: .92;
}
@media (min-width: 900px) { .kv-sub { font-size: 15px; } }

/* ── 数字バンド ───────────────────────────────────────────── */
.statband { background: var(--gold-bg); padding: 14px 12px 15px; }
.statband-in { max-width: 1080px; margin: 0 auto; }
.statband-t {
  text-align: center; color: #f3ece0; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; line-height: 1.6; margin-bottom: 11px;
}
.statband-t b { color: var(--gold); font-size: 14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.stat {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.13);
  border-radius: 5px; padding: 9px 3px 8px; text-align: center;
}
.stat-k { font-size: 9.5px; color: #cabfb0; letter-spacing: .03em; line-height: 1.4; }
.stat-v { color: var(--gold); font-weight: 800; line-height: 1.15; margin-top: 3px; letter-spacing: -.01em; }
.stat-v em { font-style: normal; font-size: 23px; }
.stat-v i { font-style: normal; font-size: 11px; margin-left: 1px; }
@media (min-width: 700px) {
  .stat-v em { font-size: 30px; }
  .stat-k { font-size: 11px; }
  .statband-t { font-size: 14px; }
  .statband-t b { font-size: 17px; }
}

.wide-cta { max-width: 1080px; margin: 0 auto; padding: 12px 16px 0; }
.wide-cta button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }
.wide-cta svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── CTAブロック ──────────────────────────────────────────── */
.cta {
  background: var(--rose-pale);
  border: 1px solid var(--rose); border-radius: 8px;
  padding: 20px 16px 18px; margin: 18px 0; text-align: center;
  position: relative;
}
.cta-flag {
  display: inline-block; background: var(--rose); color: var(--on-rose);
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  padding: 3px 14px; border-radius: 999px;
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
}
.cta-lead { font-size: 14.5px; font-weight: 700; line-height: 1.75; margin-top: 6px; }
.cta-lead b { color: var(--rose-ink); font-size: 17px; }
.cta-sub { font-size: 11px; color: var(--ink-soft); margin-top: 8px; line-height: 1.7; }

.cta-btns { display: grid; gap: 9px; margin-top: 14px; }
.cta-btns.three { grid-template-columns: repeat(3, 1fr); gap: 7px; }
@media (min-width: 560px) { .cta-btns.two { grid-template-columns: repeat(2, 1fr); } }
.cta-btns.three .btn-rose { padding: 11px 4px; font-size: 12px; letter-spacing: 0; }
.cta-btns.three .btn-rose .age { font-size: 21px; display: block; line-height: 1.15; }

.btn-rose {
  background: var(--rose); color: var(--on-rose);
  border-radius: 999px; padding: 14px 20px;
  font-weight: 700; font-size: 14.5px; letter-spacing: .04em;
  box-shadow: 0 3px 0 var(--rose-deep);
  transition: transform .12s, background .18s, box-shadow .12s;
}
.btn-rose:hover { background: var(--rose-deep); }
.btn-rose:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--rose-deep); }
.btn-rose:disabled { opacity: .45; box-shadow: none; cursor: default; }
.btn-rose:disabled:hover { background: var(--rose); }
.btn-rose .age { font-size: 19px; font-weight: 800; }

.btn-gold {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: var(--gold-bg); color: var(--gold);
  border: 1px solid var(--gold); border-radius: 999px;
  padding: 14px 18px; font-weight: 800; font-size: 15px; letter-spacing: .03em;
  box-shadow: var(--shadow-sm); transition: transform .12s, filter .18s;
}
.btn-gold:hover { filter: brightness(1.18); }
.btn-gold:active { transform: translateY(2px); }
.btn-gold svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; flex: none; }

.btn-outline {
  border: 1.5px solid var(--rose); color: var(--rose-ink); background: var(--surface);
  border-radius: 999px; padding: 11px 18px; font-weight: 700; font-size: 13px;
}
.btn-outline:hover { background: var(--rose-pale); }

.cta-tail { display: block; margin-top: 11px; font-size: 12.5px; color: var(--rose-ink); text-decoration: underline; }

/* ── 補足バナー ───────────────────────────────────────────── */
.promo {
  display: flex; align-items: center; gap: 14px;
  background: var(--gold-bg); border-radius: 8px;
  padding: 15px 18px; margin: 16px 0; color: #f3ece0;
}
.promo-badge {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  border: 1.5px solid var(--gold); color: var(--gold);
  display: grid; place-items: center; text-align: center;
  font-size: 10px; font-weight: 700; line-height: 1.25;
}
.promo-txt { font-size: 12.5px; line-height: 1.75; }
.promo-txt b { display: block; font-size: 15px; color: var(--gold); font-weight: 800; letter-spacing: .02em; }

/* ── レイアウト ───────────────────────────────────────────── */
.shell { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.cols { display: block; }
@media (min-width: 900px) {
  .cols { display: grid; grid-template-columns: minmax(0,1fr) 282px; gap: 34px; align-items: start; }
}

/* 画面切り替え（app.js の showView が .is-active を付け替える） */
.view { display: none; }
.view.is-active { display: block; }

.quiz-wrap { max-width: 680px; margin: 0 auto; }

/* 見出し */
.h-lead { font-size: 17px; font-weight: 800; line-height: 1.6; margin-top: 26px; letter-spacing: .01em; }
.h-bar {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 800; margin: 34px 0 14px; letter-spacing: .02em;
}
.h-bar::before { content: ''; width: 4px; height: 19px; background: var(--rose); border-radius: 2px; }

.h-band {
  background: var(--rose); color: var(--on-rose);
  text-align: center; font-weight: 800; font-size: 15.5px;
  border-radius: 6px; padding: 9px 14px; margin: 34px 0 16px; letter-spacing: .04em;
}

.body-txt { font-size: 14px; color: var(--ink-mid); line-height: 2; margin-top: 12px; }
.body-txt strong { color: var(--ink); font-weight: 700; }

/* ── 人気エリア ───────────────────────────────────────────── */
.areas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.area-tile {
  border: 1px solid var(--rule); border-radius: 8px; overflow: hidden;
  background: var(--surface); transition: border-color .18s, transform .12s;
  display: block; width: 100%; text-align: center; padding: 0;
}
.area-tile:hover { border-color: var(--rose); transform: translateY(-2px); }
.area-pic { height: 96px; position: relative; overflow: hidden; background: var(--art-sky-b); }
@media (min-width: 900px) { .area-pic { height: 108px; } }
.area-name { display: block; text-align: center; padding: 9px 4px; font-weight: 700; font-size: 14px; }
.area-more { display: block; text-align: center; margin-top: 12px; font-size: 13px; color: var(--rose-ink); text-decoration: underline; }

/* ── お悩み ───────────────────────────────────────────────── */
.worry-head {
  background: var(--ink); color: var(--bg); border-radius: 6px;
  text-align: center; font-weight: 700; font-size: 14.5px; padding: 9px; margin-top: 30px;
  position: relative;
}
.worry-head::after {
  content: ''; position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%);
  border: 8px solid transparent; border-top-color: var(--ink); border-bottom: 0;
}
.worry-list { list-style: none; border: 1px solid var(--rule); border-radius: 8px; margin-top: 16px; padding: 6px 16px; background: var(--surface); }
.worry-list li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 0; border-bottom: 1px dashed var(--rule-soft); font-size: 14px;
}
.worry-list li:last-child { border-bottom: none; }
.worry-list svg { flex: none; width: 17px; height: 17px; stroke: var(--check); fill: none; stroke-width: 2.2; margin-top: 4px; }

/* ── 掲載社の名前一覧（intro） ────────────────────────────── */
.logos-rule {
  display: flex; align-items: center; gap: 12px; margin: 30px 0 14px;
  font-size: 12px; color: var(--ink-soft); white-space: nowrap;
}
.logos-rule::before, .logos-rule::after { content: ''; flex: 1; height: 1px; background: var(--rule); }

.logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
@media (min-width: 560px) { .logos { grid-template-columns: repeat(4, 1fr); } }
.logo-cell {
  border: 1px solid var(--rule); border-radius: 5px; background: var(--surface);
  min-height: 52px; display: grid; place-items: center; padding: 7px 5px;
  font-size: 10.5px; font-weight: 700; text-align: center; line-height: 1.35; color: var(--ink-mid);
  transition: border-color .18s, color .18s;
}
.logo-cell:hover { border-color: var(--rose); color: var(--rose-ink); }

.textlinks { list-style: none; margin-top: 14px; display: grid; gap: 8px; }
.textlinks button { font-size: 13.5px; color: var(--rose-ink); text-align: left; }
.textlinks button::before { content: '»'; margin-right: 6px; }
.textlinks button:hover { text-decoration: underline; }

/* ── 診断でわかること ─────────────────────────────────────── */
.dotlist { list-style: none; display: grid; gap: 9px; margin-top: 14px; }
.dotlist li { position: relative; padding-left: 18px; font-size: 14px; }
.dotlist li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 7px; height: 7px; border-radius: 50%; border: 2px solid var(--rose);
}
.dotlist ul { list-style: none; margin-top: 6px; padding-left: 4px; display: grid; gap: 4px; }
.dotlist ul li { font-size: 12.5px; color: var(--ink-mid); padding-left: 14px; }
.dotlist ul li::before { width: 5px; height: 5px; border-width: 1px; top: 10px; }

/* ── 流れ ─────────────────────────────────────────────────── */
.steps { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; background: var(--surface); }
.step-pic { height: 104px; position: relative; overflow: hidden; background: var(--art-tint); }
.step-pic span {
  position: absolute; top: 9px; left: 11px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--rose); color: var(--on-rose);
  display: grid; place-items: center; font-size: 13px; font-weight: 800;
}
.step-body { padding: 12px 14px 15px; }
.step-no { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--rose-ink); }
.step-txt { font-size: 13.5px; line-height: 1.8; margin-top: 5px; }

/* ── メリット ─────────────────────────────────────────────── */
.merit { border-top: 1px solid var(--rule); padding: 20px 0; }
.merit:first-of-type { border-top: none; }
.merit-no {
  display: inline-block; background: var(--rose-pale); color: var(--rose-ink);
  border-radius: 4px; font-size: 11px; font-weight: 800; letter-spacing: .1em; padding: 3px 11px;
}
.merit h3 { font-size: 16px; font-weight: 800; margin-top: 9px; line-height: 1.6; }
.merit p { font-size: 13.5px; color: var(--ink-mid); line-height: 1.95; margin-top: 8px; }

.mcards { display: grid; gap: 9px; margin-top: 14px; }
@media (min-width: 700px) { .mcards { grid-template-columns: repeat(3, 1fr); } }
.mcard {
  display: flex; gap: 11px; align-items: flex-start;
  border: 1px solid var(--rule); border-radius: 8px;
  background: var(--surface); padding: 13px 14px;
}
@media (min-width: 700px) { .mcard { display: block; } }
.mcard-n {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--rose); color: var(--on-rose);
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
}
@media (min-width: 700px) { .mcard-n { margin-bottom: 9px; } }
.mcard-t { font-size: 14px; font-weight: 800; line-height: 1.5; }
.mcard-d { font-size: 12.5px; color: var(--ink-mid); line-height: 1.8; margin-top: 5px; }

/* ── サイドバー ───────────────────────────────────────────── */
.searchpanel { background: var(--gold-bg); border-radius: 8px; padding: 16px 14px 15px; }
.searchpanel-t {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: #f3ece0; font-size: 15px; font-weight: 800; letter-spacing: .06em;
}
.searchpanel-t svg { width: 17px; height: 17px; stroke: var(--gold); fill: none; stroke-width: 2.2; }
.searchbar {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: var(--surface); border-radius: 999px;
  padding: 11px 16px; margin-top: 12px; text-align: left;
}
.searchbar svg { width: 15px; height: 15px; stroke: var(--rose); fill: none; stroke-width: 2.2; flex: none; }
.searchbar span { font-size: 13px; color: var(--ink-soft); }
.side-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.side-chips button {
  border: 1px solid rgba(255,255,255,.25); color: #f3ece0;
  border-radius: 999px; padding: 6px 13px; font-size: 12px; font-weight: 700;
  transition: background .16s, border-color .16s;
}
.side-chips button:hover { background: rgba(255,255,255,.12); border-color: var(--gold); }

.side { margin-top: 40px; display: grid; gap: 14px; }
@media (min-width: 900px) { .side { margin-top: 26px; position: sticky; top: 68px; } }

.side-cta {
  display: block; width: 100%; text-align: center;
  background: var(--rose); color: var(--on-rose); border-radius: 8px;
  padding: 15px 12px; font-weight: 800; font-size: 15px;
  box-shadow: 0 3px 0 var(--rose-deep);
}
.side-cta:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--rose-deep); }

.side-banner {
  display: block; width: 100%; text-align: center;
  border: 2px solid var(--rose); border-radius: 8px; background: var(--rose-pale);
  padding: 14px 12px;
}
.side-banner .s { font-size: 11.5px; color: var(--rose-ink); font-weight: 700; }
.side-banner .m { font-size: 15px; font-weight: 800; line-height: 1.6; margin-top: 3px; display: block; }

.side-block { border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); overflow: hidden; }
.side-title {
  background: var(--bg-warm); border-bottom: 1px solid var(--rule);
  font-size: 12.5px; font-weight: 800; padding: 9px 13px; letter-spacing: .04em;
}
.side-grid { display: grid; grid-template-columns: 1fr 1fr; }
.side-grid button {
  padding: 12px 8px; font-size: 12px; text-align: center; line-height: 1.5;
  border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft);
}
.side-grid button:nth-child(2n) { border-right: none; }
.side-grid button:hover { background: var(--rose-pale); color: var(--rose-ink); }

/* ── フローティングCTA ────────────────────────────────────── */
.float {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--surface); border-top: 1px solid var(--rule);
  box-shadow: 0 -2px 14px rgba(51,48,58,.1);
  padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 11px;
}
@media (min-width: 900px) { .float { display: none; } }
.float p { font-size: 11.5px; line-height: 1.5; flex: 1; font-weight: 700; }
.float p span { color: var(--rose-ink); }
.float button {
  flex: none; background: var(--rose); color: var(--on-rose);
  border-radius: 999px; padding: 12px 20px; font-weight: 800; font-size: 13.5px;
  box-shadow: 0 3px 0 var(--rose-deep);
}

/* ── フッタ ───────────────────────────────────────────────── */
.ft { background: var(--bg-warm); border-top: 1px solid var(--rule); margin-top: 46px; padding: 26px 16px 34px; }
.ft-inner { max-width: 1080px; margin: 0 auto; }
.ft-menu { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
@media (min-width: 700px) { .ft-menu { grid-template-columns: repeat(4, 1fr); } }
.ft-menu button { font-size: 12.5px; color: var(--ink-mid); text-align: left; }
.ft-menu button::before { content: '›'; color: var(--rose); margin-right: 6px; }
.ft-note { font-size: 11px; color: var(--ink-soft); line-height: 1.9; margin-top: 22px; border-top: 1px solid var(--rule); padding-top: 18px; }
.ft-copy { font-size: 11px; color: var(--ink-soft); text-align: center; margin-top: 14px; }

/* ═══════════════════════════════════════════════════════════════════════════
   ここから下は app.js が触る要素。クラス名は app.js の実装に合わせてある
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 進捗 ─────────────────────────────────────────────────── */
.progress { display: flex; align-items: center; gap: 12px; padding: 22px 0 4px; }
.progress-bar { flex: 1; height: 6px; background: var(--rule-soft); border-radius: 999px; overflow: hidden; }
.progress-fill { display: block; height: 100%; width: 0; background: var(--rose); border-radius: 999px; transition: width .4s ease; }
.progress-text { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* ── 設問カード ───────────────────────────────────────────── */
.q-card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: var(--shadow-sm); padding: 26px 18px 24px; margin-top: 14px;
  animation: cardIn .28s ease both;
}
@media (min-width: 700px) { .q-card { padding: 38px 38px 32px; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.q-step { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--rose-ink); }
.q-title { font-size: 20px; font-weight: 800; line-height: 1.6; margin-top: 9px; }
@media (min-width: 700px) { .q-title { font-size: 23px; } }
.q-caption { font-size: 12.5px; color: var(--ink-soft); margin-top: 9px; }
.q-caption:empty { display: none; }

.options { display: grid; gap: 10px; margin-top: 22px; }
.option {
  display: block; width: 100%; text-align: left;
  border: 1.5px solid var(--rule); border-radius: 8px; background: var(--bg);
  padding: 15px 17px; transition: border-color .16s, background .16s;
}
.option:hover, .option.is-selected { border-color: var(--rose); background: var(--rose-pale); }
.option-label { display: block; font-size: 15px; font-weight: 700; line-height: 1.6; }
.option-note { display: block; font-size: 12.5px; color: var(--ink-mid); margin-top: 3px; }
.options.is-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
.options.is-grid .option { padding: 13px 10px; text-align: center; }
.options.is-grid .option-label { font-size: 13.5px; }

.btn-back { display: block; margin: 16px auto 0; font-size: 12.5px; color: var(--ink-soft); text-decoration: underline; }
.btn-back[hidden] { display: none; }

/* ── プロフィール ─────────────────────────────────────────── */
.profile-group { margin-top: 22px; }
.profile-label { font-size: 12.5px; font-weight: 800; margin-bottom: 9px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border: 1.5px solid var(--rule); border-radius: 999px; padding: 8px 16px; font-size: 13.5px; background: var(--bg); }
.chip:hover { border-color: var(--rose); }
.chip.is-selected { border-color: var(--rose); background: var(--rose); color: var(--on-rose); font-weight: 700; }

/* ── 読み込み ─────────────────────────────────────────────── */
.loading-box { min-height: 52vh; display: grid; place-items: center; text-align: center; }
.loading-ring {
  width: 42px; height: 42px; margin: 0 auto 20px;
  border: 3px solid var(--rose-pale); border-top-color: var(--rose);
  border-radius: 50%; animation: sp 1s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: var(--ink-mid); }

/* ── 結果：タイプ ─────────────────────────────────────────── */
.result-type {
  border: 2px solid var(--rose); border-radius: 10px; background: var(--rose-pale);
  padding: 30px 18px 26px; margin-top: 22px; text-align: center;
}
.type-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .18em; color: var(--gold); }
.type-name { font-size: 26px; font-weight: 800; line-height: 1.45; margin: 11px 0 8px; }
@media (min-width: 700px) { .type-name { font-size: 32px; } }
.type-catch { font-size: 13.5px; color: var(--rose-ink); font-weight: 700; }
.type-desc { font-size: 14px; color: var(--ink-mid); line-height: 2.05; margin-top: 18px; text-align: left; }

/* ── 結果：3軸 ────────────────────────────────────────────── */
.result-axes {
  border: 1px solid var(--rule); border-radius: 10px; background: var(--surface);
  padding: 20px 18px; margin-top: 12px; display: grid; gap: 17px;
}
.axis-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-mid); }
.axis-labels b { font-weight: 600; }
.axis-track { height: 5px; background: var(--rule-soft); border-radius: 999px; position: relative; margin-top: 8px; }
.axis-dot {
  position: absolute; top: 50%; width: 13px; height: 13px;
  background: var(--rose); border: 2.5px solid var(--surface); border-radius: 50%;
  transform: translate(-50%,-50%); transition: left .6s ease;
}

/* ── 結果：相談所カード ───────────────────────────────────── */
.section-title {
  background: var(--rose); color: var(--on-rose);
  text-align: center; font-weight: 800; font-size: 15.5px;
  border-radius: 6px; padding: 9px 14px; margin: 34px 0 16px; letter-spacing: .04em;
}
.section-sub { font-weight: 700; font-size: 13px; margin-left: 4px; }
.section-lead { font-size: 14px; color: var(--ink-mid); line-height: 2; margin-top: 12px; }

.result-list { display: grid; gap: 13px; margin-top: 14px; }
.result-card {
  border: 1px solid var(--rule); border-radius: 10px; background: var(--surface);
  padding: 20px 17px; position: relative;
}
.result-card.is-top { border: 2px solid var(--rose); }
.rank-badge {
  display: inline-block; background: var(--ink-soft); color: var(--bg);
  font-size: 10.5px; font-weight: 800; letter-spacing: .1em; padding: 3px 12px; border-radius: 999px;
  position: absolute; top: -10px; left: 16px;
}
.result-card.is-top .rank-badge { background: var(--rose); color: var(--on-rose); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 7px; }
.card-name { font-size: 18px; font-weight: 800; line-height: 1.45; }
.card-score { font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; }
.card-score b { font-size: 21px; color: var(--rose-ink); font-variant-numeric: tabular-nums; }
.card-headline {
  display: inline-block; background: var(--rose-pale); color: var(--rose-ink);
  font-size: 12px; font-weight: 700; padding: 3px 11px; border-radius: 999px; margin-top: 11px;
}
.card-reason { font-size: 13.5px; color: var(--ink-mid); line-height: 1.95; margin-top: 12px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 13px; }
.tag { font-size: 11px; color: var(--ink-mid); background: var(--bg-warm); border-radius: 4px; padding: 3px 8px; }

.card-factors { margin-top: 13px; border-top: 1px dashed var(--rule); padding-top: 11px; }
.card-factors summary { font-size: 12px; color: var(--ink-soft); cursor: pointer; list-style: none; }
.card-factors summary::-webkit-details-marker { display: none; }
.card-factors summary::before { content: '＋ '; color: var(--rose); font-weight: 700; }
.card-factors[open] summary::before { content: '− '; }
.card-factors ul { list-style: none; margin-top: 9px; display: grid; gap: 6px; }
.card-factors li { font-size: 12px; color: var(--ink-mid); padding-left: 13px; position: relative; line-height: 1.75; }
.card-factors li::before { content: ''; position: absolute; left: 2px; top: 9px; width: 5px; height: 1px; background: var(--rose); }

.card-link { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--rose-ink); text-decoration: underline; }

.disclaimer {
  font-size: 11.5px; color: var(--ink-soft); line-height: 1.9;
  background: var(--bg-warm); border-radius: 8px; padding: 13px 15px; margin-top: 20px;
}
.disclaimer:empty { display: none; }

.result-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 26px; }

/* ── シェア ───────────────────────────────────────────────── */
.share-box {
  border: 1px solid var(--rule); border-radius: 10px; background: var(--surface);
  padding: 18px 16px; margin-top: 20px;
}
.share-box[hidden] { display: none; }
.share-title { font-size: 14px; font-weight: 800; }
.share-note { font-size: 11.5px; color: var(--ink-soft); margin-top: 5px; line-height: 1.75; }
.share-url { display: flex; gap: 8px; margin-top: 12px; }
.share-url input {
  flex: 1; min-width: 0; font: inherit; font-size: 12.5px;
  border: 1px solid var(--rule); border-radius: 6px; padding: 9px 11px;
  background: var(--bg); color: var(--ink-mid);
}
.btn-copy {
  flex: none; border: 1.5px solid var(--rose); color: var(--rose-ink); background: var(--surface);
  border-radius: 6px; padding: 9px 14px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.btn-copy:hover { background: var(--rose-pale); }
.btn-copy.is-done { background: var(--rose); color: var(--on-rose); border-color: var(--rose); }
.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.share-btn {
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 8px 16px; font-size: 12.5px; font-weight: 700; color: var(--ink-mid);
  background: var(--bg); transition: border-color .16s, color .16s;
}
.share-btn:hover { border-color: var(--rose); color: var(--rose-ink); }

/* ── 掲載一覧 ─────────────────────────────────────────────── */
.agency-grid { display: grid; gap: 11px; margin-top: 16px; }
@media (min-width: 700px) { .agency-grid { grid-template-columns: 1fr 1fr; } }
.agency-card { border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); padding: 16px; }
.agency-card h3 { font-size: 15.5px; font-weight: 800; }
.agency-card p { font-size: 13px; color: var(--ink-mid); line-height: 1.85; margin-top: 6px; }

/* 未検証データの相談所につけるしるし */
.unverified-note {
  display: block; font-size: 11.5px; color: var(--warn); background: var(--warn-bg);
  border-radius: 5px; padding: 7px 10px; margin-top: 11px; line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   二軸の説明（条件 × 相性）
   条件はゴールド、相性はローズで統一する。設問画面・結果画面でも同じ対応を使う
   ═══════════════════════════════════════════════════════════════════════════ */

.twoaxis { background: var(--bg-warm); border-block: 1px solid var(--rule); padding: 28px 0 30px; margin-top: 18px; }
.twoaxis-h { font-size: 19px; font-weight: 800; line-height: 1.55; text-align: center; letter-spacing: .01em; }
@media (min-width: 700px) { .twoaxis-h { font-size: 23px; } }

/* ── 絞り込みの流れ（ファネル図） ─────────────────────────
   説明文で語らず、幅が狭まる形で「絞られていく」ことを見せる。
   文字はラベルとタグだけに絞ってある                        */
.funnel {
  max-width: 520px; margin: 20px auto 0;
  display: grid; justify-items: center; gap: 18px;
}

.funnel-box, .funnel-gate { position: relative; width: 100%; text-align: center; }

/* 次の段へ落ちる矢印。最後の段だけ出さない */
.funnel-box:not(.is-top)::after, .funnel-gate::after {
  content: ''; position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%);
  border: 7px solid transparent; border-bottom: 0; border-top-color: var(--rule);
}
.funnel-gate.is-condition::after { border-top-color: var(--gold); }
.funnel-gate.is-character::after { border-top-color: var(--rose); }

.funnel-box {
  border: 1px solid var(--rule); border-radius: 10px;
  background: var(--surface); padding: 14px 16px;
}
.funnel-box.is-mid { width: 80%; }
.funnel-box.is-top { width: 62%; border: 2px solid var(--rose); background: var(--rose-pale); }
@media (max-width: 520px) {
  .funnel-box.is-mid { width: 90%; }
  .funnel-box.is-top { width: 78%; }
}

.funnel-n { font-size: 12.5px; font-weight: 800; line-height: 1.15; color: var(--ink-soft); }
.funnel-n b { font-size: 30px; font-weight: 800; color: var(--ink); margin-right: 2px; }
.funnel-box.is-top .funnel-n b { color: var(--rose-ink); }
.funnel-l { font-size: 12.5px; color: var(--ink-mid); line-height: 1.6; margin-top: 4px; }
.funnel-box.is-top .funnel-l { color: var(--rose-ink); font-weight: 700; }

/* A と B は対で読ませたいので、色だけ変えて明度は揃える */
.funnel-gate { border-radius: 8px; padding: 12px 14px 13px; border: 1px dashed var(--rule); }
.funnel-gate.is-condition { border-color: var(--gold); background: var(--bg-warm); }
.funnel-gate.is-character { border-color: var(--rose); background: var(--rose-pale); }

.funnel-k {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13.5px; font-weight: 800; letter-spacing: .02em;
}
.funnel-k span {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.funnel-gate.is-condition .funnel-k { color: var(--gold-ink); }
.funnel-gate.is-condition .funnel-k span { background: var(--gold-ink); color: var(--surface); }
.funnel-gate.is-character .funnel-k { color: var(--rose-ink); }
.funnel-gate.is-character .funnel-k span { background: var(--rose); color: var(--on-rose); }

.funnel-tags { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.funnel-tags li {
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 12px;
  background: var(--surface); border: 1px solid var(--rule); color: var(--ink);
}
.funnel-gate.is-condition .funnel-tags li { border-color: rgba(128,97,40,.4); }
.funnel-gate.is-character .funnel-tags li { border-color: var(--rose); }

.funnel-d { font-size: 11.5px; line-height: 1.7; margin-top: 9px; }
.funnel-gate.is-condition .funnel-d { color: var(--ink-mid); }
.funnel-gate.is-character .funnel-d { color: var(--rose-ink); }

/* 実際の配点をそのまま見せる帯 */
.weightbar {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 10px; padding: 16px 18px 14px; margin: 22px auto 0; max-width: 520px;
}
.weightbar-t { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--ink-soft); }
.weightbar-track {
  display: flex; margin-top: 10px; border-radius: 999px; overflow: hidden;
  height: 32px; font-size: 12px; font-weight: 800;
}
.weightbar-seg { display: grid; place-items: center; white-space: nowrap; letter-spacing: .04em; }
.weightbar-seg.is-condition { background: var(--gold-bg); color: var(--gold); }
.weightbar-seg.is-character { background: var(--rose); color: var(--on-rose); }
.weightbar-n { font-size: 12.5px; color: var(--ink-mid); line-height: 1.95; margin-top: 11px; }
.weightbar-n strong { color: var(--ink); font-weight: 700; }

/* 設問画面のセクション表示 */
.q-section {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding: 9px 14px; border-radius: 8px;
  background: var(--bg-warm); border-left: 3px solid var(--rule);
}
.q-section[hidden] { display: none; }
.q-section b { font-size: 13px; font-weight: 800; }
.q-section span { font-size: 11.5px; color: var(--ink-soft); }
.q-section.is-condition { border-left-color: var(--gold); }
.q-section.is-condition b { color: var(--gold-ink); }
.q-section.is-character { border-left-color: var(--rose); }
.q-section.is-character b { color: var(--rose-ink); }

/* 結果の上段。条件と相性を並べる */
.result-panels { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 760px) { .result-panels { grid-template-columns: 1fr 1fr; align-items: start; } }

.panel-cap { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; }
.result-conditions .panel-cap { color: var(--gold-ink); }
.result-axes .panel-cap { color: var(--rose-ink); }
.panel-note { font-size: 11.5px; color: var(--ink-soft); line-height: 1.8; }

.result-conditions {
  border: 1px solid var(--rule); border-top: 3px solid var(--gold);
  border-radius: 10px; background: var(--surface); padding: 20px 18px;
}
.result-axes { border-top: 3px solid var(--rose); }

.cond-list { display: grid; gap: 9px; margin-top: 13px; }
.cond-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 9px 12px; border-radius: 6px; background: var(--bg-warm);
}
.cond-row dt { flex: none; width: 4.5em; font-size: 11.5px; font-weight: 800; color: var(--ink-soft); }
.cond-row dd { font-size: 14px; font-weight: 700; line-height: 1.6; }

/* 結果カードの根拠を2群に分ける */
.factor-group { margin-top: 12px; }
.factor-group:first-child { margin-top: 9px; }
.factor-label {
  display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .06em;
  padding: 2px 9px; border-radius: 4px;
}
.factor-group.is-condition .factor-label { background: var(--gold-bg); color: var(--gold); }
.factor-group.is-character .factor-label { background: var(--rose-pale); color: var(--rose-ink); }
.factor-group ul { list-style: none; margin-top: 7px; display: grid; gap: 6px; }
.factor-group li { font-size: 12px; color: var(--ink-mid); padding-left: 13px; position: relative; line-height: 1.75; }
.factor-group li::before { content: ''; position: absolute; left: 2px; top: 9px; width: 5px; height: 1px; }
.factor-group.is-condition li::before { background: var(--gold); }
.factor-group.is-character li::before { background: var(--rose); }

/* ═══════════════════════════════════════════════════════════════════════════
   固定ページ（利用規約 / 個人情報の取り扱い / 運営会社）
   app.js は読み込まない。ヘッダとフッタだけ本体と共通にしてある
   ═══════════════════════════════════════════════════════════════════════════ */

.legal { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; }
.legal h1 { font-size: 22px; font-weight: 800; line-height: 1.5; margin-top: 30px; }
@media (min-width: 700px) { .legal h1 { font-size: 26px; } }
.legal .legal-meta { font-size: 12px; color: var(--ink-soft); margin-top: 10px; }
.legal .legal-lead { font-size: 14px; color: var(--ink-mid); line-height: 2; margin-top: 18px; }

.legal h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 800; margin: 34px 0 12px; letter-spacing: .02em;
}
.legal h2::before { content: ''; width: 4px; height: 18px; background: var(--rose); border-radius: 2px; flex: none; }
.legal h3 { font-size: 14px; font-weight: 800; margin-top: 20px; }
.legal p { font-size: 14px; color: var(--ink-mid); line-height: 2; margin-top: 10px; }
.legal strong { color: var(--ink); font-weight: 700; }
.legal a { color: var(--rose-ink); text-decoration: underline; }

.legal ul, .legal ol { margin-top: 10px; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.legal li { position: relative; padding-left: 18px; font-size: 14px; color: var(--ink-mid); line-height: 1.95; }
.legal li::before {
  content: ''; position: absolute; left: 0; top: 11px;
  width: 7px; height: 7px; border-radius: 50%; border: 2px solid var(--rose);
}
.legal ol { counter-reset: legal-ol; }
.legal ol > li { padding-left: 26px; }
.legal ol > li::before {
  counter-increment: legal-ol; content: counter(legal-ol) '.';
  border: none; width: auto; height: auto; top: 0;
  color: var(--rose-ink); font-weight: 800; font-size: 13px;
}

/* 会社概要テーブル */
.legal-table { width: 100%; border-collapse: collapse; margin-top: 14px; border-top: 1px solid var(--rule); }
.legal-table th, .legal-table td {
  border-bottom: 1px solid var(--rule); padding: 13px 12px;
  font-size: 13.5px; line-height: 1.85; text-align: left; vertical-align: top;
}
.legal-table th { width: 30%; font-weight: 700; background: var(--bg-warm); white-space: nowrap; }
.legal-table td { color: var(--ink-mid); }
@media (max-width: 560px) {
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table th, .legal-table td { display: block; width: 100%; }
  .legal-table th { border-bottom: none; padding-bottom: 4px; }
  .legal-table td { padding-top: 0; }
}

/* 未記入の項目。埋めるまで公開しないための目印 */
.todo {
  display: inline-block; background: var(--warn-bg); color: var(--warn);
  border: 1px dashed var(--warn); border-radius: 4px;
  padding: 2px 9px; font-size: 12.5px; font-weight: 700;
}
.legal-warn {
  border: 1px solid var(--warn); background: var(--warn-bg); color: var(--warn);
  border-radius: 8px; padding: 14px 16px; margin-top: 20px;
  font-size: 13px; line-height: 1.9;
}
.legal-warn b { display: block; font-weight: 800; margin-bottom: 4px; }

.legal-back { display: inline-block; margin-top: 34px; font-size: 13.5px; color: var(--rose-ink); text-decoration: underline; }

/* 固定ページのフッタ内リンク */
.ft-menu a { font-size: 12.5px; color: var(--ink-mid); }
.ft-menu a::before { content: '›'; color: var(--rose); margin-right: 6px; }
.ft-menu a:hover { color: var(--rose-ink); }

/* ── エラー ───────────────────────────────────────────────── */
.error-box {
  border: 1px solid var(--rose); background: var(--rose-pale); color: var(--rose-ink);
  border-radius: 8px; padding: 13px 15px; margin: 16px auto 0;
  max-width: 680px; font-size: 13.5px; line-height: 1.8;
}
