.media-page .media-albums {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto 30px;
}
.media-page .media-albums a {
    color: #d7e7fa;
    padding: 10px 16px;
    border: 1px solid #ffffff35;
    border-radius: 12px;
    text-decoration: none;
    line-height: 1.5;
}
.media-page .media-albums a[aria-current=page] { border-color: #58cdff; background: #12608355; }
.media-page .media-albums span { white-space: nowrap; }
.media-page .media-album-group,
.media-page .media-video-grid { width: min(1200px, calc(100% - 40px)); margin: 0 auto 42px; }
.media-page .media-album-heading {
    margin: 0 0 18px;
    color: #f4f8ff;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
}
.media-page .media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    width: 100%;
    max-width: none;
    margin: 0;
}
.media-page .media-card {
    min-width: 0;
    align-self: start;
    border: 1px solid #ffffff25;
    border-radius: 14px;
    background: #0c2643;
    overflow: hidden;
}
.media-page .media-photo-card.is-album-photo { background: #081d34; }
.media-page .media-image-button {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 0;
    overflow: hidden;
    background: #061426;
    cursor: zoom-in;
}
.media-page .media-image-button img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
}
.media-page .media-card-copy h2 { margin: 18px 18px 8px; font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; }
.media-page .media-caption { margin: 0; padding: 0 18px 18px; color: #bdcde2; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.media-page .media-video-frame { width: 100%; margin-inline: auto; background: #080e20; }
.media-page .media-video-frame.is-landscape { aspect-ratio: 16 / 9; }
.media-page .media-video-frame.is-portrait { aspect-ratio: 9 / 16; max-width: 360px; }
.media-page .media-video-frame .media-video { width: 100%; height: 100%; aspect-ratio: auto; border: 0; display: block; }
.media-page .media-video-frame > button {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    padding: 16px;
    color: white;
    background: linear-gradient(140deg, #0d2c48, #221130);
    border: 0;
    cursor: pointer;
    font: inherit;
    overflow: hidden;
}
.media-page .media-video-frame > button > img,
.media-page .media-video-frame > button > .media-video-cover-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.media-page .media-video-frame > button > img { display: block; object-fit: cover; }
.media-page .media-video-frame.is-portrait > button > img { object-fit: contain; }
.media-page .media-video-frame > button > .media-video-cover-placeholder { background: linear-gradient(140deg, #0d2c48, #221130); }
.media-page .media-video-play-label {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #020916c9;
    box-shadow: 0 8px 28px #0008;
}
.media-page .media-video-play-label span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #58cdff; color: #051325; font-size: 22px; }
.media-page .media-video-play-label strong { font-size: 15px; }
.media-page .media-video-fallback { margin: 10px 14px 0; text-align: center; }
.media-page .media-video-fallback a,
.gallery-viewer .media-video-external { color: #9ae8ff; text-decoration: underline; }
.gallery-viewer .media-video-frame { position: relative; }
.gallery-viewer [data-gallery-content].media-video-frame {
    display: block;
    min-height: 0;
    padding: 0;
    align-self: center;
    justify-self: center;
}
.gallery-viewer .media-video-external {
    position: absolute;
    right: 12px;
    bottom: 10px;
    z-index: 2;
    padding: 7px 10px;
    border-radius: 8px;
    background: #020916d9;
    font-size: 13px;
}
.media-page .media-enlarge {
    display: block;
    margin: 14px auto;
    padding: 10px 18px;
    background: #ffffff12;
    border: 1px solid #ffffff35;
    border-radius: 8px;
    color: white;
    cursor: pointer;
}
.media-page .media-instagram { width: 100%; max-width: 540px; margin-inline: auto; overflow-x: auto; }
.media-page .media-instagram > button {
    display: block;
    margin: 24px auto;
    padding: 16px;
    color: white;
    background: #ffffff12;
    border: 1px solid #ffffff35;
    border-radius: 8px;
    cursor: pointer;
}
.media-page .media-instagram .instagram-media { width: 100%; min-width: 0; max-width: 540px; box-sizing: border-box; margin: 0 auto; }
.media-page .media-instagram p,
.media-page .media-instagram a { color: #d7e7fa; }

body.media-viewer-open { overflow: hidden; }
.gallery-viewer {
    width: min(1180px, 98vw);
    max-width: none;
    max-height: 96dvh;
    margin: auto;
    padding: 0;
    border: 1px solid #486984;
    border-radius: 12px;
    background: #041426;
    color: #f6fbff;
    box-sizing: border-box;
    overflow: hidden;
}
.gallery-viewer::backdrop { background: #010714e8; backdrop-filter: blur(3px); }
.gallery-viewer-shell { display: flex; flex-direction: column; max-height: 96dvh; min-height: min(620px, 90dvh); }
.gallery-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 58px;
    padding: 8px 12px 8px 20px;
    border-bottom: 1px solid #284159;
}
.gallery-viewer-header [data-gallery-counter] { font-weight: 800; letter-spacing: .04em; }
.gallery-viewer-header [data-gallery-close] {
    min-width: 96px;
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid #7091ac;
    border-radius: 7px;
    color: #fff;
    background: #173955;
    font: inherit;
    cursor: pointer;
}
.gallery-viewer-stage {
    position: relative;
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) 60px;
    align-items: stretch;
    min-height: 0;
    flex: 1 1 auto;
}
.gallery-viewer [data-gallery-content] {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 240px;
    padding: 14px;
    overflow: hidden;
}
.gallery-viewer [data-gallery-content][aria-busy=true]::before {
    content: "Loading full image…";
    color: #bcd0e3;
}
.gallery-viewer [data-gallery-content] > img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(96dvh - 145px);
    margin: auto;
    object-fit: contain;
}
.gallery-viewer .gallery-viewer-nav {
    position: relative;
    z-index: 2;
    width: 52px;
    min-height: 52px;
    align-self: center;
    justify-self: center;
    padding: 0;
    border: 1px solid #91c9e5;
    border-radius: 50%;
    background: #061b30e8;
    color: #fff;
    font: 400 42px/1 Arial, sans-serif;
    cursor: pointer;
}
.gallery-viewer .gallery-viewer-nav[hidden] { display: none; }
.gallery-viewer #gallery-viewer-caption {
    margin: 0;
    padding: 12px 20px 16px;
    border-top: 1px solid #284159;
    color: #d7e7fa;
    line-height: 1.5;
    text-align: center;
    overflow-wrap: anywhere;
}
.gallery-viewer #gallery-viewer-caption[hidden] { display: none; }
.gallery-viewer[data-mode=video] [data-gallery-counter],
.gallery-viewer[data-mode=video] .gallery-viewer-nav { visibility: hidden; }
.gallery-viewer .media-video-frame.is-portrait { width: min(360px, 100%, calc(72vh * 9 / 16)); }
.gallery-viewer .media-video-frame.is-landscape { width: min(960px, 100%); }
.gallery-viewer .media-instagram { max-height: calc(96dvh - 145px); overflow: auto; }
.media-page .media-image-button:focus-visible,
.media-page .media-enlarge:focus-visible,
.media-page .media-video-frame button:focus-visible,
.gallery-viewer button:focus-visible { outline: 3px solid #58cdff; outline-offset: 3px; }

@media (max-width: 900px) {
    .media-page .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 640px) {
    .media-page { padding-inline: 0; }
    .media-page .section-header,
    .media-page .media-tabs,
    .media-page .media-albums { margin-inline: 16px; }
    .media-page .media-tabs a { padding: 10px 22px; }
    .media-page .media-albums a { font-size: 14px; }
    .media-page .media-album-group,
    .media-page .media-video-grid { width: calc(100% - 24px); margin-bottom: 30px; }
    .media-page .media-album-heading { margin-bottom: 12px; font-size: 24px; }
    .media-page .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .media-page .media-video-grid { grid-template-columns: 1fr; }
    .media-page .media-card { border-radius: 9px; }
    .media-page .media-card-copy h2 { margin: 12px 12px 6px; font-size: 16px; }
    .media-page .media-caption { padding: 0 12px 12px; font-size: 13px; }
    .gallery-viewer { width: 100vw; max-height: 100dvh; border: 0; border-radius: 0; }
    .gallery-viewer-shell { min-height: 100dvh; max-height: 100dvh; }
    .gallery-viewer[data-mode=video] .gallery-viewer-shell { min-height: 0; }
    .gallery-viewer[data-mode=video] .gallery-viewer-stage { flex: 0 0 auto; }
    .gallery-viewer-header { min-height: 54px; padding-inline: 14px 8px; }
    .gallery-viewer-stage { grid-template-columns: minmax(0, 1fr); }
    .gallery-viewer [data-gallery-content] { padding: 8px; }
    .gallery-viewer [data-gallery-content] > img { max-height: calc(100dvh - 130px); }
    .gallery-viewer .gallery-viewer-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 46px;
        min-height: 46px;
        background: #031425d9;
    }
    .gallery-viewer .gallery-viewer-prev { left: 8px; }
    .gallery-viewer .gallery-viewer-next { right: 8px; }
    .gallery-viewer #gallery-viewer-caption { padding: 10px 16px 14px; }
}
@media (max-width: 340px) {
    .media-page .media-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .gallery-viewer * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.cricket-design .media-page.media-page--hero-gap { padding-top: 48px; }
@media (max-width: 640px) { .cricket-design .media-page.media-page--hero-gap { padding-top: 32px; } }
