/* Wonda Edit Mobile — цвета как у Edit в DaVinci (те же токены, что public/ui.css) */
:root {
  --top: #17181a; --pan: #29282e; --head: #222127; --line: #111113; --t: #d9d9de; --m: #8e8d95; --d: #5d5c63;
  --v: #436581; --vs: #4576a1; --a: #468e66; --wave: #d8eade; --red: #e5483d; --sel: #e8a44a; --field: #1b1b1e; --ok: #3f9e5f;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  --safeB: env(safe-area-inset-bottom, 0px); --safeT: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--top); color: var(--t); font: 15px/1.3 var(--font); overflow: hidden;
  overscroll-behavior: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-font-smoothing: antialiased; }
body { position: fixed; inset: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; touch-action: manipulation; }
[hidden] { display: none !important; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding-top: var(--safeT); }
.bar { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px; background: var(--top); border-bottom: 1px solid var(--line); flex: none; }
.bar b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; color: var(--t); }
.ic:active { background: #34333a; }
.ic.big svg { width: 30px; height: 30px; fill: currentColor; stroke: none; }
.ic.sm { width: 38px; height: 30px; font-size: 22px; line-height: 1; background: #34333a; margin-left: 6px; }

/* --- проекты --- */
#list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(16px + var(--safeB)); }
.grp { padding: 16px 16px 6px; color: var(--m); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid #1f1f22; min-height: 56px; }
.row:active { background: #222127; }
.row .ico { width: 34px; height: 34px; border-radius: 7px; background: var(--pan); display: flex; align-items: center; justify-content: center; flex: none; color: var(--m); }
.row .ico.reel { background: var(--v); color: #fff; }
.row .tx { flex: 1; min-width: 0; }
.row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { color: var(--m); font-size: 12.5px; margin-top: 2px; }
.row .st { font-size: 11.5px; padding: 3px 8px; border-radius: 10px; background: #2e2d33; color: var(--m); flex: none; }
.row .st.work { background: #4a3720; color: var(--sel); }
.row .st.ok { background: #1f3a29; color: #6fd394; }
.row .chev { color: var(--d); }

/* --- монтаж --- */
#title { flex: 1; }
#saved { color: var(--d); font-size: 12px; white-space: nowrap; }
#saved.dirty { color: var(--sel); }
#bOk { background: var(--red); color: #fff; font-weight: 600; padding: 7px 14px; border-radius: 7px; font-size: 14px; }
#bOk.done { background: #2a2a2f; color: #6fd394; }
#viewer { position: relative; flex: 1; min-height: 120px; background: #000; overflow: hidden; }
#viewer video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
#vmsg { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; color: var(--m); font-size: 13px; pointer-events: none; padding: 0 16px; }
#transport { display: flex; align-items: center; justify-content: space-between; height: 50px; padding: 0 8px 0 14px; background: var(--pan); border-top: 1px solid var(--line); flex: none; }
#transport .r { display: flex; gap: 2px; }
#tc { font: 500 15px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--t); width: 110px; }
#bPlay { width: 52px; height: 44px; }
#hintRow { display: flex; align-items: center; height: 36px; padding: 0 12px; background: var(--head); color: var(--m); font-size: 13px; flex: none; }
#hint { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hint b { color: var(--sel); font-weight: 600; }
#tl { position: relative; height: 172px; background: var(--top); flex: none; touch-action: none; }
#cv { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
#tools { display: flex; justify-content: space-around; background: var(--pan); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safeB)); flex: none; }
#tools button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 62px; padding: 4px 2px; color: var(--t); font-size: 11px; border-radius: 8px; }
#tools button:active { background: #34333a; }
#tools button:disabled { color: var(--d); }
#tools em { font-style: normal; color: var(--sel); }

#sheet { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; z-index: 5; }
#sheet .box { width: 100%; max-height: 70%; background: var(--pan); border-radius: 14px 14px 0 0; display: flex; flex-direction: column; padding-bottom: var(--safeB); }
#sheet .bar { background: transparent; justify-content: space-between; }
#offList { overflow-y: auto; }
#offList .row .nm { white-space: normal; }
#toast { position: fixed; left: 16px; right: 16px; bottom: calc(110px + var(--safeB)); background: #3a3940; color: var(--t); padding: 12px 14px; border-radius: 10px; font-size: 14px; z-index: 6; text-align: center; }
.empty { color: var(--d); padding: 30px 16px; text-align: center; }
#vtext { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; font-size: 22px; line-height: 1.35; color: var(--t); }
#aprog { align-self: center; color: var(--m); font-size: 12px; margin-right: 4px; white-space: nowrap; }
#bVid .slash { display: none; }
#bVid.off { color: var(--m); }
#bVid.off .slash { display: inline; }
#tc { width: auto; min-width: 100px; }
#bSpeed { min-width: 46px; height: 32px; border-radius: 8px; background: #34333a; color: var(--t); font: 600 14px/1 var(--font); font-variant-numeric: tabular-nums; margin-right: 4px; }
#bSpeed.fast { color: var(--sel); }
#transport { gap: 6px; }
#storeLine { padding: 18px 16px calc(24px + var(--safeB)); color: var(--m); font-size: 12.5px; text-align: center; }
#storeLine b { color: var(--sel); font-weight: 500; margin-left: 4px; }
.inph { color: #6fd394; }
