/* Режиссёр 3D-роликов: плашка на экране идеи и его собственные экраны (www/js/film.js). Цвета — из темы приложения. */
.fm-open, .fm-open body { overflow: hidden; }
.fm-plate { display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 64px; padding: 12px 16px; margin: 0; text-align: left; color: var(--btn-ink); background: var(--btn); border: 0; border-radius: 16px; cursor: pointer; font: inherit; }
.fm-plate b { font-size: 17px; line-height: 1.2; }
.fm-plate span { font-size: 13px; line-height: 1.3; }
.fm-app { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.4; }
.fm-app button, .fm-app textarea { font: inherit; color: inherit; }
.fm-app :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fm-top { display: grid; grid-template-columns: 44px 1fr 56px; align-items: center; gap: 4px; padding: calc(6px + env(safe-area-inset-top)) 8px 6px; border-bottom: 1px solid var(--line); }
.fm-back { width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer; }
.fm-back svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fm-steps { display: flex; justify-content: center; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); }
.fm-steps .on { color: var(--ink); font-weight: 700; }
.fm-steps .past { color: var(--accent); }
.fm-spent { font-size: 13px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.fm-main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 18px 16px 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.fm-main h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.15; }
.fm-lead { margin: 0 0 16px; color: var(--muted); }
.fm-idea, .fm-edit textarea { display: block; width: 100%; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; resize: vertical; font-size: 16px; }
.fm-line { display: flex; gap: 3px; margin-bottom: 14px; }
.fm-line button { flex: 1 1 0; min-width: 0; height: 44px; padding: 0; font-size: 13px; font-weight: 700; background: var(--card-2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-variant-numeric: tabular-nums; }
.fm-line button.on { color: var(--btn-ink); background: var(--btn); border-color: var(--btn); }
.fm-cards { display: flex; flex-direction: column; gap: 8px; }
.fm-card { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 12px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.fm-card b { font-weight: 600; }
.fm-card.on, .fm-frame.on, .fm-model.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.fm-time, .fm-cam, .fm-note { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fm-frame { display: flex; flex-direction: column; gap: 4px; padding: 5px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.fm-frame img, .fm-empty { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; font-size: 13px; color: var(--muted); background: var(--card-2); border-radius: 8px; }
.fm-models { display: flex; flex-direction: column; gap: 8px; }
.fm-model { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 12px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.fm-level { font-size: 12px; font-weight: 700; color: var(--accent); }
.fm-mh { display: flex; justify-content: space-between; gap: 12px; font-size: 17px; }
.fm-mh strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fm-video { display: block; width: 100%; max-width: 340px; aspect-ratio: 9 / 16; margin: 0 auto; background: #000; border-radius: 12px; }
.fm-work { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding: 14px; background: var(--card); border-radius: 12px; }
.fm-work span { font-size: 13px; color: var(--muted); }
.fm-bar { height: 6px; overflow: hidden; background: var(--card-2); border-radius: 3px; }
.fm-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s ease; }
.fm-err { margin: 14px 0 0; padding: 12px; color: #fff; background: #8f2318; border-radius: 12px; }
.fm-foot { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; max-width: 720px; margin: 0 auto; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.fm-btn { flex: 1 1 180px; display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 8px 16px; font-weight: 700; text-align: center; text-decoration: none; color: var(--btn-ink) !important; background: var(--btn); border: 0; border-radius: 14px; cursor: pointer; }
.fm-btn.ghost { color: var(--ink) !important; background: var(--card-2); }
.fm-btn:disabled { opacity: .45; cursor: default; }
.fm-edit { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; }
.fm-edit .fm-btn { flex: 0 0 auto; }
.fm-way { display: flex; flex-direction: column; gap: 4px; width: 100%; margin-bottom: 10px; padding: 16px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.fm-way b { font-size: 19px; line-height: 1.2; }
.fm-way.main { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.fm-summary { margin: 0 0 10px; }
.fm-add { min-height: 150px; font-weight: 700; color: var(--accent); background: var(--card); border: 1px dashed var(--accent); border-radius: 12px; cursor: pointer; }
.fm-frame .fm-btn { flex: 0 0 auto; min-height: 44px; padding: 4px 8px; font-size: 14px; }
.fm-grid + .fm-idea { margin-top: 14px; }
.fm-thumb { display: block; width: 92px; aspect-ratio: 9 / 16; object-fit: cover; margin-bottom: 6px; background: var(--card-2); border-radius: 8px; }
.fm-tags { font-size: 13px; font-weight: 600; color: var(--accent); }
.fm-field { margin-top: 16px; }
.fm-flabel { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.fm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-chip { min-height: 44px; padding: 6px 14px; font-size: 14px; background: var(--card-2); border: 1px solid var(--line); border-radius: 22px; cursor: pointer; }
.fm-chip.on { color: var(--btn-ink); background: var(--btn); border-color: var(--btn); font-weight: 700; }
.fm-swatch { width: 44px; height: 44px; padding: 0; border: 2px solid var(--line); border-radius: 50%; cursor: pointer; }
.fm-swatch.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--bg) inset; }
@media (prefers-reduced-motion: reduce) { .fm-bar i { transition: none; } }
