/* FRAME PICK — page styles on top of apps.css */
#fileBlk[hidden]+.blk{margin-top:0;padding-top:0;border-top:0}
#side[inert]{opacity:.55;pointer-events:none}
.fp-what{max-width:62ch;margin:16px auto 0;text-align:center}
.fp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px}
.fp-card{position:relative;border-radius:var(--r-2);border:1px solid var(--hair-2);background:var(--bg-1);overflow:hidden;box-shadow:var(--hi);transition:border-color .3s var(--ease),box-shadow .3s var(--ease)}
.fp-card.sel{border-color:rgba(var(--a),.55);box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 0 0 3px rgba(var(--a),.1)}
.fp-grid{--car:1.7778}
.fp-open{display:grid;place-items:center;width:100%;aspect-ratio:var(--car);overflow:hidden;padding:0;border:0;background:#000;cursor:zoom-in;position:relative;line-height:0}
.fp-open canvas{position:absolute;inset:0;margin:auto;display:block;max-width:100%;max-height:100%;width:auto;height:auto}   /* contained: letterboxed, never stretched */
.fp-open .tc{position:absolute;left:8px;bottom:8px;line-height:1.2;padding:3px 7px;border-radius:7px;background:rgba(0,0,0,.65);color:#fff;font-family:var(--mono);font-size:11px;letter-spacing:.04em}
.fp-open .rk{position:absolute;left:8px;top:8px;line-height:1.2;padding:3px 7px;border-radius:7px;background:rgba(var(--a),.88);color:var(--ink);font-family:var(--mono);font-size:10px;font-weight:600}
.fp-meta{display:grid;gap:8px;padding:9px 10px 10px;font-size:11.5px;color:var(--fg-3);font-family:var(--mono)}
.fp-meta .mt{min-width:0;display:flex;flex-wrap:wrap;gap:2px 10px;line-height:1.35}         /* «резкость 100 · экспозиция в норме» on one line, the actions below */
.fp-meta b{font-weight:500;color:var(--fg-2)}
.fp-pick{flex-shrink:0;display:inline-flex;align-items:center;gap:7px;cursor:pointer;color:var(--fg-2);font-family:var(--text);font-size:12px}
.fp-pick input{position:absolute;opacity:0;pointer-events:none}
.fp-pick i{width:20px;height:20px;border-radius:6px;border:1.5px solid var(--line-3);display:grid;place-items:center;background:var(--bg);transition:all .25s var(--ease)}
.fp-pick i svg{width:12px;height:12px;stroke:var(--ink);fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.fp-pick input:checked+i{background:var(--accent);border-color:var(--accent)}
.fp-pick input:checked+i svg{opacity:1}
.fp-pick input:focus-visible+i{outline:2px solid rgba(var(--a),.65);outline-offset:2px}
/* lightbox: a veil of its own (the shell has no veil class) dims the page and closes the view on a click outside */
.fp-veil{position:fixed;inset:0;z-index:85;background:var(--n-040408-74);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:fpveil .3s var(--ease) both}
@keyframes fpveil{from{opacity:0}to{opacity:1}}
.fp-lb{position:fixed;z-index:86;inset:12px;margin:auto;width:min(980px,calc(100vw - 24px));height:fit-content;max-height:calc(100dvh - 24px);animation:rise .35s var(--ease) both}
.fp-lb>.shell>.core{padding:16px;display:grid;gap:12px;max-height:calc(100dvh - 36px);overflow:auto}
.fp-lb h3{font-family:var(--head);font-size:13px;font-weight:700;letter-spacing:.06em}
.fp-lb .top{display:flex;align-items:center;gap:10px;justify-content:space-between}
.fp-lb .view{position:relative;background:#000;border-radius:var(--r-3);overflow:hidden;display:grid;place-items:center;min-height:120px}
.fp-lb canvas{display:block;max-width:100%;max-height:min(62dvh,640px);width:auto;height:auto}
.fp-lb .view .spin{position:absolute}
.fp-lb .row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.fp-lb .row .sp{flex:1}
.fp-lb .info{font-family:var(--mono);font-size:11px;color:var(--fg-3);letter-spacing:.04em}
@media (max-width:520px){.fp-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}}

/* long lock labels wrap instead of widening the column on phones */
.chips .chip{white-space:normal;height:auto;min-height:34px;padding-top:6px;padding-bottom:6px;text-align:left}

.fp-act{display:flex;align-items:center;justify-content:space-between;gap:8px}
.fp-dl{width:36px;height:36px;border-radius:var(--r-3);border:1px solid var(--hair-2);background:rgba(255,255,255,.035);color:var(--fg-2);cursor:pointer;display:inline-grid;place-items:center;transition:all .3s var(--ease)}
.fp-dl svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.fp-dl:hover{color:var(--fg);border-color:var(--hair-3);background:rgba(255,255,255,.07)}
.fp-dl.busy{opacity:.5;cursor:progress}

/* empty state: an obvious drop row + the ghost of the result grid (frame slots with rank and timecode tags) */
.fp-drop{flex-direction:row;justify-content:flex-start;align-items:center;gap:16px;min-height:0;padding:18px 20px;text-align:left}
.fp-drop .ic{width:52px;height:52px;flex:none}
.fp-drop .tx{display:grid;gap:4px;min-width:0}
.fp-ghost{margin-top:14px;padding:48px 14px 14px;cursor:pointer}
.fp-ggrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:12px}
.fp-gcard{border-radius:var(--r-2);border:1px solid var(--hair-2);background:var(--bg-1);overflow:hidden}
.fp-gcard .fr{position:relative;aspect-ratio:16/9;background:linear-gradient(160deg,rgba(var(--a),.10),rgba(255,255,255,.02) 55%,rgba(0,0,0,.25));border-bottom:1px solid var(--hair)}
.fp-gcard .rk{position:absolute;left:8px;top:8px;line-height:1.2;padding:3px 7px;border-radius:7px;background:rgba(var(--a),.55);color:var(--ink);font-family:var(--mono);font-size:10px;font-weight:600}
.fp-gcard .tcl{position:absolute;left:8px;bottom:8px;width:44px;height:18px;border-radius:7px;background:rgba(0,0,0,.55)}
.fp-gcard .mt{display:grid;gap:7px;padding:10px}
.fp-gcard .mt .ghost-line:first-child{width:70%}.fp-gcard .mt .ghost-line:last-child{width:45%;opacity:.6}
.fp-gcard:nth-child(n+7){display:none}
@container fpg (min-width:760px){.fp-gcard:nth-child(n+7){display:block}}
#empty{container:fpg/inline-size}
@media (max-width:520px){.fp-drop{padding:16px}.fp-ggrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.fp-ghost{padding:44px 10px 10px}}

@media (max-width:520px){.ghost>.ghost-tag.r{display:none}}          /* two tags do not fit a phone-wide ghost: the left one names it */
