:root {
  --ink: #211b17;
  --soft: #655b53;
  --paper: #f7efe2;
  --paper2: #fffaf2;
  --red: #9b3029;
  --red2: #671e1a;
  --gold: #b88a34;
  --gold2: #efd58b;
  --green: #30493d;
  --green2: #1b2d25;
  --line: rgba(33,27,23,.14);
  --shadow: 0 22px 60px rgba(43,30,20,.14);
  --radius: 28px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg,#fffaf3,var(--paper));
  font-family: "Hiragino Sans","Yu Gothic",Meiryo,sans-serif;
  line-height: 1.8;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

.site-header {
  background: linear-gradient(135deg,var(--green2),var(--green));
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.12);
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.brand {
  font-family: "Hiragino Mincho ProN","Yu Mincho",serif;
  font-size: clamp(20px,3vw,28px);
  font-weight: 800;
  letter-spacing: .06em;
}

.brand small {
  display: block;
  font-family: inherit;
  font-size: 11px;
  color: var(--gold2);
  letter-spacing: .18em;
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 13px;
  font-weight: 800;
}

.nav a {
  padding: 8px 3px;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: var(--gold2);
  border-color: var(--gold2);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg,rgba(29,25,22,.96),rgba(103,30,26,.84),rgba(27,45,37,.84));
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "祈";
  position: absolute;
  right: 4vw;
  top: 0;
  font-family: "Yu Mincho",serif;
  font-size: min(34vw,300px);
  line-height: 1;
  color: rgba(255,255,255,.055);
  z-index: -1;
}

.hero-inner {
  padding: clamp(70px,11vw,130px) 0;
  max-width: 850px;
}

.eyebrow {
  color: var(--gold2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2em;
}

.hero h1 {
  font-family: "Hiragino Mincho ProN","Yu Mincho",serif;
  font-size: clamp(42px,8vw,88px);
  line-height: 1.12;
  letter-spacing: .07em;
  margin: 12px 0 20px;
}

.hero-lead {
  font-size: clamp(16px,2.1vw,21px);
  color: rgba(255,255,255,.88);
  max-width: 760px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 14px;
}

.btn-gold {
  background: linear-gradient(135deg,#f5dfa0,var(--gold));
  color: #281c14;
}

.btn-ghost {
  border: 1px solid rgba(255,255,255,.34);
  background: rgba(255,255,255,.08);
  color: #fff;
}

.section {
  padding: 78px 0;
}

.section.alt {
  background: rgba(255,255,255,.45);
}

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

.kicker {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

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

.lead {
  color: var(--soft);
  max-width: 830px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.card {
  background: rgba(255,250,242,.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-body {
  padding: clamp(24px,4vw,38px);
}

.card h3 {
  font-family: "Yu Mincho",serif;
  color: var(--red2);
  font-size: 26px;
  margin: 0 0 12px;
}

.photo {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg,#e3d1b6,#b9a17e);
  display: grid;
  place-items: center;
  color: #5d4b38;
  font-family: "Yu Mincho",serif;
  font-weight: 800;
  letter-spacing: .08em;
}

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

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

.news-item {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.news-item time {
  display: block;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.news-item strong {
  display: block;
  margin: 3px 0;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.info-table th,
.info-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.info-table th {
  width: 28%;
  background: #f5ead7;
  color: var(--green2);
}

.map-link {
  margin-top: 18px;
}

.closing {
  padding: 68px 0;
  color: #fff;
  background: linear-gradient(135deg,var(--red2),#211b17);
  text-align: center;
}

.closing h2 {
  font-family: "Yu Mincho",serif;
  font-size: clamp(28px,5vw,48px);
  margin: 0 0 12px;
}

footer,
.footer {
  background: #211b17;
  color: rgba(255,255,255,.78);
  padding: 30px 0;
  text-align: center;
  font-size: 12px;
}

footer p,
.footer p {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

footer a,
.footer a {
  color: var(--gold2);
}

.goshuin-intro {
  margin-bottom: 46px;
}

.collection-section {
  margin-top: 44px;
}

.collection-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.collection-heading span {
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .18em;
}

.collection-heading h3 {
  margin: 0;
  font-family: "Hiragino Mincho ProN","Yu Mincho",serif;
  font-size: clamp(25px,4vw,36px);
  color: var(--green2);
}

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

.collection-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(43,30,20,.10);
}

.collection-photo {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg,#e3d1b6,#b9a17e);
  display: grid;
  place-items: center;
  color: #5d4b38;
  font-family: "Yu Mincho",serif;
  font-weight: 800;
}

.collection-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-body {
  padding: 20px;
}

.collection-body h4 {
  margin: 0 0 12px;
  font-family: "Yu Mincho",serif;
  font-size: 22px;
  color: var(--red2);
  line-height: 1.45;
}

.collection-body p {
  margin: 14px 0 0;
  color: var(--soft);
  font-size: 14px;
}

.collection-meta {
  display: grid;
  gap: 8px;
}

.collection-meta span {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f7efe2;
  font-size: 13px;
}

.collection-meta b {
  color: var(--green2);
}

.collection-empty {
  grid-column: 1/-1;
  margin: 0;
  padding: 22px;
  border: 1px dashed #cdbb9f;
  border-radius: 16px;
  background: rgba(255,255,255,.55);
  color: var(--soft);
  text-align: center;
}

@media(max-width:900px) {
  .collection-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

}

@media(max-width:780px) {
  .header-inner {
    min-height: 66px;
  }

  .nav {
    display: none;
  }

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

  .section {
    padding: 58px 0;
  }

  .info-table th,
  .info-table td {
    display: block;
    width: 100%;
  }

  .info-table th {
    padding-bottom: 6px;
  }

  .info-table td {
    padding-top: 8px;
  }

  .hero-inner {
    padding: 64px 0;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .collection-meta span {
    grid-template-columns: 1fr;
    gap: 2px;
  }

}

/* v1.2 境内案内 */

.keidai-grid {
  margin-top: 8px;
}

.keidai-card .collection-body p {
  margin-top: 0;
}

.keidai-card .collection-photo {
  aspect-ratio: 4/3;
}

/* =========================================================
   御朱印道 クレジット表示
   ========================================================= */
.system-credit {
  margin-top: 8px;
  font-size: 10px;
  text-align: center;
  opacity: 0.65;
}

.system-credit a {
  color: inherit;
  text-decoration: none;
}

.system-credit a:hover {
  text-decoration: underline;
}

/* ----------------------------------------
   公開デモ専用の固定案内（CMSの再生成後も有効）
----------------------------------------- */
body { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
.demo-public-bar {
  position: fixed;
  z-index: 1100;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 36px);
  padding: 8px 9px 8px 15px;
  border: 1px solid rgba(226, 193, 116, .65);
  border-radius: 9px;
  background: rgba(31, 41, 34, .97);
  color: #fff;
  box-shadow: 0 9px 24px rgba(25, 20, 14, .22);
  font-size: 12px;
  line-height: 1.4;
}
.demo-public-bar__label { font-weight: 800; color: #f3dcac; white-space: nowrap; }
.demo-public-bar__label small { display: block; font-size: 10px; font-weight: 400; color: #fff9eb; }
.demo-public-bar__actions { display: flex; align-items: center; gap: 8px; }
.demo-public-bar__actions a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.demo-public-bar__admin { color: #2e251a; background: #f0d58c; }
.demo-public-bar__return { color: #fff; background: #a6231c; }
.demo-public-bar__actions a:hover { filter: brightness(1.11); }
.demo-public-bar__actions a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
@media (max-width: 680px) {
  body { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
  .demo-public-bar {
    right: 10px;
    left: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    max-width: none;
    justify-content: space-between;
    gap: 8px;
    padding: 8px;
  }
  .demo-public-bar__label { font-size: 11px; white-space: normal; }
  .demo-public-bar__actions { gap: 5px; }
  .demo-public-bar__actions a { min-height: 44px; padding: 7px; font-size: 10px; white-space: normal; }
}
@media (max-width: 375px) {
  .demo-public-bar__label small { display: none; }
  .demo-public-bar__actions a { font-size: 10px; }
}
