.team-profile__gallery { min-width: 0; margin-block: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }
.team-gallery__heading { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; padding-right: 2.5rem; }
.team-gallery__heading :is(h3,h4) { margin: 0; font-size: 1.08rem; }
.team-gallery__count { margin-left: auto; color: var(--color-muted); font-size: .8rem; white-space: nowrap; }
.team-gallery__controls { display: flex; gap: .4rem; }
.team-gallery__controls button { width: 2.5rem; height: 2.5rem; border: 1px solid var(--color-control-border); border-radius: 50%; background: transparent; color: var(--color-paper); font: inherit; cursor: pointer; }
.team-gallery__items { display: grid; gap: 1.5rem; }
.team-gallery__item { min-width: 0; margin: 0; }
.team-gallery__item[hidden] { display: none; }
.team-gallery__stage { display: grid; place-items: center; width: 100%; height: clamp(15rem,48vw,29rem); overflow: hidden; border: 1px solid var(--color-border); border-radius: 1rem; background: #09070f; }
.team-gallery__stage > :is(img,video) { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.team-gallery__stage .team-gallery__youtube { position: relative; display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; background: #09070f; }
.team-gallery__youtube > :is(img,iframe) { width: 100%; height: 100%; object-fit: contain; border: 0; }
.team-gallery__youtube .school-embed__activate { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); display: grid; place-items: center; width: 4.5rem; height: 4.5rem; min-height: 0; padding: 0; border: 1px solid #ffffff88; border-radius: 50%; background: var(--button-gradient); color: #fff; font-size: 0; cursor: pointer; }
/* Center the play shape independently of text baselines and grid text nodes. */
.team-gallery__youtube .school-embed__activate::after,
.team-gallery__play::after { content: ''; position: absolute; top: 50%; left: 50%; width: 1.5rem; height: 1.5rem; transform: translate(-50%,-50%); background: currentColor; clip-path: polygon(25% 10%,100% 50%,25% 90%); }
.team-gallery__thumbnails { position: relative; display: flex; gap: .65rem; overflow-x: auto; padding: .4rem .2rem .75rem; margin-top: 1rem; scrollbar-color: var(--color-control-border) transparent; }
.team-gallery__thumbnail { position: relative; flex: 0 0 8rem; display: flex; flex-direction: column; padding: .25rem; border: 1px solid var(--color-border); border-radius: .7rem; color: var(--color-muted); background: var(--color-surface); cursor: pointer; font: inherit; text-align: left; }
.team-gallery__thumbnail img { display: block; width: 100%; height: 4.5rem; border-radius: .45rem; object-fit: cover; }
.team-gallery__placeholder { display: grid; place-items: center; height: 4.5rem; width: 100%; padding: .4rem; border-radius: .45rem; background: linear-gradient(140deg,#291632,#111a29); font-size: .7rem; line-height: 1.4; text-align: center; }
.team-gallery__play { position: absolute; top: 1.5rem; left: 50%; transform: translateX(-50%); width: 2rem; height: 2rem; border-radius: 50%; color: #fff; background: #09070fbf; }
.team-gallery__play::after { width: .9rem; height: .9rem; }
.team-gallery__thumbnail[aria-selected="true"] { border-color: var(--color-brand-text); box-shadow: 0 0 0 1px var(--color-brand-text); color: var(--color-paper); }
.team-gallery__thumbnail:hover, .team-gallery__controls button:hover { background: #95269525; border-color: var(--color-brand-text); }
.team-profile__gallery :is(button,a,[role="tabpanel"]):focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
@media (max-width: 39.99rem) {
    .team-gallery__heading { gap: .6rem; flex-wrap: wrap; }
    .team-gallery__heading :is(h3,h4) { font-size: .95rem; }
    .team-gallery__controls { gap: .25rem; }
    .team-gallery__controls button { width: 2.25rem; height: 2.25rem; }
    .team-gallery__thumbnail { flex-basis: 7rem; }
}
