/* 白地に藍一色、朱は小さく。路線図の細い線で章をつなぐ */
:root {
  --paper: #FAFAF7; --ink: #1B2440; --soft: #5D6478; --rule: #E3E2DC; --tint: #EEF0F5; --shu: #C8352B;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --paper: #11141F; --ink: #E9E8E2; --soft: #9EA3B5; --rule: #262B3C; --tint: #1A1F2F; --shu: #E8573F; color-scheme: dark } }
* { box-sizing: border-box }
html { scroll-padding-top: 16px }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.7 }
.wrap { max-width: 640px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)) }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance }
p { margin: 0 }
a { color: inherit }
:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px }
[hidden] { display: none !important }
.label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--soft); font-weight: 700 }

.bar { background: var(--tint); font-size: 14px }
.bar .wrap { padding-block: 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between }
.bar a { font-weight: 700; color: var(--shu); text-underline-offset: 3px }

.mark { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.mark .name { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; text-decoration: none }
.mark svg { width: 22px; height: 22px; flex: none }
.edition { font-size: 12px; color: var(--soft) }

/* 目次ページの表紙 */
.cover .wrap { padding-block: 40px 32px; display: grid; gap: 22px }
.cover h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(44px, 13vw, 80px); line-height: 1.02; letter-spacing: -.02em }
.cover h1 em { font-style: normal; color: var(--shu) }
.cover .lede { font-size: 17px; color: var(--soft); max-width: 34ch }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule) }
.facts div { padding: 12px 0 10px; display: grid; gap: 2px }
.facts div + div { padding-left: 14px; border-left: 1px solid var(--rule) }
.facts b { font-family: var(--serif); font-size: 26px; line-height: 1 }
.facts span { font-size: 12px; color: var(--soft) }

/* 路線図の目次 */
.line { padding-block: 8px 4px }
.line .label { margin-bottom: 10px; display: block }
.strip { overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * max(16px, env(safe-area-inset-left))); padding-inline: max(16px, env(safe-area-inset-left)) }
.strip::-webkit-scrollbar { display: none }
.strip ol { list-style: none; margin: 0; padding: 0 0 6px; display: flex; width: max-content; position: relative }
.strip ol::before { content: ""; position: absolute; left: 7px; right: 7px; top: 7px; height: 2px; background: var(--ink) }
.strip a { display: grid; gap: 8px; width: 104px; text-decoration: none; position: relative }
.strip .stop { width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink) }
.strip li.here .stop { background: var(--shu); border-color: var(--shu) }
.strip .no { font-size: 11px; color: var(--soft); letter-spacing: .08em }
.strip .t { font-size: 14px; font-weight: 700; line-height: 1.3; padding-right: 10px }

.part { padding-top: 48px; display: grid; gap: 4px }
.part .no { font-size: 12px; letter-spacing: .14em; color: var(--shu); font-weight: 700 }
.part h2 { font-family: var(--serif); font-size: clamp(28px, 7.5vw, 38px); line-height: 1.12 }
.toc { list-style: none; margin: 12px 0 0; padding: 0; display: grid }
.toc > li > a { text-decoration: none }
.toc b { font-size: 17px }
.toc span { font-size: 15px; color: var(--soft) }
.toc > li > a:hover b { text-decoration: underline; text-decoration-color: var(--shu); text-underline-offset: 4px }
.soon { font-size: 14px; color: var(--soft); padding-top: 12px }

/* 章のページ */
.top .wrap { padding-block: 20px 0 }
.crumb { font-size: 12px; letter-spacing: .14em; color: var(--shu); font-weight: 700; text-transform: uppercase; padding-top: 32px }
.crumb a { text-decoration: none }
article.ch { display: grid; gap: 16px; padding-top: 8px }
article.ch h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(34px, 9.5vw, 52px); line-height: 1.08; letter-spacing: -.01em }
.answer { font-size: 18px; line-height: 1.65 }
.list { list-style: none; margin: 0; padding: 0; display: grid }
.list li { padding-block: 14px; border-top: 1px solid var(--rule); display: grid; gap: 2px }
.list li:last-child { border-bottom: 1px solid var(--rule) }
.list b { font-size: 16px; line-height: 1.45 }
.list span { font-size: 15px; color: var(--soft) }
.list a { text-underline-offset: 3px }
span.new { display: inline-block; font-size: 10px; letter-spacing: .12em; font-weight: 700; color: #fff; background: var(--shu); border-radius: 3px; padding: 1px 6px; margin-right: 6px; vertical-align: 3px; font-family: var(--sans) }
.tip { background: var(--tint); border-radius: 4px; padding: 16px 18px; display: grid; gap: 4px }
.tip .label { color: var(--shu) }
.tip p { font-size: 15px }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; font-size: 13px; color: var(--soft) }
.row a { text-underline-offset: 3px }
.share-btn { font: inherit; font-size: 13px; font-weight: 700; background: none; color: var(--ink); border: 1px solid var(--ink); border-radius: 999px; padding: 6px 14px; cursor: pointer }
.share-btn:hover { background: var(--ink); color: var(--paper) }
.next { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 32px }
.next a { display: grid; gap: 2px; padding: 14px 0; border-top: 2px solid var(--ink); text-decoration: none }
.next a.fwd { text-align: right; grid-column: 2 }
.next small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); font-weight: 700 }
.next b { font-size: 15px; line-height: 1.35 }

/* 登録 */
.signup { margin-block: 48px 8px; background: var(--ink); color: var(--paper); padding: 28px 22px; border-radius: 4px; display: grid; gap: 14px }
.signup h2 { font-family: var(--serif); font-size: 28px; line-height: 1.15 }
.signup p { font-size: 15px; opacity: .85 }
.signup form { display: grid; gap: 8px }
.signup input, .signup select { font: inherit; padding: 12px 14px; border-radius: 4px; border: 0; min-width: 0; background: var(--paper); color: var(--ink) }
.signup button { font: inherit; font-weight: 700; padding: 12px 18px; border: 0; border-radius: 4px; background: var(--shu); color: #fff; cursor: pointer }
.signup button:disabled { opacity: .6 }
.signup small { font-size: 12px; opacity: .7 }
.signup .err { color: #FFB4A8; font-size: 14px }
.hp { position: absolute; left: -9999px }

footer { padding-block: 40px 56px; color: var(--soft); font-size: 13px; display: grid; gap: 6px }
footer a { text-underline-offset: 3px }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 8px 16px; border-radius: 999px; font-size: 14px; max-width: calc(100% - 32px) }
.consent { position: fixed; left: 0; right: 0; bottom: 0; background: var(--paper); border-top: 1px solid var(--rule); box-shadow: 0 -4px 16px rgba(0,0,0,.08); z-index: 20 }
.consent .wrap { padding-block: 14px calc(14px + env(safe-area-inset-bottom)); display: grid; gap: 10px; font-size: 14px }
.consent .btns { display: flex; gap: 8px }
.consent button { font: inherit; font-size: 14px; font-weight: 700; padding: 8px 16px; border-radius: 4px; cursor: pointer; border: 1px solid var(--ink); background: none; color: var(--ink) }
.consent button.yes { background: var(--ink); color: var(--paper) }
article.ch > span.new { justify-self: start; margin-bottom: -8px }
/* 目次の中の全ルール一覧 */
.toc > li { border-top: 1px solid var(--rule); padding-block: 14px 10px }
.toc > li:last-child { border-bottom: 1px solid var(--rule) }
.rules { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px }
.rules a { display: block; position: relative; padding: 2px 0 2px 18px; font-size: 15px; color: var(--soft); text-decoration: none; border: 0 }
.rules a::before { content: ""; position: absolute; left: 2px; top: .75em; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink) }
.rules a:hover { color: var(--ink) }
/* 章の下の反応（1行） */
.fb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-top: 20px; font-size: 13px; color: var(--soft) }
.fb button { font: inherit; background: none; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 10px; cursor: pointer; color: var(--ink) }
.fb button.on { border-color: var(--ink) }
.fb .fb-link { border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; color: var(--soft) }
.fb form { flex-basis: 100%; display: grid; gap: 6px }
.fb textarea { font: inherit; font-size: 14px; padding: 10px; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); color: var(--ink); resize: vertical }
.fb form button { justify-self: start; background: var(--ink); color: var(--paper); border-color: var(--ink) }

/* SEO 記事（/answers/） */
.art .meta { font-size: 13px; color: var(--soft) }
.art h2 { font-family: var(--serif); font-size: clamp(24px, 6vw, 30px); line-height: 1.2; padding-top: 16px }
.art h3 { font-size: 17px; line-height: 1.4 }
.art p, .art ul, .art ol { margin: 0 }
.art ul:not(.list), .art ol { padding-left: 1.2em; display: grid; gap: 6px }
.art .contents { border-left: 2px solid var(--shu); padding: 4px 0 4px 16px; font-size: 15px }
.art .contents ol { padding-left: 1.2em }
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch }
.tbl table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5 }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule) }
.tbl th { font-size: 13px; color: var(--soft); font-weight: 700; border-bottom: 2px solid var(--ink) }
.art figure { margin: 0 }
.art figure img { width: 100%; height: auto; border-radius: 4px; display: block }
.art figcaption { font-size: 13px; color: var(--soft); padding-top: 6px }
.deeper { display: grid; gap: 4px }
.deeper .label { font-size: 12px; letter-spacing: .14em; color: var(--shu); font-weight: 700; text-transform: uppercase }
