:root {
  color-scheme: dark;
  font-family: "Avenir Next", Avenir, system-ui, sans-serif;
  --ink: #0b131c;
  --light: #f1ede5;
  --muted: #b9c3cb;
  --amber: #e9bc7b;
  --panel: #111c27;
  background: var(--ink);
  color: var(--light);
}

* { box-sizing: border-box; }
body { margin: 0; }
button, a { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible {
  outline: 2px solid #f7d296;
  outline-offset: 4px;
}
[hidden] { display: none !important; }

.welcome {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 2.35rem clamp(1.4rem, 7vw, 7.5rem) 3.25rem;
  overflow: hidden;
}
.welcome-art, .welcome-art::after {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.welcome-art {
  background: #111d28 url("/explorer-terrain.webp") 56% 47% / cover no-repeat;
}
.welcome-art::after {
  content: "";
  z-index: 0;
  background:
    linear-gradient(90deg, #071117e8, #081219ad 31%, transparent 68%),
    linear-gradient(0deg, #09121a97, transparent 37%);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-weight: 750;
  letter-spacing: .21em;
  font-size: 1.03rem;
}
.brand-mark {
  display: inline-block;
  flex: none;
  width: 1.62rem;
  height: 1.62rem;
  border: 1px solid #ebc78a9e;
  border-radius: 50%;
  position: relative;
}
.brand-mark::before, .scout-needle {
  content: "";
  position: absolute;
  inset: 20%;
  background: linear-gradient(to bottom, #f6ce8f 0 49%, #b28552 51% 100%);
  clip-path: polygon(50% 0, 79% 67%, 50% 56%, 21% 67%);
  transform: rotate(29deg);
}
.welcome-content {
  align-self: center;
  padding-block: 3.4rem 1.5rem;
  width: min(100%, 47rem);
}
.level {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--amber);
  font-size: .82rem;
  font-weight: 750;
  letter-spacing: .19em;
  text-transform: uppercase;
  margin: 0 0 1.25rem;
}
.level span {
  width: .42rem;
  height: .42rem;
  background: var(--amber);
  transform: rotate(45deg);
}
h1 {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(3.25rem, 6.4vw, 6.45rem);
  line-height: .99;
  letter-spacing: -.065em;
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}
h1 em { font-weight: inherit; color: #f1cd98; }
.welcome-copy {
  font-size: clamp(1rem, 1.45vw, 1.13rem);
  max-width: 26rem;
  line-height: 1.6;
  color: #d4dce1;
  margin: 1.45rem 0 1.9rem;
}
.entry { display: grid; gap: .72rem; width: min(100%, 19.5rem); }
.entry button, .entry a {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 3.05rem;
  border-radius: .55rem;
  font-weight: 670;
  text-decoration: none;
  transition: background 160ms, border-color 160ms;
}
.primary {
  color: #19120b;
  border: 1px solid #f7d59d;
  background: #edbd79;
}
.primary:hover { background: #ffd79d; }
.secondary {
  color: var(--light);
  border: 1px solid #e6ebf081;
  background: #121d27ba;
}
.secondary:hover { background: #263541; }
.entry a {
  color: #f3d3a4;
  min-height: 2.5rem;
  text-decoration: underline;
  text-decoration-color: #c99659;
  text-underline-offset: .27em;
}
.entry a:hover { color: #fff3dd; }
.account-notice {
  margin: .2rem 0 0;
  padding: .7rem .8rem;
  border-left: 2px solid var(--amber);
  background: #0b151ee6;
  color: #f1ede5;
  font-size: .9rem;
  line-height: 1.45;
}

.game, #map { position: fixed; inset: 0; overflow: hidden; }
#map { background-color: #101820; }
.leaflet-container { font-family: inherit; }
.game-brand, .map-button, .map-notice, .collect-card {
  position: absolute;
  z-index: 800;
  background: #101b26;
  color: var(--light);
  border: 1px solid #394654;
  box-shadow: 0 4px 22px #050b1280;
}
.game-brand {
  top: max(.9rem, env(safe-area-inset-top));
  left: max(.9rem, env(safe-area-inset-left));
  border-radius: .65rem;
  padding: .72rem .82rem;
  display: grid;
  gap: .33rem;
}
.game-brand .wordmark { font-size: .82rem; }
.game-brand .brand-mark { width: 1.35rem; height: 1.35rem; }
.game-level { font-size: .79rem; color: #e7c698; margin-left: 2.05rem; }
.map-button {
  top: max(.9rem, env(safe-area-inset-top));
  right: max(.9rem, env(safe-area-inset-right));
  border-radius: .6rem;
  min-height: 2.8rem;
  padding: .56rem .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .84rem;
  font-weight: 650;
}
.map-button:hover, .deselect:hover { background: #233240; }
.tree-icon {
  width: 1.22rem;
  height: 1.25rem;
  flex: none;
  position: relative;
  display: inline-block;
  color: #efc68c;
  background:
    linear-gradient(currentColor, currentColor) center 29% / 1px 29% no-repeat,
    linear-gradient(currentColor, currentColor) center 57% / 66% 1px no-repeat,
    linear-gradient(currentColor, currentColor) 16% 64% / 1px 28% no-repeat,
    linear-gradient(currentColor, currentColor) 84% 64% / 1px 28% no-repeat;
}
.tree-icon::after {
  content: '';
  position: absolute;
  width: .36rem;
  height: .36rem;
  border-radius: 50%;
  background: currentColor;
  top: 1px;
  left: calc(50% - .18rem);
  box-shadow: -.41rem .8rem currentColor, .41rem .8rem currentColor;
}
.deselect {
  background: #16232e;
  border: 1px solid #637481;
  color: var(--light);
  border-radius: .45rem;
  min-height: 2.65rem;
  padding: .3rem .56rem;
  font-size: .82rem;
}
.map-notice {
  bottom: max(7.5rem, calc(env(safe-area-inset-bottom) + 6.7rem));
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: .42rem .7rem;
  border-radius: .45rem;
  color: #e9cdab;
  font-size: .82rem;
  width: max-content;
  max-width: calc(100vw - 2rem);
}
.world-fog { position: absolute; pointer-events: none; }
.scout-marker {
  appearance: none;
  border-radius: 50%;
  background: #13212de6;
  border: 2px solid #ffe3a7;
  box-shadow: 0 0 0 4px #e9bc7b59, 0 1px 12px #000d;
  pointer-events: none;
}
.scout-needle {
  inset: 17%;
  transform: rotate(var(--bearing, 0deg));
  clip-path: polygon(50% 0, 86% 76%, 50% 61%, 14% 76%);
}
.physical-marker { display: grid; place-items: center; }
.physical-marker.overlapped::before {
  position: absolute;
  inset: 0;
  content: "";
  border: 2px solid #85b7ff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #2b74db4a;
}
.physical-marker span {
  display: block;
  width: 15px;
  height: 15px;
  background: #3386ff;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 5px #2b74db4a, 0 2px 10px #13223c99;
}
.discovered-object { filter: drop-shadow(0 2px 2px #061429aa); }
.discovered-object.is-learned {
  border-radius: 50%;
  outline: 2px solid #f0c888;
  outline-offset: 2px;
  background: #152534;
  filter: drop-shadow(0 0 5px #c4924b96);
}
.discovered-object.is-collected { outline-color: #ffe4ad; box-shadow: 0 0 9px #f0c888; }
.discovered-object.is-historical { outline: 1px dashed #9aa9b5; border-radius: 50%; }
.discovered-object:focus-visible { outline: 2px solid #fff0c3; outline-offset: 3px; }

.collect-card {
  bottom: max(2.15rem, calc(env(safe-area-inset-bottom) + 1.55rem));
  left: 50%;
  transform: translateX(-50%);
  width: min(27rem, calc(100vw - 8rem));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  padding: .68rem .75rem;
  border-radius: .75rem;
}
.collect-icon { object-fit: contain; }
.collect-details p { margin: 0; line-height: 1.35; }
#collect-name { font-size: .93rem; font-weight: 740; overflow-wrap: anywhere; }
#collect-status { margin-top: .18rem; color: #c9d6e2; font-size: .84rem; }
.collection-panel {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(31rem, 48vw);
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(1.6rem, env(safe-area-inset-top)) max(1.3rem, env(safe-area-inset-right))
    max(1.45rem, env(safe-area-inset-bottom)) max(1.3rem, env(safe-area-inset-left));
  border: 0;
  border-inline-start: 1px solid #415163;
  background: radial-gradient(ellipse at 85% 1%, #223751, transparent 43%), #0d1928;
  color: var(--light);
  box-shadow: -12px 0 44px #050a1166;
}
.collection-panel[open] { animation: open-collection 190ms ease-out; }
.collection-panel::backdrop { background: transparent; }
@keyframes open-collection {
  from { translate: 1.1rem 0; opacity: 0; }
  to { translate: 0 0; opacity: 1; }
}
.collection-header { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.collection-header h2 {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(1.85rem, 3.2vw, 2.7rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -.025em;
  margin: 0;
}
.collection-close { flex: 0 0 auto; min-width: 3.25rem; min-height: 2.75rem; }
.collection-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: 1rem 0;
}
.collection-summary div {
  display: grid;
  gap: .16rem;
  padding: .66rem .73rem;
  border: 1px solid #455269;
  border-radius: .65rem;
  background: #101c2b;
}
.collection-summary strong { color: #f3cd94; font-size: 1.44rem; font-variant-numeric: tabular-nums; }
.collection-summary span { color: #c3cfde; font-size: .85rem; }
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(11.4rem, 100%), 1fr));
  gap: .52rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.collection-category {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr);
  align-items: center;
  gap: .45rem;
  min-height: 3.72rem;
  padding: .46rem;
  border: 1px solid #2f4054;
  border-radius: .56rem;
  background: #101d2d;
}
.collection-category img { width: 2.35rem; height: 2.35rem; filter: saturate(.32) brightness(.74); }
.collection-category.category-found { border-color: #8e754e; background: #21303a; }
.collection-category.category-found img { filter: none; }
.category-name, .category-status { margin: 0; line-height: 1.3; overflow-wrap: anywhere; }
.category-name { font-size: .86rem; font-weight: 710; }
.category-status { margin-top: .18rem; color: #b1bfd0; font-size: .76rem; }
.category-found .category-status, .badge-earned .category-status { color: #f2cd91; }

.tree-tabs {
  display: grid;
  grid-template-columns: 1fr .85fr 1.3fr;
  gap: .25rem;
  margin: 1.25rem 0 .6rem;
  padding: .25rem;
  border: 1px solid #3a4e63;
  border-radius: .73rem;
  background: #0c1824;
}
.tree-tabs button {
  min-height: 2.75rem;
  padding: .35rem .4rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  color: #c7d4df;
  background: transparent;
  font-size: .88rem;
  font-weight: 700;
}
.tree-tabs button[aria-selected="true"] { border-color: #88673c; color: #ffe0aa; background: #3b3024; }
.tree-tabs button:hover { background-color: #28384a; }
.tree-note { margin: .9rem 0 1rem; color: #c1ceda; font-size: .87rem; line-height: 1.55; }
.badges-summary { grid-template-columns: 1fr 1fr; }
.badge-grid, .badge-activity, .growth-domains { list-style: none; padding: 0; }
.badge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: 0;
}
.badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: .64rem .24rem;
  border: 1px solid #344659;
  border-radius: .65rem;
  background: #101d2c;
}
.badge-crest {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  margin-bottom: .5rem;
  border: 1px solid #526071;
  border-radius: 50%;
  background: radial-gradient(circle, #283545, #192332 62%, #303b47 65%, #141d28 70%);
  box-shadow: inset 0 0 0 3px #131d28;
}
.badge-crest img { width: 2.3rem; height: 2.3rem; filter: grayscale(1) brightness(.72); }
.badge-earned {
  border-color: #b38a54;
  background: radial-gradient(ellipse at top, #55402b 1%, #2c2c2a 55%, #1c2833);
}
.badge-earned .badge-crest {
  border-color: #dfac63;
  box-shadow: inset 0 0 0 3px #644723, 0 0 20px #eaa85842;
  background: radial-gradient(circle, #884f21, #68491e 65%, #b38b4f 70%);
}
.badge-earned img { filter: drop-shadow(0 0 3px #f1cd8d80); }
#badge-opportunities h3 { margin: 0; font-size: 1rem; }
.badge-activity { display: grid; gap: .4rem; margin: .55rem 0 1.1rem; }
.badge-activity li {
  padding: .4rem .55rem .4rem .7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  background: #142333;
  border: 1px solid #36495c;
  border-radius: .58rem;
}
.badge-activity .category-status { font-variant-numeric: tabular-nums; }
.badge-activity button { min-height: 2.5rem; flex-shrink: 0; }
.growth-figure {
  margin: 0;
  padding: .45rem .75rem .8rem;
  border: 1px solid #3b4e62;
  border-radius: .75rem;
  background: radial-gradient(ellipse at 50% 30%, #1f3141, #101c2a 78%);
}
#growth-chart { display: block; width: 100%; max-width: 25rem; height: auto; margin: 0 auto; }
.growth-domains { display: grid; gap: .2rem; margin: 0; }
.growth-domains li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2rem;
  padding: .3rem .42rem;
  border-bottom: 1px solid #304257;
  color: #d3dfea;
  font-size: .86rem;
}
.growth-domains li:last-child { border: 0; }
.growth-count { color: #f6cf95; font-variant-numeric: tabular-nums; }

.challenge-panel {
  width: min(32rem, calc(100vw - 1.5rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: clamp(.95rem, 4vw, 1.5rem);
  border: 1px solid #67747d;
  border-radius: .95rem;
  overscroll-behavior: contain;
  background: radial-gradient(ellipse at top right, #273b52, transparent 57%), #0d1927;
  color: var(--light);
  box-shadow: 0 12px 65px #030a13c9;
}
.challenge-panel::backdrop { background: #060d16a3; }
.challenge-panel[data-badge-result="true"] {
  position: fixed;
  inset: auto 0 max(.75rem, calc(env(safe-area-inset-bottom) + .4rem));
  z-index: 805;
  margin: 0 auto;
  max-height: 36dvh;
  padding: .65rem .8rem;
}
.challenge-panel[data-badge-result="true"] .challenge-header { padding-bottom: .4rem; }
.challenge-panel[data-badge-result="true"] .challenge-header img { width: 34px; height: 34px; }
.challenge-panel[data-badge-result="true"] .challenge-feedback { margin-top: .4rem; padding: .5rem; }
.challenge-panel[data-badge-result="true"] #challenge-prompt,
.challenge-panel[data-badge-result="true"] #challenge-grid,
.challenge-panel[data-badge-result="true"] #challenge-options,
.challenge-panel[data-badge-result="true"] #challenge-order { display: none; }
.challenge-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .7rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid #3a4d60;
}
.challenge-header h2 {
  margin: .24rem 0 0;
  font: 400 clamp(1.3rem, 4vw, 1.8rem) / 1.1 Georgia, serif;
  overflow-wrap: anywhere;
}
.challenge-header button { min-width: 3.2rem; min-height: 2.75rem; }
.challenge-topic { margin: 0; color: #eac488; font-size: .76rem; font-weight: 650; }
#challenge-prompt { margin: 1rem 0 .78rem; font-size: 1rem; line-height: 1.48; }
#challenge-options { display: grid; gap: .38rem; }
#challenge-options button {
  width: 100%;
  min-height: 2.75rem;
  padding: .55rem .6rem;
  text-align: left;
  color: #efeff0;
  background: #172738;
  border: 1px solid #42566c;
  border-radius: .48rem;
}
#challenge-options button:hover:not(:disabled) { background: #20354b; }
#challenge-options button[aria-pressed="true"] { color: #ffe2ab; border-color: #bd945c; background: #3a3027; }
.option-number:not(:empty) {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  margin-right: .4rem;
  border-radius: 50%;
  color: #201b18;
  background: #f0c98d;
}
#challenge-grid { border-collapse: collapse; margin: 0 auto .85rem; color: #e8ebef; }
#challenge-grid td {
  width: 2.7rem;
  height: 2.2rem;
  border: 1px solid #52677c;
  text-align: center;
  font-size: .82rem;
}
#challenge-grid td:nth-child(2) { border-right: 2px solid #c09356; }
#challenge-grid tr:nth-child(2) { border-bottom: 2px solid #c09356; }
.challenge-order, .challenge-feedback { margin: .75rem 0 0; font-size: .87rem; line-height: 1.5; }
.challenge-order:empty, .challenge-feedback:empty, #challenge-panel .challenge-actions:has(button[hidden] + button[hidden]) { display: none; }
.challenge-order { color: #ead4ae; }
.challenge-feedback {
  padding: .68rem;
  border: 1px solid #755d45;
  border-radius: .55rem;
  background: #352b24;
  color: #ffe1b5;
}
.challenge-feedback[data-result="correct"] { background: #192f2e; border-color: #557968; color: #e5f4e6; }
.challenge-actions { display: flex; justify-content: flex-end; gap: .55rem; margin-top: .8rem; }
.challenge-actions button { min-height: 2.75rem; padding: .45rem .75rem; border-radius: .5rem; }
.challenge-actions button:disabled { opacity: .58; cursor: default; }

@property --badge-elapsed {
  syntax: '<angle>';
  inherits: true;
  initial-value: 0deg;
}
.hunt-marker { pointer-events: none !important; }
.hunt-medallion {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: .2rem;
  width: max-content;
  margin: 0 auto;
  padding: .25rem .31rem .33rem;
  border: 1px solid #e6b86d;
  border-radius: .8rem;
  background: #141c28;
  box-shadow: 0 0 0 2px #101620, 0 3px 20px #f0b56472;
  color: #ffe4ae;
  font: 790 .85rem/1.1 system-ui, sans-serif;
  pointer-events: auto;
  transform: translateX(var(--badge-shift, 0px));
}
.hunt-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.22rem;
  height: 3.22rem;
  border-radius: 50%;
  background: #504132;
  transition: --badge-elapsed 250ms linear;
}
.hunt-ring::before {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg var(--badge-elapsed, 0deg),
    #ffc964 var(--badge-elapsed, 0deg), #ffe8a5 360deg);
  mask-image: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  content: '';
}
.hunt-emblem {
  display: grid;
  place-items: center;
  width: 2.47rem;
  height: 2.47rem;
  border: 1px solid #f0c37a;
  border-radius: 50%;
  background: linear-gradient(#fff0be, #d99744);
}
.hunt-emblem::before {
  width: 69%;
  height: 69%;
  background: #4d2f1c;
  clip-path: polygon(50% 0%, 62% 34%, 99% 36%, 70% 59%, 81% 96%, 50% 74%, 19% 96%, 30% 59%, 1% 36%, 38% 34%);
  content: '';
}
.hunt-clock {
  min-width: 2.55rem;
  text-align: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.hunt-stem {
  position: absolute;
  bottom: 0;
  left: calc(50% - 1px);
  height: var(--badge-stem-height, 34px);
  border-left: 2px dashed #f0bd72cc;
  transform: rotate(var(--badge-stem-angle, 0rad));
  transform-origin: bottom;
}
.hunt-marker::before {
  position: absolute;
  bottom: -3px;
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  border: 1px solid #442e1b;
  border-radius: 50%;
  background: #f9d58f;
  content: '';
}
.hunt-marker:focus-visible .hunt-medallion {
  outline: 2px solid #fff0c3;
  outline-offset: 3px;
}
.badge-actions {
  position: absolute;
  top: max(5.9rem, calc(env(safe-area-inset-top) + 5.25rem));
  left: 50%;
  z-index: 810;
  display: grid;
  gap: .42rem;
  width: max-content;
  max-width: calc(100% - 1.65rem);
  transform: translateX(-50%);
  pointer-events: none;
}
.badge-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  width: min(21rem, calc(100vw - 1.65rem));
  padding: .35rem .42rem .35rem .7rem;
  color: #ffe8c2;
  border: 1px solid #dbac64;
  border-radius: .65rem;
  background: #1b242d;
  box-shadow: 0 4px 20px #000b;
  pointer-events: auto;
  font-size: .86rem;
  font-weight: 700;
}
.badge-action button {
  flex: none;
  min-height: 2.75rem;
  padding: .38rem .72rem;
  border-radius: .45rem;
}
.badge-action button:disabled { opacity: .64; cursor: wait; }
.badge-claim-notice {
  position: absolute;
  top: max(10rem, calc(env(safe-area-inset-top) + 9.4rem));
  left: 50%;
  z-index: 820;
  width: max-content;
  max-width: calc(100% - 1.65rem);
  margin: 0;
  padding: .55rem .75rem;
  transform: translateX(-50%);
  color: #ffe4ad;
  border: 1px solid #8f704b;
  border-radius: .55rem;
  background: #16222d;
  font-size: .82rem;
  pointer-events: none;
}
.hunt-popup { max-width: 15rem; color: #f3ede2; }
.hunt-popup strong { color: #f5d097; }
.hunt-popup p { margin: .45rem 0 0; line-height: 1.4; }
.leaflet-popup-content-wrapper:has(.hunt-popup), .leaflet-popup:has(.hunt-popup) .leaflet-popup-tip {
  background: #182737;
}
.leaflet-popup:has(.hunt-popup) a.leaflet-popup-close-button { color: #e1e9ef; }
.hunt-reward::after {
  display: block;
  width: 100%;
  height: 100%;
  border: 3px solid #ffdb9c;
  border-radius: 50%;
  box-shadow: 0 0 24px #e9ae60, inset 0 0 12px #e9ae60;
  animation: badge-burst 850ms ease-out both;
  content: '';
}
@keyframes badge-burst {
  from { transform: scale(.35); opacity: 1; }
  to { transform: scale(1.45); opacity: 0; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.leaflet-bar { border: 1px solid #455462 !important; }
.leaflet-bar a {
  min-width: 44px;
  height: 44px;
  line-height: 44px;
  background: #111d28;
  color: #f1ede5;
  border-bottom-color: #455462;
}
.leaflet-bar a:hover { background: #243444; }
.leaflet-bar a.leaflet-disabled { background: #111d28; color: #87939d; }
.leaflet-container .leaflet-control-attribution {
  background: #0f1a24;
  color: #c4ced7;
}
.leaflet-control-attribution a { color: #e6c58f; }

@media (max-width: 670px) {
  .welcome { padding-top: max(1.55rem, env(safe-area-inset-top)); }
  .welcome-art { background-position: 61% 47%; }
  .welcome-art::after {
    background: linear-gradient(0deg, #08131b 6%, #08131bdf 42%, #08131b36 80%),
      linear-gradient(90deg, #08131b5e, transparent 74%);
  }
  .welcome-content { align-self: end; padding: 7.15rem 0 0; }
  .level { margin-bottom: .9rem; font-size: .76rem; }
  h1 { font-size: clamp(2.85rem, 10.7vw, 4.5rem); }
  .welcome-copy { margin: 1.1rem 0 1.38rem; }
  .entry { width: 100%; max-width: 24rem; }
  .collect-card {
    left: max(.65rem, env(safe-area-inset-left));
    transform: none;
    max-width: calc(100vw - 4.6rem);
  }
  .collect-card { width: max-content; min-height: 3.75rem; }
  .collection-panel { width: 100%; border: 0; }
  .deselect { min-height: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .entry button, .entry a { transition: none; }
  .collection-panel[open], .hunt-reward::after { animation: none; }
}

.game.initializing { visibility: hidden; }
.map-startup {
  display: grid;
  justify-items: start;
  gap: .7rem;
  max-width: 24rem;
  margin-top: 1.05rem;
  padding: 1rem 1.1rem;
  border: 1px solid #806a4a;
  border-radius: .75rem;
  background: #101b26ee;
}
.map-startup p { margin: 0; font-weight: 650; }
.map-startup small { color: #c3cfde; line-height: 1.4; }
.map-startup[data-searching="true"] p::before {
  display: inline-block;
  width: .85rem;
  height: .85rem;
  margin-right: .55rem;
  vertical-align: -.05rem;
  border: 2px solid #7a674c;
  border-top-color: #f3cd94;
  border-radius: 50%;
  animation: startup-spin 1s linear infinite;
  content: '';
}
@keyframes startup-spin { to { transform: rotate(360deg); } }
.map-actions {
  position: absolute;
  z-index: 800;
  display: grid;
  justify-items: end;
  gap: .35rem;
  top: max(4.2rem, calc(env(safe-area-inset-top) + 3.3rem));
  right: max(.9rem, env(safe-area-inset-right));
}
#digital-mode {
  margin: 0;
  padding: .45rem .65rem;
  border: 1px solid #637481;
  border-radius: .45rem;
  color: #ebc998;
  background: #16232e;
  font-size: .82rem;
}
.digital-instruction { bottom: max(2.1rem, calc(env(safe-area-inset-bottom) + 1.55rem)); }
.object-progress {
  pointer-events: none;
  border-radius: 50%;
  background: conic-gradient(#ffe2a1 var(--explored, 0%), #132333bc 0);
  mask-image: radial-gradient(transparent 56%, black 58%);
  box-shadow: inset 0 0 5px #d59e4b;
}
.map-tutorial {
  position: absolute;
  z-index: 720;
  width: max-content;
  max-width: min(15.5rem, calc(100% - 18px));
  margin: 0;
  padding: .63rem .8rem;
  border: 1px solid #ddba84;
  border-radius: .75rem;
  background: #172733;
  box-shadow: 0 5px 19px #08101acc;
  color: #fff0d8;
  pointer-events: none;
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.4;
}
.map-tutorial::after {
  position: absolute;
  left: calc(var(--tail-x, 50%) - 5px);
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid #ddba84;
  border-bottom: 1px solid #ddba84;
  background: #172733;
  transform: rotate(45deg);
  content: '';
}
.map-tutorial[data-side="below"]::after {
  top: -6px;
  bottom: auto;
  transform: rotate(225deg);
}
.badge-celebration {
  position: absolute;
  z-index: 800;
  left: 50%;
  top: max(5.6rem, calc(env(safe-area-inset-top) + 4.7rem));
  margin: 0;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: .75rem 1rem;
  border: 1px solid #e8ba75;
  border-radius: .75rem;
  background: #172931;
  color: #ffe1a4;
  text-align: center;
  box-shadow: 0 4px 24px #0009;
  animation: celebrate-badge 540ms ease-out;
}
@keyframes celebrate-badge {
  0% { transform: translate(-50%, -.45rem) scale(.88); opacity: 0; }
  55% { transform: translateX(-50%) scale(1.06); opacity: 1; }
  100% { transform: translateX(-50%) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .map-startup[data-searching="true"] p::before, .badge-celebration { animation: none; }
  .hunt-ring { transition: none; }
}
