/* Film genres: a video frame, a timeline, three genres. The camera is a transform on .fg-cam. */
.fg { display: grid; grid-template-columns: minmax(0, 540px) 230px; gap: 36px; align-items: center; justify-content: center; }
.fg-frame { aspect-ratio: 16 / 9.6; background: var(--frame); border-radius: 4px; }
.fg-screen { position: absolute; inset: 2px; overflow: hidden; border-radius: 3px; }
.fg-cam { position: absolute; inset: 0; display: grid; place-items: center; will-change: transform; }

.fg-app {
  position: relative; width: 176px; padding: 12px;
  background: var(--sheet); border: 1.5px solid var(--ink); border-radius: 10px;
  font-size: 0.75rem; line-height: 1.2;
}
.fg-app-h { font: 400 1rem/22px var(--serif); margin-bottom: 6px; }
.fg-app li { display: flex; align-items: center; justify-content: space-between; height: 32px; padding: 0 8px; border-top: 1px solid var(--rule); transition: background-color 200ms ease; }
.fg-app em { font-style: normal; color: var(--soft); }
.fg-app em, .fg-btn { display: inline-grid; }
.fg-app i { font-style: normal; grid-area: 1 / 1; transition: opacity 200ms ease; }
.fg-app em i { text-align: right; }
.fg-app .s2 { opacity: 0; }
.fg-btn {
  width: 100%; height: 32px; margin-top: 10px; place-items: center; border-radius: 4px;
  background: var(--ink); color: var(--sheet); font-weight: 600;
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.fg-app[data-step="1"] .fg-row, .fg-app[data-step="2"] .fg-row { background: var(--tint); }
.fg-app[data-step="2"] .s0 { opacity: 0; }
.fg-app[data-step="2"] .s2 { opacity: 1; }
.fg-app[data-step="2"] .fg-row em { color: var(--ink); font-weight: 600; }
.fg-app[data-step="2"] .fg-btn { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.fg-ptr { position: absolute; left: 0; top: 0; width: 16px; height: 20px; transform: translate(138px, 126px); transition: transform 440ms var(--ease-in-out); }
.fg-app[data-step="1"] .fg-ptr { transform: translate(112px, 90px); }
.fg-app[data-step="2"] .fg-ptr { transform: translate(100px, 164px); }
.fg.cuts .fg-app *, .fg.cuts .fg-ptr { transition: none; }

.fg-caption {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  max-width: calc(100% - 20px); width: max-content; padding: 5px 12px; border-radius: 3px;
  background: var(--ink); color: var(--sheet); font: 600 0.8125rem/1.3 var(--sans); text-align: center;
  transition: opacity 160ms linear;
}
.fg-caption:empty { opacity: 0; }
.fg-card {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center;
  background: var(--ink); color: var(--sheet); font: 400 clamp(1.125rem, 4vw, 1.625rem)/1.15 var(--serif);
  opacity: 0; visibility: hidden;
}
.fg-card.on { opacity: 1; visibility: visible; }

.fg-time { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.fg-track { position: relative; flex: 1; height: 22px; }
.fg-track::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: var(--ink); }
.fg-marks i { position: absolute; top: 2px; width: 1.5px; height: 18px; background: var(--ink); transform-origin: 50% 50%; animation: cutmark 220ms var(--ease) backwards; }
@keyframes cutmark { from { opacity: 0; transform: scaleY(0.3); } }
.fg-rail { position: absolute; inset: 0; pointer-events: none; }
.fg-head { position: absolute; left: -8px; top: 3px; width: 16px; height: 16px; box-shadow: 0 0 0 2px var(--paper); }
.fg-len { flex: none; min-width: 3.2em; text-align: right; font-variant-numeric: tabular-nums; }

.fg-tabs { display: grid; gap: 10px; }
.fg-tabs button {
  appearance: none; cursor: pointer; text-align: left;
  display: grid; gap: 1px; padding: 9px 14px 8px; border: 0; border-radius: 5px;
  background: transparent; box-shadow: inset 0 0 0 1px var(--rule);
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 140ms var(--ease);
}
.fg-tabs b { font-weight: 600; font-size: 0.875rem; }
.fg-tabs button:active { transform: scale(0.98); }
.fg-tabs button[aria-pressed="true"] { background: var(--sheet); box-shadow: inset 0 0 0 1.6px var(--ink); }
@media (hover: hover) and (pointer: fine) { .fg-tabs button:hover { background: var(--sheet); } }

@media (max-width: 640px) {
  .fg { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .fg-tabs { order: -1; grid-template-columns: auto auto auto; gap: 6px; justify-content: start; }
  .fg-tabs button { padding: 8px 9px; }
  .fg-tabs b { font-size: 0.75rem; white-space: nowrap; }
  .fg-tabs .hand { display: none; }
  .fg-frame { aspect-ratio: 5 / 4.7; }
  .fg-caption { font-size: 0.75rem; bottom: 6px; }
}
