:root {
  --bg: #f5f2e8;
  --panel: #191d1e;
  --text: #f7f6f2;
  --muted: #b9c1c3;
  --accent: #f0a934;
  --singletrack: #f08a47;
  --dirt: #8b5a2b;
  --gravel: #67727d;
  --other: #1b6aa8;
  --trage-wegen: #2d8f47;
  --private-road: #8a2be2;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 80% 20%, #fff7db 0%, var(--bg) 55%, #ded9c9 100%);
}

.top-nav {
  min-height: 44px;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  background: linear-gradient(90deg, #111617 0%, #1a2326 100%);
  border-bottom: 2px solid #293134;
  color: #f0a934;
}

.top-nav-brand {
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.92rem;
}

.top-nav-menu-button {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(145deg, #2a2f31 0%, #1b2022 100%);
  color: #f0a934;
  border-radius: 8px;
  padding: 0;
  width: 34px;
  height: 30px;
  align-items: center;
  justify-content: center;
}

.top-nav-menu-button:hover,
.top-nav-menu-button:focus-visible {
  background: linear-gradient(145deg, #343b3e 0%, #252c2f 100%);
  color: #dbe7e8;
  outline: none;
  filter: none;
}

.top-nav-menu-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.top-nav-menu-icon::before,
.top-nav-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.top-nav-menu-icon::before {
  top: -6px;
}

.top-nav-menu-icon::after {
  top: 6px;
}

.top-nav-links {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
  margin-right: 0.15rem;
}

.top-nav-link {
  color: #f0a934;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.top-nav-link:hover,
.top-nav-link:focus-visible {
  color: #dbe7e8;
  outline: none;
  border-bottom-color: #dbe7e8;
}

.top-nav-link[aria-current="page"] {
  color: #dbe7e8;
}

.top-nav-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.top-nav-login-button {
  background: var(--accent);
  color: #1b2022;
  border: 1px solid #c98a1f;
  padding: 0.52rem 0.85rem;
}

.top-nav-profile-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #8f6d16;
  background: linear-gradient(145deg, #2a2f31 0%, #1b2022 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.top-nav-profile-button:hover,
.top-nav-profile-button:focus-visible {
  background: linear-gradient(145deg, #343b3e 0%, #252c2f 100%);
  filter: none;
}

.top-nav-profile-icon {
  position: relative;
  width: 14px;
  height: 14px;
  display: block;
}

.top-nav-profile-icon::before,
.top-nav-profile-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #b88a1b;
}

.top-nav-profile-icon::before {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  top: 0;
}

.top-nav-profile-icon::after {
  width: 10px;
  height: 6px;
  border-radius: 7px 7px 4px 4px;
  bottom: 0;
}

.top-nav-profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 152px;
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, #1b272b 0%, #121a1d 100%);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.35);
  z-index: 40;
}

.top-nav-profile-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: #edf3f4;
  text-align: left;
  border-radius: 8px;
  padding: 0.48rem 0.58rem;
  font-size: 0.86rem;
}

.top-nav-profile-menu-item:hover,
.top-nav-profile-menu-item:focus-visible {
  background: rgba(58, 149, 163, 0.22);
  filter: none;
}

.top-nav-profile-menu-item-logout {
  color: #ffd9d9;
}

.top-nav-login-button:hover,
.top-nav-login-button:focus-visible {
  background: #ffbf49;
  filter: none;
}

@media (max-width: 1024px) {
  .top-nav {
    min-height: 44px;
    height: 44px;
    padding: 0 0.6rem;
  }

  .top-nav-brand {
    font-size: 0.8rem;
    letter-spacing: 0.02em;
  }

  .top-nav-links {
    gap: 0.5rem;
    margin-right: 0;
  }

  .top-nav-link {
    font-size: 0.74rem;
  }

  .top-nav-login-button {
    padding: 0.45rem 0.72rem;
    font-size: 0.86rem;
  }

  .top-nav-profile-button {
    width: 30px;
    height: 30px;
  }

  .top-nav-profile-menu {
    min-width: 145px;
    top: calc(100% + 6px);
  }
}

@media (max-width: 760px) {
  .top-nav {
    position: relative;
    min-height: 48px;
    height: 48px;
    padding: 0 0.55rem;
    gap: 0.45rem;
  }

  .top-nav-brand {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .top-nav-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 2;
  }

  .top-nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0.55rem;
    right: 0.55rem;
    margin: 0;
    padding: 0.52rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(180deg, #1b272b 0%, #121a1d 100%);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.35);
    z-index: 35;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
  }

  .top-nav.is-menu-open .top-nav-links {
    display: flex;
  }

  .top-nav-link {
    display: block;
    width: 100%;
    font-size: 0.8rem;
    border-radius: 8px;
    border-bottom: 0;
    padding: 0.52rem 0.48rem;
    text-align: center;
  }

  .top-nav-link:hover,
  .top-nav-link:focus-visible {
    border-bottom-color: transparent;
    background: rgba(58, 149, 163, 0.22);
  }

  .top-nav-actions {
    order: 3;
    margin-left: auto;
    gap: 0.4rem;
  }

  .top-nav-login-button {
    padding: 0.42rem 0.62rem;
    font-size: 0.8rem;
  }

  .top-nav-profile-menu {
    right: 0;
    z-index: 40;
  }
}

.app-shell {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: 100%;
}

.panel {
  background: #101314;
  color: var(--text);
  padding: 1.1rem;
  border-right: 3px solid #293134;
  overflow: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: #f0a934 #121718;
}

.panel-content-grid {
  display: block;
}

.panel-content-col {
  min-width: 0;
}

.panel-content-col-primary {
  grid-area: primary;
}

.panel-content-col-secondary {
  grid-area: secondary;
}

.panel-content-grid > .heatmap-row {
  grid-area: heatmap;
}

.panel::-webkit-scrollbar {
  width: 11px;
}

.panel::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #101415 0%, #1b2224 100%);
  border-left: 1px solid #2f383b;
}

.panel::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f0a934 0%, #d68d1d 100%);
  border-radius: 999px;
  border: 2px solid #121718;
}

.panel::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #f7b84d 0%, #e19829 100%);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.subtitle {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.subtitle-line {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.subtitle-emphasis {
  color: #edf3f4;
  font-weight: 400;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.route-options-panel {
  margin-top: 0.85rem;
  border: 0;
}

.route-options-summary {
  display: none;
  list-style: none;
}

.route-options-summary::-webkit-details-marker {
  display: none;
}

.route-options-body {
  display: block;
}

.header-quick-controls {
  display: none;
}

.mobile-checkbox-column {
  display: none;
}

.mobile-export-row {
  display: none;
}

.sidebar-legend-slot,
.sidebar-options-slot {
  display: grid;
  gap: 0.7rem;
}

.sidebar-legend-slot {
  margin-top: 0.9rem;
}

.panel-logo {
  width: 128px;
  height: 128px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 8px;
}

h1 {
  margin: 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.subtitle {
  margin: 0;
  color: var(--accent);
  font-weight: 700;
}

.subtitle-emphasis {
  color: #edf3f4;
  font-weight: 400;
  font-size: 0.8rem;
}

.controls {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.8rem;
}

.route-instruction {
  margin: 0;
  color: var(--accent);
  
  line-height: 1.4;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
}

.search-row input {
  border: 1px solid #394245;
  background: #101415;
  color: #edf3f3;
  padding: 0.62rem 0.7rem;
  border-radius: 10px;
  font-size: 0.95rem;
}

.search-row input::placeholder {
  color: #99a7aa;
}

.search-row input:focus {
  outline: 2px solid #f0a934;
  outline-offset: 1px;
}

button {
  border: 0;
  background: var(--accent);
  color: #1f1b11;
  font-weight: 700;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.15s ease;
}

button:hover {
  transform: none;
  filter: brightness(1.05);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.2);
}

#routeModeButton {
  background: #2f383b;
  color: #edf3f4;
}

#routeModeButton:hover,
#routeModeButton:focus-visible {
  background: #394245;
  color: #f7f6f2;
  filter: none;
}

#routeModeButton.is-active {
  background: #397942;
  color: #eff4f5;
}

#routeModeButton.is-active:hover,
#routeModeButton.is-active:focus-visible {
  background: #4b8d54;
  color: #eff4f5;
  filter: none;
}

#clearRouteButton {
  background: #96473C;
  color: #eff4f5;
}

#saveRouteButton {
  background: #3d6f45;
  color: #eef6ef;
}

#loopBackButton {
  background: #435f8f;
  color: #edf3fb;
}

#alternativeRouteButton {
  background: #2E808D;
  color: #eaf7f9;
}

#alternativeWholeRouteButton {
  background: #004E5B;
  color: #eaf7f9;
}

.route-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.route-action-row > button {
  width: 100%;
}

.gpx-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.gpx-action-row > button {
  width: 100%;
}

.random-loop-row {
  display: grid;
  grid-template-columns: 74px max-content 1fr;
  gap: 0.45rem;
  align-items: center;
}

#randomLoopButton {
  width: 100%;
  white-space: nowrap;
}

#randomLoopDistanceInput {
  border: 1px solid #394245;
  background: #101415;
  color: #edf3f3;
  padding: 0.62rem 0.55rem;
  border-radius: 10px;
  font-size: 0.92rem;
}

#randomLoopDistanceInput:focus {
  outline: 2px solid #f0a934;
  outline-offset: 1px;
}

.random-loop-unit {
  white-space: nowrap;
  color: #d6dddd;
  font-size: 0.9rem;
  margin-right: 0.2rem;
}

.premium-hover-tooltip {
  position: fixed;
  z-index: 2500;
  pointer-events: none;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #f0a934;
  color: #f0a934;
  background: rgba(44, 52, 57, 0.96);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.premium-inline-label {
  position: relative;
}

.premium-inline-label.is-paywalled[data-premium-lock]:hover::after,
.premium-inline-label.is-paywalled[data-premium-lock]:focus-within::after {
  content: attr(data-premium-lock);
  position: absolute;
  top: 4px;
  right: 4px;
  pointer-events: none;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  border: 1px solid #f0a934;
  color: #f0a934;
  background: rgba(44, 52, 57, 0.96);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  z-index: 3;
}

.is-paywalled,
.is-paywalled .route-balance-title,
.is-paywalled .route-balance-value,
.is-paywalled .random-loop-unit {
  color: #8f9aa0 !important;
}

.is-paywalled input[type="number"],
.is-paywalled input[type="range"],
.is-paywalled input[type="checkbox"] {
  opacity: 0.65;
  filter: grayscale(1);
}

.leaflet-control.is-paywalled {
  opacity: 0.72;
  filter: grayscale(1) saturate(0.3);
}

.leaflet-control.is-paywalled button,
.leaflet-control button.is-paywalled {
  background: #5a6469 !important;
  color: #d3d9dc !important;
}

.is-paywalled button:disabled,
.leaflet-control.is-paywalled button:disabled,
button.is-paywalled:disabled {
  opacity: 0.72;
  filter: grayscale(0.95) saturate(0.22) brightness(0.9);
  background: #5a6469 !important;
  color: #d3d9dc !important;
}

button.is-paywalled-gpx-import:disabled {
  opacity: 0.72;
  filter: grayscale(0.95) saturate(0.22) brightness(0.9);
  background: #5a6469 !important;
  color: #d3d9dc !important;
}

.heatmap-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

#importHeatmapButton {
  background: #fc5200;
  color: #fff;
  width: 100%;
}

#clearHeatmapButton {
  background: #4a565f;
  color: #eef3f4;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

#undoRoutePointButton {
  background: #B95B2A;
  color: #f6efe2;
}

button.is-loading {
  position: relative;
}

button.is-loading::before {
  content: "";
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.5rem;
  border: 2px solid rgba(31, 27, 17, 0.35);
  border-top-color: #1f1b11;
  border-radius: 50%;
  vertical-align: -0.1rem;
  animation: spin 0.8s linear infinite;
}

.toggle-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.95rem;
}

.toggle-row[hidden] {
  display: none !important;
}

#preferNewSegmentsRow {
  color: var(--text);
}

#preferNewSegmentsRow input[type="checkbox"] {
  accent-color: #fc5200;
}

#preferNewSegmentsRow:has(#preferNewSegmentsCheckbox:checked) {
  color: #fc5200;
}

input[type="checkbox"] {
  accent-color: var(--accent);
}

#avoidPrivateSegmentsCheckbox {
  accent-color: var(--private-road);
}

#avoidPrivateSegmentsRow {
  color: inherit;
}

#avoidPrivateSegmentsRow:has(#avoidPrivateSegmentsCheckbox:checked) {
  color: var(--private-road);
}

#maxVertsCheckbox {
  accent-color: #ff00ff;
}

.max-verts-row {
  margin-top: 0rem;
}

.max-verts-row:has(#maxVertsCheckbox:checked) {
  color: #ff00ff;
}

#bicycleOnlyCheckbox {
  accent-color: var(--other);
}

#bicycleOnlyRow:has(#bicycleOnlyCheckbox:checked) {
  color: var(--other);
}

.route-balance-row {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.route-balance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: #e4ebed;
}

.route-balance-title {
  color: var(--accent);
  font-weight: 700;
}

.route-balance-value {
  color: var(--accent);
  font-weight: 700;
}

#routeBalanceSlider {
  width: 100%;
  height: 20px;
  margin: 0;
  position: absolute;
  inset: 0;
  z-index: 4;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

#minimumRatingSlider {
  width: 100%;
  height: 20px;
  margin: 0;
  position: absolute;
  inset: 0;
  z-index: 4;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.route-balance-slider-wrap {
  position: relative;
  --route-balance-pct: 50%;
  height: 20px;
}

.route-balance-track,
.route-balance-fill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 8px;
  border-radius: 999px;
  pointer-events: none;
}

.route-balance-track {
  left: 0;
  right: 0;
  background: #2a3135;
  z-index: 1;
}

.route-balance-fill {
  left: 0;
  width: var(--route-balance-pct);
  background: linear-gradient(90deg, #f0a934 0%, #d68d1d 100%);
  z-index: 3;
}

.route-balance-notch-row {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 2;
}

.route-balance-notch {
  width: 4px;
  height: 4px;
  background: rgba(240, 169, 52, 0.82);
  transform: rotate(45deg);
}

#routeBalanceSlider::-webkit-slider-runnable-track {
  height: 20px;
  background: transparent;
}

#minimumRatingSlider::-webkit-slider-runnable-track {
  height: 20px;
  background: transparent;
}

#routeBalanceSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border-radius: 50%;
  border: 2px solid #f0a934;
  background: #fdfcf7;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

#minimumRatingSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border-radius: 50%;
  border: 2px solid #f0a934;
  background: #fdfcf7;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

#routeBalanceSlider::-moz-range-track {
  height: 20px;
  background: transparent;
  border: none;
}

#minimumRatingSlider::-moz-range-track {
  height: 20px;
  background: transparent;
  border: none;
}

#routeBalanceSlider::-moz-range-progress {
  background: transparent;
}

#minimumRatingSlider::-moz-range-progress {
  background: transparent;
}

#routeBalanceSlider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #f0a934;
  background: #fdfcf7;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

#minimumRatingSlider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #f0a934;
  background: #fdfcf7;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

.minimum-rating-row {
  margin-top: 0.2rem;
}

.minimum-rating-subtoggle {
  margin-top: 0.25rem;
  margin-bottom: 0.12rem;
  font-size: 0.9rem;
  opacity: 1;
}

.minimum-rating-subtoggle:not(.is-disabled) {
  color: var(--accent);
  font-weight: 700;
}

.minimum-rating-subtoggle input[type="checkbox"] {
  margin: 0;
  accent-color: #fcb137;
}

.minimum-rating-subtoggle.is-disabled {
  opacity: 0.55;
  filter: grayscale(0.45);
}

.minimum-rating-subtoggle.is-disabled input[type="checkbox"] {
  cursor: not-allowed;
}

.minimum-rating-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.minimum-rating-title input[type="checkbox"] {
  margin: 0;
  accent-color: #fcb137;
}

.minimum-rating-row.is-disabled {
  opacity: 1;
}

.minimum-rating-row.is-disabled .minimum-rating-slider-wrap {
  opacity: 0.58;
  filter: grayscale(0.35);
}

.minimum-rating-row.is-disabled .minimum-rating-title,
.minimum-rating-row.is-disabled .minimum-rating-title span,
.minimum-rating-row.is-paywalled .minimum-rating-title,
.minimum-rating-row.is-paywalled .minimum-rating-title span {
  color: var(--accent) !important;
  opacity: 1;
}

.minimum-rating-row.is-disabled input[type="range"] {
  cursor: not-allowed;
}

.minimum-rating-slider-wrap {
  --route-balance-pct: 0%;
}

.minimum-rating-value-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.minimum-rating-star-icon {
  color: #fcb137;
  font-size: 0.88rem;
  line-height: 1;
}

.legend {
  margin-top: 0;
  border-top: 2px solid #293134;
  background: #101314;
  padding: 0.5rem 0.85rem 0.7rem;
}

.legend.is-collapsed {
  padding-bottom: 0.5rem;
}

#legend-title {
  margin: 0;
  font-size: 0.95rem;
  color: #f0a934;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.legend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  cursor: pointer;
}

.legend-body {
  margin-top: 0.35rem;
}

.legend.is-collapsed .legend-body {
  display: none;
}

.legend-panel-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.autoload-controls {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.8rem;
}

#loadTrailsButton {
  width: 100%;
}

.legend ul {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.legend-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
}

.legend-toggle-row > span {
  cursor: pointer;
}

.legend-toggle-row span {
  color: #f1f4f5;
}

.legend-toggle-row.is-paywalled span {
  color: #8f9aa0 !important;
}

.options-panel {
  display: block;
  border-top: 2px solid #293134;
  background: #101314;
  padding: 0.5rem 0.85rem 0.7rem;
}

.options-panel.is-collapsed {
  padding-bottom: 0.5rem;
}

.options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  cursor: pointer;
}

#options-title {
  margin: 0;
  font-size: 0.95rem;
  color: #f0a934;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.options-body {
  margin-top: 0.35rem;
  display: grid;
  gap: 0.55rem;
}

.options-panel.is-collapsed .options-body {
  display: none;
}

.options-body .autoload-controls,
.options-body .panel-footer,
.options-body .heatmap-row {
  display: grid;
  gap: 0.55rem;
  margin-top: 0;
}

.options-body .panel-footer {
  margin-top: 0;
  padding-top: 0;
}

.options-body button {
  margin-top: 0;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #d7d7d7;
}

.swatch-singletrack {
  background: var(--singletrack);
  border-color: var(--singletrack);
}

.swatch-dirt {
  background: var(--dirt);
  border-color: var(--dirt);
}

.swatch-gravel {
  background: var(--gravel);
  border-color: var(--gravel);
}

.swatch-other {
  background: var(--other);
  border-color: var(--other);
}

.swatch-trage-wegen {
  background: var(--trage-wegen);
  border-color: var(--trage-wegen);
}

.swatch-private-road {
  background: var(--private-road);
  border-color: var(--private-road);
}

.swatch-heatmap {
  background: #ea471a;
  border-color: #ea471a;
}

.swatch-steep {
  background: #ff00ff;
  border-color: #ff00ff;
}

.legend-circle-toggle {
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  flex: 0 0 auto;
  background-clip: padding-box;
}

.legend-circle-toggle:hover {
  transform: none;
  filter: none;
}

.legend-circle-toggle:focus-visible {
  outline: 2px solid #f0a934;
  outline-offset: 2px;
}

.legend-circle-toggle.is-disabled {
  background: transparent;
}

.status {
  margin-top: 0.5rem;
  color: var(--accent);
  font-weight: 700;
  line-height: 1.4;
}

.panel-footer {
  margin-top: auto;
  padding-top: 1rem;
}

#clearCacheButton {
  width: 100%;
  margin-top: 0;
  background: #45515a;
  color: #eef3f4;
}

#clearPersonalDataButton {
  width: 100%;
  margin-top: 0;
  background: #96473C;
  color: #eff4f5;
}

#connectStravaButton {
  width: 100%;
  margin-top: 0;
  background: #fc5200;
  color: #fff;
}

#connectStravaButton.is-connected {
  background: #3d6f45;
  color: #eef6ef;
}

.strava-connection-status {
  margin: 0.05rem 0 0.15rem;
  font-size: 0.78rem;
  color: #c3ced0;
  line-height: 1.35;
  min-height: 1.1rem;
}

#installAppButton {
  width: 100%;
  margin-top: 0;
  background: #3d6f45;
  color: #eef6ef;
}

#installAppButton:disabled {
  background: #4a514b;
  color: #c8d0ca;
}

.status.is-loading::before {
  content: "";
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  margin-right: 0.55rem;
  border: 2px solid rgba(240, 169, 52, 0.35);
  border-top-color: #f0a934;
  border-radius: 50%;
  vertical-align: -0.1rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#map {
  width: 100%;
  height: 100%;
  min-height: 300px;
}

.map-main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  position: relative;
}

.map-stage {
  position: relative;
  min-height: 0;
  z-index: 6;
}

.tutorial-help-button {
  position: static;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(240, 169, 52, 0.7);
  background: rgba(15, 19, 20, 0.92);
  color: #f0a934;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
  flex: 0 0 auto;
}

.tutorial-help-button:hover,
.tutorial-help-button:focus-visible {
  transform: none;
  filter: brightness(1.08);
}

.tutorial-modal {
  position: absolute;
  inset: 0;
  z-index: 2210;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
}

.tutorial-modal.allow-arrow-overflow {
  overflow: visible;
}

.tutorial-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 10, 0.56);
  z-index: 2211;
}

.tutorial-modal-backdrop.has-cutout {
  background: transparent;
}

.tutorial-target-cutout {
  position: absolute;
  z-index: 2212;
  border: 3px solid rgba(240, 169, 52, 0.95);
  border-radius: 0;
  box-shadow: 0 0 0 9999px rgba(7, 9, 10, 0.56);
  pointer-events: none;
}

.tutorial-target-arrow {
  position: fixed;
  z-index: 2218;
  width: 0;
  height: 0;
  --tutorial-arrow-length: 180px;
  transform: translate(-50%, 0);
  transform-origin: 50% 0%;
  pointer-events: none;
}

.tutorial-target-arrow-shaft {
  position: absolute;
  left: 50%;
  top: 0;
  width: 12px;
  height: var(--tutorial-arrow-length);
  transform: translateX(-50%);
  border-radius: 999px;
  background: #f0a934;
  box-shadow: 0 0 0 2px rgba(12, 14, 15, 0.48), 0 8px 20px rgba(0, 0, 0, 0.55);
}

.tutorial-target-arrow-head {
  position: absolute;
  left: 50%;
  top: calc(var(--tutorial-arrow-length) - 2px);
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 34px solid #f0a934;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.55));
}

.tutorial-modal-dialog {
  position: relative;
  z-index: 2217;
  width: min(920px, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border-radius: 16px;
  border: 1px solid rgba(240, 169, 52, 0.58);
  background: linear-gradient(180deg, rgba(14, 18, 20, 0.98) 0%, rgba(11, 14, 15, 0.98) 100%);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.tutorial-modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.1rem 0.85rem;
  border-bottom: 1px solid rgba(240, 169, 52, 0.16);
}

.tutorial-modal-kicker {
  margin: 0 0 0.25rem;
  color: #c9d0d2;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tutorial-modal-header h2 {
  margin: 0;
  color: #f0a934;
  font-size: 1.2rem;
}

.tutorial-modal-close {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: #4b5459;
  color: #eef2f4;
  font-size: 1.25rem;
  line-height: 1;
  flex: 0 0 auto;
}

.tutorial-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 1rem 1.1rem 1.15rem;
  display: grid;
  gap: 0.75rem;
}

.tutorial-section {
  border: 0;
  background: transparent;
  padding: 0;
}

.tutorial-section h3 {
  display: none;
}

.tutorial-section p {
  margin: 0;
  color: #d8e0e2;
  line-height: 1.45;
}

.tutorial-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.78rem 1.1rem 0.95rem;
  border-top: 1px solid rgba(240, 169, 52, 0.16);
}

.tutorial-modal-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.tutorial-modal-dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(201, 208, 210, 0.38);
}

.tutorial-modal-dot.is-read {
  background: #f0a934;
}

.tutorial-modal-dot.is-active {
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.tutorial-modal-next {
  min-width: 112px;
  padding: 0.5rem 0.85rem;
}

.tutorial-modal-body::-webkit-scrollbar {
  width: 11px;
}

.tutorial-modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.tutorial-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f0a934 0%, #d68d1d 100%);
  border-radius: 999px;
  border: 2px solid rgba(11, 14, 15, 0.98);
}

.tutorial-modal-body {
  scrollbar-width: thin;
  scrollbar-color: #f0a934 rgba(255, 255, 255, 0.06);
}

.account-modal {
  position: fixed;
  left: var(--map-overlay-left, 0px);
  top: var(--map-overlay-top, 0px);
  width: var(--map-overlay-width, 100vw);
  height: var(--map-overlay-height, 100vh);
  z-index: 2240;
  display: grid;
  place-items: center;
  padding: 0.45rem;
}

.account-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 12, 0.7);
  backdrop-filter: blur(3px);
}

.account-modal-dialog {
  position: relative;
  width: min(94vw, 460px);
  max-height: calc(100% - 0.9rem);
  border-radius: 16px;
  border: 1px solid rgba(240, 169, 52, 0.46);
  background: linear-gradient(180deg, rgba(16, 20, 22, 0.98) 0%, rgba(11, 15, 16, 0.98) 100%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.account-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem 0.8rem;
  border-bottom: 1px solid rgba(240, 169, 52, 0.18);
}

.account-modal-header h2 {
  margin: 0;
  color: #f0a934;
  font-size: 1.08rem;
}

.account-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  background: #4b5459;
  color: #eef2f4;
  font-size: 1.2rem;
  line-height: 1;
}

.account-modal-body {
  padding: 0.95rem 1rem 1rem;
  display: grid;
  gap: 0.65rem;
  max-height: min(62vh, 430px);
  overflow: auto;
}

.account-modal-row {
  display: grid;
  gap: 0.2rem;
  padding: 0.6rem 0.68rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.account-modal-label {
  color: #9eb0b5;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.account-modal-value {
  color: #edf3f4;
  font-size: 0.9rem;
  word-break: break-word;
}

.account-modal-note {
  margin: 0;
  padding: 0.55rem 0.68rem;
  border-radius: 10px;
  border: 1px solid rgba(46, 128, 141, 0.42);
  background: rgba(46, 128, 141, 0.16);
  color: #cfe6ea;
  font-size: 0.84rem;
  line-height: 1.35;
}

.account-modal-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.account-modal-actions > button {
  min-width: 8.75rem;
}

.account-modal-settings-actions {
  display: grid;
  gap: 0.55rem;
  padding: 0 1rem 1rem;
}

#settingsStravaTopSection {
  padding-top: 0.45rem;
}

#stravaSubscriptionGate {
  display: grid;
  gap: 0.45rem;
}

.account-modal-settings-actions .strava-connection-status {
  margin: 0;
}

.strava-sync-status {
  margin: -0.2rem 0 0;
  font-size: 0.74rem;
  color: #9eb0b5;
  line-height: 1.35;
  min-height: 1rem;
}

.strava-sync-status[data-sync-state="ok"] {
  color: #b8d9c0;
}

.strava-sync-status[data-sync-state="syncing"] {
  color: #f0c36a;
}

.strava-sync-status[data-sync-state="error"] {
  color: #e3a2a2;
}

.map-status-toast {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 2050;
  max-width: min(82vw, 560px);
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(15, 19, 20, 0.9);
  color: #f0a934;
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  cursor: copy;
}

.zoom-level-warning-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2140;
  max-width: min(90vw, 620px);
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(240, 169, 52, 0.7);
  background: rgba(15, 19, 20, 0.92);
  color: #f6bd5a;
  font-size: 0.88rem;
  line-height: 1.3;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.trail-load-progress {
  position: absolute;
  inset: 0;
  z-index: 2105;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.trail-load-progress.is-active {
  opacity: 1;
}

.trail-load-progress-edge {
  position: absolute;
  background: rgba(16, 19, 20, 0.3);
  overflow: hidden;
}

.trail-load-progress-edge-top,
.trail-load-progress-edge-bottom {
  left: 0;
  right: 0;
  height: 8px;
}

.trail-load-progress-edge-top {
  top: 0;
}

.trail-load-progress-edge-bottom {
  bottom: 0;
}

.trail-load-progress-edge-right,
.trail-load-progress-edge-left {
  top: 0;
  bottom: 0;
  width: 8px;
}

.trail-load-progress-edge-right {
  right: 0;
}

.trail-load-progress-edge-left {
  left: 0;
}

.trail-load-progress-center {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.95rem;
  max-width: min(82vw, 560px);
  border-radius: 11px;
  background: rgba(15, 18, 20, 0.76);
  border: 1px solid rgba(214, 141, 29, 0.6);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34);
}

.trail-load-progress-spinner {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  transform-origin: center center;
  border-radius: 50%;
  border: 2.5px solid rgba(214, 141, 29, 0.35);
  border-top-color: #f0a934;
  animation: spin 0.8s linear infinite;
}

.trail-load-progress-text {
  color: #f0a934;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.trail-load-progress-copy {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
}

.trail-load-progress-subtext {
  color: #c5c5c5;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: pre-line;
}

.trail-load-progress-runner {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -55deg,
      rgba(255, 255, 255, 0.32) 0px,
      rgba(255, 255, 255, 0.32) 8px,
      rgba(255, 255, 255, 0.06) 8px,
      rgba(255, 255, 255, 0.06) 16px
    ),
    linear-gradient(90deg, #f0a934 0%, #d57b2b 100%);
  background-size: 16px 100%, 100% 100%;
  animation: loop-progress-stripes 0.75s linear infinite;
}

.trail-load-progress-edge-top .trail-load-progress-runner {
  animation: trail-flow-top 0.75s linear infinite;
}

.trail-load-progress-edge-right .trail-load-progress-runner {
  animation: trail-flow-right 0.75s linear infinite;
}

.trail-load-progress-edge-bottom .trail-load-progress-runner {
  animation: trail-flow-bottom 0.75s linear infinite;
}

.trail-load-progress-edge-left .trail-load-progress-runner {
  animation: trail-flow-left 0.75s linear infinite;
}

@keyframes trail-flow-top {
  from { background-position: 0 0, 0 0; }
  to { background-position: 16px 0, 0 0; }
}

@keyframes trail-flow-right {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 16px, 0 0; }
}

@keyframes trail-flow-bottom {
  from { background-position: 0 0, 0 0; }
  to { background-position: -16px 0, 0 0; }
}

@keyframes trail-flow-left {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 -16px, 0 0; }
}

.loop-progress-overlay {
  position: absolute;
  top: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2100;
  pointer-events: none;
  width: min(460px, calc(100% - 1.5rem));
}

.loop-progress-card {
  background: rgba(16, 19, 20, 0.92);
  border: 1px solid rgba(240, 169, 52, 0.42);
  border-radius: 10px;
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.32);
  padding: 0.55rem 0.7rem 0.65rem;
}

.loop-progress-overlay.is-route-progress .loop-progress-card {
  border-color: rgba(209, 42, 42, 0.55);
}

.loop-progress-label {
  margin: 0 0 0.35rem;
  color: #f3f4ef;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.loop-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.loop-progress-track {
  width: 100%;
  height: 9px;
  border-radius: 999px;
  background: rgba(237, 243, 244, 0.16);
  overflow: hidden;
}

.loop-progress-cancel {
  padding: 0.32rem 0.62rem;
  border-radius: 8px;
  background: #556067;
  color: #eef2f4;
  font-size: 0.76rem;
  line-height: 1;
  pointer-events: auto;
}

.loop-progress-cancel:hover {
  filter: brightness(1.08);
}

.loop-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      -55deg,
      rgba(255, 255, 255, 0.42) 0px,
      rgba(255, 255, 255, 0.42) 8px,
      rgba(255, 255, 255, 0.08) 8px,
      rgba(255, 255, 255, 0.08) 16px
    ),
    linear-gradient(90deg, #f0a934 0%, #8f969c 100%);
  background-size: 16px 100%, 100% 100%;
  animation: loop-progress-stripes 0.75s linear infinite;
  transition: width 0.2s ease;
}

.loop-progress-overlay.is-route-progress .loop-progress-fill {
  background:
    repeating-linear-gradient(
      -55deg,
      rgba(255, 255, 255, 0.65) 0px,
      rgba(255, 255, 255, 0.65) 8px,
      rgba(255, 255, 255, 0.14) 8px,
      rgba(255, 255, 255, 0.14) 16px
    ),
    linear-gradient(90deg, #d12a2a 0%, #7d0f18 100%);
}

.map-dialog-overlay {
  position: fixed;
  left: var(--map-overlay-left, 0px);
  top: var(--map-overlay-top, 0px);
  width: var(--map-overlay-width, 100vw);
  height: var(--map-overlay-height, 100vh);
  z-index: 2300;
  display: grid;
  place-items: center;
}

.map-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 10, 0.5);
}

.map-dialog {
  position: relative;
  width: min(440px, calc(100% - 1.4rem));
  border-radius: 12px;
  border: 1px solid rgba(240, 169, 52, 0.62);
  background: rgba(15, 19, 20, 0.97);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.46);
  padding: 1rem 1rem 0.9rem;
}

.map-dialog h2 {
  margin: 0;
  color: #f0a934;
  font-size: 1rem;
}

.map-dialog p {
  margin: 0.55rem 0 0;
  color: #e7ecee;
  font-size: 0.9rem;
  line-height: 1.35;
}

.map-dialog-input-wrap {
  margin-top: 0.62rem;
  display: grid;
  gap: 0.35rem;
}

.map-dialog-input-wrap label {
  color: #d2dee1;
  font-size: 0.82rem;
  font-weight: 600;
}

#mapDialogInput {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #4a575b;
  background: #0f1416;
  color: #edf3f4;
  padding: 0.48rem 0.56rem;
  font-size: 0.9rem;
}

#mapDialogInput:focus-visible {
  outline: 2px solid #f0a934;
  outline-offset: 1px;
}

.map-dialog-input-hint {
  margin: 0;
  color: #aab8bb;
  font-size: 0.78rem;
}

.map-dialog-actions {
  margin-top: 0.82rem;
  display: flex;
  gap: 0.5rem;
}

.map-dialog-actions button {
  flex: 1 1 0;
  width: 100%;
}

#mapDialogConfirmButton {
  order: 1;
}

#mapDialogCancelButton {
  order: 2;
}

.map-dialog-actions.is-single-action {
  display: flex;
  justify-content: center;
}

.map-dialog-actions.is-single-action button {
  width: min(180px, 100%);
}

.map-dialog-cancel {
  background: #4b5459;
  color: #eef2f4;
}

body.is-map-dialog-open .app-shell {
  pointer-events: none;
}

body.is-map-dialog-open #mapDialogOverlay,
body.is-map-dialog-open #mapDialogOverlay * {
  pointer-events: auto;
}

body.is-map-dialog-open .leaflet-control-container,
body.is-map-dialog-open .leaflet-top,
body.is-map-dialog-open .leaflet-bottom,
body.is-map-dialog-open .leaflet-control {
  pointer-events: none !important;
}

.install-prompt-modal {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: grid;
  place-items: center;
}

.install-prompt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 10, 0.58);
}

.install-prompt-dialog {
  position: relative;
  width: min(430px, calc(100% - 1.3rem));
  padding: 1rem 1rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(240, 169, 52, 0.62);
  background: rgba(15, 19, 20, 0.97);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.46);
}

.install-prompt-dialog h2 {
  margin: 0;
  color: #f0a934;
  font-size: 1rem;
}

.install-prompt-dialog p {
  margin: 0.55rem 0 0;
  color: #e7ecee;
  font-size: 0.9rem;
  line-height: 1.35;
}

.install-prompt-actions {
  margin-top: 0.82rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.install-prompt-actions button {
  width: 100%;
}

.install-prompt-later {
  background: #4b5459;
  color: #eef2f4;
}

@keyframes loop-progress-stripes {
  from {
    background-position: 0 0, 0 0;
  }

  to {
    background-position: 16px 0, 0 0;
  }
}

.elevation-panel {
  border-top: 2px solid #293134;
  background: #101314;
  padding: 0.5rem 0.85rem 0.7rem;
  position: relative;
  z-index: 2;
}

.elevation-panel.is-collapsed {
  padding-bottom: 0.5rem;
}

.elevation-panel.is-empty {
  opacity: 1;
}

.elevation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  cursor: pointer;
}

.elevation-body {
  margin-top: 0.35rem;
}

.elevation-panel.is-collapsed .elevation-body {
  display: none;
}

.elevation-header h2 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
   color: #f0a934;
}

.elevation-title-row {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
}

.elevation-source {
  font-size: 0.72rem;
  color: #98a5aa;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.elevation-metrics {
  display: grid;
  justify-items: start;
  gap: 0.1rem;
}

.elevation-toggle {
  border: 1px solid #8f6d16;
  background: #1b2022;
  color: #b88a1b;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.5rem;
  border-radius: 7px;
  min-width: 32px;
}

.elevation-toggle:hover {
  filter: brightness(1.08);
}

#elevationSummary {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.elevation-gainloss {
  margin: 0;
  font-size: 0.76rem;
  color: #9fb2b8;
}

#elevationCanvas {
  margin-top: 0.3rem;
  width: 100%;
  height: 140px;
  display: block;
  border-radius: 8px;
  background: #13181b;
  border: 1px solid #394245;
}

.leaflet-container {
  background: #e0e7dd;
}

/* Prevent occasional sub-pixel tile seams (white grid) on some GPU/browser combos. */
.leaflet-container img.leaflet-tile {
  max-width: none !important;
  max-height: none !important;
  outline: 1px solid transparent;
  backface-visibility: hidden;
}

.leaflet-tile-pane {
  transform: translateZ(0);
}

.leaflet-container path.leaflet-interactive:focus,
.leaflet-container path.leaflet-interactive:focus-visible {
  outline: none;
}

.leaflet-control-attribution {
  display: none !important;
}

.leaflet-control button:hover,
.leaflet-control button:focus-visible {
  transform: none;
}

.leaflet-control-satellite.leaflet-bar,
.leaflet-control-hillshade.leaflet-bar,
.leaflet-control-steepness.leaflet-bar,
.leaflet-control-star-toggle.leaflet-bar,
.leaflet-control-polygon-tools.leaflet-bar {
  border: 1px solid #2f383b;
  border-radius: 4px;
  box-shadow: none;
  background: #f7f6f2;
}

.leaflet-control-zoomlevel {
  clear: none;
  margin-left: 6px;
  margin-top: 10px;
  min-width: 50px;
  padding: 6px 8px;
  display: inline-flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  background: #f7f6f2;
  color: #000000;
  border-color: #2f383b;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.leaflet-control-zoomlevel-value {
  line-height: 1;
}

.leaflet-control-gps-button {
  width: 26px;
  height: 22px;
  border: 1px solid #2f383b;
  border-radius: 4px;
  background: #ffffff;
  color: #1f1b11;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.leaflet-control-gps-button:hover {
  background: rgba(31, 27, 17, 0.14);
  color: #1f1b11;
}

.leaflet-control-gps-button:focus-visible {
  outline: 2px solid #f0a934;
  outline-offset: 1px;
}

.gps-control-icon {
  display: block;
}

.leaflet-control-routedistance {
  margin-left: 10px;
  margin-bottom: 10px;
  min-width: 290px;
  height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f7f6f2;
  color: #000000;
  border-color: #2f383b;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.leaflet-control-routedistance-value {
  line-height: 1;
}

.leaflet-control-routedistance-trailpct {
  color: #ff0000;
}

.leaflet-control-satellite {
  margin-top: 10px;
  margin-right: 10px;
  padding: 2px;
}

.leaflet-control-satellite-button {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #1f1b11;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  cursor: pointer;
}

.satellite-control-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.leaflet-control-gps-button:focus-visible,
.leaflet-control-zoom a:hover,
.leaflet-control-zoom a:focus-visible {
  background: #dfe4e5;
  color: #1f1b11;
}

.leaflet-control-satellite-button:hover,
.leaflet-control-satellite-button:focus-visible {
  background: rgba(31, 27, 17, 0.14);
  color: #1f1b11;
}

.leaflet-control-hillshade-button:hover,
.leaflet-control-hillshade-button:focus-visible {
  background: rgba(31, 27, 17, 0.14);
  color: #1f1b11;
}

.leaflet-control-hillshade-button.is-active:hover,
.leaflet-control-hillshade-button.is-active:focus-visible {
  background: #f0a934;
}

.leaflet-control-satellite-button.is-active {
  background: #f0a934;
  color: #1f1b11;
}

.leaflet-control-hillshade,
.leaflet-control-steepness,
.leaflet-control-star-toggle {
  margin-top: 6px;
  margin-right: 10px;
  padding: 2px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.leaflet-control-polygon-tools {
  clear: none;
  margin-left: 6px;
  margin-top: 10px;
  min-width: 50px;
  padding: 6px 8px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.leaflet-control-polygon-tools-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.leaflet-control-polygon-draw-button {
  width: 24px;
  height: 22px;
  border: 1px solid #2f383b;
  background: #ffffff;
  color: #1f1b11;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.leaflet-control-polygon-draw-icon {
  width: 13px;
  height: 13px;
  display: block;
  pointer-events: none;
}

.leaflet-control-polygon-erase-button {
  width: 24px;
  height: 22px;
  border: 1px solid #2f383b;
  background: #ffffff;
  color: #1f1b11;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.leaflet-control-polygon-draw-button:not(.is-active):hover,
.leaflet-control-polygon-draw-button:not(.is-active):focus-visible,
.leaflet-control-polygon-erase-button:not(:disabled):hover,
.leaflet-control-polygon-erase-button:not(:disabled):focus-visible {
  background: #dfe4e5;
  color: #1f1b11;
}

.leaflet-control-polygon-draw-button.is-active {
  background: #f0a934;
  color: #1f1b11;
}

.leaflet-control-polygon-erase-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.leaflet-control-polygon-length {
  font-size: 0.8rem;
  line-height: 1.2;
  color: red;
  font-weight: 500;
  width: 100%;
  text-align: center;
}

.leaflet-container.is-polygon-draw-mode {
  cursor: crosshair;
}

.polygon-draw-handle-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff6dd;
  background: #ff2a2a;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
  cursor: grab !important;
}

.leaflet-container.is-polygon-draw-mode .polygon-draw-handle-icon:hover {
  cursor: grab !important;
}

.leaflet-container.is-polygon-draw-mode.is-polygon-dragging-handle,
.leaflet-container.is-polygon-draw-mode.is-polygon-dragging-handle .polygon-draw-handle-icon {
  cursor: grabbing !important;
}

.leaflet-control-hillshade-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.leaflet-control-hillshade-button {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #1f1b11;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  cursor: pointer;
}

.leaflet-control-hillshade-button.is-active {
  background: #f0a934;
}

.leaflet-control-steepness .leaflet-control-hillshade-button.is-active {
  background: #f0a934;
}

.leaflet-control-star-toggle .leaflet-control-hillshade-button {
  font-size: 14px;
}

.trail-rating-toggle-icon {
  display: inline-block;
  line-height: 1;
  color: #000000;
  text-shadow: none;
}

.hillshade-control-icon {
  width: 17px;
  height: 17px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.leaflet-control-hillshade-opacity {
  padding: 0 6px;
  width: 120px;
  height: 30px;
  border: none;
  border-radius: 4px;
  background: rgba(247, 246, 242, 0.85);
  display: none;
  align-items: center;
}

.leaflet-control-hillshade.is-open .leaflet-control-hillshade-opacity,
.leaflet-control-steepness.is-open .leaflet-control-hillshade-opacity {
  display: inline-flex;
}

.hillshade-opacity-slider {
  width: 100%;
  margin: 0;
  accent-color: #f0a934;
}

.leaflet-control-trail-thickness {
  margin-right: 10px;
  margin-bottom: 10px;
  min-width: 142px;
  padding: 6px 8px;
  border: 1px solid rgba(31, 27, 17, 0.2);
  border-radius: 8px;
  background: rgba(247, 246, 242, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.leaflet-control-trail-thickness-label {
  color: #1f1b11;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.leaflet-control-trail-thickness-slider {
  width: 110px;
  margin: 0;
  accent-color: #f0a934;
}

.hillshade-mode-select {
  margin-left: 6px;
  max-width: 82px;
  height: 24px;
  border: 1px solid #2f383b;
  border-radius: 4px;
  background: #f7f6f2;
  color: #1f1b11;
  font-size: 0.72rem;
}

.leaflet-container.routing-click-mode,
.leaflet-container.routing-click-mode .leaflet-interactive {
  cursor: crosshair !important;
}

.leaflet-container.routing-click-mode.leaflet-grab,
.leaflet-container.routing-click-mode .leaflet-marker-icon.route-waypoint-marker {
  cursor: crosshair !important;
}

.leaflet-container.routing-click-mode .leaflet-marker-icon.route-waypoint-marker:hover {
  cursor: pointer !important;
}

.leaflet-container.routing-click-mode.routing-forbidden-hover,
.leaflet-container.routing-click-mode.routing-forbidden-hover .leaflet-interactive,
.leaflet-container.routing-click-mode.routing-forbidden-hover.leaflet-grab,
.leaflet-container.routing-click-mode.routing-forbidden-hover .leaflet-marker-icon.route-waypoint-marker,
.leaflet-container.routing-click-mode.routing-forbidden-hover .leaflet-marker-icon.route-waypoint-marker:hover {
  cursor: default !important;
}

.route-waypoint-label {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #5f6670;
  border-radius: 7px;
  color: #1f2430;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
  text-transform: lowercase;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.route-waypoint-label:before {
  display: none;
}

.random-loop-center-label {
  background: #d62828;
  border-color: #ffb0b0;
  color: #ffffff;
  box-shadow: 0 1px 8px rgba(138, 10, 10, 0.45);
}

.trail-hover-tooltip {
  background: rgba(20, 24, 27, 0.96);
  border: 1px solid #45515a;
  border-radius: 8px;
  color: #edf3f4;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  padding: 6px 8px;
  line-height: 1.35;
}

.trail-tooltip-name {
  color: #f0a934;
  font-weight: 700;
}

.trail-tooltip-name-private {
  color: #9a5cff;
}

.trail-rating-marker {
  background: transparent;
  border: none;
}

.trail-rating-marker-badge {
  position: relative;
  width: calc(34px * var(--trail-rating-scale, 1));
  height: calc(34px * var(--trail-rating-scale, 1));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.trail-rating-marker-star {
  color: #fcb137;
  font-size: calc(40px * var(--trail-rating-scale, 1));
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}

.trail-rating-marker-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-45%, -42%);
  color: #1f1b11;
  font-size: calc(12px * var(--trail-rating-scale, 1));
  font-weight: 800;
  line-height: 1;
}

.trail-tooltip-trage {
  color: #2d8f47;
  font-weight: 600;
}

.trail-tooltip-forbidden {
  color: #ff7f7f;
  font-weight: 700;
}

.trail-tooltip-data {
  max-height: 180px;
  overflow: auto;
  margin-top: 0.2rem;
  padding: 0.25rem 0.35rem;
  border: 1px solid #3a444c;
  border-radius: 6px;
  background: rgba(12, 15, 17, 0.7);
  font-size: 0.72rem;
  line-height: 1.25;
}

.trail-tooltip-key {
  color: #f0a934;
  font-weight: 700;
}

.trail-hover-tooltip:before {
  display: none;
}

.tw-access-segment-label {
  background: rgba(12, 16, 19, 0.9);
  border: 1px solid rgba(197, 224, 178, 0.85);
  border-radius: 999px;
  color: #d9f4c5;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  padding: 0.2rem 0.38rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  text-transform: uppercase;
  pointer-events: none;
}

.tw-access-segment-label:before {
  display: none;
}

.private-segment-popup .leaflet-popup-content-wrapper {
  background: rgba(20, 24, 27, 0.96);
  border: 1px solid #45515a;
  border-radius: 10px;
  color: #edf3f4;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.private-segment-popup .leaflet-popup-content {
  margin: 10px 12px;
}

.private-segment-popup .leaflet-popup-tip {
  background: rgba(20, 24, 27, 0.96);
  border: 1px solid #45515a;
}

.private-segment-popup-content {
  min-width: 170px;
}

.private-segment-popup-title {
  color: #fcb137;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.private-popup-stars {
  display: flex;
  gap: 0.2rem;
  margin: 0.1rem 0 0.5rem;
  justify-content: center;
  align-items: center;
}

.private-popup-rating-clear-button {
  appearance: none;
  border: 1px solid #5a6670;
  background: rgba(24, 29, 33, 0.88);
  color: #cfd7db;
  border-radius: 6px;
  width: 1.45rem;
  height: 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  margin-right: 0.15rem;
  transform: translateY(1px);
}

.private-popup-rating-clear-button:hover {
  border-color: #f0a934;
  color: #f0a934;
}

.private-popup-rating-clear-icon {
  width: 0.9rem;
  height: 0.9rem;
  display: block;
  opacity: 0.92;
  pointer-events: none;
  /* Keep the trash glyph dark yellow even if the SVG is cached/served as monochrome. */
  filter: brightness(0) saturate(100%) invert(57%) sepia(71%) saturate(636%) hue-rotate(10deg) brightness(88%) contrast(92%);
}

.private-popup-rating-clear-button:hover .private-popup-rating-clear-icon {
  filter: brightness(0) saturate(100%) invert(69%) sepia(70%) saturate(705%) hue-rotate(355deg) brightness(96%) contrast(93%);
}

.private-popup-star-button {
  appearance: none;
  border: none;
  background: transparent;
  color: transparent;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: color 0.12s ease;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.1px #fcb137;
  text-shadow: none;
}

.private-popup-star-button.is-preview {
  color: #fcb137;
  -webkit-text-fill-color: #fcb137;
}

.private-popup-star-button.is-selected {
  color: #fcb137;
  -webkit-text-fill-color: #fcb137;
}

.private-segment-popup-text {
  font-size: 0.82rem;
  color: #fcb137;
  margin-bottom: 0.45rem;
}

.trail-tooltip-private-status {
  color: #8a2be2;
  font-weight: 700;
}

.private-segment-popup-ignore-button {
  width: 100%;
  border: 1px solid #fcb137;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  background: #fcb137;
  color: #1f1b11;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.private-segment-popup-ignore-button:hover {
  filter: brightness(1.06);
}

.route-waypoint-popup .leaflet-popup-content-wrapper {
  background: rgba(20, 24, 27, 0.96);
  border: 1px solid #45515a;
  border-radius: 10px;
  color: #edf3f4;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.route-waypoint-popup .leaflet-popup-content {
  margin: 10px 12px;
}

.route-waypoint-popup .leaflet-popup-tip {
  background: rgba(20, 24, 27, 0.96);
  border: 1px solid #45515a;
}

.route-waypoint-popup-content {
  min-width: 170px;
}

.route-waypoint-popup-title {
  color: #fcb137;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.route-waypoint-start-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid #3d6f45;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  background: #3d6f45;
  color: #eef6ef;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  margin-bottom: 0.4rem;
}

.route-waypoint-start-button:hover:not(:disabled) {
  filter: brightness(1.06);
}

.route-waypoint-start-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.route-waypoint-start-icon {
  display: inline-flex;
  line-height: 1;
}

.route-waypoint-delete-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid #96473C;
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
  background: #96473C;
  color: #eff4f5;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.route-waypoint-delete-button:hover {
  filter: brightness(1.06);
}

.route-waypoint-delete-icon {
  display: inline-flex;
  line-height: 1;
}

@media (min-width: 1025px) {
  .map-main.is-elevation-hidden {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .panel {
    position: relative;
    padding-bottom: 3.2rem;
  }

  .panel-logo {
    margin-left: -0.28rem;
  }

  .route-options-panel,
  .route-options-body,
  .panel-content-grid {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  .controls {
    margin-top: 0.65rem;
  }

  .legend,
  .options-panel {
    position: static;
    margin-top: 0.68rem;
    padding: 0;
    border: 1px solid #2f383b;
    border-radius: 10px;
    background: #0f1314;
    box-shadow: none;
    backdrop-filter: none;
    overflow: hidden;
  }

  .legend-header,
  .options-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.4rem 0.62rem;
    background: #13181a;
    border-bottom: 1px solid #2b3437;
    cursor: pointer;
  }

  .legend.is-collapsed .legend-header,
  .options-panel.is-collapsed .options-header {
    border-bottom: 0;
  }

  .legend.is-collapsed,
  .options-panel.is-collapsed {
    padding-bottom: 0;
  }

  #legend-title,
  #options-title {
    margin: 0;
    font-size: 0.84rem;
    color: #f0a934;
    letter-spacing: 0.02em;
    text-transform: none;
  }

  .legend-body,
  .options-body {
    margin-top: 0;
    padding: 0.55rem 0.62rem 0.62rem;
  }

  .options-body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }

  .options-body .autoload-controls {
    order: 1;
  }

  .options-body .panel-footer {
    order: 2;
  }

  .options-body .heatmap-row {
    order: 3;
    margin-top: 0;
  }

  .legend-panel-toggle,
  .options-panel-toggle {
    border: 0;
    background: transparent;
    color: #b88a1b;
    min-width: 0;
    padding: 0;
    font-size: 0.84rem;
  }

  .panel-content-col-secondary {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  .autoload-controls {
    order: 1;
  }

  .panel-footer {
    order: 2;
    margin-top: 0;
  }

  #status {
    order: initial;
    margin: 0;
    position: absolute;
    left: 1.1rem;
    right: 1.1rem;
    bottom: 0.95rem;
    z-index: 2;
    background: #101314;
    padding-top: 0;
  }

  .panel.is-status-flow {
    padding-bottom: 1.1rem;
  }

  .panel.is-status-flow #status {
    order: 3;
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    background: transparent;
    margin-top: 0.75rem;
  }
}

.leaflet-container.routing-click-mode.routing-drag-active,
.leaflet-container.routing-click-mode.routing-drag-active .leaflet-interactive,
.leaflet-container.routing-click-mode.routing-drag-active .leaflet-marker-icon,
.leaflet-container.routing-click-mode.routing-drag-active .leaflet-pane {
  cursor: grabbing !important;
}

.leaflet-container.routing-click-mode.routing-drag-active .leaflet-interactive,
.leaflet-container.routing-click-mode.routing-drag-active .leaflet-marker-icon,
.leaflet-container.routing-click-mode.routing-drag-active .leaflet-tooltip-pane,
.leaflet-container.routing-click-mode.routing-drag-active .leaflet-popup-pane {
  pointer-events: none !important;
}

@media (max-width: 1024px) {
  html,
  body:not(.content-page-body) {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .elevation-source {
    display: none;
  }

  .elevation-panel,
  .legend,
  .options-panel {
    position: static;
    margin: 0.68rem 1.1rem 0;
    padding: 0;
    border: 1px solid #2f383b;
    border-radius: 10px;
    background: #0f1314;
    box-shadow: none;
    backdrop-filter: none;
    overflow: hidden;
  }

  .elevation-panel + .legend {
    margin-top: 0.3rem;
  }

  .elevation-header,
  .legend-header,
  .options-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.4rem 0.62rem;
    background: #13181a;
    border-bottom: 1px solid #2b3437;
    cursor: pointer;
    -webkit-tap-highlight-color: #f0a934;
  }

  .route-options-summary {
    -webkit-tap-highlight-color: #f0a934;
  }

  .route-options-summary:focus-visible,
  .elevation-toggle:focus-visible {
    outline: 2px solid #f0a934;
    outline-offset: 2px;
  }

  .elevation-panel.is-collapsed .elevation-header,
  .legend.is-collapsed .legend-header,
  .options-panel.is-collapsed .options-header {
    border-bottom: 0;
  }

  .elevation-panel.is-collapsed,
  .legend.is-collapsed,
  .options-panel.is-collapsed {
    padding-bottom: 0;
  }

  .elevation-panel.is-collapsed {
    max-height: none;
    overflow: visible;
  }

  .elevation-header h2,
  #legend-title,
  #options-title {
    margin: 0;
    font-size: 0.84rem;
    color: #f0a934;
    letter-spacing: 0.02em;
    text-transform: none;
  }

    .legend + .options-panel {
      margin-top: 0.46rem;
    }

  .elevation-body,
  .legend-body,
  .options-body {
    margin-top: 0;
    padding: 0.55rem 0.62rem 0.62rem;
  }

  .elevation-toggle {
    border: 0;
    background: transparent;
    color: #b88a1b;
    min-width: 0;
    padding: 0;
    font-size: 0.84rem;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
    padding-top: 44px;
  }

  .map-main {
    grid-row: 2;
  }

  .panel {
    grid-row: 1;
  }

  .options-panel {
    display: block;
    margin-bottom: 0.5rem;
  }

  .options-body .toggle-row {
    color: #f1f4f5;
  }

  .options-body {
    gap: 0.55rem;
  }

  .legend ul {
    margin-top: 0.5rem;
    display: grid;
    gap: 0.5rem;
  }

  .legend-toggle-row {
    gap: 0.42rem;
  }

  .legend-toggle-row span {
    font-size: 0.8rem;
  }

  .panel {
    max-height: none;
    min-height: 120px;
    padding-top: 0.85rem;
    padding-bottom: 0.65rem;
    border-right: 0;
    border-bottom: 2px solid #293134;
    overflow: auto;
  }

  .map-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    background: #0f1314;
  }

  .top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 12;
  }

  .map-stage {
    flex: 1 1 auto;
    min-height: 0;
  }

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

  .panel-logo {
    width: 84px;
    height: 84px;
    margin-left: -0.28rem;
  }

  .panel-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.55rem;
  }

  .header-quick-controls {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
  }

  .header-quick-controls .search-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.35rem;
  }

  .header-quick-controls .search-row .tutorial-help-button {
    justify-self: end;
    align-self: center;
    width: 1.45rem;
    height: 1.45rem;
    padding: 0;
    font-size: 0.78rem;
    line-height: 1;
  }

  .header-quick-controls .search-row input,
  .header-quick-controls #randomLoopDistanceInput {
    padding: 0.5rem 0.55rem;
    font-size: 0.84rem;
  }

  .header-quick-controls .search-row button,
  .header-quick-controls #randomLoopButton {
    padding: 0.5rem 0.55rem;
    font-size: 0.84rem;
    width: auto;
    min-width: 0;
    white-space: nowrap;
  }

  .header-quick-controls .random-loop-row {
    grid-template-columns: 48px max-content minmax(0, 1fr);
    gap: 0.35rem;
  }

  .panel-header h1,
  .panel-header .subtitle {
    display: none;
  }

  .route-options-panel {
    margin-top: 0.5rem;
    border: 1px solid #2f383b;
    border-radius: 10px;
    background: #0f1314;
    overflow: hidden;
  }

  .route-options-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    width: 100%;
    padding: 0.52rem 0.72rem;
    cursor: pointer;
    color: #f0a934;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: #13181a;
    border-bottom: 1px solid #2b3437;
  }

  .route-options-summary::after {
    content: "▴";
    color: #b88a1b;
    font-size: 0.85rem;
    line-height: 1.15;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
  }

  .route-options-panel:not([open]) > .route-options-summary {
    border-bottom: 0;
  }

  .route-options-panel:not([open]) > .route-options-summary::after {
    content: "▾";
  }

  .route-options-body {
    padding: 0.55rem 0.62rem 0.62rem;
  }

  .panel-content-col-primary .controls > #addressSearchForm {
    display: none !important;
  }

  .panel-content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "primary secondary"
      "export export";
    gap: 0.55rem;
    align-items: stretch;
  }

  .panel-content-col-primary,
  .panel-content-col-secondary {
    min-width: 0;
  }

  .panel-content-col-primary {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 0;
  }

  .panel-content-col-primary .controls {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 0;
  }

  .panel-content-col-primary #loopBackButton,
  .panel-content-col-primary #alternativeRouteButton {
    flex: 1 1 50%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    white-space: normal;
  }

  .panel-content-col-primary button,
  .panel-content-col-secondary button,
  .panel-content-col-primary input,
  .panel-content-col-secondary input {
    max-width: 100%;
    min-width: 0;
  }

  .panel-content-col-primary button,
  .panel-content-col-secondary button {
    width: 100%;
    white-space: normal;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .panel-content-col-primary .search-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .panel-content-col-primary .random-loop-row {
    grid-template-columns: 58px max-content minmax(0, 1fr);
  }

  .panel-content-col-primary #randomLoopButton {
    white-space: normal;
  }

  .controls,
  .autoload-controls,
  .heatmap-row,
  .panel-footer {
    margin-top: 0;
  }

  .panel-content-grid > .heatmap-row {
    margin-top: 0.6rem;
  }

  .mobile-export-row {
    display: grid;
    grid-area: export;
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .mobile-export-row > button {
    width: 100%;
  }

  .panel-content-col-secondary {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-height: 0;
  }

  .mobile-checkbox-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
    height: 100%;
    flex: 1 1 auto;
  }

  .mobile-checkbox-column .toggle-row {
    align-items: flex-start;
    line-height: 1.2;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .mobile-checkbox-column .route-action-row {
    margin-top: 0.1rem;
    display: flex;
    gap: 0.45rem;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
  }

  .mobile-checkbox-column .route-action-row > button {
    flex: 1 1 0;
    min-height: 0;
  }

  .mobile-checkbox-column .gpx-action-row {
    margin-top: 0.1rem;
    display: flex;
    gap: 0.45rem;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
  }

  .mobile-checkbox-column .gpx-action-row > button {
    flex: 1 1 0;
    min-height: 0;
  }

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

  #status {
    display: none;
  }

  #elevationCanvas {
    height: 120px;
  }

  .leaflet-control-trail-thickness,
  .leaflet-control-hillshade,
  .leaflet-control-steepness,
  .leaflet-control-star-toggle {
    display: none !important;
  }
}

@media (max-width: 820px) {
  .panel-content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "primary secondary"
      "export export";
    gap: 0.55rem;
  }

  .panel-content-col-primary button,
  .panel-content-col-primary input,
  .panel-content-col-primary .toggle-row {
    font-size: 0.88rem;
  }

  .panel-content-col-primary button,
  .panel-content-col-primary input[type="text"],
  .panel-content-col-primary input[type="number"] {
    padding: 0.52rem 0.62rem;
  }

  .panel-content-col-primary .random-loop-row {
    grid-template-columns: 54px max-content minmax(0, 1fr);
  }

  .panel-content-col-secondary button,
  .panel-content-col-secondary .status,
  .panel-content-col-secondary .legend-toggle-row span {
    font-size: 0.84rem;
  }

  .panel-content-col-secondary button {
    padding: 0.5rem 0.62rem;
  }

  .panel-content-col-secondary .legend-toggle-row {
    align-items: flex-start;
  }

  .panel-content-col-secondary .legend-toggle-row span {
    min-width: 0;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 700px) {
  .panel-content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "primary secondary"
      "export export";
    gap: 0.45rem;
  }

  .panel-content-col-primary button,
  .panel-content-col-primary input,
  .panel-content-col-primary .toggle-row {
    font-size: 0.82rem;
  }

  .panel-content-col-secondary button,
  .panel-content-col-secondary .status,
  .panel-content-col-secondary .legend-toggle-row span {
    font-size: 0.78rem;
  }

  .panel-content-col-secondary button {
    padding: 0.46rem 0.55rem;
  }
}

body.content-page-body {
  min-height: 100vh;
  background: #1a2427;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow-x: hidden;
  overflow-y: hidden;
}

body.content-page-body .top-nav {
  position: sticky;
  top: 0;
  z-index: 120;
}

.content-page-wrap {
  width: 100%;
  margin: 0;
  padding: 1.4rem 0 2rem;
  height: 100%;
  overflow-y: auto;
  display: grid;
  align-content: start;
  align-items: start;
  gap: 1rem;
  scrollbar-width: thin;
  scrollbar-color: #f0a934 #121718;
}

.content-page-wrap > * {
  width: min(980px, 100% - 2rem);
  margin-inline: auto;
}

.content-page-wrap::-webkit-scrollbar {
  width: 11px;
}

.content-page-wrap::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #101415 0%, #1b2224 100%);
  border-left: 1px solid #2f383b;
}

.content-page-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f0a934 0%, #d68d1d 100%);
  border-radius: 999px;
  border: 2px solid #121718;
}

.content-page-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #f7b84d 0%, #e19829 100%);
}

.content-page-hero {
  border: 1px solid #2f383b;
  border-radius: 14px;
  background: linear-gradient(150deg, #151b1d 0%, #1d282c 100%);
  color: #edf3f4;
  padding: 1rem 1.1rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

body.content-page-routes .content-page-hero {
  background: linear-gradient(130deg, #3a1616 0%, #5a2222 58%, #7a2f2f 100%);
}

body.content-page-trails .content-page-hero {
  background: linear-gradient(130deg, #1f2d1e 0%, #2a3e2a 55%, #355137 100%);
}

body.content-page-clubs .content-page-hero {
  background: linear-gradient(130deg, #8f3513 0%, #b84f17 56%, #d66b22 100%);
}

body.content-page-settings .content-page-hero {
  background: linear-gradient(130deg, #8a3f78 0%, #b25a98 55%, #d57cbc 100%);
  color: #f7eef5;
}

body.content-page-settings .content-page-hero h1,
body.content-page-settings .content-page-hero p {
  color: #f7eef5;
}

body.content-page-profile .content-page-hero {
  background: linear-gradient(130deg, #15233a 0%, #234164 56%, #355d85 100%);
  color: #f4f8ff;
}

body.content-page-profile .content-page-hero h1,
body.content-page-profile .content-page-hero p {
  color: #f4f8ff;
}

body.content-page-achievements .content-page-hero {
  background: linear-gradient(130deg, #2a1f26 0%, #3a2b3b 60%, #4d3850 100%);
}

.content-page-hero h1 {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
  color: #f0a934;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.content-page-hero p {
  margin: 0;
  color: #c5d0d2;
}

.content-page-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
  gap: 0.8rem;
}

.content-page-card {
  border: 1px solid #2f383b;
  border-radius: 12px;
  background: #101314;
  padding: 0.85rem 0.9rem;
  color: #edf3f4;
}

.content-page-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: #f0a934;
}

.content-page-card p {
  margin: 0;
  color: #c0cbcd;
}

.content-page-card-wide {
  grid-column: 1 / -1;
}

.account-page-details {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.account-page-detail-row {
  display: grid;
  gap: 0.22rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid #253033;
  border-radius: 10px;
  background: #0b1011;
}

.account-page-detail-label {
  color: #93a5a8;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.account-page-detail-value {
  color: #edf3f4;
  font-weight: 600;
  word-break: break-word;
}

.account-page-note {
  margin: 0.75rem 0 0;
  color: #c0cbcd;
}

.account-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.account-page-subsection {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.account-page-subsection h3 {
  margin: 0;
  font-size: 1rem;
}

.account-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.56rem 0.9rem;
  border: 1px solid #355158;
  border-radius: 10px;
  background: linear-gradient(180deg, #1a2326 0%, #111719 100%);
  color: #edf3f4;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.account-page-button:hover,
.account-page-button:focus-visible {
  border-color: #f0a934;
  color: #fff6e2;
}

.account-page-button.is-secondary {
  background: transparent;
}

.account-page-button.is-success {
  background: #3d6f45;
  border-color: #3d6f45;
  color: #eef6ef;
}

.account-page-button.is-danger {
  background: #96473C;
  border-color: #96473C;
  color: #eff4f5;
}

.account-page-button.is-success:hover,
.account-page-button.is-success:focus-visible {
  border-color: #3d6f45;
  color: #eef6ef;
}

#settingsConnectStravaButton.is-success {
  background: #fc5200;
  border-color: #fc5200;
  color: #fff;
}

#settingsConnectStravaButton.is-success:hover,
#settingsConnectStravaButton.is-success:focus-visible {
  border-color: #fc5200;
  color: #fff;
}

.account-page-button.is-danger:hover,
.account-page-button.is-danger:focus-visible {
  border-color: #96473C;
  color: #eff4f5;
}

.account-page-state {
  margin: 0;
  color: #c0cbcd;
}

.routes-tabs-card {
  display: grid;
  gap: 0.58rem;
  border-top: 0;
}

.routes-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: -0.85rem -0.9rem 0;
  padding: 0;
  border-bottom: 1px solid #2f383b;
}

.routes-tab-button {
  border: 0;
  border-top: 1px solid #2f383b;
  border-radius: 10px 10px 0 0;
  background: transparent;
  color: #b4c0c3;
  padding: 0.48rem 0.58rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  top: 0;
}

.routes-tab-button + .routes-tab-button {
  box-shadow: inset 1px 0 0 #2f383b;
}


.routes-tab-button:hover,
.routes-tab-button:focus-visible {
  background: #1a2022;
  color: #e5edef;
  outline: none;
}

.routes-tab-button[aria-selected="true"] {
  border-top-color: #2f383b;
  border-radius: 10px 10px 0 0;
  background: #101314;
  color: var(--accent);
  margin-bottom: -1px;
  margin-top: -1px;
  z-index: 2;
}

.routes-tab-panel {
  padding-top: 0.12rem;
}

.routes-tab-panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: #f0a934;
}

.routes-tab-panel > p {
  margin: 0;
  color: #c0cbcd;
}

.saved-routes-state {
  margin-top: 0.4rem;
}

.saved-routes-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

@media (max-width: 760px) {
  .routes-tabs {
    grid-template-columns: 1fr;
    margin: -0.85rem -0.9rem 0;
    padding: 0.42rem 0.62rem 0.22rem;
    border-bottom: 0;
  }

  .routes-tab-button {
    border-radius: 9px;
    border-bottom: 1px solid #3a4244;
    top: 0;
  }

  .routes-tab-button[aria-selected="true"] {
    border-color: #8f6d16;
    background: #241d0e;
  }
}

.saved-routes-item {
  border: 1px solid #2a3133;
  border-radius: 10px;
  background: #14191a;
  padding: 0.6rem 0.7rem;
}

.saved-routes-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}

.saved-routes-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.saved-routes-item-title {
  margin: 0;
  color: #edf3f4;
  font-size: 0.98rem;
}

.saved-routes-item-distance {
  display: inline-block;
  color: #9ed9a8;
  font-size: 0.84rem;
  font-weight: 600;
}

.saved-routes-item-actions {
  position: relative;
  flex: 0 0 auto;
}

.saved-routes-item-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  flex: 0 0 auto;
}

.saved-routes-favorite-button {
  border: 1px solid #3a4244;
  border-radius: 8px;
  background: #1d2426;
  color: #8a9598;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
}

.saved-routes-favorite-button[aria-pressed="true"] {
  color: #f0a934;
  border-color: #8f6d16;
  background: #241d0e;
}

.saved-routes-favorite-button:hover,
.saved-routes-favorite-button:focus-visible {
  background: #273133;
  border-color: #566568;
  color: #f0a934;
  outline: none;
}

.saved-routes-actions-button {
  border: 1px solid #3a4244;
  border-radius: 8px;
  background: #1d2426;
  color: #d4dcde;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.saved-routes-actions-button:hover,
.saved-routes-actions-button:focus-visible {
  background: #273133;
  border-color: #4e5b5e;
  outline: none;
}

.saved-routes-actions-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 136px;
  padding: 0.25rem;
  border: 1px solid #3a4244;
  border-radius: 10px;
  background: #111719;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 0.2rem;
  z-index: 20;
}

.saved-routes-actions-menu-item {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d7e0e2;
  text-align: left;
  padding: 0.45rem 0.52rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.saved-routes-actions-menu-item:hover,
.saved-routes-actions-menu-item:focus-visible {
  background: #263134;
  outline: none;
}

.saved-routes-actions-menu-item-delete {
  color: #ffd3d3;
}

.saved-routes-actions-menu-item-delete:hover,
.saved-routes-actions-menu-item-delete:focus-visible {
  background: #4b2525;
}

.saved-routes-item-meta {
  margin: 0.25rem 0 0;
  color: #9fb0b3;
  font-size: 0.82rem;
}

.saved-routes-load-button {
  margin-top: 0.45rem;
  border: 1px solid #28574c;
  border-radius: 8px;
  background: #1f4d43;
  color: #dbf0ea;
  padding: 0.36rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.saved-routes-load-button:hover,
.saved-routes-load-button:focus-visible {
  background: #296356;
  border-color: #327364;
  outline: none;
}

.rated-trails-controls {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rated-trails-control {
  display: grid;
  gap: 0.22rem;
}

.rated-trails-control > span {
  color: #b7c4c7;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rated-trails-control select {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #3a4346;
  background: #13191b;
  color: #e2ebed;
  padding: 0.4rem 0.5rem;
}

.rated-trails-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.rated-trails-item {
  border: 1px solid #2a3133;
  border-radius: 10px;
  background: #14191a;
  padding: 0.58rem 0.68rem;
}

.rated-trails-item-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
}

.rated-trails-item-title {
  margin: 0;
  color: #edf3f4;
  font-size: 0.95rem;
}

.rated-trails-item-type {
  color: #9ed9a8;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rated-trails-item-meta {
  margin: 0.25rem 0 0;
  color: #a8b8bc;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
}

.rated-trails-item-rating {
  color: #f0c75f;
  font-weight: 700;
}

.rated-trails-item-key {
  margin: 0.25rem 0 0;
  color: #80959a;
  font-size: 0.74rem;
  font-family: "Consolas", "Courier New", monospace;
}

@media (max-width: 1024px) {
  .content-page-wrap {
    width: min(980px, 100% - 1.2rem);
    margin-top: 0.85rem;
  }

  .rated-trails-controls {
    grid-template-columns: 1fr;
  }

  .rated-trails-item-meta {
    flex-direction: column;
    gap: 0.12rem;
  }
}

@media (max-width: 720px) {
  .content-page-wrap {
    margin-top: 0.72rem;
    gap: 0.75rem;
  }

  .content-page-hero h1 {
    font-size: 1.18rem;
  }
}

@media (max-height: 760px) {
  .account-modal {
    padding: 0.3rem;
  }

  .account-modal-dialog {
    max-height: calc(100% - 0.6rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #f0a934 rgba(255, 255, 255, 0.06);
  }

  .account-modal-body {
    max-height: none;
    overflow: visible;
  }

  .account-modal-dialog::-webkit-scrollbar {
    width: 10px;
  }

  .account-modal-dialog::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
  }

  .account-modal-dialog::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f0a934 0%, #d68d1d 100%);
    border-radius: 999px;
    border: 2px solid rgba(11, 14, 15, 0.98);
  }
}

