/* まんが偉人伝 ― 墨・和紙・朱 */
:root {
  --ink: #12110f;
  --ink-2: #1b1814;
  --ink-3: #221f1a;
  --ink-4: #2b2620;
  --ink-5: #3d352c;
  --paper: #f2ece0;
  --paper-2: #d6ccba;
  --muted: #b3a995;
  --muted-2: #9a907f;
  --accent: #c8402f;
  --mincho: 'Zen Old Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --sans: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--sans); line-height: 1.7; -webkit-font-smoothing: antialiased; }
body.reading { background: #0e0d0b; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
img { display: block; max-width: 100%; }
h1, h2 { font-family: var(--mincho); letter-spacing: 0.06em; }
.wrap { max-width: 1320px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.wrap-narrow { max-width: 1080px; margin: 0 auto; padding: 0 40px; }
.section { padding-top: 88px; }
.mt { margin-top: 32px; }
.muted { color: var(--muted); }
.small { font-size: 12px; color: var(--muted-2); line-height: 1.8; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* header */
.site-header { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 28px; padding-bottom: 28px; }
.logo { display: flex; align-items: baseline; gap: 12px; }
.logo-main { font-family: var(--mincho); font-weight: 900; font-size: 26px; letter-spacing: 0.08em; }
.logo-sub { font-size: 11px; letter-spacing: 0.24em; color: var(--muted); }
.main-nav { display: flex; gap: 28px; flex-wrap: wrap; font-size: 14px; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* badges & buttons */
.badge-accent { background: var(--accent); color: #fff; padding: 4px 10px; font-weight: 700; font-size: 12px; letter-spacing: 0.14em; }
.badge-dark { position: absolute; left: 12px; bottom: 12px; font-size: 11px; letter-spacing: 0.1em; background: var(--ink); color: #e6dccb; padding: 3px 8px; }
.tag { background: var(--ink-4); padding: 4px 10px; font-size: 12px; letter-spacing: 0.12em; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; font-size: 15px; }
.btn-accent { background: var(--accent); color: #fff; font-weight: 700; }
.btn-accent:hover { background: #b23525; }
.btn-dark { background: var(--ink-4); }
.btn-dark:hover { background: var(--ink-5); }
.btn-sub { min-height: 44px; padding: 0 18px; background: #1d1a16; color: var(--paper-2); font-size: 13px; }
.btn-ink { background: var(--ink-2); color: var(--paper); min-height: 44px; font-size: 14px; }
.notice { display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; background: #1d1a16; color: var(--paper-2); font-size: 14px; }

/* home hero */
.hero { position: relative; min-height: 680px; overflow: hidden; background: var(--ink-2); padding-bottom: 96px; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.hero-bg span { position: absolute; right: -40px; top: -60px; font-family: var(--mincho); font-weight: 900; font-size: 620px; line-height: 1; color: #2b2620; letter-spacing: -0.05em; white-space: nowrap; }
.hero-body { position: relative; z-index: 2; padding-top: 110px; display: flex; flex-direction: column; gap: 22px; }
.hero-tags { display: flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: 0.16em; color: #c9bfae; }
.hero-title { margin: 0; font-weight: 900; font-size: 72px; line-height: 1.15; max-width: 820px; }
.hero-title span, .person-title span { display: block; font-size: 0.4em; font-weight: 700; color: var(--paper-2); margin-top: 10px; }
.hero-lead { margin: 0; font-size: 16px; line-height: 1.9; color: var(--paper-2); max-width: 560px; }

/* sections */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2, .h-page { margin: 0; font-size: 32px; }
.h-sub { margin: 0 0 16px; font-size: 22px; }
.grid-ep { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.grid-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 32px 24px; }
.grid-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ep-card, .person-card { display: flex; flex-direction: column; gap: 6px; }
.thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-3); margin-bottom: 6px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s; }
.ep-card:hover .thumb img, .person-card:hover .cover img { transform: scale(1.04); }
.cover { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #2a2420; margin-bottom: 6px; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ph-kanji { position: absolute; top: 14px; right: 10px; writing-mode: vertical-rl; font-family: var(--mincho); font-weight: 900; font-size: 64px; line-height: 1; color: var(--ink-5); }
.grid-related .ph-kanji { font-size: 28px; top: 8px; right: 6px; }
.grid-related .badge-dark { display: none; }
.card-name { font-size: 17px; font-weight: 700; }
.card-title { font-size: 16px; font-weight: 700; line-height: 1.5; }
.card-meta { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; background: var(--ink-3); color: #e6dccb; font-size: 14px; letter-spacing: 0.08em; }
.chip:hover { background: var(--ink-4); }
.chip.is-on { background: var(--accent); color: #fff; }

/* about */
.about { margin-top: 112px; background: var(--paper); color: var(--ink-2); }
.about a:hover { color: #000; }
.about-inner { padding-top: 88px; padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.about-icon { flex: 0 0 180px; height: 180px; border-radius: 50%; background: #d8cfbd; }
.about-text { flex: 999 1 480px; display: flex; flex-direction: column; gap: 14px; }
.about-text h2 { margin: 0; font-size: 34px; }
.about-text p { margin: 0; font-size: 15px; line-height: 2; color: #3a342b; max-width: 640px; }
.eyebrow { font-size: 12px; letter-spacing: 0.24em; color: #6b6253; }

/* footer */
.site-footer { padding-top: 56px; padding-bottom: 64px; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--muted-2); }
.site-footer .logo-main { font-size: 18px; color: var(--paper); }
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer small { flex-basis: 100%; }

/* person / reading */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; }
#progress-bar { height: 100%; width: 0; background: var(--accent); }
.person-hero { position: relative; overflow: hidden; background: var(--ink-2); padding-bottom: 32px; }
.person-hero-bg { position: absolute; left: 50%; top: -40px; transform: translateX(-50%); font-family: var(--mincho); font-weight: 900; font-size: 560px; line-height: 1; color: #24201b; white-space: nowrap; pointer-events: none; }
.person-head { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; padding: 64px 40px 40px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.tags { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.person-title { margin: 0; font-weight: 900; font-size: 60px; line-height: 1.2; }
.person-intro { font-size: 15px; line-height: 2; color: var(--paper-2); max-width: 560px; }
.person-intro p { margin: 0 0 8px; }
.ep-chips { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; padding: 0 40px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ep-chip { min-width: 56px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; background: var(--ink-4); color: #e6dccb; font-weight: 700; font-size: 14px; }
.ep-chip:hover { background: var(--ink-5); }
.ep-chip.is-on { background: var(--accent); color: #fff; }

.reader { max-width: 760px; margin: 0 auto; padding-top: 56px; }
.ep-head { padding: 0 24px 32px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.ep-no { font-size: 13px; letter-spacing: 0.2em; color: var(--accent); font-weight: 700; }
.ep-head h2 { margin: 0; font-weight: 900; font-size: 40px; }
.ep-year { font-size: 12px; color: var(--muted-2); }
.pages img { width: 100%; height: auto; background: #1d1a16; }
.ep-end { padding: 64px 24px 0; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.ep-fin { font-family: var(--mincho); font-size: 18px; letter-spacing: 0.3em; color: var(--muted); }

.info-grid { padding-top: 120px; display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.info-grid > * { flex: 1 1 420px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 32px; }
.panel { background: #1d1a16; padding: 32px; }
.panel h2 { margin: 0 0 20px; font-size: 22px; }
.timeline { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.timeline div { display: flex; gap: 16px; font-size: 14px; line-height: 1.6; }
.timeline dt { flex: 0 0 56px; font-family: var(--mincho); font-weight: 700; color: var(--accent); }
.timeline dd { margin: 0; color: var(--paper-2); }
.refs { margin: 0 0 14px; padding-left: 1.2em; font-size: 13px; line-height: 1.9; color: var(--muted); }

/* phone */
@media (max-width: 720px) {
  .wrap, .wrap-narrow { padding-left: 20px; padding-right: 20px; }
  .main-nav { gap: 18px; font-size: 13px; }
  .hero { min-height: 560px; }
  .hero-bg span { font-size: 340px; }
  .hero-body { padding-top: 48px; }
  .hero-title { font-size: 40px; }
  .person-hero-bg { font-size: 300px; }
  .person-head { padding: 32px 20px 28px; }
  .person-title { font-size: 38px; }
  .ep-chips { padding: 0 20px; }
  .reader { padding-top: 40px; }
  .ep-head h2 { font-size: 30px; }
  .section { padding-top: 64px; }
  .section-head h2, .h-page { font-size: 26px; }
  .grid-ep { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .grid-people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .ph-kanji { font-size: 44px; }
  .info-grid { padding-top: 80px; }
  .panel { padding: 24px; }
  .about-icon { flex-basis: 120px; height: 120px; }
}
