/* The map, the class forms and the teacher panel. */

.map {
    width: 100%;
    height: 100%;
    min-height: 16rem;
    background: #1b222c;
    border-radius: 6px;
}

/* Tiles a little darker, so the page does not glare next to the dark cockpit. */
.map .leaflet-tile-pane { filter: brightness(0.82) saturate(0.85); }

.map-runway { fill: #2c323a; fill-opacity: 0.95; stroke: #f4f7fb; }
.map-circuit { stroke: var(--accent); stroke-dasharray: 6 5; fill: none; }
.map-trail { stroke: #f2b807; stroke-opacity: 0.55; fill: none; }

.map-text span {
    position: absolute;
    transform: translate(-50%, -50%) rotate(var(--map-counter, 0deg));
    white-space: nowrap;
    font: 600 11px/1.2 system-ui, sans-serif;
    color: #0b0f14;
    text-shadow: 0 0 3px #fff, 0 0 3px #fff;
}

.map-leg-label span { color: #0b3d80; }
.map-altitude-label span { color: #0b3d80; transform: translate(-50%, 60%); }
.map-elevation-label span {
    padding: 1px 5px;
    border-radius: 3px;
    background: #0b3d80;
    color: #fff;
    text-shadow: none;
    font-weight: 800;
}

/* --- editable features ---------------------------------------------------- */

.map--drawing { cursor: crosshair; }
.map--drawing .leaflet-interactive { cursor: crosshair; }

.map-line { fill: none; stroke: #e9eef5; }
.map-line--runway { fill: #2c323a; fill-opacity: 0.95; stroke: #f4f7fb; }
.map-line--taxiway { stroke: #f2d024; stroke-width: 4; }
.map-line--route { stroke: #d86bff; stroke-width: 3; stroke-dasharray: 10 6; }
.map-line--traffic { stroke: #ff9f43; stroke-width: 3; stroke-dasharray: 4 6; }
.map-line--drawing { stroke: #7ff0a8; stroke-dasharray: 6 4; }
.map-line--selected { stroke: #fff; }

.map-line-label span {
    position: absolute;
    transform: translate(-50%, -50%);
    padding: 0 3px;
    border-radius: 3px;
    background: #f2d024;
    color: #10131a;
    font: 800 11px/1.3 system-ui, sans-serif;
}
.map-line-label--route span { background: #d86bff; }
.map-line-label--traffic span { background: #ff9f43; }

.map-vertex {
    border: 2px solid #0b0f14;
    border-radius: 2px;
    background: #fff;
    cursor: move;
}
.map-vertex--drawing { fill: #7ff0a8; stroke: #0b0f14; }

.map-feature { position: relative; }
.map-feature-dot {
    position: absolute;
    left: -7px;
    top: -7px;
    width: 14px;
    height: 14px;
    border: 2px solid #0b0f14;
    border-radius: 50%;
    background: #e9eef5;
}
.map-feature--reporting .map-feature-dot {
    left: -8px;
    top: -8px;
    width: 16px;
    height: 16px;
    border-radius: 0;
    transform: rotate(45deg);
    background: #4da3ff;
}
.map-feature--holding .map-feature-dot { background: #ff4d4d; border-radius: 2px; }
.map-feature--threshold .map-feature-dot { background: #7ff0a8; }
.map-feature--selected .map-feature-dot { outline: 3px solid #fff; }
.map-feature-label {
    position: absolute;
    left: 10px;
    top: -8px;
    padding: 0 3px;
    border-radius: 3px;
    background: rgba(11, 15, 20, 0.8);
    color: #e9eef5;
    font: 700 11px/1.3 system-ui, sans-serif;
    white-space: nowrap;
}

/* --- aircraft ------------------------------------------------------------ */

.map-aircraft { position: relative; }

.map-plane {
    position: absolute;
    left: -14px;
    top: -14px;
    width: 28px;
    height: 28px;
    overflow: visible;
}

.map-plane path { fill: #4da3ff; stroke: #0b0f14; stroke-width: 1.5; }

.map-tag {
    position: absolute;
    left: 14px;
    top: 6px;
    /* Sulla mappa girata il cartellino resta dritto, sempre accanto all'aereo. */
    transform-origin: -14px -6px;
    transform: rotate(var(--map-counter, 0deg));
    display: flex;
    flex-direction: column;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(11, 15, 20, 0.78);
    color: #e9eef5;
    font: 600 11px/1.25 system-ui, sans-serif;
    white-space: nowrap;
    pointer-events: none;
}

.map-detail { font-weight: 400; color: #93a1b5; font-variant-numeric: tabular-nums; }

.map-aircraft--own .map-plane path { fill: #f2b807; }
.map-aircraft--own .map-tag { background: rgba(242, 184, 7, 0.9); color: #10131a; }
.map-aircraft--own .map-detail { color: #3a3000; }
.map-aircraft--own { z-index: 1000 !important; }

.map-aircraft--selected .map-plane path { stroke: #fff; stroke-width: 3; }
.map-aircraft--selected .map-tag { outline: 2px solid #fff; }
.map-aircraft--held .map-tag { background: rgba(255, 77, 77, 0.85); }
.map-aircraft--stale { opacity: 0.4; }

/* --- controls ------------------------------------------------------------ */

.map-centre {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background: #fff;
    color: #0b0f14;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.map-centre--off { color: #9aa3ad; }

.map-wind {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.5rem 0.2rem 0.3rem;
    border-radius: 4px;
    background: rgba(11, 15, 20, 0.8);
    color: #e9eef5;
    font: 600 12px/1.2 system-ui, sans-serif;
}

.map-wind svg { width: 22px; height: 22px; }
.map-wind-arrow { stroke: #7ff0a8; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* --- forms --------------------------------------------------------------- */

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cta--quiet { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.cta { border: none; font: inherit; font-weight: 600; cursor: pointer; }
.cta:disabled { opacity: 0.5; cursor: default; }

.form { display: flex; flex-direction: column; gap: 0.8rem; max-width: 26rem; }
.form label { display: flex; flex-direction: column; gap: 0.25rem; color: var(--ink-dim); font-size: 0.85rem; }
.form__row { display: flex; gap: 0.8rem; }
.form__row label { flex: 1 1 0; min-width: 0; }

.form input, .form select {
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--edge);
    border-radius: 5px;
    background: #10151c;
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
}

.form__error { margin: 0; color: var(--alarm); }
.form .cta { align-self: flex-start; }

/* --- the callsign, big, so the call on Meet finds its aircraft ----------- */

.callsign {
    padding: 0 0.5rem;
    border-radius: 4px;
    background: var(--warn);
    color: #10131a;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.chip--warn { color: var(--warn); border-color: var(--warn); }
.chip--pin { color: var(--ink); border-color: var(--accent); }
.chip--pin strong { letter-spacing: 0.12em; font-size: 0.95rem; }

/* --- teacher panel ------------------------------------------------------- */

.desk { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

.desk__body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem);
    gap: 0.6rem;
    padding: 0.6rem;
}

.desk__map { height: 100%; }
.desk__mapwrap { position: relative; min-height: 0; height: 100%; }

.desk__strips { overflow-y: auto; display: flex; flex-direction: column; gap: 0.4rem; }

.strip {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.2rem 0.5rem;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--edge);
    border-left: 4px solid var(--accent);
    border-radius: 5px;
    background: var(--panel);
    cursor: pointer;
}

.strip--selected { border-color: #fff; border-left-color: var(--warn); }
.strip--lost { opacity: 0.55; }

.strip__head { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.strip__callsign { font-weight: 800; letter-spacing: 0.05em; }
.strip__type, .strip__leg { color: var(--ink-dim); font-size: 0.8rem; }
.strip__leg { color: var(--accent); }

.strip__data {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.7rem;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.strip__wrong { color: var(--alarm); font-weight: 700; }
.strip__alarm { color: #1a0000; background: var(--alarm); padding: 0 0.3rem; border-radius: 3px; font-weight: 700; }

.strip button {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--edge);
    border-radius: 5px;
    background: #1e242d;
    color: var(--ink);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.commands button.danger { margin-left: auto; border-color: var(--alarm); color: var(--alarm); }

@media (max-width: 800px) {
    .desk__body { grid-template-columns: 1fr; grid-template-rows: minmax(18rem, 1fr) auto; }
}

.map-line--history { stroke: #f2b807; stroke-width: 2; stroke-opacity: 0.8; }

/* IDENT: l'aereo lampeggia sulla mappa del docente; 7700/7600/7500 in rosso. */
.map-aircraft--ident .map-plane { animation: map-ident 0.5s steps(2, end) infinite; }
.map-aircraft--ident .map-plane path { fill: #fff; }
.map-aircraft--emergency .map-plane path { fill: #ff4d4d; }
.map-aircraft--emergency .map-tag { background: rgba(255, 77, 77, 0.9); color: #1a0000; }
@keyframes map-ident { 50% { opacity: 0.2; } }

.map-feature--waypoint .map-feature-dot { width: 10px; height: 10px; left: -5px; top: -5px; background: #d86bff; }
.map-feature--reposition .map-feature-dot { background: #f2b807; width: 18px; height: 18px; left: -9px; top: -9px; }
.map-feature--handle .map-feature-dot { background: #fff; border-radius: 2px; }
.map-line--reposition { stroke: #f2b807; stroke-width: 2; stroke-dasharray: 3 4; }

/* Vettore di velocità (1 minuto) e rosa dei venti del docente. */
.map-vector { stroke: #7ff0a8; stroke-opacity: 0.9; fill: none; }
.map-compass svg { width: 64px; height: 64px; display: block; }
.map-compass-ring { fill: rgba(11, 15, 20, 0.75); stroke: #e9eef5; stroke-width: 1.5; }
.map-compass-north { fill: #ff4d4d; }
.map-compass-south { fill: #e9eef5; }
.map-compass-east { fill: rgba(233, 238, 245, 0.35); }
.map-compass-n { fill: #fff; font: 800 9px system-ui, sans-serif; text-anchor: middle; }

/* Traffico virtuale: arancio, antincendio rosso, militare verde, droni viola. */
.map-aircraft--virtual .map-plane path, .map-aircraft--virtual .map-plane circle { fill: #ff9f43; }
.map-aircraft--virtual .map-tag { background: rgba(80, 40, 5, 0.85); color: #ffd6a8; }
.map-aircraft--icon-firehelicopter .map-plane path, .map-aircraft--icon-fireplane .map-plane path { fill: #ff5a3c; }
.map-aircraft--icon-military .map-plane path { fill: #9bbf6a; }
.map-aircraft--icon-drone .map-plane circle { fill: #c08cff; }
.map-plane .map-rotor { fill: none !important; stroke: #ffd6a8; stroke-width: 1.2; stroke-dasharray: 3 2; }
.map-plane .map-bucket { fill: #4da3ff !important; }
.map-drone-arms { stroke: #c08cff; stroke-width: 2; fill: none !important; }

/* Spazi aerei nell'editor dell'aeroporto. */
.map-line--airspace { stroke: #41b9a3; stroke-width: 2; fill: #41b9a3; fill-opacity: 0.06; stroke-dasharray: 8 5; }
.map-feature--airspace .map-feature-dot { background: #41b9a3; }

/* --- cartelli: i nomi del campo come la segnaletica di un aeroporto -------------------- */

.map-taxiway { stroke: #c9a91c; stroke-opacity: 0.9; fill: none; }
.map-feature--fixed .map-feature-dot { width: 10px; height: 10px; left: -5px; top: -5px; border-width: 1px; }

.map-sign-anchor { position: relative; }
.map-sign {
    position: absolute;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%) rotate(calc(var(--rotation, 0deg) + var(--map-counter, 0deg)));
    padding: 0 4px;
    border: 1px solid #10131a;
    border-radius: 2px;
    white-space: nowrap;
    font: 800 12px/1.35 system-ui, sans-serif;
    letter-spacing: 0.03em;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}
/* Raccordo: lettera nera su fondo giallo. */
.map-sign--taxiway { background: #f2d024; color: #10131a; }
/* Testata e punto attesa: bianco su rosso, come i cartelli obbligatori. */
.map-sign--runway, .map-sign--holding { background: #c8102e; color: #fff; }
.map-sign--reporting { background: #0b3d80; color: #fff; border-color: #fff; }
/* Accanto al punto, non sopra: il punto resta visibile e trascinabile. */
.map-sign--beside { transform-origin: 0 0; transform: rotate(var(--map-counter, 0deg)) translate(11px, -50%); }
/* Sotto lo zoom in cui la cosa si distingue il nome non c'è: la mappa resta pulita. */
.map-sign--hidden { visibility: hidden; }

/* Maniglia a metà di un tratto: trascinata aggiunge un vertice. */
.map-vertex--ghost { opacity: 0.55; border-style: dashed; border-radius: 50%; }
.map-vertex--ghost:hover { opacity: 1; }

/* Spazi aerei scaricati da openAIP nell'editor: in sola lettura, sotto quelli del docente. */
.map-line--openaip { stroke: #8fa3b6; stroke-width: 1; stroke-dasharray: 3 4; fill: #8fa3b6; fill-opacity: 0.03; }

/* --- spazi aerei: colori e tratti ispirati alle carte ICAO VFR, leggibili sul tema scuro ------ */
.map-airspace { fill-opacity: 0.06; }
.map-airspace--fir { stroke: #9aa7b4; stroke-width: 3; stroke-dasharray: 14 6 3 6; fill: none; }
.map-airspace--ctr { stroke: #4c93da; stroke-dasharray: 10 5; fill: #4c93da; fill-opacity: 0.12; }
.map-airspace--atz { stroke: #41b9a3; fill: #41b9a3; fill-opacity: 0.10; }
.map-airspace--tmacta { stroke: #8083e6; stroke-dasharray: 16 6; fill: #8083e6; fill-opacity: 0.05; }
.map-airspace--prohibited { stroke: #e0443e; stroke-width: 2; fill: url(#atc-hatch-prohibited); fill-opacity: 1; }
.map-airspace--restricted { stroke: #e0443e; stroke-width: 2; stroke-dasharray: 6 4; fill: url(#atc-hatch-restricted); fill-opacity: 1; }
.map-airspace--danger { stroke: #e89d48; stroke-width: 2; stroke-dasharray: 6 4; fill: url(#atc-hatch-danger); fill-opacity: 1; }
.map-airspace--rmztmz { stroke: #c995ff; stroke-dasharray: 3 5; fill: #c995ff; fill-opacity: 0.05; }
.map-airspace--other { stroke: #808e9b; stroke-dasharray: 2 6; fill: #808e9b; fill-opacity: 0.03; }
/* Lo spazio in cui un aereo sta per entrare: il docente lo vede subito. */
.map-airspace--highlighted { stroke: #ffb020; stroke-width: 4; stroke-dasharray: none; fill: #ffb020; fill-opacity: 0.18; animation: map-airspace-pulse 1.2s ease-in-out infinite; }
@keyframes map-airspace-pulse { 50% { stroke-opacity: 0.35; } }
/* Spento per la lezione: si vede appena. */
.map-airspace--inactive { stroke-opacity: 0.35; fill-opacity: 0.02; }

.map-airspace-label-anchor { position: relative; }
.map-airspace-label {
    position: absolute;
    transform: translate(-50%, -50%) rotate(var(--map-counter, 0deg));
    padding: 0 4px;
    border-radius: 3px;
    background: rgba(11, 15, 20, 0.72);
    color: #e9eef5;
    white-space: nowrap;
    font: 700 11px/1.4 system-ui, sans-serif;
}

/* La scheda di uno spazio aereo, sopra la mappa. */
.airspace-card {
    position: absolute;
    top: 0.6rem;
    left: 3.4rem;
    z-index: 1000;
    width: min(24rem, 70%);
    max-height: calc(100% - 1.2rem);
    overflow-y: auto;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--edge);
    border-radius: 6px;
    background: rgba(13, 17, 23, 0.96);
    font-size: 0.85rem;
}
.airspace-card__close { position: absolute; top: 0.3rem; right: 0.4rem; border: none; background: none; color: var(--ink-dim); cursor: pointer; font-size: 1rem; }
.airspace-card__item + .airspace-card__item { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--edge); }
.airspace-card__item h3 { margin: 0 1.2rem 0.3rem 0; font-size: 0.95rem; }
.airspace-card__item.is-inactive h3 { color: var(--ink-dim); text-decoration: line-through; }
.airspace-card dl { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.6rem; margin: 0; }
.airspace-card dt { color: var(--ink-dim); }
.airspace-card dd { margin: 0; }
.airspace-card__switch { display: flex; gap: 0.4rem; margin-top: 0.4rem; }
.airspace-card__minutes { width: 5rem; }

/* Il pannello degli spazi aerei nel pannello del docente. */
.airspace-panel { margin: 0 0 0.6rem; padding: 0.4rem 0.6rem; border: 1px solid var(--edge); border-radius: 6px; background: var(--panel); font-size: 0.85rem; }
.airspace-panel summary { cursor: pointer; font-weight: 600; }
.airspace-panel fieldset { margin: 0.4rem 0 0; padding: 0.3rem 0.5rem; border: 1px solid var(--edge); border-radius: 4px; display: flex; flex-wrap: wrap; gap: 0.2rem 0.7rem; }
.airspace-panel legend { color: var(--ink-dim); }
.airspace-panel input[type=number] { width: 5.5rem; }

/* --- mappa heading-up: la cornice ferma, dentro la mappa che gira ------------------------ */
.map-frame {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 16rem;
    overflow: hidden;
    border-radius: 6px;
    background: #1b222c;
}
.map.map--rotating {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    transform: rotate(var(--map-rotation, 0deg));
}
.map-frame > .leaflet-control-container { position: absolute; inset: 0; pointer-events: none; }
.map-frame > .leaflet-control-container .leaflet-control { pointer-events: auto; }
.map-north { display: none; width: 30px; height: 30px; border-radius: 50%; background: rgba(11, 15, 20, 0.8); }
.map-north svg { width: 100%; height: 100%; transform: rotate(var(--map-rotation, 0deg)); overflow: visible; }
.map-frame--heading-up .map-north { display: block; }

/* Gli strumenti dell'allievo sopra la mappa: Nord o prua in alto, livelli degli spazi aerei. */
.map-tools {
    position: absolute;
    right: 0.5rem;
    bottom: 1.6rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    font-size: 0.8rem;
}
.map-tools button { padding: 0.2rem 0.5rem; border: 1px solid var(--edge); border-radius: 4px; background: rgba(11, 15, 20, 0.85); color: var(--ink); font: inherit; cursor: pointer; }
.map-tools details { padding: 0.2rem 0.5rem; border: 1px solid var(--edge); border-radius: 4px; background: rgba(11, 15, 20, 0.9); max-width: 16rem; }
.map-tools summary { cursor: pointer; }
.map-tools label { display: block; white-space: nowrap; }

/* Gli avvisi degli spazi aerei nel pannello del docente e nelle strip. */
.airspace-alerts { margin: 0 0 0.6rem; padding: 0.3rem 0.6rem; border: 1px solid #ffb020; border-radius: 6px; background: rgba(255, 176, 32, 0.08); font-size: 0.85rem; }
.airspace-alert { margin: 0.15rem 0; }
.airspace-alert--inside { color: #ffcf70; font-weight: 600; }
.strip__airspaces { display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; margin-top: 0.2rem; font-size: 0.8rem; }
.strip__airspace { padding: 0 0.35rem; border-radius: 3px; background: rgba(255, 176, 32, 0.18); color: #ffcf70; }
.strip__airspace--inside { background: #ffb020; color: #10131a; font-weight: 700; }

/* Il riquadro fisso dell'allievo: lo spazio attuale e il prossimo. */
.routebox__airspace strong { font-weight: 700; }
.routebox__airspace--next { color: #ffcf70; }

/* Piazzali e parcheggi: il nome del piazzale scritto sul piazzale, il numero dello stallo accanto al punto. */
.map-sign--apron { background: transparent; color: #f2f2f2; border-color: transparent; text-shadow: 0 0 3px #000, 0 0 3px #000; font-weight: 600; }
.map-sign--stand { background: #1d1f24; color: #f2d024; border-color: #f2d024; }
.map-apron { fill: #8a8f99; fill-opacity: 0.35; stroke: #b9bec8; stroke-opacity: 0.8; }
.map-line--apron { stroke: #b9bec8; fill: #8a8f99; fill-opacity: 0.3; }
.map-feature--stand .map-feature-dot { background: #f2d024; border: 2px solid #1d1f24; border-radius: 50%; }
.map-line--stand-heading { stroke: #f2d024; stroke-dasharray: 3 3; }
.map-line--procedure { stroke: #ff9f43; stroke-width: 3; stroke-dasharray: 10 6; fill: none; }
.map-feature--procedure .map-feature-dot { background: #ff9f43; }

/* --- vento: manica a vento, riquadro dell'allievo, pannello del docente ------------------ */
.windsock { width: 48px; height: 48px; overflow: visible; transition: transform 0.35s ease-out; }
.windsock__seg { stroke: #3a1a0a; stroke-width: 0.4; }
.windsock__seg--red { fill: #ff6a1a; }
.windsock__seg--white { fill: #f4f4f4; }
.windsock__seg--limp { opacity: 0.35; }
.windsock__pole { fill: #1d1f24; stroke: #f4f4f4; stroke-width: 0.8; }
.map-windsock svg { position: absolute; left: -24px; top: -24px; }

.wind-card {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: calc(100% - 4rem);
    padding: 0.3rem 0.6rem 0.3rem 0.3rem;
    border: 1px solid var(--edge);
    border-radius: 6px;
    background: rgba(11, 15, 20, 0.88);
    color: #e9eef5;
    font-size: 0.8rem;
    pointer-events: none;
}
.wind-card__picture { position: relative; flex: 0 0 auto; width: 84px; height: 84px; }
.wind-card__picture > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wind-card__picture > svg.windsock { inset: 0; width: 84px; height: 84px; }
.windsock--card .windsock__seg { stroke: #000; stroke-width: 0.6; }
.wind-card__runway { fill: #3b4350; stroke: #9aa3ad; stroke-width: 0.6; }
.wind-card__centreline { stroke: #f4f4f4; stroke-width: 0.8; stroke-dasharray: 3 2.5; }
.wind-card__designator { fill: #f4f4f4; font: 700 7px/1 system-ui, sans-serif; text-anchor: middle; dominant-baseline: middle; }
.wind-card__words { display: flex; flex-direction: column; gap: 0.1rem; line-height: 1.25; font-size: 0.85rem; }
.wind-card__words strong { font-weight: 700; }

.wind-panel { margin-bottom: 0.6rem; }
.wind-panel h2 { display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; align-items: baseline; }
.wind-panel__now { font-size: 0.85rem; font-weight: 600; color: #7ff0a8; }
.wind-panel__body { display: flex; gap: 0.7rem; align-items: flex-start; }
.wind-panel__controls { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.wind-panel__controls input[type=number] { width: 4.6rem; }
.wind-panel__quick button.is-on { background: #1f6f43; border-color: #7ff0a8; color: #fff; }
.wind-rose { position: relative; flex: 0 0 96px; width: 96px; height: 96px; touch-action: none; }
.wind-rose svg { width: 100%; height: 100%; }
.wind-rose__pad { position: absolute; inset: 0; cursor: crosshair; }
.wind-rose__ring { fill: #10151c; stroke: #5b6573; stroke-width: 1.5; }
.wind-rose__cardinal { fill: #9aa3ad; font: 700 10px/1 system-ui, sans-serif; text-anchor: middle; }
.wind-rose__arrow { stroke: #7ff0a8; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wind-rose__handle { fill: #7ff0a8; stroke: #0b0f14; stroke-width: 1.5; }
.map-feature--windsock .map-feature-dot { background: #ff6a1a; border-radius: 2px 50% 50% 2px; }
.map-feature--windsock-default .map-feature-dot { background: transparent; border: 2px dashed #ff6a1a; border-radius: 2px 50% 50% 2px; }
@media (max-height: 520px) and (orientation: landscape) {
    .wind-card { padding: 0.2rem 0.4rem 0.2rem 0.2rem; gap: 0.3rem; }
    .wind-card__picture, .wind-card__picture > svg.windsock { width: 52px; height: 52px; }
    .wind-card__words { font-size: 0.72rem; }
}

/* --- allievi e virtuali ben distinti: rombo e marca VIRT, legenda ---------------------------- */
.map-aircraft--virtual::before {
    content: "";
    position: absolute;
    left: -12px;
    top: -12px;
    width: 24px;
    height: 24px;
    border: 1.5px dashed #ff9f43;
    transform: rotate(45deg);
    pointer-events: none;
}
.map-aircraft--virtual .map-callsign::after {
    content: "VIRT";
    margin-left: 4px;
    padding: 0 3px;
    border-radius: 2px;
    background: #ff9f43;
    color: #2a1400;
    font-size: 9px;
    font-weight: 800;
}
.map-intent { color: #ffd6a8; font-weight: 600; }
.map-intent:empty { display: none; }
.map-legend {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 3px 6px;
    border-radius: 4px;
    background: rgba(11, 15, 20, 0.8);
    color: #e9eef5;
    font: 600 11px/1.3 system-ui, sans-serif;
}
.map-legend__item { display: flex; align-items: center; gap: 5px; }
.map-legend__mark { width: 10px; height: 10px; border-radius: 50%; background: #4da3ff; }
.map-legend__item--own .map-legend__mark { background: #f2b807; }
.map-legend__item--virtual .map-legend__mark { border-radius: 1px; transform: rotate(45deg) scale(0.85); background: #ff9f43; outline: 1.5px dashed #ff9f43; outline-offset: 1px; }
.map-line--prediction { stroke: #ff9f43; stroke-width: 2; stroke-dasharray: 6 6; fill: none; opacity: 0.85; }
.virt-badge { margin-left: 4px; padding: 0 3px; border-radius: 2px; background: #ff9f43; color: #2a1400; font-size: 0.65rem; font-weight: 800; vertical-align: middle; }
