:root {
  --ink: #2b2420;
  --plum: #3d1f2e;
  --plum-dark: #2a1420;
  --gold: #b8863a;
  --gold-light: #d9b46a;
  --paper: #f6f1e4;
  --white: #fffdf8;
  --line: #ddd0ba;
  --muted: #7a6b58;
  --moss: #5b6b45;
  --sans: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --serif: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --radius: 4px;
  --shadow: 0 14px 34px -22px rgba(43, 36, 32, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: 0.02em;
  overflow-x: hidden;
}

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

a {
  color: var(--plum);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--gold);
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  background: var(--white);
  padding: 0.6rem 1.1rem;
  z-index: 999;
}

.skip-link:focus {
  top: 1rem;
}

/* ===== header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--plum);
  border-bottom: 3px solid var(--gold);
}

.brand-row {
  max-width: 1180px;
  min-height: 74px;
  margin: auto;
  padding: 12px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  line-height: 1.2;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 1.1rem;
}

.brand strong {
  font-family: var(--serif);
  font-size: 1.08rem;
  letter-spacing: 0.09em;
}

.brand small {
  display: block;
  color: var(--gold-light);
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  margin-top: 4px;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 40px;
  padding: 8px;
  border: 1px solid var(--gold);
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 1px;
  background: var(--gold-light);
  margin: 5px;
}

.global-nav {
  background: var(--plum-dark);
}

.global-nav ul {
  max-width: 1180px;
  margin: auto;
  padding: 0 18px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
}

.global-nav a {
  display: block;
  padding: 11px 12px;
  color: var(--white);
  font-size: 0.75rem;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  opacity: 0.86;
}

.global-nav a:hover,
.global-nav a[aria-current="page"] {
  border-color: var(--gold);
  opacity: 1;
}

/* ===== hero ===== */
.hero-block {
  position: relative;
  max-width: 1440px;
  margin: auto;
  background: var(--plum-dark);
  min-height: 480px;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-block::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 12, 20, 0.15) 0%, rgba(28, 12, 20, 0.78) 78%, rgba(28, 12, 20, 0.94) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  color: var(--white);
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 80px 0 60px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.hero-copy h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  line-height: 1.42;
  letter-spacing: 0.05em;
  margin: 0 0 18px;
  max-width: 880px;
  color: #fffaf0;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.hero-copy > p:last-child {
  max-width: 720px;
  font-size: 1.05rem;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

/* ===== layout ===== */
.container {
  width: min(1120px, calc(100% - 48px));
  margin: auto;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 60px;
  align-items: start;
  padding-top: 68px;
  padding-bottom: 90px;
}

.article {
  min-width: 0;
}

.article > section {
  margin: 0 0 64px;
}

.article h2 {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 1.95rem);
  line-height: 1.6;
  letter-spacing: 0.04em;
  margin: 0 0 26px;
  padding-bottom: 14px;
  position: relative;
}

.article h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  background: var(--gold);
}

.article h3 {
  font-family: var(--serif);
  line-height: 1.6;
  color: var(--plum);
}

.article p {
  margin: 0 0 1.4em;
}

/* ===== sidebar ===== */
.sidebar {
  position: sticky;
  top: 148px;
  display: grid;
  gap: 22px;
}

.sidebar nav,
.ad-slot {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.sidebar h2 {
  font-family: var(--serif);
  font-size: 1rem;
  margin: 0 0 12px;
  color: var(--plum);
}

.sidebar ol {
  margin: 0;
  padding-left: 1.15rem;
}

.sidebar li + li {
  margin-top: 8px;
}

.sidebar a {
  font-size: 0.84rem;
}

.ad-slot span {
  display: block;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.ad-slot strong {
  display: block;
  font-family: var(--serif);
  line-height: 1.55;
  color: var(--plum);
}

.ad-slot p {
  font-size: 0.78rem;
  line-height: 1.7;
}

.ad-slot > a {
  display: inline-block;
  background: var(--plum);
  color: var(--white);
  padding: 9px 16px;
  text-decoration: none;
  border-radius: var(--radius);
}

.ad-slot > a:hover {
  background: var(--gold);
  color: var(--plum-dark);
}

/* ===== related ===== */
.related {
  border-top: 1px solid var(--line);
  padding-top: 50px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.related-grid article {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 22px;
}

.related-grid h3 {
  font-size: 1rem;
  margin: 0 0 10px;
  font-family: var(--serif);
}

.related-grid p {
  font-size: 0.8rem;
  line-height: 1.65;
  margin: 0;
  color: var(--muted);
}

.related-sites {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 28px;
  margin-top: 46px;
}

.related-sites h2 {
  font-family: var(--serif);
  margin: 0 0 16px;
  font-size: 1.15rem;
  color: var(--plum);
}

.related-sites ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.related-sites a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  text-decoration: none;
}

.related-sites strong {
  min-width: 130px;
  color: var(--plum);
}

.related-sites span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ===== overview / age notice / pages grid (index) ===== */
.overview {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 34px 34px 8px;
}

.overview h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--plum);
  margin: 0 0 20px;
}

.pages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.pages-grid article {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--plum);
  padding: 24px;
}

.pages-grid span {
  font-family: var(--serif);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.12em;
}

.pages-grid h3 {
  margin: 6px 0 10px;
  font-family: var(--serif);
  font-size: 1.05rem;
}

.pages-grid p {
  font-size: 0.83rem;
  line-height: 1.7;
  margin: 0;
  color: var(--muted);
}

.age-notice {
  background: var(--gold-light);
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}

.age-notice p {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--plum-dark);
  text-align: center;
}

/* ===== footer ===== */
.site-footer {
  background: var(--plum-dark);
  color: #e4d9d0;
  padding: 52px 24px 20px;
}

.footer-grid {
  max-width: 1120px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 56px;
}

.footer-grid h2 {
  font-family: var(--serif);
  font-size: 1rem;
  color: #fff;
  margin: 0 0 14px;
}

.footer-grid p {
  font-size: 0.78rem;
  max-width: 380px;
  color: #cbb9ae;
}

.footer-grid nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-grid a {
  color: #e4d9d0;
  font-size: 0.8rem;
  margin-bottom: 8px;
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--gold-light);
}

.footer-links {
  max-width: 1120px;
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid #4a2f3c;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: #cbb9ae;
  font-size: 0.78rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

.copyright {
  max-width: 1120px;
  margin: 18px auto 0;
  padding-top: 0;
  border-top: 0;
  font-size: 0.65rem;
  color: #937f77;
}

/* ===== responsive ===== */
@media (max-width: 800px) {
  html {
    scroll-padding-top: 5rem;
  }
  .brand-row {
    min-height: 64px;
    padding: 10px 18px;
  }
  .brand strong {
    font-size: 0.9rem;
  }
  .brand small {
    font-size: 0.46rem;
  }
  .menu-toggle {
    display: block;
  }
  .global-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 64px;
    /* bottom:0 は使わず viewport 基準の高さを明示する。fixed要素の
       containing block がヘッダー等の変換コンテキストになった場合でも
       ドロワーの高さが潰れないようにするための安全策。 */
    height: calc(100vh - 64px);
    background: var(--plum-dark);
    overflow: auto;
  }
  .global-nav.is-open {
    display: block;
  }
  .global-nav ul {
    display: block;
    padding: 14px 22px;
  }
  .global-nav a {
    font-size: 0.92rem;
    padding: 14px 10px;
    border-bottom: 1px solid #4a2f3c;
  }
  .hero-block {
    min-height: 420px;
  }
  .hero-copy {
    width: calc(100% - 36px);
    padding: 64px 0 42px;
  }
  .hero-copy h1 {
    font-size: clamp(1.75rem, 8.6vw, 2.4rem);
    overflow-wrap: anywhere;
  }
  .hero-copy > p:last-child {
    font-size: 0.92rem;
  }
  .container {
    width: calc(100% - 36px);
  }
  .content-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 46px;
    padding-bottom: 60px;
  }
  .article > section {
    margin-bottom: 50px;
  }
  .article h2 {
    font-size: 1.4rem;
  }
  .sidebar {
    position: static;
    grid-row: 1;
  }
  .related-grid,
  .pages-grid {
    grid-template-columns: 1fr;
  }
  .related-sites a {
    display: block;
  }
  .related-sites strong,
  .related-sites span {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .footer-grid p {
    margin-bottom: 0;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 15px;
  }
  .brand-mark {
    display: none;
  }
  .hero-block {
    min-height: 380px;
  }
  .hero-copy {
    padding-top: 52px;
  }
  .sidebar nav,
  .ad-slot,
  .overview {
    padding: 18px;
  }
  .article h2 {
    padding-bottom: 10px;
  }
}

/* LATEST-COMMENTARY:START */
.latest-commentary {
  padding: 3rem 0;
}
/* .container を持たないサイトでも端に張り付かないための保険。
   :where() は詳細度0なので、サイト側の .container 定義が常に優先される。 */
:where(.latest-commentary .container) {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}
.latest-commentary h2 {
  margin-bottom: 1.25rem;
}
.latest-commentary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.latest-commentary-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line, #e5e5e5);
}
.latest-commentary-list time {
  flex: 0 0 auto;
  color: var(--muted, #666);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.latest-commentary-list a {
  flex: 1 1 16rem;
  min-width: 0;
  color: var(--ink, #222);
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.latest-commentary-list a:hover {
  color: #0b5;
  text-decoration: underline;
}
.latest-commentary-more {
  margin-top: 1.25rem;
}
.latest-commentary-more a {
  color: #0b5;
  text-decoration: none;
  font-weight: 600;
}
.latest-commentary-more a:hover {
  text-decoration: underline;
}
@media (max-width: 600px) {
  .latest-commentary-list li {
    flex-direction: column;
    gap: 0.2rem;
  }
  /* 縦積み時に flex-basis(16rem) が高さに効かないよう auto に戻す */
  .latest-commentary-list a,
  .latest-commentary-list time {
    flex: 0 0 auto;
  }
}
/* LATEST-COMMENTARY:END */

/* HEADING-WRAP:START 見出し最終行孤立文字対策 (AGENTS.md NoGo) */
h1,h2,h3,h4,.hero-title,.page-title,.card-title{text-wrap:balance;word-break:auto-phrase;line-break:strict;overflow-wrap:break-word}
/* HEADING-WRAP:END */
