/* ═══════════════════════════════════════════════════════════════════════════════════════════════════
   THE TRAVEL CHART FOR A MONITOR (2026-10-15). Audit SCR-05 and IN-5. Loaded after desktop.css.
   The chart was a 960px centred column: the svg, the destination cards stacked under it, the exit
   under the fixed 124px rail band, and the three western names cut at the column's edge. Two causes,
   both in style.css: .map-screen is in the clip-path cut list (so the svg's overflow:visible could
   not save a name), and `.mapnode text { text-anchor: middle }` outranks the text-anchor attribute
   renderMap writes, so a name meant to start at its node was centred 3.4 units west of it instead.
   Here the chart is one screen fixed to the viewport: the chart in the left pane at its 104:72
   aspect, the destinations as a list in the right pane at the exchange panel's own width
   (clamp(520px, 34vw, 760px)), the place you stand in read at the list's head and the way out at
   its foot, every card numbered. Over a standing place the screen rises in the plate (app.js routes
   it through plate(), so the world keeps standing, parked the way it is under an exchange); off a
   place it is the page. The walking HUD and the rail stand down under it.
   Measured at 1920x1080: the chart 1147x794 at x 48, the list 653 wide at x 1243; at 2560x1440:
   the chart 1656x1146, the list 760 wide; no name's box outside the viewport at either.
   ═══════════════════════════════════════════════════════════════════════════════════════════════════ */

/* ---- the screen: the whole viewport, as a page or in the plate ------------------------------- */
.map-screen {
  position: fixed; inset: 0; z-index: 20; box-sizing: border-box;
  max-width: none; margin: 0; padding: 62px var(--hud-inset) var(--hud-inset);
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(520px, 34vw, 760px); gap: 0 var(--hud-inset);
  clip-path: none; border-radius: 0;
  background: rgba(6, 8, 10, 0.86);
}
/* in the plate the plate is the viewport-sized box (the hub isolates its stacking, so the site row at
   z 24 in the root stays over it); the screen fills the plate rather than the viewport */
.place-plate .map-screen { position: absolute; }
.hub.place .place-plate:has(.map-screen:not(.leaving)) {
  left: 0; right: 0; width: auto; padding: 0; overflow: hidden;
  background: none; border: 0; box-shadow: none; animation: none;
}
/* nothing of the walking HUD reads through the scrim, and the page under the chart does not scroll */
body:has(.map-screen:not(.leaving)) .rail, body:has(.map-screen:not(.leaving)) .reflection { display: none; }
.hub.place:has(.map-screen:not(.leaving)) :is(.stage-top, .place-keys, .place-e, .w3-lock, .place-say) { visibility: hidden; }
body:has(.map-screen:not(.leaving)) { overflow: hidden; }
body:has(.map-screen:not(.leaving)) .game { max-width: none; padding: 0; }
@media (prefers-reduced-motion: reduce) { .map-screen { animation: none; } }

/* ---- the chart: the left pane, at its aspect, bound by whichever side binds first ------------- */
.map-chart { min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 0 0 var(--hud-inset); }
.map-screen .map {
  width: min(100%, calc((100vh - 62px - var(--hud-inset)) * 104 / 72)); height: auto; max-height: none;
  aspect-ratio: 104 / 72; margin: 0; overflow: visible;
}
/* the anchors renderMap asks for by side (the sheet's text-anchor: middle was outranking the attribute) */
.mapnode text.lbl-w { text-anchor: start; }
.mapnode text.lbl-e { text-anchor: end; }
/* a destination under the mouse or the focus, on the chart */
.mapnode.lit text { fill: var(--gold); }
.mapnode.lit .rubric { stroke: var(--gold); opacity: 1; }
.mapnode[data-go] { cursor: pointer; }
/* a node you cannot set out for takes no hits: measured, an unknown node's ring drawn later in the svg
   sat over a reachable node's name at (310, 743) and took the mouse meant for it */
.mapnode:not([data-go]) { pointer-events: none; }

/* ---- the list: the right pane, head, cards, foot ----------------------------------------------- */
.map-side { display: flex; flex-direction: column; min-height: 0; min-width: 0; zoom: var(--ui); }
.map-side .panel-h { font-size: 22px; margin: 0 0 10px; }
.map-here { display: grid; gap: 2px; margin: 0 0 12px; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); }
.map-here-k { font: 500 11px/1.3 var(--sans); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.map-here-n { font-family: var(--serif); font-size: 20px; line-height: 1.25; color: var(--ink); }
.map-here-r { font-size: 12.5px; color: var(--ink-dim); }
.map-screen .map-choices { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0; gap: 8px; padding-right: 2px; }
.map-screen .map-road-read { flex: 0 0 auto; margin: 0; }
.map-foot { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.map-screen .map-keys { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-family: var(--sans); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-dim); }
.map-keys .lg { display: inline-flex; align-items: center; gap: 1px; }
.map-keys kbd.hk { margin-right: 5px; padding: 0 4px; font: 500 10.5px/15px var(--sans); color: #e8d6aa; background: rgba(0,0,0,0.38); border: 1px solid rgba(232,214,170,0.42); }
.map-keys .lg kbd.hk + kbd.hk { margin-left: -2px; }
#mapBack { display: inline-flex; align-items: center; margin: 0; white-space: nowrap; }
/* every card carries its number, in the place the exchange's replies carry theirs */
.map-go kbd.hk { flex: 0 0 auto; margin: 0; }
.map-go kbd.hk ~ .map-go__crown { left: 57px; }
.map-ride { align-items: center; }
.map-ride kbd.hk { margin: 0; }
/* the focused card reads as the hovered one (the first is focused on open, Up and Down move it) */
.map-go:focus { outline: none; }
.map-go:focus, .map-go.lit {
  transform: translateY(-1px); border-color: var(--gold);
  box-shadow: 0 4px 12px -3px color-mix(in srgb, var(--bg) 82%, transparent), 0 0 0 1px color-mix(in srgb, var(--gold) 28%, transparent);
}
.map-go:focus .map-go__crown-arch, .map-go.lit .map-go__crown-arch { stroke: var(--gold); filter: drop-shadow(0 0 2px color-mix(in srgb, var(--gold) 60%, transparent)); }
.map-go:focus .map-go__halo, .map-go.lit .map-go__halo { opacity: 0.9; }
.map-go:focus .map-go__cartouche, .map-go.lit .map-go__cartouche { border-color: var(--accent); box-shadow: inset 0 1px 3px rgba(0,0,0,0.45), 0 0 13px -2px color-mix(in srgb, var(--accent) 60%, transparent); }
.map-go:focus .map-go__name, .map-go.lit .map-go__name { border-bottom-color: var(--gold); }
