#map-intro {
  --intro-gutter: clamp(20px, 6.3vw, 112px);
  --intro-top: max(32px, 5vh, env(safe-area-inset-top));
  --intro-mark: clamp(110px, 12vw, 195px);
  --intro-stack: 560px;
  --intro-night: 30, 16, 38;
  --intro-tint: .08;
  --intro-line: rgba(255, 255, 255, .16);
  position: fixed;
  z-index: 42;
  inset: 0;
  height: 100dvh;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: auto;
  overscroll-behavior: contain;
  color: #fff6ec;
  background: #1e1026;
  font-family: var(--atlas-body, DM, sans-serif);
}
.map-intro-stage {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: #1e1026;
  pointer-events: none;
}
.map-intro-stage picture, .map-intro-art {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}
.map-intro-stage picture[hidden] { display: none; }
.map-intro-no-art .map-intro-stage {
  background: linear-gradient(135deg, #511e59 12%, #b83469 58%, #f4a16b);
}
.map-intro-art { object-fit: cover; object-position: 64% 32%; }
/* The scrim, not a text shadow, is what keeps the copy readable over the art. */
.map-intro-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(var(--intro-night), .96), rgba(var(--intro-night), .8) 30%, rgba(var(--intro-night), .4) 50%, transparent 70%),
    linear-gradient(0deg, rgba(var(--intro-night), .8), transparent 46%),
    linear-gradient(180deg, rgba(var(--intro-night), .42), transparent 20%);
}
.map-intro-wordmark {
  position: relative;
  z-index: 1;
  flex: none;
  width: var(--intro-mark);
  height: auto;
  margin: var(--intro-top) 0 0 max(var(--intro-gutter), env(safe-area-inset-left));
  pointer-events: none;
}
/* Sits level with the wordmark; it comes last in the markup so the keyboard still starts on the map button. */
#map-intro .map-intro-install {
  position: absolute;
  z-index: 3;
  top: max(4px, calc(var(--intro-top) + var(--intro-mark) * .1326 - 22px));
  right: max(var(--intro-gutter), env(safe-area-inset-right));
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  font: 650 13px/1.2 var(--atlas-body, DM, sans-serif);
  letter-spacing: .01em;
  white-space: nowrap;
}
/* A 36px pill inside the 44px touch target. */
.map-intro-install::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4px 0;
  border: 1px solid var(--intro-line);
  border-radius: inherit;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.map-intro-controls {
  position: relative;
  z-index: 2;
  /* One column as wide as the action row needs, so the search lines up with it in every language. */
  display: grid;
  grid-template-columns: minmax(0, max-content);
  justify-items: start;
  width: min(100%, 900px);
  margin: auto 0 0;
  padding: 24px 20px max(20px, 4vh, env(safe-area-inset-bottom)) max(var(--intro-gutter), env(safe-area-inset-left));
  pointer-events: none;
}
.map-intro-controls > * { min-width: 0; }
/* Glass keeps a night tint under its sheen so white text holds 4.5:1 where it reaches the bright art. */
#map-intro :is(.map-intro-search, .map-intro-actions a, .map-intro-proof li),
.map-intro-install::before {
  background:
    linear-gradient(rgba(255, 255, 255, var(--intro-tint)), rgba(255, 255, 255, var(--intro-tint))),
    rgba(var(--intro-night), .56);
}
.map-intro-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(12px, 2vh, 20px);
  color: #ffd28d;
  font-size: clamp(12px, 1vw, 13px);
  font-weight: 750;
  line-height: 1.3;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.map-intro-label::before {
  content: "";
  width: 22px;
  height: 3px;
  background: #ff9db4;
  box-shadow: 6px 3px 0 #78e5cc;
  transform: skew(-16deg);
}
#map-intro .map-intro-title {
  margin: 0;
  font: italic 800 clamp(42px, min(7.2vw, 9.4vh), 96px)/.98 Poster, BC, sans-serif;
  text-transform: uppercase;
  letter-spacing: -.035em;
}
.map-intro-title span, .map-intro-title strong { display: block; }
.map-intro-title span {
  color: #fff3dc;
  font-size: .62em;
  line-height: .98;
  text-shadow: 2px 3px 0 #3e173e;
}
.map-intro-title strong {
  width: fit-content;
  padding-right: .09em;
  color: #ffbc84;
  font-weight: inherit;
  background: linear-gradient(175deg, #ffe09e 15%, #ffa47d 51%, #ff71af 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(2px 3px 0 #491636);
}
.map-intro-description {
  margin: clamp(12px, 1.8vh, 18px) 0 clamp(20px, 2.6vh, 28px);
  max-width: 40ch;
  font-size: clamp(16px, 1.3vw, 19px);
  font-weight: 500;
  line-height: 1.5;
  color: #f6eaf1;
}

/* Search reads first, then the two actions, then the proof and the small links. */
.map-intro-search {
  order: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  margin: 0 0 12px;
  padding: 0 6px 0 16px;
  border: 1px solid var(--intro-line);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 34px -22px #0a030e;
  pointer-events: auto;
}
.map-intro-search:focus-within {
  --intro-tint: .12;
  border-color: #ffd28d;
  box-shadow: 0 0 0 3px rgba(255, 210, 141, .42), 0 16px 34px -22px #0a030e;
}
.map-intro-search > .ic {
  width: 20px;
  height: 20px;
  color: #e3d1e2;
}
#map-intro .map-intro-search input {
  flex: 1;
  min-width: 0;
  height: 54px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #fff6ec;
  background: none;
  font: 500 16px/1.3 var(--atlas-body, DM, sans-serif);
  text-overflow: ellipsis;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
}
.map-intro-search input::placeholder { color: #d3c1d4; opacity: 1; }
/* Chromium keeps room for the clear button even while it is hidden, which cut the hint short. */
.map-intro-search input::-webkit-search-decoration,
.map-intro-search input::-webkit-search-cancel-button { display: none; -webkit-appearance: none; }
.map-intro-search button {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
}
.map-intro-search button .ic { width: 20px; height: 20px; }

.map-intro-actions {
  order: 2;
  display: flex;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  min-width: min(100%, var(--intro-stack));
}
.map-intro-actions :is(button, a) {
  flex: none;
  min-width: 0;
  min-height: 56px;
  border-radius: 16px;
  text-decoration: none;
  pointer-events: auto;
}
#map-intro .map-intro-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 28px;
  background: #ffd28d linear-gradient(100deg, #ffd28d, #ff9db4);
  box-shadow: 0 16px 32px -16px rgba(255, 132, 168, .8), inset 0 1px 0 rgba(255, 255, 255, .55);
  color: #241028;
  font-size: 17px;
  font-weight: 750;
}
.map-intro-actions button .ic { width: 20px; height: 20px; stroke-width: 2.2; }
#map-intro .map-intro-actions a {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  gap: 1px 12px;
  padding: 8px 12px;
  border: 1px solid var(--intro-line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  font-size: 16px;
  text-align: left;
}
.map-intro-plan-icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 210, 141, .14);
  color: #ffd28d;
}
.map-intro-plan-icon .ic { width: 20px; height: 20px; }
.map-intro-actions a > span { grid-column: 2; }
.map-intro-actions small {
  grid-column: 2;
  font: 500 13px/1.35 var(--atlas-body, DM, sans-serif);
  letter-spacing: 0;
  text-wrap: balance;
  color: #e2d2e3;
}
.map-intro-actions a > .ic {
  grid-column: 3;
  grid-row: 1 / 3;
  width: 18px;
  height: 18px;
  color: #d8c6da;
}

.map-intro-proof {
  order: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.map-intro-proof li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: #eadcea;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .01em;
  white-space: nowrap;
}
.map-intro-proof b {
  color: #ffd28d;
  font-weight: 750;
  font-variant-numeric: lining-nums tabular-nums;
}
.map-intro-proof .ic { width: 14px; height: 14px; stroke-width: 2.4; color: #78e5cc; }

.map-intro-links {
  order: 4;
  display: flex;
  align-items: center;
  gap: 0 24px;
  margin-top: 8px;
}
.map-intro-links :is(a, button) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font: 600 13px/1.3 var(--atlas-body, DM, sans-serif);
  letter-spacing: .01em;
  color: #dccbdd;
  text-decoration: none;
  text-underline-offset: 4px;
  white-space: nowrap;
  pointer-events: auto;
}
.map-intro-links .map-intro-pass { color: #ffd28d; }
#map-intro :is(button, a):focus-visible { outline: 3px solid #8cffe4; outline-offset: 4px; }
#map-intro .map-intro-search button:focus-visible { outline-offset: 1px; }
#map-intro button:hover:not(:disabled) { filter: none; }
.pwa-installed #map-intro [data-intro-install],
#map-intro.map-intro-offline :is([data-usage="intro_plan_open"], .map-intro-community, [data-intro-install]) { display: none; }
@media (hover: hover) {
  .map-intro-links :is(a, button):hover { color: #fff; text-decoration: underline; }
  #map-intro .map-intro-actions button:hover { background-image: linear-gradient(100deg, #ffdca6, #ffb0c3); }
  #map-intro .map-intro-actions a:hover { --intro-tint: .16; border-color: rgba(255, 255, 255, .3); }
  #map-intro .map-intro-search button:hover { background: rgba(255, 255, 255, .2); }
  .map-intro-install:hover { --intro-tint: .16; }
}
@media (prefers-reduced-motion: no-preference) {
  .map-intro-title, .map-intro-description, .map-intro-search, .map-intro-actions, .map-intro-proof {
    animation: map-intro-rise .35s ease-out both;
  }
  .map-intro-search, .map-intro-actions :is(button, a), .map-intro-search button, .map-intro-install::before {
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
  }
  @keyframes map-intro-rise {
    from { opacity: .65; transform: translateY(7px); }
  }
}
/* Portrait: the art breathes at the top and one block of actions sits in the thumb zone. */
@media (max-aspect-ratio: 1/1) {
  #map-intro {
    --intro-top: max(22px, env(safe-area-inset-top));
    --intro-stack: 520px;
  }
  .map-intro-stage picture { height: min(100%, 146vw); }
  .map-intro-art { object-position: 52% top; }
  .map-intro-stage::after {
    background:
      linear-gradient(0deg, #1e1026 12%, rgba(var(--intro-night), 0) 62%),
      linear-gradient(180deg, rgba(var(--intro-night), .5), transparent 18%);
  }
  .map-intro-controls {
    grid-template-columns: minmax(0, var(--intro-stack));
    width: 100%;
    padding: 0 max(var(--intro-gutter), env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(var(--intro-gutter), env(safe-area-inset-left));
  }
  .map-intro-controls::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -112px 0 0;
    background: linear-gradient(180deg, rgba(var(--intro-night), 0), rgba(var(--intro-night), .8) 112px, rgba(var(--intro-night), .95) 200px, #1e1026 300px);
  }
  #map-intro .map-intro-title { font-size: clamp(38px, 11vw, 72px); }
  .map-intro-actions { flex-direction: column; }
}
@media (max-width: 550px) {
  #map-intro {
    --intro-gutter: 20px;
    --intro-top: max(20px, env(safe-area-inset-top));
    overflow: hidden auto;
  }
  .map-intro-stage,
  .map-intro-stage picture,
  .map-intro-art { pointer-events: none; }
  .map-intro-label { margin-bottom: 8px; }
  #map-intro .map-intro-title { font-size: clamp(34px, 12vw, 52px); }
  .map-intro-description { margin: 8px 0 16px; font-size: 16px; }
  .map-intro-links { margin-top: 4px; }
}
@media (max-width: 350px) {
  #map-intro .map-intro-install { padding: 0 12px; }
  .map-intro-search { gap: 6px; padding: 0 4px 0 12px; }
  .map-intro-search > .ic { width: 18px; height: 18px; }
  .map-intro-search input::placeholder { font-size: 13px; }
  #map-intro .map-intro-actions a { grid-template-columns: minmax(0, 1fr) auto; padding-inline: 14px 10px; }
  .map-intro-plan-icon { display: none; }
  .map-intro-actions a > span, .map-intro-actions small { grid-column: 1; }
  .map-intro-actions small { font-size: 12px; }
  .map-intro-actions a > .ic { grid-column: 2; }
  .map-intro-proof { gap: 6px; }
  .map-intro-proof li { padding: 0 10px; font-size: 12px; }
  .map-intro-links { gap: 0 16px; }
  .map-intro-links :is(a, button) { font-size: 12px; }
}
/* Short phones keep the artwork's face clear: the label, headline and search already say what this is. */
@media (max-aspect-ratio: 1/1) and (max-height: 600px), (max-width: 350px) {
  #map-intro:not(.map-intro-offline) .map-intro-description { display: none; }
  #map-intro .map-intro-title { margin-bottom: 16px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  #map-intro {
    --intro-top: max(10px, env(safe-area-inset-top));
    --intro-mark: 93px;
  }
  .map-intro-controls { padding-block: 10px max(4px, env(safe-area-inset-bottom)); }
  #map-intro .map-intro-title { font-size: clamp(28px, 10vh, 44px); }
  .map-intro-label { margin-bottom: 5px; }
  .map-intro-description { font-size: 14px; margin: 6px 0 10px; }
  .map-intro-search { min-height: 48px; margin-bottom: 8px; }
  #map-intro .map-intro-search input { height: 46px; }
  .map-intro-actions :is(button, a) { min-height: 48px; }
  #map-intro .map-intro-actions a { padding-block: 4px; }
  .map-intro-plan-icon { width: 32px; height: 32px; }
  .map-intro-proof { margin-top: 8px; }
  .map-intro-links { margin-top: 0; }
}
@media (max-height: 400px) and (orientation: landscape) {
  #map-intro:not(.map-intro-offline) .map-intro-description { display: none; }
  #map-intro .map-intro-title { margin-bottom: 10px; }
}
@media (forced-colors: active) {
  .map-intro-title strong { -webkit-text-fill-color: CanvasText; filter: none; }
  .map-intro-actions :is(button, a), .map-intro-search button, .map-intro-proof li { border: 1px solid ButtonText; }
}
#map-session-entry:not([hidden]) {
  --entry-color: #ffd3a5;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 5px clamp(12px, 2vw, 28px);
  height: 54px;
  color: #fff4f0;
  border-bottom: 1px solid #715463;
  background: linear-gradient(106deg, #4c2247, #311a38 53%, #292440);
  box-shadow: inset 0 -2px #f1769a6e;
  font-family: var(--atlas-body, DM, sans-serif);
}
#map-session-entry a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  min-width: 0;
  gap: 10px;
  text-decoration: none;
}
#map-session-plan {
  color: #fff4e9;
}
#map-session-plan:hover b, #map-session-entry [data-intro-replay]:hover { text-decoration: underline; }
.map-session-route-icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--entry-color);
  color: #3b2132;
}
.map-session-route-icon .ic { width: 19px; height: 19px; }
.map-session-plan-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.map-session-plan-copy b { font-size: 15px; line-height: 1.12; }
.map-session-plan-copy small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  color: #e2cdd9;
}
#map-session-context:not(:empty)::before { content: " · "; }
#map-session-plan > .ic { width: 15px; height: 15px; flex: none; color: var(--entry-color); }
.map-session-end { display: flex; align-items: center; gap: 12px; flex: none; }
#map-session-entry [data-intro-replay] {
  flex: none;
  gap: 7px;
  font-size: 12px;
  color: #ffdbed;
}
.map-session-film {
  display: grid;
  place-items: center;
  width: 39px;
  height: 27px;
  color: white;
  border: 1px solid #a47191;
  border-radius: 5px;
  background: linear-gradient(#2a132b70,#2a132b90),url(/assets/gtatlas-leonida-panel.webp) 68% 34%/cover;
}
.map-session-film .ic { width: 12px; height: 12px; fill: currentColor; }
#map-session-entry:not([hidden]) + .workspace {
  height: calc(100dvh - var(--pwa-mast, 68px) - 54px);
}
@media (display-mode: standalone) {
  #map-session-entry:not([hidden]) + .workspace {
    height: calc(100dvh - var(--pwa-mast,68px) - 54px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}
@media (max-width: 720px) {
  .map-session-plan-copy small:has(#map-session-context:not(:empty)) .map-session-free { display: none; }
  #map-session-context:not(:empty)::before { content: none; }
  #map-session-entry:not([hidden]) + .workspace { --pwa-mast: 58px; }
}
@media (max-width: 350px) {
  #map-session-entry:not([hidden]) { gap: 6px; padding-inline: 8px; }
  #map-session-entry a { gap: 6px; }
  .map-session-plan-copy b { font-size: 13px; }
  .map-session-film { width: 23px; }
  .map-session-route-icon { width: 27px; height: 27px; }
  #map-session-plan > .ic { display: none; }
  #map-session-entry [data-intro-replay] { font-size: 11px; }
}
