@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(assets/fonts/dm-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(assets/fonts/dm-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/instrument-serif-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/instrument-serif-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===============================================================================================================
   Layout follows the window's width, not the device (Material 3 window size classes): from 600 px floating pills
   along the top, the place strip along the bottom and the open place as a card; below 600 px a top search bar and a
   bottom sheet with a grabber (Apple HIG sheets). Mouse or touch only changes rail arrows and target sizes,
   never the layout. Colours follow the system light or dark appearance. No backdrop-filter
   over the map: Safari re-blurs it on every frame while the map moves (scripts/measure).
   =============================================================================================================== */
:root {
  color-scheme: light dark;
  --serif: "Instrument Serif", Georgia, serif;
  --ink: #1b241e;
  --ink-2: #33403a;
  --muted: #5f6c63;
  --accent: #2e6a3d;
  --accent-ink: #ffffff;
  --accent-soft: #e2eed9;
  --accent-soft-ink: #224f2d;
  --panel: #fbfaf6;
  --surface: #fbfaf6f2;
  --field: #1b241e0d;
  --hover: #1b241e0f;
  --line: #1b241e17;
  --line-strong: #1b241e33;
  --segment: #ffffff;
  --placeholder: #e7e4da;
  --shadow: 0 1px 2px #14201a14, 0 4px 14px #14201a1a;
  --shadow-lg: 0 1px 3px #14201a14, 0 14px 38px #14201a29;
  --logo-field: #1d5631;
  --logo-roof: #c4572f;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --control: 36px;
  --edge-t: max(12px, env(safe-area-inset-top));
  --edge-l: max(12px, env(safe-area-inset-left));
  --edge-r: max(12px, env(safe-area-inset-right));
  --edge-b: max(12px, env(safe-area-inset-bottom));
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: #526657;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef2ea;
    --ink-2: #d6ded3;
    --muted: #a3b0a5;
    --accent: #cfe8b8;
    --accent-ink: #1c321f;
    --accent-soft: #2b3d2f;
    --accent-soft-ink: #dcefcb;
    --panel: #18211c;
    --surface: #18211cf2;
    --field: #ffffff0f;
    --hover: #ffffff12;
    --line: #ffffff1a;
    --line-strong: #ffffff38;
    --segment: #34433a;
    --placeholder: #2a3630;
    --shadow: 0 1px 2px #00000033, 0 6px 18px #00000040;
    --shadow-lg: 0 1px 3px #00000033, 0 16px 40px #00000059;
    --logo-field: #efe5cc;
    --logo-roof: #d4663f;
  }
}
@media (pointer: coarse) { :root { --control: 44px; } }
* { box-sizing: border-box; }
/* The var() height must sit behind @supports: where dvh is unknown (Safari < 15.4) it would be invalid at
   computed-value time and collapse the body to auto height instead of falling back to 100vh. */
body { margin: 0; height: var(--app-height, 100vh); overflow: hidden; overscroll-behavior: none; }
@supports (height: 100dvh) { body { height: var(--app-height, 100dvh); } }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-appearance: none; appearance: none; -webkit-user-select: none; user-select: none; }
/* No double-tap zoom delay or accidental page zoom on controls (the map itself uses touch-action: none). */
button, a, input, summary, [role="button"] { touch-action: manipulation; }
button:disabled { cursor: default; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--accent-ink); }
[hidden] { display: none !important; }
.symbols { position: absolute; pointer-events: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.surface { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.icon-button {
  display: grid; place-items: center; flex: none;
  width: var(--control); height: var(--control); padding: 0;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink);
}
.icon-button .icon { width: 18px; height: 18px; }
@media (hover: hover) { .icon-button:hover:not(:disabled) { background: var(--hover); } }
.icon-button:disabled { opacity: .35; }

.atlas { position: relative; height: 100%; isolation: isolate; background: #526657; }
/* Campus switch (app.js slideOutCampus): the last frame of the old campus, above the map, below the controls. */
.campus-switch-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#viewport { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; background: #526657; outline-offset: -3px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
#viewport.is-dragging { cursor: grabbing; }
/* The map: an OpenSeadragon viewer (map-viewer.js) fills #scene and takes the pointer input. .map-art is the overview
   under it, placed with a transform from the camera until the viewer has loaded its first view (then .is-loaded hides it). */
#scene { position: absolute; inset: 0; overflow: hidden; }
#scene .openseadragon-container { position: absolute !important; inset: 0; }
.map-art { position: absolute; left: 0; top: 0; display: block; max-width: none; transform-origin: 0 0; pointer-events: none; }
.map-art:not([src]) { visibility: hidden; }
.map-art.is-loaded { display: none; }
.marker-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.marker {
  position: absolute;
  left: 0;
  top: 0;
  /* Anchor point on screen, then the label sits above it, shifted to avoid overlaps (set by app.js). */
  transform: translate(var(--marker-left, 0px), var(--marker-top, 0px)) translate(-50%, -100%)
    translate(var(--marker-x, 0px), var(--marker-y, 0px));
  transform-origin: 50% 100%;
  min-height: 28px;
  max-width: 178px;
  padding: 4px 5px;
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  filter: url(#label-shadow);
  opacity: 0;
  transition: opacity 160ms ease-out;
  /* Each label is its own compositing layer, so its SVG halo (#label-shadow, rendered on the CPU in Safari) is drawn
     once: moving and fading are then compositor work. Without it, Safari re-rendered the halos whenever a fade
     started or ended (many labels at once while zooming): ~8 frames over 33 ms per zoom (scripts/measure). */
  will-change: transform, opacity;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
.marker:not([inert]) { pointer-events: auto; }
/* Separate rules: a browser without :focus-visible (Safari < 15.4) would drop a combined selector list. */
.marker:hover {
  outline: none;
  text-decoration: underline 2px;
  text-underline-offset: 3px;
  z-index: 1;
}
.marker:focus-visible {
  outline: none;
  text-decoration: underline 2px;
  text-underline-offset: 3px;
  z-index: 1;
}
.marker[aria-pressed="true"] { color: #d9efc5; z-index: 2; }

/* ---------------------------------------------------------------------------------------------------------------
   Components shared by both layouts.
   --------------------------------------------------------------------------------------------------------------- */
.sidebar { display: contents; }
.brand {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  column-gap: 10px;
  row-gap: 1px;
  min-width: 0;
}
.emblem { width: 32px; height: 32px; grid-column: 1; grid-row: 1 / 3; }
.brand-title { grid-column: 2; grid-row: 1; font-size: 14.5px; font-weight: 650; line-height: 1.2; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-subtitle { grid-column: 2; grid-row: 2; min-width: 0; }
.brand-subtitle { font-size: 11.5px; line-height: 1.2; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.has-campuses .brand-subtitle { display: none; }
body.has-campuses .brand-title { grid-row: 1 / 3; }

/* Campus selector: its own pill right beneath the brand in every layout (beside the column in short landscape). */
.campus-switcher { position: absolute; left: 0; top: calc(var(--bar) + 8px); z-index: 4; transition: opacity .45s ease, visibility 0s; }
body.is-touring .campus-switcher { opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s .45s; }
.campus-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  max-width: calc(100vw - 2 * var(--edge-l) - 60px);
  padding: 0 11px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color .45s ease, color .45s ease;
}
@media (pointer: coarse) { .campus-toggle { height: 40px; } }
.campus-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* First visits: until the menu has been opened once, the switcher glows softly a moment after load (app.js). */
.campus-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.campus-toggle.is-hinting { background: var(--accent-soft); color: var(--accent-soft-ink); }
.campus-toggle.is-hinting .campus-caret { color: inherit; }
.campus-toggle.is-hinting::after { animation: campus-hint 1.5s cubic-bezier(.2, 0, 0, 1) .2s 2; }
@keyframes campus-hint {
  from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); }
  to { box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 0%, transparent); }
}
.campus-caret { width: 12px; height: 12px; flex: none; color: var(--muted); transform: rotate(90deg); transition: transform 160ms ease; }
.campus-toggle[aria-expanded="true"] .campus-caret { transform: rotate(-90deg); }
@media (hover: hover) {
  .campus-toggle:hover, .campus-toggle[aria-expanded="true"] { background: var(--panel); }
}

.campus-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 6;
  min-width: 196px;
  max-width: min(260px, calc(100vw - 2 * var(--edge-l)));
  max-height: calc(100vh - var(--bar, 50px) - 32px);
  overflow-y: auto;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
  transform-origin: top left;
}
.campus-menu:not([hidden]) { animation: campus-menu-in .18s cubic-bezier(.2, 0, 0, 1); }
@keyframes campus-menu-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@supports (max-height: 100dvh) {
  .campus-menu { max-height: calc(100dvh - var(--bar, 50px) - 32px); }
}
.campus-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 550;
  text-align: left;
  text-decoration: none;
}
.campus-menu a .icon { width: 16px; height: 16px; color: var(--accent); opacity: 0; flex: none; }
.campus-menu a[aria-checked="true"] {
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
  font-weight: 650;
}
.campus-menu a[aria-checked="true"] .icon { color: var(--accent-soft-ink); opacity: 1; }
@media (hover: hover) {
  .campus-menu a:hover:not([aria-checked="true"]) { background: var(--hover); }
}
@media (pointer: coarse) {
  .campus-menu a { min-height: 44px; }
}
.masthead.campus-open { z-index: 5; }
.header-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.lang-toggle { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--field); }
.lang-toggle button { height: 26px; padding: 0 9px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; }
@media (hover: hover) { .lang-toggle button:hover:not([aria-pressed="true"]) { color: var(--ink); } }
.lang-toggle button[aria-pressed="true"] { color: var(--ink); background: var(--segment); box-shadow: 0 1px 2px #14201a26; cursor: default; }
#sources-button { border-radius: 50%; }

#search-form { display: flex; align-items: center; }
#search-form > .icon { width: 18px; height: 18px; margin: 0 9px 0 15px; color: var(--muted); }
#search { flex: 1; min-width: 0; height: 100%; padding: 0; border: none; background: transparent; font-size: 15px; outline: none; -webkit-appearance: none; appearance: none; border-radius: 0; }
#search::placeholder { color: var(--muted); opacity: 1; }
#search::-webkit-search-cancel-button, #search::-webkit-search-decoration, #search::-webkit-search-results-button, #search::-webkit-search-results-decoration { display: none; -webkit-appearance: none; }
.clear-search { width: 32px; height: 32px; margin-right: 6px; border-radius: 50%; }
.clear-search .icon { width: 16px; height: 16px; }

/* Places: a horizontal strip of photo cards, the name on the picture. */
.sheet-grabber, .sheet-title { display: none; }
.place-track { position: relative; }
#place-list {
  height: 100%;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: auto hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  cursor: grab;
}
#place-list::-webkit-scrollbar { display: none; }
#place-list.is-dragging { cursor: grabbing; -webkit-user-select: none; user-select: none; scroll-snap-type: none; }
#place-list.is-dragging .place-card { cursor: inherit; }
#place-list li { flex: 0 0 136px; scroll-snap-align: start; }
.place-card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: end;
  width: 100%;
  height: 100%;
  padding: 8px 9px;
  overflow: hidden;
  border: 0;
  border-radius: var(--r-md);
  background: var(--placeholder);
  color: #fff;
  text-align: left;
  text-decoration: none;
}
.place-card img, .place-card::before { position: absolute; inset: 0; width: 100%; height: 100%; }
.place-card img { z-index: -2; object-fit: cover; }
.place-card::before { content: ""; z-index: -1; background: linear-gradient(0deg, #101b14e0 0%, #101b1480 34%, #101b1400 70%); }
.place-text { min-width: 0; }
.place-name { display: -webkit-box; overflow: hidden; font-size: 12.5px; font-weight: 600; line-height: 1.2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.place-category { display: none; }
@media (hover: hover) { .place-card:hover img { filter: brightness(1.1); } }
.place-card[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--accent); }
.place-card:focus-visible { outline-offset: -3px; }
.rail-arrow { display: none; }
#places-prev .icon { transform: rotate(180deg); }
.empty { display: grid; place-items: center; min-height: 100%; padding: 10px 16px; color: var(--muted); font-size: 13px; text-align: center; }
#place-list:empty { display: none; }

/* The open place: picture, then the text; share and close over the picture. */
.detail { overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.preview { display: block; width: 100%; object-fit: cover; background: var(--placeholder); }
.detail-type { color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.detail h2 { margin-top: 6px; font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1; letter-spacing: -.005em; text-wrap: balance; }
#detail-alias { margin-top: 5px; color: var(--muted); font-size: 13px; }
#detail-description { margin-top: 10px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
#detail-units { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.detail-share, .detail-close { position: absolute; width: 34px; height: 34px; border-radius: 50%; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
/* `.detail` lifts these above `.icon-button:hover`, whose faint tint made the round buttons vanish over the photo. */
@media (hover: hover) and (min-width: 600px) { .detail .detail-share:hover, .detail .detail-close:hover { background: var(--panel); } }
.detail-share .icon, .detail-close .icon { width: 16px; height: 16px; }
.dialog-close { border-radius: 50%; }

/* Map tools: keep the same operations available by mouse, touch and keyboard. */
.map-tools {
  position: absolute;
  z-index: 2;
  right: var(--edge-r);
  display: grid;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: calc(var(--r-sm) + 3px);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.map-tools > .surface { background: transparent; border: 0; box-shadow: none; }
.zoom-tools { display: grid; gap: 2px; padding-bottom: 3px; border-bottom: 1px solid var(--line); }

#tour[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent); }
.map-credit {
  position: absolute;
  z-index: 1;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink-2);
  font-size: 12px;
  white-space: nowrap;
}

.map-load-error {
  position: absolute;
  z-index: 4;
  top: calc(var(--edge-t) + 86px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 16px;
  width: max-content;
  max-width: calc(100% - 2 * var(--edge-l));
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.map-load-error p { margin: 0; font-size: 14px; font-weight: 600; }
.map-load-error button {
  min-height: 44px;
  padding-inline: 14px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--accent-soft-ink);
  font-size: 14px;
  font-weight: 600;
}
.map-load-error button:focus-visible { outline-offset: 2px; }

 /* ===============================================================================================================
   600 px and wider: floating pills along the top (brand, search, language and sources), the place strip along the
   bottom, the open place as a card at the bottom left, the map tools at the right.
   =============================================================================================================== */
@media (min-width: 600px) {
  :root { --bar: 46px; --dock: 84px; }
  .masthead {
    position: absolute;
    z-index: 3;
    top: var(--edge-t);
    left: var(--edge-l);
    right: var(--edge-r);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
  }
  .masthead > * { pointer-events: auto; }
  .brand, .header-tools, #search-form {
    height: var(--bar);
    border: 1px solid var(--line);
    border-radius: calc(var(--bar) / 2);
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .brand { position: relative; padding: 0 16px 0 7px; }
  .header-tools { padding: 0 5px 0 6px; }
  #search-form {
    position: absolute;
    z-index: 4;
    top: var(--edge-t);
    left: 50%;
    transform: translateX(-50%);
    width: min(420px, calc(100% - 2 * var(--edge-l) - 2 * 236px));
  }
  #search-form:focus-within { box-shadow: var(--shadow), 0 0 0 2px var(--accent); }

  .directory {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: var(--edge-b);
    transform: translateX(-50%);
    width: min(780px, calc(100% - 2 * var(--edge-l) - 2 * var(--control) - 40px));
  }
  .place-track {
    height: var(--dock);
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  #place-list { scroll-padding-inline: 6px; }
  .place-card { border-radius: calc(var(--r-lg) - 6px); }
  @media (hover: hover) and (pointer: fine) {
    .rail-arrow {
      display: grid;
      position: absolute;
      z-index: 1;
      top: 50%;
      width: 32px;
      height: 32px;
      border: 1px solid var(--line);
      border-radius: 50%;
      background: var(--surface);
      box-shadow: var(--shadow);
      transform: translateY(-50%);
    }
    #places-prev { left: -14px; }
    #places-next { right: -14px; }
    .rail-arrow .icon { width: 15px; height: 15px; }
    .rail-arrow:disabled { opacity: 0; pointer-events: none; }
  }

  .detail {
    position: absolute;
    z-index: 2;
    left: var(--edge-l);
    bottom: calc(var(--edge-b) + var(--dock) + 12px);
    width: min(360px, calc(100% - 2 * var(--edge-l) - var(--control) - 28px));
    max-height: calc(100% - var(--edge-t) - var(--bar) - var(--dock) - var(--edge-b) - 36px);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--panel);
    box-shadow: var(--shadow-lg);
  }
  .preview { aspect-ratio: 16 / 9; max-height: 200px; }
  .detail-body { padding: 14px 18px 18px; }
  .detail-share, .detail-close { top: 10px; }
  .detail-close { right: 10px; }
  .detail-share { right: 50px; }

  .map-tools { bottom: calc(var(--edge-b) + var(--dock) + 12px); }
  .map-credit { right: var(--edge-r); bottom: max(3px, env(safe-area-inset-bottom)); }
}
/* Compact & narrow layouts: the brand keeps only its mark so search has room; when multiple campuses exist,
   the campus selector becomes its own pill right beneath the top bar (or beside the column in short landscape). */
@media (max-width: 899.98px), (min-width: 600px) and (max-height: 480px) {
  .brand { position: static; grid-template-columns: 32px; padding: 0 6px; }
  .brand-title, .brand-subtitle { display: none; }
}
@media (min-width: 600px) and (max-width: 899.98px) {
  #search-form { width: min(420px, calc(100% - 2 * var(--edge-l) - 2 * 150px)); }
}

/* ===============================================================================================================
   Short landscape windows (phones turned sideways): the bar and the places or the open place make a column on the
   left; the strip and a floating card would cover most of a 400 px tall map.
   =============================================================================================================== */
@media (min-width: 600px) and (max-height: 480px) {
  :root { --column: min(352px, 46vw); }
  .lang-toggle button { padding: 0 7px; }
  .masthead { right: auto; width: calc(var(--column) - 2 * var(--edge-l)); padding: 0; }
  .masthead .brand { border-radius: calc(var(--bar) / 2) 0 0 calc(var(--bar) / 2); }
  .brand { padding: 0 6px; border-right: 0; box-shadow: none; }
  .campus-switcher { top: 0; left: calc(min(352px, 46vw) - var(--edge-l) + 12px); }
  .campus-toggle { height: var(--bar); max-width: calc(100vw - min(352px, 46vw) - 24px); }
  .header-tools { border-left: 0; border-radius: 0 calc(var(--bar) / 2) calc(var(--bar) / 2) 0; box-shadow: none; }
  #search-form {
    left: calc(var(--edge-l) + 46px);
    transform: none;
    width: calc(var(--column) - 2 * var(--edge-l) - 46px - 114px);
    border-inline: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .masthead::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: calc(var(--bar) / 2);
    box-shadow: var(--shadow);
  }
  .directory, .detail {
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--column);
    max-height: none;
    transform: none;
    border: 0;
    border-right: 1px solid var(--line);
    border-radius: 0 var(--r-lg) var(--r-lg) 0;
    background: var(--panel);
    box-shadow: var(--shadow-lg);
  }
  .directory { display: flex; flex-direction: column; padding: calc(var(--edge-t) + var(--bar) + 10px) var(--edge-l) 8px; }
  body.place-open .directory { display: none; }
  .place-track { flex: 1; height: auto; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
  #place-list { flex-direction: column; overflow: hidden auto; scroll-snap-type: y proximity; overscroll-behavior: contain; }
  #place-list li { flex: 0 0 56px; }
  .place-card { align-items: center; border-radius: var(--r-sm); }
  .rail-arrow { display: none !important; }
  .detail { padding-top: calc(var(--edge-t) + var(--bar) + 10px); }
  .preview { width: calc(100% - 2 * var(--edge-l)); margin: 0 var(--edge-l); aspect-ratio: 2 / 1; max-height: 120px; border-radius: var(--r-md); }
  .detail-body { padding: 12px var(--edge-l) 16px; }
  .detail h2 { font-size: 24px; }
  .detail-share, .detail-close { top: calc(var(--edge-t) + var(--bar) + 18px); }
  .detail-close { right: calc(var(--edge-l) + 8px); }
  .detail-share { right: calc(var(--edge-l) + 48px); }
  .map-tools { bottom: var(--edge-b); grid-auto-flow: column; }
  .zoom-tools { grid-auto-flow: column; padding: 0 3px 0 0; border-bottom: 0; border-right: 1px solid var(--line); }
  .map-load-error { left: auto; right: var(--edge-r); top: calc(var(--edge-t) + 54px); transform: none; max-width: calc(100% - var(--column) - 2 * var(--edge-r)); }
  .map-credit { right: var(--edge-r); bottom: calc(var(--edge-b) + var(--control) + 13px); }
}


/* Campus tour: a calm view while it runs (app.js setTouring): place labels, the places, search and the map tools
   except the tour button fade out; the open place stays. */
.marker-layer, .directory, #search-form, .map-tools > *, .masthead { transition: opacity .45s ease, visibility 0s; }
body.is-touring .marker-layer, body.is-touring .directory, body.is-touring #search-form,
body.is-touring .map-tools > :not(#tour) {
  opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s .45s;
}
body.is-touring .map-tools > :not(#tour) { position: absolute; }

/* Campus tour: in the place card while the tour stays at a stop; the bar fills until it moves on. */
.tour-controls { display: grid; gap: 6px; margin-top: 10px; }
.tour-progress { color: var(--muted); font-size: 12px; font-weight: 650; }
.tour-bar { display: block; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
#tour-bar-fill { display: block; width: 0; height: 100%; background: var(--accent); }

dialog:not([open]) { display: none; }
dialog { width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px); background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); scrollbar-color: #728676 transparent; }
dialog::backdrop { background: #0c16108c; }
dialog h2 { padding-right: 36px; font-size: 24px; letter-spacing: -.025em; }
dialog ul { list-style: none; padding: 0; }
dialog li { padding: 10px 0; border-bottom: 1px solid var(--line); }
dialog a { font-weight: 650; }
dialog p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.dialog-close { position: absolute; top: 6px; right: 6px; }

/* Share card */
.share-dialog {
  width: min(436px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  overflow: hidden auto;
  overscroll-behavior: contain;
  border-radius: 22px;
  box-shadow: 0 24px 60px #050c0880, var(--shadow);
}
.share-dialog::backdrop { background: #0c1610bf; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.share-dialog[open] { animation: share-in 240ms cubic-bezier(.2, .8, .2, 1); }
.share-dialog[open]::backdrop { animation: share-fade 240ms ease-out; }
@keyframes share-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes share-sheet-in { from { transform: translateY(100%); } }
@keyframes share-fade { from { opacity: 0; } }
.share-card { position: relative; }
.share-figure { position: relative; margin: 0; aspect-ratio: 4 / 3; max-height: 46vh; max-height: 46dvh; width: 100%; overflow: hidden; background: var(--placeholder); }
.share-figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.share-figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 58%, color-mix(in srgb, var(--panel) 62%, transparent) 82%, var(--panel) 100%); }
.share-body { position: relative; margin-top: -30px; padding: 0 24px; }
.share-dialog .share-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  margin: 0;
  padding: 0 10px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.share-dialog .share-title {
  margin-top: 12px;
  padding: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 10vw, 46px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.005em;
  text-wrap: balance;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.share-dialog .share-subtitle { margin-top: 6px; color: var(--muted); font-size: 14px; font-weight: 500; }
.share-dialog .share-description { margin-top: 12px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.share-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-top: 18px;
  padding: 13px 0 2px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .015em;
}
.share-logo { width: 24px; height: 24px; flex: none; }
.share-coordinates { margin-left: auto; color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 24px 24px; }
.share-action {
  position: relative;
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--field);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
@media (hover: hover) { .share-action:hover { background: var(--hover); } }
.share-url { flex-basis: 100%; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--field); color: var(--ink); font: inherit; font-size: 13px; }
.share-action.primary { flex-basis: 100%; color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
@media (hover: hover) { .share-action.primary:hover { filter: brightness(1.08); } }
.share-action[aria-busy="true"] { cursor: progress; }
.share-action .icon { width: 18px; height: 18px; }
.share-action .done, .share-action.is-done .icon:not(.done) { display: none; }
.share-action.is-done .done { display: block; }
/* Zero-height sticky bar keeps the close button in view while a tall sheet scrolls. */
.share-close-bar { position: sticky; top: 0; z-index: 2; height: 0; }
.share-dialog .share-close { top: 10px; right: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (hover: hover) { .share-dialog .share-close:hover { background: var(--panel); } }
@media (max-width: 560px) {
  .share-dialog {
    width: 100%;
    max-width: 100%;
    max-height: calc(100% - max(16px, env(safe-area-inset-top)));
    margin: auto 0 0;
    border-width: 1px 0 0;
    border-radius: 22px 22px 0 0;
  }
  .share-dialog[open] { animation-name: share-sheet-in; animation-duration: 280ms; }
  .share-body { padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
  .share-actions { padding: 16px 20px max(20px, env(safe-area-inset-bottom)); }
}
/* iOS zooms the page when a field under 16px takes focus. */
@media (pointer: coarse) {
  .share-url { font-size: 16px; }
}
@media (max-width: 340px) {
  .share-action { flex-basis: 100%; }
}
@media (max-height: 640px) {
  .share-figure { max-height: 36vh; max-height: 36dvh; }
  .share-dialog .share-description { margin-top: 8px; }
  .share-footer { margin-top: 12px; }
}


/* ===============================================================================================================
   Under 600 px: a floating top bar (brand mark, search, language, sources) and a bottom sheet that shows the places
   or the open place. The grabber (tap or drag) collapses the sheet to its title; the map tools float above it
   (app.js sets --sheet-height).
   =============================================================================================================== */
@media (max-width: 599.98px) {
  :root { --bar: 50px; --edge-t: max(10px, env(safe-area-inset-top)); --edge-l: max(10px, env(safe-area-inset-left)); --edge-r: max(10px, env(safe-area-inset-right)); }
  .masthead {
    position: absolute;
    z-index: 3;
    top: var(--edge-t);
    left: var(--edge-l);
    right: var(--edge-r);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--bar);
    padding: 0 6px 0 8px;
    border: 1px solid var(--line);
    border-radius: calc(var(--bar) / 2);
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .brand { padding: 0; }
  .lang-toggle button { padding: 0 8px; }
  #search-form {
    position: absolute;
    z-index: 6;
    top: var(--edge-t);
    left: calc(var(--edge-l) + 46px);
    right: calc(var(--edge-r) + 132px);
    height: var(--bar);
  }
  #search-form > .icon { margin: 0 8px 0 4px; }
  .masthead:has(#search:focus) { box-shadow: var(--shadow), 0 0 0 2px var(--accent); }
  body.is-touring .masthead { opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s .45s; }

  .directory, .detail {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    border-top: 1px solid var(--line);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    background: var(--panel);
    box-shadow: var(--shadow-lg);
  }
  .directory { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  body.place-open .directory { display: none; }
  .sheet-grabber { display: grid; place-items: center; width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; cursor: grab; touch-action: none; }
  .sheet-grabber span { width: 36px; height: 5px; border-radius: 3px; background: var(--line-strong); }
  .sheet-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 16px 8px; }
  .sheet-brand { font-size: 13px; font-weight: 600; }
  .sheet-label { display: none; }
  #sheet-count { color: var(--muted); font-size: 12px; }
  .place-track { height: 92px; }
  #place-list { gap: 8px; padding: 0 12px 4px; scroll-padding-inline: 12px; }
  #place-list li { flex-basis: 132px; }
  .place-card { height: 88px; }

  .detail {
    max-height: min(64%, calc(100% - var(--edge-t) - var(--bar) - 24px));
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-content: start;
    column-gap: 14px;
    padding: 0 16px max(16px, env(safe-area-inset-bottom));
  }
  .detail .sheet-grabber { grid-column: 1 / -1; margin: 0 -16px; width: calc(100% + 32px); }
  .preview { width: 88px; height: 88px; border-radius: var(--r-md); }
  .detail-body::before { content: ""; float: right; width: 78px; height: 28px; }
  .detail h2 { font-size: 26px; }
  #detail-description { margin-top: 8px; }
  .detail-share, .detail-close { top: 44px; background: var(--field); box-shadow: none; }
  .detail-close { right: 16px; }
  .detail-share { right: 56px; }

  /* Collapsed: the sheet keeps its grabber and title. */
  body.sheet-collapsed .place-track,
  body.sheet-collapsed .preview, body.sheet-collapsed #detail-alias,
  body.sheet-collapsed #detail-description, body.sheet-collapsed #detail-units, body.sheet-collapsed .tour-controls { display: none; }
  body.sheet-collapsed .detail { grid-template-columns: minmax(0, 1fr); padding-bottom: max(12px, env(safe-area-inset-bottom)); }

  .map-tools { bottom: calc(var(--sheet-height, 140px) + 12px); }
  .map-credit { left: var(--edge-l); bottom: calc(var(--sheet-height, 140px) + 6px); }
}
@media (max-width: 599.98px) and (max-height: 680px) {
  body:not(.is-touring) .map-tools { grid-template-columns: auto auto; }
  .zoom-tools { grid-column: 1 / -1; grid-auto-flow: column; }
}
@media (max-width: 359.98px) {
  .detail { grid-template-columns: 72px minmax(0, 1fr); }
  .preview { width: 72px; height: 72px; }
  #search-form { right: calc(var(--edge-r) + 120px); }
}

@media (prefers-reduced-motion: reduce) {
  .marker { transition: none; }
  .share-dialog[open], .share-dialog[open]::backdrop { animation: none; }
  #place-list { scroll-behavior: auto; }
  .campus-menu:not([hidden]), .campus-toggle.is-hinting::after { animation: none; }
}

/* Windows high contrast / forced colours: keep selected states and map text legible. */
@media (forced-colors: active) {
  .surface, .sidebar, .masthead, .map-tools, .share-action, .campus-menu { border: 1px solid CanvasText; }
  .campus-switcher .campus-toggle { border-color: CanvasText; }
  .lang-toggle button[aria-pressed="true"], .share-action.primary, .campus-menu a[aria-checked="true"] {
    forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight;
  }
  .place-card[aria-current="page"] { outline: 3px solid Highlight; outline-offset: -3px; }
  /* Labels and cards sit on artwork, not on a system background: keep their own white-on-dark colours. */
  .marker, .place-card { forced-color-adjust: none; }
  .marker[aria-pressed="true"] { text-decoration: underline 2px; }
  .icon { forced-color-adjust: auto; }
  #viewport { forced-color-adjust: none; }
}

/* Legacy / no-script notice (see index.html). Plain CSS only, so it works in browsers that lack variables. */
.legacy-notice {
  position: fixed; z-index: 99; left: 0; right: 0; top: 0; bottom: 0; padding: 24px;
  display: flex; flex-direction: column; justify-content: center; text-align: center;
  background: #1a2620; color: #f3f6ef; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.legacy-notice h1 { margin: 0 0 8px; font-size: 20px; }
.legacy-notice p { margin: 0 auto 14px; max-width: 34em; font-size: 15px; line-height: 1.5; }
.static-map { display: block; overflow: auto; }
.static-map ul { margin: 20px auto; padding-inline-start: 20px; max-width: 34em; text-align: start; }
.static-map li { margin-block: 8px; }
.static-map a { color: inherit; }



