/* みらいルート v2 — やわらかい路線図。丸ゴシック・明るい空色・8色の未来路線 */
:root {
  --bg: #F1F6FF;
  --card: #FFFFFF;
  --ink: #2B2E4A;
  --ink-2: #474C6B;
  --muted: #6E7393;
  --line: #DCE4F3;
  --sun: #FFD23F;
  --sun-deep: #E9B500;
  --boy: #3E7BFA;
  --girl: #F2559A;
  --coed: #2BB39B;
  --line-global: #3B82F6;
  --line-doctor: #F0476A;
  --line-science: #0EA5A4;
  --line-leader: #8B5CF6;
  --line-business: #F97316;
  --line-free: #E6A700;
  --line-creator: #E5489B;
  --line-athlete: #3FA34D;
  --shadow: 0 6px 20px rgba(43, 46, 74, 0.08);
  --r: 20px;
  --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", sans-serif;
  --maxw: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-weight: 500; font-size: 16.5px; line-height: 1.85; letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
b, strong { font-weight: 700; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--line-global); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.c-global { --c: var(--line-global); } .c-doctor { --c: var(--line-doctor); } .c-science { --c: var(--line-science); } .c-leader { --c: var(--line-leader); }
.c-business { --c: var(--line-business); } .c-free { --c: var(--line-free); } .c-creator { --c: var(--line-creator); } .c-athlete { --c: var(--line-athlete); }
.tint { background: color-mix(in srgb, var(--c) 12%, white); }

/* ---------- header / footer ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); box-shadow: 0 2px 12px rgba(43,46,74,.06); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo svg { width: 32px; height: 32px; }
.logo-text { font-weight: 900; font-size: 20px; letter-spacing: .06em; }
.head-nav { display: flex; gap: 2px; align-items: center; }
.head-nav a { text-decoration: none; font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 7px 10px; border-radius: 999px; }
.head-nav a:hover { background: var(--bg); }
.head-nav .nav-cta { background: var(--sun); color: var(--ink); box-shadow: 0 3px 0 var(--sun-deep); }
@media (max-width: 560px) { .head-nav a:not(.nav-cta) { display: none; } }
.site-foot { margin-top: 56px; padding: 32px 0 44px; background: #2E3352; color: #D9DDF0; font-size: 13px; }
.site-foot a { color: #fff; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0; }

.crumbs { font-size: 12.5px; color: var(--muted); padding-top: 12px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "›"; margin-right: 4px; }
.crumbs a { text-decoration: none; }

/* ---------- headings ---------- */
h1, h2, h3 { margin: 0; line-height: 1.4; font-weight: 900; }
.section { padding: 34px 0 6px; }
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.sec-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; background: color-mix(in srgb, var(--c, var(--line-global)) 15%, white); color: var(--c, var(--line-global)); }
.sec-ico svg { width: 26px; height: 26px; }
.sec-head h2 { font-size: 21px; }
.sec-lead { color: var(--muted); font-size: 14px; margin: 0 0 16px; line-height: 1.7; }
.page-title { font-size: clamp(25px, 6.6vw, 32px); margin: 8px 0 6px; }
.small { font-size: 12.5px; color: var(--muted); }
.num { font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: 0; }

/* ---------- future badge ---------- */
.fb { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c); color: #fff; flex: 0 0 auto; box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(43,46,74,.15); }
.fb svg { width: 60%; height: 60%; }
.fb.lg { width: 54px; height: 54px; }
.fb.sm { width: 24px; height: 24px; box-shadow: 0 0 0 2px #fff; }
.fb.c-free { color: #3A2E00; }

/* ---------- buttons / chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 999px; font-family: inherit; font-weight: 900; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; }
.btn svg { width: 20px; height: 20px; }
.btn-sun { background: var(--sun); color: var(--ink); box-shadow: 0 4px 0 var(--sun-deep); }
.btn-sun:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--sun-deep); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: #fff; text-decoration: none; font-weight: 700; font-size: 14px; box-shadow: var(--shadow); }
.chip.plain { padding-left: 14px; }
.chip small { font-weight: 500; color: var(--muted); font-size: 12px; }

/* ---------- hero ---------- */
.hero { padding: 18px 0 4px; }
.hero-card { border-radius: 28px; overflow: hidden; background: linear-gradient(180deg, #FFE9DA 0%, #E3EEFF 62%); box-shadow: var(--shadow); }
.hero-ill svg { width: 100%; height: auto; }
.hero-text { padding: 4px 20px 22px; }
.hero h1 { font-size: clamp(28px, 7.8vw, 42px); line-height: 1.35; }
.hero p.lead { font-size: 15px; color: var(--ink-2); margin: 10px 0 18px; }
.hero-ill .rail { fill: none; stroke-width: 7; stroke-linecap: round; }
@media (prefers-reduced-motion: no-preference) {
  .hero-ill .rail { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s cubic-bezier(.6,.05,.3,1) forwards; animation-delay: var(--d, 0s); }
  .hero-ill .bub { opacity: 0; animation: pop .4s ease-out forwards; animation-delay: calc(var(--d, 0s) + 1.1s); transform-box: fill-box; transform-origin: center; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes pop { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
}

/* ---------- entries ---------- */
.entries { display: grid; gap: 10px; }
.entry { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: var(--r); padding: 14px 16px; text-decoration: none; box-shadow: var(--shadow); }
.entry .e-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, white); color: var(--c); flex: 0 0 auto; }
.entry .e-ico svg { width: 30px; height: 30px; }
.entry b { display: block; font-size: 16.5px; line-height: 1.5; }
.entry span { display: block; font-size: 13px; color: var(--muted); line-height: 1.6; }
.entry.feature { background: linear-gradient(120deg, #3E4AA8, #6C5CE7); color: #fff; }
.entry.feature span { color: #E3E6FF; }
.entry.feature .e-ico { background: rgba(255,255,255,.18); color: #fff; }

/* ---------- 路線カード（トップ） ---------- */
.lines { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.line-card { display: flex; flex-direction: column; gap: 8px; border-radius: var(--r); padding: 14px; text-decoration: none; background: color-mix(in srgb, var(--c) 13%, white); }
.line-card b { font-size: 15.5px; line-height: 1.45; }
.line-card .stops { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
@media (min-width: 620px) { .lines { grid-template-columns: repeat(4, 1fr); } }

/* ---------- 路線ページの帯 ---------- */
.line-hero { position: relative; overflow: hidden; background: var(--c); color: #fff; padding: 26px 0 30px; }
.line-hero.c-free { color: #3A2E00; }
.line-hero .wrap { display: flex; gap: 14px; align-items: center; }
.line-hero .fb { box-shadow: 0 0 0 4px rgba(255,255,255,.6); background: #fff; color: var(--c); }
.line-hero h1 { font-size: clamp(22px, 6vw, 30px); }
.line-hero p { margin: 4px 0 0; font-size: 14px; opacity: .95; }
.line-hero::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; border: 22px solid rgba(255,255,255,.18); }
.note-card { background: #fff; border-radius: 16px; padding: 14px 16px; margin: 18px 0 0; font-size: 13.5px; color: var(--ink-2); box-shadow: var(--shadow); line-height: 1.75; }

/* ---------- 駅リスト ---------- */
.route { list-style: none; margin: 0; padding: 0; position: relative; }
.route::before { content: ""; position: absolute; left: 19px; top: 24px; bottom: 24px; width: 8px; border-radius: 4px; background: color-mix(in srgb, var(--c, var(--line-global)) 45%, white); }
.route > li { position: relative; padding: 0 0 12px 54px; }
.route > li .dot { position: absolute; left: 6px; top: 16px; width: 34px; height: 34px; border-radius: 50%; background: var(--c, var(--line-global)); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 14px; box-shadow: 0 0 0 4px var(--bg); }
.c-free .route > li .dot, .route.c-free > li .dot { color: #3A2E00; }
.stop { display: block; background: #fff; border-radius: 18px; padding: 13px 15px; text-decoration: none; box-shadow: var(--shadow); }
.stop-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stop-name { font-weight: 900; font-size: 17px; line-height: 1.45; }
.stop-val { text-align: right; white-space: nowrap; }
.stop-val .num { font-size: 24px; color: var(--c, var(--ink)); }
.c-free .stop-val .num { color: #8A6400; }
.stop-val small { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.stop-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.gtag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; color: #fff; }
.g-男子 { background: var(--boy); } .g-女子 { background: var(--girl); } .g-共学, .g-別学 { background: var(--coed); }
.bar { height: 10px; background: #EEF2FA; border-radius: 5px; margin-top: 9px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--c, var(--line-global)); border-radius: 5px; }
.why { font-size: 13px; color: var(--ink-2); margin-top: 7px; line-height: 1.65; }

/* ---------- 学校ヘッダー ---------- */
.school-hero { margin-top: 12px; background: #fff; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow); }
.school-ill svg { width: 100%; height: auto; }
.school-id { padding: 4px 18px 18px; text-align: center; }
.school-id .kana { font-size: 12.5px; color: var(--muted); letter-spacing: .25em; font-weight: 700; }
.school-id h1 { font-size: clamp(30px, 9vw, 42px); line-height: 1.25; margin: 2px 0; }
.school-id .full { font-size: 13px; color: var(--ink-2); }
.facts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 12px 0 14px; }
.fact { font-size: 12.5px; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: var(--bg); }
.fact.strong { background: color-mix(in srgb, var(--line-free) 25%, white); }
.school-id .btn-row { justify-content: center; }
.neighbors { display: grid; grid-template-columns: 1fr 1fr; background: #F7F9FE; }
.neighbors a { padding: 10px 14px; font-size: 13px; font-weight: 700; text-decoration: none; display: flex; align-items: center; gap: 6px; }
.neighbors a + a { justify-content: flex-end; text-align: right; }
.neighbors small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }

/* ---------- 基本情報タイル ---------- */
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.info { background: #fff; border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: flex-start; min-width: 0; overflow-wrap: anywhere; }
.info.wide { grid-column: 1 / -1; }
.info .i-ico { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--line-global)) 14%, white); color: var(--c, var(--line-global)); flex: 0 0 auto; }
.info .i-ico svg { width: 21px; height: 21px; }
.info .i-label { font-size: 11.5px; color: var(--muted); font-weight: 700; display: block; line-height: 1.4; }
.info .i-val { font-size: 15px; font-weight: 700; line-height: 1.55; display: block; }
.info .i-val small { font-weight: 500; color: var(--ink-2); font-size: 12.5px; display: block; }
.info ul { margin: 2px 0 0; padding: 0; list-style: none; }

/* ---------- 相性表 ---------- */
.fit { display: grid; gap: 8px; }
.fit-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-decoration: none; background: #fff; border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); }
.fit-row b { font-size: 14.5px; line-height: 1.4; }
.fit-dots { display: flex; gap: 5px; }
.fit-dots i { width: 15px; height: 15px; border-radius: 50%; background: color-mix(in srgb, var(--c) 18%, white); }
.fit-dots i.on { background: var(--c); }
.fit-row.nodata { opacity: .55; }
.fit-row .rank { font-size: 11px; color: var(--muted); display: block; font-weight: 500; }

/* ---------- 進路（合格実績） ---------- */
.branch { background: #fff; border-radius: var(--r); padding: 14px 14px 6px; box-shadow: var(--shadow); }
.branch-row { display: grid; grid-template-columns: 6.4em 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #EEF2FA; }
.branch-row:last-of-type { border-bottom: 0; }
.branch-row .dest-name { font-weight: 700; font-size: 14px; line-height: 1.35; text-decoration: none; }
.branch-row .track { position: relative; height: 16px; background: #EEF2FA; border-radius: 8px; overflow: hidden; }
.branch-row .track span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 8px; background: var(--c, var(--line-global)); }
.branch-row .val { text-align: right; min-width: 4.4em; }
.branch-row .val .num { font-size: 20px; color: var(--c); }
.branch-row .val small { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.branch-note { font-size: 12px; color: var(--muted); margin: 8px 0 6px; line-height: 1.7; }

/* ---------- グラフ・表 ---------- */
.chart-card { background: #fff; border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.chart-card svg { width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; box-shadow: var(--shadow); }
.cmp { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 560px; background: #fff; font-size: 13.5px; }
.cmp th, .cmp td { padding: 10px 10px; text-align: center; border-bottom: 1px solid #EEF2FA; white-space: nowrap; }
.cmp thead th { background: #F7F9FE; font-size: 13px; font-weight: 900; }
.cmp thead th a { text-decoration: none; }
.cmp th[scope=row] { text-align: left; font-weight: 700; color: var(--ink-2); position: sticky; left: 0; background: #fff; z-index: 1; font-size: 12.5px; }
.cmp .me { background: color-mix(in srgb, var(--sun) 22%, white); }
.cmp .best { font-weight: 900; color: #C2410C; }

/* ---------- 入試 ---------- */
.exam-pills { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 8px; margin-bottom: 14px; }
.pill { background: #fff; border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; }
.pill .p-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c, var(--line-global)) 15%, white); color: var(--c, var(--line-global)); flex: 0 0 auto; }
.pill .p-ico svg { width: 20px; height: 20px; }
.pill small { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.pill b { font-size: 15px; line-height: 1.4; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 40px; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 26px; bottom: -2px; width: 4px; border-radius: 2px; background: #E0E7F5; }
.timeline li:last-child::before { display: none; }
.timeline .t-dot { position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%; background: var(--line-global); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 900; }
.timeline b { display: block; font-size: 15px; }
.timeline span { display: block; font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.round-list { display: grid; gap: 8px; }
.round { background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: var(--shadow); display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; }
.round .r-date { grid-row: span 2; text-align: center; background: color-mix(in srgb, var(--line-global) 12%, white); border-radius: 12px; padding: 6px 10px; min-width: 70px; font-weight: 900; font-size: 15px; line-height: 1.3; color: #1D4ED8; }
.round .r-date small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700; }
.round b { font-size: 15px; }
.round span { font-size: 12.5px; color: var(--ink-2); }
.tag-yes { color: #C2410C; font-weight: 700; } .tag-no { color: #15803D; font-weight: 700; }

/* ---------- 先輩 ---------- */
.senpai { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sp { background: #fff; border-radius: 16px; padding: 10px 12px 12px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.sp .sp-top { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--c); }
.sp .sp-top .fb { width: 20px; height: 20px; box-shadow: none; }
.sp b { font-size: 15.5px; line-height: 1.4; }
.sp span { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.sp a { font-size: 12px; color: var(--muted); text-decoration: none; margin-top: 2px; }

/* ---------- 学費 ---------- */
.money { background: #fff; border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.money-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.money-big .num { font-size: 36px; color: #C2410C; }
.money-rows { margin-top: 12px; display: grid; gap: 6px; font-size: 14px; }
.money-rows div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.cb { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; align-items: center; font-size: 12.5px; margin-top: 6px; }
.cb > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb > div { height: 14px; background: #EEF2FA; border-radius: 7px; overflow: hidden; }
.cb > div span { display: block; height: 100%; background: #F59E0B; border-radius: 7px; }
.cb.avg > div span { background: #C9D2E6; }

/* ---------- タグ ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13.5px; padding: 6px 13px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-weight: 700; }
.prog-list { display: grid; gap: 8px; margin-top: 12px; font-size: 14.5px; }
.prog-list div { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); }
.prog-list svg { width: 22px; height: 22px; color: var(--line-global); flex: 0 0 auto; }

/* ---------- 広告枠 ---------- */
.ad-slot { margin: 26px 0 6px; border-radius: var(--r); padding: 16px; background: #FFFBEA; box-shadow: inset 0 0 0 2px #F6E08A; }
.ad-slot .ad-label { font-size: 11px; color: #8A6A00; font-weight: 700; }
.ad-slot b { display: block; font-size: 16.5px; margin: 4px 0 2px; }
.ad-slot p { font-size: 13px; color: var(--ink-2); margin: 0; }
.ad-slot .ad-links { display: grid; gap: 8px; margin-top: 10px; }
.ad-slot .ad-links a { display: block; padding: 12px 14px; border-radius: 14px; background: #fff; text-decoration: none; font-weight: 700; font-size: 14px; }

/* ---------- 一覧 ---------- */
.school-list { display: grid; gap: 8px; }
.sl { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; background: #fff; border-radius: 18px; padding: 12px 14px; text-decoration: none; box-shadow: var(--shadow); }
.sl b { font-size: 16.5px; }
.sl .sl-meta { grid-column: 1; font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sl .sl-lines { grid-row: span 2; grid-column: 2; display: flex; gap: 4px; }

/* ---------- tabs / filters ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; background: #fff; border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 14px; box-shadow: var(--shadow); }
.tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-family: inherit; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- 偏差値表 ---------- */
.htable { border-collapse: separate; border-spacing: 0; width: 100%; background: #fff; font-size: 13.5px; }
.htable th, .htable td { padding: 9px 8px; border-bottom: 1px solid #EEF2FA; text-align: center; white-space: nowrap; }
.htable thead th { background: #F7F9FE; font-weight: 900; font-size: 12.5px; }
.htable td:first-child, .htable th:first-child { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; }
.htable thead th:first-child { background: #F7F9FE; }
.htable a { text-decoration: none; font-weight: 700; }
.htable .now { font-weight: 900; font-size: 16px; }
.up { color: #DC2626; font-size: 11.5px; font-weight: 700; } .down { color: #2563EB; font-size: 11.5px; font-weight: 700; } .flat { color: var(--muted); font-size: 11.5px; }

/* ---------- マップ ---------- */
.map-card { background: #fff; border-radius: 24px; padding: 14px 12px 12px; box-shadow: var(--shadow); }
.map-card svg { width: 100%; height: auto; touch-action: manipulation; }
.map-card .pt { cursor: pointer; }
.map-card .pt circle { stroke: #fff; stroke-width: 2; }
.map-card .pt text { font-size: 10.5px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.map-card .pt.dim { opacity: .18; }
.map-card .pt.hl circle { stroke: var(--ink); stroke-width: 3; }
.map-tip { min-height: 44px; margin-top: 8px; font-size: 13.5px; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.quads { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.quad { background: #F7F9FE; border-radius: 14px; padding: 10px 12px; font-size: 12.5px; line-height: 1.7; }
.quad b { display: block; font-size: 13px; margin-bottom: 2px; }
.quad a { text-decoration: none; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.filters button { border: 0; font-family: inherit; font-weight: 700; font-size: 13px; padding: 7px 13px; border-radius: 999px; background: #fff; color: var(--ink-2); box-shadow: var(--shadow); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- prose ---------- */
.prose { background: #fff; border-radius: var(--r); padding: 18px 18px 8px; font-size: 15px; box-shadow: var(--shadow); }
.prose h2 { font-size: 17.5px; margin: 16px 0 6px; }
.prose p { color: var(--ink-2); }
.empty-note { background: #fff; border-radius: 16px; padding: 16px; font-size: 14px; box-shadow: var(--shadow); }

/* ---------- 診断 ---------- */
.quiz-body { min-height: 100svh; display: flex; flex-direction: column; }
.progress { display: flex; align-items: center; margin: 14px 0 0; }
.progress i { flex: 1; height: 6px; background: #DCE4F3; }
.progress i.done { background: var(--line-global); }
.progress b { width: 16px; height: 16px; border-radius: 50%; background: #DCE4F3; flex: 0 0 auto; }
.progress b.done { background: var(--line-global); }
.progress b.now { width: 24px; height: 24px; background: var(--sun); box-shadow: 0 0 0 4px #fff; }
.q-screen { flex: 1; display: flex; flex-direction: column; padding: 22px 0 30px; }
.q-step { font-size: 13px; font-weight: 700; color: var(--muted); }
.q-title { font-size: clamp(22px, 6.2vw, 29px); line-height: 1.45; margin: 6px 0 4px; }
.q-hint { font-size: 13.5px; color: var(--muted); margin: 0 0 16px; }
.opts { display: grid; gap: 10px; }
.opts.grid2 { grid-template-columns: 1fr 1fr; }
.opt { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 64px; padding: 12px 14px; border-radius: 18px; border: 0; background: #fff; box-shadow: var(--shadow); font-family: inherit; font-size: 15.5px; font-weight: 700; color: var(--ink); cursor: pointer; }
.opts.grid2 .opt { flex-direction: column; align-items: flex-start; min-height: 140px; }
.opt small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.opt[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--c, var(--line-global)); background: color-mix(in srgb, var(--c, var(--line-global)) 10%, white); }
.q-nav { display: flex; gap: 10px; margin-top: auto; padding-top: 20px; }
.q-nav .btn { flex: 1; }
.q-nav .btn[disabled] { opacity: .35; cursor: default; }
@media (prefers-reduced-motion: no-preference) {
  .q-screen.enter { animation: slidein .28s ease-out; }
  @keyframes slidein { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
}
.result-head { background: linear-gradient(120deg, #3E4AA8, #6C5CE7); color: #fff; border-radius: 24px; padding: 20px 18px; margin-top: 12px; }
.result-head .mix { display: flex; gap: 8px; margin-bottom: 8px; }
.result-head h1 { font-size: clamp(22px, 6vw, 28px); line-height: 1.45; }
.result-head p { margin: 8px 0 0; color: #E3E6FF; font-size: 13.5px; }
.match { font-weight: 900; font-size: 22px; color: var(--c, var(--line-global)); }

main { overflow-x: clip; }
