:root {
  --kinari: #f7f3ea;
  --paper: #fffdf8;
  --sumi: #292823;
  --ai: #1f4a6e;
  --ai-dark: #17384f;
  --usuzumi: #7c776d;
  --line: #d8d1c4;
  --red: #9c4034;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--kinari);
  color: var(--sumi);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.9;
}
a { color: var(--ai); text-underline-offset: 0.2em; }
h1, h2, h3 { line-height: 1.5; }
h1 { font-size: clamp(2rem, 6vw, 3.5rem); letter-spacing: 0.06em; }
h2 { font-size: clamp(1.55rem, 4vw, 2.25rem); letter-spacing: 0.06em; }
h3 { font-size: 1.05rem; }

.site-header {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(70rem, 92vw);
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.brand, .footer-brand {
  color: var(--sumi);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav { display: flex; gap: clamp(0.8rem, 3vw, 2rem); font-size: 0.85rem; }
.site-nav a { color: var(--sumi); text-decoration: none; white-space: nowrap; }
.site-nav a[aria-current="page"] { color: var(--ai); font-weight: 700; }

.hero {
  width: min(58rem, 90vw);
  min-height: 72vh;
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.noren {
  display: flex;
  gap: 8px;
  width: min(15rem, 64vw);
  height: 74px;
  margin: 0 auto 2rem;
  padding-top: 4px;
  border-top: 4px solid var(--sumi);
}
.noren span { flex: 1; background: var(--ai); border-radius: 0 0 10px 10px; }
.eyebrow, .section-kicker {
  color: var(--ai);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  margin-bottom: 0.7rem;
}
.hero h1 { margin-bottom: 1.5rem; }
.hero-copy { color: #514e47; margin-bottom: 2.1rem; }
.hero-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.button {
  display: inline-block;
  min-width: 10rem;
  padding: 0.72rem 1.2rem;
  border: 1.5px solid var(--sumi);
  border-radius: 6px;
  background: var(--paper);
  color: var(--sumi);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.button.primary { border-color: var(--ai); background: var(--ai); color: #fff; }
.text-link { display: inline-block; margin-top: 1.2rem; font-weight: 700; text-decoration: none; }

.paper-section, .home-laws, .home-join, .meshitane-band {
  width: min(62rem, 90vw);
  margin: 0 auto clamp(5rem, 10vw, 8rem);
}
.paper-section {
  padding: clamp(2rem, 6vw, 4rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(58, 52, 41, 0.04);
}
.home-story { text-align: center; }
.home-story h2, .home-characters h2, .home-laws h2, .home-join h2 { margin-bottom: 1.1rem; }
.home-story p + p { margin-top: 0.4rem; }
.home-laws { text-align: center; }
.law-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; text-align: left; }
.law-grid article { padding: 1.6rem; border-top: 3px solid var(--ai); background: rgba(255, 253, 248, 0.6); }
.law-grid article > span { color: var(--red); font-family: serif; font-size: 1.4rem; }
.law-grid h3 { margin: 0.45rem 0; }
.law-grid p { color: #59564f; font-size: 0.9rem; }
.mini-characters { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); margin-top: 1.8rem; }
.mini-characters article { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.mini-characters article:nth-child(odd) { padding-right: 1.5rem; }
.mini-characters article:nth-child(even) { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.mini-characters span { color: var(--usuzumi); font-size: 0.85rem; }
.home-join { text-align: center; }
.home-join p { margin-bottom: 1.3rem; }
.meshitane-band { padding: 2rem; background: var(--ai-dark); color: #fff; text-align: center; border-radius: 8px; }
.meshitane-band p { margin-bottom: 0.35rem; }
.meshitane-band a { color: #fff; font-weight: 700; }

.page-main { width: min(62rem, 90vw); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) 0; }
.page-heading { max-width: 45rem; margin: 0 auto clamp(4rem, 9vw, 7rem); text-align: center; }
.page-heading h1 { margin-bottom: 1.2rem; }
.page-heading > p:last-of-type { color: #514e47; }
.page-heading .button { margin-top: 1.5rem; }
.section-heading { margin-bottom: 1.8rem; }

.character-feature { display: grid; grid-template-columns: 12rem 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; margin-bottom: 6rem; }
.character-mark, .place-symbol {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid var(--ai);
  border-radius: 50%;
  color: var(--ai);
  font-family: serif;
  font-size: 3.5rem;
  background: var(--paper);
}
.character-feature h2 { margin-bottom: 0.2rem; }
.role { color: var(--ai); font-weight: 700; margin-bottom: 0.6rem; }
.character-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 6rem; }
.character-grid article { min-height: 13rem; padding: 1.6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.ingredient { display: inline-block; color: var(--red); font-family: serif; font-size: 0.8rem; letter-spacing: 0.1em; margin-bottom: 0.8rem; }
.character-grid h3 { font-size: 1.25rem; margin-bottom: 0.2rem; }
.character-grid article > p:last-child { font-size: 0.9rem; color: #59564f; }
.object-characters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem; }
.object-characters h2 { margin-bottom: 0.6rem; }

.world-intro { text-align: center; }
.world-intro h2 { margin-bottom: 1rem; }
.world-intro p + p { margin-top: 0.5rem; }
.world-laws { margin-bottom: 6rem; }
.law-list { list-style: none; }
.law-list li { display: grid; grid-template-columns: 4rem 1fr; gap: 1rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.law-list li:last-child { border-bottom: 1px solid var(--line); }
.law-list li > span { color: var(--red); font-family: serif; font-size: 1.8rem; }
.law-list h3 { margin-bottom: 0.3rem; font-size: 1.2rem; }
.world-places { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 6rem; }
.world-places article { text-align: center; padding: 1.5rem; }
.world-places .place-symbol { width: 5rem; margin: 0 auto 1rem; font-size: 1.6rem; }
.world-places h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.world-places p:last-child { font-size: 0.9rem; color: #59564f; text-align: left; }
blockquote { padding: 2rem; border-left: 4px solid var(--ai); background: var(--paper); font-family: serif; font-size: clamp(1.2rem, 3vw, 1.6rem); text-align: center; }

.episode-list-section { margin-bottom: 4rem; }
.episode-list { list-style: none; border-top: 1px solid var(--line); }
.episode-list li { display: grid; grid-template-columns: 3rem 1fr auto; gap: 1rem; align-items: center; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.episode-number { color: var(--red); font-family: serif; font-size: 1.25rem; text-align: center; }
.episode-list h3 { font-size: 1.1rem; }
.episode-list p { color: #59564f; font-size: 0.88rem; }
.episode-list time { color: var(--usuzumi); font-size: 0.78rem; white-space: nowrap; }
.episode-note { color: var(--usuzumi); font-size: 0.8rem; margin-top: 1rem; }

.guide { width: min(46rem, 90vw); text-align: left; }
.guide .noren { margin-bottom: 1.4rem; }
.guide > .eyebrow, .guide > h1, .guide > .lead { text-align: center; }
.guide > h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin-bottom: 1.2rem; }
.guide .lead { margin-bottom: 3rem; }
.guide section { border-top: 1px solid var(--line); padding: 1.8rem 0 0.2rem; margin-top: 1.2rem; }
.guide h2 { color: var(--ai); font-size: 1.16rem; margin-bottom: 0.7rem; }
.guide ul { padding-left: 1.4rem; }
.guide li { margin-bottom: 0.55rem; }
.guide section p + p { margin-top: 0.8rem; }
.guide .effective { color: var(--usuzumi); font-size: 0.82rem; margin-top: 2.4rem; }
.mobile-break { display: none; }

.next-door { display: flex; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.next-door a { font-weight: 700; text-decoration: none; }
.site-footer { padding: 3rem 5vw; background: #ebe5da; color: #5c584f; text-align: center; font-size: 0.82rem; }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.2rem; margin: 1rem 0; }
.site-footer nav a { color: var(--sumi); text-decoration: none; }
.site-footer .disclosure { margin-top: 0.5rem; color: var(--usuzumi); }
.not-found { width: min(38rem, 90vw); min-height: 100vh; margin: auto; padding: 10vh 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.not-found h1 { font-size: clamp(1.8rem, 5vw, 2.7rem); margin-bottom: 0.8rem; }
.not-found .button { margin-top: 1.5rem; }

@media (hover: hover) {
  .site-nav a:hover, .site-footer a:hover, .text-link:hover { color: var(--red); }
  .button:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(41, 40, 35, 0.1); }
}

@media (max-width: 720px) {
  .site-header { min-height: auto; padding: 1rem 0; flex-direction: column; gap: 0.65rem; }
  .site-nav { width: 100%; justify-content: space-between; gap: 0.4rem; font-size: 0.78rem; }
  .hero { min-height: 67vh; }
  .hero h1 br, .hero-copy br { display: none; }
  .law-grid, .character-grid, .object-characters, .world-places { grid-template-columns: 1fr; }
  .mini-characters { grid-template-columns: 1fr; }
  .mini-characters article:nth-child(n) { padding-left: 0; padding-right: 0; border-left: 0; }
  .character-feature { grid-template-columns: 1fr; text-align: center; }
  .character-mark { width: 8rem; margin: auto; font-size: 2.5rem; }
  .character-grid article { min-height: 0; }
  .world-places article { max-width: 28rem; margin: auto; }
}

@media (max-width: 520px) {
  body { font-size: 15px; }
  .paper-section { width: 92vw; padding: 1.6rem; }
  .hero { width: 91vw; padding-top: 3.5rem; }
  .hero-actions { width: 100%; }
  .hero-actions .button { width: 100%; }
  .law-list li { grid-template-columns: 2.6rem 1fr; }
  .episode-list li { grid-template-columns: 2rem 1fr; }
  .episode-list time { grid-column: 2; }
  .guide .lead br { display: none; }
  .mobile-break { display: inline; }
  .next-door { font-size: 0.85rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .button { transition: transform 0.15s ease, box-shadow 0.15s ease; }
}
