/* 栄進研 埼玉県公立高校 合格可能性判定（公開用）  濃紺と白を基調に、金色をごく控えめに使う */
:root {
  --navy: #0d2240; --navy2: #17335c; --navy-soft: #eef2f8; --ink: #1c2533; --muted: #6a7384; --line: #dfe4ec;
  --bg: #f6f7fa; --white: #fff; --gold: #b0905a; --gold-soft: #f6f0e4;
  --A: #1f7a52; --B: #2a5fa8; --C: #b88a1e; --D: #c2622b; --E: #b23a3a; --none: #9aa3b2;
  --line-green: #06c755;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --sans: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", Meiryo, sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 8px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.75; }
button, input, select { font-family: inherit; }

.prebanner { background: var(--gold-soft); color: #6b5528; font-size: .72rem; text-align: center; padding: 3px 8px; letter-spacing: .05em; }

/* ---------- ヘッダー ---------- */
.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  border: 1px solid rgba(176,144,90,.35); }
.hero-in { max-width: 760px; margin: 0 auto; padding: 26px 20px 30px; position: relative; z-index: 1; }
.brand { margin: 0 0 10px; font-family: var(--serif); font-size: .95rem; letter-spacing: .35em; color: #d9c49b; }
.brand::after { content: ""; display: block; width: 28px; height: 1px; background: var(--gold); margin-top: 8px; }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.7rem; line-height: 1.45; letter-spacing: .04em; }
.hero-sub { margin: 10px 0 0; font-size: .85rem; color: #c6d0e0; }
@media (min-width: 720px) { .hero h1 br { display: none; } .hero h1 { font-size: 2rem; } .hero-in { padding: 36px 24px 40px; } }

/* ---------- 手順の表示 ---------- */
.stepper { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.stepper ol { list-style: none; margin: 0 auto; padding: 10px 12px 8px; max-width: 760px; display: grid; grid-template-columns: repeat(4, 1fr); }
.stepper li { position: relative; }
.stepper li:not(:last-child)::after { content: ""; position: absolute; top: 16px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--line); }
.stepper li.done:not(:last-child)::after { background: var(--navy2); }
.stepper button { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; width: 100%; gap: 3px; -webkit-tap-highlight-color: transparent; }
.stepper button:disabled { cursor: default; }
.stepper button:focus-visible .dot { outline: 3px solid #b9c9e6; outline-offset: 2px; }
.stepper .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
  background: var(--white); color: var(--muted); border: 2px solid var(--line); transition: .2s; }
.stepper .lbl { font-size: .72rem; color: var(--muted); }
.stepper li.done .dot { background: var(--navy-soft); color: var(--navy2); border-color: var(--navy2); font-size: 0; }
.stepper li.done .dot::after { content: "✓"; font-size: .95rem; }
.stepper li.now .dot { background: var(--navy); color: #fff; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(13,34,64,.12); }
.stepper li.now .lbl { color: var(--navy); font-weight: 700; }

/* ---------- 本文 ---------- */
main { max-width: 760px; margin: 0 auto; padding: 18px 16px 8px; }
.panel { background: var(--white); border-radius: var(--r); padding: 22px 18px 20px; box-shadow: 0 1px 2px rgba(13,34,64,.06), 0 6px 24px rgba(13,34,64,.05); }
@media (min-width: 720px) { .panel { padding: 30px 32px 28px; } }
.kicker { margin: 0; font-size: .7rem; letter-spacing: .25em; color: var(--gold); font-weight: 700; }
.panel h2 { margin: 2px 0 10px; font-family: var(--serif); font-weight: 600; font-size: 1.4rem; color: var(--navy); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; outline: none; }
.badge-opt { font-family: var(--sans); font-size: .72rem; font-weight: 600; color: var(--navy2); background: var(--navy-soft); border-radius: 999px; padding: 1px 10px; }
.desc { margin: 0 0 14px; font-size: .92rem; color: #3b4555; }
.fine { font-size: .8rem; color: var(--muted); margin: 6px 0 0; }

input[type=number], input[type=search], select {
  font-size: 18px; width: 100%; min-height: 56px; padding: 12px 14px; border: 1.5px solid #c9d1de; border-radius: 12px;
  background: var(--white); color: var(--ink); -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--navy2) 50%), linear-gradient(135deg, var(--navy2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 38px; text-overflow: ellipsis; }
input:focus, select:focus { outline: none; border-color: var(--navy2); box-shadow: 0 0 0 4px rgba(42,95,168,.15); }
input::placeholder { color: #b3bac6; }
input.bad { border-color: var(--E); background: #fdf3f3; }

.devs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .devs { grid-template-columns: repeat(4, 1fr); } }
.devs label, .naishin label { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.devs input, .naishin input { text-align: center; font-size: 22px; font-weight: 600; }
.add { all: unset; cursor: pointer; display: inline-block; margin: 12px 0 0; color: var(--navy2); font-size: .9rem; font-weight: 600; padding: 6px 2px; }
.add:focus-visible { outline: 2px solid var(--navy2); }
.avg { margin-top: 16px; border-radius: 12px; background: var(--navy-soft); padding: 12px 16px; }
.avg-row { display: grid; grid-template-columns: 1fr auto; align-items: center; }
.avg span { font-size: .85rem; color: var(--navy2); font-weight: 600; }
.avg-row b { grid-row: span 2; font-family: var(--serif); font-size: 2.1rem; color: var(--navy); line-height: 1; }
.avg b.empty { color: #b3bac6; }
.avg small { font-size: .74rem; color: var(--muted); }
/* 偏差値の推移（参考） */
.devchart { display: block; width: 100%; height: auto; margin-top: 10px; background: var(--white); border-radius: 8px; }
.dc-grid { stroke: var(--line); stroke-width: 1; }
.dc-ax { font-size: 10px; fill: var(--muted); }
.dc-avg { stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 4 3; }
.dc-line { fill: none; stroke: var(--navy2); stroke-width: 2; }
.dc-dot { fill: var(--navy); }
.dc-legend { font-size: .7rem; color: var(--muted); margin: 4px 0 0; }
.dc-k-line, .dc-k-avg { display: inline-block; width: 14px; height: 0; vertical-align: middle; margin-right: 3px; border-top: 2px solid var(--navy2); }
.dc-k-avg { border-top: 2px dashed var(--gold); }
.dc-trend { font-size: .82rem; color: var(--ink); margin: 6px 0 0; }
.dc-trend b { color: var(--navy); }
/* 倍率別の合格可能性 */
.ratio { margin: 12px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.ratio h4 { margin: 0 0 6px; font-size: .95rem; color: var(--navy); }
.rfacts { margin: 0; padding-left: 1.1em; font-size: .8rem; color: var(--ink); }
.rfacts b { color: var(--navy); }
.rtable { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .85rem; }
.rtable th, .rtable td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.rtable thead th { font-size: .72rem; color: var(--muted); font-weight: 600; }
.rtable tbody th { font-weight: 700; color: var(--navy); }
.rtable tbody th small { display: block; font-weight: 400; font-size: .7rem; color: var(--muted); }
.rtable tr.base { background: var(--navy-soft); }
.rtable .rp { font-weight: 700; white-space: nowrap; }
.rinput { margin-top: 10px; padding: 10px; border-radius: 8px; background: var(--navy-soft); }
.rinput label { font-size: .8rem; font-weight: 600; color: var(--navy2); display: block; }
.rbox { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .9rem; }
.rbox input { width: 6.5em; font-size: 16px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.rout { margin: 6px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .85rem; }
.rout b { font-size: 1.3rem; color: var(--navy); }
.rout .rv { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }  /* ％と判定の記号を同じ行に保つ */
.fine.warn { color: #8a5a00; }
/* 内申点を考慮した参考判定（試験的） */
.rtable thead th small { display: block; font-weight: 400; }
.rtable td.nref { color: #5c4a24; background: var(--gold-soft); white-space: nowrap; font-size: .8rem; }
.rout-n { color: #5c4a24; }
.rout-n b { color: #5c4a24 !important; font-size: 1.1rem !important; }
.nrefbox { margin-top: 10px; padding: 10px; border-radius: 8px; background: var(--gold-soft); }
.nrefbox h5 { margin: 0 0 4px; font-size: .85rem; color: #5c4a24; }
.nrefbox .fine { color: #5c4a24; }
.ninline { margin: 8px 0 0; padding: 8px 10px; border: 1px dashed var(--gold); border-radius: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .8rem; }
.ninline .lbl { width: 100%; font-weight: 600; color: #5c4a24; }
.ninline label { display: inline-flex; align-items: center; gap: 4px; }
.ninline input { width: 4em; font-size: 16px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; }
/* 定員割れに近くなった場合の参考（主な％には含めない） */
.scenario { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--gold-soft); font-size: .8rem; color: #5c4a24; }
.scenario b { color: #5c4a24; }

.info { border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 10px 10px 0; padding: 10px 14px; margin: 0 0 16px; font-size: .88rem; }
.info p { margin: 0; } .info p + p { margin-top: 6px; color: #4a4032; }
.naishin { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.filters { display: grid; gap: 12px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px dashed var(--line); }
.row2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
.f { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--navy-soft); border-radius: 12px; padding: 4px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg span { display: block; text-align: center; padding: 11px 0; border-radius: 9px; color: var(--navy2); font-weight: 700; cursor: pointer; transition: .15s; }
.seg input:checked + span { background: var(--navy); color: #fff; box-shadow: 0 2px 6px rgba(13,34,64,.2); }
.seg input:focus-visible + span { outline: 3px solid #b9c9e6; }
.count { margin: 0; font-size: .8rem; color: var(--muted); }
.choices { display: grid; gap: 14px; }
.choice { display: flex; flex-direction: column; gap: 6px; }
.choice .cn { font-size: .82rem; font-weight: 700; color: var(--navy); }
.choice select.picked { border-color: var(--navy2); background-color: #f7f9fd; font-weight: 600; }

.err { color: var(--E); font-weight: 600; font-size: .9rem; margin: 14px 0 0; }
.err:empty { display: none; }

.nav { display: grid; gap: 10px; margin-top: 22px; }
.btn-main { font-size: 1.12rem; font-weight: 700; letter-spacing: .1em; color: #fff; background: var(--navy); border: none; border-radius: 12px;
  min-height: 58px; cursor: pointer; box-shadow: 0 4px 14px rgba(13,34,64,.25); transition: .15s; }
.btn-main:hover { background: var(--navy2); } .btn-main:active { transform: translateY(1px); }
.btn-main:focus-visible, .btn-sub:focus-visible, .btn-text:focus-visible, .btn-back:focus-visible { outline: 3px solid #b9c9e6; outline-offset: 2px; }
.btn-sub { font-size: 1rem; font-weight: 600; color: var(--navy); background: var(--white); border: 1.5px solid var(--navy); border-radius: 12px; min-height: 52px; cursor: pointer; }
.btn-text, .btn-back { background: none; border: none; color: var(--muted); font-size: .92rem; min-height: 44px; cursor: pointer; }
.btn-text { color: var(--navy2); font-weight: 600; }
@media (min-width: 720px) { .nav { grid-template-columns: 1fr 1fr; } .nav .btn-main { grid-column: 1 / -1; } }

/* ---------- 判定結果 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; background: var(--navy-soft); color: var(--navy2); border-radius: 999px; padding: 6px 14px; font-size: .82rem; font-weight: 600; }
.chip b { font-family: var(--serif); font-size: 1.25rem; color: var(--navy); }
.chip small { font-weight: 400; color: var(--muted); font-size: .72rem; }
.chip.muted { color: var(--muted); background: #f1f2f5; }
.chip-note { flex-basis: 100%; margin: 2px 2px 0; font-size: .78rem; color: var(--muted); }
div.chip-note { background: var(--navy-soft); border-radius: 8px; padding: 8px 10px; color: var(--ink); }
div.chip-note ul { margin: 4px 0; padding-left: 1.1em; }
div.chip-note li { margin: 2px 0; }
div.chip-note small { color: var(--muted); }

/* iPhone：画面の角・ホームバーの部分に文字やボタンが隠れないようにする（viewport-fit=cover と組み合わせ） */
main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.hero-in, .foot { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.stepper ol { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
.foot { padding-bottom: max(36px, calc(env(safe-area-inset-bottom) + 20px)); }
.prebanner { padding-top: max(3px, env(safe-area-inset-top)); }
.prebanner.devbuild { background: #b4462e; color: #fff; font-weight: 600; }  /* 開発版の目印（既存デモと見分けるため） */
button, a, summary, select, input { touch-action: manipulation; }  /* ダブルタップでの拡大を防ぐ */

.card { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 6px; margin-bottom: 14px; background: var(--white); position: relative; }
.card::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--navy); }
.card.k-ref::before { background: var(--navy); }  /* 参考程度も見た目は区別しない（区分は内部データのみ） */
.card.k-hard::before, .card.k-check::before { background: var(--none); }
.c-head { display: flex; justify-content: space-between; align-items: center; }
.c-no { font-size: .74rem; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.c-name { margin: 2px 0 12px; font-family: var(--serif); font-weight: 600; color: var(--navy); line-height: 1.35; }
.c-name .sch { font-size: 1.45rem; margin-right: 8px; }
.c-name .crs { font-size: .95rem; color: var(--navy2); display: inline-block; }
.tag { display: inline-block; font-size: .72rem; border-radius: 999px; padding: 2px 10px; font-weight: 700; white-space: nowrap; }
.t-enough { background: #e7f0fb; color: var(--navy2); } .t-ref { background: var(--gold-soft); color: #7a5c22; }
.t-hard { background: #eef0f3; color: #4a5260; } .t-check { background: #eef0f3; color: #4a5260; border: 1px dashed #aab2c0; }

.score { display: flex; align-items: center; gap: 16px; }
.grade { width: 84px; height: 84px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; color: #fff; background: var(--none); }
.grade b { font-family: var(--serif); font-size: 2.4rem; line-height: 1; }
.grade span { font-size: .68rem; margin-top: 3px; letter-spacing: .05em; }
.grade.g-A { background: var(--A); } .grade.g-B { background: var(--B); } .grade.g-C { background: var(--C); } .grade.g-D { background: var(--D); } .grade.g-E { background: var(--E); }
.grade.none { background: #f1f2f5; color: var(--none); border: 1.5px dashed #c5cbd6; width: 64px; height: 64px; }
.grade.none b { font-size: 1.6rem; } .grade.none span { font-size: .6rem; color: var(--muted); }
.pct { flex: 1; min-width: 0; }
.pct .lbl { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.pct b { font-family: var(--serif); font-size: 2.3rem; line-height: 1.15; color: var(--ink); }
.bar { height: 8px; background: #e9edf3; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--navy2); }
.bar i.g-A { background: var(--A); } .bar i.g-B { background: var(--B); } .bar i.g-C { background: var(--C); } .bar i.g-D { background: var(--D); } .bar i.g-E { background: var(--E); }
.refnote { margin: 12px 0 0; font-size: .85rem; background: var(--gold-soft); color: #5e4a22; border-radius: 8px; padding: 8px 12px; }

.nomark { display: flex; gap: 14px; align-items: flex-start; }
.nomark .nm-title { font-weight: 700; color: var(--navy); margin: 4px 0 2px; }
.nomark p { margin: 0 0 6px; font-size: .9rem; }
.notbad { font-size: .84rem !important; color: #2f4a6e; background: var(--navy-soft); border-radius: 8px; padding: 6px 10px; }

details.more { margin-top: 12px; border-top: 1px solid var(--line); }
details.more > summary, .acc > summary { list-style: none; cursor: pointer; min-height: 48px; display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; color: var(--navy2); font-size: .92rem; -webkit-tap-highlight-color: transparent; }
details.more > summary::-webkit-details-marker, .acc > summary::-webkit-details-marker { display: none; }
details.more > summary::after, .acc > summary::after { content: "＋"; font-weight: 400; font-size: 1.1rem; color: var(--gold); transition: transform .2s; }
details[open].more > summary::after, details[open].acc > summary::after { content: "－"; }
details > summary:focus-visible { outline: 3px solid #b9c9e6; border-radius: 6px; }
.blk { padding: 4px 0 14px; }
.blk h4 { margin: 0 0 6px; font-size: .85rem; color: var(--navy); letter-spacing: .03em; }
.blk h4::before { content: ""; display: inline-block; width: 3px; height: .9em; background: var(--gold); margin-right: 6px; vertical-align: -1px; }
.line { margin: 0; font-size: .95rem; } .line b { font-family: var(--serif); font-size: 1.5rem; color: var(--navy); margin: 0 2px; }
ul.ups, ul.req { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
ul.ups { grid-template-columns: repeat(5, 1fr); } ul.req { grid-template-columns: repeat(3, 1fr); }
ul.ups li, ul.req li { background: #f6f8fb; border-radius: 10px; text-align: center; padding: 8px 2px; display: flex; flex-direction: column; gap: 1px; font-size: .74rem; color: var(--muted); }
ul.ups li b, ul.req li b { font-size: .98rem; color: var(--ink); }
i.g { font-style: normal; font-weight: 700; display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; color: #fff; font-size: .72rem; margin: 2px auto 0; background: var(--none); }
i.g-A { background: var(--A); } i.g-B { background: var(--B); } i.g-C { background: var(--C); } i.g-D { background: var(--D); } i.g-E { background: var(--E); }
dl.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: .85rem; }
dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; }
.tbl { overflow-x: auto; }
.tbl table { border-collapse: collapse; width: 100%; font-size: .82rem; min-width: 280px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); padding: 6px 6px; text-align: center; white-space: nowrap; }
.tbl tr:first-child th { color: var(--muted); font-weight: 600; font-size: .74rem; }
.tbl td small, .tbl th small { display: block; color: var(--muted); font-weight: 400; font-size: .7rem; }
.tbl th:first-child { text-align: left; }
ul.dots { margin: 0; padding-left: 18px; font-size: .86rem; }

.keypoints { list-style: none; margin: 18px 0 12px; padding: 14px 16px; background: #f8f9fb; border-radius: 12px; font-size: .86rem; }
.keypoints li { position: relative; padding-left: 16px; }
.keypoints li + li { margin-top: 6px; }
.keypoints li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

.acc { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 0 -1px; }
.acc > summary { padding: 4px 2px; }
.acc-body { padding: 0 2px 16px; font-size: .88rem; }
.acc-body h3 { font-size: .9rem; color: var(--navy); margin: 14px 0 4px; }
.acc-body p { margin: 0; }
table.grades { border-collapse: collapse; font-size: .85rem; }
table.grades th, table.grades td { padding: 3px 10px 3px 0; text-align: left; }
ul.kinds { list-style: none; margin: 0; padding: 0; }
ul.kinds li { margin: 6px 0; } ul.kinds .tag { margin-right: 8px; }
.acc-body .f { margin: 8px 0 4px; }
.acc-body h4 { font-size: .88rem; color: var(--navy); margin: 16px 0 6px; }
.acc-body h4 small { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: .75rem; }
ol.sg { list-style: none; margin: 0; padding: 0; }
ol.sg li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
ol.sg li b { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
ol.sg li b i.g { margin: 0; }
ol.sg li em { font-style: normal; font-size: .68rem; background: var(--gold-soft); color: #7a5c22; border-radius: 6px; padding: 0 6px; margin-left: 6px; white-space: nowrap; }

.consult { margin: 22px 0 6px; padding: 20px 18px; border-radius: var(--r); background: var(--navy); color: #fff; text-align: center; }
.consult h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; line-height: 1.5; }
.consult p { margin: 0 0 14px; font-size: .88rem; color: #d3dbe8; text-align: left; }
.line-btn { display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--line-green); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 1.05rem; border-radius: 12px; min-height: 58px; padding: 10px 16px; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.line-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.line-ic { background: #fff; color: var(--line-green); font-size: .62rem; font-weight: 900; border-radius: 6px; padding: 3px 5px; letter-spacing: .02em; }
.consult .fine { color: #aab6c9; text-align: center; margin: 10px 0 0; }

.privacy { text-align: center; font-size: .76rem; color: var(--muted); margin: 18px 0 0; }
.foot { max-width: 760px; margin: 0 auto; padding: 16px 20px 36px; font-size: .74rem; color: var(--muted); text-align: center; }
.foot p { margin: 4px 0; } .foot .copy { font-family: var(--serif); letter-spacing: .1em; color: var(--navy2); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  .prebanner, .stepper, .nav, .consult, .privacy, #step1, #step2, #step3 { display: none !important; }
  #step4 { display: block !important; box-shadow: none; }
  details > *:not(summary) { display: block; }
  body { background: #fff; }
}


/* ============================================================
   完成版（2026-10-16）：ブランド・入試情報・合格者の実績・相談案内
   ============================================================ */
.brand-big { margin: 0 0 6px; font-family: var(--serif); font-weight: 700; font-size: 2.6rem; line-height: 1.1; letter-spacing: .18em; color: #e3cf9f; }
.brand-big::after { content: ""; display: block; width: 44px; height: 2px; background: var(--gold); margin-top: 10px; }
.hero h1 { font-size: 1.45rem; }
@media (min-width: 720px) { .brand-big { font-size: 3.2rem; } .hero h1 { font-size: 1.8rem; } }
.brand-inline { font-family: var(--serif); color: var(--gold); letter-spacing: .1em; }
.c-head { display: flex; justify-content: space-between; align-items: center; }
.c-brand { font-family: var(--serif); font-size: .72rem; letter-spacing: .12em; color: var(--gold); }

/* 入試情報 */
.exinfo { margin: 16px 0 0; padding: 12px 12px 4px; border-radius: 10px; background: #fafbfd; border: 1px solid var(--line); }
.exinfo h4, .record h4 { margin: 0 0 6px; font-size: .98rem; color: var(--navy); }
.exinfo h5 { margin: 12px 0 4px; font-size: .86rem; color: var(--navy2); }
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.itable { width: 100%; border-collapse: collapse; font-size: .8rem; }
.itable th, .itable td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.itable th:first-child, .itable td:first-child { text-align: left; }
.itable thead th { font-size: .7rem; color: var(--muted); font-weight: 600; }
.itable thead th small, .itable tbody th small { display: block; font-weight: 400; font-size: .66rem; color: var(--muted); }
.itable.sel td, .itable.sel th { text-align: center; }
.itable.sel tbody th { text-align: left; }
.cap27 { margin: 0 0 4px; font-size: .9rem; }
.chg { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.chg.down { background: #fdecea; color: #b3261e; } .chg.up { background: #e7f0fb; color: var(--navy2); } .chg.same { background: #eef1f5; color: var(--muted); }

/* 過去の合格者の実績 */
.record { margin: 12px 0 4px; padding: 12px; border-radius: 10px; border: 1px solid #e7dcc4; background: var(--gold-soft); }
.recdl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 8px 0; font-size: .9rem; }
.recdl dt { color: var(--muted); font-size: .8rem; align-self: center; }
.recdl dd { margin: 0; } .recdl dd b { font-size: 1.15rem; color: var(--navy); } .recdl dd small { margin-left: 4px; color: var(--muted); font-size: .74rem; }

/* 倍率を入れて確かめる：結果を2行に */
.rout { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 4px 10px; align-items: center; }
.rv-l { font-size: .8rem; color: var(--muted); }

/* 相談案内：ボタンの文字を途中で改行しない・見切れない */
.line-btn { flex-wrap: nowrap; }
.line-btn .line-tx { white-space: nowrap; font-size: clamp(.92rem, 4.2vw, 1.08rem); }
.line-btn .line-ic { flex: none; }
.consult h3 { font-size: clamp(1rem, 4.4vw, 1.15rem); }
.consult p { text-align: center; }

/* 結果画面の最後の文 */
.final-note { margin: 22px 0 6px; padding: 12px; border-top: 1px solid var(--line); text-align: center; font-size: .9rem; font-weight: 700; color: var(--ink); }

/* スマートフォンの画面下部（ホームバー）とボタンが重ならないように */
.nav-end { margin-bottom: 8px; }
main { padding-bottom: calc(env(safe-area-inset-bottom) + 24px); }
.btn-sub, .btn-text, .btn-main { white-space: nowrap; }

.foot-brand { font-family: var(--serif); font-size: 1.3rem; letter-spacing: .2em; color: var(--navy); margin: 0 0 4px; }
/* 入試情報（スマホ向けの並べ方） */
.itable.cap td { text-align: left; }
.itable tr.y27 th, .itable tr.y27 td { background: var(--navy-soft); font-weight: 700; }
.stages { list-style: none; margin: 4px 0; padding: 0; }
.stages .stg { padding: 8px 10px; margin: 6px 0; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: .84rem; line-height: 1.6; }
.stages .stg span { display: block; }
.stages .stg small { color: var(--muted); }
/* 共有ボタン */
.share { margin: 18px 0 6px; padding: 16px 14px; border-radius: var(--r); border: 1px solid #e7dcc4; background: var(--gold-soft); text-align: center; }
.share h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 1.02rem; color: var(--navy); }
.share-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 4px; }
.sh { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 8px; border-radius: 10px; font-size: .95rem; font-weight: 700; text-decoration: none; white-space: nowrap; border: none; cursor: pointer; font-family: inherit; }
.sh-native { grid-column: 1 / -1; background: var(--navy); color: #fff; }
.sh-line { background: var(--line-green); color: #fff; }
.sh-x { background: #111; color: #fff; }
.sh-copy { grid-column: 1 / -1; background: #fff; color: var(--navy); border: 2px solid var(--navy); }
.sh.off { opacity: .45; cursor: not-allowed; }
.sh[hidden] { display: none !important; }
