/* Overhead – site styles. Order matters: later sections override earlier ones. */
:root {
  --card: rgba(10, 32, 72, 0.62);
  --card-brd: rgba(255, 255, 255, 0.28);
  --txt: #fff;
  --muted: #cfe3ff;
  --accent: #ffd34d;
  --label: #ffd34d;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--txt);
  font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.type {
  font-size: clamp(13px, 3vh, 36px);
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}
/* settings */
dialog {
  margin: auto;
  border: none;
  border-radius: 14px;
  padding: 22px 24px;
  width: min(460px, 92vw);
  background: #0f1d3d;
  color: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}
dialog h2 {
  font-size: 20px;
  margin-bottom: 14px;
}
dialog label {
  display: block;
  font-size: 13px;
  color: #aac;
  margin: 10px 0 4px;
}
dialog input,
dialog select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid #34497a;
  background: #091430;
  color: #fff;
  font-size: 15px;
}
dialog .row {
  display: flex;
  gap: 10px;
}
dialog .row > div {
  flex: 1;
}
dialog .btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}
dialog button {
  padding: 9px 16px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}
.primary {
  background: #ffd34d;
  color: #111;
}
.ghost {
  background: #24365f;
  color: #fff;
}
.hint {
  font-size: 12px;
  color: #8ea0c8;
  margin-top: 6px;
  line-height: 1.4;
}
/* ---- map view ---- */
#mapwrap {
  position: fixed;
  inset: 0;
  display: none;
  background: var(--ink);
}
body.mapmode #mapwrap {
  display: block;
}
#mapview {
  position: absolute;
  inset: 0;
}
.leaflet-container {
  background: var(--ink);
  font-family: inherit;
}
.home-ic {
  color: #fff;
  font-size: 26px;
  line-height: 30px;
  text-align: center;
  text-shadow:
    0 0 4px #000,
    0 0 8px #000;
  font-weight: 900;
}
.pl-ic {
  position: relative;
}
.wp-ic i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acc);
  border: 1.5px solid #111;
  transform: translate(-50%, -50%);
}
.wp-ic span {
  position: absolute;
  left: 6px;
  top: -7px;
  font-size: 10px;
  font-weight: 800;
  color: var(--acc);
  text-shadow:
    0 0 3px #000,
    0 0 3px #000;
  white-space: nowrap;
}
.ap-ic span {
  position: absolute;
  transform: translate(-50%, -50%);
  background: var(--acc);
  color: #111;
  font-weight: 900;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}
.pl-rot {
  position: absolute;
  left: 0;
  top: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
  cursor: pointer;
  transition: transform 0.6s;
}
.pl-lbl {
  position: absolute;
  left: 0;
  top: 16px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  padding: 1px 5px;
  border-radius: 4px;
  pointer-events: none;
}
.busy .pl-ic:not(.sel) .pl-lbl {
  display: none;
}
.busy .pl-rot {
  transition: none;
}
.far .pl-ic:not(.sel) .pl-rot svg {
  width: 16px;
  height: 16px;
}
.pl-ic.sel .pl-lbl {
  background: var(--sel);
  color: #fff;
  top: 20px;
}
.mtop {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 500;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  max-width: calc(100% - min(360px, 42vw) - 42px);
}
.mbtn {
  background: var(--glass);
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 15px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.mbtn:hover {
  border-color: var(--acc);
}
a.mbtn {
  text-decoration: none;
  display: inline-block;
  line-height: 1.2;
}
/* radius filter on: same dark glass as the other buttons (readable on the light street map too), teal edge */
#mCount[aria-pressed="true"] {
  background: rgba(8, 44, 48, 0.9);
  border-color: var(--acc);
  color: #8ff3e8;
  box-shadow: 0 0 0 1px rgba(46, 196, 182, 0.35);
}
.lyrwrap {
  position: relative;
}
#lyrPop {
  position: fixed; /* on <body>, placed under the Layers button by startup.js */
  z-index: 700;
  background: rgba(9, 20, 44, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 270px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
#lyrPop.hidden,
body:not(.m-air) #lyrPop {
  display: none;
}
#lyrPop label {
  display: flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}
#lyrPop input {
  accent-color: var(--acc);
  width: 16px;
  height: 16px;
}
/* Satellite / Street map choice at the top of the Layers menu (only when the server has a MapTiler key) */
.lyrbase {
  display: flex;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.lyrbase.hidden {
  display: none;
}
.mt-logo img {
  display: block;
}
.lyrnote {
  font-size: 11.5px;
  color: #9fb3d9;
  font-weight: 500;
  line-height: 1.4;
}
.lyrnote:empty {
  display: none;
}
.nat-ic span {
  position: absolute;
  transform: translate(-50%, -50%);
  font-weight: 900;
  font-size: 12px;
  color: #111;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.leaflet-popup-content {
  font-size: 12.5px;
  line-height: 1.45;
}
body.public #atcBtn,
body.public #mAtc:not(.atclink),
body.public #atcbar {
  display: none !important;
}
.wxbtn[aria-pressed="true"] {
  background: #1f6fb2;
  border-color: #7cc0ff;
  color: #fff;
}
.awx-ic div {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(9, 20, 44, 0.85);
  color: #fff;
  border: 1px solid rgba(124, 192, 255, 0.6);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  display: flex;
  gap: 4px;
  align-items: center;
}
.awx-ic b {
  color: #7cc0ff;
}
.awx-ic i {
  display: inline-block;
  font-style: normal;
  color: var(--acc);
}
.milbtn[data-cat="com"] {
  background: #1f4e8c;
  border-color: #7cc0ff;
  color: #fff;
}
.milbtn[data-cat="pvt"] {
  background: #6a3d8f;
  border-color: #c89bff;
  color: #fff;
}
.milbtn[data-cat="mil"],
.milbtn[aria-pressed="true"][data-cat="mil"] {
  background: #5c6b2e;
  border-color: #b5c46a;
  color: #fff;
  box-shadow: 0 0 0 2px rgba(181, 196, 106, 0.35);
}
.milbadge {
  background: #5c6b2e;
  border-color: #b5c46a;
  color: #fff;
}
.mtag {
  background: rgba(10, 24, 52, 0.75);
  color: #cfe3ff;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
}
#mpanel {
  position: absolute;
  top: 14px;
  right: 14px;
  bottom: 14px;
  width: min(360px, 42vw);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}
.fcard {
  pointer-events: auto;
  background: var(--glass);
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
}
#cardFlights {
  flex: 0 1 auto;
  max-height: 56%;
}
#cardAirports {
  flex: 1 1 0;
  min-height: 120px;
}
#mpanel .fcard.collapsed {
  flex: 0 0 auto;
  min-height: 0;
}
.fcard.collapsed {
  flex: 0 0 auto;
}
.fcard.collapsed .fscroll {
  display: none;
}
.fcard.collapsed .fchev {
  transform: rotate(180deg);
}
.fcard header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
}
.flive {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  color: var(--acc);
  font-size: 10px;
  font-weight: 800;
  padding: 0;
  letter-spacing: 0.08em;
}
.flive::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.25);
  animation: pulse 2s infinite;
}
.fcount {
  color: var(--mut2);
  font-size: 12px;
  font-weight: 600;
}
.fchev {
  margin-left: auto;
  background: none;
  border: none;
  color: #ccc;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s;
  line-height: 1;
}
.fscroll {
  overflow-y: auto;
  padding: 0 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.fscroll::-webkit-scrollbar {
  width: 6px;
}
.fscroll::-webkit-scrollbar-thumb {
  background: var(--acc);
  border-radius: 3px;
}
.fscroll::-webkit-scrollbar-track {
  background: transparent;
}
.fempty {
  color: var(--mut2);
  font-size: 13px;
  padding: 10px 4px;
}
.fitem {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line2);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.fitem:hover {
  border-color: var(--line2);
}
.fitem.sel {
  border-color: var(--acc);
  border-left-color: var(--sel);
  background: var(--panel3);
}
.frow {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.frow + .frow {
  margin-top: 5px;
}
.fcs {
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
}
.fbadge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  color: var(--txt2);
  white-space: nowrap;
}
.fbadge.type {
  background: rgba(46, 196, 182, 0.16);
  border-color: var(--acc);
  color: var(--acc);
}
.fright {
  margin-left: auto;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  padding-left: 6px;
}
.fright.dim {
  color: var(--mut2);
  font-weight: 600;
  font-size: 12px;
}
.froute {
  font-size: 13px;
  color: var(--txt2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}
.froute .unk {
  color: var(--mut2);
}
.fdet {
  display: none;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
.fitem.sel .fdet {
  display: block;
}
#dpanel {
  position: absolute;
  top: calc(var(--mtoph, 40px) + 26px);
  left: 14px;
  bottom: 14px;
  width: min(350px, 36vw);
  z-index: 600;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--txt2);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}
#dpanel.hidden {
  display: none;
}
body.dopen .leaflet-bottom.leaflet-left {
  left: calc(min(350px, 36vw) + 14px);
}
.dhead {
  background: linear-gradient(160deg, #173651, #0f2133);
  color: #fff;
  padding: 10px 12px 8px;
  position: relative;
}
.dtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.01em;
  padding-right: 30px;
}
.dop {
  font-size: 13px;
  color: #ddd;
  margin-top: 2px;
}
.dclose {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.dstrip {
  display: flex;
  justify-content: space-between;
  background: var(--panel2);
  color: var(--txt2);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 13px;
  padding: 6px 12px;
}
#dPhoto .fphoto {
  margin: 0;
  border-radius: 0;
}
.dscroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.dscroll::-webkit-scrollbar {
  width: 6px;
}
.dscroll::-webkit-scrollbar-thumb {
  background: var(--acc);
  border-radius: 3px;
}
.droute {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 6px;
  background: var(--panel2);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.droute .c {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}
.droute .t {
  font-size: 11px;
  color: var(--mut2);
  margin-top: 2px;
}
.droute .r {
  text-align: right;
}
.droute .arr {
  color: var(--acc);
  font-size: 18px;
}
.droute .unk {
  grid-column: 1/-1;
  color: var(--mut2);
  font-size: 13px;
}
.dprog {
  grid-column: 1/-1;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.dtimes {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.dtimes .r {
  text-align: right;
}
.dtimes .l {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--mut2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.dtimes .v {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}
.dtimes.sub {
  font-size: 11.5px;
  color: var(--txt2);
  font-weight: 600;
}
.dbarline {
  position: relative;
  height: 4px;
  border-radius: 2px;
  background: var(--line2);
  margin: 14px 6px 12px;
}
.dbarline i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  background: var(--acc);
}
.dbarline b {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -52%);
  color: var(--acc);
  font-size: 17px;
  line-height: 1;
  text-shadow:
    0 0 4px var(--ink),
    0 0 4px var(--ink);
}
.dnote {
  font-size: 10.5px;
  color: var(--mut2);
  margin-top: 6px;
}
.dbar {
  background: none;
  color: var(--acc);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 14px 14px 2px;
}
.dsec {
  display: flex;
  gap: 10px;
  background: none;
  padding: 8px 14px 12px;
  border-bottom: 1px solid var(--line);
}
.dico {
  width: 22px;
  flex: none;
  color: var(--acc);
  font-size: 18px;
  text-align: center;
  padding-top: 2px;
}
.dgrid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.dgrid .wide {
  grid-column: 1/-1;
}
.dgrid .l {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--mut2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.dgrid .v {
  font-size: 15px;
  font-weight: 700;
  margin-top: 1px;
  word-break: break-word;
}
.dsec.graph {
  flex-direction: column;
  gap: 4px;
}
#dGraph {
  width: 100%;
  height: auto;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 8px;
  touch-action: pan-y;
  display: block;
}
#dGraph text {
  font-family: inherit;
}
.glegend {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--mut2);
}
.glegend i {
  display: inline-block;
  width: 10px;
  height: 3px;
  margin-right: 4px;
  vertical-align: middle;
}
.glegend span:last-child {
  margin-left: auto;
}
.dfoot {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.dfoot button {
  flex: 1;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--txt2);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 0;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.dfoot button span {
  font-size: 14px;
  line-height: 1;
}
.dfoot button:hover {
  border-color: var(--acc);
}
.dfoot button.on {
  color: var(--ink);
  background: var(--acc);
  border-color: var(--acc);
}
.fphoto {
  display: block;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  background: var(--ink);
  aspect-ratio: 16/9;
}
.fphoto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fphoto.shipph > a {
  display: block;
  height: 100%;
}
.fcredit a {
  color: #fff;
  text-decoration: underline;
}
.fphoto.loading,
.fphoto.none {
  display: grid;
  place-items: center;
  color: var(--mut2);
  font-size: 12px;
  aspect-ratio: auto;
  padding: 14px;
}
.fcredit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 8px 5px;
  font-size: 10.5px;
  color: #eee;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fdet .air {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 8px;
}
.fdet .air .dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  color: #fff;
}
.fdet .typ {
  color: var(--mut2);
  font-weight: 700;
  font-size: 12px;
  margin-left: auto;
}
.fgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.fgrid div {
  background: var(--panel);
  border-radius: 6px;
  padding: 5px 6px;
}
.fgrid .l {
  font-size: 9px;
  font-weight: 800;
  color: var(--mut2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.fgrid .v {
  font-size: 13px;
  font-weight: 800;
  margin-top: 1px;
  white-space: nowrap;
}
.bsearch {
  position: relative;
  padding: 0 10px 8px;
}
.fcard.collapsed .bsearch {
  display: none;
}
#apSearch {
  width: 100%;
  box-sizing: border-box;
  background: var(--ink);
  border: 1px solid var(--line2);
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  padding: 7px 12px;
  outline: none;
}
#apSearch:focus {
  border-color: var(--acc);
}
#apResults {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 36px;
  z-index: 5;
  background: var(--panel);
  border: 1px solid var(--line2);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
#apResults.hidden,
#homeRes.hidden,
#homePop.hidden {
  display: none;
}
#apResults button {
  display: flex;
  gap: 8px;
  align-items: baseline;
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--txt2);
  font: inherit;
  font-size: 13px;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
}
#apResults button:last-child {
  border-bottom: none;
}
#apResults button:hover,
#apResults button.hi {
  background: var(--panel3);
}
#apResults b {
  color: #fff;
  white-space: nowrap;
}
#apResults span {
  color: var(--mut2);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#apResults .none {
  padding: 8px 12px;
  color: var(--mut2);
  font-size: 12.5px;
}
.btab i {
  font-style: normal;
  margin-left: 6px;
  color: var(--mut2);
  font-weight: 700;
}
.btab i:hover {
  color: var(--sel);
}
.btabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: none;
}
.btab {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--txt2);
  font: inherit;
  font-weight: 800;
  font-size: 12.5px;
  padding: 5px 10px;
  cursor: pointer;
}
.btab span {
  font-weight: 600;
  color: var(--mut2);
  font-size: 11px;
  margin-left: 4px;
}
.btab.on {
  border-color: var(--acc);
  color: var(--acc);
  background: rgba(46, 196, 182, 0.14);
}
.bhead,
.brow,
.bsec,
.bnone {
  flex: none;
}
.bhead {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
}
.bname {
  background: none;
  border: none;
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.bname:hover {
  color: var(--acc);
}
.bhead .awx {
  margin-top: 4px;
}
.brw {
  font-size: 12px;
  color: var(--mut2);
  margin-top: 4px;
}
.brw b {
  color: var(--txt2);
}
.bsec {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--acc);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 4px 2px -2px;
}
.brow {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
  cursor: pointer;
  font-size: 13px;
  min-width: 0;
}
.brow:hover {
  border-color: var(--line2);
}
.brow.sel {
  border-color: var(--acc);
}
.brow b {
  font-weight: 800;
  white-space: nowrap;
}
.brow .bw {
  color: var(--txt2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.brow .bt {
  font-weight: 800;
  white-space: nowrap;
}
.bnone {
  font-size: 12px;
  color: var(--mut2);
  padding: 0 2px;
}
.aitem {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.aname {
  font-weight: 800;
  font-size: 15px;
}
.awx {
  font-size: 13px;
  color: var(--txt2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.awind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.awind i {
  display: inline-block;
  font-style: normal;
  font-size: 14px;
}
.acnt {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 800;
}
.acnt span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.acnt b {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.aflex {
  display: flex;
  align-items: center;
  gap: 8px;
}
.leaflet-control-attribution {
  font-size: 10px;
}
#atcbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  z-index: 900;
  display: none;
  align-items: center;
  gap: 10px;
  background: rgba(9, 20, 44, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
body.atc-on #atcbar {
  display: flex;
}
#atcbar .live {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.dotlive {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #888;
}
#atcbar.playing .dotlive {
  background: #e74c3c;
  animation: pulse 1.4s infinite;
}
#atcbar.waiting .dotlive {
  background: #f1c40f;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
#atcVol {
  width: 90px;
  accent-color: var(--acc);
}
#atcStop {
  background: #24365f;
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 11px;
}
body.atc-on #atcBtn,
body.atc-on #mAtc {
  color: var(--acc);
}
/* ---- site identity (public build) ---- */
:root {
  --ink: #0a1622;
  --panel: #10212f;
  --panel2: #152a3b;
  --panel3: #1a3348;
  --glass: rgba(12, 27, 40, 0.82);
  --line: rgba(150, 190, 215, 0.18);
  --line2: rgba(150, 190, 215, 0.32);
  --txt2: #e6f0f6;
  --mut2: #8ea8bc;
  --acc: #2ec4b6;
  --sel: #ff6b5b;
}
html,
body {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px 6px 7px;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
}
.brand svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.brand small {
  font-weight: 600;
  color: var(--mut2);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
@media (max-width: 1500px) {
  .brand small {
    display: none;
  }
}
#about {
  width: min(560px, 94vw);
  background: var(--panel);
  border: 1px solid var(--line);
}
#about h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}
#about h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--acc);
  margin: 16px 0 6px;
}
#about p,
#about li {
  font-size: 13px;
  line-height: 1.5;
  color: var(--txt2);
}
#about ul {
  padding-left: 18px;
}
#about a {
  color: var(--acc);
}
#about .btns button {
  background: var(--acc);
  color: var(--ink);
}
dialog#settings {
  background: var(--panel);
  border: 1px solid var(--line);
}
dialog#settings input,
dialog#settings select {
  background: var(--ink);
  border-color: var(--line2);
}
.homenow {
  font-weight: 700;
  margin: 2px 0 8px;
}
.homenow small {
  display: block;
  font-weight: 400;
  color: var(--mut2, #8ea0c8);
  font-size: 12px;
}
.homeset {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.homesrch {
  flex: 1;
  position: relative;
}
.homesrch input {
  width: 100%;
}
#homeGps {
  white-space: nowrap;
  border-radius: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line2, #2a3f57);
  background: var(--ink, #0b1522);
  color: inherit;
  cursor: pointer;
}
#homeRes {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 5;
  background: var(--panel, #102235);
  border: 1px solid var(--line2, #2a3f57);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 260px;
  overflow: auto;
}
#homeRes button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: inherit;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
}
#homeRes button:hover,
#homeRes button.hi {
  background: rgba(46, 196, 182, 0.15);
}
#homeRes button span {
  color: var(--mut2, #8ea0c8);
  margin-left: 6px;
  font-size: 12px;
}
#homeRes .none {
  padding: 8px 12px;
  color: var(--mut2, #8ea0c8);
  font-size: 13px;
}
#mHome {
  position: relative;
}
#mHome.guess::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--acc, #2ec4b6);
  box-shadow: 0 0 0 2px var(--ink, #0b1522);
}
#homePop {
  position: fixed;
  z-index: 1200;
  width: min(290px, calc(100vw - 20px));
  background: var(--panel, #102235);
  border: 1px solid var(--line2, #2a3f57);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  font-size: 14px;
  line-height: 1.45;
}
#homePop::before {
  content: "";
  position: absolute;
  top: -7px;
  left: var(--ax, 24px);
  width: 12px;
  height: 12px;
  background: inherit;
  border-left: 1px solid var(--line2, #2a3f57);
  border-top: 1px solid var(--line2, #2a3f57);
  transform: rotate(45deg);
}
#homePop b {
  display: block;
  margin-bottom: 3px;
}
#homePop p {
  margin: 0 0 10px;
  color: var(--mut2, #b9c6d6);
}
#homePop .hp-btns {
  display: flex;
  gap: 8px;
}
#homePop button {
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--line2, #2a3f57);
  background: none;
  color: inherit;
}
#homePop button.go {
  background: var(--acc, #2ec4b6);
  border-color: var(--acc, #2ec4b6);
  color: #06222a;
}
.sethome-pop button {
  background: #2ec4b6;
  color: #06222a;
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
  cursor: pointer;
}
.primary {
  background: var(--acc) !important;
  color: var(--ink) !important;
}
/* ---- phones: top button strip, bottom sheets ---- */
@media (max-width: 760px) {
  .mtop {
    top: 8px;
    left: 8px;
    right: 8px;
    max-width: none;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .mtop::-webkit-scrollbar {
    display: none;
  }
  .mtop > * {
    flex: none;
  }
  .brand {
    padding: 4px 11px 4px 4px;
    font-size: 14px;
    gap: 7px;
  }
  .brand svg {
    width: 24px;
    height: 24px;
  }
  .mbtn {
    padding: 7px 11px;
    font-size: 13px;
    white-space: nowrap;
  }
  #lyrPop {
    position: fixed;
    top: 52px;
    left: 8px;
    right: 8px;
    min-width: 0;
    z-index: 700;
  }
  .leaflet-control-zoom {
    display: none;
  }
  .leaflet-bottom.leaflet-right {
    bottom: auto;
    top: 50px;
  }
  /* the bottom sheet covers the map's lower edge on phones; the MapTiler logo (the only control there) goes up top */
  .leaflet-bottom.leaflet-left {
    bottom: auto;
    top: 70px;
  }
  .leaflet-control-attribution {
    font-size: 9px;
    max-width: calc(100vw - 16px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 6px 0 0 6px;
    cursor: pointer;
  }
  .leaflet-control-attribution.open {
    white-space: normal;
  }
  #mpanel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 44vh;
    gap: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  #mpanel .fcard {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.45);
  }
  #mpanel .fcard:first-child {
    border-radius: 18px 18px 0 0;
  }
  #cardFlights {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }
  #cardAirports {
    flex: 0 1 auto;
    max-height: 40vh;
    min-height: 0;
  }
  .btabs {
    flex: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .btab {
    flex: none;
  }
  #mpanel #cardFlights.collapsed,
  #mpanel #cardAirports.collapsed {
    flex: 0 0 auto;
  }
  .fcard header {
    padding: 10px 14px;
  }
  #cardFlights {
    position: relative;
    padding-top: 8px;
  }
  #cardFlights::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--line2);
  }
  #cardFlights .fscroll {
    min-height: 0;
  }
  #cardAirports.collapsed {
    flex: none;
  }
  .leaflet-control-attribution {
    background: var(--glass) !important;
    color: var(--mut2) !important;
  }
  body.dopen #mpanel {
    display: none;
  }
  #dpanel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: 50vh; /* the top half stays map, so the selected plane is visible above the sheet */
    border-radius: 18px 18px 0 0;
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom);
  }
  /* compact panel on phones: a photo strip instead of a full 16:9 photo, tighter rows and smaller type */
  #dPhoto .fphoto {
    height: 92px;
    aspect-ratio: auto;
  }
  #dPhoto .fphoto img {
    height: 100%;
  }
  #dPhoto .fphoto.loading,
  #dPhoto .fphoto.none {
    height: auto;
    padding: 6px;
    font-size: 11px;
  }
  #dPhoto .fcredit {
    padding: 8px 8px 3px;
    font-size: 9.5px;
  }
  .dhead {
    padding: 8px 12px 6px;
  }
  .dtitle {
    font-size: 17px;
  }
  .dop {
    font-size: 12px;
  }
  .dstrip {
    padding: 4px 12px;
    font-size: 12px;
  }
  .droute {
    padding: 8px 12px;
  }
  .droute .c {
    font-size: 19px;
  }
  .droute .t {
    font-size: 10.5px;
  }
  .dprog {
    margin-top: 6px;
    padding-top: 6px;
  }
  .dtimes .v {
    font-size: 15px;
  }
  .dbarline {
    margin: 9px 6px 8px;
  }
  .dnote {
    display: none;
  }
  .dbar {
    padding: 10px 12px 0;
  }
  .dsec {
    padding: 5px 12px 8px;
  }
  .dgrid {
    gap: 5px 10px;
  }
  .dgrid .l {
    font-size: 9.5px;
  }
  .dgrid .v {
    font-size: 13.5px;
  }
  .dfoot {
    padding: 8px 10px;
    gap: 6px;
  }
  .dfoot button {
    font-size: 12px;
    padding: 8px 0;
  }
}
/* ---- Flights / Satellites / Ships ---- */
.modesw {
  display: flex;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modesw button {
  background: none;
  border: none;
  color: #cfe0ea;
  font: inherit;
  font-weight: 700;
  font-size: 13.5px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.modesw button:hover {
  color: #fff;
}
.modesw button[aria-selected="true"] {
  background: var(--acc);
  color: var(--ink);
}
body:not(.m-air) #mMil,
body:not(.m-air) #mCount,
body:not(.m-air) #mAirports,
body:not(.m-air) .lyrwrap,
html body:not(.m-air) .mtop #mAtc,
html body:not(.m-air) #atcbar {
  display: none !important;
}
body:not(.m-air) #cardFlights,
body:not(.m-air) #cardAirports,
body:not(.m-air) #dpanel {
  display: none !important;
}
body:not(.m-air) .leaflet-marker-pane .pl-ic,
body:not(.m-air) .leaflet-marker-pane .ap-ic,
body:not(.m-air) .leaflet-marker-pane .wp-ic,
body:not(.m-air) .leaflet-marker-pane .awx-ic,
body:not(.m-air) .leaflet-marker-pane .nat-ic,
body:not(.m-air) .leaflet-overlay-pane,
body:not(.m-air) .leaflet-airspace-pane,
body:not(.m-air) .leaflet-radar-pane {
  display: none;
}
body.m-air .leaflet-modes-pane {
  display: none;
}
#cardSats,
#cardShips {
  display: none;
}
body.m-sat #cardSats,
body.m-sea #cardShips {
  display: flex;
  flex: 0 1 auto;
  max-height: 100%;
}
.xchips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 10px 8px;
  flex: none;
}
.xchip {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--txt2);
  font: inherit;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.xchip:hover {
  border-color: var(--line2);
}
.xchip.on {
  border-color: var(--acc);
  color: var(--acc);
  background: rgba(46, 196, 182, 0.14);
}
.xchip i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}
.xchip span {
  color: var(--mut2);
  font-weight: 600;
  font-size: 11px;
}
.fcard.collapsed .xchips,
.fcard.collapsed .xsub {
  display: none;
}
.xsub {
  font-size: 12px;
  color: var(--mut2);
  padding: 0 14px 8px;
  flex: none;
}
.xsub:empty {
  display: none;
}
.xcard .bsearch input {
  width: 100%;
  box-sizing: border-box;
  background: var(--ink);
  border: 1px solid var(--line2);
  border-radius: 999px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  padding: 7px 12px;
  outline: none;
}
.xcard .bsearch input:focus {
  border-color: var(--acc);
}
.xitem .froute {
  color: var(--txt2);
}
.dim {
  color: var(--mut2);
  font-weight: 600;
  font-size: 12px;
}
.fempty a,
.xnote a,
#xpanel a {
  color: var(--acc);
}
#xpanel {
  position: absolute;
  top: calc(var(--mtoph, 40px) + 26px);
  left: 14px;
  bottom: 14px;
  width: min(350px, 36vw);
  z-index: 600;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--txt2);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}
#xpanel.hidden {
  display: none;
}
body.xopen .leaflet-bottom.leaflet-left {
  left: calc(min(350px, 36vw) + 14px);
}
.xnote {
  font-size: 12.5px;
  color: var(--mut2);
  padding: 8px 14px 12px;
  line-height: 1.45;
}
.xpasses {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 12px 4px;
}
.xpass {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 10px;
}
.xpass.vis {
  border-color: rgba(255, 211, 77, 0.6);
}
.xpd {
  font-size: 11px;
  font-weight: 800;
  color: var(--mut2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  justify-content: space-between;
}
.xpd span {
  color: #ffd34d;
  text-transform: none;
  letter-spacing: 0;
}
.xpt {
  font-size: 13px;
  color: var(--txt2);
  margin-top: 2px;
}
.xpt b {
  color: #fff;
}
.dgrid .v small {
  color: var(--mut2);
  font-weight: 600;
}
.dgrid .v .vs {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--txt2);
  line-height: 1.45;
  display: block;
}
.dgrid .v .vs2 {
  font-size: 13.5px;
}
@media (max-width: 760px) {
  .modesw button {
    padding: 5px 9px;
    font-size: 13px;
  }
  .modesw button span {
    display: none;
  }
  body.xopen #mpanel {
    display: none;
  }
  #xpanel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: 58vh;
    border-radius: 18px 18px 0 0;
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.m-sat #cardSats,
  body.m-sea #cardShips {
    flex: 1 1 auto;
    border-radius: 18px 18px 0 0;
  }
  .xchips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .xchips::-webkit-scrollbar {
    display: none;
  }
}

/* Sentinel-2 imagery is true colour and comes out dark (near-black sea, muted land).
   Lift it a little; labels, planes and panels are separate layers and stay as they are. */
.leaflet-layer.imagery-eox {
  filter: brightness(1.35) contrast(1.08) saturate(1.2);
}
