/* Only the school-year filmstrip and its native dialog use these rules. */
[data-luisen-filmstrip][hidden] { display: none !important; }
[data-luisen-filmstrip] .ls-filmstrip-source-link { display: block; width: 100%; }
.ls-filmstrip {
    --film-accent: #a51f2d;
    --film-screen: #202426;
    --film-light: #fffdf7;
    min-width: 0;
    width: 100%;
    grid-column: 1 / -1;
    margin-block: 1.5rem 2rem;
    padding: clamp(0.75rem, 2vw, 1.25rem);
    border: 1px solid #e5ded3;
    border-radius: 14px;
    background: #fbfaf7;
}
.ls-filmstrip *, .ls-filmstrip-dialog * { box-sizing: border-box; }
.ls-filmstrip, .ls-filmstrip-dialog { box-sizing: border-box; }
.ls-filmstrip-stage, .ls-filmstrip-dialog-stage { position: relative; background: var(--film-screen); touch-action: pan-y pinch-zoom; }
.ls-filmstrip-stage { height: clamp(260px, 47vw, 440px); overflow: hidden; border-radius: 9px; }
.ls-filmstrip-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; color: var(--film-light); cursor: zoom-in; }
.ls-filmstrip-photo, .ls-filmstrip-large { display: block; width: 100%; height: 100%; margin: 0; object-fit: contain; opacity: 1; transition: opacity 160ms ease; }
.ls-filmstrip-photo.is-loading, .ls-filmstrip-large.is-loading { opacity: 0.55; }
.ls-filmstrip-expand { position: absolute; top: 14px; right: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid #ffffff44; border-radius: 24px; color: #fffdf7; background: #202426e8; font-size: 0.8rem; font-weight: 600; }
.ls-filmstrip-expand svg { width: 16px; height: 16px; }
.ls-filmstrip-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 9px; border: 1px solid #ffffff55; border-radius: 50%; background: #202426eb; color: #fffdf7; font: inherit; line-height: 1; cursor: pointer; }
.ls-filmstrip-button:hover { background: #42484b; }
.ls-filmstrip-button svg { width: 22px; height: 22px; flex-shrink: 0; }
.ls-filmstrip-previous, .ls-filmstrip-next { position: absolute; z-index: 1; top: 50%; transform: translateY(-50%); }
.ls-filmstrip-previous { left: 12px; }
.ls-filmstrip-next { right: 12px; }
.ls-filmstrip-open:focus-visible, .ls-filmstrip-button:focus-visible, .ls-filmstrip-thumbnail:focus-visible { outline: 3px solid #fffdf7; outline-offset: 3px; box-shadow: 0 0 0 5px #17202c; }
.ls-filmstrip-open:focus-visible { outline-offset: -6px; box-shadow: none; }
.ls-filmstrip-information { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-block: 13px 12px; }
.ls-filmstrip .ls-filmstrip-caption, .ls-filmstrip .ls-filmstrip-count, .ls-filmstrip-dialog .ls-filmstrip-caption, .ls-filmstrip-dialog .ls-filmstrip-count { margin: 0; font-size: 0.82rem; line-height: 1.5; }
.ls-filmstrip-caption { min-width: 0; color: #596473; overflow-wrap: anywhere; }
.ls-filmstrip-count { flex-shrink: 0; color: var(--film-accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ls-filmstrip-thumbnails { position: relative; display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #a51f2d66 transparent; padding: 7px 4px 10px; }
.ls-filmstrip-thumbnail { flex: 0 0 80px; min-width: 44px; min-height: 60px; padding: 3px; border: 2px solid transparent; border-radius: 7px; background: transparent; cursor: pointer; scroll-snap-align: center; }
.ls-filmstrip-thumbnail img { display: block; width: 70px; height: 52px; margin: 0; object-fit: cover; border-radius: 3px; opacity: 0.7; }
.ls-filmstrip-thumbnail:hover img, .ls-filmstrip-thumbnail[aria-selected="true"] img { opacity: 1; }
.ls-filmstrip-thumbnail[aria-selected="true"] { border-color: var(--film-accent); }
.ls-filmstrip-error { margin: 12px 0; font-size: 0.875rem; }
.ls-filmstrip-error[hidden] { display: none; }
.ls-filmstrip-error a { color: inherit; text-decoration: underline; }
.ls-filmstrip-gallery-caption { margin-block-start: 12px; color: #596473; font-size: 0.875rem; line-height: 1.65; }
html.ls-filmstrip-modal-open { overflow: hidden; scrollbar-gutter: stable; }
.ls-filmstrip-dialog {
    --film-accent: #f7b2b4;
    --film-screen: #161b1d;
    --film-light: #fffdf7;
    inset: 16px;
    width: calc(100% - 32px);
    max-width: 1440px;
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
    max-height: 1000px;
    margin: auto;
    padding: 0;
    border: 1px solid #ffffff33;
    border-radius: 14px;
    background: var(--film-screen);
    color: var(--film-light);
    box-shadow: 0 20px 80px #00000055;
    overflow: hidden;
}
.ls-filmstrip-dialog[open] { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
.ls-filmstrip-dialog::backdrop { background: #0a0f11e8; }
.ls-filmstrip-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 12px 18px; }
.ls-filmstrip-dialog-title { min-width: 0; margin: 0; font-size: 0.95rem; overflow-wrap: anywhere; }
.ls-filmstrip-close { position: static; border: 0; border-radius: 6px; background: transparent; font-size: 0.875rem; }
.ls-filmstrip-dialog-stage { min-width: 0; min-height: 0; padding-inline: 64px; }
.ls-filmstrip-dialog-stage .ls-filmstrip-large { min-height: 0; max-height: 100%; }
.ls-filmstrip-dialog-footer { min-width: 0; padding: 0 22px 10px; background: #111617; }
.ls-filmstrip-dialog .ls-filmstrip-caption { color: #e3e0d8; }
.ls-filmstrip-dialog .ls-filmstrip-error { color: #fffdf7; }
@media (max-width: 600px) {
    .ls-filmstrip { padding: 10px; border-radius: 10px; }
    .ls-filmstrip-information { gap: 10px; }
    .ls-filmstrip .ls-filmstrip-caption, .ls-filmstrip .ls-filmstrip-count { font-size: 0.75rem; }
    .ls-filmstrip-stage .ls-filmstrip-previous, .ls-filmstrip-stage .ls-filmstrip-next { top: auto; bottom: 10px; transform: none; }
    .ls-filmstrip-stage .ls-filmstrip-previous { left: 10px; }
    .ls-filmstrip-stage .ls-filmstrip-next { right: 10px; }
    .ls-filmstrip-expand { top: 10px; right: 10px; width: 38px; height: 38px; justify-content: center; padding: 8px; }
    .ls-filmstrip-expand span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
    .ls-filmstrip-dialog { inset: 8px; width: calc(100% - 16px); height: calc(100vh - 16px); height: calc(100dvh - 16px); border-radius: 10px; }
    .ls-filmstrip-dialog-header { gap: 10px; padding: 10px; }
    .ls-filmstrip-dialog-title { font-size: 0.85rem; }
    .ls-filmstrip-close { padding: 8px; }
    .ls-filmstrip-close span { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
    .ls-filmstrip-dialog-stage { padding: 0; }
    .ls-filmstrip-dialog-stage .ls-filmstrip-previous, .ls-filmstrip-dialog-stage .ls-filmstrip-next { top: auto; bottom: 12px; transform: none; }
    .ls-filmstrip-dialog-footer { padding: 0 12px 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .ls-filmstrip-photo, .ls-filmstrip-large { transition: none; }
    .ls-filmstrip-thumbnails { scroll-behavior: auto; }
}
@media (forced-colors: active) {
    .ls-filmstrip, .ls-filmstrip-dialog { border-color: CanvasText; }
    .ls-filmstrip-button, .ls-filmstrip-thumbnail[aria-selected="true"] { border-color: Highlight; }
    .ls-filmstrip-photo, .ls-filmstrip-large, .ls-filmstrip-thumbnail img { forced-color-adjust: none; }
    .ls-filmstrip-open:focus-visible, .ls-filmstrip-button:focus-visible, .ls-filmstrip-thumbnail:focus-visible { outline-color: Highlight; box-shadow: none; }
}
