.mtn-webcam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: 1rem;
}
.mtn-webcam-card {
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--line, #45616e);
    border-radius: .65rem;
    background: var(--panel, #162d39);
    color: #f1f7fb;
}
.mtn-webcam-info { padding: .7rem 1rem; }
.mtn-webcam-info:empty { display: none; }
.mtn-webcam-card h2 { margin: 0; font-size: 1.2rem; }
.mtn-webcam-card p { margin: .25rem 0; }
.mtn-webcam-card a { color: #81ead5; }
.mtn-webcam-card img { display: block; width: 100%; height: auto; margin: 0; }
.mtn-webcam-video-preview { position: relative; }
.mtn-webcam-video-preview iframe { pointer-events: none; }
.mtn-webcam-video { position: absolute; inset: 0; z-index: 1; cursor: zoom-in; }
.mtn-webcam-video:focus-visible { outline: 2px solid #81ead5; outline-offset: -3px; }
.mtn-webcam-zoom { display: block; cursor: zoom-in; }
.mtn-webcam-zoom:focus-visible { outline: 2px solid #81ead5; outline-offset: -3px; }
.mtn-webcam-dialog {
    width: min(94vw, 76rem);
    max-width: none;
    max-height: 94vh;
    max-height: 94dvh;
    padding: 0;
    overflow: auto;
    border: 1px solid #45616e;
    border-radius: .65rem;
    background: #101f29;
    color: #f1f7fb;
}
.mtn-webcam-dialog::backdrop { background: rgb(5 12 20 / 86%); }
.mtn-webcam-dialog-bar {
    display: flex;
    align-items: center;
    gap: .7rem;
    justify-content: space-between;
    padding: .5rem .75rem;
}
.mtn-webcam-dialog-bar button {
    min-height: 44px;
    padding: .4rem .75rem;
    border: 1px solid #45616e;
    border-radius: .35rem;
    background: #162d39;
    color: #f1f7fb;
    font: inherit;
    cursor: pointer;
}
.mtn-webcam-dialog-media img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 81vh;
    max-height: 81dvh;
    object-fit: contain;
}
.mtn-webcam-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    align-items: center;
    margin-block: 0 1rem;
}
.mtn-webcam-filter[hidden],
.mtn-webcam-card[hidden] { display: none; }
.mtn-webcam-filter select {
    min-height: 44px;
    max-width: 100%;
    padding: .4rem .75rem;
    border: 1px solid #45616e;
    border-radius: .35rem;
    background: #162d39;
    color: #f1f7fb;
    font: inherit;
}
.mtn-webcam-filters { display: flex; flex-wrap: wrap; gap: .75rem 1rem; }
.mtn-webcam-no-matches[hidden] { display: none; }

.mtn-webcam-dialog-media iframe {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    max-height: 81vh;
    max-height: 81dvh;
    border: 0;
}

.mtn-webcam-card iframe {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    margin: 0;
    border: 0;
}

.mtn-webcam-directory [hidden] { display: none; }
.mtn-webcam-featured { margin-block-end: 1rem; }
.mtn-webcam-featured img {
    max-height: 70vh;
    object-fit: contain;
    background: #101f29;
}
.mtn-webcam-filter input { font: inherit; }
.mtn-webcam-filter input,
.mtn-webcam-select {
    min-height: 44px;
    max-width: 100%;
    padding: .4rem .75rem;
    border: 1px solid #45616e;
    border-radius: .35rem;
    background: #162d39;
    color: #f1f7fb;
}
.mtn-webcam-select { margin-top: .45rem; font: inherit; cursor: pointer; }
.mtn-webcam-gallery-title { font-size: 1.25rem; }
.is-gallery .mtn-webcam-grid {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    padding-block-end: .6rem;
}
.is-gallery .mtn-webcam-grid .mtn-webcam-card {
    flex: 0 0 clamp(13rem, 68%, 17rem);
    scroll-snap-align: start;
}
.is-gallery .mtn-webcam-grid img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.is-gallery .mtn-webcam-grid :is(.mtn-webcam-zoom, .mtn-webcam-video) { cursor: pointer; }

.is-gallery .mtn-webcam-gallery { margin-block-end: 1rem; }

.mtn-webcam-gallery-bar,
.mtn-webcam-arrows {
    display: flex;
    align-items: center;
    gap: .5rem;
}
.mtn-webcam-gallery-bar {
    justify-content: space-between;
    margin-block-end: .55rem;
}
.mtn-webcam-gallery-bar h2 { margin: 0; }
.mtn-webcam-arrows button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #45616e;
    border-radius: .4rem;
    background: #162d39;
    color: #f1f7fb;
    font: 1.8rem/1 system-ui, sans-serif;
    cursor: pointer;
}
.mtn-webcam-arrows button:disabled { opacity: .42; cursor: default; }

.is-gallery .mtn-webcam-grid::-webkit-scrollbar { display: none; }
