/* Лента композиций Bloomy. Цвета и кнопки — в app.css. */
/* Скрытое остаётся скрытым, даже если у блока задан display (панель фильтров, кнопка «Show more»). */
.page-bloomy [hidden] { display: none !important; }
.page-bloomy { background: var(--shell); }
.bl { max-width: 1480px; margin: 0 auto; padding: 24px 28px 64px; font: 14px/1.45 Inter, system-ui, sans-serif; color: var(--ink-2); }
.bl-head form { margin: 0; }
.bl-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.bl-head h1 { margin: 0; font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.bl-back { color: var(--muted); text-decoration: none; font-size: 13px; }
.bl-back:hover { color: var(--ink); }
.bl-sum { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.bl-grow { flex: 1; }
.bl-small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.bl-muted { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }

/* Настройка источника */
.bl-setup { margin-bottom: 16px; padding: 8px 24px; border-radius: 20px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.bl-steps { list-style: none; margin: 0; padding: 0; }
.bl-steps li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.bl-steps li:last-child { border-bottom: 0; }
.bl-steps h3 { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--ink); }
.bl-steps p { margin: 0 0 8px; }
.bl-steps code { padding: 1px 6px; border-radius: 6px; background: var(--chip); font-size: 12.5px; }
.bl-steps .btn + .btn { margin-left: 8px; }
.bl-syncrow { margin-top: 8px; }
.bl-dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--line-2); }
.bl-dot.on { background: #2fbf71; }
.bl-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.bl-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.bl-form input, .bl-form select { min-height: 36px; min-width: 240px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; }

/* Ход сбора */
.bl-job { position: relative; margin-bottom: 16px; padding: 9px 16px 13px; font-size: 13px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); font-variant-numeric: tabular-nums; }
.bl-job.error, .bl-job.stalled { box-shadow: 0 0 0 1px #f2b8b5; background: #fff6f5; }
.bl-job.done, .bl-job.stopped { padding-bottom: 9px; color: var(--muted); }
.bl-progress { position: absolute; left: 16px; right: 16px; bottom: 5px; height: 3px; border-radius: 3px; background: var(--chip); overflow: hidden; }
.bl-progress i { display: block; height: 100%; background: var(--aurora); }

/* Фильтры: сверху строка управления, под ней — все категории сразу, без прокрутки */
.bl-bar { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.bl-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bl-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line-2); }
.bl-pill { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: box-shadow .15s, background-color .15s, color .15s; }
.bl-pill:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.bl-pill input { position: absolute; opacity: 0; pointer-events: none; }
.bl-pill:has(input:checked), .bl-pill[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.bl-pill:has(input:focus-visible), .bl-pill:focus-visible { outline: 2px solid var(--a4); outline-offset: 2px; }
.bl-select { min-width: 0; min-height: 34px; padding: 0 30px 0 14px; border: 0; border-radius: 999px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%2366696f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E") no-repeat right 12px center / 11px; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; -webkit-appearance: none; appearance: none; }
.bl-select:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.bl-tags { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 1px; }
.bl-tags::-webkit-scrollbar { display: none; }
.bl-chip { flex: none; min-height: 34px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: box-shadow .15s, background-color .15s, color .15s; }
.bl-chip:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.bl-chip i { margin-left: 6px; font-style: normal; color: var(--muted-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.bl-chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.bl-chip.on i { color: rgba(255, 255, 255, .65); }
.bl-check { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 14px; cursor: pointer; }
.bl-check input { width: 16px; height: 16px; accent-color: var(--ink); }
/* Режим выбора: галочка с номером в углу карточки и панель действий внизу экрана */
.bl-pick { position: absolute; right: 12px; bottom: 44px; z-index: 3; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .3); color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.bl-card.picked { box-shadow: 0 0 0 3px var(--a4); }
.bl-card.picked .bl-pick { background: var(--a4); }
.bl-card.selecting .bl-open { display: none; }
.bl-card.selecting:hover .bl-bottom { padding-bottom: 14px; }
.bl-card.selecting:hover .bl-pos { bottom: 12px; }
.bl-picked { position: fixed; left: 50%; bottom: 22px; z-index: 40; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; min-width: min(520px, calc(100% - 32px)); padding: 10px 12px 10px 20px; border-radius: 999px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 22px 44px -18px rgba(25, 28, 32, .5); font-size: 14px; color: var(--ink); }
.bl-picked .bl-grow { flex: 1; }

/* Лента: карточка в пропорции поста Instagram 4:5 */
.bl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.bl-card { position: relative; display: block; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 22px; overflow: hidden; background: var(--chip); cursor: pointer; isolation: isolate; box-shadow: 0 1px 2px rgba(25, 28, 32, .06); transition: transform .2s ease, box-shadow .2s ease; }
/* Вкладка Reels: карточка в пропорции рилса. */
.bl-card.tall { aspect-ratio: 9 / 16; }
.bl-play { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #101215; }
.bl-card:hover { transform: translateY(-3px); box-shadow: 0 22px 38px -22px rgba(25, 28, 32, .55); }
.bl-card:focus-visible, .bl-file:focus-visible, .bl-chip:focus-visible { outline: 2px solid var(--a4); outline-offset: 2px; }
.bl-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.bl-card:hover img { transform: scale(1.035); }
/* Листание файлов на карточке: стрелки появляются при наведении, счётчик — когда начали листать. */
.bl-flip { position: absolute; top: 50%; z-index: 2; width: 32px; height: 32px; margin-top: -16px; padding: 0 0 2px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s ease, background-color .15s; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.bl-flip.prev { left: 10px; }
.bl-flip.next { right: 10px; }
.bl-flip:hover { background: #fff; }
.bl-card:hover .bl-flip, .bl-card:focus-within .bl-flip { opacity: 1; }
.bl-card.loading .bl-flip { opacity: .5; pointer-events: none; }
.bl-pos { position: absolute; left: 50%; bottom: 12px; z-index: 2; transition: bottom .2s ease; transform: translateX(-50%); padding: 4px 9px; border-radius: 999px; background: rgba(22, 24, 28, .74); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
@media (hover: none) { .bl-flip { opacity: .85; } }
.bl-nocover { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--muted-2); font-size: 12px; }
.bl-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; pointer-events: none; }
.bl-tagrow { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.bl-tag { padding: 6px 10px; border-radius: 9px; background: rgba(22, 24, 28, .74); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.15; letter-spacing: .005em; white-space: nowrap; }
.bl-reel { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px 6px 7px; border-radius: 9px; background: var(--b2); color: #fff; font-size: 12.5px; font-weight: 700; line-height: 1.15; }
.bl-reel svg { width: 13px; height: 13px; }
.bl-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 56px 14px 14px; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .34) 45%, rgba(0, 0, 0, .7) 100%); color: #fff; text-align: left; pointer-events: none; transition: opacity .2s ease; }
.bl-counts { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bl-count { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bl-count svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.bl-bottom i { font-style: normal; font-size: 12.5px; opacity: .85; white-space: nowrap; }
/* Кнопка появляется при наведении, как Recreate у Higgsfield; на телефоне её нет — открывает касание карточки. */
.bl-open { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 13px; background: #fff; color: var(--ink); font-size: 14.5px; font-weight: 600; text-decoration: none; opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, background-color .15s; pointer-events: none; }
.bl-open:hover { background: var(--ink); color: #fff; }
@media (hover: hover) {
  .bl-card:hover .bl-open, .bl-card:focus-within .bl-open { opacity: 1; transform: none; pointer-events: auto; }
  .bl-card:hover .bl-bottom { padding-bottom: 68px; }
  .bl-card:hover .bl-pos { bottom: 66px; }
}
.bl-empty { margin: 48px 0; text-align: center; color: var(--muted); }
.bl-more { display: flex; margin: 28px auto 0; }

/* Композиция */
.bl-lock { overflow: hidden; }
.bl-view { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(25, 28, 32, .62); }
.bl-view[hidden] { display: none; }
.bl-view-card { display: flex; flex-direction: column; width: min(1240px, 100%); height: min(860px, 100%); border-radius: 22px; background: var(--paper); overflow: hidden; }
.bl-view-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.bl-view-head b { display: block; color: var(--ink); font-size: 15px; }
.bl-view-head span { color: var(--muted); font-size: 12.5px; }
.bl-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--chip); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.bl-view-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; flex: 1; min-height: 0; }
.bl-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 0; padding: 16px; background: #101215; }
.bl-stage img, .bl-stage video { width: auto; height: calc(100% - 34px); max-width: 100%; min-height: 0; border-radius: 10px; object-fit: contain; }
.bl-stage img.small { height: 60%; }
.bl-stage .bl-muted { color: #9aa0a8; }
.bl-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; color: #b9bec6; font-size: 12px; }
.bl-warn { color: #ffb86b; }
.bl-dl { color: #8fd3ff; }
.bl-files { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: start; padding: 12px; overflow-y: auto; border-left: 1px solid var(--line); }
/* Квадрат через padding, а не aspect-ratio: в сетке с прокруткой браузер сжимал ряды, и превью наезжали друг на друга (29.11). */
.bl-files { grid-auto-rows: max-content; }
.bl-file { position: relative; width: 100%; height: 0; padding: 0 0 100%; border: 0; border-radius: 10px; overflow: hidden; background: var(--chip); cursor: pointer; }
.bl-file img, .bl-file .bl-nocover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.bl-file.on { box-shadow: 0 0 0 3px var(--ink); }
.bl-file.pending img { opacity: .55; }
.bl-fb { position: absolute; left: 5px; bottom: 5px; padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 10.5px; font-weight: 600; }
.bl-fb.reel { background: var(--b2); }

.bl-toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; transform: translateX(-50%); max-width: min(560px, calc(100% - 32px)); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13.5px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); }

.bl-primary { background: var(--ink); color: #fff; }
.bl-primary:hover:not(:disabled) { filter: brightness(1.25); }
.bl-view-head .bl-grow { flex: 1; }
.bl-dates { display: inline-flex; gap: 6px; }
.bl-dates input { min-height: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; }

/* Отметка «выложено» на карточке */
.bl-postrow { flex: 0 0 100%; display: flex; }
.bl-posted { padding: 5px 10px; border-radius: 9px; background: #1f9d5c; color: #fff; font-size: 12.5px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.bl-posted.wait { background: #f2a93b; color: #2b1d00; }
.bl-posted.warn { background: #e5484d; }
.bl-posted.plan { background: #fff; color: var(--ink); }
.bl-card.used img { filter: saturate(.75) brightness(.92); }

/* Редактор поста */
.ed-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.ed-title b { display: block; color: var(--ink); font-size: 17px; }
.ed-title span { color: var(--muted); font-size: 12.5px; }
.ed-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--chip); }
.ed-seg button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.ed-seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(25, 28, 32, .12); }
.ed-seg button:disabled { opacity: .45; cursor: not-allowed; }
.ed-seg i { margin-left: 4px; font-style: normal; font-weight: 500; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.ed-tile { position: relative; display: block; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--chip); cursor: pointer; transition: box-shadow .15s, transform .15s; }
.ed-tile img, .ed-tile .bl-nocover { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-tile:hover:not(:disabled) { transform: translateY(-2px); }
.ed-tile.on { box-shadow: 0 0 0 3px var(--a4); }
.ed-tile:disabled { cursor: not-allowed; }
.ed-tile:disabled img { opacity: .4; }
.ed-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ed-tile.on .ed-num { background: var(--a4); border-color: #fff; }
.ed-used { position: absolute; left: 6px; top: 8px; padding: 3px 7px; border-radius: 7px; background: #1f9d5c; color: #fff; font-size: 10.5px; font-weight: 700; }
.ed-wmark { position: absolute; height: auto; pointer-events: none; }
.ed-blur { position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; filter: blur(22px) brightness(.82); }
/* Threads: пост как в ленте — аватар с линией цепочки, ник, текст, фото своей формы */
.th-card { padding: 16px 16px 6px; border-radius: 18px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 18px 40px -30px rgba(25, 28, 32, .5); }
.th-post { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding-bottom: 10px; }
.th-rail { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.th-rail b { flex: 1; width: 2px; min-height: 14px; border-radius: 2px; background: var(--line-2); }
.th-ava { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: block; }
.th-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.th-body p { margin: 2px 0 8px; font-size: 14px; line-height: 1.4; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.th-body em { color: var(--muted-2); font-style: normal; }
.th-media { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 4px; }
.th-media::-webkit-scrollbar { display: none; }
.th-pic { position: relative; flex: none; width: 100%; max-height: 380px; border-radius: 12px; overflow: hidden; background: var(--chip); }
.th-media.many .th-pic { width: auto; height: 220px; }
.th-pic img:first-child { width: 100%; height: 100%; object-fit: cover; display: block; }
.th-part { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.th-part .ed-label span:first-child { font-weight: 600; color: var(--ink); }
.ed-arrow { position: absolute; top: 50%; width: 34px; height: 34px; margin-top: -17px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .88); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.ed-arrow.prev { left: 10px; }
.ed-arrow.next { right: 10px; }
.ed-count { position: absolute; top: 12px; right: 12px; padding: 4px 9px; border-radius: 999px; background: rgba(22, 24, 28, .72); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ed-dots { display: flex; justify-content: center; gap: 5px; margin-top: 10px; }
.ed-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.ed-dots i.on { background: var(--a4); }
.ed-box { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.ed-range input { width: 100%; accent-color: var(--ink); }
.ed-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink); }
.ed-label span { font-weight: 400; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.ed-box textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.45; resize: vertical; }
.ed-smart { display: flex; gap: 8px; }
.ed-smart input, .ed-when input { flex: 1; min-width: 0; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; }
.ed-style summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.ed-style textarea { margin: 8px 0; font-size: 13px; }
.ed-box code { padding: 1px 6px; border-radius: 6px; background: var(--chip); font-size: 12px; }
.ed-target { margin: 0; font-size: 13px; }
.ed-link { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.ed-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ed-when { display: grid; gap: 8px; }
.ed-when label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.ed-posts { margin-top: 32px; }
.ed-how { margin: 0 0 20px; font-size: 14px; }
.ed-how a { color: var(--ink); }
.ed-posts h2 { margin: 0 0 10px; font-size: 16px; font-weight: 700; color: var(--ink); }
.ed-posts ul { list-style: none; margin: 0; padding: 0 16px; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.ed-post { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ed-post:last-child { border-bottom: 0; }
.ed-post img, .ed-post-nocover { flex: none; width: 44px; height: 55px; border-radius: 8px; object-fit: cover; background: var(--chip); display: block; }
.ed-post p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ed-post.failed p, .ed-post.unknown p { color: #c0392b; }
.ed-post .bl-grow { flex: 1; }
.ed-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.ed-pill.published { background: #dff5e8; color: #14693c; }
.ed-pill.scheduled, .ed-pill.working, .ed-pill.publishing { background: #fdf0d5; color: #7a4e00; }
.ed-pill.failed, .ed-pill.unknown { background: #fde3e1; color: #a12a22; }
/* Планировщик ленты: профиль Instagram в рамке телефона — сетка 3 колонки, плитки 3:4, без скруглений */
.pl-cols { display: grid; grid-template-columns: 392px minmax(0, 380px); gap: 36px; align-items: start; }
.ig { width: 392px; border-radius: 34px; padding: 10px 0 0; background: #fff; box-shadow: 0 0 0 9px #16181c, 0 30px 60px -30px rgba(25, 28, 32, .6); overflow: hidden; color: #0f1419; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; margin: 9px; }
.ig-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px 8px; font-size: 19px; letter-spacing: -0.01em; }
.ig-bar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ig-grow { flex: 1; }
.ig-head { display: flex; align-items: center; gap: 22px; padding: 8px 16px 10px; }
.ig-ava { flex: none; width: 86px; height: 86px; border-radius: 50%; object-fit: cover; }
.ig-who { min-width: 0; }
.ig-who > b { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; line-height: 1.25; letter-spacing: .01em; }
.ig-stats { display: flex; gap: 30px; font-size: 13.5px; color: #0f1419; }
.ig-stats div { display: flex; flex-direction: column; line-height: 1.25; }
.ig-stats b { font-size: 16px; font-weight: 700; }
.ig-bio { padding: 0 16px 10px; font-size: 13.5px; line-height: 1.35; }
.ig-bio span { color: #737a82; }
.ig-bio p { margin: 0; }
.ig-link { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.ig-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ig-btns { display: grid; grid-template-columns: 1fr 1fr 1fr 34px; gap: 6px; padding: 2px 16px 12px; }
.ig-btns span { display: flex; align-items: center; justify-content: center; height: 32px; border-radius: 9px; background: #eff1f3; font-size: 13.5px; font-weight: 600; }
.ig-hl { display: flex; gap: 14px; padding: 2px 16px 12px; overflow: hidden; }
.ig-hl div { flex: none; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 66px; font-size: 11.5px; white-space: nowrap; }
.ig-hl span { display: block; width: 64px; height: 64px; padding: 3px; border-radius: 50%; border: 1.5px solid #dfe2e6; }
.ig-hl img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.ig-tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid #efefef; }
.ig-tabs span { display: flex; justify-content: center; padding: 9px 0 8px; color: #8b9199; border-bottom: 1.5px solid transparent; margin-bottom: -1px; }
.ig-tabs span.on { color: #0f1419; border-bottom-color: #0f1419; }
.ig-tabs svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5px; background: #fff; max-height: 560px; overflow-y: auto; scrollbar-width: none; }
.ig-grid::-webkit-scrollbar { display: none; }
.ig-tile { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: #efefef; }
.ig-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-tile.planned { cursor: grab; }
.ig-tile.drag { opacity: .35; }
.ig-tile.on { outline: 3px solid var(--a4); outline-offset: -3px; }
.ig-type { position: absolute; right: 6px; top: 6px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.ig-type svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; display: block; }
.ig-new { position: absolute; left: 7px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .35); }
.ig-new.wait { background: #f2a93b; }
.ig-note { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 6px 6px; background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .7)); color: #fff; font-size: 11px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .15s; pointer-events: none; }
.ig-tile:hover .ig-note { opacity: 1; }
.ig-empty { margin: 0; padding: 60px 0 80px; text-align: center; color: #9aa0a6; font-size: 13px; }
.pl-x { position: absolute; right: 5px; bottom: 5px; z-index: 2; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .95); color: var(--ink); font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.ig-tile:hover .pl-x { opacity: 1; }
.pl-hint { margin: 0; }
.pl-why { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--shell); font-size: 13px; color: var(--ink-2); }
.pl-side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.pl-side .ed-seg { align-self: flex-start; }
.pl-picker b { display: block; font-size: 13px; color: var(--ink); }
.pl-photos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.pl-photos button { aspect-ratio: 3 / 4; padding: 0; border: 0; overflow: hidden; background: var(--chip); cursor: pointer; }
.pl-photos button.on { outline: 3px solid var(--a4); outline-offset: -3px; }
.pl-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pl-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.pl-field input { min-height: 38px; min-width: 0; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; }
.pl-days { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-day { padding: 7px 10px; border-radius: 9px; background: var(--chip); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.pl-day.on { background: var(--ink); color: #fff; }
.pl-day input { position: absolute; opacity: 0; pointer-events: none; }
@media (max-width: 980px) { .pl-cols { grid-template-columns: 1fr; } .pl-side { position: static; } .ig { width: auto; max-width: 392px; } }
@media (max-width: 1280px) {
  .ed-side { grid-template-columns: 360px; }
}
@media (max-width: 980px) {
  .ed-cols { grid-template-columns: 1fr; }
  .ed-side { position: static; order: -1; grid-template-columns: 1fr; }
  .ed-files { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ed-post { flex-wrap: wrap; }
}

@media (max-width: 860px) {
  .bl-app { grid-template-columns: 1fr; }
  .bl-menu { position: static; height: auto; flex-direction: row; align-items: center; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .bl-logo { padding: 0 10px 0 4px; font-size: 18px; }
  .bl-menu nav { flex-direction: row; align-items: center; }
  .bl-menu-h, .bl-menu-gap { display: none; }
  .bl-menu a:not(.bl-logo), .bl-menu button { width: auto; white-space: nowrap; }
  .bl { padding: 16px 14px 48px; }
  .bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .bl-card { border-radius: 16px; }
  .bl-top { top: 8px; left: 8px; right: 8px; }
  .bl-tag, .bl-reel { font-size: 11px; padding: 4px 7px; }
  .bl-bottom { padding: 40px 10px 10px; }
  .bl-count { font-size: 12.5px; }
  .bl-view { padding: 0; }
  .bl-view-card { height: 100%; border-radius: 0; }
  .bl-view-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 132px; }
  .bl-files { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 100px; grid-auto-rows: 100px; overflow-x: auto; overflow-y: hidden; border-left: 0; border-top: 1px solid var(--line); }
  .bl-file { height: 100px; padding: 0; }
}

/* Меню слева — как в Twicely: логотип и кнопка сворачивания, группы, внизу настройки и выход. Свёрнутое — полоска иконок. */
.bl-app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .15s; }
.bl-app .bl { margin: 0; max-width: 1640px; width: 100%; }
.bl-menu { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 18px 12px; background: var(--paper); border-right: 1px solid var(--line); }
.bl-brand { display: flex; align-items: center; gap: 8px; padding: 0 6px; }
.bl-brand a { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--ink); font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -0.02em; text-decoration: none; }
.bl-brand img { flex: none; width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.bl-collapse { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin-left: auto; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.bl-collapse:hover { background: var(--shell); color: var(--ink); }
.bl-collapse svg { transition: transform .15s; }
.bl-menu svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bl-nav { display: grid; gap: 2px; }
/* Группа — строка меню с иконкой и стрелкой, как в Twicely /team (2.12): по клику сворачивается (public/menu.js).
   Пункты группы — со сдвигом и линией слева, без иконок (иконки — только в свёрнутом меню). */
.bl-menu-h { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: 500 14px/1.3 Inter, system-ui, sans-serif; text-align: left; cursor: pointer; }
.bl-menu-h svg { color: var(--muted); }
.bl-menu-h:hover { background: var(--shell); color: var(--ink); }
.bl-menu-h[data-here] { color: var(--ink); font-weight: 600; }
.bl-menu-h[data-here] > svg:first-child { color: var(--ink); }
.bl-menu .bl-menu-h .bl-chev { width: 16px; height: 16px; margin-left: auto; color: var(--muted); transition: transform .15s; }
.bl-menu-h[aria-expanded="false"] .bl-chev { transform: rotate(-90deg); }
.bl-menu-sub { display: grid; gap: 2px; margin: 0 0 6px 19px; padding-left: 10px; border-left: 1px solid var(--line); }
.bl-menu-sub.is-shut { display: none; }
.bl-nav .bl-menu-sub a { padding: 7px 10px; }
.bl-nav .bl-menu-sub a svg { display: none; }
.bl-menu .bl-menu-sub a[aria-current] { box-shadow: inset 2px 0 0 var(--b2); }
.bl-nav a, .bl-menu-foot a, .bl-menu-foot button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: var(--ink-2); font: 500 14px/1.3 Inter, system-ui, sans-serif; text-align: left; text-decoration: none; cursor: pointer; }
.bl-nav a svg, .bl-menu-foot svg { color: var(--muted); }
.bl-nav a:hover, .bl-menu-foot a:hover, .bl-menu-foot button:hover { background: var(--shell); color: var(--ink); }
.bl-menu a[aria-current] { background: var(--chip); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--b2); }
.bl-menu a[aria-current] svg { color: var(--ink); }
.bl-menu a:focus-visible, .bl-menu button:focus-visible { outline: 2px solid var(--a4); outline-offset: 1px; }
.bl-menu-foot { display: grid; gap: 2px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.bl-menu-foot form { margin: 0; }
.bl-menu-foot button { color: var(--muted); }
@media (min-width: 861px) {
  .bl-app.is-min { grid-template-columns: 64px minmax(0, 1fr); }
  .is-min .bl-menu { padding: 14px 8px; align-items: center; overflow-x: hidden; }
  .is-min .bl-brand { flex-direction: column; gap: 8px; padding: 0; }
  .is-min .bl-brand span, .is-min .bl-nav span:not(.bl-menu-h), .is-min .bl-menu-foot span { display: none; }
  .is-min .bl-collapse { margin: 0; }
  .is-min .bl-collapse svg { transform: scaleX(-1); }
  .is-min .bl-nav, .is-min .bl-menu-foot { width: 100%; justify-items: center; }
  .is-min .bl-menu-h { width: 28px; height: 1px; margin: 8px 0; padding: 0; overflow: hidden; background: var(--line); font-size: 0; }
  .is-min .bl-menu-h:first-child { display: none; }
  .is-min .bl-menu-h { pointer-events: none; border-radius: 0; }
  .is-min .bl-menu-h svg { display: none; }
  .is-min .bl-menu-sub, .is-min .bl-menu-sub.is-shut { display: grid; width: 100%; margin: 0; padding: 0; border: 0; justify-items: center; }
  .is-min .bl-nav .bl-menu-sub a { padding: 10px 0; }
  .is-min .bl-nav .bl-menu-sub a svg { display: block; }
  .is-min .bl-menu .bl-menu-sub a[aria-current] { box-shadow: none; }
  .is-min .bl-nav a, .is-min .bl-menu-foot a, .is-min .bl-menu-foot button { width: 44px; justify-content: center; padding: 10px 0; }
  .is-min .bl-menu a[aria-current] { box-shadow: none; }
}
@media (max-width: 860px) {
  .bl-app { grid-template-columns: minmax(0, 1fr); }
  .bl-menu { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .bl-collapse, .bl-menu-h { display: none; }
  .bl-nav { display: flex; flex-wrap: wrap; }
  .bl-menu-sub, .bl-menu-sub.is-shut { display: contents; }
  .bl-nav a, .bl-menu-foot a, .bl-menu-foot button { width: auto; }
  .bl-menu-foot { display: flex; margin: 0 0 0 auto; padding: 0; border: 0; }
}

/* Редактор: три колонки — медиа композиции, сборка поста по каналам, превью. Как композеры Buffer / Later. */
.ed-grid3 { display: grid; grid-template-columns: 292px minmax(0, 1fr) 348px; gap: 20px; align-items: start; }
.ed-lib, .ed-preview { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; }
.ed-lib { padding: 14px; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.ed-libhead { margin-bottom: 12px; }
.ed-libhead .ed-seg { display: flex; }
.ed-libhead .ed-seg button { flex: 1; min-height: 30px; padding: 0 6px; font-size: 12.5px; white-space: nowrap; }
.ed-files { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; align-items: start; }
.ed-files .bl-muted { grid-column: 1 / -1; }
.ed-tile { border-radius: 10px; }
.ed-tile.tall { aspect-ratio: 9 / 16; }
.ed-num { position: absolute; top: 6px; right: 6px; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .28); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ed-compose { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
/* Каналы: карточки-переключатели */
.ed-nets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ed-net { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 52px; padding: 8px 10px; border: 0; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font: inherit; text-align: left; cursor: pointer; transition: box-shadow .15s, background-color .15s; }
.ed-net:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--ink); }
.ed-net.on { box-shadow: inset 0 0 0 2px var(--ink); }
.ed-net:disabled { cursor: default; opacity: .55; }
.ed-net.on:disabled { opacity: 1; }
.ed-net:focus-visible { outline: 2px solid var(--a4); outline-offset: 2px; }
.ed-net-name { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.ed-net-name b { color: var(--ink); font-size: 13.5px; font-weight: 600; }
.ed-net-name em { overflow: hidden; color: var(--muted-2); font-size: 11.5px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.ed-net-check { flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.ed-net.on .ed-net-check { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 9.3 2.7 2.7L13 6.6'/%3E%3C/svg%3E") center / 18px no-repeat; box-shadow: none; }
.ed-mark { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: #fff; font-style: normal; }
.ed-mark svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ed-mark.instagram { background: linear-gradient(45deg, #f9ae3a, #e8305f 55%, #a332b8); }
.ed-mark.threads { background: #101215; }
.ed-mark.telegram { background: #2aa3e6; }
/* Выбранные медиа: порядок поста */
.ed-strip { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.ed-strip-empty { margin: 0; padding: 16px; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted); font-size: 13px; text-align: center; }
.ed-chip { position: relative; flex: none; width: 56px; height: 70px; border-radius: 9px; overflow: hidden; background: var(--chip); cursor: grab; }
.ed-chip.video { height: 70px; }
.ed-chip img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ed-chip.cur { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.ed-chip i { position: absolute; left: 4px; bottom: 4px; min-width: 18px; padding: 1px 5px; border-radius: 999px; background: rgba(16, 18, 21, .72); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.ed-chip.video::after { content: "▶"; position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); color: #fff; font-size: 14px; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); pointer-events: none; }
.ed-chip button { position: absolute; top: 3px; right: 3px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0 0 1px; border: 0; border-radius: 50%; background: rgba(16, 18, 21, .72); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; }
.ed-chip button:hover { background: #e5484d; }
/* Блок канала */
.ed-block { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.ed-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; min-height: 34px; }
.ed-block-name { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 15px; font-weight: 700; }
.ed-block-name .ed-mark { width: 24px; height: 24px; border-radius: 8px; }
.ed-block-name .ed-mark svg { width: 14px; height: 14px; }
.ed-block-note { color: var(--muted); font-size: 12.5px; }
.ed-block textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.45; resize: vertical; }
.ed-block textarea:focus, .ed-smart input:focus, .ed-when input:focus { border-color: var(--ink); outline: none; }
.ed-block code { padding: 1px 6px; border-radius: 6px; background: var(--chip); font-size: 12px; }
.ed-block > .ed-link { align-self: flex-start; }
.ed-block > .bl-muted { margin: 0; }
.ed-block > .ed-seg { align-self: flex-start; }
[data-status]:empty { display: none; }
.ed-status { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--shell); color: var(--ink-2); font-size: 13px; }
.ed-status.bad { background: #fdf0d5; color: #7a4e00; }
.ed-label-name { font-weight: 600 !important; color: var(--ink) !important; }
.ed-link:disabled { opacity: .45; cursor: not-allowed; text-decoration: none; }
.ed-wmrow { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; }
.ed-range { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.ed-range.wide { grid-template-columns: 84px 1fr; }
.ed-look .bl-check { font-size: 14px; font-weight: 600; color: var(--ink); }
/* Музыка под рилс */
.ed-music { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ed-music .bl-muted { margin: 0; }
.ed-tracks { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.ed-track { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ed-track:last-child { border-bottom: 0; }
.ed-track.on { border: 0; border-radius: 12px; background: var(--shell); }
.ed-track-name { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.ed-track-name b { overflow: hidden; color: var(--ink); font-size: 13.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ed-track-name em { overflow: hidden; color: var(--muted); font-size: 12px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.ed-play { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; cursor: pointer; }
/* Итог и кнопки */
/* Кнопки всегда под рукой: блок итога прилипает к низу окна, как нижняя панель в Buffer */
.ed-go { position: sticky; bottom: 12px; z-index: 5; gap: 8px; box-shadow: 0 0 0 1px var(--line-2), 0 14px 34px -18px rgba(25, 28, 32, .45); }
.ed-go .ed-target { font-size: 12.5px; }
.ed-target.bad { color: #a35a00; }
.ed-foot-links { display: flex; justify-content: space-between; gap: 12px; padding-top: 2px; }
.ed-when { grid-template-columns: 1fr auto; align-items: end; }
/* Превью справа */
.pv-tabs { display: flex; margin-bottom: 12px; }
.pv-tabs button { flex: 1; padding: 0 8px; }
.pv-title { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.pv-ig { border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -30px rgba(25, 28, 32, .5); color: #0f1419; }
.pv-ig.bare { background: none; box-shadow: none; }
.pv-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px; font-size: 13.5px; }
.pv-head img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.pv-head i { font-style: normal; font-weight: 700; letter-spacing: 1px; }
.pv-frame { position: relative; width: 100%; overflow: hidden; background: #101215; }
.pv-frame.tall { width: 292px; max-width: 100%; margin: 0 auto 12px; border-radius: 16px; }
.pv-ig.bare .pv-frame.tall { margin-bottom: 0; box-shadow: 0 18px 40px -26px rgba(25, 28, 32, .7); }
.pv-frame.empty { aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--chip); color: var(--muted); text-align: center; }
.pv-frame .ed-shot, .pv-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-frame .ed-shot.fit { position: absolute; inset: 0; object-fit: contain; }
.pv-storyhead { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 8px; padding: 14px 12px 24px; background: linear-gradient(rgba(0, 0, 0, .45), transparent); color: #fff; font-size: 13px; pointer-events: none; }
.pv-storyhead img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.pv-storyhead span { opacity: .8; }
.pv-song { position: absolute; left: 10px; top: 10px; max-width: calc(100% - 20px); overflow: hidden; padding: 5px 10px; border-radius: 999px; background: rgba(16, 18, 21, .6); color: #fff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.pv-ig .ed-dots { margin-top: 8px; }
.pv-icons { display: flex; gap: 14px; padding: 10px 12px 2px; }
.pv-icons svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pv-cap { margin: 0; padding: 6px 12px 12px; font-size: 13.5px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 210px; overflow-y: auto; }
.pv-cap em { color: var(--muted-2); font-style: normal; }
.pv-first { padding-top: 0; color: #3f4248; }
/* Telegram: пост в канале */
.tg-chat { padding: 14px 12px; border-radius: 18px; background: #cfe3c9 linear-gradient(160deg, #dfe9c8, #bfdcd0); }
.tg-post { max-width: 300px; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(16, 35, 47, .15); color: #0f1419; }
.tg-media { position: relative; overflow: hidden; background: var(--chip); }
.tg-media.one img, .tg-media.one video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tg-media:not(.one) { display: grid; gap: 2px; grid-template-columns: 1fr 1fr; }
.tg-media span { position: relative; aspect-ratio: 1; overflow: hidden; }
.tg-media.n3 span:first-child { grid-row: span 2; aspect-ratio: auto; }
.tg-media span img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tg-media u { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(16, 18, 21, .5); color: #fff; font-size: 20px; font-weight: 700; text-decoration: none; }
.tg-text { position: relative; padding: 8px 12px 20px; }
.tg-text b { color: #2481cc; font-size: 13.5px; }
.tg-text p { margin: 2px 0 0; font-size: 14px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow-y: auto; }
.tg-text em { color: var(--muted-2); font-style: normal; }
.tg-meta { position: absolute; right: 10px; bottom: 5px; color: #8a9aa6; font-size: 11px; }
.bl-pre { margin: 8px 0 0; padding: 10px 12px; max-height: 160px; overflow: auto; border-radius: 10px; background: var(--shell); color: var(--ink-2); font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.bl-steps .bl-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
@media (max-width: 1320px) {
  .ed-grid3 { grid-template-columns: 240px minmax(0, 1fr) 310px; gap: 14px; }
  .ed-nets { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .ed-grid3 { grid-template-columns: minmax(0, 1fr); }
  .ed-lib, .ed-preview { position: static; max-height: none; }
  .ed-files { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .ed-preview { max-width: 380px; }
}
.ed-look .ed-block-note { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.ed-wmgrid { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 8px 10px; color: var(--muted); font-size: 13px; }
.ed-wmgrid .ed-seg { justify-self: start; }
.ed-block-name em { color: var(--muted-2); font-size: 12.5px; font-style: normal; font-weight: 500; }
.ed-net { min-height: 46px; }
@media (max-width: 1320px) { .ed-nets { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Обработка фото словами (редактор) */
.ed-edited { position: absolute; left: 6px; bottom: 6px; padding: 3px 7px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 700; }
.rt-hints { display: flex; flex-wrap: wrap; gap: 6px; }
.rt-hint { min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.rt-hint:hover { box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.rt-hint.on { background: var(--ink); color: #fff; box-shadow: none; }
.rt-hint:focus-visible { outline: 2px solid var(--a4); outline-offset: 2px; }
.rt-canon { display: flex; flex-direction: column; gap: 6px; }
.rt-canon-name { color: var(--muted-2); font-size: 12px; }
.rt-sw { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); vertical-align: -1px; }
.rt-hint.on .rt-sw { box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
.rt-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; }
.rt-go { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rt-go .bl-muted { margin: 0; }
.rt-list { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 0; padding: 0; list-style: none; }
.rt-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; background: var(--shell); }
.rt-pair { display: inline-flex; align-items: center; gap: 6px; }
.rt-pair b { color: var(--muted-2); font-weight: 500; }
.rt-pair img, .rt-nopic, .rt-wait, .rt-after { width: 48px; height: 60px; border-radius: 8px; object-fit: cover; display: block; background: var(--chip); }
.rt-after { padding: 0; border: 0; cursor: zoom-in; overflow: hidden; }
.rt-after img { width: 100%; height: 100%; border-radius: 0; }
.rt-after:focus-visible { outline: 2px solid var(--a4); outline-offset: 2px; }
.rt-wait { display: flex; align-items: center; justify-content: center; color: #7a4e00; font-weight: 700; }
.rt-wait.failed { background: #fdf0d5; }
.rt-spin { width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--ink); border-radius: 50%; animation: rt-spin .8s linear infinite; }
@keyframes rt-spin { to { transform: rotate(360deg); } }
.rt-body { min-width: 0; }
.rt-body p { margin: 0; color: var(--ink); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-note { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.rt-row.failed .rt-note { color: #7a4e00; }
.rt-acts { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.rt-in { color: #1f9d5c; font-size: 12.5px; font-weight: 600; }
.pv-before { position: absolute; left: 10px; bottom: 10px; z-index: 3; min-height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.pv-before.on { background: var(--ink); color: #fff; }
@media (prefers-reduced-motion: reduce) { .rt-spin { animation-duration: 2.4s; } }

/* Текст на сторис (редактор) */
.st-text { display: flex; flex-direction: column; gap: 10px; }
.st-block { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: var(--shell); }
.st-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-row .ed-seg button { min-height: 30px; padding: 0 11px; font-size: 12.5px; }
.st-dim { margin-left: auto; }
.pv-text { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.pv-text:active { cursor: grabbing; }
.pv-frame .ed-wmark { z-index: 2; }
.pv-storyhead { z-index: 3; }
.st-dim { grid-template-columns: auto 150px; }

/* Редактор, раскладка v3 (29.11, по замечаниям Паши): каналы — вверху страницы, как подменю. Слева — исходники (выбранное
   и все файлы композиции), по центру — настройки канала, справа — финальный вид поста и под ним кнопки публикации.
   Обе боковые колонки липкие и помещаются в экран; обработка фото открывается панелью вместо настроек. */
#ed.has-item .bl-head { display: none; }
.ed-top { flex-wrap: nowrap; gap: 14px; margin-bottom: 16px; }
.ed-top .ed-title { min-width: 0; }
.ed-top .ed-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-top .ed-nets { display: flex; flex: none; gap: 8px; margin-left: auto; order: 3; }
.ed-top .ed-net { min-height: 40px; padding: 6px 10px 6px 7px; gap: 8px; border-radius: 12px; }
.ed-top .ed-mark { width: 26px; height: 26px; border-radius: 8px; }
.ed-top .ed-net-name em { font-size: 11px; }
.ed-top .ed-net-check { width: 16px; height: 16px; }
.ed-grid3 { grid-template-columns: minmax(240px, 290px) minmax(0, 1fr) minmax(320px, 380px); gap: 20px; }
.ed-src, .ed-final { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 32px); min-width: 0; }
.ed-src .ed-media { flex: 1 1 auto; min-height: 0; }
.ed-final .ed-preview { position: static; flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.ed-final .ed-go { position: static; flex: none; gap: 6px; padding: 12px 14px; box-shadow: 0 0 0 1px var(--line); }
.ed-final .ed-go .btn { min-height: 44px; }
.ed-compose { gap: 14px; }
.ed-media .ed-block-head { min-height: 28px; }
.ed-media .ed-strip { padding: 0; background: none; box-shadow: none; }
.ed-media .ed-strip-empty { padding: 12px; border-radius: 12px; background: var(--shell); box-shadow: none; }
.ed-media .ed-lib { position: static; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; max-height: none; padding: 0; overflow: visible; background: none; box-shadow: none; border-radius: 0; }
.ed-media .ed-libhead { margin: 2px 0 10px; }
/* grid-auto-rows: max-content — иначе в колонке с ограниченной высотой ряды сжимаются и плитки 4:5 налезают друг на друга. */
.ed-media .ed-files { flex: 1 1 auto; min-height: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 6px; overflow-y: auto; padding: 3px; margin: -3px; scrollbar-width: thin; }
.ed-media .ed-tile { border-radius: 10px; }
.ed-media .ed-num { transform: scale(.85); transform-origin: top right; }
.ed-media .ed-edited, .ed-media .ed-used, .ed-media .bl-fb { font-size: 9.5px; padding: 2px 5px; }
.ed-chtabs { display: flex; }
.ed-chtabs button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: 1; }
.ed-chtabs .ed-mark { width: 20px; height: 20px; border-radius: 6px; }
.ed-chtabs .ed-mark svg { width: 12px; height: 12px; }
.ed-tabwarn { width: 7px; height: 7px; border-radius: 50%; background: #e5a000; }
/* Превью подстраивается под высоту экрана: ширина карточки = (высота окна − шапка карточки и кнопки) × пропорция кадра. */
.ed-final .pv-ig { width: min(100%, calc((100vh - 420px) * var(--r, .8))); margin-inline: auto; }
.ed-final .pv-ig.bare { width: min(100%, calc((100vh - 270px) * var(--r, .5625))); }
.ed-final .pv-ig .pv-frame.tall { width: 100%; margin: 0; }
/* Подпись в превью — 2 строки, как в ленте Instagram; клик разворачивает. Отступ снизу — margin: padding показал бы кусок 3-й строки. */
.pv-cap.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-bottom: 0; margin-bottom: 12px; max-height: none; white-space: normal; cursor: pointer; }
.pv-cap.clamp.open { display: block; white-space: pre-wrap; }
.pv-retouch { position: absolute; right: 10px; bottom: 10px; z-index: 3; min-height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.pv-retouch:hover { background: var(--ink); color: #fff; }
.pv-frame .ed-count { z-index: 3; }
.rt-sub { margin: -4px 0 2px; }
@media (max-width: 1320px) {
  .ed-grid3 { grid-template-columns: 230px minmax(0, 1fr) 320px; gap: 14px; }
  .ed-media .ed-files { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .ed-top { flex-wrap: wrap; }
  .ed-top .ed-nets { width: 100%; margin-left: 0; order: 4; }
  .ed-top .ed-net { flex: 1; }
}
@media (max-width: 1080px) {
  .ed-grid3 { grid-template-columns: minmax(0, 1fr); }
  .ed-src, .ed-final { position: static; max-height: none; }
  .ed-media .ed-files { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); max-height: 260px; }
  .ed-final .pv-ig, .ed-final .pv-ig.bare { width: min(100%, 380px); }
}
/* Колонка исходников начинается под шапкой (~88 px): её высота — до низа экрана, сетка листается внутри. */
.ed-src { max-height: calc(100vh - 104px); }
/* Карточки композиций: вкладка Cards и редактор карточки (public/cards.js). Шрифты — те же файлы, которыми рисует сервер. */
@font-face { font-family: "Bloomy Script"; src: url("/fonts/GreatVibes-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Bloomy Digit"; font-weight: 400 700; src: url("/fonts/Caveat.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Bloomy Serif"; font-weight: 500; src: url("/fonts/CormorantGaramond-Medium.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Bloomy Serif"; font-weight: 700; src: url("/fonts/CormorantGaramond-Bold.ttf") format("truetype"); font-display: swap; }
.cd-tabs { margin-bottom: 18px; }
/* Библиотеки карточек по годам и импорт (01.12): справа в шапке — Import и переключатель 2026 / 2025. */
.cd-head-tools { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.cd-head-tools .bl-ed { margin-left: 0; }
.cd-imp { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; padding: 18px 20px; border-radius: 18px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.cd-imp h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--ink); }
.cd-imp p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; max-width: 760px; }
.cd-imp-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cd-imp-drop { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.cd-imp-drop input, .cd-imp-cat { min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; }
.cd-imp-drop input { width: 76px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cd-imp-link { flex: 1 1 320px; max-width: 520px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; }
.cd-imp-or { color: var(--muted-2); font-size: 13px; }
/* Готовая карточка — как плитка Photobank: сама карточка 9:16, плашки тегов внизу на ней, значки при наведении сверху. */
.cd-card { position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: var(--chip); isolation: isolate; box-shadow: 0 1px 2px rgba(25, 28, 32, .06); transition: transform .2s ease, box-shadow .2s ease; }
.cd-card:hover { transform: translateY(-3px); box-shadow: 0 22px 38px -22px rgba(25, 28, 32, .55); }
.cd-face { position: absolute; inset: 0; display: block; }
.cd-face img, .cd-face video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cd-chips { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.cd-chip { padding: 3px 6px; border-radius: 6px; background: rgba(22, 24, 28, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font-size: 10.5px; font-weight: 600; line-height: 1.15; white-space: nowrap; }
.cd-chip.len { background: rgba(255, 255, 255, .92); color: var(--ink); font-variant-numeric: tabular-nums; }
.cd-tools { position: absolute; top: 8px; left: 8px; right: 8px; z-index: 3; display: flex; align-items: center; gap: 6px; opacity: 0; transform: translateY(-2px); transition: opacity .18s ease, transform .18s ease; }
.cd-card:hover .cd-tools, .cd-card:focus-within .cd-tools { opacity: 1; transform: none; }
@media (hover: none) { .cd-tools { opacity: .92; transform: none; } }
.cd-grow { flex: 1; }
.cd-ic { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .94); color: var(--ink); font: inherit; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); transition: background-color .15s, color .15s; }
.cd-ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cd-ic:hover { background: var(--ink); color: #fff; }
.cd-ic.sure { width: auto; padding: 0 10px; background: #b3261e; color: #fff; }
.cd-imp .btn input[type="file"] { display: none; }
.cd-imp-state { min-height: 18px; color: var(--ink-2) !important; font-variant-numeric: tabular-nums; }
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px 16px; align-items: start; }
.cd-item { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cd-thumb { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: var(--chip); box-shadow: 0 0 0 1px var(--line), 0 14px 30px -24px rgba(25, 28, 32, .5); }
.cd-thumb img, .cd-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cd-len { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(16, 18, 21, .72); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cd-wait { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; color: var(--muted); font-size: 13px; text-align: center; }
.cd-wait.bad { color: #a35a00; }
.cd-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cd-meta p { margin: 0; }
.cd-meta-cat { display: flex; align-items: baseline; gap: 6px; color: var(--muted); font-size: 12.5px; }
.cd-meta-cat b { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.cd-meta-cat i { font-style: normal; font-variant-numeric: tabular-nums; }
.cd-meta-cat u { padding: 0 6px; border-radius: 999px; background: var(--chip); color: var(--ink-2); font-size: 11px; font-weight: 700; text-decoration: none; }
.cd-meta-title { overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.cd-err { color: #a35a00; font-size: 12.5px; }
.cd-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cd-acts .btn { padding: 0 12px; }
/* Редактор карточки */
.cd-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cd-slot { position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--shell); box-shadow: inset 0 0 0 1px var(--line-2); }
.cd-slot.on { cursor: grab; box-shadow: none; }
.cd-slot img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cd-slot em { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(16, 18, 21, .68); color: #fff; font-size: 11px; font-style: normal; font-weight: 600; }
.cd-slot:not(.on) em { position: static; display: grid; place-items: center; height: 100%; padding: 6px; border-radius: 0; background: none; color: var(--muted-2); text-align: center; }
.cd-slot button { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 22px; height: 22px; padding: 0 0 1px; border: 0; border-radius: 50%; background: rgba(16, 18, 21, .72); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.cd-slot button:hover { background: #e5484d; }
.cd-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.cd-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.cd-field.grow { flex: 1 1 200px; }
.cd-field.num { width: 92px; }
.cd-field input, .cd-field select, .cd-input { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; }
.cd-field input:focus, .cd-field select:focus, .cd-input:focus { border-color: var(--ink); outline: none; }
/* Набросок карточки: кадр 9:16, всё внутри — в долях ширины кадра (cqw), как на готовом видео */
.cd-card { position: relative; container-type: inline-size; width: 100%; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -28px rgba(25, 28, 32, .55); }
.cd-card.done { background: #101215; }
.cd-card.done video { width: 100%; height: 100%; display: block; }
.cd-p { position: absolute; margin: 0; line-height: 1; white-space: nowrap; }
img.cd-p { display: block; max-width: none; pointer-events: none; }
.cd-cat { font-family: "Bloomy Script", cursive; }
.cd-num { font-family: "Bloomy Digit", cursive; font-weight: 600; }
.cd-title { max-width: 88%; overflow: hidden; font-family: "Bloomy Serif", Georgia, serif; font-weight: 700; text-transform: uppercase; text-overflow: clip; }
.cd-desc { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-family: "Bloomy Serif", Georgia, serif; font-weight: 500; white-space: normal; }
.cd-tile { position: absolute; display: grid; place-items: center; border-radius: 0.56cqw; overflow: hidden; background: rgba(16, 18, 21, .07); }
.cd-tile.move { cursor: grab; touch-action: none; }
.cd-tile.move:hover { box-shadow: 0 0 0 2px var(--ink); }
.cd-tile.moving { cursor: grabbing; }
.cd-tile img, .cd-tile video { -webkit-user-drag: none; user-select: none; }
.cd-hint { margin: 10px 2px 0; font-size: 12.5px; }
.cd-cat { -webkit-text-stroke: 0.09cqw currentColor; }
.cd-tile img, .cd-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cd-tile em { color: var(--muted-2); font-size: 12px; font-style: normal; }

/* Архив в Backstage (решение Паши 29.11): кнопка в левом верхнем углу карточки при наведении — служебное действие,
   отдельно от Publish; метки сдвигаются вправо, чтобы кнопка их не закрывала. Переключатель Archive — в панели. */
.bl-arch { position: absolute; left: 10px; top: 10px; z-index: 3; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .94); color: var(--ink); cursor: pointer; opacity: 0; transform: scale(.9); transition: opacity .18s ease, transform .18s ease, background-color .15s; pointer-events: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.bl-arch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bl-arch:hover { background: var(--ink); color: #fff; }
.bl-card.selecting .bl-arch { display: none; }
.bl-card.leaving { opacity: .35; transform: scale(.97); transition: opacity .2s, transform .2s; pointer-events: none; }
.bl-card.has-arch .bl-top { transition: padding-left .18s ease; }
@media (hover: hover) {
  .bl-card:hover .bl-arch, .bl-card:focus-within .bl-arch { opacity: 1; transform: none; pointer-events: auto; }
  .bl-card.has-arch:hover .bl-top { padding-left: 40px; }
}
@media (hover: none) { .bl-arch { opacity: .9; transform: none; pointer-events: auto; } .bl-card.has-arch .bl-top { padding-left: 40px; } }
/* Избранное (2.12): сердечко под кнопкой архива. Не отмечено — видно при наведении; отмечено — видно всегда, закрашено. */
.bl-fav { position: absolute; left: 10px; top: 50px; z-index: 3; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .94); color: var(--ink); cursor: pointer; opacity: 0; transform: scale(.9); transition: opacity .18s ease, transform .18s ease, background-color .15s, color .15s; pointer-events: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.bl-fav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bl-fav[aria-pressed="true"] { opacity: 1; transform: none; pointer-events: auto; color: #e0245e; }
.bl-fav[aria-pressed="true"] svg { fill: currentColor; }
.bl-fav:hover { background: var(--ink); color: #fff; }
.bl-fav:active { transform: scale(.88); }
.bl-card.selecting .bl-fav { display: none; }
.bl-card.faved .bl-top { padding-left: 40px; }
@media (hover: hover) { .bl-card:hover .bl-fav, .bl-card:focus-within .bl-fav { opacity: 1; transform: none; pointer-events: auto; } }
@media (hover: none) { .bl-fav { opacity: .9; transform: none; pointer-events: auto; } }
#bl-favs, #bl-tocards { gap: 6px; }
#bl-tocards svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* В карточки (2.12): под сердечком, тот же вид. Нажато — тёмная; карточка есть — зелёная галочка, видна всегда. */
.bl-tocard { position: absolute; left: 10px; top: 90px; z-index: 3; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .94); color: var(--ink); cursor: pointer; opacity: 0; transform: scale(.9); transition: opacity .18s ease, transform .18s ease, background-color .15s, color .15s; pointer-events: none; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); text-decoration: none; }
.bl-tocard svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bl-tocard[aria-pressed="true"] { opacity: 1; transform: none; pointer-events: auto; background: var(--ink); color: #fff; }
.bl-tocard.done { opacity: 1; transform: none; pointer-events: auto; background: #1f7a4d; color: #fff; cursor: pointer; }
.bl-tocard.done svg { stroke-width: 2.4; }
.bl-tocard:hover { background: var(--ink); color: #fff; }
.bl-tocard:active { transform: scale(.88); }
.bl-card.selecting .bl-tocard { display: none; }
@media (hover: hover) { .bl-card:hover .bl-tocard, .bl-card:focus-within .bl-tocard { opacity: 1; transform: none; pointer-events: auto; } }
@media (hover: none) { .bl-tocard { opacity: .9; transform: none; pointer-events: auto; } }
#bl-favs svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#bl-favs[aria-pressed="true"] svg { fill: currentColor; }
#bl-favs i { font-style: normal; font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
#bl-archive { gap: 6px; }
#bl-archive svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#bl-archive i { font-style: normal; font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }

/* Видео на наведении: прозрачное, пока не пошло, потом мягко проявляется поверх кадра (без чёрной вспышки). */
.bl-card .bl-play { opacity: 0; transition: opacity .25s ease; }
.bl-card .bl-play.on { opacity: 1; }

/* Settings → Team (public/team.js) */
.bl-team-ads { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.bl-team-list { list-style: none; margin: 8px 0 12px; padding: 0; }
.bl-team-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.bl-team-list li .bl-muted { margin: 0; }
.bl-team-new { margin: 4px 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--chip); }
.bl-team-new pre { margin: 6px 0 10px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; user-select: all; }
.bl-team-new .btn + .btn { margin-left: 8px; }
.bl-steps li > .bl-grow { flex: 1; min-width: 0; }
.bl-danger { color: #b42318; }

/* Вход сотрудницы: без настроек и без скачивания (сервер тоже не отдаёт). */
body[data-role="staff"] .bl-menu-foot a[href="/settings"],
body[data-role="staff"]:not([data-ads]) .bl-nav a[href="/ads"],
body[data-role="staff"]:not([data-ads]) .bl-nav a[href="/lab"],
body[data-role="staff"]:not([data-ads]) .bl-nav a[href="/dna"],
body[data-role="staff"]:not([data-ads]) .bl-menu a[href="/ads-history"],
body[data-role="staff"]:not([data-ads]) [data-pick="lab"],
body[data-role="staff"]:not([data-ads]) .bl-menu-h[data-group="Ads"],
body[data-role="staff"] a[download],
body[data-role="staff"] .bl-dl { display: none !important; }
body[data-role="staff"] img, body[data-role="staff"] video { -webkit-user-drag: none; -webkit-touch-callout: none; }

/* Музыка для сторис (редактор) */
.st-music { display: flex; flex-direction: column; gap: 8px; }
.st-tracks { display: flex; flex-direction: column; gap: 4px; max-height: 232px; margin: 0; padding: 0; overflow-y: auto; list-style: none; scrollbar-width: thin; }
.st-track { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; }
.st-track.on { background: var(--shell); box-shadow: inset 0 0 0 1.5px var(--ink); }
.st-play { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--chip); color: var(--ink); font-size: 11px; cursor: pointer; }
.st-play:hover { background: var(--ink); color: #fff; }
.st-play.st-none { cursor: default; background: none; color: var(--muted-2); }
.st-pick { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex: 1; min-width: 0; padding: 4px 2px; border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.st-pick b { overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.st-pick span { flex: none; color: var(--muted-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.st-x { flex: none; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted-2); font-size: 16px; cursor: pointer; opacity: 0; }
.st-track:hover .st-x { opacity: 1; }
.st-x:hover { background: #fde8e8; color: #c62828; }
.st-upload { align-self: flex-start; cursor: pointer; }
/* На сторис плашка трека — под шапкой с ником, как в Instagram. */
.pv-ig.bare .pv-song { top: 54px; bottom: auto; left: 12px; right: auto; z-index: 3; }
.st-note { margin: -4px 0 2px; }

/* Переключатель выпусков New / Old (public/bloomy.js): крупный, справа в шапке ленты */
.bl-ed { display: inline-flex; margin-left: auto; padding: 4px; border-radius: 999px; background: var(--chip); box-shadow: inset 0 0 0 1px var(--line); }
.bl-ed button { min-width: 76px; min-height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; cursor: pointer; }
.bl-ed button[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.bl-ed button:not([aria-pressed="true"]):hover { color: var(--ink); }

/* Расписание (public/schedule.js): календарь постов как в Hermoso — месяц, неделя, список и окно поста */
.sc-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.sc-nav { display: inline-flex; align-items: center; gap: 4px; }
.sc-arrow { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.sc-arrow:hover { background: var(--chip); }
.sc-title { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.sc-tz { font-size: 12.5px; }
.sc-body.busy { opacity: .6; transition: opacity .2s; }
.sc-net { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 5px; color: #fff; }
.sc-net svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sc-net.instagram { background: linear-gradient(45deg, #f9a825, #e1306c 55%, #833ab4); }
.sc-net.threads { background: #111; }
.sc-net.telegram { background: #229ed9; }
.sc-net + .sc-net { margin-left: -5px; box-shadow: 0 0 0 1.5px var(--paper); }

.sc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: 16px; overflow: hidden; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.sc-wd { padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.sc-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 118px; padding: 6px 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sc-cell:nth-child(7n + 7) { border-right: 0; }
.sc-cell:nth-last-child(-n + 7) { border-bottom: 0; }
.sc-cell.out { background: var(--shell); }
.sc-cell.out .sc-num { color: var(--muted-2); }
.sc-num { align-self: flex-start; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 24px; text-align: center; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sc-cell.today .sc-num { background: var(--ink); color: #fff; }

.sc-chip { display: flex; flex-direction: column; gap: 4px; width: 100%; min-width: 0; padding: 4px 6px; border: 0; border-left: 3px solid var(--muted-2); border-radius: 7px; background: var(--shell); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.sc-chip:hover { background: var(--chip); }
.sc-chip-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sc-chip b { flex: none; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sc-ex { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--ink-2); }
.sc-chip.published, .sc-row.published { border-left-color: #22a35a; }
.sc-chip.scheduled, .sc-row.scheduled { border-left-color: #f0a500; }
.sc-chip.publishing, .sc-chip.working, .sc-row.publishing { border-left-color: var(--a4); }
.sc-chip.failed, .sc-chip.unknown, .sc-chip.partial, .sc-row.failed, .sc-row.partial { border-left-color: #d64541; }
.sc-chip.draft, .sc-row.draft { border-left-style: dashed; opacity: .75; }
.sc-more { align-self: flex-start; padding: 2px 6px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.sc-more:hover { background: var(--chip); color: var(--ink); }

.sc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: 16px; overflow: hidden; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.sc-col { min-width: 0; border-right: 1px solid var(--line); }
.sc-col:last-child { border-right: 0; }
.sc-colhead { display: flex; align-items: baseline; gap: 6px; padding: 10px; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.sc-colhead b { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-col.today .sc-colhead b { display: inline-block; min-width: 30px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; text-align: center; }
.sc-colbody { display: flex; flex-direction: column; gap: 6px; min-height: 420px; padding: 8px 6px; }
.sc-chip.big { padding: 6px; }
.sc-chip.big img { width: 100%; aspect-ratio: 4 / 5; border-radius: 5px; object-fit: cover; background: var(--chip); display: block; }
.sc-ex2 { display: -webkit-box; overflow: hidden; font-size: 12px; color: var(--ink-2); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sc-dot { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; font-weight: 700; color: var(--muted); }
.sc-dot.published { color: #14693c; }
.sc-dot.scheduled { color: #7a4e00; }
.sc-dot.failed, .sc-dot.partial, .sc-dot.unknown { color: #a12a22; }
.sc-empty { padding: 6px; color: var(--line-2); }

.sc-list { display: flex; flex-direction: column; gap: 18px; max-width: 820px; }
.sc-list h3 { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: var(--muted); }
.sc-list h3.today { color: var(--ink); }
.sc-row { display: flex; align-items: center; gap: 12px; width: 100%; margin-bottom: 6px; padding: 8px 12px 8px 8px; border: 0; border-left: 3px solid var(--muted-2); border-radius: 12px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.sc-row:hover { box-shadow: 0 0 0 1px var(--line-2), 0 2px 8px rgba(25, 28, 32, .06); }
.sc-row img, .sc-noimg { flex: none; width: 44px; height: 55px; border-radius: 8px; object-fit: cover; background: var(--chip); display: block; }
.sc-row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sc-row .bl-muted { font-size: 12px; }
.sc-none { padding: 24px 0; }

.sc-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(25, 28, 32, .42); }
.sc-modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 20px 22px 18px; border-radius: 18px; background: var(--paper); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.sc-mhead { display: flex; align-items: center; gap: 10px; }
.sc-mhead h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.sc-pill { padding: 3px 10px; border-radius: 999px; background: var(--chip); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.sc-pill.published { background: #dff5e8; color: #14693c; }
.sc-pill.scheduled, .sc-pill.publishing { background: #fdf0d5; color: #7a4e00; }
.sc-pill.failed, .sc-pill.partial, .sc-pill.unknown { background: #fde3e1; color: #a12a22; }
.sc-x { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.sc-x:hover { background: var(--chip); color: var(--ink); }
.sc-when { margin: 4px 0 14px; font-size: 13.5px; color: var(--muted); }
.sc-mbody { display: flex; gap: 16px; align-items: flex-start; }
.sc-mimg { flex: none; width: 150px; aspect-ratio: 4 / 5; border-radius: 12px; object-fit: cover; background: var(--chip); }
.sc-mtext { flex: 1; min-width: 0; }
.sc-mtext h4 { margin: 0 0 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-2); }
.sc-cap { margin: 0 0 16px; max-height: 190px; overflow: auto; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; color: var(--ink-2); }
.sc-targets { list-style: none; margin: 0; padding: 0; }
.sc-targets li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.sc-targets li > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.sc-targets li em { font-style: normal; font-size: 12px; color: #a12a22; }
.sc-targets .sc-net { width: 22px; height: 22px; border-radius: 7px; }
.sc-targets .sc-net svg { width: 14px; height: 14px; }
.sc-tstat { margin-left: auto; flex: none; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.sc-targets li.published .sc-tstat { color: #14693c; }
.sc-targets li.failed .sc-tstat, .sc-targets li.unknown .sc-tstat { color: #a12a22; }
.sc-tstat a { color: inherit; }
.sc-mfoot { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
@media (max-width: 760px) {
  .sc-cell { min-height: 84px; padding: 4px 3px; }
  .sc-ex { display: none; }
  .sc-week { grid-template-columns: 1fr; }
  .sc-mbody { flex-direction: column; }
  .sc-mimg { width: 100%; max-height: 260px; }
}

/* Кусок трека для сторис (public/editor.js, cutHtml): волна, окно куска тянется пальцем — как в Instagram */
.st-cut { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--shell); }
.st-cut-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-cut-head b { flex: 1; min-width: 0; overflow: hidden; font-size: 13px; font-weight: 600; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.st-cut-head .st-play.on { background: var(--ink); color: #fff; }
.st-cut-time { flex: none; font-size: 12.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.st-wave { position: relative; display: flex; align-items: center; gap: 1px; height: 46px; padding: 0 2px; border-radius: 8px; background: var(--paper); cursor: grab; touch-action: none; user-select: none; }
.st-wave:active { cursor: grabbing; }
.st-wave i { flex: 1; min-width: 1px; border-radius: 1px; background: var(--line-2); pointer-events: none; }
.st-win { position: absolute; top: 0; bottom: 0; border-radius: 8px; background: rgba(47, 188, 251, .16); box-shadow: inset 0 0 0 2px var(--a4); pointer-events: none; }
.st-cut-note { margin: 0; font-size: 12px; }

/* Предпросмотр сторис со звуком: ▶ по центру кадра и полоска времени сверху, как у сторис */
.pv-play { position: absolute; left: 50%; top: 50%; z-index: 4; width: 58px; height: 58px; margin: -29px 0 0 -29px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font-size: 20px; cursor: pointer; backdrop-filter: blur(4px); transition: opacity .2s, transform .15s; }
.pv-play:hover { transform: scale(1.06); }
.pv-play.on { opacity: 0; }
.pv-frame:hover .pv-play.on { opacity: 1; }
.pv-prog { position: absolute; left: 10px; right: 10px; top: 7px; z-index: 3; height: 2.5px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; pointer-events: none; }
.pv-prog i { display: block; width: 0; height: 100%; background: #fff; }

/* Реклама (public/ads.js): цифры периода и кампании Meta деревом, как в Plurio */
.ad-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ad-upd { font-size: 12.5px; }
.ad-body.busy { opacity: .6; transition: opacity .2s; }
.ad-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.ad-kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 9px 12px 10px; border-radius: 12px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.ad-kpi-h { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.ad-kpi.skel { height: 70px; background: linear-gradient(90deg, var(--shell), var(--chip), var(--shell)); background-size: 200% 100%; animation: ad-skel 1.2s infinite linear; box-shadow: none; }
@keyframes ad-skel { to { background-position: -200% 0; } }
.ad-kpi.off b { color: var(--line-2); }
.ad-src { margin: -6px 0 14px; font-size: 12px; color: var(--muted-2); }
.ad-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ad-tools .btn { min-height: 32px; }
.ad-kpi-l { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-kpi b { font-size: 20px; line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-kpi-s { overflow: hidden; min-height: 16px; font-size: 12px; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.ad-delta { font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-delta.good { color: #14693c; }
.ad-delta.bad { color: #a12a22; }
.ad-delta.flat { color: var(--muted); }

.ad-filters { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ad-chip { min-height: 34px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--chip); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ad-chip b { margin-left: 4px; font-weight: 700; color: var(--muted-2); }
.ad-chip.on { background: var(--ink); color: #fff; }
.ad-chip.on b { color: rgba(255, 255, 255, .7); }
.ad-search { width: 280px; max-width: 100%; min-height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-2); font: inherit; font-size: 13.5px; color: var(--ink); }
.ad-search:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--ink); }

.ad-table { overflow-x: auto; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.ad-row { display: grid; grid-template-columns: 52px minmax(220px, 1fr) 90px 86px 80px 72px 112px 108px 64px 100px; align-items: center; min-width: 984px; min-height: 54px; border-top: 1px solid var(--line); }
.ad-row:first-child { border-top: 0; }
.ad-row.ad-head { min-height: 40px; font-size: 12px; font-weight: 700; color: var(--muted-2); background: var(--shell); }
.ad-row[data-row] { cursor: default; }
.ad-row[data-row]:hover { background: #fafbfc; }
.ad-row.lv-adset { background: #fcfcfd; }
.ad-row.lv-ad { background: #fafbfc; min-height: 64px; }
.ad-c-tog { display: grid; place-items: center; }
.ad-c-name { display: flex; align-items: center; gap: 8px; min-width: 0; padding-right: 12px; }
.ad-c-num { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 0 10px; font-size: 13.5px; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink-2); white-space: nowrap; }
.ad-head .ad-c-num { color: var(--muted-2); }
.ad-chev, .ad-chev-gap { flex: none; width: 26px; height: 26px; }
.ad-chev { display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; transition: transform .15s; }
.ad-chev:hover { background: var(--chip); color: var(--ink); }
.ad-row.open > .ad-c-name .ad-chev { transform: rotate(90deg); }
.ad-thumb { flex: none; width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--chip); display: block; }
img.ad-thumb[data-peek] { cursor: zoom-in; }
.ad-off { display: block; width: 100%; padding: 9px 12px 9px calc(64px + var(--d, 0) * 26px); border: 0; border-top: 1px solid var(--line); background: transparent; font: inherit; font-size: 12.5px; color: var(--muted-2); text-align: left; cursor: pointer; }
.ad-off:hover { color: var(--ink-2); background: var(--chip); }
.ad-peek { position: fixed; z-index: 70; width: 260px; max-height: 460px; object-fit: contain; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 16px 44px rgba(0, 0, 0, .22); pointer-events: none; }
.ad-peek[hidden] { display: none; }
.ad-c-num small { display: block; margin-left: 2px; font-size: 11.5px; color: var(--muted-2); }
.ad-spark { flex: none; width: 40px; height: 14px; overflow: visible; }
.ad-spark path { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ad-spark circle { fill: var(--line-2); }
.ad-spark.good path { stroke: #22a35a; }
.ad-spark.good circle { fill: #22a35a; }
.ad-spark.bad path { stroke: #d64541; }
.ad-spark.bad circle { fill: #d64541; }
.ad-name-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ad-name-t b { overflow: hidden; font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; text-overflow: ellipsis; }
.ad-sub { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; white-space: nowrap; }
.ad-sub a { color: var(--muted); }
.ad-st { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--muted); }
.ad-st::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.ad-st.on { color: #14693c; }
.ad-st.on::before { background: #22a35a; }
.ad-st.bad { color: #a12a22; }
.ad-st.bad::before { background: #d64541; }
.ad-st.wait::before { background: #f0a500; }
.ad-tag { padding: 1px 7px; border-radius: 6px; background: var(--chip); font-size: 11px; font-weight: 700; color: var(--ink-2); }
.ad-switch { position: relative; width: 36px; height: 20px; padding: 0; border: 0; border-radius: 999px; background: var(--line-2); cursor: pointer; transition: background .15s; }
.ad-switch i { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.ad-switch.on { background: #22a35a; }
.ad-switch.on i { transform: translateX(16px); }
.ad-budget { padding: 4px 8px; margin-right: -8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.ad-budget:hover:not(:disabled) { background: var(--chip); }
.ad-budget:disabled { color: var(--muted-2); font-weight: 500; cursor: default; }
.ad-none { padding: 24px 16px; }

.ad-note { margin: -4px 0 14px; padding: 10px 14px; border-radius: 12px; background: #fde3e1; color: #a12a22; font-size: 13.5px; font-weight: 600; }
.ad-note.soft { background: #fdf0d5; color: #7a4e00; }
.ad-setup { max-width: 640px; padding: 24px 26px; border-radius: 18px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.ad-setup h2 { margin: 0 0 8px; font-size: 18px; font-weight: 800; color: var(--ink); }
.ad-setup ol { margin: 14px 0; padding-left: 20px; line-height: 1.6; font-size: 14px; color: var(--ink-2); }
.ad-setup code { padding: 1px 5px; border-radius: 5px; background: var(--chip); font-size: 12.5px; }

.ad-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(25, 28, 32, .42); }
.ad-modal { width: min(440px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 20px 22px 18px; border-radius: 18px; background: var(--paper); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.ad-modal.wide { width: min(640px, 100%); }
.ad-modal h2 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.ad-mhead { display: flex; align-items: center; }
.ad-x { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 24px; cursor: pointer; }
.ad-mname { margin: 6px 0 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); word-break: break-word; }
.ad-mfoot { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.ad-bud { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; }
.ad-bud .btn { flex: none; }
.ad-bud-in { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.ad-bud-in:focus-within { box-shadow: inset 0 0 0 1.5px var(--ink); }
.ad-bud-in span { font-size: 13px; font-weight: 700; color: var(--muted-2); }
.ad-bud-in input { flex: 1; width: 100%; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 18px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; outline: none; }
.ad-bud-diff { margin: 0 0 8px; font-size: 13.5px; color: var(--ink-2); }
.ad-log { list-style: none; margin: 12px 0 0; padding: 0; }
.ad-log li { display: grid; grid-template-columns: 110px 1fr; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.ad-log li > :nth-child(3) { grid-column: 2; color: var(--ink-2); }
.ad-log li > :nth-child(4) { grid-column: 2; font-size: 12px; }
@media (max-width: 1100px) { .ad-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ad-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ad-search { width: 100%; } .ad-filters { flex-wrap: wrap; } }

/* Общий график рекламы (public/ads.js, chartHtml): мягкие линии, каждая — к своему пику, как «All together» в Twicely */
.ad-chart { margin-bottom: 18px; padding: 14px 16px 8px; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.ad-ch-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.ad-ch-key { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 0; border-radius: 99px; background: var(--shell); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.ad-ch-key i { width: 14px; height: 3px; border-radius: 2px; }
.ad-ch-key[aria-pressed="false"] { background: transparent; color: var(--muted-2); }
.ad-ch-key[aria-pressed="false"] i { opacity: .3; }
.ad-ch-key.none { color: var(--muted-2); font-weight: 500; }
.ad-ch-note { font-size: 12px; color: var(--muted-2); }
.ad-ch-plot { position: relative; }
.ad-ch-plot svg { display: block; width: 100%; height: auto; }
.ad-ch-grid { stroke: var(--line); stroke-width: 1; }
.ad-ch-cross { stroke: var(--line-2); stroke-width: 1; }
.ad-ch-axis { font-size: 11px; fill: var(--muted-2); }
.ad-ch-end { font-size: 12px; font-weight: 600; fill: var(--ink-2); }
.ad-ch-tip { position: absolute; top: 4px; z-index: 2; min-width: 180px; padding: 8px 10px; transform: translateX(12px); border-radius: 10px; background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 6px 20px rgba(0, 0, 0, .1); font-size: 12.5px; color: var(--ink); pointer-events: none; }
.ad-ch-tip.flip { transform: translateX(calc(-100% - 12px)); }
.ad-ch-tip b { display: block; margin-bottom: 4px; }
.ad-ch-tip span { display: flex; align-items: center; gap: 7px; line-height: 1.7; color: var(--ink-2); }
.ad-ch-tip span i { flex: none; width: 10px; height: 3px; border-radius: 2px; }
.ad-ch-tip span em { margin-left: auto; padding-left: 12px; font-style: normal; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Планировщик ленты (30.11, правка Алёны «не видна сетка целиком»): телефон во всю высоту окна и прилипает,
   внутри него один экран прокручивается как в настоящем Instagram — шапка профиля уезжает, вкладки липнут,
   сетка идёт сплошной лентой. */
.ig { position: sticky; top: 16px; display: flex; flex-direction: column; height: min(860px, calc(100vh - 120px)); min-height: 520px; }
.ig-screen { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.ig-screen::-webkit-scrollbar { display: none; }
.ig-screen .ig-tabs { position: sticky; top: 0; z-index: 2; background: #fff; }
.ig-screen .ig-grid { max-height: none; overflow: visible; }
@media (max-width: 980px) { .ig { position: static; height: min(760px, calc(100vh - 40px)); } }

/* Кнопка на карточке (30.11, Паша): «Open in Editor» вместо «Publish» — ведёт в редактор, а не публикует.
   Цвет — зелёный Bloomy (как надписи «Для Него» на карточках композиций). */
.bl-open { gap: 8px; background: #3b6f68; color: #fff; box-shadow: 0 6px 18px -8px rgba(31, 64, 59, .55); }
.bl-open:hover { background: #2e5853; color: #fff; }
.bl-open svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Место Instagram, «рилс ещё и в сетке», тема Threads (30.11) */
.ed-check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 600; font-size: 14px; cursor: pointer; }
.ed-check input { width: 17px; height: 17px; accent-color: #3b6f68; }
.ed-check-note { margin: 4px 0 0 25px; }
.ed-place { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; }
.ed-place svg, .ed-place-box svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ed-place .bl-muted { margin: 0; }
.ed-place-box { margin-top: 12px; }
.ed-places { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ed-places button { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; text-align: left; cursor: pointer; }
.ed-places button:hover { border-color: #3b6f68; }
.ed-places span { color: var(--muted); font-size: 12.5px; }
.ed-input { width: 100%; box-sizing: border-box; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: #fff; }

/* Creative Lab (30.11): отобранные под рекламу композиции, ТЗ и банк креативов */
.lb { display: flex; flex-direction: column; gap: 14px; }
.lb-h { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 2px; }
.lb-h h2 { margin: 0; font-size: 16px; font-weight: 800; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lb-item { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 12px; background: var(--chip); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.lb-item.skel { cursor: default; }
.lb-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-item.on { box-shadow: 0 0 0 3px #e4317f; }
.lb-nocover { display: grid; place-items: center; height: 100%; font-size: 12px; color: var(--muted-2); }
.lb-check { position: absolute; top: 8px; left: 8px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .25); font-size: 13px; font-weight: 800; color: #fff; }
.lb-item.on .lb-check { background: #e4317f; box-shadow: none; }
.lb-x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; }
.lb-item:hover .lb-x, .lb-x:focus { opacity: 1; }
.lb-meta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: 18px 9px 7px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); color: #fff; font-size: 12px; }
.lb-meta i { font-style: normal; opacity: .85; font-size: 11px; }
.lb-empty { margin: 4px 0 8px; }
.lb-brief { padding: 12px 14px 14px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.lb-brief textarea { width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; resize: vertical; background: #fff; }
.lb-brief-f { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12.5px; }
.lb-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line); }
.lb-bank { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.lb-cr { padding: 10px 12px; border-radius: 12px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); font-size: 13px; }
.lb-cr p { margin: 4px 0 0; color: var(--muted); }
.lb-cr-k { float: right; font-size: 11px; color: var(--muted-2); }
/* Кандидаты в карточки (/cards?view=candidates) */
.cd-cand-chip { margin-left: auto; }
.cd-thumb-photo { aspect-ratio: 4 / 5; }
.cd-score, .cd-ed { position: absolute; top: 8px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.cd-score { right: 8px; background: rgba(255, 255, 255, .92); color: var(--ink); }
.cd-ed { left: 8px; background: rgba(25, 28, 32, .6); color: #fff; }
.cd-cand.taken .cd-thumb { box-shadow: 0 0 0 3px #3b6f68; }
.cd-cand-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 14px; }
.cd-cand-head p { margin: 0; color: var(--ink-2); font-size: 14px; }
.cd-cand-note { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; }
.cd-cand-note.bad { color: #a33b2c; }
.cd-done { color: #3b6f68; font-size: 13px; font-weight: 600; }
.lb-per { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); }
.lb-per select { padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.lb-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.lb-var { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); font-size: 13px; }
.lb-vimg { display: grid; place-items: center; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 10px; background: var(--chip); color: var(--muted-2); font-size: 12.5px; text-align: center; padding: 0; }
.lb-vimg img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lb-wait { animation: lbPulse 1.4s ease-in-out infinite; }
@keyframes lbPulse { 50% { opacity: .55; } }
.lb-err { padding: 10px; color: #b3261e; }
.lb-cat { font-size: 11px; color: var(--muted-2); }
.lb-in { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; resize: vertical; background: #fff; }
input.lb-in { font-weight: 700; }
.lb-var details summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.lb-var details textarea { margin-top: 4px; }
.lb-var-f { display: flex; align-items: center; gap: 4px; margin-top: auto; }
.lb-txt { margin: 0; color: var(--muted); white-space: pre-line; }

/* Текстовый пост (1.12, /editor?new=text): без колонки медиа — настройки и превью. */
.ed-grid3.ed-text { grid-template-columns: minmax(0, 680px) minmax(320px, 380px); justify-content: start; }
@media (max-width: 1080px) { .ed-grid3.ed-text { grid-template-columns: minmax(0, 1fr); } }
/* Расписание: «+» в дне — текстовый пост на этот день; видно при наведении (на тач-экранах — всегда). */
.sc-cellhead { display: flex; align-items: center; justify-content: space-between; }
.sc-add { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--shell); color: var(--ink-2); font-size: 18px; font-weight: 600; line-height: 1; text-decoration: none; opacity: 0; transition: opacity .15s, background .15s; }
.sc-add:hover, .sc-add:focus-visible { background: var(--chip); color: var(--ink); }
.sc-cell:hover .sc-add, .sc-col:hover .sc-add, .sc-add:focus-visible { opacity: 1; }
.sc-colhead .sc-add { margin-left: auto; align-self: center; }
@media (hover: none) { .sc-add { opacity: .7; } }
/* Delete в окне поста: второе нажатие — подтверждение, красным. */
.sc-del { color: #b42318; }
.sc-del.sure { background: #b42318; color: #fff; }
.sc-del.sure:hover { background: #912018; }

/* Settings → Already in Instagram (1.12). */
.bl-ig { margin: 18px 0 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }
.bl-ig h3 { margin: 0 0 6px; font-size: 15px; }
.bl-ig p { margin: 6px 0; }
.bl-ig .bl-err { color: #b42318; }

/* Место Threads (1.12): поле как в приложении Threads, подсказки под ним, недавние места чипами. */
.th-loc { margin-top: 12px; }
.th-loc-field { display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.th-loc-field:focus-within { border-color: #3b6f68; }
.th-loc-field.set { background: var(--chip); }
.th-loc-field svg { flex: none; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--muted); }
.th-loc-field input { flex: 1; min-width: 0; padding: 10px 0; border: 0; outline: 0; background: transparent; font: inherit; }
.th-loc-x { flex: none; width: 26px; height: 26px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.th-loc-x:hover { background: var(--shell); color: var(--ink); }
.th-loc-list { margin-top: 6px; max-height: 280px; overflow: auto; }
.th-loc-note { margin: 6px 2px 0; }
.th-loc-recent { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.th-loc-chip { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.th-loc-chip:hover { border-color: #3b6f68; }
.lb-upl { cursor: pointer; }
.lb-music { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.lb-tr { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); font-size: 13px; }
.lb-tr b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-tr audio { height: 30px; width: 150px; }
video.lb-vimg { width: 100%; object-fit: contain; background: #000; }
.lb-vbox summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.lb-vrow { display: flex; gap: 4px; margin-top: 6px; }
.lb-vrow select { min-width: 0; flex: 1; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12.5px; }
.lb-vrow select:first-child { flex: 3; }
.lb-vnote { margin: 0; font-size: 12px; }

/* Окно поста в расписании: все медиа поста (1.12). */
.sc-mside { flex: none; width: 150px; display: flex; flex-direction: column; gap: 8px; }
.sc-mbig { position: relative; }
.sc-mbig .sc-mimg { width: 100%; }
.sc-mstrip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.sc-mstrip button { position: relative; padding: 0; border: 2px solid transparent; border-radius: 7px; overflow: hidden; background: var(--chip); cursor: pointer; aspect-ratio: 1; }
.sc-mstrip button.on { border-color: var(--ink); }
.sc-mstrip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .45); pointer-events: none; }
.sc-mstrip .sc-play { width: 18px; height: 18px; }
.sc-play svg { width: 60%; height: 60%; fill: #fff; }
.sc-mnone { display: grid; place-items: center; aspect-ratio: 4 / 5; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); font-size: 13px; font-weight: 600; }
@media (max-width: 640px) { .sc-mside { width: 100%; } }
/* Creative Lab · тексты по аудиториям (2.12) */
.lt-aud { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.lt-a { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 150px; max-width: 220px; padding: 10px 14px; border: 0; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: box-shadow .15s, background .15s; }
.lt-a:hover { box-shadow: 0 0 0 1px var(--muted-2, #a6a9ae); }
.lt-a b { font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.lt-a i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.lt-a.on { background: var(--ink); box-shadow: none; color: #fff; }
.lt-a.on i { color: rgba(255, 255, 255, .7); }
.lt-a.skel { height: 52px; min-width: 170px; background: var(--chip); box-shadow: none; }
.lt-make { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lt-make #lt-brief { flex: 1 1 320px; }
.lt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.lt-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.lt-card.ok { box-shadow: 0 0 0 1.5px #2f8f5b; }
.lt-top { display: flex; align-items: center; gap: 6px; }
.lt-angle { padding: 3px 8px; border-radius: 999px; background: var(--chip); color: var(--ink-2, var(--ink)); font-size: 11.5px; font-weight: 700; }
.lt-q { padding: 3px 8px; border-radius: 999px; background: #fdf1e7; color: #9a5a1f; font-size: 11.5px; font-weight: 600; }
.lt-n { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lt-n.over { color: #b3261e; font-weight: 700; }
.lt-card textarea { width: 100%; border: 1px solid transparent; border-radius: 10px; background: var(--shell); font: inherit; resize: vertical; color: var(--ink); transition: border-color .15s, background .15s; }
.lt-card textarea:focus { outline: none; border-color: var(--line); background: #fff; }
.lt-hook { padding: 10px 12px; font-size: 19px !important; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.lt-text { padding: 8px 12px; font-size: 13px !important; line-height: 1.45; color: var(--ink-2, var(--ink)) !important; }
.lt-basis { margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--muted); }
.lt-basis b { color: var(--ink-2, var(--ink)); font-weight: 700; }
.lt-basis .lt-warn { color: #b3261e; }
.lt-deal { white-space: nowrap; color: var(--muted-2, var(--muted)); }
.lt-f { display: flex; align-items: center; gap: 4px; margin-top: auto; }
/* Creative Lab · сборка (2.12) */
.lt-tick { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1.5px solid var(--line-2); border-radius: 7px; background: #fff; color: #fff; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.lt-tick.on { border-color: var(--ink); background: var(--ink); }
.lt-card.picked { box-shadow: 0 0 0 2px var(--ink); }
.la-canons { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 230px)); gap: 12px; }
.la-c { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 0; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); font: inherit; text-align: left; color: var(--ink); cursor: pointer; transition: box-shadow .15s; }
.la-c:hover { box-shadow: 0 0 0 1px var(--muted-2); }
.la-c.on { box-shadow: 0 0 0 2px var(--ink); }
.la-img { display: grid; place-items: center; width: 100%; overflow: hidden; border-radius: 10px; background: var(--chip); }
.la-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.la-img i { padding: 12px; font-size: 12px; color: var(--muted); text-align: center; }
.la-c b { margin-top: 4px; font-size: 14px; }
.la-c > i { font-style: normal; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.la-f { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lb-old { margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.lb-old > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
.lb-old[open] > summary { margin-bottom: 10px; }

/* Creative Lab из окна композиции (2.12) */
#bl-view-fav.on { border-color: #c2405a; background: #c2405a; color: #fff; }
.bl-fmini { position: absolute; right: 4px; top: 4px; display: flex; gap: 3px; opacity: 0; transition: opacity .12s; }
.bl-file:hover .bl-fmini { opacity: 1; }
.bl-fm { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,.94); color: var(--ink); font-size: 13px; line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,.18); cursor: pointer; }
.bl-fm.on { color: #c2405a; }
.bl-ffav { position: absolute; left: 5px; top: 4px; color: #fff; font-size: 14px; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
.bl-file:hover .bl-ffav { opacity: 0; }
.bl-fhid { position: absolute; inset: auto 4px 4px auto; padding: 1px 5px; border-radius: 5px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; }
.bl-fshow { align-self: center; padding: 6px 10px; border: 1px dashed var(--line-2); border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }

.lb-item.used img { opacity: .6; }
.lb-used { position: absolute; left: 8px; top: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11px; font-weight: 700; }
.lb-vid { position: absolute; left: 8px; bottom: 40px; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; font-weight: 600; }

/* Creative Lab, пресеты и библиотека текстов (2.12) */
.lp-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--chip); align-self: flex-start; }
.lp-tab { min-height: 36px; padding: 0 16px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.lp-tab i { font-style: normal; font-weight: 500; opacity: .7; }
.lp-tab.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.lp-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.lp-p { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); text-align: left; font: inherit; cursor: pointer; color: var(--ink-2); }
.lp-p b { font-size: 14px; color: var(--ink); }
.lp-p i { font-style: normal; font-size: 12px; color: var(--muted); line-height: 1.3; }
.lp-p.on { box-shadow: 0 0 0 2px var(--ink); }
.lp-p:not(.on) { opacity: .55; }
.lp-go { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.lp-aud { min-height: 34px; max-width: 280px; }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-items: start; }
.lp-card { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.lp-card.open { grid-column: span 2; }
.lp-card.busy { opacity: .55; pointer-events: none; }
.lp-img { display: block; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: var(--chip); }
.lp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-vid { position: relative; cursor: pointer; }
.lp-vid .lp-hv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.lp-vid.playing i { display: none; }
.lp-vid.playing::after { content: '🔇'; position: absolute; right: 8px; bottom: 8px; font-size: 14px; background: rgba(0, 0, 0, 0.45); border-radius: 12px; padding: 2px 6px; }
.lp-vid.playing.sound::after { content: '🔊'; }
.lp-vid i { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); color: #fff; font-style: normal; font-size: 26px; display: grid; place-items: center; padding-left: 4px; }
.lp-wait, .lp-err { display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; font-size: 13px; color: var(--muted); }
.lp-err { color: #b3261e; }
.lp-card.open .lp-img { width: 50%; float: none; }
.lp-f { display: flex; align-items: center; gap: 4px; }
.lp-name { font-size: 13px; font-weight: 700; color: var(--ink); padding-left: 4px; }
.lp-ic { min-width: 32px; min-height: 32px; padding: 0 8px; border: 0; border-radius: 9px; background: var(--chip); color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.lp-ic:hover { background: var(--ink); color: #fff; }
.lp-edit { display: flex; flex-direction: column; gap: 8px; padding: 4px; }
.lp-l { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lp-l .lb-in { width: 100%; box-sizing: border-box; }
.lp-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lp-row > span { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 34px; }
.li-sec { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.li-h { display: flex; align-items: baseline; gap: 10px; }
.li-h b { font-size: 15px; color: var(--ink); }
.li-list { display: flex; flex-direction: column; gap: 6px; }
.li { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.li.ok { box-shadow: 0 0 0 2px #2e7d4f; background: rgba(46, 125, 79, .05); }
.li .lb-in { min-height: 34px; }
.li .li-plain { width: auto; flex: 1 1 30%; font-family: Georgia, serif; }
.li .li-acc { width: auto; flex: 1 1 40%; font-family: Georgia, serif; font-style: italic; }
.li .li-mast { width: auto; flex: 0 1 26%; font-weight: 800; letter-spacing: .04em; }
.li .li-caps { width: auto; flex: 1 1 auto; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.li-q { flex: 1 1 auto; margin: 0; font-family: Georgia, serif; font-style: italic; }
.li .li-who { width: 78px; flex: 0 0 78px; }
.li-angle { font-size: 11px; color: var(--muted); white-space: nowrap; }
.li-b { min-width: 34px; min-height: 34px; border: 0; border-radius: 9px; background: var(--chip); color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
.li-yes.on { background: #2e7d4f; color: #fff; }
.li-yes:hover { background: #2e7d4f; color: #fff; }
.li-no:hover { background: #b3261e; color: #fff; }
@media (max-width: 720px) { .li { flex-wrap: wrap; } .lp-card.open { grid-column: span 1; } .lp-card.open .lp-img { width: 100%; } }
.lp-drops{display:inline-flex;gap:6px;flex-wrap:wrap;margin-left:8px}

/* Ready creatives (3.12): один ряд фильтров, переключатель Story/Post, Download */
.rc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; }
.rc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rc-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--chip); }
.rc-seg button { min-height: 28px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.rc-seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.rc-seg-big button { min-height: 28px; font-size: 13px; }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; align-items: start; }
.rc-card { position: relative; display: flex; flex-direction: column; gap: 8px; }
.rc-card.skel { aspect-ratio: 9 / 16; border-radius: 14px; background: var(--chip); }
.rc-img { display: block; overflow: hidden; border-radius: 14px; background: var(--chip); box-shadow: 0 0 0 1px var(--line); }
.rc-img img, .rc-img video { display: block; width: 100%; height: 100%; object-fit: cover; }
.rc-card > .rc-seg { position: absolute; top: 8px; left: 8px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(6px); }
.rc-x { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .86); color: var(--ink-2); font-size: 16px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.rc-card:hover .rc-x { opacity: 1; }
.rc-f { display: flex; gap: 6px; }
.rc-dl { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 32px; border-radius: 9px; background: var(--chip); color: var(--ink); font-size: 12px; font-weight: 600; text-decoration: none; }
.rc-dl i { font-style: normal; font-weight: 500; color: var(--muted-2); }
.rc-dl:hover { background: var(--ink); color: #fff; }
.rc-dl:hover i { color: rgba(255, 255, 255, .7); }

/* Таргетолог (only = creatives): в меню только Ready creatives и выход. */
body[data-only] .bl-menu-h,
body[data-only] .bl-nav a:not([href="/creatives"]),
body[data-only] .bl-menu-foot a { display: none !important; }
body[data-only] .bl-menu-sub { display: grid !important; margin-left: 0; border-left: 0; }
body[data-only] .bl-nav a[href="/creatives"] { display: flex; }
body[data-role="staff"]:not([data-ads]):not([data-only]) .bl-nav a[href="/creatives"] { display: none !important; }
/* Переключатель на карточке не закрывает заголовок креатива: виден при наведении. */
@media (hover: hover) {
  .rc-card > .rc-seg { opacity: 0; transition: opacity .15s; }
  .rc-card:hover > .rc-seg { opacity: 1; }
}

/* Блок Ads внизу меню, над Ads history (3.12): отдельная плашка, чтобы рекламу было видно сразу. */
.bl-nav-ads { margin-top: auto; padding: 6px; border-radius: 12px; background: linear-gradient(180deg, #fbf1ea, #f6e6dc); box-shadow: inset 0 0 0 1px #efd9cb; }
.bl-nav-ads .bl-menu-h { color: #8a4b33; font-weight: 600; }
.bl-nav-ads .bl-menu-h > svg:first-child { color: #b0606a; }
.bl-nav-ads .bl-menu-sub { border-left-color: #e8cdbd; }
.bl-nav-ads a:hover, .bl-nav-ads .bl-menu-h:hover { background: rgba(255, 255, 255, .7); }
.bl-nav-ads + .bl-menu-foot { margin-top: 0; }
body[data-role="staff"]:not([data-ads]):not([data-only]) .bl-nav-ads { display: none; }
body[data-only] .bl-nav-ads { margin-top: 0; background: none; box-shadow: none; padding: 0; }
@media (max-width: 860px) { .bl-nav-ads { margin-top: 0; padding: 2px; } }
.is-min .bl-nav-ads { padding: 4px 0; }
