/* Video browsing extends the existing cream/ink editorial system. */
#video-filters[hidden],.video-view-controls[hidden]{display:none!important}
#video-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(10rem,.4fr);gap:1rem;align-items:end;margin:2rem 0 1rem}
#video-filters label{display:grid;gap:.5rem;font-size:.9rem}
#video-filters input,#video-filters select{width:100%;min-width:0;min-height:48px;padding:.7rem .8rem;border:1px solid #52606b;border-radius:0;background:#fffdf8;color:#101820;font:400 1rem/1.5 Inter,Arial,sans-serif}
.video-view-controls{display:flex;align-items:center;flex-wrap:wrap;gap:.75rem;margin:1rem 0}
#video-layout,#video-previous,#video-next,[data-play-video]{min-height:44px;padding:.7rem 1rem;border:1px solid #101820;border-radius:0;background:#101820;color:#f7f4ec;font:400 .95rem/1.5 Inter,Arial,sans-serif;cursor:pointer}
#video-previous,#video-next{background:#fffdf8;color:#101820}
#video-layout:disabled,#video-previous:disabled,#video-next:disabled{opacity:.55;cursor:default}
#video-count{font-size:.9rem;line-height:1.6;max-width:70ch;min-height:1.6em}
#video-list{display:grid;gap:1.5rem;margin:2rem 0;min-width:0}
#video-list .video-card{min-width:0;border:1px solid #bdc7c9;background:#fffdf8;color:#101820;padding:clamp(1rem,3vw,2rem);scroll-margin-top:1rem}
#video-list .video-card[hidden]{display:none!important}
#video-list .video-card h2{margin:0 0 1rem;font:400 clamp(1.9rem,4vw,3rem)/1.12 "Cormorant Garamond",Georgia,serif;letter-spacing:-.025em;overflow-wrap:anywhere;text-wrap:balance}
#video-list .video-card p{font-size:.95rem;line-height:1.65;overflow-wrap:anywhere}
#video-list .video-card a{text-underline-offset:.2em;text-decoration-thickness:1px}
.video-player-slot:empty{display:none}
.video-player-slot{margin:1rem 0;min-width:200px;max-width:100%;background:#101820}
/* YouTube requires a viewport of at least 200 × 200, including narrow phones. */
.video-player-slot iframe{display:block;width:100%;height:auto;min-width:200px;min-height:200px;aspect-ratio:16/9;border:0}
.video-card[data-video-type="short"] .video-player-slot{width:min(100%,25rem);margin-left:auto;margin-right:auto}
.video-card[data-video-type="short"] .video-player-slot iframe{aspect-ratio:9/16}
/* Proximity snapping lets people stop anywhere and leave the feed normally. */
#video-list[data-layout="scroll"]{display:block;max-height:85vh;max-height:85svh;overflow-y:auto;scroll-snap-type:y proximity;border:1px solid #7a8c97;background:#e8edf0;scroll-padding:.75rem;padding:.75rem;scroll-behavior:auto}
#video-list[data-layout="scroll"] .video-card{scroll-snap-align:start;margin-bottom:1rem;min-height:min(36rem,72svh);display:flex;flex-direction:column;align-items:flex-start}
#video-list[data-layout="scroll"] .video-card:last-child{margin-bottom:0}
#video-list[data-layout="scroll"] .video-card h2{font-size:clamp(1.7rem,3.2vw,2.6rem)}
#video-list[data-layout="scroll"] .video-card[data-video-type="short"] .video-player-slot{width:min(100%,22rem);width:min(100%,22rem,calc(58svh * 9 / 16));align-self:center}
#video-list :focus-visible,#video-filters :focus-visible,.video-view-controls :focus-visible,#video-list:focus-visible{outline:3px solid #225779;outline-offset:4px}
@media(max-width:600px){#video-filters{grid-template-columns:1fr}#video-list[data-layout="scroll"]{padding:.5rem}#video-list .video-card{padding:1rem}#video-list[data-layout="scroll"] .video-card{padding:.5rem}.video-view-controls{align-items:stretch}.video-view-controls button{flex:1 1 8rem}}
@media(prefers-reduced-motion:reduce){#video-list[data-layout="scroll"]{scroll-snap-type:none;scroll-behavior:auto}}
@media print{#video-filters,.video-view-controls,[data-play-video],.video-player-slot{display:none!important}#video-list[data-layout="scroll"]{max-height:none;overflow:visible;display:block;border:0;padding:0}#video-list .video-card{break-inside:avoid;background:white;color:black}#video-list .video-card[hidden]{display:none!important}}
