/* SeemsGood Media Corporation — панель студии.
   Тёмная монтажная: светятся только кадры, статусы и квота.
   Слева — «где я», сверху — «кто» (персонажи) и «что показать» (фильтры), справа — «этот ролик».
   Встроенные стили запрещены CSP, поэтому всё — классами; шрифты лежат рядом. */

@font-face { font-family: "Onest"; font-weight: 100 900; font-display: swap; src: url("/static/fonts/onest-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Onest"; font-weight: 100 900; font-display: swap; src: url("/static/fonts/onest-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 200 900; font-display: swap; src: url("/static/fonts/unbounded-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Unbounded"; font-weight: 200 900; font-display: swap; src: url("/static/fonts/unbounded-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("/static/fonts/jbmono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("/static/fonts/jbmono-cyrillic.woff2") format("woff2"); unicode-range: U+0400-045F; }

:root {
  --bg: #0a0a0e;
  --panel: #101016;
  --raise: #16161e;
  --hover: #1d1d27;
  --line: rgba(236, 232, 255, .07);
  --line-2: rgba(236, 232, 255, .13);
  --ink: #f3f1fa;
  --ink-2: #aeabbe;
  --mute: #75738c;
  --accent: #8d6bff;
  --accent-2: #b39cff;
  --accent-soft: rgba(141, 107, 255, .14);
  --accent-glow: rgba(141, 107, 255, .38);
  --live: #ff8a4c;
  --live-soft: rgba(255, 138, 76, .14);
  --ok: #43d99b; --ok-soft: rgba(67, 217, 155, .13);
  --warn: #ffbf47; --warn-soft: rgba(255, 191, 71, .13);
  --bad: #ff5f73; --bad-soft: rgba(255, 95, 115, .13);
  --run: #62aaff; --run-soft: rgba(98, 170, 255, .14);
  --scrim: rgba(4, 4, 8, .62);
  --f-ui: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-display: "Unbounded", "Onest", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --side: 240px; --side-mini: 72px; --insp: 440px; --top: 64px;
  --card-min: 196px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; overflow-x: hidden; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-glow); }
h1 { font: 700 26px/1.15 var(--f-display); letter-spacing: -.02em; margin: 0 0 14px; text-wrap: balance; }
h2 { font-size: 15px; line-height: 1.3; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 13px; font-weight: 600; }
p { margin: 0 0 10px; }
code { font: 12.5px/1.4 var(--f-mono); background: var(--raise); padding: 2px 6px; border-radius: 5px; }
kbd { font: 600 10.5px/1 var(--f-mono); color: var(--mute); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); }
.muted, .mute { color: var(--mute); }
.small { font-size: 12.5px; }
.bad { color: var(--bad); }
.mono { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .01em; }
.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.spin { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .25; } }
/* Заполнение — backwards, не both: после окончания анимация не держит transform, иначе карточка
   становится «рамкой» для position: fixed, и всплывающее снизу меню застревает внутри неё. */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---------- аватары: 8 цветов по id ---------- */
.ava { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; overflow: hidden; color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .02em; background: linear-gradient(140deg, var(--c1), var(--c2)); }
.ava::after { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 60% at 30% 20%, rgba(255, 255, 255, .35), transparent 60%); }
.ava.xs { width: 22px; height: 22px; font-size: 9px; }
.ava.lg { width: 64px; height: 64px; font-size: 20px; }
.ava.xl { width: 112px; height: 112px; font-size: 38px; }
.ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.av-0 { --c1: #ff6a88; --c2: #ff99ac; } .av-1 { --c1: #2193b0; --c2: #6dd5ed; } .av-2 { --c1: #8e2de2; --c2: #c471f5; } .av-3 { --c1: #11998e; --c2: #38ef7d; }
.av-4 { --c1: #f7971e; --c2: #ffd200; } .av-5 { --c1: #ee0979; --c2: #ff6a00; } .av-6 { --c1: #4776e6; --c2: #8e54e9; } .av-7 { --c1: #fc5c7d; --c2: #6a82fb; }
span.stack { display: inline-flex; align-items: center; }
.stack .ava { box-shadow: 0 0 0 2px rgba(10, 10, 14, .9); }
.stack .ava + .ava { margin-left: -7px; }

/* ---------- каркас ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .28s var(--ease); }
.app.mini { grid-template-columns: var(--side-mini) minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 4px; padding: calc(14px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); background: var(--panel); border-right: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; z-index: 30; scrollbar-width: none; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 16px; white-space: nowrap; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand b { display: block; font: 700 15px/1 var(--f-display); letter-spacing: -.01em; }
.brand small { display: block; color: var(--mute); font-size: 11px; margin-top: 4px; }
.logo { width: 36px; height: 36px; border-radius: 11px; flex: none; display: block; }
/* Герой студии: появляется после входа, смеётся при входе и при наведении. */
.logo.face { background: #0b0b10; overflow: hidden; box-shadow: 0 6px 18px rgba(255, 138, 76, .3); }
.logo.face img { width: 100%; height: 100%; object-fit: cover; display: block; transform-origin: 50% 85%; animation: chuckle 8s ease-in-out infinite; }
.brand:hover .logo.face img { animation: laughing .3s ease-in-out infinite; }
body.entering .logo.face img { animation: pop-laugh 1.5s var(--ease) both; }
@keyframes chuckle { 0%, 86%, 100% { transform: none; } 88% { transform: rotate(-7deg) scale(1.08); } 90% { transform: rotate(6deg) scale(1.08); } 92% { transform: rotate(-5deg) scale(1.06); } 94% { transform: rotate(4deg) scale(1.04); } 96% { transform: rotate(-2deg); } }
@keyframes laughing { 0%, 100% { transform: rotate(-7deg) scale(1.1); } 50% { transform: rotate(7deg) translateY(-1px) scale(1.12); } }
@keyframes pop-laugh { 0% { transform: scale(0) rotate(-30deg); } 30% { transform: scale(1.25) rotate(8deg); } 42% { transform: scale(1.1) rotate(-8deg); } 54% { transform: scale(1.15) rotate(7deg); } 66% { transform: scale(1.08) rotate(-6deg); } 78% { transform: scale(1.1) rotate(4deg); } 100% { transform: none; } }
.collapse { position: absolute; right: 10px; top: calc(20px + env(safe-area-inset-top, 0px)); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--mute); background: none; border: 0; cursor: pointer; }
.collapse:hover { background: var(--hover); color: var(--ink); }
.new-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; margin-bottom: 10px; border-radius: 11px; font-weight: 600; color: #fff; white-space: nowrap; text-decoration: none; background: linear-gradient(180deg, #9b7dff, #7a55ff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 8px 22px var(--accent-glow); transition: transform .12s, box-shadow .2s; }
.new-btn:hover { text-decoration: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 10px 30px var(--accent-glow); }
.new-btn:active { transform: translateY(1px); }
.new-btn kbd { color: rgba(255, 255, 255, .75); border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-h { font-size: 10.5px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .09em; padding: 12px 10px 6px; white-space: nowrap; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 11px; border-radius: 9px; color: var(--ink-2); font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .12s, color .12s; }
.nav a .i { color: var(--mute); transition: color .12s; }
.nav a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.nav a:hover .i { color: var(--ink); }
.nav a.on { background: var(--accent-soft); color: var(--ink); }
.nav a.on .i { color: var(--accent-2); }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.cnt { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent-2); }
.cnt.live-cnt { background: var(--live-soft); color: var(--live); }
.side-foot { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.quota { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); white-space: nowrap; color: var(--ink); text-decoration: none; }
.quota:hover { border-color: var(--line-2); text-decoration: none; }
.quota-top { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--mute); }
.quota-top b { font: 700 18px/1 var(--f-display); color: var(--ink); letter-spacing: -.02em; }
.me-row { display: flex; align-items: center; gap: 6px; }
.me-row form { margin: 0; }
.me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; white-space: nowrap; color: var(--ink); text-decoration: none; }
.me:hover { background: var(--hover); text-decoration: none; }
.me > span:last-child { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.me b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--mute); font-size: 11.5px; }
.app.mini .brand-t, .app.mini .new-btn span, .app.mini .new-btn kbd, .app.mini .nav-h, .app.mini .nav a span, .app.mini .nav .cnt, .app.mini .quota, .app.mini .me > span:last-child, .app.mini .me-row form { display: none; }
.app.mini .new-btn { width: 44px; margin-inline: auto; }
.app.mini .nav a { justify-content: center; padding: 0; }
.app.mini .collapse { position: static; margin: 0 auto 6px; transform: rotate(180deg); }
.app.mini .me { justify-content: center; }

.main { min-width: 0; display: flex; flex-direction: column; transition: padding-right .3s var(--ease); }
.app.insp-open .main { padding-right: var(--insp); }
.top { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 12px; padding: env(safe-area-inset-top, 0px) max(28px, env(safe-area-inset-right, 0px)) 0 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px); border-bottom: 1px solid var(--line); }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs a { color: var(--mute); font-weight: 500; }
.crumbs > span:not(.sep), .crumbs > a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* в flex многоточие — только у элемента */
.crumbs .sep { color: var(--mute); opacity: .6; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; color: var(--ink-2); background: none; border: 0; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; color: var(--mute); }
.icon-btn.menu-toggle { display: none; }
.live { display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); font-weight: 600; font-size: 13px; white-space: nowrap; color: var(--ink); text-decoration: none; }
.live:hover { border-color: var(--line-2); text-decoration: none; }
.ring { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--live-soft); border-top-color: var(--live); animation: spin 1s linear infinite; flex: none; }
.live.idle .ring { animation: none; border-color: var(--ok-soft); border-top-color: var(--ok); }
.counter { display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--raise); color: var(--mute); font-size: 12px; text-decoration: none; white-space: nowrap; }
.counter:hover { border-color: var(--line-2); text-decoration: none; }
.counter .i { color: var(--accent-2); width: 16px; height: 16px; }
.counter span { display: flex; align-items: baseline; gap: 5px; }
.counter span + span { padding-left: 12px; border-left: 1px solid var(--line); }
.counter strong { font-size: 15px; color: var(--ink); font-weight: 700; }
.view { width: 100%; max-width: 1480px; padding: 22px max(28px, env(safe-area-inset-right, 0px)) 80px 28px; }
.solo { min-height: 100vh; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.view-head h1 { margin: 0; }
.view-head p { margin: 6px 0 0; color: var(--mute); max-width: 720px; }
.head-acts { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- кнопки, поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none; background: var(--raise); border: 1px solid var(--line-2); color: var(--ink); transition: background .12s, border-color .12s, transform .08s, box-shadow .2s; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn .i { width: 16px; height: 16px; }
.btn.pri, .btn-primary { background: linear-gradient(180deg, #9b7dff, #7a55ff); border-color: transparent; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 6px 18px var(--accent-glow); }
.btn.pri:hover, .btn-primary:hover { filter: brightness(1.08); background: linear-gradient(180deg, #9b7dff, #7a55ff); }
.btn.pri:disabled, .btn-primary:disabled { opacity: .5; cursor: not-allowed; filter: grayscale(.4); box-shadow: none; }
.btn.ghost { background: none; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--hover); color: var(--ink); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: rgba(255, 95, 115, .3); }
.btn-big { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.link { font: inherit; font-size: 13.5px; font-weight: 500; background: none; border: 0; padding: 0; color: var(--accent-2); cursor: pointer; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link.danger, .danger { color: var(--bad); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
label small { font-weight: 400; color: var(--mute); font-size: 12px; line-height: 1.45; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; min-width: 0; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--mute); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; line-height: 1.55; }
input[type="number"] { width: 110px; }
input[type="file"] { padding: 7px; cursor: pointer; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 600; font-size: 13px; margin-right: 12px; padding: 6px 12px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--raise); color: var(--ink); cursor: pointer; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
form.stack, div.stack { display: flex; flex-direction: column; gap: 14px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0; }
.inline-form .grow { flex: 1 1 220px; }
.inline-form.compact { gap: 8px; align-items: center; }
.inline-form.compact select { padding: 5px 30px 5px 9px; font-size: 13px; }
.copy { width: 100%; margin-top: 10px; font: 13px/1.4 var(--f-mono); }

/* ---------- общие блоки (страницы управления) ---------- */
.card:not(a) { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin-bottom: 18px; }
.card.narrow { width: min(420px, 100%); }
.narrow-left { max-width: 620px; }
.card-inset { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--raise); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 18px; margin-bottom: 18px; }
.split > .card { margin-bottom: 0; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 32px 0 14px; font-size: 16px; font-weight: 700; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.toolbar form { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.actions form { margin: 0; }
.more { margin-top: 26px; text-align: center; }
.notice { padding: 13px 16px; border-radius: 14px; margin-bottom: 16px; border: 1px solid var(--line); font-size: 13.5px; }
.notice p { margin: 6px 0 0; }
.notice-bad { background: var(--bad-soft); border-color: rgba(255, 95, 115, .3); }
.notice-ok { background: var(--ok-soft); border-color: rgba(67, 217, 155, .3); }
.form-error { color: var(--bad); background: var(--bad-soft); padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255, 95, 115, .25); }
.empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 60px 20px; border: 1px dashed var(--line-2); border-radius: 18px; color: var(--mute); text-align: center; }
.empty > .i { width: 30px; height: 30px; opacity: .7; margin-bottom: 4px; }
.empty b { color: var(--ink); font-size: 15px; }
.empty p { margin: 0 0 12px; max-width: 440px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--mute); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 4px 0; }
.big-numbers { display: flex; flex-wrap: wrap; gap: 26px; color: var(--mute); align-items: baseline; margin-bottom: 8px; }
.big-numbers strong { font: 700 32px/1 var(--f-display); color: var(--ink); margin-right: 6px; letter-spacing: -.03em; }
.prompt { background: var(--raise); border: 1px solid var(--line); padding: 12px 14px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); line-height: 1.6; font-size: 13.5px; margin: 0; }
.rows { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.rows li { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.rows li:hover { background: var(--raise); }
.rows li:last-child { border-bottom: 0; }
.rows li.request { flex-direction: column; align-items: stretch; gap: 12px; }
.row-link { display: flex; flex-direction: column; gap: 3px; color: var(--ink); text-decoration: none; min-width: 0; }
.row-link:hover { text-decoration: none; }
.row-link:hover strong { color: var(--accent-2); }
.row-main { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-sub { color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 20px; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; color: var(--mute); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; background: rgba(255, 255, 255, .02); }
.table th, .table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: var(--raise); }
.table tr:last-child td { border-bottom: 0; }
.table .row-actions { display: flex; gap: 14px; justify-content: flex-end; align-items: center; }
.table .row-actions form { margin: 0; }
.table tr.is-off td { color: var(--mute); }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); }
.segmented label, .segmented a { flex-direction: row; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 550; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked), .segmented a.on { background: var(--hover); color: var(--ink); }
.segmented label.disabled { opacity: .45; cursor: not-allowed; }
.groups li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.groups input { width: 170px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--hover); color: var(--ink-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-ok, .pill-completed, .pill-acc-active { background: var(--ok-soft); color: var(--ok); }
.p-run, .p-queue, .pill-queued { background: var(--run-soft); color: var(--run); }
.p-run::before { animation: pulse 1.3s infinite; }
.p-wait, .pill-acc-exhausted { background: var(--warn-soft); color: var(--warn); }
.p-bad, .pill-failed, .pill-acc-error { background: var(--bad-soft); color: var(--bad); }
.p-off, .pill-acc-disabled { background: var(--hover); color: var(--mute); }
.events summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.events ol { list-style: none; padding: 0; margin: 12px 0; font-size: 13.5px; }
.events li { padding: 3px 0; }

/* ---------- лента персонажей («кто») ---------- */
.cast-strip { display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 14px; margin-bottom: 2px; scrollbar-width: none; }
.cast-strip::-webkit-scrollbar { display: none; }
/* Ряд уходит за край — затухание с той стороны, где есть ещё (классы ставит app.js). */
.fade-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.fade-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
.fade-l.fade-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.who { flex: none; min-width: 72px; padding: 0 4px; display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--ink-2); font-size: 12.5px; font-weight: 500; text-decoration: none; }
.who:hover { text-decoration: none; color: var(--ink); }
.who .ava { width: 64px; height: 64px; font-size: 20px; transition: transform .2s var(--ease), box-shadow .2s; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line-2); }
.who:hover .ava { transform: translateY(-2px); }
.who.on { color: var(--ink); }
.who.on .ava { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent), 0 8px 24px var(--accent-glow); }
.who .n { white-space: nowrap; }
.who .c { font-size: 10.5px; color: var(--mute); margin-top: -5px; }
.who.all .ava { background: var(--raise); color: var(--ink-2); }
.who.add .ava { background: none; border: 1.5px dashed var(--line-2); box-shadow: none; color: var(--mute); }

/* ---------- фильтры («что показать») ---------- */
.filters { position: sticky; top: var(--top); z-index: 15; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; margin-bottom: 12px; background: var(--bg); box-shadow: 0 10px 14px -10px var(--bg); }
.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 8px; color: var(--ink-2); font-weight: 550; white-space: nowrap; text-decoration: none; transition: background .15s, color .15s; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.on { background: var(--hover); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 2px 8px rgba(0, 0, 0, .35); }
.tab b { font-size: 11px; font-weight: 700; color: var(--mute); }
.tab.on b { color: var(--accent-2); }
.tab.err b { color: var(--bad); }
.tab .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 1.4s ease-in-out infinite; }
.f-right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dd { position: relative; }
.dd > button { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); font-weight: 500; white-space: nowrap; cursor: pointer; }
.dd > button:hover, .dd.open > button { border-color: var(--line-2); color: var(--ink); }
.dd > button b { color: var(--ink); font-weight: 600; }
.dd > button .i { width: 15px; height: 15px; color: var(--mute); }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; padding: 6px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .55); z-index: 40; opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; pointer-events: none; transition: opacity .14s, transform .14s var(--ease); }
.dd.open .menu { opacity: 1; transform: none; pointer-events: auto; }
.dd.up .menu { top: auto; bottom: calc(100% + 6px); transform-origin: bottom right; }
.look.archived .look-ph { filter: saturate(.4); opacity: .7; }
.menu a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.menu a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.menu a.on { color: var(--ink); }
.menu a .i { margin-left: auto; color: var(--accent-2); opacity: 0; }
.menu a.on .i { opacity: 1; }
.density { display: flex; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.density button { width: 32px; height: 30px; display: grid; place-items: center; border-radius: 7px; color: var(--mute); background: none; border: 0; cursor: pointer; }
.density button.on { background: var(--hover); color: var(--ink); }
.fchips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; width: 100%; }
.fchips:empty { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 6px 0 4px; border-radius: 99px; background: var(--accent-soft); color: var(--ink); font-size: 12.5px; font-weight: 550; }
.fchip.t { padding-left: 10px; }
.fchip a { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.fchip a:hover { background: rgba(255, 255, 255, .1); color: var(--ink); }
.fchip .i { width: 12px; height: 12px; }
.reset { font-size: 12.5px; color: var(--mute); font-weight: 500; }
.result-count { color: var(--mute); font-size: 12.5px; margin: -2px 0 14px; }

/* ---------- кадры 9:16 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr)); gap: 22px 16px; }
.grid.dens-l { --card-min: 240px; } .grid.dens-s { --card-min: 150px; }
a.card { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; animation: rise .45s var(--ease) backwards; }
a.card:hover { text-decoration: none; }
.shot { position: relative; display: grid; place-items: center; aspect-ratio: 9 / 16; max-width: 100%; border-radius: 14px; overflow: hidden; background: #050508; box-shadow: 0 0 0 1px var(--line); transition: transform .25s var(--ease), box-shadow .25s; }
a.card:hover .shot, a.card:focus-visible .shot { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line-2), 0 22px 44px rgba(0, 0, 0, .6); }
a.card.sel .shot { box-shadow: 0 0 0 2px var(--accent), 0 22px 44px rgba(0, 0, 0, .6); }
.shot .poster, .shot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot video { opacity: 0; transition: opacity .25s; }
.shot.playing video { opacity: 1; }
.shot::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, transparent 22%, transparent 55%, rgba(0, 0, 0, .72) 100%); pointer-events: none; }
a.card.failed .shot .poster { filter: saturate(.35) brightness(.7); }
a.card.just-done .shot { animation: flash 1.3s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 3px var(--ok), 0 0 40px rgba(67, 217, 155, .6); } 100% { box-shadow: 0 0 0 1px var(--line); } }
.badge { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: rgba(8, 8, 12, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; white-space: nowrap; max-width: calc(100% - 18px); overflow: hidden; text-overflow: ellipsis; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge.plain::before { display: none; }
.b-tl { left: 9px; top: 9px; } .b-tr { right: 9px; top: 9px; }
.st-run { color: #9ccaff; } .st-run::before { animation: pulse 1.3s infinite; }
.st-sent { color: #ffd27a; } .st-sent::before { background: currentColor; }
.badge .i { width: 12px; height: 12px; } .badge:has(.i)::before { display: none; }
.st-queue { color: #c9c6da; } .st-wait { color: #ffd27a; } .st-bad { color: #ff97a5; } .st-off { color: #a3a1b4; } .st-ok { color: #7ff0bd; }
.shot-foot { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; color: #fff; }
.shot-foot .mono { opacity: .8; }
.scrub { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .15); opacity: 0; transition: opacity .2s; }
.shot.playing .scrub { opacity: 1; }
.scrub i { display: block; height: 100%; width: 0; background: var(--accent-2); }
.develop { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; background: radial-gradient(120% 70% at 50% 110%, rgba(141, 107, 255, .35), transparent 65%), #07070b; }
.shot.running .develop::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0 40%, rgba(179, 156, 255, .18) 50%, transparent 60% 100%); background-size: 100% 260%; animation: develop 2.6s linear infinite; }
.develop.calm { background: #07070b; }
@keyframes develop { from { background-position: 0 100%; } to { background-position: 0 -160%; } }
.prog { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; color: #d7d4ea; font-size: 12.5px; text-align: center; padding: 0 12px; }
.prog .i { width: 30px; height: 30px; opacity: .85; }
.prog b { font-weight: 600; }
.prog small { color: var(--mute); font-size: 11.5px; }
.meta { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; min-width: 0; }
.meta strong { font-weight: 600; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.meta span { color: var(--mute); font-size: 12.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.meta .why { color: var(--bad); }

/* ---------- правая панель ролика ---------- */
.insp { position: fixed; z-index: 35; top: 0; right: 0; bottom: 0; width: var(--insp); display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .3s var(--ease), visibility .3s; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) 0; visibility: hidden; }
.insp.open { transform: none; visibility: visible; box-shadow: -30px 0 60px rgba(0, 0, 0, .4); }
.insp-head { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.insp-t { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--mute); min-width: 0; }
.insp-t .i { width: 15px; height: 15px; }
.insp-body { flex: 1; overflow-y: auto; padding: 16px; scrollbar-width: thin; transition: opacity .15s; }
.insp-body.loading { opacity: .45; }
.scrim { position: fixed; inset: 0; z-index: 34; background: var(--scrim); opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.show { opacity: 1; pointer-events: auto; }
#side-scrim { z-index: 44; }

.jp-media { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.player { position: relative; width: min(100%, 300px); margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: #050508; box-shadow: 0 0 0 1px var(--line-2), 0 24px 50px rgba(0, 0, 0, .55); }
.player video, .player .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Во весь экран ролик 9:16 целиком, с полями по бокам — без растягивания и обрезки (на ПК экран широкий). */
video:fullscreen { object-fit: contain !important; background: #000; }
video:-webkit-full-screen { object-fit: contain !important; background: #000; }
.player:fullscreen video { object-fit: contain !important; }
.player .develop { z-index: 0; }
.player.gone .poster { opacity: .3; filter: grayscale(1); }
.player-note { color: var(--mute); font-size: 12.5px; text-align: center; margin: 0; }
.jp-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.jp-title h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.jp-sub { color: var(--mute); font-size: 12.5px; margin-bottom: 14px; }
.jp-cast { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cast-pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 4px; border-radius: 99px; background: var(--raise); border: 1px solid var(--line); color: var(--ink); font-weight: 550; font-size: 13px; text-decoration: none; }
.cast-pill:hover { border-color: var(--accent); text-decoration: none; }
.cast-pill small { color: var(--mute); font-weight: 400; }
.cast-pill .order { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 11px/1 var(--f-mono); }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.acts form { margin: 0; display: contents; }
.acts .btn { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; width: 100%; }
.acts .wide { grid-column: 1 / -1; }
.jp-tabs { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); margin-bottom: 14px; }
.jp-tabs button { flex: 1; height: 30px; border-radius: 7px; color: var(--ink-2); font-weight: 550; font-size: 13px; background: none; border: 0; cursor: pointer; }
.jp-tabs button.on { background: var(--hover); color: var(--ink); }
.jp-sec { margin-bottom: 18px; }
.jp-sec > h3 { font-size: 11px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 10px; }
.box { background: var(--raise); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.cap-form textarea { width: 100%; background: transparent; border: 0; padding: 0; box-shadow: none; min-height: 110px; }
.cap-form .tags-in { width: 100%; background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 10px 0 0; margin-top: 8px; color: var(--accent-2); box-shadow: none; }
.cap-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--mute); }
.cap-foot .grow { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 140px; }
.cap-foot .i { width: 14px; height: 14px; }
.cap-foot .grow .i { color: var(--accent-2); }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { position: relative; padding: 0 0 14px 24px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 18px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; }
.timeline .mono { color: var(--mute); display: block; }
/* Страница задания: те же блоки в две колонки. */
.job-page .jp { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 32px; align-items: start; }
.job-page .jp-media { position: sticky; top: calc(var(--top) + 24px); }
.job-page .player { width: 100%; }
.job-page .jp-info { max-width: 820px; }

/* ---------- создание ---------- */
.create { display: grid; grid-template-columns: 210px minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.steps { position: sticky; top: calc(var(--top) + 20px); display: flex; flex-direction: column; gap: 4px; }
.stp { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: var(--mute); font-weight: 550; text-decoration: none; }
.stp:hover { background: var(--hover); color: var(--ink-2); text-decoration: none; }
.stp .n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--raise); border: 1px solid var(--line-2); font: 700 12px/1 var(--f-mono); flex: none; color: var(--ink); }
.stp small { display: block; font-weight: 400; font-size: 11.5px; color: var(--mute); max-width: 140px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.stp.on { color: var(--ink); background: var(--accent-soft); }
.stp.on .n { background: var(--accent); border-color: var(--accent); color: #fff; }
.stp.done .n { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.stp.done .n .i { width: 14px; height: 14px; stroke-width: 2.6; }
.stp-s { display: none; }
.stp.off { opacity: .45; pointer-events: none; }
.step { padding: 22px 24px; margin-bottom: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; scroll-margin-top: calc(var(--top) + 16px); }
.step > h2 { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; }
.step > .hint { color: var(--mute); margin: 0 0 18px; font-size: 13.5px; }
.step h3 { font-size: 11px; font-weight: 600; margin: 18px 0 10px; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; }
.pick-grid.video { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.pick { position: relative; display: flex; flex-direction: column; gap: 7px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 550; cursor: pointer; min-width: 0; }
.pick:hover { text-decoration: none; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick .ph { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; max-width: 100%; border-radius: 14px; overflow: hidden; background: linear-gradient(150deg, var(--c1, #1d1d27), var(--c2, #101016)); color: #fff; font: 700 30px/1 var(--f-display); box-shadow: 0 0 0 1px var(--line); transition: transform .2s var(--ease), box-shadow .2s; }
.pick-grid.video .ph { aspect-ratio: 9 / 16; }
.pick .ph img, .pick .ph video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pick:hover .ph { transform: translateY(-3px); }
.pick.on .ph, .pick:has(input:checked) .ph { box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px var(--accent-soft); }
.pick:has(input:focus-visible) .ph { box-shadow: 0 0 0 2px var(--accent), 0 0 0 6px var(--accent-soft); }
.pick .ord { position: absolute; z-index: 2; top: 8px; left: 8px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center; background: var(--accent); color: #fff; font: 700 12px/1 var(--f-mono); box-shadow: 0 0 0 2px var(--panel); }
.pick-sub { color: var(--mute); font-weight: 400; font-size: 12px; margin-top: -4px; }
.upload-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; aspect-ratio: 9 / 16; border-radius: 14px; border: 1.5px dashed var(--line-2); color: var(--mute); font-size: 12.5px; text-align: center; padding: 10px; text-decoration: none; }
.upload-tile:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.mode { position: relative; flex-direction: column; align-items: stretch; gap: 0; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--raise); cursor: pointer; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.mode:hover { text-decoration: none; }
.mode input { position: absolute; opacity: 0; pointer-events: none; }
.mode b { font-size: 15px; }
.mode span { display: block; color: var(--mute); font-size: 12.5px; margin-top: 4px; font-weight: 400; }
.mode.on, .mode:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.mode.disabled { opacity: .45; cursor: not-allowed; }
.chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; flex-direction: row; align-items: center; height: 34px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--raise); color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .12s; }
.chip:hover { color: var(--ink); border-color: rgba(179, 156, 255, .4); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.per { padding: 16px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); margin-bottom: 12px; }
.per-h { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 4px; }
.per textarea, .step textarea { width: 100%; }
.auto-note { display: flex; align-items: center; gap: 6px; color: var(--mute); font-size: 12px; margin-top: 8px; }
.auto-note .i { width: 13px; height: 13px; color: var(--accent-2); }
.summary { position: sticky; top: calc(var(--top) + 20px); display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.summary h4 { margin: 0; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.sum-row { display: flex; align-items: center; gap: 10px; min-height: 30px; font-size: 13px; }
.sum-row .k { color: var(--mute); width: 70px; flex: none; }
.sum-row .v { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cost { padding: 14px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); }
.cost-n { font: 700 26px/1 var(--f-display); letter-spacing: -.02em; }
.cost p { margin: 6px 0 0; color: var(--mute); font-size: 12.5px; }
.summary select { width: 100%; }
.go { width: 100%; height: 50px; font-size: 15px; border-radius: 12px; }
.next-hint { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 6px 26px rgba(141, 107, 255, .7); } }

/* ---------- персонажи ---------- */
.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.char-card { position: relative; display: flex; flex-direction: column; align-items: center; border-radius: 20px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none; cursor: pointer; transition: transform .22s var(--ease), box-shadow .22s, border-color .22s; }
.char-card:hover, .char-card:focus-visible { transform: translateY(-4px); border-color: rgba(179, 156, 255, .45); box-shadow: 0 22px 44px rgba(0, 0, 0, .5), 0 0 0 1px rgba(141, 107, 255, .25); text-decoration: none; outline: none; }
.char-banner { position: relative; display: block; width: 100%; height: 84px; overflow: hidden; background: linear-gradient(180deg, var(--raise), var(--panel)); }
.char-bg { position: absolute; left: -20%; top: -40%; width: 140%; height: 180%; object-fit: cover; filter: blur(22px) saturate(1.3); opacity: .75; transition: opacity .25s, transform .4s var(--ease); }
.char-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 16, 22, 0) 20%, var(--panel) 100%); }
.char-card:hover .char-bg { opacity: 1; transform: scale(1.06); }
.char-ava { position: relative; z-index: 1; margin-top: -52px; }
.char-ava .ava.xl { width: 104px; height: 104px; font-size: 34px; box-shadow: 0 0 0 4px var(--panel), 0 0 0 5px var(--line-2), 0 12px 30px rgba(0, 0, 0, .5); transition: transform .22s var(--ease), box-shadow .22s; }
.char-card:hover .char-ava .ava.xl { transform: scale(1.04); box-shadow: 0 0 0 4px var(--panel), 0 0 0 6px var(--accent), 0 14px 36px var(--accent-glow); }
.char-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 16px 16px; width: 100%; }
.char-body b { font-size: 16px; }
.char-body .h { color: var(--accent-2); font-size: 12.5px; display: block; }
.char-body .h.muted { color: var(--mute); }
.char-stats { display: flex; gap: 14px; margin-top: 8px; color: var(--mute); font-size: 12px; }
.char-stats strong { color: var(--ink); font-weight: 600; }
.char-looks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 100%; margin-top: 12px; }
.char-looks img, .char-looks i { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: var(--hover); opacity: .82; transition: opacity .2s; }
.char-card:hover .char-looks img { opacity: 1; }
.char-open { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px 5px 7px; border-radius: 99px; background: rgba(10, 10, 14, .7); border: 1px solid rgba(255, 255, 255, .12); color: var(--ink); font-size: 12px; font-weight: 550; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s var(--ease); backdrop-filter: blur(6px); }
.char-open .i { width: 13px; height: 13px; order: 2; }
.char-card:hover .char-open, .char-card:focus-visible .char-open { opacity: 1; transform: none; }
@media (hover: none) { .char-open { opacity: 1; transform: none; } }
.channel-cover { position: relative; height: 170px; border-radius: 22px; overflow: hidden; background: linear-gradient(120deg, var(--c1), var(--c2)); }
.channel-cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 90% at 80% 0%, rgba(255, 255, 255, .25), transparent 60%), linear-gradient(transparent 30%, rgba(10, 10, 14, .85)); }
.channel-head { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: -56px 0 22px; padding: 0 24px; }
.channel-head .ava.xl { box-shadow: 0 0 0 5px var(--bg), 0 18px 40px rgba(0, 0, 0, .5); }
.channel-head .who-t { flex: 1; min-width: 200px; padding-bottom: 6px; }
.channel-head h1 { margin: 0; font-size: 30px; }
.channel-head .stats { display: flex; gap: 18px; color: var(--mute); font-size: 13px; margin-top: 8px; flex-wrap: wrap; }
.channel-head .stats b { color: var(--ink); }
.channel-head .cta { display: flex; gap: 10px; padding-bottom: 6px; flex-wrap: wrap; }
.channel-head .cta form { margin: 0; }
.subtabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.subtabs a { height: 42px; display: flex; align-items: center; color: var(--mute); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.subtabs a.on, .subtabs a:hover { color: var(--ink); text-decoration: none; }
.subtabs a.on { border-color: var(--accent); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.photos figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: #050508; }
.photos form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px; }
.photos select { padding: 5px 30px 5px 9px; font-size: 12.5px; flex: 1; }

/* ---------- очередь ---------- */
.qlist { display: flex; flex-direction: column; gap: 10px; }
/* Колонки фиксированной ширины: у всех строк статус и «обновлено» стоят на одной линии,
   как бы ни отличался текст («только что» / «10 мин назад»). */
.qrow { display: grid; grid-template-columns: 54px minmax(0, 1fr) 220px 180px; gap: 16px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s; animation: rise .4s var(--ease) backwards; }
.qrow:hover { border-color: var(--line-2); background: var(--raise); text-decoration: none; }
.qrow .thumb { position: relative; width: 54px; aspect-ratio: 9 / 16; border-radius: 9px; background: #07070b; overflow: hidden; }
.qrow .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qrow .thumb.run::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(179, 156, 255, .35) 50%, transparent 70%); background-size: 100% 260%; animation: develop 2.2s linear infinite; }
.qrow strong { display: block; font-weight: 600; }
.qrow small { color: var(--mute); }
.qrow .qa form { margin: 0; }
.qrow .q-upd { text-align: right; white-space: nowrap; }

/* ---------- вход ---------- */
.login { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; overflow: hidden; padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(16px, env(safe-area-inset-left, 0px)); background: radial-gradient(50% 45% at 20% 25%, rgba(255, 95, 158, .18), transparent 70%), radial-gradient(45% 45% at 80% 75%, rgba(141, 107, 255, .22), transparent 70%), radial-gradient(40% 40% at 70% 20%, rgba(255, 138, 76, .12), transparent 70%), var(--bg); }
.login::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(closest-side, transparent 55%, rgba(10, 10, 14, .55)); }
.soc-field { position: absolute; inset: 0; overflow: hidden; }
.soc { position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 28%; display: grid; place-items: center; box-shadow: 0 16px 34px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .25); will-change: transform; user-select: none; }
.soc.s1 { width: 44px; height: 44px; } .soc.s2 { width: 56px; height: 56px; } .soc.s3 { width: 70px; height: 70px; } .soc.s4 { width: 84px; height: 84px; }
.soc svg { width: 56%; height: 56%; }
.s-ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.s-tt { background: #111; } .s-tt svg { filter: drop-shadow(-2px -1px 0 #25f4ee) drop-shadow(2px 1px 0 #fe2c55); }
.s-yt { background: #ff0033; } .s-tw { background: #1d9bf0; } .s-fb { background: #1877f2; } .s-sc { background: #fffc00; } .s-pin { background: #e60023; }
.s-th { background: #101010; border: 1px solid rgba(255, 255, 255, .15); } .s-li { background: #0a66c2; }
.login-card { position: relative; z-index: 2; width: min(410px, 100%); padding: 34px 28px 26px; border-radius: 26px; text-align: center; background: rgba(16, 16, 22, .74); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0, 0, 0, .6); animation: card-in .7s var(--ease) backwards; transition: opacity .45s, transform .45s var(--ease); }
.login.leaving .login-card { opacity: 0; transform: scale(.96); }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.lc-title { margin: 0; font: 700 clamp(30px, 8vw, 40px)/1.02 var(--f-display); letter-spacing: -.035em; }
.lc-title span { background: linear-gradient(90deg, #ff8a4c, #ff5f9e, #8d6bff, #ff8a4c); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
@keyframes shimmer { to { background-position: 300% 0; } }
.lc-sub { margin: 12px 0 26px; font: 600 11.5px/1 var(--f-ui); letter-spacing: .34em; text-transform: uppercase; color: var(--ink-2); }
.login-card h1 { font: 650 17px/1.3 var(--f-ui); margin: 0 0 16px; letter-spacing: 0; }
.login-card .lead { color: var(--mute); font-size: 13.5px; margin: -8px 0 18px; }
.login-card form { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.login-card input { height: 46px; border-radius: 12px; background: rgba(10, 10, 14, .7); font-size: 15px; }
.login-card .btn.pri { height: 50px; font-size: 15px; border-radius: 13px; margin-top: 4px; width: 100%; }
.login-card .form-error { margin: 0 0 4px; text-align: left; }
.lc-foot { margin: 18px 0 0; color: var(--mute); font-size: 12.5px; }
.btn .spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn.loading .lbl { display: none; } .btn.loading .spinner { display: block; }

/* ---------- тосты ---------- */
.toasts { position: fixed; z-index: 80; left: calc(var(--side) + 24px); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; pointer-events: none; }
body.out .toasts { left: 50%; transform: translateX(-50%); align-items: center; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 420px; padding: 10px 8px 10px 12px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .55); animation: toast-in .35s var(--ease); font-size: 13.5px; }
.toast.out-anim { animation: toast-out .25s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(-20px); } }
.toast .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--ok-soft); color: var(--ok); }
.toast.error .ic { background: var(--bad-soft); color: var(--bad); }
.toast .tx { flex: 1; min-width: 0; }
.tabbar { display: none; }

/* ---------- публикации ---------- */
.nets { display: inline-flex; gap: 3px; vertical-align: middle; }
.net { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 6px; flex: none; }
.net svg { width: 62%; height: 62%; }
.s-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.s-tiktok { background: #2b2b34; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); } .s-youtube { background: #ff0033; } .s-facebook { background: #1877f2; }
.net.s-tiktok svg { filter: drop-shadow(-1px -.5px 0 #25f4ee) drop-shadow(1px .5px 0 #fe2c55); }
.eyebrow { font-size: 11px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.sub-h { font-size: 11px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; margin: 20px 0 10px; }
.mc-card .mc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.mc-card .mc-head > div { flex: 1 1 320px; }
.mc-card h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.mc-logo { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; background: linear-gradient(140deg, #ff6a3d, #ff3d71); color: #fff; font: 800 16px/1 var(--f-display); flex: none; }
.mc-logo.big { width: 56px; height: 56px; border-radius: 16px; font-size: 24px; margin-bottom: 6px; }
.mc-btn { background: #fff; color: #15151c; border-color: transparent; }
.mc-btn:hover { background: #ececf2; }
.mc-accs { display: flex; flex-direction: column; gap: 8px; }
.mc-acc { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); }
.mc-acc form { margin: 0; }
.mc-acc .who-t { flex: 1; min-width: 180px; display: flex; flex-direction: column; line-height: 1.3; }
.mc-acc .who-t small { color: var(--mute); font-size: 12px; }
.steps-list { margin: 0; padding-left: 20px; color: var(--ink-2); display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.bind-list { display: flex; flex-direction: column; gap: 8px; }
.bind-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 200px; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); margin: 0; }
.bind-b { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.bind-arrow { color: var(--mute); }
.bind-row select { height: 38px; }
.mc-off { display: flex; gap: 12px; align-items: flex-start; }
.mc-off > .i { color: var(--warn); margin-top: 2px; }
.mc-off p { color: var(--mute); font-size: 13px; margin: 4px 0 12px; }

/* Посты без пары */
.unmatched-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.unmatched-h .who-t { flex: 1; min-width: 200px; display: flex; flex-direction: column; line-height: 1.3; }
.unmatched-h form { margin: 0; }
.unmatched-text { margin: 10px 0 0; color: var(--ink-2); font-size: 13.5px; }
.unmatched-cands { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.cand { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); margin: 0; }
.cand-shot { width: 44px; aspect-ratio: 9 / 16; border-radius: 7px; overflow: hidden; background: #07070b; flex: none; display: block; }
.cand-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cand-t { display: flex; flex-direction: column; line-height: 1.3; min-width: 120px; }
.unmatched-other { margin-top: 12px; }

/* Готово к публикации */
.ready-group { margin-bottom: 28px; }
.ready-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ready-h > div { flex: 1; min-width: 200px; }
.ready-h h2 { margin: 0; font-size: 17px; font-weight: 700; }
.ready-h small { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ready-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.ready-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ready-go { width: 100%; }

/* Генерации */
.gen-pool { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 18px; }
.gen-card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.gen-mode { font-size: 11px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.gen-free { font: 700 34px/1.1 var(--f-display); letter-spacing: -.02em; }
.gen-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0 0; font-size: 13px; }
.gen-facts dt { color: var(--mute); }
.gen-facts dd { margin: 0; }
.gen-norms input[type="number"] { width: 84px; }
.gen-norms td { white-space: nowrap; }
.gen-norms .n { text-align: right; font-variant-numeric: tabular-nums; }
.gen-more summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.gen-more[open] summary { margin-bottom: 14px; }
.gen-tech { margin-top: 6px; }

/* Идеи */
.idea-note { display: flex; align-items: center; gap: 10px; }
.idea-note .i { color: var(--warn); flex: none; }
.idea-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.idea { display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; animation: rise .45s var(--ease) backwards; }
.idea.hot { border-color: rgba(255, 138, 76, .28); }
.idea.ours { border-color: rgba(67, 217, 155, .35); }
.idea-shot { aspect-ratio: 9 / 11; border-radius: 0; box-shadow: none; background: linear-gradient(150deg, var(--c1), var(--c2)); text-decoration: none; }
.idea-shot:hover { transform: none; }
.idea-ph { font: 700 44px/1 var(--f-display); color: rgba(255, 255, 255, .85); }
.badge.b-hot { background: var(--live); color: #fff; }
.badge .i { width: 13px; height: 13px; }
.idea-foot { position: absolute; z-index: 2; left: 12px; right: 12px; bottom: 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; color: #fff; }
.idea-views { font: 700 22px/1 var(--f-display); letter-spacing: -.02em; }
.idea-views small { display: block; margin-top: 5px; font: 500 11.5px/1.2 var(--f-ui); letter-spacing: 0; color: rgba(255, 255, 255, .82); }
.idea-age { font: 500 12px/1 var(--f-mono); color: rgba(255, 255, 255, .85); white-space: nowrap; }
.idea-body { display: flex; flex-direction: column; gap: 9px; padding: 12px 14px 14px; flex: 1; }
.idea-author { display: flex; align-items: baseline; gap: 8px; min-width: 0; font-size: 14px; }
.idea-author b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-author a { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--mute); font: 500 11.5px var(--f-mono); white-space: nowrap; }
.idea-author a .i { width: 12px; height: 12px; }
.idea-fit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.pill.p-live { background: var(--live-soft); color: var(--live); }
.idea-tags { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--accent-2); }
.idea-tags .i { width: 12px; height: 12px; }
.idea-why { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.idea-acts { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: auto; }
.idea-acts form { margin: 0; display: flex; }
.idea-acts .btn { width: 100%; }
.idea-lead { margin: -4px 0 16px; max-width: 900px; }
.idea-targets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.idea-targets li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 8px 8px 8px 10px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); }
.idea-targets form { margin: 0; }
.idea-t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; font-size: 13px; }
.idea-t small { flex-basis: 100%; color: var(--mute); font-size: 12px; line-height: 1.35; }
.idea-hidden { margin-top: 22px; padding: 12px 16px; border: 1px dashed var(--line-2); border-radius: 14px; }
.idea-hidden summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.idea-hidden ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.idea-hidden li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); }
.idea-hidden form { margin: 0; }
.idea-rule { margin-top: 18px; max-width: 900px; }
.idea-ai { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; max-width: 900px; }
.idea-ai .i { width: 13px; height: 13px; flex: none; margin-top: 2px; color: var(--accent-2); }
.card.idea-add { display: flex; flex-direction: column; gap: 12px; }
.idea-add-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.idea-add-h { flex: 1 1 320px; }
.idea-add .chipset { align-items: center; }
.idea-session { display: grid; gap: 8px; margin-top: 14px; }
.idea-session textarea { font: 12px/1.4 var(--f-mono); }
.idea-edit { margin-top: 4px; }
.idea-edit summary { cursor: pointer; color: var(--mute); font-size: 12px; width: max-content; }
.idea-edit summary:hover { color: var(--ink); }
.idea-edit form { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 8px; }
@media (max-width: 600px) { .idea-grid { grid-template-columns: 1fr; } .idea-shot { aspect-ratio: 4 / 3; } }
.idea-session .btn { justify-self: start; }
.table-wrap { overflow-x: auto; }
form[data-busy] .btn.loading { opacity: .6; cursor: progress; }
.tagchip { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; background: var(--hover); color: var(--ink-2); white-space: nowrap; }
.tagchip.on { background: var(--accent-soft); color: var(--ink); }
.idea-authors .n { text-align: right; font-variant-numeric: tabular-nums; }
#sessions { margin-top: 18px; }
#sessions .mc-acc { margin-bottom: 8px; }

/* Telegram и уведомления */
.tg-logo { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: #2aabee; flex: none; }
.tg-logo .i { width: 18px; height: 18px; stroke: none; margin-left: -2px; }
.tg-logo.big { width: 56px; height: 56px; margin-bottom: 6px; }
.tg-logo.big .i { width: 28px; height: 28px; }
.btn.tg { background: #2aabee; border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(42, 171, 238, .3); }
.btn.tg:hover { background: #2aabee; filter: brightness(1.08); }
.btn.tg .i { stroke: none; }
.tg-connect { margin-top: 16px; }
.tg-app-hint { margin: 10px 2px 0; }
.tg-on { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--ok-soft); border: 1px solid rgba(67, 217, 155, .25); }
.tg-on form { margin: 0; }
.tg-on .who-t { flex: 1; min-width: 180px; display: flex; flex-direction: column; line-height: 1.3; }
.tg-on .who-t small { color: var(--mute); font-size: 12px; }
.tg-go p { max-width: 420px; margin: 4px 0 12px; }
/* Вход в мини-приложение Telegram */
.tg-entry .tg-wait { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px 0 6px; color: var(--ink-2); font-size: 14px; }
.tg-entry .tg-wait .spinner { display: inline-block; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: var(--accent-2); animation: spin .8s linear infinite; }
.tg-entry .tg-wait[hidden], .tg-entry .tg-fail[hidden] { display: none; }
.tg-entry .tg-fail { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.tg-entry .tg-fail .btn { width: 100%; justify-content: center; }
.tg-waiting { display: flex; align-items: center; gap: 10px; justify-content: center; color: var(--ink-2); font-size: 13px; }
.card-h { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.card-h .i { color: var(--accent-2); }
.notify-form { margin-top: 10px; }
/* ---------- авторы: карточки ---------- */
.au-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.au-card { display: grid; grid-template-columns: 184px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 10px 14px 10px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.au-card:hover { background: var(--raise); }
.au-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 184px; }
.au-thumbs img, .au-ph { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 7px; background: var(--hover); }
.au-ph { display: flex; align-items: center; justify-content: center; color: var(--line-2); }
.au-ph .i { width: 14px; height: 14px; }
.au-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.au-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.au-about { margin: 1px 0 2px; font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.au-chars { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.au-chars .idea-edit { margin: 0; }
.au-stats { display: flex; gap: 18px; }
.au-stats > div { display: flex; flex-direction: column; align-items: flex-end; width: 84px; }   /* одна ширина — цифры у всех авторов в столбик */
.au-stats b { font-size: 15px; font-weight: 650; white-space: nowrap; }
.au-stats span { font-size: 11px; color: var(--mute); white-space: nowrap; }
@media (max-width: 860px) {
  .au-card { grid-template-columns: 1fr auto; }
  .au-thumbs { grid-column: 1 / -1; width: 100%; max-width: 320px; }
  .au-stats { grid-column: 1 / -1; justify-content: flex-start; }
  .au-stats > div { align-items: flex-start; width: auto; }
}

/* ---------- аватар персонажа: загрузка кликом по кружку ---------- */
.ava-upload { position: relative; flex: none; margin: 0; }
.ava-upload label { display: block; position: relative; cursor: pointer; border-radius: 50%; }
.ava-upload input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.ava-upload .ava-hint { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; background: rgba(4, 4, 8, .55); color: #fff; opacity: 0; transition: opacity .15s; pointer-events: none; }
.ava-upload .ava-hint .i { width: 26px; height: 26px; }
.ava-upload label:hover .ava-hint, .ava-upload label:focus-within .ava-hint { opacity: 1; }
.ava-upload .ava-x { position: absolute; right: -2px; top: -2px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.ava-upload .ava-x .i { width: 12px; height: 12px; }
.ava-upload .ava-x:hover { color: var(--bad); border-color: var(--bad); }

/* ---------- подтверждение внутри формы ---------- */
form.confirming > :not(.confirm-strip) { display: none !important; }
.confirm-strip { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--bad); border-radius: 12px; background: var(--bad-soft); font-size: 13px; line-height: 1.4; animation: strip-in .18s var(--ease); }
.confirm-strip span { flex: 1 1 100%; }
.confirm-btns { display: flex; flex-direction: row; gap: 8px; flex: 1 1 100%; }
.confirm-strip .btn { width: auto; min-width: 96px; justify-content: center; }
.confirm-strip .btn[disabled] { opacity: .55; cursor: wait; }
@keyframes strip-in { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.ready-acts { display: flex; align-items: center; gap: 6px; }
.ready-acts .ready-go { flex: 1 1 auto; }
.ready-acts form { margin: 0; }
.ready-card { position: relative; }
.ready-card .confirm-strip { position: absolute; inset: 0; z-index: 2; flex-direction: column; justify-content: center; text-align: center; border-radius: 16px; background: rgba(10, 10, 14, .92); border-color: var(--bad); padding: 14px; }
.ready-card .confirm-strip span { flex: 0 0 auto; }
.ready-card .confirm-btns { flex: 0 0 auto; justify-content: center; }
.ready-card .confirm-strip .btn { min-width: 110px; }

/* ---------- команда и доступы ---------- */
.team-list { display: flex; flex-direction: column; }
.team-row { display: flex; align-items: center; gap: 18px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.team-row:first-child { border-top: 0; }
.team-who { display: flex; align-items: center; gap: 8px; flex: 1 1 200px; font-size: 14px; }
.team-check { flex-direction: row; align-items: center; gap: 8px; font-size: 13.5px; }
.team-given { margin-top: 12px; }

/* ---------- сохранённые промпты ---------- */
.pr-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pr-tools .pr-pick { height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); padding: 0 10px; max-width: 320px; font: inherit; font-size: 13px; }
.pr-save { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--raise); }
.pr-save .pr-name { flex: 1 1 240px; height: 34px; }
.pr-save .pr-bind { flex: 1 1 100%; margin: 0; }

/* ---------- результаты: сводные цифры ---------- */
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.stat { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 2px; min-width: 130px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: inherit; text-decoration: none; transition: border-color .2s, background .2s; }
.stat b { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.stat b a { color: inherit; }
.stat span { font-size: 12.5px; color: var(--mute); display: flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.3; }
.stat span .net { width: 16px; height: 16px; border-radius: 5px; }
.stat.big { min-width: 220px; }
.res-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.res-tiles .stat { min-width: 0; }
.res-tiles .stat .delta { white-space: normal; text-align: center; justify-content: center; }
.res-tiles .stat.big { grid-column: span 2; }
.stat b { white-space: nowrap; }
.stat span { flex-wrap: wrap; }
.stat .delta { font-style: normal; font-size: 12px; margin-top: 4px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.stat .delta.up { color: var(--ok); } .stat .delta.down { color: var(--bad); }
a.stat:hover { border-color: var(--line-2); background: var(--raise); text-decoration: none; }

/* ---------- результаты: фильтры, график, ролики ---------- */
.res-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.res-group { display: flex; flex-direction: column; gap: 8px; }
.res-seg a { display: inline-flex; }
.res-seg a .i { width: 14px; height: 14px; }
.res-nets a .net { width: 16px; height: 16px; border-radius: 5px; }
.res-dates { display: none; align-items: center; gap: 10px; flex-wrap: wrap; }
.res-dates.show { display: flex; }
.res-dates label { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; }
.res-dates input[type=date] { height: 32px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); color-scheme: dark; font: inherit; font-size: 13px; }
.res-chars { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 0 10px; margin-bottom: 8px; }
.res-chars .who { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 74px; padding: 6px 8px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-size: 12px; transition: background .15s, color .15s; }
.res-chars .who:hover { background: var(--raise); color: var(--ink); }
.res-chars .who.on { color: var(--ink); }
.res-chars .who .ava { width: 44px; height: 44px; font-size: 15px; }
.res-chars .who.on .ava, .res-chars .who.on .who-a { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.res-chars .who-a.all { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--hover); color: var(--accent-2); }
.res-chars .who:focus { outline: none; }
.res-chars .who:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.res-chars .who-a.all .i { width: 18px; height: 18px; }
.res-chars .who-n { white-space: nowrap; }
.res-body { transition: opacity .18s var(--ease), transform .18s var(--ease); }
.res-body.fading { opacity: .35; transform: translateY(4px); pointer-events: none; }
.res-chart-card { padding-bottom: 12px; }
.res-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.res-legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--mute); }
.res-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.c-instagram { background: #d6249f; } .c-facebook { background: #1877f2; } .c-youtube { background: #ff0033; } .c-tiktok { background: #25f4ee; }
.res-chart { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.res-strip { display: grid; grid-template-columns: 150px 1fr; column-gap: 12px; align-items: end; }
.res-strip-l { display: grid; grid-template-columns: 18px 1fr; column-gap: 7px; align-items: center; padding-bottom: 2px; font-size: 12.5px; color: var(--ink-2); }
.res-strip-l .res-strip-n { white-space: nowrap; }
.res-strip-l b { grid-column: 2; font-size: 15px; color: var(--ink); line-height: 1.15; }
.res-strip-l small { grid-column: 2; font-size: 11px; color: var(--mute); white-space: nowrap; }
.res-svg { display: block; width: 100%; height: 64px; overflow: visible; }
.res-chart.solo .res-svg { height: 200px; }
.res-grid { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.res-none { fill: var(--mute); font-size: 11px; font-family: var(--f-ui); }
.res-seg { opacity: .82; transform-box: fill-box; transform-origin: bottom center; animation: res-grow .6s var(--ease) both; transition: opacity .15s; }
.res-seg:hover, .res-seg.peak { opacity: 1; }
.res-seg.c-instagram { fill: #d6249f; } .res-seg.c-facebook { fill: #1877f2; } .res-seg.c-youtube { fill: #ff0033; } .res-seg.c-tiktok { fill: #25f4ee; }
@keyframes res-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.res-axis { display: flex; margin-top: 2px; }
.res-axis span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 10.5px; color: var(--mute); white-space: nowrap; overflow: visible; }
.res-note { margin: 4px 0 0; }
.res-split { align-items: start; }
.res-table .is-on td { background: var(--accent-soft); }
.res-who { color: inherit; text-decoration: none; }
.res-posts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 8px; }
.res-posts li { display: flex; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); min-width: 0; }
.res-thumb { position: relative; flex: none; width: 56px; height: 74px; border-radius: 8px; background: var(--hover); overflow: hidden; display: grid; place-items: center; }
.res-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.res-thumb .net { position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; border-radius: 5px; }
.res-post-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.res-post-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.res-post-top b { font-size: 15px; }
.res-post-cap { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warn-t { color: var(--warn); }
@media (max-width: 860px) {
  .res-strip { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .res-strip-l { grid-template-columns: 18px auto auto 1fr; }
  .res-strip-l b, .res-strip-l small { grid-column: auto; }
  .res-svg { height: 48px; }
  .res-chart.solo .res-svg { height: 150px; }
  .res-axis span.m-hide { visibility: hidden; }
  .res-posts { grid-template-columns: 1fr; }
  .res-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ev-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 14px; margin-top: 6px; }
.ev-group { padding: 4px 16px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.ev-h { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; font-size: 13px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.ev-h .i { width: 14px; height: 14px; color: var(--accent-2); }
.ev { display: flex; flex-direction: row; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.ev-group .ev:first-of-type { border-top: 0; }
.ev > span { flex: 1; min-width: 0; }
.ev b { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ev small { display: block; color: var(--mute); font-size: 12.5px; }
.notify-form .sub-h { display: flex; align-items: center; gap: 8px; margin-top: 22px; }
.notify-form .sub-h .i { width: 14px; height: 14px; }
.quiet { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.quiet select { height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); padding: 0 10px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 40px; height: 24px; margin: 0; border-radius: 99px; background: var(--hover); border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: background .2s, border-color .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-2); transition: transform .2s var(--ease), background .2s; }
.switch:checked { background: var(--accent); border-color: var(--accent); }
.switch:checked::after { transform: translateX(16px); background: #fff; }
.form-foot { display: flex; justify-content: flex-end; margin-top: 18px; }
.warn-t { color: var(--warn); }
.pub-none { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 16px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--mute); font-size: 13px; }
.pub-none .i { width: 16px; height: 16px; }
.pub-list { display: flex; flex-direction: column; gap: 8px; }
.pub-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 10px 10px 10px 12px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); }
.pub-row .pub-t { flex: 1 1 150px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pub-row .pub-t b, .pub-row .pub-t small { white-space: normal; overflow-wrap: anywhere; }
.pub-row .pub-acts { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.pub-row form { margin: 0; }
.pub-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.pub-t b { font-weight: 600; font-size: 13.5px; }
.pub-t small { color: var(--mute); font-size: 12px; overflow-wrap: anywhere; }
.pub-t small.bad { color: var(--bad); }
.back-btn { margin: -4px 0 12px -6px; }
.pub-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.pub-thumb { position: relative; width: 64px; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: #050508; box-shadow: 0 0 0 1px var(--line-2); flex: none; }
.pub-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pub-head h2 { margin: 2px 0; font-size: 18px; }
.brand-n { color: var(--ink); text-transform: none; letter-spacing: 0; }
.net-chip { display: inline-flex; align-items: center; gap: 8px; padding-left: 6px; }
.net-chip:not(:has(input:checked)) .net { filter: grayscale(1); opacity: .5; }
.net-chip.disabled { opacity: .45; cursor: not-allowed; }
.slot-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.slot-pick { position: relative; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--raise); cursor: pointer; transition: all .12s; color: var(--ink); }
.slot-pick input { position: absolute; opacity: 0; pointer-events: none; }
.slot-pick b { font: 700 17px/1 var(--f-display); letter-spacing: -.02em; }
.slot-pick small { color: var(--mute); font-size: 11.5px; font-weight: 400; }
.slot-pick:hover { border-color: rgba(179, 156, 255, .4); }
.slot-pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.slot-pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.when-more .chip { display: inline-flex; gap: 6px; }
.when-more .chip .i { width: 14px; height: 14px; }
.custom-dt { display: none; margin-top: 10px; }
.pub-form:has(.when-custom input:checked) .custom-dt { display: flex; }
.custom-dt input { color-scheme: dark; }
.pub-form textarea { width: 100%; min-height: 130px; }
.yt-title { margin-top: 12px; }
.pub-go { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.pub-go .btn { width: 100%; height: 48px; font-size: 15px; }
.insp .pub-go { position: sticky; bottom: -16px; margin: 18px -16px -16px; padding: 14px 16px 16px; background: linear-gradient(transparent, var(--panel) 18%); }
.plan-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); margin-bottom: 14px; }
.plan-who { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; }
.plan-who b { display: block; font-size: 16px; }
.plan-who small { color: var(--mute); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-rule { padding: 0 18px; border-left: 1px solid var(--line); }
.plan-rule b { display: block; }
.plan-rule small { color: var(--mute); }
.plan-stats { display: flex; gap: 18px; flex-wrap: wrap; align-items: baseline; margin: 4px 2px 12px; font-size: 13px; color: var(--ink-2); }
.plan-stats b { font: 700 16px/1 var(--f-ui); color: var(--ink); margin-right: 4px; }
.plan-stats .muted { margin-left: auto; font-size: 12px; }
.week-nav { display: flex; align-items: center; gap: 6px; }
.week-nav span { min-width: 150px; text-align: center; font-weight: 600; }
.wk-wrap { overflow-x: auto; scrollbar-width: thin; }
/* Неделя шире экрана — листается вбок, а столбец времени остаётся на месте. */
.wk > .wk-t, .wk > .wk-h:first-child { position: sticky; left: 0; z-index: 2; background: var(--bg); box-shadow: 8px 0 8px -6px var(--bg); }
.wk { display: grid; grid-template-columns: 58px repeat(7, minmax(92px, 1fr)); gap: 8px; min-width: 720px; }
.wk-h { text-align: center; padding: 6px 0; color: var(--mute); font-size: 12px; border-radius: 10px; }
.wk-h b { display: block; color: var(--ink-2); font-size: 13px; }
.wk-h.today { background: var(--accent-soft); color: var(--accent-2); }
.wk-h.today b { color: var(--ink); }
.wk-t { display: grid; place-items: center; color: var(--mute); font-size: 12px; }
.slot { min-height: 76px; border-radius: 12px; display: flex; align-items: stretch; overflow: hidden; font-size: 12px; text-decoration: none; color: var(--ink); }
.slot:hover { text-decoration: none; }
.slot.off { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255, 255, 255, .025) 6px 12px); }
.slot.past { display: grid; place-items: center; color: var(--mute); opacity: .5; border: 1px solid var(--line); }
.slot.free { display: grid; place-items: center; border: 1.5px dashed var(--line-2); color: var(--mute); transition: all .15s; }
.slot.free span { display: flex; align-items: center; gap: 4px; font-weight: 550; }
.slot.free .i { width: 14px; height: 14px; }
.slot.free:hover { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.slot.booked { background: var(--raise); border: 1px solid var(--line-2); transition: border-color .15s, transform .15s; }
.slot.booked:hover { border-color: var(--accent); transform: translateY(-2px); }
.slot.booked.published { border-color: rgba(67, 217, 155, .3); }
.slot-pv { position: relative; width: 40px; flex: none; background: #050508; }
.slot-pv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot-i { display: flex; flex-direction: column; gap: 4px; padding: 7px 8px; min-width: 0; align-items: flex-start; }
.slot-i .pill { height: 18px; font-size: 10.5px; padding: 0 7px; }
.slot-i .net { width: 16px; height: 16px; border-radius: 5px; }
.rule-h { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.rule-h h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; }
.time-list { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.time-row { display: flex; flex-wrap: wrap; gap: 10px; }
.time-row:empty { display: none; }
.time-in { position: relative; display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--mute); }
.time-in input { height: 40px; color-scheme: dark; font-weight: 600; font-size: 15px; width: 128px; padding-right: 30px; }
.time-in .time-x { position: absolute; right: 6px; bottom: 8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: transparent; color: var(--mute); display: grid; place-items: center; cursor: pointer; }
.time-in .time-x .i { width: 12px; height: 12px; }
.time-in .time-x:hover { color: var(--bad); background: var(--bad-soft); }
.time-list.trials .time-in input { border-color: rgba(255, 138, 76, .35); }
.rule-h .rule-clear { margin-left: auto; align-self: flex-start; }
.confirm-strip.inline { margin-left: auto; width: min(100%, 380px); }
.wk-t.trial small { display: block; font: 500 10px/1.1 var(--f-ui); color: var(--live); letter-spacing: 0; }
.slot.free.trial { border-color: rgba(255, 138, 76, .35); }
.rule-form .chip input { position: absolute; opacity: 0; pointer-events: none; }
.rule-note { margin: 18px 0 4px; }

/* ---------- сравнение исходник / результат ---------- */
.player-mode { display: flex; gap: 2px; padding: 3px; margin: 0 auto; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); width: max-content; }
.player-mode button { height: 30px; padding: 0 14px; border-radius: 7px; color: var(--ink-2); font-weight: 550; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; }
.player-mode button .i { width: 14px; height: 14px; }
.player-mode button.on { background: var(--hover); color: var(--ink); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cmp-col > .player { width: 100%; margin: 0; }
.cmp-cap { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 0 2px; }
.cmp-cap .tag { text-transform: uppercase; letter-spacing: .05em; color: var(--mute); }
.cmp-snd { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--raise); color: var(--mute); font-size: 11.5px; font-weight: 600; cursor: pointer; }
.cmp-snd .i { width: 13px; height: 13px; }
.cmp-snd.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.cmp-ctl { display: flex; align-items: center; gap: 10px; }
.cmp-ctl .icon-btn { background: var(--raise); border: 1px solid var(--line); }
.cmp-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--hover); overflow: hidden; cursor: pointer; }
.cmp-bar i { display: block; height: 100%; width: 0; background: var(--accent-2); }
.job-page .jp:has(.compare:not([hidden])) { grid-template-columns: minmax(300px, 620px) minmax(0, 1fr); }

/* ---------- узкие экраны ---------- */
@media (max-width: 1280px) {
  .create { grid-template-columns: minmax(0, 1fr) 280px; }
  /* Шаги — закреплённой строкой над формой: нажал и сразу в нужном месте, без долгой прокрутки. */
  .create .steps { grid-column: 1 / -1; top: var(--top); z-index: 12; flex-direction: row; gap: 6px; margin: -6px 0 -8px; padding: 8px 0; overflow-x: auto; scrollbar-width: none; background: var(--bg); box-shadow: 0 10px 14px -10px var(--bg); }
  .create .steps::-webkit-scrollbar { display: none; }
  .create .stp { flex: 1 0 auto; gap: 8px; padding: 7px 12px 7px 7px; border: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
  .create .stp .n { width: 24px; height: 24px; }
  .create .stp.cur { border-color: var(--accent); color: var(--ink); }
  .create .stp small { max-width: 120px; }
  .step { scroll-margin-top: calc(var(--top) + 70px); }
}
@media (max-width: 1180px) {
  .job-page .jp-media:has(.compare:not([hidden])) { max-width: 640px; }
  .app.insp-open .main { padding-right: 0; }
  .job-page .jp { grid-template-columns: minmax(0, 1fr); }
  .job-page .jp-media { position: static; max-width: 380px; width: 100%; margin: 0 auto 18px; }
}
@media (max-width: 960px) {
  .create { grid-template-columns: minmax(0, 1fr); }
  .summary { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); top: auto; z-index: 5; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 14px; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); }
  .summary h4, .summary .sum-row { display: none; }
  .summary .cost { flex: 1; padding: 0; background: none; border: 0; }
  .summary .cost-n { font-size: 19px; }
  .summary label { flex-basis: 100%; }
  .summary .go { width: auto; flex: 1 1 200px; height: 46px; }
}
@media (max-width: 860px) {
  .slot-picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bind-row { grid-template-columns: minmax(0, 1fr); }
  .bind-arrow { display: none; }
  .plan-rule { border-left: 0; padding: 0; }
  .plan-stats .muted { margin-left: 0; }
  :root { --top: 56px; }
  .app, .app.mini { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 45; transform: translateX(-100%); transition: transform .25s var(--ease); }
  .side.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .6); }
  .app.mini .brand-t, .app.mini .nav-h, .app.mini .nav a span, .app.mini .quota, .app.mini .me > span:last-child, .app.mini .me-row form, .app.mini .new-btn span { display: revert; }
  .collapse { display: none; }
  .icon-btn.menu-toggle { display: inline-grid; }
  .top { padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); gap: 6px; }
  .live .live-t, .counter span + span { display: none; }
  .live { padding: 0 11px; }
  .view { padding: 16px max(16px, env(safe-area-inset-right, 0px)) 110px max(16px, env(safe-area-inset-left, 0px)); }
  .f-right { margin-left: 0; width: 100%; }
  .density { display: none; }
  .grid, .grid.dens-l, .grid.dens-s { --card-min: 150px; gap: 18px 12px; }
  .insp { width: 100%; }
  .dd.open::before { content: ""; position: fixed; inset: 0; z-index: 44; background: var(--scrim); }
  .menu { position: fixed; z-index: 45; left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); top: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); min-width: 0; padding: 8px; border-radius: 18px; transform: translateY(24px); transform-origin: bottom center; }
  .dd.open .menu { transform: none; }
  .menu a { height: 50px; font-size: 16px; padding: 0 14px; border-radius: 12px; }
  .menu::before { content: attr(data-title); display: block; padding: 8px 14px 10px; font-size: 12px; font-weight: 600; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--panel) 90%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: var(--mute); font-size: 10.5px; font-weight: 550; text-decoration: none; background: none; border: 0; cursor: pointer; }
  .tabbar .on { color: var(--ink); }
  .tabbar .on .i { color: var(--accent-2); }
  .tabbar .plus { width: 46px; height: 46px; margin: -10px auto 0; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(180deg, #9b7dff, #7a55ff); box-shadow: 0 8px 22px var(--accent-glow); }
  .tabbar .cnt { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; margin: 0; background: var(--live); color: #fff; font-size: 9.5px; }
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  .qrow { grid-template-columns: 46px minmax(0, 1fr); }
  .qrow { row-gap: 6px; align-items: start; }
  .qrow .thumb { grid-row: 1 / span 3; }
  .qrow .qp, .qrow .qa, .qrow .q-upd { grid-column: 2; }
  .qrow .q-upd { text-align: left; }
  .channel-head { padding: 0 8px; }
  .channel-cover { height: 120px; }
  .channel-head .ava.xl { width: 88px; height: 88px; font-size: 30px; }
  .toasts { left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); align-items: stretch; }
  body.out .toasts { transform: none; left: 16px; bottom: 20px; }
  .toast { max-width: none; min-width: 0; }
  .step { padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- образы персонажа ---------- */
.cnt-s { margin-left: 7px; font: 600 11px/1 var(--f-mono); color: var(--mute); }
.subtabs a.on .cnt-s { color: var(--accent-2); }
.looks-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.folders { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.fold { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 13px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); font-size: 13px; font-weight: 550; text-decoration: none; cursor: pointer; list-style: none; transition: border-color .15s, background .15s, color .15s, transform .15s var(--ease); }
.fold::-webkit-details-marker { display: none; }
.fold .i { width: 15px; height: 15px; color: var(--mute); }
.fold b { font: 600 11px/1 var(--f-mono); color: var(--mute); }
.fold:hover { color: var(--ink); border-color: rgba(179, 156, 255, .4); text-decoration: none; }
.fold.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.fold.on .i, .fold.on b { color: var(--accent-2); }
.fold.add { border-style: dashed; color: var(--mute); }
.looks-bar.dropping [data-drop-folder] { border-style: dashed; border-color: var(--accent); }
.fold.over { transform: scale(1.06); background: var(--accent); color: #fff; }
.fold.over .i, .fold.over b { color: #fff; }
.pop { position: relative; }
.pop > summary { list-style: none; }
.pop > summary::-webkit-details-marker { display: none; }
.pop-body { position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: min(300px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 16px; background: var(--raise); border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); animation: rise .2s var(--ease) backwards; }
.pop.right .pop-body { left: auto; right: 0; width: min(440px, calc(100vw - 32px)); }
.pop-body > * { flex-shrink: 0; }      /* окно с прокруткой не сплющивает поля и кнопки */
.adder > summary { white-space: nowrap; }
.drop { position: relative; display: block; border: 1.5px dashed var(--line-2); border-radius: 14px; background: var(--bg); padding: 18px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-t { display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.drop-t .i { width: 26px; height: 26px; color: var(--accent-2); margin-bottom: 4px; }
.drop-t b { color: var(--ink); font-size: 14px; }
.drop.has .drop-t { display: none; }
.drop-prev { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; pointer-events: none; }
.drop-cell { position: relative; pointer-events: auto; }
.drop-cell img { display: block; width: 84px; height: 112px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-2); background: var(--hover); }
.drop-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink-2); font-size: 14px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.drop-x:hover { color: var(--bad); border-color: var(--bad); }
.drop-more { font-size: 12.5px; color: var(--accent-2); padding: 0 6px; }
.drop-prev img { width: 64px; height: 84px; object-fit: cover; border-radius: 9px; box-shadow: 0 0 0 1px var(--line-2); }
.drop.sm { padding: 12px; }
.drop-file { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; text-align: left; }
.drop-file video { flex: none; width: 48px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--hover); box-shadow: 0 0 0 1px var(--line-2); }
.drop-file-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.drop-file-t b { color: var(--ink); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-file-t small { color: var(--mute); font-size: 12px; }
.drop.has { padding: 12px 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label.check { flex-direction: row; align-items: center; gap: 9px; font-weight: 500; cursor: pointer; }
.folder-tools { display: flex; flex-wrap: wrap; gap: 10px; margin: -6px 0 16px; }
.folder-tools form.inline { display: flex; gap: 8px; align-items: center; margin: 0; }
.folder-tools input { height: 32px; padding: 0 10px; font-size: 13px; width: 200px; }
.looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 18px; }
.look { position: relative; display: flex; flex-direction: column; gap: 10px; animation: rise .45s var(--ease) backwards; }
.look:nth-child(2) { animation-delay: .03s; } .look:nth-child(3) { animation-delay: .06s; } .look:nth-child(4) { animation-delay: .09s; } .look:nth-child(n+5) { animation-delay: .12s; }
.look.dragging { opacity: .35; }
.look-main { display: block; border-radius: 16px; text-decoration: none; }
.look-ph { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: linear-gradient(150deg, #1d1d27, #101016); box-shadow: 0 0 0 1px var(--line); transition: transform .22s var(--ease), box-shadow .22s; }
.look-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.look-ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 70%, rgba(0, 0, 0, .45)); pointer-events: none; }
.look-main:hover .look-ph, .look-main:focus-visible .look-ph { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line-2), 0 22px 44px rgba(0, 0, 0, .55); }
.look-ph { touch-action: pan-y; }
.look-ctl { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 16px 8px 8px 10px; cursor: pointer; }
.look-dots { flex: 1; display: flex; gap: 4px; padding: 6px 0; }
.look-star { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 99px; background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #fff; transition: opacity .15s, background .15s, color .15s, transform .15s; }
.look-star .i { width: 16px; height: 16px; stroke-width: 2; }
.look-star:hover { background: rgba(0, 0, 0, .7); transform: scale(1.08); }
.look-star.is-cover { color: #ffcf4a; }
.look-star.is-cover .i { fill: currentColor; }
@media (hover: hover) {
  /* Мышью: звезда-обложка видна при наведении или когда показано не то фото, что на обложке. */
  .look-star.is-cover { opacity: 0; }
  .look-ph:hover .look-star, .look-star:focus-visible { opacity: 1; }
}
.look-dots i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); transition: background .15s; }
.look-dots i.on { background: #fff; }
.look-b { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.look-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.look-t b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.look-t small { color: var(--mute); font-size: 12px; }
.look-menu { width: 260px; }
.look-menu form { display: flex; gap: 6px; align-items: center; padding: 6px 4px; margin: 0; }
.look-menu form input, .look-menu form select { flex: 1; height: 34px; padding: 0 10px; font-size: 13px; }
.look-menu form select { padding-right: 30px; }
.look-menu .link { display: flex; align-items: center; gap: 8px; padding: 6px; }
.look-menu .link .i { width: 15px; height: 15px; }
.drag-hint { margin-top: 18px; }
/* выбор образа при создании */
.look-pick .per-h { flex-wrap: wrap; margin-bottom: 12px; }
.look-pick .per-h .muted { font-weight: 400; }
.ffilter { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.ffilter button { height: 28px; padding: 0 11px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font: 500 12px/1 inherit; cursor: pointer; }
.ffilter button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.lk-grid .lk[hidden] { display: none; }
.lk .ph { aspect-ratio: 3 / 4; }
.lk.plain .ph img { filter: saturate(.6); opacity: .8; }
.lk.just-added .ph { animation: flash 1.3s var(--ease); }
.lk-add { aspect-ratio: 3 / 4; background: none; font: inherit; font-size: 12.5px; cursor: pointer; }
.lk-add .i { width: 20px; height: 20px; }
.look-inline { margin-top: 14px; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); display: flex; flex-direction: column; gap: 12px; animation: rise .25s var(--ease) backwards; }
.look-inline .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prompt-box { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.prompt-box > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink-2); font-weight: 550; list-style: none; }
.prompt-box > summary::-webkit-details-marker { display: none; }
.prompt-box > summary .i { width: 16px; height: 16px; color: var(--mute); }
.prompt-box[open] > summary { margin-bottom: 12px; }
.prompt-box label { margin-bottom: 10px; }
.sum-row [data-look-sum] { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
@media (max-width: 860px) {
  .looks-bar { flex-direction: column-reverse; align-items: stretch; }
  .folders { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .fold { flex: none; }
  .pop .pop-body, .pop.right .pop-body { position: fixed; left: max(10px, env(safe-area-inset-left, 0px)); right: max(10px, env(safe-area-inset-right, 0px)); top: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: 75vh; overflow: auto; }
  .adder > summary { justify-content: center; }
  .pop[open]::before { content: ""; position: fixed; inset: 0; z-index: 44; background: var(--scrim); }   /* как у меню: тап мимо — закрыть */
  .pop[open] > .pop-body { z-index: 45; }
  .looks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .row2 { grid-template-columns: 1fr; }
  .look-menu { width: auto; }
}
.look-pill img { width: 20px; height: 26px; border-radius: 5px; object-fit: cover; margin: -2px 0; }
label.check > span { display: flex; flex-direction: column; gap: 2px; }
.look-inline[hidden] { display: none; }
.look-inline .li-newf { display: flex; flex-direction: column; gap: 6px; }
.look-inline .li-newf[hidden] { display: none; }

/* ---------- исходники и отметки «уже выходило» ---------- */
.posted { display: inline-flex; align-items: center; gap: 7px; min-width: 0; font-size: 12px; color: var(--ink-2); }
.posted .stack .ava { box-shadow: 0 0 0 2px var(--panel); }
.posted-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.posted .nets { display: inline-flex; gap: 3px; }
.posted .net { width: 18px; height: 18px; }
.posted.compact { padding: 3px 7px 3px 4px; border-radius: 99px; background: rgba(8, 8, 12, .62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.src-was { min-width: 0; overflow: hidden; }
.src-was .posted { max-width: 100%; }
.posted .posted-t { min-width: 0; }
.src-tabs { width: max-content; max-width: 100%; margin-bottom: 18px; }
.src-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.src { display: flex; flex-direction: column; gap: 9px; min-width: 0; animation: rise .45s var(--ease) backwards; }
.src-shot { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #0b0b10; box-shadow: 0 0 0 1px var(--line); transition: transform .2s var(--ease), box-shadow .2s; }
.src-shot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.src-shot:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line-2), 0 22px 44px rgba(0, 0, 0, .55); text-decoration: none; }
.src.was .src-shot video { filter: saturate(.75); }
.src-mark { position: absolute; z-index: 2; left: 8px; top: 8px; }
.src-go { position: absolute; z-index: 2; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600; opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s var(--ease); }
.src-go .i { width: 15px; height: 15px; }
.src-shot:hover .src-go, .src-shot:focus-visible .src-go { opacity: 1; transform: none; }
.src-b { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.src-b form { margin: 0; }
.src-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.src-t b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-t small { color: var(--mute); font-size: 11.5px; }
.src-was { margin-top: -2px; }
@media (max-width: 860px) {
  .src-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .src-go { opacity: 1; transform: none; height: 30px; font-size: 12px; }
}
.was-note { display: flex; align-items: flex-start; gap: 9px; margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 210, 122, .07); border: 1px solid rgba(255, 210, 122, .18); color: var(--ink-2); font-size: 13px; }
.was-note .i { width: 16px; height: 16px; color: #ffd27a; flex: none; margin-top: 1px; }
.was-note b { color: var(--ink); font-weight: 600; }
.was-note[hidden] { display: none; }
.was-box { display: flex; gap: 11px; padding: 12px 14px; margin: 0 0 16px; border-radius: 14px; background: rgba(255, 210, 122, .07); border: 1px solid rgba(255, 210, 122, .2); font-size: 13px; color: var(--ink-2); }
.was-box > .i { width: 18px; height: 18px; color: #ffd27a; flex: none; margin-top: 1px; }
.was-box b { color: var(--ink); display: block; margin-bottom: 4px; }
.was-box ul { margin: 0 0 6px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.was-box li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.was-box .nets { display: inline-flex; gap: 3px; }
.was-box .net { width: 16px; height: 16px; }
.was-box small { color: var(--mute); font-size: 12px; }
.was-box.soft { background: var(--raise); border-color: var(--line-2); }
.was-box.soft > .i { color: var(--mute); }
label.check.trial { margin: 12px 0 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); align-items: flex-start; gap: 12px; transition: border-color .15s, background .15s; }
label.check.trial:hover { border-color: var(--line-2); }
label.check.trial:has(input:checked) { border-color: rgba(141, 107, 255, .45); background: var(--accent-soft); }
label.check.trial > span { color: var(--ink); font-weight: 600; }
label.check.trial > span small { font-weight: 400; }
/* Галочка своя, крупная и заметная на тёмном фоне (родная — крошечная и почти белая). */
label.check input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; min-height: 0; margin: 0; padding: 0;
  border: 1.5px solid var(--mute); border-radius: 6px; background: var(--bg) center / 14px no-repeat; cursor: pointer; transition: background-color .12s, border-color .12s; }
label.check.trial input[type="checkbox"] { margin-top: 1px; }
label.check input[type="checkbox"]:hover { border-color: var(--accent-2); }
label.check input[type="checkbox"]:checked { border-color: var(--accent); background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
label.check input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
label.check input[type="checkbox"]:disabled { opacity: .45; cursor: not-allowed; }
.btn.holding { opacity: .55; cursor: wait; }
/* «Задание»: что отправляли и что получилось */
.jp-tabs button .i { width: 14px; height: 14px; margin-right: 5px; vertical-align: -2px; }
.task-in { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; }
.task-in figure { margin: 0; flex: none; display: flex; flex-direction: column; gap: 5px; }
.task-in figcaption { font-size: 11.5px; color: var(--mute); max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-vid, .task-card a { position: relative; display: block; height: 168px; border-radius: 12px; overflow: hidden; background: #0b0b10; box-shadow: 0 0 0 1px var(--line); }
.task-vid { width: 95px; }
.task-vid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.task-vid .tag { position: absolute; left: 6px; top: 6px; font-size: 10.5px; padding: 2px 6px; border-radius: 6px; background: rgba(8, 8, 12, .7); color: #fff; }
.task-card a { width: 126px; }
.task-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s var(--ease); }
.task-card a:hover img { transform: scale(1.04); }
.hist { display: flex; flex-direction: column; gap: 6px; max-width: 900px; }
.hist-day { margin: 16px 0 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.hist-day:first-child { margin-top: 0; }
.hist-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s var(--ease); }
.hist-row:hover { border-color: var(--line-2); transform: translateX(2px); text-decoration: none; }
.hist-th { width: 40px; height: 64px; border-radius: 8px; overflow: hidden; background: #0b0b10; flex: none; }
.hist-th img { width: 100%; height: 100%; object-fit: cover; }
.hist-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hist-b b { font-size: 13.5px; }
.hist-b small { color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-r { display: flex; align-items: center; gap: 8px; flex: none; }
.hist-r .nets { display: inline-flex; gap: 3px; }
@media (max-width: 860px) {
  .hist-r .pill { display: none; }
  .src .posted .posted-t { display: none; }        /* узкая карточка: аватар и сети, имя — в подсказке */
  /* Телефон: просмотры и сети — под текстом, заголовок одной строкой. */
  .hist-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; align-items: center; }
  .hist-row .hist-th { grid-row: 1 / span 2; }
  .hist-row .hist-b b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hist-row .hist-r { grid-column: 2; justify-content: flex-start; }
}
[hidden] { display: none !important; }  /* атрибут hidden сильнее любых display у компонентов */
/* описания под сети в окне публикации */
.cap-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
label.check.sm { font-size: 12.5px; gap: 6px; }
.cap-msg { flex: 1; min-width: 180px; }
.cap-field { margin-bottom: 12px; }
.cap-h { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.cap-l { display: inline-flex; align-items: center; gap: 6px; flex: 1; font-size: 13px; }
.cap-l .net { width: 18px; height: 18px; }
.cap-h .link { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; }
.cap-h .link .i { width: 14px; height: 14px; }
.cap-field textarea { width: 100%; }
.cap-field textarea.fresh { animation: capin .6s var(--ease); }
@keyframes capin { from { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); } }
.yt-row input { width: 100%; }
.trash-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; padding: 10px 12px; border-radius: 12px; background: rgba(255, 151, 165, .08); border: 1px solid rgba(255, 151, 165, .22); font-size: 13px; color: var(--ink-2); }
.trash-box > .i { width: 17px; height: 17px; color: #ff97a5; flex: none; }
.trash-box span { flex: 1; min-width: 180px; }
.trash-box b { color: var(--ink); }
.trash-box form { margin: 0; }
.src-shot .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.src-shot video { opacity: 0; transition: opacity .2s; }
.src-shot.playing video, .src-shot:not(:has(.poster)) video { opacity: 1; }
.pick-grid.video .ph video[data-src] { opacity: 0; transition: opacity .2s; }
.pick-grid.video .pick.playing .ph video { opacity: 1; }


.views-n { display: inline-flex; align-items: center; gap: 4px; font: 600 12px/1 var(--f-mono); color: var(--ink); white-space: nowrap; }
.views-n .i { width: 11px; height: 11px; fill: currentColor; stroke: none; color: var(--accent-2); }
.shot-foot .views-n { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.shot-foot .views-n .i { color: #fff; }


/* Быстрые действия на карточке медиатеки: иконки у правого края, появляются при наведении. */
.cardw { position: relative; display: block; min-width: 0; }
.cardw > a.card { display: flex; }
.qa { position: absolute; inset: 0 0 auto 0; height: 100%; padding: 46px 10px 0 0; box-sizing: border-box; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 4; opacity: 0; transform: translateX(6px); pointer-events: none; transition: opacity .18s var(--ease), transform .18s var(--ease); }
.qa-b, .qa .confirm-strip { pointer-events: auto; }
.cardw:hover .qa, .cardw:focus-within .qa, .qa:has(form.confirming) { opacity: 1; transform: none; }
@media (hover: none) { .qa { opacity: .92; transform: none; } }
.qa form { display: contents; }
.qa-b { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); background: rgba(10, 10, 16, .72); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 6px 18px rgba(0, 0, 0, .45); cursor: pointer; padding: 0; text-decoration: none; transition: transform .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease); }
.qa-b .i { width: 16px; height: 16px; }
.qa-b:hover, .qa-b:focus-visible { transform: scale(1.08); background: var(--accent); border-color: var(--accent); color: #fff; text-decoration: none; outline: none; }
.qa-b.danger:hover, .qa-b.danger:focus-visible { background: var(--bad); border-color: var(--bad); }
.cardw .confirm-strip { position: absolute; left: 10px; right: 10px; top: 50%; bottom: auto; transform: translateY(-50%); z-index: 6; padding: 14px 14px 12px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .12); background: rgba(12, 12, 18, .97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 14px 40px rgba(0, 0, 0, .7); color: #fff; gap: 12px; }
.cardw .confirm-strip span { font-size: 13.5px; line-height: 1.35; font-weight: 600; color: #fff; }
.cardw .confirm-btns { gap: 8px; }
.cardw .confirm-strip .btn { min-width: 0; flex: 1; height: 36px; font-size: 13px; font-weight: 700; }
.cardw .confirm-strip .btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.cardw .confirm-strip .btn.danger[disabled] { background: rgba(255, 90, 110, .22); border-color: rgba(255, 90, 110, .35); color: rgba(255, 255, 255, .7); opacity: 1; }
.cardw .confirm-strip .btn.ghost { border: 1px solid rgba(255, 255, 255, .22); color: #fff; }
.cardw .confirm-strip .btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.qa:has(form.confirming) .qa-b { display: none; }
.qa:has(form.confirming)::before { content: ""; position: absolute; inset: 0; background: rgba(6, 6, 10, .45); pointer-events: auto; }

/* Компактное подтверждение на карточке: галочка и крестик. */
.confirm-strip.compact .confirm-btns { justify-content: center; gap: 10px; }
.confirm-strip.compact .btn { position: relative; flex: 0 0 auto; width: 48px; height: 40px; padding: 0; border-radius: 12px; display: inline-grid; place-items: center; }
.confirm-strip.compact .btn .i { width: 18px; height: 18px; }
.confirm-strip.compact .btn .cd { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #fff; color: var(--bad); font: 700 11px/18px var(--f-display); }
.confirm-strip.compact .btn:focus-visible { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 2px; }

/* Загрузка исходника прямо со страницы создания: иконка в правом углу заголовка шага. */
.step > h2 .src-add { margin-left: auto; font-weight: 400; }
.step > h2 .src-add > summary { cursor: pointer; }
.step > h2 .src-add > summary:hover, .step > h2 .src-add[open] > summary { color: var(--accent); background: var(--accent-soft); }
.step > h2 .src-add .pop-body { font-size: 14px; font-weight: 400; letter-spacing: 0; }

/* Меню образа: карточки узкие, меню шире — раскрываем вправо, а не под боковую панель. */
@media (min-width: 861px) { .looks > .look:nth-child(-n+2) .look-menu { left: 0; right: auto; } }

/* Меню образа: главное действие — кнопка, поля подписаны. */
.look-menu { min-width: 250px; padding: 10px; }
.look-menu .menu-cta { display: flex; justify-content: center; width: 100%; height: 38px; margin: 0 0 10px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.look-menu .menu-cta .i { margin: 0; opacity: 1; color: inherit; width: 16px; height: 16px; }
.look-menu .menu-field { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 0 0 8px; padding: 0; }
.look-menu .menu-lbl { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); padding: 0 2px; }
.look-menu .menu-row { display: flex; gap: 6px; }
.look-menu .menu-row input { flex: 1; min-width: 0; }
.look-menu .link.danger { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px; border-radius: 8px; margin-top: 2px; }
.look-menu .link.danger:hover { background: var(--bad-soft); text-decoration: none; }
.looks .look { position: relative; }
@media (min-width: 861px) { .looks .look:has(.dd.open) { z-index: 30; } .look-menu { z-index: 40; } }

/* Плитка исходника: длительность внизу справа, отметка «где выходил» вверху и не шире плитки. */
.pick-grid.video .ph .badge.b-tr { top: auto; bottom: 9px; }
.src-mark { max-width: calc(100% - 16px); }
.src-mark .posted.compact { max-width: 100%; overflow: hidden; }
.src-mark .posted .nets { flex: 1 1 auto; min-width: 0; overflow: hidden; }

/* Большие мониторы: размеры заданы в px, на 34" всё мелкое — масштабируем интерфейс ступенями.
   Браузер применяет zoom к раскладке целиком, как если бы пользователь поставил 120–150 %. */
@media (min-width: 2000px) { html { zoom: 1.2; } }
@media (min-width: 2560px) { html { zoom: 1.35; } }
@media (min-width: 3200px) { html { zoom: 1.5; } }

/* Панель фильтров медиатеки: когда места мало (открыта панель ролика, узкое окно) — компактный вид
   в одну строку: без иконок у выпадающих списков, уже вкладки. Если всё же не влезает — второй ряд
   прижат вправо, а не болтается слева. */
.filters { container-type: inline-size; }
.filters .f-right { margin-left: auto; }
@container (max-width: 1500px) {
  .filters .tab { padding: 0 9px; gap: 5px; }
  .filters .dd > button { padding: 0 10px; gap: 6px; }
  .filters .dd > button > .i:first-child { display: none; }
}
@media (min-width: 861px) { .filters { flex-wrap: nowrap; } }     /* всегда одна строка (контейнерный запрос сам контейнер не стилизует) */
@container (max-width: 1500px) {
  .filters .tabs { flex: 1 1 auto; min-width: 0; }
  .filters .f-right { flex: none; flex-wrap: nowrap; }
}
@container (max-width: 1240px) {
  /* Вкладки важнее: списки справа сворачиваются до иконок (значение — в подсказке и в самом меню). */
  .filters .dd > button > .i:first-child { display: inline-block; }
  .filters .dd > button b, .filters .dd > button .lbl { display: none; }
  .filters .dd > button { padding: 0 8px; }
  .filters .tab b { display: none; }                               /* счётчики вкладок */
  .filters .tab { padding: 0 7px; font-size: 13px; }
  .filters .density { display: none; }
}
@container (max-width: 1240px) {
  .filters .tabs { gap: 0; }

}

/* Исходники: «Мои / Общие» — сегментный переключатель перед фильтрами. */
.src-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.src-bar .src-tabs { margin: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); }
.seg-b { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 8px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.seg-b b { font-size: 11.5px; color: var(--mute); font-weight: 600; }
.seg-b:hover { color: var(--ink); text-decoration: none; }
.seg-b.on { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(155, 125, 255, .35); }
.seg-b.on b { color: var(--accent-2); }
.step .src-who { margin: 0 0 12px; }
.step .src-who .seg-b { border: 0; background: none; font: inherit; font-weight: 600; cursor: pointer; }
.step .src-who .seg-b.on { background: var(--accent-soft); }
.pick-grid .pick[hidden] { display: none; }

/* Телефон: шапка персонажа — аватар на обложке, под ним имя во всю ширину (переносится по «_» и «.»,
   не посреди слова), счётчики и кнопки ровным рядом; периоды и сети в «Результатах» — одной строкой. */
@media (max-width: 860px) {
  .crumbs > a, .crumbs > .sep { display: none; }     /* в узкой шапке — только текущая страница; назад — кнопкой «Назад» */
  .channel-head { margin-top: -46px; gap: 12px 14px; padding: 0 4px; }
  .channel-head .who-t { flex: 1 1 100%; min-width: 0; padding: 0; }
  .channel-head .who-t h1 { font-size: clamp(22px, 6.6vw, 30px); line-height: 1.15; overflow-wrap: normal; word-break: normal; }
  .channel-head .stats { gap: 6px 14px; }
  .channel-head .cta { width: 100%; padding: 0; gap: 8px; }
  .channel-head .cta > * { flex: 1 1 0; min-width: 0; }
  .channel-head .cta .btn { width: 100%; justify-content: center; padding: 0 10px; white-space: nowrap; }
  .channel-head .cta > .btn.pri { order: -1; flex-basis: 100%; }     /* главное действие — своей строкой */
  .res-bar .segmented { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .res-bar .segmented::-webkit-scrollbar { display: none; }
  .res-bar .segmented a, .res-bar .segmented label { white-space: nowrap; flex: none; }
}

/* Публикация по сетям: где вышел, где нет. */
.net-st-row { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.net-st { display: inline-flex; align-items: center; gap: 2px; padding: 2px 5px 2px 2px; border-radius: 99px; background: var(--raise); border: 1px solid var(--line); }
.net-st .net { width: 16px; height: 16px; }
.net-st .i { width: 11px; height: 11px; }
.net-st.ok .i { color: var(--ok); } .net-st.bad { border-color: rgba(255, 90, 110, .45); } .net-st.bad .i { color: var(--bad); } .net-st.wait .i { color: var(--mute); }

/* Узкий экран (телефон, мини-приложение Telegram): вкладки листаются вбок — счётчики у них
   возвращаем (на широком их прятали, чтобы ряд влез в одну строку). */
@media (max-width: 860px) {
  .filters .tab b { display: inline; }
  .filters .tab { padding: 0 11px; font-size: 13.5px; }
}
.facts + .sub-h { margin-top: 22px; }     /* «Промпт» не налезает на последнюю строку фактов */
@media (max-width: 860px) {
  /* Плеер ролика целиком на экране вместе с кнопками: по высоте не больше ~2/3 окна. */
  .job-page .player:not(.cmp-col > .player) { width: min(100%, calc((100dvh - 200px) * 9 / 16)); min-width: 200px; }
}
@media (max-width: 860px) {
  /* Создание: нижняя панель — одна-две строки (сколько роликов + кнопка, ниже кошелёк), а не полэкрана. */
  .summary { gap: 8px 10px; padding: 10px 12px; }
  .summary .cost p { display: none; }
  .summary .cost-n { font-size: 17px; white-space: nowrap; }
  .summary .go { height: 44px; flex: 1 1 160px; }
  .summary .sum-wallet { order: 3; flex-basis: 100%; }
  .summary .sum-wallet-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .summary .sum-wallet select { height: 36px; font-size: 13px; }
}
@media (max-width: 860px) {
  .res-bar > *, .res-group { min-width: 0; max-width: 100%; }   /* периоды и сети не раздвигают страницу — листаются вбок */
}
@media (max-width: 860px) {
  .rule-h { flex-wrap: wrap; }
  .rule-h > div { flex: 1 1 0; min-width: 0; }
  .rule-h .rule-clear { margin-left: 0; flex-basis: 100%; }      /* «Очистить график» — своей строкой, не за экраном */
  .idea-edit > summary { display: inline-flex; align-items: center; min-height: 32px; padding: 0 4px; }
}
@media (max-width: 860px) {
  /* Пальцем попасть: текстовые кнопки и раскрывашки — не меньше 32px в высоту. */
  button.link, a.link-a { min-height: 32px; display: inline-flex; align-items: center; }
  details > summary { min-height: 32px; }
  details > summary:not([class*="btn"]):not(.fold):not(.icon-btn) { display: flex; align-items: center; }
}
@media (max-width: 860px) {
  /* Нормы на телефоне — карточкой: кто, ниже по режиму «в день / потрачено / доступно». */
  .gen-norms { display: block; white-space: normal; }
  .gen-norms thead { display: none; }
  .gen-norms tbody, .gen-norms tr { display: block; }
  .gen-norms tr { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .gen-norms td { padding: 0; border: 0; text-align: left; }
  .gen-norms td:first-child { grid-column: 1 / -1; font-weight: 600; }
  .gen-norms td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--mute); margin-bottom: 3px; }
  .gen-norms input { width: 100%; }
}
@media (max-width: 860px) {
  /* table.stack: каждая строка — карточка, у ячейки подпись из заголовка колонки (ставит app.js). */
  .table.stack { display: block; white-space: normal; border: 0; background: none; }
  .table.stack thead { display: none; }
  .table.stack tbody { display: flex; flex-direction: column; gap: 10px; }
  .table.stack tr { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
  .table.stack td { padding: 0; border: 0; text-align: left; }
  .table.stack td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
  .table.stack td:empty { display: none; }
  .table.stack select, .table.stack input { max-width: 100%; }
}
@media (max-width: 860px) {
  .create .steps { margin: -4px 0 -10px; padding: 6px 0; gap: 5px; }
  .create .stp { flex: 1 1 0; min-width: 0; justify-content: center; gap: 6px; padding: 6px 8px 6px 6px; font-size: 12.5px; }
  .create .stp .n { width: 22px; height: 22px; font-size: 11px; }
  .create .stp small { display: none; }
  .create .stp-l { display: none; }
  .create .stp-s { display: inline; }
  .step { scroll-margin-top: calc(var(--top) + 58px); }
  .view:has(.create .summary) { padding-bottom: calc(220px + env(safe-area-inset-bottom, 0px)); }   /* низ формы выходит из-под панели и меню */
}
@media (max-width: 860px) {
  .res-post-meta { white-space: normal; overflow: visible; text-overflow: clip; }   /* ссылка «ролик #N» в конце строки не прячется под многоточие */
}

/* ---------- API площадок (админ) ---------- */
.api-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.api-head form { margin: 0; }
.api-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.api-top h3, .api-top h4 { margin: 0; font-size: 15px; font-weight: 700; }
.api-f input { width: 100%; font-family: var(--f-mono); font-size: 13px; }
.api-note { margin: 0; padding: 9px 12px; border-radius: 10px; font-size: 13px; overflow-wrap: anywhere; }
.api-note.ok { background: var(--ok-soft); color: var(--ok); }
.api-note.bad { background: var(--bad-soft); color: var(--bad); }
.api-btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.api-btns .link { margin-left: 4px; }
.api-char .card-h { margin-bottom: 14px; }
.api-nets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 12px; }
.api-net .btn, .api-card .btn { height: 34px; padding: 0 12px; font-size: 13px; }
.api-net { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--raise); }
.api-net p { margin: 0; }
.api-card p { margin: 0; }
.api-guide summary, .api-cmp summary { cursor: pointer; }
.api-guide h3 { margin: 16px 0 6px; font-size: 14px; }
.api-guide ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.api-opts p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); }
.api-direct { margin: 0 0 14px; }
.api-sum { color: var(--accent-2); }
.api-cmp { margin-top: 14px; font-size: 13px; }
.api-cmp .table { margin-top: 10px; }
.api-connect { align-self: flex-start; }
.api-or { margin: -4px 0 0; }
.api-redirects { margin: 6px 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ink-2); }
.api-redirects input { display: block; width: 100%; margin-top: 4px; font-family: var(--f-mono); font-size: 12.5px; }
.instance-label { position: fixed; z-index: 100; left: 50%; top: 0; transform: translateX(-50%); padding: 4px 14px; border-radius: 0 0 10px 10px; background: var(--warn); color: #1a1300; font-size: 12.5px; font-weight: 700; white-space: nowrap; pointer-events: none; }
