/* VIPTrack mobile operations UI
 * Shared visual system derived from the checked-in ImageGen references in
 * assets/mockups/. Desktop behavior is preserved; mobile pages are promoted
 * from utility sheets into first-class workspaces.
 */

:root {
    --bg: #07111f;
    --bg-panel: rgba(8, 22, 38, 0.95);
    --bg-darker: rgba(3, 12, 23, 0.76);
    --border: rgba(126, 160, 201, 0.22);
    --text: #f4f7fb;
    --text-dim: #b8c5d8;
    --text-muted: #8494ac;
    --accent: #21d4b4;
    --accent-orange: #f5b942;
    --selected: #66f5dc;
    --success: #4ade80;
    --military: #31d7bb;
    --gov: #a17af5;
    --police: #60a5fa;
    --medical: #ff5364;
    --historic: #f5b942;
    --pia: #ec4899;
    --vip: #fbbf24;
    --ops-surface: rgba(9, 25, 43, 0.94);
    --ops-surface-raised: rgba(13, 34, 56, 0.96);
    --ops-line: rgba(126, 160, 201, 0.28);
    --ops-glow: rgba(33, 212, 180, 0.2);
}

.mobile-app-bar,
.mobile-map-stats,
.mobile-map-tools,
.mobile-map-peek,
.mobile-settings-hero,
.mobile-settings-privacy {
    display: none;
}

@media (max-width: 767.98px), (pointer: coarse) and (max-height: 767.98px) {
    :root {
        --mobile-app-bar-height: 58px;
        --mobile-map-toolbar-height: 104px;
        --mobile-nav-height: 78px;
        --mobile-nav-gap: 8px;
        --mobile-safe-bottom: max(var(--mobile-nav-gap), env(safe-area-inset-bottom, 0px));
        --mobile-nav-clearance: calc(var(--mobile-nav-height) + var(--mobile-safe-bottom) + var(--mobile-nav-gap));
    }

    html,
    body.mobile-view {
        background: #07111f;
        color: var(--text);
    }

    body.mobile-view::after {
        content: '';
        position: fixed;
        inset: 0;
        z-index: 0;
        pointer-events: none;
        background:
            radial-gradient(circle at 18% 4%, rgba(33, 212, 180, 0.08), transparent 30%),
            radial-gradient(circle at 92% 38%, rgba(82, 130, 190, 0.08), transparent 34%);
    }

    .mobile-app-bar {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 2550;
        height: var(--mobile-app-bar-height);
        padding: max(8px, env(safe-area-inset-top)) 14px 8px;
        display: flex;
        align-items: center;
        gap: 10px;
        background: rgba(4, 14, 26, 0.96);
        border-bottom: 1px solid var(--ops-line);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
        backdrop-filter: blur(18px) saturate(140%);
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        min-width: 0;
        gap: 8px;
        color: var(--text);
        font-size: 19px;
        font-weight: 760;
        letter-spacing: -0.45px;
    }

    .mobile-brand img {
        width: 34px;
        height: 34px;
        object-fit: contain;
        border-radius: 10px;
        filter: drop-shadow(0 0 10px rgba(33, 212, 180, 0.18));
    }

    .mobile-brand strong {
        color: var(--accent);
        font-weight: 800;
    }

    .mobile-live-status {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-left: auto;
        padding: 5px 8px;
        color: #74f5a6;
        font-size: 10px;
        font-weight: 760;
        letter-spacing: 0.08em;
    }

    .mobile-live-status::before {
        content: '';
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #56ef8f;
        box-shadow: 0 0 0 5px rgba(86, 239, 143, 0.08), 0 0 10px rgba(86, 239, 143, 0.64);
    }

    .mobile-live-status.stale {
        color: #f5b942;
    }

    .mobile-live-status.stale::before {
        background: #f5b942;
        box-shadow: 0 0 0 5px rgba(245, 185, 66, 0.08), 0 0 10px rgba(245, 185, 66, 0.5);
    }

    .mobile-live-status.offline {
        color: var(--danger);
    }

    .mobile-live-status.offline::before {
        background: var(--danger);
        box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.08), 0 0 10px rgba(239, 68, 68, 0.5);
    }

    .mobile-app-utility {
        width: 36px;
        height: 36px;
        min-width: 36px !important;
        min-height: 36px !important;
        display: grid;
        place-items: center;
        color: var(--text-dim);
        background: rgba(255, 255, 255, 0.025);
        border: 1px solid var(--ops-line);
        border-radius: 50%;
    }

    .mobile-app-utility svg {
        width: 19px;
        height: 19px;
    }

    body.mobile-view .header {
        display: none !important;
    }

    body.mobile-view .filter-bar {
        position: fixed !important;
        top: var(--mobile-app-bar-height) !important;
        right: 0 !important;
        left: 0 !important;
        z-index: 2200 !important;
        width: 100% !important;
        height: var(--mobile-map-toolbar-height) !important;
        max-width: none !important;
        padding: 10px 12px 9px !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: 43px 34px !important;
        gap: 8px !important;
        overflow: visible !important;
        transform: none !important;
        border: 0 !important;
        border-bottom: 1px solid var(--ops-line) !important;
        border-radius: 0 !important;
        background: rgba(5, 16, 29, 0.94) !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18) !important;
        backdrop-filter: blur(18px) saturate(140%);
    }

    body.mobile-view .filter-bar > .logo,
    body.mobile-view .filter-bar > .connectivity-indicator,
    body.mobile-view .filter-bar > .filter-divider {
        display: none !important;
    }

    body.mobile-view .filter-bar .search-container {
        width: 100%;
        min-width: 0;
        grid-row: 1;
    }

    body.mobile-view .filter-bar .search-input-wrapper {
        width: 100%;
        height: 43px;
        padding: 0 5px 0 13px;
        gap: 4px;
        border: 1px solid var(--ops-line);
        border-radius: 14px;
        background: linear-gradient(145deg, rgba(15, 35, 57, 0.96), rgba(8, 24, 42, 0.96));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    }

    body.mobile-view .filter-bar .search-input-wrapper:focus-within {
        border-color: rgba(33, 212, 180, 0.66);
        box-shadow: 0 0 0 3px rgba(33, 212, 180, 0.1);
    }

    body.mobile-view .filter-bar .search-icon {
        width: 18px;
        height: 18px;
        color: #9bb0ca;
    }

    body.mobile-view .filter-bar .search-box,
    body.mobile-view .filter-bar .search-box:focus {
        width: 100% !important;
        min-width: 0;
        height: 41px;
        padding: 0 7px;
        font-size: 13px;
    }

    body.mobile-view .filter-bar .search-filter-btn {
        width: 34px;
        height: 34px;
        min-width: 34px !important;
        min-height: 34px !important;
        color: var(--accent);
        border-radius: 10px;
        background: rgba(33, 212, 180, 0.08);
    }

    body.mobile-view .filter-bar > [role='radiogroup'] {
        grid-row: 2;
        display: flex !important;
        align-items: center;
        gap: 7px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    body.mobile-view .filter-bar > [role='radiogroup']::-webkit-scrollbar {
        display: none;
    }

    body.mobile-view .filter-bar .filter-btn {
        min-width: auto !important;
        min-height: 32px !important;
        height: 32px;
        padding: 0 13px !important;
        flex: 0 0 auto;
        border: 1px solid var(--ops-line) !important;
        border-radius: 16px !important;
        color: var(--text-dim) !important;
        background: rgba(9, 26, 45, 0.82) !important;
        font-size: 11px !important;
        font-weight: 650;
        box-shadow: none !important;
    }

    body.mobile-view .filter-bar .filter-btn.active {
        color: #eafffb !important;
        border-color: rgba(33, 212, 180, 0.76) !important;
        background: linear-gradient(135deg, rgba(18, 137, 121, 0.78), rgba(25, 182, 157, 0.5)) !important;
        box-shadow: 0 0 18px rgba(33, 212, 180, 0.12) !important;
    }

    body.mobile-view .filter-bar .filter-btn.vip-btn.active {
        color: #eafffb !important;
    }

    body.mobile-view .filter-bar .filter-btn .count {
        color: inherit;
        opacity: 0.72;
    }

    body.mobile-view .search-dropdown {
        top: calc(var(--mobile-app-bar-height) + 53px) !important;
        right: 12px !important;
        left: 12px !important;
        width: auto !important;
        max-height: calc(100vh - 240px);
        border: 1px solid var(--ops-line) !important;
        border-radius: 14px !important;
        background: rgba(7, 21, 37, 0.99) !important;
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.54) !important;
    }

    body.mobile-view #map,
    body.mobile-view #webglMap,
    body.mobile-view #globe3d {
        top: calc(var(--mobile-app-bar-height) + var(--mobile-map-toolbar-height)) !important;
        right: 0 !important;
        bottom: var(--mobile-nav-clearance) !important;
        left: 0 !important;
    }

    body.mobile-view .leaflet-container {
        background: #08192a !important;
    }

    body.mobile-view .leaflet-control-container .leaflet-top.leaflet-right {
        top: 72px;
    }

    body.mobile-view .mobile-map-stats {
        position: fixed;
        top: calc(var(--mobile-app-bar-height) + var(--mobile-map-toolbar-height) + 12px);
        left: 12px;
        z-index: 1320;
        height: 34px;
        padding: 0 12px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        color: var(--text-dim);
        border: 1px solid var(--ops-line);
        border-radius: 17px;
        background: rgba(7, 22, 39, 0.92);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
        backdrop-filter: blur(14px);
        font-size: 11px;
        pointer-events: none;
    }

    .mobile-map-stats svg {
        width: 15px;
        height: 15px;
        color: var(--accent);
    }

    .mobile-map-stats strong {
        color: var(--accent);
        font-size: 14px;
    }

    body.mobile-view .mobile-map-tools {
        position: fixed;
        top: calc(var(--mobile-app-bar-height) + var(--mobile-map-toolbar-height) + 56px);
        right: 12px;
        z-index: 1320;
        display: flex;
        flex-direction: column;
        padding: 5px;
        border: 1px solid var(--ops-line);
        border-radius: 17px;
        background: rgba(7, 22, 39, 0.93);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(14px);
    }

    .mobile-map-tool {
        width: 38px;
        height: 38px;
        min-width: 38px !important;
        min-height: 38px !important;
        display: grid;
        place-items: center;
        color: var(--text-dim);
        border: 0;
        border-radius: 12px;
        background: transparent;
    }

    .mobile-map-tool + .mobile-map-tool {
        border-top: 1px solid rgba(126, 160, 201, 0.16);
        border-radius: 0 0 12px 12px;
    }

    .mobile-map-tool.active,
    .mobile-map-tool:active {
        color: var(--accent);
        background: rgba(33, 212, 180, 0.1);
    }

    .mobile-map-tool svg {
        width: 19px;
        height: 19px;
    }

    body.mobile-view .mobile-map-peek {
        position: fixed;
        right: 12px;
        bottom: calc(var(--mobile-nav-clearance) + 10px);
        left: 12px;
        z-index: 1380;
        min-height: 112px;
        padding: 14px;
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        gap: 10px 12px;
        color: var(--text);
        border: 1px solid rgba(126, 160, 201, 0.34);
        border-radius: 18px;
        background: linear-gradient(145deg, rgba(13, 34, 56, 0.97), rgba(6, 20, 36, 0.98));
        box-shadow: 0 18px 48px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.035);
        backdrop-filter: blur(18px) saturate(140%);
    }

    .mobile-map-peek.is-empty {
        min-height: 70px;
        grid-template-rows: auto;
        align-items: center;
    }

    .mobile-peek-icon {
        width: 44px;
        height: 44px;
        grid-row: 1 / span 2;
        display: grid;
        place-items: center;
        color: var(--accent);
        border: 1px solid rgba(33, 212, 180, 0.5);
        border-radius: 50%;
        background: rgba(33, 212, 180, 0.06);
    }

    .mobile-peek-icon svg {
        width: 25px;
        height: 25px;
    }

    .mobile-peek-identity {
        min-width: 0;
    }

    .mobile-peek-callsign {
        overflow: hidden;
        color: #fff;
        font-size: 16px;
        font-weight: 780;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-peek-meta,
    .mobile-peek-route {
        overflow: hidden;
        color: var(--text-muted);
        font-size: 10px;
        line-height: 1.45;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-peek-meta {
        color: var(--accent);
        font-weight: 650;
    }

    .mobile-peek-watch {
        width: 36px;
        height: 36px;
        min-width: 36px !important;
        min-height: 36px !important;
        display: grid;
        place-items: center;
        color: var(--text-muted);
        border: 1px solid var(--ops-line);
        border-radius: 11px;
        background: rgba(255, 255, 255, 0.025);
    }

    .mobile-peek-watch.watched {
        color: var(--vip);
        border-color: rgba(251, 191, 36, 0.46);
        background: rgba(251, 191, 36, 0.08);
    }

    .mobile-peek-watch svg {
        width: 19px;
        height: 19px;
    }

    .mobile-peek-metrics {
        grid-column: 2 / span 2;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding-top: 8px;
        border-top: 1px solid rgba(126, 160, 201, 0.18);
    }

    .mobile-peek-metric {
        min-width: 0;
        padding: 0 7px;
        text-align: center;
        border-right: 1px solid rgba(126, 160, 201, 0.16);
    }

    .mobile-peek-metric:first-child {
        padding-left: 0;
    }

    .mobile-peek-metric:last-child {
        padding-right: 0;
        border-right: 0;
    }

    .mobile-peek-metric strong,
    .mobile-peek-metric span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-peek-metric strong {
        color: #f8fbff;
        font-size: 12px;
    }

    .mobile-peek-metric span {
        margin-top: 2px;
        color: var(--text-muted);
        font-size: 8px;
        font-weight: 700;
        letter-spacing: 0.08em;
    }

    body.mobile-view .mobile-bottom-nav {
        position: fixed;
        right: 10px;
        bottom: var(--mobile-safe-bottom);
        left: 10px;
        z-index: 2700;
        width: auto;
        height: var(--mobile-nav-height);
        padding: 6px;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        border: 1px solid rgba(126, 160, 201, 0.3);
        border-radius: 22px;
        background: linear-gradient(145deg, rgba(12, 31, 52, 0.97), rgba(5, 18, 33, 0.98));
        box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.035);
        backdrop-filter: blur(22px) saturate(150%);
    }

    body.mobile-view .nav-item {
        position: relative;
        min-width: 0 !important;
        min-height: 0 !important;
        height: 64px;
        padding: 7px 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: #8fa1bb;
        border: 1px solid transparent;
        border-radius: 17px;
        background: transparent;
        transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
    }

    body.mobile-view .nav-item.active {
        color: #63f2d8;
        border-color: rgba(33, 212, 180, 0.36);
        background: linear-gradient(145deg, rgba(19, 127, 115, 0.54), rgba(12, 77, 75, 0.56));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 20px rgba(0, 0, 0, 0.16);
    }

    body.mobile-view .nav-item:active {
        transform: scale(0.97);
    }

    body.mobile-view .nav-item svg {
        width: 23px;
        height: 23px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    body.mobile-view .nav-item span {
        font-size: 10px;
        font-weight: 650;
    }

    body.mobile-view .mobile-fab {
        right: 18px;
        bottom: calc(var(--mobile-nav-clearance) + 132px) !important;
        z-index: 1390;
        width: 46px;
        height: 46px;
        min-width: 46px !important;
        min-height: 46px !important;
        color: #eafffb;
        border: 1px solid rgba(98, 245, 220, 0.8);
        background: linear-gradient(145deg, #22cdb1, #117b77);
        box-shadow: 0 0 0 5px rgba(33, 212, 180, 0.08), 0 12px 28px rgba(0, 0, 0, 0.36);
    }

    body:not(.mobile-panel-map) .mobile-map-stats,
    body:not(.mobile-panel-map) .mobile-map-tools,
    body:not(.mobile-panel-map) .mobile-map-peek,
    body:not(.mobile-panel-map) .mobile-fab,
    body:not(.mobile-panel-map) .filter-bar {
        display: none !important;
    }

    body.mobile-view .bottom-sheet.mobile-page-panel,
    body.mobile-view #settingsPanel.bottom-sheet {
        position: fixed !important;
        inset: var(--mobile-app-bar-height) 0 var(--mobile-nav-clearance) 0 !important;
        z-index: 1800 !important;
        width: 100% !important;
        height: auto !important;
        max-width: none !important;
        max-height: none !important;
        padding: 0 !important;
        display: flex;
        flex-direction: column;
        visibility: visible;
        overflow: hidden;
        border: 0 !important;
        border-radius: 0 !important;
        background: linear-gradient(180deg, rgba(5, 17, 31, 0.99), rgba(7, 20, 35, 0.99)) !important;
        box-shadow: none !important;
        transition: opacity 150ms ease, transform 180ms ease !important;
    }

    body.mobile-view .bottom-sheet.mobile-page-panel.collapsed,
    body.mobile-view #settingsPanel.bottom-sheet.collapsed {
        height: auto !important;
        visibility: hidden !important;
        opacity: 0;
        pointer-events: none;
        transform: translateY(10px);
    }

    body.mobile-view .bottom-sheet.mobile-page-panel.expanded,
    body.mobile-view #settingsPanel.bottom-sheet.expanded {
        visibility: visible !important;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    body.mobile-view .mobile-page-panel > .sheet-handle,
    body.mobile-view #settingsPanel.bottom-sheet > .sheet-handle {
        display: none;
    }

    .mobile-page-heading {
        flex: 0 0 auto;
        padding: 22px 16px 10px;
    }

    .mobile-page-heading-row {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    .mobile-page-title {
        color: #fff;
        font-size: clamp(26px, 8vw, 34px);
        font-weight: 790;
        letter-spacing: -0.04em;
        line-height: 1;
    }

    .mobile-page-subtitle {
        margin-top: 6px;
        color: var(--text-muted);
        font-size: 12px;
        line-height: 1.45;
    }

    .mobile-page-count {
        margin-top: 8px;
        color: var(--accent);
        font-size: 17px;
        font-weight: 720;
    }

    .mobile-page-updated {
        margin-top: 2px;
        color: var(--text-muted);
        font-size: 10px;
    }

    .mobile-search-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 42px;
        gap: 8px;
        margin-top: 16px;
    }

    .mobile-search-control {
        height: 42px;
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 0 12px;
        border: 1px solid var(--ops-line);
        border-radius: 13px;
        background: linear-gradient(145deg, rgba(15, 35, 57, 0.96), rgba(8, 24, 42, 0.96));
    }

    .mobile-search-control svg {
        width: 18px;
        height: 18px;
        flex: 0 0 auto;
        color: #9bb0ca;
    }

    .mobile-search-control input {
        width: 100%;
        min-width: 0;
        color: var(--text);
        border: 0;
        outline: 0;
        background: transparent;
        font: inherit;
        font-size: 13px;
    }

    .mobile-search-control input::placeholder {
        color: var(--text-muted);
    }

    .mobile-filter-square,
    .mobile-outline-btn {
        min-width: 42px !important;
        min-height: 42px !important;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        color: var(--accent);
        border: 1px solid var(--ops-line);
        border-radius: 13px;
        background: rgba(11, 29, 49, 0.9);
        font-size: 11px;
        font-weight: 700;
    }

    .mobile-filter-square svg,
    .mobile-outline-btn svg {
        width: 18px;
        height: 18px;
    }

    .mobile-filter-chips {
        margin-top: 10px;
        display: flex;
        gap: 7px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .mobile-filter-chips::-webkit-scrollbar {
        display: none;
    }

    .mobile-filter-chip {
        min-width: 0 !important;
        min-height: 32px !important;
        height: 32px;
        padding: 0 13px;
        flex: 0 0 auto;
        color: var(--text-dim);
        border: 1px solid var(--ops-line);
        border-radius: 16px;
        background: rgba(9, 26, 45, 0.82);
        font-size: 11px;
        font-weight: 650;
    }

    .mobile-filter-chip.active {
        color: #effffc;
        border-color: rgba(33, 212, 180, 0.74);
        background: linear-gradient(135deg, rgba(18, 137, 121, 0.78), rgba(25, 182, 157, 0.5));
    }

    .mobile-list-sortbar {
        flex: 0 0 auto;
        min-height: 42px;
        margin: 0 16px 8px;
        padding: 0 4px;
        display: flex;
        align-items: center;
        gap: 10px;
        color: var(--text-muted);
        font-size: 9px;
        font-weight: 720;
        letter-spacing: 0.08em;
    }

    .mobile-list-sortbar select {
        height: 36px;
        margin-right: auto;
        padding: 0 30px 0 11px;
        color: var(--text-dim);
        border: 1px solid var(--ops-line);
        border-radius: 11px;
        background: rgba(9, 26, 45, 0.9);
        font-size: 11px;
        font-weight: 650;
    }

    body.mobile-view .mobile-page-panel .sheet-content {
        min-height: 0;
        flex: 1 1 auto;
        padding: 0 12px 18px;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: none;
    }

    body.mobile-view .mobile-page-panel .sheet-content::-webkit-scrollbar {
        display: none;
    }

    body.mobile-view .list-aircraft-item {
        position: relative;
        min-height: 96px;
        margin-bottom: 8px;
        padding: 13px 34px 13px 13px;
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr) auto;
        grid-template-rows: auto auto auto;
        align-items: center;
        gap: 2px 11px;
        overflow: hidden;
        border: 1px solid var(--ops-line);
        border-radius: 16px;
        background: linear-gradient(145deg, rgba(12, 32, 53, 0.95), rgba(6, 22, 39, 0.96));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    }

    body.mobile-view .list-aircraft-item::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 4px;
        background: var(--category-color, var(--accent));
        box-shadow: 0 0 18px color-mix(in srgb, var(--category-color, var(--accent)) 45%, transparent);
    }

    body.mobile-view .list-aircraft-item.category-military { --category-color: var(--military); }
    body.mobile-view .list-aircraft-item.category-government { --category-color: var(--gov); }
    body.mobile-view .list-aircraft-item.category-vip { --category-color: var(--vip); }
    body.mobile-view .list-aircraft-item.category-medical { --category-color: var(--medical); }
    body.mobile-view .list-aircraft-item.category-police { --category-color: var(--police); }

    body.mobile-view .list-ac-icon {
        width: 48px;
        height: 48px;
        grid-row: 1 / span 3;
        display: grid;
        place-items: center;
        color: var(--category-color, var(--accent));
        border: 1px solid color-mix(in srgb, var(--category-color, var(--accent)) 55%, transparent);
        border-radius: 50%;
        background: color-mix(in srgb, var(--category-color, var(--accent)) 7%, transparent);
    }

    body.mobile-view .list-ac-icon svg {
        width: 27px;
        height: 27px;
    }

    body.mobile-view .list-ac-info {
        min-width: 0;
        grid-column: 2;
        grid-row: 1 / span 3;
        align-self: center;
    }

    body.mobile-view .list-ac-title-row {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    body.mobile-view .list-ac-callsign {
        overflow: hidden;
        color: #fff;
        font-size: 15px;
        font-weight: 780;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .list-ac-watch-badge {
        padding: 2px 5px;
        color: var(--accent);
        border: 1px solid rgba(33, 212, 180, 0.5);
        border-radius: 6px;
        font-size: 7px;
        font-weight: 800;
        letter-spacing: 0.06em;
    }

    body.mobile-view .list-ac-detail,
    body.mobile-view .list-ac-route,
    body.mobile-view .list-ac-distance {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.mobile-view .list-ac-detail {
        margin-top: 2px;
        color: var(--category-color, var(--accent));
        font-size: 10px;
        font-weight: 650;
    }

    body.mobile-view .list-ac-route {
        margin-top: 2px;
        color: var(--text-dim);
        font-size: 10px;
    }

    body.mobile-view .list-ac-distance {
        margin-top: 4px;
        color: var(--category-color, var(--accent));
        font-size: 9px;
    }

    body.mobile-view .list-ac-data {
        grid-column: 3;
        grid-row: 1 / span 3;
        align-self: center;
        text-align: right;
    }

    body.mobile-view .list-ac-alt {
        color: #f5f8fc;
        font-size: 13px;
        font-weight: 720;
        white-space: nowrap;
    }

    body.mobile-view .list-ac-speed {
        margin-top: 3px;
        color: var(--text-muted);
        font-size: 11px;
    }

    .list-ac-chevron {
        position: absolute;
        top: 50%;
        right: 10px;
        color: #879ab4;
        font-size: 20px;
        transform: translateY(-50%);
    }

    .mobile-list-note,
    .mobile-privacy-note {
        min-height: 42px;
        margin-top: 4px;
        padding: 9px 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: var(--text-muted);
        border: 1px solid var(--ops-line);
        border-radius: 13px;
        background: rgba(10, 28, 47, 0.64);
        font-size: 10px;
        text-align: center;
    }

    .mobile-list-empty {
        margin-top: 16px;
        padding: 42px 22px;
        color: var(--text-muted);
        border: 1px dashed var(--ops-line);
        border-radius: 18px;
        text-align: center;
        line-height: 1.6;
    }

    .mobile-list-empty strong {
        display: block;
        margin-bottom: 4px;
        color: var(--text-dim);
        font-size: 14px;
    }

    .watch-overview {
        margin-top: 16px;
        padding: 14px 8px;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border: 1px solid var(--ops-line);
        border-radius: 16px;
        background: linear-gradient(145deg, rgba(13, 34, 56, 0.88), rgba(7, 23, 40, 0.9));
    }

    .watch-stat {
        min-width: 0;
        text-align: center;
        border-right: 1px solid rgba(126, 160, 201, 0.2);
    }

    .watch-stat:last-child {
        border-right: 0;
    }

    .watch-stat strong,
    .watch-stat span {
        display: block;
    }

    .watch-stat strong {
        color: var(--accent);
        font-size: 22px;
        line-height: 1.1;
    }

    .watch-stat.alert strong {
        color: var(--vip);
    }

    .watch-stat span {
        margin-top: 4px;
        color: var(--text-muted);
        font-size: 9px;
    }

    .watch-segmented {
        margin-top: 12px;
        padding: 4px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        border: 1px solid var(--ops-line);
        border-radius: 14px;
        background: rgba(9, 25, 43, 0.84);
    }

    .watch-segment {
        min-width: 0 !important;
        min-height: 36px !important;
        color: var(--text-muted);
        border: 1px solid transparent;
        border-radius: 11px;
        background: transparent;
        font-size: 11px;
        font-weight: 700;
    }

    .watch-segment.active {
        color: #effffc;
        border-color: rgba(33, 212, 180, 0.52);
        background: linear-gradient(135deg, rgba(18, 137, 121, 0.78), rgba(25, 182, 157, 0.5));
    }

    .watch-section-heading {
        margin: 14px 2px 9px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .watch-section-heading h2 {
        color: #f7f9fc;
        font-size: 16px;
        font-weight: 750;
    }

    body.mobile-view #watchlistSheet .watchlist-items {
        max-height: none;
        overflow: visible;
        scrollbar-width: none;
    }

    .watch-card {
        position: relative;
        min-height: 128px;
        margin-bottom: 8px;
        padding: 13px;
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        gap: 10px 11px;
        border: 1px solid var(--ops-line);
        border-radius: 16px;
        background: linear-gradient(145deg, rgba(13, 34, 56, 0.94), rgba(7, 23, 40, 0.96));
    }

    .watch-card-icon {
        width: 48px;
        height: 48px;
        display: grid;
        place-items: center;
        color: var(--watch-color, var(--accent));
        border: 1px solid color-mix(in srgb, var(--watch-color, var(--accent)) 52%, transparent);
        border-radius: 50%;
        background: color-mix(in srgb, var(--watch-color, var(--accent)) 7%, transparent);
    }

    .watch-card-icon svg {
        width: 27px;
        height: 27px;
    }

    .watch-card-main {
        min-width: 0;
    }

    .watch-card-name {
        overflow: hidden;
        color: #fff;
        font-size: 15px;
        font-weight: 780;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .watch-card-detail,
    .watch-card-route {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .watch-card-detail {
        margin-top: 2px;
        color: var(--watch-color, var(--accent));
        font-size: 10px;
        font-weight: 650;
    }

    .watch-card-status {
        display: inline-block;
        margin-top: 5px;
        padding: 2px 5px;
        color: #9df3b3;
        border-radius: 5px;
        background: rgba(50, 160, 86, 0.2);
        font-size: 7px;
        font-weight: 800;
        letter-spacing: 0.06em;
    }

    .watch-card-status.offline {
        color: var(--text-muted);
        background: rgba(128, 146, 169, 0.1);
    }

    .watch-card-route {
        margin-top: 4px;
        color: var(--text-dim);
        font-size: 10px;
    }

    .watch-card-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 7px;
    }

    .watch-remove-btn {
        width: 30px;
        height: 30px;
        min-width: 30px !important;
        min-height: 30px !important;
        color: var(--vip);
        border: 0;
        background: transparent;
    }

    .watch-remove-btn svg {
        width: 22px;
        height: 22px;
        fill: currentColor;
    }

    .watch-alert-toggle {
        position: relative;
        width: 38px;
        height: 22px;
        min-width: 38px !important;
        min-height: 22px !important;
        border: 1px solid rgba(33, 212, 180, 0.56);
        border-radius: 11px;
        background: rgba(33, 212, 180, 0.72);
    }

    .watch-alert-toggle::after {
        content: '';
        position: absolute;
        top: 2px;
        right: 2px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #f7fbff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
    }

    .watch-alert-toggle.off {
        border-color: var(--ops-line);
        background: rgba(111, 132, 159, 0.26);
    }

    .watch-alert-toggle.off::after {
        right: 18px;
    }

    .watch-toggle-label {
        color: var(--text-muted);
        font-size: 8px;
        white-space: nowrap;
    }

    .watch-card-metrics {
        grid-column: 1 / span 3;
        display: grid;
        grid-template-columns: 1fr 1fr 1.4fr;
        gap: 0;
        padding-top: 9px;
        color: var(--text-dim);
        border-top: 1px solid rgba(126, 160, 201, 0.18);
        font-size: 10px;
    }

    .watch-card-metrics span {
        padding: 0 8px;
        overflow: hidden;
        border-right: 1px solid rgba(126, 160, 201, 0.16);
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .watch-card-metrics span:first-child {
        padding-left: 0;
    }

    .watch-card-metrics span:last-child {
        padding-right: 0;
        color: var(--watch-color, var(--accent));
        border-right: 0;
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        letter-spacing: -0.08em;
    }

    .watch-activity-card {
        overflow: hidden;
        border: 1px solid var(--ops-line);
        border-radius: 15px;
        background: rgba(10, 29, 49, 0.76);
    }

    .watch-activity-item {
        min-height: 54px;
        padding: 10px 12px;
        display: grid;
        grid-template-columns: 30px minmax(0, 1fr) auto;
        align-items: center;
        gap: 9px;
    }

    .watch-activity-item + .watch-activity-item {
        border-top: 1px solid rgba(126, 160, 201, 0.16);
    }

    .watch-activity-icon {
        width: 30px;
        height: 30px;
        display: grid;
        place-items: center;
        color: var(--activity-color, var(--accent));
        border: 1px solid color-mix(in srgb, var(--activity-color, var(--accent)) 55%, transparent);
        border-radius: 50%;
    }

    .watch-activity-copy {
        min-width: 0;
        color: var(--text-dim);
        font-size: 10px;
        line-height: 1.35;
    }

    .watch-activity-copy strong {
        color: #f5f8fc;
        font-weight: 700;
    }

    .watch-activity-time {
        color: var(--text-muted);
        font-size: 9px;
        white-space: nowrap;
    }

    body.mobile-view #settingsPanel.bottom-sheet {
        display: block !important;
        padding: 0 12px 20px !important;
        overflow-y: auto !important;
        overscroll-behavior: contain;
        scrollbar-width: none;
    }

    body.mobile-view #settingsPanel.bottom-sheet::-webkit-scrollbar {
        display: none;
    }

    body.mobile-view #settingsPanel .settings-title {
        display: none;
    }

    .mobile-settings-hero {
        display: block;
        position: sticky;
        top: 0;
        z-index: 4;
        margin: 0 -12px 10px;
        padding: 20px 16px 11px;
        background: linear-gradient(180deg, #05111f 82%, rgba(5, 17, 31, 0));
    }

    .mobile-settings-hero .mobile-page-title {
        margin-bottom: 0;
    }

    .mobile-settings-search {
        height: 42px;
        margin-top: 15px;
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 0 12px;
        border: 1px solid var(--ops-line);
        border-radius: 13px;
        background: linear-gradient(145deg, rgba(15, 35, 57, 0.96), rgba(8, 24, 42, 0.96));
    }

    .mobile-settings-search svg {
        width: 18px;
        height: 18px;
        color: #9bb0ca;
    }

    .mobile-settings-search input {
        width: 100%;
        color: var(--text);
        border: 0;
        outline: 0;
        background: transparent;
        font: inherit;
        font-size: 13px;
    }

    .mobile-settings-categories {
        margin-top: 10px;
        display: flex;
        gap: 7px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .mobile-settings-categories::-webkit-scrollbar {
        display: none;
    }

    .mobile-settings-category {
        min-width: 0 !important;
        min-height: 32px !important;
        height: 32px;
        padding: 0 12px;
        flex: 0 0 auto;
        color: var(--text-dim);
        border: 1px solid var(--ops-line);
        border-radius: 16px;
        background: rgba(9, 26, 45, 0.82);
        font-size: 10px;
        font-weight: 680;
    }

    .mobile-settings-category.active {
        color: #effffc;
        border-color: rgba(33, 212, 180, 0.74);
        background: linear-gradient(135deg, rgba(18, 137, 121, 0.78), rgba(25, 182, 157, 0.5));
    }

    body.mobile-view #settingsPanel .settings-section {
        position: relative;
        margin: 0 0 9px;
        padding: 13px;
        overflow: hidden;
        border: 1px solid var(--ops-line);
        border-radius: 16px;
        background: linear-gradient(145deg, rgba(13, 34, 56, 0.92), rgba(7, 23, 40, 0.94));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    }

    body.mobile-view #settingsPanel .settings-section[hidden] {
        display: none !important;
    }

    body.mobile-view #settingsPanel .settings-section-title {
        min-height: 38px;
        margin: 0 0 8px;
        padding: 0 0 9px 46px;
        display: flex;
        align-items: center;
        color: #f6f9fc;
        border-bottom: 1px solid rgba(126, 160, 201, 0.17);
        font-size: 13px;
        font-weight: 750;
        letter-spacing: -0.01em;
        text-transform: none;
    }

    body.mobile-view #settingsPanel .settings-section-title::before {
        content: '';
        position: absolute;
        top: 12px;
        left: 13px;
        width: 34px;
        height: 34px;
        border: 1px solid rgba(33, 212, 180, 0.24);
        border-radius: 10px;
        background:
            radial-gradient(circle at 50% 50%, rgba(33, 212, 180, 0.72) 0 2px, transparent 3px),
            linear-gradient(135deg, rgba(33, 212, 180, 0.15), rgba(61, 125, 168, 0.1));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }

    body.mobile-view #settingsPanel .settings-section[data-settings-group='map'] .settings-section-title::before {
        background:
            linear-gradient(90deg, transparent 42%, rgba(33, 212, 180, 0.75) 43% 49%, transparent 50%),
            linear-gradient(145deg, rgba(33, 212, 180, 0.14), rgba(73, 118, 173, 0.1));
    }

    body.mobile-view #settingsPanel .settings-section[data-settings-group='alerts'] .settings-section-title::before {
        background:
            radial-gradient(circle at 50% 63%, transparent 0 7px, rgba(33, 212, 180, 0.72) 8px 9px, transparent 10px),
            linear-gradient(145deg, rgba(33, 212, 180, 0.14), rgba(73, 118, 173, 0.1));
    }

    body.mobile-view #settingsPanel .settings-section[data-settings-group='data'] .settings-section-title::before {
        background:
            repeating-linear-gradient(0deg, rgba(33, 212, 180, 0.62) 0 2px, transparent 2px 6px),
            linear-gradient(145deg, rgba(33, 212, 180, 0.14), rgba(73, 118, 173, 0.1));
    }

    body.mobile-view #settingsPanel .setting-row {
        min-height: 49px;
        padding: 8px 2px;
        border-bottom: 1px solid rgba(126, 160, 201, 0.13);
    }

    body.mobile-view #settingsPanel .setting-row:last-child {
        border-bottom: 0;
    }

    body.mobile-view #settingsPanel .setting-label {
        color: var(--text-dim);
        font-size: 11px;
        line-height: 1.35;
    }

    body.mobile-view #settingsPanel .toggle {
        width: 40px;
        height: 23px;
        border: 1px solid var(--ops-line);
        background: rgba(111, 132, 159, 0.26);
    }

    body.mobile-view #settingsPanel .toggle::after {
        width: 17px;
        height: 17px;
        top: 2px;
        left: 2px;
        background: #f4f7fb;
        transform: none;
    }

    body.mobile-view #settingsPanel .toggle.on {
        border-color: rgba(33, 212, 180, 0.56);
        background: rgba(33, 212, 180, 0.76);
    }

    body.mobile-view #settingsPanel .toggle.on::after {
        left: 19px;
        transform: none;
    }

    body.mobile-view #settingsPanel .setting-select,
    body.mobile-view #settingsPanel .settings-input,
    body.mobile-view #settingsPanel input[type='text'],
    body.mobile-view #settingsPanel input[type='password'],
    body.mobile-view #settingsPanel input[type='number'],
    body.mobile-view #settingsPanel input[type='date'],
    body.mobile-view #settingsPanel input[type='time'],
    body.mobile-view #settingsPanel input[type='datetime-local'] {
        min-height: 38px;
        color: var(--text-dim);
        border: 1px solid var(--ops-line) !important;
        border-radius: 10px !important;
        background: rgba(4, 17, 31, 0.74) !important;
    }

    body.mobile-view #settingsPanel .btn-secondary,
    body.mobile-view #settingsPanel .settings-btn {
        min-height: 38px;
        color: var(--text-dim);
        border: 1px solid var(--ops-line);
        border-radius: 10px;
        background: rgba(11, 30, 50, 0.9);
    }

    body.mobile-view #settingsPanel .receiver-coverage-help,
    body.mobile-view #settingsPanel .geofence-help,
    body.mobile-view #settingsPanel .curated-overlay-help {
        color: var(--text-muted);
        font-size: 9px;
        line-height: 1.5;
    }

    .mobile-settings-privacy {
        min-height: 42px;
        margin: 4px 0 8px;
        padding: 9px 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: var(--text-muted);
        border: 1px solid var(--ops-line);
        border-radius: 13px;
        background: rgba(10, 28, 47, 0.64);
        font-size: 10px;
        text-align: center;
    }

    .mobile-settings-privacy svg {
        width: 16px;
        height: 16px;
        color: var(--accent);
    }

    body.mobile-panel-settings .mobile-app-utility,
    body.mobile-panel-settings .nav-item[data-panel='settings'] {
        color: #63f2d8;
    }

    body.mobile-view .quick-actions-menu {
        display: none !important;
    }

    body.mobile-view .toast {
        bottom: calc(var(--mobile-nav-clearance) + 8px) !important;
    }

    body.mobile-view .ethics-disclaimer {
        bottom: calc(var(--mobile-nav-clearance) + 8px);
    }
}

@media (max-width: 767.98px) and (orientation: landscape),
       (pointer: coarse) and (max-height: 767.98px) and (orientation: landscape) {
    :root {
        --mobile-nav-height: 64px;
    }

    body.mobile-view .mobile-bottom-nav {
        top: auto;
        right: 8px;
        bottom: var(--mobile-safe-bottom);
        left: 8px;
        width: auto;
        height: var(--mobile-nav-height);
        padding: 4px;
        flex-direction: row;
    }

    body.mobile-view .nav-item {
        height: 54px;
        flex-direction: row;
        gap: 6px;
    }

    body.mobile-view .nav-item span {
        display: inline;
    }

    body.mobile-view #map,
    body.mobile-view #webglMap,
    body.mobile-view #globe3d {
        right: 0 !important;
        bottom: var(--mobile-nav-clearance) !important;
    }

    body.mobile-view .bottom-sheet.mobile-page-panel,
    body.mobile-view #settingsPanel.bottom-sheet {
        inset: var(--mobile-app-bar-height) 0 var(--mobile-nav-clearance) 0 !important;
    }

    body.mobile-view .mobile-map-peek {
        right: 76px;
        bottom: calc(var(--mobile-nav-clearance) + 6px);
        left: 12px;
    }

    body.mobile-view .mobile-fab {
        right: 18px;
        bottom: calc(var(--mobile-nav-clearance) + 134px) !important;
    }
}

@media (max-width: 360px) {
    body.mobile-view .mobile-brand {
        font-size: 17px;
    }

    body.mobile-view .mobile-live-status {
        padding-inline: 3px;
    }

    body.mobile-view .nav-item span {
        font-size: 9px;
    }

    .mobile-page-heading {
        padding-inline: 13px;
    }

    .mobile-map-peek {
        right: 8px !important;
        left: 8px !important;
    }
}

/* ============ IMAGEGEN FLIGHT DECK V2 ============
 * Implementation target: assets/mockups/viptrack-flightdeck-v2-board.png
 * The reference favors compact telemetry, squared instrument surfaces, and a
 * shared command/navigation frame across all four mobile workspaces.
 */
@media (max-width: 767.98px), (pointer: coarse) and (max-height: 767.98px) {
    :root {
        --mobile-app-bar-height: 56px;
        --mobile-map-toolbar-height: 98px;
        --mobile-nav-height: 66px;
        --mobile-nav-gap: 6px;
        --deck-bg: #06111d;
        --deck-surface: rgba(8, 25, 42, 0.96);
        --deck-surface-raised: rgba(10, 30, 49, 0.98);
        --deck-line: rgba(114, 157, 199, 0.25);
        --deck-line-strong: rgba(122, 173, 220, 0.4);
        --deck-cyan: #28dfc1;
        --deck-amber: #ffb83f;
        --deck-violet: #a77cff;
        --deck-radius: 8px;
    }

    body.mobile-view {
        background: var(--deck-bg);
        font-feature-settings: 'tnum' 1, 'ss01' 1;
    }

    body.mobile-view::after {
        background:
            linear-gradient(rgba(66, 117, 158, 0.035) 1px, transparent 1px),
            linear-gradient(90deg, rgba(66, 117, 158, 0.035) 1px, transparent 1px),
            radial-gradient(circle at 10% -5%, rgba(40, 223, 193, 0.09), transparent 27%),
            radial-gradient(circle at 100% 72%, rgba(52, 103, 161, 0.08), transparent 34%);
        background-size: 28px 28px, 28px 28px, auto, auto;
        opacity: 0.9;
    }

    .mobile-app-bar {
        height: var(--mobile-app-bar-height);
        padding: max(7px, env(safe-area-inset-top)) 13px 7px;
        gap: 9px;
        background: linear-gradient(90deg, rgba(3, 14, 25, 0.99), rgba(5, 20, 34, 0.98));
        border-bottom-color: var(--deck-line);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
        backdrop-filter: blur(14px) saturate(125%);
    }

    .mobile-brand {
        gap: 7px;
        font-size: 18px;
        font-weight: 790;
        letter-spacing: -0.035em;
    }

    .mobile-brand img {
        width: 32px;
        height: 32px;
        border-radius: 5px;
        filter: drop-shadow(0 0 8px rgba(40, 223, 193, 0.2));
    }

    .mobile-brand strong {
        color: #f8fbff;
    }

    .mobile-live-status {
        padding: 4px 6px;
        color: #55efa0;
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 9px;
        letter-spacing: 0.09em;
    }

    .mobile-live-status::before {
        width: 6px;
        height: 6px;
        box-shadow: 0 0 8px rgba(86, 239, 143, 0.78);
    }

    .mobile-app-utility {
        width: 34px;
        height: 34px;
        min-width: 34px !important;
        min-height: 34px !important;
        border-color: var(--deck-line-strong);
        background: rgba(8, 26, 44, 0.78);
    }

    body.mobile-view .filter-bar {
        height: var(--mobile-map-toolbar-height) !important;
        padding: 8px 12px 8px !important;
        grid-template-rows: 40px 32px !important;
        gap: 7px !important;
        background: rgba(4, 16, 28, 0.97) !important;
        border-bottom-color: var(--deck-line) !important;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
        backdrop-filter: blur(14px) saturate(125%);
    }

    body.mobile-view .filter-bar .search-input-wrapper,
    .mobile-search-control,
    .mobile-settings-search {
        height: 40px;
        border-color: var(--deck-line);
        border-radius: var(--deck-radius);
        background: linear-gradient(90deg, rgba(11, 30, 49, 0.97), rgba(7, 24, 41, 0.97));
        box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
    }

    body.mobile-view .filter-bar .search-box,
    body.mobile-view .filter-bar .search-box:focus {
        height: 38px;
        font-size: 12px;
    }

    body.mobile-view .filter-bar .search-filter-btn {
        width: 32px;
        height: 32px;
        min-width: 32px !important;
        min-height: 32px !important;
        border-radius: 6px;
    }

    body.mobile-view .filter-bar .search-clear-btn {
        width: 32px;
        height: 32px;
        min-width: 32px !important;
        min-height: 32px !important;
        color: var(--text-dim);
        background: rgba(112, 137, 166, 0.2);
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 10px;
    }

    body.mobile-view .filter-bar > [role='radiogroup'] {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        overflow: visible;
    }

    body.mobile-view .filter-bar .filter-btn {
        width: 100%;
        height: 32px;
        min-height: 32px !important;
        padding: 0 4px !important;
        border-color: var(--deck-line) !important;
        border-radius: 6px !important;
        background: rgba(7, 23, 40, 0.9) !important;
        font-size: 9px !important;
        font-weight: 690;
    }

    body.mobile-view .filter-bar .filter-btn.active {
        color: #dffff8 !important;
        border-color: rgba(40, 223, 193, 0.64) !important;
        background: rgba(17, 112, 102, 0.58) !important;
        box-shadow: inset 3px 0 var(--deck-cyan) !important;
    }

    body.mobile-view .filter-bar .filter-btn.government-btn:not(.active) {
        color: #c1aaff !important;
    }

    body.mobile-view .filter-bar .filter-btn .count {
        display: none;
    }

    body.mobile-view .mobile-map-stats {
        top: calc(var(--mobile-app-bar-height) + var(--mobile-map-toolbar-height) + 10px);
        left: 10px;
        height: 32px;
        padding: 0 10px;
        border-color: var(--deck-line-strong);
        border-radius: 6px;
        background: rgba(5, 22, 38, 0.94);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.26);
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    }

    body.mobile-view #map .leaflet-tile-pane {
        filter: brightness(0.56) saturate(0.62) sepia(0.12) hue-rotate(155deg) contrast(1.14);
    }

    .mobile-map-stats strong {
        color: var(--deck-cyan);
        font-size: 13px;
    }

    body.mobile-view .mobile-map-tools {
        top: calc(var(--mobile-app-bar-height) + var(--mobile-map-toolbar-height) + 50px);
        right: 10px;
        padding: 3px;
        border-color: var(--deck-line-strong);
        border-radius: 7px;
        background: rgba(5, 22, 38, 0.95);
        box-shadow: 0 9px 24px rgba(0, 0, 0, 0.3);
    }

    .mobile-map-tool {
        width: 36px;
        height: 36px;
        min-width: 36px !important;
        min-height: 36px !important;
        border-radius: 5px;
    }

    body.mobile-view .mobile-map-peek {
        right: 10px;
        bottom: calc(var(--mobile-nav-clearance) + 8px);
        left: 10px;
        min-height: 108px;
        padding: 12px;
        gap: 8px 10px;
        border-color: var(--deck-line-strong);
        border-radius: var(--deck-radius);
        background: linear-gradient(90deg, rgba(7, 26, 44, 0.98), rgba(4, 18, 32, 0.99));
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.44), inset 3px 0 rgba(40, 223, 193, 0.58);
        backdrop-filter: blur(12px) saturate(120%);
    }

    .mobile-map-peek.is-empty {
        min-height: 64px;
    }

    .mobile-peek-icon {
        width: 42px;
        height: 42px;
        border-radius: 50%;
    }

    .mobile-peek-callsign {
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 15px;
        letter-spacing: 0.01em;
    }

    .mobile-peek-meta,
    .mobile-peek-route {
        font-size: 9px;
    }

    .mobile-peek-metrics {
        padding-top: 7px;
    }

    .mobile-peek-metric strong {
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 11px;
    }

    body.mobile-view .mobile-bottom-nav {
        right: 8px;
        left: 8px;
        height: var(--mobile-nav-height);
        padding: 4px;
        gap: 2px;
        border-color: var(--deck-line-strong);
        border-radius: var(--deck-radius);
        background: linear-gradient(90deg, rgba(8, 26, 44, 0.99), rgba(4, 18, 32, 0.99));
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.025);
        backdrop-filter: blur(16px) saturate(130%);
    }

    body.mobile-view .nav-item {
        height: 56px;
        padding: 5px 2px;
        gap: 2px;
        border-radius: 5px;
    }

    body.mobile-view .nav-item.active {
        color: var(--deck-cyan);
        border-color: rgba(40, 223, 193, 0.22);
        background: rgba(14, 92, 88, 0.36);
        box-shadow: inset 0 2px var(--deck-cyan);
    }

    body.mobile-view .nav-item svg {
        width: 20px;
        height: 20px;
    }

    body.mobile-view .nav-item span {
        font-size: 9px;
        font-weight: 680;
    }

    body.mobile-view .mobile-fab {
        right: 15px;
        bottom: calc(var(--mobile-nav-clearance) + 122px) !important;
        width: 42px;
        height: 42px;
        min-width: 42px !important;
        min-height: 42px !important;
        border-radius: 50%;
        box-shadow: 0 0 0 4px rgba(40, 223, 193, 0.07), 0 10px 24px rgba(0, 0, 0, 0.36);
    }

    body.mobile-view .bottom-sheet.mobile-page-panel,
    body.mobile-view #settingsPanel.bottom-sheet {
        background: linear-gradient(180deg, rgba(4, 15, 27, 0.995), rgba(6, 19, 33, 0.995)) !important;
    }

    .mobile-page-heading {
        padding: 18px 14px 9px;
    }

    .mobile-page-title {
        font-size: clamp(23px, 7vw, 29px);
        font-weight: 780;
        letter-spacing: -0.04em;
    }

    .mobile-page-subtitle {
        margin-top: 2px;
        color: #94a6be;
        font-size: 10px;
    }

    .mobile-page-count {
        color: var(--deck-cyan);
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: 0.02em;
        text-transform: uppercase;
    }

    .mobile-page-updated {
        margin-top: 1px;
        font-size: 9px;
    }

    .mobile-search-row {
        margin-top: 12px;
        gap: 7px;
    }

    .mobile-filter-square,
    .mobile-outline-btn {
        border-color: rgba(40, 223, 193, 0.5);
        border-radius: 6px;
        background: rgba(8, 27, 45, 0.84);
    }

    .mobile-filter-chips {
        margin-top: 8px;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        overflow: visible;
    }

    .mobile-filter-chip {
        min-width: 0 !important;
        width: 100%;
        height: 32px;
        padding: 0 3px;
        border-radius: 6px;
        font-size: 9px;
    }

    .mobile-filter-chip.active {
        border-color: rgba(40, 223, 193, 0.58);
        background: rgba(17, 112, 102, 0.58);
        box-shadow: inset 3px 0 var(--deck-cyan);
    }

    .mobile-list-sortbar {
        min-height: 38px;
        padding: 4px 14px;
        grid-template-columns: minmax(118px, 1fr) 48px 42px 40px;
        gap: 5px;
        border-block: 1px solid rgba(114, 157, 199, 0.18);
        background: rgba(5, 19, 33, 0.92);
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 8px;
        letter-spacing: 0.06em;
    }

    .mobile-list-sortbar select {
        height: 29px;
        border-radius: 5px;
        font-size: 9px;
    }

    body.mobile-view .mobile-page-panel .sheet-content {
        padding: 7px 10px 14px;
    }

    body.mobile-view .list-aircraft-item {
        min-height: 79px;
        margin-bottom: 2px;
        padding: 9px 22px 9px 12px;
        grid-template-columns: 42px minmax(0, 1fr) 72px;
        gap: 9px;
        border-color: rgba(114, 157, 199, 0.24);
        border-radius: 5px;
        background: linear-gradient(90deg, rgba(9, 29, 48, 0.97), rgba(5, 21, 37, 0.98));
        box-shadow: none;
    }

    body.mobile-view .list-aircraft-item::before {
        width: 3px;
        border-radius: 3px 0 0 3px;
    }

    body.mobile-view .list-ac-icon {
        width: 42px;
        height: 42px;
        border-radius: 50%;
    }

    body.mobile-view .list-ac-callsign {
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 13px;
        letter-spacing: 0.01em;
    }

    .list-ac-watch-badge {
        padding: 2px 4px;
        border-radius: 3px;
        font-size: 6px;
    }

    body.mobile-view .list-ac-detail,
    body.mobile-view .list-ac-route {
        font-size: 9px;
    }

    body.mobile-view .list-ac-data {
        display: grid;
        grid-template-rows: repeat(3, auto);
        gap: 3px;
        align-content: center;
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        text-align: right;
    }

    body.mobile-view .list-ac-alt,
    body.mobile-view .list-ac-speed,
    body.mobile-view .list-ac-distance {
        margin: 0;
        color: #eef5fb;
        font-size: 9px;
        line-height: 1.2;
        white-space: nowrap;
    }

    body.mobile-view .list-ac-distance {
        color: var(--category-color, var(--deck-cyan));
    }

    .list-ac-chevron {
        right: 7px;
        font-size: 17px;
    }

    .mobile-list-note,
    .mobile-privacy-note,
    .mobile-settings-privacy {
        min-height: 36px;
        border-radius: 6px;
        background: rgba(7, 24, 41, 0.76);
        font-size: 9px;
    }

    .watch-overview {
        margin-top: 13px;
        padding: 11px 7px;
        border-radius: 6px;
        background: rgba(7, 25, 42, 0.9);
    }

    .watch-stat strong {
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 19px;
    }

    .watch-stat span {
        font-size: 8px;
        text-transform: uppercase;
    }

    .watch-segmented {
        margin-top: 8px;
        padding: 3px;
        border-radius: 6px;
        background: rgba(6, 22, 38, 0.9);
    }

    .watch-segment {
        min-height: 32px !important;
        border-radius: 4px;
        font-size: 10px;
    }

    .watch-segment.active {
        border-color: rgba(40, 223, 193, 0.5);
        background: rgba(17, 112, 102, 0.58);
        box-shadow: inset 3px 0 var(--deck-cyan);
    }

    .watch-section-heading {
        margin: 11px 2px 7px;
    }

    .watch-section-heading h2 {
        font-size: 14px;
    }

    .watch-card {
        min-height: 111px;
        margin-bottom: 5px;
        padding: 10px;
        grid-template-columns: 43px minmax(0, 1fr) auto;
        gap: 8px 9px;
        border-radius: 6px;
        background: linear-gradient(90deg, rgba(9, 29, 48, 0.97), rgba(5, 21, 37, 0.98));
        box-shadow: inset 3px 0 color-mix(in srgb, var(--watch-color, var(--accent)) 72%, transparent);
    }

    .watch-card-icon {
        width: 43px;
        height: 43px;
    }

    .watch-card-name {
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 13px;
    }

    .watch-card-detail,
    .watch-card-route {
        font-size: 9px;
    }

    .watch-card-metrics {
        padding-top: 7px;
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 9px;
    }

    .watch-activity-card {
        border-radius: 6px;
        background: rgba(7, 25, 42, 0.86);
    }

    .watch-activity-item {
        min-height: 48px;
        padding: 8px 10px;
    }

    body.mobile-view #settingsPanel.bottom-sheet {
        padding: 0 10px 16px !important;
    }

    .mobile-settings-hero {
        margin: 0 -10px 8px;
        padding: 17px 14px 9px;
        background: linear-gradient(180deg, #04101c 88%, rgba(4, 16, 28, 0));
    }

    .mobile-settings-search {
        margin-top: 12px;
    }

    .mobile-settings-categories {
        margin-top: 7px;
        display: grid;
        grid-template-columns: 1.08fr 0.72fr 0.88fr 0.72fr 1.22fr;
        gap: 4px;
        overflow: visible;
    }

    .mobile-settings-category {
        width: 100%;
        height: 30px;
        padding: 0 3px;
        border-radius: 5px;
        font-size: 8px;
    }

    .mobile-settings-category.active {
        border-color: rgba(40, 223, 193, 0.56);
        background: rgba(17, 112, 102, 0.58);
        box-shadow: inset 3px 0 var(--deck-cyan);
    }

    body.mobile-view #settingsPanel .settings-section {
        margin-bottom: 6px;
        padding: 9px 10px;
        border-radius: 6px;
        background: linear-gradient(90deg, rgba(9, 29, 48, 0.96), rgba(6, 22, 38, 0.97));
        box-shadow: none;
    }

    body.mobile-view #settingsPanel .settings-section-title {
        min-height: 27px;
        margin: 0 0 2px;
        padding: 0 0 5px;
        border-bottom-color: rgba(114, 157, 199, 0.16);
        font-size: 11px;
        font-weight: 740;
    }

    body.mobile-view #settingsPanel .settings-section-title::before {
        display: none;
    }

    body.mobile-view #settingsPanel .setting-row {
        min-height: 40px;
        padding: 6px 1px;
    }

    body.mobile-view #settingsPanel .setting-label {
        font-size: 10px;
    }

    body.mobile-view #settingsPanel .toggle {
        width: 44px;
        height: 44px;
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.mobile-view #settingsPanel .toggle::before {
        content: '';
        position: absolute;
        top: 11px;
        left: 2px;
        width: 40px !important;
        height: 22px !important;
        min-width: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        border: 1px solid var(--deck-line-strong) !important;
        border-radius: 12px !important;
        background: rgba(111, 132, 159, 0.26) !important;
        box-shadow: none !important;
    }

    body.mobile-view #settingsPanel .toggle::after {
        top: 14px;
        left: 5px;
        width: 16px;
        height: 16px;
        transform: none;
    }

    body.mobile-view #settingsPanel .toggle.on {
        background: transparent !important;
    }

    body.mobile-view #settingsPanel .toggle.on::before {
        border-color: rgba(40, 223, 193, 0.58);
        background: rgba(40, 223, 193, 0.74);
    }

    body.mobile-view #settingsPanel .toggle.on::after {
        left: 23px;
        transform: none;
    }

    body.mobile-view #settingsPanel .setting-select,
    body.mobile-view #settingsPanel .settings-input,
    body.mobile-view #settingsPanel input[type='text'],
    body.mobile-view #settingsPanel input[type='password'],
    body.mobile-view #settingsPanel input[type='number'],
    body.mobile-view #settingsPanel input[type='date'],
    body.mobile-view #settingsPanel input[type='time'],
    body.mobile-view #settingsPanel input[type='datetime-local'] {
        min-height: 34px;
        border-radius: 5px !important;
        font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
        font-size: 9px;
    }
}

/* The mobile workspace added its own transitions; honour the OS motion preference
   here too, since this sheet owns the flight-deck presentation. */
@media (prefers-reduced-motion: reduce) {
    body.mobile-view *,
    body.mobile-view *::before,
    body.mobile-view *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (forced-colors: active) {
    body.mobile-view .mobile-map-peek,
    body.mobile-view .mobile-nav,
    body.mobile-view .mobile-app-bar {
        border: 1px solid CanvasText;
    }
}

/* WCAG 2.2 SC 2.5.8 (Target Size Minimum, AA): this input rendered 17px tall. */
body.mobile-view .mobile-settings-search input {
    min-height: 24px;
}

/* X14 coverage view. The canvas is a data surface, not chrome: it must never take
   pointer events away from the map, and it sits under the marker pane so aircraft
   stay selectable through it. Forced-colors cannot restyle canvas pixels, so the
   density wash is toned down there rather than left to compete with the OS palette. */
.coverage-canvas {
    pointer-events: none;
    z-index: 200;
}

@media (forced-colors: active) {
    .coverage-canvas {
        opacity: 0.55;
    }
}
