/* One compact, persistent footer for the homepage. Other pages keep their
   own document-flow footer; the homepage's existing footer is never cloned. */
.overworld-home {
  --home-footer-height: 48px;
  padding-bottom: calc(var(--home-footer-height) + env(safe-area-inset-bottom, 0px));
}
html[data-world="overworld"] {
  scroll-padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
}
.overworld-home #main-content :is(a, button, [tabindex]) {
  scroll-margin-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
}
.overworld-home .home-footer a:focus-visible { outline-offset: -3px; }

html .overworld-home .home-footer {
  position: fixed;
  z-index: 25;
  inset: auto 0 0;
  width: 100%;
  height: calc(var(--home-footer-height) + env(safe-area-inset-bottom, 0px));
  min-height: 0;
  margin: 0;
  padding: 0 0 env(safe-area-inset-bottom, 0px);
  border-top: 1px solid var(--world-border);
  background: var(--world-surface);
  box-shadow: 0 -3px 18px #0000000c;
}

.overworld-home .home-footer > .home-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: calc(100% - clamp(16px, 3.5vw, 64px) * 2);
  max-width: none;
  height: calc(var(--home-footer-height) - 1px);
  min-height: 0;
  margin-inline: auto;
  padding: 0;
}

.overworld-home .home-footer .home-footer__credit {
  grid-column: 1;
  margin: 0;
  min-width: 0;
  color: var(--world-muted);
  font: 400 13px/1.3 "Exo 2", sans-serif;
  white-space: nowrap;
}

.overworld-home .home-footer .home-footer__place {
  color: var(--world-muted);
}

.overworld-home .home-footer .home-footer__townhall {
  grid-column: 3;
  display: inline-flex;
  align-items: center;
  justify-self: end;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  min-width: 44px;
  margin: 0;
  padding: 4px 0 4px 8px;
  color: var(--world-text);
  font: 500 13px/1.3 "Exo 2", sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.overworld-home .home-footer .home-footer__townhall > svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--world-gold);
}

.overworld-home .home-footer .home-footer__townhall > svg:not(:first-child) {
  width: 12px;
  height: 12px;
}

.overworld-home .home-footer .home-footer__townhall > small {
  color: var(--world-muted);
  font: 400 11px/1.3 "Exo 2", sans-serif;
}

.overworld-home .home-footer .home-footer__townhall:hover > span {
  color: var(--world-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.overworld-home .home-footer .journey-hud {
  position: static;
  grid-column: 2;
  grid-row: 1;
  width: auto;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  gap: 0;
}

.overworld-home .home-footer .journey-hud__place,
.overworld-home .home-footer .journey-hud__hint {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.overworld-home .home-footer .journey-hud__stops {
  display: flex;
  position: relative;
  align-items: center;
  grid-column: 1;
  grid-row: 1;
  gap: 4px;
  height: 44px;
}

.overworld-home .home-footer .journey-hud__stops a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 5px 10px;
  border: 0;
  background: transparent;
  color: var(--world-muted);
  font: 400 12px/1.3 "Exo 2", sans-serif;
  white-space: nowrap;
}

.overworld-home .home-footer .journey-hud__stops a[aria-current] {
  color: var(--world-gold);
  background: var(--world-raised);
}

.overworld-home .home-footer .journey-hud__stops a::after {
  content: none;
}

.overworld-home .home-footer .journey-hud__stops a:hover {
  color: var(--world-text);
  background: var(--world-raised);
}

.overworld-home .home-footer .journey-hud__progress {
  top: 0;
  bottom: auto;
  left: 0;
  right: 0;
  height: 1px;
}

@media (max-width: 1099px), (max-height: 649px) {
  .overworld-home .home-footer > .home-container {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .overworld-home .home-footer .home-footer__townhall {
    grid-column: 2;
  }

  .overworld-home .home-footer .journey-hud {
    display: none;
  }
}

@media (max-width: 800px) {
  .overworld-home .home-footer .home-footer__place {
    display: none;
  }
}

@media (max-width: 380px) {
  .overworld-home .home-footer .home-footer__credit,
  .overworld-home .home-footer .home-footer__townhall {
    font-size: 12px;
  }

  .overworld-home .home-footer .home-footer__townhall {
    gap: 6px;
  }
}

@media print {
  .overworld-home { padding-bottom: 0; }

  html .overworld-home .home-footer {
    position: static;
    height: auto;
    padding: 8px 0;
    box-shadow: none;
  }

  .overworld-home .home-footer > .home-container {
    grid-template-columns: minmax(0, 1fr) auto;
    height: auto;
  }

  .overworld-home .home-footer .home-footer__townhall { grid-column: 2; }
  .overworld-home .home-footer .journey-hud { display: none !important; }
}
