:root {
  --overlay: rgba(0, 0, 0, 0.22);
  --bg: #000000;
  --fg: #ffffff;
  --accent: #23C48E;
  --accent-strong: #15a66e;
}

/* Text selection should use the green accent */
::selection { background: var(--accent); color: #072018; }
::-moz-selection { background: var(--accent); color: #072018; }
input::selection, textarea::selection, select::selection { background: var(--accent); color: #072018; }

/* Focus-visible ring for keyboard and accessibility - green accent */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 6px rgba(35,196,142,0.12);
  border-color: var(--accent);
}

/* Buttons and interactive elements focus */
.btn:focus, button:focus, a:focus, .settlement-label:focus {
  outline: none;
  box-shadow: 0 6px 18px rgba(35,196,142,0.12);
  border-color: var(--accent);
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: "Ponomar", "Old Standard TT", "Times New Roman", serif;
}

/* Ensure form controls, buttons and interactive elements use Ponomar */
input,
button,
select,
textarea,
.btn,
.modal-close,
.pull-indicator-inner,
.leaflet-control,
.leaflet-control * {
  font-family: "Ponomar", "Old Standard TT", "Times New Roman", serif;
}

.scroll-story {
  min-height: 300svh;
}

.fullscreen,
.scene {
  position: relative;
  width: 100%;
  height: 100svh;
  overflow: hidden;
}

.scene-map {
  position: fixed;
  inset: 0;
  transform-origin: center center;
}

.fullscreen-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: -1;
}

.fullscreen-video--youtube {
  display: block;
  border: 0;
  pointer-events: none;
  transform: scale(1.16);
  transform-origin: center center;
}

.fullscreen-video--fallback.is-active {
  display: block;
}

.main-title {
  position: absolute;
  top: 0.5vh;
  left: 0;
  right: 0;
  z-index: 10;
  font-family: "Ponomar", serif;
  font-size: clamp(3rem, 13vw, 15vh);
  margin: 0;
  color: var(--fg);
  text-shadow: 
    0 0.5rem 2rem rgba(0, 0, 0, 0.9),
    0 0 1.5rem rgba(35, 196, 142, 0.25);
  pointer-events: none;
  line-height: 1;
  letter-spacing: 0.02em;
  opacity: 0.6;
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  align-items: baseline;
  column-gap: 0.35em;
  padding: 0 2rem;
}

@media (max-width: 900px) {
  .main-title {
    column-gap: 0.4em;
  }
}

.title-date {
  opacity: 1;
  white-space: nowrap;
}



#map-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.4;
  filter: saturate(0.95) contrast(1.08);
  touch-action: manipulation;
}

.settlement-label-marker {
  background: transparent;
  border: 0;
}

.settlement-label {
   display: inline-block;
   white-space: nowrap;
   opacity: 1;
  color: var(--fg);
   padding: 0.125rem 0.25rem;
   font-family: "Ponomar", "Old Standard TT", "Times New Roman", serif;
   font-size: clamp(1.5rem, 4vw, 2rem);
   font-weight: 400;
   line-height: 1.05;
   letter-spacing: 0.015em;
   text-transform: none;
   -webkit-text-stroke: 0.02rem rgba(0, 0, 0, 0.58);
   text-shadow:
     0 0.125rem 0.625rem rgba(0, 0, 0, 0.85),
     0 0 1.125rem rgba(70, 255, 150, 0.2);
   filter: blur(0) brightness(1);
   transition:
     opacity 1400ms cubic-bezier(0.16, 0.82, 0.22, 1),
     filter 1500ms cubic-bezier(0.16, 0.82, 0.22, 1),
     transform 180ms ease,
     text-shadow 180ms ease,
     color 180ms ease;
 }

.settlement-label--top {
  transform: translate(-50%, -170%);
}

.settlement-label--top-near {
  transform: translate(-50%, -138%);
}

.settlement-label--top-near-right {
  transform: translate(-26%, -138%);
}

.settlement-label--bottom {
  transform: translate(-50%, 68%);
}

.settlement-label--bottom-near {
  transform: translate(-50%, 40%);
}

.settlement-label--bottom-near-right {
  transform: translate(-26%, 40%);
}

.settlement-label--right {
  transform: translate(14%, -52%);
}

.settlement-label--left {
  transform: translate(-114%, -52%);
}

.settlement-label:hover {
   color: var(--accent);
   filter: brightness(1.05);
   text-shadow:
     0 0.25rem 0.875rem rgba(0, 0, 0, 0.85),
     0 0 1.75rem rgba(35, 196, 142, 0.48);
 }

.settlement-label--top:hover {
  transform: translate(-50%, -170%) scale(1.12);
}

.settlement-label--top-near:hover {
  transform: translate(-50%, -138%) scale(1.12);
}

.settlement-label--top-near-right:hover {
  transform: translate(-26%, -138%) scale(1.12);
}

.settlement-label--bottom:hover {
  transform: translate(-50%, 68%) scale(1.12);
}

.settlement-label--bottom-near:hover {
  transform: translate(-50%, 40%) scale(1.12);
}

.settlement-label--bottom-near-right:hover {
  transform: translate(-26%, 40%) scale(1.12);
}

.settlement-label--right:hover {
  transform: translate(14%, -52%) scale(1.12);
}

.settlement-label--left:hover {
  transform: translate(-114%, -52%) scale(1.12);
}

/* Active state for touch / keyboard interaction (mirrors :hover) */
.settlement-label.is-active {
  color: var(--accent);
  filter: brightness(1.06);
  text-shadow:
    0 0.25rem 0.875rem rgba(0, 0, 0, 0.85),
    0 0 1.75rem rgba(35,196,142,0.48);
}

.settlement-label--top.is-active {
  transform: translate(-50%, -170%) scale(1.12);
}
.settlement-label--top-near.is-active {
  transform: translate(-50%, -138%) scale(1.12);
}
.settlement-label--top-near-right.is-active {
  transform: translate(-26%, -138%) scale(1.12);
}
.settlement-label--bottom.is-active {
  transform: translate(-50%, 68%) scale(1.12);
}
.settlement-label--bottom-near.is-active {
  transform: translate(-50%, 40%) scale(1.12);
}
.settlement-label--bottom-near-right.is-active {
  transform: translate(-26%, 40%) scale(1.12);
}
.settlement-label--right.is-active {
  transform: translate(14%, -52%) scale(1.12);
}
.settlement-label--left.is-active {
  transform: translate(-114%, -52%) scale(1.12);
}

/* Make labels visibly focusable for keyboard / assistive tech */
.settlement-label:focus {
  outline: none;
  color: var(--accent);
  box-shadow: 0 6px 18px rgba(35,196,142,0.12);
  text-shadow:
    0 0.25rem 0.875rem rgba(0, 0, 0, 0.85),
    0 0 1.75rem rgba(35, 196, 142, 0.48);
}

/* Highlightable quote part */
.highlightable {
  cursor: pointer;
  transition: color 600ms ease, transform 300ms ease, text-shadow 600ms ease, filter 600ms ease;
  /* continuous sway + glow pulsing */
  display: inline-block;
  animation: sway 2800ms ease-in-out infinite, glowPulse 2200ms ease-in-out infinite;
  color: var(--accent);
  /* base neon (subtle) */
  text-shadow:
    0 0 4px rgba(35,196,142,0.28),
    0 0 10px rgba(35,196,142,0.18),
    0 0 20px rgba(35,196,142,0.10);
  will-change: transform;
}
.highlightable:hover,
.highlightable.is-active,
.highlightable:focus {
  color: var(--accent);
  transform: translateY(-3px);
  /* On hover/focus: keep sway but stop pulsing and show max glow */
  animation: sway 2800ms ease-in-out infinite, hoverBounce 420ms cubic-bezier(.2,.9,.3,1);
  /* brighter neon on hover */
  text-shadow:
    0 0 8px rgba(35,196,142,0.95),
    0 0 14px rgba(35,196,142,0.9),
    0 0 28px rgba(35,196,142,0.6),
    0 0 48px rgba(35,196,142,0.35);
  filter: drop-shadow(0 0 8px rgba(35,196,142,0.6));
}

/* Pulse link locked/hover: bright green state (no sway/translation) */
.pulse-link.locked,
.pulse-link.is-locked,
.pulse-link:focus.locked {
  animation: none !important;
  color: var(--accent);
  transform: none !important;
  text-shadow:
    0 0 16px rgba(35,196,142,0.98),
    0 0 30px rgba(35,196,142,0.9),
    0 0 52px rgba(35,196,142,0.7),
    0 0 88px rgba(35,196,142,0.45);
  filter: drop-shadow(0 0 16px rgba(35,196,142,0.6));
  transition: text-shadow 600ms ease, filter 600ms ease, transform 300ms ease, color 600ms ease;
}

/* Keyboard-visible focus for the link should match the locked bright state */
.pulse-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 6px rgba(35,196,142,0.12);
}

@keyframes glowPulse {
  0% {
    text-shadow:
      0 0 3px rgba(35,196,142,0.12),
      0 0 8px rgba(35,196,142,0.08),
      0 0 14px rgba(35,196,142,0.04);
    filter: drop-shadow(0 0 3px rgba(35,196,142,0.04)) brightness(0.85);
  }
  50% {
    text-shadow:
      0 0 14px rgba(35,196,142,0.98),
      0 0 26px rgba(35,196,142,0.72),
      0 0 48px rgba(35,196,142,0.36);
    filter: drop-shadow(0 0 18px rgba(35,196,142,0.5)) brightness(1.18);
  }
  100% {
    text-shadow:
      0 0 3px rgba(35,196,142,0.12),
      0 0 8px rgba(35,196,142,0.08),
      0 0 14px rgba(35,196,142,0.04);
    filter: drop-shadow(0 0 3px rgba(35,196,142,0.04)) brightness(0.85);
  }
}

/* Remove underline for the pulsing quote link */
.pulse-link,
.pulse-link:visited,
.pulse-link:hover,
.pulse-link:active {
  /* avoid large will-change budget cost; keep no will-change here */
}
/* Force pulse-link to always use white pulsing and disable sway from .highlightable */
.highlightable.pulse-link,
.pulse-link {
  animation: pulseWhiteGlow 2200ms ease-in-out infinite !important;
  color: var(--fg) !important;
  transform: none !important;
  display: inline-block;
  text-decoration: none !important;
}

/* Override any hover/active/is-active from .highlightable for this specific link */
.highlightable.pulse-link:hover,
.pulse-link:hover,
.highlightable.pulse-link:focus,
.pulse-link:focus,
.highlightable.pulse-link.locked,
.pulse-link.locked,
.highlightable.pulse-link.is-active,
.pulse-link.is-active {
  color: rgba(255, 255, 255, 0) !important;
  transform: none !important;
  text-shadow: none !important;
  filter: none !important;
  transition: color 2.5s cubic-bezier(0.4, 0, 0.2, 1), text-shadow 2.5s cubic-bezier(0.4, 0, 0.2, 1), filter 2.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Smooth overlay for the green state */
.pulse-link::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--accent);
  opacity: 0;
  text-shadow: 0 0 0 rgba(35, 196, 142, 0);
  filter: drop-shadow(0 0 0 rgba(35, 196, 142, 0)) brightness(1);
  transition: 
    opacity 2.5s cubic-bezier(0.4, 0, 0.2, 1), 
    text-shadow 4s cubic-bezier(0.4, 0, 0.2, 1),
    filter 4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
}

.pulse-link:hover::after,
.pulse-link.locked::after,
.pulse-link.is-active::after {
  opacity: 1;
  text-shadow:
    0 0 16px rgba(35, 196, 142, 0.98),
    0 0 30px rgba(35, 196, 142, 0.9),
    0 0 52px rgba(35, 196, 142, 0.7),
    0 0 88px rgba(35, 196, 142, 0.45);
  filter: drop-shadow(0 0 16px rgba(35, 196, 142, 0.6)) brightness(1.18);
}

/* Specific continuous white glow for the pain link (no sway) */
.pulse-link {
  position: relative;
  color: var(--fg); /* white text */
  animation: pulseWhiteGlow 2200ms ease-in-out infinite;
  display: inline-block;
  will-change: text-shadow, filter, opacity;
  text-decoration: none;
  transition: color 2.5s cubic-bezier(0.4, 0, 0.2, 1), text-shadow 2.5s cubic-bezier(0.4, 0, 0.2, 1), filter 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pulse-link:hover,
.pulse-link:focus {
  /* On hover/focus delegate to locked rules (JS also adds locked) */
  color: var(--accent);
  animation: none !important;
  transform: none !important;
  text-shadow:
    0 0 16px rgba(35,196,142,0.98),
    0 0 30px rgba(35,196,142,0.9),
    0 0 52px rgba(35,196,142,0.7),
    0 0 88px rgba(35,196,142,0.45);
  filter: drop-shadow(0 0 16px rgba(35,196,142,0.6));
}

@keyframes pulseWhiteGlow {
  0% {
    text-shadow: 0 0 0 rgba(255,255,255,0);
    filter: drop-shadow(0 0 0 rgba(255,255,255,0)) brightness(1);
  }
  50% {
    text-shadow:
      0 0 10px rgba(255,255,255,0.95),
      0 0 22px rgba(255,255,255,0.6),
      0 0 40px rgba(255,255,255,0.32);
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.5)) brightness(1.06);
  }
  100% {
    text-shadow: 0 0 0 rgba(255,255,255,0);
    filter: drop-shadow(0 0 0 rgba(255,255,255,0)) brightness(1);
  }
}
/* entrance effect when second page becomes visible */
.highlightable.entered {
  /* Keep entrance visual without forcing green color — color only on hover */
  text-shadow: 0 0.25rem 1rem rgba(35,196,142,0.18), 0 0 1.2rem rgba(35,196,142,0.08);
  transform: scale(1.02);
}

/* Hit (impact) animation */
@keyframes hit {
  0% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.15) rotate(-8deg); }
  55% { transform: scale(0.92) rotate(7deg); }
  80% { transform: scale(1.03) rotate(-3deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.highlightable:hover, .highlightable.hit {
  animation: hit 520ms cubic-bezier(.2,.9,.3,1);
}

@keyframes hoverBounce {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

@keyframes sway {
  0% { transform: translateY(0) rotate(0deg); }
  20% { transform: translateY(-2px) rotate(-2deg); }
  50% { transform: translateY(0) rotate(0deg); }
  80% { transform: translateY(-2px) rotate(2deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* Modal styles */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal[aria-hidden="false"] { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.6);
}
.modal-content {
  position: relative;
  background: #0c0c0c;
  border-radius: 12px;
  padding: 1.25rem;
  width: min(680px, 94vw);
  color: var(--fg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  z-index: 2;
}
.modal-close {
  position: absolute; right: 8px; top: 8px; background: transparent; border: 0; color: var(--fg); font-size: 2.1rem; cursor: pointer; padding: 0.25rem; line-height: 1;
}
.modal-content h2 { margin: 0 0 1rem; font-size: 1.9rem; text-align: center; }
.modal-content label { display:block; margin: 1.35rem 0 0.5rem; font-size: 1.4rem; }
.modal-content input { width: 100%; padding: 1.15rem 1.1rem; border-radius: 10px; border: 2px solid rgba(255,255,255,0.12); background: #0b0b0b; color: var(--fg); font-size: 1.25rem; margin-top: 0.45rem; }
.modal-content input:focus { outline: none; border-color: var(--accent); box-shadow: 0 6px 18px rgba(35,196,142,0.14); }
.modal-actions { display:flex; gap:0.5rem; margin-top: 0.75rem; }
.btn { border: 0; padding: 0.9rem 1.15rem; border-radius: 8px; cursor: pointer; transition: background-color 220ms ease, transform 220ms ease, box-shadow 240ms ease, color 180ms ease; font-size: 1.22rem; }
.btn-primary {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transition: all 220ms ease;
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #072018;
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(35, 196, 142, 0.22);
}

.btn-primary:active {
  transform: scale(0.92);
  transition: transform 50ms ease;
}

@keyframes btnPulse {
  0% { transform: translateY(0) scale(1); box-shadow: 0 6px 18px rgba(0,0,0,0); }
  50% { transform: translateY(-3px) scale(1.03); box-shadow: 0 12px 30px rgba(35,196,142,0.14); }
  100% { transform: translateY(0) scale(1); box-shadow: 0 6px 18px rgba(0,0,0,0); }
}
.btn-ghost{ background: transparent; color: var(--fg); border: 1px solid rgba(255,255,255,0.06); }

/* Reset view button (Сброс карты) styling */
#reset-view-btn{
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(0,0,0,0.45);
  transition: background 160ms ease, transform 120ms ease;
}

/* Left action button (Я в деле) — mirrors reset button but left aligned */
.map-action-left {
  position: fixed;
  z-index: 99999;
  left: 1rem;
  bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border-radius: 0.625rem;
  padding: 0.95rem 1.25rem;
  font-size: clamp(1rem, 2.6vw, 1.18rem);
  line-height: 1;
  cursor: pointer;
  min-width: 4rem;
  min-height: 3.8rem;
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) and (pointer: fine) {
  .map-action-left:hover {
    background: var(--accent);
    color: #072018;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(35,196,142,0.16);
  }
}
.map-action-left:active, #reset-view-btn:active {
  transform: scale(0.96) !important;
  background: var(--accent) !important;
  color: #072018 !important;
  transition: transform 50ms ease !important;
}

#reset-view-btn {
   position: absolute;
   z-index: 5;
   right: 1rem;
   bottom: 2rem;
   border: 1px solid rgba(255, 255, 255, 0.35);
   background: rgba(0, 0, 0, 0.45);
   color: #fff;
   border-radius: 0.625rem;
   padding: 0.95rem 1.25rem;
   font-size: clamp(1rem, 2.6vw, 1.18rem);
   line-height: 1;
   cursor: pointer;
   min-width: 4rem;
   min-height: 3.8rem;
 }

#reset-view-btn{
  -webkit-tap-highlight-color: transparent;
}

/* Hover/pressed styles only on devices that support hover (desktops) */
@media (hover: hover) and (pointer: fine) {
  #reset-view-btn:hover {
    background: var(--accent);
    color: #072018;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(35,196,142,0.16);
  }
  #reset-view-btn:active {
    transform: scale(0.96) !important;
    transition: transform 50ms ease !important;
  }
  #reset-view-btn[aria-pressed="true"], #reset-view-btn.is-pressed { background: var(--accent); color: #072018; }
}

/* On touch devices, disable hover-locking and keep the button visually stable after tap */
@media (hover: none) and (pointer: coarse) {
  #reset-view-btn:hover,
  #reset-view-btn:focus,
  #reset-view-btn.is-pressed,
  #reset-view-btn[aria-pressed="true"] {
    background: rgba(0,0,0,0.45);
    color: #fff;
    transform: none;
    box-shadow: none;
    animation: none;
  }
}

/* Ensure focus doesn't lock green color */
#reset-view-btn:focus {
  outline: none;
  background: rgba(0,0,0,0.45);
  color: #fff;
}
#reset-view-btn:active { /* active only during press */
  background: var(--accent);
  color: #072018;
}

/* Pull-to-refresh indicator */
.pull-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  overflow: visible;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  z-index: 9998;
}
.pull-indicator-inner {
  transform: translateY(-120%);
  background: transparent;
  color: var(--fg);
  padding: 0;
  border-radius: 0;
  font-size: 0.95rem;
  transition: transform 180ms ease, opacity 160ms ease;
  opacity: 0;
}
.pull-indicator.pull-visible .pull-indicator-inner { transform: translateY(6px); opacity: 1; pointer-events: auto; }
.pull-indicator.pull-refreshing .pull-indicator-inner { color: #072018; }

.pull-indicator-inner .spinner-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(10,10,10,0.9);
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
  padding: 0;
}
.pull-indicator-inner .spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: rgba(255,255,255,0.18);
  border-left-color: rgba(255,255,255,0.08);
  border-right-color: rgba(255,255,255,0.08);
  display: inline-block;
  vertical-align: middle;
  margin: 0;
  box-sizing: border-box;
  animation: spin 900ms linear infinite;
}
/* when ready or refreshing - make spinner accent green (border) */
.pull-indicator.pull-ready .pull-indicator-inner .spinner,
.pull-indicator.pull-refreshing .pull-indicator-inner .spinner {
  border-top-color: var(--accent);
  border-left-color: rgba(35,196,142,0.12);
  border-right-color: rgba(35,196,142,0.12);
}
.pull-indicator.pull-refreshing .pull-indicator-inner .spinner-wrap {
  background: var(--accent);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Ensure submit button larger and centered */
.btn-submit { padding: 1.1rem 1.6rem; font-size: 1.22rem; }

.leaflet-container {
  background: transparent !important;
}

.fullscreen-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(180deg, var(--overlay), rgba(0, 0, 0, 0.08));
  pointer-events: none;
}

.scene-black {
  position: fixed;
  inset: 0;
  z-index: 6;
  background: #000;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform-origin: center center;
}

/* Reduce scroll-linked rendering cost: isolate painting for fullscreen scenes */
.scene-map, .scene-black {
  contain: paint;
}

.scene-black-inner {
  width: 100%;
  max-width: 1200px;
  height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.scene-black-inner p {
  margin: 0;
  font-family: "Ponomar", "Old Standard TT", "Times New Roman", serif;
  font-size: clamp(2.5rem, 9.5vw, 6rem);
  line-height: 1.02;
  letter-spacing: 0.015em;
  color: #f2f4f6;
  text-shadow: 0 0.125rem 0.75rem rgba(255, 255, 255, 0.06);
  text-align: center;
  max-width: 96vw;
  word-break: break-word;
  opacity: 0.6;
}

@media (max-width: 600px) {
   /* Adjust map overlay opacity for better text readability on small screens */
   #map-overlay {
     opacity: 0.4;
   }
   /* Slightly increase touch target padding for reset button */
   #reset-view-btn {
     padding: 0.875rem 1.125rem;
   }
   /* Reduce the intensity of text shadows on small screens to reduce visual clutter */
   .settlement-label {
     text-shadow:
       0 0.1rem 0.5rem rgba(0, 0, 0, 0.75),
       0 0 0.8rem rgba(70, 255, 150, 0.15);
   }
   .settlement-label:hover {
     text-shadow:
       0 0.2rem 0.7rem rgba(0, 0, 0, 0.8),
       0 0 1.2rem rgba(80, 255, 165, 0.3);
   }
   /* Adjust the black scene inner text shadow */
   .scene-black-inner p {
     text-shadow: 0 0.1rem 0.6rem rgba(255, 255, 255, 0.05);
   }
}

/* Back to top arrow button */
.back-to-map {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 50%;
  width: 3.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 220ms ease;
  z-index: 10;
  -webkit-tap-highlight-color: transparent;
}

.back-to-map:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #072018;
  transform: translateX(-50%) translateY(-5px);
  box-shadow: 0 8px 24px rgba(35,196,142,0.22);
}

.back-to-map:active {
  transform: translateX(-50%) scale(0.92);
  transition: transform 50ms ease;
}

.back-to-map svg {
  transition: transform 220ms ease;
}

.back-to-map:hover svg {
  transform: translateY(-2px);
}
