.video-page { min-height: 100vh; display: flex; flex-direction: column; }
.video-page footer { margin-top: auto; }
.gallery { padding-block: clamp(2rem, 5vw, 4.5rem) 3.5rem; }
.gallery h1 { font-size: clamp(2.25rem, 5vw, 4.1rem); color: var(--dark); max-width: 19ch; }
.gallery-intro { color: var(--muted); font-size: clamp(1rem, 2vw, 1.24rem); margin-block: 1rem 1.75rem; max-width: 65ch; }
.video-filters { display: flex; gap: .55rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.video-filters button { font-size: .92rem; }
.video-filters button[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.gallery-state { color: var(--muted); }
.gallery-state:empty { margin: 0; }
.video-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(.9rem, 2vw, 1.7rem); }
.video-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.video-card-text { padding: 1rem 1.15rem 1.25rem; overflow-wrap: anywhere; }
.video-card-text p { font-weight: 700; color: var(--green); font-size: .875rem; margin-bottom: .45rem; }
.video-card-text h2 { font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.15; }
.video-trigger { display: grid; place-items: center; width: 100%; aspect-ratio: 16/9; position: relative; border: 0; padding: 0; background: var(--dark); }
.video-trigger:focus-visible { outline-offset: -4px; }
.video-thumbnail { display: block; width: 100%; aspect-ratio: 16/9; height: auto; object-fit: cover; background: var(--pale); }
.video-trigger img { position: absolute; inset: 0; height: 100%; }
.video-card-short .video-thumbnail, .youtube-preview .youtube-short-thumbnail { object-fit: contain; background: var(--dark); }
.video-play { z-index: 1; display: grid; place-items: center; width: 3.7rem; height: 3.7rem; border-radius: 50%; background: #122d22dc; border: 2px solid #fff; color: white; }
.video-trigger:hover .video-play { background: var(--green); }
.video-play::before { content: ""; margin-left: .25rem; border-top: .57rem solid transparent; border-bottom: .57rem solid transparent; border-left: .85rem solid #fff; }
.video-pagination { display: flex; justify-content: center; margin-top: 1.35rem; }
.video-privacy, .youtube-note { font-size: .9rem; color: var(--muted); margin-block: .75rem; }
#video-dialog { width: min(900px,calc(100% - 24px)); padding: clamp(.85rem,3vw,1.4rem); max-width: none; }
#player-title { font-size: clamp(1.15rem,3vw,1.75rem); overflow-wrap: anywhere; }
.video-player { aspect-ratio: 16/9; min-height: 200px; background: #151915; }
.video-player iframe { width: 100%; height: 100%; min-height: inherit; display: block; border: 0; }
.videos-admin-box { padding: clamp(1rem,3vw,1.75rem); margin-top: 1.5rem; }
.videos-admin-box h2 { font-size: clamp(1.45rem,2vw,1.9rem); margin-bottom: .7rem; }
.youtube-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; margin-block: 1rem; }
.youtube-toolbar label { flex: 1 1 16rem; max-width: 34rem; }
.youtube-field, .youtube-toolbar label { display: grid; gap: .3rem; font-weight: 700; }
.youtube-field { margin-block: .8rem; }
.youtube-field input, .youtube-field select, .youtube-toolbar input, .youtube-toolbar select {
  width: 100%; min-height: 42px; background: #fff; border: 1px solid #a7b6a9; border-radius: 6px; padding: .55rem .65rem; font-weight: 400;
}
.youtube-preview { display: grid; grid-template-columns: minmax(170px, 1fr) 2fr; gap: 1rem; align-items: start; max-width: 960px; }
.youtube-preview img { border-radius: .45rem; }
.youtube-description { max-height: 12rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .55rem; }
.youtube-list { display: grid; gap: .75rem; margin-block: .85rem; }
.youtube-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .6rem 1rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.youtube-row h3 { overflow-wrap: anywhere; }
.youtube-row .youtube-note { margin-block: .25rem; }
.youtube-row-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.youtube-row-actions .pills { min-height: 38px; font-size: .87rem; }
.youtube-check { display: flex; align-items: center; gap: .55rem; margin-block: 1rem; }
.youtube-error { color: #972322; font-weight: 700; }
@media (max-width: 1050px) { .video-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 640px) { .video-grid, .youtube-preview, .youtube-row { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 790px) {
  .video-page .nav nav.open { display: flex; }
}
