:root {
    color-scheme: light;
    --pano-blue: #06477f;
    --pano-dark: #082743;
    --pano-sky: #dceefa;
    --pano-border: #b8cfde;
    --pano-shadow: 0 .5rem 1.5rem rgba(8, 39, 67, .16);
}

* { box-sizing: border-box; }

body.panorama-page {
    margin: 0;
    background: #edf5f9;
    color: #172b3a;
    font-family: "Segoe UI", Arial, sans-serif;
}

.panorama-shell {
    width: min(100% - 2rem, 92rem);
    margin: 0 auto;
    padding: 1rem 0 2.5rem;
}

.panorama-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panorama-header h1 { margin: 0; color: var(--pano-dark); font-size: clamp(1.5rem, 3vw, 2.3rem); }
.panorama-back { color: var(--pano-blue); font-weight: 650; text-decoration: none; }
.panorama-back:hover, .panorama-back:focus-visible { text-decoration: underline; }
.panorama-intro { max-width: 70rem; line-height: 1.55; }

.panorama-stage {
    overflow: hidden;
    border: 1px solid var(--pano-border);
    border-radius: .9rem;
    background: var(--pano-dark);
    box-shadow: var(--pano-shadow);
}

#panorama-viewer { width: 100%; height: clamp(25rem, 70vh, 52rem); }
#panorama-viewer.is-unavailable { min-height: 25rem; }

.panorama-caption {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .8rem 1rem;
    background: #fff;
    text-align: center;
}

.panorama-caption p { width: 100%; margin: 0; color: #000; font-size: 1.2rem; font-weight: 600; }
.panorama-status { margin: .75rem 0 0; padding: .75rem 1rem; border-radius: .5rem; background: var(--pano-sky); }
.panorama-status.is-error { background: #ffe8e8; color: #8b1111; }

.panorama-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: .9rem;
    margin-top: 1.2rem;
}

.panorama-card {
    overflow: hidden;
    padding: 0;
    border: 2px solid transparent;
    border-radius: .7rem;
    background: #fff;
    color: inherit;
    cursor: pointer;
    box-shadow: 0 .2rem .75rem rgba(8, 39, 67, .11);
    text-align: left;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.panorama-card:hover { transform: translateY(-2px); box-shadow: var(--pano-shadow); }
.panorama-card:focus-visible { outline: 3px solid #58aee8; outline-offset: 2px; }
.panorama-card.is-selected { border-color: var(--pano-blue); }
.panorama-card img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; }
.panorama-card-text { display: flex; flex-direction: column; gap: .22rem; width: 100%; padding: .65rem .75rem .7rem; }
.panorama-card-captured { color: #5b7281; font-size: .78rem; line-height: 1.2; white-space: nowrap; }

.pnlm-container { font-family: "Segoe UI", Arial, sans-serif; }
.pnlm-about-msg { display: none !important; }
.panorama-drone-info {
    position: absolute;
    right: 0;
    bottom: 4px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    max-width: min(80%, 24rem);
    padding: 0 5px 0 10px;
    background: rgba(0, 0, 0, .7);
    border-radius: 3px 0 0 3px;
    color: #fff;
    line-height: 1.4;
    text-align: right;
    pointer-events: none;
}
.pnlm-title-box, .panorama-drone-model { font-size: 18px; font-weight: 400; }
.pnlm-author-box, .panorama-drone-altitude { font-size: 10px; font-weight: 400; }
.panorama-drone-model { margin-bottom: 3px; }

@media (max-width: 42rem) {
    .panorama-shell { width: min(100% - 1rem, 92rem); }
    .panorama-header { align-items: flex-start; flex-direction: column; }
    #panorama-viewer { height: 65vh; min-height: 22rem; }
    .panorama-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
