:root {
  color-scheme: light;
  --paper: #f3eee1;
  --ink: #232922;
  --gold: #c79643;
  --accent: #765018;
  --muted: #5e655a;
  --panel: #fcf7ea;
  --line: #c9bca2;
  --glass: #f8f4e5b8;
  --glass-line: #ffffffe0;
  --night-shadow: #252b2038;
  --loading-sky: #c8ccbd;
  --loading-fog: #e2ded1;
  --loading-ground: #858d79;
  --loading-ink: #2c2119;
  --loading-bar-start: #93602b;
  --loading-bar-end: #edca83;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Golos Text', system-ui, sans-serif;
  --gutter: clamp(1rem, 4.1vw, 5.4rem);
  --top-space: 5rem;
  --bottom-space: 6.5rem;
  font-family: var(--sans);
  font-synthesis: none;
}

[data-theme="night"] {
  color-scheme: dark;
  --paper: #101a18;
  --ink: #f3eee1;
  --gold: #e1bb70;
  --accent: #e1bb70;
  --muted: #bbc3b5;
  --panel: #202d27;
  --line: #596557;
  --glass: #16241ee6;
  --glass-line: #b8bba251;
  --night-shadow: #0009;
  --loading-sky: #303e4d;
  --loading-fog: #455866;
  --loading-ground: #182725;
  --loading-ink: #fff1d4;
  --loading-bar-start: #bb873f;
  --loading-bar-end: #ffe1a0;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); isolation: isolate; font-size: 1rem; line-height: 1.55; }
img, svg { display: block; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
a { color: inherit; text-underline-offset: .2em; }
a, button, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: .99; }
h2 { font-size: clamp(2.45rem, 4.1vw, 4.4rem); letter-spacing: -.03em; }
h3 { font-size: clamp(1.6rem, 2.3vw, 2.3rem); }
summary { cursor: pointer; }
.icon-library, .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ui-icon { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.skip { position: fixed; z-index: 80; top: .75rem; left: 1rem; transform: translateY(-200%); background: var(--panel); padding: .65rem 1rem; }
.skip:focus { transform: none; }

#world { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #b9c7bf; }
#world canvas, .scene-poster, .scene-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
#world canvas { opacity: 0; }
.scene-poster { background: url('../assets/temple-photo.webp') center 57% / cover no-repeat; }
[data-theme="night"] .scene-poster { filter: brightness(.38) saturate(.65); }
.scene-shade { pointer-events: none; background: linear-gradient(180deg, #faf1dd35, transparent 34%, transparent 62%, #17241a63); }
[data-theme="night"] .scene-shade { background: linear-gradient(180deg, #050e0d55, transparent 36%, transparent 62%, #0008); }
.scene-ready #world canvas { opacity: 1; }
.scene-ready .scene-poster { visibility: hidden; }
body:not(.scene-ready):not(.scene-failed) > :is(.site-header, .experience-nav, .mobile-sheet, main, .footer, .skip, .spatial-layer) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-header { position: fixed; inset: 0 0 auto; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: max(.8rem, env(safe-area-inset-top)) var(--gutter) .6rem; pointer-events: none; }
.top-brand, .footer-brand { display: inline-flex; align-items: center; gap: .58rem; font: 600 1.75rem / 1 var(--serif); text-decoration: none; }
.top-brand {
  background: linear-gradient(145deg,#ffffff72,#ffffff16);
  backdrop-filter: blur(8px) saturate(160%);
  box-shadow: inset 0 1px 1px #fff9, inset 0 -1px 1px #fff3, 0 5px 18px #0002;
  padding: .42rem .8rem .42rem .5rem;
  border: 1px solid var(--glass-line);
  border-radius: 2rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity .28s ease, transform .28s ease;
}
.past-hero:is(.scene-ready,.scene-failed) .top-brand {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.top-brand img { width: 1.7rem; height: 1.7rem; object-fit: contain; }
.header-actions { margin-left: auto; display: flex; align-items: center; pointer-events: auto; }
.top-control, .close-control, .album-controls button { display: inline-flex; align-items: center; justify-content: center; gap: .36rem; min-width: 2.7rem; min-height: 2.7rem; padding: .38rem .62rem; border: 1px solid var(--glass-line); border-radius: 2rem; background: var(--glass); color: var(--ink); }
.top-control:hover, .close-control:hover, .album-controls button:hover:not(:disabled) { border-color: var(--gold); }
.mobile-menu-button { display: none; }

.experience-nav { position: fixed; z-index: 29; left: 50%; bottom: max(1.1rem, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: .55rem; width: max-content; max-width: calc(100% - 2rem); padding: 0; border: 0; background: none; }
.experience-nav a { position:relative; display: flex; align-items: center; gap: .43rem; flex: 0 0 auto; justify-content: center; min-height: 3.2rem; padding: .55rem clamp(.58rem, 1.15vw, 1.1rem); border: 1px solid #ffffff88; border-radius: 2rem; text-decoration: none; white-space: nowrap; font-size: clamp(.72rem, 1.05vw, .85rem); font-weight: 500; color:#fffbed; text-shadow:0 1px 3px #000b; background:linear-gradient(160deg,#ffffff50,#ffffff08 45%,#ffffff20); box-shadow:inset 0 1px 1px #fffd,inset 0 -2px 3px #ffffff28,0 7px 20px #0004; backdrop-filter:blur(6px) saturate(165%); transition:border-color .22s,box-shadow .22s,background .22s; }
.experience-nav a .ui-icon { color: #ffe1a0; filter:drop-shadow(0 1px 2px #0008); }
.experience-nav a::after { content:''; position:absolute; inset:3px; border:1px solid #ffffff12; border-top-color:#ffffff77; border-bottom-color:#ffffff44; border-radius:inherit; pointer-events:none; }
.experience-nav a:hover, .experience-nav a[aria-current="location"] { border-color:#ffe4a8; background:linear-gradient(145deg,#f3cd7b38,#ffffff06 50%,#ebc57818); box-shadow:inset 0 1px 2px #fff,inset 0 -2px 5px #ebc57855,0 7px 22px #0005; }
.liquid-glass-ready .experience-nav a { backdrop-filter:none; background:transparent; }
.liquid-glass-ready .experience-nav a[aria-current="location"] { background:#deb56716; }
.liquid-glass-ready .experience-nav a:hover { background:#ffffff13; }
.top-control { background:linear-gradient(150deg,#ffffff66,#ffffff18); backdrop-filter:blur(8px) saturate(160%); box-shadow:inset 0 1px 1px #fff9,inset 0 -1px 1px #fff4,0 4px 16px #0002; }
[data-theme="night"] :is(.top-brand,.top-control) { background:linear-gradient(150deg,#ffffff20,#ffffff04); border-color:#ffffff65; }
.liquid-glass-ready .mobile-menu-button { background:transparent; backdrop-filter:none; }

/* A tinted surface keeps text legible without re-filtering the moving 3D canvas. */
.lightweight-glass :is(.experience-nav a,.mobile-menu-button,.top-brand,.about-panel,.year-panel) {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.lightweight-glass .experience-nav a {
  background: linear-gradient(160deg, #516052ed, #293b30ed 54%, #425043ed);
}
.lightweight-glass .experience-nav a:is(:hover,[aria-current="location"]) {
  background: linear-gradient(145deg, #715b35f0, #3d4535ef 56%, #5a533aee);
}
.lightweight-glass :is(.mobile-menu-button,.top-brand) {
  background: linear-gradient(150deg, #fffaf0f0, #e7ddcce3);
}
[data-theme="night"] .lightweight-glass :is(.mobile-menu-button,.top-brand) {
  background: linear-gradient(150deg, #35463ce9, #18261ff2);
}
.lightweight-glass :is(.about-panel,.year-panel) {
  background: color-mix(in srgb, var(--panel) 90%, var(--glass));
}
.lightweight-glass dialog::backdrop {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.experience-stage { min-height: 160vh; min-height: calc(var(--scene-stage-unit, 1svh) * 160); position: relative; }
.hero-sticky, .stage-sticky, .surface-wrap { position: sticky; top: 0; min-height: 100vh; min-height: 100svh; }
.stage-sticky, .surface-wrap { display: grid; align-items: center; justify-items: center; padding: var(--top-space) var(--gutter) var(--bottom-space); }
.hero { position: sticky; height: 100svh; min-height: 30rem; }
.hero-heading { position: absolute; left: var(--gutter); top: clamp(5rem, 13%, 13rem); width: min(40vw, 42rem); pointer-events: none; }
.hero-logo-frame { width: 100%; aspect-ratio: 1281 / 599; position: relative; overflow: hidden; overflow: clip; overflow-clip-margin: 2px; clip-path: inset(-2px); }
.hero-logo-art { position: absolute; inset: 0; isolation: isolate; transform-origin: 35.3% 25%; }
:is(.hero-logo, .hero-logo-light) { position: absolute; width: 136.8462%; max-width: none; left: -18.8915%; top: -27.7129%; height: auto; }
[data-theme="day"] .hero-logo { filter: url(#hero-gold-contour); }
.hero-logo-light {
  display: none;
  aspect-ratio: 1753 / 897;
  mask: url('../assets/brand/logo-original.png') center / 100% 100% no-repeat;
  mix-blend-mode: screen;
}
.hero-logo-sweep {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(110deg, transparent 22%, #f3c77a27 37%, #fff1bc 49%, #ffe1a14d 60%, transparent 75%);
}
.intro-brand-active:not(.scene-failed) .hero-logo-art {
  mask-image: radial-gradient(ellipse at 35.3% 0%, #000 55%, transparent 97%);
  mask-position: 35.3% 0%;
  mask-repeat: no-repeat;
  mask-size: 11% 25%;
}
.intro-brand-active:not(.scene-failed) .hero-logo-light { display: block; }
.scene-failed .hero-heading { opacity: 1 !important; }
.scene-failed .hero-logo-art { transform: none !important; }
.hero-bottom {
  position: absolute;
  left: 50%;
  bottom: max(var(--bottom-space), calc(env(safe-area-inset-bottom) + .65rem));
  transform: translateX(-50%);
}
.scroll-prompt {
  display: grid;
  justify-items: center;
  gap: .42rem;
  padding: .2rem .55rem .45rem;
  color: #fff9e9;
  font-size: .92rem;
  font-weight: 550;
  line-height: 1.25;
  letter-spacing: .035em;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 4px #18251b, 0 1px 11px #18251b;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(7px);
  transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s;
}
.scene-ready.flight-complete:not(.past-hero) .scroll-prompt,
.scene-failed .scroll-prompt {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition-delay: 0s;
}
.scroll-prompt .ui-icon {
  width: 2.6rem;
  height: 2.6rem;
  padding: .47rem;
  background: #1a2b20a6;
  border: 1px solid #fff9e9a8;
  border-radius: 50%;
  stroke-width: 1.7;
}
.scene-ready.flight-complete:not(.past-hero):not(.scene-failed) .scroll-prompt .ui-icon { animation: scroll-cue 1.85s ease-in-out infinite; }
@keyframes scroll-cue {
  0%, 24%, 75%, 100% { transform: translateY(0); }
  49% { transform: translateY(6px); }
}
.skip-flight { position: absolute; bottom: calc(var(--bottom-space) + 3.3rem); right: var(--gutter); border: 1px solid var(--glass-line); border-radius: 2rem; background: var(--glass); padding: .45rem .8rem; font-size: .75rem; }
:is(.intro-done,.scene-failed) .skip-flight { display: none; }
.loading-note {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .65rem;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse at 53% 43%, var(--loading-fog), transparent 60%),
    radial-gradient(ellipse at 80% 4%, var(--loading-fog), transparent 52%),
    linear-gradient(163deg, var(--loading-sky) 12%, var(--loading-ground));
  color: var(--loading-ink);
  touch-action: none;
  transition: opacity .55s ease, visibility 0s linear .55s;
}
.loading-note img {
  width: clamp(4.15rem, 11vw, 5.5rem);
  height: auto;
  animation: monogram-breathe 2.35s ease-in-out infinite;
}
.loading-copy { font: 600 clamp(1.45rem, 4.1vw, 2.15rem) / 1.15 var(--serif); text-align: center; }
.loading-meter {
  position: absolute;
  left: max(1.35rem, env(safe-area-inset-left));
  right: max(1.35rem, env(safe-area-inset-right));
  bottom: max(1.35rem, calc(env(safe-area-inset-bottom) + .65rem));
  max-width: 33rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: .8rem;
}
.loading-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: color-mix(in srgb, var(--loading-ink) 27%, transparent);
}
.loading-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--loading-bar-start), var(--loading-bar-end));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .2s ease-out;
}
.loading-percent { min-width: 4ch; font-size: .86rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
@keyframes monogram-breathe {
  0%, 100% { opacity: .8; transform: scale(.975); }
  50% { opacity: 1; transform: scale(1.025); }
}
:is(.scene-ready,.scene-failed) .loading-note { opacity: 0; visibility: hidden; pointer-events: none; }
:is(.scene-ready,.scene-failed) .loading-note img { animation: none; }

.about-panel { justify-self: start; width: min(100%, 27rem); padding: clamp(1.4rem, 2.9vw, 2.8rem); background: var(--glass); border: 1px solid var(--glass-line); border-top: 2px solid var(--gold); box-shadow: 0 .7rem 2rem var(--night-shadow); backdrop-filter: blur(16px); }
.about-panel { width: min(42vw, 33rem); max-height: calc(100svh - var(--top-space) - var(--bottom-space)); overflow: auto; scrollbar-width: thin; }
.about-panel h2 { font-size: clamp(38px, 3.1vw, 50px); }
.about-panel > p { margin-top: .67rem; font-size: 15px; line-height: 1.6; }
.about-dates { display: flex; align-items: center; gap: .62rem; margin-bottom: .62rem; font: 600 1.4rem / 1 var(--serif); color: var(--accent); }
.about-dates span { height: 1px; width: 2rem; background: var(--gold); }
.line-link { display: inline-flex; align-items: center; gap: .42rem; color: var(--accent); font-weight: 600; font-size: .84rem; margin-top: .9rem; }

.scene-surface, .year-panel { width: min(100%, var(--surface-width, 55rem)); color: var(--ink); }
.scene-surface { max-height: calc(100svh - var(--top-space) - var(--bottom-space)); overflow: auto; scrollbar-width: thin; background: var(--panel); border: 1px solid var(--line); padding: clamp(1.05rem, 2.8vw, 2.6rem); box-shadow: 0 .9rem 3.6rem var(--night-shadow); }
.surface-head, .section-head { display: flex; align-items: end; justify-content: space-between; gap: .8rem 2rem; margin-bottom: clamp(.75rem, 2vw, 1.5rem); }
.surface-head > p, .section-head > p { max-width: 31ch; color: var(--muted); font-size: .83rem; }
.surface-index { margin-bottom: .32rem; color: var(--accent); font-size: .7rem; letter-spacing: .025em; }
.history-surface { --surface-width: 54rem; background: linear-gradient(150deg, color-mix(in srgb, var(--panel), var(--gold) 8%), var(--panel) 62%); border: 4px double var(--line); }
.history-layout { display: grid; grid-template-columns:1fr; gap: .8rem; }
.history-comparisons { display:grid; grid-template-columns:1fr 1fr; gap:.65rem; }
.history-compare { position:relative; aspect-ratio:4/3; display:block!important; overflow:hidden; background:#443c2e; }
.history-compare img { position:absolute; inset:0; width:100%; height:100%!important; object-fit:cover; aspect-ratio:auto!important; }
.history-compare .compare-restored { clip-path:inset(0 0 0 var(--split)); }
.history-compare input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:ew-resize; z-index:3; touch-action:pan-y; }
.history-compare:focus-within { outline:2px solid var(--gold); outline-offset:3px; }
.compare-divider { position:absolute; left:var(--split); top:0; bottom:0; width:2px; background:#fff; transform:translateX(-50%); pointer-events:none; z-index:2; box-shadow:0 0 4px #0008; }
.compare-divider span { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:#fff; color:#382e1c; box-shadow:0 2px 8px #0005; }
.compare-label { position:absolute; top:.35rem; padding:.13rem .35rem; color:#fff; background:#0008; font-size:10px; pointer-events:none; z-index:2; }
.compare-label.before {left:.35rem}.compare-label.after {right:.35rem}
.compare-note { grid-column:1/-1; font-size:11px; color:var(--muted); }
.history-surface .section-head { align-items:start; margin-bottom:.8rem; }
.history-surface .section-head >p { font-size:14px; line-height:1.4; }
.history-plate > div { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.history-plate img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.history-plate figcaption, .gallery-grid figcaption { margin-top: .37rem; color: var(--muted); font-size: .71rem; line-height: 1.35; }
.history-links { border-top:1px solid var(--line); display:grid; grid-template-columns:1fr 1fr; gap:0 1rem; }
.history-links > a, .history-links details { display: flex; justify-content: space-between; gap: .45rem; border-bottom: 1px solid var(--line); padding: .44rem 0; font-size: .78rem; text-decoration: none; }
.history-links details { display: block; }
.history-links details p { margin-top: .47rem; }
.history-links a:hover, .history-links summary:hover { color: var(--accent); }
.history-links small { display: block; color: var(--muted); font-size: .68rem; }

.gallery-surface { --surface-width: 54rem; background: linear-gradient(100deg, color-mix(in srgb, var(--panel), var(--gold) 12%), var(--panel) 12%, var(--panel) 88%, color-mix(in srgb, var(--panel), var(--gold) 9%)); border: 1px solid var(--line); border-left: .37rem solid var(--accent); }
.album { perspective: 72rem; }
.album-page { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: .7rem .85rem; }
.album-page + .album-page { margin-top: .8rem; }
.album[data-enhanced] .album-page { margin-top: 0; }
.gallery-grid a { display: block; padding: .21rem; background: color-mix(in srgb, var(--panel), var(--paper) 25%); border: 1px solid var(--line); }
.gallery-grid img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.album-controls { display: flex; justify-content: center; align-items: center; gap: .7rem; margin-top: .7rem; font-size: .75rem; }
.album-controls button { min-height: 2.3rem; min-width: 2.3rem; border-color: var(--line); }
.album-controls output { min-width: 7rem; text-align: center; font-variant-numeric: tabular-nums; }
.album[data-enhanced] .album-page { grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 .85rem; }
.album[data-enhanced] .album-leaf { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:.55rem .45rem; }
.album[data-enhanced] .album-leaf > figure:first-child { grid-column:1/-1; }
@media(max-width:700px){.album[data-enhanced] .album-leaf {grid-template-columns:minmax(0,1fr);}}

.treby-surface { --surface-width: 34rem; border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--panel), var(--gold) 10%), var(--panel) 53%); }
.treby-surface h2 + p { margin: .65rem 0 .9rem; max-width: 45ch; font-size: .82rem; color: var(--muted); }
#trebyForm { display: grid; gap: .37rem; }
#trebyForm label { font-size: .76rem; font-weight: 500; }
#trebyForm small { color: var(--muted); font-weight: 400; }
#trebyForm :is(input, textarea, select) { min-width: 0; width: 100%; padding: .44rem .52rem; border: 1px solid var(--line); border-radius: .16rem; background: color-mix(in srgb, var(--panel), var(--paper) 35%); font-size: .87rem; }
#trebyForm :is(input, select) { min-height: 2.35rem; }
#trebyForm textarea { resize: vertical; min-height: 5rem; line-height: 1.6rem; background-image: repeating-linear-gradient(to bottom, transparent 0 calc(1.6rem - 1px), var(--line) calc(1.6rem - 1px) 1.6rem); background-size: calc(100% - 1rem) 100%; background-repeat: no-repeat; background-position: center .39rem; }
#trebyForm .button { justify-self: start; margin-top: .43rem; }
.form-result { min-height: 1.2em; color: var(--accent); font-size: .75rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.4rem; padding: .4rem .75rem; border: 1px solid var(--accent); background: var(--accent); color: var(--panel); font-size: .78rem; text-decoration: none; border-radius: .2rem; }
.button.outline { color: var(--accent); background: transparent; }

.feed-surface { --surface-width: 57rem; border: 2px solid var(--line); background: linear-gradient(110deg, color-mix(in srgb, var(--panel), var(--gold) 12%), var(--panel) 76%); }
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .58rem; }
.news-grid article { position: relative; min-width: 0; padding: .75rem .61rem .6rem; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: .24rem; }
.news-grid article::before { position: absolute; top: .2rem; left: 50%; width: .28rem; height: .28rem; border-radius: 50%; background: var(--gold); content: ''; }
.news-image { width: 100%; height: auto; aspect-ratio: 2.3; object-fit: cover; }
.news-date, .news-grid article a { color: var(--accent); font-size: .65rem; }
.news-grid p { font-size: .71rem; line-height: 1.34; }
.news-grid p { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.news-grid article a { margin-top: auto; font-weight: 600; }

.stage-restoration-2026 { min-height: 2600vh; min-height: calc(var(--scene-stage-unit, 1svh) * 2600); }
.stage-restoration-2026 .stage-sticky { align-items: end; justify-items: end; }
.year-panel {
  position: relative;
  display: grid;
  gap: .34rem;
  overflow-anchor: none;
  width: clamp(16rem, 28vw, 21.25rem);
  padding: .66rem .83rem .54rem;
  border: 1px solid var(--glass-line);
  border-top: 2px solid var(--gold);
  border-radius: .42rem;
  background: color-mix(in srgb, var(--glass), var(--panel) 46%);
  box-shadow: 0 .65rem 2.7rem var(--night-shadow);
  backdrop-filter: blur(17px);
}
.year-heading { display: flex; align-items: center; justify-content: space-between; gap: .35rem .7rem; }
.year-heading h2 { font-size: clamp(1.75rem, 3vw, 2.24rem); line-height: 1; }
.year-intro > summary { color: var(--accent); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.year-intro > p {
  position: absolute;
  z-index: 1;
  inset-inline: 0;
  bottom: calc(100% + .5rem);
  max-height: min(43svh, 17rem);
  overflow: auto;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: .42rem;
  background: var(--panel);
  box-shadow: 0 .5rem 1.4rem var(--night-shadow);
  font-size: .83rem;
  line-height: 1.45;
}
.year-panel .year-months { display: flex; gap: .25rem; min-width: 0; overflow-x: auto; padding: .12rem .04rem .24rem; scrollbar-width: none; }
.year-panel .year-months::-webkit-scrollbar { display: none; }
.year-months button {
  flex: 0 0 auto;
  min-height: 2.06rem;
  padding: .22rem .56rem;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--panel);
  font-size: .75rem;
  white-space: nowrap;
}
.year-months button:focus-visible { outline-offset: -2px; }
.year-months button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--panel), var(--gold) 26%); font-weight: 650; }
.year-event-caption { min-block-size: 5rem; padding: .21rem .03rem .31rem; font-size: .84rem; line-height: 1.24; }
.year-event-caption time { display: block; margin-bottom: .16rem; color: var(--accent); font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.year-event-title { font-size: .91rem; font-weight: 650; }
@media (min-width: 1120px) {
  .year-event-caption { min-block-size: 3.86rem; }
}
.year-event-footer { display: flex; align-items: center; justify-content: space-between; gap: .3rem .55rem; border-top: 1px solid var(--line); padding-top: .17rem; }
.year-event-links, .year-event-controls { display: flex; align-items: center; gap: .4rem; }
.year-event-links a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--accent); font-size: .75rem; font-weight: 600; }
.year-event-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .28rem .4rem;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--panel);
  font-size: .75rem;
}
.year-event-controls button[aria-disabled="true"] { opacity: .48; cursor: default; }
.year-event-controls [data-event-shift="-1"] .ui-icon { transform: rotate(90deg); }
.year-event-controls [data-event-shift="1"] .ui-icon { transform: rotate(-90deg); }
.year-event-count { min-width: 3rem; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap; }

.donate-surface { --surface-width: 67rem; display: grid; grid-template-columns: .95fr 1.05fr; gap: 1rem; padding: 0; background: transparent; border: 0; box-shadow: none; }
.donation-sheet, .visit-sheet { padding: clamp(1rem, 2vw, 2rem); border: 1px solid var(--line); border-top: 2px solid var(--gold); background: var(--panel); box-shadow: 0 .5rem 1.5rem var(--night-shadow); min-width: 0; }
.donation-sheet p, .visit-sheet p { margin-top: .4rem; font-size: .77rem; }
.donation-sheet h3 { margin-top: .45rem; }
.payment-frame, .contact-map { display: block; width: 100%; border: 0; margin-top: .62rem; }
.payment-frame { max-width: 330px; }
.payment-frame-fit { width: 100%; margin-top: .62rem; overflow: hidden; }
.payment-frame-fit > .payment-frame { width: 330px; max-width: none; height: 50px; margin: 0; transform-origin: 0 0; }
.contact-map { height: clamp(10rem, 24vh, 16rem); background: var(--paper); }
.bank-name { overflow-wrap: anywhere; color: var(--muted); }
.bank { margin: .45rem 0 .25rem; }
.bank > div { display: grid; grid-template-columns: minmax(4rem, .65fr) 1.1fr auto; align-items: center; gap: .29rem; padding: .31rem 0; border-bottom: 1px solid var(--line); font-size: .67rem; }
.bank dd { margin: 0; overflow-wrap: anywhere; }
.bank button { padding: .17rem .22rem; background: transparent; border: 0; color: var(--accent); text-decoration: underline; font-size: .66rem; }
.bank-qr { width: 4.8rem; height: auto; margin-top: .25rem; }
.visit-sheet .button { margin-top: .55rem; }

.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1.5rem; padding: 1.6rem var(--gutter) max(var(--bottom-space), env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); }
.footer > p, .footer > div { font-size: .76rem; }
.footer > div { display: flex; gap: .65rem; }
.footer-brand img { width: 2rem; height: 2rem; object-fit: contain; }

dialog { border: 1px solid var(--line); background: var(--panel); color: var(--ink); box-shadow: 0 1rem 4rem var(--night-shadow); }
dialog::backdrop { background: #0d1915a8; backdrop-filter: blur(5px); }
.sheet-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sheet-header h2 { font-size: clamp(1.85rem, 4vw, 3.3rem); }
.sheet-header .close-control { border-color: var(--line); }
.mobile-sheet { width: min(100%, 33rem); max-width: 100%; margin: auto auto 0; border-radius: 1.2rem 1.2rem 0 0; padding: 1rem 1.15rem max(1.3rem, env(safe-area-inset-bottom)); }
.mobile-sheet[open] { animation: sheet-in .25s ease-out both; }
.mobile-sheet.is-closing { animation: sheet-out .18s ease-in both; }
.mobile-sheet nav { display: grid; margin-top: .6rem; }
.mobile-sheet nav a { display: flex; align-items: center; gap: .75rem; padding: .58rem .3rem; min-height: 2.6rem; text-decoration: none; border-bottom: 1px solid var(--line); }
.mobile-sheet nav a[aria-current="location"], .mobile-sheet nav a .ui-icon { color: var(--accent); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(1.8rem); } to { opacity: 1; transform: none; } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(1rem); } }
.photo-dialog { width: min(95vw, 74rem); max-width: none; max-height: 94svh; background: #131b17; padding: .55rem; color: #fff7e5; }
.photo-dialog img { width: 100%; max-height: 88svh; object-fit: contain; }
.close-photo { position: absolute; top: .65rem; right: .65rem; border: 1px solid #fff5; color: #fff7e5; background: #131b17d9; border-radius: 50%; padding: .54rem; }
.nojs { padding: .8rem var(--gutter); background: var(--paper); }

.scene-failed .experience-stage { min-height: 0; }
.scene-failed :is(.stage-sticky, .surface-wrap) { position: relative; min-height: 0; padding-block: 1.4rem; background: var(--paper); }
.scene-failed .scene-surface { max-height: none; overflow: visible; }
.scene-failed .hero { min-height: max(30rem, 75svh); height: 75svh; }

.spatial-surfaces .scene-surface { position: absolute; width: 720px; height: 520px; max-height: none; overflow: auto; margin: 0; transform-origin: 50% 50%; }
.spatial-surfaces .gallery-surface { width: 800px; }
.spatial-surfaces .gallery-surface { display: flex; flex-direction: column; }
.spatial-surfaces .gallery-surface .surface-head { flex-shrink: 0; }
.spatial-surfaces .gallery-surface .album { min-height: 0; overflow: auto; flex: 1; }
.spatial-surfaces .gallery-surface .album-controls { flex-shrink: 0; border-top: 1px solid var(--line); padding-top: 10px; }
.spatial-surfaces .gallery-surface .album { overflow:hidden; }
.spatial-surfaces .album-leaf img { height:54px; aspect-ratio:auto; object-fit:cover; }
.spatial-surfaces .album-leaf > figure:first-child img { height:98px; }
.spatial-surfaces .album-leaf figcaption { font-size:12px; line-height:1.2; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.spatial-surfaces .gallery-surface .album { overflow:visible; min-height:0; }
.spatial-surfaces .gallery-surface .album-page { height:100%; min-height:0; grid-template-rows:minmax(0,1fr); overflow:hidden; }
.spatial-surfaces .gallery-surface .album-leaf { height:100%; min-height:0; grid-template-rows:minmax(0,1.25fr) minmax(0,1fr); gap:7px 8px; }
.spatial-surfaces .gallery-surface .album-leaf >figure { display:flex; flex-direction:column; min-height:0; overflow:hidden; }
.spatial-surfaces .gallery-surface .album-leaf a { display:block; flex:1; min-height:0; }
.spatial-surfaces .gallery-surface .album-leaf img { height:100%; width:100%; aspect-ratio:auto; }
.spatial-surfaces .gallery-surface .album-leaf >figure:first-child img { height:100%; }
.spatial-surfaces .gallery-surface .album-leaf figcaption { font-size:12px; line-height:1.22; margin-top:4px; flex:none; }
.spatial-surfaces .gallery-surface h2 { font-size:34px; }
.spatial-surfaces .gallery-surface .surface-head >p { font-size:13px; }
.gallery-surface { border-left:0; background:linear-gradient(90deg,var(--panel) 0%,var(--panel) 48.7%,color-mix(in srgb,var(--panel),#74604a 38%) 49.7%,#6c5440 50%,color-mix(in srgb,var(--panel),#74604a 24%) 50.3%,var(--panel) 51.3%,var(--panel) 100%); }
.feed-surface { background:transparent; border:0; box-shadow:none; }
.feed-surface .section-head { background:var(--panel); padding:12px 15px; box-shadow:0 3px 9px #21170d30; }
.feed-surface .news-grid article { box-shadow:0 4px 6px #21170d44; border-color:#aa967a; }
.feed-surface .news-grid article:nth-child(3n+1) { transform:rotate(-.7deg); }
.feed-surface .news-grid article:nth-child(3n+2) { transform:rotate(.6deg); }
.spatial-surfaces .donate-surface { width: 1000px; height: 560px; }
.spatial-surfaces .donate-surface { grid-template-columns: 1fr 1fr; gap: 108px; }
.spatial-surfaces .scene-surface { padding: 25px; }
.spatial-surfaces .donate-surface { padding: 0; }
.spatial-surfaces .scene-surface h2 { font-size: 42px; }
.spatial-surfaces :is(.surface-head > p, .section-head > p, .history-links > a, .history-links details, .gallery-grid figcaption, .news-grid p, .treby-surface h2 + p, .donation-sheet p, .visit-sheet p) { font-size: 16px; }
.spatial-surfaces :is(.history-links small, .history-plate figcaption, .news-date, .news-grid article a, .bank > div, .bank button) { font-size: 14px; }
.spatial-surfaces :is(#trebyForm label, #trebyForm input, #trebyForm select, #trebyForm textarea, .button, .album-controls) { font-size: 17px; }
.spatial-surfaces #trebyForm { grid-template-columns: 1fr 1.2fr; column-gap: 18px; }
.spatial-surfaces #trebyForm label[for="trebyType"] { grid-column: 1; grid-row: 1; }
.spatial-surfaces #trebyType { grid-column: 1; grid-row: 2; }
.spatial-surfaces #trebyForm label[for="names"] { grid-column: 2; grid-row: 1; }
.spatial-surfaces #names { grid-column: 2; grid-row: 2 / 5; min-height: 120px; }
.spatial-surfaces #trebyForm label[for="email"] { grid-column: 1; grid-row: 3; }
.spatial-surfaces #trebyForm input[type="email"] { grid-column: 1; grid-row: 4; }
.spatial-surfaces #trebyForm button[type="submit"] { grid-column: 1 / -1; grid-row: 5; }
.spatial-surfaces #trebyResult { grid-column: 1 / -1; grid-row: 6; }

@media (max-width: 56rem) {
  .experience-nav { gap: .1rem; }
  .experience-nav a { padding-inline: .5rem; }
  .experience-nav a .ui-icon { width: .95rem; height: .95rem; }
  .hero-heading { width: min(45vw, 33rem); }
  .surface-head > p, .section-head > p { max-width: 26ch; }
}

@media (max-width: 699px) {
  :root { --top-space: 4rem; --bottom-space: 2rem; }
  body { font-size: .9rem; }
  .experience-nav { display: none; }
  .mobile-menu-button { display: inline-flex; }
  .hero-heading { top: 12%; width: calc(100% - var(--gutter) * 2); left: var(--gutter); translate: none; text-align: center; }
  .hero-logo { max-height: none; }
  .skip-flight { bottom: 6.25rem; }
  .top-brand { padding: .36rem .64rem .36rem .42rem; font-size: 1.55rem; }
  .top-brand img { width: 1.5rem; height: 1.5rem; }
  .stage-sticky, .surface-wrap { position: relative; min-height: 100svh; padding-top: clamp(5rem, 23svh, 13rem); }
  .stage-sticky[data-panel="about"] { position: sticky; }
  .about-panel { width: 100%; max-height: calc(100svh - 6rem); overflow: auto; }
  .about-panel h2 { font-size: 34px; }
  .about-panel > p { font-size: 14px; }
  .scene-surface { max-height: none; overflow: visible; }
  .surface-head, .section-head { display: block; }
  .surface-head > p, .section-head > p { max-width: 43ch; margin-top: .5rem; }
  .history-layout, .donate-surface { grid-template-columns: 1fr; }
  .history-plate img { aspect-ratio: 4 / 3; }
  .album-page { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .donate-surface { gap: .7rem; }
  .footer { padding-bottom: 1.2rem; }
}

@media (max-width: 23rem) {
  .top-brand { font-size: 1.28rem; }
  .top-control { min-width: 2.38rem; min-height: 2.38rem; }
  .bank > div { grid-template-columns: minmax(3rem, .65fr) 1.05fr auto; }
}

@media (max-width: 699px), (max-width: 999px) and (max-aspect-ratio: 17/20) {
  .stage-sticky[data-panel="about"] {
    align-content: end;
    justify-items: center;
    min-height: 100svh;
    padding: 0 var(--gutter) max(1rem,env(safe-area-inset-bottom));
  }
  .about-panel {
    width: min(100%, 38rem);
    max-height: min(46svh, 420px);
    padding: 14px 16px;
    overflow: auto;
  }
  .about-panel h2 { font-size: 31px; }
  .about-panel > p { font-size: 15px; }
}
@media (max-width: 699px), (max-width: 999px) and (max-aspect-ratio: 17/20) {
  .stage-restoration-2026 .stage-sticky {
    position: sticky;
    top: 0;
    justify-items: center;
    min-height: 100svh;
    padding: 0 var(--gutter) max(.65rem, env(safe-area-inset-bottom));
  }
  .year-panel { gap: .22rem; width: min(100%, 34rem); padding: .52rem .65rem .4rem; }
  .year-heading h2 { font-size: clamp(1.63rem, 6vw, 2.05rem); }
  .year-months button { min-height: 1.95rem; }
  .year-event-caption { min-block-size: 3.6rem; padding-block: .14rem .19rem; }
  .year-event-title { font-size: .88rem; }
}
@media (max-width: 344px) {
  .year-event-caption { min-block-size: 4.72rem; }
}
@media (min-width: 700px) and (max-width: 999px) and (max-aspect-ratio: 17/20) {
  .stage-restoration-2026 .stage-sticky { padding-bottom: var(--bottom-space); }
}
.scene-failed .stage-restoration-2026 .stage-sticky {
  position: relative;
  min-height: 0;
  padding: 1.4rem var(--gutter);
}
.scene-failed .year-intro > p { position: static; max-height: none; margin-top: .5rem; }
.scene-failed .year-heading:has(.year-intro[open]) { display: block; }

.spatial-surfaces .scene-surface.surface-responsive {
  padding: 16px;
  font-size: 16px;
  line-height: 1.38;
  touch-action: pan-y pinch-zoom;
}
.spatial-surfaces .scene-surface.surface-responsive h2 { font-size: 34px; line-height: 1.02; }
.spatial-surfaces .scene-surface.surface-responsive .surface-head,
.spatial-surfaces .scene-surface.surface-responsive .section-head { gap: 10px 18px; margin-bottom: 11px; }
.spatial-surfaces .scene-surface.surface-responsive :is(p, figcaption, small, time, .history-links a, .history-links summary, .bank > div, .bank button, .news-grid article a, .album-controls) {
  font-size: 16px;
  line-height: 1.3;
}
.spatial-surfaces .scene-surface.surface-responsive :is(input, select, textarea, .button, .album-controls button, .bank button) {
  font-size: 16px;
  min-height: 46px;
}
.spatial-surfaces .scene-surface.surface-responsive .album-controls button { min-width: 46px; }
.spatial-surfaces .scene-surface.surface-responsive .surface-index { margin-bottom: 4px; font-size: 16px; }
.spatial-surfaces .scene-surface.surface-narrow :is(.surface-head, .section-head) { display: block; }
.spatial-surfaces .scene-surface.surface-narrow h2 { font-size: 31px; }
.spatial-surfaces .scene-surface.surface-narrow :is(.surface-head, .section-head) > p { max-width: none; margin-top: 6px; }
.spatial-surfaces .scene-surface.surface-narrow .history-layout { grid-template-columns: 1fr; }
.spatial-surfaces .scene-surface.surface-narrow #trebyForm { display: flex; flex-direction: column; gap: 7px; }
.spatial-surfaces .scene-surface.surface-narrow #trebyForm label { font-size: 16px; }
.spatial-surfaces .scene-surface.surface-narrow #trebyForm textarea { min-height: 99px; }
.spatial-surfaces .scene-surface.surface-narrow #trebyForm button { align-self: flex-start; }
.spatial-surfaces .scene-surface.surface-responsive .news-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.spatial-surfaces .scene-surface.surface-narrow .news-grid { grid-template-columns: minmax(0,1fr); }
.spatial-surfaces .gallery-surface.surface-responsive .album-leaf { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px; }
.spatial-surfaces .gallery-surface.surface-responsive .album-leaf figcaption { margin-top: 3px; }
.spatial-surfaces .gallery-surface.surface-responsive .surface-head > p { display: none; }
.spatial-surfaces .gallery-surface.surface-responsive .album-controls { padding-top: 4px; }
.spatial-surfaces .gallery-surface.surface-narrow .surface-head {
  padding-block: 4px;
  background: var(--panel);
  text-align: center;
}
.spatial-surfaces .gallery-surface.surface-narrow .album-leaf {
  grid-template-columns: minmax(0,1fr);
  grid-template-rows: minmax(0,1.18fr) repeat(2,minmax(0,1fr));
}
.gallery-surface:has(.album[data-layout="photo"]) {
  background: var(--panel);
  border-left: 1px solid var(--line);
}
.album-single-page { position: relative; height: clamp(12rem, 54svh, 30rem); min-height: 0; }
.album-single-page[hidden] { display: none; }
.album-single-page figure { display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 4px; height: 100%; min-height: 0; margin: 0; }
.album-single-page figure a { min-height: 0; display: block; background: color-mix(in srgb,var(--panel),var(--ink) 7%); }
.album-single-page figure img { width: 100%; height: 100%; object-fit: contain; aspect-ratio: auto; }
.album-single-page figcaption { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0; text-align: center; }
.album-single-turn { position: absolute; inset: 0; pointer-events: none; z-index: 1; perspective: 920px; background: var(--panel); }
.album-single-sheet {
  position: absolute; inset: 0; transform-origin: left center; backface-visibility: hidden;
  background: var(--panel); box-shadow: 2px 2px 5px rgb(39 28 19 / .27);
}
.spatial-surfaces .gallery-surface.gallery-compact {
  padding: 10px 12px 7px;
  overflow: hidden !important;
  border-radius: 4px;
}
.spatial-surfaces .gallery-surface.gallery-compact .surface-head {
  display: block;
  padding: 0;
  margin-bottom: 7px;
  text-align: center;
}
.spatial-surfaces .gallery-surface.gallery-compact .surface-head .surface-index { display: none; }
.spatial-surfaces .gallery-surface.gallery-compact h2 { font-size: 29px; line-height: .98; }
.spatial-surfaces .gallery-surface.gallery-compact .album { overflow: hidden; }
.spatial-surfaces .gallery-surface.gallery-compact .album-single-page { height: 100%; }
.spatial-surfaces .gallery-surface.gallery-compact .album-single-page figcaption { font-size: 14px; line-height: 1.16; }
.spatial-surfaces .gallery-surface.gallery-compact .album-controls { gap: 10px; padding-top: 1px; }
.spatial-surfaces .gallery-surface.gallery-compact .album-controls button { min-width: 44px; min-height: 44px; }
.spatial-surfaces .gallery-surface.gallery-compact .album-controls output { min-width: 6.5rem; }
.spatial-surfaces .donate-surface.surface-responsive { padding: 0; gap: 10%; }
.spatial-surfaces .donate-surface.surface-stacked {
  grid-template-columns: minmax(0,1fr);
  grid-template-rows: repeat(2,minmax(0,1fr));
  gap: 12px;
}
.spatial-surfaces .donate-surface.surface-responsive :is(.donation-sheet, .visit-sheet) {
  min-height: 0;
  padding: 13px;
  overflow: auto;
}
.spatial-surfaces .donate-surface.surface-responsive .bank > div { grid-template-columns: minmax(0,1fr) auto; }
.spatial-surfaces .donate-surface.surface-responsive .bank dt { grid-column: 1 / -1; color: var(--muted); }
.spatial-surfaces .donate-surface.surface-responsive .contact-map { height: 170px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .loading-note img, .scene-ready.flight-complete:not(.past-hero):not(.scene-failed) .scroll-prompt .ui-icon { animation: none; }
  .hero-heading { opacity: 1 !important; }
  .hero-logo-art { mask: none !important; transform: none !important; }
  .hero-logo-light { display: none !important; }
}
