/* 書籍動畫 (/films) is linked only from its own page so none of this enters the homepage bundle.
   Colours come from theme tokens only, so both themes work without overrides. */

.os-films-page {
    max-width: 1320px;
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem;
}

@media (max-width: 620px) {
    .os-films-page {
        padding: 1.25rem 0.85rem 4rem;
    }
}

.os-films-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: clamp(1rem, 2.5vw, 1.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.os-films-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--ifm-color-emphasis-200);
    border-radius: 10px;
    background: var(--ifm-background-surface-color);
}

.os-films-poster {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--ifm-color-emphasis-100);
}

.os-films-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.os-films-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1rem 1.1rem 1.15rem;
}

.os-films-cardKicker {
    margin: 0 0 0.3rem;
    color: var(--esoteric-gold-text);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.os-films-cardTitle {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.4;
}

.os-films-author {
    margin: 0.2rem 0 0;
    color: var(--ifm-color-emphasis-700);
    font-size: 0.88rem;
}

.os-films-text {
    margin: 0.7rem 0 0.85rem;
    color: var(--ifm-color-emphasis-800);
    font-size: 0.95rem;
    line-height: 1.75;
}

.os-films-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    /* Facts and links sit at the foot of every card, so they line up across a row of cards. */
    margin: auto 0 0.9rem;
    padding: 0;
    list-style: none;
}

.os-films-fact {
    margin: 0;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--ifm-color-emphasis-100);
    color: var(--ifm-color-emphasis-800);
    font-size: 0.8rem;
    line-height: 1.6;
    white-space: nowrap;
}

.os-films-actions {
    display: flex;
    padding-top: 0.6rem;
    border-top: 1px solid var(--ifm-color-emphasis-200);
    flex-wrap: wrap;
    gap: 0.5rem 1.1rem;
    align-items: center;
}

.os-films-watch,
.os-films-read {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    font-size: 0.93rem;
    font-weight: 600;
    text-decoration: none;
}

.os-films-watch {
    color: var(--ifm-link-color);
}

.os-films-read {
    color: var(--ifm-font-color-base);
}

.os-films-watch:hover,
.os-films-read:hover {
    text-decoration: underline;
}

.os-films-icon {
    flex: none;
    width: 1.1em;
    height: 1.1em;
}

.os-films-iconSmall {
    flex: none;
    width: 0.85em;
    height: 0.85em;
    opacity: 0.7;
}

.os-films-visuallyHidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
