:root {
  --ink: #241a12;
  --paper: #f6ecd9;
  --cream: #fffaf0;
  --rust: #af4a1f;
  --mustard: #c8952f;
  --denim: #33465c;
  --denim-deep: #24313f;
  --tan: #d8c39a;
  --line: #ddc8a0;
  --muted: #7a6a54;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --serif: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --mono: "Courier New", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

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

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

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

a {
  color: var(--rust);
  text-underline-offset: 0.16em;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  background: var(--cream);
  color: var(--ink);
  padding: 0.6rem 1.1rem;
  z-index: 999;
  transition: top 0.2s;
}

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

/* header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 3px dashed var(--mustard);
}

.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(--cream);
  line-height: 1.2;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--mustard);
  border-radius: 4px;
  color: var(--mustard);
  font-size: 1.25rem;
  transform: rotate(-6deg);
}

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

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

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

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--cream);
  margin: 6px 0;
}

.global-nav {
  background: #2c2116;
}

.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(--tan);
  font-size: 0.75rem;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

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

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

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

.hero-block::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24, 16, 9, 0.28), rgba(24, 16, 9, 0.86) 78%);
}

.hero-tag {
  position: absolute;
  z-index: 2;
  top: 26px;
  right: max(24px, calc((100% - 1120px) / 2));
  background: var(--mustard);
  color: var(--ink);
  padding: 8px 16px;
  font-size: 0.68rem;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  border: 2px dashed var(--ink);
  transform: rotate(4deg);
}

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

.eyebrow {
  margin: 0 0 14px;
  display: inline-block;
  color: #ffe6a8;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  padding-bottom: 6px;
  border-bottom: 2px dashed rgba(255, 230, 168, 0.6);
}

.hero-copy h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.4vw, 3.8rem);
  line-height: 1.42;
  letter-spacing: 0.05em;
  margin: 0 0 18px;
  max-width: 900px;
  color: #fff3d9;
  text-shadow: 0 3px 4px rgba(0, 0, 0, 0.55), 0 10px 30px rgba(0, 0, 0, 0.65);
}

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

/* 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 62px;
}

.article h2 {
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.5;
  letter-spacing: 0.03em;
  margin: 0 0 22px;
  padding-bottom: 12px;
  border-bottom: 3px dashed var(--mustard);
}

.article h3 {
  font-family: var(--serif);
  color: var(--denim);
  line-height: 1.6;
  margin: 1.8em 0 0.8em;
}

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

.article ul,
.article ol {
  margin: 0 0 1.3em;
  padding-left: 1.3rem;
}

.article li {
  margin: 0 0 0.5em;
}

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

.sidebar nav,
.ad-slot,
.related-links {
  background: var(--cream);
  border: 1px dashed var(--line);
  padding: 22px;
}

.sidebar nav {
  border-top: 4px solid var(--rust);
}

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

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

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

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

.ad-slot {
  border-top: 4px solid var(--denim);
}

.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;
  padding-bottom: 10px;
}

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

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

.ad-slot > a {
  display: inline-block;
  background: var(--denim);
  color: #fff;
  padding: 9px 16px;
  text-decoration: none;
  margin-top: 4px;
}

.related-links {
  border-top: 4px solid var(--mustard);
}

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

.related-links a {
  font-size: 0.82rem;
  text-decoration: none;
}

/* related / index grids */
.related {
  border-top: 1px dashed var(--line);
  padding-top: 50px;
}

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

.related-grid article {
  background: var(--cream);
  border: 1px dashed var(--line);
  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(--denim-deep);
  color: #e7edf1;
  padding: 30px;
  margin-top: 48px;
}

.related-sites h2 {
  font-family: var(--serif);
  margin: 0 0 16px;
}

.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;
  color: #e7edf1;
}

.related-sites strong {
  min-width: 120px;
  color: #ffe6a8;
}

.related-sites span {
  font-size: 0.78rem;
  color: #b9c7d1;
}

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

.guide-grid article {
  position: relative;
  background: var(--cream);
  border: 1px dashed var(--line);
  padding: 26px 22px 22px;
}

.guide-grid article::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--muted);
}

.guide-grid span {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--rust);
  letter-spacing: 0.08em;
  margin-left: 20px;
}

.guide-grid h3 {
  font-family: var(--serif);
  margin: 8px 0 8px;
  font-size: 1.08rem;
}

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

.intro-block {
  background: var(--cream);
  border: 1px dashed var(--line);
  padding: 30px 32px;
  margin: 0 0 8px;
}

.intro-block p:last-child {
  margin-bottom: 0;
}

/* footer */
.site-footer {
  background: var(--ink);
  color: var(--tan);
  padding: 54px 24px 20px;
  border-top: 3px dashed var(--mustard);
}

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

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

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

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

.footer-grid a {
  color: var(--tan);
  font-size: 0.8rem;
  margin-bottom: 7px;
  text-decoration: none;
}

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

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

.footer-links a {
  color: var(--tan);
  font-size: 0.78rem;
  text-decoration: none;
}

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

.copyright {
  max-width: 1120px;
  margin: 16px auto 0;
  padding-top: 0;
  font-size: 0.65rem;
  color: #8a7a63;
}

.no-scroll {
  overflow: hidden;
}

@media (max-width: 800px) {
  html {
    scroll-padding-top: 5rem;
  }
  .brand-row {
    min-height: 66px;
    padding: 10px 18px;
  }
  .brand strong {
    font-size: 0.92rem;
  }
  .brand small {
    font-size: 0.48rem;
  }
  .menu-toggle {
    display: block;
  }
  .global-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 66px;
    bottom: 0;
    background: var(--ink);
    overflow: auto;
  }
  .global-nav.is-open {
    display: block;
  }
  .global-nav ul {
    display: block;
    padding: 10px 22px 30px;
  }
  .global-nav a {
    font-size: 0.92rem;
    padding: 14px 6px;
    border-bottom: 1px solid #46392a;
  }
  .hero-block {
    min-height: 420px;
  }
  .hero-tag {
    top: 16px;
    right: 16px;
    font-size: 0.6rem;
    padding: 6px 12px;
  }
  .hero-copy {
    width: calc(100% - 36px);
    padding: 60px 0 40px;
  }
  .hero-copy h1 {
    font-size: clamp(1.7rem, 8.5vw, 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: 38px;
    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,
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .related-sites {
    padding: 22px;
  }
  .related-sites a {
    flex-direction: column;
    gap: 4px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-grid p {
    margin-bottom: 0;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 15px;
  }
  .brand-mark {
    display: none;
  }
  .hero-block {
    min-height: 380px;
  }
  .intro-block,
  .sidebar nav,
  .ad-slot,
  .related-links {
    padding: 18px;
  }
  .article h2 {
    font-size: 1.3rem;
  }
}

/* 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 */
