/* «Плейлисты», мастер настройки и редактор каналов. */

.btn-sm { min-height: 34px; padding: 7px 12px 5px; font-size: 12px; }
.req { color: var(--orange); margin-left: 3px; font-weight: 700; }
.warn-text { color: #8f2f29; font-size: 14px; line-height: 19px; margin-top: 10px; }
.warn-text.small { font-size: 13px; margin: 0; }
.modal-mark.is-warn { background: var(--orange-soft); color: #b36b00; }
.modal.is-mid { width: min(560px, calc(100vw - 32px)); }
.icon.flip { transform: scaleX(-1); }
.page-explain { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--muted); font-size: 14px; }
.page-explain .icon { color: var(--purple-600); }

/* Разделы страницы */
.section + .section { margin-top: 28px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.section-head h2 { font-size: 18px; line-height: 24px; }
.section-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
/* Кнопка шапки не сжимается: длинное пояснение переносится, а не режет кнопку (раздел «Программа передач»). */
.section-head > .btn { flex: none; }

/* Строки плейлистов и списков */
.lrow { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(200px, 1.4fr) minmax(170px, 1fr) auto; align-items: center; gap: 16px; padding: 14px 16px; border-top: 1px solid var(--line); min-height: 72px; }
.lrow:first-child { border-top: 0; }
.lcell-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lrow-name { display: block; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.lrow-name:hover { color: var(--purple-700); text-decoration: underline; text-underline-offset: 3px; }
.lcell-info { display: grid; gap: 3px; font-size: 14px; min-width: 0; }
.lcell-info .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lcell-act { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.lcell-act .icon-btn { margin-right: -11px; }
/* Свои источники программы передач: адрес и кнопка «убрать» */
.lrow.erow { grid-template-columns: minmax(0, 1fr) auto; min-height: 64px; }
.erow .dev-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.erow-empty { margin: 0; padding: 18px 16px; color: var(--muted); font-size: 14px; }
.limit-chip { display: inline-flex; align-items: center; gap: 6px; width: max-content; height: 26px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-xs); background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
button.limit-chip { cursor: pointer; }
button.limit-chip:hover { border-color: var(--violet); background: var(--tint); }
.limit-chip.is-over { border-color: var(--red-line); background: var(--red-soft); color: #8f2f29; }
.limit-meter { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--tint); color: var(--ink-2); font-size: 14px; font-weight: 600; }
.limit-meter .icon { color: var(--purple-600); }
.limit-meter.is-over { background: var(--red-soft); color: #8f2f29; }
.limit-meter.is-over .icon { color: var(--red); }

/* Списки с галочками / выбором */
.check-list { display: grid; gap: 8px; margin-top: 14px; }
.check-row { position: relative; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.check-row:hover { border-color: var(--violet); }
.check-row.is-on { border-color: var(--purple); background: #fafaff; box-shadow: 0 0 0 1px var(--purple) inset; }
.check-row .check { flex: none; }
.check-row-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.check-row-text b { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row-text span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row .row-check { color: var(--purple); width: 20px; height: 20px; stroke-width: 2.2; }
.vh-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-row:focus-within { box-shadow: var(--focus); }

/* Карточки выбора (радио) */
.rcards { display: grid; gap: 10px; margin-top: 16px; }
.rcards.two { grid-template-columns: 1fr 1fr; }
.rcard { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.rcard input { position: absolute; opacity: 0; }
.rcard-dot { flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; transition: border-color .16s; }
.rcard.is-on { border-color: var(--purple); background: #fafaff; box-shadow: 0 0 0 1px var(--purple) inset; }
.rcard.is-on .rcard-dot { border-color: var(--purple); }
.rcard.is-on .rcard-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--purple); }
.rcard:focus-within { box-shadow: var(--focus); }
.rcard-text { display: grid; gap: 3px; min-width: 0; }
.rcard-text b { font-weight: 600; font-size: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rcard-text span { font-size: 13.5px; line-height: 18px; color: var(--muted); }
.rcard .badge { height: 20px; font-size: 11px; }

/* Мастер */
.wz-steps { list-style: none; margin: 0 0 14px; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.wz-step { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 6px; border-radius: var(--r-xs); background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13.5px; font-weight: 600; }
.wz-step:empty { display: none; }
.wz-step i { width: 24px; height: 24px; border-radius: var(--r-xs); display: inline-grid; place-items: center; font-style: normal; font-size: 12px; background: var(--bg); color: var(--muted); }
.wz-step small { font-weight: 500; color: var(--faint); margin-left: 6px; font-size: 11.5px; }
.wz-step.is-on { border-color: var(--purple); color: var(--ink); box-shadow: 0 0 0 1px var(--purple) inset; }
.wz-step.is-on i { background: var(--orange); color: var(--ink); }
.wz-step.is-done { color: var(--ink-2); }
.wz-step.is-done i { background: var(--green); color: #fff; }
.wz { max-width: 840px; }
.wz-body { padding: 28px 32px 8px; min-height: 452px; }
.wz-body .check-list { max-height: 276px; overflow: auto; padding: 2px; margin-inline: -2px; overscroll-behavior: contain; }
.wz-body > h2 { font-size: 22px; line-height: 28px; }
.wz-lead { color: var(--muted); margin-top: 6px; max-width: 640px; }
.wz-body .tabs { margin-top: 16px; max-width: 600px; }
.wz-body .field { margin-top: 16px; }
.wz-body .onb-note, .wz-body .demo-hint, .wz-body .found, .wz-body .err-box, .wz-body .checklist { margin-top: 14px; }
.wz-foot { display: flex; align-items: center; gap: 8px; padding: 16px 32px; border-top: 1px solid var(--line); }
.wz-foot .btn-quiet:first-child { margin-left: -10px; }
.wz-spacer { flex: 1; }
.wz-pair { margin-top: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.input-row { display: flex; gap: 8px; }
.input-row .btn { flex: none; min-height: 44px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-xs); background: var(--surface); width: max-content; }
.stepper .icon-btn { width: 44px; height: 42px; font-size: 20px; font-weight: 500; color: var(--ink); border-radius: 0; }
.stepper .icon-btn:disabled { color: #c9c6d9; cursor: not-allowed; background: none; }
.stepper .input { width: 56px; min-height: 42px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; text-align: center; font-weight: 600; font-size: 16px; padding: 0; }
.stepper .input:focus { box-shadow: inset 0 0 0 2px var(--purple); }
.drop { display: grid; justify-items: center; gap: 6px; margin-top: 16px; padding: 30px 20px; border: 1.5px dashed var(--line-2); border-radius: var(--r-md); background: #fbfbfe; text-align: center; cursor: pointer; transition: border-color .16s, background-color .16s; }
.drop:hover, .drop.is-over, .drop:focus-within { border-color: var(--purple); background: var(--tint); }
.drop.is-error { border-color: var(--red-line); }
.drop-mark { width: 48px; height: 48px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--tint-2); color: var(--purple-600); margin-bottom: 4px; }
.drop b { font-weight: 600; }
.drop span { color: var(--muted); font-size: 14px; }
.drop small { color: var(--faint); font-size: 12.5px; }
.link-like { color: var(--purple-600); text-decoration: underline; text-underline-offset: 3px; }
.file-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 6px 10px 14px; border: 1px solid var(--line); border-radius: var(--r-md); }
.file-row .file-name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checklist { list-style: none; margin: 0; padding: 18px 20px; display: grid; gap: 14px; border-radius: var(--r-md); background: #fafaff; border: 1px solid var(--line); }
.checklist li { display: flex; align-items: center; gap: 12px; color: var(--faint); font-weight: 500; }
.checklist li.is-on { color: var(--ink); }
.checklist li.is-done { color: var(--ink-2); }
.checklist li.is-done .icon { color: var(--green); stroke-width: 2.4; }
.spinner.sm { width: 20px; height: 20px; border-width: 2px; }
.dotc { width: 20px; height: 20px; border-radius: var(--r-xs); border: 2px solid var(--line-2); }
.err-box { display: flex; gap: 14px; padding: 18px 20px; border-radius: var(--r-md); background: var(--red-soft); border: 1px solid #f5c9c5; }
.err-box > .icon { color: var(--red); }
.err-box h3 { font-size: 16px; }
.err-box p { color: var(--ink-2); margin-top: 4px; font-size: 14px; line-height: 20px; }
.err-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.send-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.summary { margin-top: 14px; padding: 16px; border-radius: var(--r-md); background: var(--bg); display: grid; gap: 12px; }
.summary h3 { font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.summary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.summary li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 19px; font-weight: 600; }
.summary li .icon { color: var(--purple-600); flex: none; }
.stack-form { display: grid; gap: 16px; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.field-msg.is-err { color: var(--red); }

/* Редактор */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--purple-600); text-decoration: none; }
.back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ed-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ed-label { font-size: 28px; line-height: 34px; font-weight: 700; color: var(--ink); }
.ed-switch { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 460px; padding: 0 6px; margin-left: -2px; border: 0; border-radius: var(--r-xs); background: none; color: var(--purple-600); font-size: 28px; line-height: 34px; font-weight: 700; }
.ed-switch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-switch .icon { width: 22px; height: 22px; flex: none; }
.ed-switch:hover, .ed-switch[aria-expanded=true] { background: var(--tint); color: var(--purple-700); }
.ed-switch:focus-visible { outline: none; box-shadow: var(--focus); }
.ed-head .pagehead-sub { max-width: 620px; margin-top: 6px; }
/* Владелец 01.10: кнопки опущены на уровень описания, название списка — во всю ширину над ними; высота шапки
   прежняя (описание и так выше ряда кнопок). На узком экране — как было: кнопки строкой под текстом. */
@media (min-width: 761px) {
  .ed-head .pagehead-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "back back" "title title" "sub act"; align-items: end; gap: 0 24px; }
  .ed-head .pagehead-text { display: contents; }
  .ed-head .back-link { grid-area: back; justify-self: start; }
  .ed-head .ed-title { grid-area: title; }
  .ed-head .pagehead-sub { grid-area: sub; align-self: start; }
  .ed-head .ed-actions { grid-area: act; }
  .ed-head .ed-switch { max-width: 100%; }
}
.ed-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ed-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #8a5200; font-weight: 600; }
.icon-btn-framed { border: 1px solid var(--line-2); width: 40px; height: 40px; }
.ed-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; font-size: 14px; }
.meta-sep { width: 1px; height: 18px; background: var(--line-2); }
.src-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 8px; border-radius: var(--r-xs); background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.src-chip .icon { color: var(--purple-600); }
.src-chip:not(:has(.src-x)) { padding-right: 10px; }
.src-x { width: 22px; height: 22px; border: 0; border-radius: var(--r-xs); background: none; display: grid; place-items: center; color: var(--muted); }
.src-x:hover { background: var(--red-soft); color: var(--red); }
.ed-page .onb-note { margin: 0 0 14px; }
.ed-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; align-items: start; }
.ed-grid.is-collapsed { grid-template-columns: 56px minmax(0, 1fr); }
.ed-grid.is-collapsed .ed-groups > :not(.ed-panel-head) { display: none; }
.ed-grid.is-collapsed .ed-panel-head h2, .ed-grid.is-collapsed .ed-panel-head .small { display: none; }
.ed-grid.is-collapsed .ed-collapse .icon { transform: rotate(180deg); }
.ed-groups { padding: 14px 12px 12px; position: sticky; top: calc(var(--header-h) + 12px); max-height: calc(100vh - var(--header-h) - 24px); display: flex; flex-direction: column; }
.ed-panel-head { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 4px; }
.ed-panel-head h2 { font-size: 16px; }
.ed-collapse { margin-left: auto; width: 32px; height: 32px; }
.ed-src { margin: 10px 0 0; }
.ed-src .dd-trigger { width: 100%; }
.ed-gsearch { margin: 10px 0 8px; }
.ed-gsearch .input, .ed-csearch .input { min-height: 38px; font-size: 14px; }
.grow { display: grid; grid-template-columns: 14px 22px minmax(0, 1fr) auto 32px; align-items: center; gap: 6px; min-height: 40px; padding: 2px 4px 2px 2px; border-radius: var(--r-xs); border: 1px solid transparent; }
.grow-master { grid-template-columns: 22px minmax(0, 1fr) auto; padding: 4px 38px 4px 22px; margin-bottom: 4px; border-bottom: 1px solid var(--line); border-radius: 0; cursor: pointer; }
.grow-master .grow-name { font-weight: 700; }
.glist { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; min-height: 120px; }
.grow:hover { background: #f7f7fc; }
.grow.is-sel { background: var(--orange-soft); }
.grow.is-off .grow-name { color: var(--faint); }
.grow .grip { color: #c3c0d6; cursor: grab; font-size: 13px; opacity: 0; transition: opacity .15s; text-align: center; }
.grow:hover .grip, .grow:focus-within .grip { opacity: 1; }
.grow-name { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; border: 0; background: none; padding: 6px 2px; text-align: left; font-size: 14px; font-weight: 600; color: var(--ink); border-radius: var(--r-xs); }
.grow-name:focus-visible { outline: none; box-shadow: var(--focus); }
button.grow-name { cursor: pointer; }
.grow-src { font-size: 11.5px; font-weight: 500; color: var(--faint); margin-top: 1px; }
.grow-src.is-own { color: #8a5200; }
.grow-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.grow-more { width: 32px; height: 32px; opacity: 0; }
.grow:hover .grow-more, .grow:focus-within .grow-more, .grow-more[aria-expanded=true] { opacity: 1; }
.grow.is-drop { border: 1.5px dashed var(--purple); background: var(--tint); }
.is-drop-before { box-shadow: inset 0 2px 0 var(--purple); }
.is-dragging { opacity: .45; }
.ed-newgroup { display: inline-flex; align-items: center; gap: 6px; margin: 8px 6px 2px; font-size: 14px; }
.tri input { appearance: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--line-2); border-radius: var(--r-xs); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.tri input:checked, .tri input:indeterminate { background: var(--purple); border-color: var(--purple); }
.tri input:checked::after { content: ""; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.tri input:indeterminate::after { content: ""; width: 10px; height: 2px; background: #fff; border-radius: 1px; }
.tri input:focus-visible { box-shadow: var(--focus); outline: none; }
.ed-channels { min-width: 0; }
.ed-ch-head { flex-wrap: wrap; gap: 12px; padding: 14px 16px 0; }
.ed-ch-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1; }
.ed-ch-title h2 { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-ch-tools { display: flex; align-items: center; gap: 8px; }
.ed-csearch { width: 280px; }
.ed-view button { padding: 0 10px; }
.ed-bulk { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; padding: 10px 16px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ed-everywhere { font-size: 13px; gap: 8px; }
.ed-everywhere input { width: 18px; height: 18px; }
.ed-drag-hint { margin-left: auto; }
.ed-ch-body { padding: 10px 12px 14px; max-height: min(70vh, calc(100vh - 300px)); overflow: auto; }
.clist { list-style: none; margin: 0; padding: 0; columns: 3 220px; column-gap: 12px; }
.crow { display: grid; grid-template-columns: 22px minmax(0, 1fr) 14px 30px; align-items: center; gap: 8px; min-height: 38px; padding: 0 2px 0 6px; border-radius: var(--r-xs); break-inside: avoid; }
.crow:hover { background: #f7f7fc; }
.crow .check input { width: 18px; height: 18px; }
.crow-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.crow.is-off .crow-name { color: var(--faint); }
.crow-g { margin-left: 6px; font-size: 11.5px; color: var(--faint); font-weight: 500; }
.crow .grip { color: #c3c0d6; cursor: grab; font-size: 13px; opacity: 0; }
.crow:hover .grip { opacity: 1; }
.crow-more { width: 30px; height: 30px; opacity: 0; }
.crow:hover .crow-more, .crow:focus-within .crow-more, .crow-more[aria-expanded=true], .ctile:hover .crow-more, .ctile:focus-within .crow-more { opacity: 1; }
.ctiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ctile { position: relative; display: grid; justify-items: center; align-content: start; gap: 8px; padding: 14px 10px 12px; min-height: 132px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); text-align: center; cursor: grab; }
.ctile:hover { border-color: var(--violet); box-shadow: var(--shadow-2); }
.ctile.is-off { background: #fafafc; }
.ctile.is-off .ctile-logo { filter: grayscale(1); opacity: .5; }
.ctile.is-off .ctile-name { color: var(--faint); }
.ctile-check { position: absolute; top: 8px; left: 8px; }
.ctile .crow-more { position: absolute; top: 4px; right: 4px; }
.ctile-logo { width: 56px; height: 56px; border-radius: var(--r-md); display: grid; place-items: center; font-weight: 700; font-size: 17px; color: var(--purple-700); background: linear-gradient(145deg, var(--tint), var(--tint-2)); }
.ctile-name { font-size: 13.5px; font-weight: 600; line-height: 17px; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ctile-g { font-size: 11.5px; color: var(--faint); }
.ed-groups-btn { display: none; }
.ed-bar { display: none; }
.ed-sheet { padding-top: 6px; max-height: 70vh; overflow: auto; }
.ed-sheet .glist { max-height: none; }
.modal.is-sheet .ed-collapse { display: none; }

/* Адаптивность */
@media (max-width: 1100px) {
  .lrow { grid-template-columns: minmax(220px, 1.6fr) minmax(180px, 1.2fr) auto; }
  .lcell-status { display: none; }
  .hide-md { display: none; }
  .ed-actions [data-act="ed-create"] { padding-inline: 12px; }
  .ed-csearch { width: 220px; }
  .ed-drag-hint { display: none; }
}
@media (max-width: 900px) {
  .ed-grid { grid-template-columns: 1fr; }
  .ed-grid > .ed-groups { display: none; }
  .ed-groups-btn { display: inline-flex; width: 100%; justify-content: space-between; margin-bottom: 12px; text-transform: none; letter-spacing: 0; font-size: 15px; }
  .ed-groups-btn span { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; }
  .send-grid { grid-template-columns: 1fr; }
  .ed-actions .ed-state, .ed-actions [data-act="ed-undo"], .ed-actions [data-act="ed-save"] { display: none; }
  .ed-bar { display: flex; position: sticky; bottom: 0; z-index: 20; gap: 8px; justify-content: flex-end; margin: 12px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); backdrop-filter: blur(6px); }
  .ed-bar .btn-primary { flex: 1; min-height: 46px; }
}
@media (max-width: 760px) {
  .lrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main act" "info info"; gap: 8px; padding: 14px; }
  .lcell-main { grid-area: main; }
  .lcell-info { grid-area: info; padding-left: 52px; }
  .lcell-act { grid-area: act; }
  .lcell-act .btn-sm { display: none; }
  .lcell-act [data-act="pl-refresh"] { display: inline-flex; padding: 0 8px; }
  .hide-sm { display: none; }
  .section-head { flex-wrap: wrap; align-items: flex-start; }
  .wz-steps { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .wz-step { flex: none; }
  .wz-step:not(.is-on) span { display: none; }
  .wz-step:not(.is-on) { padding-right: 6px; }
  .wz-body { padding: 20px 16px 8px; min-height: 0; }
  .wz-body > h2 { font-size: 19px; line-height: 25px; }
  .wz-foot { padding: 12px 16px; position: sticky; bottom: 0; background: rgba(255, 255, 255, .97); border-radius: 0 0 var(--r-md) var(--r-md); z-index: 5; }
  .wz-foot .btn { min-height: 46px; }
  .wz-foot .btn-quiet:first-child span, .wz-foot .btn-quiet:first-child { font-size: 0; gap: 0; }
  .wz-foot .btn-quiet:first-child .icon { width: 20px; height: 20px; }
  .wz-foot .btn-primary { flex: 1; }
  .rcards.two, .form-grid { grid-template-columns: 1fr; }
  .input-row { flex-direction: column; }
  .ed-label, .ed-switch { font-size: 22px; line-height: 28px; }
  .ed-switch { max-width: calc(100vw - 120px); }
  .ed-actions { width: 100%; justify-content: flex-start; }
  .ed-actions [data-act="ed-create"] { flex: 1; }
  .ed-actions [data-act="ed-create"] .hide-md { display: inline; }
  .ed-ch-body { max-height: none; overflow: visible; }
  .ed-view { flex: none; }
  .ed-ch-head { padding: 12px 12px 0; }
  .ed-ch-tools { width: 100%; }
  .ed-csearch { flex: 1; width: auto; }
  .ed-bulk { padding: 10px 12px; }
  .clist { columns: 1; }
  .crow { min-height: 44px; }
  .crow .grip { display: none; }
  .crow { grid-template-columns: 22px minmax(0, 1fr) 36px; }
  .crow-more, .grow-more { opacity: 1; width: 36px; height: 36px; }
  .ctiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-meta .meta-sep { display: none; }
}


/* Подвал таблиц (по образцу референса) */
.pager { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); background: linear-gradient(180deg, #f6f6f9, #efeff4); border-radius: 0 0 var(--r-md) var(--r-md); font-size: 14px; }
.pager-range { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.pager-sp { flex: 1; }
.pager-size { min-width: 150px; min-height: 40px; background: var(--surface); }
.pager-nav { display: inline-flex; align-items: center; gap: 6px; }
.pager-btn { min-width: 84px; height: 40px; padding: 0 16px; border: 0; border-radius: var(--r-xs); background: #e7e6ee; color: var(--ink); font-size: 14px; font-weight: 600; transition: background-color .16s, color .16s; }
.pager-btn:hover:not(:disabled) { background: var(--tint-2); color: var(--purple-700); }
.pager-btn:disabled { color: #a3a0b8; background: #ececf1; cursor: not-allowed; }
.pager-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.pager-of { min-width: 64px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.ed-channels .pager { border-radius: 0 0 var(--r-md) var(--r-md); }
@media (max-width: 760px) {
  .pager { flex-wrap: wrap; padding: 12px 14px; }
  .pager-range { width: 100%; }
  .pager-sp { display: none; }
  .pager-size { flex: 1; min-width: 0; min-height: 44px; }
  .pager-btn { height: 44px; min-width: 0; padding: 0 12px; }
  .pager-of { min-width: 52px; }
}
/* Узкий телефон: «строк на странице» — своей строкой, иначе подпись сжимается в пустую кнопку. */
@media (max-width: 480px) {
  .pager-size { flex-basis: 100%; }
  .pager-nav { width: 100%; }
  .pager-nav .pager-btn { flex: 1; }
}
.ed-sheet .ed-panel-head { display: none; }
@media (max-width: 900px) { .grow .grip { visibility: hidden; } .grow { grid-template-columns: 4px 22px minmax(0, 1fr) auto 36px; } }

.link-btn { display: inline-flex; align-items: center; gap: 4px; }
.link-btn .icon { flex: none; }
@media (max-width: 760px) {
  .pagehead-inner:has(.is-inline) { flex-wrap: nowrap; }
  .pagehead .pagehead-action.is-inline { width: auto; margin-right: -10px; }
  .pagehead .pagehead-action.is-inline .btn { width: auto; min-height: 44px; }
}
/* Наш значок канала по номеру поверх букв названия; не загрузился — остаются буквы. */
.ctile-logo { position: relative; overflow: hidden; }
.ctile-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--surface, #fff); }

/* ---------- Редактор каналов по образцу владельца 27.09 (OWNER-SITE-V2): одна рамка, общий низ ---------- */
/* Группам — 360: «RU Общероссийские», «RU Познавательные» целиком (владелец 01.10). */
.ed-box { display: grid; grid-template-columns: 360px minmax(0, 1fr); align-items: stretch; padding: 0; background: #f4f4f8; border-color: var(--line); overflow: hidden; }
.ed-box .ed-groups { position: static; max-height: none; display: flex; flex-direction: column; padding: 20px 12px 16px 16px; border-right: 1px solid var(--line); }
.ed-box .ed-channels { display: flex; flex-direction: column; min-width: 0; padding: 20px 16px 16px 12px; }
.ed-box .ed-panel-head { padding: 0; min-height: 0; margin-bottom: 12px; }
.ed-box .ed-panel-head h2 { font-size: 20px; line-height: 26px; }
.ed-box .grow-master { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 4px 12px; margin: 0; border: 0; grid-template-columns: none; }
.grow-all { display: inline-flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; cursor: pointer; }
.ed-box .ed-newgroup { margin: 0; font-size: 14px; font-weight: 600; }
.ed-box .glist { display: grid; gap: 10px; overflow: visible; flex: none; min-height: 0; align-content: start; }
.ed-box .grow { grid-template-columns: 20px minmax(0, 1fr) auto 28px 28px; gap: 6px; height: 56px; min-height: 56px; padding: 4px 4px 4px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.ed-box .grow:hover { background: #fff; border-color: var(--line-2); }
.ed-box .grow.is-sel { background: var(--tint); border-color: var(--violet, #8f99e6); }
.ed-box .grow-name { font-size: 14.5px; font-weight: 600; padding: 6px 0; }
.ed-box .grow-name > span:first-child { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-box .grow-more { opacity: 1; color: var(--muted); }
.ed-box .grow-count { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ed-box .ed-groups > .pager, .ed-box .ed-channels > .pager { margin-top: auto; padding: 16px 0 0; background: none; border-top: 0; border-radius: 0; }
.ed-box .ed-groups > .pager { padding-top: 16px; }
.ed-box .ed-groups .glist + .pager { margin-top: auto; }
.ed-box .ed-groups::after { content: ""; }
.ed-box .pager { min-height: 56px; }
.ed-ch-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 0; min-height: 0; }
.ed-ch-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1; }
.ed-ch-title h2 { font-size: 22px; line-height: 28px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-ch-count { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ed-ch-tools { display: flex; align-items: center; gap: 10px; }
.ed-box .ed-csearch { width: 300px; }
.ed-box .ed-csearch .input { min-height: 44px; background: #fff; }
.ed-box .ed-view { background: transparent; }
.ed-box .ed-bulk { padding: 14px 0 14px; border: 0; gap: 6px 24px; }
.ed-legend { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.ed-legend .icon { color: var(--purple); flex: none; }
.ed-box .ed-ch-body { padding: 0; max-height: none; overflow: visible; }
/* Карточки каналов списком: значок, название, архив, меню. */
/* Ряды — шаг 10, как у групп (ряд против ряда); между колонками — 8: место названиям (владелец 01.10). */
.ed-box .clist { columns: auto; display: grid; gap: 10px 8px; }
.ed-box .clist.cols-1 { grid-template-columns: minmax(0, 1fr); }
.ed-box .clist.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ed-box .clist.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Значок архива — своя колонка постоянной ширины: глазик и меню у всех строк на одной вертикали. */
.ed-box .crow { grid-template-columns: 20px 48px minmax(0, 1fr) 20px 28px 28px; gap: 8px; min-height: 56px; padding: 6px 2px 6px 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.ed-box .crow:hover { background: #fff; border-color: var(--line-2); }
.ed-box .crow-name { font-size: 14.5px; font-weight: 600; }
/* Значок 4:3, 48×36 (владелец 01.10: «пиконы чуть меньше, сильно здоровые получились»; было во всю высоту, 56×42). */
.ed-box .crow .clogo { width: 48px; height: 36px; border-radius: 7px; }
.ed-box .crow .clogo img { padding: 0; }
.ed-box .crow-more { width: 28px; height: 28px; }
.ed-box .crow.is-off { background: #fafafc; }
.ed-box .crow-more { opacity: 1; color: var(--muted); }
.clogo { position: relative; display: grid; place-items: center; overflow: hidden; width: 46px; height: 30px; border-radius: 6px; background: #f1f1f6; color: var(--purple-700); font-size: 12px; }
.clogo b { font-weight: 700; }
.clogo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 2px; background: #fff; }
.crow.is-off .clogo, .ctile.is-off .clogo { filter: grayscale(1); opacity: .5; }
.c-arch { display: inline-grid; place-items: center; color: var(--purple); }
/* Плитки: крупный значок, название снизу, архив справа. */
.ed-box .ctiles { display: grid; gap: 12px; }
.ed-box .ctiles.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ed-box .ctiles.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ed-box .ctiles.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ed-box .ctiles.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ed-box .ctile { display: flex; flex-direction: column; align-items: stretch; gap: 12px; min-height: 0; padding: 14px 8px 12px 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.ed-box .ctile:hover { box-shadow: none; border-color: var(--line-2); }
.ed-box .ctile-check { top: 16px; left: 8px; }
.ed-box .ctile .crow-more { top: 10px; right: 2px; width: 26px; height: 28px; opacity: 1; color: var(--muted); }
.ed-box .ctile .clogo { align-self: center; width: min(96px, calc(100% - 48px)); height: auto; aspect-ratio: 7 / 4; border-radius: 8px; font-size: 16px; }
.ctile-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 40px; }
.ed-box .ctile-name { font-size: 15px; font-weight: 600; line-height: 20px; text-align: left; -webkit-line-clamp: 2; }
.ed-box .ctile-g { display: block; }
@media (max-width: 900px) {
  .ed-box { grid-template-columns: minmax(0, 1fr); }
  .ed-box > .ed-groups { display: none; }
  .ed-box .ed-channels { padding: 16px 14px 14px; }
  .ed-box .ed-csearch { flex: 1; width: auto; }
  .ed-ch-tools { width: 100%; }
  .ed-legend { margin-left: 0; width: 100%; }
}
.ed-sheet.ed-groups { padding: 6px 0 0; background: none; }
.ed-sheet .grow { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); grid-template-columns: 22px minmax(0, 1fr) auto 36px 36px; gap: 10px; padding: 4px 6px 4px 14px; min-height: 52px; }
.ed-sheet .glist { display: grid; gap: 8px; }
.ed-sheet .grow.is-sel { background: var(--tint); border-color: var(--violet, #8f99e6); }
.ed-sheet .grow-master { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 12px; border: 0; }


/* Плейлист провайдера «как есть» (site/provider.js, OWNER-PROVIDER-READONLY-1001): тот же вид, что у редактора,
   но без галочек и перетаскивания; отметка «новый» — оранжевая, пропавшие у провайдера — серые. */
.pv-h1 { min-width: 0; font-size: 28px; line-height: 34px; font-weight: 700; color: var(--purple-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-box.pv-box .grow { grid-template-columns: minmax(0, 1fr) auto 32px; }
.pv-box .crow.pv-row { grid-template-columns: 56px minmax(0, 1fr) auto auto 28px; }
.pv-box .clist.pv-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pv-name .crow-g { margin-left: 0; }
.pv-name { display: flex; flex-direction: column; min-width: 0; cursor: default; }
.pv-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-box .crow.is-off .pv-title { color: var(--faint); }
.pv-new { padding: 2px 8px; border-radius: 999px; background: var(--orange-soft); color: #8a5200; font-size: 12px; line-height: 16px; font-weight: 700; white-space: nowrap; }
.pv-gnew { color: #8a5200; }
.pv-fresh { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--surface); color: #8a5200; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.pv-fresh:hover { border-color: var(--line-2); }
.pv-fresh:focus-visible { outline: none; box-shadow: var(--focus); }
.pv-fresh.is-sm { height: 22px; margin-left: 8px; padding: 0 8px; font-size: 12px; flex: none; }
.lrow-line { display: flex; align-items: center; min-width: 0; }
.lrow-line .lrow-name { min-width: 0; }
.pv-hint { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--muted); font-size: 13.5px; }
@media (max-width: 900px) {
  .pv-box > .ed-groups { display: block; padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .pv-box .ed-panel-head { display: none; }
  .pv-box .glist { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .ed-box.pv-box .grow { flex: none; grid-template-columns: auto auto; gap: 8px; min-height: 40px; padding: 2px 12px; }
  .pv-box .grow-more { display: none; }
  .pv-h1 { font-size: 22px; line-height: 28px; }
}
/* Системные группы своего списка: «Новое» (новые каналы провайдера) и «Пропали у провайдера» (серые, 14 дней). */
.grow-src.is-sys { color: #8a5200; }
.grow.is-gone .grow-name > span:first-child { color: var(--muted); }
.grow.is-gone .grow-src.is-sys { color: var(--faint); }
.crow.is-gone .crow-name, .ctile.is-gone .ctile-name { color: var(--faint); }
.crow.is-gone .clogo, .ctile.is-gone .clogo { filter: grayscale(1); opacity: .45; }
.ed-sys-hint { margin: 0 0 12px; }
/* Звёздочка «Избранное» у названия канала (общее с телевизором). */
.c-fav { display: inline-grid; place-items: center; margin-left: 6px; color: var(--orange); vertical-align: -2px; }
.c-fav .icon { width: 14px; height: 14px; fill: currentColor; }
.crow-title { overflow: hidden; text-overflow: ellipsis; }
.ed-box .grow.is-fav { border-color: #f1d2a4; }
/* Владелец 01.10 (скрин 6): первая группа и первая карточка канала — в один ряд. Шапка групп той же высоты, что
   у каналов: заголовок — как строка поиска (44), «Все группы» — как «Показать все / Скрыть все» (48). */
.ed-box .ed-groups .ed-panel-head { display: flex; align-items: center; min-height: 44px; margin-bottom: 0; }
.ed-box .grow-master { min-height: 48px; padding-top: 0; padding-bottom: 0; }
@media (min-width: 901px) {
  /* Одна строка, чтобы ряд не съезжал: пояснение про архив обрезается многоточием, целиком — в подсказке. */
  .ed-box .ed-bulk { flex-wrap: nowrap; min-height: 48px; }
  /* Действий над выделенными больше, чем влезает в строку («В избранное», «Из избранного»): переносятся, не обрезаются. */
  .ed-box .ed-bulk.ed-pickbar { flex-wrap: wrap; gap: 6px 16px; }
  .ed-box .ed-bulk .link-btn { flex: none; }
  .ed-box .ed-legend { min-width: 0; }
  .ed-box .ed-legend > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
/* Замок «закрыто код-паролем» у группы и канала. */
.c-lock { display: inline-grid; place-items: center; margin-left: 6px; color: var(--muted); vertical-align: -2px; }
.c-lock .icon { width: 14px; height: 14px; }

/* Владелец 01.10 (скрин 2): «сверху ровно, внизу ровно» — строка группы той же высоты (56) и с тем же шагом (10),
   что карточка канала: группы и каналы идут рядами друг напротив друга до самого низа. */
.ed-box .grow-name { min-width: 0; }
.ed-box .grow-name > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Галочка — выбор (перенос, действия над выбранным), глазик — показывать на телевизоре (владелец 01.10). */
.ed-eye { width: 28px; height: 28px; color: var(--muted); }
.ed-eye .icon { width: 18px; height: 18px; }
.ed-eye.is-off { color: var(--faint); }
.ed-eye:hover { color: var(--purple-700); }
.ed-box .grow .ed-eye { width: 28px; height: 28px; }
.ed-sheet .grow .ed-eye { width: 30px; height: 30px; }
.ed-box .crow.is-picked, .ed-box .ctile.is-picked, .ed-box .grow.is-picked { border-color: var(--violet, #8f99e6); box-shadow: inset 0 0 0 1px var(--violet, #8f99e6); }
.ed-box .ctile-eye { position: absolute; top: 10px; right: 30px; }
.ed-pickbar { gap: 6px 20px; }
.ed-pickbar .link-btn { gap: 6px; }
.ed-pick-n { font-size: 14px; color: var(--ink); white-space: nowrap; }
.ed-pick-clear { margin-left: auto; }

/* Строки каналов компактнее (как у образца владельца 01.10): меньше знак и промежутки — название помещается целиком. */
.ed-box .crow { grid-template-columns: 20px 40px minmax(0, 1fr) 18px 26px 24px; gap: 6px; padding: 6px 0 6px 10px; }
.ed-box .crow .ed-eye { width: 26px; height: 26px; }
.ed-box .crow .crow-more { width: 24px; height: 28px; }
.ed-box .crow .clogo { width: 40px; height: 30px; border-radius: 6px; }
.ed-box .crow-name { font-size: 14px; }

/* Полоса над редактором (владелец 01.10: «сверху всё в куче»): сводка и устройства слева, плейлисты — своим блоком
   справа; лишние переносятся строкой ниже под тот же левый край, а не под сводку. Длинное название — многоточием. */
.src-chips { display: contents; }
@media (min-width: 761px) {
  .ed-meta { flex-wrap: nowrap; align-items: flex-start; }
  .ed-meta > * { flex: none; }
  .ed-meta > .meta-item, .ed-meta > .limit-chip, .ed-meta > .meta-sep { margin-top: 1px; }
  .ed-meta .meta-item { line-height: 26px; }
  .ed-meta .meta-sep { margin-top: 5px; }
  .ed-meta > .src-chips { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
}
.src-chip { max-width: 240px; }
.src-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta-item { white-space: nowrap; }
@media (min-width: 901px) and (max-width: 1400px) {
  /* Окно поуже: группам 320, каналам — те же три колонки. */
  .ed-box { grid-template-columns: 320px minmax(0, 1fr); }
  .ed-box .grow-name { font-size: 14px; }
}
/* Строка группы без галочки: глазик, название, счёт, меню (как у образца владельца 01.10). */
.ed-box .grow { grid-template-columns: 28px minmax(0, 1fr) auto 28px; gap: 6px; padding: 4px 4px 4px 8px; }
.ed-box .grow-all, .ed-sheet .grow-all { gap: 6px; padding-left: 5px; }
.ed-sheet .grow { grid-template-columns: 30px minmax(0, 1fr) auto 36px; gap: 8px; padding: 4px 6px 4px 10px; }
/* Плитки: сверху строка кнопок (галочка, глазик, меню), значок — под ней, а не поверх глазика. */
.ed-box .ctile { padding-top: 44px; }
.ed-box .ctile-check { top: 12px; }
.ed-box .ctile .crow-more { top: 8px; }
.ed-box .ctile-eye { top: 8px; right: 28px; }
/* Узкий экран (телефон): без значков каналов — они только отнимают место у названия (владелец 01.10). */
@media (max-width: 600px) {
  .ed-box .crow { grid-template-columns: 20px minmax(0, 1fr) 18px 26px 24px; }
  .ed-box .crow .clogo { display: none; }
  .ed-box .ctile { padding-top: 40px; }
  .ed-box .ctile .clogo { display: none; }
}

/* Звёздочка избранного не обрезается вместе с длинным названием (владелец 03.10.2026: у «Canal+ Sport 7 HD …» её не было видно). */
.crow-title { display: flex; align-items: center; min-width: 0; }
.crow-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow-title .c-fav, .crow-title .c-lock { flex: none; }
