body[data-sim-loading] #scene,
body[data-sim-loading] .tm-zoom {
  visibility: hidden;
}

.tm-loading-levels {
  position: absolute;
  inset-block-start: calc(var(--top-h, 64px) + 76px);
  inset-inline-end: clamp(12px, 3vw, 44px);
  display: grid;
  justify-items: stretch;
  gap: 8px;
  max-block-size: min(55dvh, 30rem);
  max-inline-size: min(50vw, 23rem);
  overflow: auto;
  padding: 12px;
}

.tm-loading-levels .tb {
  justify-content: start;
  text-align: start;
}

body:not([data-sim-loading]) .tm-loading-levels,
.townmap.has-brief .tm-loading-levels {
  display: none;
}

/* While the town loads: daylight instead of a dark void, and the Today card says what is happening. */
body[data-sim-loading] { background: linear-gradient(180deg, #bcdcf3 0%, #d9ecf4 38%, #cfe6b6 62%, #a9d08c 100%); }
.jr-load { display: flex; align-items: center; gap: .55em; margin: .1em 0 0; font-size: .86em; font-weight: 600; color: var(--ink-2, #44537c); }
.jr-load::before { content: ""; flex: none; width: 1em; height: 1em; border-radius: 50%; border: .18em solid currentColor; border-inline-end-color: transparent; animation: jr-spin .8s linear infinite; }
body:not([data-sim-loading]) .jr-load, .jr-load[hidden] { display: none; }
@keyframes jr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .jr-load::before { animation: none; } }

.sim-drive-loading {
  margin: 0;
  padding: 0 1em 1em;
  color: var(--ink-2);
}

.sim-garage-loading {
  display: grid;
  place-items: center;
}

.sim-garage-loading p {
  padding: 1em 1.5em;
}

@media (max-width: 640px) {
  .tm-loading-levels {
    inset: calc(var(--top-h, 64px) + 7rem) 12px 6rem;
    max-block-size: none;
    max-inline-size: none;
    align-content: start;
  }
}
