/* Parks Path — trail / park-poster map (Parks & States view) */
:root {
  --pine-visited: #1F6B2E;
  --sky-deep: #0E4A5C;
  --header-sky: #0E4A5C;
  --trail-orange: #E8691E;
  --sun-ink: #B8601F;
  --cream-state: #F1E7D6;
  --planned: #F9C9A0;
  --track: #E2D6C1;
  --mountain-far: #2A5A28;
  --mountain-mid: #1A4A22;
  --mountain-near: #0F2C16;
}

.app {
  background: linear-gradient(
    180deg,
    #0E4A5C 0%,
    #0E4A5C 10%,
    #7ED0EA 24%,
    #D5E8C8 42%,
    #E8D9A8 64%,
    #7A9A4A 84%,
    #163D22 100%
  );
}
.app:has(#tv-guest-banner) {
  background: linear-gradient(
    180deg,
    #0E4A5C 0%,
    #0E4A5C 10%,
    #7ED0EA 24%,
    #D5E8C8 42%,
    #E8D9A8 64%,
    #7A9A4A 84%,
    #163D22 100%
  );
}

#tv-guest-banner {
  background: #0E4A5C;
  color: #F1E7D6;
  border-bottom: 0;
  height: 26px;
  padding: 0 22px 0 128px;
  font-size: 12.5px;
  font-weight: 500;
  z-index: 30;
  position: relative;
}
#tv-guest-banner button {
  white-space: nowrap;
  border-radius: 14px;
  font-size: 12px;
  padding: 2px 12px;
  font-weight: 600;
}
#tv-guest-banner button:not(#tv-guest-banner-signup) {
  background: transparent;
  border: 1.5px solid rgba(244,236,221,0.65);
  color: #F1E7D6;
}
#tv-guest-banner #tv-guest-banner-signup {
  background: #E8691E;
  border-color: #E8691E;
  color: #fff;
}

header.top {
  position: relative;
  z-index: 35;
  background: transparent !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  overflow: visible;
  height: 88px;
  padding: 0 20px 0 124px !important;
  gap: 16px;
  flex-wrap: nowrap !important;
  align-items: center;
}
header.top::after { display: none !important; }

.brand { position: static !important; width: 0 !important; min-width: 0 !important; height: 0 !important; overflow: visible !important; flex: 0 0 0 !important; align-self: auto !important; }
.brand h1.wordmark { position: static !important; }
.brand h1.wordmark .brand-logo {
  position: absolute !important;
  left: 10px;
  top: 16px;
  height: 32px !important;
  width: auto !important;
  max-width: 280px !important;
  margin: 0 !important;
  transform: none;
  filter: none !important;
  z-index: 40;
  pointer-events: none;
}

.tagline-strip {
  flex: 0 0 auto;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
  padding: 5px 12px 6px;
  transform: rotate(-2.5deg);
  border-radius: 1px;
  box-shadow: 1px 2px 0 rgba(0,0,0,0.2);
  white-space: nowrap;
}

.mode-switch {
  display: flex;
  flex: 0 0 auto;
  background: rgba(244,236,221,0.94);
  border: 0 !important;
  border-radius: 22px;
  padding: 3px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.15);
  gap: 0;
}
.mode-switch button {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  background: transparent;
  border: 0;
  border-radius: 18px;
  padding: 7px 16px;
  font-size: 14px;
}
.mode-switch button.on {
  background: var(--trail-orange, #E8691E);
  color: #fff;
}

.stats-parks {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 4px;
  flex: 0 0 auto;
  min-width: 0;
}
.collection-strip {
  appearance: none;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0;
  box-shadow: none !important;
  cursor: pointer;
  display: block !important;
  width: 76px !important;
  height: 76px !important;
  position: relative;
  flex: 0 0 76px !important;
  min-width: 0;
  border-radius: 0 !important;
}
.collection-strip:hover { background: transparent; border: 0; }
.collection-strip#states-strip { transform: rotate(-7deg); }
.collection-strip#parks-strip { transform: rotate(5deg); }
.collection-strip .ring-svg { width: 76px; height: 76px; display: block; }
.collection-strip .collection-count {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  min-width: 0;
  padding-top: 2px;
}
.collection-strip .collection-count .value {
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  color: var(--navy);
  line-height: 1;
  letter-spacing: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  white-space: nowrap;
}
.collection-strip .collection-count .value .num {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.collection-strip .collection-count .value .den {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.62;
  margin-left: 0.5px;
}
.collection-strip .collection-count .label {
  font-family: var(--display);
  font-weight: 600;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin-top: 3px;
}
.collection-strip .collection-row { display: none !important; }

.stats-trips { margin-left: 4px; }
.stats-trips .stat {
  background: rgba(244,236,221,0.94);
  border: 0;
  color: var(--navy);
  border-radius: 12px;
}

.account-bar { margin-left: auto; }
.account-menu-toggle {
  background: rgba(244,236,221,0.94) !important;
  border: 0 !important;
  color: var(--navy) !important;
  border-radius: 16px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.12);
}
.account-menu-toggle .whoami { color: var(--navy) !important; max-width: 140px; }
.account-menu-toggle::after { border-top-color: var(--navy) !important; }
.app:has(#tv-guest-banner) .brand h1.wordmark .brand-logo { top: 8px; }

.guest-banner-short { display: none; }

.stage, main.stage, .map-wrap {
  background: transparent !important;
}
.map-wrap { overflow: hidden; }
.mesa-silhouettes { display: none !important; }
.poster-skyline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  width: 100%;
  height: 200px;
  pointer-events: none;
  z-index: 2;
}
.poster-sun {
  position: absolute;
  right: 28px;
  top: 8px;
  width: 86px;
  height: 86px;
  z-index: 8;
  pointer-events: none;
}
.poster-kicker {
  position: absolute;
  right: 122px;
  top: 14px;
  z-index: 5;
  pointer-events: none;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);
  font-size: 12px;
  text-align: right;
}
.app.mode-trips .poster-kicker { display: none; }

.map-wrap svg#map {
  z-index: 3;
  overflow: visible;
}

/* States */
.state {
  fill: var(--cream-state);
  stroke: var(--pine);
  stroke-width: 1.55;
  stroke-linejoin: round;
}
.state:hover { fill: #efe6d0; }
.state.visited { fill: var(--pine-visited); }
.state.visited:hover { fill: #3a8a48; }
.state.planned-only { fill: var(--planned); }
.state.planned-only:hover { fill: #f8e290; }
.state.visited, .state.planned-only { stroke: var(--pine); }
.state.all-visited { fill: var(--pine); stroke: var(--trail-orange, #E8691E); stroke-width: 2.6; }
.state.all-visited:hover { fill: #245c32; }
.state.selected {
  stroke: var(--navy);
  stroke-width: 2;
  filter: none;
}
.state-borders { stroke: var(--pine); stroke-width: 0.7; opacity: 0.55; }
.state-complete-outlines { display: none; }

.state-label {
  font-family: var(--font);
  font-weight: 650;
  fill: var(--navy);
  stroke: rgba(243, 235, 218, 0.92);
  stroke-width: 3.4px;
}
.state-label.visited, .state-label.all-visited {
  fill: var(--cream);
  stroke: rgba(15, 44, 22, 0.72);
}
.state-label.planned-only {
  fill: var(--navy);
  stroke: rgba(243, 235, 218, 0.92);
}
.state-leader { stroke: var(--navy); }

.water-layer, .water-lakes {
  fill: rgba(126, 208, 234, 0.45);
  stroke: rgba(24, 120, 168, 0.35);
}

/* Pin markers: shield pins on the continental map; stamp badge on a navy stem when zoomed in. */
.park-dot .park-bg, .place-dot .park-bg { filter: none; stroke-linejoin: round; }
.place-dot .park-shield-pin { pointer-events: none; }
.place-dot .park-pin-window { pointer-events: none; }
.place-dot .park-pin-peak { pointer-events: none; fill: #0E4A5C; }
.place-dot .park-pin-sun { pointer-events: none; }
.place-dot .park-pin-badge { pointer-events: none; }
.place-dot .park-pin-planned-ring { pointer-events: none; stroke: #F28A3B; stroke-width: 1.7; }
.place-dot .park-pin-check {
  fill: none;
  stroke: #FBF5EA;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.place-dot .park-ring { display: none; }
.place-dot .park-glyph { display: none; }

/* Zoomed-in state view: navy stem under the stamp badge. */
.place-dot.type-nationalPark:not(.simple-pin) .park-bg,
.park-dot.type-nationalPark:not(.simple-pin) .park-bg,
.place-dot.type-nationalPark:not(.simple-pin).visited .park-bg,
.park-dot.type-nationalPark:not(.simple-pin).visited .park-bg,
.place-dot.type-nationalPark:not(.simple-pin).planned .park-bg,
.park-dot.type-nationalPark:not(.simple-pin).planned .park-bg,
.place-dot.type-nationalPark:not(.simple-pin).none .park-bg,
.park-dot.type-nationalPark:not(.simple-pin).none .park-bg {
  fill: #0E4A5C;
  stroke: #F1E7D6;
  stroke-width: 1.2;
}

/* Continental / US view (including AK/HI insets): status shield pin; hide the teardrop body. */
.place-dot.type-nationalPark.simple-pin .park-bg,
.park-dot.type-nationalPark.simple-pin .park-bg {
  display: none;
}
.place-dot.type-nationalPark .park-pin-window,
.place-dot.type-nationalPark .park-pin-peak,
.place-dot.type-nationalPark .park-pin-sun { display: none; }

/* State parks and other place types keep the pin-peak treatment. */
.place-dot:not(.type-nationalPark).visited .park-bg, .park-dot:not(.type-nationalPark).visited .park-bg { fill: #E8691E; stroke: #F1E7D6; stroke-width: 1.2; }
.place-dot:not(.type-nationalPark).visited .park-pin-window { fill: #F1E7D6; }
.place-dot:not(.type-nationalPark).visited .park-pin-sun { fill: #F28A3B; }
.place-dot:not(.type-nationalPark).planned .park-bg, .park-dot:not(.type-nationalPark).planned .park-bg { fill: #F28A3B; stroke: #F1E7D6; stroke-width: 1.2; }
.place-dot:not(.type-nationalPark).planned .park-pin-window { fill: #FBF5EA; }
.place-dot:not(.type-nationalPark).planned .park-pin-sun { fill: #E8691E; }
.place-dot:not(.type-nationalPark).none .park-bg, .park-dot:not(.type-nationalPark).none .park-bg { fill: #0E4A5C; stroke: #F1E7D6; stroke-width: 1.2; }
.place-dot:not(.type-nationalPark).none .park-pin-window { fill: #F1E7D6; }
.place-dot:not(.type-nationalPark).none .park-pin-sun { fill: #F28A3B; }

/* Trail-sign Reset / Layers / Legend */
.map-tools {
  position: static;
  z-index: 6;
  display: contents;
}
#btn-reset-view, #btn-trip-zoom {
  white-space: nowrap;
  position: absolute;
  z-index: 6;
  left: 16px;
  top: 16px;
  background: var(--cream);
  border: 2px solid var(--pine);
  color: var(--pine);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 2px 0 var(--pine);
  border-radius: 4px;
  padding: 6px 16px;
  font-size: 13px;
}
#btn-trip-zoom { top: 16px; left: 128px; }
.app.mode-parks #btn-trip-zoom { display: none; }
.app:not(:has(#tv-guest-banner)) #btn-reset-view { top: 22px; }

.layer-control {
  position: absolute;
  z-index: 6;
  left: 16px;
  top: 58px;
  width: 196px;
  background: var(--cream);
  border: 2.5px solid var(--pine);
  box-shadow: 0 3px 0 var(--pine);
  border-radius: 4px;
  padding: 16px 16px 12px;
  min-width: 0;
}
.app:not(:has(#tv-guest-banner)) .layer-control { top: 64px; }
.layer-control .layer-title {
  appearance: none;
  border: 0;
  cursor: default;
  font: inherit;
}
.layer-control .layer-title,
.trail-tag {
  position: absolute;
  left: 50%;
  top: -11px;
  transform: translateX(-50%);
  background: var(--pine);
  color: var(--cream);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
  margin: 0;
  font-size: 11px;
  box-shadow: none;
}
.layer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
  color: var(--charcoal);
  padding: 6px 0;
  font-size: 13px;
  margin: 0;
  gap: 10px;
}
.layer-control .switch { width: 34px; height: 20px; flex: 0 0 34px; }
.layer-control .slider { background: #E2D6C1; border-radius: 10px; }
.layer-control .switch input:checked + .slider { background: var(--trail-orange, #E8691E); }
.layer-control .slider:before { height: 16px; width: 16px; left: 2px; top: 2px; background: var(--cream); }

.hint {
  z-index: 5;
  background: rgba(244,236,221,0.94);
  border: 1.5px solid var(--pine);
  color: var(--navy);
  font-weight: 500;
  border-radius: 16px;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  font-size: 12.5px;
  box-shadow: none;
}

.legend-parks, .legend.legend-parks {
  position: absolute;
  z-index: 6;
  right: 20px;
  bottom: 16px;
  left: auto;
  transform: none;
  width: 408px;
  max-width: calc(100% - 40px);
  background: var(--cream);
  border: 2.5px solid var(--navy);
  box-shadow: 0 3px 0 var(--navy);
  border-radius: 4px;
  padding: 16px 16px 10px;
  pointer-events: auto;
  gap: 6px 14px;
  justify-content: flex-start;
}
.legend-body { display: contents; }
.legend-toggle {
  appearance: none;
  border: 0;
  font: inherit;
  cursor: default;
}
.legend-parks h2, .legend-parks .legend-toggle, .legend-parks .trail-tag {
  position: absolute;
  left: 50%;
  top: -11px;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--cream);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 11px;
  margin: 0;
  box-shadow: none;
}
.legend-parks .legend-row {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--charcoal);
  white-space: nowrap;
  gap: 6px;
}
.legend-parks .swatch.visited { background: var(--pine-visited); border: 1.5px solid var(--pine); }
.legend-parks .swatch.planned-only { background: var(--planned); border: 1.5px solid var(--pine); }
.legend-parks .swatch.unvisited { background: var(--cream-state); border: 1.5px solid var(--pine); }
.legend-parks .swatch.complete-outline { background: var(--pine); border: 2px solid var(--trail-orange, #E8691E); }
.legend-parks .dot { background: none; border: 0; width: auto; height: auto; border-radius: 0; display: inline-flex; align-items: flex-end; }
.legend-parks .dot img { display: block; width: 16px; height: 20px; }
.legend-parks .dot .park-bg { stroke: #0E4A5C; stroke-width: 1.4; stroke-linejoin: round; }
.legend-parks .dot.none .park-bg { fill: #DCE7EA; }
.legend-parks .dot.planned .park-bg { fill: #F28A3B; }
.legend-parks .dot.visited .park-bg { fill: #1F6B2E; }
.legend-parks .dot .park-pin-check {
  fill: none;
  stroke: #FBF5EA;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.legend-parks .dot.sp-visited .park-bg { fill: #E8691E; stroke: #F1E7D6; stroke-width: 1.2; }
.legend-parks .dot.sp-planned .park-bg { fill: #F28A3B; stroke: #F1E7D6; stroke-width: 1.2; }
.legend-parks .dot.sp-none .park-bg { fill: #0E4A5C; stroke: #F1E7D6; stroke-width: 1.2; }
.legend-parks .dot .park-pin-window { fill: #F1E7D6; }
.legend-parks .dot.sp-planned .park-pin-window { fill: #FBF5EA; }
.legend-parks .dot .park-pin-peak { fill: #0E4A5C; }
.legend-parks .dot .park-pin-sun { fill: #F28A3B; }
.legend-parks .dot.sp-planned .park-pin-sun { fill: #E8691E; }
.legend-parks .dot .park-pin-legend-head { fill: #F1E7D6; stroke: #C9A03A; stroke-width: 1.4; }
.legend-parks .dot.visited .park-pin-legend-head { fill: #F28A3B; stroke: #C9A03A; }
.legend-parks .dot.planned .park-pin-legend-head { fill: #F1E7D6; stroke: #F28A3B; stroke-width: 1.6; }
.legend-parks .dot.none .park-pin-legend-head { fill: #F1E7D6; stroke: #0E4A5C; stroke-width: 1.3; }
.legend-parks .dot .park-pin-planned-ring { stroke: #F28A3B; stroke-width: 1.7; fill: none; }
.legend-trips {
  /* keep trips legend readable on the poster */
  background: var(--cream);
  border: 2.5px solid var(--navy);
  box-shadow: 0 3px 0 var(--navy);
}

@media (max-width: 840px) {
  header.top { padding-left: 250px !important; height: 80px; gap: 10px; }
  .brand h1.wordmark .brand-logo { height: 28px !important; max-width: 240px !important; }
  .collection-strip, .collection-strip .ring-svg { width: 64px !important; height: 64px !important; flex: 0 0 64px !important; }
  .layer-control { width: 180px; }
}

@media (max-width: 520px) {
  #tv-guest-banner {
    height: 28px;
    padding: 0 8px 0 72px;
    font-size: 11px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  #tv-guest-banner button {
    font-size: 11px;
    padding: 2px 10px;
    min-height: 24px;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
  }
  header.top {
    height: 58px;
    padding: 0 10px 0 76px !important;
    gap: 8px;
  }
  .brand h1.wordmark .brand-logo {
    left: 6px;
    top: 12px;
    height: 24px !important;
    max-width: 220px !important;
  }
  .app:has(#tv-guest-banner) .brand h1.wordmark .brand-logo { top: 6px; }
  .guest-banner-full { display: none; }
  .guest-banner-short { display: inline; }
  .tagline-strip { display: none; }
  .mode-switch { border-radius: 16px; padding: 2px; }
  .mode-switch button { font-size: 11px; padding: 5px 10px; border-radius: 12px; }
  .account-menu-toggle { border-radius: 12px; padding: 5px 10px; font-size: 12px; }
  /* Compact rings stay in the header row so they no longer cover the map */
  header.top .stats-parks,
  header.top .stats-trips {
    position: static;
    height: auto;
    padding: 0;
    margin: 0;
    justify-content: flex-end;
    gap: 4px;
    pointer-events: auto;
    flex: 0 0 auto;
  }
  .collection-strip, .collection-strip .ring-svg { width: 56px !important; height: 56px !important; flex: 0 0 56px !important; }
  .collection-strip#states-strip { transform: none; }
  .collection-strip#parks-strip { transform: none; }
  .collection-strip .collection-count .value { font-size: 16px; flex-direction: column; align-items: center; }
  .collection-strip .collection-count .value .num { font-size: 16px; }
  .collection-strip .collection-count .value .den { font-size: 8px; margin-left: 0; }
  .collection-strip .collection-count .label { font-size: 6px; letter-spacing: 0.08em; margin-top: 1px; }
  main.stage { padding-top: 0; }
  .poster-sun { width: 52px; height: 52px; right: 10px; top: 10px; }
  .poster-kicker { display: none; }
  .poster-skyline { height: 150px; }
  .hint { top: 10px; left: 50%; font-size: 10px; padding: 4px 10px; max-width: 46%; white-space: normal; text-align: center; }
  #btn-reset-view {
    left: 10px;
    top: 10px;
    padding: 0 14px;
    font-size: 12px;
    min-height: 44px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .layer-control {
    left: 10px;
    top: 62px;
    width: 156px;
    padding: 14px 12px 8px;
  }
  .layer-row { font-size: 11px; padding: 4px 0; }
  .layer-control .switch { width: 28px; height: 16px; flex-basis: 28px; }
  .layer-control .slider:before { width: 12px; height: 12px; }
  .legend-parks, .legend.legend-parks, .legend-trips, .legend.legend-trips {
    left: auto;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
  }
  .legend-parks .legend-row, .legend-trips .legend-row { font-size: 10px; }
}

/* Collapsed Layers / Legend chips on phones (and short landscape screens). Desktop stays an open card. */
@media (max-width: 840px), (max-height: 540px) {
  #btn-reset-view {
    min-height: 44px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 14px;
    padding-right: 14px;
  }
  .layer-control .layer-title,
  .legend-toggle { cursor: pointer; pointer-events: auto; }
  .layer-control:not(.is-open) {
    width: auto;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .layer-control:not(.is-open) .layer-body { display: none; }
  .layer-control:not(.is-open) .layer-title {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 12px;
    min-height: 44px;
    box-sizing: border-box;
  }
  .layer-control.is-open .layer-title {
    cursor: pointer;
  }
  .legend-parks:not(.is-open),
  .legend-trips:not(.is-open),
  .legend:not(.is-open) {
    left: auto;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: block;
  }
  .legend:not(.is-open) .legend-body { display: none; }
  .legend:not(.is-open) .legend-toggle {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    display: inline-block;
    margin: 0;
    padding: 6px 10px;
    min-height: 32px;
  }
  .legend.is-open {
    left: 8px;
    right: 8px;
    width: auto;
    padding: 16px 16px 10px;
  }
  .legend.is-open .legend-body {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 6px 14px;
  }
  .legend.is-open .legend-toggle {
    position: absolute;
    left: 50%;
    top: -11px;
    transform: translateX(-50%);
    cursor: pointer;
  }
}
