.city-stage {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.city-app {
  position: relative;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, var(--night) 0%, var(--deep) 76%, var(--night) 100%);
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.city-app[data-mode="full"] {
  height: calc(100vh - var(--header-h) - var(--safe-top) - 1px);
  height: calc(100dvh - var(--header-h) - var(--safe-top) - 1px);
  min-height: 260px;
}

.city-app[data-mode="embed"] {
  height: clamp(360px, 46vw, 560px);
  cursor: pointer;
}

.city-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  outline: none;
}

.city-canvas.is-dragging {
  cursor: grabbing;
}

.city-canvas:focus-visible {
  outline: 2px solid var(--blue-soft);
  outline-offset: -2px;
  border-radius: 0;
}

.city-app[data-mode="embed"] .city-canvas {
  touch-action: auto;
  cursor: pointer;
}

.city-hud {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  font-family: var(--font-body);
}

.city-hud > * {
  pointer-events: auto;
}

.city-top {
  position: absolute;
  top: 10px;
  left: max(10px, var(--safe-left));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  max-width: calc(100% - 110px);
  pointer-events: none;
}

.city-top > * {
  pointer-events: auto;
}

.city-clock {
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 10px;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  background: rgba(4, 10, 23, .72);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.city-clock-dim {
  color: var(--muted);
}

.city-clock-time {
  display: inline-block;
  min-width: 4ch;
}

.city-clock-phase {
  position: relative;
  padding-left: 10px;
  color: var(--silver);
  font-size: .75rem;
  letter-spacing: 0;
}

.city-clock-phase::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  margin-top: -6px;
  background: var(--line-strong);
}

.city-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  height: var(--chip-h);
  padding: 0 var(--sp-2);
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  background: rgba(4, 10, 23, .72);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.city-chip-dot {
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--silver);
}

.city-tour-btn,
.city-about {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  background: rgba(4, 10, 23, .72);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}

.city-about {
  position: absolute;
  top: 10px;
  right: max(10px, var(--safe-right));
  color: var(--silver);
  border-color: var(--line);
}

.city-about svg {
  width: 13px;
  height: 13px;
}

.city-tour-btn:hover,
.city-about:hover {
  color: var(--white);
  border-color: var(--silver);
  background: var(--panel);
}

.city-app.is-touring .city-tour-btn:first-of-type,
.city-firms-btn.is-on {
  border-color: var(--silver);
}

.city-labels-state {
  color: var(--silver);
  font-weight: 500;
}

.city-firms {
  position: absolute;
  right: max(10px, var(--safe-right));
  top: 92px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 320px;
  max-height: calc(100% - 92px - 64px);
  padding: 12px 0 0;
  background: rgba(4, 10, 23, .9);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.city-firms-title {
  margin: 0 0 6px;
  color: var(--silver);
  font-size: .75rem;
  font-weight: 600;
}

.city-firms-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.city-firms-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  color: var(--white);
  font-size: .8125rem;
  line-height: 1.2;
}

.city-firm-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 20px;
  padding: 0 6px;
  color: var(--white);
  font-size: .75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.city-firm-name {
  color: var(--silver);
}

.city-side {
  position: absolute;
  top: 52px;
  right: max(10px, var(--safe-right));
  display: flex;
  flex-direction: column;
  width: 296px;
  max-height: calc(100% - 52px - 56px);
  background: rgba(4, 10, 23, .84);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.city-side-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: none;
  height: 40px;
  padding: 0 4px 0 var(--sp-3);
  border-bottom: 1px solid var(--line);
}

.city-side-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-side.is-collapsed {
  width: auto;
  background: rgba(4, 10, 23, .72);
}

.city-side.is-collapsed .city-side-head {
  height: 32px;
  border-bottom-color: transparent;
  padding-left: 10px;
}

.city-side.is-collapsed .city-side-head .city-chip {
  display: none;
}

.city-side.is-collapsed .city-side-body {
  display: none;
}

.city-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--silver);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.city-icon-btn svg {
  width: 14px;
  height: 14px;
  transition: transform .25s var(--ease);
}

.city-icon-btn:hover {
  color: var(--white);
  border-color: var(--line-strong);
}

.city-side.is-collapsed .city-side-toggle svg {
  transform: rotate(180deg);
}

.city-side-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.city-stats {
  flex: none;
  padding: var(--sp-3) var(--sp-3) 0;
}

.city-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: 0;
}

.city-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.city-stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2px;
  min-width: 0;
  padding: 7px 10px;
}

.city-stat:nth-child(2n) {
  border-left: 1px solid var(--line);
}

.city-stat:nth-child(n+3) {
  border-top: 1px solid var(--line);
}

.city-stat dt {
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.3;
}

.city-stat dd {
  margin: 0;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: .875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.city-stat dd[data-stat="earned"] {
  color: var(--blue);
}

.city-log {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 6px 0 4px;
  overflow: hidden;
  list-style: none;
}

.city-log-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  grid-template-areas: "time code amt" "text text text";
  column-gap: var(--sp-2);
  row-gap: 1px;
  padding: 6px var(--sp-3);
  font-size: .75rem;
  line-height: 1.35;
  border-bottom: 1px solid rgba(150, 180, 240, .07);
}

.city-log-row:last-child {
  border-bottom: 0;
}

.city-log-time {
  grid-area: time;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.city-log-code {
  grid-area: code;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
}

.city-log-amt {
  grid-area: amt;
  justify-self: end;
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.city-log-amt.is-earned {
  color: var(--blue);
}

.city-log-text {
  grid-area: text;
  overflow: hidden;
  color: var(--silver);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-log-row.is-new {
  animation: city-in .6s var(--ease);
}

@keyframes city-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.city-card {
  position: absolute;
  top: 52px;
  left: max(10px, var(--safe-left));
  width: 320px;
  max-height: calc(100% - 52px - 62px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px;
  background: rgba(4, 10, 23, .9);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.city-card[hidden],
.city-hud [hidden] {
  display: none;
}

.city-card-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: -4px -4px 0 0;
}

.city-badge {
  display: inline-flex;
  align-items: center;
  height: var(--chip-h);
  padding: 0 var(--sp-2);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: 0;
  border: 1px solid var(--silver);
  border-radius: var(--radius-sm);
}

.city-card-company {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--silver);
  font-size: .875rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.city-card-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin: var(--sp-2) 0 var(--sp-3);
}

.city-card-code {
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
}

.city-card-follow {
  height: 28px;
  padding: 0 10px;
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.city-card-follow.is-on {
  color: var(--white);
  border-color: var(--silver);
}

.city-card-follow:hover {
  color: var(--white);
  border-color: var(--white);
}

.city-card-rows {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}

.city-card-rows > div {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 10px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid rgba(150, 180, 240, .07);
}

.city-card-rows > div:last-child {
  border-bottom: 0;
}

.city-card-rows dt {
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.4;
}

.city-card-rows dd {
  margin: 0;
  color: var(--white);
  font-size: .875rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.city-card-rows dd[data-k="wallet"],
.city-card-rows dd[data-k="card"],
.city-card-rows dd[data-k="earned"],
.city-card-rows dd[data-k="spent"] {
  font-family: var(--font-mono);
  font-size: .875rem;
  font-variant-numeric: tabular-nums;
}

.city-card-rows dd[data-k="earned"] {
  color: var(--blue);
}

.city-tour {
  position: absolute;
  left: 50%;
  bottom: calc(max(10px, var(--safe-bottom)) + 44px);
  z-index: 3;
  width: min(420px, calc(100% - 24px));
  padding: var(--sp-4);
  background: rgba(4, 10, 23, .92);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.city-tour-step {
  margin: 0 0 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: 0;
}

.city-tour-title {
  margin: 0 0 4px;
  color: var(--white);
  font-size: 1rem;
  font-weight: 500;
}

.city-tour-text {
  margin: 0;
  color: var(--silver);
  font-size: .875rem;
  line-height: 1.5;
}

.city-tour-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.city-tour-actions button {
  height: 32px;
  padding: 0 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.city-tour-actions .city-tour-next {
  background: var(--white);
  border-color: var(--white);
  color: var(--night);
}

.city-tour-actions button:hover {
  border-color: var(--white);
}

.city-tour-actions .city-tour-next:hover {
  background: var(--silver);
  border-color: var(--silver);
}

.city-bottom {
  position: absolute;
  left: max(10px, var(--safe-left));
  right: max(10px, var(--safe-right));
  bottom: max(10px, var(--safe-bottom));
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 40px;
  pointer-events: none;
}

.city-bottom > * {
  pointer-events: auto;
}

.city-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.city-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--silver);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  background: rgba(4, 10, 23, .72);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}

.city-btn svg {
  width: 14px;
  height: 14px;
}

.city-btn:hover {
  color: var(--white);
  border-color: var(--silver);
}

.city-map {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 40px;
  overflow: hidden;
  background: rgba(4, 10, 23, .72);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.city-map-canvas {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: block;
  width: 100%;
  height: calc(100% - 16px);
}

.city-map-btns {
  position: absolute;
  inset: 0;
  display: flex;
}

.city-map-btn {
  position: relative;
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  min-width: 0;
  padding: 0 2px 1px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(150, 180, 240, .08);
  cursor: pointer;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}

.city-map-btn:first-child {
  border-left: 0;
}

.city-map-btn:hover {
  color: var(--white);
  background: rgba(185, 197, 216, .05);
}

.city-map-btn:focus-visible {
  outline-offset: -2px;
}

.city-map-btn span {
  overflow: hidden;
  text-overflow: clip;
}

.city-call {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.city-call-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 11px 0 4px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  background: rgba(4, 10, 23, .9);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
}

.city-call-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--night);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  background: var(--white);
  border-radius: 50%;
}

.city-call[data-i="1"] .city-call-n {
  color: var(--white);
  background: var(--blue);
}

.city-call-line,
.city-call-dot {
  display: none;
}

.city-teaser {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.city-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: var(--sp-4) 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.city-steps li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: 0;
  padding: var(--sp-3) var(--sp-4);
  color: var(--silver);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.city-steps li + li {
  border-left: 1px solid var(--line);
}

.city-steps-n {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--night);
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  background: var(--white);
  border-radius: 50%;
}

.city-steps li:nth-child(2) .city-steps-n {
  color: var(--white);
  background: var(--blue);
}

.city-teaser-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.city-teaser-foot .btn svg {
  width: 14px;
  height: 14px;
}

.city-info {
  padding-block: var(--sp-8);
}

.city-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--sp-7);
  align-items: start;
}

.city-info .section-head {
  margin-bottom: 0;
}

.city-info h1 {
  color: var(--white);
  font-size: var(--fs-h2);
  font-weight: 400;
  line-height: var(--lh-h2);
  letter-spacing: var(--track-h2);
}

.city-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.city-legend li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 64px;
  padding: var(--sp-3) var(--sp-4);
  color: var(--silver);
  font-size: var(--fs-small);
  line-height: 1.4;
}

.city-legend li:nth-child(2n) {
  border-left: 1px solid var(--line);
}

.city-legend li:nth-child(n+3) {
  border-top: 1px solid var(--line);
}

.city-legend svg {
  flex: none;
  width: 32px;
  height: 32px;
}

.city-footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.city-footnote .city-chip {
  background: transparent;
}

@media (max-width: 1100px) {
  .city-map-btn span {
    display: none;
  }
}

@media (max-width: 900px) {

  .city-map-canvas {
    height: 100%;
  }

  .city-info-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-6);
  }
}

@media (pointer: coarse) {
  .city-btn {
    width: 44px;
    height: 44px;
  }

  .city-icon-btn {
    width: 44px;
    height: 44px;
  }

  .city-about,
  .city-tour-btn,
  .city-clock {
    height: 44px;
  }

  .city-tour-actions button {
    height: 44px;
  }

  .city-bottom,
  .city-map {
    height: 44px;
  }

  .city-firms {
    top: 104px;
  }

  .city-side.is-collapsed .city-side-head {
    height: 44px;
  }

  .city-side {
    top: 62px;
    max-height: calc(100% - 62px - 68px);
  }

  .city-card {
    top: 62px;
  }

  .city-tour {
    bottom: calc(max(10px, var(--safe-bottom)) + 56px);
  }
}

@media (max-width: 760px) {
  .city-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .city-steps li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .city-call-box {
    height: 26px;
    font-size: .75rem;
  }

}

@media (max-width: 640px) {
  .city-top {
    max-width: calc(100% - 64px);
  }

  .city-clock {
    gap: var(--sp-2);
  }

  .city-about span {
    display: none;
  }

  .city-about {
    width: 44px;
    padding: 0;
  }

  .city-side,
  .city-side.is-collapsed {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: auto;
    max-height: 64%;
    padding-bottom: var(--safe-bottom);
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
    background: rgba(4, 10, 23, .94);
  }

  .city-side-head,
  .city-side.is-collapsed .city-side-head {
    height: 48px;
    padding-left: max(var(--sp-4), var(--safe-left));
  }

  .city-side-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .city-log {
    overflow: visible;
  }

  .city-card {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    width: auto;
    padding: var(--sp-4) max(var(--sp-4), var(--safe-right)) calc(var(--sp-4) + var(--safe-bottom)) max(var(--sp-4), var(--safe-left));
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
    background: rgba(4, 10, 23, .95);
  }

  .city-card {
    max-height: 70%;
  }

  .city-tour {
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    width: auto;
    padding: var(--sp-4) max(var(--sp-4), var(--safe-right)) calc(var(--sp-4) + var(--safe-bottom)) max(var(--sp-4), var(--safe-left));
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
    transform: none;
  }

  .city-app.is-following .city-side,
  .city-app.is-following .city-bottom,
  .city-app.is-touring .city-side,
  .city-app.is-touring .city-bottom,
  .city-app.is-sheet-open .city-bottom {
    display: none;
  }

  .city-bottom {
    bottom: calc(48px + var(--safe-bottom) + 10px);
  }

  .city-firms {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    width: auto;
    padding: var(--sp-4) max(var(--sp-4), var(--safe-right)) calc(var(--sp-4) + var(--safe-bottom)) max(var(--sp-4), var(--safe-left));
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
    background: rgba(4, 10, 23, .96);
  }

  .city-firms-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
  }

  .city-app.is-firms-open .city-side,
  .city-app.is-firms-open .city-bottom {
    display: none;
  }

  .city-app.is-following .city-firms,
  .city-app.is-touring .city-firms,
  .city-app.is-sheet-open .city-firms {
    display: none;
  }

  .city-tour-btn {
    padding: 0 10px;
  }

  .city-controls {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    flex-direction: column;
  }

  .city-teaser-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .city-teaser-foot .btn {
    width: 100%;
  }

  .city-teaser-foot .city-chip {
    align-self: flex-start;
  }

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

  .city-legend li:nth-child(2n) {
    border-left: 0;
  }

  .city-legend li:nth-child(n+2) {
    border-top: 1px solid var(--line);
  }

  .city-app[data-mode="embed"] {
    height: 440px;
  }
}

@media (max-height: 520px) and (min-width: 641px) {
  .city-card {
    max-height: calc(100% - 62px - 68px);
    overflow-y: auto;
  }

  .city-tour {
    padding: var(--sp-3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .city-hud {
    transition: none;
  }

  .city-log-row.is-new {
    animation: none;
  }

  .city-icon-btn svg {
    transition: none;
  }
}

.city-dir-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 14px;
}

.city-dir-head .city-firms-title {
  margin: 0;
  color: var(--white);
  font-size: .875rem;
}

.city-dir-total {
  color: var(--muted);
  font-size: .75rem;
}

.city-dir-search {
  flex: none;
  height: 34px;
  margin: 10px 14px 8px;
  padding: 0 10px;
  color: var(--white);
  font: 400 .8125rem/1 var(--font-body);
  background: var(--night);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  -webkit-appearance: none;
  appearance: none;
}

.city-dir-search::placeholder {
  color: var(--muted);
}

.city-dir-search:focus-visible {
  outline: 2px solid var(--blue-soft);
  outline-offset: 0;
}

.city-dir-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 6px 8px;
}

.city-dir-group[hidden],
.city-dir-items li[hidden] {
  display: none;
}

.city-dir-sector {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 8px 8px 6px;
  color: var(--silver);
  font-size: .75rem;
  font-weight: 600;
  background: rgba(4, 10, 23, .96);
}

.city-dir-items {
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
}

.city-dir-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 8px;
  color: var(--white);
  font-family: var(--font-body);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.city-dir-item:hover {
  background: rgba(185, 197, 216, .05);
  border-color: var(--line);
}

.city-dir-item[aria-pressed="true"] {
  background: var(--panel-2);
  border-color: var(--silver);
}

.city-dir-item .city-firm-code {
  flex: none;
  margin-top: 1px;
}

.city-dir-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.city-dir-name {
  color: var(--white);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.3;
}

.city-dir-spec {
  color: var(--silver);
  font-size: .8125rem;
  line-height: 1.35;
}

.city-dir-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
  .city-firms {
    max-height: 72%;
    padding: var(--sp-4) 0 0;
  }

  .city-dir-head {
    padding: 0 max(var(--sp-4), var(--safe-left));
  }

  .city-dir-search {
    height: 44px;
    margin: 10px max(var(--sp-4), var(--safe-left)) 8px;
    font-size: 1rem;
  }

  .city-dir-list {
    padding: 0 max(10px, var(--safe-left)) calc(10px + var(--safe-bottom));
  }

  .city-dir-item {
    min-height: 44px;
  }
}

.city-explore-btn,
.city-chips,
.city-explore {
  display: none;
}

.city-explore[hidden] {
  display: none !important;
}

@media (max-width: 640px), (max-height: 500px) and (max-width: 950px) {
  .city-top {
    top: max(8px, var(--safe-top));
    left: max(10px, var(--safe-left));
    max-width: calc(100% - 76px - var(--safe-right));
    flex-wrap: nowrap;
  }

  .city-top > .city-chip,
  .city-top > .city-tour-btn {
    display: none;
  }

  .city-top > .city-explore-btn {
    display: inline-flex;
  }

  .city-clock,
  .city-top > .city-explore-btn,
  .city-about {
    height: 40px;
  }

  .city-clock {
    min-width: 0;
    overflow: hidden;
  }

  .city-about {
    top: max(8px, var(--safe-top));
    right: max(10px, var(--safe-right));
    width: 40px;
    padding: 0;
  }

  .city-about span {
    display: none;
  }

  .city-map,
  .city-firms-btn,
  .city-labels-btn,
  .city-btn[data-act="speed"] {
    display: none;
  }

  .city-bottom {
    left: max(10px, var(--safe-left));
    right: max(10px, var(--safe-right));
    bottom: max(10px, var(--safe-bottom));
    height: 40px;
    align-items: center;
    gap: 8px;
  }

  .city-chips {
    display: flex;
    flex: 1 1 auto;
    gap: 6px;
    min-width: 0;
    height: 40px;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
    mask-image: linear-gradient(90deg, #000 88%, transparent);
  }

  .city-chips::-webkit-scrollbar {
    display: none;
  }

  .city-chip-btn {
    flex: none;
    height: 34px;
    padding: 0 12px;
    color: var(--white);
    font: 500 .8125rem/1 var(--font-body);
    white-space: nowrap;
    background: rgba(4, 10, 23, .84);
    border: 1px solid var(--line-strong);
    border-radius: 17px;
    cursor: pointer;
  }

  .city-chip-btn:active {
    background: var(--panel-2);
  }

  .city-controls,
  .city-app .city-controls {
    position: static;
    flex: none;
    flex-direction: row;
    gap: 0;
    height: 40px;
    padding: 0 2px;
    background: rgba(4, 10, 23, .86);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  .city-controls .city-btn,
  .city-app .city-controls .city-btn {
    width: 40px;
    height: 38px;
    background: transparent;
    border: 0;
    border-radius: 19px;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .city-side.is-collapsed {
    display: none;
  }

  .city-side,
  .city-card,
  .city-tour,
  .city-firms,
  .city-explore {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    width: auto;
    transform: none;
    border-radius: 14px 14px 0 0;
    border-bottom: 0;
    background: rgba(4, 10, 23, .96);
    padding-left: max(var(--sp-4), var(--safe-left));
    padding-right: max(var(--sp-4), var(--safe-right));
  }

  .city-side::before,
  .city-card::before,
  .city-tour::before,
  .city-firms::before,
  .city-explore::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 36px;
    height: 4px;
    margin-left: -18px;
    border-radius: 2px;
    background: var(--line-strong);
  }

  .city-card,
  .city-tour {
    max-height: 40%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-top: 18px;
    padding-bottom: calc(12px + var(--safe-bottom));
  }

  .city-card-id {
    margin: 6px 0 8px;
  }

  .city-card-rows > div {
    padding: 6px 0;
  }

  .city-tour-actions {
    margin-top: 10px;
  }

  .city-side {
    max-height: 60%;
    padding-top: 10px;
    padding-left: 0;
    padding-right: 0;
  }

  .city-firms {
    max-height: 72%;
    padding: 18px 0 0;
  }

  .city-explore {
    position: absolute;
    display: block;
    padding-top: 18px;
    padding-bottom: calc(12px + var(--safe-bottom));
    border: 1px solid var(--line-strong);
    border-bottom: 0;
  }

  .city-explore-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
  }

  .city-explore-title {
    flex: 1;
    color: var(--white);
    font-size: .9375rem;
    font-weight: 600;
  }

  .city-explore-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .city-explore-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 48px;
    padding: 0 14px;
    color: var(--white);
    font: 500 .9375rem/1.2 var(--font-body);
    text-align: left;
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
  }

  .city-explore-item .city-labels-state {
    color: var(--silver);
    font-size: .8125rem;
  }

  .city-app.is-explore-open .city-bottom,
  .city-app.is-following .city-bottom,
  .city-app.is-touring .city-bottom,
  .city-app.is-firms-open .city-bottom,
  .city-app.is-sheet-open .city-bottom {
    display: none;
  }
}

@media (max-height: 500px) and (max-width: 950px) and (min-width: 641px) {
  .city-chips {
    display: none;
  }

  .city-bottom {
    left: auto;
  }

  .city-card,
  .city-tour {
    max-height: 62%;
  }

  .city-side,
  .city-firms,
  .city-explore {
    max-height: 80%;
  }

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

  .city-card-rows {
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
  }
}

.city-clock-zone:empty {
  display: none;
}

.city-clock-zone {
  position: relative;
  padding-left: 10px;
  color: var(--silver);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}

.city-clock-zone::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  margin-top: -6px;
  background: var(--line-strong);
}

.city-log-cardico {
  position: relative;
  display: inline-block;
  width: 15px;
  height: 10px;
  margin-right: 6px;
  vertical-align: -1px;
  border: 1px solid var(--silver);
  border-radius: 2px;
}

.city-log-cardico::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 4px;
  height: 3px;
  background: var(--silver);
}

@media (max-width: 640px), (max-height: 500px) and (max-width: 950px) {
  .city-clock-zone {
    display: none;
  }
}

.city-map-btn.is-tight span {
  display: none;
}

body.city-page {
  overflow-x: hidden;
}

.city-map,
.city-chips {
  display: none !important;
}

.city-bottom,
.city-app .city-bottom {
  left: auto;
  right: max(12px, var(--safe-right));
  bottom: max(12px, var(--safe-bottom));
  height: auto;
  display: flex;
}

.city-controls,
.city-app .city-controls {
  position: static;
  flex-direction: row;
  gap: 0;
  height: 36px;
  padding: 0 2px;
  background: rgba(4, 10, 23, .62);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.city-controls .city-btn,
.city-app .city-controls .city-btn {
  display: inline-flex;
  width: 34px;
  height: 34px;
  background: transparent;
  border: 0;
  border-radius: 17px;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.city-controls .city-btn:hover {
  background: rgba(185, 197, 216, .12);
}

@media (pointer: coarse), (max-width: 640px), (max-height: 500px) and (max-width: 950px) {
  .city-controls,
  .city-app .city-controls {
    height: 40px;
    border-radius: 20px;
  }

  .city-controls .city-btn,
  .city-app .city-controls .city-btn {
    width: 40px;
    height: 38px;
    border-radius: 19px;
  }
}

.city-dist {
  position: absolute;
  top: 52px;
  left: max(10px, var(--safe-left));
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 4px 18px;
  max-width: calc(100% - 20px);
  max-height: calc(100% - 120px);
  overflow-y: auto;
  padding: 12px 14px;
  background: rgba(4, 10, 23, .92);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.city-dist[hidden] {
  display: none;
}

.city-nav-city,
.city-explore-sub {
  margin: 0 0 6px;
  color: var(--muted);
  font: 600 .75rem/1.3 var(--font-body);
}

.city-nav-items {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.city-nav-item {
  min-height: 30px;
  padding: 4px 10px;
  color: var(--white);
  font: 500 .8125rem/1.25 var(--font-body);
  text-align: left;
  white-space: nowrap;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.city-nav-item:hover,
.city-nav-item:focus-visible {
  background: var(--panel);
  border-color: var(--line-strong);
}

.city-explore-dists {
  display: none;
}

.city-edge,
.city-hint {
  display: none;
}

@media (pointer: coarse) {
  .city-dist {
    top: 62px;
  }

  .city-nav-item {
    min-height: 40px;
  }
}

@media (max-width: 640px), (max-height: 500px) and (max-width: 950px) {
  .city-top > .city-dist-btn,
  .city-dist {
    display: none !important;
  }

  .city-btn[data-act="speed"] {
    display: inline-flex;
  }

  .city-explore {
    max-height: 82%;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .city-explore-dists {
    display: block;
    margin-top: 14px;
  }

  .city-explore-dists .city-nav-group {
    margin-bottom: 10px;
  }

  .city-explore-dists .city-nav-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .city-explore-dists .city-nav-item {
    min-height: 44px;
    padding: 6px 12px;
    white-space: normal;
    background: var(--panel);
    border-color: var(--line);
  }

  .city-edge {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    padding: 0;
    color: var(--white);
    background: rgba(4, 10, 23, .5);
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    cursor: pointer;
    transition: opacity .25s var(--ease);
  }

  .city-edge svg {
    width: 16px;
    height: 16px;
  }

  .city-edge--l {
    left: max(6px, var(--safe-left));
  }

  .city-edge--r {
    right: max(6px, var(--safe-right));
  }

  .city-edge.is-end {
    opacity: 0;
    pointer-events: none;
  }

  .city-app.is-explore-open .city-edge,
  .city-app.is-following .city-edge,
  .city-app.is-touring .city-edge,
  .city-app.is-firms-open .city-edge,
  .city-app.is-sheet-open .city-edge {
    display: none;
  }

  .city-hint {
    position: absolute;
    left: 50%;
    bottom: calc(max(12px, var(--safe-bottom)) + 52px);
    z-index: 3;
    display: block;
    margin: 0;
    padding: 8px 14px;
    color: var(--white);
    font: 500 .8125rem/1.2 var(--font-body);
    white-space: nowrap;
    background: rgba(4, 10, 23, .84);
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    transform: translateX(-50%);
    pointer-events: none;
    transition: opacity .5s var(--ease);
  }

  .city-hint[hidden] {
    display: none;
  }

  .city-hint.is-out {
    opacity: 0;
  }
}

@media (pointer: coarse) and (min-width: 641px) {
  .city-hint:not([hidden]) {
    position: absolute;
    left: 50%;
    bottom: 64px;
    display: block;
    margin: 0;
    padding: 8px 14px;
    color: var(--white);
    font: 500 .8125rem/1.2 var(--font-body);
    background: rgba(4, 10, 23, .84);
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    transform: translateX(-50%);
    transition: opacity .5s var(--ease);
  }

  .city-hint.is-out {
    opacity: 0;
  }
}
