/* Окно «Кадр из видео» (js/frame-picker.js) */
.fp {
  position: fixed; inset: 0; z-index: 28; background: rgba(15,20,25,.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.fp[hidden] { display: none; }
.fp-box {
  background: #fff; width: min(720px, 100%); max-height: 96vh; max-height: 96dvh; overflow: auto;
  border-radius: 18px 18px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px;
}
.fp-top { display: flex; justify-content: space-between; align-items: center; }
.fp-top h2 { margin: 0; font-size: 18px; }
.fp-stage {
  position: relative; background: #000; border-radius: 14px; overflow: hidden;
  display: flex; justify-content: center; align-items: center;
  height: min(52vh, 520px); height: min(52dvh, 520px); cursor: pointer; touch-action: pan-y;
}
.fp-stage video { width: 100%; height: 100%; object-fit: contain; display: block; }
.fp-load {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 14px; background: #000;
}
.fp-load[hidden] { display: none; }
.fp-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.fp-flash.go { animation: fpFlash .35s ease-out; }
@keyframes fpFlash { from { opacity: .85; } to { opacity: 0; } }

.fp-strip {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-height: 52px;
}
.fp-strip::-webkit-scrollbar { display: none; }
.fp-thumb {
  flex: 1 0 36px; height: 52px; padding: 0; border: 2px solid transparent; border-radius: 8px;
  background: #e6ecf0; overflow: hidden; cursor: pointer;
}
.fp-thumb canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.fp-thumb.on { border-color: var(--accent); }

.fp-range { width: 100%; margin: 0; height: 28px; accent-color: var(--accent); cursor: pointer; }
.fp-time {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: -6px;
}
.fp-time #fpTime { color: var(--text); font-weight: 700; }

.fp-ctrl { display: grid; grid-template-columns: 1fr 1.3fr 56px 1.3fr 1fr; gap: 6px; }
.fp-ctrl button {
  height: 42px; border: 1px solid var(--line); background: #f7f9f9; color: var(--text);
  border-radius: 12px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.fp-ctrl button:active { background: #e8f5fd; }
.fp-ctrl .fp-play { background: #0f1419; color: #fff; border-color: #0f1419; }

.fp-clip { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.fp-clip[hidden] { display: none; }
.fp-clip input { width: 18px; height: 18px; accent-color: var(--accent); }

.fp-bottom { display: flex; align-items: center; gap: 8px; }
.fp-note { flex: 1; font-size: 13px; color: var(--muted); }
.fp-bottom .send { height: 40px; }
.fp-bottom .send:disabled { opacity: .45; cursor: default; }

/* Кнопка «Кадр» на видео в черновике поста */
.preview .shot-btn {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  height: 32px; padding: 0 10px; border: 0; border-radius: 999px;
  background: rgba(15,20,25,.7); color: #fff; font: inherit; font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
}

@media (min-width: 760px) {
  .fp { align-items: center; }
  .fp-box { border-radius: 18px; }
}
