/* Субтитры на видео (18 ноя): экран www/subs.html. Цвета — из переменных приложения (app.css): чёрный + лайм */
html, body.subs-page { height: auto; min-height: 100%; }
body.subs-page { overflow-y: auto; }
.sb { width: 100%; max-width: 620px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 16px; }
.sb-nav { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 10px; min-height: calc(56px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); background: var(--bg); }
html.in-tg .sb-back { display: none; }
.sb-back { width: 40px; height: 40px; margin-left: -8px; display: grid; place-items: center; color: var(--ink); border-radius: 50%; }
.sb-back svg { width: 24px; height: 24px; }
.sb-title { font: 700 18px var(--font-d); letter-spacing: -.01em; }
.sb-new { margin-left: auto; border: 0; background: none; color: var(--brand); font-weight: 600; font-size: 14px; padding: 10px 0 10px 10px; }
.sb-screen { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 8px 0 28px; }
.sb-center { align-items: center; justify-content: center; text-align: center; gap: 12px; padding-bottom: 12vh; }
.sb-center h1 { margin: 10px 0 0; font: 800 26px/1.15 var(--font-d); letter-spacing: -.02em; }
.sb-center p { margin: 0; color: var(--muted); max-width: 340px; }
.sb-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 42px 20px; text-align: center; border-radius: 22px; background: var(--card); border: 1.5px dashed color-mix(in srgb, var(--brand) 55%, transparent); transition: background .15s, transform .15s; }
.sb-drop:active, .sb-drop.over { background: var(--card-2); transform: scale(.99); }
.sb-drop b { font: 700 19px var(--font-d); }
.sb-drop small { color: var(--muted); font-size: 13px; }
.sb-drop-ic { width: 54px; height: 54px; border-radius: 50%; background: var(--btn); color: var(--btn-ink); display: grid; place-items: center; margin-bottom: 8px; }
.sb-drop-ic svg { width: 26px; height: 26px; stroke-width: 2.2; }
.sb-block { display: flex; flex-direction: column; gap: 9px; }
.sb-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.sb-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.sb-how { list-style: none; counter-reset: st; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.sb-how li { counter-increment: st; position: relative; padding-left: 40px; display: flex; flex-direction: column; }
.sb-how li::before { content: counter(st); position: absolute; left: 0; top: 2px; width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--brand); font-weight: 700; font-size: 13px; }
.sb-how span { color: var(--muted); font-size: 13.5px; }
.sb-err { margin: 0; color: var(--danger); font-size: 14px; }
.sb-ring { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.sb-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.sb-ring circle { fill: none; stroke: var(--card-2); stroke-width: 7; }
.sb-ring circle + circle { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .35s ease-out; }
.sb-ring b { font: 800 27px var(--font-d); font-variant-numeric: tabular-nums; }
#sbStop { margin-top: 14px; }
.sb-edit { gap: 12px; padding-bottom: 96px; }
.sb-stage { position: sticky; top: calc(56px + env(safe-area-inset-top, 0px)); z-index: 6; align-self: center; width: 100%; max-height: 42dvh; border-radius: 16px; overflow: hidden; background: #000; container-type: inline-size; }
.sb-stage video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; }
.sb-over { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sb-cap { position: absolute; left: 0; right: 0; transform: translateY(-100%); text-align: center; white-space: pre; }
.sb-cap span { paint-order: stroke fill; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sb-play { position: absolute; left: 10px; bottom: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(8px); }
.sb-play svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.sb-nov { position: absolute; left: 12px; right: 12px; top: 10px; margin: 0; color: #fff; font-size: 12.5px; text-align: center; }
.sb-seek { width: 100%; margin: 0; accent-color: var(--brand); }
input[type="range"] { accent-color: var(--brand); width: 100%; }
.sb-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 13px; background: var(--card); }
.sb-tabs button { flex: 1; border: 0; background: none; border-radius: 10px; padding: 9px; font-weight: 600; color: var(--muted); }
.sb-tabs button[aria-selected="true"] { background: var(--card-2); color: var(--ink); }
.sb-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 13.5px; }
.sb-find { display: grid; grid-template-columns: 1fr 1fr auto; gap: 7px; margin-bottom: 10px; }
.sb-find input { min-width: 0; border: 0; border-radius: 11px; background: var(--card); padding: 9px 11px; font-size: 14px; }
.sb-list { display: flex; flex-direction: column; gap: 7px; }
.sb-row { border-radius: 13px; background: var(--card); padding: 8px 10px; border: 1.5px solid transparent; }
.sb-row.on { border-color: var(--brand); }
.sb-row-top { display: flex; align-items: center; gap: 8px; }
.sb-time { border: 0; background: none; padding: 3px 0; color: var(--brand); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sb-row textarea { display: block; width: 100%; resize: none; overflow: hidden; border: 0; outline: 0; background: none; padding: 2px 0; font-size: 15px; line-height: 1.35; }
.sb-tools { display: none; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 7px; }
.sb-row.open .sb-tools { display: flex; }
.sb-tools button { border: 0; border-radius: 8px; background: var(--card-2); min-width: 38px; height: 32px; padding: 0 9px; font-size: 12.5px; font-weight: 600; }
.sb-tools span { color: var(--muted); font-size: 12px; margin-left: 4px; }
.sb-tools .sp { flex: 1; }
.sb-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 7px; }
.sb-fonts button { border: 1.5px solid transparent; background: var(--card); border-radius: 12px; height: 52px; padding: 0 6px; font-size: 17px; overflow: hidden; white-space: nowrap; }
.sb-fonts button[aria-pressed="true"] { border-color: var(--brand); }
.sb-up { align-self: flex-start; }
.sb-colors { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.sb-colors button, .sb-colors label { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); padding: 0; position: relative; overflow: hidden; }
.sb-colors button[aria-pressed="true"] { outline: 2px solid var(--brand); outline-offset: 2px; }
.sb-colors input { position: absolute; inset: -8px; width: 60px; height: 60px; border: 0; padding: 0; background: none; }
.sb-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--bg) 28%); }
.sb-cta .btn-main { display: flex; max-width: 588px; margin: 0 auto; }
.sb-ok { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: var(--btn); color: var(--btn-ink); }
.sb-ok svg { width: 36px; height: 36px; stroke-width: 2.6; }
.sb-dl { width: min(100%, 340px); margin-top: 16px; display: flex; align-items: center; justify-content: center; text-decoration: none; }
#scDone .pill { color: var(--ink); text-decoration: none; }
.sb-small { font-size: 12.5px; margin-top: 8px !important; }
@media (prefers-reduced-motion: reduce) { .sb-ring circle + circle, .sb-drop { transition: none; } }
