@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;600&display=swap');
body {
  font-family: system-ui, Arial, sans-serif;
  margin: 0;
  overflow: hidden;
}
body.modal-open {
  overflow: hidden;
}
/* --- Country highlight states --- */

.country-clicked {
  opacity: 0.80;
}

.country-movedhere {
  stroke: #9900ff !important;
  stroke-width: 2 !important;
}

.country-movedaway {
  stroke: #00ff00 !important;
  stroke-width: 2 !important;
}
.small-marker-movedhere {
  fill: none;
  stroke: #9900ff;
  stroke-width: 2px;
  opacity: 0.95;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.small-marker-movedaway {
  fill: none;
  stroke: #00ff00;
  stroke-width: 2px;
  opacity: 0.95;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
/* --- Labels (constant screen size) --- */

.country-label {  
  font-family: system-ui, Arial, sans-serif;
  font-size: 34px;
  fill: #111;

  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 9px;
  stroke-linejoin: round;

  user-select: none;
}

.country-label-former {
  font-size: 30px;
  fill: #222;
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 4px;
  stroke-linejoin: round;
  paint-order: stroke;
}
#g8023, #g13, #g5 {
  pointer-events: none !important;
}
#path2814 {
  stroke: #f2f2f2 !important; /* replace with your land fill colour */
  stroke-opacity: 1 !important;
}
#map-title {
  font-family: system-ui, Arial, sans-serif;
  font-size: 120px;
  fill: #111;
  pointer-events: none;
}
/* --- App layout --- */

#app {
  min-height: 100vh;
}

#legend {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 260px;
  padding: 18px 16px;

  background: #e6ebf5;
color: #2b2f38;

  border-radius: 0;
  box-shadow:
    10px 10px 20px rgba(0, 0, 0, 0.22),
    -10px -10px 20px rgba(255, 255, 255, 0.16);

  z-index: 10000;

  display: flex;
  flex-direction: column;
  gap: 8px;

  overflow-y: auto;
  overflow-x: hidden;
}

#legend-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 10px;
  text-align: center;
}

#legend-subtitle {
  font-size: 14px;
  opacity: 0.92;
  line-height: 1.45;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  text-align: center;
}
.subtitle-line {
  display: block;
  margin-top: 0;
}
.legend-subtitle-main {
  text-align: center;
}

.legend-edition {
  display: block;
  margin-top: 6px;

  font-size: 11px;
  line-height: 1.2;

  text-align: right;
  opacity: 0.9;
}
#legend-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.legend-btn {
  appearance: none;
  border: 0;

  background: #eef2fa;
  color: #2b2f38;

  padding: 18px 14px;
  min-height: 60px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;

  display: flex;
  flex-direction: column;
  align-items: center;

  font-size: 14px;
  line-height: 1.3;
  white-space: normal;

  box-shadow:
  6px 6px 12px rgba(0, 0, 0, 0.12),
  -6px -6px 12px rgba(255, 255, 255, 0.70);
}
.legend-btn-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.legend-btn-subtitle {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.25;
  opacity: 0.82;
}
.legend-maps-card {
  gap: 8px;
}

.maps-preview {
  width: 100%;
  max-width: 160px;
  height: 80px;
  overflow: hidden;
  border-radius: 6px;
  margin-top: 6px;
}

.maps-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
  transition: opacity 0.8s ease;
}
#buy-print-btn,
.legend-link {
  box-shadow:
    6px 6px 12px rgba(0, 0, 0, 0.20),
    -6px -6px 12px rgba(255, 255, 255, 0.14);
}

#buy-print-btn:active,
.legend-link:active {
  box-shadow:
    inset 6px 6px 12px rgba(0, 0, 0, 0.20),
    inset -6px -6px 12px rgba(255, 255, 255, 0.14);
}

.legend-btn:hover {
  box-shadow:
    8px 8px 14px rgba(0, 0, 0, 0.24),
    -8px -8px 14px rgba(255, 255, 255, 0.16);
}

.legend-btn:active {
  box-shadow:
    inset 6px 6px 12px rgba(0, 0, 0, 0.20),
    inset -6px -6px 12px rgba(255, 255, 255, 0.14);
}

#buy-print-btn:hover {
  background: #2bb3a3;
}

.legend-spacer {
  height: 6px;
}

.legend-shop-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.legend-link {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;

  text-align: center;
  text-decoration: none;
  white-space: normal;

  color: white;

  box-shadow:
    6px 6px 12px rgba(0, 0, 0, 0.20),
    -6px -6px 12px rgba(255, 255, 255, 0.14);
}

.legend-link-main {
  display: block;
  font-family: 'Roboto Slab', serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.legend-link-sub {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
  opacity: 0.95;
}

.legend-link-physical {
  background: #f28a2e;
  padding: 18px 14px;
}

.legend-link-digital {
  background: #b2a9f3;
  font-family: 'Roboto Slab', serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  padding: 14px 14px;
}

.legend-link:hover {
  filter: brightness(1.02);
}

#legend-footer {
  margin-top: auto;
  font-size: 12px;
  line-height: 1.4;
  color: #6f7785;
  opacity: 1;
}

.legend-footer-label {
  font-weight: 700;
  margin-bottom: 4px;
}

.legend-footlink {
  display: block;
  color: inherit; /* match footer grey */
  text-decoration: none;
  margin-top: 3px;
  word-break: break-word;
}

.legend-footlink:hover {
  text-decoration: underline;
}
.legend-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 6px;
}

#mobile-legend-toggle {
  display: none;
}

#mobile-legend-backdrop {
  display: none;
}

#mobile-legend-close {
  display: none;
}

#map-area {
  position: fixed;
  left: 260px;
  top: 0;
  right: 0;
  bottom: 0;

  padding: 0;
  overflow: hidden;
  background: #ffffff;

  cursor: grab;
}

#map-area svg {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  opacity: 0;
}


#map-area.is-panning {
  cursor: grabbing;
}

body.is-dragging-map {
  user-select: none;
}

#map-area.is-ready svg {
  opacity: 1;
}

/* --- Modal (popup) --- */

#modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35); /* this is the “backdrop” */
  z-index: 20000;
  display: none;
}

#modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(720px, calc(100vw - 40px));
  height: min(85vh, 760px);
  max-height: 85vh;

  background: #fff;
  color: #111;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.25);
  z-index: 20001;

  display: none;
  overflow: hidden;
  flex-direction: column;
}
#modal.is-open {
  display: flex;
}



#modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e6e6e6;
}

#modal-title {
  font-weight: 800;
  font-size: 24px;
}

#modal-close {
  border: 0;
  background: transparent;

  font-size: 24px;
  line-height: 1;

  width: 32px;
  height: 32px;
  padding: 0;

  cursor: pointer;
}

#modal-body {
  padding: 18px 45px;

  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;

  font-size: 16px;
  line-height: 1.55;
}

.more-maps-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.more-maps-item {
  padding: 12px 10px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fafafa;
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;

  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.more-maps-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.more-maps-thumb-link {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border-radius: 8px;
}

.more-maps-thumb-link:hover {
  transform: translateY(-3px);
}

.more-maps-thumb {
  display: block;
  width: 90px;
  max-width: 90px;
  height: auto;
  max-height: 60px;
  margin-bottom: 6px;
  opacity: 0.9;
}

.more-maps-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.more-maps-link {
  display: block;
  margin-top: 6px;
  color: #2b2f38;
  text-decoration: none;
  font-weight: 600;
}

.more-maps-link:hover {
  text-decoration: underline;
}
.modal-image {
  display: block;
  width: 100%;
  height: auto;
  margin: 6px 0;
  border-radius: 6px;
}
.modal-media {
  margin: 6px 0 10px 0;
}

.modal-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px; /* optional; remove if you want sharp corners */
}
#map-area.is-zooming #Map\ 1\:\ ne_10m_admin_0_countries g {
  stroke: rgba(255, 255, 255, 0.16) !important;
  stroke-width: 0.3px !important;
  stroke-opacity: 1 !important;
}

#map-area.is-zooming #Map\ 1\:\ Lines {
  display: none !important;
}

#map-area.is-zooming .country-label {
  opacity: 0.72 !important;
}

#map-area.is-zooming .country-label-former {
  display: none !important;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.shop-item {
  text-align: center;
  background: #ffffff;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shop-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.shop-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 5px;
}

.shop-item p {
  margin-top: 8px;
  font-size: 14px;
}
#legend-footer {
  margin-top: auto;
  padding-top: 36px;
  font-size: 13px;
  color: #666;
  text-align: center;
}

.legend-footer-divider {
  width: 80%;
  height: 1px;
  background: #d8dbe0;
  margin: 10px auto 12px auto;
}

.legend-contact {
  margin-bottom: 22px;
}

.legend-contact a {
  color: #4a7;
  text-decoration: none;
}

.legend-contact a:hover {
  text-decoration: underline;
}

.legend-sources {
  line-height: 1.45;
}

.legend-sources a {
  color: inherit;
  text-decoration: none;
}

.legend-sources a:hover {
  text-decoration: underline;
}
#map-area.is-panning svg {
  cursor: grabbing;
}

#map-area.is-panning #Map\ 1\:\ ne_10m_admin_0_countries g {
  stroke: none !important;
}
#Map\ 1\:\ Lines path {
  stroke: #918e8e !important;
}
#map-area.is-panning #Map\ 1\:\ Lines {
  display: none !important;
}
.more-maps-thumb-link {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border-radius: 8px;
}

.more-maps-thumb-link:hover {
  transform: translateY(-3px);
}

.more-maps-thumb {
  display: block;
  width: 90px !important;
  max-width: 90px !important;
  height: auto !important;
  max-height: 60px !important;
  margin-bottom: 6px;
  opacity: 0.9;
}
.more-maps-item {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.more-maps-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
@media (max-width: 700px) {
  #mobile-legend-toggle {
    display: block;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 30002;

    border: 0;
    border-radius: 10px;
    padding: 10px 14px;

    background: #eef2fa;
    color: #2b2f38;
    font-family: system-ui, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;

    box-shadow:
      6px 6px 12px rgba(0, 0, 0, 0.12),
      -6px -6px 12px rgba(255, 255, 255, 0.70);
  }

  #mobile-legend-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.28);
    z-index: 30000;
  }

  body.mobile-legend-open #mobile-legend-backdrop {
    display: block;
  }

  #mobile-legend-close {
    display: block;
    align-self: flex-end;
    margin-bottom: 4px;

    border: 0;
    background: transparent;
    color: #2b2f38;

    font-size: 28px;
    line-height: 1;
    cursor: pointer;
  }

  #legend {
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 82vw);
    max-width: 82vw;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    z-index: 30001;
  }

  body.mobile-legend-open #legend {
    transform: translateX(0);
  }

  #map-area {
    left: 0;
  }

  #legend-footer {
    padding-bottom: 12px;
  }
  #map-area .country-label {
    font-size: 120px !important;
  }

  #map-area .country-label-former {
    font-size: 105px !important;
  }
}