/* Surf — экраны «Загрузка» (D17), «Мои видео», «Видео» и свой плеер деталей. Только токены surf-app.css, префиксы u-/v-/vd-/vp-.
   Без inline-стилей: CSP. Мобильный вертикальный экран. Грузится как /src/css/surf-upload.css?v=$version. */

/* ---------- общий каркас слоёв ---------- */
#screen-upload, #screen-videos, #screen-video { overflow: hidden; }
.u-hdr { display: flex; align-items: center; gap: 12px; padding: calc(var(--top) + 4px) var(--screen-x) 8px; flex: 0 0 auto; }
.u-hdr h1 { margin: 0; flex: 1; min-width: 0; font-size: var(--type-nav); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-hdr .u-demo { font-size: var(--type-caption); color: var(--text-2); height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: var(--surface-2); }
.u-hdr .u-demo[hidden] { display: none; }
.u-main { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.u-menu { position: absolute; right: var(--screen-x); top: 4px; z-index: 30; min-width: 240px; overflow: hidden; display: flex; flex-direction: column; background: var(--surface-2); border-radius: var(--r-16); box-shadow: var(--shadow); }
.u-menu[hidden] { display: none; }
.u-menu button { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: var(--type-body); }
.u-menu button:last-child { border-bottom: 0; }
.u-menu small { display: block; color: var(--text-2); font-size: var(--type-caption); }

/* ---------- 1. выбор файла ---------- */
.u-pick { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 16px; padding: 24px; text-align: center; overflow: auto; overscroll-behavior: contain; }
.u-pick[hidden] { display: none; }
.u-big { flex-shrink: 0; width: 108px; height: 180px; margin-bottom: 8px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-22); display: flex; align-items: center; justify-content: center; color: var(--text-3); }
.u-pick p { margin: 0; max-width: 280px; font-size: var(--type-body); color: var(--text-2); }
.u-pick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.u-pick label.btn { min-width: 200px; margin-top: 8px; }
.u-pick .caption { color: var(--text-3); }
.u-requirements { max-width: 340px; }
.u-pick .u-requirements p { font-size: var(--type-caption); color: var(--text-2); }
.u-upload-hint { margin: 6px 0 10px; color: var(--text-2); font-size: var(--type-small); line-height: 1.4; }
.u-pick .error {
  width: 100%; max-width: 340px; flex-shrink: 0; padding: 16px;
  color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger);
  border-left: 4px solid var(--danger); border-radius: 14px;
  font-size: var(--type-body); font-weight: 600; line-height: 1.45; text-align: left;
}
.u-pick:has(.error:not([hidden])) .u-big { display: none; }

/* ---------- 2. редактор ---------- */
.u-editor { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.u-editor[hidden] { display: none; }
.u-stage { position: relative; height: 38dvh; min-height: 200px; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; }
.u-crop-frame { position: relative; height: 100%; aspect-ratio: 9 / 16; overflow: hidden; }
.u-stage video, .u-stage canvas { position: absolute; width: 100%; height: 100%; object-fit: cover; background: #111; }
.u-crop-safe { position: absolute; inset: 8% 12%; border: 1px dashed #ffffff80; pointer-events: none; opacity: 0; }
.u-stage.framing-open .u-crop-safe { opacity: 1; }
.u-framing { margin: 0 var(--screen-x); padding: 0; flex: 0 0 auto; border-bottom: 1px solid var(--line); }
.u-framing summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: 8px; list-style: none; color: var(--text-2); font-size: var(--type-secondary); font-weight: 600; }
.u-framing summary::-webkit-details-marker { display: none; }
.u-framing summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 4px; }
.u-framing summary:active, .u-framing[open] summary { color: var(--link); }
.u-framing summary .i { flex-shrink: 0; }
.u-framing[open] { flex: 0 0 auto; min-height: 0; overflow: visible; padding-bottom: 8px; }
.u-editor:has(.u-framing[open]) .u-tlwrap, .u-editor:has(.u-framing[open]) .u-list, .u-editor:has(.u-framing[open]) .u-minimap { display: none; }
.u-framing label { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.u-framing input { width: 52%; min-height: 44px; accent-color: var(--accent, #1e9be8); }
.u-stage video[hidden], .u-stage canvas[hidden] { display: none; }
.u-stage .u-info { color: var(--media-text); position: absolute; left: 12px; top: 12px; padding: 6px 12px; border-radius: var(--r-pill); font-size: var(--type-caption); font-variant-numeric: tabular-nums; background: var(--media-glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.u-stage .u-playbtn { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; background: var(--media-glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); transition: transform var(--t-release); }
.u-stage .u-playbtn:active { transform: scale(.92); transition-duration: var(--t-press); }
.u-playbtn .i + .i { display: none; }
.u-playbtn.playing .i:first-child { display: none; }
.u-playbtn.playing .i + .i { display: block; }
.u-stage .u-busy { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .6); font-size: var(--type-body); color: var(--media-muted); }
.u-stage .u-busy[hidden] { display: none; }
.u-fileinfo { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px var(--screen-x) 0; font-size: var(--type-caption); color: var(--text-2); flex: 0 0 auto; }
.u-fileinfo[hidden] { display: none; }
.u-fileinfo .u-fi small { text-transform: uppercase; letter-spacing: .04em; font-size: 11px; color: var(--text-3); }

.u-minimap { height: 24px; margin: 8px var(--screen-x) 0; position: relative; background: var(--surface); border-radius: 6px; overflow: hidden; flex: 0 0 auto; }
.u-minimap[hidden] { display: none; }
.u-mm-range { position: absolute; top: 0; bottom: 0; background: var(--accent); opacity: .7; }
.u-mm-view { position: absolute; top: 0; bottom: 0; border: 2px solid #fff; border-radius: 4px; opacity: .9; }
.u-mm-head { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; }

.u-tlwrap { margin: 8px 0 0; position: relative; flex: 0 0 auto; }
/* Лента: нативный горизонтальный скролл с инерцией, курсор закреплён по центру .u-tlwrap; поля по полэкрана задаёт JS (padPx). */
.u-tl { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain; }
.u-tl::-webkit-scrollbar { display: none; }
.u-strip { position: relative; height: 96px; overflow: visible; }
.u-strip.playing { will-change: transform; }   /* при воспроизведении полоса едет transform'ом (compositor), скролл не трогаем */
.u-tiles { position: absolute; top: 0; bottom: 0; left: 0; display: flex; overflow: hidden; border-radius: var(--r-12); background: var(--surface); }
.u-tile { flex: 0 0 auto; height: 100%; background: var(--surface-2); border-right: 1px solid var(--bg); }
.u-tile canvas { width: 100%; height: 100%; object-fit: cover; display: block; }   /* bitmap уже в DPR: без filter/transition/масштабирования */
.u-ticks { position: absolute; left: 0; bottom: -16px; height: 14px; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.u-tick { position: absolute; top: 0; transform: translateX(-50%); }
.u-head { position: absolute; left: 50%; top: -6px; height: 108px; width: 2px; background: #fff; transform: translateX(-1px); pointer-events: none; z-index: 5; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.u-head::before { content: ""; position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; }

/* Тело любого диапазона прокручивает ленту; только крайние ручки меняют границы. */
.u-rng { position: absolute; top: 0; bottom: 0; border: 2px solid rgba(30, 155, 232, .6); border-radius: 8px; background: rgba(30, 155, 232, .12); z-index: 2; }
.u-rng.sel { touch-action: pan-x; cursor: auto; border-color: var(--accent); background: rgba(30, 155, 232, .22); z-index: 3; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.u-rng.err { border-color: var(--danger); background: rgba(255, 107, 107, .2); animation: u-shake .3s; }
.u-h { position: absolute; top: -2px; bottom: -2px; width: 14px; background: rgba(30, 155, 232, .6); touch-action: none; display: none; }
.u-rng.sel .u-h { display: block; background: var(--accent); }
.u-rng.err .u-h { background: var(--danger); }
.u-h.l { left: -2px; border-radius: 8px 0 0 8px; }
.u-h.r { right: -2px; border-radius: 0 8px 8px 0; }
.u-h::after { content: ""; position: absolute; left: 5px; top: 50%; width: 4px; height: 22px; margin-top: -11px; border-radius: 2px; background: rgba(0, 0, 0, .45); }
.u-h::before { content: ""; position: absolute; left: -14px; right: -14px; top: -10px; bottom: -10px; }
.u-lbl { position: absolute; left: 50%; top: -24px; transform: translateX(-50%); font-size: 11px; font-weight: 600; background: var(--bg); padding: 2px 7px; border-radius: 7px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.u-rng.err .u-lbl { color: var(--danger); }
@keyframes u-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.u-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 24px var(--screen-x) 8px; display: flex; flex-direction: column; gap: 8px; }
.u-sum { font-size: var(--type-caption); color: var(--text-2); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.u-sum b { color: var(--text); }
.u-chip { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 12px; border-radius: var(--r-16); background: var(--surface); border: 1px solid transparent; }
.u-chip.sel { border-color: rgba(30, 155, 232, .6); }
.u-chip.over { border-color: rgba(255, 107, 107, .6); }
.u-n { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); color: var(--link); font-size: var(--type-caption); font-weight: 600; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.u-t { flex: 1; min-width: 0; font-size: var(--type-body); font-variant-numeric: tabular-nums; }
.u-t small { color: var(--text-2); margin-left: 6px; font-size: var(--type-caption); }
.u-t small.u-size { display: block; margin: 2px 0 0; }
.u-t small.u-size.over { color: var(--danger); }
.u-x { width: 44px; height: 44px; border-radius: 50%; color: var(--text-2); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.u-empty { color: var(--text-2); font-size: var(--type-body); text-align: center; padding: 12px; }

.u-ftr { display: flex; gap: 12px; padding: 12px var(--screen-x) calc(var(--sab) + 16px); background: var(--bg); flex: 0 0 auto; }
.u-ftr .btn { flex: 1; }
.u-ftr .btn[hidden] { display: none; }

/* ---------- 3. отправка / ожидание ---------- */
.u-wait { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.u-wait[hidden] { display: none; }
.u-wait h2 { margin: 8px var(--screen-x) 8px; font-size: var(--type-nav); font-weight: 600; }
.u-cards { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0 var(--screen-x); }
.u-vid { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.u-th { width: 48px; height: 64px; border-radius: var(--r-12); background: var(--surface-2); overflow: hidden; flex: 0 0 auto; }
.u-th canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.u-m { flex: 1; min-width: 0; }
.u-m b { display: block; font-size: var(--type-body); }
.u-m .u-st { display: block; font-size: var(--type-caption); color: var(--text-2); margin-top: 2px; overflow-wrap: anywhere; }
.u-vid.error .u-st { color: var(--danger); }
.u-vid.done .u-st { color: var(--link); }
.u-bar { height: 4px; border-radius: 2px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.u-bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .25s; }
.u-vid.error .u-bar i { background: var(--danger); }
.u-vid.wait .u-bar i { background: var(--text-3); animation: u-pulse 1.2s infinite; }
@keyframes u-pulse { 50% { opacity: .4; } }
.u-actions { display: flex; gap: 8px; margin-top: 8px; }
.u-actions:empty { display: none; }
.u-note { font-size: var(--type-caption); color: var(--text-2); margin: 8px var(--screen-x); }

/* ---------- Мои видео: строки 88 px (постер 64×88 r12 · название/описание 15 · статус-чип 13 + длительность ·
   строка счётчиков 13) + FAB «Загрузить» ---------- */
.v-status { padding: 16px var(--screen-x); font-size: var(--type-body); color: var(--text-2); }
.v-status[hidden] { display: none; }
.v-list { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 4px var(--screen-x) calc(var(--sab) + 16px); display: flex; flex-direction: column; gap: 12px; }
.v-card { display: flex; gap: 12px; height: 88px; cursor: pointer; transition: transform var(--t-release), opacity .2s; }
.v-card:active { transform: scale(.98); opacity: .85; transition-duration: var(--t-press); }
.v-poster { position: relative; width: 64px; height: 88px; border-radius: var(--r-12); background: var(--surface-2); overflow: hidden; flex: 0 0 auto; }
.v-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.v-title { font-size: var(--type-body); font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.v-desc { margin: 0; font-size: var(--type-body); line-height: 1.3; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.v-meta { display: flex; align-items: center; gap: 8px; font-size: var(--type-caption); color: var(--text-3); }
.v-st { color: var(--text-2); }
.v-st.published, .v-st.ready { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px; line-height: 1.4; white-space: nowrap; }
.v-st.published { color: var(--success); background: var(--success-bg); }
.v-st.ready { color: var(--link); background: var(--info-bg); }
.v-st.wait { color: var(--link); }
.v-st.review { color: var(--warn); }
.v-st.error { color: var(--danger); }
.v-st.off { color: var(--text-3); }
.v-dur { font-variant-numeric: tabular-nums; }
/* счётчики строки списка: 4 строки (название · описание · статус · счётчики) укладываются в 88 px */
.v-stats { gap: 12px; }
.v-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; }
.v-empty .mark { margin-bottom: 8px; }
.v-empty p { margin: 0 0 12px; font-size: var(--type-body); color: var(--text-2); }
.v-empty .btn { min-width: 200px; }

/* ---------- Видео (детали): плеер 9:16 в контейнере r22, описание 17, плитки статистики, теги-капсулы, лента моментов,
   действия, «Подробности» ---------- */
.vd-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 4px var(--screen-x) calc(var(--sab) + 24px); display: flex; flex-direction: column; gap: 16px; }
/* Компактное превью по ширине контента. contain показывает полный исходный кадр;
   ограниченная высота оставляет место для статуса и действий без прокрутки. */
.vd-player { display: flex; justify-content: center; }
.vd-frame { position: relative; width: 100%; height: min(40dvh, 340px); max-width: 400px; border-radius: var(--radius-card); overflow: hidden; background: #000; }
.vd-frame video, .vd-frame img, .vd-frame .vp { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.vd-frame .vp video, .vd-frame img { object-fit: contain; }
/* Same fill as the stream on tall phones; the inline preview shows the complete 9:16 master. */
.vd-view .vp video { object-fit: cover; }
.vd-frame img { cursor: pointer; }
.vd-view { position: fixed; inset: 0; background: #000; z-index: 60; display: flex; align-items: center; justify-content: center; }
.vd-view[hidden] { display: none; }
.vd-view-box { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.vd-view-box .vp { width: 100%; height: 100%; }

.vd-noplay { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); font-size: var(--type-caption); color: var(--media-muted); background: rgba(0, 0, 0, .6); padding: 6px 12px; border-radius: var(--r-pill); white-space: nowrap; }
.vd-head { display: flex; flex-direction: column; gap: 4px; }
.vd-desc { margin: 0; font-size: var(--type-body); line-height: 1.35; white-space: pre-wrap; }
.vd-meta { display: flex; align-items: center; gap: 8px; font-size: var(--type-caption); color: var(--text-3); }
.vd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vd-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--type-caption); color: var(--text); }
.vd-h { margin: 0; font-size: var(--type-caption); color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
/* статистика видео: плитки на surface-2 по две в ряд (в три «зрителей N» не помещается в строку); без просмотров — одна строка */
.vd-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.vd-stat { background: var(--surface-2); border-radius: var(--r-16); padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.vd-stat b { font-size: 1.0588rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.vd-stat span { font-size: var(--type-caption); line-height: 1.25; color: var(--text-2); }
.vd-stat i { font-style: normal; font-size: var(--type-caption); line-height: 1.25; color: var(--text-3); font-variant-numeric: tabular-nums; }
.vd-nostats { margin: 0; font-size: var(--type-body); color: var(--text-2); }
.vd-sec { display: flex; flex-direction: column; gap: 8px; }
/* моменты: вертикальный список — строка = кадр самого момента 96×128 r12 слева (номер в углу), справа время «0:00–0:03»
   13 tabular text-2, счётчики момента и полное описание 15 без обрезки */
.vd-segs { display: flex; flex-direction: column; gap: 12px; }
.vd-seg { display: flex; gap: 12px; align-items: flex-start; }
.vd-seg-img { position: relative; width: 96px; height: 128px; border-radius: var(--r-12); background: var(--surface-2); overflow: hidden; flex: 0 0 auto; }
.vd-seg-img img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.vd-seg-n { position: absolute; left: 8px; top: 8px; z-index: 1; font-size: var(--type-caption); font-weight: 600; color: #fff; opacity: .8; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.vd-seg-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.vd-seg-t { font-size: var(--type-caption); color: var(--text-2); font-variant-numeric: tabular-nums; }
.vd-seg-s { gap: 12px; }
.vd-seg-d { margin: 0; font-size: var(--type-body); line-height: 1.35; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.vd-hl { margin: 0; font-size: var(--type-body); color: var(--text-2); }
.vd-hl b { color: var(--text); }
.vd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 4px; }
.vd-actions .btn.primary { flex: 1; }
.vd-actions .btn.text { height: 44px; }
/* «Подробности»: свёрнуто по умолчанию, шеврон поворачивается */
.vd-more { border-top: 1px solid var(--line); }
.vd-more summary { list-style: none; display: flex; align-items: center; gap: 8px; height: 48px; font-size: var(--type-body); color: var(--text-2); cursor: pointer; }
.vd-more summary::-webkit-details-marker { display: none; }
.vd-more summary .i { color: var(--text-3); margin-left: auto; transition: transform .2s; }
.vd-more[open] summary .i { transform: rotate(90deg); }
.vd-facts { margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; font-size: var(--type-body); }
.vd-facts div { display: flex; gap: 12px; justify-content: space-between; }
.vd-facts span:first-child { color: var(--text-3); flex: 0 0 auto; }
.vd-facts span:last-child { color: var(--text-2); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.vd-transcript { margin: 0 0 16px; font-size: var(--type-body); color: var(--text-2); white-space: pre-wrap; }

/* <video> для миниатюр: в DOM, в пределах экрана, с размером и без display/visibility hidden — иначе iOS не декодирует
   кадры после seek. Практически невидим (opacity .01), под шапкой, кликов не ловит. */
.u-offscreen { position: absolute; left: 0; top: calc(var(--top) + 58px); width: 90px; height: 160px; opacity: .01; pointer-events: none; z-index: 0; }

.upload-steps { display: flex; gap: 12px; flex-wrap: wrap; margin: 4px 20px 12px; color: var(--text); font-size: 11px; }
.upload-steps span { color: var(--text-3); }
.upload-steps [aria-current="step"] { color: var(--text); font-weight: 600; }
.u-pick h2 { font-size: var(--type-title); letter-spacing: -.03em; line-height: 1.15; max-width: 280px; margin: 0; }
.u-big { height: 88px; width: 64px; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--link); }
.u-stage { height: clamp(150px, 30dvh, 300px); min-height: 150px; }
.u-ftr .btn { padding: 0 12px; min-width: 0; font-size: var(--type-body); }
.u-tlwrap { margin-bottom: 16px; }
.u-tl { padding-bottom: 18px; }
.u-list { padding-top: 8px; }
.u-empty { font-size: var(--type-secondary); line-height: 1.5; }
.u-t small { white-space: nowrap; }
.v-card { flex-shrink: 0; height: auto; min-height: 96px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.v-stats { flex-wrap: wrap; gap: 4px 12px; }
.vd-meta { flex-wrap: wrap; }
.vp-btn { width: 44px; height: 44px; }
.vp-ctl { gap: 6px; left: 8px; right: 8px; }
.vp-time { font-size: var(--type-small); }
#screen-video .u-hdr, #screen-videos .u-hdr, #screen-upload .u-hdr { width: 100%; max-width: 600px; margin: 0 auto; }
#screen-video .u-main, #screen-videos .u-main, #screen-upload .u-main { width: 100%; max-width: 600px; margin: 0 auto; }
.upload-steps { width: calc(100% - 40px); max-width: 560px; margin-left: auto; margin-right: auto; }
@media (max-height: 650px) { .u-stage { height: 18dvh; min-height: 96px; } .u-strip { height: 72px; } .u-head { height: 84px; } .u-tlwrap { margin-bottom: 0; } .upload-steps { margin-bottom: 6px; } .u-list { min-height: 80px; } .u-ftr { padding-top: 8px; } }
@media (max-width: 359px) { .u-ftr { gap: 8px; } .vp-time { font-size: 11px; } .vp-ctl { flex-wrap: wrap; } .vp-seek { min-width: 35px; } .u-t small { display: block; margin-left: 0; } }

.v-feedback{font-size: var(--type-secondary);line-height:1.45;color:var(--text-2);margin:8px 0;white-space:normal}
#videos-moderation{display:block;margin:12px 24px;color:var(--text-2)}
#videos-moderation[hidden]{display:none}

/* Age is a separate, high-contrast badge alongside publication status. */
.v-age { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  min-width: 32px; max-width: 100%; min-height: 24px; padding: 2px 7px; overflow-wrap: anywhere; border: 1px solid var(--line-strong);
  border-radius: 6px; background: var(--info-bg); color: var(--link); font-size: var(--type-small);
  line-height: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.v-meta { flex-wrap: wrap; row-gap: 6px; }

/* One editor scrollport: expanded framing never pushes the footer out of reach. */
.u-editor { overflow-y: auto; overscroll-behavior: contain; }
.u-editor > * { flex-shrink: 0; }
.u-editor .u-list { flex: 1 0 auto; overflow: visible; min-height: 64px; }
.u-editor .u-ftr { position: sticky; bottom: 0; z-index: 6; border-top: 1px solid var(--line); }
.vd-sections { background: var(--surface); border: 1px solid var(--line); }
.vd-sections > summary { display: flex; justify-content: space-between; }
.vd-sections > summary::after { content: '+'; color: var(--text-3); }
.vd-sections[open] > summary::after { content: '−'; }
.vd-sections .vd-segs { padding: 12px; }
.vd-sections .vd-hl { padding: 0 12px 12px; }
.vd-stat { padding: 10px; border-radius: var(--radius-control); }
.vd-stat span { font-size: var(--type-caption); overflow-wrap: anywhere; }
.vd-actions .btn { min-width: 0; font-size: var(--type-body); }

.upload-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: var(--type-caption); }
.upload-steps span { padding-block: 6px; border-bottom: 2px solid var(--line); text-align: center; overflow-wrap: anywhere; }
.upload-steps [aria-current="step"] { border-color: var(--accent); }
