:root {
  --sans: var(--serif);
}
html:lang(zh-Hant) { --serif: "Songti TC", PMingLiU, "Noto Serif CJK TC", "Noto Serif TC", serif; }
html:lang(en) { --serif: Georgia, "Times New Roman", serif; }
html:lang(ja) { --serif: "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", "Noto Serif CJK JP", serif; }
html:lang(ko) { --serif: "AppleMyungjo", Batang, "Noto Serif CJK KR", "Noto Serif KR", serif; }
body { font-weight: 400; }
select { font: inherit; }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.music-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
}
.music-toggle .music-waves, .music-toggle[aria-pressed="true"] .music-cross { display: none; }
.music-toggle[aria-pressed="true"] { color: var(--red); }
.music-toggle[aria-pressed="true"] .music-waves { display: initial; }
.language-picker { display: flex; align-items: center; gap: 9px; color: var(--muted); flex-shrink: 0; }
.language-picker svg { flex-shrink: 0; }
.language-picker select { color: var(--ink); background: transparent; border: 0; border-radius: 0; padding: 10px 4px; font-size: 12px; cursor: pointer; max-width: 145px; }
.language-picker select:focus-visible { outline: 1px solid var(--red); outline-offset: 4px; }
.language-picker option { background: var(--paper); }
.gate-view .site-header { max-width: 1200px; padding-top: 24px; padding-bottom: 24px; }
.gate-view .site-header nav, .gate-view .demo-toggle, .gate-view #demo-panel,
.gate-view .site-footer { display: none; }
.gate-view .brand small { display: none; }
.gate-view .brand-name { font-size: 23px; letter-spacing: .16em; }
.temple-age { margin: 0; min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.gate-view .header-tools { margin-left: auto; }
.gate-view main { max-width: 1080px; min-height: 0; }
.temple-map { padding: 25px 0 0; }
.temple-contact {
  padding: 0 0 16px;
  text-align: right;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.temple-contact h2 { margin: 0 0 4px; font-size: inherit; font-weight: 500; color: var(--ink); }
.temple-contact ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 14px; margin: 0; padding: 0; list-style: none; }
.temple-contact a { color: var(--ink); text-decoration: underline; text-underline-offset: .22em; }
.temple-contact a:hover, .temple-contact a:focus-visible { color: var(--red); }
.with-scene-panels {
  display: grid;
  grid-template-columns: clamp(146px, 17vw, 185px) minmax(0, 1fr) clamp(146px, 17vw, 185px);
  gap: clamp(12px, 2vw, 28px);
  align-items: start;
}
.temple-plan { position: relative; width: 100%; max-width: 900px; margin: 0 auto; height: clamp(610px, calc(100svh - 155px), 780px); }
.scene-panel {
  min-width: 0;
  margin-top: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 12px;
  line-height: 1.8;
}
.scene-panel h2 { margin: 0 0 10px; font-size: 13px; font-weight: 500; }
.scene-list { margin: 0; padding: 0; list-style: none; overflow-wrap: anywhere; }
.scene-list li + li { margin-top: 9px; }
.scene-observations .scene-list {
  min-height: 100px;
  max-height: 212px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.scene-visitors .scene-list { min-height: 100px; }
.scene-visitor-marker { color: var(--muted); }
@media(min-width:821px) {
  .with-scene-panels .temple-plan { grid-column: 2; grid-row: 1; }
  .scene-observations { grid-column: 1; grid-row: 1; }
  .scene-visitors { grid-column: 3; grid-row: 1; }
}
.temple-building { position: absolute; transform: translate(-50%, -50%); width: 22%; margin: 0; text-align: center; font-weight: 400; font-size: 22px; line-height: 1.6; letter-spacing: .23em; }
.temple-building a, .temple-building .map-unavailable {
  display: inline-block;
  padding: 7px 4px;
}
.temple-building a, .map-unavailable {
  text-decoration: underline;
  text-decoration-color: #969789;
  text-decoration-thickness: 1px;
  text-underline-offset: .38em;
  text-decoration-skip-ink: none;
}
.temple-map .map-unavailable { color: var(--muted); }
.temple-building a:hover, .temple-building a:focus-visible { text-decoration-color: currentColor; }
.building-main { left: 50%; top: 14%; width: 31%; }
.building-main { font-size: 28px; }
.building-lamp { left: 23%; top: 36%; }
.building-dharma { left: 77%; top: 36%; }
.building-drum { left: 23%; top: 58%; }
.building-bell { left: 77%; top: 58%; }
.building-gate { left: 50%; top: 77%; width: 24%; }
.courtyard-label { position: absolute; top: 47%; left: 50%; transform: translate(-50%, -50%); margin: 0; font-size: 12px; letter-spacing: .42em; text-indent: .42em; color: #989d8e; }
.mountain-path-label { position: absolute; top: 92%; left: 50%; transform: translate(-50%, -50%); margin: 0; font-size: 12px; letter-spacing: .2em; text-indent: .2em; text-align: center; color: var(--muted); }
.building-page { display: block; padding-top: clamp(52px, 10vh, 110px); text-align: center; }
.lamp-hall-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  column-gap: 16px;
  margin: 12px 0 18px;
}
.lamp-hall-title h1 { margin: 0; }
.lamp-hall-title .small-action { flex-shrink: 0; }
.lamp-sync { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.lamp-sync p { margin: 0; font-size: 12px; color: var(--muted); }
.lamp-sync:has(p:not(:empty)) { margin-bottom: 12px; }
.lamp-stage-ceramic { --lamp-fire: #c28535; }
.lamp-stage-classic { --lamp-fire: #a15036; }
.lamp-stage-kerosene { --lamp-fire: #327e77; }
.lamp-stage-magic { --lamp-fire: #7a5599; }
:is(.lamp-cell, .detail-flame):is(.lit, .low) .flame {
  background: var(--lamp-fire);
  box-shadow: 0 0 8px color-mix(in srgb, var(--lamp-fire), transparent 72%);
}
:is(.lamp-cell, .detail-flame):is(.lit, .low, .out) .flame::after { color: var(--lamp-fire); }
:is(.lamp-cell, .detail-flame).out .flame { border-color: var(--lamp-fire); }
.lamp-grid .lamp-cell { min-height: 88px; padding-top: 27px; }
.lamp-burn-duration {
  margin-top: -9px;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}
.lamp-caption {
  position: absolute;
  inset: 5px 4px auto;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink);
  text-align: start;
  pointer-events: none;
}
.lamp-caption-text {
  display: block;
  width: max-content;
  padding-inline-start: 100%;
  white-space: nowrap;
  animation: lamp-caption-slide linear infinite;
}
@keyframes lamp-caption-slide {
  to { transform: translateX(-100%); }
}
.captions-paused .lamp-caption-text,
.lamp-cell:focus-visible .lamp-caption-text { animation-play-state: paused; }
@media (hover: hover) {
  .lamp-cell:hover .lamp-caption-text { animation-play-state: paused; }
}
.caption-toggle { align-self: flex-start; padding: 0; }
@media (prefers-reduced-motion: reduce) {
  .lamp-caption-text { width: auto; padding: 0; overflow: hidden; text-overflow: ellipsis; }
  .caption-toggle { display: none; }
}
.temple-back-link { display: inline-block; }
.temple-back-link span { margin: 0 8px 0 0; }
.page-heading p + .temple-back-link { margin-top: 12px; }
.gate-notices {
  max-width: 570px;
  margin: 30px auto 24px;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: 14px;
  line-height: 1.95;
  overflow-wrap: anywhere;
}
.gate-notices li { padding: 15px 4px; border-bottom: 1px solid var(--line); }
.gate-signature { display: inline-block; color: var(--muted); }
html:lang(en) .gate-view .brand-name { font-size: 20px; letter-spacing: .04em; }
html:lang(en) .temple-building { font-size: 16px; letter-spacing: .015em; }
html:lang(en) .building-main { font-size: 23px; }
html:lang(en) .courtyard-label, html:lang(en) .mountain-path-label { letter-spacing: .04em; text-indent: 0; }
html:lang(ko) .temple-building { letter-spacing: .1em; }
@media(max-width:820px) {
  .with-scene-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 20px; }
  .with-scene-panels .temple-plan { grid-column: 1 / -1; grid-row: 1; }
  .scene-panel { margin-top: 0; }
  .scene-observations .scene-list { max-height: 150px; }
}
@media(max-width:660px) {
  .gate-view .site-header { flex-wrap: nowrap; padding: 19px 20px; gap: 13px; }
  .gate-view .brand-name { font-size: 20px; letter-spacing: .13em; }
  .gate-view .brand { gap: 10px; }
  .gate-view main { margin-left: 12px; margin-right: 12px; }
  .header-tools { gap: 4px; }
  .music-toggle { width: 34px; height: 34px; }
  .language-picker { gap: 5px; }
  .language-picker select { font-size: 11px; max-width: 94px; }
  .temple-map { padding-top: 23px; }
  .temple-plan { min-height: 540px; height: calc(100svh - 132px); max-height: 740px; }
  .hall-toolbar, .hall-toolbar .filters { flex-wrap: wrap; }
  .temple-building { width: 29%; font-size: 19px; letter-spacing: .12em; }
  .building-lamp { font-size: 17px; letter-spacing: .04em; }
  .building-main { width: 46%; font-size: 23px; }
  .building-lamp, .building-drum { left: 22%; }
  .building-dharma, .building-bell { left: 78%; }
  .building-gate { width: 33%; font-size: 21px; }
  .courtyard-label { font-size: 11px; letter-spacing: .2em; }
  .mountain-path-label { font-size: 11px; letter-spacing: .08em; }
  html:lang(en) .gate-view .brand-name { font-size: 17px; letter-spacing: 0; }
  html:lang(en) .gate-view .brand { gap: 8px; }
  html:lang(en) .temple-building { font-size: 12px; line-height: 1.5; }
  html:lang(en) .building-main { font-size: 18px; }
  html:lang(en) .mountain-path-label { font-size: 10px; }
  html:lang(ja) .building-lamp { font-size: 17px; letter-spacing: .02em; }
}
@media(max-width:540px) {
  .home-view .site-header {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    row-gap: 6px;
  }
  .home-view .header-tools { grid-column: 2; justify-self: end; }
  .temple-age { font-size: 11px; }
}
