.city-hero {
  padding: 76px 0 48px;
}

.nav-link.active {
  background: rgba(11, 109, 255, 0.09);
  color: var(--text-0);
}

.city-hero-grid {
  align-items: center;
  display: grid;
  gap: 36px;
  grid-template-columns: 1.02fr 0.98fr;
}

.city-hero h1 {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: clamp(2.15rem, 5vw, 4.7rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.04;
  margin-top: 14px;
  max-width: 760px;
}

.city-hero-text {
  color: var(--text-1);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  margin-top: 18px;
  max-width: 680px;
}

.city-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.city-hero-note {
  color: var(--text-2);
  font-size: 0.9rem;
  margin-top: 18px;
  max-width: 680px;
}

.mission-panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(17, 29, 49, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

.mission-panel-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.mission-panel-title {
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mission-live {
  align-items: center;
  background: rgba(0, 182, 122, 0.1);
  border: 1px solid rgba(0, 182, 122, 0.18);
  border-radius: 999px;
  color: #007b55;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
}

.mission-live::before {
  background: #00b67a;
  border-radius: 999px;
  content: "";
  height: 8px;
  width: 8px;
}

.mission-stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

.mission-stat {
  background: #ffffff;
  border: 1px solid rgba(17, 29, 49, 0.08);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  min-height: 112px;
  padding: 16px;
}

.mission-stat span {
  color: var(--text-2);
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mission-stat strong {
  display: block;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  margin-top: 12px;
}

.city-band {
  padding: 54px 0 16px;
}

.city-map-layout {
  align-items: stretch;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  margin-top: 28px;
}

.map-card,
.city-side-panel,
.city-form-card,
.rule-card,
.city-step {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 29, 49, 0.1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.map-card {
  min-height: 690px;
  padding: 22px;
}

.map-toolbar {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.map-toolbar h2 {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.12;
}

.map-toolbar p {
  color: var(--text-1);
  margin-top: 8px;
  max-width: 650px;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 250px;
}

.legend-item {
  align-items: center;
  background: rgba(243, 247, 255, 0.95);
  border: 1px solid rgba(17, 29, 49, 0.09);
  border-radius: 999px;
  color: var(--text-1);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
}

.legend-dot {
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.status-red {
  background: #ef4444;
}

.status-orange {
  background: #f59e0b;
}

.status-green {
  background: #00b67a;
}

.map-stage {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(240, 246, 255, 0.96), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(17, 29, 49, 0.08);
  border-radius: 24px;
  display: flex;
  justify-content: center;
  min-height: 590px;
  overflow: hidden;
  position: relative;
}

.map-stage-live {
  display: block;
  min-height: 620px;
  padding: 0;
}

.city-leaflet-map {
  height: 620px;
  min-height: 100%;
  width: 100%;
}

.map-stage-live .map-asset {
  display: none;
}

.city-leaflet-map .leaflet-control-container {
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.city-leaflet-map .leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(13, 28, 55, 0.18);
}

.city-map-marker {
  align-items: center;
  display: flex;
  justify-content: center;
}

.city-map-marker span {
  border: 3px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(13, 28, 55, 0.25);
  display: block;
  height: 22px;
  width: 22px;
}

.city-map-marker-red span {
  background: #ef4444;
}

.city-map-marker-orange span {
  background: #f59e0b;
}

.city-map-marker-green span {
  background: #00b67a;
}

.map-asset {
  aspect-ratio: 2480 / 3324;
  max-height: 560px;
  position: relative;
  width: min(440px, 78vw);
}

.germany-map-image {
  display: block;
  filter: drop-shadow(0 22px 34px rgba(13, 28, 55, 0.16));
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.marker-layer {
  inset: 0;
  position: absolute;
}

.city-marker {
  align-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  gap: 8px;
  left: var(--x);
  padding: 0;
  position: absolute;
  top: var(--y);
  transform: translate(-50%, -50%);
  z-index: 3;
}

.city-dot {
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 10px 22px rgba(13, 28, 55, 0.22);
  height: 18px;
  transition: transform 180ms ease;
  width: 18px;
}

.city-marker-red .city-dot {
  background: #ef4444;
}

.city-marker-orange .city-dot {
  background: #f59e0b;
}

.city-marker-green .city-dot {
  background: #00b67a;
}

.city-marker:hover .city-dot,
.city-marker:focus-visible .city-dot {
  transform: scale(1.25);
}

.city-label {
  background: #ffffff;
  border: 1px solid rgba(17, 29, 49, 0.1);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(13, 28, 55, 0.18);
  color: var(--text-0);
  font-size: 0.78rem;
  font-weight: 800;
  max-width: 190px;
  opacity: 0;
  overflow: hidden;
  padding: 7px 10px;
  pointer-events: none;
  text-overflow: ellipsis;
  transform: translateX(-5px);
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.city-marker:hover .city-label,
.city-marker:focus-visible .city-label {
  opacity: 1;
  transform: translateX(0);
}

.map-credit {
  color: var(--text-2);
  font-size: 0.76rem;
  margin-top: 10px;
}

.map-credit a {
  color: var(--accent-0);
  font-weight: 700;
}

.city-side-panel {
  padding: 22px;
}

.city-side-panel h3 {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.18;
}

.city-side-panel > p {
  color: var(--text-1);
  margin-top: 10px;
}

.status-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.status-card {
  background: rgba(243, 247, 255, 0.92);
  border: 1px solid rgba(17, 29, 49, 0.08);
  border-radius: 16px;
  padding: 14px;
}

.status-card-top {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.status-card strong {
  color: var(--text-1);
  font-size: 0.92rem;
}

.status-count {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.mini-bar {
  background: rgba(17, 29, 49, 0.09);
  border-radius: 999px;
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
}

.mini-bar span {
  background: var(--bar-color);
  border-radius: inherit;
  display: block;
  height: 100%;
  width: var(--bar-width, 0%);
}

.city-search {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  margin-top: 18px;
}

.field {
  background: #ffffff;
  border: 1px solid rgba(17, 29, 49, 0.12);
  border-radius: 14px;
  color: var(--text-0);
  font: inherit;
  min-height: 46px;
  padding: 0 14px;
  width: 100%;
}

.field:focus {
  border-color: var(--accent-0);
  box-shadow: 0 0 0 3px rgba(11, 109, 255, 0.13);
  outline: none;
}

.city-list {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.city-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(17, 29, 49, 0.08);
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
}

.city-row span {
  color: var(--text-2);
  font-size: 0.82rem;
}

.status-pill {
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 6px 9px;
  white-space: nowrap;
}

.steps-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 26px;
}

.city-step {
  padding: 20px;
}

.city-step-number {
  align-items: center;
  background: linear-gradient(140deg, var(--accent-0), var(--accent-1));
  border-radius: 14px;
  color: #ffffff;
  display: inline-flex;
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-weight: 700;
  height: 42px;
  justify-content: center;
  margin-bottom: 16px;
  width: 42px;
}

.city-step h3 {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0;
}

.city-step p {
  color: var(--text-1);
  font-size: 0.92rem;
  margin-top: 8px;
}

.city-form-section {
  padding: 72px 0;
}

.city-form-layout {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: 0.85fr 1.15fr;
}

.rule-card {
  padding: 24px;
}

.rule-card h2,
.city-form-card h2 {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.14;
}

.rule-card p,
.city-form-card p {
  color: var(--text-1);
  margin-top: 12px;
}

.rules-list {
  color: var(--text-1);
  display: grid;
  gap: 10px;
  list-style: none;
  margin-top: 18px;
}

.rules-list li {
  background: rgba(0, 182, 122, 0.08);
  border: 1px solid rgba(0, 182, 122, 0.15);
  border-radius: 14px;
  padding: 12px 14px;
}

.task-list li {
  background: rgba(11, 109, 255, 0.08);
  border-color: rgba(11, 109, 255, 0.16);
}

.city-form-card {
  padding: 24px;
}

.toast {
  background: #ffffff;
  border: 1px solid rgba(17, 29, 49, 0.1);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  color: var(--text-0);
  font-weight: 700;
  max-width: min(460px, calc(100vw - 36px));
  opacity: 0;
  padding: 14px 18px;
  pointer-events: none;
  position: fixed;
  right: 24px;
  top: 96px;
  transform: translateY(-10px);
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 1500;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .city-hero-grid,
  .city-map-layout,
  .city-form-layout {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .city-hero {
    padding-top: 54px;
  }

  .city-actions,
  .city-search {
    grid-template-columns: 1fr;
  }

  .mission-stat-grid,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .map-card {
    min-height: auto;
    padding: 16px;
  }

  .map-toolbar {
    flex-direction: column;
  }

  .map-legend {
    justify-content: flex-start;
    min-width: 0;
  }

  .map-stage {
    min-height: 520px;
  }

  .city-leaflet-map {
    height: 520px;
  }

  .city-label {
    display: none;
  }

  .toast {
    left: 18px;
    right: 18px;
    top: 88px;
  }
}
