/*
Theme Name: Sengawa Memory
Theme URI: https://sengawa-memory.jp/
Description: せんがわ21アーカイブサイト用の子テーマ。Twenty Twenty-Five をベースに、ブランドカラー・カスタム投稿テンプレートを追加。
Author: 株式会社SHARE NEST
Template: twentytwentyfive
Version: 0.1.0
Text Domain: sengawa-memory
*/

/* ===== Brand color overrides ===== */
:root {
  --sn-brand: #2f8fa6;
  --sn-bg:    #f5efe4;
  --sn-accent:#246073;
  --sn-terracotta:     #c4704f; /* 差し色（レンガ）。罫・サブ動線・ホバー等に少量 */
  --sn-terracotta-ink: #b35a38; /* 白地のテキスト用（コントラスト確保） */
}

body {
  background-color: #ffffff;   /* 高齢者配慮：本文は白背景。枠（ヘッダー/フッター）は brand-bg(#f5efe4) を維持 */
  font-size: 1.0625rem;          /* 基本17px（サイドバー等にも反映） */
}

a { color: var(--sn-accent); }
a:hover { color: var(--sn-brand); }

.wp-block-button__link,
.wp-element-button {
  background-color: var(--sn-accent) !important;  /* 白背景でAAコントラストを満たす濃いめティール */
  color: #fff !important;
  border-radius: 6px;
  font-size: 1.0625rem !important;
  font-weight: 700;
  padding: 0.85rem 1.8rem !important;  /* 押しやすい大きさ（高さ44px以上） */
  line-height: 1.4;
}
.wp-block-button__link:hover,
.wp-element-button:hover {
  background-color: var(--sn-brand) !important;
}

/* Site title */
.wp-block-site-title a {
  color: var(--sn-brand) !important;
  text-decoration: none;
}

/* Hero cover: light brand background, dark text */
.wp-block-cover.is-hero {
  background-color: var(--sn-bg) !important;
  color: #2a2622;
}
.wp-block-cover.is-hero .wp-block-cover__background { display: none; }
.wp-block-cover.is-hero h1,
.wp-block-cover.is-hero p { color: #2a2622 !important; text-shadow: none; }

/* Backnumber grid card hover */
.sengawa-backnumber-card {
  transition: transform .15s ease, box-shadow .15s ease;
}
.sengawa-backnumber-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

/* Single backnumber */
.single-backnumber-cover {
  max-width: 480px;
  margin: 0 auto 1.5rem;
  display: block;
}
/* Landscape cover: wider */
body.single-backnumber.has-landscape-cover .single-backnumber-cover,
body.single-backnumber.has-landscape-cover .wp-block-post-featured-image {
  max-width: 820px !important;
  width: 100% !important;
}
/* Landscape card spans 2 cols visually */
.sengawa-backnumber-card.is-landscape img {
  width: 100%;
  height: auto;
}
.single-backnumber-meta {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #555;
}
.single-backnumber-meta strong {
  color: var(--sn-brand);
  font-size: 1.4em;
  display: block;
  margin-bottom: 0.3em;
}
/* ビューア上部：前/次の号ナビ（No.xx の左右） */
.sn-bn-hopnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 760px;
  margin: 0 auto;
}
.sn-bn-hopnav__center {
  flex: 1 1 auto;
  text-align: center;
}
.sn-bn-hopnav__center strong {
  margin-bottom: 0.15em;
}
.sn-bn-hopnav__date {
  display: block;
  font-size: 0.85em;
  color: #777;
}
.sn-bn-hopnav__link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--sn-brand);
  border: 1px solid var(--sn-brand);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  transition: background 0.15s, color 0.15s;
  max-width: 38%;
}
.sn-bn-hopnav__link:hover {
  background: var(--sn-brand);
  color: #fff;
}
.sn-bn-hopnav__arrow { font-size: 1.25em; line-height: 1; }
.sn-bn-hopnav__txt {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}
.sn-bn-hopnav__link--next .sn-bn-hopnav__txt { text-align: right; }
.sn-bn-hopnav__dir { font-size: 0.7em; opacity: 0.8; }
.sn-bn-hopnav__label {
  font-size: 0.9em;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sn-bn-hopnav__link--disabled {
  border-color: #ddd;
  color: #ccc;
  cursor: default;
}
.sn-bn-hopnav__link--disabled:hover { background: transparent; color: #ccc; }
@media (max-width: 600px) {
  .sn-bn-hopnav__dir { display: none; }
  .sn-bn-hopnav__label { font-size: 0.78em; }
  .sn-bn-hopnav__link { padding: 0.4rem 0.6rem; max-width: 30%; }
}
/* マップ凡例 */
.sn-map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.9rem;
  background: rgba(47, 143, 166, 0.07);
  border: 1px solid rgba(47, 143, 166, 0.25);
  border-radius: 8px;
  font-size: 0.88rem;
  color: #444;
}
.sn-map-legend__title {
  font-weight: 700;
  color: var(--sn-brand);
}
.sn-map-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.sn-map-legend__pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sn-brand);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}
.single-backnumber-download {
  text-align: center;
  margin: 2rem 0;
}
.single-backnumber-download a.button {
  display: inline-block;
  background: var(--sn-accent);   /* 白背景でAAを満たす濃いめティール */
  color: #fff;
  padding: 1rem 2.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.0625rem;            /* 高齢者配慮：大きめ */
  box-shadow: 0 2px 6px rgba(36, 96, 115,.3);
}
.single-backnumber-download a.button:hover {
  background: var(--sn-brand);
  color: #fff;
}

/* ===== Post navigation (prev / next) ===== */
.wp-block-post-navigation-link {
  display: inline-block;
}
.wp-block-post-navigation-link a {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--sn-brand);
  border-radius: 4px;
  color: var(--sn-brand);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background .15s ease, color .15s ease;
}
.wp-block-post-navigation-link a:hover {
  background: var(--sn-brand);
  color: #fff;
}

/* ===== Backnumber grid responsive tweaks ===== */
.sengawa-backnumber-grid {
  padding: 0 1rem;
}
@media (max-width: 600px) {
  .sengawa-backnumber-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
  }
  .sengawa-backnumber-card {
    padding: 0.7rem !important;
    font-size: 0.9rem;
  }
  .sengawa-backnumber-card header strong {
    font-size: 1em !important;
  }

  /* Single backnumber: force fluid cover and constrain title */
  .wp-block-post-featured-image,
  .wp-block-post-featured-image img,
  .single-backnumber-cover,
  .single-backnumber-cover img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  .wp-block-post-title {
    font-size: 1.4rem !important;
    line-height: 1.4 !important;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }
  .single-backnumber-meta strong { font-size: 1.2em !important; }
  .single-backnumber-meta p { font-size: 1em !important; }
}

/* Prevent horizontal scroll on the body in any case */
body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* ============================================================
   Body background — 高齢者配慮で白基調へ（2026-06-25）
   ============================================================ */
body {
  background-color: #ffffff;   /* 本文は白。枠（ヘッダー/フッター/ヒーロー）のみ公式色を保持 */
}

/* 既存オーブ要素は functions.php 側で出力停止済。
   念のため非表示にしておく（キャッシュ等で残った場合の保険） */
.sn-bg-orbs { display: none !important; }

/* ============================================================
   Hero slideshow
   ============================================================ */
.sn-hero {
  position: relative;
  width: 100%;
  height: 75vh;
  min-height: 520px;
  max-height: 760px;
  overflow: hidden;
  margin: 0 0 3rem;
  background: #2a2622;
}
.sn-hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.sn-hero--video::before {
  /* Slight overlay so the white title remains readable on the cover-laden video */
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.05) 40%, rgba(0,0,0,.45) 100%);
  pointer-events: none;
}
.sn-hero__slides {
  position: absolute; inset: 0;
}
.sn-hero__slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  animation: sn-hero-fade 36s infinite;
  transform-origin: center center;
}
.sn-hero__slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(44,42,38,0.55) 0%, rgba(44,42,38,0.35) 50%, rgba(44,42,38,0.65) 100%);
}
.sn-hero__slide:nth-child(1) { animation-delay: 0s; }
.sn-hero__slide:nth-child(2) { animation-delay: 6s; }
.sn-hero__slide:nth-child(3) { animation-delay: 12s; }
.sn-hero__slide:nth-child(4) { animation-delay: 18s; }
.sn-hero__slide:nth-child(5) { animation-delay: 24s; }
.sn-hero__slide:nth-child(6) { animation-delay: 30s; }

@keyframes sn-hero-fade {
  0%   { opacity: 0; transform: scale(1.04); }
  4%   { opacity: 1; }
  16%  { opacity: 1; transform: scale(1.10); }
  20%  { opacity: 0; }
  100% { opacity: 0; transform: scale(1.04); }
}

.sn-hero__inner {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff !important;
  padding: 2rem;
  z-index: 5;
}
.sn-hero__inner * { color: #fff !important; }
.sn-hero__cta { color: #fff !important; background: #2f8fa6 !important; }
.sn-hero__lead {
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  animation: sn-fade-up 1.2s ease-out 0.3s both;
}
.sn-hero__title {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  margin: 0 0 1.2rem;
  text-shadow: 0 2px 24px rgba(0,0,0,0.45);
  animation: sn-fade-up 1.4s ease-out 0.6s both;
}
.sn-hero__subtitle {
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  letter-spacing: 0.15em;
  margin: 0 0 2rem;
  animation: sn-fade-up 1.4s ease-out 1s both;
}
.sn-hero__cta {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  background: var(--sn-brand);
  color: #fff !important;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.05em;
  box-shadow: 0 6px 24px rgba(47, 143, 166,0.45);
  transform: translateY(0);
  transition: transform .25s ease, box-shadow .25s ease;
  animation: sn-fade-up 1.4s ease-out 1.4s both;
}
.sn-hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(47, 143, 166,0.55);
  color: #fff !important;
}

@keyframes sn-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .sn-hero { height: 60vh; min-height: 380px; }
  .sn-hero__lead { font-size: 0.75rem; letter-spacing: 0.3em; }
}

/* ============================================================
   Timeline view (horizontal scrolling)
   ============================================================ */
/* ============================================================
   Before/After slider
   ============================================================ */
.sn-ba-wrap {
  margin: 1rem 0 3rem;
  width: 100%;
  padding: 0 5%;
  box-sizing: border-box;
}
.sn-ba-intro {
  text-align: center;
  font-size: 1.05rem;
  color: #2a2622;
  margin: 0 0 0.4rem;
}
.sn-ba-note {
  text-align: center;
  font-size: 0.82rem;
  color: #888;
  margin: 0 0 1.5rem;
  font-style: italic;
}
.sn-ba-note a { color: #2f8fa6; }
.sn-ba-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 1.8rem;
}
.sn-ba-item {
  background: #fff;
  border: 1px solid #e5e0d6;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.sn-ba-title {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  color: #2f8fa6;
  text-align: center;
}
.sn-ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  user-select: none;
  cursor: ew-resize;
  background: #2a2622;
}
.sn-ba-img {
  position: absolute;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  pointer-events: none;
}
.sn-ba-before-wrap {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  clip-path: inset(0 50% 0 0);
  -webkit-clip-path: inset(0 50% 0 0);
  transition: none;
}
.sn-ba-before-wrap .sn-ba-img--before {
  position: absolute;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
}
.sn-ba-handle {
  position: absolute;
  top: 0;
  left: 50%;
  bottom: 0;
  width: 4px;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 5;
}
.sn-ba-handle__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  background: #2f8fa6;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}
.sn-ba-label {
  position: absolute;
  top: 8px;
  background: rgba(44, 42, 38, 0.85);
  color: #fff;
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 3px;
  z-index: 4;
  pointer-events: none;
}
.sn-ba-label--before { left: 8px; }
.sn-ba-label--after  { right: 8px; }
.sn-ba-caption {
  margin: 0.8rem 0 0;
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .sn-ba-grid { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* ============================================================
   Full-text search
   ============================================================ */
.sn-search-wrap {
  margin: 1rem 0 3rem;
  width: 100%;
  padding: 0 5%;
  box-sizing: border-box;
}
.sn-search-form {
  background: #fff;
  border: 1px solid #e5e0d6;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
}
.sn-search-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}
.sn-search-input {
  flex: 1;
  padding: 0.7rem 1rem;
  font-size: 1.05rem;
  border: 2px solid #2f8fa6;
  border-radius: 6px;
  background: #f5efe4;
  font-family: inherit;
}
.sn-search-input:focus { outline: none; border-color: #246073; background: #fff; }
.sn-search-btn {
  padding: 0.7rem 1.6rem;
  background: #2f8fa6;
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.sn-search-btn:hover { background: var(--sn-accent); }
.sn-search-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: #555;
}
.sn-search-filters label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.sn-search-filters select {
  padding: 0.3rem 0.5rem;
  font-size: 0.95rem;
  border: 1px solid #c9c2b6;
  border-radius: 4px;
  background: #fff;
  min-width: 150px;
}
.sn-search-clear {
  color: #888;
  text-decoration: underline;
  font-size: 0.88rem;
}
.sn-search-meta {
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 1rem 0.3rem;
}
.sn-search-empty {
  padding: 2rem;
  text-align: center;
  color: #888;
  background: #fdf3ee;
  border-radius: 6px;
}
.sn-search-prompt {
  padding: 2.2rem 1.5rem;
  text-align: center;
  color: #5a5650;
  background: #f5efe4;
  border: 1px dashed #d4c4ae;
  border-radius: 6px;
  margin: 1.5rem 0 0;
  font-size: 1rem;
  line-height: 1.8;
}
.sn-search-prompt small {
  display: block;
  color: #888;
  font-size: 0.85rem;
  margin-top: 0.4rem;
}
.sn-search-results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.sn-search-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.2rem;
  background: #fff;
  border: 1px solid #e5e0d6;
  border-radius: 6px;
  padding: 1rem 1.2rem;
  transition: box-shadow .2s, transform .2s;
}
.sn-search-card:hover {
  box-shadow: 0 6px 18px rgba(47, 143, 166,0.18);
  transform: translateY(-2px);
}
.sn-search-card__cover img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}
.sn-search-card__title {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}
.sn-search-card__title a { color: #2a2622; text-decoration: none; }
.sn-search-card__title a:hover { color: #2f8fa6; }
.sn-search-card__feature {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
  color: #444;
}
.sn-search-card__hits {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dotted #2f8fa6;
  font-size: 0.85rem;
}
.sn-search-card__hits-label {
  color: #888;
  margin-right: 0.4rem;
}
.sn-search-card__hits ul {
  margin: 0.2rem 0 0;
  padding-left: 1.2rem;
  color: #555;
}
.sn-search-card__hits li { padding: 0.1rem 0; }
.sn-search-card__body-hits { border-top-color: #246073; }
.sn-search-card__body-hits .sn-search-card__hits-label { color: #246073; }
.sn-search-card__page {
  display: inline-block;
  background: #246073;
  color: #fff !important;
  font-size: 0.72rem;
  font-weight: bold;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 0.4em;
  vertical-align: middle;
  text-decoration: none;
  transition: background-color .15s, transform .15s;
  cursor: pointer;
}
a.sn-search-card__page:hover,
a.sn-search-card__page:focus {
  background: #2f8fa6;
  transform: translateY(-1px);
  text-decoration: none;
  outline: none;
  box-shadow: 0 2px 6px rgba(47, 143, 166, .3);
}
.sn-search-wrap mark {
  background: rgba(47, 143, 166,0.25);
  color: inherit;
  font-weight: bold;
  padding: 0 2px;
  border-radius: 2px;
}
@media (max-width: 600px) {
  .sn-search-card { grid-template-columns: 100px 1fr; gap: 0.8rem; padding: 0.7rem; }
  .sn-search-row { flex-direction: column; }
  .sn-search-btn { width: 100%; }
}

.sn-timeline-wrap {
  margin: 1rem 0 3rem;
  width: 100%;
  padding: 0 5%;
  box-sizing: border-box;
}
.sn-timeline-controls {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 0.8rem; padding: 0 0.5rem;
  font-size: 0.9rem; color: #555;
}
.sn-tl-zoom {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid #2f8fa6; background: #fff; color: #2f8fa6;
  font-size: 1.1rem; cursor: pointer; line-height: 1;
}
.sn-tl-zoom:hover { background: #2f8fa6; color: #fff; }
.sn-tl-hint { color: #888; font-size: 0.82rem; margin-left: auto; }

.sn-timeline-scroll {
  overflow-x: auto;
  overflow-y: visible;  /* allow hover-scaled cards to extend beyond */
  background: linear-gradient(180deg, #f5efe4 0%, #f3eee4 100%);
  border: 1px solid #e5e0d6;
  border-radius: 8px;
  padding-top: 1rem;
  padding-bottom: 1rem;
  cursor: grab;
  position: relative;
}
.sn-timeline-scroll:active { cursor: grabbing; }
.sn-timeline-scroll::-webkit-scrollbar { height: 12px; }
.sn-timeline-scroll::-webkit-scrollbar-track { background: #f0ebe0; border-radius: 6px; }
.sn-timeline-scroll::-webkit-scrollbar-thumb { background: #2f8fa6; border-radius: 6px; }

.sn-timeline {
  position: relative;
  height: 540px;
  padding: 0 60px;
}
.sn-timeline__axis {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 4px;
  background: #2f8fa6;
  transform: translateY(-50%);
}
.sn-timeline__year {
  position: absolute;
  top: -10px;
  width: 1px;
}
.sn-timeline__year-line {
  width: 1px; height: 24px;
  background: #2f8fa6;
  margin: 0 auto;
}
.sn-timeline__year-label {
  position: absolute;
  top: 26px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.78rem;
  color: #246073;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.sn-timeline__events {
  position: absolute; left: 0; right: 0; top: 50%;
  height: 50px;
  z-index: 3;
}
.sn-timeline__event {
  position: absolute;
  display: flex; flex-direction: column; align-items: center;
  font-size: 0.78rem;
  color: #246073;
  width: 160px;
  margin-left: -80px;
  text-align: center;
  transform: translateY(-50%);
}
.sn-timeline__event-icon {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2.5px solid #246073;
  border-radius: 50%;
  width: 40px; height: 40px;
  margin-bottom: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  text-align: center;
  line-height: 1;
}
.sn-timeline__event-label {
  background: rgba(36, 96, 115, 0.95);
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.72rem;
  line-height: 1.3;
  max-width: 160px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.sn-timeline__issues { position: absolute; left: 0; right: 0; top: 0; bottom: 0; }
.sn-timeline__issue {
  position: absolute;
  width: 120px;
}
/* row positioning is set inline per-issue (computed by row-packing) */

.sn-timeline__issue {
  z-index: 1;
  transition: z-index 0s;
}
.sn-timeline__issue:hover { z-index: 100; }

.sn-timeline__issue-link {
  display: block;
  background: #fff;
  border: 1px solid #2f8fa6;
  border-radius: 6px;
  padding: 6px;
  text-decoration: none;
  color: #2a2622;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.sn-timeline__issue-link:hover {
  transform: scale(1.6) translateY(-4px);
  transform-origin: center center;
  box-shadow: 0 12px 36px rgba(0,0,0,0.25), 0 0 0 3px rgba(47, 143, 166,0.4);
  z-index: 100;
}
.sn-timeline__issue-link:hover img {
  filter: brightness(1.05);
}
.sn-timeline__issue-link:hover .sn-timeline__issue-meta .sn-tl-title {
  -webkit-line-clamp: 4;  /* show more text on hover */
}
.sn-timeline__issue-link img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 3px;
  background: #f0ebe0;
}
.sn-timeline__issue-meta {
  text-align: center;
  margin-top: 4px;
}
.sn-timeline__issue-meta { display: block; }
.sn-timeline__issue-meta .sn-tl-label { display: block; font-size: 0.85rem; color: #2f8fa6; font-weight: bold; }
.sn-timeline__issue-meta .sn-tl-date  { display: block; font-size: 0.7rem; color: #888; }
.sn-timeline__issue-meta .sn-tl-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.72rem;
  margin: 2px 0 0;
  line-height: 1.3;
  color: #2a2622;
}
.sn-timeline__issue-meta .sn-tl-note {
  display: block;
  font-size: 0.68rem;
  color: #b25a3a;
  font-style: normal;
  margin-top: 2px;
}

.sn-timeline__issue.is-missing .sn-timeline__issue-link {
  background: #fdf3ee;
  border-style: dashed;
  border-color: #b25a3a;
  cursor: help;
}
.sn-timeline__missing-box {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fdf3ee 0%, #f5e3d4 100%);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #b25a3a;
  font-weight: 300;
}

/* (Tick marker removed for cleaner look) */

@media (max-width: 600px) {
  .sn-timeline { height: 480px; }
  .sn-timeline__issue { width: 96px; }
  .sn-timeline__issue-meta strong { font-size: 0.78rem; }
}

/* ============================================================
   Map view (Leaflet)
   ============================================================ */
.sn-map-wrap {
  margin: 1rem 0 3rem;
  width: 100%;
  padding: 0 5%;
  box-sizing: border-box;
}
.sn-map-intro {
  font-size: 0.95rem;
  color: #555;
  margin: 0 0 1rem;
  padding: 0.7rem 1rem;
  background: #fdf3ee;
  border-left: 4px solid #2f8fa6;
  border-radius: 4px;
}
.sn-map {
  width: 100%;
  height: 680px;
  border-radius: 8px;
  border: 1px solid #e5e0d6;
  z-index: 1;
}
.sn-map-pin { background: transparent !important; border: 0 !important; }
/* Override global img rules that break Leaflet tile rendering */
.leaflet-container img,
.leaflet-container .leaflet-tile,
.leaflet-container .leaflet-marker-icon,
.leaflet-container .leaflet-marker-shadow,
.leaflet-container .leaflet-image-layer {
  max-width: none !important;
  max-height: none !important;
  width: auto !important;
  height: auto !important;
}
.leaflet-container .leaflet-tile {
  width: 256px !important;
  height: 256px !important;
}
@media (max-width: 600px) {
  .sn-map { height: 480px; }
}

/* ============================================================
   Single backnumber - Web viewer (image-based PDF reader)
   ============================================================ */
.sn-viewer {
  margin: 2rem 0 1rem;
  padding: 1rem;
  background: #2a2622;
  border-radius: 8px;
  user-select: none;
}
.sn-viewer__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  background: #1a1916;
  border-radius: 4px;
  overflow: hidden;
}
.sn-viewer__page {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  height: auto;
  width: auto;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}
/* 90/270度回転時は、縦長コンテナに収まるよう高さ基準で大きく表示 */
.sn-viewer.is-rotated .sn-viewer__page {
  max-width: 80vh;
  max-height: 92vw;
}

/* 拡大ライトボックス */
.sn-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sn-zoom__stage {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sn-zoom__img {
  max-width: 96vw;
  max-height: 92vh;
  cursor: grab;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
.sn-zoom__img:active { cursor: grabbing; }
.sn-zoom__close,
.sn-zoom__rotate {
  position: fixed;
  top: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 10000;
}
.sn-zoom__close { right: 16px; }
.sn-zoom__rotate { right: 72px; font-size: 20px; }
.sn-zoom__close:hover,
.sn-zoom__rotate:hover { background: #2f8fa6; }
.sn-zoom__hint {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 6px 14px;
  border-radius: 16px;
}
.sn-viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(47, 143, 166, 0.85);
  color: #fff;
  border: 0;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s, transform 0.2s;
}
.sn-viewer__nav:hover { background: #2f8fa6; transform: translateY(-50%) scale(1.08); }
.sn-viewer__prev { left: 12px; }
.sn-viewer__next { right: 12px; }
.sn-viewer__bar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.4rem 0.2rem;
  color: #f5efe4;
}
.sn-viewer__bar button {
  background: transparent;
  color: #f5efe4;
  border: 1px solid rgba(237, 237, 192, 0.3);
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s;
}
.sn-viewer__bar button:hover { background: rgba(237, 237, 192, 0.12); }
.sn-viewer__indicator {
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  min-width: 5em;
  text-align: center;
}
.sn-viewer__current { color: #2f8fa6; font-weight: 700; font-size: 1.1em; }
.sn-viewer__slider {
  flex: 1 1 auto;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(237, 237, 192, 0.25);
  border-radius: 2px;
  outline: none;
}
.sn-viewer__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  background: #2f8fa6;
  border-radius: 50%;
  cursor: pointer;
}
.sn-viewer__slider::-moz-range-thumb {
  width: 16px; height: 16px;
  background: #2f8fa6;
  border-radius: 50%;
  cursor: pointer;
  border: 0;
}
.sn-viewer__note {
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
  color: rgba(237, 237, 192, 0.55);
  text-align: center;
}
.sn-viewer__missing {
  margin: 1rem 0;
  padding: 1rem;
  background: #fdf3ee;
  color: #b25a3a;
  border-radius: 4px;
  text-align: center;
}
@media (max-width: 600px) {
  .sn-viewer { padding: 0.6rem; }
  .sn-viewer__stage { min-height: 280px; }
  .sn-viewer__nav { width: 40px; height: 40px; font-size: 22px; }
  .sn-viewer__prev { left: 6px; }
  .sn-viewer__next { right: 6px; }
  .sn-viewer__page { max-height: 70vh; }
  .sn-viewer__bar { gap: 0.4rem; padding: 0.6rem 0.2rem 0.2rem; }
  .sn-viewer__bar button { padding: 0.3rem 0.5rem; }
}

/* ============================================================
   Single backnumber - Table of contents (from PDF)
   ============================================================ */
.single-backnumber-toc {
  margin: 3rem 0 1rem;
  padding: 1.5rem 1.8rem;
  background: #fff;
  border: 1px solid #e5e0d6;
  border-radius: 8px;
}
.single-backnumber-toc .toc-heading {
  font-size: 1.3rem;
  margin: 0 0 0.4rem;
  border-left: 4px solid var(--sn-brand);
  padding-left: 0.7rem;
}
.single-backnumber-toc .toc-subheader {
  font-size: 1rem;
  color: #444;
  margin: 0.2rem 0 0.6rem;
  font-weight: 600;
}
.single-backnumber-toc .toc-note {
  font-size: 0.85rem;
  color: #b25a3a;
  background: #fdf3ee;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  margin: 0.5rem 0 1rem;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0;
}
.toc-item {
  display: flex;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px dotted #e0dcd2;
  font-size: 0.95rem;
  line-height: 1.6;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.toc-item:last-child { border-bottom: 0; }
.toc-title {
  flex: 0 1 auto;
  color: #2a2622;
  text-decoration: none;
}
a.toc-title {
  color: #2a2622;
  cursor: pointer;
  transition: color .15s;
}
a.toc-title:hover {
  color: var(--sn-brand);
  text-decoration: underline;
}
a.toc-page {
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s;
  padding: 1px 6px;
  border-radius: 3px;
}
a.toc-page:hover {
  background: var(--sn-brand);
  color: #fff !important;
}
.toc-item.is-linked .toc-page {
  border: 1px solid transparent;
}
.toc-item.is-linked:hover .toc-page {
  border-color: var(--sn-brand);
}
.toc-author {
  flex: 0 0 auto;
  color: #666;
  font-size: 0.85em;
}
.toc-dots {
  flex: 1 1 auto;
  border-bottom: 1px dotted #c8c2b3;
  height: 1px;
  min-width: 20px;
  margin: 0 0.3rem;
  align-self: center;
}
.toc-page {
  flex: 0 0 auto;
  color: var(--sn-brand);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 2em;
  text-align: right;
}
.toc-source {
  margin-top: 1.2rem;
  font-size: 0.8rem;
  color: #888;
  text-align: right;
  font-style: italic;
}
.toc-source a { color: #888; text-decoration: underline; }

/* 誌面の目次画像 */
.toc-page-image {
  margin: 0 0 1.4rem;
  text-align: center;
}
.toc-page-image a,
.toc-page-image .toc-page-image__btn { display: inline-block; max-width: 460px; width: 100%; }
.toc-page-image .toc-page-image__btn {
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;   /* 拡大表示できることを示す */
}
.toc-page-image img {
  width: 100%;
  height: auto;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.toc-page-image a:hover img,
.toc-page-image .toc-page-image__btn:hover img {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.toc-page-image figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #777;
}

@media (max-width: 600px) {
  .single-backnumber-toc { padding: 1rem 1.2rem; }
  .toc-item { font-size: 0.88rem; }
  .toc-author { display: block; flex: 1 1 100%; padding-left: 0.8rem; }
}

/* ============================================================
   Inside-page preview gallery (single backnumber)
   ============================================================ */
.single-backnumber-previews {
  margin: 3rem 0 1rem;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #e5e0d6;
  border-radius: 8px;
}
.single-backnumber-previews .preview-heading {
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
  border-left: 4px solid var(--sn-brand);
  padding-left: 0.6rem;
}
.single-backnumber-previews .preview-note {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 1rem;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
}
.preview-item {
  display: block;
  position: relative;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  background: #f5f3ee;
  transition: transform .2s, box-shadow .2s;
}
.preview-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.preview-item img { display: block; width: 100%; height: auto; }
.preview-item .preview-page {
  position: absolute; bottom: 4px; right: 4px;
  background: rgba(44,42,38,0.78);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 3px;
}
@media (max-width: 600px) {
  .preview-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   見出しスタイル ─ D案「仙川（せんがわ）の流れ」
   メイン本文 (.sn-page-grid__main) 配下の wp-block-heading に統一適用
   ============================================================ */

/* h2: 大見出し ─ 川の流れを表す二重波線アンダーライン */
.sn-page-grid__main h2.wp-block-heading,
.sn-page-grid__main h1.wp-block-heading,
.sn-page-grid__main h1.wp-block-post-title {
  position: relative;
  font-family: "Hiragino Mincho ProN", "ヒラギノ明朝 ProN", "Yu Mincho", serif;
  font-size: clamp(1.55rem, 3.2vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.5;
  color: #1a1a1a;
  margin: 3rem 0 1.4rem;
  padding: 0.2rem 0 1.4rem 0.9rem;
  border-left: 5px solid var(--sn-terracotta); /* 差し色（レンガ）の左罫 */
}

.sn-page-grid__main h2.wp-block-heading::after,
.sn-page-grid__main h1.wp-block-heading::after,
.sn-page-grid__main h1.wp-block-post-title::after {
  content: "";
  display: block;
  width: 100%;
  height: 14px;
  margin-top: 0.4rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 14' preserveAspectRatio='none'><path d='M0 7 Q 30 0, 60 7 T 120 7 T 180 7 T 240 7 T 300 7 T 360 7 T 420 7 T 480 7' stroke='%23246073' stroke-width='2' fill='none'/><path d='M0 11 Q 40 5, 80 11 T 160 11 T 240 11 T 320 11 T 400 11 T 480 11' stroke='%232f8fa6' stroke-width='1' fill='none' opacity='0.6'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 14px;
  background-position: left bottom;
}

/* h3: 中見出し ─ 波の一筋（～マーク） */
.sn-page-grid__main h3.wp-block-heading {
  position: relative;
  font-family: "Hiragino Mincho ProN", "ヒラギノ明朝 ProN", "Yu Mincho", serif;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: #2a2622;
  margin: 2.2rem 0 0.8rem;
  padding-left: 1.3rem;
}

.sn-page-grid__main h3.wp-block-heading::before {
  content: "～";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--sn-terracotta); /* 差し色（レンガ）を中見出しマーカーに */
  font-weight: 700;
  font-size: 1.1em;
  line-height: 1.5;
}

/* h4: 小見出し ─ 控えめな波 */
.sn-page-grid__main h4.wp-block-heading {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--sn-accent);
  margin: 1.6rem 0 0.5rem;
  padding-left: 1.1rem;
  position: relative;
}

.sn-page-grid__main h4.wp-block-heading::before {
  content: "～";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--sn-brand);
  font-weight: 700;
  line-height: 1.4;
  opacity: 0.85;
}

/* 最初の見出しはマージン上を詰める */
.sn-page-grid__main > .wp-block-post-content > h2.wp-block-heading:first-of-type,
.sn-page-grid__main h2.wp-block-heading:first-child,
.sn-page-grid__main h1.wp-block-heading,
.sn-page-grid__main h1.wp-block-post-title {
  margin-top: 1rem;
}

/* モジュール内の見出し（フォーム導入など）は装飾を打ち消し */
.sn-page-grid__main .sn-donate__intro h3,
.sn-page-grid__main .sn-donors__intro h3,
.sn-page-grid__main .sn-sponsor-apply__intro h3 {
  padding-left: 0;
}
.sn-page-grid__main .sn-donate__intro h3::before,
.sn-page-grid__main .sn-donors__intro h3::before,
.sn-page-grid__main .sn-sponsor-apply__intro h3::before {
  display: none;
}

/* スマホ：縦余白を圧縮 */
@media (max-width: 600px) {
  .sn-page-grid__main h2.wp-block-heading,
  .sn-page-grid__main h1.wp-block-heading,
  .sn-page-grid__main h1.wp-block-post-title {
    margin: 2rem 0 1rem;
    padding-bottom: 1.1rem;
  }
  .sn-page-grid__main h3.wp-block-heading {
    margin: 1.5rem 0 0.6rem;
  }
}

/* === バックナンバー prev/next ナビ（_issue_no 順） === */
.sn-bn-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 1.5rem 0 1rem;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
}
.sn-bn-nav__link {
  display: block;
  padding: 1rem 1.2rem;
  background: #fff;
  border: 1px solid #ead7c4;
  border-radius: 6px;
  text-decoration: none !important;
  color: #2a2622;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  min-width: 0;
}
.sn-bn-nav__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(47, 143, 166, .15);
  border-color: #2f8fa6;
}
.sn-bn-nav__link--next { text-align: right; }
.sn-bn-nav__dir {
  display: block;
  font-size: 0.78rem;
  color: #2f8fa6;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.sn-bn-nav__label {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}
.sn-bn-nav__date {
  display: block;
  font-size: 0.78rem;
  color: #888;
  margin-top: 0.2rem;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
}
.sn-bn-nav__placeholder { display: block; }
@media (max-width: 600px) {
  .sn-bn-nav { grid-template-columns: 1fr; }
}

/* ============================================================
   2026-06-12: 丸ゴシック統一 + 本文フォントサイズの統一
   ============================================================ */

/* 全体 — 丸ゴシック系（macOS / Windows / Web フォールバック順） */
:root {
  --sn-font-rounded:
    "Hiragino Maru Gothic ProN",
    "Hiragino Maru Gothic Pro",
    "ヒラギノ丸ゴ ProN W4",
    "ヒラギノ丸ゴ Pro W4",
    "Quicksand",
    "Nunito",
    "Yu Gothic",
    "Meiryo",
    sans-serif;
}

body,
.wp-block-post-content,
.entry-content,
input, textarea, select, button {
  font-family: var(--sn-font-rounded) !important;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}

/* メイン本文 — マップ intro の 0.95rem に合わせて全ページ統一 */
.sn-page-grid__main p,
.sn-page-grid__main ul li,
.sn-page-grid__main ol li {
  font-size: 1.125rem;   /* 高齢者配慮：本文18px */
  line-height: 1.85;
  color: #2a2622;        /* 高コントラストの濃い黒 */
}

/* 本文中のリンクは「押せる場所」を明確に：下線つき＋濃いめティール */
.sn-page-grid__main p a,
.sn-page-grid__main li a {
  color: #246073;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}
.sn-page-grid__main p a:hover,
.sn-page-grid__main li a:hover {
  color: var(--sn-terracotta-ink); /* ホバーで差し色（レンガ） */
}

/* ヒーロー、TOC、ビューア、カード等は各自のサイズを優先する（除外）— 既存のクラス指定が優先される */
.sn-hero__title,
.sn-hero__subtitle,
.sn-hero__lead,
.sn-hero__cta {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;  /* 表紙だけ明朝で見出し感を残す */
}

/* TOC・カード・ビューア内のpはサイズを自前指定しているのでそのまま */
.toc-item, .toc-source,
.sn-bn-card p, .sn-bn-nav__date,
.viewer p, .sn-search-card p,
.sn-tl-card p, .sn-sponsor-apply__intro p,
.sn-donate__intro p, .sn-donors__intro p {
  /* 既存サイズ維持（このルールでは何もリセットしない） */
}

/* h1-h4 は本文と明確に差を出すために 丸ゴシック + やや太め */
.sn-page-grid__main h1,
.sn-page-grid__main h2,
.sn-page-grid__main h3,
.sn-page-grid__main h4 {
  font-family: var(--sn-font-rounded);
  font-weight: 600;
}

/* WP標準クラス（fontSize: large/medium）を無効化して、本文と一致させる */
.sn-page-grid__main p.has-large-font-size,
.sn-page-grid__main p.has-medium-font-size {
  font-size: 0.95rem !important;
}

/* モバイル — 少し詰めて読みやすく */
@media (max-width: 600px) {
  .sn-page-grid__main p,
  .sn-page-grid__main ul li,
  .sn-page-grid__main ol li {
    font-size: 0.92rem;
    line-height: 1.8;
  }
}

/* ============================================================
   「せんがわ21が伝えたかったこと」ページ（メッセージ主役）
   ============================================================ */
.sn-msg-page { max-width: 760px; margin: 0 auto; }

/* イントロ */
.sn-msg-hero {
  text-align: center;
  padding: 1rem 0 2.5rem;
  border-bottom: 1px solid #ead7c4;
  margin-bottom: 2.5rem;
}
.sn-msg-hero__lead {
  font-family: "Hiragino Sans", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--sn-accent);
  margin: 0 0 1rem;
}
.sn-msg-hero__title {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 600;
  line-height: 1.5;
  color: #2a2622;
  margin: 0 0 1.2rem;
}
.sn-msg-hero__title em {
  font-style: normal;
  color: var(--sn-brand);
}
.sn-msg-hero__sub {
  font-size: 0.95rem;
  line-height: 1.9;
  color: #5a5650;
  margin: 0;
}

/* 出発点ストーリー */
.sn-msg-origin {
  background: #fff;
  border: 1px solid #ead7c4;
  border-radius: 8px;
  padding: 1.8rem 1.6rem;
  margin: 0 0 3.5rem;
  line-height: 1.95;
  color: #2a2622;
}
.sn-msg-origin h2 {
  font-family: "Hiragino Mincho ProN", serif;
  font-size: 1.25rem;
  margin: 0 0 1rem;
  color: #1a1a1a;
}

/* 引用ブロック（青野氏の実際の言葉） */
.sn-quote {
  position: relative;
  margin: 1.2rem 0;
  padding: 1rem 1.2rem 1rem 1.6rem;
  border-left: 4px solid var(--sn-brand);
  background: #fbf5ef;
  border-radius: 0 6px 6px 0;
}
.sn-quote p {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 1.05rem;
  line-height: 1.95;
  color: #3a352f;
  margin: 0 0 0.5rem;
}
.sn-quote cite {
  display: block;
  font-style: normal;
  font-family: "Hiragino Sans", sans-serif;
  font-size: 0.78rem;
  color: #998;
  text-align: right;
}

/* 5つのメッセージ */
.sn-msg-list { margin: 0 0 3.5rem; }
.sn-msg {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.2rem;
  padding: 2rem 0;
  border-bottom: 1px dashed #d4c4ae;
  align-items: start;
}
.sn-msg:last-child { border-bottom: 0; }
.sn-msg__num {
  font-family: "Hiragino Mincho ProN", serif;
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1;
  color: var(--sn-brand);
  opacity: 0.85;
}
.sn-msg__body h3 {
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.6rem;
  line-height: 1.5;
}
.sn-msg__body p {
  font-size: 0.95rem;
  line-height: 1.9;
  color: #5a5650;
  margin: 0;
}
.sn-msg__body .sn-quote { margin-top: 1rem; margin-bottom: 0; }

/* 一文集約 */
.sn-msg-core {
  text-align: center;
  background: var(--sn-accent);
  color: #fff;
  border-radius: 10px;
  padding: 2.6rem 1.8rem;
  margin: 0 0 3.5rem;
}
.sn-msg-core p {
  font-family: "Hiragino Mincho ProN", serif;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  line-height: 2;
  margin: 0;
  color: #fff;
}
.sn-msg-core strong { color: #ffd9a8; font-weight: 600; }

/* だから、いま（継承＋導線） */
.sn-msg-legacy { margin: 0 0 2rem; line-height: 1.95; color: #2a2622; }
.sn-msg-legacy h2 {
  font-family: "Hiragino Mincho ProN", serif;
  font-size: 1.3rem;
  margin: 0 0 1rem;
  color: #1a1a1a;
}
.sn-msg-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 1.8rem;
}
.sn-msg-links a {
  display: block;
  background: #fff;
  border: 1px solid #ead7c4;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: #2a2622;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.sn-msg-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(47, 143, 166,.15);
  border-color: var(--sn-brand);
}
.sn-msg-links strong {
  display: block;
  font-size: 1rem;
  color: #1a1a1a;
  margin-bottom: 0.2rem;
}
.sn-msg-links span {
  font-size: 0.82rem;
  color: #888;
}
@media (max-width: 600px) {
  .sn-msg { grid-template-columns: 48px 1fr; gap: 0.8rem; }
  .sn-msg__num { font-size: 2rem; }
  .sn-msg-links { grid-template-columns: 1fr; }
}

/* ============================================================
   仙川商店街の移り変わり ページ
   ============================================================ */
.sn-st-intro {
  font-size: 0.98rem;
  line-height: 1.95;
  color: #2a2622;
  background: #fff;
  border: 1px solid #ead7c4;
  border-left: 4px solid var(--sn-brand);
  border-radius: 0 8px 8px 0;
  padding: 1.4rem 1.6rem;
  margin: 0 0 2.5rem;
}

/* 年代見出し */
.sn-st-section { margin: 0 0 3rem; }
.sn-st-eralabel {
  display: inline-block;
  background: var(--sn-accent);
  color: #fff;
  font-family: "Hiragino Maru Gothic ProN", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}
.sn-st-section > h2 {
  font-family: "Hiragino Mincho ProN", serif;
  font-size: 1.4rem;
  color: #1a1a1a;
  margin: 0.3rem 0 0.6rem;
}
.sn-st-section > p { font-size: 0.95rem; line-height: 1.9; color: #5a5650; margin: 0 0 1.2rem; }

/* 比較グリッド（2枚並べる） */
.sn-st-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.sn-st-fig { margin: 0; }
.sn-st-fig a { display: block; }
.sn-st-fig img {
  width: 100%;
  height: auto;
  border: 1px solid #d4c4ae;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  transition: transform .18s, box-shadow .18s;
}
.sn-st-fig a:hover img {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(47, 143, 166,.18);
}
.sn-st-fig figcaption {
  margin-top: 0.7rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: #5a5650;
}
.sn-st-fig figcaption strong { display: block; color: #1a1a1a; font-size: 1rem; margin-bottom: 0.2rem; }
.sn-st-zoom {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: var(--sn-brand);
  text-decoration: none;
  font-family: "Hiragino Maru Gothic ProN", sans-serif;
}
.sn-st-zoom:hover { text-decoration: underline; }

/* 単独大マップ */
.sn-st-single { max-width: 560px; margin: 0 auto; }

/* 引用（35年で1/4） */
.sn-st-pull {
  text-align: center;
  font-family: "Hiragino Mincho ProN", serif;
  font-size: clamp(1.15rem, 3.5vw, 1.6rem);
  line-height: 1.7;
  color: var(--sn-brand);
  margin: 1.6rem 0;
  font-weight: 600;
}

/* 凡例 */
.sn-st-legend {
  background: #fbf5ef;
  border-radius: 8px;
  padding: 1rem 1.3rem;
  margin: 1.2rem 0;
  font-size: 0.9rem;
  line-height: 1.9;
  color: #3a352f;
}
.sn-st-legend .sw {
  display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.2em;
  border-radius: 3px; margin-right: 0.4em; border: 1px solid #aaa;
}
.sn-st-legend .sw--dark  { background: #6b6b6b; }
.sn-st-legend .sw--light { background: #cfcfcf; }

/* 出典・その他の記録 */
.sn-st-more {
  border-top: 1px dashed #d4c4ae;
  margin-top: 2rem; padding-top: 1.5rem;
}
.sn-st-more h3 { font-family:"Hiragino Mincho ProN",serif; font-size:1.1rem; margin:0 0 0.6rem; color:#1a1a1a; }
.sn-st-more ul { margin: 0; padding-left: 1.2rem; }
.sn-st-more li { font-size: 0.9rem; line-height: 1.9; color: #5a5650; }
.sn-st-more a { color: var(--sn-accent); }

@media (max-width: 680px) {
  .sn-st-compare { grid-template-columns: 1fr; gap: 2rem; }
}

/* 商店街 年代順ギャラリー（複数枚） */
.sn-st-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 480px) {
  .sn-st-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   年表ページ：各号の出版日 縦リスト
   ============================================================ */
.sn-chrono { margin: 0 0 1rem; border-top: 1px solid #ead7c4; }
.sn-chrono__row {
  display: grid;
  grid-template-columns: 110px 90px 1fr;
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid #ead7c4;
  text-decoration: none;
  color: #2a2622;
  transition: background .15s;
}
.sn-chrono__row:hover { background: #fbf5ef; }
.sn-chrono__date {
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 0.92rem;
  color: var(--sn-brand);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.sn-chrono__no {
  font-family: "Hiragino Maru Gothic ProN", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
}
.sn-chrono__feat { font-size: 0.92rem; color: #5a5650; line-height: 1.5; }
@media (max-width: 560px) {
  .sn-chrono__row { grid-template-columns: 92px 1fr; }
  .sn-chrono__no { grid-column: 2; }
  .sn-chrono__feat { grid-column: 2; }
}

/* 年表画像ギャラリー（仙川界隈史・実篤略年表）— shotengaiの.sn-st-*を流用 */
.sn-tl-doc { margin: 0 0 2.8rem; }
.sn-tl-doc__head { margin: 2.5rem 0 0.8rem; }
.sn-tl-doc__head h2 {
  font-family: "Hiragino Mincho ProN", serif;
  font-size: 1.4rem; color:#1a1a1a; margin: 0 0 0.3rem;
}
.sn-tl-doc__head p { font-size: 0.92rem; color:#5a5650; line-height:1.8; margin:0; }

/* ============================================================
   統合年表（街・実・誌） sn-gt
   ============================================================ */
.sn-gt { margin: 0.5rem 0 2rem; }
.sn-gt__legend {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem;
  padding: 0.9rem 1.1rem; margin-bottom: 1.4rem;
  background: #fff; border: 1px solid #ead7c4; border-radius: 8px;
  font-size: 0.88rem; color: #3a352f;
  position: sticky; top: 0; z-index: 3;
}
.sn-gt__key { display: inline-flex; align-items: center; gap: 0.4em; }

.sn-gt__row {
  display: grid;
  grid-template-columns: 58px 1.6em 1fr;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid #efe7da;
}
.sn-gt__row:hover { background: #fbf5ef; }
.sn-gt__year {
  font-family: "Hiragino Sans","Yu Gothic",sans-serif;
  font-size: 0.9rem; font-weight: 700; color: #1a1a1a;
  text-align: right;
}
.sn-gt__badge {
  display: inline-block; width: 1.5em; height: 1.5em; line-height: 1.5em;
  text-align: center; border-radius: 4px;
  font-size: 0.72rem; font-weight: 700; color: #fff;
  font-family: "Hiragino Maru Gothic ProN", sans-serif;
}
.sn-gt__badge--machi     { background: #246073; }  /* 緑：界隈史 */
.sn-gt__badge--jitsuatsu { background: #527a99; }  /* 青：実篤   */
.sn-gt__badge--issue     { background: #2f8fa6; }  /* 橙：せんがわ21 */
.sn-gt__text { font-size: 0.94rem; line-height: 1.65; color: #2a2622; }
.sn-gt__text a { color: #2f8fa6; text-decoration: none; }
.sn-gt__text a:hover { text-decoration: underline; }

/* 出典ごとの左アクセント */
.sn-gt__row--machi     { border-left: 3px solid rgba(36, 96, 115,.45); }
.sn-gt__row--jitsuatsu { border-left: 3px solid rgba(82,122,153,.45); }
.sn-gt__row--issue     { border-left: 3px solid rgba(47, 143, 166,.5); background: #fdfaf6; }

@media (max-width: 560px) {
  .sn-gt__row { grid-template-columns: 48px 1.5em 1fr; gap: 0.4rem; }
  .sn-gt__year { font-size: 0.82rem; }
  .sn-gt__text { font-size: 0.9rem; }
}

/* ============================================================
   PDFダウンロード前の選択モーダル sn-pdfgate
   ============================================================ */
.sn-pdfgate-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(44,42,38,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1.2rem;
}
.sn-pdfgate-overlay[hidden] { display: none; }
.sn-pdfgate__box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 460px; width: 100%;
  padding: 2rem 1.8rem 1.6rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  text-align: center;
  font-family: "Hiragino Maru Gothic ProN","Yu Gothic",sans-serif;
}
.sn-pdfgate__close {
  position: absolute; top: 0.6rem; right: 0.8rem;
  background: none; border: 0; font-size: 1.6rem; line-height: 1;
  color: #999; cursor: pointer;
}
.sn-pdfgate__close:hover { color: #2f8fa6; }
.sn-pdfgate__title {
  font-family: "Hiragino Mincho ProN", serif;
  font-size: 1.25rem; color: #1a1a1a; margin: 0 0 0.8rem;
}
.sn-pdfgate__lead { font-size: 0.92rem; line-height: 1.8; color: #5a5650; margin: 0 0 1.4rem; }
.sn-pdfgate__actions { display: flex; flex-direction: column; gap: 0.7rem; }
.sn-pdfgate__box, .sn-pdfgate__box * { box-sizing: border-box; }
.sn-pdfgate__btn {
  display: block; width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  border-radius: 8px; border: 0;
  font-size: 1rem; font-weight: 600; cursor: pointer;
  text-decoration: none; text-align: center;
  font-family: inherit;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.sn-pdfgate__btn--donate  { background: var(--sn-terracotta); color: #fff !important; box-shadow: 0 3px 10px rgba(196, 112, 79,.3); }
.sn-pdfgate__btn--sponsor { background: #246073; color: #fff !important; box-shadow: 0 3px 10px rgba(36, 96, 115,.25); }
.sn-pdfgate__btn--skip    { background: #f1ece4; color: #5a5650 !important; }
.sn-pdfgate__btn:hover { transform: translateY(-2px); }
.sn-pdfgate__note { font-size: 0.78rem; color: #999; margin: 1rem 0 0; }

/* ============================================================
   ヘッダーのキャッチコピー（ロゴの右）
   ============================================================ */
.sn-site-header { gap: 1.2rem; }
.sn-site-tagline {
  margin: 0;
  flex: 1 1 auto;        /* 伸びて空きを埋め、検索を右端へ押す */
  min-width: 0;
  padding-left: 1.2rem;
  border-left: 1px solid #ddd3c4;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #2a2622;
  line-height: 1.45;
  letter-spacing: 0.04em;
}
.sn-site-tagline__sub {
  display: block;
  font-family: "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  color: #8a8378;
  letter-spacing: 0.02em;
  margin-top: 0.15rem;
}
@media (max-width: 600px) {
  .sn-site-tagline { display: none; }   /* スマホでは非表示でロゴを優先 */
}

/* ============================================================
   ヘッダー右端の検索フォーム
   ============================================================ */
.sn-header-search {
  margin-left: auto;            /* 念のため：タグラインの flex:1 と併用 */
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  width: 260px;
  max-width: 38vw;
}
.sn-header-search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #d4c4ae;
  border-right: 0;
  border-radius: 999px 0 0 999px;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  background: #fff;
  color: #2a2622;
  font-family: "Hiragino Maru Gothic ProN","Yu Gothic",sans-serif;
}
.sn-header-search__input:focus {
  outline: none;
  border-color: var(--sn-brand);
}
.sn-header-search__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: var(--sn-brand);
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}
.sn-header-search__btn:hover { background: var(--sn-accent); }

@media (max-width: 760px) {
  .sn-header-search { max-width: 180px; }
}
@media (max-width: 600px) {
  /* スマホ：タグラインを消した分、検索はアイコン優先で右に小さく残す */
  .sn-header-search { max-width: 150px; margin-left: auto; }
}

/* ============================================================
   高齢者にやさしいモード（白背景・大きめ文字・高コントラスト）
   ============================================================ */
/* サイドバーのメニュー文字を大きく・行間ゆったり・押しやすく */
.sn-sidebar__nav,
.sn-sidebar__nav .wp-block-navigation-item__content {
  font-size: 1.0625rem !important;
}
.sn-sidebar__nav .wp-block-navigation-item__content {
  display: inline-block;
  padding: 0.35rem 0;
  font-weight: 500;
}
.sn-sidebar__nav li { margin-bottom: 0.15rem; }
/* サイドバーは白背景の本文と一体化（枠線で区切りを明示） */
.sn-sidebar {
  background: #ffffff;
}
/* 見出し下の発行日などの淡色テキストもコントラストを確保 */
.single-backnumber-meta { color: #444; }
.sn-bn-hopnav__date { color: #555; }
/* 目次・本文リンクのタップ領域を広めに */
.toc-item.is-linked a { text-underline-offset: 2px; }
