/* SkyRadar 24 live map site (prototype). Flight-tracker look: real map, dark tool bar, flat data panel. */
:root {
    --bar: #1b1d21;
    --panel: #24272c;
    --row: #2d3137;
    --ink: #f2f3f5;
    --dim: #9aa1ab;
    --line: #3a3f47;
    --brand: #ffd21f;
    --ok: #3ccf6e;
    --warn: #ffab1a;
    --bad: #f0524a;
    --bar-h: 50px;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    background: #dfe6ea;
    color: var(--ink);
    font: 14px/1.35 "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}

/* ---------- tool bar ---------- */

.bar {
    position: fixed;
    z-index: 4;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--bar-h) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 12px 0;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bar);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.brand {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--brand);
    text-decoration: none;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: .6px;
    white-space: nowrap;
}
.brand svg { width: 24px; height: 24px; }
.brand span { color: #fff; }
.brand b { color: var(--brand); }

.search {
    position: relative;
    flex: 0 1 340px;
    display: flex;
    align-items: center;
}
.search svg { position: absolute; left: 10px; width: 15px; height: 15px; color: var(--dim); pointer-events: none; }
.search input {
    width: 100%;
    height: 34px;
    padding: 0 10px 0 32px;
    background: #33373e;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--ink);
    font: inherit;
    outline: none;
    -webkit-appearance: none;
}
.search input::placeholder { color: var(--dim); }
.search input:focus { border-color: var(--brand); background: #3a3f47; }
#results {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    max-height: 60vh;
    overflow-y: auto;
}
#results li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; cursor: pointer; }
#results li:hover { background: var(--row); }
#results li b { color: var(--brand); }
#results li small { color: var(--dim); }

.filters { position: relative; }
.tool { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; background: #33373e; border: 1px solid transparent; border-radius: 4px; color: var(--ink); font: inherit; cursor: pointer; }
.tool:hover, .tool[aria-expanded="true"] { background: #3a3f47; border-color: var(--brand); }
.tool svg { width: 15px; height: 15px; }
.tool b { min-width: 18px; padding: 0 5px; background: var(--brand); border-radius: 9px; color: #1b1d21; font-size: 11.5px; line-height: 18px; text-align: center; }
.tool b[hidden] { display: none; }
.box { position: absolute; top: 42px; left: 0; width: 280px; padding: 14px; display: grid; gap: 11px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.box[hidden] { display: none; }
.box label { display: grid; gap: 4px; color: var(--dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: .7px; }
.box input[type="text"], .box select { height: 36px; padding: 0 10px; background: #33373e; border: 1px solid transparent; border-radius: 4px; color: var(--ink); font: 14px/1 inherit; text-transform: none; letter-spacing: 0; outline: none; }
.box input[type="text"]:focus, .box select:focus { border-color: var(--brand); }
.box .check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; text-transform: none; letter-spacing: 0; cursor: pointer; }
.box .check input { width: 17px; height: 17px; accent-color: var(--brand); }
#filter-reset { height: 34px; background: none; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); font: inherit; cursor: pointer; }
#filter-reset:hover { background: var(--row); }

.status { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); text-transform: uppercase; font-size: 11.5px; letter-spacing: .8px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.live.ok { color: var(--ok); }
.live.ok i { background: var(--ok); animation: pulse 2s infinite; }
.live.warn { color: var(--warn); }
.live.warn i { background: var(--warn); }
.live.bad { color: var(--bad); }
.live.bad i { background: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live.ok i { animation: none; } }

/* ---------- map ---------- */

#map { position: fixed; top: calc(var(--bar-h) + env(safe-area-inset-top)); left: 0; right: 0; bottom: 0; }
.maplibregl-canvas { outline: none; }
.maplibregl-popup-content { padding: 4px 8px; border-radius: 3px; background: var(--bar); color: #fff; font: 700 12px/1.3 "Helvetica Neue", Arial, sans-serif; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.maplibregl-popup-content small { display: block; font-weight: 400; color: #c9ced6; }
.maplibregl-popup-tip { display: none; }
.maplibregl-ctrl-attrib { color: #30343a; }

.notice {
    position: fixed;
    z-index: 2;
    top: calc(var(--bar-h) + 10px + env(safe-area-inset-top));
    right: 10px;
    padding: 5px 9px;
    background: rgba(27, 29, 33, .88);
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
}

/* ---------- flight panel ---------- */

.side {
    position: fixed;
    z-index: 3;
    top: calc(var(--bar-h) + 10px + env(safe-area-inset-top));
    left: 10px;
    width: 390px;
    max-height: calc(100% - var(--bar-h) - 20px);
    overflow-y: auto;
    background: var(--panel);
    border-radius: 6px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .4);
    font-size: 15px;
}
.p-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; padding: 14px 10px 12px 18px; background: var(--bar); }
.p-flight { display: flex; align-items: baseline; gap: 10px; color: var(--brand); font-size: 28px; font-weight: 800; letter-spacing: .4px; line-height: 1.1; }
.p-flight small { color: #fff; font-size: 15px; font-weight: 600; padding: 2px 7px; background: #3a3f47; border-radius: 3px; }
.p-flight small:empty { display: none; }
.p-sub { color: #dfe3e8; font-size: 15px; margin-top: 4px; }
.p-sub:empty { display: none; }
.close { width: 38px; height: 38px; background: none; border: 0; border-radius: 4px; color: var(--dim); font-size: 28px; line-height: 1; cursor: pointer; }
.close:hover { background: var(--row); color: #fff; }

.p-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.p-actions button { height: 42px; background: var(--row); border: 0; color: var(--ink); font: 600 14px/1 inherit; cursor: pointer; }
.p-actions button:hover { background: #363b42; }
.p-actions button[aria-pressed="true"] { background: var(--brand); color: #1b1d21; }

#toast { position: fixed; z-index: 6; left: 50%; bottom: 40px; transform: translateX(-50%); padding: 9px 14px; background: var(--bar); border-radius: 4px; color: #fff; font-size: 13.5px; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
#toast[hidden] { display: none; }

#p-photo { position: relative; display: block; aspect-ratio: 16 / 9; background: #15171a; overflow: hidden; }
#p-photo[hidden] { display: none; }
#p-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
#p-tag { position: absolute; top: 8px; left: 8px; padding: 3px 8px; background: rgba(27, 29, 33, .85); border-radius: 3px; color: #fff; font-size: 11.5px; }
#p-credit { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 10px 5px; background: linear-gradient(transparent, rgba(0, 0, 0, .78)); color: #fff; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#p-route { padding: 16px 18px 14px; border-bottom: 1px solid var(--line); }
.r-ends { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.r-ends b { display: block; font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: .5px; }
.r-ends span { display: block; margin-top: 4px; color: #c9ced6; font-size: 13.5px; overflow-wrap: anywhere; }
.r-ends svg { width: 26px; height: 26px; color: var(--brand); }
.r-to { text-align: right; }
.r-bar { height: 5px; margin: 14px 0 8px; background: #454b54; border-radius: 3px; overflow: hidden; }
.r-bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 3px; }
.r-info { display: flex; justify-content: space-between; gap: 10px; color: #dfe3e8; font-size: 13px; font-variant-numeric: tabular-nums; }
.r-note { margin-top: 8px; color: var(--dim); font-size: 12px; }
.r-note b { color: #fff; }

.side h3 { margin: 0; padding: 12px 18px 6px; color: var(--brand); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.p-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.p-grid div { padding: 10px 18px 11px; background: var(--panel); min-width: 0; }
.p-grid .wide { grid-column: 1 / -1; }
.p-grid dt { color: var(--dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: .7px; }
.p-grid dd { margin: 3px 0 0; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.p-grid dd small { display: block; margin-top: 1px; font-size: 13px; font-weight: 400; color: #c9ced6; }
.p-grid dd.alert { color: var(--bad); }
.p-age { padding: 11px 18px 13px; color: var(--dim); font-size: 13px; }
.p-age.old { color: var(--warn); }

@media (max-width: 720px) {
    :root { --bar-h: 92px; }
    .bar { flex-wrap: wrap; gap: 6px 10px; align-content: center; }
    .brand { font-size: 16px; }
    .search { order: 3; flex: 1 1 calc(100% - 152px); min-width: 0; }
    .filters { order: 4; }
    .tool span { display: none; }
    .tool { height: 34px; }
    /* menus under the bar, across the screen (the buttons are small and on the right) */
    .bar .box, .bar .settings .box { position: fixed; top: calc(var(--bar-h) + 6px + env(safe-area-inset-top)); left: 10px; right: 10px; width: auto; max-height: calc(100% - var(--bar-h) - 20px); overflow-y: auto; }
    .tool { padding: 0 10px; }
    .status { flex: 1 1 auto; justify-content: flex-end; }
    .status { gap: 10px; font-size: 12.5px; }
    .notice { left: 10px; right: auto; font-size: 11.5px; }
    .side { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 68%; border-radius: 12px 12px 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .p-head { border-radius: 12px 12px 0 0; }
    .replay-open { bottom: 64px; }
    .replay-bar { left: 0; right: 0; bottom: 0; transform: none; border-radius: 12px 12px 0 0; flex-wrap: wrap; justify-content: center; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
    #p-photo { aspect-ratio: 16 / 7; }
}

/* ---------- 2026-11-17: settings, categories, airports, path colours ---------- */

.box .cats { margin: 0; padding: 0; border: 0; display: grid; gap: 6px; }
.box .cats legend { padding: 0 0 6px; color: var(--dim); font-size: 11.5px; text-transform: uppercase; letter-spacing: .7px; }
#f-cats { display: flex; flex-wrap: wrap; gap: 6px; }
#f-cats button { height: 28px; padding: 0 10px; background: #33373e; border: 1px solid var(--line); border-radius: 14px; color: var(--dim); font: 12.5px/1 inherit; cursor: pointer; text-decoration: line-through; }
#f-cats button[aria-pressed="true"] { background: #3a3f47; border-color: var(--brand); color: var(--ink); text-decoration: none; }
.settings .box { left: auto; right: 0; }

.legend { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px 0; padding: 0 18px 14px; color: var(--dim); font-size: 11px; }
.legend[hidden] { display: none; }
.legend span { grid-column: 1 / -1; text-transform: uppercase; letter-spacing: .7px; }
.legend i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, #e8913a, #e0cf3a 25%, #4fbf5e 50%, #2c9fd6 75%, #8b5bd8); }
.legend small:last-child { text-align: right; }

.a-weather { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.a-weather[hidden] { display: none; }
.a-temp { font-size: 26px; font-weight: 800; }
.a-temp small { margin-left: 8px; padding: 2px 7px; border-radius: 3px; background: #3a3f47; font-size: 12px; font-weight: 700; vertical-align: middle; }
.a-temp small.VFR { background: #2e7d4a; } .a-temp small.MVFR { background: #2b5fb4; } .a-temp small.IFR { background: #b23b35; } .a-temp small.LIFR { background: #8a3aa8; }
.a-wx { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 10px 0 0; }
.a-wx dt { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; }
.a-wx dd { margin: 2px 0 0; font-size: 14.5px; font-weight: 700; overflow-wrap: anywhere; }
.a-raw { margin-top: 10px; color: var(--dim); font: 11.5px/1.4 ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.a-tabs { position: sticky; top: 72px; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.a-tabs button { height: 42px; padding: 0 4px; background: var(--row); border: 0; color: var(--dim); font: 600 13.5px/1 inherit; cursor: pointer; }
.a-tabs button[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: inset 0 -3px 0 var(--brand); }
.a-tabs b { color: var(--brand); }
.a-list { list-style: none; margin: 0; padding: 0; }
.a-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.a-list li:hover { background: var(--row); }
.a-list b { color: var(--brand); font-size: 15.5px; }
.a-list .where { font-weight: 700; text-align: right; }
.a-list small { color: var(--dim); font-size: 12.5px; }
.a-list small:last-child { text-align: right; }
.a-list .empty { display: block; color: var(--dim); cursor: default; }
.a-list .empty:hover { background: none; }

/* dark map: light text on the planes and routes */
body.dark .maplibregl-ctrl-attrib { color: #c9ced6; background: rgba(27, 29, 33, .7); }
body.dark .maplibregl-ctrl-attrib a { color: #e6e9ed; }

/* ---------- 2026-11-17: favourites, aircraft history, replay ---------- */

.p-actions { grid-template-columns: 1fr 1fr 56px; }
.fav { font-size: 18px !important; color: var(--dim) !important; }
.fav[aria-pressed="true"] { color: var(--brand) !important; background: var(--row) !important; }
.head-buttons { display: flex; align-items: center; gap: 2px; }
.head-buttons .fav { width: 38px; height: 38px; background: none; border: 0; border-radius: 4px; cursor: pointer; }
.head-buttons .fav:hover { background: var(--row); }

#favs-box { width: 300px; padding: 6px 0; }
.favs .box { left: auto; right: 0; }
#favs-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
#favs-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 14px; cursor: pointer; }
#favs-list li:hover { background: var(--row); }
#favs-list b { color: var(--brand); }
#favs-list small { color: var(--dim); font-size: 12.5px; }
#favs-list .empty { display: block; color: var(--dim); cursor: default; font-size: 13px; }
#favs-list .empty:hover { background: none; }

.p-history { padding: 0 0 6px; border-top: 1px solid var(--line); }
.p-history .who { padding: 8px 18px; color: #c9ced6; font-size: 13px; }
.p-history ol { list-style: none; margin: 0; padding: 0; }
.p-history li { display: grid; grid-template-columns: 1fr auto; gap: 1px 10px; padding: 8px 18px; border-bottom: 1px solid var(--line); }
.p-history li b { font-size: 15px; }
.p-history li span { text-align: right; font-variant-numeric: tabular-nums; }
.p-history li small { color: var(--dim); font-size: 12px; }
.p-history .note { padding: 9px 18px; color: var(--dim); font-size: 13px; }

.replay-open { position: fixed; z-index: 2; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; background: var(--bar); border: 1px solid var(--line); border-radius: 19px; color: var(--ink); font: 600 14px/1 inherit; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.replay-open svg { width: 17px; height: 17px; color: var(--brand); }
.replay-open:hover { border-color: var(--brand); }
.replay-open[hidden] { display: none; }
.replay-bar { position: fixed; z-index: 4; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bar); border: 1px solid var(--brand); border-radius: 8px; box-shadow: 0 6px 22px rgba(0, 0, 0, .45); }
.replay-bar[hidden] { display: none; }
.replay-bar button, .replay-bar select, .replay-bar input { height: 34px; padding: 0 10px; background: #33373e; border: 1px solid transparent; border-radius: 4px; color: var(--ink); font: 600 13.5px/1 inherit; color-scheme: dark; }
.replay-bar button { cursor: pointer; }
.replay-bar button:hover { border-color: var(--brand); }
#r-play { min-width: 44px; background: var(--brand); color: #1b1d21; }
#r-time { min-width: 118px; color: var(--brand); font-variant-numeric: tabular-nums; text-align: center; }
#r-live { background: none; border-color: var(--line); }

/* ---------- 2026-11-17: SkyRadar 24 on YouTube (right card), airport live link ---------- */

.promo { position: fixed; z-index: 2; top: calc(var(--bar-h) + 10px + env(safe-area-inset-top)); right: 10px; width: 290px; max-height: calc(100% - var(--bar-h) - 120px); overflow-y: auto; background: var(--panel); border-radius: 6px; box-shadow: 0 6px 22px rgba(0, 0, 0, .4); }
.promo[hidden] { display: none; }
.pr-head { display: flex; align-items: center; gap: 10px; padding: 12px 6px 10px 14px; background: var(--bar); }
.pr-logo { width: 30px; height: 30px; color: var(--brand); flex: none; }
.pr-name { flex: 1; min-width: 0; }
.pr-name b { display: block; color: #fff; font-size: 16px; }
.pr-name small { color: var(--dim); font-size: 12px; }
.pr-sub { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 14px 4px; height: 38px; background: #ff0033; border-radius: 19px; color: #fff; font-weight: 700; text-decoration: none; }
.pr-sub:hover { background: #e0002d; }
.pr-sub svg { width: 22px; height: 22px; }
.promo h3 { display: flex; align-items: center; gap: 7px; margin: 0; padding: 12px 14px 6px; color: var(--brand); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.promo .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff0033; animation: pulse 2s infinite; }
#pr-lives { list-style: none; margin: 0; padding: 0 0 8px; }
#pr-lives a { display: grid; grid-template-columns: 112px 1fr; gap: 10px; align-items: center; padding: 7px 14px; color: var(--ink); text-decoration: none; }
#pr-lives a:hover { background: var(--row); }
#pr-lives img { width: 112px; height: 63px; object-fit: cover; border-radius: 4px; background: #15171a; }
#pr-lives b { display: block; font-size: 14px; }
#pr-lives small { display: block; color: var(--dim); font-size: 12px; }
#pr-lives .on { color: #ff4d6a; font-weight: 700; }
.promo-open { position: fixed; z-index: 2; right: 10px; top: calc(var(--bar-h) + 10px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: var(--bar); border: 1px solid var(--line); border-radius: 17px; color: var(--ink); font: 600 13px/1 inherit; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.promo-open[hidden] { display: none; }
.promo-open svg { width: 20px; height: 20px; }
.a-live { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--line); color: #fff; font-weight: 700; text-decoration: none; background: rgba(255, 0, 51, .14); }
.a-live:hover { background: rgba(255, 0, 51, .26); }
.a-live[hidden] { display: none; }
.a-live svg { width: 26px; height: 26px; flex: none; }
@media (max-width: 1100px) and (min-width: 721px) { .promo { width: 250px; } #pr-lives a { grid-template-columns: 90px 1fr; } #pr-lives img { width: 90px; height: 51px; } }

/* phone: the YouTube card is a bottom sheet, opened from its button (after the rules above on purpose) */
@media (max-width: 720px) {
    .promo { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 70%; z-index: 5; border-radius: 12px 12px 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .pr-head { border-radius: 12px 12px 0 0; }
    .promo-open { top: auto; bottom: 64px; right: auto; left: 10px; }
}

/* about / privacy links in the settings menu */
.box .links { display: flex; gap: 14px; padding-top: 2px; border-top: 1px solid var(--line); padding: 10px 0 0; order: 99; }
.box .links a { color: var(--dim); font-size: 13px; }
.box .links a:hover { color: var(--ink); }

/* link to the aircraft history page */
.p-more { display: block; margin: 0 18px 12px; padding: 11px 14px; background: var(--row); border: 1px solid var(--line); border-radius: 6px; color: var(--brand); font-weight: 700; text-align: center; text-decoration: none; }
.p-more:hover { border-color: var(--brand); }

/* text for search engines and visitors without JavaScript */
.noscript { position: fixed; z-index: 9; inset: 60px 10px auto; padding: 16px; background: #fff; color: #1f2328; border-radius: 4px; }
.noscript a { color: #1a5fb4; }
#a-page { margin: 10px 18px; }
.lang-switch { padding: 0 10px; font-weight: 700; letter-spacing: .5px; }

/* ---------- map layers (2026-11-18) ---------- */
.layers { position: fixed; right: 10px; bottom: 80px; z-index: 4; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
#layers-open { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border: 0; border-radius: 4px; background: var(--bar); color: var(--ink); font: 600 12px/1 "Helvetica Neue", Arial, sans-serif; box-shadow: 0 1px 5px rgba(0, 0, 0, .35); cursor: pointer; }
#layers-open svg { width: 17px; height: 17px; }
#layers-open:hover, #layers-open[aria-expanded="true"] { color: var(--brand); }
#layers-box { order: -1; width: 292px; padding: 10px; border-radius: 4px; background: var(--panel); box-shadow: 0 4px 16px rgba(0, 0, 0, .4); }
#layers-box > b { display: block; margin: 0 0 8px; color: var(--dim); font: 600 11px/1 "Helvetica Neue", Arial, sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.layers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.layers-grid button { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: none; color: var(--ink); font: 12px/1.2 "Helvetica Neue", Arial, sans-serif; cursor: pointer; text-align: center; }
.layers-grid svg, .layers-grid img { display: block; width: 100%; height: auto; aspect-ratio: 64 / 44; object-fit: cover; border: 2px solid var(--line); border-radius: 4px; box-sizing: border-box; background: #0b1a2b; }
.layers-grid button:hover svg, .layers-grid button:hover img { border-color: var(--dim); }
.layers-grid button[aria-pressed="true"] svg, .layers-grid button[aria-pressed="true"] img { border-color: var(--brand); }
.layers-grid button[aria-pressed="true"] span { color: var(--brand); font-weight: 600; }
.layers-grid button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 720px) {
    .layers { right: 10px; bottom: 92px; }
    #layers-open span { display: none; }
    #layers-open { width: 38px; padding: 0; justify-content: center; }
    #layers-box { width: min(292px, calc(100vw - 32px)); }
}

/* ---------- plane hover card + airline logo (2026-11-18) ---------- */
.hover-card .maplibregl-popup-content { padding: 8px 10px; }
.hc { display: flex; align-items: center; gap: 9px; min-width: 170px; }
.hc > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.hc b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc span:not(.hc-logo) { font-weight: 600; color: var(--brand); }
.hc small { font-weight: 400; color: #c9ced6; }
.hc-logo { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 30px; padding: 2px; border-radius: 3px; background: #fff; box-sizing: border-box; overflow: hidden; }
.hc-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hc-logo.none { background: var(--row); color: var(--brand); font-size: 16px; }
.p-logo { display: inline-flex; vertical-align: middle; margin-right: 8px; }
.p-logo[hidden] { display: none; }
.p-logo .hc-logo { width: 56px; height: 34px; }
