:root {
  color-scheme: light;
  --ink: #1d2523;
  --muted-ink: #5b6662;
  --paper: #fbfaf6;
  --soft: #f0f2ed;
  --line: #d7ddd3;
  --green: #163f33;
  --green-2: #2e6a52;
  --clay: #b7653d;
  --gold: #b89342;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(19, 28, 24, 0.18);
  --radius: 8px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Yu Gothic", "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  line-height: 1.8;
  letter-spacing: 0;
}

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

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-120%);
  background: var(--ink);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 6px;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 48px);
  color: var(--white);
  transition: background 0.24s ease, box-shadow 0.24s ease, color 0.24s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(251, 250, 246, 0.96);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(25, 35, 31, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
  max-width: min(100%, 520px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 23px;
  line-height: 1;
}

.brand-main {
  display: block;
  white-space: nowrap;
}

.brand-main {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(16px, 1.65vw, 19px);
  font-weight: 700;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.nav-current {
  background: rgba(255, 255, 255, 0.16);
  outline: none;
}

.site-header.is-scrolled .site-nav a:hover,
.site-header.is-scrolled .site-nav a:focus-visible,
.site-header.is-scrolled .site-nav a.nav-current,
.site-header.is-open .site-nav a:hover,
.site-header.is-open .site-nav a:focus-visible,
.site-header.is-open .site-nav a.nav-current {
  background: rgba(22, 63, 51, 0.08);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  padding: 9px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 84svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: var(--green);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(15, 23, 20, 0.72), rgba(15, 23, 20, 0.36) 46%, rgba(15, 23, 20, 0.14)),
    linear-gradient(0deg, rgba(15, 23, 20, 0.42), transparent 45%);
}

.hero-visual {
  min-height: 86svh;
}

.hero-visual::after {
  background:
    linear-gradient(180deg, rgba(15, 23, 20, 0.52), rgba(15, 23, 20, 0.08) 34%, rgba(15, 23, 20, 0.18)),
    linear-gradient(0deg, rgba(15, 23, 20, 0.22), transparent 46%);
}

.hero-image,
.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-image {
  z-index: 0;
}

.hero-media {
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(100% - 40px, 980px);
  margin: 0 auto;
  padding: 130px 0 88px;
  color: var(--white);
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(64px, 13vw, 152px);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: 0;
}

.hero-copy {
  max-width: min(720px, 100%);
  margin: 28px 0 0;
  font-size: 19px;
  line-height: 1.9;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
}

.button.primary {
  background: var(--white);
  color: var(--green);
  border-color: var(--white);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.72);
}

.button.map {
  margin-top: 24px;
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.section,
.section-band {
  padding: 92px 0;
}

.section-band {
  background: var(--white);
}

.muted {
  background: var(--soft);
}

.intro-grid,
.split,
.kono-grid,
.story-grid,
.visit-grid,
.access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.82fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.intro h2,
.section h2 {
  margin: 0 0 22px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.2;
  letter-spacing: 0;
}

.intro p,
.section p {
  margin: 0 0 16px;
  color: var(--muted-ink);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.quick-facts div {
  min-height: 118px;
  padding: 22px;
  background: var(--paper);
}

.quick-facts dt {
  color: var(--clay);
  font-size: 13px;
  font-weight: 700;
}

.quick-facts dd {
  margin: 6px 0 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.4;
}

.section-copy {
  max-width: 650px;
}

.history-copy {
  max-width: 980px;
}

.history-copy h2 {
  max-width: 760px;
}

.history-copy p:not(.section-kicker) {
  max-width: 920px;
  font-size: 17px;
  line-height: 2.05;
}

.feature-figure,
.story-grid figure,
.gallery figure {
  margin: 0;
}

.feature-figure img,
.story-grid img,
.gallery img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.origin-board img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.feature-figure figcaption,
.story-grid figcaption,
.gallery figcaption {
  margin-top: 10px;
  color: var(--muted-ink);
  font-size: 13px;
  line-height: 1.6;
}

.feature-wide {
  margin-top: 72px;
}

.feature-wide figure,
.document-feature figure {
  margin: 0;
}

.feature-wide img,
.document-feature img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-wide img {
  max-height: 620px;
  object-fit: cover;
  object-position: center;
}

.document-feature {
  margin-top: 54px;
}

.document-feature img {
  max-height: 520px;
  object-fit: cover;
  object-position: center;
}

.feature-wide figcaption,
.document-feature figcaption {
  margin-top: 10px;
  color: var(--muted-ink);
  font-size: 13px;
  line-height: 1.6;
}

.timeline-wrap {
  margin-top: 78px;
}

.timeline-wrap h3 {
  margin: 0 0 22px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 28px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.timeline li {
  min-height: 245px;
  padding: 24px;
  background: var(--white);
}

.timeline time {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--clay);
  font-weight: 700;
}

.timeline strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 21px;
  line-height: 1.4;
}

.timeline p {
  margin: 0;
  font-size: 14px;
}

.kono-grid {
  grid-template-columns: minmax(250px, 0.55fr) minmax(0, 1fr);
}

.kamon-panel {
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 50px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.kamon-panel img {
  width: min(230px, 70%);
}

.section-head {
  max-width: 760px;
  margin-bottom: 38px;
}

.heritage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.info-card {
  min-height: 250px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.info-card h3,
.visit-list h3 {
  margin: 0 0 12px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 23px;
  line-height: 1.4;
}

.image-story {
  padding-top: 0;
}

.story-grid {
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1fr);
}

.visit-list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.visit-list section {
  padding: 24px;
  background: var(--white);
}

.visit-list p {
  margin-bottom: 0;
}

.instagram-section {
  background: var(--white);
  padding-top: 78px;
}

.instagram-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.88fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: stretch;
}

.instagram-card {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 310px;
  padding: 32px;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--white);
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(29, 37, 35, 0.24), rgba(22, 63, 51, 0.86)),
    url("../external/zenouji-approach.jpg") center / cover;
  box-shadow: var(--shadow);
}

.instagram-card::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px;
  pointer-events: none;
}

.instagram-label,
.instagram-copy {
  position: relative;
  z-index: 1;
}

.instagram-label {
  color: #f2cf76;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.instagram-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 10px 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.instagram-mark {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 14px;
}

.instagram-mark::before,
.instagram-mark::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.instagram-mark::before {
  inset: 13px;
  border: 3px solid rgba(255, 255, 255, 0.92);
}

.instagram-mark::after {
  right: 9px;
  top: 9px;
  width: 7px;
  height: 7px;
  background: rgba(255, 255, 255, 0.92);
}

.instagram-copy {
  font-weight: 700;
}

.instagram-card:hover,
.instagram-card:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

.instagram-button {
  margin-top: 12px;
  margin-left: 10px;
  color: var(--green);
  border-color: var(--green);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.home-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 350px);
  gap: 18px;
  justify-content: center;
}

.gallery-thumb {
  display: block;
  width: 350px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.gallery-thumb img {
  width: 350px;
  aspect-ratio: 7 / 5;
  object-fit: cover;
  transition: transform 0.24s ease;
}

.gallery-thumb:hover img,
.gallery-thumb:focus-visible img {
  transform: scale(1.04);
}

.gallery-more {
  margin: 28px 0 0;
  text-align: center;
}

.gallery img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.gallery figure:nth-child(1) img {
  object-position: center;
}

.gallery figure:nth-child(3) img,
.gallery figure:nth-child(4) img {
  object-position: center top;
}

.access-grid {
  align-items: stretch;
}

.access-single {
  max-width: 760px;
}

address {
  font-style: normal;
  font-size: 20px;
  line-height: 1.9;
}

address a {
  color: var(--green);
  font-weight: 700;
}

.note {
  max-width: 620px;
  font-size: 14px;
}

.map-panel {
  display: grid;
  align-content: center;
  min-height: 340px;
  padding: 36px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(22, 63, 51, 0.92), rgba(58, 96, 78, 0.82)),
    url("../external/zenouji-approach.jpg") center / cover;
  color: var(--white);
}

.map-panel span {
  color: #e7c46d;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.map-panel strong {
  display: block;
  margin: 14px 0;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.2;
}

.map-panel small {
  font-size: 16px;
}

.sources {
  padding-top: 64px;
  background: var(--white);
}

.sources h2 {
  font-size: 28px;
}

.sources ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.4em;
  color: var(--muted-ink);
}

.sources a {
  color: var(--green-2);
  font-weight: 700;
}

.gallery-page {
  background: var(--paper);
}

.gallery-hero {
  padding: 150px 0 72px;
  background:
    linear-gradient(135deg, rgba(22, 63, 51, 0.92), rgba(31, 64, 53, 0.74)),
    url("../gallery0619/gallery-05.jpeg") center / cover;
  color: var(--white);
}

.gallery-hero h1 {
  margin: 0 0 22px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(48px, 10vw, 112px);
  line-height: 1;
  letter-spacing: 0;
}

.gallery-hero p:not(.section-kicker) {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.full-gallery-section {
  padding-top: 62px;
}

.gallery-page-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.gallery-item {
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 250px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 226px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: none;
}

.site-footer {
  padding: 34px 0;
  background: var(--ink);
  color: var(--white);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: inherit;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (max-width: 1100px) {
  .nav-toggle {
    display: block !important;
    position: fixed;
    top: 12px;
    right: 14px;
    z-index: 70;
    background: rgba(255, 255, 255, 0.92);
    color: var(--green);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.18);
  }

  .site-nav {
    position: fixed;
    left: 20px;
    right: 20px;
    top: 66px;
    display: none;
    padding: 10px;
    background: var(--white);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .site-header.is-open .site-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro-grid,
  .split,
  .kono-grid,
  .story-grid,
  .visit-grid,
  .instagram-grid,
  .access-grid {
    grid-template-columns: 1fr;
  }

  .timeline,
  .heritage-grid,
  .gallery,
  .home-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-gallery-grid {
    justify-content: stretch;
  }

  .gallery-thumb,
  .gallery-thumb img {
    width: 100%;
  }

  .gallery-page-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline li {
    min-height: 210px;
  }
}

@media (max-width: 620px) {
  .container,
  .hero-content {
    width: min(100% - 28px, var(--container));
  }

  .site-header {
    padding: 12px 14px;
    gap: 10px;
  }

  .brand {
    flex: 1 1 auto;
    max-width: calc(100% - 54px);
  }

  .brand-main {
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(13px, 4.1vw, 16px);
  }

  .hero {
    min-height: 82svh;
  }

  .hero::after {
    background:
      linear-gradient(0deg, rgba(15, 23, 20, 0.76), rgba(15, 23, 20, 0.3) 58%, rgba(15, 23, 20, 0.18)),
      linear-gradient(90deg, rgba(15, 23, 20, 0.52), rgba(15, 23, 20, 0.1));
  }

  .hero-image,
  .hero-media {
    object-position: 54% center;
  }

  .hero-content {
    padding-bottom: 56px;
  }

  .hero-copy {
    font-size: 16px;
  }

  .hero-actions {
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .instagram-button {
    margin-left: 0;
  }

  .section,
  .section-band {
    padding: 66px 0;
  }

  .quick-facts,
  .timeline,
  .heritage-grid,
  .gallery,
  .home-gallery-grid {
    grid-template-columns: 1fr;
  }

  .quick-facts div,
  .timeline li {
    min-height: auto;
  }

  .kamon-panel {
    min-height: 260px;
  }

  .footer-inner {
    display: grid;
  }

  .gallery-hero {
    padding-top: 124px;
  }

  .gallery-page-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    height: auto;
    max-height: none;
  }
}

@media print {
  .skip-link {
    display: none !important;
  }
}
