.workspace-shell {
    max-width: 1600px;
    margin: 1.5rem auto;
    padding: 1rem;
}
.workspace-header,
.compare-toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .75rem;
    color: #6c757d;
    margin-bottom: .25rem;
}
.compare-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    min-height: 75vh;
}
.compare-grid iframe,
.align-layout iframe {
    width: 100%;
    min-height: 75vh;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 1rem;
    background: #fff;
}
.align-layout {
    display: grid;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    gap: 1rem;
}
.workspace-panel,
.aerial-workspace-card,
.timeline-folder,
.last-edited-card {
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.align-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin: 1rem 0;
}
.align-fields input {
    width: 100%;
    display: block;
    margin-top: .25rem;
}
.workspace-save-state {
    margin-left: .75rem;
    color: #198754;
}
.timeline-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}
.timeline-folder.drag-over {
    outline: 3px solid rgba(13,110,253,.25);
}
.timeline-model-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.timeline-model-chip,
.last-edited-card {
    text-decoration: none;
    color: inherit;
}
.timeline-model-chip {
    display: inline-flex;
    padding: .35rem .6rem;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 999px;
    background: #f8f9fa;
    font-size: .85rem;
}
.last-edited-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .75rem;
}
.last-edited-card {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}
.last-edited-card span,
.workspace-muted {
    color: #6c757d;
    font-size: .875rem;
}
.aerial-workspace-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}
.aerial-list {
    display: grid;
    gap: .75rem;
}
.aerial-list-item {
    border: 1px solid rgba(0,0,0,.10);
    border-radius: .85rem;
    padding: .85rem;
    background: #fff;
}
.aerial-list-item button.linklike {
    border: none;
    background: transparent;
    padding: 0;
    color: #0d6efd;
    text-align: left;
}
.aerial-item-actions {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    margin-top: .5rem;
}
.context-media-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
}
.context-media-grid img,
.context-media-grid video {
    max-width: 140px;
    max-height: 100px;
    object-fit: cover;
    border-radius: .5rem;
    border: 1px solid rgba(0,0,0,.12);
}
@media (max-width: 900px) {
    .compare-grid,
    .align-layout {
        grid-template-columns: 1fr;
    }
    .workspace-header,
    .compare-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}
.timeline-remove-zone {
    border: 1px dashed rgba(0,0,0,.25);
    border-radius: .75rem;
    padding: .75rem;
    color: #6c757d;
    background: #fff;
    text-align: center;
}
.timeline-remove-zone.drag-over,
.timeline-folder.drag-over {
    outline: 2px solid rgba(13,110,253,.35);
    outline-offset: 2px;
}


/* Alignment workspace v2: map/model-neutral compare + overlay alignment */
.aerial-align-shell {
    max-width: 1800px;
}

.aerial-align-header p {
    max-width: 920px;
}

.aerial-align-header-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.aerial-align-grid {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.aerial-align-controls {
    position: sticky;
    top: 1rem;
    display: grid;
    gap: 1rem;
}

.aerial-align-control-section {
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    padding-bottom: 1rem;
}

.aerial-align-control-section:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.align-control-label {
    display: block;
    color: #64748b;
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: .35rem;
}

.aerial-align-mode-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .35rem;
    padding: .35rem;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: .85rem;
    background: #f8fafc;
}

.aerial-align-mode-toggle button {
    border: 1px solid transparent;
    background: transparent;
    border-radius: .65rem;
    min-height: 38px;
    font-weight: 800;
    color: #475569;
}

.aerial-align-mode-toggle button.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.aerial-align-form {
    display: grid;
    gap: .85rem;
}

.aerial-align-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
}

.aerial-align-field-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aerial-align-field-grid label {
    display: grid;
    gap: .28rem;
    margin: 0;
}

.aerial-align-field-grid span {
    color: #64748b;
    font-size: .73rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.aerial-align-field-grid input,
.aerial-align-nudge input {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, .16);
    border-radius: .65rem;
    min-height: 38px;
    padding: .35rem .55rem;
    font-weight: 700;
    background: #fff;
}

.aerial-align-nudge {
    display: grid;
    grid-template-columns: 44px 54px 44px;
    gap: .4rem;
    justify-content: center;
    align-items: center;
    padding: .65rem;
    border-radius: .85rem;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .08);
}

.aerial-align-nudge .btn {
    min-width: 44px;
    min-height: 38px;
    padding: .2rem .4rem;
    font-weight: 900;
}

.aerial-align-nudge input {
    text-align: center;
    padding-left: .25rem;
    padding-right: .25rem;
}

.aerial-align-action-row {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.aerial-align-scan-card {
    display: grid;
    gap: .15rem;
    padding: .8rem;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: .85rem;
    background: #fff;
}

.aerial-align-scan-card.current {
    background: linear-gradient(180deg, #f8fafc, #eef6ff);
    border-color: rgba(13, 110, 253, .16);
}

.aerial-align-scan-card strong {
    color: #0f172a;
    line-height: 1.25;
}

.aerial-align-scan-card span:last-child {
    color: #64748b;
    font-size: .86rem;
}

.aerial-align-preview-card {
    min-height: 80vh;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    overflow: hidden;
}

.aerial-align-preview-toolbar {
    min-height: 72px;
    padding: 1rem;
    display: flex;
    gap: .8rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.aerial-align-preview-canvas {
    position: relative;
    min-height: calc(80vh - 72px);
    background: #e2e8f0;
    overflow: hidden;
}

.aerial-align-preview-canvas.side-by-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
}

.aerial-align-preview-canvas.overlay {
    display: block;
}

.aerial-align-pane {
    position: relative;
    min-height: calc(80vh - 72px);
    background: #f8fafc;
    overflow: hidden;
}

.aerial-align-preview-canvas.overlay .aerial-align-pane {
    position: absolute;
    inset: 0;
}

.aerial-align-preview-canvas.overlay .target-pane {
    z-index: 3;
    background: transparent;
}

.aerial-align-pane-label {
    position: absolute;
    z-index: 8;
    left: .75rem;
    top: .75rem;
    display: inline-flex;
    gap: .45rem;
    align-items: center;
    max-width: calc(100% - 1.5rem);
    padding: .4rem .6rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .86);
    color: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .22);
    font-size: .82rem;
}

.aerial-align-pane-label span {
    opacity: .72;
    font-weight: 700;
}

.aerial-align-pane-label strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aerial-align-pane iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

.aerial-align-transform-layer {
    position: absolute;
    inset: 0;
    transform-origin: center center;
    transition: opacity .15s ease;
    will-change: transform, opacity;
}

.aerial-align-preview-canvas.side-by-side .aerial-align-transform-layer {
    overflow: hidden;
}

.aerial-align-preview-canvas.overlay .aerial-align-transform-layer {
    box-shadow: 0 0 0 2px rgba(13, 110, 253, .45), 0 0 42px rgba(13, 110, 253, .16);
}

.aerial-align-empty-state {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 2rem;
    text-align: center;
    color: #64748b;
    font-weight: 700;
    background: linear-gradient(135deg, #f8fafc, #eef2f7);
}

.aerial-align-empty-state[hidden] {
    display: none;
}

.aerial-align-drag-surface {
    position: absolute;
    z-index: 9;
    inset: 0;
    display: none;
    place-items: center;
    cursor: move;
    background: rgba(15, 23, 42, .04);
    border: 2px dashed rgba(13, 110, 253, .35);
    touch-action: none;
}

.aerial-align-drag-surface.enabled,
.aerial-align-drag-surface.always-visible {
    display: grid;
}

.aerial-align-drag-surface span {
    pointer-events: none;
    display: inline-flex;
    padding: .45rem .7rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, .76);
    font-weight: 800;
    font-size: .82rem;
}

#dragPreviewBtn.active {
    color: #fff;
    background: #0f172a;
    border-color: #0f172a;
}

@media (max-width: 1100px) {
    .aerial-align-grid {
        grid-template-columns: 1fr;
    }

    .aerial-align-controls {
        position: relative;
        top: auto;
    }

    .aerial-align-preview-canvas.side-by-side {
        grid-template-columns: 1fr;
    }

    .aerial-align-preview-canvas.side-by-side .aerial-align-pane {
        min-height: 52vh;
    }
}

@media (max-width: 700px) {
    .aerial-align-header-actions,
    .aerial-align-action-row,
    .aerial-align-preview-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .aerial-align-field-grid,
    .aerial-align-field-grid.two {
        grid-template-columns: 1fr;
    }

    .aerial-align-preview-card,
    .aerial-align-preview-canvas,
    .aerial-align-pane {
        min-height: 58vh;
    }
}

/* Dashboard folder tabs */
.dashboard-folder-tabs {
    gap: .25rem;
    flex-wrap: wrap;
}
.dashboard-folder-tabs .nav-link {
    font-weight: 700;
    color: #334155;
    border-radius: .85rem .85rem 0 0;
}
.dashboard-folder-content {
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}
.dashboard-project-card {
    overflow: hidden;
}
.timeline-source-shelf {
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 1rem;
    background: #f8fafc;
    padding: 1rem;
}
.timeline-source-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    max-height: 220px;
    overflow: auto;
}
.timeline-model-chip {
    align-items: center;
    gap: .35rem;
}
.timeline-model-chip small {
    color: #64748b;
    font-size: .72rem;
    font-weight: 700;
}
.timeline-project-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: .85rem;
    background: #f8fafc;
    padding: .65rem .75rem;
}
.timeline-project-row + .timeline-project-row {
    margin-top: .5rem;
}
.timeline-project-row[draggable="true"],
.timeline-model-chip[draggable="true"],
.dashboard-project-card[draggable="true"] {
    cursor: grab;
}
@media (max-width: 640px) {
    .timeline-project-row {
        align-items: stretch;
        flex-direction: column;
    }
    .timeline-project-row .d-flex {
        width: 100%;
    }
    .timeline-project-row .btn {
        flex: 1;
    }
}

/* Dashboard v3: completed models first, timeline cards second */
.dashboard-search-sort {
    min-width: min(100%, 560px);
}
.timeline-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}
.timeline-dashboard-card {
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.timeline-dashboard-preview {
    min-height: 150px;
    background: #e2e8f0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}
.timeline-dashboard-preview img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f8fafc;
}
.timeline-dashboard-preview img:first-child:nth-last-child(1) {
    grid-column: 1 / -1;
}
.timeline-dashboard-preview img:first-child:nth-last-child(2),
.timeline-dashboard-preview img:first-child:nth-last-child(2) ~ img {
    grid-column: span 1;
}
.timeline-dashboard-body {
    padding: 1rem;
}
.timeline-empty-preview {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    min-height: 160px;
    color: #64748b;
    font-weight: 800;
}

/* Timeline detail playback page */
.timeline-detail-shell {
    max-width: 1800px;
}
.timeline-detail-header p {
    max-width: 900px;
}
.timeline-detail-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.timeline-player-card,
.compare-overlay-card {
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
    overflow: hidden;
}
.timeline-player-toolbar,
.compare-overlay-toolbar {
    min-height: 74px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    background: linear-gradient(180deg, #fff, #f8fafc);
}
.timeline-player-kicker {
    display: block;
    color: #64748b;
    font-size: .75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.timeline-player-controls {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.timeline-frame-wrap {
    height: min(76vh, 820px);
    min-height: 520px;
    background: #e2e8f0;
}
.timeline-frame-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}
.timeline-scrubber-wrap {
    padding: 1rem;
    border-top: 1px solid rgba(15, 23, 42, .08);
}
.timeline-scrubber-wrap input[type="range"] {
    width: 100%;
}
.timeline-tick-row {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-top: .65rem;
}
.timeline-tick {
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 999px;
    background: #f8fafc;
    color: #334155;
    padding: .35rem .65rem;
    white-space: nowrap;
    font-size: .84rem;
    font-weight: 800;
}
.timeline-tick.active {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}
.timeline-model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}
.timeline-model-card {
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}
.timeline-model-card.active {
    outline: 3px solid rgba(13, 110, 253, .22);
    outline-offset: 2px;
}
.timeline-model-thumb {
    width: 100%;
    border: 0;
    padding: 0;
    background: #f8fafc;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
}
.timeline-model-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.timeline-model-body {
    padding: 1rem;
}
.timeline-model-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-top: .9rem;
}
.empty-timeline-state {
    min-height: 340px;
    border: 1px dashed rgba(15, 23, 42, .22);
    border-radius: 1rem;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 2rem;
    background: #f8fafc;
}

/* Single-view compare workspace */
.compare-workspace-shell {
    max-width: 1800px;
}
.compare-workspace-header p {
    max-width: 900px;
}
.compare-single-layout {
    display: grid;
    grid-template-columns: minmax(290px, 390px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.compare-control-panel {
    position: sticky;
    top: 1rem;
}
.compare-control-group {
    display: grid;
    gap: .35rem;
}
.compare-control-group label,
.compare-control-grid span {
    color: #64748b;
    font-size: .75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.compare-control-group input[type="range"] {
    width: 100%;
}
.compare-control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
    margin-top: .85rem;
}
.compare-control-grid label {
    display: grid;
    gap: .28rem;
}
.compare-control-grid input {
    width: 100%;
    min-height: 38px;
    border: 1px solid rgba(15, 23, 42, .16);
    border-radius: .65rem;
    padding: .35rem .55rem;
    font-weight: 700;
}
.compare-control-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .85rem;
}
.compare-overlay-toolbar {
    min-height: 64px;
}
.compare-overlay-toolbar > div {
    display: grid;
    gap: .1rem;
    min-width: 0;
}
.compare-layer-label {
    display: inline-flex;
    width: max-content;
    padding: .2rem .45rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.compare-layer-label.base {
    background: #e0f2fe;
    color: #075985;
}
.compare-layer-label.comparison {
    background: #dcfce7;
    color: #166534;
}
.compare-overlay-stage {
    position: relative;
    min-height: calc(86vh - 64px);
    background: #e2e8f0;
    overflow: hidden;
}
.compare-base-frame,
.compare-moving-layer,
.compare-moving-layer iframe,
.compare-drag-surface {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.compare-base-frame,
.compare-moving-layer iframe {
    border: 0;
    background: #fff;
}
.compare-moving-layer {
    z-index: 4;
    transform-origin: center center;
    will-change: transform, opacity;
    box-shadow: 0 0 0 2px rgba(25, 135, 84, .35), 0 0 42px rgba(25, 135, 84, .16);
}
.compare-moving-layer.under-base {
    z-index: 1;
}
.compare-moving-layer.under-base + .compare-drag-surface {
    z-index: 5;
}
.compare-drag-surface {
    z-index: 6;
    display: grid;
    place-items: center;
    cursor: move;
    background: rgba(15, 23, 42, .02);
    border: 2px dashed rgba(13, 110, 253, .18);
    touch-action: none;
}
.compare-drag-surface span {
    pointer-events: none;
    display: inline-flex;
    padding: .4rem .7rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, .70);
    font-weight: 800;
    font-size: .82rem;
}
@media (max-width: 1100px) {
    .compare-single-layout {
        grid-template-columns: 1fr;
    }
    .compare-control-panel {
        position: relative;
        top: auto;
    }
}
@media (max-width: 760px) {
    .timeline-player-toolbar,
    .compare-overlay-toolbar,
    .timeline-detail-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .timeline-frame-wrap,
    .compare-overlay-stage {
        min-height: 420px;
    }
}

/* Dashboard and timeline refinements */
.dashboard-folder-tabs .nav-link {
    font-weight: 800;
}
.dashboard-search-sort {
    min-width: min(100%, 560px);
}
.timeline-dashboard-card {
    overflow: hidden;
    background: #fff;
}
.timeline-dashboard-preview {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    overflow: hidden;
}
.timeline-dashboard-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.timeline-dashboard-empty-preview {
    width: 100%;
    height: 100%;
    min-height: 170px;
    display: grid;
    place-items: center;
    color: #64748b;
    font-weight: 800;
}
.timeline-dashboard-body {
    padding: 1rem;
}
.timeline-player-visual {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: #0f172a;
    min-height: 460px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.timeline-player-visual img {
    width: 100%;
    min-height: 460px;
    max-height: 74vh;
    object-fit: cover;
    display: block;
}
.timeline-player-overlay {
    position: absolute;
    inset: auto 1rem 1rem 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    border-radius: .9rem;
    background: rgba(15, 23, 42, .72);
    backdrop-filter: blur(8px);
}
.timeline-progress-counter {
    color: #fff;
    font-weight: 900;
}
.timeline-player-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.timeline-model-card.active {
    outline: 3px solid rgba(13, 110, 253, .28);
    outline-offset: 3px;
}

/* Native compare workspace */
.compare-native-layout {
    display: grid;
    grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.compare-native-card {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .10);
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}
.native-compare-view {
    position: relative;
    width: 100%;
    height: calc(86vh - 80px);
    min-height: 560px;
    background: #0f172a;
    overflow: hidden;
}
.native-compare-view canvas,
#nativeCompareMapCanvas {
    width: 100% !important;
    height: 100% !important;
}
.compare-status {
    padding: .65rem 1rem;
    border-top: 1px solid rgba(15, 23, 42, .08);
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    background: #f8fafc;
}
.compare-nudge-pad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
    margin-top: .75rem;
}
.compare-nudge-pad [data-nudge="0,-1"] {
    grid-column: 2;
}
.compare-nudge-pad [data-nudge="-1,0"] {
    grid-column: 1;
}
.compare-nudge-pad [data-nudge="1,0"] {
    grid-column: 3;
}
.compare-nudge-pad [data-nudge="0,1"] {
    grid-column: 2;
}
.compare-control-panel {
    position: sticky;
    top: 1rem;
}
@media (max-width: 1100px) {
    .compare-native-layout {
        grid-template-columns: 1fr;
    }
    .native-compare-view {
        height: 68vh;
        min-height: 420px;
    }
    .compare-control-panel {
        position: relative;
        top: auto;
    }
}
@media (max-width: 760px) {
    .timeline-player-visual,
    .timeline-player-visual img,
    .native-compare-view {
        min-height: 360px;
    }
    .timeline-player-overlay {
        position: static;
        border-radius: 0;
    }
}

/* Context picking, lightbox, and saved-location focus affordances */
.context-media-grid {
    align-items: center;
}

.context-media-thumb {
    position: relative;
    width: 150px;
    height: 105px;
    border: 1px solid rgba(15, 23, 42, .14);
    border-radius: .75rem;
    padding: 0;
    overflow: hidden;
    background: #f8fafc;
    cursor: zoom-in;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.context-media-thumb img,
.context-media-thumb video {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    border: 0;
    border-radius: 0;
    display: block;
}

.context-media-thumb:hover,
.context-media-thumb:focus-visible {
    outline: 3px solid rgba(13, 110, 253, .28);
    outline-offset: 2px;
}

.context-media-video-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, .08), rgba(15, 23, 42, .42));
    pointer-events: none;
}

.context-media-play-badge {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .92);
    color: #0f172a;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .22);
}

.context-media-file-thumb {
    padding: .65rem;
    color: #0d6efd;
    font-weight: 700;
    text-align: center;
}

.context-lightbox-modal {
    background: #0f172a;
    color: #fff;
}

.context-lightbox-modal .btn-close {
    filter: invert(1);
}

.context-lightbox-body {
    min-height: 50vh;
    display: grid;
    place-items: center;
}

.context-lightbox-body img,
.context-lightbox-body video {
    max-width: 100%;
    max-height: 78vh;
    border-radius: .75rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .4);
}

.aerial-location-pick-prompt {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 2000;
    width: min(680px, calc(100vw - 2rem));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, .94);
    color: #fff;
    box-shadow: 0 18px 60px rgba(15, 23, 42, .35);
}

.aerial-location-pick-prompt span {
    display: block;
    color: rgba(255, 255, 255, .74);
    font-size: .86rem;
    margin-top: .1rem;
}

body.aerial-location-pick-active #potree_render_area,
body.aerial-location-pick-active .leaflet-container {
    cursor: crosshair !important;
}

.aerial-location-focus-marker-host {
    pointer-events: none;
}

.aerial-location-focus-marker {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: max-content;
    transform: translate(-50%, -100%);
    background: #0f172a;
    color: #fff;
    border: 2px solid #facc15;
    border-radius: 999px;
    padding: .28rem .55rem;
    font-size: .78rem;
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .3);
}

.aerial-location-focus-marker::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: .42rem solid transparent;
    border-right: .42rem solid transparent;
    border-top: .5rem solid #facc15;
}

@media (max-width: 720px) {
    .aerial-item-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .context-media-thumb {
        width: 128px;
        height: 96px;
    }

    .aerial-location-pick-prompt {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Timeline add and dashboard thumbnail refinements */
.timeline-dashboard-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 420px));
    align-items: start;
    justify-content: start;
}
.timeline-dashboard-card {
    max-width: 440px;
}
.timeline-dashboard-preview {
    min-height: 0;
    aspect-ratio: 16 / 9;
}
.timeline-dashboard-preview-grid {
    display: grid;
    gap: 2px;
    background: #e2e8f0;
}
.timeline-dashboard-preview-grid.count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.timeline-dashboard-preview-grid.count-3,
.timeline-dashboard-preview-grid.count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}
.timeline-dashboard-preview-grid img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}
.timeline-dashboard-empty-preview.compact {
    min-height: 0;
    display: grid;
    gap: .2rem;
    align-content: center;
    justify-items: center;
    padding: 1rem;
    text-align: center;
}
.timeline-dashboard-empty-preview.compact small {
    color: #94a3b8;
    font-weight: 600;
}
.timeline-add-model-preview {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: .75rem;
    align-items: center;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: .85rem;
    background: #f8fafc;
    padding: .65rem;
}
.timeline-add-model-preview[hidden] {
    display: none !important;
}
.timeline-add-model-preview img {
    width: 112px;
    height: 72px;
    border-radius: .65rem;
    object-fit: cover;
    background: #e2e8f0;
}
@media (max-width: 520px) {
    .timeline-add-model-preview {
        grid-template-columns: 1fr;
    }
    .timeline-add-model-preview img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

.timeline-add-model-picker {
    display: grid;
    gap: .65rem;
    max-height: min(52vh, 520px);
    overflow: auto;
    padding-right: .25rem;
}
.timeline-add-model-option {
    width: 100%;
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: .8rem;
    align-items: center;
    text-align: left;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: .9rem;
    background: #fff;
    padding: .6rem;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.timeline-add-model-option:hover,
.timeline-add-model-option.selected {
    border-color: rgba(13, 110, 253, .75);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .12);
    background: #f8fbff;
}
.timeline-add-model-option img {
    width: 140px;
    height: 88px;
    border-radius: .7rem;
    object-fit: cover;
    background: #e2e8f0;
}
.timeline-add-model-copy {
    min-width: 0;
    display: grid;
    gap: .25rem;
}
.timeline-add-model-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.timeline-add-model-copy small {
    color: #64748b;
    font-weight: 700;
}
@media (max-width: 560px) {
    .timeline-add-model-option {
        grid-template-columns: 1fr;
    }
    .timeline-add-model-option img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
.timeline-dashboard-empty-preview.compact {
    grid-column: 1 / -1;
}
.timeline-dashboard-preview {
    display: block;
    grid-template-columns: none;
}
.timeline-dashboard-preview.count-1 img,
.timeline-dashboard-preview:not(.timeline-dashboard-preview-grid) > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.timeline-dashboard-preview.timeline-dashboard-preview-grid {
    display: grid;
}


/* Compact context and measurement rows */
.aerial-list-item-compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem 1rem;
    align-items: center;
    padding: .75rem .85rem;
}
.aerial-list-main {
    min-width: 0;
}
.aerial-list-title {
    font-size: .98rem;
    line-height: 1.2;
}
.aerial-list-summary {
    margin-bottom: .15rem;
    line-height: 1.3;
}
.aerial-list-item-compact .aerial-item-actions {
    margin-top: 0;
    align-self: center;
    flex-wrap: wrap;
}
.aerial-list-item-highlight {
    outline: 3px solid rgba(13, 110, 253, .28);
    box-shadow: 0 0 0 7px rgba(13, 110, 253, .08);
}
.aerial-context-marker-host,
.aerial-context-draft-marker-host {
    background: transparent;
    border: 0;
}
.aerial-context-marker {
    position: relative;
    display: block;
    width: 26px;
    height: 26px;
    border-radius: 999px 999px 999px 4px;
    transform: rotate(-45deg);
    background: #0d6efd;
    border: 3px solid #ffffff;
    box-shadow: 0 8px 22px rgba(13, 110, 253, .38);
}
.aerial-context-marker::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 999px;
    background: #ffffff;
}
.aerial-context-draft-marker {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: max-content;
    transform: translate(-50%, -100%);
    padding: .32rem .62rem;
    border-radius: 999px;
    background: #0d6efd;
    color: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 14px 34px rgba(13, 110, 253, .38);
    font-size: .78rem;
    font-weight: 800;
}
.aerial-context-draft-marker::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border-left: .42rem solid transparent;
    border-right: .42rem solid transparent;
    border-top: .52rem solid #0d6efd;
}
.aerial-context-popup p {
    margin: .35rem 0 0;
}
.aerial-context-popup .context-media-grid.compact {
    margin-top: .5rem;
    gap: .35rem;
}
.aerial-context-popup .context-media-thumb {
    width: 82px;
    height: 58px;
    border-radius: .45rem;
}
@media (max-width: 720px) {
    .aerial-list-item-compact {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .aerial-list-item-compact .aerial-item-actions {
        justify-content: flex-start;
    }
}

/* Context edit media management */
.context-edit-media-list {
    display: grid;
    gap: .6rem;
}
.context-edit-media-item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    gap: .7rem;
    align-items: center;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: .8rem;
    padding: .55rem;
    background: #f8fafc;
}
.context-edit-media-item img,
.context-edit-media-item video {
    width: 84px;
    height: 58px;
    object-fit: cover;
    border-radius: .55rem;
    background: #e2e8f0;
}
.context-edit-media-copy {
    min-width: 0;
}
.context-edit-media-copy strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.context-edit-media-copy small {
    color: #64748b;
    font-weight: 700;
}
@media (max-width: 560px) {
    .context-edit-media-item {
        grid-template-columns: 72px minmax(0, 1fr);
    }
    .context-edit-media-item .btn {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

/* Clearer 3D context annotations */
.aerial-potree-context-annotation-title,
.annotation .aerial-potree-context-annotation-title {
    background: rgba(15, 23, 42, .96) !important;
    color: #fff !important;
    border: 2px solid rgba(255, 214, 10, .98) !important;
    border-radius: 999px !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .38), 0 0 0 5px rgba(255, 214, 10, .18) !important;
    font-weight: 800 !important;
    padding: .32rem .72rem !important;
}
.aerial-potree-context-annotation-description {
    background: rgba(255, 255, 255, .96) !important;
    color: #0f172a !important;
    border-radius: .6rem !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .22) !important;
}
