:root {
  color-scheme: dark;
  --ink: #061018;
  --panel: rgba(7, 17, 26, 0.84);
  --panel-strong: rgba(5, 13, 20, 0.94);
  --panel-soft: rgba(12, 27, 39, 0.7);
  --line: rgba(178, 222, 239, 0.2);
  --line-bright: rgba(178, 222, 239, 0.42);
  --text: #f5f8f9;
  --muted: #9fb2bd;
  --cyan: #74e7ff;
  --cyan-strong: #1cc8f0;
  --gold: #f6c96b;
  --green: #74e6a3;
  --red: #ff7777;
  --radius: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #061018;
}

body {
  color: var(--text);
  font-family: "Nunito Sans", "Nunito", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

button,
select,
a { font: inherit; }

button,
select { color: inherit; }

button { cursor: pointer; }

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#city-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  outline: 0;
}

.city-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 74%, transparent 30%, rgba(2, 8, 13, 0.12) 70%, rgba(1, 5, 9, 0.48) 118%),
    linear-gradient(180deg, rgba(3, 13, 23, 0.05), transparent 35%, rgba(2, 9, 15, 0.2));
  mix-blend-mode: multiply;
}

.city-grain {
  position: fixed;
  inset: -30%;
  z-index: 4;
  opacity: 0.025;
  pointer-events: none;
  background-image:
    repeating-radial-gradient(circle at 18% 23%, rgba(255, 255, 255, 0.7) 0 0.35px, transparent 0.55px 4px),
    repeating-radial-gradient(circle at 72% 64%, rgba(255, 255, 255, 0.55) 0 0.3px, transparent 0.5px 5px);
  animation: grain 0.22s steps(2) infinite;
}

@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(2%, -1%, 0); }
  50% { transform: translate3d(-1%, 2%, 0); }
  75% { transform: translate3d(1%, 1%, 0); }
}

.glass {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(14, 31, 43, 0.88), rgba(5, 15, 23, 0.77));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

.city-topbar {
  position: fixed;
  z-index: 30;
  top: calc(12px + var(--safe-top));
  left: 14px;
  right: 14px;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 18px;
}

.city-brand,
.city-status,
.city-actions,
.mode-group {
  display: flex;
  align-items: center;
}

.city-brand { min-width: 0; gap: 11px; }

.back-button,
.icon-button,
.control-button,
.district-list-button,
.mode-button {
  border: 1px solid rgba(186, 226, 240, 0.18);
  background: rgba(9, 22, 32, 0.74);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, color 160ms ease;
}

.back-button,
.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
}

.back-button:hover,
.icon-button:hover,
.control-button:hover,
.district-list-button:hover,
.mode-button:hover,
.mode-button.active {
  color: var(--cyan);
  border-color: rgba(116, 231, 255, 0.55);
  background: rgba(20, 52, 68, 0.86);
}

.back-button:active,
.icon-button:active,
.control-button:active,
.district-list-button:active,
.mode-button:active { transform: translateY(1px); }

.brand-copy { min-width: 0; }

.eyebrow {
  color: var(--cyan);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 4px 0 0;
  overflow: hidden;
  font-family: "Rajdhani", "Nunito Sans", sans-serif;
  font-size: clamp(0.96rem, 1.6vw, 1.26rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.city-status {
  justify-content: center;
  gap: 16px;
  padding: 0 12px;
}

.status-item { min-width: 72px; text-align: center; }

.status-value {
  display: block;
  color: var(--text);
  font-family: "Rajdhani", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.status-label {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.status-divider { width: 1px; height: 28px; background: var(--line); }

.city-actions { justify-content: flex-end; gap: 6px; }

.avatar-select {
  width: 112px;
  height: 40px;
  padding: 0 28px 0 10px;
  overflow: hidden;
  border: 1px solid rgba(186, 226, 240, 0.18);
  border-radius: 12px;
  outline: 0;
  background: rgba(9, 22, 32, 0.74);
  color: var(--text);
  font-size: 0.66rem;
  font-weight: 800;
  text-overflow: ellipsis;
}

.avatar-select:focus-visible {
  border-color: rgba(116, 231, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(116, 231, 255, 0.12);
}

.control-button {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
}

.control-button .control-icon { font-size: 0.95rem; }

.city-tools-menu {
  position: fixed;
  z-index: 35;
  top: calc(82px + var(--safe-top));
  right: 14px;
  width: min(270px, calc(100vw - 28px));
  display: grid;
  gap: 5px;
  padding: 8px;
  border-radius: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 170ms ease, transform 170ms ease;
}

.city-tools-menu.show { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

.city-tools-menu button,
.city-tools-menu a {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.city-tools-menu button:hover,
.city-tools-menu button:focus-visible,
.city-tools-menu a:hover,
.city-tools-menu a:focus-visible {
  border-color: rgba(116, 231, 255, 0.32);
  outline: 0;
  background: rgba(116, 231, 255, 0.08);
}

.city-tools-menu button > span:first-child,
.city-tools-menu a > span:first-child { width: 28px; font-size: 1.15rem; text-align: center; }
.city-tools-menu strong,
.city-tools-menu small { display: block; }
.city-tools-menu strong { font-size: 0.74rem; }
.city-tools-menu small { margin-top: 2px; color: var(--muted); font-size: 0.59rem; font-weight: 700; }

.city-sidepanel {
  position: fixed;
  z-index: 28;
  top: calc(86px + var(--safe-top));
  right: 14px;
  width: min(340px, calc(100vw - 28px));
  padding: 16px;
  border-radius: 18px;
  transform: translateX(calc(100% + 30px));
  opacity: 0;
  pointer-events: none;
  transition: transform 280ms cubic-bezier(.2,.85,.2,1), opacity 220ms ease;
}

.city-sidepanel.show {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.panel-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(6, 16, 24, 0.7);
}

.district-kicker {
  margin-right: 38px;
  color: var(--cyan);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.city-sidepanel h2 {
  margin: 6px 38px 2px 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.6rem;
  line-height: 1;
  text-transform: uppercase;
}

.district-range {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
}

.district-description {
  margin: 13px 0;
  color: #c7d2d7;
  font-size: 0.81rem;
  line-height: 1.52;
}

.district-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin: 14px 0;
}

.district-metric {
  padding: 9px 7px;
  border: 1px solid rgba(178, 222, 239, 0.12);
  border-radius: 11px;
  background: rgba(4, 13, 20, 0.5);
  text-align: center;
}

.district-metric strong {
  display: block;
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
}

.district-metric span {
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.district-progress {
  height: 5px;
  overflow: hidden;
  margin: 12px 0 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
}

.district-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-strong), var(--green));
  box-shadow: 0 0 14px rgba(116, 231, 255, 0.5);
  transition: width 300ms ease;
}

.district-progress-copy {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
}

.district-cta {
  width: 100%;
  min-height: 44px;
  margin-top: 14px;
  border: 1px solid rgba(116, 231, 255, 0.45);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(25, 178, 214, 0.95), rgba(31, 110, 154, 0.96));
  box-shadow: 0 10px 30px rgba(15, 128, 170, 0.22);
  color: white;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.district-cta:disabled {
  cursor: not-allowed;
  border-color: var(--line);
  background: rgba(29, 43, 51, 0.8);
  box-shadow: none;
  color: var(--muted);
}

.city-districts {
  position: fixed;
  z-index: 29;
  left: 14px;
  bottom: calc(84px + var(--safe-bottom));
  width: min(330px, calc(100vw - 28px));
  max-height: min(64vh, 620px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  transform: translateX(calc(-100% - 30px));
  opacity: 0;
  pointer-events: none;
  transition: transform 280ms cubic-bezier(.2,.85,.2,1), opacity 220ms ease;
}

.city-districts.show {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.districts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 15px 10px;
}

.districts-head h2 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.districts-head p { margin: 2px 0 0; color: var(--muted); font-size: 0.65rem; }

.district-scroll {
  overflow: auto;
  padding: 0 8px 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(116, 231, 255, 0.28) transparent;
}

.district-list-button {
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  padding: 6px 10px;
  border-radius: 12px;
  text-align: left;
}

.district-number {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(116, 231, 255, 0.09);
  color: var(--cyan);
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
}

.district-list-button.locked { opacity: 0.52; }

.district-list-name { display: block; font-size: 0.74rem; font-weight: 900; }

.district-list-theme {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.district-list-progress { color: var(--muted); font-size: 0.62rem; font-weight: 900; }

.city-bottombar {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(14px + var(--safe-bottom));
  width: min(780px, calc(100vw - 28px));
  min-height: 58px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  transform: translateX(-50%);
}

.district-toggle,
.progress-chip {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.district-toggle {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.district-toggle-icon {
  width: 34px;
  height: 34px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(116, 231, 255, 0.24);
  border-radius: 10px;
  background: rgba(116, 231, 255, 0.08);
}

.district-toggle strong,
.progress-chip strong { display: block; font-size: 0.69rem; }

.district-toggle span,
.progress-chip span { display: block; color: var(--muted); font-size: 0.57rem; }

.mode-group { gap: 3px; padding: 3px; border-radius: 12px; background: rgba(3, 11, 17, 0.54); }

.mode-button {
  min-width: 58px;
  min-height: 34px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.progress-chip { justify-content: flex-end; text-align: right; }

.progress-ring {
  --progress: 0deg;
  width: 36px;
  height: 36px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--cyan) var(--progress), rgba(255, 255, 255, 0.1) 0);
}

.progress-ring::after {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0a1821;
}

.city-pin {
  --pin-accent: #74e7ff;
  min-width: 82px;
  padding: 5px 8px 6px;
  border: 1px solid color-mix(in srgb, var(--pin-accent) 55%, transparent);
  border-radius: 9px;
  background: rgba(4, 12, 18, 0.82);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  color: white;
  cursor: pointer;
  pointer-events: auto;
  text-align: left;
  transform: translate(-50%, -105%);
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.city-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 1px;
  height: 7px;
  background: var(--pin-accent);
}

.city-pin:hover,
.city-pin:focus-visible,
.city-pin.focused {
  z-index: 4;
  border-color: var(--pin-accent);
  outline: 0;
  transform: translate(-50%, -105%) scale(1.06);
}

.city-pin.locked { filter: saturate(0.2); opacity: 0.54; }

.city-pin-name {
  display: block;
  font-family: "Rajdhani", sans-serif;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1;
  text-transform: uppercase;
}

.city-pin-meta { display: block; margin-top: 3px; color: #a9bac2; font-size: 0.5rem; font-weight: 800; }

.city-toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(92px + var(--safe-bottom));
  max-width: min(440px, calc(100vw - 32px));
  padding: 10px 16px;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  background: rgba(3, 11, 17, 0.93);
  box-shadow: var(--shadow);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.city-toast.show { opacity: 1; transform: translate(-50%, 0); }

.loader,
.city-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 42%, rgba(25, 109, 140, 0.2), transparent 35%),
    linear-gradient(145deg, #06111a, #03090e 68%);
}

.loader { transition: opacity 500ms ease, visibility 500ms ease; }

.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-card { width: min(360px, 88vw); text-align: center; }

.loader-mark {
  width: 54px;
  height: 54px;
  display: grid;
  margin: 0 auto 18px;
  place-items: center;
  border: 1px solid rgba(116, 231, 255, 0.45);
  border-radius: 16px;
  background: rgba(116, 231, 255, 0.08);
  box-shadow: 0 0 44px rgba(38, 189, 222, 0.12);
  color: var(--cyan);
  font-family: "Rajdhani", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}

.loader-card h2 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.loader-card p { margin: 7px 0 18px; color: var(--muted); font-size: 0.7rem; }

.loader-track { height: 3px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, 0.09); }

.loader-fill {
  width: 8%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-strong), #8dffbe);
  box-shadow: 0 0 16px rgba(116, 231, 255, 0.5);
  transition: width 220ms ease;
}

.city-gate { display: none; }
.city-gate.show { display: grid; }

.city-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: start center;
  overflow: auto;
  padding: calc(28px + var(--safe-top)) 16px calc(28px + var(--safe-bottom));
  background: rgba(2, 8, 13, 0.84);
  backdrop-filter: blur(16px) saturate(0.9);
  -webkit-backdrop-filter: blur(16px) saturate(0.9);
}

.city-modal.show { display: grid; }

.city-modal-card {
  width: min(920px, 100%);
  min-height: 160px;
  padding: 22px;
  border-radius: 20px;
}

.city-modal-card.compact { width: min(620px, 100%); }

.city-modal-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.city-modal-card h2 {
  margin: 5px 0 0;
  font-family: "Rajdhani", sans-serif;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line-bright);
  border-radius: 11px;
  background: rgba(8, 20, 29, 0.78);
  font-size: 1.35rem;
}

.modal-close:hover,
.modal-close:focus-visible { border-color: var(--cyan); outline: 0; color: var(--cyan); }
.modal-lede { margin: 10px 0 18px; color: var(--muted); font-size: 0.75rem; line-height: 1.55; }

.rank-list { display: grid; gap: 6px; }
.rank-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(245, 248, 249, 0.56);
  font-size: 0.72rem;
  font-weight: 700;
}

.rank-row.reached { color: var(--text); }
.rank-row.current { border-color: rgba(246, 201, 107, 0.44); background: rgba(246, 201, 107, 0.09); color: var(--gold); }
.rank-row span:last-child { color: var(--muted); }

.election-card {
  display: grid;
  gap: 5px;
  margin-top: 13px;
  padding: 13px;
  border: 1px solid rgba(246, 201, 107, 0.3);
  border-radius: 12px;
  background: rgba(246, 201, 107, 0.06);
  font-size: 0.74rem;
  line-height: 1.45;
}

.election-card strong { color: var(--gold); }
.election-card span { color: var(--muted); }

.gate-card {
  width: min(470px, 92vw);
  padding: 26px;
  border-radius: 20px;
  text-align: center;
}

.gate-lock {
  width: 56px;
  height: 56px;
  display: grid;
  margin: 0 auto 15px;
  place-items: center;
  border: 1px solid rgba(246, 201, 107, 0.42);
  border-radius: 16px;
  background: rgba(246, 201, 107, 0.08);
  font-size: 1.45rem;
}

.gate-card h2 {
  margin: 0;
  font-family: "Rajdhani", sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gate-card p { margin: 10px 0 20px; color: var(--muted); font-size: 0.82rem; line-height: 1.55; }

.gate-actions { display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; }

.gate-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  border: 1px solid var(--line-bright);
  border-radius: 11px;
  background: rgba(9, 23, 33, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
}

.gate-button.primary { border-color: rgba(246, 201, 107, 0.5); background: rgba(246, 201, 107, 0.13); color: var(--gold); }

.staff-badge {
  position: fixed;
  z-index: 31;
  top: calc(84px + var(--safe-top));
  left: 50%;
  display: none;
  padding: 6px 11px;
  border: 1px solid rgba(246, 201, 107, 0.38);
  border-radius: 999px;
  background: rgba(30, 23, 9, 0.75);
  color: var(--gold);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.staff-badge.show { display: block; }

.city-shell { opacity: 0; pointer-events: none; transition: opacity 500ms ease; }
body.city-ready .city-shell { opacity: 1; pointer-events: auto; }

#city-hearts { position: fixed; z-index: 34; top: calc(84px + var(--safe-top)); right: 14px; }

@media (max-width: 900px) {
  .city-topbar { grid-template-columns: 1fr auto; }
  .city-status { display: none; }
  .city-actions .control-label { display: none; }
  .control-button { width: 40px; justify-content: center; padding: 0; }
}

@media (max-width: 640px) {
  .city-topbar {
    top: calc(7px + var(--safe-top));
    left: 7px;
    right: 7px;
    min-height: 52px;
    gap: 5px;
    border-radius: 15px;
  }

  .back-button,
  .icon-button,
  .control-button { width: 36px; height: 36px; min-height: 36px; border-radius: 10px; }
  .city-brand { gap: 7px; }
  .eyebrow { display: none; }
  .brand-copy h1 { margin: 0; font-size: 0.86rem; }
  .city-actions { gap: 3px; }
  .city-actions .desktop-only { display: none; }
  #city-hearts { top: calc(68px + var(--safe-top)); right: 7px; }
  .staff-badge { top: calc(69px + var(--safe-top)); }

  .city-bottombar {
    bottom: calc(7px + var(--safe-bottom));
    width: calc(100vw - 14px);
    min-height: 52px;
    grid-template-columns: 1fr auto;
    border-radius: 15px;
  }

  .progress-chip { display: none; }
  .mode-button { min-width: 45px; padding: 0 7px; }
  .city-districts { left: 7px; bottom: calc(69px + var(--safe-bottom)); width: calc(100vw - 14px); }
  .city-sidepanel { top: auto; right: 7px; bottom: calc(69px + var(--safe-bottom)); width: calc(100vw - 14px); }
  .city-pin { min-width: 70px; padding: 4px 6px 5px; }
  .city-pin-name { font-size: 0.61rem; }
  .city-tools-menu { top: calc(66px + var(--safe-top)); right: 7px; }
  .city-modal { padding: calc(12px + var(--safe-top)) 8px calc(12px + var(--safe-bottom)); }
  .city-modal-card { padding: 17px; border-radius: 16px; }
}

@media (max-height: 600px) and (orientation: landscape) {
  .city-topbar { top: calc(5px + var(--safe-top)); min-height: 48px; }
  .city-bottombar { bottom: calc(5px + var(--safe-bottom)); min-height: 48px; }
  .city-sidepanel { top: calc(62px + var(--safe-top)); max-height: calc(100vh - 124px); overflow: auto; }
  .city-districts { bottom: calc(62px + var(--safe-bottom)); max-height: calc(100vh - 125px); }
  #city-hearts,
  .staff-badge { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .city-sidepanel,
  .city-districts,
  .loader { transition-duration: 0.01ms !important; }
}

@supports not (backdrop-filter: blur(4px)) {
  .glass { background: rgba(6, 17, 26, 0.96); }
}
