/* 全部読めるページ（read.trinity-waves.com、T-611・D-883。src/shared/views/free-read.ts）。お店の色と字に合わせた、本を読むための
   1段の白い紙面。システムの字だけ（外の字を読み込まない）。広告の枠は本文の幅で、上下の線と「広告」の札で本文と分ける。 */
:root {
  --paper: #ffffff;
  --ink: #111111;
  --text: #2b2b2b;
  --muted: #767676;
  --sub: #595959;
  --line: #eaeaea;
  --line-strong: #d5d5d5;
  --band: #f7f7f7;
  --accent: #4f55b0;
  --accent-ink: #ffffff;
  --accent-soft: #eef0fa;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif", "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, Roboto, "Noto Sans", sans-serif;
  --radius: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.7 var(--sans); }
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; top: 8px; inset-inline-start: 8px; background: #fff; padding: 8px 12px; z-index: 50; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip: auto; overflow: visible; }
.fr-wrap { max-width: 44rem; margin: 0 auto; padding: 0 16px; }
main.fr-wrap { padding-bottom: 56px; }

.fr-header { border-bottom: 1px solid var(--line); background: #fff; }
.fr-header .fr-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; }
.fr-brand { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.fr-brand span { color: var(--accent); }
.fr-list { font-size: .9rem; color: var(--sub); }
.fr-footer { border-top: 1px solid var(--line); background: var(--band); color: var(--sub); font-size: .85rem; padding: 20px 0 28px; }
.fr-footer a { color: var(--sub); }
.fr-copy { color: var(--muted); }

.crumbs ol { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: .85rem; color: var(--sub); }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: var(--line-strong); }
.crumbs a { color: var(--sub); }
.crumbs [aria-current] { color: var(--muted); }

h1, h2, h3 { line-height: 1.4; color: var(--ink); }
h1 { font-size: 1.6rem; margin: 12px 0; }
.fr-lead { color: var(--sub); }
.fr-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--accent); border-radius: var(--radius); background: #fff; color: var(--accent); font-weight: 700; text-decoration: none; }
.fr-button.primary { background: var(--accent); color: var(--accent-ink); }
.fr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

.fr-book-head { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: start; margin: 20px 0 24px; }
.fr-cover { width: 160px; border-radius: 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.fr-kicker { margin: 0; color: var(--accent); font-weight: 700; font-size: .9rem; }
.fr-by { margin: 0 0 8px; color: var(--sub); }
.fr-catch { font-weight: 700; line-height: 1.6; }
.fr-offer { margin: 24px 0; padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--accent-soft); font-size: .95rem; }
.fr-offer p { margin: 0 0 10px; }
/* 会員の名前（Trinity Member と小さな「月額会員」。お店の store.css と同じ）。 */
.tm-name > span { white-space: nowrap; }
.tm-sub { margin-inline-start: .35em; font-size: .68em; font-weight: 500; opacity: .8; }
.fr-offer p:last-child { margin-bottom: 0; }
.fr-toc ol { padding-inline-start: 1.6em; }
.fr-toc li { margin: 6px 0; }
.fr-langs ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }

.fr-book-title { margin: 20px 0 4px; font-size: .9rem; color: var(--sub); }
.fr-book-title a { color: var(--sub); }
.fr-ads-line { margin: 0 0 8px; font-size: .85rem; color: var(--muted); }
.fr-body { font-family: var(--serif); color: var(--text); font-size: 1.08rem; line-height: 1.95; }
.fr-body h2 { font-family: var(--sans); font-size: 1.35rem; margin: 40px 0 20px; }
.fr-body h3 { font-family: var(--sans); font-size: 1.1rem; margin: 28px 0 12px; }
.fr-body p { margin: 0 0 1em; }
.fr-end { margin: 32px 0; text-align: center; color: var(--sub); }
.fr-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 36px 0 0; padding-top: 20px; border-top: 1px solid var(--line-strong); font-size: .9rem; }
.fr-pager [rel="next"] { justify-self: end; }
.fr-pager > a:not(.fr-button) { text-align: center; color: var(--sub); }

.ad-slot { margin: 36px 0; padding: 12px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--sans); }
.ad-label { margin: 0 0 8px; font-size: .75rem; color: var(--muted); text-align: center; letter-spacing: .1em; }
.ad-slot ins.adsbygoogle { display: block; }
/* 配信のなかった枠（AdSense が data-ad-status="unfilled" を付ける）は、札と線ごと隠す。 */
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }

.fr-books { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 24px 16px; }
.fr-books a { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; }
.fr-books img { border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, .1); }
.fr-books-title { font-weight: 700; line-height: 1.4; }
.fr-books-by { color: var(--sub); font-size: .85rem; }
.fr-root-langs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; font-size: 1.1rem; }

@media (max-width: 520px) {
  .fr-book-head { grid-template-columns: 110px 1fr; gap: 14px; }
  .fr-cover { width: 110px; }
  h1 { font-size: 1.35rem; }
  .fr-body { font-size: 1.02rem; }
  .fr-pager { grid-template-columns: 1fr 1fr; }
  .fr-pager > a:not(.fr-button) { grid-column: 1 / -1; grid-row: 2; }
}
