/* The Zeden map page: the landing page's tokens, the map filling the screen under a thin bar. Phone first. */

:root {
  --ink: #0f1113;
  --ink-2: #16191c;
  --ink-3: #1d2024;
  --paper: #e7e9ec;
  --paper-soft: #b7bcc2;
  --grey: #9aa0a6;
  --rule: rgba(255, 255, 255, 0.12);
  --green: #46D839;            /* Livonia's toxic green */
  --font-display: 'Barlow Condensed', 'Arial Narrow', Impact, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bar: 52px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--paper-soft); font-family: var(--font-body); -webkit-text-size-adjust: 100%; }
body { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
a { color: var(--paper); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--paper); outline-offset: 2px; }

/* the bar */
.bar { flex: 0 0 var(--bar); display: flex; align-items: center; gap: 10px; padding: 0 10px 0 12px; background: var(--ink); border-bottom: 1px solid var(--rule); padding-top: env(safe-area-inset-top); }
.bar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); flex: 0 0 auto; }
.bar__mark { width: 34px; height: 30px; display: block; }
.bar__title { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; line-height: 1; display: flex; flex-direction: column; }
.bar__sub { font-weight: 600; font-size: 11px; letter-spacing: .14em; color: var(--green); margin-top: 3px; }
.bar__spot { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar__hint { font-size: 12px; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__coords { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: .04em; color: var(--paper); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar__copy { flex: 0 0 auto; font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: var(--green); border: 0; border-radius: 3px; padding: 7px 10px 6px; cursor: pointer; }
.bar__copy.is-done { background: var(--paper); }
.bar__search { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 3px; border: 1px solid var(--rule); background: var(--ink-3); color: var(--paper); cursor: pointer; display: grid; place-items: center; padding: 0; }
.bar__search[aria-expanded="true"] { background: var(--green); color: var(--ink); border-color: var(--green); }
@media (min-width: 720px) { .bar__title { font-size: 26px; } .bar__hint { font-size: 14px; } }
@media (max-width: 400px) { .bar__hint { display: none; } }

/* search */
.search { position: absolute; top: calc(var(--bar) + env(safe-area-inset-top)); left: 0; right: 0; z-index: 800; background: var(--ink-2); border-bottom: 1px solid var(--rule); padding: 10px 12px 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.search[hidden] { display: none; }
.search__in { width: 100%; font: 500 17px/1.3 var(--font-body); color: var(--paper); background: var(--ink); border: 1px solid var(--rule-strong, rgba(255,255,255,.22)); border-radius: 3px; padding: 11px 12px; outline: none; }
.search__in:focus { border-color: var(--green); }
.search__list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.search__list:empty { display: none; }
.search__list button { display: flex; justify-content: space-between; align-items: baseline; width: 100%; text-align: left; font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: .04em; text-transform: uppercase; color: var(--paper); background: var(--ink-3); border: 1px solid var(--rule); border-radius: 3px; padding: 10px 12px 8px; cursor: pointer; }
.search__list button span { font-weight: 600; font-size: 12px; letter-spacing: .12em; color: var(--green); }
.search__list button:hover, .search__list button:focus { border-color: var(--green); }

/* the map */
.stage { position: relative; flex: 1 1 auto; min-height: 0; }
.map { position: absolute; inset: 0; background: #d9d4c7; }
.leaflet-container { font-family: var(--font-body); }
.leaflet-bar { border: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.leaflet-bar a { background: var(--ink-3); color: var(--paper); border-bottom: 1px solid var(--rule); width: 40px; height: 40px; line-height: 40px; font-size: 22px; }
.leaflet-bar a:hover, .leaflet-bar a:focus { background: var(--ink-2); color: var(--green); }
.leaflet-bar a.leaflet-disabled { color: #555; }
.leaflet-bottom.leaflet-right .leaflet-control-zoom { margin: 0 12px 64px 0; }
.leaflet-popup-content-wrapper { background: var(--ink-3); color: var(--paper-soft); border-radius: 4px; box-shadow: 0 4px 16px rgba(0, 0, 0, .45); }
.leaflet-popup-tip { background: var(--ink-3); }
.leaflet-popup-content { margin: 12px 14px; font-size: 14px; line-height: 1.45; max-width: 240px; }
.leaflet-popup-content strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: .05em; text-transform: uppercase; color: var(--paper); margin-bottom: 3px; }
.leaflet-popup-content .popup__where { display: block; margin-top: 6px; font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: .04em; color: var(--green); }
.leaflet-container a.leaflet-popup-close-button { color: var(--grey); font-size: 20px; padding: 6px 6px 0 0; }

/* place names: text on the map, no pin */
.place { font-family: var(--font-display); font-weight: 800; color: #2b2622; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; text-shadow: 0 0 3px #ece8dd, 0 0 6px #ece8dd, 0 0 2px #ece8dd; pointer-events: none; transform: translate(-50%, -50%); width: auto !important; height: auto !important; }
.place--city { font-size: 17px; letter-spacing: .1em; }
.place--village { font-size: 13px; }
.place--local, .place--camp, .place--marine, .place--ruin { font-size: 11px; font-weight: 600; color: #4a4038; }
.place--hill { font-size: 11px; font-weight: 600; color: #5a4a3a; font-style: italic; text-transform: none; letter-spacing: .02em; }

/* our markers */
.mark { transform: translate(-50%, -50%); width: auto !important; height: auto !important; }
.mark__metro { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 26px; text-align: center; border: 2px solid var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, .4); }
.mark__spot { display: block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--green); background: rgba(70, 216, 57, .18); box-shadow: 0 0 0 2px rgba(15, 17, 19, .6); }
.zone-label { font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #1d5a16; text-shadow: 0 0 3px #ece8dd, 0 0 5px #ece8dd; white-space: nowrap; pointer-events: none; transform: translate(-50%, 12px); width: auto !important; height: auto !important; }
.zone-label--gas { color: #7a4d00; }
.zone-label--above { transform: translate(-50%, -110%); }

/* the grid's numbers ride the edges */
.gridlabels { position: absolute; pointer-events: none; z-index: 500; }
.gridlabels--top { left: 0; right: 0; top: 0; height: 18px; }
.gridlabels--left { top: 0; bottom: 0; left: 0; width: 22px; }
.gridlabels span { position: absolute; font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: .06em; color: var(--paper); background: rgba(15, 17, 19, .72); padding: 1px 4px 0; border-radius: 2px; line-height: 15px; transform: translateX(-50%); }
.gridlabels--left span { transform: translateY(-50%); }

/* the layer buttons */
.layers { position: absolute; top: 24px; right: 12px; z-index: 600; display: flex; flex-direction: column; gap: 6px; }
.layers__btn { font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); background: rgba(15, 17, 19, .85); border: 1px solid var(--rule); border-radius: 3px; padding: 8px 10px 7px; min-width: 64px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.layers__btn.is-on { color: var(--ink); background: var(--green); border-color: var(--green); }

/* about */
.about__btn { position: absolute; left: 12px; bottom: 12px; z-index: 600; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rule); background: rgba(15, 17, 19, .85); color: var(--paper); font-family: var(--font-display); font-weight: 800; font-size: 18px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); padding-bottom: env(safe-area-inset-bottom); }
.about { position: absolute; left: 12px; right: 12px; bottom: 56px; z-index: 700; max-width: 420px; background: var(--ink-3); border: 1px solid var(--rule); border-radius: 4px; padding: 12px 14px; font-size: 13px; line-height: 1.5; box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }
.about p { margin: 0 0 8px; }
.about p:last-child { margin: 0; }
.about code { font-size: 12px; color: var(--paper); word-break: break-all; }
.about[hidden] { display: none; }
