/* The films section of the home page (board ganiri-home, E-826): the player 16:9 with rounded corners, the title of the
   current film with the "Captions" checkbox, the captions box, the grid of the six films. Together with
   src/components/films.mjs and src/static/player.js this is the whole section; it can be replaced as one block. */

.films{display:flex;flex-direction:column;gap:32px;min-width:0}
.pl{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:28px;align-items:start;min-width:0}
.pl-main,.pl-side{display:flex;flex-direction:column;gap:14px;min-width:0}
.stage{box-sizing:border-box;position:relative;width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:20px;background:var(--color-background-inverse);border:var(--border-width-default) solid var(--color-border-subtle)}
.stage video{display:block;width:100%;height:100%;object-fit:contain;background:var(--color-background-inverse)}
.stage video:focus-visible{outline-offset:-3px}
/* the red play button over the film: a light and a dark ring keep its edge at 3:1 against any frame (E-596) */
.bigplay{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:inline-flex;align-items:center;gap:var(--space-tight);min-height:56px;padding:0 var(--space-loose);border:0;border-radius:var(--radius-full);background:var(--color-action-primary);color:var(--color-text-inverse);font:var(--typography-button);cursor:pointer;box-shadow:0 0 0 2px var(--color-background-page);outline:2px solid var(--color-text-primary);outline-offset:2px}
.bigplay:hover{background:var(--color-action-primary-hover)}
.gp .bigplay:focus-visible{outline:3px solid var(--color-border-focus);outline-offset:2px}
.bigplay svg{width:20px;height:20px}
.loading{position:absolute;left:var(--space-regular);top:var(--space-regular);padding:var(--space-hairline) var(--space-tight);border-radius:var(--radius-interactive);background:var(--color-background-inverse);color:var(--color-text-inverse);font:var(--typography-caption)}
.fallback{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--space-regular);padding:var(--space-loose);background:var(--color-background-surface);color:var(--color-text-primary);text-align:center}
.now{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px 16px}
.now-title{font:var(--typography-heading-3)}
.capsw{position:relative;display:inline-flex;align-items:center;gap:10px;min-height:44px;font:600 16px/1.45 "Barlow",system-ui,sans-serif;cursor:pointer}
.capsw input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.cbox{flex:none;width:20px;height:20px;box-sizing:border-box;border:2px solid var(--color-text-primary);border-radius:4px;display:inline-flex;align-items:center;justify-content:center}
.capsw input:checked + .cbox{background:var(--color-text-primary)}
.capsw input:checked + .cbox::after{content:"";width:10px;height:5px;border-left:2px solid var(--color-background-page);border-bottom:2px solid var(--color-background-page);transform:translateY(-1px) rotate(-45deg)}
.gp .capsw:has(input:focus-visible){outline:3px solid var(--color-border-focus);outline-offset:2px;border-radius:var(--radius-interactive)}
/* the captions box keeps its height (two lines) so nothing under it moves while the cues change */
.capbox{box-sizing:border-box;display:flex;align-items:center;min-height:84px;margin:0;padding:16px 20px;border-radius:14px;background:#0a0a09;color:#eeede6;border:var(--border-width-default) solid var(--color-border-subtle);font:600 22px/1.35 "Barlow",system-ui,sans-serif;white-space:pre-line}
.listhead{display:flex;justify-content:space-between;align-items:baseline;flex-wrap:wrap;gap:4px 16px}
.listhead h2{font:var(--typography-heading-3)}
.listhead p{font:var(--typography-caption)}
.grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cell{display:flex}
.card{display:flex;flex-direction:column;gap:8px;box-sizing:border-box;width:100%;height:100%;padding:14px 16px;text-align:left;border:var(--border-width-default) solid var(--color-border-subtle);border-radius:16px;background:var(--color-background-raised);color:var(--color-text-primary);font:var(--typography-body);cursor:pointer;transition:border-color 160ms ease,box-shadow 160ms ease}
.card:hover{background:var(--color-background-surface)}
.card[aria-pressed="true"]{border:2px solid var(--color-text-primary);padding:13px 15px}
.card .top{display:flex;align-items:center;gap:10px;width:100%}
.card .name{flex:1;min-width:0;font:700 22px/1.2 "Barlow",system-ui,sans-serif}
.card .len{flex:none;font:700 16px/1.45 "Barlow",system-ui,sans-serif}
.card .line{font:var(--typography-caption);color:var(--color-text-secondary)}
.mk{flex:none;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:var(--color-text-primary);color:var(--color-background-page);font:800 18px/1 "Barlow",system-ui,sans-serif}
.mk[data-film="trust-layer"]{font-size:15px}
.mk[data-film="ganiri"]{background:#d7263d;color:#fff}
.mk[data-film="ogmira"]{background:#7e3fb6;color:#fff}
.mk[data-film="crux"]{background:#f08a00;color:#151515}
.mk[data-film="tokenmint"]{background:#c9a100;color:#151515}
/* without JavaScript: every film as a plain player */
.nojs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-section) var(--space-loose)}
.nojs-film{display:flex;flex-direction:column;gap:var(--space-tight);min-width:0}
.nojs-film video{display:block;width:100%;aspect-ratio:16/9;background:var(--color-background-inverse);border-radius:20px}
/* stacked (the list under the box): the box keeps one height for every cue, so nothing under it moves; beside the list the list is the taller column */
@media (max-width:1023px){.pl{grid-template-columns:minmax(0,1fr)}.capbox{min-height:calc(4lh + 32px)}}
@media (max-width:640px){
.grid{grid-template-columns:minmax(0,1fr)}
.nojs{grid-template-columns:minmax(0,1fr)}
.stage,.nojs-film video{border-radius:14px}
.capbox{min-height:calc(5lh + 32px)}
}
