.mem-films { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr)); gap: 16px; }
.mem-film { min-width: 0; }
.mem-film__open {
    display: grid; grid-template-columns: minmax(120px, .84fr) minmax(0, 1fr); height: 100%;
    border: 1px solid var(--mem-line); border-radius: 16px; overflow: hidden;
    color: var(--mem-copy); background: linear-gradient(115deg, #fff 55%, #f3f8fb); text-decoration: none;
}
.mem-film__poster {
    position: relative; display: grid; place-items: center; min-height: 118px; aspect-ratio: 16/9;
    align-self: stretch; width: 100%; height: 100%; overflow: hidden; isolation: isolate;
    background: linear-gradient(135deg,#344c58,#192a32);
}
.mem-film__poster::before {
    content: ''; position: absolute; inset: 9px 10px; z-index: -1; border-block: 4px dotted #b3c4cb65;
}
.mem-film__poster img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.mem-film__play {
    display: grid; place-items: center; width: 46px; aspect-ratio: 1; padding-inline-start: 3px;
    border-radius: 50%; border: 1px solid #fffd; background: #16282dcf; color: #fff;
}
.mem-film__play::after { content:''; border-block: 7px solid transparent; border-inline-start: 11px solid currentColor; }
.mem-film__info { display: flex; flex-direction: column; align-items: start; justify-content: center; gap: 5px; padding: clamp(14px,2.3vw,27px); overflow-wrap: anywhere; }
.mem-film__info strong { font-size: clamp(20px,1.75vw,26px); line-height: 1.12; color: var(--mem-ink); }
.mem-film__info > span { font-size: 16px; line-height: 1.32; }
.mem-film__watch { display: flex; gap: .45em; align-items: center; margin-top: 5px; font-weight: 550; color: var(--mem-accent); }
.mem-film__open:focus-visible { outline: 2px solid var(--mem-accent); outline-offset: 3px; }
@media (hover: hover) { .mem-film__open:hover { border-color: var(--mem-accent); } .mem-film__open:hover .mem-film__play { background: #236fa6; } }
.mem-film-viewer {
    position: fixed; inset: 0; margin: auto; padding: 0; width: min(960px, calc(100% - 28px)); max-width: none;
    max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; overscroll-behavior: contain;
    border: 1px solid #d4dfe4; border-radius: 20px; background: #fff; color: #47433f;
    box-shadow: 0 16px 75px #16232b3d;
}
.mem-film-viewer::backdrop { background: #172026af; }
.mem-film-viewer[open] { display: block; }
html:has(.mem-film-viewer[open]) { overflow: hidden; }
/* The legacy overlay manager restores body overflow inline. */
body:has(.mem-film-viewer[open]) { overflow: hidden !important; }
.mem-film-viewer__head {
    position: static; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: auto; height: auto; padding: 12px 16px; background: #fff; color: inherit;
}
.mem-film-viewer .mem-film-viewer__head h2 { margin: 0; font-size: clamp(19px,2vw,26px); line-height: 1.15; color: inherit; }
.mem-film-viewer__head form { margin: 0; flex: none; }
.mem-film-viewer__close {
    display: grid; place-items: center; position: relative; width: 40px; height: 40px; margin: 0; padding: 0;
    border: 1px solid #9aa8ad; border-radius: 50%; background: transparent; color: #65757c; cursor: pointer;
}
.mem-film-viewer__close:where(:hover,:focus-visible) { border-color: #4d5d63; }
.mem-film-viewer__close .mem-close-mark { position: relative; width: 14px; height: 14px; display: block; }
.mem-film-viewer__close .mem-close-mark::before, .mem-film-viewer__close .mem-close-mark::after {
    content: ''; position: absolute; top: 50%; left: 50%; width: 100%; height: 1px; background: currentColor; transform: translate(-50%,-50%) rotate(45deg);
}
.mem-film-viewer__close .mem-close-mark::after { transform: translate(-50%,-50%) rotate(-45deg); }
.mem-film-viewer__body { display: grid; justify-items: end; }
.mem-film-viewer__body > iframe, .mem-film-native video {
    display: block; width: 100%; height: auto; aspect-ratio: 16/9; max-height: 73vh; max-height: 73dvh;
    object-fit: contain; border: 0; background: #191b1c;
}
.mem-film-native { width: 100%; }
.mem-film-native__bar {
    display: flex; align-items: center; gap: clamp(8px, 1.5vw, 18px); padding: 5px 12px; background: #f4f8fa; color: #47433f;
}
.mem-film-native__bar button {
    display: grid; place-items: center; flex: none; width: 42px; height: 42px; padding: 0; color: #266a98;
    border: 1px solid #c9dbe5; border-radius: 50%; background: #fff; cursor: pointer;
}
.mem-film-native__bar button[hidden] { display: none; }
.mem-film-native__bar button:focus-visible, .mem-film-native__bar input:focus-visible { outline: 2px solid #2975a7; outline-offset: 2px; }
.mem-film-native__toggle > span { margin-left: 3px; border-block: 6px solid transparent; border-inline-start: 9px solid currentColor; }
.mem-film-native__toggle[data-playing] > span { margin: 0; width: 9px; height: 12px; border: solid currentColor; border-width: 0 3px; }
.mem-film-native__bar input { flex: 1; min-width: 0; width: auto; height: 36px; margin: 0; padding: 0; accent-color: #236fa6; cursor: pointer; }
.mem-film-native__bar [data-film-time] { flex: none; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mem-film-native:fullscreen { display: flex; flex-direction: column; justify-content: center; background: #191b1c; }
.mem-film-native:fullscreen video { min-height: 0; max-height: none; width: 100%; flex: 1; }
.mem-film-viewer__source, .mem-film-viewer__status { padding: 10px 18px; font-size: 16px; color: var(--arc-accent,#236fa6); }
@media (min-width: 800px) {
    .mem-film:only-child .mem-film__open { grid-template-columns: minmax(190px, 24%) minmax(0, 1fr); }
    .mem-film:only-child .mem-film__info {
        display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: center; align-items: center;
        gap: 6px 24px; padding-inline: clamp(22px, 2.8vw, 42px);
    }
    .mem-film:only-child .mem-film__info > strong, .mem-film:only-child .mem-film__info > span:not(.mem-film__watch) { grid-column: 1; }
    .mem-film:only-child .mem-film__watch {
        grid-column: 2; grid-row: 1 / span 2; margin: 0; padding: 9px 16px;
        border: 1px solid #c5d9e6; border-radius: 99px; background: #fff;
    }
}
@media (max-width: 520px) {
    .mem-film__open { grid-template-columns: 1fr; }
    .mem-film__poster { min-height: 0; }
    .mem-film__info { padding: 14px 16px; }
    .mem-film-viewer { width: calc(100% - 16px); border-radius: 14px; }
    .mem-film-viewer__head { padding: 8px 10px 8px 14px; }
    .mem-film-viewer__close { width: 36px; height: 36px; }
}
