/* 木呂子敏彦ホームページ「鳥の眼、みみずの目」
   著者のサイト。余白を大きく取り、明朝の見出しと端末のゴシックで組む。
   決まりは docs/design.md。色はここ（:root）だけに書く。 */

:root {
  --paper: #faf8f3;
  --paper-2: #f0ebe0;
  --white: #ffffff;
  --ink: #1c1917;
  --ink-2: #44403c;
  --muted: #625a50;
  --rule: #d8d1c2;
  --shu: #b3261e;

  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Noto Sans JP", "Meiryo", sans-serif;

  --wrap: 70rem;
  --measure: 40em;
  --head-h: 3.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* 固定の頭に隠れないように、アンカーの着地点を下げる。 */
  scroll-padding-top: calc(var(--head-h) + 1.25rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  a,
  .btn,
  .card,
  .cover,
  .arw {
    transition: color 0.15s, background-color 0.15s, border-color 0.15s, transform 0.15s;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.8;
  line-break: strict;
  overflow-wrap: anywhere;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

a:hover {
  text-decoration-color: var(--shu);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: -5rem;
  z-index: 20;
  padding: 0.5rem 1rem;
  background: var(--ink);
  color: var(--paper);
}

.skip:focus {
  top: 0.5rem;
}

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

@media (min-width: 720px) {
  .wrap {
    width: min(100% - 5rem, var(--wrap));
  }
}

/* ---- 頭（固定）とメニュー ---- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.head-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1.5rem;
  min-height: var(--head-h);
}

.brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.75rem;
  padding: 0.5rem 0;
  text-decoration: none;
}

.brand-by {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.brand-name {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding: 0.6rem 0 0.45rem;
  border-bottom: 2px solid transparent;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.nav a:hover {
  border-bottom-color: var(--ink);
}

.nav a[aria-current] {
  border-bottom-color: var(--shu);
}

.menu-btn {
  display: none;
}

/* 狭い画面では、メニューをボタンの中にたたむ（app.js が動くときだけ。動かなければ並べて出す）。 */
@media (max-width: 719px) {
  /* 著者名の下に題を重ねて、右にボタンの場所をあける。 */
  .site-head .brand {
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.35;
  }

  .js .menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--ink);
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    cursor: pointer;
  }

  .menu-ico {
    position: relative;
    width: 1rem;
    height: 0.75rem;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
  }

  .menu-ico::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(50% - 1px);
    border-top: 2px solid currentColor;
  }

  .js .nav {
    display: none;
    flex-basis: 100%;
    padding-bottom: 0.75rem;
  }

  .js .site-head.open .nav {
    display: block;
  }

  .js .nav ul {
    display: block;
    border-top: 1px solid var(--rule);
  }

  .js .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--rule);
  }
}

/* ---- ページの頭 ---- */

.page main {
  padding-bottom: clamp(4rem, 10vw, 7rem);
}

.page-head {
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(1.75rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--rule);
}

.page-head .with-aside {
  display: grid;
  gap: 1.5rem;
  align-items: end;
}

@media (min-width: 720px) {
  .page-head .with-aside {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.crumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
}

.crumbs a {
  text-decoration: none;
}

.crumbs a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
}

.page-head h1 {
  margin: 0.4em 0 0;
  font-size: clamp(1.9rem, 5.2vw, 3.25rem);
  line-height: 1.35;
  letter-spacing: 0.08em;
}

.lead {
  max-width: var(--measure);
  margin: 1.2em 0 0;
  font-size: 1.0625rem;
  color: var(--ink-2);
}

.page-head .btn {
  margin-top: 1.5rem;
}

.portrait {
  margin: 0;
}

.portrait img {
  width: min(100%, 10rem);
}

main h2 {
  margin: 2.75em 0 1em;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.45;
  letter-spacing: 0.1em;
}

.page .wrap > h2:first-child {
  margin-top: 0;
}

.note {
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--muted);
}

.notice {
  margin: 3rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--ink-2);
}

/* ---- ボタンと矢印 ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.4em;
  border: 1px solid var(--ink);
  font-size: 0.9375rem;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn.solid {
  background: var(--ink);
  color: var(--paper);
}

.btn.solid:hover {
  border-color: var(--ink-2);
  background: var(--ink-2);
}

a:hover .arw {
  transform: translateX(0.25em);
}

.more {
  margin: 1.75rem 0 0;
  font-size: 0.9375rem;
}

.more a {
  display: inline-flex;
  gap: 0.6em;
  padding-bottom: 0.2em;
  border-bottom: 1px solid var(--ink);
  letter-spacing: 0.06em;
  text-decoration: none;
}

/* ---- 本文 ---- */

.prose {
  max-width: var(--measure);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 2;
}

@media (min-width: 720px) {
  .prose {
    font-size: 1.125rem;
  }
}

/* 旧サイトの本文は、行の区切りと全角空白の字下げをそのまま使う。 */
.prose p {
  margin: 0;
}

.prose p.gap {
  margin-top: 1.6em;
}

.prose p.r {
  text-align: right;
}

/* 全角空白を並べて字を右へ寄せている行（旧サイトのまま）。狭い画面では寄せる幅を抑える。文字は消さない。 */
.ind {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  vertical-align: bottom;
  white-space: nowrap;
}

@media (max-width: 719px) {
  .ind {
    max-width: 3em;
  }
}

/* 文字に起こした「はじめに」は段落なので、1字下げて段落の間をあける。 */
.prose.para p {
  margin: 0 0 1.1em;
  text-indent: 1em;
}

.reading,
.reading + .more,
.reading + .originals {
  max-width: var(--measure);
  margin-inline: auto;
}

.reading + .more {
  margin-top: 3.5rem;
}

.fig {
  margin: 1.5em 0;
}

.fig img,
.originals img {
  border: 1px solid var(--rule);
  background: var(--white);
}

.inl {
  display: inline-block;
  vertical-align: middle;
}

details {
  font-family: var(--sans);
  font-size: 0.875rem;
}

summary {
  width: fit-content;
  padding: 0.4em 0;
  color: var(--ink-2);
  cursor: pointer;
}

.transcript p {
  margin: 0;
  line-height: 1.8;
}

.originals {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.originals img {
  margin: 1rem 0;
}

/* ---- トップ ---- */

.hero {
  padding: clamp(3rem, 9vw, 7rem) 0 clamp(3.5rem, 9vw, 6.5rem);
  border-bottom: 1px solid var(--rule);
}

.hero-in {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 860px) {
  .hero-in {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4rem;
  }
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 0 1.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.24em;
  color: var(--muted);
}

/* 朱は少しだけ: ここ、メニューの現在地、年表の年の印、リンクに触れたときの下線。 */
.kicker::before {
  content: "";
  flex: none;
  width: 2.5rem;
  height: 2px;
  background: var(--shu);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.75rem, 11vw, 6rem);
  line-height: 1.15;
  letter-spacing: 0.14em;
}

.hero-years {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.hero-work {
  margin: 2.25rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.6vw, 2rem);
  line-height: 1.5;
  letter-spacing: 0.14em;
}

.hero-lead {
  max-width: 30em;
  margin: 0.75rem 0 0;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 2;
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2.25rem 0 0;
}

/* 写真は小さいので、引き伸ばさない。後ろに紙の色の面をずらして置く。 */
.hero-photo {
  position: relative;
  justify-self: start;
  margin: 0 1.25rem 1.25rem 0;
}

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  background: var(--paper-2);
}

.hero-photo img {
  position: relative;
  width: min(100%, 17rem);
}

.band {
  padding: clamp(3.5rem, 9vw, 6.5rem) 0;
  border-bottom: 1px solid var(--rule);
}

.band:last-child {
  border-bottom: 0;
}

.band.tint {
  background: var(--paper-2);
}

.band h2 {
  margin: 0 0 1.5em;
}

.split {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: 4rem;
  }
}

.sub {
  margin: 3rem 0 1.25rem;
  font-size: 1.125rem;
  letter-spacing: 0.12em;
}

/* ---- 著作 ---- */

.feature {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--rule);
  background: var(--white);
}

@media (min-width: 720px) {
  .feature {
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
    gap: 3rem;
  }
}

.feature-img {
  margin: 0;
}

.feature-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.4;
  letter-spacing: 0.12em;
}

.feature-meta {
  margin: 0.75rem 0 1.5rem;
  color: var(--ink-2);
}

.feature-text p:last-child {
  margin-bottom: 0;
}

/* 赤い題字の画像は、小さく置く（大きな色の面にしない）。 */
.banner {
  margin: 0 0 1rem;
}

.banner img {
  width: min(100%, 17rem);
}

.covers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .covers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

.cover {
  display: block;
  height: 100%;
  padding: 1.25rem 1rem;
  border: 1px solid var(--rule);
  background: var(--white);
  text-decoration: none;
}

.cover:hover,
.card:hover {
  border-color: var(--ink);
}

.cover img {
  margin: 0 auto 1rem;
  border: 1px solid var(--rule);
}

.cover span {
  display: block;
  font-family: var(--serif);
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.drive {
  display: block;
  width: 100%;
  height: min(80vh, 46rem);
  border: 1px solid var(--rule);
  background: var(--white);
}

/* ---- カード（目次、親交録、リンク） ---- */

.cards {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem 1rem;
  align-items: center;
  height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  background: var(--white);
  text-decoration: none;
}

.card-title {
  grid-column: 1;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  letter-spacing: 0.1em;
}

.card-note {
  grid-column: 1;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted);
}

.card .arw {
  grid-column: 2;
  grid-row: 1 / span 2;
}

/* ---- 年譜（年ごとの年表） ---- */

.era-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}

.era-nav a {
  display: block;
  padding: 0.4em 1em;
  border: 1px solid var(--rule);
  background: var(--white);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-decoration: none;
}

.era-nav a:hover {
  border-color: var(--ink);
}

.nenpyo {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule);
}

.ny {
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}

.ny-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 1rem;
  margin: 0;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.ny-ad {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.ny-ad::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.6rem;
  vertical-align: middle;
  background: var(--shu);
}

/* 単位は旧サイトの表の見出し（年・月・年齢）に当たる。文字は足さず、ここで添える。 */
.ny-nen::after {
  content: "年";
}

.ny-age::after,
.ne-age::after {
  content: "歳";
}

.ne-month.num::after {
  content: "月";
}

.ne-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.ne {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  column-gap: 0.75rem;
  padding: 0.35rem 0;
}

.ne-month {
  grid-column: 1;
  font-size: 0.875rem;
  line-height: 1.95;
  white-space: nowrap;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.ne-text {
  grid-column: 2;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.9;
}

/* 年の途中で年齢が変わる所（旧サイトの表のとおり）。 */
.ne-age {
  grid-column: 1 / -1;
  margin: 0.25rem 0 0.35rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--rule);
  font-size: 0.8125rem;
  color: var(--muted);
}

/* 記事が前の項目から続き、月だけが変わる行。月の印を次の項目の横に置く。 */
.ne.cont {
  height: 0;
  padding: 0;
}

.ne.cont .ne-month {
  position: relative;
  top: 0.35rem;
}

.chu-ref {
  margin: 0 0.15em;
  border-bottom: 1px solid var(--rule);
  font-size: 0.8125rem;
  white-space: nowrap;
  color: var(--ink-2);
  text-decoration: none;
}

.chu-ref:hover {
  border-bottom-color: var(--ink);
  color: var(--ink);
}

.chu-ref b {
  font-weight: 500;
}

@media (min-width: 860px) {
  .ny {
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    column-gap: 3rem;
    padding: 2rem 0;
  }

  /* 読んでいる間、年が左に付いてくる。 */
  .ny-head {
    position: sticky;
    top: calc(var(--head-h) + 1.25rem);
    align-self: start;
    flex-direction: column;
    gap: 0.1rem;
  }

  .ny-ad {
    font-size: 2.25rem;
  }

  .ne-list {
    margin: 0;
    padding-left: 2rem;
    border-left: 1px solid var(--rule);
  }

  .ne {
    grid-template-columns: 3.5rem minmax(0, 1fr);
  }
}

/* ---- 注釈 ---- */

.chu-all {
  margin-top: 4.5rem;
}

.chu {
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
}

.chu h3 {
  margin: 0 0 0.8em;
  font-size: 1.125rem;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.chu .prose {
  font-size: 1rem;
  line-height: 1.95;
}

/* ---- 講義 ---- */

.kogi {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 720px) {
  .kogi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.kogi li {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--rule);
  background: var(--white);
}

.kogi p {
  margin: 0;
}

.kogi-no {
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.kogi .kogi-title {
  margin: 0.2rem 0 0.1rem;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.kogi-date {
  font-size: 0.875rem;
  color: var(--ink-2);
}

.kogi .kogi-audio {
  margin-top: 0.9rem;
  font-size: 0.9375rem;
}

.kogi-audio small {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---- 足 ---- */

.site-foot {
  padding: 3.5rem 0 3rem;
  background: var(--ink);
  color: var(--paper);
}

.site-foot :focus-visible {
  outline-color: var(--paper);
}

.foot-in {
  display: grid;
  gap: 1.75rem;
}

.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
}

.foot-brand .brand-by {
  font-size: 1.5rem;
}

.foot-brand .brand-name,
.foot-title {
  color: var(--rule);
}

.foot-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-nav a {
  display: block;
  padding: 0.35rem 0;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.foot-nav a:hover,
.foot-nav a[aria-current] {
  text-decoration: underline;
}

.foot-title {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink-2);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

/* ---- ニュースと管理人ブログ ---- */

.empty {
  margin: 0;
  padding: 1rem 0 2rem;
  color: var(--muted);
}

.post-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.post-list li {
  border-bottom: 1px solid var(--rule);
}

.post-item {
  display: grid;
  gap: 0.3rem 2rem;
  padding: 1.35rem 0;
  text-decoration: none;
}

@media (min-width: 720px) {
  .post-item {
    grid-template-columns: 12rem minmax(0, 1fr);
    align-items: baseline;
  }

  .post-excerpt {
    grid-column: 2;
  }
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.75rem;
  align-items: center;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.post-type {
  padding: 0 0.6em;
  border: 1px solid var(--rule);
  font-size: 0.75rem;
  line-height: 1.7;
}

.post-title {
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  letter-spacing: 0.06em;
}

.post-item:hover .post-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

.post-excerpt {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--muted);
}

.band.latest .post-list {
  border-top: 0;
}

.band.latest .post-item {
  padding: 1rem 0;
}

.band.latest .post-list li:first-child .post-item {
  padding-top: 0;
}

/* 記事のページ。日付は見出しの上。 */
.over {
  margin: 1.5em 0 0;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.over + h1 {
  margin-top: 0.2em;
}

.post-photo {
  max-width: var(--measure);
  margin: 0 auto 2.5rem;
}

.post-photo img {
  border: 1px solid var(--rule);
}

.post-body p {
  margin: 0 0 1.4em;
}

/* ---- 足跡（地図） ---- */
/* 地図が主役。紙の地に淡い陸地、細い海岸線、控えめな経緯線。朱は今の場所と、たどった線と、年代の目盛りの今の印だけ。 */

.atlas {
  width: min(100% - 2.5rem, 90rem);
  margin-inline: auto;
}

@media (min-width: 720px) {
  .atlas {
    width: min(100% - 5rem, 90rem);
  }
}

.atlas-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--paper);
}

.atlas-canvas {
  position: relative;
}

.atlas-svg {
  display: block;
  width: 100%;
  height: auto;
}

.atlas-svg .sea {
  fill: var(--paper);
}

.atlas-svg .frame {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.atlas-svg .grat {
  fill: none;
  stroke: var(--rule);
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}

.atlas-svg .land {
  fill: var(--paper-2);
  stroke: var(--muted);
  stroke-width: 0.6;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.atlas-svg .leg {
  fill: none;
  stroke: var(--shu);
  stroke-width: 1.2;
  stroke-linecap: round;
  opacity: 0.32;
  vector-effect: non-scaling-stroke;
}

/* 今の出来事までの線（いちばん新しい区間）は濃く。それより前にたどった線は薄く残す。 */
.atlas-svg .leg.latest {
  stroke-width: 2;
  opacity: 1;
}

.atlas-svg .pin,
.atlas-svg .cluster {
  cursor: pointer;
}

.pin-hit,
.cl-hit {
  fill: transparent;
}

.pin-dot {
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 1.5;
}

.pin-ring {
  fill: none;
  stroke: none;
}

.pin-label {
  display: none;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 3.5px;
  stroke-linejoin: round;
  paint-order: stroke;
}

.atlas.is-live .pin.labeled .pin-label {
  display: inline;
}

.atlas.is-live .leg:not(.shown),
.atlas.is-live .pin.in-cluster {
  display: none;
}

.pin.current .pin-dot {
  fill: var(--shu);
  transform: scale(1.3);
}

.pin.current .pin-ring {
  stroke: var(--shu);
  stroke-width: 1.2;
  opacity: 0.5;
}

.pin.current .pin-label {
  font-weight: 600;
}

.pin:focus-visible,
.cluster:focus-visible {
  outline: none;
}

.pin:focus-visible .pin-ring,
.cluster:focus-visible .cl-dot {
  stroke: var(--ink);
  stroke-width: 2.5;
  opacity: 1;
}

.cl-dot {
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 2;
}

.cl-num {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  text-anchor: middle;
  fill: var(--paper);
  pointer-events: none;
}

.atlas.is-live .atlas-svg {
  height: 100%;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.atlas.dragging .atlas-svg {
  cursor: grabbing;
}

.atlas.is-live .atlas-canvas {
  height: clamp(22rem, 72vh, 46rem);
}

/* 拡大・縮小・全体のボタン（右上） */
.atlas.is-live .atlas-zoom {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
}

.az,
.ap-close,
.ap-go,
.al-map,
.atlas-bar .btn {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
}

.az {
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.6rem;
  border: 1px solid var(--ink);
  font-size: 1.25rem;
  line-height: 1;
}

.az + .az {
  margin-top: -1px;
}

.az-all {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}

.az:hover,
.ap-go:hover,
.al-map:hover {
  background: var(--ink);
  color: var(--paper);
}

/* エピソードのパネル。広い画面では地図の横、狭い画面では下から出る。 */
.atlas-panel {
  background: var(--white);
}

.ap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.ap-kicker {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.ap-close {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--rule);
  font-size: 0.8125rem;
}

.ap-body {
  padding: 0.25rem 1.25rem 1.5rem;
}

.ap-intro {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

.ap-ev {
  padding: 1.1rem 0 1.25rem;
}

.ap-ev + .ap-ev {
  border-top: 1px solid var(--rule);
}

.ap-ev p {
  margin: 0;
}

.ap-ev .al-where {
  margin-top: 0.15rem;
  font-size: 1.375rem;
}

.ap-ev .al-text {
  margin-top: 0.6rem;
  font-size: 0.9375rem;
  line-height: 1.95;
}

.ap-go {
  margin-top: 0.75rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--ink);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

@media (min-width: 760px) {
  .atlas.is-live .atlas-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(18rem, 28vw, 24rem);
  }

  .atlas.is-live .atlas-panel {
    height: clamp(22rem, 72vh, 46rem);
    overflow-y: auto;
    border-left: 1px solid var(--rule);
  }

  .ap-close {
    display: none;
  }
}

@media (max-width: 759px) {
  .atlas.is-live .atlas-canvas {
    height: 64vh;
    height: 64svh;
  }

  .atlas.is-live .atlas-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    max-height: 58%;
    overflow-y: auto;
    border-top: 1px solid var(--ink);
    transform: translateY(101%);
    visibility: hidden;
  }

  .atlas.is-live.sheet-open .atlas-panel {
    transform: none;
    visibility: visible;
  }

  .ab-label {
    display: none;
  }

  .ap-top {
    position: sticky;
    top: 0;
    background: var(--white);
  }
}

/* 前へ・次へ */
.atlas.is-live .atlas-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.75rem;
}

.atlas-bar .btn {
  padding: 0.65em 1.1em;
}

.atlas-bar .btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.atlas-bar .btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.atlas-bar .btn:disabled:hover {
  background: var(--paper);
  color: var(--ink);
}

.ab-now {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 0.75rem;
  margin: 0;
  font-size: 0.875rem;
  text-align: center;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.ab-count {
  color: var(--muted);
}

/* 年代の目盛り */
.atlas-years {
  margin-top: 0.5rem;
}

.years-svg {
  display: block;
  overflow: visible;
}

.yr-axis {
  stroke: var(--rule);
  stroke-width: 1;
}

.yr-tick {
  stroke: var(--muted);
  stroke-width: 1;
}

.yr-label {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-anchor: middle;
  fill: var(--muted);
}

.yr-mark {
  stroke: var(--ink-2);
  stroke-width: 1.5;
}

.yr-hit {
  stroke: transparent;
  stroke-width: 9;
}

.yr-ev:hover .yr-mark,
.yr-ev:focus-visible .yr-mark {
  stroke: var(--ink);
  stroke-width: 3;
}

.yr-ev.current .yr-mark {
  stroke: var(--shu);
  stroke-width: 3;
}

.atlas-source {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

/* 年代順の一覧（JS が無くても読める） */
.atlas-list-wrap {
  margin-top: clamp(3rem, 7vw, 5rem);
}

.atlas-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.al {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
}

.al p {
  margin: 0;
}

@media (min-width: 720px) {
  .al {
    display: grid;
    grid-template-columns: 14rem minmax(0, 1fr);
    column-gap: 2rem;
  }

  .al > * {
    grid-column: 2;
  }

  .al > .al-when {
    grid-column: 1;
    grid-row: 1 / span 4;
    flex-direction: column;
  }
}

.al-when {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.75rem;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.al-where {
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

.al-text {
  margin-top: 0.35rem;
  max-width: var(--measure);
  line-height: 1.95;
}

.al-to {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

.al-to a {
  text-decoration: none;
}

.al-to a:hover {
  text-decoration: underline;
}

.al-map {
  justify-self: start;
  margin-top: 0.6rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--rule);
  font-size: 0.8125rem;
}

@media (prefers-reduced-motion: no-preference) {
  @media (max-width: 759px) {
    .atlas.is-live .atlas-panel {
      transition: transform 0.35s ease, visibility 0.35s;
    }
  }

  .pin.current .pin-ring {
    transform-box: fill-box;
    transform-origin: center;
    animation: atlas-pulse 2.4s ease-out infinite;
  }

  @keyframes atlas-pulse {
    0% {
      transform: scale(0.6);
      opacity: 0.7;
    }

    100% {
      transform: scale(1.8);
      opacity: 0;
    }
  }
}

/* ---- 印刷 ---- */

@media print {
  body {
    background: #fff;
    font-size: 10.5pt;
  }

  .site-head,
  .ny-head {
    position: static;
  }

  .nav,
  .menu-btn,
  .skip,
  .era-nav,
  .crumbs,
  .hero-actions,
  .more,
  .foot-nav,
  .drive,
  .atlas-zoom,
  .atlas-bar,
  .al-map {
    display: none;
  }

  .site-foot,
  .band.tint {
    background: #fff;
    color: inherit;
  }

  .ny,
  .chu,
  .kogi li {
    break-inside: avoid;
  }
}
