@font-face {
  font-family: 'Instrument Serif';
  src: url('./atlas_v16/type/InstrumentSerif-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('./atlas_v16/type/InstrumentSerif-Italic.ttf') format('truetype');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f4ead5;
  --ink: #1d2633;
  --muted: #42475b;
  --accent: #6c3d40;
  --line: color-mix(in srgb, var(--ink) 24%, transparent);
  --soft: color-mix(in srgb, var(--ink) 6%, var(--paper));
  --serif: 'Instrument Serif', Baskerville, Georgia, serif;
  --sans: 'Avenir Next', Avenir, 'Segoe UI', system-ui, sans-serif;
  --edge: clamp(16px, 4.4vw, 80px);
}
:root[data-light=dusk] {
  color-scheme: dark;
  --paper: #10151f;
  --ink: #f4ead5;
  --muted: #b7c2b0;
  --accent: #e3b071;
}
* {box-sizing:border-box}
[hidden] {display:none !important}
body {margin:0; font:400 18px/1.45 var(--sans); color:var(--ink); background:var(--paper)}
button,input,select,summary {font:inherit;color:inherit}
a {color:inherit;text-decoration-thickness:1px;text-underline-offset:.22em}
button {border:0;background:transparent;padding:0;cursor:pointer}
button:disabled {opacity:.46;cursor:default}
button,select,summary,input[type=search] {min-height:44px}
button,a,summary,select,input {touch-action:manipulation}
:focus-visible {outline:2px solid var(--accent);outline-offset:3px}
button:focus:not(:focus-visible),h1:focus:not(:focus-visible) {outline:0}
button:hover:not(:disabled),a:hover,summary:hover {color:var(--accent)}
.skip {position:absolute;z-index:9;left:12px;top:8px;transform:translateY(-160%);background:var(--paper);padding:8px}
.skip:focus {transform:none}
.masthead,.atlas {width:min(100%,1640px);padding-inline:var(--edge);margin-inline:auto}
.masthead {display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:70px;position:relative}
.masthead::after {content:'';position:absolute;bottom:0;inset-inline:var(--edge);height:1px;background:var(--line)}
.wordmark {display:inline-flex;align-items:center;gap:.18em;min-height:44px;text-decoration:none;white-space:nowrap;font:400 clamp(23px,2.2vw,33px)/1 var(--serif);letter-spacing:-.02em}
.wordmark i {color:var(--accent);font-weight:400}
.head-actions,.light-settings,.light-settings button,#open-explore {display:flex;align-items:center}
.head-actions {gap:clamp(14px,2.6vw,42px)}
.light-settings {gap:18px}
.light-settings button {gap:6px;color:var(--muted);font-size:17px}
.light-settings b {font-weight:500}
.light-settings button[aria-pressed=true] {color:var(--ink);text-decoration:underline;text-underline-offset:5px}
.light-settings button span {font:25px/1 Georgia,serif}
#open-explore {gap:9px;font-weight:600}
#open-explore i {display:inline-block;width:16px;height:10px;border-block:1.5px solid currentColor;transform:skew(-13deg)}
.folio-heading {display:flex;justify-content:space-between;align-items:end;gap:16px;padding:clamp(18px,2.6vh,34px) 0 clamp(13px,1.8vh,24px)}
.folio-heading>div {min-width:0}
#field-location {margin:0 0 5px;color:var(--accent);font:500 16px/1.2 var(--sans);letter-spacing:.035em}
h1 {margin:0;font:400 clamp(44px,5.4vw,80px)/.99 var(--serif);letter-spacing:-.035em;overflow-wrap:anywhere}
#plate-label {flex:none;margin-bottom:4px;color:var(--muted);font:italic 20px/1.2 var(--serif);white-space:nowrap}
.plate {min-width:0}
.scene {position:relative;isolation:isolate;overflow:hidden;width:100%;height:clamp(400px,61svh,780px);background:#b0dadd}
:root[data-light=dusk] .scene {background:#252c42}
.scene canvas,.scene .fallback,#matinee-reel,#subway-photo,#subway-movie {position:absolute;inset:0;width:100%;height:100%;display:block}
.scene canvas {visibility:hidden;touch-action:none;cursor:grab}
.scene canvas:active {cursor:grabbing}
.scene canvas:focus-visible {outline-offset:-4px}
.scene.loaded canvas {visibility:visible}
.scene.loaded .fallback,.scene.study-pending.loaded canvas {visibility:hidden}
.scene .fallback,#matinee-reel,#subway-photo,#subway-movie {object-fit:contain}
.scene.study-pending.loaded .fallback {visibility:visible}
#matinee-reel,#subway-photo,#subway-movie {background:#252c42}
.folio-caption {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,auto);gap:12px clamp(24px,5vw,90px);align-items:start;padding:18px 0 23px}
.caption-text {max-width:59ch}
#view-copy {margin:0;font:400 clamp(20px,1.5vw,24px)/1.43 Georgia,'Times New Roman',serif;letter-spacing:-.017em}
.place-actions {min-width:0;max-width:min(600px,43vw);justify-self:end}
.editorial-link,.study-actions a,.night-actions a,#subway-enter,#matinee-night {display:inline-flex;align-items:center;min-height:44px;gap:6px}
.editorial-link {color:var(--accent);text-decoration:none;font-weight:550}
.editorial-link:hover {text-decoration:underline}
.night-billing,.junction-top,.subway-top,.subway-top>div,.study-heading,.night-actions,.junction-actions,.subway-actions,.study-actions,#matinee-controls,#pinball-controls {display:flex;align-items:center;flex-wrap:wrap;gap:5px 14px}
#matinee-controls,#pinball-controls {justify-content:flex-end}
.night-billing {gap:4px 8px}
.night-billing h3,.subway-top h3,.junction-top h3,.study-heading strong {margin:0;font:italic 25px/1.15 var(--serif);color:var(--accent)}
.night-billing span,.night-billing output,#subway-train,#junction-signal,#study-progress {color:var(--muted);font-size:16px;font-variant-numeric:tabular-nums}
.place-actions button,.place-actions a,.block-content button,.block-content a,.controls-body button {min-height:44px}
.place-actions button,.place-actions a,.controls-body button,.block-content a,.block-content button {font-size:18px;text-decoration:underline;text-underline-offset:4px;text-decoration-color:var(--line)}
#matinee-play,#matinee-night,#pinball-launch,#subway-next,#subway-board,#subway-continue,#subway-enter,#junction-next,#junction-enter,#junction-lever,#study-next {
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:7px 18px;gap:7px;
  border:1px solid transparent;border-radius:99px;background:var(--ink);color:var(--paper);font-size:17px;font-weight:550;text-decoration:none;
}
#matinee-play:hover,#matinee-night:hover,#pinball-launch:hover:not(:disabled),.place-actions .subway-primary:hover,.place-actions .junction-primary:hover,#study-next:hover {background:var(--accent);color:var(--paper)}
.junction-top,.subway-top {justify-content:space-between}
.subway-roundel {display:inline-grid;place-items:center;flex:none;width:25px;height:25px;border-radius:50%;background:var(--accent);color:var(--paper);font:650 17px/1 var(--sans)}
#subway-cutaway {margin:6px 0 0;max-width:550px}
#subway-cutaway svg {width:100%;height:auto;display:block}
#subway-itinerary {padding:18px 3px 6px;min-width:min(100%,310px)}
#subway-track {position:relative;margin:0 6px;height:3px;background:var(--line)}
#subway-track::before {content:'';display:block;width:var(--travel,0%);height:100%;background:var(--accent)}
#subway-track i {position:absolute;left:var(--travel,0%);top:50%;translate:-50% -50%;width:12px;height:12px;border-radius:100%;background:var(--accent);outline:3px solid var(--paper)}
.line-stops {display:flex;justify-content:space-between;gap:9px;margin-top:9px;font-size:16px;color:var(--muted)}
#subway-panel[data-active=true] .subway-top h3,#junction-panel[data-walking=true] .junction-top h3 {display:none}
#junction-stage {display:flex;list-style:none;padding:0;margin:9px 0 4px;max-width:36rem}
#junction-stage li {flex:1;position:relative;padding:12px 4px 0 0;color:var(--muted);font-size:16px}
#junction-stage li::before {content:'';position:absolute;height:1px;left:0;right:0;top:3px;background:var(--line)}
#junction-stage li::after {content:'';position:absolute;top:0;left:0;width:7px;height:7px;border-radius:50%;background:var(--muted)}
#junction-stage li:last-child {flex:0 0 auto}
#junction-stage li:last-child::before {display:none}
#junction-stage li[aria-current] {color:var(--accent);font-weight:650}
#junction-stage li[aria-current]::after {background:var(--accent);outline:1px solid var(--accent);outline-offset:2px}
#junction-lever svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7}
.folio-foot {display:flex;align-items:flex-start;flex-wrap:wrap;gap:2px clamp(14px,2vw,34px);border-top:1px solid var(--line);padding:7px 0 30px}
.folio-foot>details {min-width:0}
summary {display:flex;align-items:center;gap:8px;cursor:pointer;width:fit-content;list-style:none;font-size:17px}
summary::-webkit-details-marker {display:none}
summary::after {content:'+';font:21px/1 var(--sans);color:var(--muted)}
details[open]>summary::after {content:'−'}
.folio-foot>details[open] {flex:1 1 40%;min-width:min(290px,100%)}
.controls-body,.block-content {padding:3px 0 14px;max-width:56ch}
.controls-body p {font-size:18px;color:var(--muted);margin:7px 0}
.scene-tools,.block-places,.roof-tools,#block-links div,.walking-nav,.block-picker {display:flex;flex-wrap:wrap;align-items:center;gap:2px 14px}
.scene-tools button,.walking-nav button {min-width:44px}
.block-places a {display:inline-flex;gap:5px;align-items:center}
.block-places svg {display:none}
.block-places a[aria-current] {font-weight:650;color:var(--accent)}
.block-picker {font-size:18px}
.block-picker select {background:var(--paper);border:0;border-bottom:1px solid var(--line);max-width:100%;min-width:0;border-radius:0}
.study-heading {gap:7px 14px}
.block-content #study-caption {display:none}
#block-links a {display:inline-flex;align-items:center}
.walking-nav {margin-inline-start:auto;flex-wrap:nowrap;gap:2px}
#walk-progress {font-size:16px;color:var(--muted)}
.walking-nav button {font-size:21px}
.load-state {color:var(--muted);font-size:16px}
.load-state:has(#status:empty):has(button[hidden]) {display:none}
#retry-detail {text-decoration:underline}
#map-pins {position:absolute;inset:0;z-index:2;pointer-events:none}
#map-pins svg {width:100%;height:100%}
#map-pins path {fill:none;stroke:var(--paper);stroke-width:2;filter:drop-shadow(0 1px 1px #1d2633)}
#map-pins circle {fill:var(--paper);stroke:var(--accent);stroke-width:1.5}
#map-pins a,#subway-door {position:absolute;z-index:2;min-height:44px;display:grid;place-items:center;padding:4px 10px;background:var(--paper);color:var(--ink);border:1px solid var(--line);pointer-events:auto;text-decoration:none}
#map-pins a {transform:translate(-50%,-50%)}
#subway-door {transform:translate(-50%,-100%)}
#subway-locator {position:absolute;z-index:4;transform:translate(-50%,-100%);pointer-events:none;padding:2px 9px;background:#f4ead5;color:#1d2633;font-weight:650}
#subway-locator::after {content:'';position:absolute;width:9px;height:9px;bottom:-6px;left:calc(50% - 5px);border-radius:50%;background:#9c5948;border:2px solid #f4ead5}
.scene:not(.loaded) #map-pins,.scene.study-pending #map-pins,.plate:not(:has(.scene.loaded)) .roof-tools,.plate:has(.scene.study-pending) .roof-tools,
.plate:has(.subway-walking) :is(#nearby,#primary-study,#junction-panel,#after-hours,#walking-nav),.plate:has(.junction-walking) :is(.roof-tools,#map-pins,#nearby),
.plate.has-study :is(.roof-tools,#map-pins,#junction-panel) {display:none}
.scene.subway-walking,.scene.junction-walking {touch-action:none}

/* A single index contains the places, guided visits and folded block map. */
#block-map {position:fixed;inset:0 0 0 auto;width:min(640px,100%);height:100dvh;max-height:none;max-width:none;margin:0;padding:0 clamp(18px,3.3vw,42px);border:0;border-inline-start:1px solid var(--line);background:var(--paper);color:var(--ink);overflow:hidden}
#block-map[open] {display:flex;flex-direction:column}
#block-map::backdrop {background:rgb(16 21 31 / .56)}
body:has(#block-map[open]) {overflow:hidden}
.drawer-head,.drawer-tabs,.index-heading,.search-field,.map-controls,.map-boroughs {display:flex;align-items:center}
.drawer-head {justify-content:space-between;gap:12px;padding:27px 0 17px;flex:none}
.drawer-head h2 {margin:0;font:400 clamp(39px,4vw,54px)/1.05 var(--serif);letter-spacing:-.03em}
.map-close {width:44px;font:32px/1 var(--serif)}
.drawer-tabs {gap:24px;flex:none;border-bottom:1px solid var(--line)}
.drawer-tabs button {font-size:18px;color:var(--muted);border-bottom:2px solid transparent}
.drawer-tabs [aria-selected=true] {color:var(--ink);border-color:var(--accent)}
#place-directory,#map-directory {display:flex;flex-direction:column;min-height:0;flex:1}
.search-field {flex:none;gap:11px;margin:12px 0;border-bottom:1px solid var(--muted)}
.search-field:focus-within {border-color:var(--accent)}
.search-field input {min-width:0;width:100%;padding:6px 0;background:transparent;border:0;border-radius:0;font-size:20px}
.search-field input::placeholder {color:var(--muted);opacity:1}
.search-icon {display:block;position:relative;width:15px;height:15px;border-radius:50%;border:1.5px solid var(--muted);margin:0 3px 3px}
.search-icon::after {content:'';position:absolute;width:7px;right:-5px;bottom:-3px;border-bottom:1.5px solid var(--muted);transform:rotate(45deg)}
.drawer-scroll,.map-body {overflow:auto;overscroll-behavior:contain;min-height:0;padding:0 5px 22px 2px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.drawer-scroll h3 {margin:18px 0 4px;font:italic 25px/1.1 var(--serif);color:var(--accent)}
.visits {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px}
#trail-directory,#night-directory {display:contents}
.visits a {display:flex;flex-direction:column;align-items:start;justify-content:center;min-height:49px;text-decoration:none;font-weight:550;font-size:18px;line-height:1.24;padding:4px 0}
.visits em {font-size:16px;color:var(--muted);font-style:normal;font-weight:400}
#subway-shortcut {grid-column:1/-1;display:flex;flex-direction:row;align-items:center;justify-content:start;gap:12px}
#subway-shortcut img {width:96px;height:60px;object-fit:cover}
#subway-shortcut span {display:grid;gap:2px}
.walk-choices {display:flex;flex-wrap:wrap;gap:0 16px}
.walk-choices button {font-size:17px;text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:4px}
.walk-choices button[aria-pressed=true] {color:var(--accent)}
.index-heading {justify-content:space-between;gap:10px;border-bottom:1px solid var(--line);margin:8px 0 0;padding:7px 0}
.index-heading h3 {margin:0}
#result-count {font-size:16px;color:var(--muted)}
#place-results a,.map-list-link {min-height:46px;display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:8px 0;text-decoration:none;border-bottom:1px solid var(--line)}
#place-results a[aria-current] {color:var(--accent)}
.result-name {font:400 25px/1.2 var(--serif);overflow-wrap:anywhere}
.result-location {font-size:16px;color:var(--muted);text-align:right;flex-shrink:0}
.empty-search {margin:18px 0;color:var(--muted)}
.map-controls {justify-content:space-between;gap:10px;flex:none;padding:10px 0}
.map-boroughs {gap:16px}
.map-boroughs button[aria-pressed=true] {color:var(--accent);text-decoration:underline;text-underline-offset:5px}
.map-switch {display:none;font-size:16px}
.map-body {display:grid;grid-template-columns:minmax(170px,1.05fr) minmax(145px,1fr);align-items:start;gap:20px}
.plan-paper {position:relative;height:540px;background:#b0dadd}
.plan-paper>svg {width:100%;height:100%;display:block}
.plan-land {fill:#f4ead5}.plan-block {fill:#e3d8c1;stroke:#b9b7ae;stroke-width:.75}
.plan-bank {fill:#b9b7ae}.plan-park {fill:#9fa968;stroke:#678258}
.plan-path,.plan-track,.plan-north {fill:none;stroke:#687a86;stroke-width:1.3}
.plan-path {stroke:#d9ce91;stroke-width:3}.plan-track {stroke:#775047;stroke-dasharray:4 2}
.plan-water-name,.plan-park-name {font:italic 14px Georgia,serif;fill:#344151}
.plan-n {font:600 13px var(--sans);fill:#344151}
.map-pin {position:absolute;transform:translate(-50%,-50%);display:grid;place-items:center;width:44px;height:44px;text-decoration:none}
.map-number {flex:none;display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:#f4ead5;border:1px solid #6c3d40;color:#6c3d40;font-size:16px;font-weight:600}
.map-pin[aria-current] .map-number {background:#6c3d40;color:#f4ead5}
.map-list-link {align-items:center;justify-content:start;font-size:17px;gap:8px}
.map-list-link[aria-current] {color:var(--accent);font-weight:600}
@media(max-width:800px) {
  .masthead {min-height:58px}
  .folio-heading {padding:12px 0 13px}
  .scene {height:clamp(300px,53svh,540px)}
  .folio-caption {column-gap:18px}
  .place-actions {max-width:44vw}
}
@media(max-width:620px) {
  .head-actions {gap:10px}
  .light-settings {gap:0}
  .light-settings button {width:44px;justify-content:center}
  .light-settings b,.light-settings button[aria-pressed=true] {display:none}
  .folio-heading {gap:10px}
  #field-location {font-size:16px;letter-spacing:0;margin:0 0 4px}
  h1 {font-size:clamp(39px,9.3vw,53px)}
  #plate-label {font-size:18px;margin:0 0 3px}
  .scene {height:clamp(265px,48svh,485px)}
  .folio-caption {display:flex;flex-direction:column;gap:9px;padding:11px 0 17px}
  .place-actions {order:-1;max-width:none;width:100%}
  .place-actions:not(:has(:is(#subway-panel,#after-hours,#junction-panel,#overview-avenue,#study-panel):not([hidden]))) {display:none}
  #matinee-controls,#pinball-controls {justify-content:space-between}
  .folio-foot {padding:2px 0 20px;gap:0 14px}
  .folio-foot>details[open] {flex-basis:100%}
  .walking-nav {margin:0 0 0 auto}
  .drawer-head {padding-block:18px 12px}
  .map-body {display:block}
  .map-switch {display:block}
  #block-map[data-page=plan] .map-index,#block-map[data-page=index] .plan-paper {display:none}
  .plan-paper {height:max(475px,calc(100dvh - 222px))}
}
@media(max-width:365px) {
  .head-actions {gap:3px;flex-shrink:0}
  .masthead {gap:4px}
  .wordmark {font-size:22px;min-width:0;flex-wrap:wrap;align-content:center;row-gap:0}
  #open-explore {font-size:17px}
  #open-explore i {display:none}
  .folio-heading {align-items:start}
  #plate-label {align-self:start;margin-top:1px}
  .result-location {max-width:32%;font-size:15px}
}
@media(prefers-reduced-motion:no-preference) {
  #block-map[open] {animation:open-drawer .2s ease-out}
  @keyframes open-drawer {from {transform:translateX(28px);opacity:.5} to {transform:none;opacity:1}}
}

#nearby:not(:has(#block-tour:not([hidden]),#related-studies #study-panel:not([hidden]),#block-links:not([hidden]),.roof-tools button:not([hidden]))) {display:none}
