/* Spatial route map for both direct entry and the embedded home portal. */
.route-preview .shade { background: linear-gradient(90deg, #0b071dcc, #110a242e 28%, transparent 48%), linear-gradient(180deg, #0b041938, transparent 22%, transparent 75%, #0b04194d); }
.wormhole-map { position: fixed; z-index: 3; left: 36px; top: 51%; transform: translateY(-50%); width: 246px; color: #9fe8ff; text-shadow: 0 2px 10px #070310; }
.wormhole-map::before { content: ''; position: absolute; z-index: -1; inset: -28px -12px -22px -28px; background: radial-gradient(ellipse at 35% 40%, #100b2866, transparent 72%); pointer-events: none; }
.route-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 13px; border-bottom: 1px solid #68dfff30; }
.route-heading h2 { margin: 0; font-size: 12px; font-weight: 400; letter-spacing: .24em; color: #bbf1ff; }
.route-heading > span { color: #e5d8ff; font: var(--fs-xs) var(--font-mono); letter-spacing: .1em; }
.route-heading i { font-style: normal; color: #afa1c5; }
.route-remaining { margin: 12px 0 0; font-size: 11px; font-weight: 400; letter-spacing: .08em; color: #bfb2d5; }
.route-remaining strong { margin: 0 3px; color: #f2eaff; font: 18px var(--font-mono); }
.route-graphic { position: relative; width: 100%; aspect-ratio: 254 / 360; margin-top: 10px; transform: scaleX(.84) scaleY(1.08); transform-origin: center; }
.route-wireframe { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.route-glass { fill: url(#route-glass); stroke: none; }
.route-mesh { filter: drop-shadow(0 0 2px #d9bdff88); }
.route-wire { fill: none; stroke: url(#route-depth); stroke-width: .85; }
.route-back { opacity: .4; }
.route-front { opacity: .95; }
.route-longitude { opacity: .6; stroke-width: .55; }
.route-edge { opacity: 1; stroke-width: 1.2; }
.route-horizon { fill: url(#route-core); stroke: url(#route-rim); stroke-width: 1; }
.route-rim-outer { fill: none; stroke: url(#route-rim); stroke-width: .6; opacity: .23; stroke-dasharray: 1 4; }
.route-rim-glint { fill: none; stroke: url(#route-rim); stroke-width: 1.4; opacity: .8; filter: drop-shadow(0 0 3px #c8a2ff); }
.route-spine { fill: none; stroke: url(#route-depth); stroke-width: .7; stroke-dasharray: 1 7; opacity: .25; }
.route-flow { fill: none; stroke: url(#route-depth); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 9 355; opacity: .75; filter: drop-shadow(0 0 3px #f2b9ff); animation: route-flow 10s linear infinite; }
.route-depth-ticks { opacity: .22; stroke-width: .65; }
.route-node { position: absolute; left: 0; width: 100%; height: 44px; transform: translateY(-50%); padding: 0; border: 0; background: none; text-align: left; color: var(--node-color); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.route-avatar { position: absolute; left: var(--node-x); top: 50%; width: var(--avatar-size); height: var(--avatar-size); transform: translate(-50%, -50%) scaleX(1.19) scaleY(.926) scale(var(--approach-scale, 1)); border-radius: 50%; border: 0; background: transparent; box-shadow: none; overflow: hidden; transition: border-color .25s, box-shadow .25s, opacity .25s, transform .25s; }
.route-node:focus-visible { outline: 1px solid #63dfff66; outline-offset: 3px; border-radius: 8px; }
.route-node[aria-current='location'] { cursor: pointer; }
.route-node[aria-disabled='true'] { cursor: wait; }
.route-node[aria-disabled='true'] .route-avatar { opacity: .55; }
.route-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.route-avatar .portrait-skull { transform: scale(1.04); filter: saturate(.65) contrast(1.06); }
.route-avatar .portrait-body { transform: scale(2.6) translateY(25%); filter: saturate(.65); }
.route-avatar .portrait-icon { display: block; width: 48%; height: 48%; margin: 26%; fill: none; stroke: currentColor; stroke-width: 1.3; opacity: .7; }
.route-node.is-future .route-avatar { opacity: .9; border-color: #baa5ec66; background: #061e30ed; box-shadow: 0 0 0 3px #0c071d55; }
.route-node.is-future:hover .route-avatar, .route-node.is-future:focus-visible .route-avatar { opacity: 1; }
.route-label { position: absolute; left: 57%; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 5px; }
.route-label b { color: #bcefff; font-size: 11px; font-weight: 400; letter-spacing: .12em; }
.route-label small { color: #7faec3; font: var(--fs-xs) var(--font-mono); letter-spacing: .08em; }
.route-node.is-current .route-label b { color: #caf6ff; }
.route-node.is-current .route-label small { color: #7cdbf6; }
.route-node.is-future .route-label b { color: #b8accb; }
.route-end { position: absolute; bottom: -8px; left: 15%; color: #78aec9; font: var(--fs-xs) var(--font-mono); letter-spacing: .23em; }
.route-end span { display: inline-block; margin-left: 8px; color: #a6eeff; }
.route-detail { min-height: 46px; margin-top: 26px; padding: 14px 0 0 11px; border-top: 1px solid #64d5ff30; border-left: 1px solid #64d5ff30; color: #91b8cb; font-size: var(--fs-xs); line-height: 1.9; letter-spacing: .04em; }
.route-detail span { color: #b9edff; }
.route-prototype { margin: 11px 0 0 12px; color: #998aa9; font-size: var(--fs-xs); letter-spacing: .09em; }
.portal-embedded .wormhole-map { opacity: 0; visibility: hidden; }
.portal-embedded.portal-arrived .wormhole-map { opacity: 1; visibility: visible; transition: opacity .55s; }
.wormhole-exiting .wormhole-map { opacity: 0 !important; pointer-events: none; transition: opacity .35s; }
@keyframes route-flow { to { stroke-dashoffset: -364; } }
html:has(#pause[aria-pressed='true']) .route-flow { animation-play-state: paused; }
@media (min-width: 701px) and (max-height: 760px) {
  .wormhole-map { width: 220px; }
  .route-graphic { width: 88%; }
  .route-detail { margin-top: 20px; }
}
@media (max-width: 700px) {
  .wormhole-map { left: 16px; width: 146px; top: 49%; }
  .route-heading { padding-bottom: 10px; }
  .route-heading h2 { font-size: var(--fs-xs); letter-spacing: .16em; }
  .route-heading > span { font-size: var(--fs-xs); }
  .route-heading i { display: none; }
  .route-remaining { font-size: var(--fs-xs); letter-spacing: .02em; margin-top: 8px; }
  .route-remaining strong { font-size: 16px; }
  .route-node { --avatar-size: 23px !important; }
  .route-node.is-current { --avatar-size: 34px !important; }
  .route-node.is-future { --avatar-size: 20px !important; }
  .route-label, .route-node::before { display: none; }
  .route-end { font-size: var(--fs-xs); left: 16%; }
  .route-detail { margin-top: 24px; padding: 10px 0 0 0; border-left: 0; font-size: var(--fs-xs); line-height: 1.8; min-height: 39px; }
  .route-prototype { margin: 9px 0 0; font-size: var(--fs-xs); letter-spacing: .02em; }
  .route-preview.skull-encounter .caption { top: auto; bottom: 124px; }
  .route-preview.skull-encounter .caption p { font-size: var(--fs-xs); }
}
@media (max-width: 420px) {
  .wormhole-map { left: 12px; width: 126px; }
  .route-node.is-current { --avatar-size: 30px !important; }
  .route-node.is-future { --avatar-size: 18px !important; }
}
@media (max-height: 580px) {
  .wormhole-map { top: 50%; width: 136px; }
  .route-graphic { width: 116px; margin-top: 3px; }
  .route-detail { display: block; margin-top: 20px; min-height: 30px; padding: 9px 0 0; border-left: 0; font-size: var(--fs-xs); }
  .route-prototype { display: none; }
  .route-heading { padding-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .route-flow { animation: none; } }
