:root {
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.18);
  --header-h: 64px;
  --sheet-peek: 88px;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);

  --bg: #f1f5f9;
  --bg-elevated: rgba(255, 255, 255, 0.88);
  --text: #0f172a;
  --text-muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.12);
}

[data-theme="dark"] {
  --bg: #0b1120;
  --bg-elevated: rgba(15, 23, 42, 0.92);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #60a5fa;
  --accent-soft: rgba(96, 165, 250, 0.15);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, select { font: inherit; }

.app-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100dvh;
}

.app-header {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  min-height: var(--header-h);
  height: auto;
  background: var(--bg-elevated);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: grid;
  place-items: center;
  color: white;
}

.header-search {
  flex: 1;
  display: flex;
  gap: 0.5rem;
  min-width: 0;
}

.header-search input,
.header-search select {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.85rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.header-search input { flex: 1; min-width: 0; }

.icon-btn.is-on {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.audio-guide-bar {
  position: fixed;
  z-index: 1100;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(92vw, 420px);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  box-shadow: var(--shadow-lg);
  font-size: 0.78rem;
}

.audio-guide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: audio-pulse 1.4s ease infinite;
}

.jarl-mode-bar {
  position: fixed;
  z-index: 1100;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  max-width: min(92vw, 460px);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(120, 53, 15, 0.94);
  color: #fff7ed;
  box-shadow: var(--shadow-lg);
  font-size: 0.78rem;
  line-height: 1.35;
}

.jarl-mode-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  animation: audio-pulse 1.4s ease infinite;
}

html.jarl-mode .detail-jarl-bar {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 12px;
  background: rgba(234, 179, 8, 0.08);
}

html.jarl-mode .detail-lock-row {
  display: grid;
  gap: 0.35rem;
}

html.jarl-mode .detail-poi-code-row {
  display: grid;
  gap: 0.35rem;
}

.detail-poi-code-label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-poi-code-select {
  width: 100%;
  max-width: 22rem;
  border: 1px solid rgba(234, 179, 8, 0.55);
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.82rem;
  color-scheme: light;
  cursor: pointer;
}

.detail-poi-code-select option {
  background: #ffffff;
  color: #0f172a;
}

.detail-poi-code-select:focus {
  outline: 2px solid rgba(234, 179, 8, 0.45);
  outline-offset: 1px;
}

[data-theme="dark"] .detail-poi-code-select {
  background: #ffffff;
  color: #0f172a;
  color-scheme: light;
}

[data-theme="dark"] .detail-poi-code-select option {
  background: #ffffff;
  color: #0f172a;
}

html.jarl-mode .detail-lock-bar {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-radius: 12px;
  background: rgba(234, 179, 8, 0.08);
}

.detail-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.detail-lock-btn.is-locked {
  border-color: rgba(234, 179, 8, 0.55);
  background: rgba(234, 179, 8, 0.14);
  color: #b45309;
}

[data-theme="dark"] .detail-lock-btn.is-locked {
  color: #fde68a;
}

.detail-lock-hint {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.detail-jarl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.detail-jarl-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.detail-jarl-btn--primary {
  border-color: rgba(234, 179, 8, 0.55);
  background: rgba(234, 179, 8, 0.18);
  color: #b45309;
}

[data-theme="dark"] .detail-jarl-btn--primary {
  color: #fde68a;
}

.detail-jarl-btn--accent {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

[data-theme="dark"] .detail-jarl-btn--accent {
  color: #93c5fd;
}

.detail-jarl-form {
  display: grid;
  gap: 1rem;
}

.detail-jarl-photo-box {
  display: grid;
  gap: 0.65rem;
}

.detail-jarl-preview {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.detail-jarl-preview--empty {
  display: grid;
  place-items: center;
  min-height: 120px;
  padding: 1rem;
  border-radius: 12px;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

.detail-jarl-drop {
  border: 2px dashed rgba(234, 179, 8, 0.45);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  background: rgba(234, 179, 8, 0.06);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.detail-jarl-drop p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.detail-jarl-drop.is-drag {
  border-color: rgba(234, 179, 8, 0.85);
  background: rgba(234, 179, 8, 0.14);
}

.detail-jarl-drop.is-busy {
  opacity: 0.65;
  pointer-events: none;
}

.detail-jarl-gallery-wrap {
  min-height: 2rem;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.detail-jarl-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.45rem;
}

.detail-jarl-photo.is-remote {
  border-style: dashed;
}

.detail-jarl-photo {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}

.detail-jarl-photo.is-primary {
  border-color: rgba(234, 179, 8, 0.65);
  box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.35);
}

.detail-jarl-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.detail-jarl-photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding: 0.25rem;
}

.detail-jarl-mini {
  border: none;
  border-radius: 6px;
  padding: 0.15rem 0.35rem;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  cursor: pointer;
}

.detail-jarl-mini--danger {
  color: #b91c1c;
}

.detail-jarl-badge {
  font-size: 0.62rem;
  font-weight: 700;
  color: #b45309;
  padding: 0.15rem 0.35rem;
}

.detail-jarl-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.detail-jarl-field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.74rem;
}

.detail-jarl-field--full {
  grid-column: 1 / -1;
}

.detail-jarl-field span {
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.detail-jarl-field input,
.detail-jarl-field textarea,
.detail-jarl-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  background: var(--bg-elevated);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
}

.detail-jarl-textarea-pre {
  white-space: pre-wrap;
  line-height: 1.55;
  resize: vertical;
  min-height: 4.5rem;
}

.detail-jarl-profile {
  grid-column: 1 / -1;
  display: grid;
  gap: 1rem;
}

.detail-jarl-profile-sec {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.02);
}

[data-theme="dark"] .detail-jarl-profile-sec {
  background: rgba(255, 255, 255, 0.03);
}

.detail-jarl-profile-sec-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
}

.detail-jarl-profile-sec-title > span:last-child {
  flex: 1;
  min-width: 0;
}

.detail-jarl-profile-item {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}

.detail-jarl-profile-sec .detail-jarl-profile-item:first-of-type {
  border-top: none;
  padding-top: 0;
}

.detail-jarl-paste {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
  border: 1px dashed rgba(59, 130, 246, 0.4);
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.05);
}

.detail-jarl-paste-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.detail-profile-article--lead .detail-profile-article-body {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.detail-jarl-hint {
  margin: 0;
  font-size: 0.74rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .detail-jarl-fields {
    grid-template-columns: 1fr;
  }
}

@keyframes audio-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.audio-guide-msg {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-guide-stop {
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}

.audio-guide-stop:hover {
  background: rgba(255, 255, 255, 0.22);
}

.city-search {
  position: relative;
  flex: 0 1 190px;
  min-width: 120px;
}

.city-search input {
  width: 100%;
  font-weight: 600;
}

.city-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1200;
  min-width: min(320px, 80vw);
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 280px;
  overflow-y: auto;
}

.city-suggestions button {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
}

.city-suggestions button:hover,
.city-suggestions button:focus {
  background: var(--accent-soft);
}

.city-suggestions span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

.city-empty {
  padding: 0.7rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.header-search input:focus,
.header-search select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s, background var(--transition);
}

.icon-btn:active { transform: scale(0.96); }

.lang-select {
  height: 40px;
  padding: 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.app-main {
  position: relative;
  min-height: 0;
}

.map-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
}

.panel {
  position: absolute;
  z-index: 900;
  background: var(--bg-elevated);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  transition: transform var(--transition);
}

.panel-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 0.65rem 0.5rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8125rem;
  transition: color var(--transition), background var(--transition);
}

.tab-btn.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.tab-btn.is-bg::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 0.35rem;
  vertical-align: middle;
  animation: bg-pulse 1.2s ease-in-out infinite;
}

.bg-status {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.bg-status-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--accent);
  animation: bg-pulse 1.2s ease-in-out infinite;
}

.empty-state.bg-working {
  font-size: 0.8125rem;
  line-height: 1.45;
}

@keyframes bg-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1); }
}

.panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow var(--transition);
}

.card:active { transform: scale(0.985); }

.card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: var(--border);
}

.card-body { padding: 0.85rem 1rem 1rem; }

.card-title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.card-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}

.route-card, .station-card {
  padding: 1rem;
}

.route-card-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.route-group-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.route-cat-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
}

.route-cat-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.route-card-title-text {
  text-decoration: underline;
  text-underline-offset: 0.18em;
  flex: 1;
  min-width: 0;
}

.route-play-btn {
  flex-shrink: 0;
  width: 1.55rem;
  height: 1.55rem;
  margin: 0;
  padding: 0 0 0 0.12rem;
  border: 0;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-size: 0.58rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.35);
  animation: none !important;
  transform: none;
}

.route-play-btn:hover,
.route-play-btn:focus-visible {
  background: #1d4ed8;
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
  animation: none !important;
}

.route-stats, .station-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.route-waypoints {
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.route-waypoints li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.route-wp-btn {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.route-wp-btn:hover .route-wp-name,
.route-wp-btn:focus-visible .route-wp-name {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

.route-wp-name {
  font-weight: 600;
  color: var(--text);
}

.route-wp-desc {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.guide-excursion-stops {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.transport-group {
  margin-bottom: 1.25rem;
}

.transport-group-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.transport-group-list {
  display: grid;
  gap: 0.75rem;
}

.transport-intro {
  margin-bottom: 1rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
}

.transport-intro p {
  margin: 0 0 0.35rem;
}

.transport-intro p:last-child {
  margin-bottom: 0;
}

.transport-no-gtfs {
  color: #b45309;
}

[data-theme="dark"] .transport-no-gtfs {
  color: #fbbf24;
}

.transport-official {
  display: block;
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #0e5c61;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  text-align: center;
}

.transport-official-inline {
  display: inline-block;
  margin: 0;
}

.transport-official:hover {
  filter: brightness(1.08);
}

.phone-group {
  margin-bottom: 1rem;
}

.phone-group-title {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.phone-section-hint {
  margin: -0.35rem 0 0.85rem;
}

.phone-cards {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.phone-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  min-height: 4.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow var(--transition), border-color var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.phone-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.phone-card:active {
  transform: scale(0.985);
}

.phone-card-static {
  cursor: default;
}

.phone-card-main {
  min-width: 0;
  flex: 1;
}

.phone-card-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.12rem;
}

.phone-card-number {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.15;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.phone-card-emergency .phone-card-number {
  color: #dc2626;
}

[data-theme="dark"] .phone-card-emergency .phone-card-number {
  color: #fca5a5;
}

.phone-card-note {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.phone-card-call {
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: #0e5c61;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.phone-card-emergency .phone-card-call {
  background: #b91c1c;
}

.transport-phones .transport-group-title {
  margin-bottom: 0.35rem;
}

.station-schedule {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}

.station-schedule-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.station-deps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.25rem;
}

.station-deps li {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.station-hint {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
}

.station-card {
  cursor: pointer;
}

.stat-pill {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 20000;
  pointer-events: none;
}

.detail-overlay.open {
  pointer-events: auto;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.42);
  opacity: 0;
  transition: opacity 0.32s ease;
}

.detail-overlay.open .detail-backdrop {
  opacity: 1;
}

.detail-sheet {
  position: fixed;
  top: var(--header-h);
  right: 0;
  width: 50vw;
  max-width: 50vw;
  height: calc(100dvh - var(--header-h));
  background: var(--bg);
  border-left: 1px solid var(--border);
  border-radius: 16px 0 0 0;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.48s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 20001;
  will-change: transform;
  isolation: isolate;
}

.detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

[data-theme="dark"] .detail-sheet {
  background: #0b1120;
}

.detail-overlay.open .detail-sheet {
  transform: translateX(0);
}

html.guide-open .leaflet-popup,
html.guide-open .leaflet-popup-pane {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html.guide-open #sidePanel {
  transform: translateX(110%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.48s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.32s ease;
}

@media (min-width: 900px) {
  html.guide-open .detail-overlay.open {
    pointer-events: none;
  }

  html.guide-open .detail-backdrop {
    left: 50%;
    width: 50%;
    pointer-events: auto;
    background: rgba(2, 6, 23, 0.08);
  }

  html.guide-open .detail-sheet {
    pointer-events: auto;
  }
}

@media (max-width: 899px) {
  html.guide-open #sidePanel {
    transform: translateX(110%);
  }
}

.detail-hero-slot[hidden] {
  display: none !important;
}

.detail-hero-slot {
  flex-shrink: 0;
  height: min(34vh, 260px);
}

.detail-hero {
  position: sticky;
  top: 0;
  z-index: 3;
  height: min(34vh, 260px);
  overflow: hidden;
  background: #0f172a;
  will-change: height;
}

.detail-hero-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.55), transparent);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.15s ease;
}

.detail-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.detail-content {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-top: 0;
  padding: 1.35rem 1.25rem 1.75rem;
  border-radius: 18px 18px 0 0;
  background: var(--bg);
  box-shadow: 0 -14px 36px rgba(15, 23, 42, 0.14);
}

[data-theme="dark"] .detail-content {
  background: #0b1120;
  box-shadow: 0 -14px 36px rgba(0, 0, 0, 0.42);
}

.detail-scroll-no-hero .detail-content {
  margin-top: 0;
  border-radius: 0;
  box-shadow: none;
}

.detail-content h2 {
  margin: 0 0 0.65rem;
  font-size: 1.45rem;
  line-height: 1.2;
}

.detail-content p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  line-height: 1.55;
  font-size: 0.9rem;
}

.detail-place {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.detail-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
}

.detail-rating {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  align-items: start;
}

.detail-section-title {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-desc {
  font-size: 0.88rem;
  line-height: 1.72;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.detail-desc p {
  margin: 0;
}

.detail-desc p + p {
  margin-top: 0.65rem;
}

.detail-desc-lead {
  font-size: 0.92rem;
  line-height: 1.72;
  color: var(--text);
}

.detail-desc-lead p {
  margin: 0 0 0.85rem;
}

.detail-read-hint {
  margin: 0 0 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.9;
}

.detail-profile-sec {
  margin-top: 1.5rem;
  padding-top: 0;
  border-top: none;
}

.detail-profile-head {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0 0 0.65rem;
}

.detail-profile-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.detail-profile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.1rem;
  border-radius: 8px;
  flex-shrink: 0;
  color: var(--profile-icon-color, var(--accent));
  background: transparent;
  border: none;
}

.detail-profile-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.detail-profile-block {
  margin-bottom: 0.35rem;
}

.detail-profile-block--lead .detail-profile-body {
  font-size: 0.92rem;
  line-height: 1.72;
  font-weight: 500;
  color: var(--text);
}

.detail-profile-block--lead + .detail-profile-list {
  margin-top: 0.15rem;
}

.detail-profile-subtitle {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

.detail-profile-body {
  font-size: 0.88rem;
  line-height: 1.72;
  color: var(--text);
}

.detail-profile-body p {
  margin: 0 0 0.65rem;
}

.detail-profile-body p:last-child {
  margin-bottom: 0;
}

.detail-profile-sep {
  margin: 0 0.35rem;
  color: var(--text-muted);
  font-weight: 400;
}

.detail-profile-source-line {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-profile-article {
  margin-bottom: 0.35rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .detail-profile-article {
  background: transparent;
}

.detail-profile-article-title {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.detail-profile-article-body {
  font-size: 0.88rem;
  line-height: 1.72;
  color: var(--text);
}

.detail-profile-article-body p {
  margin: 0 0 0.72rem;
}

.detail-profile-article-body p:last-child {
  margin-bottom: 0;
}

.detail-profile-list {
  margin: 0.35rem 0 0.75rem;
  padding: 0 0 0 1.2rem;
  list-style: disc;
}

.detail-profile-list li {
  margin: 0 0 0.62rem;
  font-size: 0.84rem;
  line-height: 1.62;
  color: var(--text-muted);
}

.detail-profile-list li:last-child {
  margin-bottom: 0;
}

.detail-profile-list li strong {
  font-weight: 700;
  color: var(--text-muted);
}

.detail-profile-table {
  width: 100%;
  margin: 0.65rem 0 0.85rem;
  border-collapse: collapse;
  font-size: 0.82rem;
  line-height: 1.45;
}

.detail-profile-table th,
.detail-profile-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.detail-profile-table thead th {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.82;
  border-bottom-width: 2px;
}

.detail-profile-table-k {
  font-weight: 800;
  color: var(--text);
}

.detail-profile-table tbody tr:last-child td {
  border-bottom: none;
}

.detail-profile-src {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--text-muted) 10%, var(--bg));
  border: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.detail-profile-article-body strong,
.detail-profile-article-title strong {
  font-weight: 800;
}

.detail-inline-link,
.detail-profile-article-body a,
.detail-profile-visit-v a,
.detail-facts a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

.detail-inline-link:hover,
.detail-profile-article-body a:hover,
.detail-profile-visit-v a:hover,
.detail-facts a:hover {
  text-decoration-color: var(--accent);
}

.detail-profile-article-foot {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-profile-visit {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.detail-profile-visit li {
  display: grid;
  grid-template-columns: minmax(5.5rem, 34%) 1fr;
  gap: 0.55rem;
  align-items: start;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid var(--border);
}

[data-theme="dark"] .detail-profile-visit li {
  background: rgba(255, 255, 255, 0.03);
}

.detail-profile-visit-k {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.82;
}

.detail-profile-visit-v {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text);
  word-break: break-word;
}

.detail-profile-visit-v a {
  color: var(--accent);
}

.detail-profile-wiki {
  display: inline-flex;
  margin-top: 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.detail-profile-wiki:hover {
  text-decoration: underline;
}

.detail-facts {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.detail-facts div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.45rem;
  font-size: 0.82rem;
}

.detail-facts dt {
  margin: 0;
  font-weight: 700;
  color: var(--text);
}

.detail-facts dd {
  margin: 0;
  color: var(--text);
}

.detail-source {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
}

.detail-source a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.detail-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  align-content: start;
}

.detail-gallery-item {
  border: none;
  padding: 0;
  margin: 0;
  background: #0f172a;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  min-height: 0;
  line-height: 0;
}

.detail-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.detail-gallery-item:hover img {
  transform: scale(1.03);
}

.detail-collection-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.collection-item {
  margin: 0;
  display: grid;
  gap: 0.35rem;
}

.collection-item figcaption {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
  padding: 0 0.1rem;
}

.detail-collection-extra {
  margin-top: 0.85rem;
}

.detail-collection-loading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.detail-gallery-loading .detail-ph,
.detail-ph {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: linear-gradient(110deg, var(--border) 30%, var(--bg) 50%, var(--border) 70%);
  background-size: 200% 100%;
  animation: detail-shimmer 1.2s ease infinite;
}

.detail-recs {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1.15rem;
}

.detail-recs-head {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
}

.detail-recs-head-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  background: linear-gradient(135deg, #475569, #334155);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
}

.detail-recs-head-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.35);
}

[data-theme="dark"] .detail-recs-head-badge {
  background: linear-gradient(135deg, #64748b, #475569);
}

.detail-recs-head-sub {
  margin: 0;
  padding-left: 0.15rem;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.detail-recs-pending {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

.detail-recs-roadmap {
  position: relative;
  padding: 0.35rem 0.25rem 0.65rem;
  min-height: 480px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(37, 99, 235, 0.04), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 45%);
}

[data-theme="dark"] .detail-recs-roadmap {
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(96, 165, 250, 0.06), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 45%);
}

.detail-recs-path {
  position: absolute;
  inset: 0.65rem 0.35rem 0.85rem;
  width: calc(100% - 0.7rem);
  height: calc(100% - 1.5rem);
  pointer-events: none;
  z-index: 0;
}

.detail-recs-road-shadow {
  fill: none;
  stroke: rgba(15, 23, 42, 0.12);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

[data-theme="dark"] .detail-recs-road-shadow {
  stroke: rgba(0, 0, 0, 0.35);
}

.detail-recs-road {
  fill: none;
  stroke: #475569;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

[data-theme="dark"] .detail-recs-road {
  stroke: #64748b;
}

.detail-recs-road-dash {
  fill: none;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-dasharray: 4 4.5;
  stroke-linecap: round;
  opacity: 0.92;
  vector-effect: non-scaling-stroke;
}

[data-theme="dark"] .detail-recs-road-dash {
  stroke: #cbd5e1;
  opacity: 0.55;
}

.detail-recs-origin {
  fill: #14b8a6;
  stroke: #fff;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

[data-theme="dark"] .detail-recs-origin {
  stroke: #0f172a;
}

.detail-recs-steps {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.detail-recs-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem;
  min-height: 108px;
}

.detail-recs-step--left .detail-recs-card {
  grid-column: 1;
  justify-self: end;
  text-align: left;
}

.detail-recs-step--left .detail-recs-pin {
  grid-column: 2;
}

.detail-recs-step--right .detail-recs-pin {
  grid-column: 2;
}

.detail-recs-step--right .detail-recs-card {
  grid-column: 3;
  justify-self: start;
  text-align: left;
}

.detail-recs-pin {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  color: var(--step-color, #ef4444);
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.28));
  animation: detail-recs-pin-in 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes detail-recs-pin-in {
  from { opacity: 0; transform: translateY(8px) scale(0.85); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.detail-recs-pin-num {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  font-weight: 900;
  color: var(--step-color, #ef4444);
  line-height: 1;
}

.detail-recs-card {
  display: grid;
  gap: 0.28rem;
  width: min(100%, 168px);
  padding: 0.55rem 0.6rem 0.62rem;
  border: 1px solid var(--border);
  border-top: 3px solid var(--step-color, #ef4444);
  border-radius: 12px;
  background: var(--bg-elevated);
  box-shadow:
    0 6px 18px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.6) inset;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: detail-recs-card-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes detail-recs-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.detail-recs-step:nth-child(1) .detail-recs-card { animation-delay: 0.05s; }
.detail-recs-step:nth-child(2) .detail-recs-card { animation-delay: 0.12s; }
.detail-recs-step:nth-child(3) .detail-recs-card { animation-delay: 0.19s; }
.detail-recs-step:nth-child(4) .detail-recs-card { animation-delay: 0.26s; }
.detail-recs-step:nth-child(5) .detail-recs-card { animation-delay: 0.33s; }

.detail-recs-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.detail-recs-card:active {
  transform: translateY(-1px);
}

.detail-recs-card-thumb {
  width: 100%;
  height: 58px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.detail-recs-card-thumb--ph {
  background: linear-gradient(135deg, var(--border), transparent 60%);
}

.detail-recs-card-kicker {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--step-color, #ef4444);
  line-height: 1.2;
}

.detail-recs-card-kicker em {
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-muted);
}

.detail-recs-card-title {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.28;
  color: var(--text);
}

.detail-recs-card-text {
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 720px) {
  .detail-recs-roadmap {
    min-height: 440px;
    padding-inline: 0.1rem;
  }

  .detail-recs-step {
    grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
    min-height: 98px;
    gap: 0.28rem;
  }

  .detail-recs-card {
    width: min(100%, 148px);
    padding: 0.48rem 0.52rem 0.55rem;
  }

  .detail-recs-card-thumb {
    height: 50px;
  }

  .detail-recs-pin-svg {
    width: 28px !important;
    height: 34px !important;
  }
}

.detail-related h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
}

.detail-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.detail-related-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-family: inherit;
}

.detail-related-card img,
.detail-related-card .detail-ph {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
  aspect-ratio: auto;
  border-radius: 0;
}

.detail-related-card span {
  display: block;
  padding: 0.45rem 0.55rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

@keyframes detail-shimmer {
  to { background-position: -200% 0; }
}

@media (max-width: 720px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.schedule-table th,
.schedule-table td {
  padding: 0.55rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.schedule-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
}

.close-detail {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  background: rgba(15, 23, 42, 0.45);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.sheet-handle {
  display: none;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  margin: 0.5rem auto 0;
}

@media (min-width: 900px) {
  .app-main {
    display: grid;
    grid-template-columns: 1fr 380px;
    min-height: 0;
  }

  #map {
    grid-column: 1;
    min-height: 0;
    height: 100%;
  }

  .map-wrap {
    grid-column: 1;
    min-height: 0;
    height: 100%;
  }

  .panel {
    position: relative;
    grid-column: 2;
    height: 100%;
    min-height: 0;
    border-radius: 0;
    border-top: none;
    border-right: none;
    box-shadow: none;
  }

  html.guide-open .app-main {
    grid-template-columns: 50vw 0;
  }

  html.guide-open #map {
    grid-column: 1;
    width: 50vw;
    max-width: 50vw;
  }

  html.guide-open .map-wrap {
    grid-column: 1;
    width: 50vw;
    max-width: 50vw;
  }

  html.guide-open #sidePanel {
    overflow: hidden;
    width: 0;
    min-width: 0;
  }

  .sheet-handle { display: none !important; }
}

@media (max-width: 899px) {
  .panel {
    left: 0;
    right: 0;
    bottom: 0;
    height: min(72dvh, 100%);
    max-height: min(72dvh, 100%);
    border-radius: var(--radius) var(--radius) 0 0;
    transform: translateY(calc(100% - var(--sheet-peek)));
  }

  .panel.expanded {
    transform: translateY(0);
  }

  .sheet-handle { display: block; }
}

.panel.is-discover .panel-body {
  padding: 0;
  background: #f4f0e8;
}

[data-theme="dark"] .panel.is-discover .panel-body {
  background: #12181c;
}

.guide {
  --guide-teal: #0e5c61;
  --guide-gold: #e0b429;
  --guide-paper: #f4f0e8;
  --guide-ink: #1c1917;
  --guide-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  color: var(--guide-ink);
  background: var(--guide-paper);
  padding-bottom: 1.5rem;
}

[data-theme="dark"] .guide {
  --guide-paper: #12181c;
  --guide-ink: #f5f0e8;
  --guide-teal: #7dd3d8;
}

.guide-cover {
  position: relative;
  padding: 1.15rem 1rem 0.75rem;
  background:
    linear-gradient(180deg, #e0b429 0%, #e0b429 42%, #f4f0e8 42%, #f4f0e8 100%);
  color: #1c1917;
  overflow: hidden;
}

.guide-cover::before {
  content: attr(data-city);
  position: absolute;
  inset: 28% -10% auto -10%;
  font-family: var(--guide-serif);
  font-size: clamp(3.5rem, 18vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(28, 25, 23, 0.06);
  pointer-events: none;
  line-height: 0.9;
  white-space: nowrap;
}

[data-theme="dark"] .guide-cover {
  background:
    linear-gradient(180deg, #c9a020 0%, #c9a020 42%, #12181c 42%, #12181c 100%);
  color: #f5f0e8;
}

[data-theme="dark"] .guide-cover::before {
  color: rgba(255, 255, 255, 0.04);
}

.guide-brand {
  margin: 0;
  font-family: var(--guide-serif);
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: 0.12em;
  line-height: 0.95;
}

.guide-brand span {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-top: 0.2rem;
}

.guide-cover h2 {
  margin: 0.85rem 0 0.35rem;
  font-family: var(--guide-serif);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.15;
}

.guide-lead {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  opacity: 0.9;
}

.guide-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  margin: 0 -0.15rem 0.35rem;
  scrollbar-width: none;
}

.guide-chips::-webkit-scrollbar { display: none; }

.guide-chip {
  flex: 0 0 auto;
  border: none;
  background: var(--guide-gold);
  color: #1c1917;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
}

.guide-chip.is-on {
  background: #1c1917;
  color: #e0b429;
}

[data-theme="dark"] .guide-chip.is-on {
  background: #f5f0e8;
  color: #1c1917;
}

.guide-hero {
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  margin: 0;
  background: #0e5c61;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  text-align: left;
  box-shadow: 0 18px 40px rgba(14, 92, 97, 0.28);
}

.guide-hero img,
.guide-ph-lg {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.guide-ph,
.guide-ph-lg {
  background: linear-gradient(135deg, #0e5c61, #1a8a90);
}

.guide-hero-cap {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  background: var(--guide-gold);
  color: #1c1917;
  padding: 0.55rem 0.7rem;
}

.guide-hero-cap span {
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-hero-cap strong {
  display: block;
  font-family: var(--guide-serif);
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 0.1rem;
}

.guide-toc {
  padding: 1.1rem 1rem 0.4rem;
}

.guide-toc h3 {
  margin: 0 0 0.65rem;
  font-family: var(--guide-serif);
  font-size: 1.15rem;
  font-weight: 700;
}

.guide-toc-item {
  width: 100%;
  display: grid;
  grid-template-columns: 2.1rem 1fr auto;
  align-items: baseline;
  gap: 0.45rem;
  border: none;
  background: transparent;
  color: var(--guide-ink);
  font-family: inherit;
  text-align: left;
  padding: 0.42rem 0;
  border-bottom: 1px solid rgba(14, 92, 97, 0.12);
  cursor: pointer;
  font-size: 0.88rem;
}

[data-theme="dark"] .guide-toc-item {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.guide-toc-num,
.guide-chapter-head span {
  color: var(--guide-gold);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
}

.guide-toc-item em {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.guide-chapter {
  padding: 0.85rem 1rem 0.4rem;
}

.guide-chapter-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.guide-chapter-head h3 {
  margin: 0;
  font-family: var(--guide-serif);
  font-size: 1.2rem;
  color: var(--guide-ink);
}

.guide-feature {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
  cursor: pointer;
}

.guide-feature img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.guide-feature-copy span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--guide-teal);
}

.guide-feature-copy h4 {
  margin: 0.15rem 0 0.25rem;
  font-family: var(--guide-serif);
  font-size: 1.05rem;
  color: var(--guide-ink);
}

.guide-feature-copy p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.guide-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.guide-tile {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: var(--guide-ink);
  font-family: inherit;
}

.guide-tile img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.guide-tile span {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--guide-ink);
}

.guide-index-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1.8rem 1fr auto;
  gap: 0.4rem;
  align-items: baseline;
  border: none;
  background: transparent;
  color: var(--guide-ink);
  font-family: inherit;
  text-align: left;
  padding: 0.38rem 0;
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
  cursor: pointer;
  font-size: 0.8rem;
}

[data-theme="dark"] .guide-index-row {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.guide-index-row span {
  color: var(--guide-ink);
}

.guide-index-row strong {
  color: var(--guide-gold);
  font-size: 0.72rem;
}

.guide-index-row em {
  font-style: normal;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.guide-series {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.82;
}

.guide-intro {
  padding: 1rem 1rem 0.5rem;
}

.guide-intro h3 {
  margin: 0 0 0.45rem;
  font-family: var(--guide-serif);
  font-size: 1.05rem;
  color: var(--guide-teal);
}

.guide-intro-body p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--guide-ink);
}

.guide-intro-body p + p {
  margin-top: 0.65rem;
}

.guide-source {
  margin: 0.35rem 0 0;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.guide-themes {
  display: grid;
  gap: 0.55rem;
  padding: 0.35rem 1rem 0.85rem;
}

.guide-theme {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.65rem;
  text-align: left;
  border: 1px solid rgba(14, 92, 97, 0.14);
  border-left: 4px solid var(--guide-gold);
  background: rgba(255, 255, 255, 0.55);
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  color: inherit;
}

[data-theme="dark"] .guide-theme {
  background: rgba(255, 255, 255, 0.04);
}

.guide-theme-title {
  grid-column: 1;
  font-family: var(--guide-serif);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--guide-teal);
}

.guide-theme-text {
  grid-column: 1;
  font-size: 0.72rem;
  line-height: 1.45;
  opacity: 0.88;
}

.guide-theme em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--guide-gold);
  white-space: nowrap;
}

.guide-excursions {
  padding: 0.25rem 1rem 0.85rem;
}

.guide-excursions-lead {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  line-height: 1.5;
  opacity: 0.9;
}

.guide-excursion-list {
  display: grid;
  gap: 0.5rem;
}

.guide-excursion {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-left: 4px solid var(--guide-teal);
  background: rgba(14, 92, 97, 0.08);
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  color: inherit;
}

.guide-excursion strong {
  display: block;
  font-family: var(--guide-serif);
  font-size: 0.88rem;
  margin-bottom: 0.2rem;
}

.guide-excursion span {
  display: block;
  font-size: 0.72rem;
  line-height: 1.45;
  opacity: 0.9;
}

.guide-excursion em {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--guide-teal);
}
