/*
  Lightfall: audio guide for Ashcombe Minster (Screenery template)
  1. Tokens: lead and iron, seven pot-metal glass colours, type, spacing. Every section is a .pane of glass on a lead ground.
  2. The guide: the SVG window (lit from behind, light modes, selection), the reader pane with transcript and player.
  3. Tour plan, the drawn phone, the booking forms and ticket, visiting grid, footer, then responsive and motion rules.
*/

:root {
  /* Lead and iron */
  --lead: #17141a;        /* came between panes, page ground */
  --iron: #0c0a0e;        /* saddle bars, deepest line */
  --night: #0e0c14;       /* unlit stone around the window */

  /* Pot-metal glass, as it reads on the page panes */
  --ruby: #8f1424;        /* copper-red, flashed */
  --cobalt: #1b3a92;      /* cobalt blue */
  --emerald: #1b5e38;     /* copper green */
  --amber: #e8b13a;       /* silver stain yellow */
  --murrey: #57204d;      /* manganese purple */
  --white-glass: #ebe6cd; /* greenish white glass, grisaille */
  --flesh: #f0d2b8;

  /* Text on glass */
  --on-dark: #f7f1dc;
  --on-dark-2: #e4dcc2;
  --on-white: #17141a;
  --on-white-2: #4a4250;
  --on-cobalt-2: #d6defa;
  --on-emerald-2: #d4ecd9;
  --on-ruby-2: #f6d8d6;
  --on-murrey-2: #efd9ea;
  --err: #8f1424;

  /* Type */
  --display: "Almendra", "Vollkorn", Georgia, serif;
  --body: "Vollkorn", Georgia, serif;
  --fs-0: 0.875rem;
  --fs-1: 1.0625rem;
  --fs-2: 1.25rem;
  --fs-3: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  --fs-4: clamp(2.1rem, 1.3rem + 3vw, 4rem);

  /* Space and lead widths */
  --came: 10px;
  --came-thin: 6px;
  --s1: 0.5rem; --s2: 0.75rem; --s3: 1rem; --s4: 1.5rem; --s5: 2.25rem; --s6: 3.5rem;
  --r: 6px;               /* lead joints are rounded, never sharp */
  --gutter: clamp(16px, 3vw, 40px);

  /* Glass texture: streaky noise like hand-blown sheet */
  --seedy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85 .05' numOctaves='2' seed='3'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

/* ---------- Base and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; scrollbar-color: var(--amber) var(--lead); }
body {
  margin: 0;
  background: var(--lead);
  color: var(--on-dark);
  font: 400 var(--fs-1)/1.55 var(--body);
  font-variant-numeric: oldstyle-nums;
  caret-color: var(--amber);
  accent-color: var(--amber);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--amber); color: var(--lead); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--lead); }
::-webkit-scrollbar-thumb { background: var(--amber); border: 3px solid var(--lead); border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 3px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.small { font-size: var(--fs-0); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--amber); color: var(--lead); padding: 10px 14px; border-radius: var(--r); }
.skip:focus { top: 12px; }

/* Buttons: glass lozenges set in lead */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 3px solid var(--iron); border-radius: var(--r);
  font: 600 var(--fs-1)/1 var(--body); text-decoration: none;
  transition: background-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-amber { background: var(--amber); color: var(--lead); box-shadow: 0 6px 14px -8px rgb(0 0 0 / .6); }
.btn-amber:hover { background: #f3c45a; }
.btn-amber:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: rgb(23 20 26 / .08); }
.btn-ghost-dark { background: var(--lead); color: var(--on-dark); }
.btn-ghost-dark:hover { background: #2a2530; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.big { min-height: 52px; padding: 0 26px; font-size: var(--fs-2); }
.btn.is-loading span::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Header: an opaque lead bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--s4);
  padding: 10px var(--gutter);
  background: var(--lead);
  border-bottom: 2px solid #2b2630;
}
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.5rem/1 var(--display); color: var(--on-dark); }
.mark svg { width: 32px; height: 32px; }
.mk-glass { fill: var(--cobalt); stroke: var(--amber); stroke-width: 2; }
.mk-lead { stroke: var(--lead); stroke-width: 2.5; fill: none; }
.mk-ruby { fill: #c21f33; stroke: var(--lead); stroke-width: 2; }
.nav { display: flex; gap: var(--s4); margin-left: var(--s3); }
.nav a { text-decoration: none; color: var(--on-dark-2); padding: 10px 2px; }
.nav a:hover { color: var(--on-dark); text-decoration: underline; }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.lang select {
  appearance: none; min-height: 44px; padding: 0 36px 0 14px;
  background: #221e27 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23e8b13a' stroke-width='1.75' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
  border: 2px solid #3a3440; border-radius: var(--r);
}
.lang option { background: var(--lead); }

/* ---------- Panes: each section is a sheet of glass in lead ---------- */
main { display: grid; gap: var(--came); padding: var(--came); }
.pane {
  position: relative; isolation: isolate; overflow: clip;
  border-radius: var(--r);
  padding: var(--s6) var(--gutter);
  box-shadow: inset 0 0 0 2px rgb(0 0 0 / .35), inset 0 0 60px rgb(0 0 0 / .25);
  background-image: var(--seedy), radial-gradient(120% 90% at 18% 0%, rgb(255 255 255 / .13), transparent 60%);
}
.pane > * { max-width: 1320px; margin-inline: auto; }
.pane-night { background-color: var(--night); background-image: radial-gradient(80% 70% at 72% 40%, #1c1830, transparent 70%); }
.pane-white { background-color: var(--white-glass); color: var(--on-white); }
.pane-cobalt { background-color: var(--cobalt); }
.pane-emerald { background-color: var(--emerald); }
.pane-ruby { background-color: var(--ruby); }
.pane-murrey { background-color: var(--murrey); }

/* ---------- 1. The guide ---------- */
.guide { padding-top: var(--s5); }
.guide > .stage, .guide > .guide-intro { max-width: none; }
.guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "intro win" "ctl win" "reader win";
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(24px, 4vw, 64px);
  row-gap: var(--s4);
  justify-content: center;
}
.guide > * { max-width: none; margin: 0; }
.stage { display: contents; }
.guide-intro { grid-area: intro; max-width: 40rem; align-self: end; }
.guide h1 { font-size: var(--fs-4); max-width: 12ch; }
.lede { margin-top: var(--s3); font-size: var(--fs-2); color: var(--on-dark-2); max-width: 36rem; }
.light-ctl { grid-area: ctl; display: flex; flex-wrap: wrap; gap: 0; align-self: start; border: 3px solid var(--iron); border-radius: var(--r); background: var(--iron); width: max-content; max-width: 100%; }
.light-ctl button {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  background: #1d1a24; color: var(--on-dark-2); border: 0; border-radius: 3px; margin: 0;
}
.light-ctl button + button { margin-left: 3px; }
.light-ctl button[aria-checked="true"] { background: var(--amber); color: var(--lead); }

.window-wrap { grid-area: win; position: relative; margin: 0; justify-self: center; }
.glass-box { position: relative; }
.window {
  display: block; position: relative; z-index: 1;
  height: min(calc(100vh - 120px), 820px); min-height: 520px; width: auto; aspect-ratio: 600 / 900;
  overflow: visible;
  filter: drop-shadow(0 0 18px rgb(90 130 255 / .45)) drop-shadow(0 8px 40px rgb(194 31 51 / .25));
  transition: filter 1.2s var(--ease);
}
.stone { fill: #26222c; stroke: #0a080c; stroke-width: 4; }
.stone-edge { fill: #1a171f; }
.band { font: 700 9.5px var(--display); letter-spacing: .08em; fill: var(--white-glass); text-anchor: middle; }
.pane-g { cursor: pointer; outline: none; transition: filter .5s var(--ease); }
.pane-g .hit { fill: transparent; stroke: none; }
.pane-g:hover { filter: brightness(1.14) saturate(1.08); }
.pane-g:focus-visible .hit { stroke: #fff6d6; stroke-width: 5; stroke-dasharray: 10 6; }
.window.has-sel .pane-g:not(.is-sel) { filter: brightness(.74) saturate(.85); }
.window.has-sel .pane-g:not(.is-sel):hover { filter: brightness(.95); }
.pane-g.is-sel { filter: brightness(1.16) saturate(1.1); }
.sel-ring { fill: none; stroke: #fff2c4; stroke-width: 5; pointer-events: none; filter: drop-shadow(0 0 8px rgb(255 230 160 / .9)); }
.sunlight { pointer-events: none; mix-blend-mode: soft-light; }
.seedy { opacity: .55; }
.sun { transform-box: fill-box; transform-origin: center; }

/* The glow behind and the coloured pool on the floor */
.halo {
  position: absolute; inset: 6% -14% 4%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(40% 30% at 50% 16%, rgb(232 177 58 / .4), transparent 70%),
    radial-gradient(55% 50% at 28% 55%, rgb(35 80 200 / .6), transparent 72%),
    radial-gradient(55% 50% at 72% 60%, rgb(194 31 51 / .48), transparent 72%);
  filter: blur(36px);
  transition: opacity 1.2s var(--ease);
}
.floor { position: absolute; left: 8%; right: 8%; bottom: -14px; height: 60px; z-index: 0; pointer-events: none; transform: perspective(300px) rotateX(58deg); transform-origin: 50% 100%; transition: opacity 1.2s var(--ease); }
.floor i { position: absolute; top: 0; bottom: 0; width: 26%; border-radius: 50%; filter: blur(14px); opacity: .55; }
.floor i:nth-child(1) { left: 0; background: #2350c8; }
.floor i:nth-child(2) { left: 18%; background: #c21f33; }
.floor i:nth-child(3) { left: 38%; background: #f2b632; width: 22%; }
.floor i:nth-child(4) { left: 56%; background: #2f9a5a; }
.floor i:nth-child(5) { left: 74%; background: #2350c8; }
.window-wrap figcaption { position: relative; z-index: 1; margin-top: var(--s3); max-width: 34rem; font-size: var(--fs-0); color: var(--on-dark-2); font-style: italic; }

/* Light modes */
.window-wrap[data-light="morning"] .window { filter: brightness(1.06) saturate(1.05) hue-rotate(-8deg) drop-shadow(0 0 22px rgb(150 190 255 / .5)); }
.window-wrap[data-light="morning"] .sun { transform: translate(-150px, -120px); }
.window-wrap[data-light="dusk"] .window { filter: brightness(.9) saturate(1.25) sepia(.18) drop-shadow(0 0 22px rgb(240 140 60 / .45)); }
.window-wrap[data-light="dusk"] .sun { transform: translate(160px, 180px); }
.window-wrap[data-light="dusk"] .halo { background: radial-gradient(50% 40% at 60% 60%, rgb(232 120 40 / .42), transparent 70%), radial-gradient(50% 45% at 30% 50%, rgb(140 40 90 / .4), transparent 70%); }
.window-wrap[data-light="night"] .window { filter: brightness(.36) saturate(.55); }
.window-wrap[data-light="night"] .halo, .window-wrap[data-light="night"] .floor { opacity: 0; }
.window-wrap[data-light="night"] .sunlight { opacity: 0; }
.night-note { display: none; }
.window-wrap[data-light="night"] + .reader .night-note { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .window-wrap[data-light="noon"] .sun { animation: sunpass 26s ease-in-out infinite alternate; }
  .halo { animation: breathe 9s ease-in-out infinite alternate; }
  .floor i { animation: drift 14s ease-in-out infinite alternate; }
  .floor i:nth-child(2n) { animation-duration: 18s; }
}
@keyframes sunpass { from { transform: translate(-120px, -80px); } to { transform: translate(120px, 90px); } }
@keyframes breathe { from { opacity: .8; } to { opacity: 1; } }
@keyframes drift { from { translate: -8px 0; } to { translate: 10px 0; } }

/* The reader: a white-glass pane set in thick lead */
.reader {
  grid-area: reader; align-self: start;
  max-width: 40rem;
  background: var(--white-glass) var(--seedy);
  color: var(--on-white);
  border: var(--came) solid var(--iron);
  border-radius: 10px;
  padding: var(--s4);
  box-shadow: 0 18px 40px -18px rgb(0 0 0 / .7);
}
.r-pos { font-size: var(--fs-0); color: var(--on-white-2); font-variant-numeric: lining-nums tabular-nums; }
.reader h2 { font-size: var(--fs-3); margin-top: 4px; }
.transcript { list-style: none; margin: var(--s3) 0 0; padding: 0; display: grid; gap: 6px; }
.transcript li { padding: 6px 10px; margin-inline: -10px; border-radius: 4px; transition: background-color .4s var(--ease), color .4s var(--ease); max-width: 68ch; }
.transcript li.is-now { background: rgb(232 177 58 / .42); }
.reader.is-playing .transcript li:not(.is-now):not(.is-done) { color: var(--on-white-2); }
.player { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s4); flex-wrap: wrap; }
.player .btn-ghost { width: 44px; padding: 0; }
.progress { flex: 1 1 120px; height: 10px; background: #d2ccb0; border: 2px solid var(--iron); border-radius: 6px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--ruby); transition: width .25s linear; }
.time { font-variant-numeric: lining-nums tabular-nums; font-size: var(--fs-0); min-width: 7ch; text-align: right; }
.reader-foot { margin-top: var(--s3); display: grid; gap: 6px; }
.check { display: inline-flex; gap: 10px; align-items: center; min-height: 32px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; }
.tone-note { font-size: var(--fs-0); color: var(--on-white-2); }
.pager { display: flex; justify-content: space-between; gap: var(--s2); margin-top: var(--s3); padding-top: var(--s3); border-top: 3px solid var(--iron); }

/* ---------- 2. How to read ---------- */
.read h2 { font-size: var(--fs-3); }
.read-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s5); margin-top: var(--s4); }
.read-lede { font-size: var(--fs-2); max-width: 34rem; }
.rules { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; border: var(--came-thin) solid var(--lead); border-radius: var(--r); background: var(--lead); }
.rules li { padding: 14px 18px; background: #f1eddb; }
.rules li + li { margin-top: var(--came-thin); }
.rules li:nth-child(2n) { background: #e2ddc2; }
.rules b { font-family: var(--display); font-weight: 700; font-size: 1.15em; }

/* ---------- 3. Tours ---------- */
.tour-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s3); }
.tour h2 { font-size: var(--fs-3); }
.seg { display: inline-flex; flex-wrap: wrap; border: 3px solid var(--iron); border-radius: var(--r); background: var(--iron); gap: 3px; }
.seg button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 3px; background: #15296a; color: var(--on-cobalt-2); }
.seg button[aria-checked="true"] { background: var(--amber); color: var(--lead); }
.tour-sum { margin-top: var(--s2); color: var(--on-cobalt-2); font-variant-numeric: lining-nums tabular-nums; }
.tour-body { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--came); margin-top: var(--s4); background: var(--iron); border: var(--came) solid var(--iron); border-radius: 10px; }
.plan-wrap { background: #142c74 var(--seedy); border-radius: 4px; padding: var(--s3); display: flex; align-items: center; }
.plan { width: 100%; height: auto; display: block; }
.plan-floor { fill: #1d3a8f; stroke: var(--white-glass); stroke-width: 3; stroke-linejoin: round; }
.plan-arcade { stroke: rgb(235 230 205 / .35); stroke-width: 1.5; stroke-dasharray: 4 6; fill: none; }
.plan-piers circle { fill: var(--white-glass); }
.plan-crypt { fill: none; stroke: var(--amber); stroke-width: 2; stroke-dasharray: 5 4; }
.plan-lbl { font: 400 15px var(--display); letter-spacing: .2em; fill: var(--on-cobalt-2); text-anchor: middle; }
.plan-lbl.sm { font-size: 12px; letter-spacing: .08em; }
.plan-door { stroke: var(--amber); stroke-width: 6; stroke-linecap: round; }
.route { fill: none; stroke: var(--amber); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2 9; }
.pstop { cursor: pointer; }
.pstop circle { fill: var(--amber); stroke: var(--iron); stroke-width: 3; transition: r .3s var(--ease); }
.pstop text { font: 700 14px var(--body); fill: var(--lead); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.pstop.is-off circle { fill: #3b4f8f; }
.pstop.is-off text { fill: #b9c4ea; }
.pstop.is-sel circle { fill: #c21f33; r: 17; }
.pstop.is-sel text { fill: var(--on-dark); }
.pstop:focus-visible circle { stroke: #fff; stroke-width: 4; }
.pstop:focus { outline: none; }
.stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; background: var(--iron); align-content: start; }
.stops li { background: #172f7c; }
.stops li:first-child { border-radius: 4px 4px 0 0; }
.stops > li > b { display: block; padding: 10px 14px; }
.stop-btn { width: 100%; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: start; text-align: left; padding: 12px 14px; background: transparent; border: 0; color: var(--on-dark); }
.stop-btn:hover { background: #1f3c94; }
.stop-n { width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: var(--lead); display: grid; place-items: center; font-weight: 700; font-variant-numeric: lining-nums; border: 2px solid var(--iron); }
.stop-name { font-family: var(--display); font-size: 1.15rem; line-height: 1.2; display: block; }
.stop-meta { display: block; font-size: var(--fs-0); color: var(--on-cobalt-2); margin-top: 2px; }
.stop-min { font-variant-numeric: lining-nums tabular-nums; font-size: var(--fs-0); color: var(--on-cobalt-2); white-space: nowrap; padding-top: 4px; }
.stop-walk { display: block; font-size: var(--fs-0); color: var(--on-cobalt-2); }
.stop-more { display: none; padding: 0 14px 14px 58px; font-size: var(--fs-1); color: var(--on-dark-2); }
.stops li.is-sel { background: #24449e; }
.stops li.is-sel .stop-n { background: #c21f33; color: var(--on-dark); }
.stops li.is-sel .stop-more { display: block; }
.stop-more a, .stop-more button.linkish { color: var(--amber); }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: .2em; font: inherit; min-height: 24px; }

/* ---------- 4. The app ---------- */
.app { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.app > * { margin: 0; max-width: none; }
.app h2 { font-size: var(--fs-3); max-width: 22ch; }
.app-copy > p { margin-top: var(--s3); max-width: 60ch; color: var(--on-emerald-2); font-size: var(--fs-1); }
.specs { margin: var(--s4) 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--came-thin); background: var(--iron); border: var(--came-thin) solid var(--iron); border-radius: var(--r); }
.specs div { background: #17532f; padding: 14px 16px; }
.specs div:nth-child(4n+2), .specs div:nth-child(4n+3) { background: #1e6a3d; }
.specs dt { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.specs dd { margin: 4px 0 0; color: var(--on-emerald-2); font-size: var(--fs-0); line-height: 1.5; }
.phone { width: 270px; aspect-ratio: 9 / 18.5; background: var(--iron); border-radius: 38px; padding: 12px; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .7), inset 0 0 0 2px #2c2732; justify-self: center; }
.ph-screen { height: 100%; border-radius: 28px; background: var(--white-glass); color: var(--on-white); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; font-size: 13px; }
.ph-bar { display: flex; justify-content: space-between; font-size: 11px; font-variant-numeric: lining-nums; color: var(--on-white-2); }
.ph-glass { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--iron); border: 4px solid var(--iron); border-radius: 60px 60px 4px 4px; height: 168px; overflow: hidden; }
.ph-glass i:nth-child(1) { background: #2350c8; } .ph-glass i:nth-child(2) { background: #c21f33; }
.ph-glass i:nth-child(3) { background: #c21f33; outline: 3px solid #fff2c4; outline-offset: -3px; } .ph-glass i:nth-child(4) { background: #2350c8; }
.ph-glass i:nth-child(5) { background: #d8d4bc; } .ph-glass i:nth-child(6) { background: #d8d4bc; }
.ph-pos { font-size: 11px; color: var(--on-white-2); font-variant-numeric: lining-nums; }
.ph-title { font: 700 18px/1.15 var(--display); margin-top: -6px; }
.ph-line { line-height: 1.45; }
.ph-line mark { background: rgb(232 177 58 / .5); color: inherit; border-radius: 2px; }
.ph-play { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; margin-top: auto; }
.ph-play b { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; background: var(--amber); border: 2px solid var(--iron); }
.ph-play span { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--ruby) 33%, #d2ccb0 33%); }
.ph-play em { font-style: normal; font-size: 11px; font-variant-numeric: lining-nums tabular-nums; color: var(--on-white-2); }
.ph-tabs { display: flex; justify-content: space-around; border-top: 3px solid var(--iron); padding-top: 8px; font-size: 12px; color: var(--on-white-2); }
.ph-tabs .on { color: var(--on-white); font-weight: 700; }

/* ---------- 5. Tickets ---------- */
.tix-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s3); }
.tickets h2 { font-size: var(--fs-3); }
.tabs { display: inline-flex; gap: 3px; background: var(--iron); border: 3px solid var(--iron); border-radius: var(--r); }
.tabs button { min-height: 44px; padding: 0 16px; background: #6e0f1b; color: var(--on-ruby-2); border: 0; border-radius: 3px; }
.tabs button[aria-selected="true"] { background: var(--white-glass); color: var(--on-white); }
.tix-panes { margin-top: var(--s4); }
.glass-form, .ticket {
  background: var(--white-glass) var(--seedy); color: var(--on-white);
  border: var(--came) solid var(--iron); border-radius: 10px;
  padding: var(--s5) clamp(16px, 3vw, 40px);
  display: grid; gap: var(--s4);
}
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .field > span { font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin-bottom: 8px; padding: 0; display: block; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.day {
  min-height: 60px; border: 3px solid var(--iron); border-radius: var(--r); background: #f6f3e6; color: var(--on-white);
  display: grid; place-content: center; text-align: center; line-height: 1.15; padding: 4px 2px;
  font-variant-numeric: lining-nums;
}
.day small { font-size: 12px; color: var(--on-white-2); }
.day b { font-size: 1.15rem; }
.day[aria-checked="true"] { background: var(--cobalt); color: var(--on-dark); }
.day[aria-checked="true"] small { color: var(--on-cobalt-2); }
.day[aria-disabled="true"] { background: #d9d4bd; color: #5a5260; cursor: not-allowed; text-decoration: line-through; }
.day[aria-disabled="true"] small { color: #5a5260; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slot { min-height: 52px; min-width: 96px; border: 3px solid var(--iron); border-radius: var(--r); background: #f6f3e6; display: grid; place-content: center; padding: 4px 12px; text-align: center; line-height: 1.15; font-variant-numeric: lining-nums tabular-nums; }
.slot small { font-size: 12px; color: var(--on-white-2); }
.slot[aria-checked="true"] { background: var(--cobalt); color: var(--on-dark); }
.slot[aria-checked="true"] small { color: var(--on-cobalt-2); }
.slot[aria-disabled="true"] { background: #d9d4bd; color: #5a5260; cursor: not-allowed; }
.slot[aria-disabled="true"] small { color: #5a5260; }
.slots-empty { padding: 12px 14px; border: 3px dashed #8a8270; border-radius: var(--r); color: var(--on-white-2); }
.people { display: grid; gap: 0; border: var(--came-thin) solid var(--iron); border-radius: var(--r); background: var(--iron); }
.person { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 10px 14px; background: #f6f3e6; }
.person + .person { margin-top: var(--came-thin); }
.person span { color: var(--on-white-2); font-size: var(--fs-0); }
.person b { color: var(--on-white); font-size: var(--fs-1); margin-right: 6px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 44px; height: 44px; display: grid; place-items: center; border: 3px solid var(--iron); border-radius: var(--r); background: var(--white-glass); }
.stepper button:hover { background: #fff; }
.stepper button[disabled] { opacity: .4; cursor: not-allowed; }
.stepper output { min-width: 2ch; text-align: center; font-weight: 700; font-size: var(--fs-2); font-variant-numeric: lining-nums tabular-nums; }
.f-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.field { display: grid; align-content: start; }
.field input {
  min-height: 48px; padding: 0 14px; border: 3px solid var(--iron); border-radius: var(--r); background: #fbf9f0; color: var(--on-white);
}
.field input::placeholder { color: #6a6270; }
.field input:focus { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.field input[aria-invalid="true"] { border-color: var(--err); background: #fbefec; }
.err { color: var(--err); font-weight: 600; font-style: normal; font-size: var(--fs-0); margin-top: 6px; display: flex; gap: 6px; align-items: center; }
.err[hidden] { display: none; }
.total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s2); padding-top: var(--s3); border-top: 3px solid var(--iron); font-variant-numeric: lining-nums tabular-nums; }
.total-n span { font-family: var(--display); font-size: 1.2rem; margin-right: 8px; }
.total-n b { font-size: var(--fs-3); font-family: var(--display); }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.form-foot .small { color: var(--on-white-2); max-width: 44ch; }
.notice { display: flex; gap: 10px; align-items: start; padding: 12px 14px; border: 3px solid var(--iron); border-radius: var(--r); background: #f6dcd8; color: #5d0c16; }
.notice[hidden] { display: none; }
.notice.ok { background: #d9ecdc; color: #0f3d22; }
.app-lede { max-width: 56ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 3px solid var(--iron); border-radius: var(--r); background: #f6f3e6; }
.chip input:checked + span { background: var(--emerald); color: var(--on-dark); }
.chip input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.nojs-note { grid-column: 1 / -1; color: var(--on-white-2); }
.ticket { grid-template-columns: 120px minmax(0, 1fr); align-items: stretch; }
.ticket:focus { outline: none; }
.tk-glass { display: grid; grid-template-rows: 2fr 1fr 1fr; gap: 5px; background: var(--iron); border: 5px solid var(--iron); border-radius: 60px 60px 4px 4px; min-height: 200px; }
.tk-glass i:nth-child(1) { background: #c21f33; border-radius: 55px 55px 0 0; } .tk-glass i:nth-child(2) { background: #2350c8; } .tk-glass i:nth-child(3) { background: #f2b632; }
.tk-body { display: grid; gap: var(--s2); align-content: start; }
.tk-body h3 { font-size: var(--fs-3); }
.tk-code { font-variant-numeric: lining-nums; }
.tk-code b { font-size: var(--fs-2); letter-spacing: .06em; }
.tk-body .btn { justify-self: start; margin-top: var(--s2); }

/* ---------- 6. Visiting ---------- */
.visit h2 { font-size: var(--fs-3); }
.visit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--came-thin); margin-top: var(--s4); background: var(--iron); border: var(--came-thin) solid var(--iron); border-radius: var(--r); }
.v-col { background: #4b1b42; padding: var(--s4); display: grid; gap: var(--s2); align-content: start; }
.v-col:nth-child(2n) { background: #612455; }
.v-col h3 { font-size: 1.4rem; }
.v-col p, .v-col li { color: var(--on-murrey-2); font-size: var(--fs-1); }
.v-col a { color: var(--on-dark); }
.hours { border-collapse: collapse; width: 100%; font-variant-numeric: lining-nums tabular-nums; }
.hours th, .hours td { text-align: left; padding: 6px 0; border-bottom: 1px solid rgb(239 217 234 / .25); font-weight: 400; vertical-align: top; }
.hours th { color: var(--on-murrey-2); padding-right: 10px; }
.hours td { color: var(--on-dark); }
.dots { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.dots li::marker { color: var(--amber); }

/* Two-column guide with a narrow text column: the light switch becomes a 2 x 2 block */
@media (min-width: 1024px) and (max-width: 1240px) {
  .light-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 100%; max-width: 26rem; }
  .light-ctl button + button { margin-left: 0; }
  .light-ctl button { justify-content: center; }
}

/* ---------- Footer ---------- */
.foot { padding: var(--s5) var(--gutter) var(--s6); display: grid; gap: var(--s2); justify-items: start; max-width: 1320px; margin: 0 auto; color: var(--on-dark-2); }
.foot-mark { font: 700 1.6rem var(--display); color: var(--on-dark); }
.foot nav { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.foot nav a { min-height: 32px; display: inline-flex; align-items: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav { display: none; }
  .visit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .guide { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "ctl" "win" "reader"; grid-template-rows: none; }
  .guide h1 { max-width: 16ch; }
  .window { height: auto; width: min(100%, 520px); min-height: 0; }
  .reader { max-width: 44rem; justify-self: center; width: 100%; }
  .light-ctl { justify-self: center; }
  .tour-body { grid-template-columns: minmax(0, 1fr); }
  .read-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .app { grid-template-columns: minmax(0, 1fr); }
  .phone { order: 2; }
}
@media (max-width: 640px) {
  :root { --came: 6px; --came-thin: 4px; }
  .pane { padding: var(--s5) 14px; }
  .top { gap: var(--s2); padding: 8px 12px; }
  .mark span { font-size: 1.3rem; }
  .top .btn-amber { padding: 0 12px; font-size: var(--fs-0); }
  .lang select { padding: 0 30px 0 10px; background-position: right 8px center; }
  .light-ctl { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
  .light-ctl button + button { margin-left: 0; }
  .light-ctl button { justify-content: center; }
  .reader { padding: var(--s3); }
  .pager .btn { padding: 0 12px; font-size: var(--fs-0); }
  .specs { grid-template-columns: minmax(0, 1fr); }
  .specs div:nth-child(n) { background: #17532f; }
  .specs div:nth-child(2n) { background: #1e6a3d; }
  .f-row.two { grid-template-columns: minmax(0, 1fr); }
  .days { gap: 4px; }
  .day { min-height: 54px; padding: 2px 0; border-width: 2px; }
  .day small { font-size: 11px; }
  .day b { font-size: 1rem; }
  .slot { min-width: 0; flex: 0 1 calc(33.333% - 4px); }
  .plan-lbl { font-size: 18px; }
  .plan-lbl.sm { font-size: 15px; }
  .pstop text { font-size: 17px; }
  .person { flex-wrap: wrap; }
  .visit-grid { grid-template-columns: minmax(0, 1fr); }
  .ticket { grid-template-columns: minmax(0, 1fr); }
  .tk-glass { min-height: 0; height: 110px; width: 90px; }
  .stop-more { padding-left: 14px; }
  .tabs { width: 100%; }
  .tabs button { flex: 1; padding: 0 8px; }
  .seg { width: 100%; }
  .seg button { flex: 1 1 auto; padding: 0 10px; }
}
@media (max-width: 380px) {
  .top .btn-amber { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
.ph-line.dim { color: var(--on-white-2); }

/* Static tour list shown before the script runs (or without it) */
.stops > li:not([data-stop]) { padding: 10px 14px; color: var(--on-cobalt-2); }
.stops > li:not([data-stop]) > b { padding: 0; color: var(--on-dark); font-family: var(--display); font-weight: 400; font-size: 1.15rem; }
.person > span { flex: 1 1 12rem; }
.person .stepper { margin-left: auto; }
