:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f9f7fc;
  background: #100b18;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight: 400;
  --muted: #aaa1b7;
  --violet: #c4a4ff;
  --line: rgb(255 255 255 / 11%);
}

.header-nav {
  gap: 0.75rem;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 76% 18%, rgb(91 48 129 / 31%), transparent 36rem),
    radial-gradient(ellipse at 8% 82%, rgb(66 37 102 / 25%), transparent 32rem),
    linear-gradient(135deg, #100b18 0%, #1a1025 52%, #100b18 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.access-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse at 70% 20%, rgb(111 66 164 / 36%), transparent 35rem),
    linear-gradient(145deg, #100b18, #21132e 55%, #100b18);
}

.access-card {
  width: min(100%, 27rem);
  padding: clamp(1.75rem, 5vw, 2.75rem);
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 1.5rem;
  color: #241a30;
  background: linear-gradient(145deg, #fff, #f3eff8);
  box-shadow: 0 2rem 6rem rgb(0 0 0 / 45%);
  animation: card-arrive 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.access-card .eyebrow {
  color: #745491;
}

.access-card h1 {
  margin: 0.55rem 0;
  font-size: clamp(2rem, 8vw, 2.6rem);
  letter-spacing: -0.06em;
}

.card-copy,
.prototype-note {
  color: #685f70;
}

.access-card label {
  display: block;
  margin: 1.5rem 0 0.45rem;
  font-size: 0.9rem;
  font-weight: 650;
}

.access-card input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #d5ccdf;
  border-radius: 0.75rem;
  outline: none;
  color: #241a30;
  background: #fff;
}

.organizer-form {
  display: grid;
  max-width: 52rem;
  gap: 0.75rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  animation: fade-up 650ms 220ms both;
}

.organizer-form input[type="file"] {
  color: #c3b9cc;
}

.organizer-form input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 0.5rem;
  color: #f9f7fc;
  background: rgb(255 255 255 / 9%);
}

.create-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 52rem;
  margin: 0 0 1rem;
}

.create-heading h2 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.6rem;
}

.create-heading .review-intro {
  margin: 0;
}

.itinerary-display {
  max-width: 58rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  animation: fade-up 500ms both;
}

.itinerary-display > h2 {
  margin: 0.5rem 0;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.active-traveler-icon {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.active-traveler-icon img {
  width: 3rem;
  height: 3rem;
  border: 2px solid rgb(196 164 255 / 65%);
  border-radius: 50%;
  object-fit: cover;
}

.active-traveler-icon .secondary-button {
  margin: 0 0 0 auto;
}

.active-checkpoint-list {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}

.active-checkpoint-list li {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 0.85rem;
  background: rgb(8 6 13 / 42%);
}

.active-checkpoint-list h3 {
  margin: 0;
  font-size: 1.05rem;
}

.active-stop-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.stop-edit-button {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 0.65rem;
  color: #e8e0ef;
  background: rgb(255 255 255 / 6%);
}

.stop-edit-button:hover,
.stop-edit-button:focus-visible {
  border-color: rgb(196 164 255 / 65%);
  background: rgb(196 164 255 / 12%);
}

.stop-edit-button:focus-visible {
  outline: 3px solid #a87de3;
  outline-offset: 2px;
}

.stop-edit-button svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.active-checkpoint-list p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.active-checkpoint-list .checkpoint-image {
  max-width: 24rem;
}

.button-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.map-setup-link {
  display: inline-block;
  margin-top: 0.55rem;
  color: #e3d3f5;
  font-size: 0.85rem;
  font-weight: 650;
  text-underline-offset: 0.25rem;
}

.organizer-form h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.organizer-form label {
  margin-top: 0.4rem;
  color: #e8e0ef;
  font-size: 0.9rem;
  font-weight: 650;
}

.organizer-form input,
.organizer-form textarea,
.checkpoint-card input,
.checkpoint-card textarea,
.checkpoint-card select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgb(255 255 255 / 17%);
  border-radius: 0.7rem;
  outline: none;
  color: #f9f7fc;
  background: rgb(13 9 19 / 55%);
}

.organizer-form input:focus-visible,
.organizer-form textarea:focus-visible,
.checkpoint-card input:focus-visible,
.checkpoint-card textarea:focus-visible,
.checkpoint-card select:focus-visible {
  outline: 3px solid #a87de3;
  outline-offset: 2px;
}

.organizer-form textarea {
  resize: vertical;
  line-height: 1.55;
}

.checkpoint-card input,
.checkpoint-card textarea,
.checkpoint-card select {
  color: #f9f7fc;
  background: rgb(13 9 19 / 55%);
}

.checkpoint-card textarea {
  resize: vertical;
  line-height: 1.55;
}

.organizer-form input::placeholder,
.organizer-form textarea::placeholder {
  color: #887e94;
}

.organizer-status {
  margin: 0.3rem 0 0;
  color: #b6adc1;
  font-size: 0.85rem;
}

.organizer-submit {
  justify-self: start;
  padding: 0.75rem 1rem;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 0.7rem;
  color: #d3c7df;
  background: rgb(255 255 255 / 6%);
}

.organizer-submit:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.review-section {
  display: grid;
  max-width: 52rem;
  gap: 0.9rem;
  margin: 2rem 0 4rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: rgb(255 255 255 / 4%);
  scroll-margin-top: 1rem;
}

.review-section h2 {
  margin: 0;
  font-size: 1.6rem;
}

.review-intro,
.field-hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.checkpoint-list {
  display: grid;
  gap: 1rem;
}

.checkpoint-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 0.9rem;
  background: rgb(8 6 13 / 42%);
}

.checkpoint-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.checkpoint-field {
  display: grid;
  min-width: 0;
  gap: 0.4rem;
}

.checkpoint-field label {
  color: #e8e0ef;
  font-size: 0.88rem;
  font-weight: 650;
}

.traveler-icon-field {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 0.9rem;
  background: rgb(8 6 13 / 42%);
}

.traveler-icon-field > label {
  color: #e8e0ef;
  font-size: 0.92rem;
  font-weight: 650;
}

.traveler-icon-field input[type="file"] {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid rgb(255 255 255 / 17%);
  border-radius: 0.7rem;
  color: #f9f7fc;
  background: rgb(13 9 19 / 55%);
}

.traveler-icon-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.traveler-icon-preview img {
  width: 3rem;
  height: 3rem;
  border: 2px solid rgb(196 164 255 / 65%);
  border-radius: 50%;
  object-fit: cover;
}

.traveler-icon-preview .secondary-button {
  margin: 0 0 0 auto;
}

.coordinate-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.review-warnings {
  padding: 0.8rem 1rem;
  border: 1px solid rgb(255 198 107 / 35%);
  border-radius: 0.75rem;
  color: #ffe2af;
  background: rgb(255 198 107 / 8%);
}

.review-warnings p {
  margin: 0.25rem 0;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
  padding-top: 0.5rem;
}

@media (max-width: 480px) {
  .coordinate-fields {
    grid-template-columns: 1fr;
  }
}

.back-link {
  display: inline-block;
  margin-top: 0.85rem;
  text-align: center;
}

.access-card input:focus-visible,
.access-card button:focus-visible,
.secondary-button:focus-visible,
.narration-icon-button:focus-visible,
.widget-dismiss:focus-visible {
  outline: 3px solid #a87de3;
  outline-offset: 3px;
}

.access-card > button {
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: 0.75rem;
  color: #fff;
  background: linear-gradient(100deg, #503269, #8055a8);
  font-weight: 700;
  transition: filter 180ms ease, transform 180ms ease;
}

.access-card > button:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.prototype-note {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  text-align: center;
}

.form-error {
  margin: 0.6rem 0 0;
  color: #a42545;
  font-size: 0.88rem;
}

.app-shell {
  min-height: 100vh;
  overflow: hidden;
}

.site-header {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.25rem, 5vw, 5rem);
  border-bottom: 1px solid var(--line);
  background: rgb(16 11 24 / 42%);
  backdrop-filter: blur(18px);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link,
.back-link {
  color: #e3d3f5;
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration-color: rgb(227 211 245 / 45%);
  text-underline-offset: 0.25rem;
}

.nav-link:hover,
.back-link:hover {
  color: #fff;
  text-decoration-color: currentColor;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.brand-mark,
.guide-icon {
  display: grid;
  place-items: center;
  color: var(--violet);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgb(196 164 255 / 34%);
  border-radius: 0.7rem;
  background: rgb(196 164 255 / 10%);
}

.header-tag,
.eyebrow {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.header-tag {
  text-align: right;
}

main {
  container-name: viewer;
  container-type: inline-size;
  width: calc(100% - clamp(2rem, 4vw, 6rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 2rem;
}

.intro {
  max-width: 48rem;
  margin-bottom: 1.5rem;
  animation: fade-up 650ms 100ms both;
}

.intro .eyebrow,
.detail-card .eyebrow,
.guide-card .eyebrow,
.access-card .eyebrow {
  margin: 0;
}

.intro h1 {
  margin: 0.8rem 0 0.7rem;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 680;
  letter-spacing: -0.075em;
  line-height: 1.02;
}

.intro h1 span {
  color: #c8a9f3;
}

.intro-copy {
  max-width: 36rem;
  margin: 0;
  color: #b6adc1;
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.7;
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  align-items: stretch;
  gap: 1rem;
}

.dashboard.assistant-open {
  grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
}

.dashboard.assistant-open .tour-panel {
  grid-column: 1 / -1;
  width: 100%;
  height: min(70vh, 38rem);
  min-height: min(32rem, 70vh);
  max-height: min(70vh, 38rem);
  justify-self: stretch;
}

.surface {
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: linear-gradient(145deg, rgb(255 255 255 / 7%), rgb(255 255 255 / 3%));
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 18%);
  backdrop-filter: blur(14px);
}

.map-panel {
  position: relative;
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.7rem);
  animation: fade-up 650ms 220ms both;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.section-heading h2,
.detail-card h2,
.guide-card h2 {
  margin: 0.35rem 0 0;
  font-size: 1.25rem;
  letter-spacing: -0.035em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgb(196 164 255 / 24%);
  border-radius: 999px;
  color: #ddd1ef;
  background: rgb(196 164 255 / 8%);
  font-size: 0.68rem;
  white-space: nowrap;
}

.status-pill > span:first-child {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: #cba7ff;
  box-shadow: 0 0 0.8rem #cba7ff;
}

#map {
  position: relative;
  display: grid;
  height: min(72vh, 62rem);
  min-height: 34rem;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 9%);
  border-radius: 0.9rem;
  background: #17111e;
  text-align: center;
}

.map-assistant-toggle {
  position: absolute;
  z-index: 1100;
  top: calc(clamp(1rem, 3vw, 1.7rem) + 5.2rem);
  right: calc(clamp(1rem, 3vw, 1.7rem) + 0.9rem);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgb(226 208 255 / 28%);
  border-radius: 999px;
  color: #f9f7fc;
  background: rgb(25 16 36 / 92%);
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 28%);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.map-assistant-toggle > span:first-child {
  color: #d3baff;
  font-size: 1.1rem;
}

.map-assistant-toggle:hover,
.map-assistant-toggle:focus-visible {
  border-color: rgb(226 208 255 / 58%);
  background: rgb(57 38 76 / 96%);
  transform: translateY(-1px);
}

.map-assistant-toggle:focus-visible,
.assistant-collapse:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
}

.map-assistant-toggle[aria-expanded="true"] {
  display: none;
}

#map .leaflet-control-zoom a {
  border-color: rgb(255 255 255 / 14%);
  color: #eee5fa;
  background: rgb(24 17 32 / 92%);
}

#map .leaflet-tile-pane {
  filter: brightness(0.5) invert(1) hue-rotate(225deg) saturate(0.65);
}

#map .leaflet-control-zoom a:hover,
#map .leaflet-control-zoom a:focus-visible {
  color: #fff;
  background: #38244d;
}

#map .leaflet-control-attribution {
  color: #c4b8d2;
  background: rgb(16 11 24 / 82%);
}

#map .leaflet-control-attribution a {
  color: #d3baff;
}

#map .leaflet-tooltip {
  border: 1px solid rgb(196 164 255 / 30%);
  border-radius: 0.5rem;
  color: #f9f7fc;
  background: #1a1025;
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 30%);
}

#map .leaflet-tooltip-top::before {
  border-top-color: #1a1025;
}

#map .checkpoint-map-popup .leaflet-popup-content-wrapper {
  border: 1px solid rgb(196 164 255 / 30%);
  border-radius: 0.75rem;
  color: #f9f7fc;
  background: #1a1025;
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 35%);
}

#map .checkpoint-map-popup .leaflet-popup-tip {
  background: #1a1025;
}

#map .checkpoint-map-popup .leaflet-popup-close-button {
  color: #c4b8d2;
}

#map .checkpoint-map-popup .leaflet-popup-content {
  margin: 0.85rem 1rem;
}

.checkpoint-popup-content {
  display: grid;
  max-width: 15rem;
  gap: 0.35rem;
}

.narration-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.narration-icon-button {
  display: inline-grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  padding: 0.35rem;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 0.65rem;
  background: rgb(255 255 255 / 6%);
}

.narration-icon-button img,
.trip-controls img {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  object-fit: contain;
}

.narration-icon-button:disabled,
.trip-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.narration-status {
  flex-basis: 100%;
  margin: 0;
  color: #b6adc1;
  font-size: 0.78rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.checkpoint-popup-content h3 {
  margin: 0;
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.3;
}

.checkpoint-popup-content h3 a {
  color: inherit;
}

.checkpoint-popup-content h3 a:hover,
.checkpoint-popup-content h3 a:focus-visible {
  color: #d3baff;
}

.checkpoint-popup-content p {
  margin: 0;
  color: #c4b8d2;
  font-size: 0.78rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.checkpoint-popup-content p:last-of-type {
  margin-top: 0.2rem;
  color: #eee5fa;
}

@media (max-width: 520px) {
  #map .checkpoint-map-popup {
    max-width: min(220px, calc(100vw - 3rem)) !important;
  }

  #map .checkpoint-map-popup .leaflet-popup-content {
    margin: 0.55rem 0.7rem;
  }

  .checkpoint-popup-content {
    max-width: 100%;
    gap: 0.2rem;
  }

  .checkpoint-popup-content h3 {
    padding-right: 0.5rem;
    font-size: 0.88rem;
  }

  .checkpoint-popup-location,
  .checkpoint-popup-stay {
    display: none;
  }

  .checkpoint-popup-stop-link {
    justify-self: start;
    padding: 0.1rem 0;
  }

  .checkpoint-popup-content .narration-controls {
    margin-top: 0;
  }
}

.checkpoint-popup-stop-link {
  border: 0;
  padding: 0.15rem 0;
  color: #d3baff;
  background: transparent;
  font-size: 0.78rem;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.checkpoint-popup-stop-link:hover,
.checkpoint-popup-stop-link:focus-visible {
  color: #fff;
}

#map.has-tour {
  display: block;
  text-align: left;
}

#map.has-tour::before,
#map.has-tour::after {
  content: none;
}

#map::before,
#map::after {
  position: absolute;
  width: 140%;
  height: 1px;
  background: rgb(225 205 247 / 7%);
  content: "";
  transform: rotate(-28deg);
}

#map::after {
  transform: rotate(28deg);
}

.map-orbit {
  position: absolute;
  width: min(54vw, 24rem);
  aspect-ratio: 1;
  border: 1px solid rgb(226 208 246 / 9%);
  border-radius: 50%;
}

.orbit-two {
  width: min(38vw, 16rem);
  border-color: rgb(226 208 246 / 12%);
}

.map-pin {
  z-index: 1;
  display: grid;
  width: 3.2rem;
  height: 3.2rem;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 40%);
  border-radius: 1.1rem;
  color: #281c35;
  background: linear-gradient(145deg, #fff, #d9c8ee);
  box-shadow: 0 0 2.8rem rgb(214 187 245 / 42%);
  font-size: 1.3rem;
  animation: pin-float 3s ease-in-out infinite;
}

.map-message {
  z-index: 1;
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  padding: 1rem;
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 0.8rem;
  background: rgb(18 13 25 / 76%);
  backdrop-filter: blur(12px);
}

.map-message p {
  margin: 0.2rem 0;
  color: #b3aabd;
  font-size: 0.82rem;
  line-height: 1.5;
}

.map-message .map-message-title {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 650;
}

.tour-panel {
  display: grid;
  min-width: 0;
  min-height: 0;
}

.tour-panel[hidden] {
  display: none;
}

.detail-card {
  padding: 1.35rem;
  animation: fade-up 650ms 340ms both;
}

.checkpoint-card {
  display: flex;
  max-height: calc(min(max(72vh, 34rem), 62rem) + 8.75rem);
  min-height: 0;
  flex-direction: column;
}

.checkpoint-image {
  display: block;
  width: 100%;
  max-height: 14rem;
  border-radius: 0.7rem;
  object-fit: cover;
}

.tour-stop-details p {
  margin: 0;
  color: #b6adc1;
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.tour-stop-details a {
  color: #d3baff;
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.tour-stop-details a:hover,
.tour-stop-details a:focus-visible {
  color: #fff;
}

.checkpoint-map-button {
  justify-self: start;
  padding: 0.35rem 0;
  border: 0;
  color: #d3baff;
  background: transparent;
  font-size: 0.78rem;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.checkpoint-map-button:hover,
.checkpoint-map-button:focus-visible {
  color: #fff;
}

.trip-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.trip-controls .secondary-button {
  margin: 0;
}

.trip-play-button,
.trip-stop-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.checkpoint-status {
  margin: 0.75rem 0 0;
  color: #b6adc1;
  font-size: 0.85rem;
  line-height: 1.5;
}

.guide-card {
  position: relative;
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 1rem;
}

.guide-card::before {
  position: absolute;
  top: -4rem;
  right: -4rem;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background: rgb(167 123 217 / 12%);
  content: "";
  filter: blur(1rem);
}

.assistant-panel-header {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.8rem;
}

.guide-icon {
  display: grid;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid rgb(196 164 255 / 28%);
  border-radius: 0.8rem;
  background: rgb(196 164 255 / 10%);
  font-size: 1.3rem;
}

.guide-prompt {
  display: grid;
  gap: 0.2rem;
}

.guide-keyword {
  color: var(--violet);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.guide-title {
  font-size: 0.92rem;
  font-weight: 650;
}

.assistant-collapse {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(196 164 255 / 28%);
  border-radius: 0.8rem;
  color: var(--violet);
  background: rgb(196 164 255 / 10%);
  cursor: pointer;
}

.assistant-collapse img {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
}

.guide-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 0.75rem 0 0;
}

.guide-content p {
  margin: 0;
  color: #b6adc1;
  font-size: 0.88rem;
  line-height: 1.6;
}

.guide-content .secondary-button {
  margin-top: 0.8rem;
}

.assistant-language-controls {
  position: relative;
  z-index: 3;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  flex-wrap: wrap;
}

.assistant-form input {
  width: 100%;
  min-width: 0;
  padding: 0.75rem 3.1rem 0.75rem 0.85rem;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 0.9rem;
  color: #f9f7fc;
  background: rgb(15 10 23 / 76%);
}

.assistant-current-language {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  padding: 0.4rem 0.8rem;
  border: 1px solid rgb(196 164 255 / 23%);
  border-radius: 999px;
  color: #e9dcf9;
  background: rgb(196 164 255 / 9%);
  font-size: 0.82rem;
  font-weight: 650;
}

.assistant-language-picker {
  position: relative;
}

.assistant-stop-picker {
  position: relative;
}

.assistant-stop-toggle {
  display: inline-flex;
  max-width: min(18rem, calc(100vw - 3rem));
  min-height: 2.25rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  overflow: hidden;
  border: 1px solid rgb(196 164 255 / 28%);
  border-radius: 999px;
  color: #f0e7fc;
  background: rgb(196 164 255 / 10%);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.assistant-stop-toggle:hover:not(:disabled),
.assistant-stop-toggle[aria-expanded="true"] {
  border-color: rgb(196 164 255 / 60%);
  background: rgb(196 164 255 / 18%);
}

.assistant-stop-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.assistant-stop-toggle > span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-stop-color,
.assistant-stop-option-color {
  width: 0.72rem;
  height: 0.72rem;
  flex: none;
  border-radius: 50%;
  background: var(--stop-color, #c4a4ff);
}

.assistant-stop-chevron {
  color: #d7cce3;
  font-size: 1rem;
  line-height: 1;
}

.assistant-stop-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  display: grid;
  width: max-content;
  min-width: 13rem;
  max-width: min(20rem, calc(100vw - 3rem));
  max-height: 16rem;
  gap: 0.2rem;
  padding: 0.35rem;
  overflow-y: auto;
  border: 1px solid rgb(196 164 255 / 22%);
  border-radius: 0.85rem;
  background: #21182b;
  box-shadow: 0 0.8rem 2rem rgb(0 0 0 / 38%);
}

.assistant-stop-menu[hidden] {
  display: none;
}

.assistant-stop-menu button {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  overflow: hidden;
  border: 0;
  border-radius: 0.55rem;
  color: #e8e0ef;
  background: transparent;
  font: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
}

.assistant-stop-menu button > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assistant-stop-menu button:hover,
.assistant-stop-menu button:focus-visible,
.assistant-stop-menu button[aria-checked="true"] {
  color: #fff;
  background: rgb(196 164 255 / 16%);
}

.assistant-stop-toggle:focus-visible,
.assistant-stop-menu button:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.assistant-language-toggle {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(196 164 255 / 24%);
  border-radius: 50%;
  background: rgb(196 164 255 / 9%);
  cursor: pointer;
}

.assistant-language-toggle img {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
}

.assistant-language-toggle:hover:not(:disabled),
.assistant-language-toggle[aria-expanded="true"] {
  border-color: rgb(196 164 255 / 60%);
  background: rgb(196 164 255 / 18%);
}

.assistant-language-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.assistant-auto-voiceover {
  display: inline-flex;
  min-height: 2.25rem;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgb(196 164 255 / 24%);
  border-radius: 999px;
  color: #d7cce3;
  background: rgb(255 255 255 / 5%);
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
}

.assistant-auto-voiceover[aria-pressed="true"] {
  border-color: rgb(196 164 255 / 46%);
  color: #f0e7fc;
  background: rgb(196 164 255 / 12%);
}

.assistant-auto-voiceover-switch {
  display: inline-flex;
  width: 1.8rem;
  height: 1rem;
  align-items: center;
  padding: 0.12rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 22%);
  transition: background 160ms ease;
}

.assistant-auto-voiceover-switch span {
  width: 0.76rem;
  height: 0.76rem;
  border-radius: 50%;
  background: #e7deef;
  transition: transform 160ms ease, background 160ms ease;
}

.assistant-auto-voiceover[aria-pressed="true"] .assistant-auto-voiceover-switch {
  background: #7655a1;
}

.assistant-auto-voiceover[aria-pressed="true"] .assistant-auto-voiceover-switch span {
  background: #fff;
  transform: translateX(0.8rem);
}

.assistant-auto-voiceover:focus-visible,
.assistant-audio-button:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.assistant-language-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  display: grid;
  min-width: 9rem;
  gap: 0.2rem;
  padding: 0.35rem;
  border: 1px solid rgb(196 164 255 / 22%);
  border-radius: 0.85rem;
  background: #21182b;
  box-shadow: 0 0.8rem 2rem rgb(0 0 0 / 38%);
}

.assistant-language-menu[hidden] {
  display: none;
}

.assistant-language-menu button {
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 0.55rem;
  color: #e8e0ef;
  background: transparent;
  font: inherit;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
}

.assistant-language-menu button:hover,
.assistant-language-menu button:focus-visible,
.assistant-language-menu button[aria-checked="true"] {
  color: #fff;
  background: rgb(196 164 255 / 16%);
}

.assistant-language-toggle:focus-visible,
.assistant-language-menu button:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.assistant-form input:focus-visible,
.assistant-actions button:focus-visible,
.assistant-mic-button:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.assistant-messages {
  display: flex;
  min-height: 0;
  flex: 1 1 0;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.8rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.assistant-message {
  min-width: 0;
  width: fit-content;
  max-width: min(86%, 26rem);
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 0.7rem;
  background: rgb(255 255 255 / 5%);
}

.assistant-message-user {
  align-self: flex-end;
  border-color: rgb(196 164 255 / 24%);
  background: rgb(196 164 255 / 8%);
}

.assistant-message-audio-controls {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.assistant-audio-button {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0.3rem;
  border: 1px solid rgb(196 164 255 / 25%);
  border-radius: 0.6rem;
  background: rgb(196 164 255 / 9%);
}

.assistant-audio-button img {
  width: 1rem;
  height: 1rem;
  object-fit: contain;
}

.assistant-audio-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.assistant-message strong {
  color: #e6d5ff;
  font-size: 0.75rem;
}

.guide-content .assistant-message p {
  margin-top: 0.25rem;
  color: #f2edf7;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.assistant-message audio {
  display: block;
  width: 100%;
  height: 2.5rem;
  margin-top: 0.5rem;
}

.assistant-typing-indicator {
  display: flex;
  min-height: 2rem;
  align-items: center;
  gap: 0.28rem;
  align-self: flex-start;
  padding: 0 0.35rem;
}

.assistant-typing-indicator span {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #d3baff;
  animation: assistant-dot-wave 900ms ease-in-out infinite;
}

.assistant-typing-indicator span:nth-child(2) {
  animation-delay: 120ms;
}

.assistant-typing-indicator span:nth-child(3) {
  animation-delay: 240ms;
}

.assistant-form {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 0.8rem;
}

.assistant-question-wrap {
  position: relative;
  min-width: 0;
}

.assistant-form input {
  padding-right: 3.1rem;
}

.assistant-mic-button {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #d8c4f4;
  background: transparent;
  font-size: 1.05rem;
  transform: translateY(-50%);
}

.assistant-mic-button:hover,
.assistant-mic-button:focus-visible {
  background: rgb(196 164 255 / 13%);
}

.assistant-mic-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.assistant-actions {
  display: flex;
  align-items: center;
}

.assistant-send-button {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(219 196 255 / 30%);
  border-radius: 50%;
  color: #1a1025;
  background: linear-gradient(145deg, #dec9ff, #ac7ee5);
  box-shadow: 0 0.4rem 1.1rem rgb(116 75 165 / 30%);
  transition: filter 180ms ease, transform 180ms ease;
}

.assistant-send-button img {
  width: 1.2rem;
  height: 1.2rem;
  object-fit: contain;
}

.assistant-send-button:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.assistant-send-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.35);
  opacity: 0.5;
}

.guide-content .assistant-status {
  min-height: 1.3em;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.guide-content .assistant-status:empty {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tour-stop-list {
  position: relative;
  display: grid;
  min-height: 0;
  flex: 1;
  align-content: start;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  overscroll-behavior: contain;
  scrollbar-color: rgb(196 164 255 / 45%) rgb(16 11 24 / 50%);
}

.tour-stop-list::before {
  position: absolute;
  top: 1.15rem;
  bottom: 1.15rem;
  left: 1.05rem;
  width: 1px;
  background: rgb(196 164 255 / 24%);
  content: "";
}

.tour-stop {
  position: relative;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  transition: background 180ms ease, border-color 180ms ease;
}

.tour-stop.is-current {
  border-color: rgb(196 164 255 / 23%);
  background: rgb(196 164 255 / 6%);
}

.tour-stop-toggle {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.6rem;
  border: 0;
  border-radius: inherit;
  color: #e8e0ef;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.tour-stop-toggle:hover,
.tour-stop-toggle:focus-visible {
  background: rgb(255 255 255 / 5%);
}

.tour-stop-number {
  z-index: 1;
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--stop-color, #503269);
  box-shadow: 0 0 0 1px rgb(16 11 24 / 65%);
  font-size: 0.75rem;
  font-weight: 700;
}

.tour-stop.is-current .tour-stop-number {
  box-shadow: 0 0 0 3px var(--stop-color, #c4a4ff), 0 0 0 5px rgb(255 255 255 / 45%);
}

#map .traveler-marker-icon {
  border: 0;
  background: transparent;
}

.traveler-marker {
  position: relative;
  display: block;
  width: 64px;
  height: 64px;
  transform-origin: 50% 90%;
  pointer-events: none;
}

.traveler-marker-pin {
  position: absolute;
  top: 3px;
  left: 9px;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(145deg, #a878e3, #6d4bb0);
  box-shadow: 0 2px 8px rgb(16 11 24 / 60%);
  transform: rotate(-45deg);
}

.traveler-marker-image {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  transform: rotate(45deg);
}

.traveler-marker-generic {
  width: 30px;
  height: 30px;
  fill: #fff;
  transform: rotate(45deg);
}

.traveler-marker.is-traveling {
  animation: traveler-bubble 1s ease-in-out infinite;
}

.traveler-marker.is-arriving {
  animation: traveler-arrive 650ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes traveler-bubble {
  0%, 100% {
    transform: translateX(0) scale(1);
  }
  25% {
    transform: translateX(-0.2rem) scale(1.03);
  }
  50% {
    transform: translateX(0) scale(1);
  }
  75% {
    transform: translateX(0.2rem) scale(1.03);
  }
}

@keyframes traveler-arrive {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-0.55rem) scale(1.07);
  }
  70% {
    transform: translateY(0.08rem) scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .traveler-marker.is-traveling,
  .traveler-marker.is-arriving {
    animation: none;
  }
}

.tour-stop-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.4;
}

.tour-stop-details {
  display: grid;
  gap: 0.55rem;
  padding: 0 0.7rem 0.8rem 3.35rem;
}

.tour-stop-details[hidden] {
  display: none;
}

.secondary-button {
  margin-top: 1.25rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 0.65rem;
  color: #d3c7df;
  background: rgb(255 255 255 / 6%);
  font-size: 0.8rem;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

@keyframes card-arrive {
  from {
    opacity: 0;
    transform: translateY(1.3rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pin-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.45rem);
  }
}

@keyframes assistant-dot-wave {
  0%, 60%, 100% {
    opacity: 0.45;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-0.35rem);
  }
}

@media (max-width: 760px) {
  main {
    width: min(100% - 2rem, 42rem);
    padding-top: 2.5rem;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .dashboard.assistant-open {
    grid-template-columns: 1fr;
  }

  .tour-panel {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    min-height: min(65vh, 38rem);
    justify-self: stretch;
  }

  .tour-panel:not([hidden]) {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: grid;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    padding:
      max(0.75rem, env(safe-area-inset-top))
      max(0.75rem, env(safe-area-inset-right))
      max(0.75rem, env(safe-area-inset-bottom))
      max(0.75rem, env(safe-area-inset-left));
    background: #100b18;
    overscroll-behavior: contain;
  }

  .dashboard.assistant-open .tour-panel:not([hidden]) {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
  }

  .guide-card {
    min-height: min(65vh, 38rem);
  }

  .dashboard.assistant-open .tour-panel:not([hidden]) .guide-card {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 0.75rem;
  }

  .assistant-messages {
    min-height: 8rem;
  }

  body.assistant-modal-open {
    overflow: hidden;
  }

  #map {
    height: 65vh;
    min-height: 24rem;
  }

  .checkpoint-card {
    max-height: none;
    min-height: auto;
  }

  .tour-stop-list {
    flex: initial;
    overflow-y: visible;
  }
}

@media (max-width: 520px) {
  .site-header {
    min-height: 4.25rem;
  }

  .header-tag {
    max-width: 8rem;
    font-size: 0.6rem;
    line-height: 1.4;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

}

@media (min-width: 761px) and (max-width: 1050px) {
  .dashboard {
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  }

  .dashboard.assistant-open {
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
  }

  .tour-panel {
    grid-column: 1 / -1;
    width: 100%;
    justify-self: stretch;
    min-height: 32rem;
  }

  .guide-card {
    height: 100%;
    min-height: 0;
  }
}

@container viewer (min-width: 80rem) {
  .dashboard.assistant-open {
    grid-template-columns: minmax(16rem, 22rem) minmax(40rem, 1fr) minmax(22rem, 27rem);
  }

  .dashboard.assistant-open .tour-panel {
    grid-column: auto;
    min-height: 0;
    height: auto;
    max-height: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
