#sgnFlightPanel,
#sgnFlightPanelM {
  margin-bottom: 10px;
}

.flight-network-control {
  --flight-cyan: #62deee;
  --flight-gold: #e7bd59;
  overflow: hidden;
  border: 1px solid rgba(98, 222, 238, .2);
  border-left: 3px solid rgba(98, 222, 238, .68);
  border-radius: 10px;
  background: linear-gradient(105deg, rgba(10, 49, 42, .72), rgba(5, 25, 14, .88));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.flight-network-control.is-on {
  border-color: rgba(98, 222, 238, .45);
  border-left-color: var(--flight-cyan);
  box-shadow: 0 7px 22px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .035);
}

.flight-network-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 54px;
  padding: 9px 9px 9px 10px;
}

.flight-network-title-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.flight-network-symbol {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(98, 222, 238, .34);
  border-radius: 50%;
  color: var(--flight-cyan);
  background: rgba(4, 16, 10, .5);
  font: 700 13px/1 'DM Mono', monospace;
  transform: rotate(-12deg);
}

.flight-network-title {
  overflow: hidden;
  color: var(--hi);
  font: 600 .66rem/1.3 Lora, serif;
  text-overflow: ellipsis;
}

.flight-network-summary {
  margin-top: 2px;
  color: var(--lo);
  font: 500 .47rem/1.35 'DM Mono', monospace;
}

.flight-network-toggle {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 6px 8px;
  border: 1px solid rgba(98, 222, 238, .36);
  border-radius: 7px;
  color: #9af3ff;
  background: rgba(17, 112, 137, .18);
  font: 700 .49rem/1 'DM Mono', monospace;
  cursor: pointer;
}

.flight-network-toggle:hover {
  border-color: rgba(98, 222, 238, .72);
  background: rgba(17, 112, 137, .3);
}

.flight-network-control.is-on .flight-network-toggle {
  border-color: rgba(98, 222, 238, .7);
  color: #04100a;
  background: var(--flight-cyan);
}

.flight-network-body {
  display: none;
  padding: 0 9px 10px;
  border-top: 1px solid rgba(98, 222, 238, .12);
}

.flight-network-control.is-on .flight-network-body {
  display: block;
}

.flight-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 11px;
  padding: 8px 1px 7px;
  color: var(--md);
  font: 500 .49rem/1.35 'DM Mono', monospace;
}

.flight-status-row > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.flight-status-line {
  width: 17px;
  height: 0;
  border-top: 2px solid var(--flight-cyan);
}

.flight-status-line.announced {
  border-color: var(--flight-gold);
  border-top-style: dashed;
}

.flight-region-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.flight-region-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
  min-height: 30px;
  padding: 6px 7px;
  border: 1px solid rgba(98, 222, 238, .15);
  border-radius: 7px;
  color: var(--md);
  background: rgba(4, 16, 10, .34);
  font: 600 .49rem/1.25 'DM Mono', monospace;
  text-align: left;
  cursor: pointer;
}

.flight-region-chip span {
  flex: 0 0 auto;
  min-width: 18px;
  padding: 1px 4px;
  border-radius: 9px;
  color: var(--lo);
  background: rgba(4, 16, 10, .58);
  font-size: .44rem;
  text-align: center;
}

.flight-region-chip:hover {
  border-color: rgba(98, 222, 238, .4);
  color: var(--hi);
}

.flight-region-chip.active {
  border-color: rgba(98, 222, 238, .62);
  color: #c9f9ff;
  background: rgba(17, 112, 137, .25);
}

.flight-network-toggle:focus-visible,
.flight-region-chip:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.flight-airport-marker {
  position: relative;
  display: flex;
  align-items: center;
  width: max-content;
  min-width: 31px;
  height: 24px;
  color: #d8faff;
  font-family: 'DM Mono', monospace;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .82));
  white-space: nowrap;
}

.flight-airport-dot {
  position: relative;
  z-index: 2;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border: 1px solid #d5fbff;
  border-radius: 50%;
  background: var(--flight-cyan, #62deee);
  box-shadow: 0 0 0 3px rgba(98, 222, 238, .14);
}

.flight-airport-code {
  margin-left: 3px;
  padding: 1px 3px 2px;
  border-radius: 3px;
  background: rgba(4, 16, 10, .76);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .025em;
  line-height: 1.15;
}

.flight-airport-city {
  display: none;
  margin-left: 3px;
  padding: 1px 4px 2px;
  border-left: 1px solid rgba(98, 222, 238, .28);
  border-radius: 0 3px 3px 0;
  color: #b6d7bd;
  background: rgba(4, 16, 10, .72);
  font-size: 8px;
  line-height: 1.15;
}

.flight-labels-detailed .flight-airport-city {
  display: inline-block;
}

.flight-airport-marker.announced {
  color: #ffe6a2;
}

.flight-airport-marker.announced .flight-airport-dot {
  border-color: #fff0bd;
  background: var(--flight-gold, #e7bd59);
  box-shadow: 0 0 0 3px rgba(231, 189, 89, .15);
}

.flight-airport-marker.announced .flight-airport-code {
  outline: 1px dashed rgba(231, 189, 89, .55);
}

.flight-origin-marker {
  position: relative;
  width: 50px;
  height: 50px;
}

.flight-origin-ring,
.flight-origin-core {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.flight-origin-ring {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(98, 222, 238, .62);
  box-shadow: 0 0 20px rgba(98, 222, 238, .28);
  animation: flightOriginPulse 2.4s ease-out infinite;
}

.flight-origin-core {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid #c8f8ff;
  color: #fff;
  background: linear-gradient(145deg, #117089, #063f4c);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .6);
  font: 800 9px/1 'DM Mono', monospace;
  letter-spacing: .04em;
}

@keyframes flightOriginPulse {
  0% { opacity: .9; transform: translate(-50%, -50%) scale(.7); }
  78%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.22); }
}

.flight-route-tooltip.leaflet-tooltip {
  padding: 5px 7px;
  border: 1px solid rgba(98, 222, 238, .42);
  border-radius: 6px;
  color: #eefdf6;
  background: rgba(4, 16, 10, .94);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .38);
  font: 600 10px/1.3 'DM Mono', monospace;
}

.flight-route-tooltip.leaflet-tooltip:before {
  border-top-color: rgba(4, 16, 10, .94);
}

.flight-popup {
  min-width: 200px;
  padding: 2px;
  color: #183428;
}

.flight-popup-route {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #0d6676;
  font: 800 10px/1 'DM Mono', monospace;
  letter-spacing: .06em;
}

.flight-popup-route b {
  color: #85a49a;
  font-weight: 500;
}

.flight-popup-city {
  margin-top: 7px;
  color: #0a261b;
  font: 700 15px/1.2 Lora, serif;
}

.flight-popup-country {
  margin-top: 2px;
  color: #71827c;
  font: 500 10px/1.35 'DM Mono', monospace;
}

.flight-popup-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #dfe8e2;
  color: #61756d;
  font: 600 9px/1.3 'DM Mono', monospace;
}

.flight-status-pill {
  padding: 3px 5px;
  border-radius: 8px;
  color: #166b58;
  background: #def3ec;
}

.flight-status-pill.announced {
  color: #7b5b0b;
  background: #fff1c9;
}

@media (max-width: 768px) {
  #sgnFlightPanelM { margin-bottom: 8px; }
  .flight-network-head { min-height: 58px; padding: 10px; }
  .flight-network-title { font-size: .7rem; }
  .flight-network-toggle { min-height: 34px; }
  .flight-region-chip { min-height: 34px; font-size: .52rem; }
}

@media (prefers-reduced-motion: reduce) {
  .flight-origin-ring { animation: none; opacity: .62; }
}
