:root {
  color-scheme: light;
  --red: #b01e26;
  --red-dark: #87151b;
  --ink: #17202a;
  --muted: #667085;
  --paper: #fffaf0;
  --line: rgba(23, 32, 42, 0.14);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #f7efe1;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 0 10px 28px;
  transition: filter 180ms ease, transform 180ms ease;
}

.app-shell.is-blurred {
  filter: blur(8px);
  transform: scale(0.992);
  pointer-events: none;
  user-select: none;
}

.map-panel {
  padding-top: 10px;
}

.map-frame {
  position: relative;
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 0;
  background: var(--paper);
}

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

picture {
  display: block;
}

.marker-layer {
  position: absolute;
  inset: 0;
}

.map-marker {
  position: absolute;
  left: var(--mobile-x);
  top: var(--mobile-y);
  width: max(6%, 34px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  box-shadow: none;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

@media (min-width: 760px) {
  .app-shell {
    width: min(100%, 1548px);
  }

  .map-frame {
    max-width: 1536px;
  }

  .map-marker {
    left: var(--desktop-x);
    top: var(--desktop-y);
    width: max(3.6%, 38px);
  }
}

.map-marker:focus-visible,
.stop-item:focus-visible,
.close-button:focus-visible,
.play-button:focus-visible {
  outline: 4px solid rgba(176, 30, 38, 0.3);
  outline-offset: 3px;
}

.stop-list-wrap {
  padding-top: 16px;
}

.stop-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.stop-item {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
}

.stop-number {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.stop-title {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.stop-subtitle {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: start center;
  padding: max(12px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: rgba(18, 24, 31, 0.36);
}

.modal-backdrop[hidden] {
  display: none;
}

.stop-modal {
  width: min(100%, 780px);
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: var(--shadow);
}

.audio-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(12px);
}

.play-button,
.close-button {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  cursor: pointer;
  font-weight: 800;
}

.play-button {
  min-width: 76px;
  padding: 0 14px;
  background: var(--red);
  color: #fff;
}

.close-button {
  position: sticky;
  right: 0;
  top: 12px;
  width: 42px;
  background: #1f2937;
  color: #fff;
}

.audio-main {
  min-width: 0;
}

.progress {
  width: 100%;
  accent-color: var(--red);
}

.time-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 0.78rem;
}

.modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(240px, 0.95fr);
  gap: 18px;
  padding: 18px;
}

.place-image {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  background: #f4ead8;
  border-radius: 8px;
}

.place-copy {
  min-width: 0;
  align-self: start;
}

.picture-header {
  margin: 0 0 18px;
  color: #344054;
  font-size: 1.04rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.place-kicker {
  margin: 0 0 6px;
  color: var(--red-dark);
  font-family: Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.chinese-title {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.35;
}

@media (max-width: 640px) {
  .app-shell {
    padding-inline: 0;
  }

  .map-panel {
    padding-top: 0;
  }

  .map-marker {
    width: max(7.5%, 32px);
  }

  .stop-list-wrap {
    padding-inline: 10px;
  }

  .stop-modal {
    max-height: calc(100vh - 16px);
  }

  .audio-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 9px;
  }

  .play-button {
    min-width: 66px;
    padding-inline: 10px;
  }

  .modal-body {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .place-image {
    max-height: 52vh;
  }
}
