/* the site and its 3D world (the fonts and the shared tokens are in base.css, loaded first) */

:root {
  --gutter: 20px;
  /* where the notifications slot in: below the destination (the HUD layout moves it, see the media queries) */
  --notice-top: calc(var(--gutter) + var(--safe-top) + 64px);
  /* the HUD's own tokens: light by day, navy at night and down in the data centre (below) */
  --hud-surface: var(--surface);
  --hud-solid: #fff;
  --hud-ink: var(--navy);
  --hud-muted: rgba(27, 50, 99, 0.7);
  --hud-line: rgba(27, 50, 99, 0.1);
  --hud-line-strong: rgba(27, 50, 99, 0.2);
  --hud-ring: rgba(255, 255, 255, 0.6);
  --hud-shadow: 0 1px 2px rgba(27, 50, 99, 0.06), 0 12px 32px -12px rgba(27, 50, 99, 0.28);
}
body.night,
body.bunker {
  --hud-surface: rgba(11, 20, 38, 0.88);
  --hud-solid: #0b1426;
  --hud-ink: #fff;
  --hud-muted: rgba(220, 232, 255, 0.72);
  --hud-line: rgba(255, 255, 255, 0.12);
  --hud-line-strong: rgba(255, 255, 255, 0.26);
  --hud-ring: rgba(11, 20, 38, 0.55);
  --hud-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
}
/* inside the HUD (and the notifications over it) the page's tokens are the HUD's */
.hud,
.touch,
.notice,
.overview-hint {
  --ink: var(--hud-ink);
  --muted: var(--hud-muted);
  --line: var(--hud-line);
  --line-strong: var(--hud-line-strong);
  --surface: var(--hud-surface);
  --shadow: var(--hud-shadow);
}


html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--sky);
  color: var(--navy);
  font: 400 16px/1.55 Source, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3 {
  font-family: Satoshi, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: var(--blue);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
/* a heading that takes the focus when its page or panel opens (ui/sections.mjs focusHeading) is not a control: no ring */
[tabindex="-1"]:focus {
  outline: none;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 1.7em;
  height: 1.7em;
  padding: 0 0.35em;
  margin: 0 0.1em;
  border-radius: 5px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font: 700 0.72em/1 Satoshi, system-ui, sans-serif;
  color: var(--navy);
}
.hud kbd {
  background: var(--hud-solid);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}
.nowrap {
  white-space: nowrap;
}

/* touch-mode follows the input in use (main.mjs), so convertibles switch back and forth */
.touch-only {
  display: none;
}
body.touch-mode .touch-only {
  display: inline;
}
body.touch-mode .desk-only {
  display: none;
}

/* ---------- 3D stage ---------- */

.stage {
  position: fixed;
  inset: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.stage:active {
  cursor: grabbing;
}
.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-s);
  font: 700 15px/1 Satoshi, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, opacity 0.2s;
}
.button.primary {
  color: #fff;
  background: var(--blue);
}
@media (hover: hover) {
  .button.primary:hover {
    background: var(--blue-hover);
  }
}
.button.ghost {
  color: var(--ink);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
@media (hover: hover) {
  .button.ghost:hover {
    box-shadow: inset 0 0 0 1px var(--ink);
  }
}
/* the focus as a crisp ring (the global :focus-visible outline), no soft halo; a secondary button's contour turns ink */
.button.ghost:focus-visible {
  box-shadow: inset 0 0 0 1px var(--ink);
}
.button.small {
  min-height: 40px;
  font-size: 14px;
}
.button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-s);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  color: var(--ink);
}
.icon-button svg,
.touch-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (hover: hover) {
  .icon-button:hover {
    color: var(--blue);
  }
}

/* ---------- HUD ---------- */

.hud {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 5;
  pointer-events: none;
  padding-left: calc(var(--gutter) + var(--safe-left));
  padding-right: calc(var(--gutter) + var(--safe-right));
}
.hud > * {
  pointer-events: auto;
}
/* logo, destination, buttons: the destination in the middle, centred while there is room and shrinking before it would touch either side */
.hud-top {
  top: 0;
  padding-top: calc(var(--gutter) + var(--safe-top));
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
  grid-template-areas: "logo target actions";
  align-items: start;
  column-gap: 12px;
}
.logo {
  grid-area: logo;
  justify-self: start;
  display: flex;
  align-items: center;
  height: 52px;
  padding: 0 18px;
  border-radius: var(--radius-s);
  background: var(--hud-solid);
  box-shadow: var(--shadow);
  flex: none;
}
.logo img {
  display: block;
  height: 30px;
  width: auto;
}
.hud-actions {
  grid-area: actions;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-button[aria-pressed="true"] {
  color: var(--hud-solid);
  background: var(--ink);
}
/* the logo on navy: its white ground turned black and screened away, the letters light, the Z still blue */
body:is(.night, .bunker) .logo img {
  mix-blend-mode: screen;
  filter: invert(1) hue-rotate(180deg);
}

/* one card for what the HUD says: a mark, the title and a muted meta line under it */
.hud-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: var(--radius-s);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
}
.hud-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.hud-title {
  font: 700 17px/1.15 Satoshi, system-ui, sans-serif;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-meta {
  font: 400 13.5px/1.25 Source, system-ui, sans-serif;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.hud-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}
.hud-mark svg {
  grid-area: 1 / 1;
  width: 20px;
  height: 20px;
}

/* the next destination, top centre: the place over its distance and progress */
.target {
  grid-area: target;
  min-width: 0;
  max-width: 480px;
  height: 52px;
  padding: 0 7px;
}
.target-go {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  height: 100%;
  padding: 0 12px 0 0;
  border: 0;
  border-radius: inherit;
  color: inherit;
  background: none;
  text-align: left;
  cursor: pointer;
}
.target-go:focus-visible {
  outline-offset: 4px;
}
.target-pointer {
  fill: currentColor;
  transition: transform 0.2s linear;
}
/* the tour's progress: one short hairline per place, filled blue once seen, all in ink once every place is (ui/dom.mjs tourLine) */
.tour-line {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
}
.tour-line i {
  position: relative;
  width: 12px;
  height: 2px;
  border-radius: 1px;
  overflow: hidden;
  background: var(--line-strong);
}
.tour-line i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease, background-color 0.3s ease;
}
.tour-line i.on::after {
  transform: scaleX(1);
}
.tour-line.all i::after {
  background: var(--ink);
}
.target-distance:not(:empty) ~ .tour-line {
  margin-left: 10px;
}
/* done and arrived: a check instead of the arrow, on ink */
.target-check {
  display: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.target-distance:not(:empty) + .target-progress:not(:empty)::before {
  content: "·";
  margin: 0 0.4em;
}
.target.done .target-arrow {
  color: var(--hud-solid);
  background: var(--ink);
}
.target.done .target-pointer {
  display: none;
}
.target.done .target-check {
  display: block;
}

.hud-bottom {
  bottom: 0;
  padding-bottom: calc(var(--gutter) + var(--safe-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.minimap-wrap {
  position: relative;
  display: block;
  width: 184px;
  height: 184px;
  padding: 0;
  border: 4px solid var(--hud-solid);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  overflow: visible;
}
.minimap {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.compass {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--hud-solid);
  font: 700 11px/1 Satoshi, system-ui, sans-serif;
  box-shadow: 0 2px 6px rgba(27, 50, 99, 0.3);
  pointer-events: none;
}
.key-hint {
  position: absolute;
  left: 50%;
  bottom: calc(var(--gutter) + var(--safe-bottom) + 6px);
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 14px;
  white-space: nowrap;
  color: var(--muted);
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
}
.key-hint.fade {
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
}

.overview-hint {
  position: fixed;
  pointer-events: none;
  left: 50%;
  bottom: calc(var(--gutter) + var(--safe-bottom) + 8px);
  z-index: 6;
  transform: translateX(-50%);
  margin: 0;
  padding: 10px 18px;
  border-radius: var(--radius-s);
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  box-shadow: var(--shadow);
  animation: toast-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.overview-hint kbd {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: none;
}
/* after "Losfahren" the HUD comes in: each part fades and slides in, 40 ms after the one before (--i); only opacity and translate */
.hud-in {
  animation: hud-in 0.5s cubic-bezier(0.2, 0.9, 0.25, 1) both;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.hud-top .hud-in {
  --from: -8px;
}
@keyframes hud-in {
  from {
    opacity: 0;
    translate: 0 var(--from, 8px);
  }
}
/* the overview is the map: the destination, the prompt, the key hint and the minimap fade out (and back in) */
.target,
.zone-prompt,
.minimap-wrap {
  transition: opacity 0.25s ease, visibility 0.25s;
}
body.overview .target,
body.overview .zone-prompt,
body.overview .key-hint,
body.overview .minimap-wrap {
  opacity: 0;
  visibility: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .hud-in {
    animation: none;
  }
}
body.bunker .minimap-wrap,
body.bunker .key-hint,
body.bunker .overview-hint .pick {
  display: none;
}
body.overview .stage {
  cursor: pointer;
}

/* the prompt at a place: its name over a line about it, and the key that opens it */
.zone-prompt {
  position: absolute;
  left: 50%;
  bottom: calc(var(--gutter) + var(--safe-bottom) + 64px);
  transform: translateX(-50%);
  gap: 20px;
  padding: 10px 10px 10px 20px;
  background: var(--hud-solid);
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -18px rgba(27, 50, 99, 0.45);
  cursor: pointer;
  animation: prompt-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.zone-prompt .hud-title {
  font-size: 21px;
  letter-spacing: -0.02em;
}
.zone-prompt-key {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 64px;
  height: 48px;
  padding: 0 12px;
  border-radius: var(--radius-s);
  color: #fff;
  background: var(--blue);
  font: 700 14px/1 Satoshi, system-ui, sans-serif;
}
.zone-prompt-key kbd {
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-size: 14px;
}
body.touch-mode .zone-prompt-key kbd {
  display: none;
}
@keyframes prompt-in {
  from {
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.96);
  }
}

/* ---------- touch controls ---------- */

.touch {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 4;
  height: 46%;
  pointer-events: none;
}
.joystick {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 55%;
  height: 100%;
  pointer-events: auto;
  touch-action: none;
}
.joystick-ring {
  position: absolute;
  left: calc(28px + var(--safe-left));
  bottom: calc(40px + var(--safe-bottom));
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: var(--hud-ring);
  box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow);
  transition: opacity 0.2s;
}
.joystick.active .joystick-ring {
  transition: none;
}
.joystick-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 6px 14px -8px rgba(27, 50, 99, 0.6);
}
.touch-buttons {
  position: absolute;
  right: calc(24px + var(--safe-right));
  bottom: calc(44px + var(--safe-bottom));
  display: flex;
  align-items: flex-end;
  gap: 12px;
  pointer-events: auto;
}
.touch-button {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.touch-button.primary {
  width: 76px;
  height: 76px;
  color: #fff;
  background: var(--blue);
}
.touch-button.pressed {
  transform: scale(0.92);
}
.touch-button svg {
  width: 26px;
  height: 26px;
}

body.touch-mode .key-hint,
body.prompting .key-hint {
  display: none;
}
body.touch-mode .minimap-wrap {
  position: fixed;
  top: calc(var(--gutter) + var(--safe-top) + 58px);
  right: calc(var(--gutter) + var(--safe-right));
  width: 112px;
  height: 112px;
  border-width: 3px;
}
body.touch-mode .zone-prompt {
  bottom: calc(var(--safe-bottom) + 200px);
}

/* ---------- self-driving ---------- */

/* the self-driving button: a steering wheel with a spark, flat blue, bottom right */
.auto-fab {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 64px;
  height: 64px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
@media (hover: hover) {
  .auto-fab:hover {
    background: var(--blue-hover);
  }
}
.auto-fab:active {
  transform: scale(0.95);
}
.auto-fab:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.auto-fab .auto-wheel {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translate(-2px, 2px);
}
.auto-fab .auto-spark {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 14px;
  height: 14px;
  fill: currentColor;
  pointer-events: none;
}
/* while the car drives itself: a white arc runs round inside the button (the compositor turns it, nothing is painted again); as wide as the button, also among the touch buttons with their smaller icons */
.auto-fab .auto-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 38 138;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
body.autopilot .auto-ring {
  opacity: 0.9;
  animation: auto-spin 1.8s linear infinite;
}
@keyframes auto-spin {
  to {
    transform: rotate(360deg);
  }
}
/* while the tip recommends it: a hairline ring fades in and out round the button */
.auto-fab::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--blue);
  opacity: 0;
  pointer-events: none;
}
.auto-fab.hinting::after {
  animation: auto-hint 1.6s ease-in-out infinite;
}
@keyframes auto-hint {
  50% {
    opacity: 1;
  }
}
body.touch-mode #autopilot {
  display: none;
}
/* on phones it sits right above the boost button */
.touch-button.auto-fab {
  position: absolute;
  right: 8px;
  bottom: calc(76px + 16px);
  width: 60px;
  height: 60px;
  margin: 0;
  color: #fff;
  background: var(--blue);
}
.touch-button.auto-fab .auto-wheel {
  width: 28px;
  height: 28px;
}
.touch-button.auto-fab .auto-spark {
  top: 10px;
  right: 10px;
  width: 13px;
  height: 13px;
}
@media (prefers-reduced-motion: reduce) {
  .auto-fab.hinting::after {
    animation: none;
    opacity: 1;
  }
  body.autopilot .auto-ring {
    animation: none;
  }
}

/* while the car drives itself the destination card says what it does, with a button to stop */
.target .target-stop {
  flex: none;
  min-height: 36px;
  margin: 0 2px 0 4px;
  padding: 0 12px;
  font-size: 13.5px;
}
.target-stop svg {
  display: none;
  width: 14px;
  height: 14px;
  fill: currentColor;
}
/* narrow: the stop sign alone, so the place and what the car does keep their room */
@media (max-width: 520px) {
  .target .target-stop {
    width: 36px;
    padding: 0;
  }
  .target-stop svg {
    display: block;
  }
  .target-stop span {
    display: none;
  }
}

.auto-sheet .pane-lead {
  margin: 0 0 16px;
}
.auto-sheet-stop {
  width: 100%;
}

/* ---------- the start screen ---------- */

/*
 * A white panel flush with the left edge carries the words, the two ways in
 * and under them the road the build paves; the rest of the screen is the
 * world's (the camera frames its overview there, ui/intro.mjs). On a screen
 * held upright the panel is a sheet from the bottom. While the world is
 * built the free part shows its plan (ui/plan.mjs). Only opacity and
 * transform move.
 */
.intro {
  --intro-w: clamp(500px, 40vw, 660px);
  --pad-x: clamp(36px, 3.9vw, 72px);
  --pad-y: clamp(28px, 4.4vh, 48px);
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
}
.intro-panel {
  position: relative;
  z-index: 1;
  flex: none;
  width: var(--intro-w);
  height: 100%;
  display: grid;
  /* (one column that no line kept together can widen) */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto auto;
  padding: calc(var(--pad-y) + var(--safe-top)) var(--pad-x) calc(var(--pad-y) + var(--safe-bottom)) calc(var(--pad-x) + var(--safe-left));
  background: var(--page);
  box-shadow: 1px 0 0 var(--line);
  /* it scrolls only where it cannot fit (large text, a small window); sideways it clips the car pulling away */
  overflow: hidden auto;
  overscroll-behavior: contain;
  container-type: inline-size;
}
/* until the page is in the visitor's language (ui/language.mjs) the panel waits – at most a moment */
html:not(.localized) .intro-panel {
  visibility: hidden;
  animation: localized 0s 1.5s forwards;
}
@keyframes localized {
  to {
    visibility: visible;
  }
}

.intro-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.intro-logo {
  display: block;
  width: auto;
  height: 28px;
}
.intro-head .languages {
  margin: 0 -6px 0 auto;
  font-size: 14px;
}

.intro-main {
  align-self: center;
  padding: 40px 0;
}
/* the longest group of words ("made in India.") fits the panel's width on one line */
.intro-title {
  font-size: clamp(38px, 3.3vw + 4px, 58px);
  font-size: clamp(34px, 10.4cqi, 58px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.intro-lead {
  max-width: 38ch;
  margin: 20px 0 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: balance;
}

/* the two ways in, side by side across the column (equally wide where they can be), one below the other where they do not fit */
.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.intro-actions .button {
  flex: 1 1 0;
  min-height: 52px;
  padding: 0 22px;
  font-size: 15.5px;
  white-space: nowrap;
}
/* while the world is built, the start button waits in light blue: readable, not greyed out */
.intro .button.primary:disabled {
  opacity: 1;
  background: var(--blue-soft);
  color: var(--blue);
}
.intro .button.ghost:disabled {
  opacity: 1;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}
/* the start button says which key starts, too: a key drawn in outline, the white straight on the blue */
.intro-key {
  height: 22px;
  min-width: 0;
  margin: 0 -6px 0 2px;
  padding: 0 6px;
  background: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
  color: #fff;
  font-size: 11px;
}
#drive:disabled .intro-key {
  display: none;
}
/* (only while Enter starts: with the focus on another control, Enter is that control's) */
.intro-panel:has(:focus:not(#drive)) .intro-key {
  visibility: hidden;
}
.intro-note {
  max-width: 44ch;
  margin: 16px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--muted);
  text-wrap: pretty;
}
/* ready after all: the note steps back, keeping its place – nothing moves while plan and world lie on one another, nor under the pointer */
.intro.ready .intro-note {
  visibility: hidden;
}

/* ---------- the road under the buttons: the build paves it, your car drives it ---------- */

/* (--car-w: the car's length; the line above the road keeps clear of it) */
.road {
  --car-w: 48px;
  position: relative;
  margin-top: 28px;
}
/* what is being built, above the lane the car drives in: each new line comes up from below (ui/intro.mjs) */
.road-status {
  margin: 0 0 calc(var(--car-w) * 0.45 + 8px);
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink);
  overflow: hidden;
}
.road-status > span {
  display: block;
}
.intro.ready .road-status {
  font-weight: 700;
}
/* ahead of the car the road is staked out (dashed); behind it the build paves it blue; built, it is simply there */
.loader {
  position: relative;
  height: 2px;
}
.loader::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 2px dashed var(--line-strong);
  transition: opacity 0.4s ease;
}
.loader span {
  position: relative;
  display: block;
  height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: background 0.8s ease 0.7s;
}
.intro.ready .loader::before {
  opacity: 0;
}
.intro.ready .loader span {
  background: var(--line);
}
/* the car's nose at the tip of the paved part (ui/intro.mjs moves the track and turns the wheels) */
.road-car {
  position: absolute;
  left: 0;
  bottom: 3px;
  width: 0;
  height: 0;
  pointer-events: none;
}
.car {
  position: absolute;
  bottom: 0;
  left: calc(-1 * var(--car-w));
  width: var(--car-w);
  height: calc(var(--car-w) * 0.45);
  /* (it leans back about its rear wheel) */
  transform-origin: 22.8% 100%;
}
.car-body {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.car-paint {
  fill: var(--blue);
}
.car-glass,
.car-light,
.car-hub {
  fill: #fff;
}
/* the stripe over its bonnet and its roof, as the car you drive has it */
.car-stripe {
  fill: none;
  stroke: #fff;
  stroke-width: 0.6;
  stroke-linecap: round;
}
.car-tail {
  fill: var(--navy);
}
/* the wheels are elements of their own, so they roll (only a transform) */
.car-wheel {
  position: absolute;
  left: calc(4.9 / 36 * 100%);
  top: calc(9.8 / 16 * 100%);
  width: calc(6.6 / 36 * 100%);
  aspect-ratio: 1;
}
.car-wheel.front {
  left: calc(24.1 / 36 * 100%);
}
.car-wheel svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.car-tyre {
  fill: var(--navy);
  stroke: #fff;
  stroke-width: 1.1;
}
/* while the road is built the engine runs: the body idles on its springs (the wheels stay on the road), puffs leave the exhaust */
.intro .car-body {
  animation: car-idle 0.3s ease-in-out infinite alternate;
}
.intro.ready .car-body {
  animation-duration: 0.52s;
}
@keyframes car-idle {
  to {
    transform: translateY(-1px);
  }
}
.car-puffs {
  position: absolute;
  left: 1px;
  bottom: 3px;
}
.car-puffs i {
  position: absolute;
  left: -3px;
  bottom: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(27, 50, 99, 0.28);
  opacity: 0;
}
/* (--i: each puff a third of a round after the one before) */
.intro:not(.ready) .car-puffs i,
.intro.leaving .car-puffs i {
  animation: car-puff 1.2s cubic-bezier(0.2, 0.7, 0.3, 1) calc(var(--i) * 0.4s) infinite;
}
.intro.leaving .car-puffs i {
  animation-duration: 0.5s;
  animation-delay: calc(var(--i) * 0.5s / 3);
}
.intro.ready:not(.leaving) .car-puffs i:first-child {
  animation: car-puff 1.6s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
}
.car-puffs i {
  --i: 0;
}
.car-puffs i:nth-child(2) {
  --i: 1;
}
.car-puffs i:nth-child(3) {
  --i: 2;
}
@keyframes car-puff {
  0% {
    transform: translate(0, 0) scale(0.5);
    opacity: 0.8;
  }
  100% {
    transform: translate(-12px, -4px) scale(1.6);
    opacity: 0;
  }
}
/* speed lines behind the tail as it pulls away, and the light of its headlamp when it flashes (ui/intro.mjs) */
.car-lines {
  position: absolute;
  right: 100%;
  top: 6px;
  opacity: 0;
}
.car-lines i {
  display: block;
  width: 6px;
  height: 1px;
  margin: 0 0 2px auto;
  background: var(--line-strong);
}
.car-lines i + i {
  width: 4px;
}
.car-beam {
  position: absolute;
  left: 97%;
  top: calc(10.55 / 16 * 100%);
  width: 10px;
  height: 6px;
  margin-top: -3px;
  background: rgba(31, 102, 220, 0.22);
  clip-path: polygon(0 35%, 100% 0, 100% 100%, 0 65%);
  opacity: 0;
}
/* the world is ready: the engine starts, the car gives a little hop */
.intro.ready .car {
  animation: car-hop 0.5s cubic-bezier(0.3, 0.9, 0.4, 1.4) 0.45s;
}
@keyframes car-hop {
  40% {
    transform: translateY(-4px) rotate(-3deg);
  }
}
/* pointing at the start button: the car revs */
@media (hover: hover) {
  .intro-panel:has(#drive:not(:disabled):hover) .car-puffs i {
    animation: car-puff 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) calc(var(--i) * 0.2s) infinite;
  }
}
@media (max-width: 540px) {
  .road {
    --car-w: 44px;
  }
}

/* ---------- the three steps ---------- */

.intro-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 20px 0 0;
  list-style: none;
}
.intro-steps li {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
  text-wrap: balance;
}
/* the keys on the first line, what else to know on the second */
.intro-steps .step-then {
  display: block;
}
.intro-steps b {
  display: block;
  margin-bottom: 8px;
  font: 700 15px/1.25 Satoshi, system-ui, sans-serif;
  letter-spacing: -0.01em;
  color: var(--ink);
}
/* keys with a little depth; they press along while the intro shows (ui/intro.mjs) */
.intro kbd {
  transition: transform 0.08s ease, background 0.08s ease, color 0.08s ease, box-shadow 0.08s ease;
}
/* (no taller than a line of text: every column on one grid of lines) */
.intro-steps kbd {
  height: 20px;
  min-width: 20px;
  margin: 0 2px 0 0;
  padding: 0 6px;
  box-shadow: inset 0 0 0 1px var(--line-strong), inset 0 -2px 0 var(--line);
  font-size: 11px;
}
.intro-steps kbd.down {
  transform: translateY(1px);
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: inset 0 0 0 1.5px var(--blue);
}
.intro-key.down {
  transform: translateY(1px);
  background: rgba(11, 20, 38, 0.2);
}

/* ---------- the foot: the legal pages and a quiet line ---------- */

.intro-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 24px;
  margin-top: 32px;
  font-size: 13px;
}
.intro-foot .legal {
  padding: 0;
}
.intro-meta {
  margin: 0;
  color: var(--muted);
}

/* ---------- the free part: the plan of the world (ui/plan.mjs) ---------- */

/* a stage with the camera's perspective (set by the plan), the sky, the plane that lies flat and stands up */
.intro-view {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.plan-sky {
  position: absolute;
  inset: 0;
  background: var(--sky);
}
.plan-plane,
.plan-layer,
.plan-wipe,
.plan-window,
.plan-drawing,
.plan-building,
.plan-building i,
.plan-pad,
.plan-ping,
.plan-you,
.plan-car,
.plan-wagon {
  position: absolute;
}
.plan-wipe {
  transform-origin: 0 0;
}
.plan-window,
.plan-drawing,
.plan-building i {
  inset: 0;
}
.plan-window {
  overflow: hidden;
}
/* the houses: a white roof on its shadow, the places' roofs in the blue; a gable roof shows its ridge */
.plan-roof {
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(27, 50, 99, 0.45);
}
.plan-shadow {
  background: rgba(27, 50, 99, 0.14);
}
.plan-building.place .plan-roof {
  background: #e0ebfb;
  box-shadow: inset 0 0 0 1px rgba(31, 102, 220, 0.55);
}
.plan-building.gable .plan-roof::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(27, 50, 99, 0.15);
}
/* the places: the ring one stops in, and a ripple as it opens */
.plan-pad {
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 2.5px var(--blue);
}
.plan-pad i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--blue);
  opacity: 0;
}
/* the cars from above: your car in the blue with its two white stripes and a ring that says where you are, the others in navy with their windscreen, the S-Bahn's two cars */
.plan-you,
.plan-car {
  border-radius: 3px;
}
.plan-you {
  background: var(--blue);
}
.plan-car {
  left: 0;
  top: 0;
  background: var(--navy);
}
.plan-you::before,
.plan-you::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  height: 12%;
  background: #fff;
}
.plan-you::before {
  top: 30%;
}
.plan-you::after {
  bottom: 30%;
}
.plan-car::after {
  content: "";
  position: absolute;
  top: 12%;
  bottom: 12%;
  left: 58%;
  width: 11%;
  border-radius: 1px;
  background: #fff;
}
.plan-beam {
  position: absolute;
  left: 100%;
  top: -40%;
  width: 70%;
  height: 180%;
  background: rgba(31, 102, 220, 0.3);
  clip-path: polygon(0 40%, 100% 0, 100% 100%, 0 60%);
  opacity: 0;
}
.plan-ping {
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--blue);
  opacity: 0;
}
.plan-wagon {
  left: 0;
  top: 0;
  border-radius: 4px;
  background: rgba(27, 50, 99, 0.85);
}
/* the places' names on the plan (the screen's own layer: they stay upright while the plane stands up), with how far each is by road; each sits beside its ring by its top left corner (ui/plan.mjs), with a halo of the page's white, as a map has it */
.plan-labels {
  position: absolute;
  inset: 0;
}
.plan-label {
  position: absolute;
  left: 0;
  top: 0;
}
.plan-label > span {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
  text-shadow: 1.5px 0 var(--page), -1.5px 0 var(--page), 0 1.5px var(--page), 0 -1.5px var(--page), 1px 1px var(--page), -1px 1px var(--page), 1px -1px var(--page), -1px -1px var(--page);
}
.plan-label b {
  font: 700 15px/1.2 Satoshi, system-ui, sans-serif;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.plan-label span span {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
/* (where the free part is narrow: the names alone) */
.plan-labels.compact .plan-label span span {
  display: none;
}
/* the legend in the corner of the free part, on the panel foot's line: where north is (the arrow turns, the N stays upright), and a scale bar */
.plan-legend {
  position: absolute;
  margin: 0 calc(var(--pad-x) + var(--safe-right)) calc(var(--pad-y) + var(--safe-bottom)) 0;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  font-size: 12px;
  line-height: 1;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.plan-north {
  display: grid;
  justify-items: center;
  gap: 3px;
}
.plan-north svg {
  width: 12px;
  height: 18px;
  fill: var(--muted);
  stroke: var(--muted);
  stroke-width: 1;
}
.plan-north b {
  font: 700 12px/1 Satoshi, system-ui, sans-serif;
  color: var(--ink);
}
.plan-scale {
  display: grid;
  gap: 5px;
}
.plan-scale i {
  display: block;
  height: 5px;
  border: 1px solid var(--muted);
  border-top: 0;
}

/* ---------- coming in: the words arrive, the panel stands still ---------- */

/* the title rises phrase by phrase from behind its own edge (--i: the phrase's turn) */
.intro-title .phrase {
  --i: 0;
  display: inline-block;
  overflow: hidden;
  padding: 0.06em 0 0.12em;
  margin: -0.06em 0 -0.12em;
  vertical-align: top;
}
.intro-title .phrase > span {
  display: inline-block;
}
html.localized .intro-title .phrase > span {
  animation: intro-rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i) * 70ms) backwards;
}
.intro-title .phrase:nth-child(2) {
  --i: 1;
}
.intro-title .phrase:nth-child(3) {
  --i: 2;
}
@keyframes intro-rise {
  from {
    transform: translateY(105%);
  }
}
/* the other parts follow, one after the other (--i: the part's turn) */
html.localized :is(.intro-main > :not(.intro-title), .intro-base > *, .intro-foot) {
  animation: intro-part 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
  animation-delay: calc(140ms + var(--i, 0) * 80ms);
}
.intro-lead {
  --i: 1;
}
.intro-actions,
.intro-note {
  --i: 2;
}
.road {
  --i: 3;
}
.intro-base > * {
  --i: 3;
}
.intro-foot {
  --i: 4;
}
@keyframes intro-part {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}
/* ready: the key that starts slides into the start button */
.intro.ready .intro-key {
  animation: intro-key 0.22s ease-out 0.1s backwards;
}
@keyframes intro-key {
  from {
    transform: translateX(6px);
    opacity: 0;
  }
}

/* ---------- the drive begins: the car pulls away out of the panel (ui/intro.mjs), the panel slides out after it ---------- */

.intro.leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease 0.75s, visibility 0s 1.1s;
}
.intro.leaving .intro-panel {
  transform: translateX(-100%);
  transition: transform 0.7s cubic-bezier(0.7, 0, 0.2, 1) 0.35s;
}
/* while the website view covers the intro, what moves on it rests (ui/intro.mjs pause; over every state's own animation) */
.intro.resting *,
.intro.resting *::before,
.intro.resting *::after {
  animation-play-state: paused !important;
}
/* meanwhile the camera dives down to the car, and the interface of the drive comes in as it lands (main.mjs start) */
body.starting .hud-in {
  animation-delay: calc(0.9s + var(--i, 0) * 40ms);
}

/* ---------- short desktop windows: the same panel, closer together ---------- */

@media (min-width: 861px) and (min-height: 541px) and (max-height: 760px) {
  .intro {
    --pad-y: 28px;
  }
  .intro-main {
    padding: 24px 0;
  }
  .intro-title {
    font-size: clamp(34px, 6vh, 50px);
    font-size: min(clamp(34px, 6vh, 50px), 10.4cqi);
  }
  .intro-lead {
    margin-top: 14px;
    font-size: 17px;
  }
  .intro-actions {
    margin-top: 26px;
  }
  .road {
    margin-top: 22px;
  }
  .intro-foot {
    margin-top: 20px;
  }
}

/* ---------- screens held upright: the world on top, the panel a sheet from the bottom ---------- */

@media (max-width: 860px) and (min-height: 541px) {
  .intro {
    --pad-x: clamp(20px, 5.4vw, 40px);
    flex-direction: column;
    justify-content: flex-end;
  }
  /* one column in the order of reading, the buttons at the end in reach of the thumb */
  .intro-panel {
    width: 100%;
    height: auto;
    max-height: calc(100% - 120px - var(--safe-top));
    display: flex;
    flex-direction: column;
    padding: 20px calc(var(--pad-x) + var(--safe-right)) calc(16px + var(--safe-bottom)) calc(var(--pad-x) + var(--safe-left));
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -1px 0 var(--line);
  }
  .intro-panel > *,
  .intro-main > *,
  .intro-base > * {
    width: 100%;
    max-width: 560px;
    margin-inline: auto;
  }
  .intro-main,
  .intro-base {
    display: contents;
  }
  .intro-logo {
    height: 24px;
  }
  .intro-head .languages {
    font-size: 13px;
  }
  .intro-title {
    order: 1;
    margin-top: 20px;
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.04;
    letter-spacing: -0.04em;
  }
  .intro-lead {
    order: 2;
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.45;
  }
  .intro-steps {
    order: 3;
    display: block;
    margin-top: 14px;
    padding: 0;
  }
  .intro-steps .step-then {
    display: inline;
  }
  .road {
    order: 4;
    margin-top: 18px;
  }
  /* each step one row: the name in a column of its own, what to do beside it */
  .intro-steps li {
    display: grid;
    grid-template-columns: 9.5em minmax(0, 1fr);
    align-items: baseline;
    gap: 12px;
    padding: 9px 0;
    line-height: 1.35;
  }
  .intro-steps li + li {
    border-top: 1px solid var(--line);
  }
  .intro-steps b {
    margin: 0;
  }
  .intro-actions {
    order: 5;
    gap: 8px;
    margin-top: 16px;
  }
  .intro-actions .button {
    flex-basis: 100%;
    min-height: 50px;
  }
  .intro-note {
    order: 6;
    margin-top: 10px;
    font-size: 14px;
  }
  .intro-foot {
    order: 7;
    margin-top: 8px;
  }
  .intro-meta {
    display: none;
  }
  .plan-label b {
    font-size: 13px;
  }
  .plan-label span span {
    font-size: 12px;
  }
  /* (above the sheet, not the screen's edge) */
  .plan-legend {
    margin-bottom: 16px;
  }
  .intro.leaving .intro-panel {
    transform: translateY(100%);
  }
}
/* phones: the world keeps its room – the steps go (the joystick, the arrow and the card that pops up explain themselves; the menu has the controls) */
@media (max-width: 600px) and (min-height: 541px) {
  body.touch-mode .intro-steps {
    display: none;
  }
}
/* short screens held upright (most phones, with the browser's bars): the sheet closer together, without the steps */
@media (max-width: 860px) and (min-height: 541px) and (max-height: 700px) {
  .intro-panel {
    padding-top: 16px;
  }
  .intro-title {
    margin-top: 14px;
    font-size: min(30px, 8vw);
  }
  .intro-lead {
    font-size: 15px;
  }
  .road {
    margin-top: 18px;
  }
  .intro-steps {
    display: none;
  }
  .intro-actions {
    margin-top: 16px;
  }
  .intro-actions .button {
    min-height: 48px;
  }
  .intro-note {
    font-size: 13px;
  }
  .intro-foot {
    margin-top: 4px;
  }
}

/* ---------- phones held sideways: a narrow panel at the left, compact ---------- */

@media (max-height: 540px) {
  .intro {
    --intro-w: min(100vw, clamp(360px, 50vw, 480px));
    --pad-x: 24px;
    --pad-y: 14px;
  }
  .intro-panel {
    grid-template-rows: auto 1fr auto;
  }
  .intro-logo {
    height: 22px;
  }
  .intro-head .languages {
    font-size: 13px;
  }
  .intro-main {
    padding: 10px 0;
  }
  .intro-title {
    font-size: min(26px, 7.4cqi);
    line-height: 1.04;
    letter-spacing: -0.035em;
  }
  .intro-lead {
    margin-top: 6px;
    font-size: 14.5px;
    line-height: 1.4;
  }
  .intro-actions {
    gap: 8px;
    margin-top: 12px;
  }
  .intro-actions .button {
    min-height: 44px;
    padding: 0 16px;
    font-size: 15px;
  }
  .intro-note {
    margin-top: 8px;
    font-size: 13px;
  }
  .road {
    --car-w: 40px;
    margin-top: 14px;
  }
  .road-status {
    font-size: 12px;
  }
  .intro-steps {
    gap: 14px;
    padding-top: 10px;
  }
  /* (on a phone the joystick explains itself, as held upright) */
  body.touch-mode .intro-steps {
    display: none;
  }
  .intro-steps li {
    font-size: 12.5px;
    line-height: 1.35;
  }
  .intro-steps b {
    margin-bottom: 2px;
    font-size: 13.5px;
  }
  /* (the legal pages are in the menu and in the website view) */
  .intro-foot {
    display: none;
  }
  .plan-label b {
    font-size: 12px;
  }
}
/* small phones sideways (and big text): the road and its car stay, the steps and the line about the build go (the menu has the controls) */
@media (max-height: 360px) {
  .road-status,
  .intro-steps {
    display: none;
  }
  /* (the room the line kept for the car) */
  .road {
    margin-top: calc(var(--car-w) * 0.45 + 8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.localized .intro-title .phrase > span,
  html.localized :is(.intro-main > :not(.intro-title), .intro-base > *, .intro-foot),
  .intro.ready .intro-key,
  .intro.ready .car,
  .intro .car-body {
    animation: none;
  }
  /* (no puffs, speed lines or flashes: the car simply stands at the tip of the road) */
  .car-puffs,
  .car-lines,
  .car-beam {
    display: none;
  }
  /* (the drive begins: the intro fades at once, nothing slides) */
  .intro.leaving {
    transition: opacity 0.35s ease, visibility 0s 0.35s;
  }
  .intro.leaving .intro-panel {
    transform: none;
    transition: none;
  }
}

/* ---------- the language switch: each language by its own name, the current one in ink ---------- */

/* each language a target of at least 32 px */
.languages {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
}
.languages button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
@media (hover: hover) {
  .languages button:hover {
    color: var(--blue);
  }
}
.languages button[aria-pressed="true"] {
  color: var(--ink);
  font-weight: 700;
  cursor: default;
}

/* ---------- dialogs ---------- */

dialog {
  border: 0;
  padding: 0;
  max-width: none;
  max-height: none;
  color: var(--ink);
}
dialog::backdrop {
  background: rgba(27, 50, 99, 0.12);
}

.panel {
  position: fixed;
  /* as tall as its place needs, at most the screen */
  inset: calc(16px + var(--safe-top)) calc(16px + var(--safe-right)) auto auto;
  width: min(460px, calc(100vw - 32px));
  height: auto;
  max-height: calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));
  margin: 0;
  padding: 40px 32px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 20px;
  background: var(--page);
  box-shadow: 0 0 0 1px var(--line), 0 32px 72px -32px rgba(27, 50, 99, 0.45);
}
.panel[open] {
  animation: panel-in 0.45s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.panel::backdrop {
  background: rgba(27, 50, 99, 0.1);
}
@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
}
.panel-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  box-shadow: none;
  background: transparent;
}
@media (hover: hover) {
  .panel-close:hover {
    background: var(--hover);
  }
}
.panel h2 {
  padding-right: 48px;
}
.panel .sections > section {
  padding: 0;
}
/* the end of a place or a page: where the tour goes on, below a hairline */
.onward {
  display: grid;
  gap: 14px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.onward-text {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}
.onward-text strong {
  font: 700 17px/1.3 Satoshi, system-ui, sans-serif;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.onward-meta:not(:empty)::before {
  content: "·";
  margin: 0 0.5em;
}
.onward-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
/* the page's address to share: a quiet link at the end of the row */
.text-button.onward-share {
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
  text-decoration-color: var(--line-strong);
}
.text-button.onward-share.copied {
  color: var(--blue);
}
/* a dialog's status line: what its link button did, and what the interface says while the dialog is open (the page behind it is inert); read out, shown when there is something to copy or to click */
.dialog-status {
  flex-basis: 100%;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.menu > .dialog-status {
  margin-bottom: 16px;
}
.onward-url {
  color: var(--ink);
  user-select: all;
}
.site-page .onward-actions {
  gap: 8px 20px;
}
.site-page .onward-share {
  margin-left: 0;
}
/* in the website view: the next page as a large link, the 3D world beside it */
.site-page .onward {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 720px;
  margin: 64px auto 0;
  padding-top: 28px;
}
.onward-next {
  font: 700 22px/1.2 Satoshi, system-ui, sans-serif;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s ease;
}
.onward-next span {
  display: inline-block;
  margin-left: 0.2em;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.15s ease;
}
@media (hover: hover) {
  .onward-next:hover,
  .onward-next:hover span {
    color: var(--blue);
  }
  .onward-next:hover span {
    transform: translateX(4px);
  }
}
body:has(dialog[open]) .zone-prompt {
  visibility: hidden;
}
.sections > section {
  display: grid;
  gap: 18px;
}
.sections > section > .button {
  justify-self: start;
}
.sections h2 {
  font-size: 32px;
  line-height: 1.06;
  letter-spacing: -0.035em;
}
.sections h2 + .lead {
  margin-top: -4px;
}
.sections h3 {
  font-size: 18px;
  letter-spacing: -0.015em;
}
.sections p {
  margin: 0;
  color: var(--muted);
}
.sections .lead {
  text-wrap: balance;
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink);
}
/* the projects: one block per poster in the gallery, divided by hairlines */
.project {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.project-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
}
.project h3 {
  font-size: 28px;
  letter-spacing: -0.03em;
}
.project .lead {
  font-size: 18px;
}
.project .button {
  justify-self: start;
}
.meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.status-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}
.meta.off .status-dot {
  background: var(--muted);
}
.shot {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
}
.shot.archived img {
  filter: grayscale(1) contrast(0.9);
  opacity: 0.8;
}
.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: var(--ink);
}
/* the separator stays with the item before it: a line never starts with it */
.facts li {
  white-space: nowrap;
}
.facts li:not(:last-child)::after {
  content: "·";
  margin: 0 10px;
  color: var(--muted);
}
.service-list {
  display: grid;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.service-list li {
  display: grid;
  gap: 6px 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.service-list p {
  font-size: 15.5px;
}
.process {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  font-size: 15px;
}
.process span {
  color: var(--ink);
}
.process span + span::before {
  content: "→";
  margin: 0 10px;
  color: var(--muted);
}
.person {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.person img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.person div {
  display: grid;
  flex: 1;
}
.person span {
  font-size: 14px;
  color: var(--muted);
}
/* the Indian flag, drawn inline */
.person .flag {
  flex: none;
  width: 27px;
  height: 18px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.brief {
  display: grid;
  gap: 16px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.brief label {
  display: grid;
  gap: 8px;
  font: 700 14px/1 Satoshi, system-ui, sans-serif;
}
.brief input,
.brief textarea {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--radius-s);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  /* the text a visitor writes is body text, not the label's heading face */
  font: 400 16px/1.45 Source, system-ui, sans-serif;
  resize: vertical;
  transition: box-shadow 0.15s ease;
}
.brief input:focus,
.brief textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--blue), 0 0 0 3px rgba(31, 102, 220, 0.14);
}
/* a field still missing after sending: a red hairline until it is written in */
.brief [aria-invalid="true"] {
  box-shadow: inset 0 0 0 1px #b42318;
}
.brief [aria-invalid="true"]:focus {
  box-shadow: inset 0 0 0 1px #b42318, 0 0 0 3px rgba(180, 35, 24, 0.14);
}
.brief .button {
  justify-self: start;
}
/* ideas to start from: one sentence of text buttons; the picked one is ink */
.ideas {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
/* a button that reads as a link in running text */
.text-button {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(31, 102, 220, 0.4);
  cursor: pointer;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
@media (hover: hover) {
  .text-button:hover {
    text-decoration-color: currentColor;
  }
}
.text-button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration-color: currentColor;
}
.form-note {
  font-size: 13px;
}
/* the status line says what happened; the address to copy follows it when no mail program took the draft */
.form-note .error {
  color: #b42318;
}
.form-note .text-button {
  margin-left: 4px;
}
details {
  border-top: 1px solid var(--line);
  padding: 16px 0 0;
}
details + details {
  margin-top: -2px;
}
summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  list-style: none;
  font: 700 16px/1.3 Satoshi, system-ui, sans-serif;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  flex: none;
  font-weight: 400;
  color: var(--muted);
}
details[open] summary::after {
  content: "–";
}
details p {
  margin-top: 8px !important;
  font-size: 15px;
}
/* the legal links: each a target of at least 32 px */
.legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  padding-top: 4px;
  font-size: 13px;
}
.legal a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--muted);
  text-decoration: none;
}
@media (hover: hover) {
  .legal a:hover {
    color: var(--blue);
  }
}

.menu {
  position: fixed;
  inset: calc(16px + var(--safe-top)) calc(16px + var(--safe-right)) auto auto;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px - var(--safe-top) - var(--safe-bottom));
  margin: 0;
  padding: 24px;
  overflow-y: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 30px 80px -24px rgba(27, 50, 99, 0.5);
}
.menu[open] {
  animation: menu-in 0.3s cubic-bezier(0.2, 0.9, 0.25, 1);
}
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sheet-head h2 {
  font-size: 24px;
}
/* the menu's title with the tour's progress under it */
.menu-heading {
  display: grid;
  gap: 6px;
}
.menu-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}
.menu-progress .tour-line i {
  width: 16px;
}
.sheet-head .icon-button {
  box-shadow: none;
  background: var(--hover);
}
/* a list of places: title and a meta line per row, between hairlines; a flat check once seen */
.place-list {
  display: grid;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.place-list li {
  border-bottom: 1px solid var(--line);
}
.place-list button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 10px 2px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.place-list button:disabled {
  cursor: default;
  opacity: 0.55;
}
.place-text {
  display: grid;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.place-list strong {
  display: block;
  font: 700 16px/1.2 Satoshi, system-ui, sans-serif;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}
.place-list small {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--muted);
}
.place-check {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.place-glyph {
  flex: none;
  width: 20px;
  text-align: center;
  font: 700 16px/1 Satoshi, system-ui, sans-serif;
  color: var(--muted);
}
.place-list [aria-current="true"] strong {
  color: var(--blue);
}
@media (hover: hover) {
  .place-list button:not(:disabled):hover strong {
    color: var(--blue);
  }
}
.menu-map {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 0.78;
  margin: 0 0 12px;
  border-radius: 16px;
  background: #dfeccf;
  cursor: pointer;
}
/* the controls: the keys in one column, what they do in the next, both left-aligned between hairlines */
.controls-list {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  margin: 0 0 20px;
  font-size: 14px;
}
.controls-list div {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: baseline;
  column-gap: 20px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.controls-list dt {
  white-space: nowrap;
  color: var(--muted);
}
.controls-list dt kbd {
  font-size: 11px;
}
.controls-list dt kbd:first-child {
  margin-left: 0;
}
.controls-list div:last-child {
  border-bottom: 0;
}
.controls-list dd {
  margin: 0;
  color: var(--ink);
}

/* ---------- notifications: one slot below the destination, one at a time (ui/notify.mjs) ---------- */

/* a toast is a line, a card has a line more and a close button, a hint an action too: one slot for all, at --notice-top */
.notice {
  position: fixed;
  left: 50%;
  top: var(--notice-top);
  z-index: 30;
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  padding: 10px 10px 10px 16px;
  background: var(--hud-solid);
  box-shadow: 0 0 0 1px var(--line), var(--shadow);
  transform: translateX(-50%);
  animation: notice-in 0.3s ease-out;
}
.notice[data-kind="toast"] {
  padding-right: 16px;
}
.notice .hud-title {
  font-size: 15.5px;
  line-height: 1.25;
  white-space: normal;
}
.notice .hud-meta {
  font-size: 14px;
  line-height: 1.4;
  white-space: normal;
}
.notice-action {
  flex: none;
}
/* narrow screens: the action goes under the text, the close button stays at the top right */
@media (max-width: 560px) {
  .notice:has(.notice-action:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    row-gap: 10px;
    padding-bottom: 14px;
  }
  .notice-action {
    grid-column: 1;
    justify-self: start;
  }
  .notice-close {
    grid-column: 2;
    grid-row: 1;
    margin-top: -2px;
  }
}
.notice-close {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-s);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
@media (hover: hover) {
  .notice-close:hover {
    color: var(--ink);
  }
}
.notice-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
@keyframes notice-in {
  from {
    opacity: 0;
    transform: translate(-50%, -8px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .notice {
    animation: none;
  }
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* a short line on its own (the race track, labs/) */
.toast {
  position: fixed;
  left: 50%;
  top: calc(84px + var(--safe-top));
  z-index: 30;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: var(--radius-s);
  color: #fff;
  background: var(--navy);
  box-shadow: var(--shadow);
  font: 700 15px/1.2 Satoshi, system-ui, sans-serif;
  white-space: nowrap;
  animation: toast-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
}

.noscript-note {
  margin: 0;
  padding: 12px 16px;
  background: var(--blue-soft);
  text-align: center;
}

/* ---------- menu tabs ---------- */

/* text tabs: the chosen one underlined in blue on the hairline */
.tabs {
  display: flex;
  gap: 24px;
  margin: 0 0 18px;
  box-shadow: inset 0 -1px 0 var(--line);
}
.tabs button {
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  font: 700 15px/1 Satoshi, system-ui, sans-serif;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}
@media (hover: hover) {
  .tabs button:hover {
    color: var(--ink);
  }
}
.tabs button[aria-selected="true"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--blue);
}
.tabs button:focus-visible {
  outline-offset: 4px;
  border-radius: 4px;
}
.pane-lead {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
}
.menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.menu-actions svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-actions .button[aria-pressed="true"] {
  color: #fff;
  background: var(--navy);
  box-shadow: none;
}
/* resetting the tour: a quiet link, asking once more in place before it forgets */
.setting-reset .setting-note {
  font-size: 14px;
}
#reset-progress.armed {
  color: #b42318;
  text-decoration-color: currentColor;
}
/* a setting: its name, a row of plain choices, a quiet line under it */
.setting {
  display: grid;
  gap: 8px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
}
.setting-label {
  font: 700 15px/1.2 Satoshi, system-ui, sans-serif;
  color: var(--ink);
}
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  border-radius: var(--radius-s);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  overflow: hidden;
}
.segmented button {
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 700 14px/1 Satoshi, system-ui, sans-serif;
  cursor: pointer;
}
.segmented button + button {
  box-shadow: inset 1px 0 0 var(--line);
}
.segmented button[aria-pressed="true"] {
  background: var(--blue);
  color: #fff;
  box-shadow: none;
}
.segmented button:focus-visible {
  outline: 2px solid rgba(31, 102, 220, 0.45);
  outline-offset: -2px;
}
.setting-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
@media (max-width: 420px) {
  .segmented:has(> :nth-child(4)) {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, 1fr);
  }
  .segmented button:nth-child(3) {
    box-shadow: inset 0 1px 0 var(--line);
  }
  .segmented button:nth-child(4) {
    box-shadow: inset 1px 1px 0 var(--line);
  }
}
/* the controls of the input in use: the keys, or what is on the touch screen */
.touch-note,
body.touch-mode .desk-note {
  display: none;
}
body.touch-mode .touch-note {
  display: grid;
}

.portal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: #070f22;
  opacity: 0;
  transition: opacity 0.38s ease;
  pointer-events: none;
}
.portal.open {
  opacity: 1;
  pointer-events: auto;
}
.portal-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #fff;
  text-align: center;
  transform: translateY(10px);
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.portal.open .portal-card {
  transform: none;
}
/* on the way up the card comes down to meet it, and the gauge empties towards its start */
.portal.up .portal-card {
  transform: translateY(-10px);
}
.portal.up.open .portal-card {
  transform: none;
}
.portal-card .hud-title {
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: normal;
}
.portal-card .hud-meta {
  margin-top: -4px;
  font-size: 15px;
  color: rgba(220, 232, 255, 0.72);
}
.portal-depth {
  font: 700 15px/1 Satoshi, system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
}
.portal-depth b {
  font-size: 44px;
  color: #fff;
  letter-spacing: -0.03em;
}
.portal-bar {
  width: 200px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.portal-bar span {
  display: block;
  height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
}

/* the data centre is dark, like the hall below: its page in the website view and its panel take the dark tokens (the same parts on navy) */
.site.dark-page,
.panel.dark {
  --ink: #fff;
  --muted: rgba(220, 232, 255, 0.72);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.26);
  --hover: rgba(255, 255, 255, 0.08);
  --page: #070f22;
  color-scheme: dark;
}
.panel.dark {
  box-shadow: 0 0 0 1px rgba(102, 181, 247, 0.18), 0 30px 80px -24px rgba(0, 0, 0, 0.7);
}
.site.dark-page {
  box-shadow: 0 0 0 1px rgba(102, 181, 247, 0.18), 0 40px 90px -40px rgba(0, 0, 0, 0.7);
}
/* the logo on navy: its white ground turned black and screened away, the letters light, the Z still blue */
.site.dark-page .site-logo img {
  mix-blend-mode: screen;
  filter: invert(1) hue-rotate(180deg);
}
.figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.figures li {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 16px 0 18px;
  border-top: 1px solid var(--line);
}
.figures b {
  font: 700 32px/1 Satoshi, system-ui, sans-serif;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.figures .figure-word b {
  font-size: 24px;
  line-height: 32px;
}
.figures span {
  font-size: 14px;
  color: var(--muted);
}
/* the network map straight on the page, between hairlines */
.network-map {
  margin: 4px 0 0;
  padding: 16px 0 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.network-map canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 360 / 136;
}
.network-map figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.regions {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}
.regions li {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.region-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 700 15px/1.2 Satoshi, system-ui, sans-serif;
}
.region-name b {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cities {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  font-size: 15px;
  color: var(--ink);
}
.cities span {
  white-space: nowrap;
}
.cities span:not(:last-child)::after {
  content: "·";
  margin: 0 9px;
  color: var(--muted);
}

/* ---------- the website without driving ---------- */

.site {
  position: fixed;
  inset: 0;
  width: min(1000px, calc(100vw - 32px));
  height: min(920px, calc(100dvh - 32px));
  margin: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border-radius: 20px;
  color: var(--ink);
  background: var(--page);
  box-shadow: 0 0 0 1px var(--line), 0 40px 90px -40px rgba(27, 50, 99, 0.5);
}
.site:not([open]) {
  display: none;
}
.site[open] {
  animation: site-in 0.4s cubic-bezier(0.2, 0.9, 0.25, 1);
}
.site::backdrop {
  background: rgba(232, 239, 245, 0.9);
}
@keyframes site-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
}
.site-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px 16px 32px;
  border-bottom: 1px solid var(--line);
}
.site-logo {
  flex: none;
  display: flex;
}
.site-logo img {
  width: auto;
  height: 26px;
  mix-blend-mode: multiply;
}
.site-nav {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}
.site-nav a {
  padding: 10px 11px;
  border-radius: 8px;
  color: var(--muted);
  font: 700 14.5px/1 Satoshi, system-ui, sans-serif;
  text-decoration: none;
  text-decoration-thickness: 2px;
  text-underline-offset: 9px;
  white-space: nowrap;
  transition: color 0.15s ease;
}
@media (hover: hover) {
  .site-nav a:hover {
    color: var(--ink);
  }
}
.site-nav a[aria-current] {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--blue);
}
.site-menu {
  display: none;
  box-shadow: none;
  background: transparent;
}
.site-close {
  flex: none;
  box-shadow: none;
  background: transparent;
}
@media (hover: hover) {
  .site-menu:hover,
  .site-close:hover {
    background: var(--hover);
  }
}
.site-drive {
  flex: none;
}
/* the page scrolls with its footer at the end; the footer stays at the bottom while the page is short */
.site-body {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.site-body:focus-visible {
  outline-offset: -4px;
}
.site-page {
  flex: 1 0 auto;
  padding: 64px 48px 72px;
}
.site-body .sections {
  max-width: 720px;
  margin: 0 auto;
}
/* page to page: the new one fades in and rises 6 px (160 ms) */
.site .sections > section:not([hidden]),
.site-page .onward {
  animation: page-in 0.16s ease-out;
}
@keyframes page-in {
  from {
    opacity: 0;
    translate: 0 6px;
  }
}
/* a page shows from its top, also when the address names its section (#kontakt) and the browser jumps to it */
.site[open] .sections > section {
  scroll-margin-top: 100vh;
}
/* without the 3D world the website view is the site: one quiet line says why */
.site-note {
  max-width: 720px;
  margin: 0 auto 40px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
/* in the website view the footer holds the legal links: the contact section's own are for the panel */
.site .sections .legal {
  display: none;
}
.site-body h2 {
  max-width: 20ch;
  font-size: clamp(32px, 4.6vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}
@media (min-width: 861px) {
  .site-body .service-list li {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
  .site-body .figures {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* pinned to the bottom of the view on wide screens (at the end of the page on phones, below) */
.site-foot {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 14px 32px;
  border-top: 1px solid var(--line);
  background: var(--page);
  font-size: 13px;
  color: var(--muted);
}
.site-foot .legal {
  padding: 0;
}
/* the start page: one row per page, like a table of contents */
.cards {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.cards a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.cards b {
  font: 700 20px/1.2 Satoshi, system-ui, sans-serif;
  letter-spacing: -0.02em;
  transition: color 0.15s ease;
}
.cards span {
  grid-column: 1;
  font-size: 15px;
  color: var(--muted);
}
.cards a::after {
  content: "→";
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  transition: transform 0.2s ease, color 0.15s ease;
}
@media (hover: hover) {
  .cards a:hover b,
  .cards a:hover::after {
    color: var(--blue);
  }
  .cards a:hover::after {
    transform: translateX(4px);
  }
}
@media (min-width: 861px) {
  .site-body .cards a {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) auto;
    padding: 22px 0;
  }
  .site-body .cards span {
    grid-column: 2;
    grid-row: 1;
  }
  .site-body .cards a::after {
    grid-column: 3;
    grid-row: 1;
  }
}

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  :root {
    --gutter: 14px;
  }
  .logo {
    height: 44px;
    padding: 0 12px;
  }
  .logo img {
    height: 24px;
  }
  .key-hint {
    display: none;
  }
  .minimap-wrap {
    width: 120px;
    height: 120px;
    border-width: 3px;
  }
  /* phones: the destination gets a row of its own under the logo and the buttons */
  .hud-top {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo . actions" "target target target";
    row-gap: 10px;
  }
  .target {
    justify-self: start;
    max-width: 100%;
    height: 46px;
  }
  /* (the minimap stands to its right) */
  body.touch-mode .target {
    max-width: calc(100% - 122px);
  }
  .target-arrow {
    width: 32px;
    height: 32px;
  }
  .target .hud-title {
    font-size: 15.5px;
  }
  .target .hud-meta {
    font-size: 12.5px;
  }
  :root {
    --notice-top: calc(var(--gutter) + var(--safe-top) + 112px);
  }
  /* below the minimap, which stands at the top right on phones */
  body.touch-mode {
    --notice-top: calc(var(--gutter) + var(--safe-top) + 182px);
  }
  .overview-hint {
    bottom: calc(var(--safe-bottom) + 24px);
    white-space: normal;
    text-align: center;
    width: max-content;
    max-width: calc(100vw - 32px);
  }
  .panel {
    inset: auto 0 0 0;
    width: 100%;
    max-height: 86dvh;
    padding: 28px 20px calc(24px + var(--safe-bottom));
    border-radius: 24px 24px 0 0;
  }
  .panel[open] {
    animation-name: sheet-in;
  }
  .panel::backdrop {
    background: rgba(27, 50, 99, 0.18);
  }
  .panel h2 {
    font-size: 28px;
  }
  .zone-prompt {
    width: calc(100% - 28px - var(--safe-left) - var(--safe-right));
    max-width: 420px;
    justify-content: space-between;
  }
}
/* phones, upright or held sideways (a sideways phone is wide but short): the view fills the screen, the navigation sits behind a button and the footer ends the page */
@media (max-width: 860px), (max-height: 540px) {
  .site {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
  .site-head {
    flex-wrap: wrap;
    gap: 10px;
    padding: calc(12px + var(--safe-top)) calc(14px + var(--safe-right)) 12px calc(18px + var(--safe-left));
  }
  .site-logo {
    margin-right: auto;
  }
  .site-logo img {
    height: 24px;
  }
  .site-menu {
    display: grid;
    order: 2;
  }
  .site-close {
    order: 3;
  }
  .site-drive {
    order: 1;
    padding: 0 14px;
  }
  .site-nav {
    order: 4;
    flex-basis: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding-top: 6px;
  }
  .site-nav.open {
    display: flex;
  }
  .site-nav a {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 16px;
  }
  .site-nav a[aria-current] {
    text-decoration: none;
    background: var(--hover);
  }
  .site-page {
    padding: 36px calc(20px + var(--safe-right)) 48px calc(20px + var(--safe-left));
  }
  /* on phones the footer is the end of the page: it takes no room while reading */
  .site-foot {
    position: static;
    padding: 20px calc(20px + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(20px + var(--safe-left));
  }
}
/* narrow phones: the way back to the 3D world says only where it goes ("3D-Welt"; the whole label is still read out), so the logo, it, the menu and the close button stay in one row */
@media (max-width: 420px) {
  .site-drive .drive-more {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
@keyframes sheet-in {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
}
@media (max-width: 520px) {
  .figures b {
    font-size: 26px;
  }
}
@media (max-width: 380px) {
  .hud-actions {
    gap: 6px;
  }
  .icon-button {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    /* no transition at all: even a very short one shows the old state for a frame */
    transition: none !important;
  }
}

/* phones held sideways */
@media (max-height: 540px) {
  /* driving with the phone held sideways: a smaller logo and minimap, the prompt low between the joystick and the buttons */
  body.touch-mode .logo {
    height: 40px;
    padding: 0 12px;
  }
  body.touch-mode .logo img {
    height: 22px;
  }
  body.touch-mode .minimap-wrap {
    top: calc(var(--gutter) + var(--safe-top) + 54px);
    width: 96px;
    height: 96px;
  }
  body.touch-mode .zone-prompt {
    bottom: calc(var(--gutter) + var(--safe-bottom));
    width: max-content;
    max-width: min(420px, calc(100vw - 2 * 188px - var(--safe-left) - var(--safe-right)));
  }
}
/* the menu on a screen held sideways: wider, with the map beside the list of places */
@media (max-height: 540px) and (min-width: 600px) {
  .menu:not(.auto-sheet) {
    width: min(760px, calc(100vw - 32px));
  }
  .pane-places:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    column-gap: 20px;
  }
  .pane-places .menu-map {
    margin: 0;
  }
  .pane-places .place-list {
    margin: 0;
    border-top: 0;
  }
  .menu .sheet-head {
    margin-bottom: 4px;
  }
  .menu .sheet-head h2 {
    font-size: 20px;
  }
  .menu .tabs {
    margin-bottom: 12px;
  }
}

/* ---------- a viewpoint: the interface steps back while the camera looks out ---------- */

.hud,
.hud-fade {
  transition: opacity 0.4s;
}
body.viewpoint :is(.hud, .hud-fade) {
  opacity: 0.4;
}

/* ---------- the Browser.lol Challenge: its card at the top, the countdown, the reward ---------- */

/* on the course the tour steps aside: no destination, minimap, overview, self-driving or key hint */
body.challenge :is(.target, .minimap-wrap, #overview, .auto-fab, .key-hint) {
  display: none;
}
/* the card where the destination stands: the stage over the time, the checkpoints and the falls, the way out */
.challenge-card {
  grid-area: target;
  min-width: 0;
  max-width: 480px;
  height: 52px;
  padding: 0 7px;
}
.challenge-card .hud-mark svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.challenge-card .hud-text {
  flex: 1;
}
.challenge-time {
  color: var(--ink);
  font-weight: 700;
}
.challenge-card .tour-line {
  margin-left: 10px;
}
.challenge-falls:not(:empty)::before {
  content: "·";
  margin: 0 0.4em 0 0.6em;
}
.challenge-card .challenge-leave {
  flex: none;
  min-height: 36px;
  margin: 0 2px 0 8px;
  padding: 0 12px;
  font-size: 13.5px;
}
/* before the start the clock waits: dimmed */
body.challenge-ready .challenge-time {
  color: var(--muted);
}

/* 3, 2, 1, go: big in the middle, each number coming in */
.challenge-count {
  position: fixed;
  left: 50%;
  top: 30%;
  z-index: 5;
  margin: 0;
  translate: -50% -50%;
  font: 700 clamp(72px, 16vw, 148px) / 1 Satoshi, system-ui, sans-serif;
  letter-spacing: -0.04em;
  color: var(--navy);
  pointer-events: none;
}
body.night .challenge-count {
  color: #fff;
}
.challenge-count.tick {
  animation: challenge-count 0.9s cubic-bezier(0.2, 0.9, 0.25, 1) both;
}
@keyframes challenge-count {
  from {
    opacity: 0;
    scale: 1.6;
  }
  30% {
    opacity: 1;
    scale: 1;
  }
  to {
    opacity: 0.85;
    scale: 0.94;
  }
}

/* the challenge's dialogs (reward, lock): in the middle of the screen, on phones too */
.panel.centred {
  inset: 0;
  width: min(460px, calc(100vw - 32px));
  height: fit-content;
  margin: auto;
  border-radius: 20px;
}
.panel.centred[open] {
  animation-name: menu-in;
}

/* the reward: the time under the lead, the way to Browser.lol first */
.reward h2 {
  margin: 0 0 12px;
}
.reward p {
  margin: 0 0 14px;
  color: var(--muted);
}
.reward .lead {
  text-wrap: balance;
  font-size: 19px;
  line-height: 1.45;
  color: var(--ink);
}
.reward-meta {
  font-variant-numeric: tabular-nums;
}
.reward-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.reward-actions .button.primary {
  flex: 1 1 100%;
}
.reward-actions .button.ghost {
  flex: 1 1 0;
}

/* the lock in front of the challenge while it is not public: the password under the lead */
.lock h2 {
  margin: 0 0 12px;
}
.lock .lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.45;
  text-wrap: balance;
}
.lock .brief {
  margin-top: 20px;
}
.lock-error {
  margin: 0;
  font-size: 15px;
  color: #b42318;
}

/* the blend without a depth: only the bar runs */
.portal.flat .portal-depth {
  display: none;
}

@media (max-width: 760px) {
  .challenge-card {
    justify-self: start;
    max-width: 100%;
    height: 46px;
  }
  .challenge-card .hud-mark {
    width: 32px;
    height: 32px;
  }
  .challenge-card .hud-title {
    font-size: 15.5px;
  }
  .challenge-card .hud-meta {
    font-size: 12.5px;
  }
}
@media (max-width: 420px) {
  .challenge-card .tour-line {
    display: none;
  }
}
@media (max-height: 540px) and (min-width: 600px) {
  #menu-extra {
    grid-column: 2;
  }
}
@media (prefers-reduced-motion: reduce) {
  .challenge-count.tick {
    animation: none;
  }
}

/* Glass surfaces, coordinated with the portfolio studio. */
.intro-panel{background:rgba(246,250,240,.83);backdrop-filter:blur(24px) saturate(130%);border:1px solid rgba(255,255,255,.72);box-shadow:0 24px 80px rgba(23,45,22,.13)}
.target,.zone-prompt,.minimap-wrap{backdrop-filter:blur(18px) saturate(125%);box-shadow:0 9px 35px rgba(21,40,20,.12)}
dialog.site{background:rgba(247,250,240,.91);backdrop-filter:blur(28px) saturate(125%);border:1px solid rgba(255,255,255,.75)}

/* The non-driving route through Shiyas's story. */
.journey{margin:0 0 3.5rem;padding:clamp(1.2rem,3vw,2.5rem);color:#eef8f4;background:radial-gradient(circle at 85% 4%,rgba(76,216,172,.16),transparent 32%),linear-gradient(145deg,#102b35,#091c29 72%);border:1px solid rgba(145,232,201,.27);border-radius:24px;box-shadow:0 24px 55px rgba(9,33,35,.18);overflow:hidden}
.journey-heading{max-width:680px}.journey-kicker,.journey-phase,.journey-caption,.journey-footer,.journey-stop small{font-size:.68rem;font-weight:800;letter-spacing:.18em}.journey-kicker,.journey-phase{color:#7ee7bf}.journey-heading h2{color:#fff!important;margin:.55rem 0!important;line-height:1.08}.journey-heading p{color:#b5c8c8;max-width:55ch;line-height:1.6;margin:0}
.journey-layout{display:grid;grid-template-columns:minmax(215px,.8fr) minmax(0,1.65fr);gap:clamp(1.2rem,3vw,3rem);margin-top:2.4rem;align-items:stretch}.journey-line{display:flex;flex-direction:column;position:relative;gap:.3rem}.journey-line:before{content:"";position:absolute;left:24px;top:30px;bottom:34px;width:3px;background:linear-gradient(#6cf0b7,#38a4ad,#416479);box-shadow:0 0 18px rgba(91,222,177,.5)}.journey-stop{position:relative;display:flex;align-items:center;gap:1rem;width:100%;padding:.6rem .5rem;border:0;border-radius:14px;background:transparent;color:#b2cac9;text-align:left;cursor:pointer;transition:background .2s,color .2s,transform .2s}.journey-stop:hover,.journey-stop:focus-visible{background:rgba(151,235,204,.1);color:#fff}.journey-stop:focus-visible{outline:2px solid #7ee7bf;outline-offset:2px}.journey-stop.is-active{color:#fff;background:rgba(130,241,191,.12);transform:translateX(4px)}.journey-node{position:relative;z-index:1;display:grid;place-items:center;flex:none;width:42px;height:42px;border:2px solid #72bbac;border-radius:50%;background:#143642;color:#d7f7e7;font-size:.7rem;font-weight:800;box-shadow:0 0 0 5px #102b35}.journey-stop.is-active .journey-node{background:#a8f2c8;color:#0e3133;border-color:#e0ffe9;box-shadow:0 0 0 5px #102b35,0 0 23px #6ce8ae}.journey-stop small{display:block;color:#6db4a9;margin-bottom:.2rem}.journey-stop strong{display:block;font-size:.92rem;line-height:1.25}
.journey-detail{min-width:0;display:grid;grid-template-columns:minmax(170px,.8fr) minmax(0,1.2fr);background:rgba(240,255,249,.075);border:1px solid rgba(177,245,221,.2);border-radius:19px;overflow:hidden}.journey-enter{animation:journey-in .35s both}@keyframes journey-in{from{opacity:.35;transform:translateX(16px)}to{opacity:1;transform:translateX(0)}}.journey-visual{position:relative;min-height:330px;background:linear-gradient(150deg,#205d64,#122938);overflow:hidden}.journey-visual img{width:100%;height:100%;object-fit:cover;display:block}.journey-visual:after{content:"";position:absolute;inset:35% 0 0;background:linear-gradient(transparent,rgba(4,24,31,.75))}.journey-visual span{position:absolute;z-index:1;bottom:1.2rem;left:1.2rem;color:#fff;font-size:.68rem;letter-spacing:.18em;font-weight:800}.journey-content{padding:clamp(1.25rem,2.7vw,2.3rem);display:flex;flex-direction:column;align-items:flex-start}.journey-content h3{color:#fff;margin:.65rem 0;font-size:clamp(1.45rem,2.5vw,2.15rem);line-height:1.12}.journey-content p{color:#c6d6d3;line-height:1.65;margin:.3rem 0 1.5rem}.journey-caption{color:#79aaab;margin-top:auto}.journey-tags{display:flex;flex-wrap:wrap;gap:.45rem;list-style:none;padding:0;margin:.7rem 0 1.3rem}.journey-tags li{border:1px solid rgba(131,226,187,.35);background:rgba(105,210,172,.12);border-radius:100px;padding:.4rem .65rem;color:#c8f8df;font-size:.74rem;font-weight:700}.journey-links{border-top:1px solid rgba(174,224,210,.18);padding-top:1rem;width:100%;font-size:.83rem}.journey-links a{color:#aaf7ce;font-weight:800;text-decoration:none}.journey-links a:hover{text-decoration:underline}.journey-links span{color:#8ea9a7}.journey-footer{display:flex;justify-content:space-between;gap:1rem;color:#6fa8a9;margin-top:1.7rem;border-top:1px solid rgba(174,224,210,.18);padding-top:1rem}
@media(max-width:850px){.journey-layout{grid-template-columns:1fr}.journey-line{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));overflow-x:auto;padding-bottom:.7rem}.journey-line:before{left:25px;right:25px;top:27px;bottom:auto;width:auto;height:3px}.journey-stop{align-items:flex-start;flex-direction:column;gap:.7rem}.journey-detail{min-height:320px}}
@media(max-width:600px){.journey{padding:1.1rem;border-radius:18px}.journey-heading h2{font-size:1.8rem}.journey-detail{grid-template-columns:1fr}.journey-visual{min-height:210px;max-height:230px}.journey-content{padding:1.25rem}.journey-footer{font-size:.55rem}.journey-stop strong{font-size:.8rem}}
@media(prefers-reduced-motion:reduce){.journey-enter{animation:none}.journey-stop{transition:none}}

.town-map-open{position:fixed;bottom:18px;left:22px;z-index:99;padding:12px 18px;border:1px solid #fff;border-radius:14px;background:#f7faeedb;backdrop-filter:blur(16px);color:#0c2941;font:600 13px Arial;cursor:pointer;box-shadow:0 8px 30px #15281522;transition:transform .15s ease,background .15s ease}
.town-map-open:hover{transform:translateY(-2px);background:#ffffff}
@media(max-width:780px){
  .town-map-open{top:calc(var(--safe-top, 0px) + 116px);bottom:auto!important;left:14px;padding:7px 13px;font-size:11px;border-radius:100px;box-shadow:0 4px 16px rgba(12,41,65,0.18)}
}
.touch-mode .town-map-open{top:calc(var(--safe-top, 0px) + 116px);bottom:auto;left:14px}
body:not(.is-driving) .town-map-open{display:none}

#town-map-dialog{padding:18px;border:1px solid #ffffff80;border-radius:24px;width:min(96vw,1450px);max-height:95vh;background:#f4f8eced;backdrop-filter:blur(25px);color:#082640}
#town-map-dialog::backdrop{background:#1021189c;backdrop-filter:blur(8px)}#town-map-dialog header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}#town-map-dialog h2{margin:0;font:700 22px Arial}#town-map-dialog header button{font:28px Arial;border:0;background:none;color:#082640;cursor:pointer}.town-map-image{position:relative;aspect-ratio:1672/941;width:100%;overflow:hidden;border-radius:16px}.town-map-image>img{display:block;width:100%;height:100%;object-fit:contain}.map-hotspot{position:absolute;background:transparent;border:2px solid transparent;border-radius:50px;cursor:pointer}.map-hotspot:hover,.map-hotspot:focus-visible{border-color:#fff;box-shadow:0 0 0 3px #08264080;outline:none}.town-map-destinations{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.town-map-destinations button{background:#082640;color:white;border:0;border-radius:10px;padding:10px 15px;font:600 12px Arial;cursor:pointer}#town-map-dialog>p{font:12px Arial;margin:10px 0 0;color:#536257}
@media(max-width:640px){#town-map-dialog{padding:12px}.town-map-destinations button{flex:1 1 28%;padding:12px 8px}#town-map-dialog h2{font-size:18px}}

.drive-controls{position:fixed;z-index:60;bottom:18px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;background:#f6f9eee6;backdrop-filter:blur(18px);border:1px solid #fff;border-radius:14px;padding:8px 14px;color:#133044;font:12px Arial;box-shadow:0 8px 30px #15281522;transition:transform .2s ease,opacity .2s ease}.drive-controls[hidden],.drive-error[hidden]{display:none!important}.drive-controls kbd{background:#fff;border:1px solid #d0d9cc;border-radius:4px;padding:3px 5px;margin:0 2px;font:600 10px Arial}.drive-controls button{border:0;background:#0c2941;color:#fff;border-radius:9px;padding:8px 12px;cursor:pointer;font:600 11px Arial;display:inline-flex;align-items:center;gap:6px}.drive-controls button kbd{color:#133044}.drive-controls-hide-btn{background:rgba(12,41,65,0.08)!important;color:#133044!important;border:1px solid rgba(19,48,68,0.18)!important;border-radius:9px!important;padding:8px 10px!important;cursor:pointer;transition:background .15s ease,transform .15s ease}.drive-controls-hide-btn:hover{background:rgba(12,41,65,0.16)!important;transform:translateY(-1px)}.drive-controls-hide-btn .hide-icon{font-size:12px;line-height:1}
.drive-controls-min-toggle{position:fixed;z-index:60;bottom:18px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;background:#f6f9eee6;backdrop-filter:blur(18px);border:1px solid #fff;border-radius:100px;padding:7px 16px;color:#133044;font:12px Arial;box-shadow:0 8px 30px #15281522;cursor:pointer;user-select:none;transition:transform .15s ease,box-shadow .15s ease,background .2s ease}.drive-controls-min-toggle[hidden]{display:none!important}.drive-controls-min-toggle:hover{transform:translateX(-50%) translateY(-2px);box-shadow:0 12px 34px #15281530;background:#ffffff}.drive-controls-min-toggle .drive-min-icon{font-size:14px;line-height:1}.drive-controls-min-toggle .drive-min-label{font-weight:700;font-size:12px;color:#0c2941}.drive-controls-min-toggle .drive-min-veh{background:rgba(12,41,65,0.08);border-radius:12px;padding:2px 8px;font-weight:600;font-size:11px;color:#133044}.drive-controls-min-toggle.is-bus .drive-min-veh{background:rgba(186,34,40,0.12);color:#ba2228}.drive-controls-min-toggle kbd{background:#fff;border:1px solid #d0d9cc;border-radius:4px;padding:2px 5px;font:600 10px Arial;color:#133044}
body:not(.is-driving) .drive-controls,body:not(.is-driving) .drive-controls-min-toggle{display:none!important}
.drive-error{position:fixed;z-index:10000;bottom:15px;left:15px;right:15px;max-width:550px;background:#fff3e0;color:#5b3e18;border:1px solid #e4bd77;border-radius:14px;padding:16px;font:13px Arial;box-shadow:0 12px 30px #1729112e}.drive-error p{margin:0 0 10px}.drive-error a{font-weight:700;color:#15394f}.touch-mode .drive-controls{bottom:17px;max-width:320px}.touch-mode .drive-controls>span{display:none}#stage:focus-visible{outline:none}

@media(max-width:780px){
  .zone-prompt{bottom:calc(var(--safe-bottom, 0px) + 84px)!important;width:min(calc(100vw - 24px),380px)!important;padding:8px 12px 8px 16px!important;gap:10px!important;z-index:65!important}
  .zone-prompt .hud-title{font-size:16px!important}
  .zone-prompt .hud-meta{font-size:11.5px!important}
  .zone-prompt-key{min-width:48px!important;height:38px!important;padding:0 8px!important;font-size:12px!important}
  .drive-controls{bottom:12px!important;padding:4px 6px!important;gap:5px!important;max-width:calc(100vw - 16px)!important;border-radius:12px!important;z-index:60!important}
  .drive-controls>span{display:none!important}
  .drive-controls kbd{display:none!important}
  .drive-controls button{padding:6px 9px!important;font-size:11px!important;white-space:nowrap!important;border-radius:8px!important;gap:4px!important}
  .drive-controls-min-toggle{bottom:12px!important;padding:6px 14px!important}
  .drive-controls-min-toggle kbd,.drive-controls-hide-btn kbd{display:none!important}
  .auto-fab{width:48px!important;height:48px!important}
  .auto-fab .auto-wheel{width:22px!important;height:22px!important}
  .auto-fab .auto-spark{transform:scale(0.8)!important}
}
@media(max-width:480px){
  .drive-controls .btn-prefix{display:none!important}
}

/* Vehicle Switch Button */
.vehicle-switch-btn{background:linear-gradient(135deg,#ba2228,#e53935)!important;color:#fff!important;border:1px solid rgba(255,255,255,0.35)!important;box-shadow:0 4px 14px rgba(186,34,40,0.4);transition:transform .15s ease,box-shadow .15s ease,background .2s ease}
.vehicle-switch-btn:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(186,34,40,0.55)}
.vehicle-switch-btn.is-bus{background:linear-gradient(135deg,#092e4e,#155e8c)!important;box-shadow:0 4px 14px rgba(9,46,78,0.45)}
.vehicle-switch-btn kbd{background:rgba(255,255,255,0.22)!important;color:#fff!important;border-color:rgba(255,255,255,0.4)!important}

/* KSRTC Terminal Interactive Switch Prompt */
.ksrtc-terminal-prompt{position:fixed;z-index:65;top:76px;left:50%;transform:translateX(-50%);width:min(92vw,460px);background:linear-gradient(145deg,rgba(16,24,34,0.95),rgba(32,14,18,0.95));border:1.5px solid rgba(245,191,24,0.65);border-radius:18px;padding:16px 20px;box-shadow:0 16px 45px rgba(0,0,0,0.6),0 0 25px rgba(245,191,24,0.25);backdrop-filter:blur(22px);color:#fff;animation:ksrtcSlideIn .35s cubic-bezier(0.16,1,0.3,1)}
.ksrtc-terminal-prompt[hidden]{display:none!important}
@keyframes ksrtcSlideIn{from{opacity:0;transform:translate(-50%,-16px)}to{opacity:1;transform:translate(-50%,0)}}
.ksrtc-badge{display:inline-flex;align-items:center;gap:7px;background:rgba(245,191,24,0.16);border:1px solid rgba(245,191,24,0.45);border-radius:20px;padding:4px 10px;font:700 11px system-ui,-apple-system,sans-serif;color:#f5bf18;letter-spacing:.8px;margin-bottom:8px}
.ksrtc-prompt-title{margin:0 0 6px;font:800 16px system-ui,-apple-system,sans-serif;color:#fff}
.ksrtc-prompt-desc{margin:0 0 12px;font:12.5px system-ui,-apple-system,sans-serif;line-height:1.45;color:#d1d7de}
.ksrtc-prompt-actions{display:flex;align-items:center;gap:10px}
.ksrtc-action-btn{display:inline-flex;align-items:center;gap:8px;background:linear-gradient(135deg,#ba2228,#f5bf18)!important;color:#fff!important;font-weight:700!important;border-radius:10px!important;padding:9px 16px!important;border:0!important;cursor:pointer;box-shadow:0 4px 16px rgba(186,34,40,0.45)}
.ksrtc-action-btn:hover{filter:brightness(1.08);transform:translateY(-1px)}
.ksrtc-action-btn kbd{background:rgba(0,0,0,0.35)!important;color:#fff!important;border:1px solid rgba(255,255,255,0.35)!important;border-radius:4px;padding:2px 6px;font-size:11px}


body.is-driving .intro,
.intro.leaving {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body.is-driving:not(.starting) .intro {
  display: none !important;
}
#drive.loading {
  opacity: 0.8;
  pointer-events: none;
  cursor: wait;
}

/* ─── ABOUT JOURNEY TEASER CARD ─── */
.about-journey-card {
  margin: 28px 0 20px;
  padding: 22px 24px;
  background: linear-gradient(135deg, rgba(8, 40, 68, 0.06), rgba(16, 185, 129, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(8, 40, 68, 0.04);
}
.metro-teaser-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.metro-badge, .metro-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.metro-teaser-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink, #101218);
}
.about-journey-card p {
  margin: 0 0 16px;
  color: var(--muted, #55606d);
  font-size: 0.95rem;
  line-height: 1.5;
}
.about-journey-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ─── JOURNEY SECTION & INTERACTIVE METRO LINE ROUTE MAP ─── */
.journey-section {
  padding-bottom: 3rem;
}
.journey-head {
  margin-bottom: 24px;
}
.journey-head h2 {
  margin: 10px 0 8px !important;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink, #101218);
}
.journey-head .lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted, #55606d);
  max-width: 65ch;
}

/* Metro Track Container */
.metro-route-container {
  position: relative;
  margin: 32px 0 28px;
  padding: 24px 16px 16px;
  background: linear-gradient(145deg, rgba(8, 28, 48, 0.94), rgba(4, 18, 32, 0.98));
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(2, 12, 22, 0.35);
  color: #fff;
  overflow: hidden;
}
.metro-line-track {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  margin: 14px 24px 28px;
}
.metro-line-glow {
  position: absolute;
  inset: -2px 0 -2px 0;
  background: linear-gradient(90deg, #06b6d4, #10b981, #f59e0b);
  border-radius: 10px;
  filter: blur(4px);
  opacity: 0.7;
}
.metro-line-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, #06b6d4, #10b981);
  border-radius: 10px;
  box-shadow: 0 0 12px #10b981;
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  z-index: 1;
}
.metro-train-indicator {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #10b981;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.8), 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: left 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
}
.metro-train-icon {
  font-size: 17px;
  line-height: 1;
}
.metro-train-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(16, 185, 129, 0.6);
  animation: metro-train-ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes metro-train-ping {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Metro Stations Nav Grid */
.metro-stations {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  position: relative;
  z-index: 2;
}
.station-node {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.65);
  padding: 6px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}
.station-node:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.station-node:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}
.station-node.active {
  color: #fff;
  background: rgba(16, 185, 129, 0.14);
}
.node-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.node-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.4);
  font-size: 13px;
  font-weight: 800;
  color: #e5e7eb;
  transition: all 0.3s ease;
}
.station-node:hover .node-dot {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.3);
  color: #fff;
}
.station-node.active .node-dot {
  background: #10b981;
  border-color: #fff;
  color: #032219;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.9);
  transform: scale(1.15);
}
.node-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.node-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
}
.node-sub {
  font-size: 0.72rem;
  opacity: 0.75;
}

/* Station Display Cards */
.metro-station-display {
  margin-top: 14px;
}
.station-card {
  display: none;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  padding: clamp(20px, 3.5vw, 32px);
  box-shadow: 0 12px 35px rgba(8, 30, 48, 0.08);
  animation: station-card-fade 0.35s ease;
}
.station-card.active {
  display: block;
}
@keyframes station-card-fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.station-card-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.station-chip {
  font-size: 12px;
  font-weight: 800;
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.04em;
}
.station-period {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted, #64748b);
}
.station-card h3 {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 800;
  color: var(--ink, #101218);
  line-height: 1.25;
}
.station-lead {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--muted, #374151);
  margin-bottom: 22px;
}
.station-skills {
  margin-bottom: 22px;
}
.station-skills h4 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--muted, #64748b);
}
.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(15, 45, 75, 0.06);
  border: 1px solid rgba(15, 45, 75, 0.15);
  color: #0f2d4a;
  padding: 5px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.skill-pill:hover {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
  transform: translateY(-1px);
}
.station-meta-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.92rem;
  line-height: 1.5;
  color: #1f2937;
}
.station-takeaway strong {
  color: #059669;
  margin-right: 6px;
}

/* Metro Station Navigation Footer */
.metro-nav-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}
.metro-step-buttons {
  display: flex;
  gap: 10px;
}

/* ─── STATION PROMPT TOAST (Removed/Hidden) ─── */
.station-prompt {
  display: none !important;
}
.station-prompt-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(10, 30, 52, 0.94);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 16px;
  padding: 12px 18px;
  color: #fff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}
.station-prompt-icon {
  font-size: 26px;
  line-height: 1;
}
.station-prompt-text {
  display: flex;
  flex-direction: column;
}
.station-prompt-text strong {
  font-size: 14px;
  color: #34d399;
}
.station-prompt-text span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

/* ─── TRAIN HUD OVERLAY (When driving the train in 3D) ─── */
.train-hud {
  position: fixed;
  z-index: 90;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 560px);
  animation: train-hud-appear 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.train-hud > * {
  pointer-events: auto;
}
.train-hud[hidden] {
  display: none !important;
}
body.is-driving-train #target,
body.is-driving-train #drive-controls,
body.is-driving-train #drive-controls-min-toggle,
body.is-driving-train #station-prompt,
body.is-driving-train .key-hint,
body.is-driving-train #key-hint {
  display: none !important;
}
@keyframes train-hud-appear {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.train-hud-card {
  background: linear-gradient(145deg, rgba(8, 28, 48, 0.96), rgba(4, 18, 32, 0.98));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 20px;
  padding: 16px 20px;
  color: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 25px rgba(16, 185, 129, 0.2);
}
.train-story-container {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.train-story-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.story-chapter-chip {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #34d399;
  background: rgba(52, 211, 153, 0.15);
  padding: 2px 7px;
  border-radius: 5px;
}
.story-station-name {
  font-size: 13px;
  font-weight: 700;
  color: #f3f4f6;
  flex: 1;
}
.story-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.story-cinema-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  cursor: pointer;
  transition: all 0.2s ease;
}
.story-cinema-open-btn:hover {
  background: #f59e0b;
  color: #000;
  border-color: #f59e0b;
  transform: scale(1.05);
}
.story-body-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.story-thumb-wrapper {
  position: relative;
  width: 90px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(16, 185, 129, 0.4);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.story-thumb-wrapper:hover {
  transform: scale(1.04);
  border-color: #34d399;
}
.story-thumb-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.story-thumb-zoom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 8px;
  font-weight: 800;
  text-align: center;
  padding: 1px 0;
  background: rgba(0, 0, 0, 0.7);
  color: #34d399;
  letter-spacing: 0.05em;
}
.story-content-col {
  flex: 1;
  min-width: 0;
}
.story-cruise-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  cursor: pointer;
  transition: all 0.2s ease;
}
.story-cruise-toggle:hover {
  background: #10b981;
  color: #04241c;
  border-color: #10b981;
}
.story-narrative-text {
  font-size: 12px;
  line-height: 1.5;
  color: #d1d5db;
  margin: 0 0 10px 0;
}
.story-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.story-pill {
  font-size: 10px;
  font-weight: 600;
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.6);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 12px;
  padding: 2px 8px;
}
.story-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.story-step-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
}
.story-step-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.story-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.story-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}
.story-dot.active {
  background: #10b981;
  border-color: #34d399;
  box-shadow: 0 0 8px #10b981;
  transform: scale(1.25);
}
.train-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.train-hud-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  background: #10b981;
  color: #04241c;
  padding: 3px 8px;
  border-radius: 6px;
}
.train-hud-title {
  font-size: 15px;
  font-weight: 700;
  color: #e5e7eb;
}
.train-hud-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.train-hud-speed {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
#train-speed-value {
  font-family: monospace, system-ui;
  font-size: 22px;
  font-weight: 800;
  color: #34d399;
}
.train-speed-unit {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}
.train-hud-hide-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.train-hud-hide-btn:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
  transform: translateY(-1px);
}
.train-hud-hide-btn .hide-icon {
  font-size: 12px;
  line-height: 1;
}
.train-hud-min-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto;
  background: linear-gradient(145deg, rgba(8, 28, 48, 0.94), rgba(4, 18, 32, 0.98));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 100px;
  padding: 10px 22px;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45), 0 0 20px rgba(16, 185, 129, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  font-family: inherit;
  animation: train-hud-appear 0.3s ease;
}
.train-hud-min-toggle[hidden] {
  display: none !important;
}
.train-hud-min-toggle:hover {
  border-color: #10b981;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 25px rgba(16, 185, 129, 0.4);
  transform: translateY(-2px);
}
.train-hud-min-toggle .min-label {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}
.train-hud-min-toggle .min-speed {
  font-family: monospace, system-ui;
  font-size: 14px;
  font-weight: 800;
  color: #34d399;
}
.train-hud-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
.train-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.train-action-btn:hover, .train-action-btn:active {
  background: #10b981;
  color: #04241c;
  border-color: #10b981;
  transform: translateY(-2px);
}
.train-action-btn.horn-btn:hover, .train-action-btn.horn-btn:active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #000;
}
.train-action-btn.exit-btn {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}
.train-action-btn.exit-btn:hover, .train-action-btn.exit-btn:active {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}
.train-hud-keys {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}
.train-hud-keys kbd {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 2px 6px;
  color: #fff;
  font-size: 10px;
}

@media (max-width: 768px) {
  .metro-stations {
    grid-template-columns: repeat(5, minmax(64px, 1fr));
    overflow-x: auto;
  }
  .node-sub {
    display: none;
  }
  .node-title {
    font-size: 0.75rem;
  }
  .node-dot {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }
  .station-prompt {
    bottom: 24px;
    right: 12px;
    left: 12px;
  }
  .station-prompt-card {
    justify-content: space-between;
  }
  .train-hud {
    bottom: 12px;
  }
  .train-hud-keys {
    display: none;
  }
}

/* ================= STORY TUNNEL CINEMA (AI CARTOON / FULL STORY VIDEO SHOW) ================= */
.story-tunnel-cinema {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #020617;
  color: #f8fafc;
  animation: cinema-fade-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.story-tunnel-cinema[hidden] {
  display: none !important;
}
@keyframes cinema-fade-in {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}
.cinema-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.15) 0%, rgba(2, 6, 23, 0.98) 85%);
  pointer-events: none;
}
.cinema-warp-tunnel {
  position: absolute;
  inset: -50%;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(52, 211, 153, 0.2) 0%, transparent 40%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04) 0px, transparent 15px, rgba(16, 185, 129, 0.05) 30px);
  animation: warp-pulse 8s linear infinite;
  pointer-events: none;
  opacity: 0.6;
}
@keyframes warp-pulse {
  0% { transform: scale(0.8) rotate(0deg); opacity: 0.4; }
  50% { transform: scale(1.1) rotate(180deg); opacity: 0.7; }
  100% { transform: scale(0.8) rotate(360deg); opacity: 0.4; }
}
.cinema-theater {
  position: relative;
  z-index: 2;
  width: min(94vw, 1020px);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: rgba(8, 22, 38, 0.92);
  backdrop-filter: blur(28px);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 24px;
  padding: 20px 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(16, 185, 129, 0.2);
}
.cinema-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.cinema-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cinema-portal-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #022c22;
  padding: 4px 10px;
  border-radius: 8px;
}
.cinema-chapter-tag {
  font-size: 11px;
  font-weight: 700;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
}
.cinema-station-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  flex: 1;
  text-align: center;
}
.cinema-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cinema-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cinema-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}
.cinema-btn.close-btn {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.cinema-btn.close-btn:hover {
  background: #ef4444;
  color: #fff;
}
.cinema-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}
.cinema-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #38bdf8);
  transition: width 0.1s linear;
}
.cinema-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 52vh;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #000;
  margin-bottom: 14px;
}
.cinema-poster-frame {
  position: absolute;
  inset: 0;
}
.cinema-screen-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: ken-burns 12s infinite alternate ease-in-out;
}
@keyframes ken-burns {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}
.cinema-film-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle, transparent 60%, rgba(0, 0, 0, 0.4) 100%);
}
.cinema-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.4) 30%, transparent 70%);
}
.cinema-narrative-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  z-index: 3;
}
.cinema-narrative-en {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  color: #f8fafc;
  margin: 0 0 6px 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}
.cinema-narrative-ml {
  font-size: 12.5px;
  line-height: 1.5;
  color: #a7f3d0;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}
.cinema-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cinema-pill {
  font-size: 10.5px;
  font-weight: 600;
  color: #6ee7b7;
  background: rgba(6, 78, 59, 0.7);
  border: 1px solid rgba(52, 211, 153, 0.4);
  border-radius: 12px;
  padding: 3px 10px;
  backdrop-filter: blur(8px);
}
.cinema-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.cinema-playback-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cinema-ctrl-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cinema-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.cinema-ctrl-btn.play-btn {
  background: #10b981;
  color: #022c22;
  border-color: #10b981;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cinema-ctrl-btn.play-btn:hover {
  background: #34d399;
}
.cinema-thumb-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 60%;
}
.cinema-thumb-card {
  position: relative;
  width: 72px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  background: #000;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
}
.cinema-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cinema-thumb-card .thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 7.5px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  text-align: center;
  padding: 1px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cinema-thumb-card.active, .cinema-thumb-card:hover {
  opacity: 1;
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

/* ================= 8-STATION METRO EXPANSION & GTA HUD STYLES ================= */
.train-action-btn.cam-btn {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}
.train-action-btn.cam-btn:hover, .train-action-btn.cam-btn:active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

/* GTA-Style Station Arrival Notification Banner */
.train-station-banner {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 92vw);
  background: rgba(8, 18, 32, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65), 0 0 25px rgba(56, 189, 248, 0.25);
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: banner-pop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
  pointer-events: auto;
}
.train-station-banner[hidden] {
  display: none !important;
}
body:not(.is-driving-train) .train-station-banner {
  display: none !important;
}
@keyframes banner-pop {
  from { opacity: 0; transform: translate(-50%, 15px) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.station-banner-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #38bdf8;
}
.pulse-beacon {
  width: 8px;
  height: 8px;
  background: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 10px #38bdf8;
  animation: beacon-blink 1.2s infinite ease-in-out;
}
@keyframes beacon-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}
.station-banner-body h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.station-banner-body p {
  margin: 2px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}
.station-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.station-banner-exit {
  background: rgba(239, 68, 68, 0.18) !important;
  border: 1px solid rgba(239, 68, 68, 0.5) !important;
  color: #fca5a5 !important;
  margin-left: auto;
  transition: all 0.2s ease;
}
.station-banner-exit:hover {
  background: rgba(239, 68, 68, 0.35) !important;
  color: #fff !important;
  border-color: #ef4444 !important;
  transform: translateY(-1px);
}

/* Journey Finale Modal (Station 8 Completion) */
.train-finale-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: finale-fade 0.4s ease;
}
.train-finale-overlay[hidden] {
  display: none !important;
}
@keyframes finale-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.train-finale-card {
  max-width: 580px;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(56, 189, 248, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.finale-pill {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.train-finale-card h2 {
  margin: 0;
  font-size: 1.55rem;
  color: #ffffff;
  line-height: 1.3;
}
.finale-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  margin: 0;
}
.finale-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

/* Station 7: My Projects Showcase Cards */
.station-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.station-project-item {
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(15, 45, 75, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.station-project-item:hover {
  transform: translateY(-3px);
  border-color: #059669;
  box-shadow: 0 8px 24px rgba(15, 45, 75, 0.12);
}
.station-project-item .proj-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.station-project-item .proj-head strong {
  font-size: 16px;
  font-weight: 800;
  color: #0f2d4a;
}
.station-project-item .proj-tag {
  font-size: 11px;
  color: #059669;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.station-project-item p {
  font-size: 13px;
  color: #374151;
  line-height: 1.55;
  margin: 0;
}
.station-project-item .proj-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}
.station-project-item .proj-tech span {
  font-size: 11px;
  font-weight: 600;
  background: rgba(15, 45, 75, 0.06);
  border: 1px solid rgba(15, 45, 75, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  color: #0f2d4a;
}
