:root {
  --primary: #37517e;
  --accent: #47b2e4;
  --accent-hover: #209dd8;
  --accent-light: #e7f5fb;
  --surface: #f3f5fa;
  --paper: #ffffff;
  --text: #444444;
  --muted: #5e5e5e;
  --border: #eeeeee;
  --danger: #ed3c0d;
  --shadow: 0 14px 40px rgba(55, 81, 126, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  color: var(--text);
  background: var(--surface);
  font-family: "Open Sans", sans-serif;
}

button,
input {
  font: inherit;
}

select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: #fff;
  background: var(--primary);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

body.picker-open {
  overflow: hidden;
}

.campus-picker {
  position: fixed;
  z-index: 3000;
  inset: 0;
  overflow-y: auto;
  padding: clamp(22px, 4vw, 50px);
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(71, 178, 228, 0.28), transparent 40%),
    var(--primary);
}

.campus-picker[hidden] {
  display: none;
}

.picker-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.picker-back {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.picker-back:hover,
.picker-back:focus-visible {
  color: var(--accent-light);
}

.picker-heading {
  margin: 24px 0 25px;
  text-align: center;
}

.picker-heading img {
  width: 58px;
  height: 58px;
  padding: 3px;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
}

.picker-heading p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.83);
}

.picker-heading p:first-of-type {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.picker-heading h1 {
  margin: 5px 0;
  font-family: "Jost", sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.campus-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 32px);
}

.campus-choice {
  padding: 9px;
  overflow: hidden;
  color: var(--primary);
  background: #fff;
  border: 3px solid transparent;
  border-radius: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease;
}

.campus-choice:not(:disabled):hover,
.campus-choice:not(:disabled):focus-visible {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.campus-choice:disabled {
  cursor: wait;
  opacity: 0.75;
}

.campus-choice img {
  display: block;
  width: 100%;
  aspect-ratio: 1.42;
  object-fit: contain;
  background: var(--surface);
  border-radius: 8px;
}

.campus-choice-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 10px 7px;
  font-family: "Jost", sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 700;
}

.campus-choice-label span {
  color: var(--accent-hover);
  font-family: "Open Sans", sans-serif;
}

.picker-status {
  min-height: 22px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  text-align: center;
}

.tour-shell {
  display: grid;
  grid-template-columns: minmax(310px, 380px) 1fr;
  width: 100%;
  min-height: 100%;
}

.sidebar {
  position: relative;
  z-index: 500;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 10px 0 35px rgba(55, 81, 126, 0.12);
}

.brand {
  padding: 24px 26px 21px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(71, 178, 228, 0.3), transparent 34%),
    linear-gradient(145deg, var(--primary), var(--primary));
}

.back-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
  font-weight: 650;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: #fff;
}

.brand-lockup {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-lockup img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  padding: 3px;
  background: #fff;
  border-radius: 50%;
}

.brand-lockup p,
.brand-lockup h1,
.intro,
.eyebrow,
.map-toolbar h2 {
  margin: 0;
}

.brand-lockup p {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.brand-lockup h1 {
  margin-top: 2px;
  font-family: "Jost", sans-serif;
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  font-weight: 700;
}

.intro {
  max-width: 31ch;
  margin-top: 15px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.91rem;
  line-height: 1.55;
}

.location-tools {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
}

.locate-button,
.show-all-button {
  cursor: pointer;
  border: 0;
  font-weight: 750;
}

.locate-button {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 15px;
  color: #fff;
  background: var(--accent);
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(71, 178, 228, 0.28);
  transition: background 160ms ease, transform 160ms ease;
}

.locate-button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.locate-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.locate-icon {
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.38);
}

.location-status {
  min-height: 18px;
  margin: 9px 2px 15px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.location-status.error {
  color: var(--danger);
}

.search-box {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 9px 12px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(71, 178, 228, 0.2);
}

.search-box input {
  width: 100%;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.places-section {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 17px 12px 10px 18px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px 10px 4px;
}

.section-heading h2 {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading span {
  min-width: 27px;
  padding: 3px 8px;
  color: var(--primary);
  background: var(--accent-light);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.place-list {
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-color: #cccccc transparent;
  scrollbar-width: thin;
}

.place-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  width: 100%;
  margin-bottom: 5px;
  padding: 11px 10px;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease;
}

.place-card:hover,
.place-card.active {
  background: #f3f5fa;
  border-color: var(--accent-light);
}

.place-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border: 3px solid var(--accent-light);
  border-radius: 50%;
  font-size: 0.73rem;
  font-weight: 850;
}

.place-name {
  display: block;
  margin: 1px 0 4px;
  font-size: 0.88rem;
  font-weight: 780;
  line-height: 1.3;
}

.place-meta {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.empty-message,
.loading-message {
  padding: 20px 10px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.sidebar-footer {
  padding: 10px 22px 14px;
  color: var(--muted);
  font-size: 0.67rem;
}

.sidebar-footer a {
  color: var(--accent);
}

.map-panel {
  position: relative;
  min-width: 0;
  min-height: 100vh;
}

#map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #e7f5fb;
}

/*
 * Local Leaflet layout fallback.
 *
 * The hosted Leaflet stylesheet remains linked in index.php for its complete
 * control and popup theme. These structural rules keep the map usable if that
 * external stylesheet is delayed, blocked, or served from a stale cache.
 */
.leaflet-container {
  position: relative;
  overflow: hidden;
  outline-offset: 1px;
  background: #dddddd;
  -webkit-tap-highlight-color: transparent;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  top: 0;
  left: 0;
}

.leaflet-map-pane,
.leaflet-tile-pane,
.leaflet-overlay-pane,
.leaflet-shadow-pane,
.leaflet-marker-pane,
.leaflet-tooltip-pane,
.leaflet-popup-pane {
  top: 0;
  left: 0;
}

.leaflet-map-pane {
  z-index: 400;
}

.leaflet-tile-pane {
  z-index: 200;
}

.leaflet-overlay-pane {
  z-index: 400;
}

.leaflet-shadow-pane {
  z-index: 500;
}

.leaflet-marker-pane {
  z-index: 600;
}

.leaflet-tooltip-pane {
  z-index: 650;
}

.leaflet-popup-pane {
  z-index: 700;
}

.leaflet-map-pane canvas {
  z-index: 100;
}

.leaflet-map-pane svg {
  z-index: 200;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.leaflet-container .leaflet-tile-pane img,
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container img.leaflet-tile {
  width: auto;
  max-width: none !important;
  max-height: none !important;
  padding: 0;
}

.leaflet-container img.leaflet-tile {
  width: 256px !important;
  height: 256px !important;
}

.leaflet-tile {
  visibility: hidden;
  filter: inherit;
}

.leaflet-tile-loaded {
  visibility: inherit;
}

.leaflet-container.leaflet-touch-zoom {
  touch-action: pan-x pan-y;
}

.leaflet-container.leaflet-touch-drag {
  touch-action: none;
  touch-action: pinch-zoom;
}

.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
  touch-action: none;
}

.leaflet-control-container {
  position: relative;
  z-index: 800;
}

.leaflet-control {
  position: relative;
  z-index: 800;
  float: left;
  clear: both;
  pointer-events: auto;
}

.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.leaflet-top {
  top: 0;
}

.leaflet-right {
  right: 0;
}

.leaflet-bottom {
  bottom: 0;
}

.leaflet-left {
  left: 0;
}

.leaflet-right .leaflet-control {
  float: right;
}

.leaflet-top .leaflet-control {
  margin-top: 10px;
}

.leaflet-bottom .leaflet-control {
  margin-bottom: 10px;
}

.leaflet-left .leaflet-control {
  margin-left: 10px;
}

.leaflet-right .leaflet-control {
  margin-right: 10px;
}

.leaflet-control-attribution {
  margin: 0;
  padding: 0 5px;
  color: #444444;
  background: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  line-height: 1.4;
}

.leaflet-control-attribution a {
  color: #0078a8;
}

.leaflet-zoom-box {
  z-index: 800;
  width: 0;
  height: 0;
  border: 2px dotted #38f;
  box-sizing: border-box;
}

.map-toolbar {
  position: absolute;
  z-index: 450;
  top: 20px;
  right: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px 13px 18px;
  pointer-events: none;
}

.map-toolbar > .map-heading,
.show-all-button {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.map-toolbar > .map-heading {
  padding: 11px 15px;
  border-radius: 11px;
}

.map-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: auto;
}

#campus-filter {
  max-width: 240px;
  height: 44px;
  padding: 0 12px;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 9px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

#campus-filter:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.show-all-short {
  display: none;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.map-toolbar h2 {
  margin-top: 2px;
  font-family: "Jost", sans-serif;
  font-size: 1.27rem;
}

.show-all-button {
  padding: 11px 15px;
  color: var(--primary);
  border: 1px solid rgba(55, 81, 126, 0.16);
  border-radius: 9px;
}

.show-all-button:hover {
  color: #fff;
  background: var(--accent-hover);
}

.show-all-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.map-hint {
  position: absolute;
  z-index: 450;
  right: 20px;
  bottom: 26px;
  max-width: min(390px, calc(100% - 40px));
  padding: 11px 14px;
  color: #fff;
  background: rgba(55, 81, 126, 0.94);
  border-radius: 8px;
  box-shadow: var(--shadow);
  font-size: 0.78rem;
  line-height: 1.4;
  pointer-events: none;
}

.empty-campus-notice {
  position: absolute;
  z-index: 451;
  top: 50%;
  left: 50%;
  width: min(400px, calc(100% - 40px));
  padding: 20px;
  color: var(--text);
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
  transform: translate(-50%, -50%);
}

.empty-campus-notice[hidden] {
  display: none;
}

.empty-campus-notice h3 {
  margin: 0 0 6px;
  color: var(--primary);
}

.empty-campus-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.place-details {
  position: absolute;
  z-index: 451;
  top: 130px;
  bottom: 22px;
  left: 24px;
  display: flex;
  flex-direction: column;
  width: min(42%, 540px);
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.place-details[hidden],
.details-image[hidden],
.image-fallback[hidden],
.gallery-controls[hidden],
.details-distance[hidden] {
  display: none;
}

.details-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.details-kicker {
  margin: 0 0 4px;
  color: var(--accent-hover);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.details-heading h3 {
  margin: 0;
  color: var(--primary);
  font-family: "Jost", sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.2;
}

.details-close {
  flex: 0 0 auto;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  color: var(--primary);
  background: var(--surface);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.details-close:hover,
.details-close:focus-visible {
  color: #fff;
  background: var(--accent-hover);
}

.details-description {
  margin: 9px 0 14px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.5;
}

.details-image-stage {
  display: grid;
  flex: 1 1 auto;
  min-height: 180px;
  overflow: hidden;
  place-items: center;
  background: var(--surface);
  border-radius: 10px;
}

.details-image-button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.details-image-button[hidden] {
  display: none;
}

.details-image-button:focus-visible {
  outline: 3px solid var(--accent-hover);
  outline-offset: -3px;
}

.details-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.image-fallback {
  padding: 16px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.details-gallery-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  color: var(--muted);
  font-size: 0.78rem;
}

.gallery-controls {
  display: flex;
  gap: 8px;
}

.gallery-controls button {
  padding: 7px 9px;
  color: var(--primary);
  background: var(--accent-light);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 700;
}

.gallery-controls button:hover,
.gallery-controls button:focus-visible {
  color: #fff;
  background: var(--accent-hover);
}

.details-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  padding-top: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 0.74rem;
}

.details-distance {
  color: var(--accent-hover);
  font-weight: 700;
}

body.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  width: min(96vw, 1500px);
  height: min(94dvh, 1100px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 18px;
  color: var(--text);
  background: var(--paper);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 25px 70px rgba(55, 81, 126, 0.35);
}

.image-lightbox[open] {
  display: flex;
  flex-direction: column;
}

.image-lightbox::backdrop {
  background: rgba(55, 81, 126, 0.88);
}

.lightbox-close {
  position: absolute;
  z-index: 1;
  top: 24px;
  right: 24px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  color: var(--primary);
  background: var(--paper);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  color: #fff;
  background: var(--accent-hover);
}

.lightbox-image-stage {
  display: grid;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  place-items: center;
  background: var(--surface);
  border-radius: 9px;
}

.lightbox-image-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-image-stage img[hidden],
.lightbox-image-stage p[hidden],
.lightbox-footer button[hidden] {
  display: none;
}

.lightbox-image-stage p {
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.lightbox-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 55px;
}

.lightbox-footer p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox-footer button {
  padding: 8px 12px;
  color: var(--primary);
  background: var(--accent-light);
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.lightbox-footer button:hover,
.lightbox-footer button:focus-visible {
  color: #fff;
  background: var(--accent-hover);
}

.campus-marker,
.user-marker {
  background: transparent;
  border: 0;
}

.campus-marker span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 8px;
  box-shadow: 0 5px 12px rgba(55, 81, 126, 0.3);
  font-size: 0.72rem;
  font-weight: 850;
  transform: rotate(-45deg);
}

.campus-marker span b {
  transform: rotate(45deg);
}

.user-marker span {
  display: block;
  width: 18px;
  height: 18px;
  background: #47b2e4;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(71, 178, 228, 0.22), 0 3px 10px rgba(0, 0, 0, 0.28);
}

.leaflet-popup-content-wrapper {
  background: #fff;
  opacity: 1;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(55, 81, 126, 0.22);
} 

.leaflet-popup-content {
  min-width: 190px;
  margin: 14px 16px;
}

.popup-kicker {
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.popup-title {
  margin: 3px 0 5px;
  color: var(--primary);
  font-size: 1rem;
}

.popup-description,
.popup-distance {
  margin: 0;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.45;
}

.popup-distance {
  margin-top: 7px;
  color: var(--accent);
  font-weight: 750;
}

.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;
}

.noscript-message {
  position: fixed;
  z-index: 3000;
  inset: 20px;
  display: grid;
  place-items: center;
  padding: 30px;
  color: #fff;
  background: var(--primary);
  border-radius: 12px;
  text-align: center;
}

.sidebar-toggle,
.sidebar-backdrop {
  display: none;
}

@media (max-width: 1024px) {
  .tour-shell {
    display: block;
    min-height: 100dvh;
  }

  .sidebar {
    position: fixed;
    z-index: 1100;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(380px, calc(100vw - 56px));
    height: 100dvh;
    max-height: 100dvh;
    transform: translateX(calc(-100% - 12px));
    transition: transform 220ms ease;
  }

  .tour-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-toggle {
    position: fixed;
    z-index: 1200;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 13px;
    color: #fff;
    background: var(--primary);
    border: 0;
    border-radius: 9px;
    box-shadow: var(--shadow);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 750;
  }

  .sidebar-toggle:hover,
  .sidebar-toggle:focus-visible {
    background: var(--accent-hover);
  }

  .tour-shell.sidebar-open .sidebar-toggle {
    left: calc(min(380px, 100vw - 56px) - 54px);
    width: 40px;
    padding: 0;
    background: var(--accent-hover);
    font-size: 1.45rem;
  }

  .sidebar-backdrop:not([hidden]) {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: block;
    background: rgba(55, 81, 126, 0.38);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .map-panel {
    min-height: 100dvh;
  }

  .map-toolbar {
    left: 122px;
  }
}

@media (min-width: 761px) and (max-width: 900px) {
  .map-toolbar > .map-heading {
    display: none;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .tour-shell {
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    max-height: 100dvh;
    overflow: hidden;
    box-shadow: 10px 0 35px rgba(55, 81, 126, 0.2);
  }

  .brand {
    padding: 18px 20px;
  }

  .back-link {
    margin-bottom: 14px;
  }

  .brand-lockup img {
    width: 45px;
    height: 45px;
  }

  .intro {
    display: none;
  }

  .location-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 16px;
  }

  .location-status {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
  }

  .places-section {
    max-height: none;
    padding: 12px 10px 8px 14px;
  }

  .sidebar-footer {
    display: none;
  }

  .map-panel {
    min-height: 0;
  }

  #map {
    position: relative;
    width: 100%;
    height: 100dvh;
    min-height: 380px;
  }

  .place-details {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    width: auto;
    margin: 14px 16px 24px;
  }

  .details-image-stage {
    flex: none;
    height: min(45vh, 320px);
  }

  .map-panel.has-selection .map-hint {
    display: none;
  }

  .map-toolbar {
    top: 8px;
    right: 8px;
    left: 8px;
    padding: 0;
  }

  .map-toolbar > .map-heading {
    display: none;
  }

  #campus-filter {
    width: min(44vw, 180px);
  }

  .show-all-button {
    padding: 11px;
  }

  .show-all-full {
    display: none;
  }

  .show-all-short {
    display: inline;
  }

  .show-all-button {
    margin-left: auto;
  }

  .map-hint {
    right: 10px;
    bottom: 20px;
    max-width: calc(100% - 20px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar {
    transition: none;
  }
}

@media (max-width: 470px) {
  .campus-choices {
    grid-template-columns: 1fr;
  }

  .picker-heading {
    margin: 18px 0;
  }

  .campus-choice img {
    max-height: 240px;
  }

  .location-tools {
    grid-template-columns: 1fr;
  }

  .location-status {
    grid-column: auto;
    grid-row: auto;
  }

  .image-lightbox {
    width: 100vw;
    height: 100dvh;
    padding: 10px;
    border-radius: 0;
  }

  .lightbox-close {
    top: 16px;
    right: 16px;
  }

  .lightbox-footer {
    gap: 6px;
  }

  .lightbox-footer button {
    padding: 8px;
    font-size: 0.7rem;
  }
}
