:root {
  --tour-navy: #1A4D8F;
  --tour-gold: #c9a227;
  --tour-paper: #f3ead8;
  --ms-rule-strong: #5c7fa3;
  --tour-pin-0: #1A4D8F;
  --tour-pin-1: #2d6a4f;
  --tour-pin-2: #9a3412;
  --tour-pin-3: #6d28d9;
}

html:has(.tour-map-page),
html:has(.tour-list-page) {
  height: 100%;
}

.tour-map-page {
  background: #fff;
  min-height: 100svh;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tour-chrome {
  flex: 0 0 auto;
  position: relative;
  z-index: 4;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  padding: 0.75rem clamp(3.25rem, 8vw, 4.5rem) 0.85rem;
}

.tour-logo-banner {
  display: block;
  width: 100%;
  max-width: min(80rem, calc(100vw - 6.5rem));
  height: auto;
  margin: 0 auto 0.75rem;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 700px) {
  .tour-chrome {
    padding: 0.6rem 3.25rem 0.55rem 1rem;
  }

  .tour-logo-banner {
    max-width: 100%;
    margin-bottom: 0;
  }

  .tour-chrome .tour-chrome-toolbar {
    display: none;
  }
}

.tour-chrome-toolbar,
.tour-map-toolbar,
.index-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  box-sizing: border-box;
}

.tour-chrome .tour-chrome-toolbar {
  padding-top: 0.7rem;
  border-top: 0.125rem solid var(--ms-rule-strong);
}

.tour-map-shell {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--tour-paper);
}

.tour-map-top {
  display: none;
}

.tour-chrome .tour-toggle,
.tour-chrome-toolbar .tour-toggle,
.tour-chrome-toolbar .tour-start-select {
  box-sizing: border-box;
  min-height: 2.15rem;
  padding: 0.35rem 0.95rem;
  line-height: 1.2;
  font-family: Cabin, "Segoe UI", sans-serif;
  font-weight: 700;
}

.tour-chrome .tour-toggle,
.tour-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.15rem;
  padding: 0.35rem 0.95rem;
  box-sizing: border-box;
  border: 1px solid var(--tour-navy);
  border-radius: 8px;
  background: var(--tour-navy);
  color: #fff;
  text-decoration: none;
  font-family: Cabin, "Segoe UI", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.tour-map-controls .tour-toggle {
  min-height: 2.5rem;
  padding: 0.45rem 0.95rem;
}

.tour-toggle.is-active,
.tour-toggle[aria-pressed="true"] {
  background: #064A72;
  border-color: #064A72;
  color: #fff;
}

.tour-start-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.15rem;
  font-size: 0.95rem;
  font-family: Cabin, "Segoe UI", sans-serif;
}

.tour-start-select,
#tour-start-select {
  min-height: 2.15rem;
  padding: 0 0.7rem;
  box-sizing: border-box;
  border: 1px solid var(--tour-navy);
  border-radius: 8px;
  background: #fff;
  color: var(--tour-navy);
  font: inherit;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--tour-navy) 50%),
    linear-gradient(135deg, var(--tour-navy) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 1.7rem;
}

.tour-map-frame {
  overflow: hidden;
  flex: 1 1 auto;
  height: auto;
  min-height: 22rem;
  width: 100%;
  position: relative;
}

.tour-map-controls {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  max-width: calc(100% - 5rem);
}

.tour-map-controls .tour-toggle {
  box-shadow: 0 1px 6px rgba(26, 40, 64, 0.18);
}

.tour-map {
  height: 100%;
  min-height: 22rem;
  width: 100%;
}

.tour-map.is-paper {
  background: var(--tour-paper);
}

.tour-map-missing {
  padding: 2rem 1rem;
}

.tour-compass {
  position: absolute;
  left: 0.8rem;
  bottom: 5.5rem;
  z-index: 5;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--tour-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--tour-navy);
  pointer-events: none;
}

.tour-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  margin-top: -16px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--tour-navy);
  color: #fff;
  font: 700 0.8rem/1 Cabin, "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 1;
}

.tour-pin.tour-pin-c0 { background: var(--tour-pin-0); }
.tour-pin.tour-pin-c1 { background: var(--tour-pin-1); }
.tour-pin.tour-pin-c2 { background: var(--tour-pin-2); }
.tour-pin.tour-pin-c3 { background: var(--tour-pin-3); }

.tour-pin:focus-visible {
  outline: 3px solid var(--tour-gold);
  outline-offset: 2px;
}

.tour-pin.is-active {
  background: var(--tour-gold);
  color: #1a1a1a;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
  z-index: 3;
  font-size: 0.95rem;
}

.tour-pin.is-start {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tour-navy);
}

.tour-pin.tour-pin-c0.is-start {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tour-pin-0);
}

.tour-pin.tour-pin-c1.is-start {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tour-pin-1);
}

.tour-pin.tour-pin-c2.is-start {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tour-pin-2);
}

.tour-pin.tour-pin-c3.is-start {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tour-pin-3);
}

.tour-pin.is-muted {
  opacity: 0.45;
}

.tour-cluster {
  width: auto;
  min-width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  padding: 0 0.55rem;
  border-radius: 22px;
  font-size: 0.75rem;
}

.tour-hover-card {
  position: absolute;
  z-index: 6;
  width: min(18rem, 86vw);
  background: #fff;
  border: 1px solid var(--tour-navy);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(26, 77, 143, 0.18);
  padding: 0.7rem;
  pointer-events: none;
}

.tour-hover-card img {
  width: 100%;
  height: 7rem;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin-bottom: 0.4rem;
}

.tour-hover-card strong {
  display: block;
  color: var(--tour-navy);
}

.tour-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 7;
  background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
  max-height: 85vh;
  padding: 0.4rem 1rem calc(1rem + env(safe-area-inset-bottom));
  transform: translateY(110%);
  transition: transform 0.28s ease;
  visibility: hidden;
}

.tour-sheet.is-open {
  transform: translateY(0);
  visibility: visible;
}

.tour-sheet.is-tall {
  height: 85vh;
}

.tour-sheet-chrome {
  position: relative;
  min-height: 1.6rem;
}

.tour-sheet-handle {
  display: block;
  width: 3rem;
  height: 1.4rem;
  margin: 0 auto 0.4rem;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
}

.tour-sheet-handle::before {
  content: "";
  display: block;
  width: 2.4rem;
  height: 4px;
  margin: 0.45rem auto 0;
  border-radius: 2px;
  background: #c5c5c5;
}

.tour-sheet-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--tour-paper);
  color: var(--tour-navy);
  font: 700 1.4rem/1 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}

.tour-sheet img {
  width: 100%;
  max-height: 10rem;
  object-fit: cover;
  border-radius: 8px;
}

.tour-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.tour-sheet-actions a,
.tour-sheet-actions button {
  min-height: 44px;
  padding: 0 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--tour-navy);
  background: var(--tour-navy);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font: inherit;
  cursor: pointer;
}

.tour-sheet-actions a.secondary,
.tour-sheet-actions button.secondary {
  background: #fff;
  color: var(--tour-navy);
}

.tour-chooser {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(26, 40, 64, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tour-chooser[hidden],
.tour-hover-card[hidden],
.tour-sheet[hidden] {
  display: none;
}

.tour-chooser-card {
  background: #fff;
  border-radius: 14px;
  padding: 1.4rem 1.2rem;
  width: min(26rem, 100%);
  text-align: center;
}

.tour-chooser-card h2 {
  margin: 0 0 0.4rem;
  color: var(--tour-navy);
}

.tour-chooser-btn {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0.45rem 0 0;
  border: 0;
  border-radius: 10px;
  background: var(--tour-navy);
  color: #fff;
  font: 600 1.05rem/1.2 inherit;
  cursor: pointer;
}

.tour-chooser-btn[data-route="relic"] {
  background: var(--tour-gold);
  color: #1a1a1a;
}

.tour-stop-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 1rem;
}

.tour-bar-link {
  min-height: 44px;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: var(--tour-navy);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.tour-mini-map {
  height: 14rem;
  border-radius: 10px;
  margin: 0 0 1rem;
  overflow: hidden;
}

.here-now {
  background: #fff;
  border: 1px solid #d5dde8;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin: 0 0 1.2rem;
}

.here-now h3 {
  margin: 0 0 0.4rem;
  color: var(--tour-navy);
}

.here-now-attr {
  font-size: 0.85rem;
  margin: 0.6rem 0 0;
}

.index-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 1rem;
}

.tour-list-page .subtitle {
  text-align: left;
  margin: 0 0 1rem;
}

.menu-card {
  position: relative;
}

.menu-card .walk-num {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--tour-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

@media (min-width: 701px) {
  .tour-sheet {
    left: auto;
    right: 1rem;
    width: min(26rem, 40vw);
    bottom: 1rem;
    border-radius: 16px;
    max-height: calc(100svh - 8rem);
  }
}

@media (max-width: 700px) {
  .tour-map-frame {
    min-height: 16rem;
  }
  .tour-compass {
    bottom: 42vh;
  }
  .tour-map-controls {
    top: 0.55rem;
    left: 0.55rem;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.biz-filter-wrap {
  display: block;
  margin: 0 0 1rem;
}

.biz-filter {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 28rem;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 1px solid var(--tour-navy);
  border-radius: 8px;
  background: #fff;
  color: var(--tour-navy);
  font: inherit;
}

.biz-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.biz-item {
  padding: 0.9rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.biz-name {
  display: block;
  color: var(--tour-navy);
  font-weight: 600;
  font-size: 1.05rem;
}

.biz-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 0.15rem 0.35rem 0.15rem 0;
  padding: 0 0.75rem;
  border: 1px solid var(--tour-navy);
  border-radius: 8px;
  background: #fff;
  color: var(--tour-navy);
  text-decoration: none;
  font: inherit;
}

.district-tenants {
  list-style: none;
  margin: 0.4rem 0 0.8rem;
  padding: 0;
}

.district-tenant {
  display: inline-flex;
  min-height: 36px;
  margin: 0 0 0.3rem;
  padding: 0 0.75rem;
  border: 1px solid var(--tour-navy);
  border-radius: 8px;
  background: #fff;
  color: var(--tour-navy);
  font: inherit;
  cursor: pointer;
}

.biz-meta,
.biz-links,
.biz-attr,
.biz-empty {
  color: #4a5568;
  font-size: 0.95rem;
}

.biz-links {
  margin-top: 0.2rem;
}

.biz-links a {
  color: var(--tour-navy);
}

.biz-attr {
  margin: 1.2rem 0 0;
  font-size: 0.85rem;
}

.hamburger-btn {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  z-index: 1001;
  width: clamp(38px, 8vw, 44px);
  height: clamp(38px, 8vw, 44px);
  background: #fff;
  border: 2px solid var(--tour-navy);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 77, 143, 0.1);
  padding: 0;
}

.hamburger-btn span {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60%;
  height: 3px;
  background: var(--tour-navy);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform: translate(-50%, -50%);
}

.hamburger-btn span:nth-child(1) {
  transform: translate(-50%, -50%) translateY(-8px);
}

.hamburger-btn span:nth-child(3) {
  transform: translate(-50%, -50%) translateY(8px);
}

.hamburger-btn.is-open span:nth-child(1) {
  transform: translate(-50%, -50%) rotate(45deg);
}

.hamburger-btn.is-open span:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.is-open span:nth-child(3) {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.hamburger-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 288px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  box-shadow: -2px 0 16px rgba(26, 77, 143, 0.13);
  border-left: 2px solid var(--tour-navy);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 4.2rem 1.1rem 1.4rem;
  overflow-y: auto;
}

.hamburger-menu.hamburger-menu-open {
  transform: translateX(0);
}

.hamburger-label {
  margin: 1.05rem 0 0.3rem;
  padding: 0 0.45rem;
  color: var(--tour-navy);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hamburger-label:first-child {
  margin-top: 0;
}

.hamburger-link {
  display: block;
  padding: 0.55rem 0.65rem;
  color: var(--tour-navy);
  font-size: 1.02rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}

.hamburger-link:hover,
.hamburger-link:focus {
  background: #eef5fb;
  color: var(--tour-navy);
}

.hamburger-tour {
  margin: 0.35rem 0;
}

.hamburger-tour summary {
  cursor: pointer;
  padding: 0.55rem 0.65rem;
  color: var(--tour-navy);
  font-size: 1.02rem;
  font-weight: 700;
  list-style: none;
  border-radius: 8px;
}

.hamburger-tour summary::-webkit-details-marker {
  display: none;
}

.hamburger-tour summary::after {
  content: " ▾";
  font-weight: 400;
}

.hamburger-tour[open] summary::after {
  content: " ▴";
}

.hamburger-tour summary:hover,
.hamburger-tour summary:focus {
  background: #eef5fb;
}

.hamburger-tour .hamburger-link {
  padding-left: 1.15rem;
  font-weight: 600;
}

.photo-credit {
  margin: 0.35rem 0 0.85rem;
  font-size: 0.92rem;
  color: #3d4a5c;
}

.photo-credit a {
  color: var(--tour-navy);
}

@media (max-width: 700px) {
  .hamburger-btn {
    top: 0.7rem;
    right: 0.7rem;
  }

  .hamburger-menu {
    width: 90vw;
    padding: 3.6rem 0.85rem 1.1rem;
  }
}

.tour-img {
  display: block;
  width: 100%;
  height: 100%;
}

.tour-img picture,
.tour-img img {
  display: block;
  width: 100%;
  height: auto;
}

.menu-card-image .tour-img,
.menu-card-image .tour-img picture,
.menu-card-image .tour-img img {
  height: 100%;
  object-fit: cover;
}

.tour-img.has-lqip {
  background-image: var(--tour-lqip);
  background-size: cover;
  background-position: center;
}

.tour-img.has-lqip img {
  background: transparent;
}

.stop-hero .tour-img {
  height: auto;
}

.stop-hero .tour-img img {
  height: auto;
  object-fit: contain;
}

body:has(.container .stop-hero) .tour-stop-bar,
body:has(.container .stop-hero) .here-now,
body:has(.container .stop-hero) .tour-mini-map {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

body:has(.container .stop-hero) .tour-mini-map {
  height: clamp(14rem, 28vh, 20rem);
  border-radius: 8px;
}

body:has(.container .stop-hero) .stop-hero .tour-img,
body:has(.container .stop-hero) .stop-hero .tour-img img {
  max-height: none;
  height: auto;
}

body:has(.container .stop-hero) .tour-bar-link:hover,
body:has(.container .stop-hero) .tour-bar-link:focus {
  background: var(--tour-gold);
  color: #1a1a1a;
}

body:has(.container .stop-hero) .nav-button:hover:not(:disabled) {
  background-color: var(--tour-gold);
  border-color: var(--tour-gold);
  color: #1a1a1a;
}

@media (max-width: 700px) {
  body:has(.container .stop-hero) .tour-mini-map {
    height: clamp(12rem, 34vw, 16rem);
  }

  body:has(.container .stop-hero) .stop-hero .tour-img,
  body:has(.container .stop-hero) .stop-hero .tour-img img {
    max-height: none;
    height: auto;
  }
}

.tour-layers {
  position: absolute;
  top: 3.4rem;
  left: 0.75rem;
  z-index: 6;
  width: min(18rem, calc(100% - 2rem));
  background: #fff;
  border: 1px solid var(--tour-navy);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  box-shadow: 0 1px 6px rgba(26, 40, 64, 0.18);
}

.tour-layers[hidden] {
  display: none;
}

.tour-layers h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.tour-layer-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 0;
  font-family: Cabin, "Segoe UI", sans-serif;
}

.tour-layer-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  flex: 0 0 auto;
}

.menu-card.tour-pick-card {
  min-height: 10rem;
  justify-content: center;
}

.tour-list-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1rem;
}

.menu-card[hidden],
.hamburger-link[hidden] {
  display: none !important;
}

.tour-start-label[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .tour-pin,
  .tour-sheet,
  .tour-chooser,
  .hamburger-btn span,
  .hamburger-menu {
    transition: none;
  }
}
