/* Astral presentation layer. The inline atlas styles remain the no-canvas fallback. */
:root {
  --astral-void: #050914;
  --astral-deep: #08101f;
  --astral-panel: rgba(12, 22, 38, 0.78);
  --astral-panel-strong: rgba(11, 19, 34, 0.94);
  --astral-line: rgba(196, 220, 239, 0.14);
  --astral-line-bright: rgba(165, 229, 231, 0.38);
  --astral-ink: #f2f5fb;
  --astral-muted: #aab8ca;
  --astral-cyan: #9fe7e8;
  --astral-gold: #e7c992;
  --astral-lilac: #c9b8f0;
  --astral-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  background: var(--astral-void);
}

body {
  background:
    radial-gradient(circle at 48% 39%, rgba(42, 75, 113, 0.18), transparent 34%),
    radial-gradient(circle at 9% 82%, rgba(97, 67, 125, 0.12), transparent 31%),
    linear-gradient(148deg, #070c18 0%, #050914 58%, #080c18 100%);
  color: var(--astral-ink);
  font-family: Inter, ui-sans-serif, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--astral-cyan);
  outline-offset: 3px;
}

.site-header {
  height: 68px;
  flex: 0 0 68px;
  padding: 0 clamp(18px, 3vw, 46px);
  border-bottom: 1px solid rgba(207, 228, 244, 0.1);
  background: rgba(5, 9, 20, 0.74);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.brand {
  gap: 12px;
}

.brand svg {
  width: 27px;
  height: 31px;
  filter: drop-shadow(0 0 14px rgba(159, 231, 232, 0.16));
}

.wordmark {
  color: #f6f2ed;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  letter-spacing: 0.055em;
}

.brand-sub {
  margin-left: 4px;
  padding-left: 17px;
  color: #98a8bc;
  border-left-color: rgba(255, 255, 255, 0.13);
  font-size: 9px;
  letter-spacing: 0.17em;
}

.demo {
  min-height: 32px;
  padding: 6px 11px;
  color: #b7c3d2;
  border: 1px solid rgba(231, 201, 146, 0.17);
  border-radius: 999px;
  background: rgba(231, 201, 146, 0.045);
  font-size: 10px;
  letter-spacing: 0.045em;
}

.demo::before {
  width: 6px;
  height: 6px;
  background: var(--astral-gold);
  box-shadow: 0 0 13px rgba(231, 201, 146, 0.52);
}

.shell {
  isolation: isolate;
  min-height: calc(100svh - 68px);
  background:
    linear-gradient(180deg, rgba(10, 18, 33, 0.42), transparent 25%),
    radial-gradient(ellipse at 50% 45%, rgba(25, 48, 78, 0.24), transparent 56%);
}

.shell::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.34) 0 0.6px, transparent 0.9px),
    radial-gradient(circle at 78% 17%, rgba(159, 231, 232, 0.28) 0 0.7px, transparent 1px),
    radial-gradient(circle at 61% 75%, rgba(201, 184, 240, 0.22) 0 0.7px, transparent 1px);
  background-size: 151px 137px, 223px 197px, 181px 211px;
  content: "";
  opacity: 0.35;
  pointer-events: none;
}

.intro {
  width: 100%;
  padding: 20px clamp(20px, 3vw, 46px) 14px;
  align-items: flex-end;
  gap: clamp(20px, 4vw, 58px);
}

.intro-copy {
  max-width: 720px;
}

.chapter {
  margin-bottom: 4px;
  color: var(--astral-gold);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.25em;
}

h1 {
  max-width: 760px;
  color: #f6f4f1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(35px, 3.2vw, 54px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.032em;
  text-wrap: balance;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.34);
}

.subtitle {
  max-width: 570px;
  margin-top: 9px;
  color: #aebdce;
  font-size: 12px;
  line-height: 1.55;
}

.toolbar {
  width: min(410px, 42vw);
  max-width: 410px;
  flex: 0 0 auto;
  padding: 10px;
  gap: 8px;
  border: 1px solid var(--astral-line);
  border-radius: 15px;
  background: rgba(9, 17, 31, 0.62);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.search,
.view-toggle,
.trace-prominent,
.lore-opener,
.source-opener,
.connection-opener {
  min-height: 44px;
}

.search {
  max-width: none;
  padding: 9px 12px;
  border-color: rgba(211, 230, 244, 0.16);
  border-radius: 10px;
  background: rgba(2, 8, 18, 0.52);
}

.search:focus-within {
  border-color: var(--astral-line-bright);
  box-shadow: 0 0 0 3px rgba(159, 231, 232, 0.07);
}

.search input {
  min-width: 0;
  width: 100%;
}

.view-toggle,
.trace-prominent,
.lore-opener,
.source-opener,
.connection-opener {
  border-radius: 10px;
  transition: border-color 240ms var(--astral-ease), background-color 240ms var(--astral-ease), color 240ms var(--astral-ease);
}

.view-toggle {
  padding: 9px 13px;
  border-color: rgba(211, 230, 244, 0.17);
  background: rgba(255, 255, 255, 0.025);
}

.view-toggle:hover,
.trace-prominent:hover,
.source-opener:hover,
.connection-opener:hover {
  border-color: rgba(159, 231, 232, 0.42);
  background: rgba(159, 231, 232, 0.1);
}

.lore-opener:hover {
  border-color: rgba(201, 184, 240, 0.48);
  background: rgba(201, 184, 240, 0.12);
}

.discovery-actions {
  gap: 8px;
}

.workspace {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 clamp(10px, 1.8vw, 28px) 12px;
}

.map-column {
  position: relative;
  display: grid;
  grid-template-rows: 52px minmax(430px, 1fr) auto auto;
  min-height: 0;
  height: 100%;
}

.filters {
  z-index: 5;
  min-height: 56px;
  padding: 7px 10px 5px;
  gap: 5px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter {
  min-height: 44px;
  padding: 8px 12px;
  border-color: transparent;
  font-size: 10px;
  letter-spacing: 0.025em;
  transition: color 220ms var(--astral-ease), background-color 220ms var(--astral-ease), border-color 220ms var(--astral-ease);
}

.filter:hover {
  background: rgba(255, 255, 255, 0.04);
}

.filter[aria-pressed="true"] {
  color: #f4efff;
  border-color: rgba(201, 184, 240, 0.35);
  background: rgba(201, 184, 240, 0.1);
  box-shadow: inset 0 0 18px rgba(201, 184, 240, 0.04);
}

.count {
  position: sticky;
  right: 0;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 7px 10px;
  border: 1px solid var(--astral-line);
  border-radius: 999px;
  background: rgba(7, 13, 25, 0.84);
  color: #8fa0b6;
}

.stage {
  position: relative;
  grid-row: 2;
  width: 100%;
  height: 100%;
  min-height: 430px;
  max-height: none;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(194, 221, 240, 0.12);
  border-radius: clamp(18px, 2vw, 28px);
  background:
    radial-gradient(circle at 50% 49%, rgba(61, 112, 145, 0.2) 0%, rgba(27, 50, 79, 0.12) 20%, transparent 45%),
    radial-gradient(ellipse at 23% 76%, rgba(124, 83, 146, 0.1), transparent 42%),
    linear-gradient(145deg, rgba(8, 16, 31, 0.66), rgba(3, 8, 18, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    inset 0 -80px 120px rgba(0, 0, 0, 0.16),
    0 30px 90px rgba(0, 0, 0, 0.28);
  contain: layout paint;
}

.stage::before {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: min(62vw, 760px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(147, 222, 227, 0.105) 0%, rgba(91, 119, 162, 0.055) 34%, transparent 69%);
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.stage::after {
  position: absolute;
  z-index: 4;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.3);
  content: "";
  pointer-events: none;
}

.starfield {
  z-index: 0;
  opacity: 0.62;
}

.connections {
  z-index: 1;
}

.astral-canvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.astral-renderer-ready #stage,
#stage.astral-renderer-ready {
  touch-action: none;
}

.astral-initializing:not(.astral-renderer-ready) #nodes,
.astral-initializing:not(.astral-renderer-ready) #connections {
  opacity: 0;
}

.nodes {
  z-index: 3;
  pointer-events: none;
}

#stage.astral-renderer-ready #nodes,
.astral-renderer-ready #stage #nodes {
  inset: 0;
}

.node {
  min-width: 96px;
  min-height: 56px;
  padding: 5px 7px;
  pointer-events: auto;
  transition: opacity 260ms var(--astral-ease), filter 260ms var(--astral-ease);
}

.node-label {
  max-width: 132px;
  padding: 4px 8px;
  border: 1px solid rgba(207, 228, 244, 0.13);
  border-radius: 999px;
  background: rgba(4, 10, 21, 0.68);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.24);
  color: #e6edf6;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  text-shadow: 0 2px 8px #02050c;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.node-kind {
  max-width: 124px;
  margin-top: 5px;
  color: #8fa0b7;
  font-size: 7px;
  letter-spacing: 0.16em;
  text-shadow: 0 2px 7px #030713;
}

.node:hover .node-label,
.node:focus-visible .node-label,
.node.selected .node-label {
  border-color: rgba(159, 231, 232, 0.5);
  background: rgba(10, 30, 43, 0.84);
  color: #f6ffff;
  box-shadow: 0 0 24px rgba(159, 231, 232, 0.12);
}

.node:focus-visible {
  outline-offset: 1px;
  border-radius: 12px;
}

#stage.astral-renderer-ready .die-svg,
.astral-renderer-ready #stage .die-svg {
  visibility: hidden;
  opacity: 0;
}

#stage.astral-renderer-ready .die-wrap,
.astral-renderer-ready #stage .die-wrap {
  width: 44px;
  height: 44px;
  animation: none;
}

#stage.astral-renderer-ready .die-wrap::before,
#stage.astral-renderer-ready .die-wrap::after,
.astral-renderer-ready #stage .die-wrap::before,
.astral-renderer-ready #stage .die-wrap::after {
  display: none;
}

.astral-controls {
  position: absolute;
  z-index: 7;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid var(--astral-line);
  border-radius: 13px;
  background: rgba(7, 14, 27, 0.72);
  box-shadow: 0 15px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

.astral-controls button,
.astral-controls [role="button"] {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid rgba(208, 229, 244, 0.15);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: #dbe5f0;
  font-size: 10px;
  transition: color 220ms var(--astral-ease), background-color 220ms var(--astral-ease), border-color 220ms var(--astral-ease);
}

.astral-controls button:hover,
.astral-controls [role="button"]:hover,
.astral-controls button[aria-pressed="true"],
.astral-controls [role="button"][aria-pressed="true"] {
  border-color: rgba(159, 231, 232, 0.42);
  background: rgba(159, 231, 232, 0.1);
  color: #edffff;
}

.astral-hover-card {
  position: absolute;
  z-index: 8;
  width: min(260px, calc(100% - 32px));
  padding: 11px 13px;
  border: 1px solid rgba(195, 221, 240, 0.18);
  border-radius: 11px;
  background: rgba(8, 16, 30, 0.9);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
  color: #dce7f1;
  font-size: 11px;
  line-height: 1.45;
  opacity: 1;
  pointer-events: none;
  transform: translateY(0);
  transition: opacity 200ms ease, transform 200ms var(--astral-ease);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.astral-hover-card.is-hidden {
  visibility: hidden;
  opacity: 0;
  transform: translateY(5px);
}

.astral-hover-card[hidden] {
  display: none !important;
}

.map-instruction {
  z-index: 6;
  bottom: 14px;
  left: 16px;
  min-height: 34px;
  max-width: min(65%, 520px);
  padding: 7px 11px;
  border: 1px solid rgba(199, 222, 239, 0.11);
  border-radius: 999px;
  background: rgba(5, 11, 23, 0.62);
  color: #a9b8ca;
  font-size: 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.map-instruction .tiny-dot {
  background: var(--astral-cyan);
  box-shadow: 0 0 9px rgba(159, 231, 232, 0.55);
}

.timeline-bar {
  min-height: 55px;
  margin: 0 4px;
  padding: 8px 8px 0;
  border-top: 0;
}

.timeline {
  min-height: 44px;
  padding: 4px;
  border-color: rgba(202, 224, 240, 0.12);
  border-radius: 11px;
  background: rgba(9, 16, 30, 0.5);
}

.timeline button,
.motion-toggle,
.reset {
  min-height: 44px;
}

.timeline button {
  padding: 8px 12px;
  border-radius: 7px;
}

.timeline button[aria-pressed="true"] {
  background: rgba(168, 194, 221, 0.12);
  box-shadow: inset 0 0 0 1px rgba(202, 224, 240, 0.1);
}

.motion-toggle,
.reset {
  padding: 8px 11px;
  color: #98a7ba;
  font-size: 10px;
}

.motion-toggle:hover,
.reset:hover {
  color: #e6eef7;
}

.legend {
  min-height: 30px;
  margin: 6px 12px 0;
  color: #8291a6;
  font-size: 9px;
}

.legend b {
  color: #b9c5d4;
}

.journey {
  z-index: 9;
  left: 18px;
  bottom: 80px;
  max-width: min(420px, calc(100% - 36px));
  padding: 16px 18px;
  border-color: rgba(159, 231, 232, 0.24);
  border-radius: 14px;
  background: rgba(9, 23, 38, 0.92);
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.list-view {
  grid-row: 2;
  min-height: 430px;
  padding: 14px;
  overflow-y: auto;
  border: 1px solid var(--astral-line);
  border-radius: 24px;
  background: rgba(7, 14, 27, 0.64);
}

.list-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.list-item {
  min-height: 72px;
  border-color: rgba(207, 228, 244, 0.12);
  border-radius: 11px;
  background: rgba(17, 27, 45, 0.65);
  transition: border-color 220ms var(--astral-ease), background-color 220ms var(--astral-ease);
}

.list-item:hover,
.list-item.selected {
  border-color: rgba(159, 231, 232, 0.42);
  background: rgba(21, 42, 57, 0.76);
}

.detail-shell {
  position: absolute;
  z-index: 14;
  top: 8px;
  right: clamp(18px, 2vw, 32px);
  bottom: 12px;
  width: min(390px, calc(100% - 48px));
  height: auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  filter: drop-shadow(0 26px 46px rgba(0, 0, 0, 0.34));
}

.detail-shell.is-closed {
  display: none !important;
}

.detail {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-color: rgba(197, 221, 240, 0.19);
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(20, 34, 52, 0.93), rgba(8, 15, 28, 0.97) 72%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  scrollbar-width: thin;
  scrollbar-color: rgba(114, 140, 164, 0.35) transparent;
  backdrop-filter: blur(22px) saturate(115%);
  -webkit-backdrop-filter: blur(22px) saturate(115%);
}

.detail-top,
.detail-section,
.story-query {
  padding-right: 22px;
  padding-left: 22px;
}

.close {
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border-radius: 9px;
}

.footer {
  min-height: 34px;
  padding: 8px clamp(20px, 3vw, 46px);
  border-top-color: rgba(207, 228, 244, 0.08);
  background: rgba(5, 9, 20, 0.38);
  color: #7f8fa5;
}

@media (min-width: 781px) {
  body {
    min-height: 720px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .shell {
    min-height: 0;
    overflow: visible;
  }

  .intro {
    flex: 0 0 auto;
  }

  .workspace {
    max-width: 1800px;
    margin: 0 auto;
  }

  .map-column {
    grid-template-rows: 56px minmax(430px, 1fr) 55px 30px;
  }

  .stage {
    min-height: 430px;
  }

  .detail-shell {
    animation: astral-panel-in 280ms var(--astral-ease);
  }

  body.detail-open .astral-controls {
    right: min(420px, 29vw);
  }
}

@media (min-width: 1500px) {
  .intro,
  .workspace {
    max-width: 1800px;
    margin-right: auto;
    margin-left: auto;
  }

  .map-column {
    grid-template-rows: 56px minmax(430px, 1fr) 58px 30px;
  }

  .list-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) and (min-width: 781px) {
  body {
    min-height: 760px;
  }

  .intro {
    padding-top: 16px;
  }

  h1 {
    font-size: clamp(34px, 4.4vw, 46px);
  }

  .toolbar {
    width: min(390px, 46vw);
  }

  .list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-shell {
    width: min(360px, calc(100% - 40px));
  }
}

@media (max-width: 780px) {
  body {
    min-width: 0;
    min-height: 100%;
    overflow-x: hidden;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 18;
    height: 62px;
    flex-basis: 62px;
    padding: 0 15px;
  }

  .brand svg {
    width: 24px;
  }

  .wordmark {
    font-size: 23px;
  }

  .demo {
    max-width: 47vw;
    min-height: 30px;
    padding: 5px 9px;
    overflow: hidden;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .shell {
    min-height: calc(100svh - 62px);
    overflow: visible;
  }

  .intro {
    display: block;
    padding: 18px 15px 12px;
  }

  h1 {
    font-size: clamp(31px, 10vw, 42px);
    line-height: 1.02;
  }

  .subtitle {
    margin-top: 8px;
    font-size: 11px;
  }

  .toolbar {
    width: 100%;
    max-width: none;
    margin-top: 14px;
    padding: 8px;
    border-radius: 13px;
  }

  .workspace {
    padding: 0 8px 12px;
  }

  .map-column {
    display: grid;
    grid-template-rows: 54px minmax(500px, 66svh) auto auto;
    height: auto;
  }

  .filters {
    min-height: 54px;
    padding: 5px 4px;
  }

  .filter {
    min-height: 44px;
    padding: 9px 11px;
  }

  .count {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
  }

  .stage {
    min-height: 500px;
    height: 66svh;
    max-height: 650px;
    border-radius: 19px;
  }

  .stage::before {
    width: 125vw;
  }

  .node {
    min-width: 72px;
    min-height: 52px;
    width: 84px;
    padding: 4px;
  }

  .node-label {
    max-width: 84px;
    padding: 4px 6px;
    font-size: 9px;
  }

  .node-kind {
    max-width: 82px;
    font-size: 6px;
  }

  .astral-controls {
    right: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    padding: 5px;
  }

  .astral-controls button,
  .astral-controls [role="button"] {
    padding: 7px 9px;
  }

  .map-instruction {
    right: 10px;
    bottom: 65px;
    left: 10px;
    width: fit-content;
    max-width: calc(100% - 20px);
  }

  .timeline-bar {
    min-height: 58px;
    margin: 0;
    padding: 7px 4px 0;
    gap: 5px;
    overflow-x: auto;
  }

  .timeline {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  .timeline button {
    min-width: 44px;
  }

  .motion-toggle,
  .reset {
    flex: 0 0 auto;
  }

  .legend {
    min-height: 38px;
    margin: 6px 6px 0;
    gap: 8px 12px;
  }

  .journey {
    position: fixed;
    z-index: 19;
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-width: none;
    max-height: min(44svh, 330px);
    overflow-y: auto;
  }

  .list-view {
    min-height: 500px;
    padding: 9px;
    border-radius: 18px;
  }

  .list-grid {
    grid-template-columns: 1fr;
  }

  .detail-shell,
  .detail-shell:not(.is-closed) {
    position: fixed;
    z-index: 24;
    top: max(72px, env(safe-area-inset-top));
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    max-height: none;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 0 0 100vmax rgba(1, 5, 13, 0.64), 0 22px 60px rgba(0, 0, 0, 0.5);
  }

  .detail {
    height: 100%;
    max-height: none;
  }

  .detail-top,
  .detail-section,
  .story-query {
    padding-right: 18px;
    padding-left: 18px;
  }

  .footer {
    min-height: 48px;
    padding: 10px 15px;
  }
}

@media (max-width: 410px) {
  .site-header {
    gap: 8px;
    min-width: 0;
  }

  .brand {
    min-width: 0;
    flex: 0 1 auto;
  }

  .brand-sub {
    display: none;
  }

  .demo {
    flex: 1 1 126px;
    max-width: none;
    min-width: 0;
    padding-inline: 7px;
    font-size: 8px;
    letter-spacing: 0.02em;
  }

  .legend,
  .footer {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
  }

  .footer > * {
    min-width: 0;
    max-width: 100%;
  }

  .toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .discovery-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .discovery-actions .trace-prominent,
  .discovery-actions .lore-opener {
    width: 100%;
  }

  .stage {
    min-height: 480px;
  }

  .map-instruction {
    font-size: 9px;
  }
}

@media (max-width: 780px) and (max-height: 620px) and (orientation: landscape) {
  .site-header {
    position: relative;
  }

  .intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 44vw);
    gap: 14px;
    align-items: end;
    padding-top: 12px;
  }

  h1 {
    font-size: 30px;
  }

  .subtitle {
    display: none;
  }

  .toolbar {
    margin-top: 0;
  }

  .map-column {
    grid-template-rows: 54px 430px auto auto;
  }

  .stage {
    min-height: 430px;
    height: 430px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@keyframes astral-panel-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
