.tracker-page .topbar {
  position: relative;
  z-index: 20;
}

.tracker-main {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.5rem 1.1rem 3.5rem;
}

.tracker-hero {
  margin-bottom: 1.1rem;
}
.tracker-hero h1 {
  margin: 0.2rem 0 0.55rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  line-height: 1.15;
}
.tracker-hero .lede {
  max-width: 40rem;
}

.tracker-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.85rem 0 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 184, 74, 0.28);
  background: rgba(0, 0, 0, 0.28);
  color: var(--lantern);
  font-size: 0.88rem;
  font-weight: 800;
}
.tracker-status::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--lantern);
  box-shadow: 0 0 10px rgba(232, 184, 74, 0.8);
  animation: radar-blink 1.6s ease-in-out infinite;
}
.tracker-status.is-live {
  color: var(--ok);
  border-color: rgba(61, 155, 110, 0.4);
}
.tracker-status.is-live::before {
  background: var(--ok);
  box-shadow: 0 0 10px rgba(61, 155, 110, 0.8);
}
.tracker-status.is-done {
  color: var(--mist);
  border-color: rgba(158, 184, 170, 0.35);
}
.tracker-status.is-done::before {
  background: var(--mist);
  animation: none;
  box-shadow: none;
}

@keyframes radar-blink {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.tracker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.85fr);
  gap: 1rem;
  align-items: stretch;
}

.tracker-map-shell {
  position: relative;
  min-height: 460px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(231, 242, 236, 0.14);
  background: #04110d;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
#santa-map {
  width: 100%;
  height: 100%;
  min-height: 460px;
  background: #04110d;
}
.tracker-map-shell.is-preview #santa-map {
  filter: saturate(0.85) brightness(0.92);
}

.tracker-map-tools {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  pointer-events: none;
}
.tracker-map-tools .btn {
  pointer-events: auto;
  font-size: 0.85rem;
  padding: 0.45rem 0.8rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.tracker-side {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.tracker-card {
  border: 1px solid rgba(231, 242, 236, 0.14);
  border-radius: 18px;
  padding: 1rem 1.05rem;
  background: rgba(0, 0, 0, 0.28);
}
.tracker-card h2 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
}
.tracker-card p {
  margin: 0;
  color: var(--mist);
  font-size: 0.92rem;
}

.countdown-block {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.countdown-cell {
  text-align: center;
  padding: 0.55rem 0.2rem;
  border-radius: 12px;
  background: rgba(14, 42, 34, 0.85);
  border: 1px solid rgba(232, 184, 74, 0.16);
}
.countdown-cell strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--lantern);
  line-height: 1.1;
}
.countdown-cell span {
  color: var(--mist);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.75rem;
}
.live-stat {
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  background: rgba(14, 42, 34, 0.85);
  border: 1px solid rgba(231, 242, 236, 0.1);
}
.live-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--frost);
}
.live-stat span {
  color: var(--mist);
  font-size: 0.78rem;
}

.elf-tasks {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.elf-tasks li {
  margin: 0;
}
.elf-task {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(231, 242, 236, 0.12);
  background: rgba(14, 42, 34, 0.65);
  color: var(--frost);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.elf-task:hover,
.elf-task:focus-visible {
  border-color: rgba(232, 184, 74, 0.45);
  outline: none;
}
.elf-task.is-done {
  border-color: rgba(61, 155, 110, 0.45);
  background: rgba(61, 155, 110, 0.12);
}
.elf-check {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 2px solid rgba(232, 184, 74, 0.55);
  flex: 0 0 auto;
}
.elf-task.is-done .elf-check {
  background: var(--ok);
  border-color: var(--ok);
  box-shadow: inset 0 0 0 3px rgba(7, 21, 16, 0.85);
}

.stop-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  max-height: 280px;
  overflow: auto;
  display: grid;
  gap: 0.35rem;
}
.stop-list button {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.65rem;
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(14, 42, 34, 0.55);
  color: var(--frost);
  font: inherit;
  cursor: pointer;
}
.stop-list button:hover,
.stop-list button:focus-visible,
.stop-list button.is-active {
  border-color: rgba(232, 184, 74, 0.4);
  outline: none;
}
.stop-list .stop-i {
  grid-row: span 2;
  align-self: center;
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(232, 184, 74, 0.16);
  color: var(--lantern);
  font-size: 0.75rem;
  font-weight: 800;
}
.stop-list strong {
  font-size: 0.92rem;
}
.stop-list span {
  color: var(--mist);
  font-size: 0.78rem;
}

.radar-toy {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0.75rem auto 0;
  border-radius: 50%;
  border: 2px solid rgba(61, 155, 110, 0.45);
  background:
    radial-gradient(circle at center, rgba(61, 155, 110, 0.18), transparent 62%),
    #04110d;
  overflow: hidden;
}
.radar-toy::before,
.radar-toy::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(61, 155, 110, 0.25);
  border-radius: 50%;
}
.radar-toy::after {
  inset: 34%;
}
.radar-sweep {
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(61, 155, 110, 0.45) 50deg, transparent 70deg);
  animation: sweep 2.4s linear infinite;
  transform-origin: center;
}
.radar-toy.is-boost .radar-sweep {
  animation-duration: 0.7s;
}
@keyframes sweep {
  to { transform: rotate(360deg); }
}

.santa-marker {
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffd98a, #c47a22 55%, #9b2d2d 100%);
  border: 2px solid #fff6d8;
  box-shadow: 0 0 0 4px rgba(232, 184, 74, 0.22), 0 8px 18px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
}
.santa-marker.is-asleep {
  filter: grayscale(0.25);
  opacity: 0.9;
}
.leaflet-container {
  font: inherit;
  background: #04110d;
}
/* Night-mode OSM tiles without a paid basemap key */
.tracker-map-shell .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(1.05) saturate(0.35);
}
.leaflet-control-attribution {
  background: rgba(7, 21, 16, 0.82) !important;
  color: var(--mist) !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a {
  color: var(--lantern) !important;
}
.leaflet-popup-content-wrapper {
  background: #0e2a22;
  color: var(--frost);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.leaflet-popup-tip {
  background: #0e2a22;
}
.leaflet-popup-content {
  margin: 0.75rem 0.9rem;
  font-size: 0.9rem;
  line-height: 1.4;
}
.leaflet-popup-content strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.tracker-credit {
  margin: 0.85rem 0 0;
  color: var(--mist);
  font-size: 0.8rem;
}
.tracker-credit a { color: var(--lantern); }

@media (max-width: 900px) {
  .tracker-grid {
    grid-template-columns: 1fr;
  }
  .tracker-map-shell,
  #santa-map {
    min-height: 380px;
  }
  .stop-list {
    max-height: 220px;
  }
}

@media (max-width: 520px) {
  .countdown-block {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
