:root {
  --paper: #eeeade;
  --paper-light: #f6f3ea;
  --ink: #30352a;
  --ink-soft: #686a5c;
  --olive: #626b46;
  --olive-dark: #414e31;
  --rule: #cccbbb;
  --photo-mat: #e3dfd0;
}

html { background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: var(--font-body); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, a { touch-action: manipulation; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button { -webkit-appearance: none; appearance: none; }
button:disabled { cursor: default; opacity: .35; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline-color: var(--olive-dark); }
p, h1, h2 { margin: 0; }
.atlas-shell { display: grid; grid-template-rows: 100px auto minmax(490px, 1fr) 174px auto auto; min-height: 100svh; padding: 0 32px; }
.atlas-days { min-width: 0; max-width: 100%; padding-bottom: 16px; }

/* A quiet editorial masthead leaves the photographs and terrain to carry color. */
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.masthead-title { display: flex; align-items: center; gap: 28px; }
.all-designs { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 12px; color: var(--ink-soft); }
.all-designs:hover { color: var(--olive-dark); }
.all-designs span { font-size: 20px; }
.masthead h1 { font: 400 29px/1.4 var(--font-title); letter-spacing: .065em; }
.masthead-separator { color: #b8b8a9; margin: 0 10px; font-size: 24px; }
.masthead-format { font: 400 14px/1.4 var(--font-body); letter-spacing: .12em; }
.masthead-edition { text-align: right; font-size: 12px; line-height: 1.7; color: var(--ink-soft); }
.masthead-edition > span { font-family: var(--font-number); font-size: 15px; letter-spacing: .08em; }
.masthead-edition p { letter-spacing: .12em; }

.atlas-workspace { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 0; border-top: 1px solid var(--rule); }
.route-rail { display: flex; min-height: 0; flex-direction: column; padding: 22px 22px 16px 0; }
.section-label { font-size: 12px; line-height: 1.5; letter-spacing: .08em; color: var(--ink-soft); }
.section-label span { margin: 0 7px; color: #9b9d8f; }
.route-heading h2 { font: 400 35px/1.3 var(--font-title); margin: 10px 0 8px; letter-spacing: .09em; text-wrap: balance; }
.route-instruction { font-size: 13px; color: var(--ink-soft); }
.stop-nav { margin-top: 18px; min-height: 0; overflow-y: auto; }
.stop-list { list-style: none; padding: 0; margin: 0; }
.stop-item { position: relative; }
.stop-item:not(:last-child)::after { content: ""; position: absolute; height: 17px; width: 1px; background: var(--rule); top: 44px; left: 14px; }
.stop-button { display: grid; grid-template-columns: 29px 1fr 12px; gap: 11px; align-items: center; text-align: left; width: 100%; min-height: 56px; padding: 7px 5px 7px 0; border: 0; background: transparent; cursor: pointer; }
.stop-number { display: grid; place-items: center; width: 29px; height: 29px; color: var(--ink-soft); border: 1px solid #b9bcac; border-radius: 50%; font: 400 15px/1 var(--font-number); transition: background .2s, color .2s; }
.stop-copy { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.stop-name { font-size: 14px; line-height: 1.3; }
.stop-time { font: 400 12px/1.2 var(--font-body); color: var(--ink-soft); letter-spacing: .03em; }
.stop-arrow { opacity: 0; color: var(--olive-dark); font-size: 15px; }
.stop-button:hover .stop-name, .stop-button.is-active .stop-name { color: var(--olive-dark); }
.stop-button.is-active .stop-number { color: var(--paper-light); background: var(--olive); border-color: var(--olive); }
.stop-button.is-active .stop-name { font-weight: 600; }
.stop-button.is-active .stop-arrow { opacity: 1; }
.rail-footer { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; }
.rail-route-mark { height: 25px; width: 22px; flex: 0 0 22px; border-left: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-left: 14px; }
.rail-footer p { font-size: 12px; line-height: 1.7; color: var(--ink-soft); }
.rail-footer p span { color: var(--ink-soft); }

/* The map is a working surface; the adjacent note remains readable at every zoom. */
.exploration { display: grid; grid-template-columns: minmax(0, 1fr) 290px; min-width: 0; min-height: 0; border-left: 1px solid var(--rule); }
.map-pane { position: relative; display: grid; grid-template-rows: 67px minmax(0, 1fr); min-width: 0; min-height: 0; background: #d5d5c3; overflow: hidden; }
.map-canvas { grid-row: 2; width: 100%; height: 100%; min-height: 0; }
.map-title { grid-row: 1; display: flex; align-items: flex-start; gap: 10px; pointer-events: none; padding: 12px 20px; background: var(--paper-light); border-bottom: 1px solid var(--rule); }
.map-title-line { width: 2px; height: 36px; margin-top: 2px; background: var(--olive); }
.map-title h2 { font: 400 19px/1.4 var(--font-title); letter-spacing: .08em; }
.map-title p { margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--ink-soft); }
.map-wait { position: absolute; z-index: 3; left: 24px; right: 24px; top: 46%; padding: 20px; color: var(--ink); background: rgb(246 243 234 / 95%); font-size: 14px; line-height: 1.7; }
.map-wait[hidden] { display: none; }
.map-canvas.travel-map[data-map-theme=atlas] { --tm-bg: #f3f1e6; --tm-ink: #30352a; --tm-line: #626b46; --tm-muted: #636b59; --tm-border: #b9bfaa; }
.map-canvas .tm-preview[data-pinned="true"] { display: none; }
.map-canvas .tm-attribution { font-size: 12px; }
.map-canvas .tm-svg-number { font-size: 12px; }

.field-note { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 21px 20px 18px; border-left: 1px solid var(--rule); background: var(--paper-light); scrollbar-width: thin; }
.detail-topline { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 15px; }
.detail-number { font: 400 30px/1 var(--font-number); color: var(--olive); }
.detail-en { font-size: 12px; line-height: 1.3; letter-spacing: .075em; text-align: right; color: var(--ink-soft); }
.detail-image { display: block; position: relative; flex: 0 0 auto; width: 100%; padding: 0; border: 0; background: var(--photo-mat); overflow: hidden; }
.detail-image img { display: block; width: 100%; height: auto; max-height: 238px; object-fit: contain; transition: filter .25s; }
.detail-image:hover img { filter: brightness(1.035); }
.detail-image[hidden], .photo-caption[hidden] { display: none; }
.photo-open { position: absolute; right: 7px; bottom: 7px; display: flex; gap: 7px; align-items: center; padding: 5px 8px; color: #f9f7ef; background: rgb(40 45 33 / 78%); font-size: 12px; line-height: 1.4; }
.photo-open > span { font-size: 16px; }
.photo-caption { display: flex; flex-direction: column; gap: 3px; padding: 10px 0 15px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; border-bottom: 1px solid var(--rule); }
.photo-caption p { color: var(--ink); }
.detail-copy { padding-top: 17px; }
.detail-copy h2 { font: 400 27px/1.35 var(--font-title); letter-spacing: .045em; }
.detail-time { margin-top: 7px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; letter-spacing: .02em; }
.detail-text { margin-top: 11px; font-size: 14px; line-height: 1.85; text-wrap: pretty; }
.related-photos { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 16px; }
.related-photos[hidden] { display: none; }
.related-label { font-size: 12px; line-height: 1.5; color: var(--ink-soft); margin-right: 3px; }
.related-photo { padding: 0; width: 50px; height: 37px; border: 0; background: var(--photo-mat); }
.related-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.related-photo:hover { outline: 1px solid var(--olive); outline-offset: 3px; }

.contact-sheet { display: grid; grid-template-columns: 238px minmax(0, 1fr); gap: 0; border-top: 1px solid var(--rule); padding: 18px 0 7px; min-width: 0; }
.film-heading { display: flex; justify-content: space-between; flex-direction: column; align-items: flex-start; padding-right: 25px; padding-bottom: 13px; }
.film-heading h2 { font: 400 21px/1.4 var(--font-title); letter-spacing: .05em; }
.film-heading p { margin-top: 6px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.film-controls { display: flex; gap: 7px; }
.film-controls button { display: grid; place-items: center; width: 44px; height: 33px; min-height: 33px; padding: 0; border: 1px solid var(--rule); background: transparent; font-size: 19px; cursor: pointer; }
.film-controls button:hover:not(:disabled) { color: var(--paper-light); background: var(--olive); border-color: var(--olive); }
.film-track { display: grid; grid-auto-flow: column; grid-auto-columns: 158px; align-items: start; gap: 12px; min-width: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #abae98 transparent; padding: 0 1px 8px; }
.film-photo { display: block; width: 100%; margin: 0; padding: 0 0 6px; text-align: left; border: 0; border-bottom: 2px solid transparent; background: transparent; scroll-snap-align: start; cursor: zoom-in; }
.film-photo.is-active { border-bottom-color: var(--olive); }
.film-image-wrap { position: relative; display: block; width: 100%; height: 91px; background: var(--photo-mat); }
.film-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.film-photo.is-same-stop .film-image-wrap::after { content: ""; position: absolute; inset: 0; border: 2px solid rgb(98 107 70 / 70%); pointer-events: none; }
.film-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; padding-top: 7px; font-size: 12px; line-height: 1.5; }
.film-time { color: var(--ink); font-variant-numeric: tabular-nums; }
.film-place { min-width: 0; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atlas-day-pager { min-width: 0; margin-top: 7px; }
.atlas-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.atlas-footer > span { flex: 0 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 1600px) {
  .atlas-shell { padding-left: 42px; padding-right: 42px; grid-template-rows: 112px auto minmax(550px, 1fr) 190px auto auto; }
  .atlas-workspace, .contact-sheet { grid-template-columns: 266px minmax(0, 1fr); }
  .exploration { grid-template-columns: minmax(0, 1fr) 330px; }
  .field-note { padding: 24px; }
  .detail-image img { max-height: 280px; }
  .stop-button { min-height: 66px; }
  .stop-item:not(:last-child)::after { top: 47px; height: 22px; }
  .film-track { grid-auto-columns: 184px; }
  .film-image-wrap { height: 107px; }
}

@media (max-width: 1160px) and (min-width: 761px) {
  .atlas-shell { padding: 0 22px; grid-template-rows: 92px auto minmax(490px, 1fr) 174px auto auto; }
  .atlas-workspace, .contact-sheet { grid-template-columns: 204px minmax(0, 1fr); }
  .exploration { grid-template-columns: minmax(0, 1fr) 250px; }
  .field-note { padding: 18px 16px 14px; }
  .route-heading h2 { font-size: 34px; }
  .masthead-title { gap: 18px; }
  .masthead h1 { font-size: 25px; }
  .masthead-separator { margin: 0 6px; }
  .masthead-format { font-size: 12px; }
  .stop-button { column-gap: 8px; }
  .map-title { padding: 20px 15px; }
  .map-title h2 { font-size: 17px; }
  .map-title p { display: none; }
  .map-title-line { height: 23px; }
  .detail-copy h2 { font-size: 24px; }
}

/* On a phone the page becomes a tactile route index, map, note, and contact sheet. */
@media (max-width: 760px) {
  .atlas-shell { display: block; height: auto; min-height: 100svh; padding: 0 18px 22px; }
  .atlas-days { padding: 6px 0 14px; }
  .masthead { min-height: 92px; align-items: center; gap: 15px; }
  .masthead-title { display: block; }
  .all-designs { min-height: 28px; font-size: 12px; gap: 7px; }
  .all-designs span { font-size: 17px; }
  .masthead h1 { font-size: 25px; letter-spacing: .045em; }
  .masthead-separator, .masthead-format { display: none; }
  .masthead-edition { padding-top: 21px; }
  .masthead-edition > span { font-size: 12px; letter-spacing: 0; }
  .masthead-edition p { font-size: 12px; letter-spacing: 0; }
  .atlas-workspace { display: block; }
  .route-rail { padding: 18px 0 0; }
  .route-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 13px; }
  .section-label { flex-basis: 100%; margin-bottom: 5px; }
  .route-heading h2 { margin: 0; font-size: 28px; letter-spacing: .08em; }
  .route-heading h2 br { display: none; }
  .route-instruction { font-size: 12px; }
  .stop-nav { margin: 15px -18px 0; padding: 0 18px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  .stop-nav::-webkit-scrollbar { display: none; }
  .stop-list { display: flex; width: max-content; gap: 8px; padding-bottom: 16px; }
  .stop-item { flex: 0 0 150px; }
  .stop-item:not(:last-child)::after { display: none; }
  .stop-button { padding: 9px 12px 9px 8px; border: 1px solid var(--rule); column-gap: 8px; grid-template-columns: 26px 1fr; min-height: 63px; }
  .stop-button.is-active { background: #e0e1d0; border-color: #a8b091; }
  .stop-number { width: 26px; height: 26px; font-size: 14px; }
  .stop-name { font-size: 14px; }
  .stop-time { font-size: 12px; }
  .stop-arrow, .rail-footer { display: none; }
  .exploration { display: block; border-left: 0; }
  .map-pane { height: 420px; grid-template-rows: 60px minmax(0, 1fr); margin: 0 -18px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
  .map-title { padding: 9px 18px; }
  .map-title h2 { font-size: 17px; }
  .map-title p { font-size: 12px; }
  .map-title-line { height: 33px; }
  .map-wait { left: 18px; right: 18px; padding: 16px; }
  .field-note { display: grid; grid-template-columns: minmax(0, 1fr); overflow: visible; padding: 20px 0 22px; border: 0; background: transparent; }
  .detail-topline { padding-bottom: 15px; }
  .detail-number { font-size: 30px; }
  .detail-en { font-size: 12px; }
  .detail-image img { max-height: 430px; }
  .photo-caption { display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; padding: 11px 0 14px; }
  .photo-caption time { flex-shrink: 0; }
  .detail-copy { padding-top: 18px; }
  .detail-copy h2 { font-size: 29px; }
  .detail-text { font-size: 15px; line-height: 1.85; }
  .related-photos { margin-top: 17px; gap: 9px; }
  .related-photo { width: 62px; height: 46px; }
  .contact-sheet { display: block; padding: 20px 0 0; }
  .film-heading { flex-direction: row; align-items: center; padding: 0 0 17px; }
  .film-heading h2 { font-size: 23px; }
  .film-controls button { width: 42px; height: 42px; }
  .film-track { grid-auto-columns: 165px; gap: 11px; padding-bottom: 13px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
  .film-image-wrap { height: 106px; }
  .film-caption { padding-top: 8px; }
  .atlas-footer { display: block; padding-top: 20px; margin-top: 10px; border-top: 1px solid var(--rule); line-height: 1.8; }
  .atlas-footer span { display: block; margin-top: 4px; }
}
