/* 車輪のついた家 つながり年表
   配色: 青磁の白と藍、印章の朱は「重要な出来事」だけに使う */
:root {
  --paper: #f5f6f3;
  --ink: #1e2428;
  --muted: #5b6468;
  --line: #cbd3cf;
  --indigo: #26405e;
  --celadon: #8fb3a6;
  --seal: #b3372f;
  --surface: #ffffff;
  --gothic: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --mincho: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --when-w: 7.5rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15191c; --ink: #e5e8e6; --muted: #9aa3a6; --line: #2f383c;
    --indigo: #9db8d9; --celadon: #4f7568; --seal: #e0685f; --surface: #1c2125;
  }
}
:root[data-theme="dark"] {
  --paper: #15191c; --ink: #e5e8e6; --muted: #9aa3a6; --line: #2f383c;
  --indigo: #9db8d9; --celadon: #4f7568; --seal: #e0685f; --surface: #1c2125;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.85 var(--gothic);
  font-feature-settings: "palt" 0;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo); text-underline-offset: .2em; }
a:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { margin: 0; }

main { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem 4rem; }

.draft-bar {
  margin: 0; padding: .4rem 1rem; text-align: center;
  background: var(--seal); color: #fff; font-size: .85rem;
}
.site-head { max-width: 46rem; margin: 0 auto; padding: 1.25rem 1.25rem .5rem; }
.site-name { font-family: var(--mincho); font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: .06em; }
.crumb { font-size: .8rem; color: var(--muted); margin: .5rem 0 2rem; }
.crumb a { color: var(--muted); }
.crumb span { margin: 0 .4em; }

/* 人物ヘッダー */
.person { display: grid; gap: 1.5rem; margin-bottom: 2rem; }
.person.has-photo { grid-template-columns: 11rem 1fr; align-items: start; }
.portrait { margin: 0; }
.portrait img { border-radius: 2px; filter: saturate(.9); }
.person h1 {
  font-family: var(--mincho); font-weight: 900;
  font-size: clamp(2.4rem, 7vw, 3.6rem); line-height: 1.15; letter-spacing: .04em;
}
.native { margin: .4rem 0 0; color: var(--muted); font-size: 1.05rem; letter-spacing: .08em; }
.native span + span { margin-left: .8em; }
.catch { margin: 1rem 0 0; font-size: 1.05rem; line-height: 1.8; }
.facts { margin: 1.25rem 0 0; display: grid; gap: .25rem; font-size: .92rem; }
.facts div { display: grid; grid-template-columns: 5em 1fr; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.summary {
  margin: 0 0 3rem; padding: 1.25rem 0; border-block: 1px solid var(--line);
  line-height: 2;
}

/* 年表 */
.timeline > h2, .works h2, .mates h2, .sources h2, .roster h2 {
  font-family: var(--mincho); font-weight: 600; font-size: 1.5rem; margin-bottom: 1.25rem;
}
.chapter { margin-bottom: 2.5rem; }
.chapter h3 {
  font-family: var(--mincho); font-weight: 600; font-size: 1.15rem;
  padding-left: calc(var(--when-w) + 1.5rem); margin-bottom: .75rem;
}
.chapter h3 .range { margin-left: .8em; font-family: var(--gothic); font-weight: 400; font-size: .8rem; color: var(--muted); }
.chapter ol { list-style: none; margin: 0; padding: 0; position: relative; }
.chapter ol::before {
  content: ""; position: absolute; top: .5rem; bottom: .5rem;
  left: calc(var(--when-w) + .55rem); width: 2px; background: var(--celadon);
}
.ev { display: grid; grid-template-columns: var(--when-w) 1fr; column-gap: 1.5rem; padding: .6rem 0; }
.when { text-align: right; line-height: 1.3; padding-top: .2rem; }
.when time { display: block; }
.when .y { display: block; font-weight: 700; font-size: 1.35rem; font-variant-numeric: tabular-nums; color: var(--indigo); letter-spacing: .02em; }
.when .md { display: block; font-size: .78rem; color: var(--muted); }
.when .age { display: block; margin-top: .15rem; font-size: .78rem; color: var(--muted); }
.what { position: relative; }
.what::before {
  content: ""; position: absolute; left: calc(-1.5rem + .2rem); top: .65rem;
  width: .75rem; height: .75rem; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--celadon);
}
.is-key .what::before { border-radius: 1px; background: var(--seal); border-color: var(--seal); transform: rotate(45deg); }
.what h4 { font-size: 1.02rem; font-weight: 700; line-height: 1.6; }
.is-key .what h4 { font-size: 1.12rem; }
.what p { margin: .35rem 0 0; font-size: .95rem; }
.seal {
  display: inline-block; margin-right: .5em; padding: 0 .35em; vertical-align: .12em;
  border: 1.5px solid var(--seal); border-radius: 2px; color: var(--seal);
  font-size: .72rem; font-weight: 700; line-height: 1.5; letter-spacing: .05em;
}
.cite { font-size: .75rem !important; color: var(--muted); }
.cite a { margin-left: .25em; text-decoration: none; }
.costar { font-size: .85rem !important; }
.costar small { color: var(--muted); font-size: .78rem; }
.costar-label {
  display: inline-block; margin-right: .5em; padding: 0 .35em;
  border: 1px solid var(--celadon); border-radius: 2px; color: var(--muted);
  font-size: .72rem; line-height: 1.5;
}

/* つながりのある出演者 */
.relations { margin: 3rem 0; }
.relations h2 { font-family: var(--mincho); font-weight: 600; font-size: 1.5rem; margin-bottom: 1.25rem; }
.rel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.rel { padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.rel h3 { font-family: var(--mincho); font-weight: 600; font-size: 1.1rem; margin-bottom: .4rem; }
.rel ol { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.rel ol li {
  display: grid; grid-template-columns: 3.2rem 1fr auto; column-gap: .75rem;
  padding: .3rem 0; border-top: 1px solid var(--line);
}
.rel ol li:first-child { border-top: 0; }
.rel-year { font-variant-numeric: tabular-nums; color: var(--muted); }
.rel-note { color: var(--muted); font-size: .8rem; }
.rel .cite { grid-column: 2 / -1; }

/* 代表作 */
.works { margin: 3rem 0; }
.works ul, .mates ul, .roster ul { list-style: none; margin: 0; padding: 0; }
.works li {
  display: grid; grid-template-columns: 3.5rem 1fr auto; column-gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.w-year { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
.w-title { font-weight: 700; }
.w-ko { grid-column: 2; color: var(--muted); font-size: .85rem; }
.w-type { grid-column: 3; grid-row: 1; font-size: .75rem; color: var(--muted); }

/* 同じ番組の仲間 */
.mates { margin: 3rem 0; }
.mates ul { display: flex; flex-wrap: wrap; gap: .75rem; }
.mates a {
  display: flex; flex-direction: column; min-width: 10rem; padding: .8rem 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  text-decoration: none; color: var(--ink);
}
.mates a:hover { border-color: var(--indigo); }
.m-name { font-family: var(--mincho); font-weight: 600; font-size: 1.1rem; }
.m-sub { font-size: .78rem; color: var(--muted); }

/* ソース */
.sources { margin-top: 3rem; font-size: .85rem; }
.sources h2 { font-size: 1.15rem !important; }
.sources ol { padding-left: 1.4rem; margin: 0; }
.sources li { margin-bottom: .3rem; overflow-wrap: anywhere; }
.updated, .credit { color: var(--muted); margin: 1rem 0 0; }

/* トップ */
.intro { padding: 3rem 0 2.5rem; border-bottom: 1px solid var(--line); margin-bottom: 2.5rem; }
.intro h1 { font-family: var(--mincho); font-weight: 900; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.35; letter-spacing: .03em; }
.intro p { margin: 1rem 0 0; color: var(--muted); max-width: 34em; }
.roster li a {
  display: grid; grid-template-columns: 4rem 1fr; column-gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink);
}
.roster li a:hover .r-name { color: var(--indigo); }
.r-year { color: var(--muted); font-variant-numeric: tabular-nums; padding-top: .35rem; }
.r-name { font-family: var(--mincho); font-weight: 600; font-size: 1.3rem; }
.r-ko { margin-left: .6em; font-family: var(--gothic); font-weight: 400; font-size: .85rem; color: var(--muted); }
.r-catch { grid-column: 2; font-size: .9rem; color: var(--muted); }

.site-foot { max-width: 46rem; margin: 0 auto; padding: 2rem 1.25rem 3rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.site-foot a { color: var(--muted); }

/* スマホ */
@media (max-width: 560px) {
  :root { --when-w: 4.4rem; }
  .ev { column-gap: 1.2rem; }
  .when .y { font-size: 1.1rem; }
  .what::before { left: calc(-1.2rem + .05rem); }
  .chapter ol::before { left: calc(var(--when-w) + .4rem); }
  .chapter h3 { padding-left: 0; }
  .person.has-photo { grid-template-columns: 1fr; }
  .portrait { max-width: 12rem; }
  .works li { grid-template-columns: 3rem 1fr; }
  .w-type { grid-column: 2; grid-row: auto; }
  .rel ol li { grid-template-columns: 3rem 1fr; }
  .rel-note { grid-column: 2; }
}
