/* go7.uz — «AI-маркетолог» (assets/js/marketer.js) */
.mk-root { display: flex; flex-direction: column; gap: 12px; }
.mk-load { display: grid; place-items: center; padding: 80px 0; }

/* ---------- Карточка маркетолога ---------- */
.mk-hero { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; padding: 16px 20px 14px;
  border-radius: 20px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #1E2A55 0%, #0D1430 55%, #080C1E 100%); box-shadow: 0 18px 50px -24px rgba(11, 18, 50, .7); }
.mk-aur { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.mk-aur i { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55; animation: mkFloat 14s ease-in-out infinite; }
.mk-aur i:nth-child(1) { width: 340px; height: 340px; left: -80px; top: -140px; background: #FF5A36; opacity: .35; }
.mk-aur i:nth-child(2) { width: 300px; height: 300px; right: 8%; top: -160px; background: #7C5CFF; animation-delay: -5s; }
.mk-aur i:nth-child(3) { width: 260px; height: 260px; right: -60px; bottom: -150px; background: #14B8A6; opacity: .4; animation-delay: -9s; }
.mk-hero:not(.on) .mk-aur i { opacity: .18; animation-play-state: paused; }
@keyframes mkFloat { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, 24px) scale(1.12); } }
.mk-hl { display: flex; gap: 16px; align-items: center; min-width: 0; }
/* Аватар: светящийся шар с кольцами (работает — кольца расходятся, готовит пост — быстрее) */
.mk-ava { position: relative; flex: none; width: 64px; height: 64px; display: grid; place-items: center; }
.mk-core { position: relative; z-index: 1; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 32% 28%, #FFB199 0%, #FF6B4A 38%, #C2337A 72%, #5B2BB8 100%); box-shadow: 0 0 0 4px rgba(255, 255, 255, .08), 0 12px 36px -6px rgba(255, 90, 54, .8); }
.mk-core .ico { filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25)); }
.mk-hero.on .mk-core { animation: mkBreath 3.6s ease-in-out infinite; }
.mk-hero:not(.on) .mk-core { filter: grayscale(.85) brightness(.75); box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); }
@keyframes mkBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.mk-ring { position: absolute; inset: 6px; border-radius: 50%; border: 2px solid rgba(255, 140, 110, .55); opacity: 0; }
.mk-hero.on .mk-ring { animation: mkRing 3.2s ease-out infinite; }
.mk-hero.on .mk-ring.r2 { animation-delay: 1.6s; }
.mk-hero.busy .mk-ring { animation-duration: 1.2s; border-color: rgba(124, 92, 255, .8); }
.mk-hero.busy .mk-ring.r2 { animation-delay: .6s; }
.mk-hero.busy .mk-core { animation: mkSpinHue 1.6s linear infinite; }
@keyframes mkRing { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes mkSpinHue { 0% { filter: hue-rotate(0deg) saturate(1.2); } 100% { filter: hue-rotate(360deg) saturate(1.2); } }
.mk-dot { position: absolute; z-index: 2; right: 5px; bottom: 5px; width: 13px; height: 13px; border-radius: 50%; background: #6B7280; box-shadow: 0 0 0 3px #0D1430; }
.mk-hero.on .mk-dot { background: #22C55E; box-shadow: 0 0 0 3px #0D1430, 0 0 12px #22C55E; }
.mk-hero.busy .mk-dot { background: #A78BFA; box-shadow: 0 0 0 3px #0D1430, 0 0 12px #A78BFA; }
.mk-hi { min-width: 0; }
.mk-role { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.mk-hi h2 { margin: 1px 0 3px; font-size: 22px; line-height: 1.15; color: #fff; letter-spacing: -.02em; }
.mk-status { margin: 0; max-width: 720px; font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, .86); }
.mk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mk-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .9); font-size: 12px; font-weight: 700; text-decoration: none; }
.mk-chip.warn { background: rgba(251, 146, 60, .2); color: #FDBA74; box-shadow: inset 0 0 0 1px rgba(251, 146, 60, .4); }
.mk-hr { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 10px; }
/* Переключатель «Работает / Выключен» */
.mk-sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 800; font-size: 14px; color: #fff; user-select: none; }
.mk-sw.ro { cursor: default; opacity: .8; }
.mk-sw input { position: absolute; opacity: 0; pointer-events: none; }
.mk-swt { position: relative; width: 54px; height: 30px; border-radius: 30px; background: rgba(255, 255, 255, .2); transition: background .2s; }
.mk-swt i { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .2s; }
.mk-sw input:checked + .mk-swt { background: #22C55E; }
.mk-sw input:checked + .mk-swt i { transform: translateX(24px); }
.mk-sw input:focus-visible + .mk-swt { outline: 2px solid #fff; outline-offset: 2px; }
/* «Сделать пост сейчас» */
.mk-go { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px; border: 0; border-radius: 14px; cursor: pointer; text-align: left; color: #fff; font: inherit;
  background: linear-gradient(135deg, #FF7A45 0%, #FF4D6D 55%, #8B5CF6 100%); box-shadow: 0 12px 30px -10px rgba(255, 77, 109, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .15s, box-shadow .15s, filter .15s; }
.mk-go:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 36px -10px rgba(255, 77, 109, .9), inset 0 1px 0 rgba(255, 255, 255, .25); }
.mk-go:disabled { filter: grayscale(.4) brightness(.85); cursor: progress; }
.mk-go:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.mk-go span { display: flex; flex-direction: column; }
.mk-go b { font-size: 14.5px; }
.mk-go small { font-size: 11px; font-weight: 600; opacity: .85; }
.mk-kpi { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .1); }
.mk-kpi > div { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; min-width: 0; }
.mk-kpi .ico { grid-row: 1 / 3; color: rgba(255, 255, 255, .55); }
.mk-kpi b { font-size: 18px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mk-kpi span { font-size: 11px; color: rgba(255, 255, 255, .62); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Работа маркетолога по шагам ---------- */
.mk-run { padding: 18px 20px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); animation: mkIn .3s ease; }
@keyframes mkIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mk-runh { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 16px; }
.mk-runh .spinner.hidden { display: none; }
.mk-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.mk-steps li { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted); transition: background .25s, box-shadow .25s, color .25s; min-width: 0; }
.mk-steps li > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mk-steps li b { font-size: 13px; color: var(--ink-2); }
.mk-steps li small { font-size: 11.5px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.mk-sic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-2); color: var(--muted); }
.mk-steps li.now { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.mk-steps li.now .mk-sic { background: var(--accent); color: #fff; animation: mkPulse 1s ease-in-out infinite; }
.mk-steps li.now b { color: var(--accent-ink, var(--accent)); }
.mk-steps li.done .mk-sic { background: #10B981; color: #fff; }
.mk-steps li.done b { color: var(--ink); }
.mk-steps li.err { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--danger); }
.mk-steps li.err .mk-sic { background: var(--danger); color: #fff; }
.mk-steps li.err small { color: var(--danger); }
@keyframes mkPulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }

/* ---------- Расписание ---------- */
.mk-tl h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
.mk-tl h3 .ico { color: var(--accent); }
.mk-tlr { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.mk-slot { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 10px; border: 0; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  font: inherit; text-align: left; cursor: pointer; color: var(--ink); min-width: 0; transition: box-shadow .15s; }
.mk-slot:disabled { cursor: default; }
.mk-slot:not(:disabled):hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.mk-slot small { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: capitalize; }
.mk-slot b { font-size: 17px; font-variant-numeric: tabular-nums; }
.mk-slot span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-slot.st-review { box-shadow: inset 0 0 0 1.5px #F59E0B; } .mk-slot.st-review span { color: #B45309; }
.mk-slot.st-scheduled span { color: #2563EB; }
.mk-slot.st-published span { color: #047857; }
.mk-slot.st-failed span, .mk-slot.st-missed span { color: var(--danger); }
html[data-theme="dark"] .mk-slot.st-review span { color: #FBBF24; }
html[data-theme="dark"] .mk-slot.st-scheduled span { color: #93C5FD; }
html[data-theme="dark"] .mk-slot.st-published span { color: #6EE7B7; }

/* ---------- Вкладки ---------- */
.mk-tabs-row { display: flex; align-items: center; gap: 10px; }
.mk-tabs-row .mk-tabs { flex: 1; margin: 0; }
.mk-tn { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #F59E0B; color: #fff; font-size: 11px; font-weight: 800; line-height: 17px; text-align: center; }
.mk-none { padding: 24px 0; text-align: center; }

/* ---------- Пустой список ---------- */
.mk-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 44px 20px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mk-empty-art { width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #FF7A45, #8B5CF6); box-shadow: 0 14px 30px -12px rgba(139, 92, 246, .7); transform: rotate(-6deg); }
.mk-empty h3 { margin: 6px 0 0; }
.mk-empty p { max-width: 560px; margin: 0 0 6px; color: var(--muted); line-height: 1.5; }

/* ---------- Посты: компактная карточка (миниатюра → весь пост во всплывающем окне) ---------- */
.mk-filter { margin-bottom: 0; }
.mk-posts { display: flex; flex-direction: column; gap: 10px; }
.mk-post { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 16px; padding: 12px 14px 12px 12px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  scroll-margin-top: 90px; transition: box-shadow .3s; }
.mk-post.focus { animation: mkFocus 2.4s ease; }
@keyframes mkFocus { 0%, 60% { box-shadow: 0 0 0 3px var(--accent), var(--shadow); } 100% { box-shadow: var(--shadow), inset 0 0 0 1px var(--line); } }
.mk-post.st-review { box-shadow: var(--shadow), inset 0 0 0 1.5px color-mix(in srgb, #F59E0B 60%, transparent); }
.mk-post.st-skipped .mk-thumb, .mk-post.st-missed .mk-thumb { opacity: .55; }
/* Миниатюра картинки поста */
.mk-thumb { position: relative; align-self: start; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in;
  background: #1E2A55; box-shadow: inset 0 0 0 1px var(--line); font: inherit; }
.mk-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.mk-thumb:hover img { transform: scale(1.04); }
.mk-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-noimg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 100%; background: var(--surface-2); color: var(--muted); }
.mk-noimg small { font-size: 11px; font-weight: 700; }
.mk-thumb-l { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 4px 6px; border-radius: 8px;
  background: rgba(8, 12, 30, .62); backdrop-filter: blur(6px); color: #fff; font-size: 11px; font-weight: 700; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.mk-thumb:hover .mk-thumb-l, .mk-thumb:focus-visible .mk-thumb-l { opacity: 1; transform: none; }
@media (hover: none) { .mk-thumb-l { opacity: 1; transform: none; } }
/* Правая часть */
.mk-pm { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; gap: 7px 14px; min-width: 0; }
.mk-pm > * { grid-column: 1 / -1; min-width: 0; }
.mk-pm > .mk-ph { grid-column: 1; }
.mk-ph { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.mk-ph > span { display: inline-flex; align-items: center; gap: 4px; }
.mk-st { padding: 3px 9px; border-radius: 999px; font-weight: 800; font-size: 11.5px; background: var(--bg-2); color: var(--ink-2); }
.mk-st.st-review { background: #FEF3C7; color: #92400E; }
.mk-st.st-scheduled { background: #DBEAFE; color: #1E40AF; }
.mk-st.st-published { background: #DCFCE7; color: #047857; }
.mk-st.st-failed, .mk-st.st-missed { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
html[data-theme="dark"] .mk-st.st-review { background: rgba(245, 158, 11, .16); color: #FCD34D; }
html[data-theme="dark"] .mk-st.st-scheduled { background: rgba(59, 130, 246, .18); color: #93C5FD; }
html[data-theme="dark"] .mk-st.st-published { background: rgba(16, 185, 129, .16); color: #6EE7B7; }
.mk-th { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink, var(--accent)); font-weight: 700; }
.mk-src { font-weight: 600; }
.mk-tt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; min-width: 0; }
.mk-pm h3 { margin: 0; min-width: 0; max-width: 100%; font-size: 16px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-place { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 5px; margin: 0; font-size: 13px; color: var(--ink-2); }
.mk-place .ico { color: var(--accent); }
.mk-place i { font-style: normal; color: var(--muted); }
.mk-err { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: 10px; background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.mk-err .ico { flex: none; margin-top: 1px; }
/* Проверка мест и цен перед публикацией */
.mk-pchk { display: flex; gap: 6px; align-items: center; margin: 0; padding: 5px 9px; border-radius: 9px; font-size: 12.5px; font-weight: 600; line-height: 1.4; min-width: 0; }
.mk-pchk > .ico, .mk-pchk > .spinner { flex: none; }
.mk-pchk > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-pchk em { margin-left: auto; padding-left: 6px; flex: none; font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--muted); }
.mk-pchk .spinner { width: 13px; height: 13px; }
.mk-pchk.wrap { align-items: flex-start; }
.mk-pchk.wrap > .ico, .mk-pchk.wrap > .spinner { margin-top: 2px; }
.mk-pchk.wrap > span { white-space: normal; overflow: visible; }
@media (max-width: 600px) { .mk-pchk > span { white-space: normal; } }
.mk-pchk a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.mk-pchk.run { background: color-mix(in srgb, #2F6FED 10%, var(--surface)); color: #1D4ED8; }
.mk-pchk.ok { background: color-mix(in srgb, #16A34A 10%, var(--surface)); color: #15803D; }
.mk-pchk.upd { background: color-mix(in srgb, #2F6FED 9%, var(--surface)); color: #1D4ED8; }
.mk-pchk.bad { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
.mk-pchk.wait, .mk-pchk.mute { padding: 0; background: none; color: var(--muted); font-weight: 500; }
html[data-theme="dark"] .mk-pchk.run, html[data-theme="dark"] .mk-pchk.upd { color: #93C5FD; }
html[data-theme="dark"] .mk-pchk.ok { color: #6EE7B7; }
.mk-why { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.mk-why > .ico { flex: none; margin-top: 2px; color: #8B5CF6; }
.mk-why span { min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-why b { color: var(--muted); font-weight: 700; }
/* Отели — плитками в ряд (сколько влезает по ширине) */
.mk-tours { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px; }
.mk-tours > div { display: flex; align-items: center; gap: 10px; padding: 6px 10px; min-width: 0; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.mk-tours .grow { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.mk-tours b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-tours b i { font-style: normal; color: #F59E0B; font-weight: 800; margin-left: 2px; }
.mk-tours small { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-tours em { flex: none; font-style: normal; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
/* Начало текста поста — одна строка, по клику весь пост */
.mk-cap { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.mk-cap:hover { color: var(--ink-2); }
/* Ссылки — справа в строке статуса; действия — внизу карточки */
.mk-acts { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 2px; }
.mk-pm > .mk-links { grid-column: 2; grid-row: 1; align-self: center; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 14px; }
.mk-links a, .mk-lk { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--accent-ink, var(--accent)); text-decoration: none; cursor: pointer; white-space: nowrap; }
.mk-links a:hover, .mk-lk:hover { text-decoration: underline; }
.mk-pub { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.mk-edit { display: flex; flex-direction: column; gap: 8px; }
.mk-edit textarea { width: 100%; min-height: 220px; resize: vertical; font-size: 14px; line-height: 1.5; }
.mk-edit-f { display: flex; align-items: center; gap: 8px; }
.mk-edit-f small { flex: 1; color: var(--muted); font-size: 12px; }
.mk-edit-f small.warn { color: var(--danger); font-weight: 700; }
/* Окно «Пост как в Telegram» */
.modal.mk-tgm { max-width: 460px; }
.modal.mk-tgm .mb { padding: 14px; }

/* ---------- Пост как в Telegram ---------- */
.tgp { --tg-bg: #DCE8D6; --tg-msg: #FFFFFF; --tg-ink: #0F1419; --tg-link: #168ACD; --tg-kb: rgba(53, 74, 64, .28); border-radius: 18px; padding: 10px 10px 12px;
  background: var(--tg-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cg fill='%23000' fill-opacity='.035'%3E%3Ccircle cx='10' cy='10' r='3'/%3E%3Ccircle cx='40' cy='35' r='2'/%3E%3Cpath d='M30 8l4 4-4 4-4-4z'/%3E%3C/g%3E%3C/svg%3E"); }
html[data-theme="dark"] .tgp { --tg-bg: #0E1621; --tg-msg: #182533; --tg-ink: #F5F5F5; --tg-link: #6AB3F3; --tg-kb: rgba(255, 255, 255, .1); }
.tgp-h { display: flex; align-items: center; gap: 10px; padding: 2px 4px 10px; }
.tgp-av { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, #FF7A45, #8B5CF6); }
.tgp-h b { display: block; font-size: 14px; color: var(--tg-ink); }
.tgp-h small { font-size: 12px; color: color-mix(in srgb, var(--tg-ink) 55%, transparent); }
.tgp-msg { position: relative; overflow: hidden; border-radius: 14px; background: var(--tg-msg); box-shadow: 0 1px 1px rgba(0, 0, 0, .12); color: var(--tg-ink); }
.tgp-msg img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: #1E2A55; }
.tgp-noimg { display: flex; align-items: center; gap: 8px; padding: 12px; font-size: 12.5px; color: color-mix(in srgb, var(--tg-ink) 55%, transparent); }
.tgp-t { padding: 8px 12px 4px; font-size: 14px; line-height: 1.42; white-space: pre-wrap; overflow-wrap: anywhere; }
.tgp-t a { color: var(--tg-link); }
.tgp-t.clamp { max-height: 300px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.tgp-more { display: block; margin: 0 12px 4px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--tg-link); cursor: pointer; }
.tgp-time { display: block; padding: 0 10px 6px; text-align: right; font-size: 11px; color: color-mix(in srgb, var(--tg-ink) 45%, transparent); }
.tgp-kb { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.tgp-kb > div { display: flex; gap: 4px; }
.tgp-kb span { flex: 1; padding: 9px 8px; border-radius: 10px; background: var(--tg-kb); color: #fff; font-size: 13px; font-weight: 600; text-align: center; backdrop-filter: blur(6px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Журнал ---------- */
.mk-log { display: flex; flex-direction: column; padding: 6px 18px 12px; border-radius: 22px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mk-log h4 { margin: 14px 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mk-li { position: relative; display: flex; gap: 12px; padding: 7px 0; }
.mk-li + .mk-li::before { content: ''; position: absolute; left: 15px; top: -9px; height: 14px; width: 2px; background: var(--line); }
.mk-lic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-3); }
.mk-li p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink); }
.mk-li small { font-size: 12px; color: var(--muted); }
.mk-li.k-publish .mk-lic { background: #DCFCE7; color: #047857; box-shadow: none; }
.mk-li.k-pick .mk-lic, .mk-li.k-write .mk-lic, .mk-li.k-design .mk-lic { background: var(--accent-soft); color: var(--accent-ink, var(--accent)); box-shadow: none; }
.mk-li.k-review .mk-lic, .mk-li.k-approve .mk-lic { background: #FEF3C7; color: #B45309; box-shadow: none; }
.mk-li.k-check .mk-lic { background: #DBEAFE; color: #1D4ED8; box-shadow: none; }
html[data-theme="dark"] .mk-li.k-check .mk-lic { background: rgba(59, 130, 246, .18); color: #93C5FD; }
.mk-li.k-error .mk-lic, .mk-li.k-warn .mk-lic { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); box-shadow: none; }
html[data-theme="dark"] .mk-li.k-publish .mk-lic { background: rgba(16, 185, 129, .16); color: #6EE7B7; }
html[data-theme="dark"] .mk-li.k-review .mk-lic, html[data-theme="dark"] .mk-li.k-approve .mk-lic { background: rgba(245, 158, 11, .16); color: #FCD34D; }

/* ---------- Настройки ---------- */
.mk-set { display: flex; flex-direction: column; gap: 14px; }
.mk-card { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mk-card h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.mk-card h3 .ico { color: var(--accent); }
.mk-card .field { margin: 0; }
.mk-seg { flex-wrap: wrap; }
.mk-seg button { padding: 7px 13px; }
.mk-seg button:disabled { cursor: default; }
.mk-hint, .field .mk-hint { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.mk-hint .ico { flex: none; margin-top: 1px; }
.mk-hint.warn { color: #B45309; }
html[data-theme="dark"] .mk-hint.warn { color: #FBBF24; }
.mk-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mk-mode { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 2px; padding: 14px; border: 0; border-radius: 16px; background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; text-align: left; color: var(--ink); cursor: pointer; transition: box-shadow .15s, background .15s; }
.mk-mode .ico { grid-row: 1 / 3; margin-top: 2px; color: var(--muted); }
.mk-mode b { font-size: 14.5px; }
.mk-mode small { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.mk-mode.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.mk-mode.on .ico { color: var(--accent); }
.mk-mode:disabled { cursor: default; }
/* Постов в день: − N + и быстрый выбор; время каждого поста — сеткой с номером */
.mk-pd { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.mk-pds { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2); }
.mk-pds button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); font: 700 20px/1 var(--font, inherit); cursor: pointer; box-shadow: 0 1px 2px rgba(11,31,58,.10); }
.mk-pds button:hover:not(:disabled) { color: var(--accent); }
.mk-pds button:disabled { opacity: .4; cursor: default; }
.mk-pds .input { width: 64px; height: 36px; padding: 0 4px; text-align: center; font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; border: 0; background: transparent; box-shadow: none; -moz-appearance: textfield; appearance: textfield; }
.mk-pds .input::-webkit-outer-spin-button, .mk-pds .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mk-pd-q { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-pd-q .c5-chip { min-width: 40px; justify-content: center; }
.mk-tl { display: flex !important; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mk-tl .btn { display: inline-flex; align-items: center; gap: 6px; }
.mk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.mk-time { position: relative; display: block; margin: 0; }
.mk-time[hidden] { display: none; }
.mk-time em { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font: 800 11px/1 var(--font, inherit); color: var(--muted); pointer-events: none; }
.mk-times .input { width: 100%; padding-left: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
#mkPdHint span, #mkTimeHint span { min-width: 0; }
.mk-days, .mk-dests { display: flex; flex-wrap: wrap; gap: 6px; }
/* Каналы для публикации — можно несколько */
.mk-chans { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.mk-chan { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border: 0; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: box-shadow .15s, background .15s; }
.mk-chan:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--accent); }
.mk-chan:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-chan:disabled { cursor: default; opacity: .75; }
.mk-chan > span { display: grid; min-width: 0; }
.mk-chan b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-chan small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-chk { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 0 0 1.5px var(--line); color: transparent; transition: background .15s, color .15s; }
.mk-chan.on { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--accent); }
.mk-chan.on .mk-chk { background: var(--accent); color: #fff; box-shadow: none; }
.mk-addch { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--accent-ink, var(--accent)); text-decoration: none; }
.mk-addch:hover { text-decoration: underline; }
.mk-chn { font-weight: 800; opacity: .85; }
.mk-dests .c5-chip.sub { padding: 5px 10px; font-size: 12.5px; background: var(--surface-2); }
.mk-dests .c5-chip.sub.on { background: var(--accent); }
.mk-themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mk-theme { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; padding: 10px 12px; border: 0; border-radius: 14px; background: var(--surface-2);
  box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; text-align: left; color: var(--ink); cursor: pointer; transition: box-shadow .15s, background .15s; }
.mk-theme .ico { grid-row: 1 / 3; margin-top: 1px; color: var(--muted); }
.mk-theme b { font-size: 13.5px; }
.mk-theme small { font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.mk-theme.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.mk-theme.on .ico { color: var(--accent); }
.mk-theme:disabled { cursor: default; }
.mk-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
/* «Какие туры брать»: звёзды, питание, ночи, бюджет, проверка условий */
.mk-chips2 { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-chips2.sm { margin-top: 6px; }
.mk-chips2.sm .c5-chip { padding: 4px 10px; font-size: 12.5px; }
.mk-range { display: flex; align-items: center; gap: 8px; }
.mk-range .input { min-width: 0; flex: 1; }
.mk-range i { font-style: normal; color: var(--muted); }
.mk-none { color: var(--muted); font-style: italic; }
.mk-prev { display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.mk-prev:empty { display: none; }
.mk-prev > .ico { flex: none; margin-top: 2px; }
.mk-prev div { display: grid; gap: 2px; min-width: 0; }
.mk-prev b { color: var(--ink); }
.mk-prev span { overflow-wrap: anywhere; }
.mk-prev.ok > .ico { color: #16A34A; }
.mk-prev.warn { box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .45); }
.mk-prev.warn > .ico { color: #D97706; }
.mk-prev.bad { background: rgba(239, 68, 68, .08); box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .45); }
.mk-prev.bad > .ico, .mk-prev.bad b { color: #DC2626; }
.mk-prev.busy { color: var(--muted); align-items: center; }
.mk-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mk-terms { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.mk-terms > .ico { flex: none; color: var(--accent); margin-top: 2px; }
.mk-terms p { margin: 0 0 6px; } .mk-terms p:last-child { margin: 0; }
.mk-save { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: flex-end; }
.mk-save .btn { box-shadow: 0 10px 30px -10px rgba(255, 90, 54, .6); }

/* ---------- Свои настройки у каждого канала ---------- */
/* Вкладки каналов — липкие, чтобы при прокрутке длинных настроек было видно, какой канал меняете */
.mk-chtabs { position: sticky; top: 8px; z-index: 6; display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 16px; overflow-x: auto; scrollbar-width: none;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.mk-chtabs::-webkit-scrollbar { display: none; }
.mk-chtabs-l { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px 0 6px; font-size: 12.5px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.mk-chtabs-l .ico { color: var(--accent); }
.mk-chtab { flex: none; display: flex; align-items: center; gap: 9px; max-width: 260px; padding: 8px 14px 8px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2);
  font: inherit; text-align: left; cursor: pointer; transition: background .15s, box-shadow .15s, color .15s; }
.mk-chtab:hover { background: var(--surface-2); }
.mk-chtab:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.mk-chtab > span { display: grid; min-width: 0; }
.mk-chtab b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-chtab small { font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.mk-chtab.on { background: var(--accent-soft); color: var(--accent-ink, var(--accent)); box-shadow: inset 0 0 0 1.5px var(--accent); }
.mk-chdot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px color-mix(in srgb, #22C55E 22%, transparent); }
.mk-chtab.off .mk-chdot { background: var(--muted); box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted) 18%, transparent); }
.mk-chtab.off b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
/* Шапка выбранного канала: название, «Готовить посты для канала», копирование настроек */
.mk-chhead { gap: 10px; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, var(--line)); }
.mk-chhead.off { box-shadow: inset 0 0 0 1.5px var(--line); }
.mk-chh { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.mk-chh > div { flex: 1; min-width: 180px; display: grid; }
.mk-chh b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-chh small { font-size: 12.5px; color: var(--muted); }
.mk-chon { font-size: 13.5px; }
.mk-chcopy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.mk-chcopy .ico { color: var(--muted); }
.mk-chcopy .input { width: auto; min-width: 200px; height: 34px; padding-top: 0; padding-bottom: 0; font-size: 13px; }
/* Настройки канала — с цветной линией слева: видно, что это настройки одного канала */
.mk-chset { display: flex; flex-direction: column; gap: 14px; }
.mk-chset.split { position: relative; padding-left: 14px; }
.mk-chset.split::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 15%, transparent)); }
.mk-name { max-width: 360px; }
/* Канал у поста, у времени в расписании и фильтр по каналу */
.mk-chb { padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, #3B82F6 12%, transparent); color: #1D4ED8; font-weight: 700; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme="dark"] .mk-chb { background: rgba(59, 130, 246, .18); color: #93C5FD; }
.mk-slot-ch { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; font-style: normal; font-size: 11px; font-weight: 700; color: #2563EB; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-theme="dark"] .mk-slot-ch { color: #93C5FD; }
.mk-chf .c5-chip .ico { flex: none; }
.mk-chf .c5-chip span { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Окно «Для какого канала сделать пост?» */
.modal.mk-pickm { max-width: 480px; }
.mk-pick { display: flex; flex-direction: column; gap: 8px; }
.mk-pick p { margin: 0 0 4px; line-height: 1.5; }
.mk-pick-ch { display: flex; align-items: center; gap: 12px; padding: 12px; border: 0; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: box-shadow .15s, background .15s; }
.mk-pick-ch:hover, .mk-pick-ch:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.mk-pick-ch > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mk-pick-ch b { font-size: 14.5px; }
.mk-pick-ch b i { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.mk-pick-ch small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-pick-ch > .ico { flex: none; color: var(--muted); }

/* ---------- Отклики поста (в карточке) ---------- */
.mk-stat { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; }
.mk-sn { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mk-sn b { font-weight: 800; }
.mk-sn.on { color: var(--ink); }
.mk-sn.on .ico { color: var(--accent); }
.mk-sv { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 800; }
.mk-sv.wait { background: var(--bg-2); color: var(--muted); }
.mk-sv.good { background: #DCFCE7; color: #047857; }
.mk-sv.none { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); }
html[data-theme="dark"] .mk-sv.good { background: rgba(16, 185, 129, .16); color: #6EE7B7; }
.mk-sact { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.mk-lk.sub { color: var(--muted); font-weight: 800; }

/* ---------- Вкладка «Отклики» ---------- */
.mk-learn { display: flex; flex-direction: column; gap: 12px; }
.mk-lkpi { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mk-lkpi > div { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.mk-lkpi .ico { grid-row: 1 / 3; color: var(--accent); }
.mk-lkpi b { font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mk-lkpi span { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.mk-rep { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mk-how { padding: 12px 16px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mk-how summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.mk-how summary::-webkit-details-marker { display: none; }
.mk-how summary > b { flex: 1; }
.mk-how summary > .ico:last-child { color: var(--muted); transition: transform .2s; }
.mk-how[open] summary > .ico:last-child { transform: rotate(90deg); }
.mk-how > div { padding: 4px 0 0 30px; }
.mk-rep { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, var(--line)); }
.mk-rep > .ico { flex: none; margin-top: 2px; color: var(--accent); }
.mk-how summary > .ico:first-child { flex: none; color: #8B5CF6; }
.mk-rep b, .mk-how b { font-size: 14px; }
.mk-rep p, .mk-how p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.mk-fbg { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.mk-fbc { padding: 12px 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mk-fbc h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 14px; }
.mk-fbc h3 .ico { color: var(--accent); }
.mk-fbt { display: flex; flex-direction: column; }
.mk-fbr { display: grid; grid-template-columns: minmax(0, 1fr) auto 70px auto; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.mk-fbr:first-child { border-top: 0; }
.mk-fbr > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.mk-fbr > b .lnk { font: inherit; text-align: left; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-fbr.paused > b { color: var(--muted); }
.mk-fbn { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.mk-fbbar { height: 6px; border-radius: 6px; background: var(--bg-2); overflow: hidden; }
.mk-fbbar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), #8B5CF6); }
.mk-fb { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.mk-fb.good { background: #DCFCE7; color: #047857; }
.mk-fb.pause { background: #FEF3C7; color: #92400E; }
.mk-fb.some { background: color-mix(in srgb, #3B82F6 12%, transparent); color: #1D4ED8; }
html[data-theme="dark"] .mk-fb.some { background: rgba(59, 130, 246, .18); color: #93C5FD; }
.mk-fb.few { background: var(--bg-2); color: var(--muted); }
.mk-fb.none { background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); }
html[data-theme="dark"] .mk-fb.good { background: rgba(16, 185, 129, .16); color: #6EE7B7; }
html[data-theme="dark"] .mk-fb.pause { background: rgba(245, 158, 11, .16); color: #FCD34D; }
/* Настройки: «Учиться на откликах», «🤖 Подобрать тур» */
.mk-sws { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mk-swl { align-items: flex-start !important; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 400 !important; }
.mk-swl > .sw { flex: none; margin-top: 2px; }
.mk-swl > span:last-child { display: grid; gap: 2px; min-width: 0; }
.mk-swl b { font-size: 13.5px; font-weight: 800; color: var(--ink); }
.mk-swl small { font-size: 12px; line-height: 1.45; color: var(--muted); }

/* ---------- Адаптив ---------- */
@media (max-width: 1200px) {
  .mk-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-tlr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .mk-hero { grid-template-columns: 1fr; }
  .mk-hr { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .mk-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; }
}
@media (max-width: 700px) {
  .mk-hero { padding: 14px 14px 12px; border-radius: 18px; }
  .mk-hl { gap: 14px; align-items: flex-start; }
  .mk-ava { width: 54px; height: 54px; } .mk-core { width: 44px; height: 44px; } .mk-core .ico { width: 20px; height: 20px; }
  .mk-dot { right: 3px; bottom: 3px; width: 11px; height: 11px; }
  .mk-hi h2 { font-size: 19px; } .mk-status { font-size: 13px; }
  .mk-go { width: 100%; justify-content: center; }
  .mk-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-kpi > div:last-child { grid-column: 1 / -1; }
  .mk-kpi span { white-space: normal; line-height: 1.3; }
  .mk-steps { grid-template-columns: 1fr; gap: 6px; }
  .mk-steps li { flex-direction: row; align-items: center; padding: 10px; }
  .mk-tlr { display: flex; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .mk-slot { flex: none; width: 128px; }
  .mk-tabs-row { flex-wrap: wrap; }
  .mk-post { grid-template-columns: 84px minmax(0, 1fr); padding: 10px; gap: 10px; border-radius: 16px; }
  .mk-tours { grid-template-columns: 1fr; gap: 4px; }
  .mk-tours > div { padding: 5px 10px; }
  .mk-pm h3 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  /* На телефоне: миниатюра рядом со статусом и заголовком, остальное — на всю ширину карточки */
  .mk-post { row-gap: 8px; align-items: start; }
  .mk-pm { display: contents; }
  .mk-thumb { grid-row: 1 / span 2; }
  .mk-pm > *, .mk-pm > .mk-ph { grid-column: 2; min-width: 0; }
  .mk-pm > .mk-err, .mk-pm > .mk-pchk, .mk-pm > .mk-why, .mk-pm > .mk-tours, .mk-pm > .mk-cap, .mk-pm > .mk-edit, .mk-pm > .mk-acts { grid-column: 1 / -1; }
  .mk-pm > .mk-links { grid-column: 1 / -1; grid-row: auto; justify-content: flex-start; padding-top: 2px; }
  .mk-tt { flex-direction: column; align-items: flex-start; }
  .mk-acts .btn { flex: 1 1 auto; justify-content: center; }
  .mk-modes, .mk-themes, .mk-grid3, .mk-grid2 { grid-template-columns: 1fr; }
  .mk-card { padding: 16px 14px; }
  .mk-chtabs { top: 4px; margin-inline: -4px; }
  .mk-lkpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mk-lkpi > div:last-child { grid-column: 1 / -1; }
  .mk-fbg { grid-template-columns: 1fr; }
  .mk-fbr { grid-template-columns: minmax(0, 1fr) auto 50px auto; gap: 8px; }
  .mk-sws { grid-template-columns: 1fr; }
  .mk-sact { margin-left: 0; width: 100%; }
  .mk-chtab { max-width: 200px; padding: 7px 12px 7px 9px; }
  .mk-chtabs-l { display: none; }
  .mk-chset.split { padding-left: 10px; }
  .mk-chcopy .input { min-width: 0; flex: 1; }
  .mk-save .btn { width: 100%; justify-content: center; }
}

/* ---------- «Обзор направлений»: до 10 направлений с ценой «от» в одном посте ---------- */
.mk-go2 { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 0; border-radius: 12px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800; color: #fff;
  background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28); transition: background .15s; }
.mk-go2:hover:not(:disabled) { background: rgba(255, 255, 255, .24); }
.mk-go2:disabled { opacity: .6; cursor: progress; }
.mk-go2:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.mk-th.dg { background: rgba(124, 58, 237, .12); color: #6D28D9; }
html[data-theme="dark"] .mk-th.dg { background: rgba(167, 139, 250, .16); color: #C4B5FD; }
.mk-th.us { background: var(--accent-soft); color: var(--accent-ink); }
.mk-slot-ch.dg { color: #7C3AED; }
html[data-theme="dark"] .mk-slot-ch.dg { color: #C4B5FD; }
.mk-tours.dg > div { gap: 8px; }
.mk-dgn { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 11px; font-weight: 800; color: var(--muted); }
.mk-dg { position: relative; }
.mk-dg.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.mk-dgh { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mk-dgsw { font-weight: 700; font-size: 13.5px; }
.mk-dgex { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; }
.mk-dgex b { flex-basis: 100%; font-size: 13.5px; }
.mk-dgex i { font-style: normal; color: var(--muted); font-size: 12px; }
.mk-dgd { margin: -4px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.mk-dgth { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mk-dgtimes { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mk-dgtimes .mk-time { display: flex; align-items: center; gap: 4px; }
.mk-dgtimes .mk-time .input { flex: 1; min-width: 0; }
.mk-dgdel { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.mk-dgdel:hover { background: var(--surface-2); color: var(--danger); }
.mk-dgprev > div { display: grid; gap: 6px; min-width: 0; }
.mk-dgprev b small { font-weight: 600; color: var(--muted); }
.mk-prev .mk-dgl { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.mk-dgl > span { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 12.5px; white-space: nowrap; }
.mk-dgl > span b { font-variant-numeric: tabular-nums; }
.mk-fbr.mk-dgr { grid-template-columns: minmax(120px, 280px) 32px minmax(80px, 1fr); }
.mk-dgr .mk-fbn { text-align: right; }
@media (max-width: 960px) { .mk-go2 { order: 3; } }
@media (max-width: 700px) {
  .mk-go2 { width: 100%; justify-content: center; }
  .mk-dgth { grid-template-columns: 1fr; }
  .mk-fbr.mk-dgr { grid-template-columns: minmax(0, 1fr) auto 70px; }
  .mk-tours.dg > div { padding: 4px 8px; }
  .mk-tours.dg small { display: none; }   /* даты и отели — в «Как в Telegram» */
}

/* ---------- «Другие туры»: что сделать вместо поста ---------- */
.modal.mk-rdm { max-width: 520px; }
.mk-rd { display: flex; flex-direction: column; gap: 8px; }
.mk-rd > p { margin: 0 0 2px; line-height: 1.5; }
.mk-rd-h { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.mk-rd-h span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-rd-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mk-rdo { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 0; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer; font: inherit; color: var(--ink); text-align: left; transition: box-shadow .15s, background .15s; }
.mk-rdo:hover, .mk-rdo:focus-visible { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.mk-rdo > .ico:first-child { flex: none; color: var(--accent); }
.mk-rdo > span { flex: 1; min-width: 0; display: grid; gap: 1px; }
.mk-rdo b { font-size: 14px; }
.mk-rdo small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.mk-rdo > .ico:last-child { flex: none; color: var(--muted); }
.mk-rd-g .mk-rdo > .ico:last-child { display: none; }
.mk-rd-sel { display: flex; gap: 8px; }
.mk-rd-sel .input { flex: 1; min-width: 0; }
.mk-rd-sel .btn { flex: none; display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 520px) { .mk-rd-g { grid-template-columns: 1fr; } .mk-rd-sel { flex-direction: column; } }

/* ---------- Картинка поста: шаблоны из «Выбрать шаблон» ---------- */
.mk-tpls { display: flex; flex-direction: column; gap: 10px; }
.mk-tpls[hidden] { display: none; }
.mk-tplh { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mk-tplh .btn { display: inline-flex; align-items: center; gap: 5px; }
.mk-tplg { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; max-height: 560px; overflow: auto; padding: 2px; scrollbar-width: thin; }
.mk-tpl { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 6px; border: 0; border-radius: 14px; background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font: inherit; color: var(--ink); text-align: left; transition: box-shadow .15s, transform .15s; }
.mk-tpl:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--accent); }
.mk-tpl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-tpl.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2.5px var(--accent); }
.mk-tpl:disabled { cursor: default; }
.mk-tplv { display: grid; place-items: center; aspect-ratio: 4 / 5; border-radius: 9px; overflow: hidden; background: var(--surface); color: var(--muted); }
.mk-tplv canvas { width: 100%; height: 100%; display: block; }
.mk-tplv small { padding: 6px; font-size: 11px; text-align: center; }
.mk-tpl b { font-size: 12.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-tpl em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--muted); }
.mk-tplc { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .35);
  color: transparent; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); transition: background .15s; }
.mk-tpl.on .mk-tplc { background: var(--accent); color: #fff; }
@media (max-width: 700px) { .mk-tplg { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: 470px; } .mk-tpl b { font-size: 11.5px; } }

/* ---------- Источник цен поста (только администратор go7) ---------- */
.mk-lk.on { color: var(--accent); }
.mk-src-t { border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.mk-src-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mk-src-h .ico { color: var(--accent); }
.mk-src-h small { color: var(--muted); font-size: 11.5px; }
.mk-src-s { overflow-x: auto; }
.mk-src-t table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mk-src-t th { padding: 6px 10px; text-align: left; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; }
.mk-src-t td { padding: 6px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.mk-src-t td b, .mk-src-t td small { display: block; }
.mk-src-t td small { color: var(--muted); font-size: 11.5px; }
.mk-src-t td.num { text-align: right; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mk-src-t tr.gone td { color: var(--muted); font-style: italic; }
@media (max-width: 700px) { .mk-pm > .mk-src-t { grid-column: 1 / -1; } .mk-src-t table { min-width: 640px; } }

/* ---------- «Выбрать отели»: отели поста вручную ---------- */
.modal.mk-hpm { max-width: 680px; }
.mk-hp { display: flex; flex-direction: column; gap: 10px; }
.mk-hp > p { margin: 0; line-height: 1.5; }
.mk-hp-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mk-hp-q { flex: 1 1 220px; position: relative; display: flex; align-items: center; }
.mk-hp-q > .ico { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.mk-hp-q .input { padding-left: 34px; width: 100%; }
.mk-hp-bar .c5-chips { flex: none; }
.mk-hp-l { display: flex; flex-direction: column; gap: 6px; max-height: min(52vh, 460px); overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.mk-hp-r { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow .15s, background .15s; }
.mk-hp-r:hover { box-shadow: inset 0 0 0 1.5px var(--line-2); }
.mk-hp-r.on { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--accent); }
.mk-hp-r.off { opacity: .55; cursor: not-allowed; }
.mk-hp-r input { flex: none; width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.mk-hp-r .grow { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mk-hp-r b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-hp-r b i { font-style: normal; color: #D97706; font-size: 12.5px; }
.mk-hp-r b em { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 6px; margin-left: 4px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); vertical-align: 1px; }
.mk-hp-r small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-hp-d { color: #15803D; font-weight: 700; }
html[data-theme="dark"] .mk-hp-d { color: #6EE7B7; }
.mk-hp-p { flex: none; text-align: right; font-weight: 800; font-size: 15px; display: grid; }
.mk-hp-p small { font-size: 11px; font-weight: 500; }
.mk-hp-0 { text-align: center; padding: 18px 0; margin: 0; }
.mk-hp-live { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1.5px dashed var(--line-2); }
.mk-hp-live > b { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.mk-hp-live > div { display: flex; gap: 8px; }
.mk-hp-live .input { flex: 1; min-width: 0; }
.mk-hp-live .btn { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.mk-hp-hs { margin: 0; font-size: 12.5px; display: flex; align-items: center; gap: 6px; line-height: 1.4; }
.mk-hp-hs:empty { display: none; }
.mk-hp-hs .spinner { width: 13px; height: 13px; flex: none; }
.mk-hp-hs.run { color: #1D4ED8; } .mk-hp-hs.done { color: #15803D; } .mk-hp-hs.none { color: var(--muted); }
html[data-theme="dark"] .mk-hp-hs.run { color: #93C5FD; } html[data-theme="dark"] .mk-hp-hs.done { color: #6EE7B7; }
.modal.mk-hpm .mf { align-items: center; }
.mk-hp-rw { display: flex; gap: 8px; align-items: flex-start; margin-right: auto; font-size: 13px; font-weight: 600; cursor: pointer; max-width: 330px; }
.mk-hp-rw input { margin-top: 2px; accent-color: var(--accent); flex: none; }
.mk-hp-rw span { display: grid; gap: 1px; }
.mk-hp-rw small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.mk-hp-n { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.mk-hp-n.bad { color: var(--danger); }
@media (max-width: 600px) {
  .mk-hp-rw { max-width: none; flex: 1 1 100%; }
  .modal.mk-hpm .mf .btn { flex: 1 1 0; justify-content: center; }
  .mk-hp-n { flex: 1 1 100%; }
  .mk-hp-r { padding: 8px 10px; gap: 8px; }
}
.mk-tst { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mk-tst span { font-size: 12px; padding: 3px 8px; border-radius: 8px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.mk-tst span.good { background: color-mix(in srgb, #16A34A 10%, var(--surface)); }
.mk-tst span.bad { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); text-decoration: line-through; text-decoration-thickness: 1px; }

/* ---------- Цены в сумах: курс и округление ---------- */
.mk-fx { margin-top: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 8px; }
.mk-fx[hidden] { display: none; }
.mk-fx .field { margin: 0; }
.mk-fxr { display: flex; align-items: center; gap: 8px; }
.mk-fxr .input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.mk-fxr i { font-style: normal; font-weight: 700; color: var(--muted); flex: none; }
.mk-fx .mk-hint .lnk { padding: 0; font-size: inherit; }

/* ---------- Посты по группам: «В работе», «Опубликованы», «Архив» ---------- */
.mk-pl { display: flex; flex-direction: column; gap: 12px; }
.mk-grp { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 5px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mk-grp-b { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: var(--muted);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .15s, color .15s; }
.mk-grp-b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-grp-b b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 800; line-height: 18px; text-align: center; }
.mk-grp-b:hover { color: var(--ink); background: var(--surface-2); }
.mk-grp-b.on { color: #fff; background: var(--accent); box-shadow: 0 6px 16px -8px var(--accent); }
.mk-grp-b.on b { background: rgba(255, 255, 255, .25); color: #fff; }
.mk-grp-b.hot:not(.on) b { background: #F59E0B; color: #fff; }
.mk-grp-b:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-sec { display: flex; flex-direction: column; gap: 8px; }
.mk-sec h4 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 4px 2px 0; font-size: 14px; font-weight: 800; color: var(--ink); }
.mk-sec h4 b { min-width: 20px; padding: 0 7px; border-radius: 999px; background: var(--surface-2); font-size: 12px; line-height: 18px; text-align: center; color: var(--ink-2); }
.mk-sec h4 small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.mk-sec-review h4 b { background: #F59E0B; color: #fff; }
.mk-sec-bad h4 b { background: var(--danger); color: #fff; }
.mk-done { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px 16px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-style: normal; }
.mk-done .ico { color: #10B981; flex: none; }
.mk-arc-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: 13px; line-height: 1.45; }
.mk-arc-note .ico { flex: none; margin-top: 1px; }
.mk-pmore { display: flex; justify-content: center; padding: 4px 0 8px; }
.mk-pmore .btn small { margin-left: 4px; color: var(--muted); font-weight: 600; }
@media (max-width: 640px) {
  .mk-grp-b { flex-direction: column; gap: 4px; padding: 8px 6px; font-size: 12.5px; }
  .mk-sec h4 small { flex-basis: 100%; }
}

/* ---------- Настройки маркетолога: компактная сетка в 2–3 колонки ----------
   A — общее (публикация, каналы, выбор канала), B — настройки канала (две колонки карточек), D — обзор направлений и условия.
   Широкий экран: A и D — слева, B — справа в две колонки (всего 3 колонки). Средний: всё друг под другом, B — в две колонки. Телефон — одна. */
.mk-set2 { gap: 12px; }
.mk-sl { display: grid; grid-template-columns: minmax(340px, 1fr) minmax(0, 2.15fr); grid-template-rows: auto 1fr; grid-template-areas: "a b" "d b"; gap: 14px; align-items: start; }
.mk-sl-a { grid-area: a; }
.mk-sl-b { grid-area: b; }
.mk-sl-d { grid-area: d; }
.mk-sl-a, .mk-sl-d, .mk-sl-c { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mk-sl-b { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mk-sl-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.mk-set2 .mk-card { gap: 12px; padding: 16px 16px 15px; border-radius: 18px; container-type: inline-size; }
.mk-set2 .mk-card h3 { font-size: 15px; padding-bottom: 10px; margin-bottom: -2px; border-bottom: 1px solid var(--line); }
.mk-set2 .field > span:first-child, .mk-set2 .field > .mk-tl { font-size: 12.5px; }
.mk-set2 .mk-hint { font-size: 12px; margin-top: 5px; }
.mk-set2 .mk-seg { display: flex; flex-wrap: wrap; }
.mk-set2 .mk-seg button { flex: 1 1 auto; }
.mk-set2 .mk-name { max-width: none; }
/* Внутри узких карточек — плотнее */
.mk-set2 .mk-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mk-set2 .mk-sws { grid-template-columns: 1fr; }
.mk-set2 .mk-chans { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
@container (max-width: 420px) {
  .mk-set2 .mk-modes { grid-template-columns: 1fr; }
  .mk-set2 .mk-mode { padding: 11px 12px; }
  .mk-set2 .mk-grid2 { grid-template-columns: 1fr; }
}
@container (min-width: 700px) {
  .mk-set2 .mk-themes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mk-set2 .mk-sws { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Свои настройки у каждого канала: вкладки каналов и шапка канала — над его настройками */
.mk-sl-b .mk-chtabs { position: static; }
.mk-sl-b.split { padding-left: 14px; }
.mk-sl-b .mk-chhead { padding: 12px 16px; box-shadow: var(--shadow), inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, var(--line)); }
.mk-sl-b .mk-chhead.off { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--line); }
.mk-sl-b .mk-chhead .mk-hint { margin-top: 0; }
.mk-set2 .mk-terms { font-size: 12.5px; padding: 12px 14px; }
.mk-set2 .mk-tplg { max-height: 420px; }
@media (max-width: 1500px) {
  .mk-sl { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "a" "b" "d"; }
  .mk-sl-a { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); align-items: start; }
  .mk-sl-a > :only-child { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .mk-sl-a { display: flex; align-items: stretch; }
  .mk-sl-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .mk-sl-b.split { padding-left: 10px; }
  .mk-set2 .mk-card { padding: 14px 13px; }
}
.mk-set2 input.input:not([type="checkbox"]), .mk-set2 select.input { padding: 9px 12px; font-size: 14px; border-radius: 12px; }
.mk-set2 .mk-pds .input { padding: 0 4px; }
.mk-set2 .mk-times .input { padding-left: 28px; }
/* Панель «Сохранить настройки» — всегда видна вверху; есть несохранённые изменения — заметка и подсветка кнопки */
.mk-sbar { position: sticky; top: 8px; z-index: 7; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 16px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.mk-sbar-t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mk-sbar-t > .ico { flex: none; color: var(--accent); }
.mk-sbar-t > span { display: grid; gap: 1px; min-width: 0; }
.mk-sbar-t b { font-size: 14.5px; }
.mk-sbar-t small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-sbar-dirty { display: none !important; color: #D97706 !important; font-weight: 700; }
.mk-sbar-dirty i { width: 8px; height: 8px; border-radius: 50%; background: #F59E0B; box-shadow: 0 0 0 3px color-mix(in srgb, #F59E0B 25%, transparent); }
.mk-set2.dirty .mk-sbar-ok { display: none; }
.mk-set2.dirty .mk-sbar-dirty { display: flex !important; }
.mk-sbar .btn { flex: none; }
.mk-set2:not(.dirty) .mk-sbar .btn { box-shadow: none; }
.mk-set2.dirty .mk-sbar { box-shadow: var(--shadow), inset 0 0 0 1.5px color-mix(in srgb, #F59E0B 55%, var(--line)); }
html[data-theme="dark"] .mk-sbar-dirty { color: #FBBF24 !important; }
@media (max-width: 700px) {
  .mk-sbar { top: 4px; padding: 8px 8px 8px 12px; }
  .mk-sbar-t > .ico, .mk-sbar-ok { display: none !important; }
  .mk-sbar .btn span { display: none; }
  .mk-sbar .btn { padding-inline: 14px; }
}

/* ---------- Расписание — одной строкой (листается вбок, если постов много) ---------- */
.mk-tline { display: flex; align-items: stretch; gap: 8px; padding: 8px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mk-tline h3 { flex: none; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; margin: 0; padding: 0 12px 0 6px;
  border-right: 1px solid var(--line); font-size: 13px; font-weight: 800; color: var(--ink-2); }
.mk-tline h3 .ico { color: var(--accent); }
.mk-tline .mk-tlr { display: flex; flex: 1; min-width: 0; gap: 8px; margin: 0; padding: 0 0 2px; overflow-x: auto; scrollbar-width: thin; scroll-snap-type: x proximity; }
.mk-tline .mk-slot { flex: 1 0 156px; width: auto; max-width: 240px; scroll-snap-align: start; background: var(--surface-2); }
@media (max-width: 700px) {
  .mk-tline { flex-direction: column; gap: 6px; padding: 8px; }
  .mk-tline h3 { flex-direction: row; padding: 2px 4px; border-right: 0; }
  .mk-tline .mk-tlr { margin: 0; padding: 0 0 2px; }
  .mk-tline .mk-slot { flex: 0 0 140px; }
}

/* ---------- Посты — в две колонки на широком экране ---------- */
.mk-post { container-type: inline-size; }
@media (min-width: 1600px) {
  .mk-posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
}
/* Узкая карточка: ссылки («Как в Telegram», «В студии»…) — отдельной строкой под статусом */
@container (max-width: 1050px) {
  .mk-pm > .mk-ph { grid-column: 1 / -1; }
  .mk-pm > .mk-links { grid-column: 1 / -1; grid-row: auto; justify-content: flex-start; }
}

/* ---------- Сводка маркетолога (вместо большой шапки): статус, режим, цифры, кнопки ---------- */
.mk-page .mk-tabs { margin: 0; }
.mk-sum { display: grid; grid-template-columns: minmax(280px, 1.25fr) minmax(0, 1.6fr) auto; align-items: center; gap: 12px 20px; padding: 12px 14px 12px 12px; border-radius: 18px;
  background: linear-gradient(100deg, color-mix(in srgb, #7C3AED 9%, var(--surface)), var(--surface) 46%); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.mk-sum-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mk-sum-ava { position: relative; flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #FF7A45, #8B5CF6); box-shadow: 0 8px 20px -10px rgba(139, 92, 246, .8); }
.mk-sum:not(.on) .mk-sum-ava { filter: grayscale(.85); opacity: .75; }
.mk-sum.busy .mk-sum-core { animation: mkSpinHue 1.6s linear infinite; }
.mk-sum-dot { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px var(--surface); }
.mk-sum.on .mk-sum-dot { background: #22C55E; }
.mk-sum-tx { display: grid; gap: 6px; min-width: 0; }
.mk-sum-tx > p { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.mk-sum-tx > p b { font-size: 14px; color: var(--ink); }
.mk-sum .mk-status { max-width: none; font-size: 13px; color: var(--ink-2); }
.mk-sum .mk-chips { margin: 0; gap: 5px; }
.mk-sum .mk-chip { padding: 2px 9px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.mk-sum .mk-chip .ico { color: var(--accent); }
.mk-sum .mk-chip.warn { background: color-mix(in srgb, #F59E0B 14%, transparent); color: #B45309; box-shadow: inset 0 0 0 1px color-mix(in srgb, #F59E0B 40%, transparent); }
html[data-theme="dark"] .mk-sum .mk-chip.warn { color: #FCD34D; }
.mk-sum .mk-kpi { grid-column: auto; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 0; border: 0; }
.mk-sum .mk-kpi > div { padding: 7px 10px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.mk-sum .mk-kpi .ico { color: var(--muted); }
.mk-sum .mk-kpi b { font-size: 16px; color: var(--ink); }
.mk-sum .mk-kpi span { font-size: 11px; line-height: 1.25; color: var(--muted); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mk-sum-act { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.mk-sum-act .btn { justify-content: center; white-space: nowrap; }
@media (max-width: 1500px) {
  .mk-sum { grid-template-columns: minmax(0, 1fr) auto; }
  .mk-sum .mk-kpi { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 760px) {
  .mk-sum { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .mk-sum .mk-kpi { grid-row: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mk-sum .mk-kpi > div:nth-child(n+4) { grid-column: span 1; }
  .mk-sum .mk-kpi .ico { display: none; }
  .mk-sum .mk-kpi > div { grid-template-columns: 1fr; padding: 6px 9px; }
}

/* ---------- Направления: «Рекламировать только» и «Не рекламировать» ---------- */
.mk-dfield .mk-tl small, .mk-xfield .mk-tl small { margin-left: 6px; font-weight: 700; }
.mk-dq { position: relative; display: flex; align-items: center; margin: 0 0 8px; }
.mk-dq > .ico { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.mk-set2 .mk-dq input.input { padding: 7px 10px 7px 32px; font-size: 13.5px; }
.mk-dscroll { max-height: 236px; overflow-y: auto; padding: 2px; scrollbar-width: thin; }
.mk-dests .c5-chip[hidden] { display: none; }
.mk-dests .c5-chip.xo { opacity: .5; text-decoration: line-through; text-decoration-color: var(--danger); }
.mk-xlist .c5-chip.on { background: var(--danger); color: #fff; box-shadow: none; }
.mk-xlist .c5-chip.on .c5-pcn { background: rgba(255, 255, 255, .22); color: #fff; }
.mk-xsel { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; align-items: center; }
.mk-xchip { gap: 6px; background: color-mix(in srgb, var(--danger) 13%, var(--surface)) !important; color: var(--danger) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 40%, transparent) !important; }
.mk-xchip:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 22%, var(--surface)) !important; }
.mk-xnone { font-size: 12.5px; }
.mk-xpick { margin-top: 8px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.mk-xpick > summary { display: flex; align-items: center; gap: 6px; padding: 8px 12px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 700; color: var(--accent-ink, var(--accent)); }
.mk-xpick > summary::-webkit-details-marker { display: none; }
.mk-xpick[open] > summary { border-bottom: 1px solid var(--line); }
.mk-xpick > .mk-dq, .mk-xpick > .mk-dests { margin: 8px 10px; }
.mk-xpick > .mk-dests { margin-top: 0; }

/* Instagram у маркетолога */
.mk-ig { margin: 4px 0 14px; padding: 14px; border-radius: 16px; border: 1.5px solid rgba(221,42,123,.28); background: linear-gradient(135deg, rgba(245,133,41,.06), rgba(221,42,123,.06) 50%, rgba(129,52,175,.06)); }
.mk-ig h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; }
.mk-ig h4 .igi { color: #DD2A7B; }
.mk-ig .field { margin-bottom: 0; }
.mk-ig .mk-igacc { margin: 4px 0 10px; }
.mk-ig .mk-igacc b { color: var(--ink); }
.mk-igf .mk-chan[disabled] { opacity: .55; cursor: not-allowed; }
.mk-igf { grid-template-columns: 1fr; }
.mk-igf .mk-chan small { white-space: normal; overflow: visible; text-overflow: clip; }

/* Instagram-аккаунт — канал маркетолога */
.mk-chan.ig b { display: flex; align-items: center; gap: 6px; }
.mk-chan.ig b .igi, .mk-chtab b .igi, .mk-slot-ch.ig .igi, .mk-chb.ig .igi, .mk-addch.ig .igi, .mk-igcard h3 .igi { color: #DD2A7B; flex: none; }
.mk-chan.ig.on { background: linear-gradient(135deg, rgba(245,133,41,.08), rgba(221,42,123,.1) 50%, rgba(129,52,175,.08)); box-shadow: inset 0 0 0 1.5px #DD2A7B; }
.mk-chan.ig.on .mk-chk { background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); }
.mk-chan.ig.bad small { color: var(--danger); }
.mk-chtab b { display: inline-flex; align-items: center; gap: 5px; }
.mk-igav { background: linear-gradient(45deg, #F58529 0%, #DD2A7B 45%, #8134AF 75%, #515BD4 100%) !important; color: #fff; display: grid; place-items: center; }
.mk-igav .igi { color: #fff !important; }
.mk-addchs { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.mk-addchs .btn { gap: 8px; }
.mk-igcard { border: 1.5px solid rgba(221,42,123,.28); background: linear-gradient(135deg, rgba(245,133,41,.05), rgba(221,42,123,.05) 50%, rgba(129,52,175,.05)), var(--surface); }
.mk-igcard .mk-igf { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 8px; }
.mk-slot-ch .igi, .mk-chb .igi { vertical-align: -1px; }
.mk-vtf { margin-top: 4px; }
.mk-vts { max-height: 230px; }
.mk-vts .c5-chip svg { color: #DD2A7B; }
.mk-vtg { flex-basis: 100%; font-size: 12px; font-weight: 700; color: var(--muted); margin: 6px 0 0; }
.mk-vts .c5-chip.on svg { color: inherit; }

/* Reels по видео-шаблону в карточке поста */
.mk-reel { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border-radius: 12px; margin: 6px 0;
  background: linear-gradient(135deg, rgba(245,133,41,.08), rgba(221,42,123,.09) 50%, rgba(129,52,175,.08)); box-shadow: inset 0 0 0 1px rgba(221,42,123,.25); font-size: 13.5px; }
.mk-reel > svg { color: #DD2A7B; flex: none; }
.mk-reel .grow { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.mk-reel small { color: var(--muted); font-size: 12.5px; }
.mk-reel em { font-style: normal; font-weight: 800; color: #DD2A7B; min-width: 40px; text-align: right; }
.mk-reel.ok { box-shadow: inset 0 0 0 1.5px var(--teal-ink, #0F8A6A); }
.mk-reel.ok > svg { color: var(--teal-ink, #0F8A6A); }
.mk-reel.bad { background: var(--danger-soft); box-shadow: none; }
.mk-reel.bad > svg { color: var(--danger); }
.mk-reel .spinner { width: 16px; height: 16px; flex: none; }
.mk-reel-bar { display: block; height: 6px; border-radius: 99px; background: rgba(221,42,123,.15); overflow: hidden; margin-top: 4px; }
.mk-reel-bar i { display: block; height: 100%; background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); transition: width .25s; }
.mk-thumb { position: relative; }
.mk-thumb-r { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 99px; font: 800 11px var(--font);
  color: #fff; background: rgba(11,31,58,.72); }
.mk-thumb-r.ok { background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF); }
.mk-reelv { display: grid; gap: 8px; justify-items: center; }
.mk-reelv video { width: min(100%, 360px); aspect-ratio: 9 / 16; border-radius: 14px; background: #000; }
.mk-reelv small { color: var(--muted); }
