/* The tape is intentionally faint. Scanlines grade the scenery, never the text. */
#menu-film { position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; background: #080d14; visibility: hidden; }
#menu-film.active { visibility: visible; }
#ui { z-index: 2; }
.film-still { position: absolute; inset: -3%; background-position: 65% 50%; background-size: cover; opacity: 0; transition: opacity 1.4s ease; filter: grayscale(1); }
.film-still.on { opacity: .38; }
#menu-film video { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; opacity: .14; filter: grayscale(1) contrast(1.2); mix-blend-mode: screen; }
.film-grade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,9,17,.78), rgba(8,16,27,.25) 65%, rgba(4,8,14,.3)), radial-gradient(ellipse at 60% 45%, transparent 20%, rgba(0,0,0,.7)); }
.film-lines { position: absolute; inset: 0; opacity: .22; background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,.55) 2px 3px); }
.film-lines::after { content: ''; position: absolute; left: 0; right: 0; height: 12%; top: -15%; background: linear-gradient(transparent, rgba(201,221,235,.09), transparent); animation: tape-track 14s linear infinite; }
@keyframes tape-track { to { top: 110%; } }
.film-ui { --panel: rgba(8,15,24,.65); --line: rgba(178,205,223,.18); --muted: #a1adbb; }
.film-ui .topbar { background: rgba(5,10,17,.74); backdrop-filter: none; box-shadow: none; }
.film-ui .brand { background: none; color: #eef4f7; letter-spacing: 3px; }
.film-ui .nav.on { border-bottom-color: #84c5e2; text-shadow: none; }
.film-ui .panel { backdrop-filter: none; }
.film-ui .panel::before, .film-ui .card::before, .film-ui .slot::before { filter: grayscale(1); opacity: .35; }
.film-ui .btn { background: rgba(18,31,45,.75); box-shadow: none; border: 1px solid rgba(177,208,230,.22); }
.film-ui .btn.primary { background: #d8e6ed; color: #0a1620; border-color: #d8e6ed; box-shadow: none; }
.film-ui .btn.primary:hover { background: #fff; }
.film-ui .btn.ghost { background: rgba(6,14,22,.4); }
.film-ui .btn.danger { background: rgba(100,22,34,.8); }
.film-ui .btn:hover:not(:disabled) { border-color: #a6d7ed; }
.film-ui .c-list { background: rgba(5,10,16,.62); border-right-color: rgba(177,208,230,.16); }
.film-ui .c-head, .film-ui .hero-loc, .film-ui .c-item.sel .c-tier { color: #98cce2; }
.film-ui .c-item.sel { background: linear-gradient(90deg, rgba(131,193,219,.14), transparent); border-left-color: #98cce2; }
.film-ui .hero-shade { background: linear-gradient(0deg, rgba(4,9,15,.72), transparent 85%); }
.film-ui #heroCv { display: none; }
.film-ui .hero-title, .film-ui .res-h { text-shadow: 0 3px 22px #000; }
/* Remove the legacy opaque results gradients so the shared film shows through. */
.film-ui .results, .film-ui .results.lose { background: transparent; }
.film-ui .hero-diff { background: rgba(6,13,22,.62); backdrop-filter: none; }
.film-ui .intel span { border-left-color: #98cce2; }
.film-ui .tag:not(.warn):not(.ghosty) { background: #d8e6ed; color: #12222d; }
.film-ui .loading-screen { background: transparent; }
.film-ui .ls-bp { display: none; }
.film-ui .ls-shade { background: linear-gradient(0deg, rgba(4,8,14,.85), transparent); }
.film-ui .modal { background: rgba(2,6,12,.55); }
@media (prefers-reduced-motion: reduce) { .film-lines::after { animation: none; } .film-still { transition: none; } }

/* ---- VHS pass: chroma fringe, slow drift on the stills, OSD, tracking glitch ---- */
.film-still { filter: grayscale(1) url(#vhs-chroma); animation: film-drift 46s ease-in-out infinite alternate; }
@keyframes film-drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.09) translate(-1.6%, -0.8%); } }
#menu-film.glitch .film-still.on { transform: translateX(6px) skewX(-1.2deg); filter: grayscale(1) url(#vhs-chroma) brightness(1.25); transition: none; }
#menu-film.glitch video { transform: translateX(-4px); }
.film-glitch { position: absolute; left: 0; right: 0; height: 7%; top: -10%; opacity: 0; background: linear-gradient(transparent, rgba(220,235,245,.16) 40%, rgba(255,40,80,.07) 60%, transparent); mix-blend-mode: screen; }
#menu-film.glitch .film-glitch { opacity: 1; top: var(--gy, 40%); }
.film-osd { position: absolute; right: 26px; bottom: 22px; display: flex; gap: 18px; font: 600 13px 'Courier New', monospace; letter-spacing: 2px; color: rgba(232,240,246,.4); text-shadow: 2px 0 rgba(255,40,80,.45), -2px 0 rgba(60,170,255,.45); }
.film-osd .osd-play { animation: osd-blink 2.4s steps(1) infinite; }
@keyframes osd-blink { 50% { opacity: .25; } }
/* a little of the original palette back: gold for where you are, mint for go */
.film-ui .nav.on { border-bottom-color: #ffd23d; }
.film-ui .c-item.sel { border-left-color: #ffd23d; }
.film-ui .c-head, .film-ui .hero-loc { color: #e8c86a; }
.film-ui .btn.primary:hover { box-shadow: 0 0 0 2px #ffd23d inset; }
.film-ui .intel span { border-left-color: #46d6a0; }
.film-ui .res-h { color: #fff; }
.film-ui .results.win .res-h { text-shadow: 0 3px 22px #000, 0 0 18px rgba(70,214,160,.35); }
.film-ui .results.lose .res-h { text-shadow: 0 3px 22px #000, 0 0 18px rgba(255,46,77,.35); }
@media (prefers-reduced-motion: reduce) { .film-still { animation: none; } .film-osd .osd-play { animation: none; } }
