/* ==========================================================================
   wahoo.tv / henro — 四国遍路寺 〜同行二人〜 88ヶ所巡礼ガイド
   Washi Ivory, Indigo (藍), Vermilion Seal (朱), & Gold Editorial Theme
   ========================================================================== */

:root {
  --bg-washi: #f7f5f0;
  --bg-surface: #ffffff;
  --bg-soft: #efece4;
  --indigo: #1f3a56;
  --indigo-dark: #14273b;
  --indigo-tint: #ebf0f5;
  --shuin: #b8332a;
  --shuin-dark: #93251e;
  --shuin-tint: #fbeeed;
  --gold: #a67c37;
  --gold-tint: #f8f2e4;
  --text-ink: #1e242b;
  --text-sub: #4e5964;
  --text-muted: #76808a;
  --border: #dfd9cc;
  --border-strong: #cbc3b2;
  --shadow-sm: 0 2px 10px rgba(28, 36, 46, 0.05);
  --shadow-md: 0 8px 26px rgba(28, 36, 46, 0.08);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --font-sans: 'Noto Sans JP', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Shippori Mincho', 'Noto Serif JP', Georgia, serif;
  --max-w: 1080px;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-washi);
  color: var(--text-ink);
}

body {
  font-family: var(--font-sans);
  line-height: 1.8;
  background: var(--bg-washi);
  color: var(--text-ink);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Header */
.henro-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shuin-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--shuin);
  color: #ffffff;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.04rem;
  font-weight: 700;
  color: var(--indigo-dark);
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-sub);
}

.header-nav a:hover {
  color: var(--shuin);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wahoo-mini {
  display: inline-block;
  font-family: Impact, 'Arial Black', sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  color: #ffffff;
  background: #d91e26;
  padding: 5px 10px 4px;
  border-radius: 4px;
  line-height: 1;
}

.wahoo-mini:hover {
  background: #b5161d;
}

/* Breadcrumb */
.breadcrumb-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 20px 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.breadcrumb-bar a:hover {
  color: var(--indigo);
  text-decoration: underline;
}

/* Main Container */
.henro-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 12px 20px 72px;
}

/* Temple Hero Card */
.temple-hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-bottom: 36px;
}

.temple-hero-top {
  padding: 22px 28px 18px;
  background: linear-gradient(135deg, var(--indigo-dark) 0%, var(--indigo) 100%);
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.temple-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.badge-dojo {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #f3e4c3;
  border: 1px solid rgba(243, 228, 195, 0.35);
}

.badge-num {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--shuin);
  color: #ffffff;
}

.temple-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
}

.temple-kana {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  margin-left: 10px;
}

.temple-hero-body {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 28px;
  padding: 26px 28px 28px;
  align-items: start;
}

.temple-keyvisual {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: #14181e;
}

.temple-keyvisual img {
  width: 100%;
  height: auto;
}

.temple-spec-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.spec-dl {
  display: grid;
  gap: 10px;
  font-size: 0.88rem;
}

.spec-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bg-soft);
}

.spec-dt {
  font-weight: 700;
  color: var(--indigo);
  font-size: 0.82rem;
}

.spec-dd {
  color: var(--text-ink);
}

.walk-distance-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--shuin-dark);
  background: var(--shuin-tint);
  border: 1px solid rgba(184, 51, 42, 0.22);
  padding: 4px 12px;
  border-radius: 999px;
}

/* Prev / Top / Next Bar */
.temple-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
}

.pager-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-washi);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--indigo-dark);
  text-align: center;
  line-height: 1.3;
}

.pager-btn small {
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.pager-btn:hover:not(.is-disabled) {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #ffffff;
}

.pager-btn:hover:not(.is-disabled) small {
  color: rgba(255, 255, 255, 0.8);
}

.pager-btn.is-disabled {
  opacity: 0.45;
  cursor: default;
}

.btn-vod-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--shuin);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(184, 51, 42, 0.24);
}

.btn-vod-hero:hover {
  background: var(--shuin-dark);
  transform: translateY(-1px);
}

/* Section Shared */
.henro-section {
  margin-bottom: 42px;
  scroll-margin-top: calc(var(--header-h) + 18px);
}

.sec-head {
  margin-bottom: 18px;
}

.sec-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2px;
}

.sec-title {
  font-family: var(--font-serif);
  font-size: clamp(1.22rem, 2vw, 1.52rem);
  font-weight: 700;
  color: var(--indigo-dark);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

/* Precinct Photo Gallery (4 photos from jibjib.jp blog) */
.gallery-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.photo-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-card figcaption {
  padding: 10px 12px;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--indigo-dark);
  text-align: center;
  background: var(--bg-surface);
}

.archive-note {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border-left: 3px solid var(--border-strong);
  font-size: 0.8rem;
  color: var(--text-sub);
  line-height: 1.65;
}

/* Story & Walk Memo Two Columns */
.story-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 22px;
  align-items: start;
}

.story-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}

.story-card.memo-card {
  background: var(--gold-tint);
  border-color: #e3d3b1;
  border-left: 4px solid var(--gold);
}

.story-card h3 {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--indigo-dark);
  margin-bottom: 12px;
}

.story-card p {
  font-size: 0.9rem;
  color: var(--text-ink);
  line-height: 1.9;
  margin-bottom: 12px;
}

.story-card p:last-child {
  margin-bottom: 0;
}

.walk-memo-inline {
  margin-top: 18px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--gold-tint);
  border: 1px solid #e3d3b1;
  border-left: 4px solid var(--gold);
}

.walk-memo-inline h4 {
  font-family: var(--font-serif);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--indigo-dark);
  margin-bottom: 8px;
}

.walk-memo-inline p {
  font-size: 0.88rem;
  line-height: 1.85;
  margin-bottom: 8px;
}

.walk-memo-inline p:last-child {
  margin-bottom: 0;
}

/* Map Card */
.map-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.map-frame {
  position: relative;
  width: 100%;
  height: 380px;
  background: var(--bg-soft);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-footer {
  padding: 14px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-sub);
  border-top: 1px solid var(--border);
}

.map-ext-link {
  font-weight: 700;
  color: var(--indigo);
  text-decoration: underline;
}

/* VOD Feature Box */
.vod-box {
  background: linear-gradient(135deg, #1b2836 0%, #24364a 100%);
  color: #f4f6f8;
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 26px;
  align-items: center;
}

.vod-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f3d99e;
  background: rgba(243, 217, 158, 0.14);
  border: 1px solid rgba(243, 217, 158, 0.35);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.vod-box h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.vod-box p {
  font-size: 0.86rem;
  color: rgba(240, 244, 248, 0.86);
  line-height: 1.8;
  margin-bottom: 16px;
}

.vod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-vod-gold {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  border-radius: 999px;
  background: #e2bd73;
  color: #16181c;
  font-size: 0.86rem;
  font-weight: 700;
}

.btn-vod-gold:hover {
  background: #f2d393;
  transform: translateY(-1px);
}

.btn-vod-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
}

.btn-vod-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.vod-thumb-box {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  max-width: 280px;
  justify-self: center;
}

.vod-thumb-box img {
  width: 100%;
  height: auto;
}

/* 88 Temples Quick Directory */
.dojo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.dojo-tab {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  color: var(--text-sub);
}

.dojo-tab.active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #ffffff;
}

.temple-list-panel {
  display: none;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.temple-list-panel.active {
  display: block;
}

.temple-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.temple-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--bg-washi);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-ink);
}

.temple-chip span {
  font-weight: 700;
  color: var(--indigo);
  font-size: 0.74rem;
}

.temple-chip:hover {
  background: var(--indigo-tint);
  border-color: var(--indigo);
}

.temple-chip.is-current {
  background: var(--shuin);
  border-color: var(--shuin);
  color: #ffffff;
  font-weight: 700;
}

.temple-chip.is-current span {
  color: #ffd9d6;
}

/* Photo-backed Temple Directory Cards (index.html) */
.temple-photo-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
}

.temple-photo-chip {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.temple-photo-chip:hover {
  transform: translateY(-2px);
  border-color: var(--indigo);
  box-shadow: var(--shadow-md);
}

.temple-photo-chip img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.temple-photo-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-ink);
  background: var(--bg-washi);
  border-top: 1px solid var(--border);
}

.temple-photo-label span {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--indigo);
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.temple-photo-chip:hover .temple-photo-label span {
  background: var(--shuin);
}

/* Trailer Modal */
.cinema-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cinema-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 22, 30, 0.82);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  background: #000000;
  border-radius: 14px;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--shuin);
}

.trailer-ratio {
  position: relative;
  padding-top: 56.25%;
}

.trailer-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer */
.henro-footer {
  background: var(--indigo-dark);
  color: #d0d8e0;
  padding: 36px 20px 30px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.82rem;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.76rem;
  color: #8c9baa;
}

/* ==========================================================================
   Top Portal (index.html) Additional Styles
   ========================================================================== */
.portal-hero {
  background: linear-gradient(135deg, var(--indigo-dark) 0%, #1d3650 55%, #243e59 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 42px;
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  align-items: stretch;
}

.portal-hero-copy {
  padding: 36px 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.portal-hero-copy h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}

.portal-hero-copy .hero-lead {
  font-size: 0.9rem;
  color: rgba(242, 246, 250, 0.88);
  line-height: 1.85;
  margin-bottom: 20px;
}

.portal-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-hero-visual {
  position: relative;
  min-height: 280px;
  background: #0c1016;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.portal-hero-credit {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(14, 22, 32, 0.72);
  padding: 3px 10px;
  border-radius: 999px;
}

/* Opening Quote & Dogyo Ninin + Calligraphy */
.intro-two-col {
  display: grid;
  grid-template-columns: 1.15fr 1.05fr;
  gap: 22px;
  align-items: stretch;
}

.dogyo-box {
  background: var(--gold-tint);
  border: 1px solid #e3d3b1;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  display: grid;
  grid-template-columns: 106px 1fr;
  gap: 18px;
  align-items: center;
}

.dogyo-calligraphy {
  width: 106px;
  height: auto;
  display: block;
}

.dogyo-box h3 {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: var(--indigo-dark);
  margin-bottom: 10px;
}

.dogyo-box p {
  font-size: 0.88rem;
  color: var(--text-ink);
  line-height: 1.85;
}

/* 13 Episodes Grid */
.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.ep-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.ep-card.is-soon {
  background: #faf9f5;
  border-style: dashed;
}

.ep-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.ep-num {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--indigo-dark);
}

.ep-price {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--shuin);
  background: var(--shuin-tint);
  padding: 2px 9px;
  border-radius: 999px;
}

.ep-price.soon {
  color: var(--text-muted);
  background: var(--bg-soft);
}

.ep-temples {
  font-size: 0.8rem;
  color: var(--text-sub);
  line-height: 1.65;
}

.ep-watch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--indigo);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
}

.ep-watch-btn:hover {
  background: var(--shuin);
}

.ep-soon-label {
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 7px 10px;
  border-radius: 6px;
}

/* Howto Guide */
.howto-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 22px;
}

.howto-main-photo {
  margin: 12px 0 10px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #14181e;
}

.howto-main-photo img {
  width: 100%;
  height: auto;
}

.howto-photo-credit {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  margin-bottom: 12px;
}

.howto-sub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.howto-sub-grid figure {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-washi);
}

.howto-sub-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.howto-sub-grid figcaption {
  padding: 4px 6px;
  font-size: 0.7rem;
  color: var(--text-sub);
  text-align: center;
}

.steps-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 12px;
}

.step-item {
  background: var(--bg-washi);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.84rem;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: span 2;
}

.step-item.step-half {
  grid-column: span 3;
}

.step-item.step-wide {
  grid-column: 1 / -1;
}

.step-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.step-photo-row-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 4px;
}

.step-photo-row-5 figure {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.step-photo-row-5 img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.step-photo-row-5 figcaption {
  padding: 4px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--indigo-dark);
  text-align: center;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--shuin);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
}

.step-head-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-item strong {
  color: var(--indigo-dark);
}

.tips-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 20px;
  list-style: none;
  font-size: 0.84rem;
  color: var(--text-ink);
}

.tips-cols li {
  position: relative;
  padding-left: 16px;
}

.tips-cols li::before {
  content: '・';
  position: absolute;
  left: 0;
  color: var(--shuin);
  font-weight: 700;
}

.jun-gyaku-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-route-start {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--shuin);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.btn-route-start:hover {
  background: var(--shuin-dark);
}

.btn-route-start.gyaku {
  background: var(--indigo);
}

.btn-route-start.gyaku:hover {
  background: var(--indigo-dark);
}

@media (max-width: 880px) {
  .portal-hero,
  .intro-two-col,
  .dogyo-box,
  .howto-grid,
  .steps-list,
  .tips-cols {
    grid-template-columns: 1fr;
  }
  .step-item,
  .step-item.step-half,
  .step-item.step-wide {
    grid-column: 1 / -1;
  }
  .step-photo-row-5 {
    grid-template-columns: repeat(2, 1fr);
  }
  .dogyo-calligraphy {
    width: 92px;
    margin: 0 auto;
  }
  .portal-hero-copy {
    padding: 26px 20px;
  }
}

@media (max-width: 880px) {
  .header-nav {
    display: none;
  }
  .temple-hero-body,
  .story-grid,
  .vod-box {
    grid-template-columns: 1fr;
  }
  .gallery-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .temple-hero-top,
  .temple-hero-body {
    padding: 18px 16px;
  }
  .story-card,
  .vod-box {
    padding: 20px 16px;
  }
  .btn-vod-gold,
  .btn-vod-ghost {
    width: 100%;
    justify-content: center;
  }
}
