/* YouTube playlist gallery — shared by Speaking and The Context.
   A stage player + a carousel of every video in the playlist. YouTube populates
   the list (see davidorban_playlist_videos()); clicking a card plays it on the
   stage, keeping the playlist queue intact. */
.yt-gallery{margin-block-start:1.5rem}

/* The stage stays modest: it is the player, not a hero. */
.yt-gallery__stage{max-width:760px;margin-inline:auto;aspect-ratio:16/9;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--surface-2)}
.yt-gallery__stage iframe{display:block;width:100%;height:100%;border:0}

.yt-gallery .carousel{margin-block-start:2rem}

.yt-card{display:block;text-decoration:none;color:inherit;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--surface);transition:border-color .25s,background .25s,transform .25s}
.yt-card:hover,.yt-card:focus-visible{background:var(--surface-2);border-color:var(--ink-faint);transform:translateY(-2px)}
.yt-card[aria-current="true"]{border-color:var(--accent);background:var(--surface-2)}

.yt-card__thumb{position:relative;display:block;aspect-ratio:16/9;overflow:hidden;background:var(--surface-2)}
/* YouTube's hqdefault is 4:3 with letterbox bars; scale to fill the 16:9 frame. */
.yt-card__thumb img{width:100%;height:100%;object-fit:cover;transform:scale(1.35);display:block}
.yt-card__play{position:absolute;inset-block-end:.6rem;inset-inline-end:.6rem;display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:rgba(0,0,0,.72);color:#fff;backdrop-filter:blur(2px)}
.yt-card:hover .yt-card__play,.yt-card:focus-visible .yt-card__play{background:var(--accent)}

.yt-card__title{display:block;padding:.9rem 1rem 1.05rem;font-size:var(--step--1);line-height:1.4;font-weight:600;color:var(--ink-soft)}
.yt-card:hover .yt-card__title{color:var(--ink)}

@media(prefers-reduced-motion:reduce){.yt-card{transition:none}.yt-card:hover,.yt-card:focus-visible{transform:none}}
