/* デザイン v2（2026-11-15）：結婚相談所らしい温かみ。くすんだローズ＋淡いベージュピンク、見出しは明朝体。
   グラデーション・影は使わない。罫線で区切り、角丸は小さく。本文16px、小さい文字も13px以上、文字のコントラスト 4.5:1 以上。 */
:root {
  --bg: #ffffff;
  --bg-2: #fbf4f2;
  --bg-3: #f5e6e3;
  --text: #2b2426;
  --text-2: #6a5b5e;
  --line: #eedfdb;
  --line-2: #d9c2bd;
  --rose: #a8475c;
  --rose-2: #7e2f41;
  --link: #9a3b52;
  --price: #c0304f;
  --warn: #a14a00;
  --warn-bg: #fff6ec;
  --focus: #e0a030;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --max: 960px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Noto Sans JP", Meiryo, sans-serif; font-size: 16px; line-height: 1.8; letter-spacing: .02em; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--rose-2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { display: block; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--bg); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sub { display: block; font-size: 13px; font-weight: 400; color: var(--text-2); line-height: 1.6; }
.note { font-size: 14px; color: var(--text-2); line-height: 1.7; }
ul.note { padding-left: 1.2em; }
.price { color: var(--price); font-weight: 700; }

header.site { border-top: 4px solid var(--rose); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 16px; padding-top: 10px; padding-bottom: 4px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 700; font-size: 19px; color: var(--rose-2); text-decoration: none; letter-spacing: .06em; }
.logo-mark { width: 30px; height: 30px; flex: none; }
nav.global { display: flex; flex-wrap: wrap; font-size: 14px; margin: 0 -8px; }
nav.global a { color: var(--text); text-decoration: none; padding: 8px; }
nav.global a:hover { color: var(--rose); text-decoration: underline; }
.pr { margin: 0; background: var(--bg-2); font-size: 13px; line-height: 1.6; padding: 6px 0; color: var(--text-2); }
.pr-label { display: inline-block; border: 1px solid var(--text-2); font-size: 11px; font-weight: 700; line-height: 1.3; padding: 0 4px; margin-right: 6px; color: var(--text); }

main { padding: 12px 0 56px; }
h1, h2 { font-family: var(--serif); }
h1 { color: var(--rose-2); font-size: clamp(22px, 5.4vw, 28px); line-height: 1.45; margin: 8px 0 10px; font-weight: 700; letter-spacing: .03em; }
.h1-sub { display: block; font-size: .58em; font-weight: 400; color: var(--text-2); margin-top: 4px; }
h2 { font-size: 20px; line-height: 1.5; margin: 44px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); border-left: 4px solid var(--rose); padding-left: 10px; color: var(--text); }
h3 { font-size: 17px; margin: 24px 0 8px; }
p { margin: 0 0 12px; }
.crumb { font-size: 13px; color: var(--text-2); margin: 4px 0 0; }
.alert { background: var(--warn-bg); border-left: 4px solid var(--warn); padding: 10px 12px; color: var(--text); }

/* 計算フォーム */
form.calc { border-top: 3px solid var(--rose) !important; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; margin: 16px 0; }
form.calc label { display: flex; flex-direction: column; font-size: 14px; font-weight: 700; gap: 4px; }
form.calc select { font: inherit; font-weight: 400; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 4px; background: #fff; min-height: 40px; max-width: 100%; }
form.calc fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
form.calc legend { font-size: 14px; font-weight: 700; padding: 0; margin-bottom: 4px; }
form.calc label.radio { flex-direction: row; align-items: center; font-weight: 400; gap: 6px; font-size: 15px; min-height: 40px; }
#quit label:first-child { flex: 1 1 320px; }
.result-head { font-weight: 700; margin: 20px 0 8px; }

/* 表 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 12px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
thead th { background: var(--bg-3); font-size: 13px; font-weight: 700; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
tbody th { font-weight: 700; }
table.ranking { min-width: 820px; }
table.ranking td.price { font-size: 17px; }
td.flags span { display: block; font-size: 13px; color: var(--warn); line-height: 1.5; }
td.flags span + span { margin-top: 4px; }
table.plans { min-width: 640px; }
table.kv { max-width: 640px; }
table.kv th { width: 40%; font-weight: 400; color: var(--text-2); }

dl.terms dt { font-weight: 700; margin-top: 12px; }
dl.terms dd { margin: 2px 0 0; }
ul.links { columns: 2 260px; padding-left: 1.2em; }
ul.sources li { word-break: break-all; }

.cta { margin: 32px 0 0; }
.button { display: inline-block; background: var(--rose); color: #fff; text-decoration: none; font-weight: 700; padding: 12px 20px; border-radius: 4px; }
.button:hover { background: var(--rose-2); color: #fff; }

footer.site { border-top: 4px solid var(--bg-3); padding: 20px 0 32px; background: var(--bg-2); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; margin-bottom: 8px; }

/* ランキングの上位3つ */
table.ranking tbody tr:nth-child(-n+3) td:first-child { color: var(--rose); font-weight: 700; font-family: var(--serif); font-size: 18px; }
table.ranking tbody tr:first-child { background: var(--bg-2); }
.pr { background: var(--bg-2); }
.alert { background: var(--bg-2); border-left-color: var(--rose); }

/* ===== v3（2026-11-15）レイアウト：ヒーロー・計算パネル・カード ===== */
.tag { display: inline-block; font-size: 12px; line-height: 1.5; padding: 1px 8px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); background: #fff; margin-left: 8px; vertical-align: 1px; white-space: nowrap; }

/* ヒーロー */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 36px 40px; margin: 16px 0 24px; }
.hero h1 { font-size: clamp(26px, 6vw, 38px); line-height: 1.5; margin: 6px 0 14px; letter-spacing: .06em; }
.eyebrow { display: inline-block; font-size: 13px; color: var(--rose-2); border-bottom: 1px solid var(--rose); padding-bottom: 2px; margin: 0; letter-spacing: .08em; }
.lead { font-size: 16px; color: var(--text); max-width: 34em; }
.hero-points { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-points li { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px 14px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.hero-points b { display: block; font-family: var(--serif); font-size: 16px; color: var(--rose-2); }
.hero-art { width: 220px; flex: none; }

/* 計算パネル */
.panel { border: 1px solid var(--line); border-top: 3px solid var(--rose); border-radius: 8px; background: #fff; padding: 20px 24px 8px; margin: 0 0 8px; }
.panel-title { margin: 0 0 4px !important; border: 0 !important; padding: 0 !important; font-size: 19px; color: var(--rose-2) !important; }
.panel form.calc { background: transparent; border: 0 !important; padding: 8px 0 12px; margin: 0; }
.step { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--rose); color: #fff; font-size: 12px; font-weight: 700; margin-right: 6px; font-family: var(--serif); }
form.calc label > .step, form.calc legend > .step { vertical-align: 1px; }

/* 結果のカード */
.result-title { border: 0 !important; padding: 0 !important; margin-top: 36px !important; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
.result-title .result-head { font-family: inherit; font-size: 14px; font-weight: 400; color: var(--text-2); margin: 0; }
ol.cards { list-style: none; padding: 0; margin: 12px 0 16px; display: grid; gap: 12px; }
.card { display: grid; grid-template-columns: 56px 1fr auto; grid-template-areas: "rank name total" "rank parts parts" "rank flags flags" "rank more more"; gap: 6px 16px; border: 1px solid var(--line); border-radius: 8px; padding: 16px 20px; background: #fff; }
.card.top-1 { border-color: var(--rose); box-shadow: inset 4px 0 0 var(--rose); background: var(--bg-2); }
.rank { grid-area: rank; text-align: center; font-family: var(--serif); color: var(--text-2); line-height: 1; padding-top: 4px; }
.rank b { display: block; font-size: 28px; font-weight: 700; }
.rank span { font-size: 12px; }
.card.top .rank { color: var(--rose); }
.card.top-1 .rank b { font-size: 34px; }
.card-name { grid-area: name; }
.card-name h3 { margin: 0; font-family: var(--serif); font-size: 19px; }
.card-name h3 a { text-decoration: none; color: var(--text); }
.card-name h3 a:hover { color: var(--rose); text-decoration: underline; }
.card-name p { margin: 2px 0 0; font-size: 14px; color: var(--text-2); }
.card-total { grid-area: total; text-align: right; }
.card-total span { display: block; font-size: 12px; color: var(--text-2); }
.card-total b { font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.breakdown { grid-area: parts; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 6px 0 0; border-top: 1px dashed var(--line-2); padding-top: 8px; }
.breakdown div { padding-right: 8px; }
.breakdown dt { font-size: 12px; color: var(--text-2); }
.breakdown dd { margin: 0; font-variant-numeric: tabular-nums; font-size: 15px; }
ul.flags { grid-area: flags; list-style: none; margin: 4px 0 0; padding: 0; }
ul.flags li { font-size: 13px; color: var(--warn); line-height: 1.6; padding-left: 1em; text-indent: -1em; }
ul.flags li::before { content: "※"; }
.card-more { grid-area: more; justify-self: end; font-size: 14px; }
.card-more::after, .company .more::after { content: " ›"; }

/* 4つの項目 */
ul.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
ul.tiles li { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: #fff; }
ul.tiles h3 { margin: 6px 0 6px; font-family: var(--serif); color: var(--rose-2); }
ul.tiles p { font-size: 14px; color: var(--text-2); margin: 0; line-height: 1.7; }
.icon { width: 36px; height: 36px; fill: none; stroke: var(--rose); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* 帯 */
.band { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; background: var(--bg-3); border-radius: 8px; padding: 24px 28px; margin: 44px 0 0; }
.band h2 { margin: 0 0 6px !important; border: 0 !important; padding: 0 !important; }
.band p { margin: 0; max-width: 36em; }

/* 相談所カード */
ul.companies { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.company a { display: block; height: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; text-decoration: none; color: var(--text); background: #fff; }
.company a:hover { border-color: var(--rose); }
.company-name { font-family: var(--serif); font-weight: 700; font-size: 17px; }
.company .tag { margin-left: 6px; }
.company-row { display: flex; justify-content: space-between; font-size: 14px; border-bottom: 1px dotted var(--line-2); padding: 4px 0; }
.company-row:first-of-type { margin-top: 8px; }
.company-row span { color: var(--text-2); }
.company-row b { font-weight: 400; font-variant-numeric: tabular-nums; }
.company .more { display: block; text-align: right; color: var(--link); font-size: 14px; margin-top: 8px; }

@media (max-width: 640px) {
  .hero { padding: 24px 20px; }
  .hero-art { display: none; }
  .panel { padding: 16px 16px 4px; }
  .card { grid-template-columns: 40px 1fr; grid-template-areas: "rank name" "rank total" "parts parts" "flags flags" "more more"; padding: 14px; }
  .card-total { text-align: left; }
  .card-total span { display: inline; margin-right: 8px; }
  .breakdown { grid-template-columns: repeat(2, 1fr); gap: 6px 0; }
  .band { padding: 20px; }
}

/* 下層ページ */
.page-head { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 20px 24px; margin: 12px 0 20px; }
.page-head h1 { margin: 0; }
.quit-result { border: 1px solid var(--line); border-radius: 8px; padding: 4px 24px 16px; margin-top: 20px; }
.quit-result h2 { margin-top: 16px; }
table.kv { border: 1px solid var(--line); border-radius: 8px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
table.kv th { background: var(--bg-2); }
table.kv tr:last-child th, table.kv tr:last-child td { border-bottom: 0; }
table.plans { border: 1px solid var(--line); border-radius: 8px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
table.plans tbody tr:last-child th, table.plans tbody tr:last-child td { border-bottom: 0; }
form.calc .lbl { display: inline-flex; align-items: center; }
@media (max-width: 640px) { .quit-result { padding: 4px 14px 12px; } .page-head { padding: 16px; } }

/* 総額の帯グラフ */
.card { grid-template-areas: "rank name total" "rank bar bar" "rank parts parts" "rank flags flags" "rank more more"; }
.costbar { grid-area: bar; margin-top: 6px; }
.costbar-fill { display: flex; gap: 2px; height: 14px; min-width: 8px; }
.costbar-fill span { display: block; min-width: 3px; }
.costbar-fill span:first-child { border-radius: 4px 0 0 4px; }
.costbar-fill span:last-child { border-radius: 0 4px 4px 0; }
.costbar-fill span:only-child { border-radius: 4px; }
.breakdown { border-top: 0; padding-top: 2px; }
.breakdown dt i, ul.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
ul.legend { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--text-2); }
@media (max-width: 640px) {
  .card { grid-template-areas: "rank name" "rank total" "bar bar" "parts parts" "flags flags" "more more"; }
}

/* 帯グラフの目盛り代わりの下地 */
.costbar { background: #f3e9e6; border-radius: 4px; }

/* 折れ線グラフ */
figure.linechart { margin: 0 0 8px; border: 1px solid var(--line); border-radius: 8px; padding: 16px 16px 8px; background: #fff; }
figure.linechart figcaption { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.lc-wrap { position: relative; }
figure.linechart svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
figure.linechart .g { stroke: #efe4e1; stroke-width: 1; }
figure.linechart .base { stroke: var(--line-2); stroke-width: 1; }
figure.linechart .ax { font-size: 12px; fill: var(--text-2); }
figure.linechart .lbl { font-size: 13px; fill: var(--text); font-weight: 700; }
figure.linechart .cross { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; }
.lc-tip { position: absolute; top: 4px; background: #fff; border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 10px; font-size: 13px; line-height: 1.6; pointer-events: none; white-space: nowrap; }
.lc-tip b { display: block; }
.lc-tip span { display: block; }
.lc-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
details.lc-table { margin-top: 6px; font-size: 14px; }
details.lc-table summary { cursor: pointer; color: var(--link); }

/* ヒーローのイラスト */
.hero-art { width: 46%; max-width: 420px; height: auto; mix-blend-mode: multiply; border-radius: 6px; }
@media (max-width: 640px) { .hero { flex-direction: column-reverse; align-items: stretch; } .hero-art { display: block; width: 100%; max-width: none; } }

/* ロゴ（公式素材が届くまでは頭文字の仮マーク） */
.logo-img, .logo-ph { width: 48px; height: 48px; flex: none; border-radius: 8px; }
.logo-img { object-fit: contain; background: #fff; border: 1px solid var(--line); padding: 4px; }
.logo-ph { display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line-2); color: var(--rose-2); font-family: var(--serif); font-size: 22px; font-weight: 700; }
.logo-img.big, .logo-ph.big { width: 72px; height: 72px; font-size: 32px; }
.card-name { display: flex; gap: 12px; align-items: center; }
.company a { display: grid; grid-template-columns: 48px 1fr; column-gap: 12px; align-items: center; }
.company a > .logo-img, .company a > .logo-ph { grid-row: span 2; }
.company .company-row, .company .more { grid-column: 1 / -1; }
.page-head.with-logo { display: flex; align-items: center; gap: 16px; }
.company a > .tag { justify-self: start; margin-left: 0; }
