/* Film recorder: one phone-shaped stage with round glass controls, our yellow for what is selected. */
.film { display: grid; justify-items: center; gap: 14px; padding-bottom: 40px; }
.film-head label { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.film-stage { position: relative; width: min(390px, 92vw); aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #0d0d0d; box-shadow: 0 18px 50px rgba(0,0,0,.25); color: #fff; }
.film-stage.rec { box-shadow: 0 0 0 3px #ff3b30, 0 18px 50px rgba(0,0,0,.25); }
.film-stage:fullscreen { width: auto; height: 100vh; border-radius: 0; margin: auto; }
.film-stage svg { width: 20px; height: 20px; display: block; }
#filmMount canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.film-error { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; gap: 10px; padding: 20px; text-align: center; }
.film-stage button { font: inherit; cursor: pointer; }
body.lab .film-stage button { min-height: 0 !important; box-shadow: none !important; }
body.lab .film-stage .film-round, body.lab .film-stage .film-tool span, body.lab .film-stage .film-side { display: grid; place-items: center; width: 46px; height: 46px; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: rgba(0,0,0,.42) !important; color: #fff !important; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.film-full { position: absolute; top: 14px; right: 14px; z-index: 5; }
.film-tools { position: absolute; top: 72px; left: 14px; right: 14px; z-index: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 18px; }
body.lab .film-stage .film-tool { display: grid; justify-items: center; gap: 4px; padding: 0 !important; border: 0 !important; background: none !important; color: #fff !important; }
.film-tool b { font-size: 14px; font-weight: 700; }
.film-tool small { font-size: 11px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
body.lab .film-stage .film-tool.on span { background: #fff !important; color: #14120E !important; }
.film-panelwrap { position: absolute; left: 14px; right: 14px; top: 182px; z-index: 6; display: grid; gap: 8px; justify-items: center; }
.film-panel { position: relative; width: 100%; box-sizing: border-box; display: grid; gap: 8px; padding: 12px 12px 12px 12px; border-radius: 16px; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
body.lab .film-stage .film-panel textarea, body.lab .film-stage .film-panel select { width: 100%; box-sizing: border-box; border-radius: 10px !important; border: 0 !important; background: rgba(255,255,255,.95) !important; color: #14120E !important; padding: 10px !important; font: inherit; }
.film-pill { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 999px; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body.lab .film-stage .film-pill button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: #fff !important; }
body.lab .film-stage .film-done { justify-self: end; display: grid; place-items: center; width: 36px; height: 36px; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: #fff !important; color: #14120E !important; }
.film-pill b { min-width: 28px; text-align: center; font-size: 14px; }
.film-expo { width: 100%; box-sizing: border-box; padding-left: 14px; } .film-expo input { flex: 1; accent-color: #fff; } .film-expo b { min-width: 36px; }
.film-note { margin: 0; font-size: 12px; text-shadow: 0 1px 3px #000; }
.film-prompt { position: absolute; left: 12%; right: 12%; top: 22%; height: 22%; z-index: 2; overflow: hidden; pointer-events: none; -webkit-mask: linear-gradient(transparent, #000 18%, #000 82%, transparent); mask: linear-gradient(transparent, #000 18%, #000 82%, transparent); }
.film-prompt-text { font: 800 24px/1.3 system-ui, sans-serif; text-align: center; text-shadow: 0 2px 8px rgba(0,0,0,.7); white-space: pre-wrap; padding-top: 18%; }
.film-promptbar { position: absolute; left: 50%; top: 46%; transform: translateX(-50%); z-index: 5; }
.film-live { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(0,0,0,.5); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.film-live i { width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; animation: filmblink 1s infinite; } @keyframes filmblink { 50% { opacity: .2; } }
.film-bottom { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 5; display: grid; justify-items: center; gap: 12px; }
.film-seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; }
.film-zoomseg { background: rgba(0,0,0,.4); }
body.lab .film-stage .film-seg button { padding: 6px 12px !important; border: 0 !important; border-radius: 999px !important; background: transparent !important; color: #fff !important; font-size: 14px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
body.lab .film-stage .film-zoomseg button { width: 34px; height: 34px; padding: 0 !important; font-size: 12px; }
body.lab .film-stage .film-seg button[aria-pressed="true"] { background: #fff !important; color: #14120E !important; text-shadow: none; }
.film-recrow { display: grid; grid-template-columns: 46px auto 46px; align-items: center; gap: 30px; }
body.lab .film-stage .film-side { width: 46px; height: 46px; background: transparent !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
body.lab .film-stage .film-side svg { width: 26px; height: 26px; }
body.lab .film-stage .film-side.on { color: #FFD84D !important; }
body.lab .film-stage .film-rec { display: grid; place-items: center; width: 92px; height: 92px; padding: 0 !important; border: 5px solid rgba(255,255,255,.92) !important; border-radius: 50% !important; background: transparent !important; }
.film-rec i { width: 72px; height: 72px; border-radius: 50%; background: #ff3b30; transition: all .2s; }
.film-rec.on i { width: 34px; height: 34px; border-radius: 8px; }
.film-rec:disabled { opacity: .45; }
.film-kinds { display: flex; gap: 4px; }
body.lab .film-stage .film-kinds button { padding: 7px 11px !important; border: 0 !important; border-radius: 999px !important; background: transparent !important; color: #fff !important; font-size: 14px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
body.lab .film-stage .film-kinds button[aria-pressed="true"] { background: #FFF3C4 !important; color: #6B5300 !important; text-shadow: none; }
.film-ring { position: absolute; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 0 0 28px rgba(255,255,255,.96); border-radius: inherit; }
.film-meta { color: var(--ds-ink-3); text-align: center; max-width: 390px; }
.film-takes { width: min(390px, 92vw); box-sizing: border-box; display: grid; gap: 12px; padding: 18px; min-height: 120px; place-content: center; border-radius: 20px; background: #000; color: #9a9a9a; text-align: center; }
.film-takes p { margin: 0; }
.film-take { display: grid; gap: 6px; justify-items: center; color: #fff; }
.film-take video { width: 100%; border-radius: 12px; }
.film-footage { width: min(760px, 94vw); max-width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.film-fgroup { min-width: 0; }
.film-footage { contain: inline-size; } .film-footage > * { min-width: 0; max-width: 100%; } .film-frow { max-width: calc(100vw - 28px); }
.film-fhead { display: flex; justify-content: space-between; align-items: baseline; } .film-fhead h2 { margin: 0; font-size: 16px; }
.film-fgroup h3 { margin: 0 0 6px; font-size: 14px; } .film-fgroup h3 small { color: var(--ds-ink-3); font-weight: 400; }
.film-frow { display: flex; gap: 8px; overflow-x: auto; }
.film-fclip { flex: 0 0 96px; display: grid; gap: 4px; color: inherit; text-decoration: none; }
.film-fclip video { width: 96px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: #111; }
.film-fclip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--ds-ink-3); }
body.lab .film-stage small, body.lab .film-stage b, body.lab .film-stage p, body.lab .film-stage span { color: #fff; }
body.lab .film-stage .film-tool.on span, body.lab .film-stage .film-tool.on b { color: #14120E !important; }
body.lab .film-stage .film-kinds button[aria-pressed="true"] { color: #6B5300 !important; }

.film-bgs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
body.lab .film-stage .film-bg { display: grid; place-items: center; width: 64px; height: 64px; padding: 0 !important; border: 2px solid transparent !important; border-radius: 14px !important; background: rgba(0,0,0,.45) !important; color: #fff !important; overflow: hidden; cursor: pointer; }
.film-bg img, .film-bg video { width: 100%; height: 100%; object-fit: cover; }
body.lab .film-stage .film-roll { width: 92px; grid-auto-flow: row; gap: 2px; font-size: 12px; font-weight: 700; }
body.lab .film-stage .film-swatch { background: #00b140 !important; }
body.lab .film-stage .film-bg.on { border-color: #fff !important; }
.film-panelwrap .film-note { text-align: center; }
.film-panelwrap { top: 214px; }
.film-tools { max-width: 340px; margin: 0 auto; }
.film-panelwrap { top: 236px; }
/* Session takes: auto-saved, renameable, picked for one editing ticket. */
.film-head { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.film-takehead { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; }
.film-takehead span { color: var(--ds-ink-3); font-size: 12px; margin-right: auto; }
.film-take { position: relative; display: grid; gap: 5px; }
.film-take.picked video { outline: 2px solid #1b1c20; outline-offset: 2px; }
.film-pick { position: absolute; top: 8px; left: 8px; display: inline-flex; gap: 5px; align-items: center; padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,.92); color: #1b1c20; font-size: 11.5px; font-weight: 600; }
.film-name { height: 30px; font-size: 12.5px; padding: 0 8px; border-radius: 8px; }
.film-ok { color: #12805c; font-size: 12px; }
.film-takehead b { color: #fff; } .film-takehead span { color: #9a9aa2; }
/* CapCut-style recorder: icon column on the right, teleprompter card at the top, timer above a white record button,
   delete-last and done beside it, and plain text tabs for the take type. */
.film-full { top: 12px !important; left: 12px; right: auto !important; }
body.lab .film-stage .film-full { width: 36px !important; height: 36px !important; background: transparent !important; }
.film-tools { top: 12px !important; right: 10px !important; left: auto !important; flex-direction: column; flex-wrap: nowrap !important; gap: 12px !important; align-items: center; }
body.lab .film-stage .film-tool span { width: 38px !important; height: 38px !important; background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
body.lab .film-stage .film-tool small { font-size: 9.5px; opacity: .9; }
body.lab .film-stage .film-tool.on span { background: rgba(255,255,255,.95) !important; }
.film-panelwrap { top: auto !important; bottom: 210px; left: 12px !important; right: 60px !important; }
.film-prompt { left: 3% !important; right: 3% !important; top: 2.5% !important; height: 27% !important; padding: 14px 18px 46px; box-sizing: border-box; border-radius: 16px; background: rgba(30,30,32,.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); -webkit-mask: none !important; mask: none !important; }
.film-prompt-text { font-weight: 600 !important; line-height: 1.55 !important; text-align: left !important; text-shadow: none !important; padding-top: 0 !important; }
.film-promptbar { top: calc(2.5% + 27% - 44px) !important; background: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
body.lab .film-stage .film-promptbar button { width: 30px !important; height: 30px !important; }
.film-psettings label { display: grid; grid-template-columns: 70px 1fr; align-items: center; font-size: 12px; color: #fff; }
.film-psettings input[type=range] { accent-color: #fff; width: 100%; }
.film-pcolors { display: flex; gap: 6px; flex-wrap: wrap; }
body.lab .film-stage .film-pcolors button { width: 24px; height: 24px; padding: 0 !important; border-radius: 6px !important; border: 2px solid transparent !important; }
body.lab .film-stage .film-pcolors button[aria-pressed="true"] { border-color: #fff !important; }
.film-live { top: auto !important; bottom: 186px; background: rgba(0,0,0,.45) !important; font-size: 12.5px !important; }
.film-live i { background: #FFD84D !important; }
.film-bottom { bottom: 22px !important; gap: 10px !important; }
.film-recrow { grid-template-columns: 70px auto 70px !important; gap: 22px !important; }
body.lab .film-stage .film-rec { width: 80px !important; height: 80px !important; border: 4px solid #fff !important; background: rgba(255,255,255,.18) !important; }
.film-rec i { width: 64px !important; height: 64px !important; background: #FFD84D !important; }
.film-rec.on i { width: 26px !important; height: 26px !important; border-radius: 6px !important; }
body.lab .film-stage .film-rec.on { background: #fff !important; }
.film-after { display: flex; align-items: center; gap: 10px; }
body.lab .film-stage .film-del { width: 34px !important; height: 26px !important; border-radius: 6px !important; background: rgba(255,255,255,.92) !important; color: #1b1c20 !important; }
body.lab .film-stage .film-del svg { width: 16px !important; height: 16px !important; }
body.lab .film-stage .film-check { width: 34px !important; height: 34px !important; background: #FFD84D !important; color: #14120E !important; }
body.lab .film-stage .film-check svg { width: 18px !important; height: 18px !important; }
body.lab .film-stage .film-len button, body.lab .film-stage .film-zoomseg button { font-size: 12px !important; padding: 4px 10px !important; }
body.lab .film-stage .film-kinds button { font-size: 13px !important; font-weight: 600 !important; color: rgba(255,255,255,.65) !important; background: transparent !important; position: relative; }
body.lab .film-stage .film-kinds button[aria-pressed="true"] { color: #fff !important; background: transparent !important; }
body.lab .film-stage .film-kinds button[aria-pressed="true"]::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #fff; }
.film-prompt { right: 58px !important; }
.film-promptbar { left: calc(3% + (100% - 3% - 58px) / 2) !important; top: calc(2.5% + 27% + 6px) !important; background: rgba(30,30,32,.62) !important; }
body.lab .film-stage .film-pcolors button { background: var(--c) !important; }
.film-stage.rec .film-len { visibility: hidden; }
.film-live { bottom: auto !important; top: auto !important; }
.film-bottom .film-live, .film-stage.rec .film-live { position: absolute; left: 50%; transform: translateX(-50%); bottom: 212px !important; }
/* Take cards on the dark panel: readable name field and status text. */
body.lab .film-takes .film-name { background: rgba(255,255,255,.95) !important; color: #14120E !important; border: 0 !important; height: 34px !important; }
body.lab .film-takes .film-name::placeholder { color: #8a8a92 !important; }
.film-takes small { color: #b9b9c0 !important; text-align: center; }
.film-takes b { color: #fff !important; text-align: center; font-size: 13px; }
.film-takes .film-ok { color: #4cd964 !important; }
body.lab .film-sendall { width: min(390px, 92vw); height: 48px; border-radius: 14px !important; font-size: 15px; font-weight: 700; }
/* Phones: once the camera is on, the recorder fills the screen like CapCut; the ✓ or ✕ goes back to the takes. */
.film-fullphone .film-stage { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100svh !important; height: 100dvh !important; aspect-ratio: auto !important; border-radius: 0 !important; z-index: 1000 !important; box-shadow: none !important; }
.film-fullphone .film-stage.rec { box-shadow: inset 0 0 0 3px #ff3b30 !important; }
.film-fullphone #filmMount canvas { object-fit: cover; }
.film-fullphone .film-bottom { bottom: calc(18px + env(safe-area-inset-bottom)) !important; }
.film-fullphone .film-tools { top: calc(14px + env(safe-area-inset-top)) !important; }
.film-fullphone .film-full { top: calc(12px + env(safe-area-inset-top)) !important; }
.film-fullphone .film-prompt { top: calc(2.5% + env(safe-area-inset-top)) !important; }
body.lab .film-stage .film-x { font-size: 20px; color: #fff !important; background: rgba(0,0,0,.35) !important; }
body.lab:has(.film-fullphone) { overflow: hidden; }
@media (max-width: 640px) {
  .film-head { width: 92vw; display: grid !important; gap: 8px; }
  .film-head label { justify-content: space-between; font-size: 13px; }
  .film-head select { max-width: 62vw; }
  .film-takes { width: 92vw !important; }
}
