:root {
  color-scheme: dark;
  font-family:
    -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei',
    'Noto Sans CJK SC', sans-serif;
  background: #09245b;
  --stage-h: 100vh;
  --visible-h: 100vh;
}
@supports (height: 100svh) {
  :root {
    --stage-h: 100svh;
  }
}
@supports (height: 100dvh) {
  :root {
    --visible-h: 100dvh;
  }
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  position: fixed;
  top: 0;
  left: 0;
  -webkit-tap-highlight-color: transparent;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
}
#city {
  position: fixed;
  inset: 0;
  overflow: hidden;
  overflow: clip;
  isolation: isolate;
  background: linear-gradient(
    #071738 0%,
    #0a2863 47%,
    #4160ae 73%,
    #143281 100%
  );
}
/* Reserve one-finger input on the artwork for building hits; the dialog is a
   sibling with its own native scroll area. Intentional browser zoom stays available. */
#city,
#veil {
  touch-action: manipulation;
  touch-action: pinch-zoom;
  overscroll-behavior: none;
}
#city {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
#world {
  position: absolute;
  left: 50%;
  top: calc(var(--stage-h) * 0.5);
  width: 106.4706vw;
  max-width: calc(var(--stage-h) * 0.781295);
  aspect-ratio: 3 / 4;
  transform: translate(-50%, -50%);
}
#world::before {
  content: '';
  display: block;
  padding-top: 133.333333%;
}
.extension,
.core,
.city-svg {
  display: block;
  position: absolute;
  user-select: none;
  -webkit-user-drag: none;
}
.extension {
  pointer-events: none;
  left: -174.95396%;
  top: -55.248619%;
  width: 449.90792%;
  height: 214.088398%;
}
@media (max-aspect-ratio: 1020/1390) {
  .extension {
    left: 0;
    width: 100%;
  }
}
.core,
.city-svg {
  inset: 0;
  width: 100%;
  height: 100%;
}
.core {
  pointer-events: none;
}
body:not([data-art='ready']) .hit {
  stroke: none !important;
  fill: transparent !important;
}
.city-svg {
  overflow: visible;
}
[data-building] {
  cursor: pointer;
  touch-action: manipulation;
  outline: none;
}
.hit {
  fill: transparent;
  stroke: none;
  pointer-events: fill;
}
[data-building]:focus-visible .hit,
.keyboard [data-building]:focus .hit {
  stroke: #ffffd5;
  stroke-width: 3.8;
  stroke-dasharray: 11 6;
  fill: rgba(250, 252, 170, 0.1);
}
#city.is-locked [data-building] {
  pointer-events: none;
}
.route-anchor {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
#veil {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: #060b26;
  transition: opacity 240ms ease;
}
body[data-phase='energy'] #veil {
  opacity: 0.1;
}
body[data-state='MENU_OPEN'] #veil,
body[data-state='ARCHIVE_OPEN'] #veil {
  opacity: 0.34;
  pointer-events: auto;
}
body[data-state='CLOSING'] #veil {
  pointer-events: auto;
}
#safe-probe {
  position: fixed;
  visibility: hidden;
  inset: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  pointer-events: none;
}
/* Older WebKit supports fixed positioning before the inset shorthand. */
@supports not (inset: 0) {
  #city, #veil, .core, .city-svg, .window-frame::before {
    top: 0; right: 0; bottom: 0; left: 0;
  }
  #safe-probe {
    top: 0; right: 0; bottom: 0; left: 0;
    top: env(safe-area-inset-top, 0px);
    right: env(safe-area-inset-right, 0px);
    bottom: env(safe-area-inset-bottom, 0px);
    left: env(safe-area-inset-left, 0px);
  }
}

/* All distances below are in the immutable illustration's coordinate space. */
body {
  --city-light: 0.92;
  --idle-floor: 0.56;
  --idle-peak: 0.9;
  --wire-width: 3.5;
  --halo-width: 7.5;
  --travel-head: 13;
  --travel-gap: 87;
  --detail-strength: 0.84;
  --cloud-travel: 20px;
  --floor-strength: 0.66;
  --halo-strength: 0.28;
}
body[data-neon='soft'] {
  --city-light: 0.72;
  --idle-floor: 0.36;
  --idle-peak: 0.64;
  --wire-width: 2.6;
  --halo-width: 5;
  --travel-head: 9;
  --travel-gap: 91;
  --detail-strength: 0.38;
  --cloud-travel: 14px;
  --floor-strength: 0.43;
  --halo-strength: 0.13;
}
body[data-neon='arcade'] {
  --city-light: 1;
  --idle-floor: 0.68;
  --idle-peak: 1;
  --wire-width: 4.8;
  --halo-width: 10.5;
  --travel-head: 19;
  --travel-gap: 81;
  --detail-strength: 1;
  --cloud-travel: 26px;
  --floor-strength: 0.88;
  --halo-strength: 0.46;
}
.ambient,
.building-light {
  pointer-events: none;
}
.ambient {
  opacity: var(--city-light);
}
.ambient .tier-detail {
  opacity: var(--detail-strength);
}
.ambient .power-signs,
.ambient .power-floor,
.ambient .power-life {
  opacity: 1;
}

.spark {
  animation: spark-twinkle var(--cycle) ease-in-out var(--delay) infinite;
}
@keyframes spark-twinkle {
  0%,
  100% {
    opacity: 0.17;
  }
  47% {
    opacity: 0.95;
  }
  69% {
    opacity: 0.53;
  }
}
.travel {
  stroke-dasharray: var(--head, var(--travel-head))
    var(--gap, var(--travel-gap));
  animation: transit var(--period, 6s) linear var(--delay, -2s) infinite;
}
@keyframes transit {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -100;
  }
}
/* A single painted speck follows the visible, tilted rail. The hidden part of
   its return stays behind the sphere. Translations use master-image pixels. */
.orbit-head {
  animation: ride-orbit 14.7s linear -4.1s infinite;
}
.orbit-tail { opacity: .47; }
@keyframes ride-orbit {
  0%, 100% { transform: translate(0, 0); opacity: 0; }
  2% { transform: translate(-12px, 8px); opacity: .98; }
  7% { transform: translate(-48px, 32px); }
  12% { transform: translate(-77px, 49px); }
  14% { transform: translate(-86px, 63px); }
  16% { transform: translate(-78px, 72px); }
  22% { transform: translate(-30px, 65px); }
  30% { transform: translate(36px, 50px); }
  39% { transform: translate(106px, 25px); }
  48% { transform: translate(169px, -2px); }
  56% { transform: translate(218px, -29px); }
  63% { transform: translate(260px, -54px); }
  69% { transform: translate(289px, -82px); }
  72% { transform: translate(301px, -99px); }
  74% { transform: translate(285px, -101px); }
  81% { transform: translate(234px, -93px); }
  84% { transform: translate(213px, -86px); opacity: .98; }
  85% { transform: translate(207px, -84px); opacity: 0; }
}
.pixel-lights {
  animation: surface-pixels 4.9s ease-in-out var(--delay) infinite;
}
@keyframes surface-pixels {
  0%,
  100% {
    opacity: 0.1;
  }
  43% {
    opacity: 0.8;
  }
  74% {
    opacity: 0.34;
  }
}
.floating-chip {
  animation: skim 6.9s ease-in-out var(--delay) infinite;
}
@keyframes skim {
  0%,
  100% {
    transform: translate(0, 1px);
    opacity: 0.25;
  }
  52% {
    transform: translate(-3px, -7px);
    opacity: 0.79;
  }
}
.billboard {
  animation: billboard-refresh 8.7s ease-in-out -3s infinite;
}
@keyframes billboard-refresh {
  0%,
  58%,
  100% {
    opacity: 0.035;
  }
  71% {
    opacity: 0.64;
    transform: translateX(1.5px);
  }
  83% {
    opacity: 0.13;
  }
}

.flame-glow {
  animation: flame-color 2.7s ease-in-out -1.1s infinite;
}
@keyframes flame-color {
  0%,
  100% {
    opacity: 0.12;
    fill: #e6662c;
  }
  57% {
    opacity: 0.52;
    fill: #ffbd4c;
  }
}
.flame-core,
.flame-tip {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: feed-flame 2.35s ease-in-out -0.65s infinite;
}
.flame-tip {
  animation-delay: -1.66s;
  animation-duration: 2.9s;
}
@keyframes feed-flame {
  0%,
  100% {
    opacity: 0.22;
    transform: scale(0.95, 0.82);
  }
  59% {
    opacity: 0.92;
    transform: scale(1.025, 1.08);
  }
}
.meter-bar {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: bar-level 3.6s ease-in-out var(--delay) infinite;
}
@keyframes bar-level {
  0%,
  100% {
    transform: scaleY(0.33);
  }
  38% {
    transform: scaleY(0.96);
  }
  65% {
    transform: scaleY(0.57);
  }
  83% {
    transform: scaleY(0.76);
  }
}
.chart-line {
  animation: scope-samples 4.5s linear -1.7s infinite;
}
@keyframes scope-samples {
  from { transform: translateX(0); }
  to { transform: translateX(-52px); }
}
.data-scan {
  animation: scan-data 4.7s linear -1s infinite;
}
@keyframes scan-data {
  0% {
    opacity: 0.15;
    transform: translateY(-3px);
  }
  15%,
  83% {
    opacity: 0.84;
  }
  100% {
    opacity: 0.1;
    transform: translateY(54px);
  }
}
.matrix-scroll {
  animation: run-matrix 3.95s linear -1.1s infinite;
}
@keyframes run-matrix {
  from {
    transform: translateX(-32px);
  }
  to {
    transform: translateX(8px);
  }
}
.circuit-line {
  --period: 4.9s;
  --delay: -3.2s;
}
.vertical-wire {
  --period: 5.8s;
  --delay: -1.6s;
  --head: 19;
  --gap: 81;
}
.star-glow {
  animation: gold-breathe 4.1s ease-in-out -0.5s infinite;
}
@keyframes gold-breathe {
  0%,
  100% {
    fill: #f59751;
    opacity: 0.28;
  }
  53% {
    fill: #fffbb0;
    opacity: 0.94;
  }
}
.star-edge {
  animation: sign-border 4.5s ease-in-out -2.4s infinite;
}
@keyframes sign-border {
  0%,
  100% {
    opacity: 0.2;
  }
  55% {
    opacity: 0.96;
  }
}
.cloud-drift {
  animation: drift-cloud-detail 5.7s ease-in-out -2.16s infinite alternate;
}
@keyframes drift-cloud-detail {
  from {
    transform: translate(-7px, 1.4px);
    opacity: 0.47;
  }
  to {
    transform: translate(var(--cloud-travel), -4px);
    opacity: 0.92;
  }
}
.cloud-band {
  animation: cloud-parallax 7.3s ease-in-out -3.8s infinite alternate;
}
@keyframes cloud-parallax {
  from {
    transform: translate(8px, -1px);
    opacity: 0.36;
  }
  to {
    transform: translate(-12px, 2px);
    opacity: 0.84;
  }
}
.cloud-scan {
  animation: cloud-refresh 5.4s linear -1.8s infinite;
}
@keyframes cloud-refresh {
  0% {
    opacity: 0.05;
    transform: translateY(-29px);
  }
  20%,
  73% {
    opacity: 0.6;
  }
  100% {
    opacity: 0.05;
    transform: translateY(136px);
  }
}
.shop-light {
  animation: shop-glass 5.8s ease-in-out -2.1s infinite alternate;
}
@keyframes shop-glass {
  from {
    opacity: 0.04;
  }
  to {
    opacity: 0.42;
  }
}
.door-glint {
  animation: shop-sweep 9.4s ease-in-out -6.31s infinite;
}
@keyframes shop-sweep {
  0%,
  20% {
    opacity: 0;
    transform: translateX(0);
  }
  33%,
  63% {
    opacity: 0.46;
  }
  80%,
  100% {
    opacity: 0;
    transform: translateX(255px);
  }
}
.heart-shade {
  animation: heart-rest 3.7s ease-in-out -0.9s infinite;
}
@keyframes heart-rest {
  0%,
  40%,
  100% {
    opacity: 0.28;
  }
  54%,
  74% {
    opacity: 0;
  }
}
.heart-beat {
  animation: heart-pulse 3.7s ease-in-out -0.9s infinite;
}
@keyframes heart-pulse {
  0%,
  40%,
  91%,
  100% {
    opacity: 0.1;
  }
  53% {
    opacity: 0.96;
  }
  64% {
    opacity: 0.21;
  }
  76% {
    opacity: 0.73;
  }
}
.wave-sweep {
  animation: scope-wave 3.35s linear -0.8s infinite;
}
@keyframes scope-wave {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-49px);
  }
}
.signal-scan {
  animation: small-display 5.2s linear -2.5s infinite;
}
@keyframes small-display {
  from {
    opacity: 0.52;
    transform: translateY(-4px);
  }
  to {
    opacity: 0.28;
    transform: translateY(49px);
  }
}
.marquee {
  --period: 5.9s;
  --delay: -3.1s;
}
.bridge {
  --period: 6.15s;
  --head: 24;
  --gap: 76;
}
.rail-low {
  --period: 7.3s;
  --head: 12;
  --gap: 88;
}
.reflection {
  stroke-linecap: butt;
  opacity: var(--floor-strength);
}
.left-lane {
  --period: 5.9s;
  --delay: -1.1s;
}
.center-lane {
  --period: 6.7s;
  --delay: -0.64s;
}
.right-lane {
  --period: 6.2s;
  --delay: -4s;
}
.amber-lane {
  --period: 7.15s;
  --delay: -3.4s;
}
.step-glint {
  --period: 8.2s;
  --delay: -2s;
  --head: 9;
  --gap: 91;
}
.headphones {
  animation: earbeat 2.64s ease-in-out -0.3s infinite;
}
@keyframes earbeat {
  0%,
  100% {
    opacity: 0.16;
  }
  35% {
    opacity: 0.95;
  }
  60% {
    opacity: 0.35;
  }
  75% {
    opacity: 0.62;
  }
}
.music-note {
  animation: hear-note 6.8s ease-out var(--delay) infinite;
}
@keyframes hear-note {
  0%,
  46% {
    opacity: 0;
    transform: translate(0, 3px);
  }
  56% {
    opacity: 0.88;
  }
  82% {
    opacity: 0.78;
  }
  99%,
  100% {
    opacity: 0;
    transform: translate(var(--drift), -27px);
  }
}

.fb-fire {
  --lamp: #6dffff;
  --hot: #fff0b4;
  --cycle: 5.4s;
  --delay: -1.6s;
}
.fb-supply {
  --lamp: #ffacdc;
  --hot: #fff295;
  --cycle: 6.3s;
  --delay: -4.1s;
}
.fb-like {
  --lamp: #fd78e0;
  --hot: #dfc8ff;
  --cycle: 4.8s;
  --delay: -0.91s;
}
.building-light path {
  stroke-linejoin: round;
  stroke-linecap: round;
}
.wire-shadow,
.wire-halo,
.wire-idle,
.chosen-halo,
.chosen-rim,
.edge-light,
.energy-run {
  fill: none;
}
/* The focus ring uses the same vertical attenuation. The entire accessible
   link remains hittable, including the optically unoutlined lower storey. */
[data-building='fire'] { --focus-wire: url(#upper-fade-fire); }
[data-building='supply'] { --focus-wire: url(#upper-fade-supply); }
[data-building='like'] { --focus-wire: url(#upper-fade-like); }
a[data-building]:focus-visible .hit, .keyboard a[data-building]:focus .hit {
  stroke: var(--focus-wire);
  fill: transparent;
}
.wire-shadow {
  stroke: #152351;
  stroke-width: calc(var(--wire-width) + 2.3);
  opacity: 0.37;
}
.wire-halo {
  stroke-width: var(--halo-width);
  opacity: var(--halo-strength);
}
.arcade-wire {
  display: none;
  --head: 11;
  --gap: 89;
  --period: 8.8s;
  opacity: 0.77;
}
body[data-neon='arcade']:not(.economy) .arcade-wire {
  display: block;
}
body[data-neon='arcade'] .orbit-tail {
  opacity: 0.68;
}
body[data-neon='soft'] .orbit-tail {
  opacity: 0.24;
}
.wire-idle {
  stroke-width: var(--wire-width);
  opacity: var(--idle-floor);
  animation: contour-current var(--cycle) ease-in-out var(--delay) infinite;
}
@keyframes contour-current {
  0%,
  100% {
    opacity: var(--idle-floor);
  }
  51% {
    opacity: var(--idle-peak);
  }
}
.feedback,
.feedback path {
  opacity: 0;
}
.feedback path {
  transition: opacity 145ms ease-out;
}
[data-selection='fire'] .fb-fire .feedback,
[data-selection='supply'] .fb-supply .feedback,
[data-selection='like'] .fb-like .feedback {
  opacity: 1;
}
.press-shade {
  fill: #031338;
}
.surface-light {
  fill: var(--lamp);
}
.chosen-halo {
  stroke: var(--lamp);
  stroke-width: 11;
}
.chosen-rim {
  stroke: var(--hot);
  stroke-width: 5;
}
.edge-light {
  stroke: var(--lamp);
  stroke-width: 4.4;
}
.energy-run {
  stroke: #fffce2;
  stroke-width: 5.8;
  stroke-dasharray: 18 15 2 65;
}
body[data-phase='press'] .press-shade {
  opacity: 0.36;
  transition-duration: 40ms;
}
body[data-phase='press'] .chosen-rim {
  opacity: 0.95;
  stroke-width: 3;
  transition-duration: 40ms;
}
body[data-phase='press'] .edge-light {
  opacity: 0.84;
  stroke-width: 3;
  transition-duration: 40ms;
}
body[data-phase='release'] .surface-light {
  opacity: 0.13;
}
body[data-phase='release'] .chosen-rim,
body[data-phase='release'] .edge-light,
body[data-phase='energy'] .chosen-rim,
body[data-phase='energy'] .edge-light {
  opacity: 1;
}
body[data-phase='release'] .chosen-halo,
body[data-phase='energy'] .chosen-halo {
  opacity: 0.52;
}
body[data-phase='energy'] .surface-light {
  opacity: 0.18;
}
body[data-phase='energy'] .energy-run {
  opacity: 0.96;
  animation: ignite 620ms ease-out both;
}
body[data-phase='energy'] .branch {
  animation-delay: -80ms;
}
@keyframes ignite {
  from {
    stroke-dashoffset: 46;
  }
  to {
    stroke-dashoffset: -30;
  }
}
body[data-phase='open'] .chosen-rim {
  opacity: 0.96;
}
body[data-phase='open'] .chosen-halo {
  opacity: 0.46;
}
body[data-phase='open'] .edge-light {
  opacity: 0.83;
}
body[data-phase='open'] .surface-light {
  opacity: 0.08;
}

/* The picture itself stays at full exposure. Only the new optical layers boot. */
[data-power='pending'] .ambient {
  opacity: 0;
}
[data-power='pending'] .building-light .power-signs {
  opacity: 0.41;
}
[data-power='pending'] .city-svg [data-effect] {
  animation-play-state: paused;
}
[data-power='starting'] .power-floor {
  animation: light-up-floor 400ms ease-out 300ms both;
}
[data-power='starting'] .power-signs {
  animation: light-up-signs var(--boot-length) ease-out var(--boot-delay) both;
}
.stage-fire {
  --boot-delay: 700ms;
  --boot-length: 250ms;
}
.stage-supply {
  --boot-delay: 825ms;
  --boot-length: 215ms;
}
.stage-like {
  --boot-delay: 955ms;
  --boot-length: 145ms;
}
.start-rush {
  opacity: 0;
  stroke-linecap: butt;
  stroke-dasharray: 20 84;
}
[data-power='starting'] .start-rush {
  animation: floor-ignition 400ms cubic-bezier(0.22, 0.54, 0.58, 1) 300ms both;
}
@keyframes floor-ignition {
  0% {
    opacity: 0;
    stroke-dashoffset: 21;
  }
  11% {
    opacity: 0.92;
  }
  82% {
    opacity: 0.91;
  }
  100% {
    opacity: 0;
    stroke-dashoffset: -103;
  }
}
[data-power='starting'] .power-life {
  animation: light-up-life 350ms ease-out 1100ms both;
}
@keyframes light-up-floor {
  from {
    opacity: 0.015;
  }
  62% {
    opacity: 1;
  }
  to {
    opacity: 1;
  }
}
@keyframes light-up-signs {
  from {
    opacity: 0.075;
  }
  74% {
    opacity: 0.95;
  }
  to {
    opacity: 1;
  }
}
@keyframes light-up-life {
  from {
    opacity: 0.02;
  }
  to {
    opacity: 1;
  }
}

/* Keep one visible motion in every neighborhood even on constrained phones. */
body[data-neon='soft'] .amber-lane,
body[data-neon='soft'] .rail-low,
body[data-neon='soft'] .door-glint,
body.economy .tier-detail {
  display: none;
}
body.economy .tier-detail {
  animation-play-state: paused;
}
body.economy .ambient .spark.tier-detail {
  animation-play-state: paused;
}
body.quiet .city-svg,
body.quiet .city-svg * {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .city-svg [data-effect] { animation-name: none; }
  body[data-phase] .energy-run { animation: none; }
  body .ambient {
    opacity: 0.86;
  }
  body .building-light .power-signs,
  body .ambient > g,
  body .ambient .power-life {
    opacity: 1;
  }
  .wire-idle {
    opacity: 0.78;
  }
  body[data-neon='arcade']:not(.economy) .arcade-wire {
    display: none;
  }
  .door-glint,
  .data-scan,
  .signal-scan,
  .cloud-scan,
  .orbit-tail,
  .energy-run {
    display: none;
  }
  .flame-glow,
  .flame-core,
  .heart-beat,
  .star-glow {
    opacity: 0.27;
  }
  .shop-light,
  .heart-shade {
    opacity: 0.13;
  }
  .cloud-drift,
  .headphones,
  .pixel-lights {
    opacity: 0.4;
  }
  .chosen-rim {
    stroke-width: 5;
  }
  .feedback path,
  #veil {
    transition: none;
  }
}

/* Reflected color and shadow are static vector paint on individual surfaces.
   Keeping these outside .ambient gives materials a stable exposure over a cycle. */
body {
  --material-depth: .47;
  --material-bounce: .21;
  --material-lip: .23;
  --material-wet: .22;
}
body[data-neon='soft'] {
  --material-depth: .045;
  --material-bounce: .035;
  --material-lip: .07;
  --material-wet: .035;
}
body[data-neon='arcade'] {
  --material-depth: .63;
  --material-bounce: .71;
  --material-lip: .87;
  --material-wet: .72;
}
.material-depth { opacity: var(--material-depth); }
.material-bounce { opacity: var(--material-bounce); }
.material-lip { opacity: var(--material-lip); }
.material-wet { opacity: var(--material-wet); }
.boot-glass { opacity: 0; }
[data-power='pending'] .boot-glass { opacity: .46; }
[data-power='starting'] .boot-glass {
  animation: glass-to-light var(--boot-length) ease-out var(--boot-delay) both;
}
@keyframes glass-to-light {
  from { opacity: .46; }
  61% { opacity: .11; }
  to { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  body .city-svg .boot-glass { opacity: 0; }
}

.planet-motion {
  position:absolute; left:31.39963%; top:1.588398%;
  width:40.33149%; height:18.78453%; pointer-events:none;
}
#world[data-planet-drawn] .orbital,
#world[data-planet-drawn] .pixel-lights {display:none}
@media (prefers-reduced-motion: reduce) {
  .city-svg .star-edge, .city-svg .heart-beat, .city-svg .headphones,
  .city-svg .flame-core, .city-svg .spark:not(.tier-detail),
  .city-svg .shop-light, .city-svg .wire-idle {
    animation: quiet-lamp var(--cycle, 3.8s) ease-in-out var(--delay, -.8s) infinite alternate;
  }
  .heart-beat { --cycle: 3.2s; --delay: -2.2s; }
  .headphones { --cycle: 2.9s; --delay: -1s; }
  .shop-light { --cycle: 4.6s; --delay: -3s; }
  /* Keep the signs readable against the already bright printed highlights. */
  .city-svg .flame-glow {
    animation: flame-color 5.9s ease-in-out -3.3s infinite;
  }
  .city-svg .star-glow {
    animation: gold-breathe 6.8s ease-in-out -1.2s infinite;
  }
  .city-svg .meter-bar {
    animation: quiet-meter 2.7s ease-in-out var(--delay) infinite alternate;
    transform-box: fill-box; transform-origin: center bottom;
  }
  /* Travel is in source-image pixels, inside the original screen clips. */
  .city-svg .chart-line {
    --drift-x: -9px;
    animation: local-drift 3.2s ease-in-out -1.6s infinite alternate;
  }
  .city-svg .cloud-drift {
    --drift-x: 8px; --drift-y: -2px;
    animation: local-drift 4.1s ease-in-out -2.2s infinite alternate;
  }
  .city-svg .floating-chip {
    --drift-y: -5px;
    animation: local-drift 4.8s ease-in-out var(--delay) infinite alternate;
  }
  .city-svg .music-note {
    animation: nearby-note 7.2s ease-in-out var(--delay) infinite;
  }
  /* Short pools of light move one dash spacing along the painted rails. */
  .city-svg .bridge, .city-svg .reflection {
    stroke-dasharray: 6 14;
    animation: local-current var(--period) steps(32) var(--delay) infinite;
  }
  .city-svg .reflection {
    opacity: .48;
    animation-timing-function: steps(64);
  }
}
@keyframes quiet-lamp {from{opacity:.28}to{opacity:.74}}
@keyframes quiet-meter {from{transform:scaleY(.58)}to{transform:scaleY(1)}}
@keyframes local-drift {
  from { transform: translate(0, 0); opacity: .35; }
  to { transform: translate(var(--drift-x, 0px), var(--drift-y, 0px)); opacity: .9; }
}
@keyframes nearby-note {
  0%, 100% { opacity: 0; transform: translateY(0); }
  45% { opacity: .8; }
  78% { opacity: 0; transform: translateY(-6px); }
}
@keyframes local-current { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -20; } }

#window {
  --accent: #ffc8e9;
  --iris: #f093dc;
  --secondary: #ffd787;
  --wash: rgba(224, 96, 179, 0.1);
  --cut: polygon(
    0 13px,
    13px 0,
    calc(100% - 39px) 0,
    calc(100% - 33px) 5px,
    calc(100% - 8px) 5px,
    100% 13px,
    100% calc(100% - 16px),
    calc(100% - 16px) 100%,
    8px 100%,
    0 calc(100% - 8px)
  );
  position: fixed;
  left: var(--panel-x, 50%);
  top: var(--panel-y, calc(var(--stage-h) * 0.5));
  transform: translate(-50%, -50%);
  --panel-width: 84%;
  width: var(--panel-width);
  max-width: 398px;
  width: min(
    var(--panel-width),
    398px,
    calc(
      100% - 28px - env(safe-area-inset-left, 0px) -
        env(safe-area-inset-right, 0px)
    )
  );
  max-height: var(--panel-max, calc(var(--visible-h) - 24px));
  z-index: 2;
  display: none;
  color: #f5f5ff;
  filter: drop-shadow(0 8px 12px rgba(1, 7, 28, 0.44));
  font-size: 1rem;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
#window[data-theme='fire'] {
  --accent: #a0f9ff;
  --iris: #41d7fc;
  --secondary: #ffb16d;
  --wash: rgba(33, 184, 231, 0.11);
}
#window[data-theme='like'] {
  --accent: #efc0ff;
  --iris: #cf86ff;
  --secondary: #ff8fcd;
  --wash: rgba(179, 94, 249, 0.12);
}
#window.visible {
  display: block;
}
.window-frame {
  position: relative;
  padding: 1.5px;
  overflow: hidden;
  clip-path: var(--cut);
}
.window-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    133deg,
    var(--secondary),
    var(--accent) 21%,
    var(--iris) 30%,
    #506593 52%,
    var(--iris) 74%,
    var(--accent)
  );
  clip-path: polygon(
    0 13px,
    13px 0,
    calc(100% - 39px) 0,
    calc(100% - 33px) 5px,
    calc(100% - 8px) 5px,
    100% 13px,
    100% calc(100% - 16px),
    calc(100% - 16px) 100%,
    8px 100%,
    0 calc(100% - 8px),
    0 13px,
    1.5px 13.6px,
    1.5px calc(100% - 8.6px),
    8.6px calc(100% - 1.5px),
    calc(100% - 16.6px) calc(100% - 1.5px),
    calc(100% - 1.5px) calc(100% - 16.6px),
    calc(100% - 1.5px) 13.6px,
    calc(100% - 8.6px) 6.5px,
    calc(100% - 33.6px) 6.5px,
    calc(100% - 39.6px) 1.5px,
    13.6px 1.5px,
    1.5px 13.6px
  );
}
.window-surface {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(var(--panel-max, var(--visible-h)) - 3px);
  clip-path: var(--cut);
  overflow: hidden;
  padding: 12px 17px 18px;
  background:
    linear-gradient(123deg, var(--wash), transparent 58%),
    linear-gradient(155deg, rgba(11, 22, 47, 0.94), rgba(6, 13, 34, 0.92));
}
.window-surface::after {
  content: '';
  pointer-events: none;
  position: absolute;
  top: 0;
  left: 22px;
  width: 50px;
  height: 2px;
  background: var(--secondary);
  box-shadow: 55px 0 0 -0.5px var(--iris);
}
.window-surface::before {
  content: '';
  pointer-events: none;
  position: absolute;
  bottom: 3px;
  right: 20px;
  width: 40px;
  height: 2px;
  background: repeating-linear-gradient(
    115deg,
    var(--iris) 0 3px,
    transparent 3px 6px
  );
  opacity: 0.76;
}
#window.appear .window-frame {
  animation: unfold 285ms cubic-bezier(0.18, 0.76, 0.28, 1) both;
}
#window.appear header,
#window.appear .menu-list {
  animation: resolve 180ms 55ms ease-out backwards;
}
#window.leaving .window-frame {
  animation: fold 160ms ease-in both;
}
@keyframes unfold {
  0% {
    opacity: 0.1;
    transform: scale(0.91, 0.07);
  }
  51% {
    opacity: 1;
    transform: scale(0.98, 0.88);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes resolve {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fold {
  to {
    opacity: 0;
    transform: scale(0.96, 0.83);
  }
}
#window header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 47px;
  margin-bottom: 8px;
  gap: 7px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(187, 215, 255, 0.16);
}
.window-title {
  display: none;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
  row-gap: 0;
}
.window-title h2 {
  margin: 0;
  font-size: clamp(1.18rem, 5.25vw, 1.42rem);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.035em;
  color: #fff9ff;
}
.title-symbol {
  width: 22px;
  height: 22px;
  color: var(--secondary);
  flex: none;
}
.weibo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 4px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.weibo-mark {
  width: 17px;
  height: 17px;
  background: currentColor;
  mask: url(/icons/weibo.svg) center/contain no-repeat;
  -webkit-mask: url(/icons/weibo.svg) center/contain no-repeat;
}
.weibo:active {
  color: #fff;
  background: var(--wash);
}
.close {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  margin-left: auto;
  margin-right: -5px;
  color: var(--accent);
  text-decoration: none;
  flex: none;
}
.close span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  background: var(--wash);
  border: 1px solid rgba(211, 223, 255, 0.31);
  border-radius: 5px;
}
.close svg {
  width: 17px;
  height: 17px;
}
.close:active span {
  background: var(--iris);
  color: #111e38;
}
.menu-list {
  display: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2px;
  margin: -2px;
  scrollbar-width: thin;
  scrollbar-color: var(--iris) transparent;
}
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 13px;
  margin: 0 0 7px;
  text-decoration: none;
  font-weight: 550;
  letter-spacing: 0.015em;
  line-height: 1.4;
  background: linear-gradient(108deg, var(--wash), rgba(47, 68, 109, 0.17));
  border: 1px solid rgba(179, 198, 234, 0.22);
  border-radius: 4px;
  color: #f4f5ff;
  touch-action: manipulation;
  transition:
    transform 110ms,
    background-color 110ms,
    border-color 110ms;
}
.option:last-child {
  margin-bottom: 0;
}
.option .glyph {
  width: 19px;
  height: 19px;
  flex: none;
  color: var(--accent);
}
.option span {
  overflow-wrap: anywhere;
}
.option:active,
.option.pressed {
  background-color: var(--wash);
  border-color: var(--iris);
  transform: translateY(1px) scale(0.987);
}
@media (hover: hover) {
  .option:hover,
  .weibo:hover,
  .close:hover span {
    background-color: var(--wash);
    border-color: var(--iris);
  }
}
.option.utility {
  color: var(--accent);
  background: rgba(30, 41, 70, 0.35);
  border-style: dashed;
}
.option[aria-disabled='true'] {
  opacity: 0.55;
}
#window a:focus-visible,
.keyboard #window a:focus {
  outline: 2px solid var(--secondary);
  outline-offset: -3px;
}
#window [data-active='true'].window-title {
  display: flex;
}
#window [data-active='true'].menu-list {
  display: block;
}
@media (max-width: 350px) {
  #window { --panel-width: 90%; }
  .window-surface {
    padding: 10px 12px 14px;
  }
  .title-symbol {
    width: 18px;
    height: 18px;
  }
  .window-title {
    gap: 5px;
  }
  #window header {
    gap: 2px;
  }
  .option {
    gap: 9px;
    padding-inline: 10px;
  }
}
@media (max-height: 435px) {
  .window-surface {
    padding-top: 4px;
    padding-bottom: 10px;
  }
  #window header {
    margin-bottom: 4px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #window *,
  #window *::after {
    animation: none !important;
    transition: none !important;
  }
}

body:not(.enhanced) #fire:target~#window {display:block}
    body:not(.enhanced) #fire:target~#window .window-title[data-page="fire"] {display:flex}
    body:not(.enhanced) #fire:target~#window .menu-list[data-page="fire"] {display:block}
    body:not(.enhanced) #fire:target~#veil {opacity:.30;pointer-events:auto}
body:not(.enhanced) #supply:target~#window {display:block}
    body:not(.enhanced) #supply:target~#window .window-title[data-page="supply"] {display:flex}
    body:not(.enhanced) #supply:target~#window .menu-list[data-page="supply"] {display:block}
    body:not(.enhanced) #supply:target~#veil {opacity:.30;pointer-events:auto}
body:not(.enhanced) #like:target~#window {display:block}
    body:not(.enhanced) #like:target~#window .window-title[data-page="like"] {display:flex}
    body:not(.enhanced) #like:target~#window .menu-list[data-page="like"] {display:block}
    body:not(.enhanced) #like:target~#veil {opacity:.30;pointer-events:auto}
body:not(.enhanced) #archive:target~#window {display:block}
    body:not(.enhanced) #archive:target~#window .window-title[data-page="archive"] {display:flex}
    body:not(.enhanced) #archive:target~#window .menu-list[data-page="archive"] {display:block}
    body:not(.enhanced) #archive:target~#veil {opacity:.30;pointer-events:auto}