.drone-plane-3d {
    margin: 2.4rem 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    overflow: hidden;
    background: #dce9ef;
    color: #1b2630;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.plane-3d-page {
    margin: 0;
    min-height: 100vh;
    background: #dce9ef;
    color: #1b2630;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow: hidden;
}

.plane-3d-topbar {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.plane-3d-topbar a {
    border: 1px solid rgba(19, 34, 45, 0.18);
    border-radius: 7px;
    padding: 8px 11px;
    background: rgba(255, 255, 255, 0.82);
    color: #21313b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 9px 24px rgba(21, 32, 38, 0.12);
}

.plane-3d-topbar a:focus-visible,
.plane-3d-topbar a:hover {
    background: #fff;
    color: #000;
}

.drone-plane-3d--standalone {
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.drone-plane-3d--standalone .plane-3d-shell,
.drone-plane-3d--standalone .plane-3d-stage {
    min-height: 100vh;
}

.drone-plane-3d *,
.drone-plane-3d *::before,
.drone-plane-3d *::after {
    box-sizing: border-box;
}

.drone-plane-3d button,
.drone-plane-3d input {
    font: inherit;
}

.plane-3d-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    min-height: 620px;
}

.plane-3d-stage {
    position: relative;
    min-width: 0;
    min-height: 620px;
    background: linear-gradient(180deg, #dce9ef 0%, #f5f6f2 54%, #dfe8d5 100%);
}

#planeScene {
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
    touch-action: none;
}

#planeScene:active {
    cursor: grabbing;
}

.labels-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.plane-3d-label {
    position: absolute;
    max-width: 180px;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(19, 34, 45, 0.16);
    border-radius: 7px;
    padding: 7px 9px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 9px 24px rgba(21, 32, 38, 0.12);
    color: #1b2630;
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
}

.plane-3d-label strong {
    display: block;
    margin-bottom: 2px;
    font-size: 12px;
}

.plane-3d-label span {
    color: #64717d;
}

.plane-3d-view-hint {
    position: absolute;
    left: 24px;
    bottom: 22px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 7px;
    padding: 8px 11px;
    background: rgba(255, 255, 255, 0.72);
    color: #31424e;
    font-size: 13px;
    box-shadow: 0 10px 30px rgba(28, 45, 56, 0.1);
}

.plane-3d-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-left: 1px solid rgba(28, 45, 56, 0.15);
    padding: 28px;
    background: rgba(247, 249, 250, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: -18px 0 45px rgba(42, 54, 63, 0.12);
    overflow-y: auto;
}

.plane-3d-eyebrow {
    margin: 0 0 8px;
    color: #52616c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.plane-3d-panel h1,
.plane-3d-panel h2 {
    margin: 0;
    max-width: 300px;
    color: #1b2630;
    font-family: 'Barlow Condensed', Arial, sans-serif;
    font-size: 30px;
    line-height: 1.08;
    letter-spacing: 0;
}

.plane-3d-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 12px;
    padding: 14px 0;
    border-block: 1px solid rgba(28, 45, 56, 0.15);
    color: #3b4a55;
    font-size: 13px;
}

.plane-3d-legend span {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.plane-3d-legend i {
    width: 22px;
    height: 4px;
    border-radius: 99px;
}

.plane-3d-legend .signal {
    background: #f1b734;
}

.plane-3d-legend .power {
    background: #d94b42;
}

.plane-3d-legend .ground {
    background: #27313b;
}

.plane-3d-legend .linkage {
    background: #2f8f7d;
}

.plane-3d-toggle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.plane-3d-toggle-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid rgba(28, 45, 56, 0.15);
    border-radius: 7px;
    padding: 9px 10px;
    background: rgba(255, 255, 255, 0.64);
    color: #2e3d48;
    font-size: 13px;
}

.plane-3d-toggle-grid input {
    width: 17px;
    height: 17px;
    accent-color: #2f8f7d;
}

.plane-3d-pin-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.plane-3d-pin-list div {
    border-top: 1px solid rgba(28, 45, 56, 0.15);
    padding-top: 12px;
}

.plane-3d-pin-list dt {
    margin-bottom: 4px;
    color: #27313b;
    font-size: 13px;
    font-weight: 800;
}

.plane-3d-pin-list dd {
    margin: 0;
    color: #64717d;
    font-size: 13px;
    line-height: 1.45;
}

.plane-3d-reset-button {
    margin-top: auto;
    min-height: 44px;
    border: 0;
    border-radius: 7px;
    padding: 10px 14px;
    background: #21313b;
    color: #fff;
    cursor: pointer;
}

.plane-3d-reset-button:focus-visible,
.plane-3d-toggle-grid input:focus-visible {
    outline: 3px solid rgba(47, 143, 125, 0.35);
    outline-offset: 2px;
}

@media (max-width: 991px) {
    .plane-3d-page {
        overflow: auto;
    }

    .plane-3d-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .plane-3d-stage {
        min-height: 62vh;
    }

    .plane-3d-panel {
        border-left: 0;
        border-top: 1px solid rgba(28, 45, 56, 0.15);
        box-shadow: 0 -14px 34px rgba(42, 54, 63, 0.1);
    }
}

@media (max-width: 520px) {
    .drone-plane-3d {
        margin-inline: -0.75rem;
        border-radius: 8px;
    }

    .plane-3d-panel {
        padding: 22px;
    }

    .plane-3d-toggle-grid,
    .plane-3d-legend {
        grid-template-columns: 1fr;
    }

    .plane-3d-panel h2 {
        font-size: 25px;
    }

    .plane-3d-panel h1 {
        font-size: 25px;
    }

    .plane-3d-view-hint {
        left: 14px;
        right: 14px;
        bottom: 14px;
        text-align: center;
    }
}
