/*
Theme Name: Souganji Renewal
Theme URI: https://souganji.com/
Author: Souganji
Description: 總願寺サイトリニューアル用オリジナルテーマ
Version: 1.0.0
Text Domain: souganji-renewal
*/

:root {
  --color-base: #fffaf1;
  --color-paper: #ffffff;
  --color-ink: #2f261f;
  --color-sub: #6b5a48;
  --color-muted: #8c7a66;
  --color-main: #7b241c;
  --color-main-dark: #521711;
  --color-accent: #b98a3b;
  --color-accent-light: #e7d2a7;
  --color-border: #e8dcc8;
  --color-nav: #3b2b22;
  --color-footer: #2a211c;
  --shadow-soft: 0 14px 34px rgba(54, 35, 20, 0.12);
  --shadow-card: 0 8px 24px rgba(54, 35, 20, 0.1);
  --font-serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --font-gothic: "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Meiryo", sans-serif;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(185, 138, 59, 0.12), transparent 28%),
    linear-gradient(180deg, #fffaf1 0%, #f8efe0 100%);
  color: var(--color-ink);
  font-family: var(--font-gothic);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.03em;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

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

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

p {
  margin: 0 0 1.4em;
}

ul,
ol {
  margin-top: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid var(--color-border);
  padding: 12px 14px;
  vertical-align: top;
}

th {
  background: #fbf3e7;
  font-weight: 700;
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
}

.site-wrap {
  min-height: 100vh;
  overflow-x: hidden;
}

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

.site-header {
  position: relative;
  z-index: 20;
  background: rgba(255, 250, 241, 0.96);
  border-bottom: 1px solid rgba(232, 220, 200, 0.9);
  box-shadow: 0 6px 20px rgba(54, 35, 20, 0.05);
}

.header-top {
  background: var(--color-nav);
  color: #fff;
  font-size: 13px;
}

.header-top__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 38px;
}

.header-top__text {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
}

.header-top__links {
  display: flex;
  gap: 16px;
  align-items: center;
  white-space: nowrap;
}

.header-top__links a {
  color: #fff;
}

.header-top__links a:hover {
  color: var(--color-accent-light);
}

.header-main {
  padding: 18px 0;
}

.header-main__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.custom-logo-link {
  display: block;
  flex: 0 0 auto;
}

.custom-logo {
  width: auto;
  max-height: 74px;
}

.site-title-group {
  min-width: 0;
}

.site-kicker {
  margin: 0 0 2px;
  color: var(--color-accent);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.18em;
}

.site-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.16em;
}

.site-title a {
  color: var(--color-ink);
}

.site-description {
  margin: 6px 0 0;
  color: var(--color-sub);
  font-size: 13px;
  line-height: 1.6;
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.header-tel {
  text-align: right;
}

.header-tel__label {
  display: block;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.4;
}

.header-tel__number {
  display: block;
  color: var(--color-main-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
}

.header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid var(--color-main);
  border-radius: 999px;
  background: var(--color-main);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-button:hover {
  background: #fff;
  color: var(--color-main);
  transform: translateY(-1px);
}

.global-nav {
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(232, 220, 200, 0.85);
}

.global-nav__inner {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

.global-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.global-nav li {
  position: relative;
}

.global-nav a {
  display: block;
  padding: 15px 18px;
  color: var(--color-nav);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.global-nav a:hover {
  background: #fbf3e7;
  color: var(--color-main);
}

.global-nav .current-menu-item > a,
.global-nav .current_page_item > a {
  color: var(--color-main);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--color-main-dark);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.is-menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.is-menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.is-menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: clamp(440px, 58vw, 680px);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(47, 38, 31, 0.78), rgba(47, 38, 31, 0.38)),
    radial-gradient(circle at 80% 20%, rgba(185, 138, 59, 0.45), transparent 30%),
    linear-gradient(135deg, #3b2b22, #7b241c);
}

.hero.has-header-image {
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 150px;
  background: linear-gradient(180deg, transparent, rgba(255, 250, 241, 0.95));
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--container));
  padding: 70px 0 100px;
}

.hero__content {
  max-width: 720px;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: #f5e3bd;
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: 0.24em;
}

.hero__kicker::before,
.hero__kicker::after {
  content: "";
  width: 34px;
  height: 1px;
  background: rgba(245, 227, 189, 0.8);
}

.hero__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.22;
  letter-spacing: 0.12em;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.26);
}

.hero__lead {
  max-width: 620px;
  margin: 24px 0 0;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 2;
  color: rgba(255, 255, 255, 0.95);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  line-height: 1.3;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 12px 26px rgba(54, 35, 20, 0.2);
}

.btn-primary:hover {
  background: #fff;
  color: var(--color-main);
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-outline:hover {
  background: #fff;
  color: var(--color-main);
}

.section {
  padding: 84px 0;
}

.section--compact {
  padding: 56px 0;
}

.section--white {
  background: rgba(255, 255, 255, 0.74);
}

.section--pattern {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 250, 241, 0.78)),
    repeating-linear-gradient(
      90deg,
      rgba(185, 138, 59, 0.06) 0,
      rgba(185, 138, 59, 0.06) 1px,
      transparent 1px,
      transparent 34px
    );
}

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-head__en {
  display: block;
  color: var(--color-accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-head__ja {
  position: relative;
  margin: 6px 0 0;
  padding-bottom: 18px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.35;
  letter-spacing: 0.12em;
}

.section-head__ja::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 54px;
  height: 2px;
  background: var(--color-main);
  transform: translateX(-50%);
}

.section-lead {
  max-width: 720px;
  margin: -20px auto 38px;
  color: var(--color-sub);
  text-align: center;
  line-height: 2;
}

.news-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  align-items: start;
}

.news-list {
  display: grid;
  gap: 14px;
}

.news-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-paper);
  box-shadow: 0 8px 20px rgba(54, 35, 20, 0.05);
}

.news-item__date {
  color: var(--color-main);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
}

.news-item__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

.news-item__title a {
  color: var(--color-ink);
}

.news-item__title a:hover {
  color: var(--color-main);
}

.side-card {
  padding: 28px;
  border-radius: 22px;
  background: var(--color-main);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.side-card__title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: 0.12em;
}

.side-card p {
  color: rgba(255, 255, 255, 0.9);
}

.side-card a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.info-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  padding: 30px;
  border-radius: 24px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.96), rgba(251, 243, 231, 0.96));
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.info-card::before {
  content: "";
  position: absolute;
  right: -45px;
  top: -45px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: rgba(185, 138, 59, 0.13);
}

.info-card__label {
  position: relative;
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fbf3e7;
  color: var(--color-main);
  font-size: 12px;
  font-weight: 700;
}

.info-card__title {
  position: relative;
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.45;
  letter-spacing: 0.08em;
}

.info-card__text {
  position: relative;
  margin: 0;
  color: var(--color-sub);
}

.info-card__link {
  position: relative;
  display: inline-flex;
  margin-top: 22px;
  font-weight: 700;
}

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

.event-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.event-card__month {
  color: var(--color-accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

.event-card__title {
  margin: 14px 0 10px;
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.45;
}

.event-card__text {
  margin: 0;
  color: var(--color-sub);
  font-size: 14px;
  line-height: 1.8;
}

.access-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  align-items: stretch;
}

.access-map {
  min-height: 360px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #eee3d3;
  box-shadow: var(--shadow-card);
}

.access-map iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

.access-info {
  padding: 34px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.access-info__title {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 28px;
  letter-spacing: 0.1em;
}

.access-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.access-list li {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--color-border);
}

.access-list li:last-child {
  border-bottom: 0;
}

.access-list strong {
  color: var(--color-main);
}

.breadcrumb-space {
  height: 18px;
}

.page-hero {
  padding: 56px 0;
  background:
    linear-gradient(90deg, rgba(82, 23, 17, 0.92), rgba(123, 36, 28, 0.76)),
    radial-gradient(circle at 82% 10%, rgba(185, 138, 59, 0.25), transparent 28%);
  color: #fff;
}

.page-hero__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.4;
  letter-spacing: 0.1em;
}

.page-hero__lead {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.88);
}

.content-area {
  padding: 40px 0 90px;
}

.main-column {
  max-width: 1200px;
  margin: 0 auto;
}

.article-box {
  padding: clamp(24px, 5vw, 52px);
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.entry-meta {
  margin-bottom: 18px;
  color: var(--color-muted);
  font-size: 14px;
}

.entry-content {
  line-height: 2;
}

.entry-content h2 {
  margin: 1.1em 0 0.85em;
  padding: 0 0 0.45em;
  border-bottom: 2px solid var(--color-border);
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.entry-content h3 {
  margin: 1.8em 0 0.7em;
  padding-left: 14px;
  border-left: 4px solid var(--color-main);
  font-size: 22px;
  line-height: 1.5;
}

.entry-content h4 {
  margin: 1.6em 0 0.6em;
  color: var(--color-main);
  font-size: 19px;
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.entry-content img {
  border-radius: 16px;
}

.entry-content blockquote {
  margin: 2em 0;
  padding: 24px 28px;
  border-left: 5px solid var(--color-accent);
  background: #fbf3e7;
  color: var(--color-sub);
}

.post-list {
  display: grid;
  gap: 22px;
}

.post-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.post-card__thumb {
  min-height: 160px;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(185, 138, 59, 0.25), rgba(123, 36, 28, 0.22)),
    #eee3d3;
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__date {
  color: var(--color-muted);
  font-size: 14px;
}

.post-card__title {
  margin: 4px 0 10px;
  font-family: var(--font-serif);
  font-size: 24px;
  line-height: 1.45;
}

.post-card__title a {
  color: var(--color-ink);
}

.post-card__title a:hover {
  color: var(--color-main);
}

.post-card__excerpt {
  margin: 0;
  color: var(--color-sub);
}

.post-card__more {
  display: inline-flex;
  margin-top: 14px;
  font-weight: 700;
}

.pagination {
  margin-top: 40px;
  text-align: center;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  margin: 3px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-ink);
  font-weight: 700;
}

.pagination .current {
  background: var(--color-main);
  color: #fff;
  border-color: var(--color-main);
}

.site-footer {
  background: var(--color-footer);
  color: rgba(255, 255, 255, 0.88);
}

.footer-main {
  padding: 54px 0 38px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
}

.footer-title {
  margin: 0 0 12px;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: 0.12em;
}

.footer-heading {
  margin: 0 0 14px;
  color: #f1d49a;
  font-size: 16px;
}

.footer-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.footer-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-menu li {
  margin-bottom: 8px;
}

.footer-menu a {
  color: rgba(255, 255, 255, 0.82);
}

.footer-menu a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.footer-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  margin-top: 8px;
  color: var(--color-muted);
  font-size: 13px;
  text-align: center;
}

.aligncenter {
  display: block;
  margin-right: auto;
  margin-left: auto;
}

.alignleft {
  float: left;
  margin: 0 24px 18px 0;
}

.alignright {
  float: right;
  margin: 0 0 18px 24px;
}

.clearfix::after {
  content: "";
  display: block;
  clear: both;
}

@media screen and (max-width: 980px) {
  .header-contact {
    display: none;
  }

  .menu-toggle {
    display: block;
    flex: 0 0 auto;
  }

  .global-nav {
    display: none;
  }

  body.is-menu-open .global-nav {
    display: block;
  }

  .global-nav ul {
    display: block;
  }

  .global-nav a {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
  }

  .news-layout,
  .access-box {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .event-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 720px) {
  body {
    font-size: 15px;
  }

  .container {
    width: min(100% - 24px, var(--container));
  }

  .header-top__inner {
    justify-content: center;
  }

  .header-top__text {
    display: none;
  }

  .header-top__links {
    gap: 12px;
    font-size: 12px;
  }

  .header-main {
    padding: 12px 0;
  }

  .site-branding {
    gap: 10px;
  }

  .custom-logo {
    max-height: 54px;
  }

  .site-kicker {
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .site-title {
    font-size: 25px;
    letter-spacing: 0.1em;
  }

  .site-description {
    display: none;
  }

  .hero {
    min-height: 470px;
  }

  .hero__inner {
    padding: 54px 0 86px;
  }

  .hero__kicker {
    font-size: 14px;
    letter-spacing: 0.15em;
  }

  .hero__kicker::before,
  .hero__kicker::after {
    width: 24px;
  }

  .hero__title {
    font-size: 39px;
  }

  .hero__lead {
    font-size: 15px;
  }

  .hero__actions {
    display: grid;
  }

  .section {
    padding: 58px 0;
  }

  .section-head {
    margin-bottom: 30px;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .card-grid,
  .event-grid {
    grid-template-columns: 1fr;
  }

  .access-info {
    padding: 24px;
  }

  .access-list li {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .post-card__thumb {
    min-height: 190px;
  }

  .article-box {
    border-radius: 18px;
  }

  .entry-content h2 {
    font-size: 24px;
  }

  .entry-content h3 {
    font-size: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   Contact Page / Confirm Page
======================================== */

.contact-page {
  padding: 0;
	width:100%;
	margin-bottom:50px;
}

.contact-wrap {
  max-width: 860px;
  margin: 0 auto;
	padding-top:50px;
}

.contact-page .page-header {
  margin-bottom: 24px;
}

.contact-page .page-title {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.contact-page .page-content {
  margin-bottom: 24px;
  color: #4b5563;
}

/* ----------------------------------------
   Error Box
---------------------------------------- */

.contact-form__error-box {
  margin-bottom: 24px;
  padding: 16px 18px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 14px;
  color: #991b1b;
  box-shadow: 0 8px 20px rgba(127, 29, 29, 0.04);
}

.contact-form__error-box p {
  margin: 0;
  font-weight: 600;
}

/* ----------------------------------------
   Form
---------------------------------------- */

.contact-form {
  padding: 32px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.contact-form__row {
  margin-bottom: 24px;
}

.contact-form__row:last-child {
  margin-bottom: 0;
}

.contact-form label {
  display: inline-block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #111827;
}

.contact-form .required {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  background: #dc2626;
  border-radius: 999px;
  vertical-align: middle;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  line-height: 1.6;
  color: #111827;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.contact-form textarea {
  min-height: 180px;
  resize: vertical;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.contact-form__error {
  margin: 8px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #dc2626;
}

/* ----------------------------------------
   Checkbox
---------------------------------------- */

.contact-form__row--checkbox {
  margin-top: 6px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500;
  line-height: 1.7;
  color: #374151;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 0.3em;
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  flex: 0 0 auto;
}

/* ----------------------------------------
   Actions / Buttons
---------------------------------------- */

.contact-form__actions,
.contact-confirm__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.contact-btn {
  display: inline-block;
  min-width: 180px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
  transition: transform 0.15s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.contact-btn:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.contact-btn--back {
  color: #1f2937;
  background: #ffffff;
  border: 1px solid #d1d5db;
  box-shadow: none;
}

.contact-btn--back:hover {
  background: #f9fafb;
  color: #111827;
}

/* ----------------------------------------
   Confirm
---------------------------------------- */

.contact-confirm {
  padding: 32px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.contact-confirm__lead {
  margin: 0 0 24px;
  font-size: 1.02rem;
  color: #374151;
}

.contact-confirm__table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
}

.contact-confirm__table th,
.contact-confirm__table td {
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
  line-height: 1.75;
}

.contact-confirm__table tr:last-child th,
.contact-confirm__table tr:last-child td {
  border-bottom: none;
}

.contact-confirm__table th {
  width: 28%;
  min-width: 140px;
  background: #f8fafc;
  font-weight: 700;
  color: #111827;
}

.contact-confirm__table td {
  color: #374151;
  background: #ffffff;
  word-break: break-word;
}

.contact-confirm__form {
  margin: 0;
}

/* ----------------------------------------
   Utility
---------------------------------------- */

.contact-page p:empty,
.contact-confirm p:empty {
  display: none;
}

/* ----------------------------------------
   Responsive
---------------------------------------- */

@media (max-width: 768px) {
  .contact-form,
  .contact-confirm {
    padding: 24px;
    border-radius: 18px;
  }

  .contact-form__actions,
  .contact-confirm__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-btn {
    width: 100%;
    min-width: 0;
  }

  .contact-confirm__table,
  .contact-confirm__table tbody,
  .contact-confirm__table tr,
  .contact-confirm__table th,
  .contact-confirm__table td {
    display: block;
    width: 100%;
  }

  .contact-confirm__table {
    border: none;
    background: transparent;
  }

  .contact-confirm__table tr {
    margin-bottom: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.03);
  }

  .contact-confirm__table th,
  .contact-confirm__table td {
    border: none;
    padding: 14px 16px;
  }

  .contact-confirm__table th {
    min-width: 0;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
  }
}

@media (max-width: 640px) {
  .contact-wrap {
    max-width: 100%;
  }

  .contact-form,
  .contact-confirm {
    padding: 20px;
  }

  .contact-page .page-title {
    font-size: 2rem;
  }

  .contact-form input[type="text"],
  .contact-form input[type="email"],
  .contact-form textarea {
    padding: 12px 14px;
  }
}

/* =========================================================
   Souganji top page design based on reference image
========================================================= */

:root {
  --sg-bg: #fbfaf6;
  --sg-paper: #ffffff;
  --sg-ink: #34302a;
  --sg-text: #5f5a50;
  --sg-muted: #8f8677;
  --sg-line: #ded6c8;
  --sg-gold: #b99b62;
  --sg-gold-soft: #e8ddc6;
  --sg-green: #536a3a;
  --sg-brown: #6b5b45;
  --sg-black: #2a2926;
  --sg-shadow: 0 12px 32px rgba(80, 67, 42, 0.08);
  --sg-serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --sg-sans: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  --sg-container: 1180px;
}

body {
  background: var(--sg-bg);
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  letter-spacing: 0.04em;
}

.sg-site {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--sg-bg);
}

.sg-container {
  width: min(calc(100% - 48px), var(--sg-container));
  margin: 0 auto;
}

.sg-main {
  background: var(--sg-bg);
}

/* image placeholder */

.sg-image-space {
  position: relative;
  overflow: hidden;
}

.sg-image-space > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 画像の上にグラデーションを重ねる */
.sg-image-space::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(80, 66, 42, 0.10) 45%,
    rgba(34, 28, 20, 0.22) 100%
  );
  pointer-events: none;
}

/* 念のため、spanの中に画像を入れてしまった場合にも対応 */
.sg-image-space > span > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ただし、画像を使う時は本来 span は不要 */
.sg-image-space > img + span {
  display: none;
}

.sg-image-space span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  font-family: var(--sg-sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-align: center;
}

/* header */

.sg-header {
  position: fixed;
	top:0;
	left:0;
	width:100%;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(222, 214, 200, 0.9);
}

.sg-header__inner {
  width: min(calc(100% - 54px), 1280px);
  min-height: 96px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}

.sg-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--sg-ink);
  text-decoration: none;
}

.sg-brand__logo {
  display: inline-flex;
  max-width: 68px;
}

.sg-brand__logo img {
  max-height: 62px;
  width: auto;
}

.sg-brand__mark {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--sg-gold);
  color: var(--sg-gold);
  font-size: 12px;
}

.sg-brand__text {
  display: block;
  line-height: 1.3;
}

.sg-brand__kicker {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--sg-ink);
  letter-spacing: 0.14em;
}

.sg-brand__name {
  display: block;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.sg-global-nav {
  justify-self: center;
}

.sg-nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-nav-list li {
  position: relative;
}

.sg-nav-list a {
  display: block;
  color: var(--sg-ink);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s ease;
}

.sg-nav-list a:hover,
.sg-nav-list .current-menu-item > a,
.sg-nav-list .current_page_item > a {
  color: var(--sg-gold);
}

.sg-header-tel {
  text-align: right;
  white-space: nowrap;
}

.sg-header-tel__number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sg-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.2;
  text-decoration: none;
}

.sg-header-tel__icon {
  font-size: 17px;
}

.sg-header-tel__time {
  display: block;
  margin-top: 3px;
  color: var(--sg-muted);
  font-size: 12px;
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--sg-line);
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}

.menu-toggle span:not(.screen-reader-text) {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--sg-ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

body.is-menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}


body.is-menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

body.is-menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
}

.site-main {
	margin-top:80px;
}

/* hero */

.sg-hero {
  position: relative;
  height: min(52vw, 620px);
  min-height: 480px;
  overflow: hidden;
  background: #f7f3eb;
}

.sg-hero__image {
  position: absolute;
  inset: 0;
}

.sg-hero__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.76) 30%, rgba(255, 255, 255, 0.16) 52%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(circle at 24% 42%, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.72) 28%, rgba(255, 255, 255, 0) 48%);
  pointer-events: none;
}

.sg-hero__mist {
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 45%, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.42) 35%, rgba(255, 255, 255, 0) 66%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.sg-hero__content {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 54px), 1280px);
  height: 100%;
  margin: 50px auto;
}

.sg-hero__message {
  position: absolute;
  left: 88px;
  top: 82px;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  gap: 34px;
  color: #4d4a44;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.8;
  letter-spacing: 0.18em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  font-family: var(--font-serif);
font-style: normal;
font-weight: 600;
}

.sg-hero__message span {
  display: block;
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: nowrap;
}

.sg-hero__temple {
  position: absolute;
  left: 84px;
  bottom: 64px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--sg-ink);
}

.sg-hero__seal {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.sg-hero__small {
  margin: 0 0 2px;
  color: var(--sg-muted);
  font-size: 13px;
  line-height: 1.4;
}

.sg-hero__name {
  margin: 0;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

/* common section */

.sg-section {
  padding: 28px 0;
}

.sg-center-heading {
  margin-bottom: 36px;
  text-align: center;
}

.sg-center-heading h2 {
  margin: 0;
  color: var(--sg-ink);
  font-size: 31px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.16em;
}

.sg-center-heading p {
  margin: 8px 0 0;
  color: var(--sg-muted);
  font-size: 14px;
  line-height: 1.8;
}

.sg-heading-mark {
  display: block;
  color: var(--sg-gold);
  font-size: 20px;
  line-height: 1;
  margin-bottom: 8px;
}

.sg-center-heading--line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.sg-center-heading--line::before,
.sg-center-heading--line::after {
  content: "";
  width: min(28vw, 310px);
  height: 1px;
  background: var(--sg-line);
}

.sg-outline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-width: 146px;
  min-height: 48px;
  padding: 10px 22px;
  border: 1px solid #cdbb97;
  background: rgba(255, 255, 255, 0.66);
  color: var(--sg-brown);
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sg-outline-btn:hover {
  background: var(--sg-brown);
  border-color: var(--sg-brown);
  color: #fff;
}

.sg-outline-btn--wide {
  min-width: 260px;
}

.sg-outline-btn--large {
  min-width: 288px;
}

/* news */

.sg-news-section {
  padding-top: 52px;
  padding-bottom: 46px;
  background: #fff;
}

.sg-news-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 54px;
  align-items: center;
}

.sg-section-side {
  text-align: center;
}

.sg-side-title {
  margin: 0 0 24px;
  color: var(--sg-ink);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.sg-side-flower {
  width: 78px;
  height: 78px;
  margin: 0 auto 20px;
  opacity: 0.18;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 30%, var(--sg-gold-soft) 31%, var(--sg-gold-soft) 34%, transparent 35%),
    repeating-conic-gradient(from 0deg, var(--sg-gold-soft) 0deg 18deg, transparent 18deg 36deg);
}

.sg-news-list {
  border-top: 1px solid var(--sg-line);
}

.sg-news-row {
  display: grid;
  grid-template-columns: 118px 86px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 58px;
  border-bottom: 1px solid var(--sg-line);
}

.sg-news-row__date {
  color: #746d61;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 600;
}

.sg-news-row__cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 10px;
  background: var(--sg-gold);
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
}

.sg-news-row:nth-child(even) .sg-news-row__cat {
  background: var(--sg-green);
}

.sg-news-row__title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.7;
}

.sg-news-row__title a {
  color: var(--sg-ink);
  text-decoration: none;
}

.sg-news-row__title a:hover {
  color: var(--sg-gold);
}

/* events */

.sg-events-section {
  background: #fff;
  border-top: 1px solid rgba(222, 214, 200, 0.72);
}

.sg-event-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.sg-event-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 8px 22px rgba(83, 71, 50, 0.05);
}

.sg-event-card__image {
  height: 128px;
}

.sg-event-card__body {
  position: relative;
  min-height: 155px;
  padding: 32px 22px 46px;
}

.sg-season-badge {
  position: absolute;
  left: 18px;
  top: -31px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sg-line);
  border-radius: 50%;
  background: #fff;
  color: var(--sg-ink);
  font-size: 22px;
  line-height: 1;
}

.sg-event-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
}

.sg-event-card__date {
  margin: 0 0 12px;
  color: var(--sg-brown);
  font-size: 14px;
}

.sg-event-card p {
  color: var(--sg-text);
  font-size: 14px;
  line-height: 1.8;
}

.sg-event-card a {
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: var(--sg-brown);
  font-size: 18px;
  text-decoration: none;
}

.sg-center-button {
  margin-top: 32px;
  text-align: center;
}

/* about */

.sg-about-section {
  position: relative;
  padding: 70px 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 4% 88%, rgba(185, 155, 98, 0.11), transparent 22%),
    radial-gradient(circle at 96% 82%, rgba(185, 155, 98, 0.12), transparent 22%),
    linear-gradient(90deg, #f3eee4, #fbfaf6);
}

.sg-about-layout {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 72px;
  align-items: center;
}

.sg-about-text h2 {
  margin: 0;
  color: var(--sg-ink);
  font-size: 31px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.14em;
}

.sg-title-line {
  display: block;
  width: 42px;
  height: 2px;
  margin: 20px 0 28px;
  background: var(--sg-gold);
}

.sg-about-text p {
  color: var(--sg-text);
  font-size: 15px;
  line-height: 2.05;
}

.sg-about-text .sg-outline-btn {
  margin-top: 16px;
}

.sg-about-image {
  height: 305px;
}

/* access */

.sg-access-section {
  background: #fff;
}

.sg-access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 42px;
  align-items: start;
}

.sg-access-info dl {
  margin: 0 0 26px;
}

.sg-access-info dl div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(222, 214, 200, 0.78);
}

.sg-access-info dt {
  color: var(--sg-ink);
  font-size: 14px;
  font-weight: 600;
}

.sg-access-info dd {
  margin: 0;
  color: var(--sg-text);
  font-size: 14px;
  line-height: 1.8;
}

.sg-access-info a,
.sg-access-map a {
  color: var(--sg-brown);
}

.sg-access-photo {
  height: 210px;
}

.sg-access-map .sg-image-space {
  height: 150px;
  margin-bottom: 24px;
}

.sg-access-map {
  text-align: center;
}

/* footer */

.sg-footer {
  background: #fff;
  border-top: 1px solid var(--sg-line);
}

.sg-footer__main {
  padding: 36px 0;
  background: #f7f5ef;
}

.sg-footer__inner {
  width: min(calc(100% - 54px), 1280px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 48px;
  align-items: center;
}

.sg-footer-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--sg-ink);
  text-decoration: none;
}

.sg-footer-brand__mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.sg-footer-brand__kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--sg-muted);
  font-size: 13px;
}

.sg-footer-brand__name {
  display: block;
  color: var(--sg-ink);
  font-size: 23px;
  letter-spacing: 0.08em;
}

.sg-footer-brand p {
  margin: 12px 0 0;
  color: var(--sg-text);
  font-size: 13px;
  line-height: 1.8;
}

.sg-footer-brand p a {
  color: var(--sg-text);
}

.sg-footer-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 9px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-footer-menu a {
  color: var(--sg-text);
  font-size: 14px;
  text-decoration: none;
}

.sg-footer-menu a:hover {
  color: var(--sg-gold);
}

.sg-footer-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-width: 250px;
  min-height: 54px;
  padding: 10px 24px;
  border: 1px solid var(--sg-brown);
  color: var(--sg-brown);
  background: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.sg-footer-cta a:hover {
  color: #fff;
  background: var(--sg-brown);
}

.sg-footer__bottom {
  padding: 14px 0;
  background: #272727;
  text-align: center;
}

.sg-footer__bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* responsive */

@media screen and (max-width: 1100px) {
  .sg-header__inner {
    grid-template-columns: auto auto;
  }

  .sg-header-tel {
    display: none;
  }

  .menu-toggle {
    display: block;
    justify-self: end;
  }

  .sg-global-nav {
    grid-column: 1 / -1;
    display: none;
    width: 100%;
    padding: 0 0 18px;
  }

  body.is-menu-open .sg-global-nav {
    display: block;
  }

  .sg-nav-list {
    display: block;
    border-top: 1px solid var(--sg-line);
  }

  .sg-nav-list a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--sg-line);
  }

  .sg-event-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sg-access-grid {
    grid-template-columns: 1fr;
  }

  .sg-access-photo {
    height: 260px;
  }

  .sg-access-map .sg-image-space {
    height: 220px;
  }

  .sg-footer__inner {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 820px) {
  .sg-container {
    width: min(calc(100% - 28px), var(--sg-container));
  }

  .sg-header__inner {
    width: min(calc(100% - 28px), 1280px);
    min-height: 78px;
    gap: 14px;
  }

  .sg-brand__kicker {
    font-size: 11px;
  }

  .sg-brand__name {
    font-size: 20px;
  }

  .sg-brand__mark {
    width: 40px;
    height: 40px;
  }

  .sg-hero {
    height: 520px;
    min-height: 520px;
  }

  .sg-hero__content {
    width: min(calc(100% - 28px), 1280px);
  }

  .sg-hero__message {
    left: 28px;
    top: 58px;
    font-size: 25px;
    gap: 18px;
  }

  .sg-hero__temple {
    left: 26px;
    bottom: 46px;
  }

  .sg-hero__name {
    font-size: 19px;
  }

  .sg-news-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .sg-section-side {
    text-align: center;
  }

  .sg-news-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 0;
  }

  .sg-news-row__cat {
    width: fit-content;
  }

  .sg-event-grid {
    grid-template-columns: 1fr;
  }

  .sg-event-card__image {
    height: 170px;
  }

  .sg-about-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .sg-about-image {
    height: 230px;
  }

  .sg-center-heading--line {
    gap: 14px;
  }

  .sg-center-heading--line::before,
  .sg-center-heading--line::after {
    width: 16vw;
  }

  .sg-access-info dl div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .sg-outline-btn--large,
  .sg-outline-btn--wide {
    width: 100%;
    min-width: 0;
  }

  .sg-footer__inner {
    width: min(calc(100% - 28px), 1280px);
  }

  .sg-footer-menu {
    grid-template-columns: 1fr;
  }

  .sg-footer-cta a {
    width: 100%;
    min-width: 0;
  }
}

/* =========================================================
   Annual events page - wide list
========================================================= */

.sg-annual-section {
  background: #fff;
}

.sg-event-list {
  display: grid;
  gap: 24px;
}

.sg-event-wide-card {
  display: grid;
  grid-template-columns: 96px 300px 1fr;
  min-height: 190px;
  border: 1px solid var(--sg-line);
  background: #fff;
  box-shadow: 0 10px 26px rgba(83, 71, 50, 0.06);
}

.sg-event-wide-card__month {
  display: grid;
  place-items: center;
  background: #f7f3ea;
  border-right: 1px solid var(--sg-line);
  color: var(--sg-ink);
  font-size: 26px;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.sg-event-wide-card__image {
  height: 100%;
  min-height: 190px;
  background: #f3efe7;
}

.sg-event-wide-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sg-event-wide-card__body {
  padding: 30px 34px;
}

.sg-event-wide-card__body h3 {
  margin: 0 0 12px;
  color: var(--sg-ink);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

.sg-event-wide-card__body p {
  margin: 0 0 14px;
  color: var(--sg-text);
  font-size: 15px;
  line-height: 1.9;
}

.sg-event-wide-card__body ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.sg-event-wide-card__body li {
  position: relative;
  padding-left: 1.2em;
  color: var(--sg-text);
  font-size: 15px;
  line-height: 1.9;
}

.sg-event-wide-card__body li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--sg-gold);
}

@media screen and (max-width: 900px) {
  .sg-event-wide-card {
    grid-template-columns: 76px 220px 1fr;
  }

  .sg-event-wide-card__body {
    padding: 24px;
  }

  .sg-event-wide-card__body h3 {
    font-size: 21px;
  }
}

@media screen and (max-width: 720px) {
  .sg-event-wide-card {
    grid-template-columns: 1fr;
  }

  .sg-event-wide-card__month {
    min-height: 56px;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    border-right: 0;
    border-bottom: 1px solid var(--sg-line);
  }

  .sg-event-wide-card__image {
    height: 190px;
  }

  .sg-event-wide-card__body {
    padding: 22px;
  }
}

.sg-event-card.is-hidden-by-month {
  display: none;
}

ul.gallery{
	max-width:900px;
	margin:auto;
	display:flex;
	flex-wrap:wrap;
	justify-content:space-between;

    width: 100%;
}

.four li:before, .five li:before, .two li:before {
        content: "";
        display: block;
        padding-top: 100%;
    }

.gallery img { width:100%;}

.four li, .two li {
	width:24%;
	position: relative;
    overflow: hidden;
}

.five li {
	width:19%;
	position: relative;
    overflow: hidden;
	margin:15px auto;
}

.four li a, .five li a, .two li a {
position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
}

.four li a img, .five li a img, .two li a img{
	width:100%;
	height:100%;
	object-fit: cover;
	object-position:50% 0;
	-webkit-transition: 0.3s ease-in-out;
	-moz-transition: 0.3s ease-in-out;
	-o-transition: 0.3s ease-in-out;
	transition: 0.5s;
}

/* =========================================================
   Header dropdown menu
========================================================= */

.sg-global-nav {
  position: relative;
  z-index: 50;
}

.sg-nav-list {
  position: relative;
  z-index: 50;
}

.sg-nav-list,
.sg-nav-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-nav-list > li {
  position: relative;
}

.sg-nav-list > li > a {
  position: relative;
  display: block;
}

/* 子メニューを持つ親メニューに印を付ける */
.sg-nav-list > li.menu-item-has-children > a {
  padding-right: 18px;
}

.sg-nav-list > li.menu-item-has-children > a::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
}

/* サブメニュー本体 */
.sg-nav-list .sub-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 18px);
  z-index: 100;
  min-width: 220px;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--sg-line);
  box-shadow: 0 16px 34px rgba(60, 48, 32, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease,
    transform 0.18s ease;
}

/* サブメニュー上の小さな三角 */
.sg-nav-list .sub-menu::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 12px;
  height: 12px;
  background: rgba(255, 255, 255, 0.97);
  border-left: 1px solid var(--sg-line);
  border-top: 1px solid var(--sg-line);
  transform: translateX(-50%) rotate(45deg);
}

/* hover / キーボードフォーカス時に表示 */
.sg-nav-list > li:hover > .sub-menu,
.sg-nav-list > li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.sg-nav-list .sub-menu li {
  position: relative;
}

.sg-nav-list .sub-menu a {
  display: block;
  padding: 11px 18px;
  color: var(--sg-ink);
  font-size: 14px;
  line-height: 1.6;
  white-space: nowrap;
  text-decoration: none;
  background: transparent;
}

.sg-nav-list .sub-menu a:hover,
.sg-nav-list .sub-menu .current-menu-item > a,
.sg-nav-list .sub-menu .current_page_item > a {
  color: var(--sg-gold);
  background: #f8f4ec;
}

/* ヘッダー周辺でサブメニューが隠れないようにする */
.sg-header,
.sg-header__inner,
.sg-global-nav {
  overflow: visible;
}

/* =========================================================
   Mobile submenu
========================================================= */

@media screen and (max-width: 1100px) {
  .sg-nav-list > li.menu-item-has-children > a {
    padding-right: 42px;
  }

  .sg-nav-list > li.menu-item-has-children > a::after {
    right: 16px;
  }

  .sg-nav-list .sub-menu {
    position: static !important;
    left: auto !important;
    top: auto !important;
    min-width: 0;
    width: 100%;
    margin: 0 0 0 16px;
    padding: 0;
    border: 0;
    border-left: 1px solid var(--sg-line);
    box-shadow: none;
    background: transparent;

    display: block;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transform: none !important;

transition:
  max-height 0.75s ease,
  opacity 0.55s ease,
  visibility 0.55s ease;
  }

  .sg-nav-list .sub-menu::before {
    display: none;
  }

  .sg-nav-list > li:hover > .sub-menu,
  .sg-nav-list > li:focus-within > .sub-menu {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
  }

  .sg-nav-list li.is-submenu-open > .sub-menu,
  .sg-nav-list li.is-submenu-open:hover > .sub-menu,
  .sg-nav-list li.is-submenu-open:focus-within > .sub-menu {
    max-height: 520px;
    opacity: 1;
    visibility: visible;
  }

  .sg-nav-list .sub-menu a {
    display: block;
    padding: 12px 12px 12px 18px;
    white-space: normal;
    font-size: 14px;
    background: transparent;
  }

  .sg-nav-list .sub-menu a:hover {
    background: transparent;
  }
}

/* =========================================================
   Final override: mobile global menu + submenu animation
========================================================= */

@media screen and (max-width: 1100px) {

  /*
   * スマホメニュー本体
   * 既存の display:none / display:block を無効化して、
   * max-height でゆっくり開閉させる
   */
  .global-nav.sg-global-nav,
  .sg-global-nav {
    grid-column: 1 / -1;
    display: block !important;
    width: 100%;
    padding: 0;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition:
      max-height 0.55s ease,
      opacity 0.35s ease,
      visibility 0.35s ease,
      padding 0.35s ease;
  }

  body.is-menu-open .global-nav.sg-global-nav,
  body.is-menu-open .sg-global-nav {
    max-height: calc(100vh - 78px);
    opacity: 1;
    visibility: visible;
    padding: 0 0 18px;
    overflow-y: auto;
  }

  .global-nav.sg-global-nav .sg-nav-list,
  .sg-global-nav .sg-nav-list {
    display: block;
    border-top: 1px solid var(--sg-line);
  }

  .global-nav.sg-global-nav .sg-nav-list a,
  .sg-global-nav .sg-nav-list a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--sg-line);
  }

  /*
   * スマホ用サブメニュー
   */
  .global-nav.sg-global-nav .sg-nav-list .sub-menu,
  .sg-global-nav .sg-nav-list .sub-menu {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100%;
    min-width: 0;
    margin: 0 0 0 16px;
    padding: 0;
    border: 0;
    border-left: 1px solid var(--sg-line);
    box-shadow: none;
    background: transparent;

    display: block !important;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transform: none !important;

    transition:
      max-height 0.6s ease,
      opacity 0.45s ease,
      visibility 0.45s ease;
  }

  .global-nav.sg-global-nav .sg-nav-list .sub-menu::before,
  .sg-global-nav .sg-nav-list .sub-menu::before {
    display: none;
  }

  /*
   * スマホでは hover / focus-within で勝手に開かないようにする
   */
  .global-nav.sg-global-nav .sg-nav-list > li:hover > .sub-menu,
  .global-nav.sg-global-nav .sg-nav-list > li:focus-within > .sub-menu,
  .sg-global-nav .sg-nav-list > li:hover > .sub-menu,
  .sg-global-nav .sg-nav-list > li:focus-within > .sub-menu {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transform: none !important;
  }

  /*
   * JSで is-submenu-open が付いた時だけ開く
   */
  .global-nav.sg-global-nav .sg-nav-list > li.is-submenu-open > .sub-menu,
  .global-nav.sg-global-nav .sg-nav-list > li.is-submenu-open:hover > .sub-menu,
  .global-nav.sg-global-nav .sg-nav-list > li.is-submenu-open:focus-within > .sub-menu,
  .sg-global-nav .sg-nav-list > li.is-submenu-open > .sub-menu,
  .sg-global-nav .sg-nav-list > li.is-submenu-open:hover > .sub-menu,
  .sg-global-nav .sg-nav-list > li.is-submenu-open:focus-within > .sub-menu {
    max-height: 600px;
    opacity: 1;
    visibility: visible;
  }

  .global-nav.sg-global-nav .sg-nav-list .sub-menu a,
  .sg-global-nav .sg-nav-list .sub-menu a {
    display: block;
    padding: 12px 12px 12px 18px;
    white-space: normal;
    font-size: 14px;
    background: transparent;
  }

  .global-nav.sg-global-nav .sg-nav-list .sub-menu a:hover,
  .sg-global-nav .sg-nav-list .sub-menu a:hover {
    background: transparent;
  }

  .global-nav.sg-global-nav .sg-nav-list > li.menu-item-has-children > a,
  .sg-global-nav .sg-nav-list > li.menu-item-has-children > a {
    padding-right: 42px;
  }

  .global-nav.sg-global-nav .sg-nav-list > li.menu-item-has-children > a::after,
  .sg-global-nav .sg-nav-list > li.menu-item-has-children > a::after {
    right: 16px;
  }
}

/* =========================================================
   Prayer / Omamori page
========================================================= */

.sg-prayer-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 0 80px;
}

.sg-prayer-hero,
.sg-keidai-hero,
.sg-engi-hero,
.sg-events-hero {
  margin-bottom: 42px;
  padding: clamp(34px, 6vw, 64px);
  background:
    radial-gradient(circle at 12% 18%, rgba(185, 155, 98, 0.16), transparent 28%),
    linear-gradient(135deg, #fffaf1 0%, #f4eee2 100%);
  border: 1px solid var(--sg-line);
  box-shadow: 0 12px 34px rgba(80, 67, 42, 0.06);
}

.sg-prayer-hero__inner,
.sg-keidai-hero__inner,
.sg-engi-hero__innner,
.sg-events-hero__inner  {
  max-width: 820px;
}

.sg-prayer-hero__eyebrow,
.sg-keidai-hero__eyebrow,
.sg-engi-hero__eyebrow,
.sg-events-hero_eyebrow  {
  margin: 0 0 10px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.sg-prayer-hero h1,
.sg-keidai-hero h1,
.sg-engi-hero h1,
.sg-events-hero h1 {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.14em;
}

.sg-prayer-hero p,
.sg-keidai-hero p,
.sg-engi-hero p,
.sg-events-hero p {
  margin: 0;
  color: var(--sg-text);
  font-size: 16px;
  line-height: 2.05;
}

.sg-prayer-intro {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 34px;
  margin-bottom: 34px;
}

.sg-prayer-intro__text,
.sg-prayer-intro__note,
.sg-prayer-message {
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 10px 26px rgba(80, 67, 42, 0.05);
}

.sg-prayer-intro__text {
  padding: 32px 36px;
}

.sg-prayer-intro__text p {
  margin: 0 0 1.4em;
  color: var(--sg-text);
  line-height: 2.05;
}

.sg-prayer-intro__text p:last-child {
  margin-bottom: 0;
}

.sg-prayer-intro__note {
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(251, 247, 238, 0.95));
}

.sg-prayer-intro__note h3 {
  margin: 0 0 18px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--sg-line);
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.65;
}

.sg-prayer-intro__note ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-prayer-intro__note li {
  position: relative;
  padding: 11px 0 11px 1.2em;
  border-bottom: 1px solid rgba(222, 214, 200, 0.72);
  color: var(--sg-text);
  line-height: 1.75;
}

.sg-prayer-intro__note li:last-child {
  border-bottom: 0;
}

.sg-prayer-intro__note li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--sg-gold);
}

.sg-prayer-intro__note li span {
  display: block;
  margin-top: 2px;
  color: var(--sg-muted);
  font-size: 13px;
}

.sg-prayer-message {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
  margin-bottom: 58px;
  padding: 24px 28px;
  background: #fbf7ef;
}

.sg-prayer-message p {
  margin: 0;
  color: var(--sg-text);
  line-height: 1.9;
}

.sg-prayer-message .sg-outline-btn {
  flex: 0 0 auto;
}

.sg-omamori-section {
  margin-top: 54px;
}

.sg-omamori-heading {
  margin-bottom: 22px;
  text-align: center;
}

.sg-omamori-heading span {
  display: block;
  margin-bottom: 4px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.sg-omamori-heading h3 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.14em;
}

.sg-omamori-heading p {
  margin: 8px 0 0;
  color: var(--sg-muted);
  font-size: 14px;
}

.sg-omamori-grid {
  display: grid;
  gap: 22px;
}

.sg-omamori-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.sg-omamori-grid--5 {
  grid-template-columns: repeat(5, 1fr);
}

.sg-omamori-grid--2 {
  max-width: 560px;
  margin-right: auto;
  margin-left: auto;
  grid-template-columns: repeat(2, 1fr);
}

.sg-omamori-card {
  display: block;
  color: inherit;
  text-decoration: none !important;
}

.sg-omamori-card figure {
  height: 100%;
  margin: 0;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 8px 22px rgba(80, 67, 42, 0.05);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.sg-omamori-card:hover figure {
  transform: translateY(-3px);
  border-color: #cdbb97;
  box-shadow: 0 14px 30px rgba(80, 67, 42, 0.12);
}

.sg-omamori-card__image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f5efe4;
}

.sg-omamori-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sg-omamori-card figcaption {
  padding: 14px 14px 16px;
  color: var(--sg-ink);
  font-size: 15px;
  line-height: 1.65;
  text-align: center;
}

.sg-omamori-card figcaption small {
  display: block;
  margin-top: 4px;
  color: var(--sg-muted);
  font-size: 12px;
  line-height: 1.55;
}

@media screen and (max-width: 1100px) {
  .sg-prayer-intro {
    grid-template-columns: 1fr;
  }

  .sg-omamori-grid--5 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media screen and (max-width: 820px) {
  .sg-prayer-page {
    padding-bottom: 54px;
  }

  .sg-prayer-hero {
    margin-bottom: 28px;
    padding: 30px 24px;
  }

  .sg-prayer-intro__text,
  .sg-prayer-intro__note {
    padding: 24px;
  }

  .sg-prayer-message {
    display: block;
    padding: 24px;
  }

  .sg-prayer-message .sg-outline-btn {
    width: 100%;
    margin-top: 18px;
  }

  .sg-omamori-grid--4,
  .sg-omamori-grid--5 {
    grid-template-columns: repeat(2, 1fr);
  }

  .sg-omamori-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 520px) {
  .sg-omamori-grid--4,
  .sg-omamori-grid--5,
  .sg-omamori-grid--2 {
    grid-template-columns: 1fr;
  }

  .sg-omamori-card__image {
    aspect-ratio: 4 / 3;
  }
}

/* =========================================================
   Fix WordPress auto p/br inside omamori grid
========================================================= */

.sg-omamori-grid > p {
  display: contents;
  margin: 0;
  padding: 0;
}

.sg-omamori-grid > p:empty {
  display: none;
}

.sg-omamori-grid > br {
  display: none;
}

.sg-omamori-grid .sg-omamori-card {
  display: block;
  height: 100%;
}

.sg-omamori-grid .sg-omamori-card figure {
  height: 100%;
}

/* =========================================================
   Final override: header responsive adjustment
   PC menu: 961px and up
   Mobile menu: 960px and down
========================================================= */

/* 寺院名・肩書きの改行防止 */
.sg-brand,
.sg-brand__link,
.sg-brand__text,
.sg-brand__kicker,
.sg-brand__name {
  white-space: nowrap;
}

/* PC中間幅：961px〜1280pxは少し詰めて表示 */
@media screen and (min-width: 961px) and (max-width: 1280px) {
  .sg-header__inner {
    width: min(calc(100% - 32px), 1360px);
    min-height: 82px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
  }

  .sg-brand__link {
    gap: 10px;
  }

  .sg-brand__logo {
    max-width: 56px;
  }

  .sg-brand__logo img {
    max-height: 54px;
  }

  .sg-brand__kicker {
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .sg-brand__name {
    font-size: 22px;
    letter-spacing: 0.06em;
  }

  .sg-nav-list {
    gap: 14px;
    flex-wrap: nowrap;
  }

  .sg-nav-list a {
    font-size: 13px;
    letter-spacing: 0.02em;
  }

  .sg-header-tel__number {
    font-size: 20px;
  }

  .sg-header-tel__time {
    font-size: 11px;
  }
}

/* 961px〜1100pxでもPCメニューを維持する */
@media screen and (min-width: 961px) and (max-width: 1100px) {
  .sg-header__inner {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
  }

  .sg-header-tel {
    display: block !important;
  }

  .menu-toggle {
    display: none !important;
  }

  .global-nav.sg-global-nav,
  .sg-global-nav {
    grid-column: auto !important;
    display: block !important;
    width: auto !important;
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    padding: 0 !important;
    justify-self: center !important;
  }

  .global-nav.sg-global-nav .sg-nav-list,
  .sg-global-nav .sg-nav-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center;
    gap: 14px;
    border-top: 0 !important;
  }

  .global-nav.sg-global-nav .sg-nav-list a,
  .sg-global-nav .sg-nav-list a {
    padding: 0 !important;
    border-bottom: 0 !important;
  }

  .global-nav.sg-global-nav .sg-nav-list > li.menu-item-has-children > a,
  .sg-global-nav .sg-nav-list > li.menu-item-has-children > a {
    padding-right: 16px !important;
  }

  .global-nav.sg-global-nav .sg-nav-list > li.menu-item-has-children > a::after,
  .sg-global-nav .sg-nav-list > li.menu-item-has-children > a::after {
    right: 0;
  }

  /* 961〜1100pxではサブメニューもPC用プルダウンに戻す */
  .global-nav.sg-global-nav .sg-nav-list .sub-menu,
  .sg-global-nav .sg-nav-list .sub-menu {
    position: absolute !important;
    left: 50% !important;
    top: calc(100% + 18px) !important;
    z-index: 100;
    min-width: 220px;
    width: auto;
    max-height: none !important;
    margin: 0;
    padding: 10px 0;
    border: 1px solid var(--sg-line);
    border-left: 1px solid var(--sg-line);
    box-shadow: 0 16px 34px rgba(60, 48, 32, 0.14);
    background: rgba(255, 255, 255, 0.97);
    opacity: 0;
    visibility: hidden;
    overflow: visible;
    transform: translateX(-50%) translateY(8px) !important;
    transition:
      opacity 0.28s ease,
      visibility 0.28s ease,
      transform 0.28s ease;
  }

  .global-nav.sg-global-nav .sg-nav-list .sub-menu::before,
  .sg-global-nav .sg-nav-list .sub-menu::before {
    display: block;
  }

  .global-nav.sg-global-nav .sg-nav-list > li:hover > .sub-menu,
  .global-nav.sg-global-nav .sg-nav-list > li:focus-within > .sub-menu,
  .sg-global-nav .sg-nav-list > li:hover > .sub-menu,
  .sg-global-nav .sg-nav-list > li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) !important;
  }

  .global-nav.sg-global-nav .sg-nav-list .sub-menu a,
  .sg-global-nav .sg-nav-list .sub-menu a {
    display: block;
    padding: 11px 18px !important;
    white-space: nowrap;
    font-size: 14px;
    background: transparent;
  }
}

/* 960px以下をスマホメニューにする */
@media screen and (max-width: 960px) {
  .sg-header__inner {
    width: min(calc(100% - 28px), 1280px);
    min-height: 82px;
    grid-template-columns: auto auto !important;
    gap: 14px;
  }

  .sg-header-tel {
    display: none !important;
  }

  .menu-toggle {
    display: block !important;
    justify-self: end;
  }

  .sg-brand__logo {
    max-width: 54px;
  }

  .sg-brand__logo img {
    max-height: 54px;
  }

  .sg-brand__kicker {
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .sg-brand__name {
    font-size: 20px;
    letter-spacing: 0.06em;
  }

  .global-nav.sg-global-nav,
  .sg-global-nav {
    grid-column: 1 / -1;
    display: block !important;
    width: 100%;
    padding: 0;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition:
      max-height 0.55s ease,
      opacity 0.35s ease,
      visibility 0.35s ease,
      padding 0.35s ease;
  }

  body.is-menu-open .global-nav.sg-global-nav,
  body.is-menu-open .sg-global-nav {
    max-height: calc(100vh - 82px);
    opacity: 1;
    visibility: visible;
    padding: 0 0 18px;
    overflow-y: auto;
  }

  .global-nav.sg-global-nav .sg-nav-list,
  .sg-global-nav .sg-nav-list {
    display: block !important;
    border-top: 1px solid var(--sg-line);
  }

  .global-nav.sg-global-nav .sg-nav-list a,
  .sg-global-nav .sg-nav-list a {
    display: block;
    padding: 14px 4px !important;
    border-bottom: 1px solid var(--sg-line) !important;
  }

  .global-nav.sg-global-nav .sg-nav-list > li.menu-item-has-children > a,
  .sg-global-nav .sg-nav-list > li.menu-item-has-children > a {
    padding-right: 42px !important;
  }

  .global-nav.sg-global-nav .sg-nav-list > li.menu-item-has-children > a::after,
  .sg-global-nav .sg-nav-list > li.menu-item-has-children > a::after {
    right: 16px;
  }

  .global-nav.sg-global-nav .sg-nav-list .sub-menu,
  .sg-global-nav .sg-nav-list .sub-menu {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100%;
    min-width: 0;
    margin: 0 0 0 16px;
    padding: 0;
    border: 0;
    border-left: 1px solid var(--sg-line);
    box-shadow: none;
    background: transparent;

    display: block !important;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    transform: none !important;

    transition:
      max-height 0.6s ease,
      opacity 0.45s ease,
      visibility 0.45s ease;
  }

  .global-nav.sg-global-nav .sg-nav-list .sub-menu::before,
  .sg-global-nav .sg-nav-list .sub-menu::before {
    display: none;
  }

  .global-nav.sg-global-nav .sg-nav-list > li:hover > .sub-menu,
  .global-nav.sg-global-nav .sg-nav-list > li:focus-within > .sub-menu,
  .sg-global-nav .sg-nav-list > li:hover > .sub-menu,
  .sg-global-nav .sg-nav-list > li:focus-within > .sub-menu {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transform: none !important;
  }

  .global-nav.sg-global-nav .sg-nav-list > li.is-submenu-open > .sub-menu,
  .global-nav.sg-global-nav .sg-nav-list > li.is-submenu-open:hover > .sub-menu,
  .global-nav.sg-global-nav .sg-nav-list > li.is-submenu-open:focus-within > .sub-menu,
  .sg-global-nav .sg-nav-list > li.is-submenu-open > .sub-menu,
  .sg-global-nav .sg-nav-list > li.is-submenu-open:hover > .sub-menu,
  .sg-global-nav .sg-nav-list > li.is-submenu-open:focus-within > .sub-menu {
    max-height: 600px;
    opacity: 1;
    visibility: visible;
  }

  .global-nav.sg-global-nav .sg-nav-list .sub-menu a,
  .sg-global-nav .sg-nav-list .sub-menu a {
    padding: 12px 12px 12px 18px !important;
    white-space: normal;
    font-size: 14px;
    background: transparent;
  }
}

/* かなり狭いスマホ用 */
@media screen and (max-width: 640px) {
  .sg-header__inner {
    min-height: 76px;
  }

  .sg-brand__logo {
    max-width: 48px;
  }

  .sg-brand__logo img {
    max-height: 48px;
  }

  .sg-brand__name {
    font-size: 19px;
  }

  .sg-brand__kicker {
    font-size: 10px;
  }

  body.is-menu-open .global-nav.sg-global-nav,
  body.is-menu-open .sg-global-nav {
    max-height: calc(100vh - 76px);
  }
}

/* =========================================================
   Final override: keep header logo size consistent
========================================================= */

.sg-brand__logo {
  flex: 0 0 62px !important;
  width: 62px !important;
  max-width: 62px !important;
}

.sg-brand__logo img,
.sg-brand__logo .custom-logo {
  display: block;
  width: 62px !important;
  height: 62px !important;
  max-width: 62px !important;
  max-height: 62px !important;
  object-fit: contain;
}

/* ロゴ横の文字は折り返さない */
.sg-brand__link,
.sg-brand__text,
.sg-brand__kicker,
.sg-brand__name {
  white-space: nowrap;
}

/* スマホでもロゴサイズを維持 */
@media screen and (max-width: 960px) {
  .sg-brand__logo {
    flex: 0 0 62px !important;
    width: 62px !important;
    max-width: 62px !important;
  }

  .sg-brand__logo img,
  .sg-brand__logo .custom-logo {
    width: 62px !important;
    height: 62px !important;
    max-width: 62px !important;
    max-height: 62px !important;
  }

  .sg-header__inner {
    min-height: 88px;
  }
}

/* 極端に狭い幅だけ少し調整する場合 */
@media screen and (max-width: 360px) {
  .sg-brand__logo {
    flex: 0 0 56px !important;
    width: 56px !important;
    max-width: 56px !important;
  }

  .sg-brand__logo img,
  .sg-brand__logo .custom-logo {
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
  }
}

/* 年中行事ページ：月表示を横書きにする */
.sg-event-wide-card__month {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}

/* =========================================================
   Keidai map / Dainichido history page
========================================================= */

.sg-keidai-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 0 80px;
}

.sg-keidai-section {
  margin-bottom: 64px;
}

.sg-keidai-section:last-child {
  margin-bottom: 0;
}

.sg-page-section-heading {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--sg-line);
}

.sg-page-section-heading__en {
  display: block;
  margin-bottom: 6px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.sg-page-section-heading h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.12em;
}

.sg-page-section-heading p {
  margin: 8px 0 0;
  color: var(--sg-muted);
  font-size: 14px;
  line-height: 1.8;
}

.sg-keidai-map-card {
  padding: clamp(18px, 4vw, 34px);
  background:
    radial-gradient(circle at 10% 10%, rgba(185, 155, 98, 0.10), transparent 30%),
    linear-gradient(180deg, #fffdf8 0%, #f8f3ea 100%);
  border: 1px solid var(--sg-line);
  box-shadow: 0 12px 32px rgba(80, 67, 42, 0.06);
}

.sg-keidai-map {
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(12px, 3vw, 22px);
  background: #ffffc8;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(222, 214, 200, 0.48);
}

.sg-keidai-map__image {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
}

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

.sg-history-card {
  display: block;
  color: inherit;
  text-decoration: none !important;
}

.sg-history-card figure {
  height: 100%;
  margin: 0;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 8px 22px rgba(80, 67, 42, 0.05);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.sg-history-card:hover figure {
  transform: translateY(-3px);
  border-color: #cdbb97;
  box-shadow: 0 14px 30px rgba(80, 67, 42, 0.12);
}

.sg-history-card__image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f5efe4;
}

.sg-history-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sg-history-card figcaption {
  padding: 13px 12px 15px;
  color: var(--sg-ink);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

@media screen and (max-width: 1100px) {
  .sg-history-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media screen and (max-width: 820px) {
  .sg-keidai-page {
    padding-bottom: 54px;
  }

  .sg-keidai-section {
    margin-bottom: 46px;
  }

  .sg-keidai-map-card {
    padding: 16px;
  }

  .sg-keidai-map {
    padding: 10px;
    border-radius: 14px;
    overflow-x: auto;
  }

  .sg-history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media screen and (max-width: 520px) {
  .sg-history-grid {
    grid-template-columns: 1fr;
  }

  .sg-history-card__image {
    aspect-ratio: 4 / 3;
  }
}
/* =========================================================
   Image map lightbox
========================================================= */

.sg-map-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.sg-map-lightbox.is-open {
  display: block;
}

.sg-map-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 17, 12, 0.72);
}

.sg-map-lightbox__content {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(calc(100% - 40px), 900px);
  max-height: calc(100vh - 60px);
  transform: translate(-50%, -50%);
  padding: 28px;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  overflow: auto;
}

.sg-map-lightbox__close {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--sg-line);
  border-radius: 50%;
  background: #fff;
  color: var(--sg-ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.sg-map-lightbox__title {
  margin: 0 48px 18px 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 22px;
  line-height: 1.5;
}

.sg-map-lightbox__content img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 180px);
  object-fit: contain;
  margin: 0 auto;
}

body.sg-map-lightbox-open {
  overflow: hidden;
}

@media screen and (max-width: 640px) {
  .sg-map-lightbox__content {
    width: min(calc(100% - 24px), 900px);
    padding: 20px;
  }

  .sg-map-lightbox__title {
    font-size: 18px;
  }
}
/* =========================================================
   Access page
========================================================= */

.sg-access-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 0 80px;
}

.sg-access-hero {
  margin-bottom: 38px;
  padding: clamp(34px, 6vw, 60px);
  background:
    radial-gradient(circle at 12% 18%, rgba(185, 155, 98, 0.15), transparent 30%),
    linear-gradient(135deg, #fffaf1 0%, #f4eee2 100%);
  border: 1px solid var(--sg-line);
  box-shadow: 0 12px 34px rgba(80, 67, 42, 0.06);
}

.sg-access-hero__text {
  max-width: 820px;
}

.sg-access-hero__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.sg-access-hero h1 {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.14em;
}

.sg-access-hero p {
  margin: 0;
  color: var(--sg-text);
  font-size: 16px;
  line-height: 2;
}

.sg-access-map-section {
  margin-bottom: 42px;
}

.sg-access-map-card {
  padding: clamp(14px, 3vw, 24px);
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 12px 32px rgba(80, 67, 42, 0.06);
}

.sg-access-map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 360px;
  overflow: hidden;
  background: #f3efe7;
}

.sg-access-map-frame iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.sg-access-info-section {
  margin-bottom: 34px;
}

.sg-access-info-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.sg-access-info-card {
  height: 100%;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 10px 26px rgba(80, 67, 42, 0.05);
}

.sg-access-info-card--main {
  background:
    radial-gradient(circle at 90% 10%, rgba(185, 155, 98, 0.10), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fbf7ef 100%);
}

.sg-access-info-card__label {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.sg-access-info-card h3 {
  margin: 0 0 18px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--sg-line);
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.08em;
}

.sg-access-basic-list {
  margin: 0;
}

.sg-access-basic-list div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(222, 214, 200, 0.72);
}

.sg-access-basic-list div:last-child {
  border-bottom: 0;
}

.sg-access-basic-list dt {
  color: var(--sg-ink);
  font-weight: 600;
  font-size: 14px;
}

.sg-access-basic-list dd {
  margin: 0;
  color: var(--sg-text);
  font-size: 14px;
  line-height: 1.8;
}

.sg-access-basic-list a {
  color: var(--sg-brown);
  text-decoration: none;
}

.sg-access-button-wrap {
  margin-top: 24px;
}

.sg-access-button-wrap .sg-outline-btn {
  width: 100%;
}

.sg-access-route-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-access-route-list li {
  position: relative;
  padding: 12px 0 12px 1.25em;
  border-bottom: 1px solid rgba(222, 214, 200, 0.72);
  color: var(--sg-text);
  font-size: 15px;
  line-height: 1.85;
}

.sg-access-route-list li:last-child {
  border-bottom: 0;
}

.sg-access-route-list li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--sg-gold);
}

.sg-access-route-list span {
  display: block;
  margin-top: 2px;
  color: var(--sg-muted);
  font-size: 13px;
}

.sg-access-note {
  padding: 22px 26px;
  background: #fbf7ef;
  border: 1px solid var(--sg-line);
}

.sg-access-note p {
  margin: 0;
  color: var(--sg-text);
  font-size: 14px;
  line-height: 1.9;
}

@media screen and (max-width: 1100px) {
  .sg-access-info-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 820px) {
  .sg-access-page {
    padding-bottom: 54px;
  }

  .sg-access-hero {
    margin-bottom: 28px;
    padding: 30px 24px;
  }

  .sg-access-map-card {
    padding: 12px;
  }

  .sg-access-map-frame {
    aspect-ratio: 4 / 3;
    min-height: 300px;
  }

  .sg-access-info-card {
    padding: 24px;
  }

  .sg-access-basic-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media screen and (max-width: 520px) {
  .sg-access-map-frame {
    min-height: 260px;
  }

  .sg-access-info-card h3 {
    font-size: 20px;
  }
}
}

/* =========================================================
   Links page
========================================================= */

.sg-links-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 0 80px;
}

.sg-links-hero {
  margin-bottom: 38px;
  padding: clamp(34px, 6vw, 60px);
  background:
    radial-gradient(circle at 12% 18%, rgba(185, 155, 98, 0.15), transparent 30%),
    linear-gradient(135deg, #fffaf1 0%, #f4eee2 100%);
  border: 1px solid var(--sg-line);
  box-shadow: 0 12px 34px rgba(80, 67, 42, 0.06);
}

.sg-links-hero__text {
  max-width: 820px;
}

.sg-links-hero__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.sg-links-hero h1 {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.14em;
}

.sg-links-hero p {
  margin: 0;
  color: var(--sg-text);
  font-size: 16px;
  line-height: 2;
}

.sg-links-section {
  margin-bottom: 40px;
}

.sg-links-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.sg-link-card {
  position: relative;
  display: block;
  min-height: 180px;
  padding: 28px 64px 28px 28px;
  background: #fff;
  border: 1px solid var(--sg-line);
  color: var(--sg-ink);
  text-decoration: none !important;
  box-shadow: 0 10px 26px rgba(80, 67, 42, 0.05);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.sg-link-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 28px;
  width: 4px;
  height: 42px;
  background: var(--sg-gold);
}

.sg-link-card:hover {
  transform: translateY(-3px);
  border-color: #cdbb97;
  background: #fffdf8;
  box-shadow: 0 16px 34px rgba(80, 67, 42, 0.12);
  color: var(--sg-ink);
}

.sg-link-card__label {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 10px;
  background: #f7f3ea;
  color: var(--sg-gold);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.sg-link-card h3 {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.08em;
}

.sg-link-card p {
  margin: 0;
  color: var(--sg-muted);
  font-size: 14px;
  line-height: 1.8;
}

.sg-link-card__arrow {
  position: absolute;
  right: 26px;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--sg-line);
  border-radius: 50%;
  color: var(--sg-brown);
  font-size: 18px;
  line-height: 1;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease;
}

.sg-link-card:hover .sg-link-card__arrow {
  background: var(--sg-brown);
  border-color: var(--sg-brown);
  color: #fff;
}

@media screen and (max-width: 820px) {
  .sg-links-page {
    padding-bottom: 54px;
  }

  .sg-links-hero {
    margin-bottom: 28px;
    padding: 30px 24px;
  }

  .sg-links-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .sg-link-card {
    min-height: 0;
    padding: 24px 58px 24px 24px;
  }

  .sg-link-card h3 {
    font-size: 20px;
  }
}

@media screen and (max-width: 520px) {
  .sg-link-card {
    padding: 22px;
  }

  .sg-link-card__arrow {
    position: static;
    margin-top: 18px;
  }
}
/* =========================================================
   Dainichido restoration page
========================================================= */

.sg-dainichido-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 0 80px;
}

.sg-dainichido-hero {
  margin-bottom: 42px;
  padding: clamp(34px, 6vw, 60px);
  background:
    radial-gradient(circle at 12% 18%, rgba(185, 155, 98, 0.15), transparent 30%),
    linear-gradient(135deg, #fffaf1 0%, #f4eee2 100%);
  border: 1px solid var(--sg-line);
  box-shadow: 0 12px 34px rgba(80, 67, 42, 0.06);
}

.sg-dainichido-hero__text {
  max-width: 820px;
}

.sg-dainichido-hero__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.sg-dainichido-hero h2 {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.14em;
}

.sg-dainichido-hero p {
  margin: 0;
  color: var(--sg-text);
  font-size: 16px;
  line-height: 2;
}

.sg-dainichido-gallery-section {
  margin-top: 0;
}

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

.sg-dainichido-card {
  display: block;
  color: inherit;
  text-decoration: none !important;
}

.sg-dainichido-card figure {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 8px 22px rgba(80, 67, 42, 0.05);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.sg-dainichido-card:hover figure {
  transform: translateY(-3px);
  border-color: #cdbb97;
  background: #fffdf8;
  box-shadow: 0 14px 30px rgba(80, 67, 42, 0.12);
}

.sg-dainichido-card__image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background:
    linear-gradient(180deg, #f8f3ea 0%, #ffffff 100%);
  border-bottom: 1px solid var(--sg-line);
}

.sg-dainichido-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.sg-dainichido-card figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 13px 14px 15px;
  color: var(--sg-ink);
  font-size: 15px;
  line-height: 1.6;
}

.sg-dainichido-card__num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--sg-line);
  border-radius: 50%;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1;
}

.sg-dainichido-card__title {
  display: block;
  flex: 1;
}

@media screen and (max-width: 1100px) {
  .sg-dainichido-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media screen and (max-width: 820px) {
  .sg-dainichido-page {
    padding-bottom: 54px;
  }

  .sg-dainichido-hero {
    margin-bottom: 30px;
    padding: 30px 24px;
  }

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

  .sg-dainichido-card figcaption {
    min-height: 54px;
    padding: 12px;
    font-size: 14px;
  }

  .sg-dainichido-card__num {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}

@media screen and (max-width: 520px) {
  .sg-dainichido-gallery {
    grid-template-columns: 1fr;
  }

  .sg-dainichido-card__image {
    aspect-ratio: 4 / 3;
  }
}
/* =========================================================
   Heisei restoration page
========================================================= */

.sg-heisei-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 0 80px;
}

.sg-heisei-hero {
  margin-bottom: 42px;
  padding: clamp(34px, 6vw, 60px);
  background:
    radial-gradient(circle at 12% 18%, rgba(185, 155, 98, 0.15), transparent 30%),
    linear-gradient(135deg, #fffaf1 0%, #f4eee2 100%);
  border: 1px solid var(--sg-line);
  box-shadow: 0 12px 34px rgba(80, 67, 42, 0.06);
}

.sg-heisei-hero__text {
  max-width: 820px;
}

.sg-heisei-hero__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.sg-heisei-hero h2 {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.14em;
}

.sg-heisei-hero p {
  margin: 0;
  color: var(--sg-text);
  font-size: 16px;
  line-height: 2;
}

.sg-heisei-board-section {
  margin-bottom: 52px;
}

.sg-heisei-board {
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 28px);
  background:
    radial-gradient(circle at 12% 15%, rgba(185, 155, 98, 0.10), transparent 28%),
    linear-gradient(180deg, #fffdf8 0%, #f8f3ea 100%);
  border: 1px solid var(--sg-line);
  box-shadow: 0 12px 32px rgba(80, 67, 42, 0.06);
}

.sg-heisei-board img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
  background: #fff;
  border: 1px solid rgba(222, 214, 200, 0.7);
}

.sg-page-section-heading {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--sg-line);
}

.sg-page-section-heading__en {
  display: block;
  margin-bottom: 6px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.sg-page-section-heading h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.12em;
}

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

.sg-heisei-photo {
  display: block;
  color: inherit;
  text-decoration: none !important;
}

.sg-heisei-photo figure {
  position: relative;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 8px 22px rgba(80, 67, 42, 0.05);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.sg-heisei-photo:hover figure {
  transform: translateY(-3px);
  border-color: #cdbb97;
  box-shadow: 0 14px 30px rgba(80, 67, 42, 0.12);
}

.sg-heisei-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  background: #f5efe4;
}

.sg-heisei-photo figcaption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--sg-brown);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(40, 32, 24, 0.16);
}

@media screen and (max-width: 1100px) {
  .sg-heisei-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media screen and (max-width: 820px) {
  .sg-heisei-page {
    padding-bottom: 54px;
  }

  .sg-heisei-hero {
    margin-bottom: 30px;
    padding: 30px 24px;
  }

  .sg-heisei-board-section {
    margin-bottom: 40px;
  }

  .sg-heisei-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media screen and (max-width: 560px) {
  .sg-heisei-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sg-heisei-photo figcaption {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
}
/* =========================================================
   Contact privacy modal
========================================================= */

.contact-form__privacy {
  margin-top: 24px;
  padding: 22px 24px;
  background: #fbf7ef;
  border: 1px solid var(--sg-line);
}

.contact-form__privacy-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--sg-text);
  font-size: 15px;
  line-height: 1.8;
  cursor: pointer;
}

.contact-form__privacy-check input {
  margin-top: 0.45em;
}

.contact-form__privacy-open {
  display: inline-block;
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sg-brown);
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.contact-form__privacy-open:hover {
  color: var(--sg-gold);
}

.privacy-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.privacy-modal.is-open {
  display: block;
}

.privacy-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 20, 14, 0.72);
}

.privacy-modal__content {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(calc(100% - 40px), 760px);
  max-height: calc(100vh - 60px);
  transform: translate(-50%, -50%);
  padding: 34px;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  overflow: auto;
}

.privacy-modal__close {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--sg-line);
  border-radius: 50%;
  background: #fff;
  color: var(--sg-ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.privacy-modal h2 {
  margin: 0 48px 24px 0;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--sg-line);
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.08em;
}

.privacy-modal__body h3 {
  margin: 26px 0 8px;
  color: var(--sg-ink);
  font-size: 17px;
  line-height: 1.7;
}

.privacy-modal__body p {
  margin: 0 0 1.2em;
  color: var(--sg-text);
  font-size: 15px;
  line-height: 1.9;
}

.privacy-modal__actions {
  margin-top: 28px;
  text-align: center;
}

body.privacy-modal-open {
  overflow: hidden;
}

@media screen and (max-width: 640px) {
  .privacy-modal__content {
    width: min(calc(100% - 24px), 760px);
    padding: 26px 22px;
  }

  .privacy-modal h2 {
    font-size: 23px;
  }
}
/* =========================================================
   Contact form select
========================================================= */

.contact-form__row select {
  width: 100%;
  min-height: 48px;
  padding: 10px 44px 10px 14px;
  border: 1px solid var(--sg-line);
  border-radius: 0;
  background-color: #fff;
  color: var(--sg-text);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  cursor: pointer;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image:
    linear-gradient(45deg, transparent 50%, var(--sg-brown) 50%),
    linear-gradient(135deg, var(--sg-brown) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 50%,
    calc(100% - 16px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.contact-form__row select:focus {
  outline: none;
  border-color: var(--sg-gold);
  box-shadow: 0 0 0 3px rgba(185, 155, 98, 0.16);
}

.contact-form__row select:hover {
  border-color: #cdbb97;
}

.contact-form__row select:invalid {
  color: var(--sg-muted);
}

/* Edge / IE系の標準矢印対策 */
.contact-form__row select::-ms-expand {
  display: none;
}

@media screen and (max-width: 640px) {
  .contact-form__row select {
    min-height: 46px;
    font-size: 16px;
  }
}
/* =========================================================
   New Year events page
========================================================= */

.sg-shogatsu-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 0 80px;
}

.sg-shogatsu-lead {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  margin-bottom: 54px;
}

.sg-shogatsu-lead__main,
.sg-shogatsu-lead__note {
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 10px 26px rgba(80, 67, 42, 0.05);
}

.sg-shogatsu-lead__main {
  padding: 32px 36px;
}

.sg-shogatsu-lead__main h2 {
  margin: 0 0 14px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--sg-line);
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.1em;
}

.sg-shogatsu-lead__main p {
  margin: 0;
  color: var(--sg-text);
  font-size: 16px;
  line-height: 2;
}

.sg-shogatsu-lead__note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(circle at 90% 10%, rgba(185, 155, 98, 0.12), transparent 32%),
    linear-gradient(180deg, #fffdf8 0%, #f8f3ea 100%);
}

.sg-shogatsu-lead__note span {
  color: var(--sg-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.sg-shogatsu-lead__note strong {
  display: block;
  margin-top: 8px;
  color: var(--sg-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
}

.sg-shogatsu-lead__note small {
  display: block;
  margin-top: 6px;
  color: var(--sg-muted);
  font-size: 13px;
}

.sg-shogatsu-section {
  margin-bottom: 64px;
}

.sg-shogatsu-section:last-child {
  margin-bottom: 0;
}

.sg-section-heading {
  margin-bottom: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--sg-line);
}

.sg-section-heading--center {
  text-align: center;
}

.sg-section-heading span {
  display: block;
  margin-bottom: 6px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.sg-section-heading h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.12em;
}

.sg-section-heading p {
  margin: 8px 0 0;
  color: var(--sg-muted);
  font-size: 14px;
  line-height: 1.8;
}

.sg-shogatsu-event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.sg-shogatsu-event-card {
  position: relative;
  padding: 30px 28px;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 10px 26px rgba(80, 67, 42, 0.05);
}

.sg-shogatsu-event-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 30px;
  width: 4px;
  height: 44px;
  background: var(--sg-brown);
}

.sg-shogatsu-event-card__label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 10px;
  background: #f7f3ea;
  color: var(--sg-gold);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.sg-shogatsu-event-card h3 {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.08em;
}

.sg-shogatsu-event-card p {
  margin: 0;
  color: var(--sg-text);
  font-size: 15px;
  line-height: 1.9;
}

.sg-shogatsu-event-card ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.sg-shogatsu-event-card li {
  position: relative;
  padding-left: 1.2em;
  color: var(--sg-text);
  font-size: 14px;
  line-height: 1.8;
}

.sg-shogatsu-event-card li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--sg-gold);
}

.sg-shogatsu-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--sg-line);
  background: #fff;
  box-shadow: 0 10px 26px rgba(80, 67, 42, 0.05);
}

.sg-shogatsu-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

.sg-shogatsu-table th,
.sg-shogatsu-table td {
  padding: 15px 14px;
  border: 1px solid var(--sg-line);
  text-align: center;
  color: var(--sg-text);
  font-size: 15px;
  line-height: 1.6;
}

.sg-shogatsu-table thead th {
  background: #f7f3ea;
  color: var(--sg-ink);
  font-weight: 600;
}

.sg-shogatsu-table tbody th {
  background: #fffdf8;
  color: var(--sg-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
}

.sg-shogatsu-table td {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
}

.sg-shogatsu-table__note {
  font-family: inherit !important;
  font-size: 14px !important;
  color: var(--sg-text);
  background: #fbf7ef;
}

.sg-shogatsu-application {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}

.sg-shogatsu-application__body,
.sg-shogatsu-application__note,
.sg-shogatsu-wish-box,
.sg-shogatsu-ofuda-box,
.sg-shogatsu-visit-box {
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 10px 26px rgba(80, 67, 42, 0.05);
}

.sg-shogatsu-application__body,
.sg-shogatsu-application__note {
  padding: 30px;
}

.sg-shogatsu-application h3,
.sg-shogatsu-wish-box h3,
.sg-shogatsu-fee h3 {
  margin: 0 0 18px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--sg-line);
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.08em;
}

.sg-shogatsu-step-list {
  margin: 0;
  padding-left: 1.4em;
}

.sg-shogatsu-step-list li {
  margin-bottom: 20px;
  color: var(--sg-text);
  line-height: 1.9;
}

.sg-shogatsu-step-list li:last-child {
  margin-bottom: 0;
}

.sg-shogatsu-step-list strong {
  color: var(--sg-ink);
  font-weight: 600;
}

.sg-shogatsu-step-list p {
  margin: 6px 0 0;
}

.sg-shogatsu-downloads {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.sg-shogatsu-download {
  display: block;
  padding: 18px 16px;
  background: #fbf7ef;
  border: 1px solid var(--sg-line);
  color: var(--sg-ink);
  text-align: center;
  text-decoration: none !important;
  line-height: 1.7;
  transition:
    background 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease;
}

.sg-shogatsu-download:hover {
  transform: translateY(-2px);
  background: #fffdf8;
  border-color: #cdbb97;
}

.sg-shogatsu-download span {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 8px;
  background: var(--sg-brown);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.sg-shogatsu-application__note {
  background:
    radial-gradient(circle at 90% 10%, rgba(185, 155, 98, 0.12), transparent 32%),
    linear-gradient(180deg, #fffdf8 0%, #f8f3ea 100%);
}

.sg-shogatsu-application__note ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-shogatsu-application__note li {
  position: relative;
  padding: 12px 0 12px 1.2em;
  border-bottom: 1px solid rgba(222, 214, 200, 0.72);
  color: var(--sg-text);
  line-height: 1.8;
}

.sg-shogatsu-application__note li:last-child {
  border-bottom: 0;
}

.sg-shogatsu-application__note li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--sg-gold);
}

.sg-shogatsu-wish-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}

.sg-shogatsu-wish-box {
  padding: 30px;
}

.sg-shogatsu-wish-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-shogatsu-wish-list li {
  position: relative;
  padding-left: 1.1em;
  color: var(--sg-text);
  font-size: 15px;
  line-height: 1.7;
}

.sg-shogatsu-wish-list li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--sg-gold);
}

.sg-shogatsu-ofuda-box {
  overflow: hidden;
}

.sg-shogatsu-ofuda-image {
  background: #f5efe4;
}

.sg-shogatsu-ofuda-image img {
  display: block;
  width: 100%;
  height: auto;
}

.sg-shogatsu-fee {
  padding: 24px 26px 28px;
}

.sg-shogatsu-fee ul {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-shogatsu-fee li {
  padding: 8px 13px;
  background: #fbf7ef;
  border: 1px solid var(--sg-line);
  color: var(--sg-ink);
  font-size: 15px;
}

.sg-shogatsu-visit-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 34px;
  background:
    radial-gradient(circle at 90% 10%, rgba(185, 155, 98, 0.10), transparent 30%),
    linear-gradient(180deg, #fff 0%, #fbf7ef 100%);
}

.sg-shogatsu-visit-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.sg-shogatsu-visit-box h2 {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.1em;
}

.sg-shogatsu-visit-box p {
  margin: 0;
  color: var(--sg-text);
  font-size: 15px;
  line-height: 1.9;
}

.sg-shogatsu-visit-box .sg-outline-btn {
  flex: 0 0 auto;
}

@media screen and (max-width: 1100px) {
  .sg-shogatsu-lead,
  .sg-shogatsu-application,
  .sg-shogatsu-wish-layout {
    grid-template-columns: 1fr;
  }

  .sg-shogatsu-event-grid {
    grid-template-columns: 1fr;
  }

  .sg-shogatsu-wish-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 820px) {
  .sg-shogatsu-page {
    padding-bottom: 54px;
  }

  .sg-shogatsu-section {
    margin-bottom: 46px;
  }

  .sg-shogatsu-lead__main,
  .sg-shogatsu-application__body,
  .sg-shogatsu-application__note,
  .sg-shogatsu-wish-box {
    padding: 24px;
  }

  .sg-shogatsu-downloads {
    grid-template-columns: 1fr;
  }

  .sg-shogatsu-visit-box {
    display: block;
    padding: 26px 24px;
  }

  .sg-shogatsu-visit-box .sg-outline-btn {
    width: 100%;
    margin-top: 20px;
  }
}

@media screen and (max-width: 560px) {
  .sg-shogatsu-wish-list {
    grid-template-columns: 1fr;
  }

  .sg-shogatsu-lead__main h2 {
    font-size: 25px;
  }
}
/* =========================================================
   Common page hero
========================================================= */

.sg-page-hero {
  margin-bottom: 42px;
  padding: clamp(34px, 6vw, 60px);
  background:
    radial-gradient(circle at 12% 18%, rgba(185, 155, 98, 0.15), transparent 30%),
    linear-gradient(135deg, #fffaf1 0%, #f4eee2 100%);
  border: 1px solid var(--sg-line);
  box-shadow: 0 12px 34px rgba(80, 67, 42, 0.06);
}

.sg-page-hero__inner {
  max-width: 860px;
}

.sg-page-hero__eyebrow {
  margin: 0 0 10px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.22em;
}

.sg-page-hero h1,
.sg-page-hero h2 {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.14em;
}

.sg-page-hero p:not(.sg-page-hero__eyebrow) {
  margin: 0;
  color: var(--sg-text);
  font-size: 16px;
  line-height: 2;
}

@media screen and (max-width: 820px) {
  .sg-page-hero {
    margin-bottom: 30px;
    padding: 30px 24px;
  }

  .sg-page-hero h1,
  .sg-page-hero h2 {
    font-size: 30px;
  }

  .sg-page-hero p:not(.sg-page-hero__eyebrow) {
    font-size: 15px;
  }
}

/* =========================================================
   Top hero：スマホ表示調整
========================================================= */

@media screen and (max-width: 640px) {

  /*
   * 横幅に連動して低くなりすぎないよう、
   * スマホではヒーローの高さを独立して確保する
   */
  .sg-hero {
    height: clamp(480px, 128vw, 560px);
    min-height: 480px;
    aspect-ratio: auto;
    overflow: hidden;
  }

  /*
   * 縦書きコピーを上端から離し、
   * 画面中央寄りに配置する
   */
  .sg-hero__message {
    top: 28px;
    left: 32%;
    width: max-content;
    gap: 18px;
    transform: translateX(-50%);
    font-size: clamp(24px, 7.2vw, 28px);
    line-height: 1.2;
    letter-spacing: 0.1em;
  }

  .sg-hero__message span {
    display: block;
    writing-mode: vertical-rl;
    text-orientation: upright;
    white-space: nowrap;
  }

  /*
   * ヘッダーにロゴと寺院名があるため、
   * スマホではヒーロー下部の重複表示を消す
   */
@media screen and (max-width: 640px) {
  .sg-hero {
    height: clamp(540px, 145vw, 620px);
    min-height: 540px;
  }

  .sg-hero__temple {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 70px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(220, 210, 190, 0.9);
    box-shadow: 0 6px 18px rgba(40, 32, 24, 0.1);
    color: var(--sg-ink);
    text-shadow: none;
    backdrop-filter: blur(4px);
  }

  .sg-hero__temple img {
    width: 42px;
    height: auto;
    flex: 0 0 42px;
  }
}

  /*
   * 建物と桜が見切れすぎないよう調整
   */
  .sg-hero__image img {
    object-position: 62% center;
  }
}

@media screen and (max-width: 360px) {
  .sg-hero {
    height: 500px;
    min-height: 500px;
  }

  .sg-hero__message {
    top: 24px;
    gap: 14px;
    font-size: 24px;
    letter-spacing: 0.07em;
  }
}
/* =========================================================
   Fixed header offset
   固定ヘッダーがトップページに重なるのを防ぐ
========================================================= */

:root {
  --sg-fixed-header-height: 96px;
}

/* トップページだけ、固定ヘッダーの高さ分を確保 */
body.home .sg-main {
  padding-top: var(--sg-fixed-header-height);
}

/* スマホのヘッダーは少し高いため調整 */
@media screen and (max-width: 960px) {
  :root {
    --sg-fixed-header-height: 100px;
  }
}


/* =========================================================
   Memorial project page
========================================================= */

.sg-memorial-section {
  margin-bottom: 72px;
}

.sg-memorial-section:last-child {
  margin-bottom: 0;
}

/* 見出し */
.sg-memorial-heading {
  margin-bottom: 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--sg-line);
}

.sg-memorial-heading--center {
  text-align: center;
}

.sg-memorial-heading__en {
  margin: 0 0 7px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.22em;
}

.sg-memorial-heading h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: clamp(27px, 4vw, 38px);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.12em;
}

.sg-memorial-heading > p:last-child:not(.sg-memorial-heading__en) {
  margin: 9px 0 0;
  color: var(--sg-muted);
  font-size: 14px;
  line-height: 1.9;
}


/* =========================================================
   趣意書
========================================================= */

.sg-memorial-letter {
  max-width: 960px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 14px 38px rgba(80, 67, 42, 0.07);
}

.sg-memorial-letter__title {
  padding: 34px 42px;
  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(185, 155, 98, 0.13),
      transparent 34%
    ),
    linear-gradient(135deg, #fffaf1 0%, #f4eee2 100%);
  border-bottom: 1px solid var(--sg-line);
  text-align: center;
}

.sg-memorial-letter__title p {
  margin: 0;
  color: var(--sg-text);
  font-family: var(--sg-serif);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.08em;
}

.sg-memorial-letter__title h3 {
  margin: 9px 0;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.1em;
}

.sg-memorial-letter__body {
  padding: 46px clamp(28px, 6vw, 66px);
}

.sg-memorial-letter__body p {
  margin: 0 0 1.65em;
  color: var(--sg-text);
  font-size: 16px;
  line-height: 2.15;
  letter-spacing: 0.025em;
}

.sg-memorial-letter__opening,
.sg-memorial-letter__closing {
  font-family: var(--sg-serif);
  font-size: 18px !important;
}

.sg-memorial-letter__closing {
  margin-bottom: 26px !important;
  text-align: right;
}

.sg-memorial-letter__signature {
  margin-left: auto;
  width: fit-content;
  text-align: left;
}

.sg-memorial-letter__signature p {
  margin: 0 0 5px;
  font-family: var(--sg-serif);
  font-size: 15px;
  line-height: 1.8;
}


/* =========================================================
   事業概要
========================================================= */

.sg-memorial-overview__card {
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 10px 28px rgba(80, 67, 42, 0.05);
}

.sg-memorial-overview__list {
  margin: 0;
}

.sg-memorial-overview__list > div {
  display: grid;
  grid-template-columns: 180px 1fr;
  border-bottom: 1px solid var(--sg-line);
}

.sg-memorial-overview__list > div:last-child {
  border-bottom: 0;
}

.sg-memorial-overview__list dt,
.sg-memorial-overview__list dd {
  padding: 22px 26px;
}

.sg-memorial-overview__list dt {
  display: flex;
  align-items: center;
  background: #f8f3ea;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.7;
}

.sg-memorial-overview__list dd {
  margin: 0;
  color: var(--sg-text);
  font-size: 15px;
  line-height: 1.9;
}

.sg-memorial-overview__list dd strong {
  color: var(--sg-brown);
  font-family: var(--sg-serif);
  font-size: 22px;
  font-weight: 500;
}

.sg-memorial-overview__list dd span {
  display: block;
  margin-top: 3px;
  color: var(--sg-muted);
  font-size: 13px;
}


/* =========================================================
   大般若経奉納
========================================================= */

.sg-memorial-hannya__intro {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 30px;
  align-items: center;
  margin-bottom: 28px;
}

.sg-memorial-hannya__text {
  padding: 34px 38px;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 10px 26px rgba(80, 67, 42, 0.05);
}

.sg-memorial-hannya__text p {
  margin: 0 0 1.3em;
  color: var(--sg-text);
  font-size: 16px;
  line-height: 2;
}

.sg-memorial-hannya__text p:last-child {
  margin-bottom: 0;
}

.sg-memorial-hannya__main-image {
  padding: 15px;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 10px 26px rgba(80, 67, 42, 0.05);
}

.sg-memorial-hannya__main-image img {
  display: block;
  width: 100%;
  height: auto;
}

.sg-memorial-rules {
  padding: 28px 34px;
  background:
    radial-gradient(
      circle at 92% 8%,
      rgba(185, 155, 98, 0.13),
      transparent 30%
    ),
    linear-gradient(180deg, #fffdf8 0%, #f8f3ea 100%);
  border: 1px solid var(--sg-line);
}

.sg-memorial-rules ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-memorial-rules li {
  position: relative;
  padding: 13px 0 13px 1.45em;
  border-bottom: 1px solid rgba(222, 214, 200, 0.78);
  color: var(--sg-text);
  font-size: 15px;
  line-height: 1.9;
}

.sg-memorial-rules li:last-child {
  border-bottom: 0;
}

.sg-memorial-rules li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--sg-gold);
}

.sg-memorial-rules strong {
  color: var(--sg-brown);
}


/* =========================================================
   奉納イメージ
========================================================= */

.sg-memorial-offering-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.sg-memorial-offering-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 10px 28px rgba(80, 67, 42, 0.05);
}

.sg-memorial-offering-card__image {
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 24px;
  overflow: hidden;
  background: #f6f1e8;
  border-bottom: 1px solid var(--sg-line);
}

.sg-memorial-offering-card__image img {
  display: block;
  width: 100%;
  height: 310px;
  object-fit: contain;
}

.sg-memorial-offering-card__body {
  flex: 1;
  padding: 26px 28px 30px;
}

.sg-memorial-offering-card__label {
  display: inline-block;
  margin: 0 0 11px;
  padding: 4px 11px;
  background: #f7f3ea;
  color: var(--sg-gold);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.1em;
}

.sg-memorial-offering-card h3 {
  margin: 0 0 14px;
  padding: 0 0 14px;
  border: 0;
  border-bottom: 1px solid var(--sg-line);
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.07em;
}

.sg-memorial-offering-card__body p:not(.sg-memorial-offering-card__label) {
  margin: 0 0 1em;
  color: var(--sg-text);
  font-size: 15px;
  line-height: 1.9;
}

.sg-memorial-offering-card__body p:last-child {
  margin-bottom: 0;
}


/* =========================================================
   申込書記入内容
========================================================= */

.sg-memorial-form-items__card {
  padding: 32px 36px;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 10px 26px rgba(80, 67, 42, 0.05);
}

.sg-memorial-form-items__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-memorial-form-items__list li {
  position: relative;
  padding: 12px 0 12px 1.2em;
  border-bottom: 1px solid rgba(222, 214, 200, 0.75);
  color: var(--sg-text);
  font-size: 15px;
  line-height: 1.8;
}

.sg-memorial-form-items__list li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--sg-gold);
}

.sg-memorial-form-items__note {
  margin: 24px 0 0;
  padding: 17px 20px;
  background: #fbf7ef;
  color: var(--sg-text);
  font-size: 14px;
  line-height: 1.9;
}


/* =========================================================
   申込手順
========================================================= */

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

.sg-memorial-step {
  position: relative;
  padding: 30px 24px 26px;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 8px 22px rgba(80, 67, 42, 0.05);
}

.sg-memorial-step__number {
  display: block;
  margin-bottom: 15px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  line-height: 1;
}

.sg-memorial-step h3 {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.6;
}

.sg-memorial-step p {
  margin: 0;
  color: var(--sg-text);
  font-size: 14px;
  line-height: 1.85;
}


/* ダウンロード */
.sg-memorial-downloads {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.sg-memorial-download {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 15px;
  align-items: center;
  min-height: 90px;
  padding: 18px 20px;
  background: #fbf7ef;
  border: 1px solid var(--sg-line);
  color: var(--sg-ink);
  text-decoration: none !important;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.sg-memorial-download:hover {
  transform: translateY(-2px);
  background: #fff;
  border-color: #cdbb97;
  box-shadow: 0 10px 24px rgba(80, 67, 42, 0.1);
}

.sg-memorial-download__type {
  display: grid;
  place-items: center;
  min-width: 50px;
  min-height: 34px;
  padding: 4px 7px;
  background: var(--sg-brown);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.05em;
}

.sg-memorial-download__text {
  font-family: var(--sg-serif);
  font-size: 15px;
  line-height: 1.55;
}

.sg-memorial-download__arrow {
  color: var(--sg-gold);
  font-size: 24px;
}


/* =========================================================
   振込先
========================================================= */

.sg-memorial-payment__layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
}

.sg-memorial-payment__card {
  padding: 30px;
  background: #fff;
  border: 1px solid var(--sg-line);
  box-shadow: 0 10px 26px rgba(80, 67, 42, 0.05);
}

.sg-memorial-payment__card--bank {
  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(185, 155, 98, 0.1),
      transparent 30%
    ),
    linear-gradient(180deg, #fff 0%, #fbf7ef 100%);
}

.sg-memorial-payment__label {
  margin: 0 0 17px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--sg-line);
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 21px;
  line-height: 1.5;
}

.sg-memorial-payment__card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sg-memorial-payment__card li {
  position: relative;
  padding: 11px 0 11px 1.2em;
  border-bottom: 1px solid rgba(222, 214, 200, 0.75);
  color: var(--sg-text);
  line-height: 1.8;
}

.sg-memorial-payment__card li::before {
  content: "・";
  position: absolute;
  left: 0;
  color: var(--sg-gold);
}

.sg-memorial-payment__card dl {
  margin: 0;
}

.sg-memorial-payment__card dl > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(222, 214, 200, 0.75);
}

.sg-memorial-payment__card dl > div:last-child {
  border-bottom: 0;
}

.sg-memorial-payment__card dt {
  color: var(--sg-muted);
  font-size: 13px;
}

.sg-memorial-payment__card dd {
  margin: 0;
  color: var(--sg-ink);
  font-size: 15px;
  line-height: 1.7;
}


/* =========================================================
   連絡先
========================================================= */

.sg-memorial-contact {
  margin-bottom: 0;
}

.sg-memorial-contact__inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: center;
  padding: clamp(30px, 5vw, 48px);
  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(185, 155, 98, 0.14),
      transparent 32%
    ),
    linear-gradient(135deg, #fffaf1 0%, #f4eee2 100%);
  border: 1px solid var(--sg-line);
  box-shadow: 0 14px 36px rgba(80, 67, 42, 0.07);
}

.sg-memorial-contact__en {
  margin: 0 0 8px;
  color: var(--sg-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.sg-memorial-contact h2 {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: clamp(25px, 4vw, 34px);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.1em;
}

.sg-memorial-contact__text > p:not(.sg-memorial-contact__en) {
  margin: 0 0 18px;
  color: var(--sg-text);
  line-height: 1.9;
}

.sg-memorial-contact address {
  margin: 0 0 16px;
  color: var(--sg-text);
  font-style: normal;
  line-height: 1.9;
}

.sg-memorial-contact address strong {
  color: var(--sg-ink);
  font-family: var(--sg-serif);
  font-size: 18px;
  font-weight: 500;
}

.sg-memorial-contact__details {
  margin: 0;
}

.sg-memorial-contact__details > div {
  display: flex;
  gap: 14px;
  align-items: baseline;
  margin-top: 6px;
}

.sg-memorial-contact__details dt {
  min-width: 44px;
  color: var(--sg-muted);
  font-size: 13px;
}

.sg-memorial-contact__details dd {
  margin: 0;
  color: var(--sg-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.sg-memorial-contact__details a {
  color: inherit;
  text-decoration: none;
}

.sg-memorial-contact__actions {
  flex: 0 0 310px;
  display: grid;
  gap: 14px;
}

.sg-memorial-main-button {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  min-height: 58px;
  padding: 15px 21px;
  background: var(--sg-brown);
  border: 1px solid var(--sg-brown);
  color: #fff;
  text-decoration: none !important;
  transition:
    background 0.22s ease,
    color 0.22s ease;
}

.sg-memorial-main-button:hover {
  background: #fff;
  color: var(--sg-brown);
}


/* =========================================================
   Responsive
========================================================= */

@media screen and (max-width: 1100px) {
  .sg-memorial-hannya__intro,
  .sg-memorial-payment__layout {
    grid-template-columns: 1fr;
  }

  .sg-memorial-hannya__main-image {
    max-width: 480px;
    margin: 0 auto;
  }

  .sg-memorial-application__steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sg-memorial-downloads {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 820px) {
  .sg-memorial-section {
    margin-bottom: 52px;
  }

  .sg-memorial-letter__title {
    padding: 28px 22px;
  }

  .sg-memorial-letter__body {
    padding: 30px 24px;
  }

  .sg-memorial-letter__body p {
    font-size: 15px;
    line-height: 2;
  }

  .sg-memorial-overview__list > div {
    grid-template-columns: 1fr;
  }

  .sg-memorial-overview__list dt,
  .sg-memorial-overview__list dd {
    padding: 17px 20px;
  }

  .sg-memorial-overview__list dt {
    border-bottom: 1px solid var(--sg-line);
  }

  .sg-memorial-offering-grid {
    grid-template-columns: 1fr;
  }

  .sg-memorial-offering-card__image {
    min-height: 280px;
  }

  .sg-memorial-offering-card__image img {
    height: 260px;
  }

  .sg-memorial-form-items__list {
    grid-template-columns: 1fr;
  }

  .sg-memorial-contact__inner {
    display: block;
  }

  .sg-memorial-contact__actions {
    margin-top: 28px;
  }
}

@media screen and (max-width: 560px) {
  .sg-memorial-application__steps {
    grid-template-columns: 1fr;
  }

  .sg-memorial-rules,
  .sg-memorial-form-items__card,
  .sg-memorial-payment__card {
    padding: 24px 20px;
  }

  .sg-memorial-offering-card__image {
    min-height: 230px;
  }

  .sg-memorial-offering-card__image img {
    height: 210px;
  }

  .sg-memorial-payment__card dl > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .sg-memorial-contact__actions {
    width: 100%;
  }
}
/* =========================================================
   Memorial project hero
========================================================= */

.sg-memorial-hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  overflow: hidden;

  background-image: var(--memorial-hero-image);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;

  border: 1px solid var(--sg-line);
  box-shadow: 0 14px 38px rgba(80, 67, 42, 0.1);
}

/* 共通ヒーローのベージュ背景を無効化 */
.sg-page-hero.sg-memorial-hero {
  background-color: transparent;
}

/*
 * 写真の上に生成り色のグラデーション
 * 左側を濃くして文字を読みやすくする
 */
.sg-memorial-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;

  background:
    linear-gradient(
      90deg,
      rgba(250, 247, 239, 0.98) 0%,
      rgba(250, 247, 239, 0.94) 28%,
      rgba(250, 247, 239, 0.78) 48%,
      rgba(250, 247, 239, 0.30) 70%,
      rgba(250, 247, 239, 0.08) 100%
    );
}

/* 文字をオーバーレイより上へ */
.sg-memorial-hero .sg-page-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
}

/* 英字 */
.sg-memorial-hero .sg-page-hero__eyebrow {
  color: #a98545;
}

/* 「不動ヶ岡不動尊總願寺 中興第二十世」 */
.sg-memorial-hero__temple {
  margin: 0 0 8px !important;
  color: var(--sg-muted) !important;
  font-family: var(--sg-serif);
  font-size: 14px !important;
  line-height: 1.7 !important;
  letter-spacing: 0.1em;
}

/* メインタイトル */
.sg-memorial-hero h1 {
  margin-bottom: 14px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.5;
}

/* 法要名称 */
.sg-memorial-hero__subtitle {
  margin: 0 0 22px !important;
  color: var(--sg-ink) !important;
  font-family: var(--sg-serif);
  font-size: clamp(18px, 2vw, 22px) !important;
  line-height: 1.8 !important;
  letter-spacing: 0.06em;
}

/* 最後の説明文 */
.sg-memorial-hero .sg-page-hero__inner > p:last-child {
  max-width: 620px;
  line-height: 2;
}

@media screen and (max-width: 820px) {

  .sg-memorial-hero .sg-page-hero__inner {
    text-shadow:
      -1px -1px 0 rgba(255, 255, 255, 0.95),
       1px -1px 0 rgba(255, 255, 255, 0.95),
      -1px  1px 0 rgba(255, 255, 255, 0.95),
       1px  1px 0 rgba(255, 255, 255, 0.95),
       0 0 5px rgba(255, 255, 255, 0.9);
  }

}

/* =========================================================
   Memorial page - mobile spacing
========================================================= */

@media screen and (max-width: 640px) {

  /* ページ全体の左右余白を縮小 */
  .sg-memorial-page {
    width: 100%;
    max-width: none;
  }

  /* 各セクション間の余白も少し縮小 */
  .sg-memorial-section {
    margin-bottom: 44px;
  }

  /* ヒーロー自体の内側余白 */
  .sg-memorial-hero {
    padding: 28px 18px;
    margin-bottom: 38px;
  }

  /* ヒーロー内の文字幅を広く使う */
  .sg-memorial-hero .sg-page-hero__inner {
    max-width: none;
    width: 100%;
  }

  /* 趣意書等のカードも左右を詰める */
  .sg-memorial-letter__body {
    padding: 28px 18px;
  }

  .sg-memorial-rules,
  .sg-memorial-form-items__card,
  .sg-memorial-payment__card {
    padding-left: 18px;
    padding-right: 18px;
  }
}

/* =========================================================
   Raw HTML pages - mobile outer spacing
   固定ページ共通：スマホでは外枠の余白を最小化
========================================================= */

@media screen and (max-width: 820px) {

  /* コンテンツエリア自体の左右余白を最小限に */
  .page-template-template-raw-html-page .content-area {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  /* 外側containerの余白を解除 */
  .page-template-template-raw-html-page .content-area > .container {
    width: 100% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* メインカラムも100% */
  .page-template-template-raw-html-page .main-column {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /*
   * 一番大きな原因。
   * article外枠の内側paddingをゼロにする
   */
  .page-template-template-raw-html-page .article-box--raw-html {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 本文ラッパーにも余計な余白を持たせない */
  .page-template-template-raw-html-page .entry-content--raw-html {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}