/* 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; }
@font-face { font-family: "Geologica"; font-weight: 400 700; font-display: swap; src: url("/static/fonts/geologica-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: "Geologica"; font-weight: 400 700; font-display: swap; src: url("/static/fonts/geologica-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --bg: #000000;
  --panel: #000000;
  --raise: #1c1c1c;
  --hover: #262626;
  --line: #262626;
  --line-2: #363636;
  --ink: #f5f5f5;
  --ink-2: #a8a8a8;
  --mute: #8e8e8e;
  --fg: 255, 255, 255;
  --pri-1: #1aa3ff; --pri-2: #0089e8;
  --smooth: antialiased;
  --accent: #0095f6;
  --accent-2: #4cb5f9;
  --accent-soft: rgba(0, 149, 246, .16);
  --accent-glow: rgba(0, 149, 246, .35);
  --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: var(--smooth); 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(var(--fg), .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, var(--pri-1), var(--pri-2)); 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 b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--mute); font-size: 11.5px; }

.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, var(--pri-1), var(--pri-2)); 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, var(--pri-1), var(--pri-2)); }
.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(var(--fg), .025); }
.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(var(--fg), .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(var(--fg), .08); 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%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 65%), #07070b; }
.shot.running .develop::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0 40%, color-mix(in srgb, var(--accent-2) 18%, transparent) 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, var(--hover)), var(--c2, var(--panel))); 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: color-mix(in srgb, var(--accent-2) 40%, transparent); }
.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); }
/* длинное видео: галочка в шаге «Режим» (исходник длиннее лимита режима) */
label.long-box { display: flex; flex-direction: row; gap: 14px; align-items: flex-start; margin-top: 14px; font-size: 14px; font-weight: 400; color: var(--ink); padding: 16px 16px 16px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--raise); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.long-box:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); }
.long-box input { flex: 0 0 auto; width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--accent); }
.long-body { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.long-t { font-size: 15px; font-weight: 600; }
.long-what { color: var(--ink-2); font-size: 13.5px; }
.long-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.long-chips span { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(var(--fg), .04); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.long-chips span:empty { display: none; }
.long-bar { display: flex; gap: 3px; height: 26px; margin-top: 2px; }
.long-bar i { flex: 1 1 0; display: grid; place-items: center; border-radius: 6px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent-2) 45%, transparent); font: 600 11px/1 var(--f-mono); font-style: normal; color: var(--accent-2); }
.long-axis { display: flex; justify-content: space-between; font: 500 10.5px/1 var(--f-mono); color: var(--mute); }
.long-note { color: var(--mute); font-size: 12px; }
.long-box:not(:has(input:checked)) .long-bar, .long-box:not(:has(input:checked)) .long-axis { opacity: .55; }
.cost-long { color: var(--ink-2); }
.cost-n.is-long { font-size: 20px; line-height: 1.15; }
.long-sum { color: var(--accent-2); font-weight: 600; }
.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 color-mix(in srgb, var(--accent) 70%, transparent); } }

/* ---------- персонажи ---------- */
.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: color-mix(in srgb, var(--accent-2) 45%, transparent); box-shadow: 0 22px 44px rgba(0, 0, 0, .5), 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent); 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%, color-mix(in srgb, var(--accent-2) 35%, transparent) 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%, color-mix(in srgb, var(--accent) 22%, transparent), 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 .mc-head > .mc-actions { flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; }
.mc-link { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.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: color-mix(in srgb, var(--accent-2) 40%, transparent); }
.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; }
.plan-stats .tz-pick { margin-left: auto; }
.plan-stats .tz-note { flex-basis: 100%; text-align: right; }
@media (max-width: 600px) { .plan-stats .tz-pick { margin-left: 0; } .plan-stats .tz-note { text-align: left; } }
.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(var(--fg), .035) 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; }
.netrules { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 6px; }
.nr { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--raise); }
.nr > .net { width: 24px; height: 24px; } .nr > b { min-width: 86px; font-size: 14px; }
.nr .nr-m { color: var(--mute); font-size: 13px; flex: 1; }
.nr.on { border-color: color-mix(in srgb, var(--accent-2) 35%, transparent); background: var(--accent-soft); }
.nr .time-list { flex: 1; margin: 0; flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.nr:not(.on) .time-list, .nr.on .nr-m, .nr.on .nr-on, .nr:not(.on) .nr-off { display: none; }
.nr .nr-on, .nr .nr-off { margin-left: auto; }
/* ---------- план: кубики роликов, разбивка по сетям, перенос и снятие ---------- */
.plan-body .wk { grid-template-columns: 64px repeat(7, minmax(128px, 1fr)); min-width: 1016px; }
.plan-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; color: var(--mute); font-size: 12px; margin: -4px 2px 12px; }
.plan-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.plan-legend .lgd { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--run); }
.plan-legend .lgd.ok { background: var(--ok); } .plan-legend .lgd.bad { background: var(--bad); }
.plan-legend .who-mark { position: static; box-shadow: none; }
.plan-rule small b { display: inline; color: var(--ink-2); font-weight: 600; }
.cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; border-radius: 12px; }
.cube { position: relative; display: flex; min-height: 76px; border-radius: 12px; overflow: hidden; background: var(--raise); border: 1px solid var(--line-2); font-size: 12px; transition: border-color .15s, opacity .15s; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.cube.mov { cursor: grab; }
.cube:hover { border-color: var(--accent); }
.cube.done { border-color: rgba(67, 217, 155, .28); }
.cube-a { display: flex; flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
.cube-a:hover { text-decoration: none; }
.cube .ci { display: flex; flex-direction: column; gap: 5px; padding: 7px 8px; min-width: 0; align-items: flex-start; }
.cube .ci b { font-size: 12.5px; display: flex; align-items: baseline; gap: 5px; }
.cube .ci b .tr { color: var(--live); font: 500 10px var(--f-ui); }
.cube .pill { height: 18px; font-size: 10.5px; padding: 0 7px; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.nchip { position: relative; display: inline-grid; }
.nchip .net { width: 18px; height: 18px; border-radius: 5px; }
.nchip::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--raise); background: var(--run); }
.nchip.ok::after { background: var(--ok); } .nchip.bad::after { background: var(--bad); } .nchip.warn::after { background: var(--live); }
.nchip.sm .net { width: 14px; height: 14px; border-radius: 4px; }
.nchip.sm::after { width: 6px; height: 6px; border-width: 1px; }
.who-mark { position: absolute; top: 6px; right: 6px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font: 700 9px/1 var(--f-ui); color: #fff; background: #3f8cff; box-shadow: 0 0 0 2px var(--raise); pointer-events: none; }
.who-mark.sm { position: static; width: 14px; height: 14px; font-size: 7.5px; margin-left: auto; box-shadow: none; }
.cube-tools { position: absolute; top: 5px; right: 5px; display: none; gap: 4px; z-index: 1; }
.cube:hover .cube-tools, .pmini:hover .cube-tools, .cube:focus-within .cube-tools { display: flex; }
.cube-tools button, .pmini .mx { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(10, 10, 14, .88); color: var(--ink-2); cursor: pointer; }
.cube-tools button .i { width: 14px; height: 14px; }
.cube-tools button:hover { color: var(--ink); border-color: var(--accent); }
.cube-tools .ct-del:hover, .cube-tools .ct-del.on { color: var(--bad); border-color: rgba(255, 95, 115, .5); }
.lane-t span { font: 500 10.5px/1.15 var(--f-ui); color: var(--mute); text-align: center; }
.lane { display: flex; flex-direction: column; gap: 4px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: rgba(var(--fg), .02); min-height: 40px; min-width: 0; }
.lane-0 { color: var(--mute); opacity: .5; margin: auto; }
.pmini { position: relative; display: flex; align-items: center; gap: 5px; height: 30px; padding: 0 6px 0 0; border-radius: 9px; overflow: hidden; background: var(--raise); border: 1px solid var(--line-2); font-size: 11px; white-space: nowrap; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.pmini.mov { cursor: grab; }
.pmini.ok, .pmini.part { border-color: rgba(67, 217, 155, .25); }
.pmini.sch { border-left: 3px solid var(--run); } .pmini.bad { border-left: 3px solid var(--bad); }
.pmini .mpv { position: relative; width: 20px; height: 100%; flex: none; background: #050508; overflow: hidden; }
.pmini .mpv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pmini b { font-size: 11px; }
.pmini .net { width: 15px; height: 15px; border-radius: 5px; }
.pmini .m-l { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.pmini .mx { width: 22px; height: 22px; border-radius: 6px; margin-left: auto; flex: none; }
.pmini .mx .i { width: 11px; height: 11px; }
.pmini .mx:hover { color: var(--bad); border-color: rgba(255, 95, 115, .5); }
.pmini.two { height: 44px; padding: 0; }
.pmini.two .cube-a { align-items: stretch; gap: 5px; height: 100%; }
.pmini.two .mpv { width: 26px; }
.pmini.two .cube-tools { top: 50%; right: 4px; transform: translateY(-50%); }
.m2 { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; flex: 1; padding-right: 6px; }
.m2a { display: flex; align-items: center; gap: 5px; }
.m2a .mt { color: var(--mute); font-size: 10.5px; }
.split-box { display: flex; flex-direction: column; gap: 4px; padding: 5px; border-radius: 12px; border: 1px dashed var(--accent); background: var(--accent-soft); }
.split-box .sb-h { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--ink-2); padding: 0 2px 2px; }
.split-box .sb-h .link { font-size: 11px; }
.wk-sec { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: rgba(var(--fg), .03); border: 1px solid var(--line-2); position: sticky; left: 0; }
.wk-sec.s-youtube { background: rgba(255, 0, 0, .05); border-color: rgba(255, 70, 70, .2); }
.wk-sec b { font-size: 13.5px; } .wk-sec small { color: var(--mute); font-size: 12px; }
.wk-sec .net { width: 20px; height: 20px; }
.wk-t.nt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.wk-t.nt .net { width: 15px; height: 15px; }
.slot.free.own { border-color: color-mix(in srgb, var(--accent-2) 30%, transparent); }
.slot.free.own.s-youtube { border-color: rgba(255, 70, 70, .35); }
.slot.near { display: grid; place-items: center; text-align: center; color: var(--mute); border: 1px dashed var(--line); font-size: 11px; padding: 4px; }
/* перетаскивание */
.plan-body.dragging, .plan-body.dragging * { cursor: grabbing !important; }
.plan-body .lift { opacity: .35; }
[data-ts].dropin { outline: 1.5px solid var(--accent); outline-offset: -1px; background: var(--accent-soft); box-shadow: 0 0 0 4px var(--accent-soft); color: var(--ink); }
.drop-hint { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; text-align: center; font-size: 11.5px; line-height: 1.3; color: var(--ink); min-height: 64px; }
.dragghost { position: fixed; z-index: 90; left: 0; top: 0; width: 150px; transform: rotate(-4deg); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); border-color: var(--accent) !important; pointer-events: none; opacity: .95; }
.plan-body.busy { pointer-events: none; opacity: .7; transition: opacity .2s; }
/* подтверждение снятия */
.ppop { position: fixed; z-index: 95; width: min(300px, calc(100vw - 24px)); padding: 14px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .6); font-size: 13px; }
.ppop b { display: block; font-size: 14px; margin-bottom: 6px; }
.ppop p { margin: 0 0 12px; color: var(--ink-2); line-height: 1.45; }
.ppop .row { display: flex; gap: 8px; }
.btn.bad-fill { background: var(--bad); color: #fff; border-color: transparent; }
/* тост с «Вернуть» */
.toast .toast-u { flex: none; font: inherit; font-weight: 600; font-size: 13px; color: var(--accent-2); background: none; border: 0; padding: 4px 8px; border-radius: 8px; cursor: pointer; }
.toast .toast-u:hover { background: var(--accent-soft); }
/* телефон: шторка кубика */
.sheet-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 85; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 86; max-height: 86vh; overflow-y: auto; padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 22px 22px 0 0; background: var(--panel); border-top: 1px solid var(--line-2); box-shadow: 0 -20px 50px rgba(0, 0, 0, .6); }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 12px; }
.sh-h { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.sh-h img { width: 44px; height: 62px; object-fit: cover; border-radius: 9px; background: #050508; }
.sh-h b { display: block; font-size: 16px; } .sh-h small { color: var(--mute); font-size: 12.5px; }
.sh-n { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.sh-n .net { width: 22px; height: 22px; } .sh-n .tm { margin-left: auto; color: var(--ink-2); }
.sh-n .btn { height: 32px; padding: 0 10px; font-size: 12.5px; }
.sh-n .xb { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line-2); background: none; color: var(--ink-2); cursor: pointer; }
.sh-a { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.sh-a .btn { justify-content: center; height: 42px; }
.sh-a .full { grid-column: 1 / -1; }
.btn.ghost.bad-t { color: var(--bad); border-color: rgba(255, 95, 115, .35); }
.sh-tip { margin-top: 12px; color: var(--mute); font-size: 12px; text-align: center; }
.sh-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0 12px; }
.sh-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--raise); color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.sh-pick button b { font-size: 15px; } .sh-pick button small { color: var(--mute); font-size: 11.5px; }
.sh-own { display: flex; gap: 8px; align-items: flex-end; }
.sh-own label { flex: 1; }
.sh-own input { color-scheme: dark; width: 100%; }
@media (hover: none) {
  .cube-tools { display: none !important; }
}

/* ---------- сравнение исходник / результат ---------- */
.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); }
  .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, var(--pri-1), var(--pri-2)); 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: color-mix(in srgb, var(--accent-2) 40%, transparent); 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, var(--hover), var(--panel)); 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: color-mix(in srgb, var(--accent) 45%, transparent); 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; }

/* ---------- медиатека по разделам: «Сейчас» (полки), архив, отметки на карточках ---------- */
/* Шапка: три постоянных ряда — разделы · инструменты · фильтры. Ничего не переносится на новую строку,
   узкий ряд листается вбок (затухание у края ставит app.js), числа — цифрами одной ширины. */
.lib-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 14px; }
.lh-seg { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.lh-seg::-webkit-scrollbar { display: none; }
.lib-seg { flex-wrap: nowrap; white-space: nowrap; }
.lib-seg a { flex: none; }
.lib-seg b { display: inline-block; min-width: 3.2ch; font-weight: 600; color: var(--mute); margin-left: 2px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.lib-seg a.on b { color: var(--ink-2); }
.lh-tools { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.lh-l { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
.lh-r { display: flex; align-items: center; gap: 8px; flex: none; margin-left: auto; }
.lib-x { flex: none; font-size: 13px; color: var(--mute); padding: 6px 10px; border-radius: 9px; text-decoration: none; }
.lib-x:hover { color: var(--ink); background: var(--hover); text-decoration: none; }
.lib-x.err { color: var(--bad); } .lib-x b { font-weight: 700; font-variant-numeric: tabular-nums; }
.lib-x.off, .lib-x.off:hover { color: var(--mute); background: none; opacity: .55; cursor: default; }
.dd.set > button { position: relative; }
.shelf { margin: 6px 0 28px; }
.shelf-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.shelf-h b { font: 700 17px/1.2 var(--f-ui); color: var(--ink); }
.shelf-n { font: 600 13px/1 var(--f-ui); color: var(--accent-2); background: var(--accent-soft); padding: 3px 8px; border-radius: 99px; }
.shelf.warn .shelf-n { color: var(--bad); background: var(--bad-soft); }
.shelf-h small { color: var(--mute); font-size: 13px; }
.shelf-all { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; }
.shelf-all .i { width: 14px; height: 14px; }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: 196px; gap: 16px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.lib-flt { display: flex; align-items: center; gap: 8px; margin: 2px 0 16px; }
.fl-scroll { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 1px 0; }
.fl-scroll::-webkit-scrollbar { display: none; }
.fl-scroll > * { flex: none; }
.lib-flt .lbl { color: var(--mute); font-size: 13px; margin-right: 2px; }
.fchip2 { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 8px; border-radius: 10px; border: 1px solid var(--line-2);
          background: var(--raise); color: var(--ink-2); font-size: 13px; font-weight: 550; text-decoration: none; }
.fchip2:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent-2) 40%, transparent); text-decoration: none; }
.fchip2 .net { width: 18px; height: 18px; border-radius: 6px; }
.fchip2.on { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.fchip2.plain { padding: 0 12px; }
.lib-flt .sep { width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.lib-sort { margin-left: auto; flex: none; }
.badge.lib-fresh { background: rgba(255, 176, 32, .18); color: #ffcf6e; }
.badge.lib-fresh::before, .badge.lib-seen::before { display: none; }
.badge.lib-fresh .i { width: 13px; height: 13px; }
.badge.lib-seen { gap: 6px; }
.lib-logos { display: inline-flex; gap: 2px; } .lib-logos .net { width: 15px; height: 15px; border-radius: 5px; }
.lib-miss { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 6px; }
.lib-miss form { display: contents; }
.lib-miss .btn { height: 30px; padding: 0 10px; font-size: 12px; gap: 5px; flex: 1; }
.lib-miss .btn .i { width: 13px; height: 13px; }
.lib-miss-t { flex-basis: 100%; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--bad); }
.lib-miss-t .net { width: 16px; height: 16px; border-radius: 5px; }
@media (max-width: 600px) {
  .shelf-row { grid-auto-columns: 158px; gap: 12px; }
  .shelf-h small { flex-basis: 100%; order: 3; }
}
/* Телефон: подписи прячутся, остаются значки — ряды помещаются в ширину экрана. Выбран не «по умолчанию»
   (не вся студия, не любой режим, другая сортировка) — точка на значке. */
@media (max-width: 700px) {
  .lh-tools { overflow-x: auto; scrollbar-width: none; }
  .lh-tools::-webkit-scrollbar { display: none; }
  .lh-l { flex: none; overflow: visible; }
  .lh-l .lib-x { padding: 6px 8px; }
  .lh-l .t-long, .lib-select .t-lbl { display: none; }
  .lh-l .lib-select { width: 40px; height: 32px; justify-content: center; padding: 0; }
  .lh-r .dd > button, .lib-sort > button { width: 40px; padding: 0; justify-content: center; }
  .lh-r .dd > button b, .lib-sort > button b, .lh-r .dd > button > .i:last-child, .lib-sort > button > .i:last-child { display: none; }
  .dd.set > button::after { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 2px var(--panel); }
  .fchip2.netf { width: 40px; padding: 0; justify-content: center; }
  .fchip2.netf .t-net { display: none; }
}
@media (max-width: 380px) {  /* самые узкие телефоны: плотнее, чтобы ряд инструментов не уходил за край */
  .lh-tools { gap: 6px; } .lh-l { gap: 2px; } .lh-r { gap: 6px; }
  .lh-l .lib-x { padding: 6px 5px; }
  .lh-l .lib-select, .lh-r .dd > button { width: 36px; }
}
.net-chip .was { margin-left: 4px; font-size: 10.5px; font-weight: 700; color: #ffcf6e; background: rgba(255, 176, 32, .16); padding: 2px 6px; border-radius: 6px; }
.was-box li.mine { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: #ffcf6e; margin-bottom: 4px; }
.was-box li.mine b { color: #ffcf6e; font-weight: 600; } .was-box li.mine .net { width: 18px; height: 18px; border-radius: 6px; }
.lib-select { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font: inherit; font-size: 13px; }
.lib-select .i { width: 15px; height: 15px; }
body.selecting .lib-select { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
body.selecting a.card { cursor: copy; }
body.selecting a.card .shot::after { content: ""; position: absolute; z-index: 3; top: 10px; left: 10px; width: 22px; height: 22px; border-radius: 7px;
  border: 2px solid rgba(255, 255, 255, .8); background: rgba(10, 10, 16, .45); }
body.selecting a.card.sel .shot::after { background: var(--accent); border-color: var(--accent);
  box-shadow: inset 0 0 0 3px var(--accent), inset 0 0 0 10px #fff; }
.lib-bulk { position: fixed; z-index: 60; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: calc(100vw - 24px);
  padding: 10px 12px; border-radius: 16px; background: rgba(20, 20, 28, .96); border: 1px solid var(--line-2); box-shadow: 0 18px 44px rgba(0, 0, 0, .6); }
.lib-bulk .lb-n { font-size: 13px; color: var(--ink-2); margin-right: 4px; } .lib-bulk .lb-n b { color: var(--ink); }
.lib-bulk .btn { height: 34px; } .lib-bulk .btn .i { width: 14px; height: 14px; }
.lib-bulk .lb-trash:hover { color: var(--bad); }
.lib-stack { position: absolute; z-index: 5; top: 10px; right: 10px; height: 24px; padding: 0 9px; display: inline-flex; align-items: center;
  border-radius: 99px; background: var(--accent); color: #fff; font: 700 12px/1 var(--f-ui); text-decoration: none; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.lib-stack:hover { text-decoration: none; filter: brightness(1.1); }
.lib-clip { font-size: 13px; color: var(--ink-2); margin: -4px 0 12px; }
.trial-lead { margin: -4px 0 16px; }
.hit-row { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: 18px; padding: 16px 0 18px; border-top: 1px solid var(--line); }
.hit-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.hit-h b { font: 600 20px/1 "Unbounded", var(--f-ui); } .hit-h span { color: var(--ink-2); font-size: 13px; }
.hit-h .btn { margin-left: auto; }
.hit-post { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--ink-2);
  font-size: 13px; text-decoration: none; }
.hit-post b { color: var(--ink); }
@media (max-width: 600px) {
  .hit-row { grid-template-columns: minmax(0, 1fr); }
  .hit-src { max-width: 180px; }
  .lib-bulk { left: 12px; right: 12px; transform: none; }
}
.pick-list { display: flex; flex-direction: column; gap: 8px; max-width: 880px; }
.pick-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 10px 12px;
  border-radius: 14px; background: var(--raise); border: 1px solid var(--line); }
.pick-row.none { opacity: .75; }
.pick-when b { display: block; font-size: 14px; } .pick-when small { color: var(--mute); font-size: 12px; }
.pick-v { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); text-decoration: none; }
.pick-v:hover { text-decoration: none; } .pick-v.empty { color: var(--mute); font-size: 13px; }
.pick-pv { position: relative; width: 44px; height: 78px; border-radius: 9px; overflow: hidden; background: #050508; flex: none; }
.pick-pv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pick-i { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pick-i small { color: var(--mute); font-size: 12px; }
.pick-seen { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: #ffcf6e; } .pick-seen .net { width: 15px; height: 15px; border-radius: 5px; }
.pick-act { display: flex; gap: 6px; }
@media (max-width: 700px) {
  .pick-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
/* ---------- статистика ролика по сетям на карточке (чип в углу + панель) ---------- */
.nst { position: relative; display: inline-flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.nst-t { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px 0 5px; border-radius: 14px; cursor: pointer;
         background: rgba(12, 12, 18, .72); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
         box-shadow: 0 6px 16px rgba(0, 0, 0, .4); color: #fff; transition: background .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.nst-t b { font: 600 12.5px/1 "Unbounded", var(--f-ui); font-variant-numeric: tabular-nums; text-box: trim-both cap alphabetic; }
.nst-t:hover, .nst.open .nst-t, .nst-t:focus-visible { background: color-mix(in srgb, var(--accent) 92%, transparent); border-color: color-mix(in srgb, var(--accent-2) 90%, transparent); outline: none; }
.nst-logos { display: inline-flex; gap: 3px; }
.nst-logos .net { width: 18px; height: 18px; border-radius: 6px; }
.nst.open .nst-logos .net { box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
.nst-p { display: none; position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; width: 196px; padding: 6px 8px; flex-direction: column;
         border-radius: 16px; background: rgba(14, 14, 20, .92); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(14px);
         -webkit-backdrop-filter: blur(14px); box-shadow: 0 16px 40px rgba(0, 0, 0, .55); cursor: default; animation: nst-in .18s var(--ease); }
.nst.open .nst-p { display: flex; }
@keyframes nst-in { from { opacity: 0; transform: translateY(6px); } }
.nst-r { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; column-gap: 10px; height: 34px; padding: 0 4px; }
.nst-r + .nst-r { border-top: 1px solid rgba(255, 255, 255, .06); }
.nst-r > .net { width: 22px; height: 22px; border-radius: 7px; }
.nst-v, .nst-f { display: inline-flex; align-items: center; gap: 5px; color: rgba(236, 232, 255, .52); }
.nst-v .i, .nst-f .i { width: 15px; height: 15px; stroke-width: 2; }
.nst-v b, .nst-f b { font: 500 14.5px/1 "Geologica", var(--f-ui); font-variant-numeric: tabular-nums; text-box: trim-both cap alphabetic; }
.nst-v b { color: #fff; }
.nst-x { font: 600 10.5px/1 "Geologica", var(--f-ui); font-style: normal; color: #4ade9a; background: rgba(74, 222, 154, .14); padding: 2px 5px; border-radius: 6px; }
.nst-f { justify-self: end; min-width: 58px; justify-content: flex-end; }
.nst-f b { color: rgba(236, 232, 255, .72); }
.nst-f.pos { color: rgba(74, 222, 154, .75); } .nst-f.pos b { color: #4ade9a; }
.nst-f.neg { color: rgba(255, 107, 127, .75); } .nst-f.neg b { color: #ff6b7f; }
@media (max-width: 600px) {
  .nst-t { height: 26px; gap: 6px; padding: 0 9px 0 4px; } .nst-t b { font-size: 11.5px; }
  .nst-logos { gap: 2px; } .nst-logos .net { width: 15px; height: 15px; border-radius: 5px; }
  .nst-p { width: 162px; padding: 5px 6px; }
  .nst-r { grid-template-columns: 19px 1fr auto; column-gap: 7px; height: 30px; padding: 0 2px; }
  .nst-r > .net { width: 19px; height: 19px; border-radius: 6px; }
  .nst-v .i, .nst-f .i { width: 12px; height: 12px; } .nst-v, .nst-f { gap: 4px; }
  .nst-v b, .nst-f b { font-size: 12.5px; } .nst-f { min-width: 48px; }
}
.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 color-mix(in srgb, var(--accent) 35%, transparent); }
.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; }
.reco-hits { margin: 6px 0 0; }
.reco-hits b { color: var(--ink-2); font-weight: 600; }
.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; }
.legal { place-items: start center; overflow: auto; padding-top: 40px; padding-bottom: 40px; }
.legal-card { width: min(720px, 100%); text-align: left; }
.legal-card .lc-title, .legal-card .lc-sub { text-align: center; }
.legal-card h1 { font-size: 22px; margin: 18px 0 6px; }
.legal-card h2 { font: 650 15px/1.3 var(--f-ui); margin: 18px 0 6px; }
.legal-card p { color: var(--ink-2); font-size: 14px; line-height: 1.55; margin: 0 0 10px; overflow-wrap: anywhere; }
.legal-card a { color: var(--ink); }
.legal-date { color: var(--mute); font-size: 12.5px; }
.legal-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 12px 0 4px; font-size: 13px; }
.login-card .lc-legal { margin-top: 10px; font-size: 12px; }
.login-card .lc-legal a { color: var(--mute); margin: 0 6px; }
/* Мастер «Подключить персонажа» (API площадок) */
.api-onb { margin-bottom: 16px; }
.api-onb > p { margin: 8px 0 14px; }
.api-onb-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; align-items: end; }
.api-onb-form select { width: 100%; }
.api-onb-nets { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; grid-column: 1 / -1; }
.api-onb-form .api-btns { grid-column: 1 / -1; }
.api-onb-runs { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.api-onb-runs li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.api-onb-steps { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.api-onb-steps li { display: flex; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--raise); }
.api-onb-steps li p { margin: 2px 0 0; overflow-wrap: anywhere; }
.api-onb-steps .st-todo { opacity: .6; }
.api-onb-steps .st-failed { border-color: var(--bad); }
.api-onb-ico { width: 22px; flex: none; text-align: center; }

/* Уникализация видео */
.uniq-layout { display: grid; grid-template-columns: 220px minmax(0, 460px); gap: 24px; align-items: start; }
.uniq-prev { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 14px; background: #07070b; display: block; }
.uniq-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.uniq-nums input { width: 100%; min-width: 0; }
.uniq-date { margin-top: 12px; }
.uniq-date input { color-scheme: dark; }
#uniq-form:not(:has(input[name=capcut]:checked)) .uniq-date { display: none; }
#uniq-left { margin: 12px 0 16px; }
@media (max-width: 640px) {
  .uniq-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .uniq-prev { width: 150px; margin: 0 auto; }
}

/* Вкладка «Telegram»: инструкция и каналы */

.tgc-steps { list-style: none; counter-reset: tgc; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.tgc-steps > li { counter-increment: tgc; position: relative; padding: 2px 0 0 44px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.tgc-steps > li::before { content: counter(tgc); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: rgba(42, 171, 238, .16); color: #6cc7f5; border: 1px solid rgba(42, 171, 238, .35); }
.tgc-steps > li.done::before { content: "✓"; background: var(--ok-soft); color: var(--ok); border-color: rgba(67, 217, 155, .35); }
.tgc-steps > li > b { font-size: 14.5px; }
.tgc-steps small { color: var(--ink-2); line-height: 1.5; }
.tgc-steps code { background: var(--hover); padding: 1px 6px; border-radius: 6px; }
.tgc-steps form { margin-top: 2px; }
.tgc-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; font-size: 13px; }
.tgc-ok .i { width: 14px; height: 14px; }
.tgc-rights { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-size: 13px; }
.tgc-rights li { display: flex; align-items: baseline; gap: 8px; }
.tgc-need, .tgc-opt { flex: none; min-width: 78px; text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; }
.tgc-need { background: var(--ok-soft); color: var(--ok); }
.tgc-opt { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 640px) { .tgc-steps > li { padding-left: 40px; } }
/* посты */

.tgp-lock { font-size: 12.5px; color: var(--warn); }
.tgp-stars input { max-width: 180px; }
.tgp-check { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; }
.tgp-ai { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.tgp-ai .field .i { width: 14px; height: 14px; vertical-align: -2px; }
.tgp-caption { white-space: pre-wrap; font-size: 14px; line-height: 1.5; }

/* заявки */

/* Товары для меток (панель ролика) */
.prod-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.prod-row { display: flex; flex-direction: column; gap: 6px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 12px; }
.prod-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.prod-t b { font-weight: 600; font-size: 13.5px; }
.prod-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prod-q { display: flex; align-items: center; gap: 6px; }
.prod-q input { flex: 1 1 auto; min-width: 0; height: 32px; font-size: 12.5px; font-family: var(--mono, ui-monospace, monospace); }
.prod-none { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-2); }
.prod-none span { flex: 1 1 200px; }

/* ===== Лендинги (/admin/landings): разделы, графики, список страниц, боковая панель правки ===== */
.ld { display: flex; flex-direction: column; gap: 16px; max-width: 1200px; }
.ld .card { margin-bottom: 0; }
.ld-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ld-head h1 { margin: 0; }
.ld-head p { margin: 6px 0 0; font-size: 13px; }
.ld-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); }
.ld-seg a { padding: 6px 12px; border-radius: 8px; color: var(--ink-2); font-size: 13px; text-decoration: none; }
.ld-seg a:hover { color: var(--ink); text-decoration: none; }
.ld-seg a.on { background: var(--raise); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.ld-tabs { margin-bottom: 0; }
.ld-tabs .ld-hot { color: var(--bad); }
.ld-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ld-card-h h2 { margin: 0; font-size: 14.5px; }
.ld-card-h small { font-size: 12px; }
.ld-note { margin: 12px 0 0; }
.ld-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ld-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ld-kpi span { font-size: 12px; color: var(--mute); }
.ld-kpi b { font: 600 27px/1.05 "Geologica", var(--f-ui); letter-spacing: -.02em; white-space: nowrap; }
.ld-kpi small { font-size: 12px; color: var(--ink-2); }
.ld-kpi.bad b { color: var(--bad); }
.ld-grid2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; }
.ld-grid2.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ld-legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); }
.ld-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ld-chart { width: 100%; height: auto; display: block; }
.ld-chart .ld-grid { stroke: var(--line); }
.ld-chart .ld-axis { fill: var(--mute); font: 10.5px "Geologica", var(--f-ui); }
.ld-chart .ld-axis-c { fill: var(--ok); fill-opacity: .75; }
.ld-chart .ld-axis-x { fill: var(--ink-2); font-size: 11px; }
.ld-chart .ld-col { fill: var(--accent); fill-opacity: .45; }
.ld-chart .ld-col.last { fill-opacity: 1; }
.ld-chart .ld-line { fill: none; stroke: var(--ok); stroke-width: 2.2; stroke-linejoin: round; }
.ld-chart .ld-pt { fill: var(--ok); }
.ld-chart .ld-peak { fill: var(--ink); font: 600 11.5px "Geologica", var(--f-ui); }
.ld-chart .ld-peak.in { fill: #fff; }
.ld-bars { display: flex; flex-direction: column; gap: 9px; }
.ld-bar { display: grid; grid-template-columns: 156px minmax(0, 1fr) 66px; gap: 10px; align-items: center; font-size: 13px; }
.ld-lbl { display: flex; align-items: center; gap: 8px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-v { text-align: right; font-family: "Geologica", var(--f-ui); }
.ld-v small { display: block; font-size: 11px; color: var(--mute); }
.ld-track { width: 100%; height: 8px; display: block; }
.ld-track-bg { fill: var(--raise); }
.ld-stack { width: 100%; height: 12px; display: block; border-radius: 99px; margin-bottom: 14px; }
.ld-stack.sm { height: 6px; margin: 0 0 5px; }
.ld-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.ld-flag { width: 18px; height: 13px; border-radius: 3px; object-fit: cover; flex: none; }
.k-facebook { fill: #4f8dff; background: #4f8dff; } .k-instagram { fill: #e1468c; background: #e1468c; }
.k-youtube { fill: #ff4a4a; background: #ff4a4a; } .k-tiktok { fill: #39d5d0; background: #39d5d0; }
.k-telegram { fill: #2aabee; background: #2aabee; } .k-direct, .k-other { fill: #8a88a3; background: #8a88a3; }
.k-info, .k-views { fill: var(--accent); background: var(--accent); } .k-course { fill: var(--ok); background: var(--ok); }
.k-tip, .k-wallet { fill: var(--warn); background: var(--warn); }
.ld-funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ld-funnel > div { border-radius: 12px; background: var(--raise); padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ld-funnel span { font-size: 12px; color: var(--mute); }
.ld-funnel b { font: 600 21px "Geologica", var(--f-ui); }
.ld-funnel em { font-style: normal; font-size: 11.5px; color: var(--accent-2); }
.ld-line-text { margin: 0; font-size: 13px; color: var(--ink-2); }
.ld-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ld-chip { display: inline-flex; gap: 6px; align-items: center; height: 28px; padding: 0 11px; border-radius: 99px; background: var(--raise); font-size: 12.5px; color: var(--ink-2); }
.ld-chip b { color: var(--ink); font-family: "Geologica", var(--f-ui); }
.ld-sw { display: inline-flex; align-items: center; gap: 9px; background: none; border: 1px solid var(--line-2); border-radius: 99px; padding: 4px 12px 4px 5px; color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.ld-sw i { width: 34px; height: 20px; border-radius: 99px; background: var(--hover); position: relative; flex: none; transition: background .2s; }
.ld-sw i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-2); transition: transform .2s var(--ease); }
.ld-sw.on { color: var(--ok); border-color: rgba(67, 217, 155, .4); }
.ld-sw.on i { background: var(--ok); }
.ld-sw.on i::after { transform: translateX(14px); background: #fff; }
.ld-sw.only { border: 0; padding: 4px; }
/* список страниц */
.ld-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ld-search { flex: 1 1 240px; min-width: 0; height: 38px; }
.ld-filters { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.ld-filters button { height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); background: none; color: var(--ink-2); font-size: 12.5px; cursor: pointer; }
.ld-filters button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.ld-list { padding: 8px 16px 6px; }
.ld-row { display: grid; grid-template-columns: minmax(0, 2.1fr) 96px 80px minmax(0, 1fr) minmax(0, 1.15fr) 236px; gap: 14px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.ld-row-h { border-top: 0; padding: 6px 4px 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.ld-row.off .ld-who, .ld-row.off .ld-num, .ld-row.off .ld-ctr, .ld-row.off .ld-src { opacity: .45; }
.ld-row:target { background: var(--accent-soft); border-radius: 12px; }
.ld-who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ld-who .ava { width: 38px; height: 38px; }
.ld-who > div { min-width: 0; display: flex; flex-direction: column; }
.ld-who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-who a { font-size: 12px; color: var(--mute); display: inline-flex; gap: 4px; align-items: center; }
.ld-who a .i { width: 11px; height: 11px; }
.ld-who a:hover { color: var(--accent-2); }
.ld-num { font: 600 15px "Geologica", var(--f-ui); }
.ld-dim { font-weight: 500; color: var(--ink-2); }
.ld-ctr { display: flex; flex-direction: column; gap: 5px; font-family: "Geologica", var(--f-ui); }
.ld-ctr .ld-track { height: 5px; }
.ld-src small { font-size: 11.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.ld-acts { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.ld-acts form { margin: 0; }
.ld-links > summary { list-style: none; }
.ld-links > summary::-webkit-details-marker { display: none; }
.ld-menu { width: 340px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.ld-menu p { margin: 0 0 4px; }
.ld-mi { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ld-mi input { height: 32px; font: 12px "Geologica", var(--f-ui); color: var(--ink-2); min-width: 0; }
.ld-empty { padding: 14px 4px; margin: 0; }
/* продажи */
.ld-table { overflow-x: auto; }
.ld-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ld-table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 500; padding: 0 10px 10px; white-space: nowrap; }
.ld-table td { padding: 11px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.ld-row-acts { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.ld-row-acts form { margin: 0; }
.ld-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--raise); color: var(--ink-2); white-space: nowrap; }
.ld-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ld-pill.ok { background: var(--ok-soft); color: var(--ok); }
.ld-pill.bad { background: var(--bad-soft); color: var(--bad); }
.ld-pill.warn { background: var(--warn-soft); color: var(--warn); }
.ld-pill.run { background: var(--run-soft); color: var(--run); }
/* курс и цены, поддержать */
.ld-promo { padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; margin-bottom: 14px; }
.ld-promo b { color: var(--ink); }
.ld-promo.off { background: var(--raise); color: var(--ink-2); }
.ld-warn { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-size: 13px; }
.ld-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ld-tier { background: var(--raise); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; border: 1px solid transparent; min-width: 0; }
.ld-tier.main { border-color: var(--accent); }
.ld-tier-t { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--mute); }
.ld-price { display: flex; align-items: baseline; gap: 8px; }
.ld-price b { font: 600 30px/1 "Geologica", var(--f-ui); }
.ld-price s { color: var(--mute); font-family: "Geologica", var(--f-ui); }
.ld-checks { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); }
.ld-checks .ok::before { content: "✓"; color: var(--ok); margin-right: 7px; }
.ld-checks .no { color: var(--mute); }
.ld-checks .no::before { content: "—"; margin-right: 7px; }
.ld-kv { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13px; }
.ld-kv:first-of-type { border-top: 0; padding-top: 0; }
.ld-kv > span:first-child { color: var(--mute); }
.ld-kv code { background: none; padding: 0; font: 12.5px "Geologica", var(--f-ui); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-coins { display: flex; flex-wrap: wrap; gap: 8px; }
.ld-coin { display: inline-flex; gap: 8px; align-items: center; height: 34px; padding: 0 12px 0 5px; border-radius: 99px; background: var(--raise); font-size: 12.5px; color: var(--ink-2); }
.ld-coin i { min-width: 24px; height: 24px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; font: 700 9px "Geologica", var(--f-ui); font-style: normal; color: #0a0a0e; background: var(--ink-2); }
.ld-coin .coin-btc { background: #f7931a; } .ld-coin .coin-eth { background: #8c9cf0; } .ld-coin .coin-usdt { background: #26a17b; }
.ld-coin .coin-usdc { background: #2775ca; color: #fff; } .ld-coin .coin-bnb { background: #f3ba2f; } .ld-coin .coin-sol { background: #9f6bff; color: #fff; }
.ld-coin .coin-ton { background: #0098ea; color: #fff; } .ld-coin .coin-trx { background: #ff0013; color: #fff; }
/* боковая панель правки */
.ld-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 80; }
.ld-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(540px, 100%); background: var(--panel); border-left: 1px solid var(--line-2); z-index: 81;
  display: flex; flex-direction: column; animation: ld-in .26s var(--ease); box-shadow: -24px 0 60px rgba(0, 0, 0, .4); }
@keyframes ld-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.ld-dr-form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ld-dr-h { display: flex; gap: 12px; align-items: center; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.ld-dr-h .ava { width: 40px; height: 40px; }
.ld-dr-h > div { display: flex; flex-direction: column; min-width: 0; }
.ld-x { margin-left: auto; }
.ld-dr-tabs { display: flex; gap: 20px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.ld-dr-tabs button { background: none; border: 0; color: var(--mute); padding: 12px 0; border-bottom: 2px solid transparent; margin-bottom: -1px; font: inherit; font-weight: 550; cursor: pointer; }
.ld-dr-tabs button.on { color: var(--ink); border-color: var(--accent); }
.ld-dr-body { flex: 1; overflow-y: auto; padding: 18px 20px; min-height: 0; }
.ld-fields { display: flex; flex-direction: column; gap: 14px; }
.ld-fields p { margin: 0; }
.ld-fields .field small { margin-top: 2px; }
.ld-sub { margin: 8px 0 -4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); font-weight: 600; }
.ld-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ld-prefix { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); overflow: hidden; }
.ld-prefix span { padding-left: 12px; color: var(--mute); font-size: 13px; white-space: nowrap; }
.ld-prefix input { border: 0 !important; background: none !important; padding-left: 0 !important; flex: 1; min-width: 0; }
.ld-lang { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: center; }
.ld-lang b { font: 600 11px "Geologica", var(--f-ui); color: var(--mute); text-transform: uppercase; background: var(--raise); border-radius: 8px; height: 32px; display: grid; place-items: center; }
.ld-net > span { display: inline-flex; align-items: center; gap: 8px; }
.ld-ok { color: var(--ok); }
.ld-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.ld-mini div { background: var(--raise); border-radius: 12px; padding: 10px 12px; }
.ld-mini b { display: block; font: 600 18px "Geologica", var(--f-ui); }
.ld-mini span { font-size: 11.5px; color: var(--mute); }
.ld-dr-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }
@media (max-width: 1180px) {
  .ld-row { grid-template-columns: minmax(0, 2fr) 84px 70px minmax(0, 1fr) 236px; }
  .ld-row > .ld-src, .ld-row-h > :nth-child(5) { display: none; }
}
@media (max-width: 860px) {
  .ld-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ld-grid2, .ld-grid2.even, .ld-tiers { grid-template-columns: minmax(0, 1fr); }
  .ld-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ld-row { grid-template-columns: minmax(0, 1fr) 70px; }
  .ld-row > .ld-dim, .ld-row > .ld-ctr, .ld-row-h > :nth-child(3), .ld-row-h > :nth-child(4), .ld-row-h > :nth-child(6) { display: none; }
  .ld-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .ld-kv { grid-template-columns: minmax(0, 1fr) auto; }
  .ld-kv > span:first-child { grid-column: 1 / -1; }
  .ld-bar { grid-template-columns: 110px minmax(0, 1fr) 58px; }
  .ld-menu { width: min(340px, calc(100vw - 32px)); }
}

/* ===== Админка: обзор, ошибки, журнал, люди, группа, квота ===== */
.ld-kpi.warn b { color: var(--warn); }
a.ld-kpi.ad-link { color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
a.ld-kpi.ad-link:hover { border-color: var(--line-2); background: var(--raise); }
.ld-filters a { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-2); font-size: 12.5px; text-decoration: none; }
.ld-filters a:hover { color: var(--ink); text-decoration: none; }
.ld-filters a.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.ad-empty { display: flex; align-items: center; gap: 8px; margin: 0; }
.ad-empty .i { width: 16px; height: 16px; color: var(--ok); }
.ad-rows { display: flex; flex-direction: column; }
.ad-r { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 2px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13px; }
.ad-r:first-child { border-top: 0; padding-top: 0; }
a.ad-r:hover { text-decoration: none; }
a.ad-r:hover b { color: var(--accent-2); }
.ad-r-why { grid-column: 1 / -1; color: var(--ink-2); font-size: 12.5px; }
/* группы ошибок */
.eg-list { display: flex; flex-direction: column; }
.eg-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 2px; border-top: 1px solid var(--line); }
.eg-row:first-child { border-top: 0; padding-top: 2px; }
.eg-row.done { opacity: .7; }
.eg-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--raise); color: var(--ink-2); }
.eg-icon .i { width: 17px; height: 17px; }
.eg-icon.bad { background: var(--bad-soft); color: var(--bad); }
.eg-icon.warn { background: var(--warn-soft); color: var(--warn); }
.eg-icon.wait { background: var(--run-soft); color: var(--run); }
.eg-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.eg-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.eg-who .muted { font-size: 12.5px; }
.eg-n { font: 600 12px "Geologica", var(--f-ui); padding: 1px 8px; border-radius: 99px; background: var(--raise); color: var(--ink); }
.eg-why { font-size: 13px; color: var(--ink-2); }
.eg-meta { font-size: 12px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.eg-ids summary { cursor: pointer; color: var(--accent-2); list-style: none; }
.eg-ids summary::-webkit-details-marker { display: none; }
.eg-ids span { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-family: "Geologica", var(--f-ui); }
.eg-acts { display: flex; gap: 6px; align-items: center; }
.eg-acts form { margin: 0; }
/* журнал */
.au-secs { margin-top: -4px; }
.au-card { padding-top: 6px; }
.au-day { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 14px 2px 6px; border-bottom: 1px solid var(--line); }
.au-row { display: grid; grid-template-columns: 52px 190px minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.au-t { font: 500 12.5px "Geologica", var(--f-ui); color: var(--ink-2); }
.au-who { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.au-who b { font-weight: 550; overflow: hidden; text-overflow: ellipsis; }
.au-sys { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--raise); color: var(--mute); flex: none; }
.au-sys .i { width: 12px; height: 12px; }
.au-what { display: flex; align-items: center; gap: 0 6px; flex-wrap: wrap; min-width: 0; }
.au-sec { width: 7px; height: 7px; border-radius: 50%; background: var(--mute); flex: none; margin-right: 4px; }
.au-sec.s-jobs { background: var(--accent); } .au-sec.s-pubs { background: var(--run); } .au-sec.s-comments { background: #e1468c; }
.au-sec.s-access { background: var(--warn); } .au-sec.s-quota { background: var(--ok); } .au-sec.s-ideas { background: #39d5d0; }
.au-sec.s-library { background: var(--accent-2); } .au-sec.s-api { background: #8a88a3; }
.au-info { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-pager { display: flex; justify-content: center; gap: 10px; padding: 16px 0 6px; }
/* люди */
.pe-invite { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--ok-soft); border: 1px solid rgba(67, 217, 155, .3); }
.pe-invite > div { display: flex; flex-direction: column; }
.pe-invite input { height: 38px; font: 12.5px "Geologica", var(--f-ui); min-width: 0; }
.pe-layout { display: flex; flex-direction: column; gap: 16px; }
.pe-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pe-row { display: grid; grid-template-columns: minmax(0, 1.6fr) 180px 200px 140px 110px; gap: 12px; align-items: center; padding: 11px 2px; border-top: 1px solid var(--line); }
.pe-row-h { border-top: 0; padding-top: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.pe-row.off .pe-who { opacity: .5; }
.pe-row form { margin: 0; }
.pe-row select { width: 100%; height: 34px; font-size: 13px; }
.pe-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pe-who > div { display: flex; flex-direction: column; min-width: 0; }
.pe-who b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-who span { font-size: 12px; }
.pe-seen { font-size: 12.5px; color: var(--ink-2); }
.pe-act { text-align: right; }
.pe-groups { display: flex; flex-direction: column; gap: 8px; }
.pe-group { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 6px; align-items: center; margin: 0; }
.pe-group.new { grid-template-columns: minmax(0, 1fr) auto; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.pe-group input { height: 36px; min-width: 0; }
.pe-inv { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--line); }
.pe-inv:first-child { border-top: 0; padding-top: 0; }
.pe-inv > div { display: flex; flex-direction: column; font-size: 13px; }
.pe-inv > div span { font-size: 12px; }
.pe-inv form { margin: 0; }
.pe-inv.off > div { opacity: .55; }
/* группа */
.gr-run { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.gr-member { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 13.5px; }
.gr-member:first-child { border-top: 0; padding-top: 0; }
.gr-member.off b { opacity: .5; }
.gr-err { display: grid; grid-template-columns: 40px minmax(0, 220px) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13px; }
.gr-err:first-child { border-top: 0; padding-top: 0; }
.gr-err:hover { text-decoration: none; }
.gr-err:hover b { color: var(--accent-2); }
.gr-err img, .gr-ph { width: 40px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--raise); }
.gr-ph { display: grid; place-items: center; color: var(--mute); }
.gr-err > div { display: flex; flex-direction: column; min-width: 0; }
.gr-err > div span { font-size: 12px; }
.gr-err .ad-r-why { grid-column: auto; }
/* квота */
.qt-form { display: grid; grid-template-columns: 220px 130px 110px minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.qt-form .field { margin: 0; }
.qt-reqs { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.qt-req { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 2px; font-size: 13px; }
@media (max-width: 1100px) {
  .pe-side { grid-template-columns: minmax(0, 1fr); }
  .au-row { grid-template-columns: 48px 150px minmax(0, 1fr); }
  .au-info { grid-column: 2 / -1; }
}
@media (max-width: 860px) {
  .eg-row { grid-template-columns: 30px minmax(0, 1fr); }
  .eg-acts { grid-column: 2; }
  .pe-row { grid-template-columns: minmax(0, 1fr) 1fr; }
  .pe-row-h { display: none; }
  .pe-who { grid-column: 1 / -1; }
  .au-row { grid-template-columns: 44px minmax(0, 1fr); }
  .au-what, .au-info { grid-column: 2; }
  .gr-err { grid-template-columns: 40px minmax(0, 1fr); }
  .gr-err .ad-r-why, .gr-err .ld-pill { grid-column: 2; }
  .qt-form { grid-template-columns: 1fr 1fr; }
  .qt-form .grow, .qt-form button { grid-column: 1 / -1; }
  .pe-invite { grid-template-columns: minmax(0, 1fr); }
}

.gr-more { margin-top: 6px; }
.gr-more > summary { cursor: pointer; color: var(--accent-2); font-size: 13px; padding: 8px 2px; list-style: none; }
.gr-more > summary::-webkit-details-marker { display: none; }
.gr-more .gr-err:first-child { border-top: 1px solid var(--line); padding-top: 10px; }

/* ===== Telegram (/telegram): лента постов, новый пост, заявки, каналы, страница поста ===== */
.tg-ava { background: linear-gradient(140deg, #2aabee, #1e88c8) !important; }
.tg-ava .i { width: 55%; height: 55%; position: relative; z-index: 1; }
.tg-k { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--raise); color: var(--ink-2); flex: none; }
.tg-k .i { width: 14px; height: 14px; }
.tg-k.k-paid { background: var(--warn-soft); color: var(--warn); }
.tg-k.k-video_note { background: rgba(42, 171, 238, .16); color: #6cc7f5; }
.tg-k.k-video { background: var(--accent-soft); color: var(--accent-2); }
.tg-circle { width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; display: block; }
.tg-empty { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tg-empty > div { flex: 1 1 260px; }
.tg-empty p { margin: 2px 0 0; }
.tg-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 1fr); gap: 16px; align-items: start; }
.tg-sec { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 14px 2px 6px; border-bottom: 1px solid var(--line); }
.tg-sec:first-of-type { padding-top: 0; }
.tg-sec b { color: var(--ink-2); font-family: "Geologica", var(--f-ui); margin-left: 4px; }
.tg-post { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.tg-post:hover { text-decoration: none; background: rgba(var(--fg), .03); }
.tg-post:hover .tg-post-text { color: var(--ink); }
.tg-post-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tg-post-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; min-width: 0; }
.tg-post-top .tg-k { width: 22px; height: 22px; border-radius: 7px; }
.tg-post-top .tg-k .i { width: 12px; height: 12px; }
.tg-post-top .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-post-kind { font-weight: 600; white-space: nowrap; }
.tg-post-text { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-new { position: sticky; top: calc(var(--top) + 12px); }
.tg-form { display: flex; flex-direction: column; gap: 14px; }
.tg-form > p { margin: -4px 0 0; }
.tg-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.tg-kind { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--raise); cursor: pointer; transition: border-color .12s, background .12s; }
.tg-kind input { position: absolute; opacity: 0; pointer-events: none; }
.tg-kind b { font-size: 13px; font-weight: 600; margin-top: 4px; }
.tg-kind small { font-size: 11px; color: var(--mute); line-height: 1.3; }
.tg-kind:hover { border-color: color-mix(in srgb, var(--accent-2) 45%, transparent); }
.tg-kind:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.tg-kind:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.tg-src { display: flex; flex-direction: column; gap: 10px; }
.tg-drop { padding: 22px 16px; }
.tg-form:has(input[name=kind][value=text]:checked) .tg-src { display: none; }
.tg-form:not(:has(input[name=kind][value=text]:checked)) .tg-text { display: none; }
.tg-form > .btn { align-self: flex-start; }
.tg-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--ink-2); font-size: 13px; }
.tg-note .i { width: 16px; height: 16px; color: var(--warn); flex: none; margin-top: 2px; }
.tg-warn { margin: 8px 0 0 50px; font-size: 12.5px; color: var(--bad); }
.tg-jch { padding: 14px 2px; border-top: 1px solid var(--line); }
.tg-jch:first-child { border-top: 0; padding-top: 2px; }
.tg-jhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tg-jt { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; }
.tg-jt span { font-size: 12px; }
.tg-jhead form { margin: 0; }
.tg-jhead .ld-sw[disabled] { opacity: .45; cursor: not-allowed; }
.tg-reqs { margin: 10px 0 0 50px; display: flex; flex-direction: column; gap: 6px; }
.tg-req { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--raise); }
.tg-req > div { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.tg-req > div span { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-req form { margin: 0; }
.tg-req-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(42, 171, 238, .18); color: #6cc7f5; font-weight: 700; }
.tg-all { margin-top: 2px; }
.tg-dec { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 13px; }
.tg-dec:first-child { border-top: 0; padding-top: 0; }
.tg-dec .ld-pill { margin-left: auto; }
.tg-chs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tg-ch { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); min-width: 0; }
.tg-ch.off { opacity: .6; }
.tg-ch-h { display: flex; gap: 12px; align-items: center; min-width: 0; }
.tg-ch-h .ava { width: 40px; height: 40px; }
.tg-ch-h > div { display: flex; flex-direction: column; min-width: 0; }
.tg-ch-h b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-ch-h span { font-size: 12px; }
.tg-ch-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.tg-ch-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.tg-ch-link input { height: 32px; font: 12px "Geologica", var(--f-ui); min-width: 0; }
.tg-ch form { margin: 0; }
.tg-ch-bind select { width: 100%; }
.tg-howto { padding: 0; }
.tg-howto > summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; }
.tg-howto > summary::-webkit-details-marker { display: none; }
.tg-howto > summary .muted { margin-left: auto; font-size: 12px; }
.tg-howto[open] > summary { border-bottom: 1px solid var(--line); }
.tg-howto .tgc-steps { padding: 18px 20px 20px; }
/* страница поста */
.tgp-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tgp-title .ava { width: 46px; height: 46px; }
.tgp-title h1 { margin: 0; }
.tgp-title p { margin: 2px 0 0; }
.tgp-grid { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.tgp-grid.solo { grid-template-columns: minmax(0, 720px); }
.tgp-media { display: flex; flex-direction: column; gap: 8px; position: sticky; top: calc(var(--top) + 12px); }
.tgp-media img, .tgp-media video { width: 100%; border-radius: 18px; background: #000; max-height: 72vh; object-fit: contain; display: block; }
.tgp-media.k-video_note video { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
.tgp-lock { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; }
.tgp-lock .i { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.tgp-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tgp-card { display: flex; flex-direction: column; gap: 14px; }
.tgp-card .field small { margin-top: 2px; }
.tgp-p { margin: 0; }
.tgp-stars input { max-width: 200px; }
.tgp-check { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; }
.tgp-send { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.tgp-send > .btn { align-self: flex-start; }
.tgp-later { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.tgp-later .field { margin: 0; }
.tgp-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.tgp-foot form { margin: 0; }
.tgp-ai .ld-card-h { margin-bottom: 0; }
.tgp-ai .ld-card-h h2 { display: inline-flex; align-items: center; gap: 8px; }
.tgp-ai .ld-card-h .i { width: 16px; height: 16px; color: var(--accent-2); }
.tgp-ai-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.tgp-ai-row input { height: 40px; min-width: 0; }
@media (max-width: 1100px) { .tg-layout { grid-template-columns: minmax(0, 1fr); } .tg-new { position: static; order: -1; } }
@media (max-width: 760px) {
  .tgp-grid { grid-template-columns: minmax(0, 1fr); }
  .tgp-media { position: static; }
  .tg-reqs, .tg-warn { margin-left: 0; }
  .tg-req { grid-template-columns: 32px minmax(0, 1fr); }
  .tg-req form { grid-column: 2; }
}
.tg-hint { margin: -4px 0 0; font-size: 12.5px; color: var(--warn); }

/* Telegram: оформление подписи и превью */
.tgf { display: flex; flex-direction: column; gap: 8px; }
.tgf-h { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tgf-bar { display: flex; gap: 6px; flex-wrap: wrap; }
.tgf-bar button { height: 30px; min-width: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--hover);
  color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.tgf-bar button:hover { border-color: var(--ink-2); }
.tgf-prev { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.tgf-prev-h { font-size: 12px; color: var(--mute); }
.tg-bubble { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.45; padding: 10px 14px; border-radius: 14px 14px 14px 4px;
  background: #182533; color: #f5f7fa; max-width: 520px; }
.tg-bubble b { font-weight: 650; }
.tg-bubble blockquote { margin: 4px 0; padding: 4px 10px; border-left: 3px solid #6ab3f3; background: rgba(106, 179, 243, .1); border-radius: 4px 8px 8px 4px; }
.tg-spoiler { background: rgba(160, 170, 185, .35); color: transparent; border-radius: 4px; cursor: pointer; text-shadow: 0 0 8px rgba(245, 247, 250, .7); }
.tg-spoiler.open, .tgf-bar .tg-spoiler { color: inherit; text-shadow: none; }
.tgf-bar .tg-spoiler { background: rgba(160, 170, 185, .25); padding: 0 4px; }
.tgp-caption.tg-bubble { max-width: none; }

/* Товары, закреплённые за образом */
.prod-pin { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: 14px;
  border: 1px solid var(--line-2); background: var(--hover); }
.prod-pin-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.prod-pin .prod-list { margin-bottom: 0; }
.prod-pin .prod-row { background: var(--bg); }
.prod-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lp-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lp-title h1 { margin: 0; }
.lp-title p { margin: 2px 0 0; }
.lp-title code { font-size: 12px; }
.lp-cover { width: 64px; height: 80px; border-radius: 12px; overflow: hidden; flex: none; }
.lp-cover img { width: 100%; height: 100%; object-fit: cover; }
.lp-cover .look-ctl { display: none; }
.lp-form { display: flex; flex-direction: column; gap: 14px; max-width: 860px; }
.lp-help { margin: 0; }
.lp-rows { display: flex; flex-direction: column; gap: 8px; }
.lp-row { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
.lp-row-h { font-size: 12px; color: var(--mute); }
.lp-row input { width: 100%; min-width: 0; height: 36px; }
.lp-url { display: flex; gap: 6px; align-items: center; min-width: 0; }
.lp-url input { font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; }
.lp-del { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; cursor: pointer; color: var(--mute); }
.lp-del input { position: absolute; opacity: 0; pointer-events: none; }
.lp-del:has(input:checked) { background: var(--bad-soft, rgba(240, 80, 80, .15)); color: var(--bad); }
.lp-row:has(.lp-del input:checked) input[type=text], .lp-row:has(.lp-del input:checked) input:not([type]) { text-decoration: line-through; opacity: .55; }
.lp-new input { border-style: dashed; }
.lp-unpin { margin-top: 12px; }
@media (max-width: 640px) {
  .lp-row { grid-template-columns: minmax(0, 1fr) 36px; grid-template-areas: "n d" "u u"; }
  .lp-row > input { grid-area: n; } .lp-row > .lp-url { grid-area: u; } .lp-row > .lp-del, .lp-row > span:last-child { grid-area: d; }
  .lp-row-h { display: none; }
}
.tgp-check { flex-direction: row; }            /* общий label — столбик; переключатель должен стоять рядом с подписью */
.lp-help { margin: 0 0 4px; }

/* --- Ограничения (/limits) --- */
.lm-bar { display: flex; align-items: center; gap: 10px; padding: 10px 24px; background: var(--bad-soft); border-bottom: 1px solid rgba(255, 95, 115, .35); color: #ffd5da; font-size: 13.5px; text-decoration: none; }
.lm-bar .i { width: 18px; height: 18px; flex: none; color: var(--bad); }
.lm-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-bar b { font-weight: 600; }
.lm-bar i { font-style: normal; font-weight: 600; border: 1px solid rgba(255, 143, 157, .5); border-radius: 9px; padding: 6px 12px; flex: none; }
.lm-bar:hover i { background: rgba(255, 95, 115, .18); }
.lm-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lm-sum { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.lm-sum p { margin: 6px 0 0; font-size: 13px; }
.lm-list { display: flex; flex-direction: column; gap: 10px; }
.lm-list a.lm-row { display: flex; flex-direction: row; align-items: center; gap: 16px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; animation: none; text-decoration: none; color: inherit; transition: border-color .15s var(--ease), background .15s var(--ease); }

.lm-list a.lm-row:hover { border-color: var(--line-2); background: var(--raise); }
.lm-list a.lm-row.sev-urgent { border-color: rgba(255, 95, 115, .35); }
.lm-row.closed { opacity: .72; }
.lm-thumb { position: relative; width: 54px; height: 96px; flex: none; border-radius: 8px; background: var(--hover); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.lm-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lm-thumb.lg { width: 72px; height: 128px; }
.lm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.lm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; color: var(--ink-2); }
.lm-meta > span + span:not(.ld-pill)::before { content: "·"; margin-right: 10px; color: var(--mute); }
.lm-title { font-size: 15.5px; font-weight: 600; }
.lm-sub { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.lm-sub i { font: 600 13px "Geologica", var(--f-ui); font-style: normal; color: var(--ink); }
.lm-why, .lm-do { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.lm-you { color: var(--warn); }
.lm-ai { color: var(--ok); }
.lm-ok { color: var(--run); }
.lm-go { flex: none; }
.lm-back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; text-decoration: none; }
.lm-back .i { width: 14px; height: 14px; }
.lm-case h1 { margin-top: 10px; font-size: 22px; }
.lm-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.lm-done { background: var(--ok); border-color: var(--ok); color: #04140d; font-weight: 600; }
.lm-cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.lm-col { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.lm-side { flex: 1 1 280px; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.lm-quote { margin: 0; padding: 14px 16px; background: var(--raise); border-radius: 10px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.lm-quote.none { color: var(--warn); }
.lm-mean { margin: 12px 0 0; color: var(--ink-2); line-height: 1.5; font-size: 13.5px; }
.lm-mean b { color: var(--ink); font-weight: 600; }
.lm-case section.lm-post { display: flex; flex-direction: row; gap: 16px; align-items: center; }
.lm-post b { display: block; margin: 4px 0; font-weight: 600; overflow-wrap: anywhere; }
.lm-post a { font-size: 13px; }
.lm-legend { display: inline-flex; gap: 6px; flex-wrap: wrap; color: var(--ink-2); }
.lm-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lm-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--raise); border-radius: 10px; }
.lm-steps li.done p { color: var(--mute); text-decoration: line-through; }
.lm-steps p { margin: 4px 0 0; line-height: 1.45; }
.lm-check { width: 24px; height: 24px; flex: none; border-radius: 7px; border: 1.5px solid var(--line-2); background: none; color: #04140d; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.lm-steps li.done .lm-check { background: var(--ok); border-color: var(--ok); }
.lm-check .i { width: 14px; height: 14px; }
.lm-check:disabled { cursor: default; opacity: .6; }
.lm-who { font-size: 11.5px; font-weight: 600; }
.lm-who.w-claude { color: var(--ok); }
.lm-who.w-ok { color: var(--run); }
.lm-who.w-you { color: var(--warn); }
.lm-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.lm-facts dt { font-size: 12px; color: var(--mute); }
.lm-facts dd { margin: 2px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.lm-owner { margin: 0 0 12px; color: var(--ink-2); }
.lm-wide { width: 100%; justify-content: center; }
.lm-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.lm-log time { display: block; font: 500 11.5px "Geologica", var(--f-ui); color: var(--mute); }
@media (max-width: 720px) {
  .lm-bar { padding: 10px 14px; }
  .lm-bar i { display: none; }
  .lm-kpis { grid-template-columns: minmax(0, 1fr); }
  .lm-list a.lm-row { flex-wrap: wrap; }
  .lm-go { width: 100%; justify-content: center; }
  .lm-facts { grid-template-columns: minmax(0, 1fr); }
  .lm-side { max-width: none; }
}

/* лендинги → «Поддержать»: сбор на цель */
.ld-fund-st { display: flex; align-items: center; gap: 10px; }
.ld-fund-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 2px 0 10px; }
.ld-fund-top b { font: 600 30px/1.05 "Geologica", var(--f-ui); letter-spacing: -.02em; }
.ld-fund-top span { font-size: 13px; color: var(--ink-2); }
.ld-fund .ld-track { height: 10px; margin-bottom: 6px; }
.ld-fund-txt { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 4px 14px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13px; }
.ld-fund-txt p { margin: 0; line-height: 1.5; color: var(--ink-2); white-space: pre-line; }
.ld-fund-txt .ld-pill { grid-column: 2; justify-self: start; }
.ld-fund-add { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 12px; }
.ld-fund-chars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
@media (max-width: 640px) {
  .ld-fund-txt, .ld-fund-add { grid-template-columns: 1fr; }
  .ld-fund-txt .ld-pill { grid-column: 1; }
}

/* длинное видео: полоска частей на карточке и список частей на странице ролика */
.parts-bar { display: flex; gap: 3px; width: min(150px, 80%); margin: 2px 0; }
.parts-bar i { flex: 1 1 0; height: 5px; border-radius: 3px; background: rgba(236, 232, 255, .16); }
.parts-bar i.pk-ok { background: var(--ok); }
.parts-bar i.pk-run { background: var(--run); }
.parts-bar i.pk-bad { background: var(--bad); }
.long-parts h3 { margin-bottom: 10px; }
.lpt { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.lpt-row { display: grid; grid-template-columns: 28px 96px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 11px; border: 1px dashed var(--line-2); font-size: 13px; }
.lpt-row > a { font-size: 12.5px; white-space: nowrap; }
.lpt-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(236, 232, 255, .06); color: var(--mute); font: 600 11.5px/1 var(--f-mono); }
.lpt-range { color: var(--ink-2); font-size: 12px; }
.lpt-st { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lpt-row.pk-ok { border-style: solid; border-color: transparent; background: var(--raise); }
.lpt-row.pk-ok .lpt-n { background: var(--ok-soft); color: var(--ok); }
.lpt-row.pk-run { border-style: solid; border-color: rgba(98, 170, 255, .3); background: var(--run-soft); }
.lpt-row.pk-run .lpt-n { background: var(--run-soft); color: var(--run); }
.lpt-row.pk-bad { border-style: solid; border-color: rgba(255, 95, 115, .35); background: var(--bad-soft); }
.lpt-row.pk-bad .lpt-n { background: var(--bad-soft); color: var(--bad); }
.lpt-glue { grid-template-columns: 28px minmax(0, 1fr); border-style: solid; border-color: color-mix(in srgb, var(--accent) 25%, transparent); background: var(--accent-soft); }
.lpt-glue .i { width: 20px; height: 20px; color: var(--accent-2); justify-self: center; }
.lpt-glue .lpt-st, .lpt-glue > span { white-space: normal; }
.q-parts { width: 120px; margin: 7px 0 0 auto; }

/* часовой пояс: вопрос «показывать по поясу устройства?» и выбор пояса */
.tz-ask { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 24px; background: var(--run-soft); border-bottom: 1px solid rgba(98, 170, 255, .35); font-size: 13.5px; }
.tz-ask[hidden] { display: none; }
.tz-ask > .i { width: 18px; height: 18px; flex: none; color: var(--run); }
.tz-ask-t { flex: 1 1 240px; min-width: 0; }
.tz-ask-b { display: flex; gap: 8px; flex-wrap: wrap; }
.tz-sel { max-width: 100%; min-width: 0; }
.tz-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.tz-form .field { flex: 1 1 260px; min-width: 0; margin: 0; }
.tz-form .field select { width: 100%; }
.tz-pick { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--ink-2); min-width: 0; }
.tz-pick select { height: 36px; border-radius: 10px; max-width: 260px; }
.tz-note { color: var(--mute); font-size: 12.5px; }
@media (max-width: 600px) { .tz-ask { padding: 10px 16px; } .tz-pick { width: 100%; } .tz-pick select { max-width: none; flex: 1 1 auto; } }

/* ---------- сети: Threads, X, Pinterest, Telegram ---------- */
.s-threads, .s-twitter { background: #111116; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.s-pinterest { background: #e60023; } .s-telegram { background: #2aabee; }

/* окно публикации: сети с состояниями */
.nets-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
.nets-h .sub-h { margin: 0; flex: 1 1 auto; min-width: 0; }
.nets-when { color: var(--mute); font-size: 12px; }
.net-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.net-opt { display: flex; flex-direction: row; justify-content: flex-start; text-align: left; align-items: center; gap: 10px; min-width: 0; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--raise); cursor: pointer; transition: border-color .12s, background .12s; }
.net-opt input { width: 17px; height: 17px; margin: 0; flex: none; accent-color: var(--accent); }
.net-opt .net { width: 24px; height: 24px; border-radius: 7px; }
.net-opt .no-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; flex: 1 1 auto; }
.net-opt .no-t b { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-opt .no-t small { color: var(--mute); font-size: 12px; overflow-wrap: anywhere; }
.net-opt.st-ok .no-t small { color: var(--ok); }
.net-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.net-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.net-opt.st-off, .net-opt.st-unfit { border-style: dashed; background: transparent; cursor: default; }
.net-opt.st-off .net, .net-opt.st-unfit .net, .net-opt.st-broken .net { filter: grayscale(1); opacity: .5; }
.net-opt.st-off b, .net-opt.st-unfit b { color: var(--ink-2); }
.net-opt.st-broken { border-color: rgba(255, 191, 71, .45); background: var(--warn-soft); cursor: default; }
.net-opt .w, .cn-events .w { color: var(--warn); font-weight: 600; }
.net-opt .link { font-size: 12px; padding: 0; }
.net-opt .was { margin-left: auto; }
.net-help { margin: 8px 0 2px; padding: 12px 14px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); font-size: 13px; }
.net-help ol { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; color: var(--ink-2); }
.net-help p { margin: 6px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.cap-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.cnt-l { font: 500 11.5px/1.4 var(--f-mono); color: var(--mute); font-style: normal; white-space: nowrap; }
.cnt-l.over { color: var(--bad); }
.pin-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pin-field .field { margin: 0 0 8px; min-width: 0; }
.pin-field .field input, .pin-field .field textarea { width: 100%; }
.pin-link .mono { overflow-wrap: anywhere; }
.tg-silent { margin-top: 6px; }
@media (max-width: 600px) {
  .net-grid, .pin-row { grid-template-columns: minmax(0, 1fr); }
  .nets-h .btn { margin-left: auto; }
}

/* страница «Подключения» */
.cn-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.cn-actions form { margin: 0; }
.cn-card { padding: 6px 14px 12px; }
.cn-row { display: grid; grid-template-columns: minmax(150px, 1.6fr) repeat(8, minmax(0, 1fr)) 40px; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); }
.cn-row.focus { background: var(--accent-soft); border-radius: 10px; }
.cn-head { min-height: 44px; font-size: 11px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.cn-h { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cn-h .net { width: 18px; height: 18px; }
.cn-h b { font-weight: 600; }
.cn-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cn-who > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.cn-who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-who small { color: var(--mute); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn-cell { display: flex; justify-content: center; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink-2); border-radius: 10px; }
.cn-cell:hover, .cn-cell:focus-visible { background: var(--hover); }
.cn-cell .cn-l { display: none; }
.cn-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.cn-dot.ok, .st-ok .cn-dot, .st-unfit .cn-dot { background: var(--ok); }
.cn-dot.off, .st-off .cn-dot { border: 1.5px dashed var(--mute); box-sizing: border-box; }
.cn-dot.broken, .st-broken .cn-dot { background: var(--warn); }
.cn-one { margin: 0; display: flex; justify-content: flex-end; }
.cn-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 12px; font-size: 12.5px; color: var(--ink-2); }
.cn-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cn-events li { padding: 4px 0; font-size: 13.5px; }
.cn-events .ok-t { color: var(--ok); font-weight: 600; }
.cn-help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 10px; }
.cn-help-grid b { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.cn-help-grid p { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; }
.cn-help-grid > div:target { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 860px) {
  .cn-head { display: none; }
  .cn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 0; }
  .cn-row.cn-head { display: none; }
  .cn-who { flex: 1 1 calc(100% - 52px); }
  .cn-one { flex: 0 0 40px; order: 0; }
  .cn-cell { order: 1; flex: 0 1 auto; justify-content: flex-start; gap: 6px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 99px; font-size: 12.5px; }
  .cn-cell .cn-l { display: inline-flex; align-items: center; gap: 6px; }
  .cn-cell .cn-l .net { width: 16px; height: 16px; border-radius: 5px; }
  .cn-cell.st-off { opacity: .7; border-style: dashed; }
  .cn-cell.st-broken { border-color: rgba(255, 191, 71, .5); color: var(--warn); }
  .cn-actions { justify-content: flex-start; }
}

/* Telegram → автопосты */
.ta-pick { display: flex; align-items: flex-end; gap: 10px; margin: 4px 0 14px; max-width: 520px; }
.ta-pick .field { flex: 1 1 auto; margin: 0; min-width: 0; }
.ta-pick select { width: 100%; }
.ta-layout { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.ta-kinds { flex: 999 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ta-kind { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 15px; border: 1px solid var(--line-2); background: var(--raise); cursor: pointer; font-size: 13.5px; font-weight: 400; color: var(--ink); }
.ta-kind:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ta-kind.off { opacity: .6; cursor: default; border-style: dashed; background: transparent; }
.ta-kh { display: flex; align-items: center; gap: 10px; }
.ta-kh input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.ta-kh b { font-size: 15px; font-weight: 600; }
.ta-soon { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--mute); text-transform: uppercase; letter-spacing: .07em; }
.ta-kt { color: var(--ink-2); line-height: 1.55; }
.ta-kind input.ta-num, .ta-rules input.ta-num { width: 76px; height: 34px; padding: 0 8px; border-radius: 9px; display: inline-block; flex: none; vertical-align: middle; }
.ta-kind input.ta-time, .ta-rules input.ta-time { width: 128px; height: 34px; padding: 0 8px; border-radius: 9px; display: inline-block; flex: none; vertical-align: middle; }
.ta-kt select { height: 34px; padding: 0 30px 0 10px; line-height: 32px; border-radius: 9px; display: inline-block; width: auto; min-width: 150px; max-width: 100%; vertical-align: middle; }
.ta-side { flex: 1 1 320px; min-width: 0; max-width: 100%; display: flex; flex-direction: column; gap: 14px; }
.ta-h { margin: 0 0 8px; font-size: 11px; font-weight: 600; color: var(--ink-2); text-transform: uppercase; letter-spacing: .09em; }
.ta-rules { display: flex; flex-direction: column; gap: 10px; }
.ta-row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 400; color: var(--ink-2); flex-wrap: wrap; }
.ta-pair { display: inline-flex; align-items: center; gap: 6px; }
.ta-save { align-self: flex-start; }
.ta-runs li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.ta-when { color: var(--ink-2); min-width: 104px; font-size: 12.5px; }
.ta-what { flex: 1 1 120px; min-width: 0; }
.ta-st { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--line); color: var(--ink-2); }
.ta-run.st-planned .ta-st { background: var(--warn-soft); color: var(--warn); }
.ta-run.st-sent .ta-st { background: var(--ok-soft); color: var(--ok); }
.ta-run.st-failed .ta-st { background: var(--bad-soft); color: var(--bad); }
.ta-open { font-size: 12.5px; }
@media (max-width: 700px) { .ta-kinds { grid-template-columns: minmax(0, 1fr); } .ta-pick { max-width: none; } }

.tg-chan { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; margin-top: 8px; }
.tg-chan .field { flex: 1 1 260px; min-width: 0; margin: 0; }
.tg-chan select { width: 100%; }

/* ======================================================================
   Меню 2.0 (20.11.2026): группы, закреплённое, узкое меню с выезжающими группами,
   лист «Ещё» на телефоне и в Telegram, быстрый поиск Ctrl+K. Разметка — templates/_nav.html.
   ====================================================================== */
.side { gap: 0; }
.side-top { position: relative; }
.collapse.expand { display: none; }
.side-search { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; margin-bottom: 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--mute); font: 13px var(--f-ui); cursor: pointer; white-space: nowrap; transition: border-color .15s, color .15s; }
.side-search .i { width: 16px; height: 16px; }
.side-search span { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.side-search:hover { border-color: var(--line-2); color: var(--ink-2); }
.side { overflow: hidden; }
.nav { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
.nav::-webkit-scrollbar { display: none; }
:root { --side: 264px; }
.pal-in input, .pal-in input:focus, .pal-in input:focus-visible { outline: none; border: 0; box-shadow: none; background: none; height: auto; padding: 0; }
.nav-pins-h { display: flex; align-items: center; gap: 6px; padding-top: 6px; }
.nav-pins-h .i { width: 12px; height: 12px; }
.nav-pins-n { margin-left: auto; font-style: normal; text-transform: none; letter-spacing: 0; font-weight: 500; }
.nav-pins { display: flex; flex-direction: column; gap: 1px; padding-bottom: 8px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.nav-pins-empty { display: none; margin: 2px 10px 4px; font-size: 12px; color: var(--mute); line-height: 1.4; white-space: normal; }
.nav-pins:not(:has(.nvw)) .nav-pins-empty { display: block; }
.nvw { position: relative; display: flex; align-items: center; gap: 2px; }
.nvw .nv { flex: 1; min-width: 0; }
.nv .lb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.star { flex: none; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border-radius: 7px; border: 0; background: none; color: var(--mute); cursor: pointer; opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.star .i { width: 15px; height: 15px; transition: transform .2s var(--ease), fill .2s; }
.nvw:hover .star, .star:focus-visible, .star.on { opacity: 1; }
.star:hover { background: var(--hover); color: var(--ink); }
.star.on, .top-pin.on { color: var(--warn); }
.star.on .i, .top-pin.on .i { fill: var(--warn); }
.star:active .i, .top-pin:active .i { transform: scale(.8); }
.pop .i { animation: starPop .5s var(--ease); }
@keyframes starPop { 0% { transform: scale(.6) rotate(-25deg); } 55% { transform: scale(1.35) rotate(8deg); } 100% { transform: none; } }
.top-pin { color: var(--mute); }
.top-pin .i { width: 18px; height: 18px; }
.top-search { display: none; }
.cnt.bad { background: var(--bad-soft); color: var(--bad); }
/* счётчики в меню — маленькие, как метка, а не кнопка */
.nav .cnt, .sgrp-items .cnt, .mtile > .cnt, .me-menu .cnt { min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; line-height: 18px; border-radius: 99px; flex: none; align-self: center; }
.cnt.hot { background: var(--live-soft); color: var(--live); }

/* группы: плавно раскрываются, пункты выезжают лесенкой */
.ngrp { position: relative; }
.ngrp-h, .sgrp-h { display: flex; align-items: center; gap: 12px; width: 100%; height: 38px; padding: 0 10px 0 11px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: 600 14px/1 var(--f-ui); cursor: pointer; text-align: left; white-space: nowrap; transition: background .12s, color .12s; }
.ngrp-h:hover { background: var(--hover); color: var(--ink); }
.ngrp-h .lb, .sgrp-h .lb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ngrp-h .i { color: var(--mute); }
.ngrp-h > .i:last-child, .sgrp-h > .i:last-child { width: 15px; height: 15px; color: var(--mute); transition: transform .32s var(--ease); }
.ngrp.open > .ngrp-h > .i:last-child, .sgrp.open > .sgrp-h > .i:last-child { transform: rotate(180deg); }
.ngrp.open > .ngrp-h, .sgrp.open > .sgrp-h { color: var(--ink); }
.ngrp-b { transition: opacity .2s; }
.ngrp.open .ngrp-b, .sgrp.open .ngrp-b { opacity: 0; }
.ngrp-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .34s var(--ease); }
.ngrp.open > .ngrp-body, .sgrp.open > .ngrp-body { grid-template-rows: 1fr; }
.ngrp-in { overflow: hidden; min-height: 0; }
.ngrp-fly-h { display: none; }
.ngrp-items { position: relative; display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 18px; padding-left: 6px; }
.ngrp-items .nv { gap: 10px; padding: 0 8px 0 10px; font-size: 13.5px; }
.ngrp-items::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 1px; background: linear-gradient(var(--accent), var(--line)); transform-origin: top; transform: scaleY(0); transition: transform .45s var(--ease); }
.ngrp.open .ngrp-items::before { transform: scaleY(1); }
.ngrp-items .nv.on::before { left: -7px; }
.ngrp-items .nvw, .sgrp-items a { opacity: 0; transform: translateY(-6px); transition: opacity .26s ease, transform .32s var(--ease); }
.ngrp.open .ngrp-items .nvw, .sgrp.open .sgrp-items a { opacity: 1; transform: none; }
.ngrp.open .ngrp-items .nvw:nth-child(2), .sgrp.open .sgrp-items a:nth-child(2) { transition-delay: .04s; }
.ngrp.open .ngrp-items .nvw:nth-child(3), .sgrp.open .sgrp-items a:nth-child(3) { transition-delay: .08s; }
.ngrp.open .ngrp-items .nvw:nth-child(4), .sgrp.open .sgrp-items a:nth-child(4) { transition-delay: .12s; }
.ngrp.open .ngrp-items .nvw:nth-child(n+5), .sgrp.open .sgrp-items a:nth-child(n+5) { transition-delay: .16s; }
.nvw[data-fk^="p:"] { will-change: transform; }

/* карточка профиля внизу меню */
.side-foot { margin-top: 0; padding-top: 10px; border-top: 1px solid var(--line); position: relative; }
.me { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.me > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.me > .i:last-child { color: var(--mute); }
.me-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); background: var(--raise); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px; box-shadow: 0 24px 60px -20px #000; z-index: 50; animation: popUp .18s var(--ease); }
.me-menu[hidden] { display: none; }
.me-menu a, .me-menu button { display: flex; align-items: center; gap: 11px; width: 100%; height: 38px; padding: 0 10px; border-radius: 9px; color: var(--ink-2); font: 500 14px var(--f-ui); background: none; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap; }
.me-menu a:hover, .me-menu button:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.me-menu .cnt { margin-left: auto; }
.me-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.me-menu form { margin: 0; }
@keyframes popUp { from { opacity: 0; transform: translateY(6px) scale(.98); } }

/* узкое меню: только иконки, группа выезжает сбоку */
.app.mini .brand-t, .app.mini .new-btn span, .app.mini .new-btn kbd, .app.mini .side-search span, .app.mini .side-search kbd,
.app.mini .nav-h, .app.mini .nv .lb, .app.mini .nv .cnt, .app.mini .star, .app.mini .ngrp-h .lb, .app.mini .ngrp-h > .i:last-child,
.app.mini .me > span:nth-child(2), .app.mini .me > .i:last-child, .app.mini .nav-pins-empty, .app.mini .collapse:not(.expand) { display: none; }
.app.mini .collapse.expand { display: grid; position: static; margin: 0 auto 8px; }
.app.mini .brand { justify-content: center; padding-inline: 0; }
.app.mini .new-btn, .app.mini .side-search { width: 44px; margin-inline: auto; justify-content: center; padding: 0; }
.app.mini .nav-pins { align-items: center; padding-top: 6px; }
.app.mini .nvw { justify-content: center; }
.app.mini .nv, .app.mini .ngrp-h { width: 44px; justify-content: center; padding: 0; margin: 0 auto; position: relative; }
.app.mini .ngrp-b { position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 9.5px; opacity: 1 !important; }
.app.mini .ngrp.has-on > .ngrp-h { background: var(--accent-soft); }
.app.mini .ngrp.has-on > .ngrp-h .i { color: var(--accent-2); }
.app.mini .ngrp > .ngrp-body { display: none; }
.app.mini .ngrp.fly > .ngrp-h { background: var(--hover); color: var(--ink); }
.app.mini .ngrp.fly > .ngrp-body { display: block; position: fixed; left: calc(var(--side-mini) + 8px); top: var(--fly-top, 120px); width: 260px; max-height: calc(100vh - 24px); overflow-y: auto; background: var(--raise); border: 1px solid var(--line-2); border-radius: 14px; padding: 6px; box-shadow: 0 24px 60px -20px #000, 0 0 0 1px rgba(0, 0, 0, .4); z-index: 60; animation: flyIn .22s var(--ease); }
.app.mini .ngrp.fly .ngrp-fly-h { display: block; padding: 6px 10px 8px; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--mute); font-weight: 650; }
.app.mini .ngrp.fly .ngrp-items { margin: 0; padding: 0; }
.app.mini .ngrp.fly .ngrp-items::before { display: none; }
.app.mini .ngrp.fly .nvw { opacity: 1; transform: none; justify-content: flex-start; }
.app.mini .ngrp.fly .nv { width: auto; justify-content: flex-start; padding: 0 11px; margin: 0; }
.app.mini .ngrp.fly .nv .lb { display: block; }
.app.mini .ngrp.fly .nv .cnt { display: inline-grid; }
.app.mini .ngrp.fly .star { display: grid; }
.app.mini .ngrp.fly .nv.on::before { display: none; }
.app.mini .me { justify-content: center; }
.app.mini .me-menu { right: auto; width: 240px; }
@keyframes flyIn { from { opacity: 0; transform: translateX(-8px) scale(.98); } }

/* быстрый поиск */
.pal { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.pal[hidden] { display: none; }
.pal-scrim { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .18s ease; }
.pal-box { position: relative; width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; background: var(--raise); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 40px 90px -30px #000; overflow: hidden; animation: palIn .2s var(--ease); }
.pal-in { flex: none; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--mute); }
.pal-in input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); font: 16px var(--f-ui); }
.pal-in input::-webkit-search-cancel-button { display: none; }
.pal-list { overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.pal-h { padding: 8px 10px 6px; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--mute); font-weight: 650; }
.pal-it { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; cursor: pointer; }
.pal-it:hover { text-decoration: none; }
.pal-it.on { background: var(--accent-soft); color: var(--ink); }
.pal-it .lb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-it .hint { font-size: 12px; color: var(--mute); white-space: nowrap; }
.pal-it mark { background: none; color: var(--accent-2); font-weight: 700; }
.pal-it .pal-ava { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; background: var(--hover); }
.pal-it .pal-star { width: 14px; height: 14px; color: var(--warn); fill: var(--warn); }
.pal-empty { padding: 16px 12px; color: var(--mute); font-size: 13px; }
.pal-foot { flex: none; display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--mute); }
@keyframes palIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

/* лист «Ещё» (телефон, Telegram) */
.msheet { position: fixed; inset: 0; z-index: 70; }
.msheet[hidden] { display: none; }
.msheet-scrim { position: absolute; inset: 0; background: var(--scrim); animation: fadeIn .2s ease; }
.msheet-p { position: absolute; left: 0; right: 0; bottom: 0; max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px)); overflow-y: auto; overscroll-behavior: contain; background: var(--panel); border-radius: 22px 22px 0 0; border-top: 1px solid var(--line-2); padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(92px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); box-shadow: 0 -30px 80px -30px #000; animation: sheetUp .36s var(--ease); }
.msheet.closing .msheet-p { animation: sheetDown .24s ease forwards; }
.msheet.closing .msheet-scrim { animation: fadeOut .24s ease forwards; }
@keyframes sheetUp { from { transform: translateY(60px); opacity: .3; } }
@keyframes sheetDown { to { transform: translateY(100%); } }
body.sheet-open { overflow: hidden; }
body.sheet-open .tabbar { z-index: 75; }
.msheet-grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line-2); margin: 8px auto 12px; cursor: pointer; }
.msheet-me { display: flex; align-items: center; gap: 10px; padding: 0 0 12px; }
.msheet-me .t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.msheet-me b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msheet-me small { color: var(--mute); font-size: 11.5px; }
.msheet-me form { margin: 0; }
.msheet-search { height: 44px; margin-bottom: 14px; }
.msheet-h { display: flex; align-items: center; justify-content: space-between; min-height: 30px; margin: 4px 0 8px; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--mute); font-weight: 650; }
.msheet-all { margin-top: 18px; margin-bottom: 0; }
.linkish { background: none; border: 0; padding: 6px 0; color: var(--accent-2); font: 600 13px var(--f-ui); text-transform: none; letter-spacing: 0; cursor: pointer; }
.msheet-hint { display: none; margin: -2px 0 12px; font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.mtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mtile { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 74px; padding: 12px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); color: var(--ink); font: 600 12.5px/1.25 var(--f-ui); text-decoration: none; text-align: left; touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mtile:hover { text-decoration: none; }
.mtile .i { color: var(--accent-2); }
.mtile > .cnt { position: absolute; top: 10px; right: 10px; margin: 0; }
.mtile.add { border-style: dashed; background: none; color: var(--mute); align-items: center; justify-content: center; cursor: pointer; }
.mtile.add .i { color: var(--mute); }
.mtile-x { display: none; position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; padding: 0; border-radius: 50%; background: var(--bad); color: #fff; border: 2px solid var(--panel); place-items: center; cursor: pointer; z-index: 2; }
.mtile-x .i { width: 12px; height: 12px; stroke-width: 2.6; color: #fff; }
.msheet.editing .mtile-x { display: grid; }
.msheet.editing .mtile.add { display: none; }
.msheet.editing .msheet-hint { display: block; }
.msheet.editing .mtile:not(.add) { animation: wig .28s ease-in-out infinite alternate; cursor: grab; }
.msheet.editing .mtile:not(.add):nth-child(even) { animation-delay: -.14s; }
.msheet.editing .mtile:nth-child(-n+2) > span::after { content: "в нижней панели"; display: block; margin-top: 3px; font-size: 10.5px; font-weight: 500; color: var(--mute); }
.mtile.dragging { animation: none !important; transform: scale(1.06); box-shadow: 0 20px 40px -12px #000; z-index: 3; opacity: .95; }
@keyframes wig { from { transform: rotate(-.9deg); } to { transform: rotate(.9deg); } }
.madd { display: none; margin-top: 14px; }
.msheet.editing .madd { display: block; }
.msheet.editing .msheet-all, .msheet.editing .sgrps { display: none; }
.madd-r { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 2px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.madd-r > .i { color: var(--accent-2); }
.madd-r .t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.madd-r small { color: var(--mute); font-size: 12px; }
.madd-plus { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); display: grid; place-items: center; }
.madd-r.is-pinned { display: none; }
.sgrps { display: flex; flex-direction: column; }
.sgrp-h { height: 50px; padding: 0 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
.sgrp-h > .i:first-child { color: var(--mute); }
.sgrp-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 8px 0 12px; }
.sgrp-items a { position: relative; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border-radius: 11px; background: var(--raise); color: var(--ink-2); font-size: 13px; text-decoration: none; }
.sgrp-items a:hover { text-decoration: none; }
.sgrp-items a.on { background: var(--accent-soft); color: var(--ink); }
.sgrp-items a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sgrp-items .i { width: 16px; height: 16px; }
.sgrp-items .cnt { margin: 0; }
.sgrp-star .i { width: 12px; height: 12px; color: var(--warn); fill: var(--warn); }
.sgrp-acc { padding-top: 14px; }

@media (max-width: 860px) {
  .side { display: none !important; }
  .top-search { display: inline-grid; }
  .top-pin { order: 0; }
  .pal { padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px; }
  .pal-box { max-height: 78vh; }
  .pal-foot { display: none; }
  .tabbar a span, .tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tabbar .cnt.bad { background: var(--bad); }
  html.tg .tabbar { padding-bottom: calc(8px + max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px))); }
}
@media (min-width: 861px) { .msheet { display: none !important; } }

/* ======================================================================
   Темы (20.11.2026): Авто (как оформление устройства), Дневная, Ночная. Ночная — :root выше.
   Дневная: светлый фон, акцент ярко-голубой. Выбор — users.ui_prefs.theme (меню профиля / лист «Ещё»).
   ====================================================================== */
html[data-theme="day"] {
  --bg: #f7f7f8; --panel: #ffffff; --raise: #efeff1; --hover: #e6e6ea;
  --line: rgba(0, 0, 0, .10); --line-2: rgba(0, 0, 0, .17);
  --ink: #0e0e10; --ink-2: #53535f; --mute: #6b6b76;
  --accent: #9147ff; --accent-2: #772ce8; --accent-soft: rgba(145, 71, 255, .12); --accent-glow: rgba(145, 71, 255, .30);
  --live: #c04e0c; --live-soft: rgba(224, 102, 31, .13);
  --ok: #0b7a54; --ok-soft: rgba(14, 138, 95, .12);
  --warn: #96600a; --warn-soft: rgba(214, 150, 30, .16);
  --bad: #c42d45; --bad-soft: rgba(208, 52, 77, .11);
  --run: #2a6bc9; --run-soft: rgba(42, 107, 201, .11);
  --scrim: rgba(20, 25, 45, .38);
  --fg: 0, 0, 0; --pri-1: #9d5bff; --pri-2: #7c2fff; --smooth: auto;
  color-scheme: light;
}
html[data-theme="day"] body { -moz-osx-font-smoothing: auto; }
html[data-theme="day"] .side, html[data-theme="day"] .tabbar, html[data-theme="day"] .top { box-shadow: 0 1px 0 var(--line); }
html[data-theme="day"] .card, html[data-theme="day"] .ld-card, html[data-theme="day"] .ld-kpi { box-shadow: 0 1px 2px rgba(20, 40, 80, .05); }
html[data-theme="day"] .btn.pri, html[data-theme="day"] .btn-primary, html[data-theme="day"] .new-btn, html[data-theme="day"] .tabbar .plus { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 22px -8px rgba(145, 71, 255, .55); text-shadow: 0 1px 1px rgba(40, 0, 100, .22); }
html[data-theme="day"] .new-btn kbd { color: #fff; border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .18); }
html[data-theme="day"] .cnt { background: #e6e6ea; color: var(--ink-2); }
html[data-theme="day"] .cnt.hot, html[data-theme="day"] .cnt.live-cnt { background: rgba(224, 102, 31, .15); color: #a3420a; }
html[data-theme="day"] .cnt.bad { background: rgba(208, 52, 77, .13); color: #a8233a; }
html[data-theme="day"] .lm-bar { color: #8a1c2b; border-bottom-color: rgba(208, 52, 77, .25); } html[data-theme="day"] .lm-bar i { border-color: rgba(208, 52, 77, .4); }
html[data-theme="day"] .tabbar .cnt { background: var(--live); color: #fff; }
html[data-theme="day"] .tabbar .cnt.bad { background: var(--bad); }
html[data-theme="day"] .tabbar { background: rgba(255, 255, 255, .92); }
html[data-theme="day"] .top { background: color-mix(in srgb, var(--panel) 90%, transparent); }
html[data-theme="day"] .logo.face { box-shadow: 0 6px 18px rgba(255, 138, 76, .25); }
html[data-theme="day"] .toast { box-shadow: 0 18px 40px -16px rgba(20, 40, 80, .35); }
html[data-theme="day"] .star.on, html[data-theme="day"] .top-pin.on { color: #d18a00; } html[data-theme="day"] .star.on .i, html[data-theme="day"] .top-pin.on .i { fill: #f2a900; }
html[data-theme="day"] .was-note .i, html[data-theme="day"] .was-box > .i, html[data-theme="day"] .net-chip .was, html[data-theme="day"] .was-box li.mine, html[data-theme="day"] .was-box li.mine b, html[data-theme="day"] .pick-seen { color: var(--warn); }
html[data-theme="day"] .trash-box > .i { color: var(--bad); }
html[data-theme="day"] .nst-f.neg b { color: var(--bad); }
html[data-theme="day"] .look-star.is-cover { color: #d18a00; }
@media (prefers-color-scheme: light) {
html[data-theme="auto"] .was-note .i, html[data-theme="auto"] .was-box > .i, html[data-theme="auto"] .net-chip .was, html[data-theme="auto"] .was-box li.mine, html[data-theme="auto"] .was-box li.mine b, html[data-theme="auto"] .pick-seen { color: var(--warn); }
html[data-theme="auto"] .trash-box > .i { color: var(--bad); }
html[data-theme="auto"] .nst-f.neg b { color: var(--bad); }
html[data-theme="auto"] .look-star.is-cover { color: #d18a00; }
html[data-theme="auto"] {
  --bg: #f7f7f8; --panel: #ffffff; --raise: #efeff1; --hover: #e6e6ea;
  --line: rgba(0, 0, 0, .10); --line-2: rgba(0, 0, 0, .17);
  --ink: #0e0e10; --ink-2: #53535f; --mute: #6b6b76;
  --accent: #9147ff; --accent-2: #772ce8; --accent-soft: rgba(145, 71, 255, .12); --accent-glow: rgba(145, 71, 255, .30);
  --live: #c04e0c; --live-soft: rgba(224, 102, 31, .13);
  --ok: #0b7a54; --ok-soft: rgba(14, 138, 95, .12);
  --warn: #96600a; --warn-soft: rgba(214, 150, 30, .16);
  --bad: #c42d45; --bad-soft: rgba(208, 52, 77, .11);
  --run: #2a6bc9; --run-soft: rgba(42, 107, 201, .11);
  --scrim: rgba(20, 25, 45, .38);
  --fg: 0, 0, 0; --pri-1: #9d5bff; --pri-2: #7c2fff; --smooth: auto;
  color-scheme: light;
}
html[data-theme="auto"] body { -moz-osx-font-smoothing: auto; }
html[data-theme="auto"] .side, html[data-theme="auto"] .tabbar, html[data-theme="auto"] .top { box-shadow: 0 1px 0 var(--line); }
html[data-theme="auto"] .card, html[data-theme="auto"] .ld-card, html[data-theme="auto"] .ld-kpi { box-shadow: 0 1px 2px rgba(20, 40, 80, .05); }
html[data-theme="auto"] .btn.pri, html[data-theme="auto"] .btn-primary, html[data-theme="auto"] .new-btn, html[data-theme="auto"] .tabbar .plus { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 22px -8px rgba(145, 71, 255, .55); text-shadow: 0 1px 1px rgba(40, 0, 100, .22); }
html[data-theme="auto"] .new-btn kbd { color: #fff; border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .18); }
html[data-theme="auto"] .cnt { background: #e6e6ea; color: var(--ink-2); }
html[data-theme="auto"] .cnt.hot, html[data-theme="auto"] .cnt.live-cnt { background: rgba(224, 102, 31, .15); color: #a3420a; }
html[data-theme="auto"] .cnt.bad { background: rgba(208, 52, 77, .13); color: #a8233a; }
html[data-theme="auto"] .lm-bar { color: #8a1c2b; border-bottom-color: rgba(208, 52, 77, .25); } html[data-theme="auto"] .lm-bar i { border-color: rgba(208, 52, 77, .4); }
html[data-theme="auto"] .tabbar .cnt { background: var(--live); color: #fff; }
html[data-theme="auto"] .tabbar .cnt.bad { background: var(--bad); }
html[data-theme="auto"] .tabbar { background: rgba(255, 255, 255, .92); }
html[data-theme="auto"] .top { background: color-mix(in srgb, var(--panel) 90%, transparent); }
html[data-theme="auto"] .logo.face { box-shadow: 0 6px 18px rgba(255, 138, 76, .25); }
html[data-theme="auto"] .toast { box-shadow: 0 18px 40px -16px rgba(20, 40, 80, .35); }
html[data-theme="auto"] .star.on, html[data-theme="auto"] .top-pin.on { color: #d18a00; } html[data-theme="auto"] .star.on .i, html[data-theme="auto"] .top-pin.on .i { fill: #f2a900; }
}

/* переключатель темы */
.theme-sw { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 11px; background: var(--bg); border: 1px solid var(--line); }
.theme-sw button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font: 600 12.5px var(--f-ui); cursor: pointer; white-space: nowrap; }
.theme-sw button .i { width: 15px; height: 15px; }
.theme-sw button:hover { color: var(--ink); }
.theme-sw button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 0 0 1px var(--line-2); }
.me-menu .theme-sw { margin: 2px 4px 4px; }
.me-menu .theme-sw button { height: 30px; padding: 0 4px; font-size: 12px; }
.me-menu-h { padding: 4px 10px 6px; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--mute); font-weight: 700; }
.msheet-theme { margin-top: 18px; }
.msheet .theme-sw button { height: 40px; font-size: 13.5px; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; animation-timing-function: ease; }

/* читаемость: три уровня — заголовок / основной / подпись */
.nav a, .nv { font-weight: 550; }
.nav a.on, .nv.on { font-weight: 650; }
.ngrp-h { font-weight: 650; }
.nav-h { font-weight: 700; }
.cnt { font-weight: 700; }
.me small, .msheet-me small { font-weight: 500; }

/* переключатель темы в шапке */
.theme-dd { position: relative; }
.top-theme .i { width: 18px; height: 18px; }
.theme-dd.open .top-theme { background: var(--hover); color: var(--ink); }
.theme-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 220px; padding: 6px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line-2); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6); animation: popDown .18s var(--ease); }
.theme-pop[hidden] { display: none; }
.theme-pop-h { padding: 6px 10px 6px; font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--mute); font-weight: 700; }
.theme-pop button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; }
.theme-pop button:hover { background: var(--hover); color: var(--ink); }
.theme-pop button > span { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.theme-pop button b { font-weight: 650; color: var(--ink); font-size: 13.5px; }
.theme-pop button small { font-size: 12px; color: var(--mute); }
.theme-pop button > .i:last-child { width: 16px; height: 16px; color: var(--accent-2); opacity: 0; }
.theme-pop button.on { background: var(--accent-soft); }
.theme-pop button.on > .i:last-child { opacity: 1; }
.theme-pop button.on > .i:first-child { color: var(--accent-2); }
@keyframes popDown { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
@media (max-width: 860px) { .theme-pop { position: fixed; right: max(10px, env(safe-area-inset-right, 0px)); top: calc(var(--top) + env(safe-area-inset-top, 0px) + 4px); } }
@media (max-width: 420px) { .top .counter { display: none; } }  /* квота видна в листе «Ещё»; в узкой шапке место — названию страницы */

/* ---------- промпты образа двух видов: метки на карточке, окно, выбор вида при создании ---------- */
.look-pr { display: flex; gap: 6px; flex-wrap: wrap; }
.lp-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 5px 10px; border-radius: 999px; border: 1px dashed var(--line-2); background: transparent; color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.lp-chip .i { width: 13px; height: 13px; }
.lp-chip:hover { color: var(--ink); border-color: var(--mute); }
.lp-chip.on { border-style: solid; border-color: rgba(67, 217, 155, .35); background: var(--ok-soft); color: var(--ok); }
.lp-dlg-pr { width: min(1120px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line-2); border-radius: 18px; background: var(--raise); color: var(--ink); overflow: auto; }
.lp-dlg-pr::backdrop { background: var(--scrim); }
.lpp { display: flex; flex-direction: column; gap: 16px; padding: 22px 24px; }
.lpp-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.lpp-h h3 { margin: 0 0 4px; font-family: var(--f-display); font-size: 18px; font-weight: 600; }
.lpp-h p { margin: 0; }
.lpp-tabs { display: none; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); }
.lpp-tabs button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.lpp-tabs button.on { background: var(--accent); color: #fff; }
.lpp-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lpp-col { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--bg); }
.lpp-col p { margin: 0; line-height: 1.45; }
.lpp-col label { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 12px; color: var(--ink-2); }
.lpp-col textarea { min-height: 200px; padding: 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--raise); color: var(--ink); font-family: var(--f-mono); font-size: 12.5px; line-height: 1.5; resize: vertical; }
.lpp-col textarea:focus { outline: 0; border-color: var(--accent); }
.lpp-col code { font-family: var(--f-mono); color: var(--accent-2); }
.lpp-ch { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; }
.lpp-st { padding: 3px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 600; }
.lpp-st.on { background: var(--ok-soft); color: var(--ok); }
.lpp-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.lpp-f { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.lpp-btns { display: flex; gap: 10px; margin-left: auto; }
@media (max-width: 760px) {
  .lp-dlg-pr { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; border-width: 1px 0 0; }
  .lpp { padding: 16px; }
  .lpp-tabs { display: grid; }
  .lpp-cols { grid-template-columns: minmax(0, 1fr); }
  .lpp-col { display: none; padding: 0; border: 0; background: transparent; }
  .lpp-col.on { display: flex; }
  .lpp-ch { display: none; }
  .lpp-col textarea { min-height: 220px; background: var(--bg); }
  .lpp-btns { width: 100%; }
  .lpp-btns .btn { flex: 1; }
}
.pk { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.pk-l { font-size: 12px; color: var(--ink-2); }
.pk-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; padding: 4px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg); }
.pk-seg label { position: relative; margin: 0; cursor: pointer; }
.pk-seg input { position: absolute; opacity: 0; inset: 0; }
.pk-seg span { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px; justify-content: center; padding: 6px 8px; border-radius: 9px; text-align: center; color: var(--ink-2); }
.pk-seg b { font-size: 13.5px; font-weight: 600; }
.pk-seg small { font-size: 11.5px; color: var(--mute); }
.pk-seg input:checked + span { background: var(--accent); color: #fff; }
.pk-seg input:checked + span small { color: rgba(255, 255, 255, .88); }
.pk-seg input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.pk-env { display: flex; flex-direction: column; gap: 6px; max-width: 520px; margin: 0; font-size: 12px; color: var(--ink-2); }
.pk-env input { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; }
.pk-env[hidden], .pr-look-save[hidden] { display: none; }
