:root {
  --bg: #ffffff;
  --bg-subtle: #f6f7f9;
  --bg-panel: #ffffff;
  --ink: #1c1c1e;
  --muted: #636366;
  --gold: #9a7b2e;
  --gold-dim: #7a6224;
  --accent: #2a6f7e;
  --border: #e2e4ea;
  --serif: "Noto Serif JP", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", sans-serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  background-image: radial-gradient(900px 500px at 12% -8%, rgba(42, 111, 126, 0.06) 0%, transparent 55%),
    radial-gradient(700px 400px at 100% 0%, rgba(154, 123, 46, 0.05) 0%, transparent 45%);
  font-family: var(--sans);
  line-height: 1.75;
}

a {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.brand {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.brand a {
  color: var(--ink);
  text-decoration: none;
}

.brand small {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--gold-dim);
  font-weight: 400;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
}

.nav-main a {
  color: var(--muted);
  text-decoration: none;
}

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

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav-main {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    padding: 0.25rem 0 0;
  }

  .nav-main.is-open {
    display: flex;
  }

  .nav-main a {
    padding: 0.7rem 0;
    border-top: 1px solid var(--border);
  }
}

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

main.wide {
  max-width: 72rem;
}

.breadcrumbs + .showpiece-wordcloud {
  margin-top: 0.25rem;
}

.hall-grid + .showpiece-wordcloud {
  margin-top: 3.75rem;
}

/* ワードクラウド（背景は画像内で body と同色。枠はページに馴染ませる） */
.showpiece-wordcloud {
  margin: 0 0 2.5rem;
  padding: 0;
  border: none;
  background: transparent;
}

.showpiece-wordcloud__mat {
  padding: 0;
  margin: 0;
  background: transparent;
}

.showpiece-wordcloud__mat img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

.wordcloud-caption {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--muted);
  margin: 1rem 0 0;
  padding: 0 0.5rem;
  line-height: 1.5;
}

.hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
}

.hero p.lead {
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto;
  font-size: 0.98rem;
}

.hall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.hall-card {
  display: block;
  padding: 1.25rem 1.35rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.hall-card:hover {
  border-color: rgba(154, 123, 46, 0.45);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.hall-card h2 {
  font-family: var(--serif);
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: var(--gold);
}

.hall-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

.breadcrumbs {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.breadcrumbs a {
  color: var(--muted);
}

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

.page-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.75rem;
  margin: 0 0 1rem;
  letter-spacing: 0.04em;
}

.art-frame {
  margin: 2rem 0;
  padding: 1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.art-frame img,
.art-frame svg {
  display: block;
  width: 100%;
  height: auto;
}

.art-caption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.75rem;
  text-align: center;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 1rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
}

.category-card__count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

.category-card:hover {
  border-color: var(--accent);
}

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

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

.article-list a {
  display: block;
  padding: 0.65rem 0;
  color: var(--ink);
  text-decoration: none;
}

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

.md-content {
  font-size: 0.95rem;
}

.md-content h1,
.md-content h2,
.md-content h3,
.md-content h4 {
  font-family: var(--serif);
  font-weight: 500;
  margin: 1.75rem 0 0.75rem;
  color: var(--ink);
}

.md-content h1 {
  font-size: 1.45rem;
}

.md-content h2 {
  font-size: 1.2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}

.md-content p {
  margin: 0.85rem 0;
}

.md-content ul,
.md-content ol {
  padding-left: 1.35rem;
}

.md-content blockquote {
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--gold);
  color: var(--muted);
  background: var(--bg-subtle);
}

.md-content code {
  font-size: 0.88em;
  background: #eef0f3;
  padding: 0.12em 0.35em;
  border-radius: 3px;
}

.md-content pre {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 1rem;
  overflow-x: auto;
  border-radius: 6px;
}

.md-content pre code {
  background: none;
  padding: 0;
}

.meta-line {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.stats-table th,
.stats-table td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
}

.stats-table th {
  color: var(--gold);
  font-weight: 500;
}

.site-footer {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer a {
  color: var(--muted);
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.75rem;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--heading);
}

.footer-social-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.footer-social a:hover .footer-social-img {
  opacity: 1;
}

/* 生成アート */
.art-plates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0 3rem;
}

.art-plate {
  margin: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.art-plate img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: var(--bg-subtle);
}

.art-plate figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.art-plate figcaption strong {
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 500;
}

.poem-section {
  margin: 2.5rem 0;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.poem-section:last-of-type {
  border-bottom: none;
}

/* 或るパパのストーリー */
.story-block {
  margin: 2.5rem 0;
  padding: 2rem 2rem 1.75rem;
  background: var(--bg-subtle);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
}

.story-block + .story-block {
  margin-top: 3rem;
}

.story-source {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-style: italic;
}

.story-body p {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 2;
  margin: 0.75rem 0;
  color: var(--ink);
}

.dialogue-piece {
  margin: 2.25rem 0;
  padding: 1.5rem 1.65rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.dialogue-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 1rem;
}

.dialogue-line {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.9;
  margin: 0.55rem 0;
  color: var(--ink);
}

.dialogue-speaker {
  display: inline-block;
  min-width: 4.5em;
  margin-right: 0.35em;
  color: var(--gold);
  font-weight: 500;
}

/* P4P 哲学カフェ展示 */
.p4p-exhibit {
  max-width: 44rem;
  margin: 0 auto;
}

.p4p-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.p4p-date {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
  letter-spacing: 0.04em;
}

.p4p-question {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--heading);
  line-height: 1.6;
  margin: 0 0 1rem;
}

.p4p-rule {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  font-style: italic;
}

.p4p-section {
  margin: 2.5rem 0;
}

.p4p-section-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 1rem;
  padding-left: 0.75rem;
  border-left: 3px solid var(--gold);
}

.p4p-voice {
  margin: 0.85rem 0;
  padding: 0.9rem 1.25rem;
  background: var(--bg-subtle);
  border-radius: 6px;
  border: none;
  border-left: 2px solid var(--border);
}

.p4p-voice p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink);
}

.recommend-section {
  margin-bottom: 2.75rem;
}

.recommend-section-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}

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

.recommend-empty code {
  font-size: 0.88em;
}

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.5rem;
  margin: 0 0 1rem;
}

.recommend-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.recommend-cover {
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1rem 0.85rem;
}

.recommend-cover img {
  width: 100%;
  max-width: 9.5rem;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.recommend-body {
  padding: 0 1.15rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recommend-title {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.45;
  color: var(--ink);
}

.recommend-author {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
}

.recommend-comment {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--ink);
}

.recommend-link-wrap {
  margin: 0.15rem 0 0;
}

.recommend-link {
  font-size: 0.82rem;
}

/* 創成記コーナー */
.genesis-exhibit {
  max-width: 40rem;
  margin: 0 auto;
}

.genesis-exhibit__vision {
  margin: 1.75rem 0 2.25rem;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(42, 90, 100, 0.1);
  background: #e8eef0;
}

.genesis-exhibit__vision img,
.genesis-exhibit__vision canvas {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.genesis-story {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 2;
  color: var(--ink);
}

.genesis-story p {
  margin: 0 0 1.35em;
}

.genesis-story h2 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 2rem 0 0.65rem;
  text-indent: 0;
  color: var(--ink);
  line-height: 1.45;
}

.genesis-story h2:first-of-type {
  margin-top: 1.5rem;
}

.genesis-sources {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.genesis-sources h2 {
  margin-top: 0;
}

.genesis-sources ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.8;
}

.genesis-sources li {
  margin-bottom: 0.35em;
}

.genesis-notice {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.75;
}

.genesis-notice p {
  margin: 0;
  text-indent: 0;
}
