﻿:root {
  --bg: #dce8dd;
  --surface: rgba(241, 244, 241, 0.82);
  --surface-strong: rgba(248, 250, 247, 0.95);
  --ink: #183430;
  --muted: #55706a;
  --accent: #b77a40;
  --accent-deep: #8f5b2f;
  --border: rgba(34, 78, 69, 0.12);
  --shadow: 0 24px 60px rgba(25, 74, 82, 0.18);
  --ui-gradient: linear-gradient(135deg, rgba(26, 145, 118, 0.96) 0%, rgba(24, 112, 161, 0.96) 100%);
  --ui-gradient-soft: linear-gradient(135deg, rgba(31, 168, 133, 0.2) 0%, rgba(42, 138, 196, 0.2) 100%);
  --ui-border: rgba(20, 104, 110, 0.28);
  --ui-ink: #f5fffd;
  --ui-shadow: 0 16px 30px rgba(13, 76, 91, 0.22);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Outfit", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 28%),
    radial-gradient(circle at top right, rgba(216, 208, 190, 0.16), transparent 24%),
    linear-gradient(180deg, #eff3ef 0%, #dce3dd 100%);
  -webkit-user-select: none;
  user-select: none;
}

body[data-theme="Cherry"] {
  --bg: #f4d8df;
  --surface: rgba(255, 247, 249, 0.88);
  --surface-strong: rgba(255, 252, 253, 0.97);
  --ink: #3f1d2a;
  --muted: #7c5462;
  --accent: #b21f49;
  --accent-deep: #7b0f30;
  --border: rgba(154, 38, 72, 0.14);
  --shadow: 0 24px 60px rgba(131, 35, 66, 0.16);
  --ui-gradient: linear-gradient(135deg, rgba(181, 31, 73, 0.96) 0%, rgba(236, 88, 118, 0.96) 100%);
  --ui-gradient-soft: linear-gradient(135deg, rgba(231, 107, 136, 0.2) 0%, rgba(247, 204, 214, 0.28) 100%);
  --ui-border: rgba(170, 49, 84, 0.26);
  --ui-ink: #fff7f8;
  --ui-shadow: 0 16px 30px rgba(145, 39, 69, 0.2);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.36), transparent 26%),
    radial-gradient(circle at top right, rgba(255, 184, 199, 0.3), transparent 24%),
    linear-gradient(180deg, #f8e5ea 0%, #f4d8df 100%);
}

body[data-theme="Mars"] {
  --bg: #f4e5d3;
  --surface: rgba(255, 250, 244, 0.88);
  --surface-strong: rgba(255, 253, 249, 0.97);
  --ink: #4a2a16;
  --muted: #80624f;
  --accent: #e06d1f;
  --accent-deep: #b24a0e;
  --border: rgba(172, 96, 34, 0.14);
  --shadow: 0 24px 60px rgba(151, 86, 34, 0.16);
  --ui-gradient: linear-gradient(135deg, rgba(214, 93, 28, 0.96) 0%, rgba(249, 160, 64, 0.96) 100%);
  --ui-gradient-soft: linear-gradient(135deg, rgba(250, 164, 87, 0.2) 0%, rgba(255, 232, 205, 0.32) 100%);
  --ui-border: rgba(196, 109, 37, 0.26);
  --ui-ink: #fff9f4;
  --ui-shadow: 0 16px 30px rgba(164, 93, 35, 0.2);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.36), transparent 26%),
    radial-gradient(circle at top right, rgba(255, 201, 138, 0.28), transparent 24%),
    linear-gradient(180deg, #f8e9d9 0%, #f4e5d3 100%);
}

body[data-theme="DarkTheme"] {
  --bg: #0d1620;
  --surface: rgba(18, 28, 39, 0.88);
  --surface-strong: rgba(20, 32, 44, 0.98);
  --ink: #ecf2f7;
  --muted: #a0b0bd;
  --accent: #6ec6ff;
  --accent-deep: #8ab4ff;
  --border: rgba(145, 174, 201, 0.18);
  --shadow: 0 24px 60px rgba(4, 9, 14, 0.5);
  --ui-gradient: linear-gradient(135deg, rgba(82, 144, 255, 0.96) 0%, rgba(53, 199, 181, 0.96) 100%);
  --ui-gradient-soft: linear-gradient(135deg, rgba(82, 144, 255, 0.18) 0%, rgba(53, 199, 181, 0.14) 100%);
  --ui-border: rgba(128, 182, 214, 0.24);
  --ui-ink: #f3fbff;
  --ui-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  background:
    radial-gradient(circle at top left, rgba(99, 162, 255, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(69, 215, 188, 0.12), transparent 22%),
    linear-gradient(180deg, #0f1923 0%, #0b1219 100%);
}

body[data-theme="LunaOS"] {
  --bg: #d8ecff;
  --surface: rgba(250, 253, 255, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --ink: #18345c;
  --muted: #567394;
  --accent: #2d74d6;
  --accent-deep: #1f4f98;
  --border: rgba(53, 107, 170, 0.16);
  --shadow: 0 24px 60px rgba(50, 97, 154, 0.16);
  --ui-gradient: linear-gradient(135deg, rgba(47, 118, 220, 0.96) 0%, rgba(82, 177, 74, 0.96) 100%);
  --ui-gradient-soft: linear-gradient(135deg, rgba(47, 118, 220, 0.18) 0%, rgba(82, 177, 74, 0.18) 100%);
  --ui-border: rgba(62, 112, 176, 0.24);
  --ui-ink: #f8fdff;
  --ui-shadow: 0 16px 30px rgba(42, 97, 160, 0.2);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.42), transparent 28%),
    radial-gradient(circle at top right, rgba(173, 224, 255, 0.34), transparent 24%),
    linear-gradient(180deg, #dff2ff 0%, #d8ecff 100%);
}

.map-experience {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
}

.seagulls-layer {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.72;
}

.seagulls-layer dotlottie-player {
  width: 100%;
  height: 100%;
  display: block;
}

.leaflet-container {
  font-family: "Outfit", sans-serif;
  background: #102331 !important;
  -webkit-user-select: none;
  user-select: none;
}

.leaflet-tile-pane {
  background: #102331 !important;
}

.leaflet-tile-pane {
  filter: none;
}

.leaflet-map-pane,
.leaflet-layer,
.leaflet-tile,
.leaflet-tile-container {
  background: #102331 !important;
}

.map-overlay {
  position: relative;
  z-index: 20;
  pointer-events: none;
}

.top-bar {
  display: grid;
  grid-template-columns: minmax(320px, 480px) minmax(240px, 320px);
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.controls-bar {
  position: absolute;
  inset: auto 22px 22px 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.glass-card,
.drawer-panel {
  background: var(--surface);
  backdrop-filter: blur(22px);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.intro-card,
.routes-hero,
.user-card,
.login-popup,
.language-switcher,
.drawer-close,
.route-card,
.route-direction-toggle {
  pointer-events: auto;
}

.intro-card,
.routes-hero,
.user-card {
  padding: 22px;
}

.intro-card {
  position: relative;
  align-self: start;
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease, visibility 1s ease;
}

.intro-card.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-card.is-fading {
  opacity: 0;
  visibility: hidden;
}

.intro-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.eyebrow,
.panel-badge {
  margin: 0 0 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-deep);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1;
}

h1 {
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  max-width: 14ch;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.5rem;
}

.intro-text,
.drawer-note,
.route-description {
  color: var(--muted);
  line-height: 1.55;
}

.intro-text {
  margin: 10px 0 0;
  font-size: 0.95rem;
}

.intro-chips,
.panel-meta,
.user-stats,
.badge-strip,
.route-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intro-chips {
  margin-top: 14px;
}

.intro-chips span,
.panel-meta span,
.user-level,
.user-stats span,
.badge-pill,
.route-meta > span,
.route-meta > .route-time,
.route-meta > .route-difficulty,
.route-direction-toggle {
  padding: 8px 11px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: #0f4650;
  font-size: 0.82rem;
  box-shadow: none;
}

.route-meta > .route-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.route-meta > .route-time,
.route-meta > .route-difficulty,
.route-meta > .route-tag,
.route-meta > .route-distance,
.route-meta > .route-more-info {
  background: transparent !important;
  border-color: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  background-image: none !important;
}

.route-meta > .route-tag,
.route-meta > .route-difficulty {
  color: inherit !important;
}

.route-time-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}

.route-time-text {
  line-height: 1;
}

.route-meta > .route-time {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}

.route-time[data-mode="walk"] .route-time-icon,
.route-time[data-mode="walk"] .route-time-text {
  color: #2d6a34;
}

.route-time[data-mode="bike"] .route-time-icon,
.route-time[data-mode="bike"] .route-time-text {
  color: #1f7190;
}

.route-time[data-mode="horse"] .route-time-icon,
.route-time[data-mode="horse"] .route-time-text {
  color: #8a5d2e;
}

.routes-hero {
  border: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  align-self: start;
  justify-self: end;
  padding: 18px 20px;
}

.routes-hero.is-disabled {
  opacity: 0;
  cursor: not-allowed;
  filter: saturate(0.65);
  box-shadow: none;
  pointer-events: none;
}

.routes-hero h2 {
  margin-top: 2px;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
}

.routes-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: nowrap;
}

.routes-hero-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--ui-gradient);
  border: 1px solid rgba(77, 216, 210, 0.2);
  color: var(--ui-ink);
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--ui-shadow);
}

.user-card {
  max-width: 560px;
  display: none;
}

.login-popup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  cursor: pointer;
}

.login-popup.is-authenticated {
  min-width: 190px;
}

.login-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ui-gradient);
  color: var(--ui-ink);
  box-shadow: var(--ui-shadow);
  font-size: 1rem;
  flex: 0 0 auto;
}

.login-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 999px;
  object-fit: cover;
}

.login-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  color: var(--ink);
}

.login-copy strong {
  font-size: 0.95rem;
  line-height: 1.1;
  max-width: 15ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-copy span {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.1;
}

.user-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.badge-strip {
  margin-top: 14px;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ui-gradient-soft);
}

.badge-pill em {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--ui-gradient);
  color: #f7fff4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 0.84rem;
}

.badge-pill.is-earned {
  border-color: rgba(45, 177, 165, 0.38);
  background: linear-gradient(135deg, rgba(34, 174, 136, 0.24) 0%, rgba(54, 133, 205, 0.24) 100%);
}

.badge-strip-locked {
  margin: 18px 0 24px;
  opacity: 0.95;
}

.badge-section-title {
  margin: 18px 0 10px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 40px;
}

.badge-preview {
  margin: 8px 0 0;
  min-height: 18px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;

}

.badge-pill.is-locked {
  border-color: rgba(129, 139, 146, 0.22);
  background: linear-gradient(135deg, rgba(150, 160, 168, 0.16) 0%, rgba(109, 117, 123, 0.18) 100%);
  color: rgba(70, 78, 83, 0.88);
  box-shadow: none;
  cursor: help;
}

.badge-pill.is-locked em {
  background: linear-gradient(135deg, rgba(163, 172, 179, 0.95), rgba(118, 126, 132, 0.95));
  color: rgba(242, 244, 245, 0.95);
  filter: grayscale(1) saturate(0.25);
}

.routes-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  pointer-events: none;
}

.routes-drawer.is-open {
  display: block;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
}

.auth-modal.is-open {
  display: block;
}

.route-start-modal {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: none;
}

.route-start-modal.is-open {
  display: block;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 20, 0.52);
  backdrop-filter: blur(8px);
}

.route-start-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 21, 23, 0.54);
  backdrop-filter: blur(10px);
}

.route-start-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(520px, calc(100% - 28px));
  padding: 20px 18px 18px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.route-progress-panel {
  position: fixed;
  top: 18px;
  left: 50%;
  width: min(520px, calc(100% - 24px));
  padding: 16px 16px 14px;
  transform: translate(-50%, -12px);
  z-index: 57;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.route-progress-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.route-progress-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.route-progress-panel-head h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.08;
}

.route-progress-center {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2ca69d 0%, #237d91 58%, #215f84 100%);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(28, 105, 121, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.route-progress-center i {
  font-size: 0.88rem;
}

.route-progress-stats {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(150px, 0.75fr);
  gap: 10px;
  margin-top: 12px;
}

.route-progress-remaining,
.route-progress-time-box {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(45, 133, 146, 0.14);
}

.route-progress-remaining strong {
  color: var(--ink);
  font-size: 1.16rem;
  line-height: 1;
}

.route-progress-remaining span,
.route-progress-time-box span {
  color: #68898f;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-progress-time-box strong {
  color: #24464b;
  font-size: 0.98rem;
  font-weight: 800;
}

.route-progress-track {
  position: relative;
  height: 12px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(45, 133, 146, 0.14);
  overflow: hidden;
}

.route-progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4ec3d5 0%, #2f9e67 52%, #f7a24a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: width 0.28s ease;
}

.route-progress-stop {
  margin-top: 12px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(184, 70, 70, 0.28);
  border-radius: 14px;
  background: linear-gradient(135deg, #ef8b6a 0%, #df5f4f 52%, #c9443c 100%);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(185, 68, 60, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.route-progress-stop i {
  font-size: 0.88em;
}

.route-complete-modal {
  position: fixed;
  inset: 0;
  z-index: 59;
  display: none;
}

.route-complete-modal.is-open {
  display: block;
}

.route-complete-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 20, 0.58);
  backdrop-filter: blur(9px);
}

.route-complete-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(460px, calc(100% - 28px));
  padding: 24px 22px 22px;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 14px;
  text-align: center;
}

.route-complete-badge {
  width: 62px;
  height: 62px;
  margin: -8px auto 2px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f7b04f 0%, #ea7f2c 58%, #d86318 100%);
  color: #fff;
  box-shadow: 0 16px 28px rgba(201, 105, 30, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  font-size: 1.35rem;
}

.route-complete-dialog .eyebrow {
  justify-self: center;
}

.route-complete-dialog h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1.05;
}

.route-complete-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.96rem;
}

.route-complete-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.route-complete-stat {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(45, 133, 146, 0.14);
}

.route-complete-stat span {
  color: #6d8b91;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.route-complete-stat strong {
  color: #23464d;
  font-size: 1.12rem;
  line-height: 1.1;
}

.route-complete-back {
  width: 100%;
  margin-top: 2px;
  border: 0;
  border-radius: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #2ca69d 0%, #237d91 58%, #215f84 100%);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(28, 105, 121, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.route-complete-back:active {
  transform: translateY(1px) scale(0.99);
}

@media (max-width: 620px) {
  .route-progress-panel {
    top: 12px;
    padding: 14px 14px 12px;
  }

  .route-progress-stats {
    grid-template-columns: 1fr;
  }

  .route-progress-panel-head {
    flex-direction: column;
  }

  .route-progress-center {
    align-self: flex-start;
  }

  .route-complete-dialog {
    width: calc(100% - 22px);
    padding: 20px 18px 18px;
    gap: 12px;
  }

  .route-complete-stats {
    grid-template-columns: 1fr;
  }
}

.route-start-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.route-start-copy {
  margin: 6px 0 0;
  color: #2e6068;
  font-size: 0.88rem;
  line-height: 1.45;
}

.route-start-direction {
  margin: 4px 0 0;
  color: #7a5420;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.route-start-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.route-start-choice {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(45, 133, 146, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 560px) {
  .route-start-choice-list {
    grid-template-columns: 1fr;
  }
}

.route-start-choice-photo-wrap {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(35, 134, 148, 0.16), rgba(255, 255, 255, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.route-start-choice-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.route-start-choice-copy {
  min-width: 0;
  display: grid;
  gap: 0;
}

.route-start-choice strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-start-choice-kicker {
  color: #9d6a22;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.route-start-choice.is-selected {
  border-color: rgba(25, 144, 161, 0.42);
  background: linear-gradient(135deg, rgba(91, 221, 211, 0.2), rgba(255, 255, 255, 0.82));
  box-shadow: 0 0 0 4px rgba(56, 168, 183, 0.12);
}

.route-start-message {
  min-height: 1.2rem;
  margin: 10px 0 0;
  color: #2d6770;
  font-size: 0.8rem;
  font-weight: 600;
}

.route-start-message.is-error {
  color: #ae4040;
}

.route-start-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 560px) {
  .route-start-actions {
    grid-template-columns: 1fr;
  }
}

.route-start-confirm:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.route-start-secondary {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(32, 110, 124, 0.18);
  background: rgba(255, 255, 255, 0.62);
  color: #215b64;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.route-start-profile {
  margin-top: 10px;
  padding: 10px 10px 8px;
  border: 1px solid rgba(40, 123, 136, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(236, 248, 243, 0.9) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
  display: grid;
  gap: 6px;
}

.route-start-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #275a62;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.route-start-profile-subtitle {
  color: #386b72;
  font-size: 0.72rem;
  font-weight: 700;
}

.language-switcher {
  align-self: start;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  min-height: 64px;
  width: fit-content;
  position: relative;
  z-index: 22;
}

.routes-hero-language {
  padding: 6px 8px;
  min-height: 0;
  width: auto;
  border-radius: 999px;
  background: var(--ui-gradient);
  border: 1px solid rgba(77, 216, 210, 0.2);
  box-shadow: var(--ui-shadow);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.language-switcher-flag {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  opacity: 0.7;
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.language-switcher-flag:hover,
.language-switcher-flag.is-active {
  opacity: 1;
  transform: translateY(-1px);
}

.language-switcher-flag.is-active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.language-switcher-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.language-switcher i {
  font-size: 1.2rem;
  color: var(--ui-ink);
}

.language-switcher select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  appearance: none;
  padding-right: 8px;
}

.language-switcher select option {
  color: var(--ink);
}

.route-start-profile-distance {
  color: #2f626a;
  font-size: 0.76rem;
  font-weight: 700;
}

.route-start-profile-axis-label {
  fill: #567980;
  font-size: 14px;
  font-weight: 700;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.route-start-fauna {
  display: none;
}

.route-start-fauna-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #275a62;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.route-start-fauna-head span:last-child {
  color: #5d7f86;
  text-transform: none;
  letter-spacing: 0.02em;
}

.route-start-fauna-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.route-start-fauna-item {
  border: 1px solid rgba(42, 123, 136, 0.16);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  padding: 8px 6px 7px;
  display: grid;
  justify-items: center;
  gap: 4px;
  cursor: pointer;
  color: #234f57;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.route-start-fauna-item.is-selected {
  border-color: rgba(28, 138, 151, 0.4);
  background: linear-gradient(180deg, rgba(87, 223, 208, 0.18), rgba(255, 255, 255, 0.88));
  box-shadow: 0 0 0 4px rgba(52, 168, 183, 0.1);
}

.route-start-fauna-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(46, 145, 161, 0.16), rgba(255, 255, 255, 0.8));
  font-size: 0.88rem;
}

.route-start-fauna-label {
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.1;
}

.route-start-fauna-info {
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(42, 123, 136, 0.12);
  display: grid;
  gap: 4px;
}

.route-start-fauna-info strong {
  color: #1f4951;
  font-size: 0.86rem;
}

.route-start-fauna-info span {
  color: #5b8087;
  font-size: 0.7rem;
  font-style: italic;
}

.route-start-fauna-info p {
  margin: 2px 0 0;
  color: #315d65;
  font-size: 0.78rem;
  line-height: 1.35;
}

.route-start-info {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(40, 123, 136, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(240, 250, 247, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
  display: grid;
  gap: 8px;
}

.route-start-info-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: #275a62;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.route-start-info-head span:last-child {
  color: #5d7f86;
  text-transform: none;
  letter-spacing: 0.02em;
}

.route-start-info-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px 10px 9px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(42, 123, 136, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.route-start-info-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(46, 145, 161, 0.16), rgba(255, 255, 255, 0.8));
  color: #2a7b86;
  font-size: 0.9rem;
}

.route-start-info-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.route-start-info-copy strong {
  color: #1f4951;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.route-start-info-copy span {
  color: #315d65;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
}

.route-start-debug-marker {
  background: transparent;
  border: 0;
}

.route-start-debug-marker-dot {
  width: 18px;
  height: 18px;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffb2b2 0%, #e24a4a 42%, #b62121 100%);
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 6px rgba(226, 74, 74, 0.18), 0 6px 16px rgba(18, 35, 38, 0.22);
}

.user-location-tooltip-wrap {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.user-location-tooltip-wrap.leaflet-tooltip-top::before {
  border-top-color: rgba(248, 252, 251, 0.96);
}

.user-location-tooltip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(248, 252, 251, 0.96);
  border: 1px solid rgba(45, 133, 146, 0.18);
  color: #244048;
  box-shadow: 0 10px 24px rgba(12, 34, 38, 0.16);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.user-location-tooltip i {
  font-size: 0.78rem;
  color: #d94a4a;
}

.route-start-profile-range {
  color: #5b8087;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.route-start-profile-empty {
  min-height: 52px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.84rem;
}

.route-start-profile-svg {
  width: 100%;
  height: 52px;
  display: block;
  overflow: visible;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0.18) 100%),
    repeating-linear-gradient(
      to right,
      rgba(53, 118, 127, 0.08) 0,
      rgba(53, 118, 127, 0.08) 1px,
      transparent 1px,
      transparent 86px
    );
}

.route-start-profile-baseline {
  stroke: rgba(45, 96, 104, 0.14);
  stroke-width: 1.5;
}

.route-start-profile-area {
  stroke: none;
}

.route-start-profile-line {
  fill: none;
  stroke-width: 3.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(24, 74, 80, 0.16));
}

.route-start-profile-point {
  filter: drop-shadow(0 2px 5px rgba(23, 73, 78, 0.2));
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 2.2;
}

.drawer-panel {
  position: absolute;
  top: 20px;
  right: 20px;
  bottom: 20px;
  width: min(390px, calc(100% - 24px));
  padding: 20px;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

.drawer-panel .routes-list {
  flex: 1 1 auto;
  min-height: 0;
}

.hud-icon-strip {
  pointer-events: auto;
  width: min(520px, 100%);
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 0;
  margin-left: auto;
}

body.routes-drawer-open .hud-icon-strip {
  margin-right: 410px;
}

body.route-in-progress .hud-icon-strip {
  display: none;
}

body.routes-drawer-open .routes-hero {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
}

.hud-icon-strip-head {
  display: none;
}

.hud-icon-strip-head span:last-child {
  display: none;
}

.hud-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
  background: transparent;
  filter: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: none;
  isolation: isolate;
}

.hud-icon-slot {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  filter: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: transform 140ms ease, filter 140ms ease;
}

.hud-icon-slot:hover {
  filter: brightness(1.03);
}

.hud-icon-slot:active,
.hud-icon-slot.is-pressed {
  transform: translateY(2px) scale(0.96);
  filter: brightness(0.96);
}

.hud-icon-slot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  -ms-interpolation-mode: nearest-neighbor;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.hud-icon-slot span {
  display: none;
}

.auth-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(460px, calc(100% - 28px));
  padding: 26px 24px 24px;
  transform: translate(-50%, -50%);
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.auth-view {
  display: none;
}

.auth-view.auth-view-active {
  display: block;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field span {
  font-size: 0.84rem;
  font-weight: 700;
  color: #245157;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(35, 96, 104, 0.16);
  background: rgba(255, 255, 255, 0.74);
  font: inherit;
  color: var(--ink);
  outline: none;
}

.auth-field input:focus {
  border-color: rgba(28, 135, 145, 0.45);
  box-shadow: 0 0 0 4px rgba(41, 164, 187, 0.12);
}

.auth-submit {
  margin-top: 4px;
  padding: 12px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ui-gradient);
  color: var(--ui-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--ui-shadow);
}

.auth-demo-note {
  margin: -2px 0 0;
  color: #31666f;
  font-size: 0.82rem;
}

.auth-error {
  min-height: 1.1rem;
  margin: -4px 0 0;
  color: #b53a3a;
  font-size: 0.84rem;
  font-weight: 600;
}

.auth-switch-copy {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-switch {
  border: 0;
  background: none;
  padding: 0;
  color: #147c91;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.logout-form {
  margin-top: 0;
}

.logout-button {
  width: 100%;
}

.user-panel-hide {
  width: 100%;
  margin-top: 0;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid var(--ui-border);
  background: var(--ui-gradient-soft);
  color: #0f4650;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.user-panel-actions {
  margin-top: auto;
  padding-top: 18px;
  display: grid;
  gap: 12px;
}

.user-panel {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
}

.user-panel.is-open {
  pointer-events: none;
}

.user-panel-surface {
  position: absolute;
  inset: 0;
  background: rgba(9, 17, 18, 0.12);
  opacity: 0;
  transition: opacity 220ms ease;
}

.user-panel.is-open .user-panel-surface {
  opacity: 1;
}

.user-panel-sheet {
  position: absolute;
  inset: 0 auto 0 0;
  width: 30vw;
  min-width: 360px;
  max-width: 520px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  transform: translateX(-102%);
  transition: transform 260ms ease;
  border-radius: 0 28px 28px 0;
  pointer-events: auto;
}

.user-panel.is-open .user-panel-sheet {
  transform: translateX(0);
}

.user-panel-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.user-panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 44px;
}

.user-panel-avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ui-gradient);
  color: var(--ui-ink);
  font-size: 1.35rem;
  box-shadow: var(--ui-shadow);
  overflow: visible;
}

.user-panel-avatar .user-level {
  position: absolute;
  top: -8px;
  right: -10px;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(225, 244, 243, 0.96));
  border: 1px solid rgba(35, 128, 141, 0.18);
  color: #0f4650;
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(16, 72, 79, 0.16);
  white-space: nowrap;
}

.user-panel-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 999px;
  object-fit: cover;
}

.user-panel-email,
.user-panel-level p {
  margin: 8px 0 0;
  color: var(--muted);
}

.user-panel-options-toggle {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.user-panel-level {
  margin: 18px 0 18px;
  display: grid;
  gap: 8px;
}

.user-panel-experience {
  margin: 18px 0 12px;
  display: grid;
  gap: 8px;
}

.user-panel-level-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #285a62;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.user-panel-level-head strong {
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.user-panel-level-track {
  height: 11px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(45, 133, 146, 0.12);
  border: 1px solid rgba(35, 128, 141, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.user-panel-level-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(62, 190, 178, 0.92), rgba(35, 129, 144, 0.96));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
}

.user-panel-experience .user-panel-level-track {
  background: rgba(255, 169, 76, 0.12);
  border-color: rgba(225, 124, 54, 0.15);
}

.user-panel-experience .user-panel-level-fill {
  background: linear-gradient(90deg, rgba(255, 179, 93, 0.96), rgba(218, 97, 74, 0.96));
}

.user-options-modal {
  position: fixed;
  inset: 0;
  z-index: 58;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms ease;
}

.user-options-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}

.user-options-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 20, 0.48);
  backdrop-filter: blur(8px);
}

.user-options-modal-sheet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(420px, calc(100% - 28px));
  padding: 24px 22px 20px;
  transform: translate(-50%, -50%) scale(0.98);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(9, 29, 31, 0.28);
  transition: transform 200ms ease;
}

.user-options-modal.is-open .user-options-modal-sheet {
  transform: translate(-50%, -50%) scale(1);
}

.user-options-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.user-options-modal-copy {
  margin: 10px 0 0;
  color: #2e6068;
  font-size: 0.92rem;
  line-height: 1.45;
}

.user-options-error {
  margin: 10px 0 0;
  color: #ae4040;
  font-size: 0.82rem;
  font-weight: 700;
}

.user-options-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.user-options-photo {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(35, 128, 141, 0.14);
}

.user-options-photo-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(35, 134, 148, 0.16), rgba(255, 255, 255, 0.8));
  border: 1px solid rgba(35, 128, 141, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.user-options-photo-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.user-options-photo-copy {
  display: grid;
  gap: 6px;
}

.user-options-photo-copy > span {
  color: #295b63;
  font-size: 0.82rem;
  font-weight: 700;
}

.user-options-photo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(32, 110, 124, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(237, 247, 245, 0.92));
  color: #215b64;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.user-options-file {
  display: none;
}

.user-options-photo-remove {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ae4040;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.user-options-field {
  display: grid;
  gap: 6px;
}

.user-options-field span,
.user-options-check span {
  color: #295b63;
  font-size: 0.82rem;
  font-weight: 700;
}

.user-options-field input[type="text"],
.user-options-field input[type="password"],
.user-options-field input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(35, 128, 141, 0.16);
  background: var(--surface-strong);
  color: var(--ink);
  font: inherit;
}

.user-options-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(35, 128, 141, 0.16);
  background: var(--surface-strong);
  color: var(--ink);
  font: inherit;
}

.user-options-field input[type="file"] {
  padding: 9px 12px;
}

.user-options-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #295b63;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.user-options-check input[type="checkbox"] {
  margin-top: 2px;
  flex: 0 0 auto;
}

.user-options-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.user-options-cancel,
.user-options-submit {
  min-height: 42px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
}

.user-options-cancel {
  border: 1px solid rgba(32, 110, 124, 0.18);
  background: rgba(255, 255, 255, 0.7);
  color: #215b64;
}

.user-options-cancel,
.user-options-submit {
  cursor: pointer;
}

@media (max-width: 560px) {
  .user-options-actions {
    grid-template-columns: 1fr;
  }

  .user-options-photo {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(23, 52, 50, 0.08);
}

.drawer-close {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--ui-border);
  background: var(--ui-gradient-soft);
  cursor: pointer;
  font-size: 1rem;
  color: #0f4650;
}

.drawer-note {
  margin: 0 0 14px;
  font-size: 0.94rem;
}

.route-filter-reset {
  width: 100%;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(32, 110, 124, 0.18);
  background: rgba(255, 255, 255, 0.66);
  color: #215b64;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.route-filter-reset:hover {
  background: rgba(255, 255, 255, 0.82);
}

.route-filter-reset:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.route-filter-reset {
  display: none;
}

.route-filter-reset.is-visible {
  display: inline-flex;
}

#login-open {
  display: none !important;
}

.routes-list {
  display: grid;
  align-content: start;
  grid-auto-rows: min-content;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 143, 163, 0.78) rgba(210, 232, 232, 0.42);
}

.routes-list::-webkit-scrollbar {
  width: 10px;
}

.routes-list::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(214, 232, 231, 0.52) 0%, rgba(228, 239, 239, 0.34) 100%);
  border-radius: 999px;
}

.routes-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(28, 150, 128, 0.95) 0%, rgba(25, 115, 164, 0.95) 100%);
  border-radius: 999px;
  border: 2px solid rgba(235, 245, 244, 0.86);
}

.routes-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(22, 163, 138, 0.98) 0%, rgba(21, 126, 179, 0.98) 100%);
}

.route-card {
  position: relative;
  display: grid;
  gap: 0;
  overflow: hidden;
  width: 100%;
  text-align: left;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--route-accent, #2d9cc8) 15%, white) 0%, color-mix(in srgb, var(--route-accent, #2d9cc8) 8%, white) 100%);
  border: 1px solid color-mix(in srgb, var(--route-accent, #2d9cc8) 30%, rgba(23, 52, 50, 0.12));
  border-radius: 20px;
  padding: 10px 12px 10px;
  height: 60px;
  cursor: default;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease, filter 180ms ease;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 10px 22px rgba(55, 77, 67, 0.08);
}

.route-card:hover,
.route-card:focus-visible,
.route-card:focus-within {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--route-accent, #2d9cc8) 48%, rgba(23, 52, 50, 0.14));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 14px 28px rgba(55, 77, 67, 0.11);
  outline: none;
}

.route-card-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.route-card-summary:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--route-accent, #2d9cc8) 55%, white);
  outline-offset: 4px;
  border-radius: 14px;
}

.route-card-summary-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
  align-content: start;
}

.route-card-summary-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.route-card-chevron {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid color-mix(in srgb, var(--route-accent, #2d9cc8) 22%, rgba(23, 52, 50, 0.12));
  color: var(--accent-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
  pointer-events: none;
}

.route-card.is-expanded .route-card-chevron {
  transform: rotate(180deg);
}

.route-card.active {
  height: auto;
  border-color: color-mix(in srgb, var(--route-accent, #2d9cc8) 64%, rgba(23, 52, 50, 0.14));
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.82), transparent 34%),
    linear-gradient(180deg, color-mix(in srgb, var(--route-accent, #2d9cc8) 22%, white) 0%, color-mix(in srgb, var(--route-accent, #2d9cc8) 12%, white) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
  0 10px 22px rgba(20, 57, 67, 0.08);
}

.leaflet-overlay-pane .route-line-active {
  filter:
    drop-shadow(0 0 0 rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 1px rgba(0, 0, 0, 0.9))
    drop-shadow(0 0 1px rgba(0, 0, 0, 0.75));
}

.route-card.is-expanded {
  overflow: visible;
  height: auto;
  gap: 10px;
  padding-top: 12px;
  padding-bottom: 13px;
}

.route-card.route-card-pulse {
  animation: routeCardPulse 1.35s ease-in-out infinite;
}

.route-card-details {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--route-accent, #2d9cc8) 18%, rgba(23, 52, 50, 0.1));
}

.route-card-details[hidden] {
  display: none !important;
}

.route-context-menu {
  position: fixed;
  z-index: 1200;
  display: none;
  width: 238px;
  pointer-events: none;
}

.route-context-menu.is-open {
  display: block;
}

.route-context-menu-shell {
  pointer-events: auto;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(23, 52, 50, 0.18);
  background: linear-gradient(180deg, rgba(250, 250, 248, 0.98), rgba(232, 239, 242, 0.98));
  box-shadow:
    0 18px 35px rgba(18, 36, 45, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 4px;
}

.route-context-menu-header {
  display: grid;
  gap: 2px;
  padding: 2px 6px 8px;
  border-bottom: 1px solid rgba(23, 52, 50, 0.12);
}

.route-context-menu-kicker {
  color: #8f6420;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.route-context-menu-header strong {
  color: #213c42;
  font-size: 0.88rem;
  line-height: 1.2;
}

.route-context-menu-item {
  width: 100%;
  padding: 10px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #24464b;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.route-context-menu-item i {
  width: 18px;
  text-align: center;
  color: #2d8b9b;
}

.route-context-menu-item:hover,
.route-context-menu-item:focus-visible {
  background: rgba(55, 163, 181, 0.12);
  outline: none;
  transform: translateX(1px);
}

.map-context-menu {
  position: fixed;
  z-index: 1210;
  display: none;
  width: 224px;
  pointer-events: none;
}

.map-context-menu.is-open {
  display: block;
}

.map-context-menu-shell {
  pointer-events: auto;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(23, 52, 50, 0.18);
  background: linear-gradient(180deg, rgba(250, 250, 248, 0.98), rgba(232, 239, 242, 0.98));
  box-shadow:
    0 18px 35px rgba(18, 36, 45, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 4px;
}

.map-context-menu-header {
  display: grid;
  gap: 2px;
  padding: 2px 6px 8px;
  border-bottom: 1px solid rgba(23, 52, 50, 0.12);
}

.map-context-menu-kicker {
  color: #8f6420;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.map-context-menu-header strong {
  color: #213c42;
  font-size: 0.88rem;
  line-height: 1.2;
}

.map-context-menu-item {
  width: 100%;
  padding: 10px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #24464b;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.map-context-menu-item i {
  width: 18px;
  text-align: center;
  color: #2d8b9b;
}

.map-context-menu-item:hover,
.map-context-menu-item:focus-visible {
  background: rgba(55, 163, 181, 0.12);
  outline: none;
  transform: translateX(1px);
}

.map-inspect-panel {
  position: fixed;
  inset: 0;
  z-index: 1240;
  display: none;
  pointer-events: none;
}

.map-inspect-panel.is-open {
  display: block;
}

.map-inspect-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 20, 0.10);
  pointer-events: none;
}

.map-inspect-card {
  position: fixed;
  width: min(360px, calc(100% - 28px));
  padding: 18px 18px 16px;
  display: grid;
  gap: 14px;
  pointer-events: auto;
  transition: left 160ms ease, top 160ms ease, opacity 160ms ease;
  opacity: 0;
}

.map-inspect-panel.is-open .map-inspect-card {
  opacity: 1;
}

.map-inspect-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.map-inspect-head {
  padding-right: 42px;
}

.map-inspect-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.9rem;
}

.map-inspect-results {
  display: grid;
  gap: 8px;
  max-height: min(42vh, 360px);
  overflow: auto;
  padding-right: 4px;
}

.map-inspect-empty {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(96, 150, 160, 0.14);
  color: var(--muted);
  line-height: 1.45;
}

.map-inspect-item {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(96, 150, 160, 0.14);
  display: grid;
  gap: 4px;
}

.map-inspect-item strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.map-inspect-item span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.map-inspect-actions {
  display: flex;
  justify-content: flex-end;
}

.map-measure-popup .leaflet-popup-content-wrapper {
  border-radius: 18px;
  background: rgba(248, 252, 251, 0.96);
  box-shadow: 0 14px 32px rgba(18, 53, 61, 0.18);
}

.map-measure-popup .leaflet-popup-tip {
  background: rgba(248, 252, 251, 0.96);
}

.map-measure-mode .leaflet-container,
.map-inspect-mode .leaflet-container {
  cursor: crosshair;
}

.route-details-modal {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: none;
}

.route-details-modal.is-open {
  display: block;
}

.route-details-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 20, 0.58);
  backdrop-filter: blur(10px);
}

.route-details-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(780px, calc(100% - 28px));
  max-height: min(84vh, 860px);
  padding: 0;
  transform: translate(-50%, -50%);
  overflow: hidden;
}

.route-details-dialog-scroll {
  max-height: min(84vh, 860px);
  padding: 20px 20px 18px;
  overflow: auto;
  border-radius: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 133, 146, 0.42) rgba(255, 255, 255, 0.34);
}

.route-details-dialog-scroll::-webkit-scrollbar {
  width: 10px;
}

.route-details-dialog-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.34);
  border-radius: 999px;
}

.route-details-dialog-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(73, 160, 174, 0.72), rgba(39, 105, 117, 0.78));
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
}

.route-details-dialog-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(73, 160, 174, 0.9), rgba(39, 105, 117, 0.92));
}

.route-details-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.85fr);
  gap: 16px;
  margin-top: 18px;
  align-items: start;
}

@media (max-width: 760px) {
  .route-details-layout {
    grid-template-columns: 1fr;
  }
}

.route-details-copy {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.route-details-media {
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(45, 133, 146, 0.16);
  background: linear-gradient(135deg, rgba(33, 105, 118, 0.12), rgba(255, 255, 255, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.route-details-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.route-details-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.route-details-hero {
  display: grid;
  gap: 6px;
  padding-right: 52px;
}

.route-details-kicker {
  color: #9a6721;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.route-details-hero h3 {
  margin: 0;
  color: #223d42;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.05;
}

.route-details-subtitle {
  margin: 0;
  color: #4c7177;
  font-size: 0.9rem;
  font-weight: 700;
}

.route-details-body {
  display: grid;
  gap: 14px;
  color: #2d4f54;
  font-size: 0.95rem;
  line-height: 1.6;
}

.route-details-body p {
  margin: 0;
}

.route-details-table {
  display: grid;
  gap: 8px;
}

.route-details-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.route-details-facts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

@media (max-width: 980px) {
  .route-details-facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .route-details-facts-grid {
    grid-template-columns: 1fr;
  }
}

.route-details-longtext {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 560px) {
  .route-details-summary-grid {
    grid-template-columns: 1fr;
  }
}

.route-details-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(45, 133, 146, 0.14);
}

.route-details-row span {
  color: #6a8a90;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.route-details-row strong {
  color: #24464b;
  font-size: 0.92rem;
  font-weight: 700;
}

.route-details-summary-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(45, 133, 146, 0.14);
}

.route-details-summary-item-wide {
  min-height: 100%;
}

.route-details-longtext .route-details-summary-item-wide {
  grid-column: 1 / -1;
}

.route-details-summary-item span {
  color: #6a8a90;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.route-details-summary-item strong {
  color: #24464b;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.5;
}

.route-details-row-wide {
  grid-template-columns: 150px minmax(0, 1fr);
}

.route-details-fauna-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.route-details-mineral-list {
  gap: 8px;
}

.route-details-mineral-tile {
  width: 48px;
  height: 48px;
  max-width: 48px;
  max-height: 48px;
  flex: 0 0 48px;
  border-radius: 12px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(45, 133, 146, 0.14);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.route-details-mineral-tile:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 6px 14px rgba(12, 34, 38, 0.08);
}

.route-details-mineral-tile:active {
  transform: scale(0.96);
}

.route-details-mineral-tile img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
}

.route-details-mineral-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(220px, calc(100vw - 24px));
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(248, 250, 247, 0.96);
  border: 1px solid rgba(45, 133, 146, 0.18);
  box-shadow: 0 14px 32px rgba(12, 34, 38, 0.18);
  color: #244048;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 10px)) scale(0.96);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  will-change: transform, opacity;
}

.route-details-mineral-tooltip.is-below {
  transform: translate(-50%, 10px) scale(0.96);
}

.route-details-mineral-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 10px)) scale(1);
}

.route-details-mineral-tooltip.is-visible.is-below {
  transform: translate(-50%, 10px) scale(1);
}

.route-details-mineral-tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 10px;
  height: 10px;
  background: inherit;
  border-right: 1px solid rgba(45, 133, 146, 0.18);
  border-bottom: 1px solid rgba(45, 133, 146, 0.18);
  transform: translate(-50%, -6px) rotate(45deg);
  border-radius: 2px;
}

.route-details-mineral-tooltip.is-below::before {
  top: 0;
  transform: translate(-50%, -4px) rotate(225deg);
}

.route-details-mineral-tooltip-icon {
  width: 24px;
  height: 24px;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor;
  border-radius: 6px;
  flex: 0 0 auto;
}

.route-details-mineral-tooltip-label {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-details-fauna-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(45, 133, 146, 0.14);
  color: #24464b;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
}

.route-details-fauna-chip i {
  color: #2d8b9b;
}

.route-details-mineral-chip i {
  color: #9a6721;
}

.route-details-fungi-chip i {
  color: #5e8b3d;
}

.route-details-fauna-empty {
  color: #5d7f85;
  font-style: italic;
  font-weight: 600;
}

@keyframes routeCardPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      inset 0 0 0 1px color-mix(in srgb, var(--route-accent, #2d9cc8) 38%, transparent),
      0 10px 22px rgba(20, 57, 67, 0.08);
  }

  50% {
    transform: scale(0.985);
    box-shadow:
      inset 0 0 0 4px color-mix(in srgb, var(--route-accent, #2d9cc8) 48%, transparent),
      0 8px 18px rgba(20, 57, 67, 0.06);
  }
}

.route-card h4 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-index {
  margin: 0;
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.route-zone {
  min-width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.zone-norte { background: linear-gradient(135deg, #c58b4f 0%, #996636 100%); }
.zone-sur { background: linear-gradient(135deg, #45aa81 0%, #2f7f62 100%); }
.zone-este { background: linear-gradient(135deg, #39a0bf 0%, #2b6f98 100%); }

.route-description {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.route-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.route-direction-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  font-size: 0.8rem;
  border: 1px solid rgba(217, 118, 35, 0.26);
  border-radius: 10px;
  background: linear-gradient(135deg, #f7a24a 0%, #ea7f2c 52%, #d96a18 100%);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(201, 105, 30, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.route-direction-toggle i {
  font-size: 0.9rem;
  color: inherit;
}

.route-start-button {
  padding: 7px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--ui-gradient);
  color: var(--ui-ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--ui-shadow);
  padding: 12px 40px;
}

.route-stop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 18px;
  border: 1px solid rgba(184, 70, 70, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, #ef8b6a 0%, #df5f4f 52%, #c9443c 100%);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(185, 68, 60, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.route-stop-button i {
  font-size: 0.86em;
}

.route-effort {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.route-more-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #25525a;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.route-more-info:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(12, 34, 38, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.route-more-info:active {
  transform: translateY(0) scale(0.97);
}

.route-distance {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.route-meta {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 6px;
  align-content: flex-start;
  text-align: center;
}

.route-meta > span,
.route-meta > .route-time,
.route-meta > .route-difficulty,
.route-direction-toggle,
.route-more-info {
  flex: 0 0 calc((100% - 12px) / 3);
  max-width: calc((100% - 12px) / 3);
  min-width: 0;
  padding: 7px 10px;
  font-size: 0.75rem;
}

.route-tag {
  align-items: center;
  line-height: 1.05;
}

.route-tag.tag-faro { background: rgba(61, 150, 204, 0.16); border-color: rgba(61, 150, 204, 0.34); color: #216997; }
.route-tag.tag-naturaleza { background: rgba(99, 176, 91, 0.18); border-color: rgba(99, 176, 91, 0.34); color: #2e6f2f; }
.route-tag.tag-playa { background: rgba(74, 203, 207, 0.18); border-color: rgba(74, 203, 207, 0.34); color: #177c89; }
.route-tag.tag-roca { background: rgba(165, 125, 81, 0.18); border-color: rgba(165, 125, 81, 0.34); color: #6f4f32; }
.route-tag.tag-montana { background: rgba(118, 173, 84, 0.18); border-color: rgba(118, 173, 84, 0.34); color: #466e2b; }
.route-tag.tag-seca { background: rgba(181, 138, 89, 0.18); border-color: rgba(181, 138, 89, 0.34); color: #8a5d2e; }
.route-tag.tag-historia { background: rgba(184, 123, 67, 0.18); border-color: rgba(184, 123, 67, 0.34); color: #8e5427; }
.route-tag.tag-urbano { background: rgba(92, 122, 111, 0.18); border-color: rgba(92, 122, 111, 0.34); color: #4d6660; }
.route-tag.tag-costa { background: rgba(67, 174, 201, 0.18); border-color: rgba(67, 174, 201, 0.34); color: #1f7190; }
.route-tag.tag-ruta { background: rgba(184, 123, 67, 0.18); border-color: rgba(184, 123, 67, 0.34); color: #8e5829; }

.route-meta > .route-difficulty.difficulty-easy { background: rgba(110, 173, 117, 0.16); border-color: rgba(110, 173, 117, 0.35); color: #2d6a34; }
.route-meta > .route-difficulty.difficulty-medium { background: rgba(216, 168, 70, 0.16); border-color: rgba(216, 168, 70, 0.35); color: #8a6410; }
.route-meta > .route-difficulty.difficulty-medium-high { background: rgba(222, 128, 59, 0.16); border-color: rgba(222, 128, 59, 0.35); color: #9b4f1f; }
.route-meta > .route-difficulty.difficulty-hard { background: rgba(198, 78, 78, 0.16); border-color: rgba(198, 78, 78, 0.35); color: #972f2f; }

.route-endpoint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 104px;
  padding: 0;
  position: relative;
  text-align: center;
  top: -40px;
}

.route-endpoint-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.route-endpoint-photo {
  width: 48px !important;
  height: 48px !important;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.86);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.18);
}

.finish-line-marker {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.24));
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  font-size: 0.72rem;
}

.finish-line-marker-green {
  background: linear-gradient(135deg, #49b46d 0%, #21874f 100%);
}

.finish-line-marker-red {
  background: linear-gradient(135deg, #e06565 0%, #ac2f2f 100%);
}

.route-endpoint-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  padding: 2px 8px 0 0;
  border-radius: 12px;
  background: rgba(248, 244, 236, 0.96);
  border: 1px solid rgba(23, 52, 50, 0.08);
  width: auto;
  min-width: 0;
  padding: 10px
}

.route-endpoint-title {
  font-size: 0.72rem;
  color: #233a38;
  font-weight: 700;
}

.route-endpoint-place {
  font-size: 0.72rem;
  color: #5a6d69;
  margin: 0 auto
}

.route-endpoint-marker {
  transform: translate3d(0, -31px, 0);
}

.endpoint-mini-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: 16px;
  background: rgba(248, 252, 251, 0.96);
  box-shadow: 0 14px 32px rgba(18, 53, 61, 0.18);
}

.endpoint-mini-popup-wrap .leaflet-popup-tip {
  background: rgba(248, 252, 251, 0.96);
}

.endpoint-mini-popup {
  min-width: 160px;
  max-width: 220px;
}

.endpoint-mini-popup .eyebrow {
  margin-bottom: 6px;
  font-size: 0.62rem;
}

.endpoint-mini-popup h4 {
  margin: 0 0 6px;
  font-size: 0.82rem;
  line-height: 1.15;
  color: #203a38;
}

.endpoint-mini-popup p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #4b6763;
}

.animal-marker-wrap {
  background: none;
  border: 0;
}

.animal-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(224, 245, 234, 0.96) 100%);
  border: 1px solid rgba(36, 96, 78, 0.22);
  color: #1f6c52;
  font-size: 1.08rem;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 8px 18px rgba(0, 0, 0, 0.18);
}

.elevation-marker {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font: inherit;
  color: var(--ink);
}

.elevation-marker-symbol {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--elevation-accent, #d9a24b) 92%, white) 0%, color-mix(in srgb, var(--elevation-accent, #d9a24b) 56%, #163a41) 100%);
  border: 1px solid color-mix(in srgb, var(--elevation-accent, #d9a24b) 54%, rgba(23, 52, 50, 0.18));
  color: #f8fffb;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 8px 16px rgba(17, 44, 50, 0.18);
  font-size: 0.95rem;
}

.elevation-marker-label {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(12, 28, 31, 0.78);
  color: #f6fffd;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(16, 29, 34, 0.2);
}

.elevation-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: 18px;
  background: rgba(248, 252, 251, 0.96);
  box-shadow: 0 14px 32px rgba(18, 53, 61, 0.18);
}

.elevation-popup-wrap .leaflet-popup-tip {
  background: rgba(248, 252, 251, 0.96);
}

.elevation-popup {
  min-width: 180px;
}

.elevation-popup h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.2;
}

.elevation-popup p {
  margin: 0;
  color: #4a6468;
  line-height: 1.35;
  font-size: 0.84rem;
}

.elevation-popup-height {
  margin-bottom: 6px !important;
  color: #996530 !important;
  font-weight: 700;
}

.elevation-popup-note {
  margin-top: 6px !important;
  color: #2f6258 !important;
  font-style: italic;
}

.pine-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pine-accent, #4c8f5d) 88%, white) 0%, color-mix(in srgb, var(--pine-accent, #4c8f5d) 62%, #12342f) 100%);
  border: 1px solid color-mix(in srgb, var(--pine-accent, #4c8f5d) 42%, rgba(18, 52, 47, 0.2));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 6px 14px rgba(15, 38, 33, 0.18);
}

.talayotica-marker {
  position: relative;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.talayotica-marker-ring {
  position: absolute;
  inset: 1px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.96) 0 18%, rgba(228, 54, 63, 0.95) 19% 100%);
  border: 2px solid rgba(153, 15, 28, 0.92);
  box-shadow: 0 8px 18px rgba(153, 15, 28, 0.28);
}

.talayotica-marker-core {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(153, 15, 28, 0.22);
}

.talayotica-tooltip {
  border: 0;
  background: rgba(18, 28, 39, 0.92);
  color: #fff;
  box-shadow: 0 10px 24px rgba(4, 9, 14, 0.28);
}

.talayotica-tooltip.leaflet-tooltip-top::before {
  border-top-color: rgba(18, 28, 39, 0.92);
}

.period-site-marker-wrap {
  display: inline-flex;
}

.period-site-marker {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: hidden;
}

.period-site-marker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
  display: block;
}

.period-site-tooltip {
  border: 0;
  background: rgba(18, 28, 39, 0.92);
  color: #fff;
  box-shadow: 0 10px 24px rgba(4, 9, 14, 0.28);
}

.period-site-tooltip.leaflet-tooltip-top::before {
  border-top-color: rgba(18, 28, 39, 0.92);
}

.pine-marker-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  color: #f5fffa;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
}

.pine-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: 18px;
  background: rgba(248, 252, 251, 0.96);
  box-shadow: 0 14px 32px rgba(18, 53, 61, 0.18);
}

.pine-popup-wrap .leaflet-popup-tip {
  background: rgba(248, 252, 251, 0.96);
}

.pine-popup {
  min-width: 180px;
}

.pine-popup h4 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  line-height: 1.2;
}

.pine-popup p {
  margin: 0;
  color: #4a6468;
  line-height: 1.35;
  font-size: 0.84rem;
}

.animal-marker.is-water {
  background: linear-gradient(135deg, rgba(231, 247, 255, 0.98) 0%, rgba(205, 238, 250, 0.98) 100%);
  color: #1b7396;
  border-color: rgba(36, 109, 145, 0.2);
}

.animal-marker-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  max-width: 92px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(18, 78, 89, 0.14);
  color: #173f49;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.14);
}

.animal-marker-text.is-water {
  background: rgba(233, 248, 252, 0.9);
}

.animal-popup {
  min-width: 190px;
}

.animal-popup h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  line-height: 1.2;
}

.animal-popup p {
  margin: 0;
  color: #4a6468;
  line-height: 1.35;
  font-size: 0.84rem;
}

.animal-popup-scientific {
  margin-bottom: 6px !important;
  color: #147c91 !important;
  font-style: italic;
  font-weight: 600;
}

.animal-popup-stage {
  margin-top: 6px !important;
  color: #2f6258 !important;
  font-style: italic;
}

.animal-popup-wrap .leaflet-popup-content-wrapper {
  border-radius: 18px;
  background: rgba(248, 252, 251, 0.96);
  box-shadow: 0 14px 32px rgba(18, 53, 61, 0.18);
}

.animal-popup-wrap .leaflet-popup-tip {
  background: rgba(248, 252, 251, 0.96);
}

@media (max-width: 1080px) {
  .top-bar {
    grid-template-columns: 1fr;
  }

  .routes-hero {
    justify-self: start;
  }

  .controls-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .user-card {
    max-width: none;
  }

  .login-popup {
    align-self: flex-start;
  }

  .user-panel-sheet {
    width: min(420px, calc(100% - 28px));
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .top-bar {
    padding: 14px;
    gap: 14px;
  }

  .controls-bar {
    inset: auto 14px 14px 14px;
    gap: 14px;
  }

  .intro-card {
    display: none !important;
  }

  .intro-card,
  .routes-hero,
  .user-card,
  .drawer-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .hud-icon-slot {
    max-width: 92px;
    max-height: 92px;
    margin: auto;
  }

  .hud-icon-grid {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
  }

  h1 {
    font-size: 1.5rem;
  }

  .drawer-panel {
    top: 14px;
    right: 14px;
    bottom: 14px;
    width: calc(100% - 28px);
  }

  .route-card {
    padding: 11px 11px 10px;
    border-radius: 18px;
  }

  .route-index {
    font-size: 0.68rem;
  }

  .route-card h4 {
    font-size: 0.88rem;
  }

  .route-description {
    font-size: 0.8rem;
  }

  .route-actions {
    flex-wrap: wrap;
  }

  .auth-dialog {
    padding: 22px 18px 18px;
  }

  .route-start-fauna-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hud-icon-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .user-panel-sheet {
    width: calc(100% - 22px);
    max-width: none;
    padding: 24px 18px 18px;
    border-radius: 0 22px 22px 0;
  }
}

.drawer-note {
	line-height: 1.25;
	font-size: 0.84rem
}
