/* VizBible journey maps */
  #app > header { padding: 10px 12px 8px; background: var(--panel); border-bottom: 1px solid var(--line); z-index: 800; }
  .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
  .top h1 { margin: 0; }
  .seg { flex: none; display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
  .seg button { border: 0; background: transparent; color: var(--ink); font: 600 12.5px/1 inherit; padding: 8px 12px; min-height: 34px; cursor: pointer; }
  .seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
  .seg button:focus-visible { outline: 3px solid var(--j2); outline-offset: -3px; }
  #app h1 { font: 600 17px/1.2 var(--serif); margin: 0; letter-spacing: .1px; }
  .chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line);
    background: transparent; color: var(--ink); border-radius: 999px; padding: 7px 12px; font: 500 13px/1 inherit; cursor: pointer; min-height: 34px; }
  .chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); display: inline-block; }
  .chip[aria-pressed="true"] { background: var(--c, var(--ink)); border-color: var(--c, var(--ink)); color: #fff; }
  .chip[aria-pressed="true"] i { background: #fff; }
  @media (prefers-color-scheme: dark) {
    .chip[aria-pressed="true"] { color: #0d151a; }
    .chip[aria-pressed="true"] i { background: #0d151a; }
  }
  .chip:focus-visible { outline: 3px solid var(--j2); outline-offset: 2px; }
  #summary { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
  #summary b { color: var(--ink); font-weight: 600; }
  #map { flex: 1; min-height: 0; --sea: #bcd9e6; --land: #f1eddf; --border: #b9b19b; background: var(--sea); }
  @media (prefers-color-scheme: dark) { #map { --sea: #0f2430; --land: #1f2c2b; --border: #3d4d4b; } }
  .leaflet-container { background: var(--sea); }
  #map { --prov: #a4502a; --ctry: #7a4f8f; }
  @media (prefers-color-scheme: dark) { #map { --prov: #e0a05f; --ctry: #c79be0; } }
  .place { font: italic 600 13px/1 Palatino, Georgia, serif; white-space: nowrap; transform: translate(-50%, -50%); width: max-content;
    color: #5d7f90; letter-spacing: .12em; pointer-events: none; text-shadow: none; }
  .place.land { color: #8b836c; font-style: normal; font-weight: 700; letter-spacing: .14em; font-size: 11.5px; }
  @media (prefers-color-scheme: dark) { .place { color: #5f8799; } .place.land { color: #78857f; } }
  .z-low .place.fine { display: none; }
  .key { position: absolute; left: 10px; bottom: 22px; z-index: 700; background: var(--panel); color: var(--muted);
    border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 11.5px; line-height: 1.5; pointer-events: none; }
  .key svg { vertical-align: middle; margin-right: 5px; }

  /* city markers */
  .pin { width: 26px; height: 26px; display: grid; place-items: center; }
  .pin span { width: 17px; height: 17px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); transition: transform .15s; }
  .pin:hover span, .leaflet-marker-icon:focus .pin span { transform: scale(1.25); }
  .leaflet-marker-icon:focus { outline: none; }
  .leaflet-marker-icon:focus-visible .pin span { outline: 3px solid var(--j2); outline-offset: 2px; }

  /* city name labels */
  .leaflet-tooltip.lbl { background: transparent; border: 0; box-shadow: none; padding: 0 0 0 4px; font: 600 11.5px/1 inherit; color: #14242c;
    text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 5px #fff, 0 0 5px #fff; pointer-events: none; }
  .leaflet-tooltip.lbl::before { display: none; }
  @media (prefers-color-scheme: dark) {
    .leaflet-tooltip.lbl { color: #eaf1f4; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 5px #000, 0 0 5px #000; }
  }
  .z-low .leaflet-tooltip.lbl:not(.major) { display: none; }

  /* journey name labels on the sea */
  .jl { font: 700 12px/1 Palatino, Georgia, serif; white-space: nowrap; color: #fff; padding: 5px 9px; border-radius: 5px;
    background: var(--c); box-shadow: 0 1px 4px rgba(0,0,0,.35); transform: translate(-50%, -50%); width: max-content; }

  /* popups */
  .leaflet-popup-content-wrapper { background: var(--panel); color: var(--ink); border-radius: 12px; box-shadow: 0 6px 22px rgba(0,0,0,.35); }
  .leaflet-popup-tip { background: var(--panel); }
  .leaflet-popup-content { margin: 14px 16px 12px; }
  .pp { max-height: 52vh; overflow-y: auto; padding-right: 4px; -webkit-overflow-scrolling: touch; }
  .pp h3 { font: 700 19px/1.15 Palatino, "Palatino Linotype", "Iowan Old Style", Georgia, serif; margin: 0; }
  .pp .mod { margin: 2px 0 10px; font-size: 12.5px; color: var(--muted); }
  .pp section { border-left: 4px solid var(--c); padding: 2px 0 2px 10px; margin: 0 0 11px; }
  .pp h4 { margin: 0 0 3px; font-size: 13px; font-weight: 700; color: var(--c); }
  .pp p { margin: 0 0 5px; font-size: 14px; line-height: 1.45; }
  .pp a.ref { display: inline-block; font-size: 12.5px; font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--c) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); padding: 3px 8px; border-radius: 6px; text-decoration: none; }
  .leaflet-container a.leaflet-popup-close-button { color: var(--muted); font-size: 22px; padding: 6px 8px 0 0; width: 30px; height: 30px; }
  .leaflet-control-attribution { font-size: 10px; }
  /* direction arrows + start/end badges */
  .arr { width: 18px; height: 18px; }
  .arr svg { width: 18px; height: 18px; display: block; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.5)); }
  .badge { width: max-content; font: 700 10.5px/1 inherit; color: #fff; background: var(--c); padding: 4px 7px; border-radius: 999px;
    border: 1.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); white-space: nowrap; pointer-events: none; }
  @media (prefers-color-scheme: dark) { .badge { color: #0d151a; border-color: #0d151a; } }
  /* city images in popups */
  .imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 11px; }
  .imgs:empty { display: none; }
  .imgs figure { margin: 0; min-width: 0; }
  .imgs svg.ph { height: auto; }
  .imgs .ph { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 7px; background: var(--line); }
  .imgs figcaption { font-size: 10.5px; line-height: 1.3; color: var(--muted); margin-top: 3px; }
  .imgs figcaption b { color: var(--ink); font-weight: 700; display: block; }
  .imgs figcaption a { color: var(--muted); text-decoration: underline; }
  .imgs.one { grid-template-columns: 1fr; }
  .imgs.loading { min-height: 80px; border-radius: 7px; background: linear-gradient(90deg, var(--line), transparent, var(--line)); background-size: 200% 100%; animation: sh 1.2s linear infinite; }
  @keyframes sh { to { background-position: -200% 0; } }
  @media (prefers-reduced-motion: reduce) { .pin span { transition: none; } .imgs.loading { animation: none; } }
/* page layout for the map pages */
body.journey-page { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
body.journey-page #app { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.sitenav { flex: none; }
/* step-through bar */
.stepper { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.stepper[hidden] { display: none; }
.stepper button { border: 1.5px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 6px 14px; min-height: 34px; font: 600 13px/1 var(--sans); cursor: pointer; }
.stepper button:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.stepper .lbl2 { font-size: 13px; color: var(--muted); }
/* extra popup links */
.pp .xl { font-size: 13px; margin: 2px 0 8px; color: var(--muted); }
.pp .xl a { color: var(--accent); font-weight: 600; }
.pp .xl.share a { font-weight: 500; color: var(--muted); }
@media (max-width: 600px) { .key { display: none; } }

/* base-map switcher + label styles that follow the chosen base map, not the device theme */
.leaflet-control-layers { border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,.3); font: 600 13px/1.2 var(--sans); color: #14242c; }
.leaflet-control-layers-expanded { padding: 8px 12px 6px; }
.leaflet-control-layers label { display: block; padding: 4px 0; cursor: pointer; }
.leaflet-control-layers-selector { margin-right: 6px; }
#map.base-light { --prov: #a4502a; --ctry: #7a4f8f; }
#map.base-dark  { --prov: #e8b06f; --ctry: #d4aaea; }
#map.base-light .place { color: #5d7f90; text-shadow: none; } #map.base-light .place.land { color: #8b836c; }
#map.base-dark .place { color: #bcd6e2; text-shadow: 0 0 3px #000, 0 0 4px #000; } #map.base-dark .place.land { color: #e3dcc0; }
#map.base-light .leaflet-tooltip.lbl { color: #14242c; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 5px #fff, 0 0 5px #fff; }
#map.base-dark .leaflet-tooltip.lbl { color: #eaf1f4; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 5px #000, 0 0 5px #000; }
#map.base-light .badge { color: #fff; border-color: #fff; } #map.base-dark .badge { color: #0d151a; border-color: #0d151a; }
