html, body { height: 100%; }
body { display: flex; flex-direction: column; }
.lm { flex: 1; min-height: 0; display: grid; grid-template-columns: 320px 1fr; }
.lm-side { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-right: 1px solid var(--line); background: var(--bg-2); min-height: 0; }
.lm-sum b { display: block; font-size: 34px; line-height: 1; letter-spacing: -.02em; }
.lm-sum span { color: var(--muted); font-size: 14px; }
.lm-side input, .lm-side select { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; }
.lm-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; min-height: 0; display: grid; align-content: start; gap: 6px; }
.lm-list button { width: 100%; text-align: left; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); border-left: 3px solid var(--a); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; }
.lm-list button:hover, .lm-list button[aria-pressed=true] { border-color: var(--a); background: var(--panel-2); }
.lm-fn { font-weight: 800; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; }
.lm-route { justify-self: end; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: var(--muted); }
.lm-al, .lm-ph { font-size: 12px; color: var(--dim); } .lm-ph { justify-self: end; }
.lm-none { color: var(--muted); font-size: 14px; padding: 8px 2px; }
.lm-note { margin: 0; color: var(--dim); font-size: 12px; }
.lm-mapwrap { position: relative; min-height: 0; isolation: isolate; z-index: 0; }
#lmMap { position: absolute; inset: 0; background: #0b1426; }
.lm-plane { background: none; border: 0; }
.lm-plane span { display: grid; place-items: center; width: 26px; height: 26px; font-size: 20px; color: var(--a); text-shadow: 0 0 3px #000, 0 0 6px #000a; transition: transform .3s; }
.lm-plane.sel span { font-size: 26px; color: #fff; text-shadow: 0 0 0 var(--a), 0 0 8px var(--a), 0 0 3px #000; }
.lm-card { position: absolute; top: 14px; right: 14px; z-index: 500; width: 310px; max-width: calc(100% - 28px); box-sizing: border-box; padding: 16px; border-radius: 14px; background: #0e1830f2; border: 1px solid var(--line-2); box-shadow: 0 16px 40px #0009; color: var(--text); }
.lm-x { position: absolute; top: 8px; right: 10px; border: 0; background: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
.lm-card header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; padding-right: 20px; }
.lm-card header img { width: 44px; height: 44px; object-fit: contain; }
.lm-mono { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--a); color: #fff; font-weight: 900; font-size: 13px; }
.lm-card header b { display: block; font-size: 20px; font-family: "JetBrains Mono", ui-monospace, monospace; } .lm-card header small { color: var(--muted); }
.lm-legs { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: start; } .lm-legs > span { color: var(--dim); padding-top: 2px; }
.lm-legs b { display: block; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 17px; } .lm-legs small { color: var(--dim); font-size: 12px; line-height: 1.3; display: block; }
.lm-legs div:last-child { text-align: right; }
.lm-bar { height: 5px; border-radius: 3px; background: var(--line-2); margin: 12px 0; overflow: hidden; } .lm-bar i { display: block; height: 100%; }
.lm-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; } .lm-card dt { color: var(--dim); font-size: 11px; } .lm-card dd { margin: 0; font-weight: 700; font-size: 14px; } .lm-card dd small { color: var(--dim); font-weight: 400; }
.lm-link { display: inline-block; margin-top: 12px; color: var(--cyan); font-weight: 700; font-size: 14px; }
.leaflet-container { font: inherit; }
@media (max-width: 760px) {
  body { display: block; height: auto; }
  .lm { display: flex; flex-direction: column-reverse; }
  .lm-mapwrap { height: 62vh; }
  .lm-side { border-right: 0; border-top: 1px solid var(--line); }
  .lm-list { max-height: 50vh; }
  .lm-card { top: auto; bottom: 10px; right: 10px; left: 10px; width: auto; }
}

/* Match the Cirrus dark basemap without dimming aircraft, routes or controls. */
#lmMap .leaflet-tile-pane { filter: grayscale(1) invert(1) brightness(.72) contrast(.82); }
