/**
 * shared-ui.css — общие примитивы (админка + публичный сайт).
 * Цвета из themes/*.css. Публичный каркас — site-layout.css (подключается только в shell).
 */

*{ box-sizing:border-box; }

/* Однострочные контролы с модификатором compact: та же высота/ритм, что у .hvIconTextBtn--compact (hv-button) */
:root{
  --hv-control-compact-h:26px;
  --hv-control-compact-py:3px;
  --hv-control-compact-px:9px;
  --hv-control-compact-gap:4px;
  --hv-control-compact-radius:7px;
  --hv-control-compact-fs:10px;
  --hv-control-compact-lh:1.2;
  --hv-control-compact-icon:14px;
}

body{
  margin:0;
  font-family: var(
    --sans,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif
  );
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:var(--bg, #fff);
  color:var(--text, #111);
}


/* Статус в карточке «Публикация» (редактор контента): зелёный / красный, плавное сворачивание */
.pubCardFeedback{
  box-sizing:border-box;
  width:100%;
  border-radius:10px;
  font-size:13px;
  font-weight:600;
  line-height:1.4;
  overflow:hidden;
  max-height:0;
  opacity:0;
  margin:0 0 0 0;
  padding:0 12px;
  border-width:1px;
  border-style:solid;
  border-color:transparent;
  transition:max-height .42s ease, opacity .42s ease, margin-bottom .42s ease, padding-top .42s ease, padding-bottom .42s ease, border-color .42s ease;
  contain:layout paint;
}
.pubCardFeedback.is-open{
  max-height:120px;
  opacity:1;
  margin-bottom:10px;
  padding-top:10px;
  padding-bottom:10px;
}
.pubCardFeedback--success.is-open{
  background:color-mix(in oklab, var(--good, #16a34a) 22%, var(--panel2, #f1f5f9));
  border-color:color-mix(in oklab, var(--good, #16a34a) 55%, var(--line, #e2e8f0));
  color:var(--text, #111);
}
.pubCardFeedback--error.is-open{
  background:color-mix(in oklab, var(--bad, #dc2626) 20%, var(--panel2, #f1f5f9));
  border-color:color-mix(in oklab, var(--bad, #dc2626) 50%, var(--line, #e2e8f0));
  color:var(--text, #111);
}


button{
  background:var(--panel, #f5f5f5);
  color:var(--text, #111);
  border:1px solid var(--line, #ddd);
  border-radius:10px;
  padding:8px 10px;
  cursor:pointer;
  font-size:13px;
}

.btnPrimary{
  border-color:var(--accent, #2563eb);
  background:var(--panel2, #eef2ff);
}

/* опасная кнопка */
.btnDanger{
  background:rgba(220,38,38,0.08);
  border-color:var(--bad, #dc2626);
  color:var(--bad, #dc2626);
  padding:8px 10px;
  border-radius:10px;
}


.card{
  position:relative;
  background:var(--card-bg, var(--panel, #fff));
  border:1px solid var(--line, #ddd);
  border-radius:14px;
  overflow:hidden;
}

/* --- HUD DECORATIONS (Corner L-Brackets) --- */
.card::before, .card::after, .card > .cardInner::before, .card > .cardInner::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--accent, #60a5fa);
  opacity: 0.35;
  pointer-events: none;
  z-index: 10;
}
.card::before { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.card::after { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.card > .cardInner::before { bottom: 6px; left: 6px; border-right: 0; border-top: 0; }
.card > .cardInner::after { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }

.cardHeader{
  position:relative;
  display:flex;
  gap:10px;
  align-items:flex-start;
  justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid var(--line, #ddd);
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.04), transparent);
}

/* --- NODE DIVIDER --- */
.cardHeader::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 18px;
  right: 18px;
  height: 1px;
  background: var(--accent, #60a5fa);
  opacity: 0.2;
}
.cardHeader::before {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 14px;
  width: 7px;
  height: 7px;
  background: var(--bg, #0b0f17);
  border: 1.5px solid var(--accent, #60a5fa);
  border-radius: 50%;
  z-index: 5;
  opacity: 0.6;
}

.cardHeader h2{ 
  margin:0; 
  font-size:16px; 
  font-weight:800; 
  text-transform: uppercase; 
  letter-spacing: 0.03em;
  font-family: var(--sans);
}
.cardHeader .meta{ color:var(--muted, #666); font-size:12px; margin-top:2px; }

/* ---------- HV-CARD — шапка с медиа (прототип для карточек / обслуживание и др.) ---------- */
.hvCard--mediaHead{
  max-width:100%;
}
.hvCard--mediaHeadNoActions .hvCard__head{
  grid-template-columns:auto 1fr;
}
/* Шапка без слота медиа: только заголовок + действия (или одна колонка без действий) */
.hvCard--mediaHead.hvCard--mediaHeadNoMedia .hvCard__head{
  grid-template-columns:1fr auto;
  padding-left:10px;
}
.hvCard--mediaHead.hvCard--mediaHeadNoMedia.hvCard--mediaHeadNoActions .hvCard__head{
  grid-template-columns:1fr;
}
.hvCard--mediaHead .hvCard__head{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:6px 4px;
  align-items:center;
  padding:6px 10px 6px 5px;
  border-bottom:1px solid var(--line, #ddd);
}
.hvCard__media{
  width:72px;
  height:72px;
  border-radius:14px;
  overflow:hidden;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
}
.hvCard__media:has(> img){
  background:transparent;
  border:none;
  padding:5px;
}
.hvCard__media:has(.hvCard__mediaPlaceholder){
  background:var(--panel2, #f1f5f9);
  border:1px solid var(--line, #e2e8f0);
  padding:0;
}
/* Иконка в карточке входа: тот же блок 72×72, что и логотип на экране обслуживания; по 5px слева/справа — как padding у img в .hvCard__media */
.hvCard__media--iconSlot{
  width:72px;
  height:72px;
  border-radius:14px;
  overflow:visible;
  background:transparent;
  border:none;
  padding:0 5px;
  box-sizing:border-box;
}
.hvCard__mediaIcon{
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--accent, #2563eb);
  width:100%;
  height:100%;
}
.hvCard__media--iconSlot .hvCard__mediaIcon .adminToolbarIcon,
.hvCard__media--iconSlot .hvCard__mediaIcon svg{
  width:62px;
  height:62px;
  flex-shrink:0;
}
.hvCard__media img{
  width:100%;
  height:100%;
  object-fit:contain;
}
.hvCard__mediaPlaceholder{
  font-size:22px;
  font-weight:800;
  color:var(--muted, #64748b);
  line-height:1;
  user-select:none;
}
.hvCard__headMain{
  min-width:0;
}
.hvCard__title{
  margin:0 0 2px;
  font-size:1.15rem;
  font-weight:700;
  line-height:1.25;
  letter-spacing:-0.02em;
}
.hvCard__lead{
  margin:0;
  font-size:13px;
  line-height:1.45;
  color:var(--muted, #64748b);
}
.hvCard__actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
}
.hvCardActionBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  padding:0 16px;
  border-radius:10px;
  border:1px solid var(--line, #e2e8f0);
  background:var(--panel2, #f1f5f9);
  color:var(--link, var(--accent, #2563eb));
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  font-family:inherit;
  white-space:nowrap;
  touch-action:manipulation;
  cursor:pointer;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}
button.hvCardActionBtn{
  -webkit-appearance:none;
  appearance:none;
}
.hvCardActionBtn:hover{
  border-color:var(--accent, #2563eb);
  background:color-mix(in oklab, var(--accent, #2563eb) 14%, var(--panel2, #f1f5f9));
}
.hvCardActionBtn:focus-visible{
  outline:2px solid var(--accent, #2563eb);
  outline-offset:2px;
}
.hvCardActionBtn--primary{
  border-color:var(--accent, #2563eb);
  background:color-mix(in oklab, var(--accent, #2563eb) 18%, var(--panel2, #f1f5f9));
  color:var(--text, #111);
}
.hvCardActionBtn--primary:hover{
  background:color-mix(in oklab, var(--accent, #2563eb) 26%, var(--panel2, #f1f5f9));
}
.hvCardActionBtn__icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--accent, #2563eb);
}
.hvCardActionBtn__icon .adminToolbarIcon,
.hvCardActionBtn__icon svg{
  width:18px;
  height:18px;
}
.hvCardActionBtn--primary .hvCardActionBtn__icon{
  color:var(--accent, #2563eb);
}
.hvCard__body{
  padding:16px 16px 18px;
}
.hvCard__body p:last-child{
  margin-bottom:0;
}
.hvCardMaintenanceMsg{
  font-size:14px;
  line-height:1.55;
  color:var(--text, inherit);
}
.hvCardMaintenanceMsg__p{
  margin:0 0 0.65em;
}
.hvCardMaintenanceMsg__p:last-child{
  margin-bottom:0;
}
.hvCardMaintenanceMsg__lead{
  font-size:15px;
  line-height:1.5;
  font-weight:500;
  margin:0 0 0.5em;
}
.hvCardMaintenanceMsg__note,
.hvCardMaintenanceMsg__muted{
  color:var(--muted, #64748b);
  font-size:13px;
  line-height:1.5;
  margin:0;
}
.hvCardMaintenanceMsg ul,
.hvCardMaintenanceMsg ol{
  margin:0.4em 0 0.65em;
  padding-left:1.25em;
}
.hvCardMaintenanceMsg li{
  margin:0.2em 0;
}
@media (max-width:560px){
  .hvCard--mediaHead .hvCard__head{
    grid-template-columns:1fr;
    text-align:center;
    padding:8px 8px 8px;
  }
  .hvCard__media:not(.hvCard__media--iconSlot){
    margin:0 auto;
    width:80px;
    height:80px;
  }
  .hvCard__media--iconSlot{
    margin:0 auto;
    width:80px;
    height:80px;
    padding:0 5px;
  }
  .hvCard__media--iconSlot .hvCard__mediaIcon .adminToolbarIcon,
  .hvCard__media--iconSlot .hvCard__mediaIcon svg{
    width:70px;
    height:70px;
  }
  .hvCard__actions{
    justify-content:center;
  }
}

/* HV-MGMT-CARD — управленческая карточка и стек сообщений (hv-card-management-panel.ejs + .js, hv-management-message-row.ejs)
   Стек без строк (hv-management-message-row / data-hv-mgmt-msg-wrap) не занимает место: :empty ломается на пробелах из EJS — опираемся на :has. */
.hvMgmtCard__messagesStack{
  box-sizing:border-box;
}
.hvMgmtCard__messagesStack:not(:has([data-hv-mgmt-msg-wrap])){
  display:none;
  padding:0;
  margin:0;
  border:none;
  gap:0;
  min-height:0;
}
.hvMgmtCard__messagesStack:has([data-hv-mgmt-msg-wrap]){
  display:flex;
  flex-direction:column;
  gap:0;
}
.hvMgmtMsgWrap{
  display:grid;
  grid-template-rows:0fr;
  margin:0;
  width:100%;
  min-width:0;
  box-sizing:border-box;
  opacity:0;
  transition:grid-template-rows 0.38s ease, opacity 0.32s ease;
}
.hvMgmtMsgWrap.is-visible{
  grid-template-rows:1fr;
  opacity:1;
}
.hvMgmtMsgWrap.is-leaving{
  grid-template-rows:0fr !important;
  opacity:0;
  pointer-events:none;
}
.hvMgmtMsgWrap__inner{
  min-height:0;
  margin:0;
  overflow:hidden;
}
.hvMgmtMsg{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:10px;
  margin:0;
  padding:5px 12px;
  border-radius:0;
  border:1px solid transparent;
  font-size:13px;
  line-height:1.45;
  box-sizing:border-box;
  color:var(--text, #0f172a);
  clip-path:inset(0 0 0 0);
  transition:clip-path 0.38s ease, opacity 0.38s ease;
  will-change:clip-path, opacity;
}
.hvMgmtMsg.hvMgmtMsg--noBorder{
  border:none;
}
.hvMgmtMsg.hvMgmtMsg--leave{
  clip-path:inset(50% 0 50% 0);
  opacity:0;
  pointer-events:none;
}
.hvMgmtMsg.hvMgmtMsg--rounded{
  border-radius:10px;
}
.hvMgmtMsg.hvMgmtMsg--compact{
  gap:6px;
  padding:2px 8px;
  font-size:11px;
  line-height:1.35;
}
.hvMgmtMsg.hvMgmtMsg--compact .hvMgmtMsg__svg,
.hvMgmtMsg.hvMgmtMsg--compact .hvMgmtMsg__spinnerSvg{
  width:14px;
  height:14px;
}
.hvMgmtMsg.hvMgmtMsg--compact .hvMgmtMsg__dismiss{
  width:22px;
  height:22px;
  margin:0 -4px 0 0;
  font-size:14px;
  border-radius:6px;
}
.hvMgmtMsg.hvMgmtMsg--compact .hvMgmtMsg__loadingIndicator{
  width:22px;
  height:22px;
  margin:0 -4px 0 0;
}
.hvMgmtMsg__icon{
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:0;
  color:var(--muted, #64748b);
}
.hvMgmtMsg__svg{
  display:block;
}
.hvMgmtMsg__text{
  flex:1 1 auto;
  min-width:0;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.hvMgmtMsg__dismiss{
  flex-shrink:0;
  width:32px;
  height:32px;
  margin:0 -6px 0 0;
  padding:0;
  border:none;
  border-radius:8px;
  background:transparent;
  color:inherit;
  font-size:1.35rem;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  opacity:0.72;
  font-family:inherit;
  transition:opacity 0.15s ease, background 0.15s ease;
}
.hvMgmtMsg__dismiss:hover{
  opacity:1;
  background:color-mix(in oklab, currentColor 10%, transparent);
}
.hvMgmtMsg__dismiss:focus-visible{
  outline:2px solid var(--accent, #2563eb);
  outline-offset:2px;
}
.hvMgmtMsg--info{
  background:color-mix(in oklab, var(--accent, #3b82f6) 16%, var(--panel2, #f8fafc));
  border-color:color-mix(in oklab, var(--accent, #3b82f6) 32%, var(--line, #e2e8f0));
}
.hvMgmtMsg--info .hvMgmtMsg__icon{
  color:var(--accent, #2563eb);
}
.hvMgmtMsg--success{
  background:color-mix(in oklab, var(--good, #22c55e) 14%, var(--panel2, #f8fafc));
  border-color:color-mix(in oklab, var(--good, #22c55e) 36%, var(--line, #e2e8f0));
}
.hvMgmtMsg--success .hvMgmtMsg__icon{
  color:var(--good, #16a34a);
}
.hvMgmtMsg--error{
  background:color-mix(in oklab, var(--bad, #ef4444) 14%, var(--panel2, #f8fafc));
  border-color:color-mix(in oklab, var(--bad, #ef4444) 38%, var(--line, #e2e8f0));
}
.hvMgmtMsg--error .hvMgmtMsg__icon{
  color:var(--bad, #dc2626);
}
.hvMgmtMsg--warning{
  background:color-mix(in oklab, var(--warn, #eab308) 20%, var(--panel2, #f8fafc));
  border-color:color-mix(in oklab, var(--warn, #ca8a04) 40%, var(--line, #e2e8f0));
}
.hvMgmtMsg--warning .hvMgmtMsg__icon{
  color:var(--warn, #a16207);
}
.hvMgmtMsg--loading{
  background:color-mix(in oklab, var(--accent, #3b82f6) 14%, var(--panel2, #f8fafc));
  border-color:color-mix(in oklab, var(--accent, #3b82f6) 28%, var(--line, #e2e8f0));
}
.hvMgmtMsg--loading .hvMgmtMsg__icon{
  color:var(--accent, #2563eb);
}
.hvMgmtMsg__loadingIndicator{
  flex-shrink:0;
  width:32px;
  height:32px;
  margin:0 -6px 0 0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--accent, #2563eb);
  pointer-events:none;
}
.hvMgmtMsg__spinnerSpin{
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:0;
  animation:hvMgmtMsgSpinnerRotate 0.75s linear infinite;
}
.hvMgmtMsg__spinnerSvg{
  display:block;
}
@keyframes hvMgmtMsgSpinnerRotate{
  to{ transform:rotate(360deg); }
}
@media (prefers-reduced-motion: reduce){
  .hvMgmtMsg__spinnerSpin{
    animation:none;
  }
  .hvMgmtMsg{
    transition:none;
    will-change:auto;
  }
}

/* Редактор материала: адрес /p/slug (inline-edit + сохранение с формой) */
.contentPermalinkRow{
  margin-top:8px;
  display:flex;
  flex-direction:column;
  gap:4px;
  max-width:100%;
}
.contentPermalinkBody{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:4px;
  max-width:100%;
}
.contentPermalinkSlugDisplay{
  flex:1 1 auto;
  min-width:0;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.contentPermalinkInput{
  flex:1 1 160px;
  min-width:0;
  max-width:100%;
  box-sizing:border-box;
}
.contentPermalinkOkBtn{
  flex-shrink:0;
  padding:4px 8px;
  font-size:12px;
}
.contentPermalinkOkBtn.contentPermalinkOkBtn--hidden{
  display:none !important;
}
.contentEditSideColumn{
  display:flex;
  flex-direction:column;
  min-width:0;
  margin-left:5px;
}
.contentEditMgmtGrid{
  align-items:start;
}
.contentEditMgmtCard.hvCard--mediaHeadNoMedia .hvCard__head{
  grid-template-columns:minmax(0,1fr) minmax(260px,min(100%,42rem));
}
.contentEditMgmtCard .hvCard__actions{
  justify-self:stretch;
  min-width:0;
}
/* HTML формы из EJS внутри React-обёртки: гарантируем колонку сетки и место под редактор при пустом теле */
.contentEditMgmtCard__mainHtmlHost{
  min-width:0;
  min-height:min(320px,50vh);
}
.contentEditMgmtCard__mainHtmlHost .formGrid{
  min-width:0;
}
.contentEditCardHeadActions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  width:100%;
}
.contentEditCardHeadActions__left{
  flex:0 0 auto;
}
.contentEditCardHeadActions__right{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  min-width:0;
}
.contentEditLegendPanel{
  margin:0;
}
/* Кнопки публикации и обложки — в подвале hv-legend-panel (footerPartial), без лишнего зазора */
.contentEditLegendPanel .legendPanel__footer .contentEditLegendPubFooter.pubToolbarActionsRow,
.contentEditLegendPanel .legendPanel__footer .contentEditLegendCoverFooter.coverActions{
  margin-top:0;
}
.contentPermalinkSlugDisplay--auto{
  font-style:italic;
  color:var(--muted, #94a3b8);
}
.pubCardBody .contentPermalinkRow--inPubCard{
  margin-top:0;
  margin-bottom:10px;
}
.pubCardMaterialType{
  display:block;
  margin-bottom:10px;
}
.pubCardBody.contentEditPubCardBody .hvCustomSelect,
.pubCardBody.contentEditPubCardBody .pubCardMaterialType .hvCustomSelect{
  width:100%;
  max-width:100%;
}
.contentEditPubChannelRow{
  width:100%;
  min-width:0;
}
.contentEditCanonSliderRow{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:100%;
  margin-top:10px;
  box-sizing:border-box;
}
.contentEditCanonSliderRow__canon,
.contentEditCanonSliderRow__sliders{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:center;
  gap:10px 12px;
  width:100%;
  box-sizing:border-box;
}
.contentEditCanonSliderRow .contentEditCanonToggle,
.contentEditCanonSliderRow .contentEditFeedSliderToggle,
.contentEditCanonSliderRow .contentEditHomeSliderToggle,
.contentEditCanonSliderRow .contentEditSliderPlaceholderToggle{
  flex:0 1 auto;
  min-width:0;
  max-width:100%;
}
.contentEditTagsForm .contentEditTagsRow{
  width:100%;
  min-width:0;
}
.contentEditTagsForm .contentEditTagsRow .hvCustomSelect{
  flex:1 1 auto;
  min-width:0;
  width:auto;
  max-width:100%;
}
.contentEditTagsForm .contentEditTagsRow .hvIconTextBtn{
  flex-shrink:0;
}
.contentEditTagsRowHv .hvUiSelect--stretched{
  flex:1 1 auto;
  min-width:0;
  width:auto;
  max-width:100%;
}
.contentEditTagsHvTable thead{
  display:none;
}

/* Сетка полей публикации (React, HvSelect/HvDateTime) — без правил .formGrid select/input */
.contentEditPubFieldsGrid{
  display:grid;
  gap:10px;
  grid-template-columns:minmax(0, 1fr);
  width:100%;
  box-sizing:border-box;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:var(--panel, #f5f5f5);
  border:1px solid var(--line, #ddd);
  font-size:12px;
  color:var(--muted, #666);
}
.dot{ width:8px; height:8px; border-radius:50%; background:var(--muted, #666); }
.dot.ok{ background:var(--good, #16a34a); }
.dot.bad{ background:var(--bad, #dc2626); }

a.link,
a.link:visited{
  color:var(--link, var(--accent, #2563eb));
  text-decoration:none;
  border-bottom:1px dashed color-mix(in oklab, var(--link, #2563eb) 35%, transparent);
  transition:color .12s ease, background-color .12s ease, border-bottom .12s ease;
}
a.link:hover{
  border-bottom-color:color-mix(in oklab, var(--link, #2563eb) 70%, transparent);
  border-bottom-style:solid;
}
a.link:active{
  color:var(--text, #e5e7eb);
  background-color:color-mix(in oklab, var(--link, var(--accent, #2563eb)) 22%, transparent);
  border-bottom:1px solid var(--link, var(--accent, #2563eb));
  border-bottom-style:solid;
}
a.link:focus-visible{
  outline:2px solid var(--accent, #2563eb);
  outline-offset:2px;
  border-radius:3px;
}

/* общий стиль для select в формах/фильтрах
   Chromium: нативная зона стрелки не режется border-radius — при hover «белые» углы; своя стрелка через appearance:none */
select:not(.hvUiSelect),
.formGrid select:not(.hvUiSelect),
.copyBtn select:not(.hvUiSelect){
  border-radius:5px;
  border:1px solid var(--line, #ddd);
  padding:8px 10px;
  padding-right:34px;
  box-sizing:border-box;
  background-color:var(--panel2, #f9fafb);
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
  background-size:14px 14px;
  color:var(--text, #111);
  font-size:13px;
  outline:none;
  overflow:hidden;
  accent-color:var(--accent, #2563eb);
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
}
select:not(.hvUiSelect)::-ms-expand{
  display:none;
}
/* Без второго контура: только смена цвета уже заданной 1px рамки (раньше outline 2px + border выглядело «толсто») */
select:not(.hvUiSelect):focus,
select:not(.hvUiSelect):focus-visible{
  outline:none;
  border-color:var(--accent, #2563eb);
  box-shadow:none;
}
select:not(.hvUiSelect) option{
  background-color:var(--panel2, #fff);
  color:var(--text, #111);
}

/* если ты используешь class="copyBtn" на select (без сильного pill — слегка скруглённые углы) */
select.copyBtn:not(.hvUiSelect){
  border-radius:5px;
  padding:6px 12px;
  padding-right:32px;
  background-position:right 12px center;
}

/* компактные селекты в тулбарах */
select.copyBtn.compact:not(.hvUiSelect){
  padding:var(--hv-control-compact-py) var(--hv-control-compact-px);
  padding-right:28px;
  min-height:var(--hv-control-compact-h);
  font-size:var(--hv-control-compact-fs);
  line-height:var(--hv-control-compact-lh);
  border-radius:var(--hv-control-compact-radius);
  background-position:right 10px center;
  box-sizing:border-box;
}

.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}
.table th, .table td{
  text-align:left;
  padding:10px 12px;
  border-bottom:1px solid rgba(36,48,65,.25);
  vertical-align:top;
}
.table th{
  font-size:12px;
  color:var(--muted, #666);
  font-weight:600;
}
.table th.pluginsListActionsCol,
.table td.pluginsListActionsCol{
  width:1%;
  white-space:nowrap;
  text-align:center;
  vertical-align:middle;
}
/* Список плагинов: «Плагин» забирает свободную ширину; метаданные и действия — по контенту */
.table.pluginsListTable{
  table-layout:auto;
}
.table.pluginsListTable th.pluginsListMetaCol,
.table.pluginsListTable td.pluginsListMetaCol{
  width:1%;
  white-space:nowrap;
  text-align:center;
  vertical-align:middle;
}
.table.pluginsListTable th.pluginsListPluginCol,
.table.pluginsListTable td.pluginsListPluginCol{
  width:auto;
  min-width:10em;
  text-align:left;
  vertical-align:middle;
}
.table.pluginsListTable th,
.table.pluginsListTable td{
  vertical-align:middle;
}

/* Список тегов в админке: как плагины — первая колонка главная, остальные по контенту, по центру */
.table.tagsListTable{
  table-layout:auto;
}
.table.tagsListTable th.tagsListMetaCol,
.table.tagsListTable td.tagsListMetaCol{
  width:1%;
  white-space:nowrap;
  text-align:center;
  vertical-align:middle;
}
.table.tagsListTable th.tagsListNameCol,
.table.tagsListTable td.tagsListNameCol{
  width:auto;
  min-width:10em;
  text-align:left;
  vertical-align:middle;
}
.table.tagsListTable th,
.table.tagsListTable td{
  vertical-align:middle;
}

/* Список контента: колонка обложки (hv-image в ячейке) */
.table th.contentListCoverCol,
.table td.contentListCoverCol{
  width:52px;
  max-width:52px;
  text-align:center;
  vertical-align:middle;
  padding-left:6px;
  padding-right:6px;
}
.table.contentListTable .contentListThumbCell{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:2px 0;
  min-width:0;
}
.table.contentListTable .contentListCellHvImage .hvImage__frame--fixed{
  margin-left:auto;
  margin-right:auto;
}
.contentListCoverColHeadIcon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  opacity:0.65;
}
.contentListCoverColHeadIcon .adminToolbarIcon{
  display:block;
}
.contentListCoverMark{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--muted, #64748b);
}
.contentListCoverMark .adminToolbarIcon{
  display:block;
}

/* Строка «Контент»: заголовок слева, клон/удаление справа */
.contentListTitleCell{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.contentListTitleText{
  min-width:0;
  flex:1 1 auto;
}
a.link.contentListTitleLink--fallback{
  font-style:italic;
  opacity:0.92;
}
.contentListRowActions{
  display:flex;
  flex-shrink:0;
  gap:7px;
  align-items:center;
}
.table.assetListTable .contentListRowActions.assetListActionsCell{
  flex-wrap:nowrap;
  justify-content:center;
}
.contentListRowActionForm{
  margin:0;
  display:flex;
  align-items:center;
}
/* Компактные ~24px вместо 36px (~1.5×), иконки пропорционально */
.table .contentListRowActions .iconBtn.contentListRowIconBtn{
  width:24px;
  height:24px;
  min-height:24px;
  border-radius:7px;
  border:1px solid var(--line, #334155);
}
.table .contentListRowActions .iconBtn.contentListRowIconBtn svg{
  width:14px;
  height:14px;
}
.table .contentListRowActions .iconBtn.contentListRowIconBtn img{
  width:14px;
  height:14px;
}
.table .contentListRowActions .iconBtnDanger.contentListRowIconBtn{
  border-color:var(--bad, #dc2626);
}

/* Список контента: ширины колонок, тип — иконка, «Обновлено» по центру по вертикали */
.table.contentListTable{
  table-layout:fixed;
  width:100%;
}
.table.contentListTable th.contentListTitleCol,
.table.contentListTable td.contentListTitleCol{
  vertical-align:middle;
}
.table.contentListTable th.contentListTypeCol,
.table.contentListTable td.contentListTypeCol{
  width:56px;
  max-width:56px;
  text-align:center;
  vertical-align:middle;
  padding-left:4px;
  padding-right:4px;
}
.table.contentListTable th.contentListPinCol,
.table.contentListTable td.contentListPinCol{
  width:44px;
  max-width:44px;
  text-align:center;
  vertical-align:middle;
  padding-left:4px;
  padding-right:4px;
}
.contentListPinColHeadIcon,
.contentListPinIcon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--accent, #2563eb);
}
.contentListPinColHeadIcon .adminToolbarIcon,
.contentListPinColHeadIcon svg,
.contentListPinIcon .adminToolbarIcon,
.contentListPinIcon svg{
  width:18px;
  height:18px;
  display:block;
}
.contentListPinCell{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
}
.table.contentListTable .contentListRowActions .hvIconTextBtn--iconOnly.hvIconTextBtn--compact{
  width:24px;
  min-width:24px;
  height:24px;
  padding:2px;
  box-sizing:border-box;
}
.table.contentListTable .contentListRowActions .hvIconTextBtn--iconOnly .hvIconTextBtn__icon .adminToolbarIcon,
.table.contentListTable .contentListRowActions .hvIconTextBtn--iconOnly .hvIconTextBtn__icon svg{
  width:14px;
  height:14px;
}
.contentListTypeHvBtn{
  margin:0 auto;
}
.table.contentListTable .contentListTypeHvBtn.hvIconTextBtn--iconOnly{
  padding-left:5px;
  padding-right:5px;
}
.contentListTypeIconWrap{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:var(--muted, #64748b);
  cursor:default;
}
.table.contentListTable .contentListTypeIconWrap .adminToolbarIcon,
.table.contentListTable .contentListTypeIconWrap svg{
  width:20px;
  height:20px;
  display:block;
}
.table.contentListTable th.contentListStatusCol,
.table.contentListTable td.contentListStatusCol{
  width:13%;
  min-width:0;
  max-width:12rem;
  vertical-align:middle;
  word-wrap:break-word;
  overflow-wrap:break-word;
}
.table.contentListTable th.contentListUpdatedCol,
.table.contentListTable td.contentListUpdatedCol{
  width:10rem;
  max-width:11rem;
  white-space:nowrap;
  vertical-align:middle;
}

/* Пагинатор списка контента: подпись «N–M из …» и селект лимита в одну строку (перекрывает flex-wrap у .actionRow) */
.contentListPager .contentListPager__meta{
  flex-wrap:nowrap;
}

/* Список файлов в админке: фиксированные боковые колонки, заголовок забирает остаток, без вылезания текста */
.table.assetListTable{
  table-layout:fixed;
  width:100%;
  --asset-row-ctrl-h:28px;
}
.table.assetListTable tbody{
  overflow-anchor:none;
}
.table.assetListTable col.assetListColPreview{ width:100px; }
.table.assetListTable col.assetListColTitle{ width:auto; }
.table.assetListTable col.assetListColMime{ width:76px; }
.table.assetListTable col.assetListColSize{ width:92px; }
.table.assetListTable col.assetListColDate{ width:176px; }
/* Три компактные hv-button (копировать / править / удалить) + зазоры */
.table.assetListTable col.assetListColActions{ width:9.25rem; min-width:9.25rem; }

.table.assetListTable th.assetListPreviewCol,
.table.assetListTable td.assetListPreviewCol{
  vertical-align:middle;
  padding:8px 6px;
  overflow:hidden;
}
.table.assetListTable th.assetListTitleCol,
.table.assetListTable td.assetListTitleCol{
  vertical-align:middle;
  min-width:0;
  width:auto;
  overflow:hidden;
}
.table.assetListTable th.assetListMimeCol,
.table.assetListTable td.assetListMimeCol{
  text-align:center;
  vertical-align:middle;
  padding-left:4px;
  padding-right:4px;
  overflow:hidden;
}
.table.assetListTable .assetListMimeTypeBtn{
  max-width:100%;
  box-sizing:border-box;
}
.table.assetListTable .assetListMimeTypeBtn .hvIconTextBtn__label{
  display:block;
  max-width:3.75rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.table.assetListTable th.assetListSizeCol,
.table.assetListTable td.assetListSizeCol{
  text-align:center;
  vertical-align:middle;
  padding-left:6px;
  padding-right:6px;
  overflow:hidden;
  white-space:nowrap;
}
.table.assetListTable th.assetListDateCol,
.table.assetListTable td.assetListDateCol{
  white-space:nowrap;
  vertical-align:middle;
  padding-left:6px;
  padding-right:6px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.table.assetListTable th.assetListActionsCol,
.table.assetListTable td.assetListActionsCol{
  text-align:center;
  vertical-align:middle;
  padding-left:4px;
  padding-right:10px;
  overflow:visible;
}
.table.assetListTable th.assetListActionsCol{
  font-size:11px;
  font-weight:600;
  letter-spacing:0.02em;
  color:var(--muted, #94a3b8);
  white-space:nowrap;
}

.assetListPreviewBox{
  width:88px;
  height:72px;
  max-width:100%;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  border-radius:8px;
  border:1px solid var(--line, #334155);
  background:var(--panel2, #1e293b);
  overflow:hidden;
}
.assetListPreviewLink{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  min-height:0;
}
/* Превью файлов: hv-image-preview (визир) в ячейке списка */
.assetListPreviewLink .hvImagePreview{
  width:100%;
  height:100%;
  min-height:0;
  max-width:100%;
  max-height:100%;
}
.assetListPreviewPlaceholder{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
}

.assetListTitleRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
}
.assetListTitleRow .assetListTitleText{
  flex:1 1 auto;
  min-width:0;
}
.assetListTitleText{
  min-width:0;
  overflow:hidden;
}
.assetListEllipsis{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:100%;
}
.assetListActionsCell{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:nowrap;
  gap:6px;
  min-width:0;
}

.table.assetListTable .assetTypeBadge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  height:var(--asset-row-ctrl-h);
  min-height:var(--asset-row-ctrl-h);
  max-width:100%;
  padding:0 6px;
  border-radius:7px;
  border:1px solid var(--line, #334155);
  background:color-mix(in oklab, var(--panel2, #1e293b) 88%, var(--accent, #60a5fa) 12%);
  font-family:var(--mono, ui-monospace);
  font-size:11px;
  font-weight:600;
  letter-spacing:0.04em;
  color:var(--text, #e2e8f0);
  line-height:1;
  cursor:default;
}
.table.assetListTable .assetTypeBadge__text{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:56px;
}
.table.assetListTable .assetTypeBadge--preview{
  height:auto;
  min-height:0;
  max-height:36px;
  padding:3px 5px;
}
.table.assetListTable .assetTypeBadge--preview .assetTypeBadge__text{
  font-size:10px;
  letter-spacing:0.03em;
  max-width:72px;
}

.assetListSizeValue{
  display:inline-block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  vertical-align:middle;
}
.assetListCompressCell{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-shrink:0;
  min-width:0;
}
.assetCompressForm{
  display:inline-flex;
  align-items:center;
  gap:4px;
  flex-wrap:nowrap;
  flex-shrink:0;
  margin:0;
}
.table.assetListTable .assetCompressForm .assetCompressQuality{
  box-sizing:border-box;
  height:var(--asset-row-ctrl-h);
  min-height:var(--asset-row-ctrl-h);
  padding:0 4px;
  margin:0;
  font-size:11px;
  line-height:1;
  min-width:3.25rem;
  max-width:4.25rem;
  vertical-align:middle;
}

/* Единая высота иконок в строке файлов (копировать / редактировать / удалить / сжать) */
.table.assetListTable .contentListRowActions .hvIconTextBtn--iconOnly.hvIconTextBtn--compact,
.table.assetListTable .contentListRowActions .iconBtn.contentListRowIconBtn,
.table.assetListTable .assetCompressForm .iconBtn.contentListRowIconBtn{
  width:var(--asset-row-ctrl-h);
  height:var(--asset-row-ctrl-h);
  min-height:var(--asset-row-ctrl-h);
  border-radius:7px;
  border:1px solid var(--line, #334155);
  box-sizing:border-box;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.table.assetListTable .contentListRowActions .hvIconTextBtn--iconOnly.hvIconTextBtn--compact:not(.hvIconTextBtn--tone-warning):hover,
.table.assetListTable .contentListRowActions .iconBtn.contentListRowIconBtn:not(.iconBtnDanger):hover,
.table.assetListTable .assetCompressForm .iconBtn.contentListRowIconBtn:hover{
  border-color:var(--muted, #94a3b8);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--line, #64748b) 55%, transparent),
    0 0 10px color-mix(in oklab, var(--muted, #94a3b8) 45%, transparent);
}
.table.assetListTable .contentListRowActions .hvIconTextBtn--tone-warning.hvIconTextBtn--iconOnly:hover,
.table.assetListTable .contentListRowActions .iconBtnDanger.contentListRowIconBtn:hover{
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--bad, #dc2626) 45%, transparent),
    0 0 12px color-mix(in oklab, var(--bad, #dc2626) 50%, transparent);
}
.table.assetListTable .contentListRowActions .hvIconTextBtn--iconOnly .adminToolbarIcon svg,
.table.assetListTable .contentListRowActions .iconBtn.contentListRowIconBtn svg,
.table.assetListTable .assetCompressForm .iconBtn.contentListRowIconBtn svg{
  width:15px;
  height:15px;
}
.table.assetListTable .contentListRowActions .iconBtn.contentListRowIconBtn img,
.table.assetListTable .assetCompressForm .iconBtn.contentListRowIconBtn img{
  width:15px;
  height:15px;
}
.table.assetListTable .contentListRowActions .hvIconTextBtn--tone-warning.hvIconTextBtn--iconOnly,
.table.assetListTable .contentListRowActions .iconBtnDanger.contentListRowIconBtn{
  border-color:var(--bad, #dc2626);
}

button.assetListPreviewLink{
  -webkit-appearance:none;
  appearance:none;
  border:none;
  margin:0;
  padding:0;
  background:none;
  color:inherit;
  font:inherit;
  cursor:pointer;
  border-radius:inherit;
}
button.assetListPreviewLink:focus-visible{
  outline:2px solid var(--accent, #60a5fa);
  outline-offset:2px;
}

/* Админка /admin/assets: зона загрузки, сетка, тулбар */
.assetUploadPanel{
  padding:0 14px 12px;
}
.assetUploadPanel__shell{
  position:relative;
  margin-top:8px;
}
.assetUploadPanel__close{
  position:absolute;
  top:8px;
  right:8px;
  z-index:2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:0;
  min-width:36px;
  min-height:36px;
  padding:0;
}
.assetUploadPanel__close.hvIconTextBtn--compact{
  min-width:36px;
  min-height:36px;
  padding:4px;
  box-sizing:border-box;
}
.assetUploadPanel__closeIcon,
.assetUploadPanel__closeIcon .adminToolbarIcon,
.assetUploadPanel__closeIcon .adminToolbarIcon svg{
  display:block;
}
.assetUploadDropzone{
  border:2px dashed var(--line, #475569);
  border-radius:12px;
  padding:28px 48px 24px;
  text-align:center;
  background:var(--panel2, #1e293b);
  transition:border-color .15s ease, background .15s ease;
}
.assetUploadDropzone:focus{
  outline:2px solid var(--accent, #60a5fa);
  outline-offset:2px;
}
.assetUploadDropzone--drag{
  border-color:var(--accent, #60a5fa);
  background:color-mix(in oklab, var(--accent, #3b82f6) 12%, var(--panel2, #1e293b));
}
.assetUploadDropzone__title{
  margin:0 0 8px;
  font-weight:600;
  font-size:15px;
}
.assetUploadDropzone__or{
  margin:0 0 10px;
  font-size:13px;
  color:var(--muted, #94a3b8);
}
.assetUploadDropzone__pickBtn{
  margin:0 auto;
}
.assetUploadDropzone__hint{
  margin:14px 0 0;
}
.assetUploadQueue{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}
.assetUploadTile{
  position:relative;
  width:120px;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--line, #334155);
  background:var(--panel2, #1e293b);
}
.assetUploadTile__thumb{
  aspect-ratio:4 / 3;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  font-size:11px;
  padding:6px;
  text-align:center;
  word-break:break-all;
  color:var(--muted, #94a3b8);
}
.assetUploadTile__thumb img{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  display:block;
}
.assetUploadTile__progress{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:5px;
  background:rgba(0,0,0,.35);
}
.assetUploadTile__progressBar{
  height:100%;
  width:0%;
  background:var(--accent, #3b82f6);
  transition:width .08s linear;
}
.assetUploadTile__err{
  font-size:11px;
  color:var(--bad, #f87171);
  padding:6px 8px;
}
.assetMediaToolbar{
  border-bottom:1px solid var(--line, #334155);
}
.assetViewToggle .iconBtn.is-active{
  border-color:var(--accent, #60a5fa);
  box-shadow:0 0 0 1px color-mix(in oklab, var(--accent, #60a5fa) 50%, transparent);
}
.js-asset-list-wrap.is-hidden{
  display:none !important;
}
.js-asset-grid.is-hidden{
  display:none !important;
}
.assetGrid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(168px, 1fr));
  gap:12px;
  --asset-grid-ctrl:24px;
}
.assetGridItem{
  border:1px solid var(--line, #334155);
  border-radius:10px;
  overflow:hidden;
  background:var(--panel2, #1e293b);
}
.assetGridItem__preview{
  aspect-ratio:4 / 3;
  display:block;
  position:relative;
  overflow:hidden;
  min-height:0;
  background:color-mix(in oklab, var(--bg, #0f172a) 88%, var(--panel2, #1e293b));
}
/* Плейсхолдер не-изображения; превью картинки — hv-image-preview внутри кнопки */
.assetGridItem__preview .assetGridPlaceholder img{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  object-position:center center;
  display:block;
}
button.assetGridPreviewLink{
  -webkit-appearance:none;
  appearance:none;
  border:none;
  margin:0;
  padding:0;
  width:100%;
  height:100%;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  background:none;
  color:inherit;
  box-sizing:border-box;
}
.assetGridPreviewLink .hvImagePreview{
  width:100%;
  height:100%;
  min-height:0;
}
button.assetGridPreviewLink:focus-visible{
  outline:2px solid var(--accent, #60a5fa);
  outline-offset:-2px;
}
.assetGridPlaceholder{
  box-sizing:border-box;
  padding:8px;
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.assetGridItem__bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px;
  padding:6px;
  border-top:1px solid var(--line, #334155);
}
.assetGridItem__copyBtn{
  flex:0 0 auto;
  align-self:center;
  margin-right:4px;
}
.assetGridCompress{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px;
  flex:1;
  min-width:0;
}
.assetGridItem__actions{
  display:flex;
  gap:4px;
  margin-left:auto;
}
/* Плитки: компактные icon-кнопки и hv-button */
.assetGrid .assetGridItem__actions .hvIconTextBtn--iconOnly.hvIconTextBtn--compact,
.assetGrid .assetGridItem__bar > .hvIconTextBtn--iconOnly.hvIconTextBtn--compact,
.assetGrid .assetGridItem__actions .iconBtn.contentListRowIconBtn,
.assetGrid .assetCompressForm .iconBtn.contentListRowIconBtn{
  width:var(--asset-grid-ctrl, 24px);
  height:var(--asset-grid-ctrl, 24px);
  min-width:var(--asset-grid-ctrl, 24px);
  min-height:var(--asset-grid-ctrl, 24px);
  padding:0;
  border-radius:6px;
  border:1px solid var(--line, #334155);
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  -webkit-appearance:none;
  appearance:none;
  background:var(--panel2, #1e293b);
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.assetGrid .assetGridItem__actions .hvIconTextBtn--iconOnly .adminToolbarIcon svg,
.assetGrid .assetGridItem__bar > .hvIconTextBtn--iconOnly .adminToolbarIcon svg,
.assetGrid .assetGridItem__actions .iconBtn.contentListRowIconBtn svg,
.assetGrid .assetCompressForm .iconBtn.contentListRowIconBtn svg{
  width:15px;
  height:15px;
}
.assetGrid .assetGridItem__actions .iconBtn.contentListRowIconBtn img,
.assetGrid .assetCompressForm .iconBtn.contentListRowIconBtn img{
  width:15px;
  height:15px;
}
.assetGrid .assetGridItem__actions .iconBtnDanger.contentListRowIconBtn{
  border-color:var(--bad, #dc2626);
  background:rgba(220,38,38,0.1);
}
.assetGrid .assetGridItem__actions .iconBtn.contentListRowIconBtn:not(.iconBtnDanger):hover,
.assetGrid .assetCompressForm .iconBtn.contentListRowIconBtn:hover{
  border-color:var(--muted, #94a3b8);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--line, #64748b) 55%, transparent),
    0 0 10px color-mix(in oklab, var(--muted, #94a3b8) 45%, transparent);
}
.assetGrid .assetGridItem__actions .iconBtnDanger.contentListRowIconBtn:hover{
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--bad, #dc2626) 45%, transparent),
    0 0 12px color-mix(in oklab, var(--bad, #dc2626) 50%, transparent);
}
.assetGrid .assetCompressForm .assetCompressQuality{
  height:var(--asset-grid-ctrl, 24px);
  min-height:var(--asset-grid-ctrl, 24px);
}

/* Модальные окна (Handville): <dialog class="hvModal"> + data-hv-modal-dismiss / data-hv-modal-close. См. public/js/ui-modal.js */
.hvModal{
  margin:0;
  padding:0;
  border:none;
  background:transparent;
  width:100vw;
  max-width:100vw;
  height:100vh;
  max-height:100vh;
  box-sizing:border-box;
  overflow:visible;
}
.hvModal::backdrop{
  background:rgba(15,23,42,0.76);
  backdrop-filter:blur(3px);
}
.hvModal__shell{
  position:relative;
  width:100%;
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  box-sizing:border-box;
}
.hvModal__dismiss{
  position:absolute;
  inset:0;
  margin:0;
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
  cursor:pointer;
}
.hvModal__globalClose{
  position:fixed;
  top:25px;
  right:25px;
  z-index:2;
}
.hvModal__panel{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  gap:12px;
  width:100%;
  max-width:min(96vw, 1120px);
  max-height:calc(100vh - 32px);
  padding:16px 18px 14px;
  box-sizing:border-box;
  border-radius:15px;
  background:var(--panel, #0f172a);
  border:1px solid var(--line, #334155);
  box-shadow:0 24px 64px rgba(0,0,0,0.5);
}
/* Универсальная оболочка hv-modal.ejs — тело через bodyPartial */
.hvModal.hvModal--shell .hvModal__panel--body{
  min-height:0;
  overflow:auto;
}
/* Алерт: hv-alert.ejs — узкая панель, hv-legend-panel без caption */
.hvModal.hvModal--alert .hvModal__panel--alert{
  max-width:min(92vw, 440px);
  padding:18px 20px 16px;
  gap:10px;
}
.hvModal.hvModal--alert .hvAlertLegend.legendPanel{
  min-height:0;
}
.hvModal.hvModal--alert .hvAlert__message{
  margin:0;
  text-align:center;
  font-size:15px;
  line-height:1.45;
  color:var(--text, #e5e7eb);
}
.hvAlertFooterOk{
  display:flex;
  justify-content:center;
  align-items:center;
  width:100%;
  padding-top:6px;
  box-sizing:border-box;
}
.hvModal__panel--imagePreview{
  gap:6px;
  padding:8px 9px 7px;
  max-height:calc(100vh - 16px);
}
.hvModal__close.iconBtn.contentListRowIconBtn{
  width:28px;
  height:28px;
  min-height:28px;
  flex-shrink:0;
}
.hvModal__imageUploadHead .hvModal__close.hvIconTextBtn--iconOnly.hvIconTextBtn--compact{
  width:28px;
  height:28px;
  min-width:28px;
  min-height:28px;
  padding:2px;
  box-sizing:border-box;
  flex-shrink:0;
}
.hvModal__imageUploadHead .hvModal__close.hvIconTextBtn--iconOnly .hvIconTextBtn__icon .adminToolbarIcon svg{
  width:18px;
  height:18px;
}
.hvModal__closeIcon{
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:0;
}
.hvModal__closeIcon .adminToolbarIcon,
.hvModal__closeIcon .adminToolbarIcon svg{
  display:block;
}
.hvModalImagePreview__stage{
  display:flex;
  justify-content:center;
  min-width:0;
}
.hvModalImagePreview__imageBlock{
  display:inline-block;
  max-width:100%;
  vertical-align:top;
}
.hvModalImagePreview__cornerActions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:6px;
  margin-top:8px;
}
.hvModalImagePreview__cornerActions .hvModal__close.hvIconTextBtn--iconOnly.hvIconTextBtn--compact{
  width:28px;
  height:28px;
  min-width:28px;
  min-height:28px;
  padding:2px;
  box-sizing:border-box;
}
.hvModal__imgWrap{
  flex:1;
  min-height:120px;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  border-radius:8px;
  background:color-mix(in oklab, var(--panel2, #1e293b) 88%, transparent);
}
.hvModal__panel--imagePreview .hvModal__imgWrap{
  border-radius:6px;
}
.hvModal__previewImg{
  display:block;
  max-width:100%;
  max-height:min(72vh, calc(100vh - 200px));
  width:auto;
  height:auto;
  object-fit:contain;
}
.hvModal__panel--imagePreview .hvModal__previewImg{
  max-height:min(78vh, calc(100vh - 120px));
}

/* Модалка единой загрузки изображения: partial hv-image-upload-modal.ejs + hv-image-upload-modal.js */
.hvModal.hvModal--imageUpload .hvModal__panel--imageUpload{
  max-width:min(96vw, 440px);
  gap:14px;
  padding:16px 18px 16px;
}
.hvModal__imageUploadHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.hvModal__imageUploadTitle{
  margin:0;
  font-size:1.05rem;
  font-weight:600;
  line-height:1.3;
  color:var(--text, #e2e8f0);
}
.hvModal__imageUploadZone{
  padding:22px 20px 20px;
}
.hvModal__imageUploadWait{
  margin:0;
  text-align:center;
}
.hvModal__imageUploadErr{
  margin:0;
  padding:10px 12px;
  border-radius:8px;
  font-size:13px;
  line-height:1.4;
  color:var(--bad-ink, #fecaca);
  background:color-mix(in oklab, var(--bad, #dc2626) 22%, var(--panel2, #1e293b));
  border:1px solid color-mix(in oklab, var(--bad, #dc2626) 45%, transparent);
}

.hvModal__panel--assetEdit{
  max-width:min(96vw, 980px);
  padding:10px 12px 12px;
  gap:0;
}
.hvModal__panel--assetEdit .assetEditModalLegend.legendPanel{
  --legend-panel-pad-top:10px;
  --legend-panel-pad-x:12px;
  margin:0;
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
.assetEditModal__body{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  align-items:flex-start;
  min-height:0;
  max-height:calc(100vh - 220px);
  overflow:auto;
  padding:5px;
}
.assetEditModal__previewCol{
  flex:1 1 280px;
  min-width:220px;
  max-width:100%;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.assetEditModal__previewFrameWrap{
  width:100%;
  min-width:0;
}
.assetEditModal__previewFrame{
  width:100%;
  max-width:100%;
  display:block;
}
.assetEditModal__previewFrame .hvImagePreview{
  width:100%;
  max-width:100%;
}
.assetEditModal__previewFallback{
  text-align:center;
  padding:12px;
}
.assetEditModal__metaPanel.hvPanelBlock{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
.assetEditModal__metaPanel .hvPanelBlock__inner{
  min-width:0;
}
.assetEditModal__side{
  flex:1 1 300px;
  min-width:260px;
  max-width:100%;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.assetEditModal__meta{
  margin:0;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:4px 12px;
  align-items:baseline;
}
.assetEditModal__meta dt{
  margin:0;
  font-weight:600;
  color:var(--muted, #94a3b8);
}
.assetEditModal__meta dd{
  margin:0;
  color:var(--text, #e2e8f0);
  word-break:break-word;
}
.assetEditModal__meta a{
  color:var(--link, var(--accent, #60a5fa));
}
.assetEditModal__form{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.assetEditModal__field{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.assetEditModal__label{
  font-size:12px;
  font-weight:600;
  color:var(--muted, #94a3b8);
}
.assetEditModal__input,
.assetEditModal__textarea{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  text-align:left;
  padding:8px 10px;
  font-size:13px;
  line-height:1.4;
  color:var(--text, #e2e8f0);
  background:var(--panel2, #1e293b);
  border:1px solid var(--line, #475569);
  border-radius:8px;
  outline:none;
}
.assetEditModal__input:focus-visible,
.assetEditModal__textarea:focus-visible{
  border-color:var(--accent, #60a5fa);
  box-shadow:0 0 0 1px color-mix(in oklab, var(--accent, #60a5fa) 40%, transparent);
}
.assetEditModal__input--readonly{
  opacity:0.92;
  cursor:default;
}
.assetEditModal__textarea{
  resize:vertical;
  min-height:48px;
  font-family:inherit;
}
.assetEditModal__hint{
  margin:0;
  line-height:1.35;
}
.assetEditModal__copyUrl{
  align-self:flex-start;
  margin-top:4px;
}
.assetEditModal__cropGrid{
  display:grid;
  grid-template-columns:repeat(3, 36px);
  grid-template-rows:repeat(3, 36px);
  gap:4px;
  width:fit-content;
}
.assetEditModal__cropCell{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0;
  cursor:pointer;
  border-radius:6px;
}
.assetEditModal__cropRadio{
  position:absolute;
  opacity:0;
  width:100%;
  height:100%;
  margin:0;
  cursor:pointer;
}
.assetEditModal__cropFace{
  display:block;
  width:100%;
  height:100%;
  border-radius:6px;
  border:1px solid var(--line, #475569);
  background:var(--panel2, #1e293b);
  box-sizing:border-box;
  transition:border-color 0.15s ease, box-shadow 0.15s ease;
}
.assetEditModal__cropRadio:hover + .assetEditModal__cropFace,
.assetEditModal__cropRadio:focus-visible + .assetEditModal__cropFace{
  border-color:var(--muted, #94a3b8);
}
.assetEditModal__cropRadio:checked + .assetEditModal__cropFace{
  border-color:var(--accent, #60a5fa);
  box-shadow:0 0 0 1px color-mix(in oklab, var(--accent, #60a5fa) 45%, transparent);
}
/* hv-legend-panel добавляет .formGrid на fieldset — иначе .formGrid input перебивает .assetEditModal__input */
.hvModal__panel--assetEdit .assetEditModalLegend.formGrid .assetEditModal__input,
.hvModal__panel--assetEdit .assetEditModalLegend.formGrid .assetEditModal__textarea{
  background:var(--panel2, #1e293b);
  color:var(--text, #e2e8f0);
  border-color:var(--line, #475569);
  border-radius:8px;
}
.assetEditModal__foot{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0;
  padding:0;
  border:none;
}
.assetEditModal__status{
  margin:0;
  flex:1 1 120px;
  min-height:1.2em;
  color:var(--muted, #94a3b8);
}
.assetEditModal__footActions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.mono{ font-family:var(--mono, ui-monospace); font-size:12px; }
.small{ color:var(--muted, #666); font-size:12px; }
.muted{ color:var(--muted, #666); }

.editorToolbar {
  display: flex;
  justify-content: flex-end;
  padding: 8px 0;
  margin-bottom: 6px;
}

.textEditor {
  width: 100%;
  min-height: 420px;
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 14px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
}

/* GRID: main + опционально левый/правый сайдбар (слоты layout_sidebar_left / layout_sidebar) */

/* Кнопки в шапке/формах (тема, выход, select'ы)
   Фон только не для select: шортханд background сбрасывает repeat → тайлится svg-стрелка */
.copyBtn{
  border-radius:999px;
  border:1px solid var(--line, #ddd);
  padding:6px 12px;
  font-size:12px;
}
.copyBtn:not(select){
  background:var(--panel, #f5f5f5);
}
.copyBtn.compact{
  padding:var(--hv-control-compact-py) var(--hv-control-compact-px);
  min-height:var(--hv-control-compact-h);
  font-size:var(--hv-control-compact-fs);
  line-height:var(--hv-control-compact-lh);
  border-radius:var(--hv-control-compact-radius);
  box-sizing:border-box;
}
/* .copyBtn ниже задаёт pill (999px) — для опасной кнопки оставляем мягкое скругление как у .btnDanger */
.copyBtn.btnDanger{
  border-radius:10px;
}

/* HV-IMAGE — partial hv-image.ejs */
.hvImage{
  display:inline-block;
  max-width:100%;
  vertical-align:middle;
  box-sizing:border-box;
  margin:0;
}
figure.hvImage{
  display:inline-block;
  margin:0;
}
.hvImage__frame{
  overflow:hidden;
  box-sizing:border-box;
  line-height:0;
}
.hvImage__img{
  vertical-align:middle;
}
.hvImage--rounded .hvImage__frame,
.hvImage--rounded .hvImage__img{
  border-radius:5px;
}
.hvImage--sharp .hvImage__frame,
.hvImage--sharp .hvImage__img{
  border-radius:0;
}
.hvImage__caption{
  display:block;
  margin:6px 0 0;
  padding:0;
  text-align:center;
  max-width:100%;
  line-height:1.4;
}
.hvImage--tone-base .hvImage__frame{
  padding:2px;
  border:1px solid color-mix(in oklab, var(--line, #e2e8f0) 85%, transparent);
  background:color-mix(in oklab, var(--panel2, #f1f5f9) 94%, transparent);
}
.hvImage--tone-link .hvImage__frame{
  padding:2px;
  border:1px solid color-mix(in oklab, var(--line, #e2e8f0) 85%, transparent);
  background:color-mix(in oklab, var(--panel2, #f1f5f9) 94%, transparent);
}
.hvImage--tone-accept .hvImage__frame{
  padding:2px;
  border:1px solid color-mix(in oklab, var(--good, #22c55e) 42%, var(--line, #e2e8f0));
  background:color-mix(in oklab, var(--good, #22c55e) 10%, var(--panel2, #f1f5f9));
}
.hvImage--tone-warning .hvImage__frame{
  padding:2px;
  border:1px solid color-mix(in oklab, var(--warn, #ca8a04) 45%, var(--line, #e2e8f0));
  background:color-mix(in oklab, var(--warn, #ca8a04) 12%, var(--panel2, #f1f5f9));
}
.hvImage--tone-reject .hvImage__frame{
  padding:2px;
  border:1px solid color-mix(in oklab, var(--bad, #dc2626) 42%, var(--line, #e2e8f0));
  background:color-mix(in oklab, var(--bad, #dc2626) 10%, var(--panel2, #f1f5f9));
}
.hvImage.hvImage--noBorder .hvImage__frame{
  padding:0;
  border:none;
  background:transparent;
}

/* Превью «визир» — partial hv-image.ejs (viewfinder: true) */
.hvImage--viewfinder{
  --hv-image-vf-accent:#3b82f6;
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:stretch;
  width:100%;
  height:100%;
  min-height:0;
  max-width:100%;
  box-sizing:border-box;
  padding:5px;
  overflow:visible;
}
.hvImage--viewfinder.hvImage--frameNoPad{
  padding:0;
}
.hvImage--cornerStyle-rounded.hvImage--viewfinder{
  border-radius:5px;
}
.hvImage--cornerStyle-none .hvImage__vfCorner{
  display:none;
}
.hvImage.hvImage--viewfinder.hvImage--borderFrame-full{
  box-sizing:border-box;
  border:2px solid color-mix(in oklab, var(--hv-image-accent, var(--accent, #2563eb)) 72%, transparent);
}
.hvImage.hvImage--viewfinder.hvImage--borderFrame-full .hvImage__vfCorner{
  display:none;
}
.hvImage--tone-inherit .hvImage__frame{
  background:transparent;
}
figure.hvImage--viewfinder{
  display:flex;
}
.hvImage--viewfinder .hvImage__frame--viewfinder{
  flex:1 1 auto;
  min-height:0;
  min-width:0;
  width:100%;
  height:100%;
  overflow:hidden;
  background:transparent;
  position:relative;
  z-index:1;
}
.hvImage--viewfinder .hvImage__frame--vfFill{
  display:block;
}
.hvImage--viewfinder .hvImage__img{
  box-sizing:border-box;
  border:2px solid #fff;
  vertical-align:top;
}
.hvImage--viewfinder.hvImage--rounded .hvImage__img{
  border-radius:4px;
}
.hvImage--viewfinder.hvImage--sharp .hvImage__img{
  border-radius:0;
}
.hvImage__vfCorner{
  position:absolute;
  box-sizing:border-box;
  width:clamp(10px, 14px, 18%);
  height:clamp(10px, 14px, 18%);
  min-width:10px;
  min-height:10px;
  pointer-events:none;
  z-index:2;
  border-color:var(--hv-image-vf-accent, #3b82f6);
  border-style:solid;
}
.hvImage__vfCorner--tl{
  top:0;
  left:0;
  border-width:2px 0 0 2px;
}
.hvImage__vfCorner--tr{
  top:0;
  right:0;
  border-width:2px 2px 0 0;
}
.hvImage__vfCorner--bl{
  bottom:0;
  left:0;
  border-width:0 0 2px 2px;
}
.hvImage__vfCorner--br{
  bottom:0;
  right:0;
  border-width:0 2px 2px 0;
}
/* Плейсхолдер /media/svg/placeholder-card*.svg: скобы и обводка img — тот же цвет, что линии внутри SVG (см. partial hv-image-preview.ejs) */
.hvImagePreview--vitrinePlaceholder .hvImage--viewfinder{
  --hv-image-vf-accent:#2563eb;
}
html[data-theme="dark"] .hvImagePreview--vitrinePlaceholder .hvImage--viewfinder{
  --hv-image-vf-accent:#ffffff;
}
.hvImagePreview--vitrinePlaceholder .hvImage--viewfinder .hvImage__img{
  border-color:var(--hv-image-vf-accent);
}

.hvImage__frame--hasOverlays{
  position:relative;
}
.hvImage__actionSlot{
  position:absolute;
  z-index:6;
  top:clamp(5px, 3%, 15px);
  right:clamp(5px, 3%, 15px);
  pointer-events:none;
}
.hvImage__actionSlot .hvIconTextBtn,
.hvImage__actionSlot .hvUiButton,
.hvImage__actionSlot button,
.hvImage__actionSlot a{
  pointer-events:auto;
}
.hvImage__badge{
  position:absolute;
  z-index:5;
  bottom:clamp(4px, 2.5%, 12px);
  right:clamp(4px, 2.5%, 12px);
  box-sizing:border-box;
  margin:0;
  max-width:min(96%, 280px);
  padding:clamp(2px, 0.6vw, 5px) clamp(4px, 1.2vw, 8px);
  font-family:var(--sans, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  font-size:clamp(0.65rem, 1.5vw, 0.8rem);
  font-weight:650;
  line-height:1.2;
  border-radius:2px;
  border-width:1px;
  border-style:solid;
  pointer-events:none;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.hvImage__badge--tone-base{
  color:var(--text, #e2e8f0);
  border-color:color-mix(in oklab, var(--line, #64748b) 55%, transparent);
  background:color-mix(in oklab, var(--panel2, #1e293b) 88%, transparent);
}
.hvImage__badge--tone-link{
  color:var(--accent, #60a5fa);
  border-color:color-mix(in oklab, var(--accent, #2563eb) 45%, transparent);
  background:color-mix(in oklab, var(--accent, #2563eb) 12%, var(--panel2, #1e293b));
}
.hvImage__badge--tone-accept{
  color:color-mix(in oklab, var(--good, #22c55e) 92%, var(--text, #fff));
  border-color:color-mix(in oklab, var(--good, #22c55e) 42%, transparent);
  background:color-mix(in oklab, var(--good, #22c55e) 14%, var(--panel2, #1e293b));
}
.hvImage__badge--tone-warning{
  color:color-mix(in oklab, var(--warn, #ca8a04) 90%, var(--text, #fff));
  border-color:color-mix(in oklab, var(--warn, #ca8a04) 45%, transparent);
  background:color-mix(in oklab, var(--warn, #ca8a04) 14%, var(--panel2, #1e293b));
}
.hvImage__badge--tone-reject{
  color:color-mix(in oklab, var(--bad, #f87171) 95%, var(--text, #fff));
  border-color:color-mix(in oklab, var(--bad, #dc2626) 45%, transparent);
  background:color-mix(in oklab, var(--bad, #dc2626) 14%, var(--panel2, #1e293b));
}
.hvImage__descOverlay{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:4;
  margin:0;
  padding:8px 10px 10px;
  text-align:center;
  font-family:var(--sans, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  font-weight:800;
  font-size:clamp(0.65rem, 1.65vw, 0.9rem);
  line-height:1.15;
  letter-spacing:0.08em;
  text-transform:uppercase;
  font-style:italic;
  transform:skewX(-5deg);
  color:#fde047;
  text-shadow:
    0 0 2px rgba(0,0,0,0.95),
    0 2px 4px rgba(0,0,0,0.9),
    0 0 12px rgba(0,0,0,0.75);
  pointer-events:none;
}
html[data-theme="light"] .hvImage__descOverlay{
  color:#ca8a04;
  text-shadow:
    0 0 1px rgba(255,255,255,0.9),
    0 1px 2px rgba(15,23,42,0.55),
    0 2px 8px rgba(15,23,42,0.35);
}
.hvImage__img--interactive{
  cursor:pointer;
}

/* HV-PANEL-BLOCK — partial hv-panel-block.ejs */
.hvPanelBlock{
  --hv-panel-block-accent:var(--accent, #2563eb);
  position:relative;
  display:block;
  max-width:100%;
  box-sizing:border-box;
  padding:12px;
  overflow:visible;
}
.hvPanelBlock__inner{
  position:relative;
  z-index:1;
  min-width:0;
  min-height:0;
}
.hvPanelBlock:not(.hvPanelBlock--noPadding) .hvPanelBlock__inner{
  padding:4px 6px;
  box-sizing:border-box;
}
.hvPanelBlock--noPadding .hvPanelBlock__inner{
  padding:0;
}
.hvPanelBlock__corner{
  position:absolute;
  box-sizing:border-box;
  width:clamp(10px, 14px, 18%);
  height:clamp(10px, 14px, 18%);
  min-width:10px;
  min-height:10px;
  pointer-events:none;
  z-index:2;
  border-color:var(--hv-panel-block-accent, var(--accent, #2563eb));
  border-style:solid;
}
.hvPanelBlock__corner--tl{
  top:0;
  left:0;
  border-width:2px 0 0 2px;
}
.hvPanelBlock__corner--tr{
  top:0;
  right:0;
  border-width:2px 2px 0 0;
}
.hvPanelBlock__corner--bl{
  bottom:0;
  left:0;
  border-width:0 0 2px 2px;
}
.hvPanelBlock__corner--br{
  bottom:0;
  right:0;
  border-width:0 2px 2px 0;
}
/* Только уголки этой панели; без `>` вложенные hv-panel-block внутри inner теряли бы уголки */
.hvPanelBlock--noCorners > .hvPanelBlock__corner{
  display:none;
}
.hvPanelBlock--noPadding{
  padding:0;
}
.hvPanelBlock--stretchW{
  width:100%;
}
.hvPanelBlock--stretchH{
  height:100%;
  min-height:0;
}
.hvPanelBlock--aspect{
  width:100%;
  max-width:100%;
  aspect-ratio:var(--hv-panel-aspect, 16/9);
  min-height:0;
}
.hvPanelBlock--aspect .hvPanelBlock__inner{
  position:relative;
  height:100%;
  min-height:0;
  overflow:hidden;
}
.hvPanelBlock--centerText{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.hvPanelBlock--centerText .hvPanelBlock__inner{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
}
.hvPanelBlock__text{
  display:block;
  max-width:100%;
}
.hvPanelBlock--tone-base{ --hv-panel-block-accent:var(--accent, #2563eb); }
.hvPanelBlock--tone-link{ --hv-panel-block-accent:var(--accent, #2563eb); }
.hvPanelBlock--tone-accept{ --hv-panel-block-accent:var(--good, #22c55e); }
.hvPanelBlock--tone-warning{ --hv-panel-block-accent:var(--warn, #ca8a04); }
.hvPanelBlock--tone-reject{ --hv-panel-block-accent:var(--bad, #dc2626); }

/* HV-INFO-ROW — partial hv-info-row.ejs */
.hvInfoRow{
  --hv-info-row-accent:var(--accent, #2563eb);
  --hv-info-row-pad:3px;
  display:block;
  max-width:100%;
  box-sizing:border-box;
  min-width:0;
  text-align:left;
}
/* mode (partial hv-info-row.ejs): по умолчанию — width; wrap — ширина по содержимому */
.hvInfoRow--mode-width{
  width:100%;
  max-width:100%;
}
.hvInfoRow--mode-wrap{
  display:inline-block;
  width:auto;
  max-width:100%;
  vertical-align:top;
}
.hvInfoRow--bordered{
  border:1px solid color-mix(in oklab, var(--hv-info-row-accent) 58%, transparent);
}
.hvModal .hvInfoRow{
  cursor:pointer;
  transition:background-color .14s ease,border-color .14s ease;
}
.hvModal .hvInfoRow:hover{
  background:color-mix(in oklab,var(--hv-info-row-accent) 14%,var(--panel2,#1e293b));
  border-color:color-mix(in oklab,var(--hv-info-row-accent) 72%,transparent);
}
.hvModal .hvInfoRow:focus-visible{
  outline:2px solid color-mix(in oklab,var(--hv-info-row-accent) 65%,transparent);
  outline-offset:2px;
}
.hvInfoRow--rounded{
  border-radius:10px;
}
.hvInfoRow--sharp{
  border-radius:0;
}
.hvInfoRow__inner{
  display:flex;
  align-items:center;
  gap:10px;
  /* одно значение --hv-info-row-pad из partial: вертикаль в 2 раза меньше горизонтали */
  padding:calc(var(--hv-info-row-pad) * 0.5) var(--hv-info-row-pad);
  min-width:0;
}
.hvInfoRow__figure{
  flex:0 0 auto;
  width:44px;
  height:44px;
  border-radius:8px;
  overflow:hidden;
  background:color-mix(in oklab, var(--text, #111) 6%, transparent);
}
.hvInfoRow__figure--icon{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:6px;
  box-sizing:border-box;
}
.hvInfoRow__iconSlot{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:0;
  color:var(--text, #111);
}
.hvInfoRow__iconSlot .adminToolbarIcon,
.hvInfoRow__iconSlot svg{
  width:22px;
  height:22px;
}
.hvInfoRow__img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}
.hvInfoRow__img--fit-cover{ object-fit:cover; }
.hvInfoRow__img--fit-fill{ object-fit:fill; }
.hvInfoRow__img--fit-none{ object-fit:none; }
.hvInfoRow__img--fit-scale-down{ object-fit:scale-down; }
.hvInfoRow__main{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:stretch;
  gap:3px;
}
.hvInfoRow__caption{
  font-size:0.82em;
  line-height:1.25;
  text-align:left;
  text-transform:uppercase;
  letter-spacing:0.04em;
  color:color-mix(in oklab, var(--text, #111) 72%, transparent);
}
.hvInfoRow__text{
  font-size:1em;
  line-height:1;
  text-align:justify;
}
.hvInfoRow__subtitle{
  font-size:0.88em;
  line-height:1.35;
  text-align:left;
  color:var(--muted, color-mix(in oklab, var(--text, #111) 55%, transparent));
}
.hvInfoRow__actions{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:6px;
  min-width:0;
}
.hvInfoRow__badge{
  flex:0 0 auto;
  align-self:center;
  max-width:min(44%, 14rem);
  font-size:0.82em;
  line-height:1.25;
  font-variant-numeric:tabular-nums;
  letter-spacing:0.02em;
  text-align:right;
  color:color-mix(in oklab, var(--text, #111) 68%, transparent);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.hvInfoRow--tone-base{ --hv-info-row-accent:var(--accent, #2563eb); }
.hvInfoRow--tone-link{ --hv-info-row-accent:var(--accent, #2563eb); }
.hvInfoRow--tone-accept{ --hv-info-row-accent:var(--good, #22c55e); }
.hvInfoRow--tone-warning{ --hv-info-row-accent:var(--warn, #ca8a04); }
.hvInfoRow--tone-reject{ --hv-info-row-accent:var(--bad, #dc2626); }

/* HV-POWER-ROW tone — цвет рамки и уголков (partial hv-power-row.ejs) */
.adminLabeledPowerRow--tone-base{ --hv-power-row-accent:var(--accent, #2563eb); }
.adminLabeledPowerRow--tone-link{ --hv-power-row-accent:var(--accent, #2563eb); }
.adminLabeledPowerRow--tone-accept{ --hv-power-row-accent:var(--good, #22c55e); }
.adminLabeledPowerRow--tone-warning{ --hv-power-row-accent:var(--warn, #ca8a04); }
.adminLabeledPowerRow--tone-reject{ --hv-power-row-accent:var(--bad, #dc2626); }
.adminLabeledPowerRow:not(.adminLabeledPowerRow--corners).adminLabeledPowerRow--tone-base,
.adminLabeledPowerRow:not(.adminLabeledPowerRow--corners).adminLabeledPowerRow--tone-link,
.adminLabeledPowerRow:not(.adminLabeledPowerRow--corners).adminLabeledPowerRow--tone-accept,
.adminLabeledPowerRow:not(.adminLabeledPowerRow--corners).adminLabeledPowerRow--tone-warning,
.adminLabeledPowerRow:not(.adminLabeledPowerRow--corners).adminLabeledPowerRow--tone-reject{
  border-color:color-mix(in oklab, var(--hv-power-row-accent) 58%, transparent);
}

/* HV-POWER-ROW corners/background modes — partial hv-power-row.ejs */
.adminLabeledPowerRow--corners{
  position:relative;
  overflow:visible;
}
.adminLabeledPowerRow--corners .adminLabeledPowerRow__corner{
  position:absolute;
  box-sizing:border-box;
  width:clamp(10px, 14px, 18%);
  height:clamp(10px, 14px, 18%);
  min-width:10px;
  min-height:10px;
  pointer-events:none;
  z-index:2;
  border-color:var(--hv-power-row-accent, var(--hv-accent-line-strong, var(--accent, #2563eb)));
  border-style:solid;
}
.adminLabeledPowerRow--corners .adminLabeledPowerRow__corner--tl{ top:0; left:0; border-width:2px 0 0 2px; }
.adminLabeledPowerRow--corners .adminLabeledPowerRow__corner--tr{ top:0; right:0; border-width:2px 2px 0 0; }
.adminLabeledPowerRow--corners .adminLabeledPowerRow__corner--bl{ bottom:0; left:0; border-width:0 0 2px 2px; }
.adminLabeledPowerRow--corners .adminLabeledPowerRow__corner--br{ bottom:0; right:0; border-width:0 2px 2px 0; }

/* Превью-карточка с оверлеями — partial hv-image-preview.ejs (внутри hv-image + viewfinder) */
.hvImagePreview{
  position:relative;
  width:100%;
  max-width:100%;
  aspect-ratio:var(--hv-image-preview-ratio, 16/9);
  min-height:0;
  overflow:hidden;
  isolation:isolate;
}
/* width + height в partial — inline aspect-ratio:auto; класс для сброса ratio из переменной при необходимости каскада */
.hvImagePreview--ratioCustom{
  aspect-ratio:unset;
}
.hvImagePreview__media{
  position:absolute;
  inset:0;
  min-width:0;
  min-height:0;
}
.hvImagePreview__media > .hvImage.hvImage--viewfinder{
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
}
/* showCorners: false — без .hvImage--viewfinder, без padding:8px у визира; кадр на весь слот (как vfFill) */
.hvImagePreview__media > .hvImage:not(.hvImage--viewfinder){
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  min-height:0;
  box-sizing:border-box;
}
.hvImagePreview__media > .hvImage:not(.hvImage--viewfinder) .hvImage__frame--fixed{
  width:100% !important;
  height:100% !important;
  max-width:100%;
  min-height:0;
  box-sizing:border-box;
}
.hvImagePreview__media > .hvImage .hvImage__frame--viewfinder{
  flex:1 1 auto;
  min-height:0;
  height:100%;
}
.hvImagePreview__media > .hvImage .hvImage__img{
  width:100% !important;
  height:100% !important;
  max-height:100% !important;
  object-fit:cover !important;
  object-position:center center;
}
.hvImagePreview--fitContain .hvImagePreview__media > .hvImage .hvImage__img{
  object-fit:contain !important;
  width:auto !important;
  height:auto !important;
  max-width:100% !important;
  max-height:100% !important;
}
.hvImagePreview--fitContain .hvImagePreview__media > .hvImage .hvImage__frame--vfFill{
  display:flex !important;
  align-items:center;
  justify-content:center;
}
.hvImagePreview__badge{
  position:absolute;
  top:clamp(8px, 2vw, 14px);
  right:clamp(8px, 2vw, 14px);
  z-index:4;
  margin:0;
  padding:0;
  font-family:var(--sans, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  font-weight:800;
  font-size:clamp(1.25rem, 3.2vw, 2rem);
  line-height:1;
  letter-spacing:-0.03em;
  background:linear-gradient(180deg, #fde047 0%, #fbbf24 35%, #f97316 70%, #ea580c 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,0.9));
  pointer-events:none;
}
.hvImagePreview__text{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:3;
  margin:0;
  padding:10px 12px 12px;
  text-align:center;
  font-family:var(--sans, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
  font-weight:800;
  font-size:clamp(0.65rem, 1.65vw, 0.9rem);
  line-height:1.15;
  letter-spacing:0.08em;
  text-transform:uppercase;
  font-style:italic;
  transform:skewX(-5deg);
  color:#fde047;
  text-shadow:
    0 0 2px rgba(0,0,0,0.95),
    0 2px 4px rgba(0,0,0,0.9),
    0 0 12px rgba(0,0,0,0.75);
  pointer-events:none;
}
html[data-theme="light"] .hvImagePreview__badge{
  filter:drop-shadow(0 1px 2px rgba(15,23,42,0.55));
}
html[data-theme="light"] .hvImagePreview__text{
  color:#ca8a04;
  text-shadow:
    0 0 1px rgba(255,255,255,0.9),
    0 1px 2px rgba(15,23,42,0.55),
    0 2px 8px rgba(15,23,42,0.35);
}

/* HV-CHIP — partial hv-chip.ejs (чип / метка: ссылка или span) */
.hvChip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-sizing:border-box;
  margin:0;
  max-width:100%;
  font-family:inherit;
  font-size:12px;
  font-weight:600;
  line-height:1.25;
  letter-spacing:0.04em;
  text-decoration:none;
  color:var(--text, #111827);
  cursor:pointer;
  touch-action:manipulation;
  border:1px solid var(--line, #e2e8f0);
  border-radius:10px;
  padding:6px 12px;
  background:var(--panel2, #f1f5f9);
  transition:border-color .15s ease, background .15s ease, color .15s ease;
  --hv-chip-accent:var(--accent, #2563eb);
}
/* Ссылка-чип: без подчёркивания (в т.ч. hover / visited; цвет задают модификаторы tone) */
a.hvChip:any-link{
  text-decoration:none;
}
a.hvChip:any-link:hover,
a.hvChip:any-link:active,
a.hvChip:any-link:focus,
a.hvChip:any-link:focus-visible{
  text-decoration:none;
}
span.hvChip{
  cursor:default;
}
.hvChip__caption{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:18rem;
}
.hvChip--compact .hvChip__caption{
  max-width:14rem;
}
.hvChip--inlineFit{
  flex:0 0 auto;
  width:auto;
  max-width:max-content;
}
.hvChip--compact{
  padding:3px 9px;
  font-size:0.65rem;
  line-height:1.25;
  letter-spacing:0.05em;
  text-transform:uppercase;
  border-radius:5px;
}
.hvChip--noBorder{
  border-color:transparent !important;
  border-width:0 !important;
}
.hvChip--noBackground{
  background:transparent !important;
}
.hvChip--tone-base,
.hvChip--tone-link{
  border-color:color-mix(in oklab, var(--hv-chip-accent) 45%, var(--line, #e2e8f0));
  background:color-mix(in oklab, var(--hv-chip-accent) 12%, var(--panel2, #f1f5f9));
  color:color-mix(in oklab, var(--hv-chip-accent) 92%, var(--text, #111827));
}
.hvChip--tone-base:hover,
.hvChip--tone-link:hover{
  border-color:var(--hv-chip-accent);
  background:color-mix(in oklab, var(--hv-chip-accent) 20%, var(--panel2, #f1f5f9));
}
.hvChip--tone-base:focus-visible,
.hvChip--tone-link:focus-visible{
  outline:2px solid var(--hv-chip-accent);
  outline-offset:2px;
}
.hvChip--tone-accept{
  border-color:color-mix(in oklab, var(--good, #16a34a) 50%, var(--line, #e2e8f0));
  background:color-mix(in oklab, var(--good, #16a34a) 14%, var(--panel2, #f1f5f9));
  color:color-mix(in oklab, var(--good, #16a34a) 88%, var(--text, #111827));
}
.hvChip--tone-accept:hover{
  border-color:var(--good, #16a34a);
  background:color-mix(in oklab, var(--good, #16a34a) 22%, var(--panel2, #f1f5f9));
}
.hvChip--tone-accept:focus-visible{
  outline:2px solid var(--good, #16a34a);
  outline-offset:2px;
}
.hvChip--tone-warning{
  border-color:color-mix(in oklab, var(--warn, #ca8a04) 42%, var(--line, #e2e8f0));
  background:color-mix(in oklab, var(--warn, #eab308) 18%, var(--panel2, #f1f5f9));
  color:color-mix(in oklab, var(--warn, #a16207) 55%, var(--text, #111827));
}
.hvChip--tone-warning:hover{
  border-color:var(--warn, #ca8a04);
  background:color-mix(in oklab, var(--warn, #eab308) 26%, var(--panel2, #f1f5f9));
}
.hvChip--tone-warning:focus-visible{
  outline:2px solid var(--warn, #ca8a04);
  outline-offset:2px;
}
.hvChip--tone-reject{
  border-color:color-mix(in oklab, var(--bad, #dc2626) 48%, var(--line, #e2e8f0));
  background:color-mix(in oklab, var(--bad, #dc2626) 12%, var(--panel2, #f1f5f9));
  color:color-mix(in oklab, var(--bad, #dc2626) 88%, var(--text, #111827));
}
.hvChip--tone-reject:hover{
  border-color:var(--bad, #dc2626);
  background:color-mix(in oklab, var(--bad, #dc2626) 18%, var(--panel2, #f1f5f9));
}
.hvChip--tone-reject:focus-visible{
  outline:2px solid var(--bad, #dc2626);
  outline-offset:2px;
}
.hvChip--hasCustomAccent.hvChip--tone-base,
.hvChip--hasCustomAccent.hvChip--tone-link,
.hvChip--hasCustomAccent.hvChip--tone-accept,
.hvChip--hasCustomAccent.hvChip--tone-warning,
.hvChip--hasCustomAccent.hvChip--tone-reject{
  border-color:color-mix(in oklab, var(--hv-chip-accent) 50%, var(--line, #e2e8f0));
  background:color-mix(in oklab, var(--hv-chip-accent) 14%, var(--panel2, #f1f5f9));
  color:var(--hv-chip-accent);
}
.hvChip--hasCustomAccent.hvChip--tone-base:hover,
.hvChip--hasCustomAccent.hvChip--tone-link:hover,
.hvChip--hasCustomAccent.hvChip--tone-accept:hover,
.hvChip--hasCustomAccent.hvChip--tone-warning:hover,
.hvChip--hasCustomAccent.hvChip--tone-reject:hover{
  border-color:var(--hv-chip-accent);
  background:color-mix(in oklab, var(--hv-chip-accent) 24%, var(--panel2, #f1f5f9));
}
.hvChip--noBorder.hvChip--noBackground.hvChip--tone-link,
.hvChip--noBorder.hvChip--noBackground.hvChip--tone-base{
  color:color-mix(in oklab, var(--hv-chip-accent) 88%, var(--text, #111827));
}
.hvChip--noBorder.hvChip--noBackground.hvChip--tone-link:hover,
.hvChip--noBorder.hvChip--noBackground.hvChip--tone-base:hover{
  color:var(--hv-chip-accent);
  text-decoration:none;
}

/* HV-ICON-TEXT-BTN — partial hv-button.ejs (иконка слева + подпись) */
.hvIconTextBtn{
  display:inline-flex;
  flex-direction:row;
  align-items:center;
  gap:8px;
  margin:0;
  box-sizing:border-box;
  text-decoration:none;
  color:inherit;
  font-family:inherit;
  font-size:inherit;
  line-height:1.25;
  cursor:pointer;
  touch-action:manipulation;
}
button.hvIconTextBtn{
  -webkit-appearance:none;
  appearance:none;
  font-family:inherit;
  line-height:1.25;
}
/* Иначе display:inline-flex перебивает UA [hidden] — кнопка остаётся видимой */
button.hvIconTextBtn[hidden],
a.hvIconTextBtn[hidden]{
  display:none !important;
}
a.hvIconTextBtn:visited{
  color:inherit;
}
.hvIconTextBtn__icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  line-height:0;
}
.hvIconTextBtn__label{
  flex:1 1 auto;
  min-width:0;
  text-align:start;
}
.hvIconTextBtn--textCenter .hvIconTextBtn__label{
  text-align:center;
}
.hvIconTextBtn--labelOnly{
  gap:0;
}
.hvIconTextBtn--labelOnly .hvIconTextBtn__label{
  flex:0 1 auto;
}
.hvIconTextBtn--iconOnly{
  gap:0;
  justify-content:center;
  padding:4px;
  min-width:0;
}
.hvIconTextBtn--iconOnly .hvIconTextBtn__icon{
  line-height:0;
}

/* Ссылка (link / tag a): опциональное подчёркивание только текста подписи — partial hv-button.ejs, underline: true */
a.hvIconTextBtn.hvIconTextBtn--labelUnderline .hvIconTextBtn__label{
  text-decoration:underline;
  text-decoration-skip-ink:auto;
  text-underline-offset:0.12em;
}
a.hvIconTextBtn.hvIconTextBtn--labelUnderline:hover .hvIconTextBtn__label,
a.hvIconTextBtn.hvIconTextBtn--labelUnderline:visited .hvIconTextBtn__label{
  text-decoration:underline;
}

/* Пресеты tone (partial hv-button.ejs): base/link — акцент, accept — успех, warning — warn, reject — опасность */
.hvIconTextBtn--tone-base,
.hvIconTextBtn--tone-link,
.hvIconTextBtn--tone-accept,
.hvIconTextBtn--tone-warning,
.hvIconTextBtn--tone-reject{
  border:1px solid var(--line, #e2e8f0);
  border-radius:10px;
  padding:6px 12px;
  font-size:12px;
  font-weight:600;
  line-height:1.25;
  color:var(--text, #111827);
  background:var(--panel2, #f1f5f9);
  box-sizing:border-box;
  min-height:38px;
  transition:border-color .15s ease, background .15s ease, color .15s ease;
}
.hvIconTextBtn--tone-base,
.hvIconTextBtn--tone-link{
  border-color:color-mix(in oklab, var(--accent, #2563eb) 45%, var(--line, #e2e8f0));
  background:color-mix(in oklab, var(--accent, #2563eb) 12%, var(--panel2, #f1f5f9));
}
.hvIconTextBtn--tone-base .hvIconTextBtn__icon,
.hvIconTextBtn--tone-link .hvIconTextBtn__icon{
  color:var(--accent, #2563eb);
}
.hvIconTextBtn--tone-base:hover,
.hvIconTextBtn--tone-link:hover{
  border-color:var(--accent, #2563eb);
  background:color-mix(in oklab, var(--accent, #2563eb) 20%, var(--panel2, #f1f5f9));
}
.hvIconTextBtn--tone-base:focus-visible,
.hvIconTextBtn--tone-link:focus-visible{
  outline:2px solid var(--accent, #2563eb);
  outline-offset:2px;
}
.hvIconTextBtn--tone-accept{
  border-color:color-mix(in oklab, var(--good, #16a34a) 50%, var(--line, #e2e8f0));
  background:color-mix(in oklab, var(--good, #16a34a) 14%, var(--panel2, #f1f5f9));
}
.hvIconTextBtn--tone-accept .hvIconTextBtn__icon{
  color:var(--good, #16a34a);
}
.hvIconTextBtn--tone-accept:hover{
  border-color:var(--good, #16a34a);
  background:color-mix(in oklab, var(--good, #16a34a) 22%, var(--panel2, #f1f5f9));
}
.hvIconTextBtn--tone-accept:focus-visible{
  outline:2px solid var(--good, #16a34a);
  outline-offset:2px;
}
.hvIconTextBtn--tone-warning{
  border-color:color-mix(in oklab, var(--warn, #ca8a04) 42%, var(--line, #e2e8f0));
  background:color-mix(in oklab, var(--warn, #eab308) 18%, var(--panel2, #f1f5f9));
  color:color-mix(in oklab, var(--warn, #a16207) 55%, var(--text, #111827));
}
.hvIconTextBtn--tone-warning .hvIconTextBtn__icon{
  color:var(--warn, #a16207);
}
.hvIconTextBtn--tone-warning:hover{
  border-color:var(--warn, #ca8a04);
  background:color-mix(in oklab, var(--warn, #eab308) 26%, var(--panel2, #f1f5f9));
}
.hvIconTextBtn--tone-warning:focus-visible{
  outline:2px solid var(--warn, #ca8a04);
  outline-offset:2px;
}
.hvIconTextBtn--tone-reject{
  border-color:color-mix(in oklab, var(--bad, #dc2626) 48%, var(--line, #e2e8f0));
  background:color-mix(in oklab, var(--bad, #dc2626) 12%, var(--panel2, #f1f5f9));
  color:color-mix(in oklab, var(--bad, #dc2626) 88%, var(--text, #111827));
}
.hvIconTextBtn--tone-reject .hvIconTextBtn__icon{
  color:var(--bad, #dc2626);
}
.hvIconTextBtn--tone-reject:hover{
  border-color:var(--bad, #dc2626);
  background:color-mix(in oklab, var(--bad, #dc2626) 18%, var(--panel2, #f1f5f9));
}
.hvIconTextBtn--tone-reject:focus-visible{
  outline:2px solid var(--bad, #dc2626);
  outline-offset:2px;
}
button.hvIconTextBtn--tone-base:disabled,
button.hvIconTextBtn--tone-link:disabled,
button.hvIconTextBtn--tone-accept:disabled,
button.hvIconTextBtn--tone-warning:disabled,
button.hvIconTextBtn--tone-reject:disabled{
  opacity:.55;
  cursor:not-allowed;
  pointer-events:none;
}

/* Компактный режим — partial hv-button.ejs: size: "compact" или compact: true */
.hvIconTextBtn.hvIconTextBtn--compact{
  gap:var(--hv-control-compact-gap);
  padding:var(--hv-control-compact-py) var(--hv-control-compact-px);
  font-size:var(--hv-control-compact-fs);
  line-height:var(--hv-control-compact-lh);
  border-radius:var(--hv-control-compact-radius);
  min-height:var(--hv-control-compact-h);
}
.hvIconTextBtn.hvIconTextBtn--compact .hvIconTextBtn__icon .adminToolbarIcon,
.hvIconTextBtn.hvIconTextBtn--compact .hvIconTextBtn__icon svg{
  width:var(--hv-control-compact-icon);
  height:var(--hv-control-compact-icon);
}

/* Actions в cardHeader (правый блок с кнопками/ссылками) */
.actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.actions .btnPrimary,
.actions .btnDanger,
.actions .link{
  white-space:nowrap;
}

/* Ссылка или кнопка в шапке карточки (иконка + текст, темы light/dark) */
a.actionLinkBtn,
button.actionLinkBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:8px 12px;
  border-radius:10px;
  border:1px solid var(--line, #e2e8f0);
  background:var(--panel2, #f1f5f9);
  color:var(--link, var(--accent, #2563eb));
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  font-family:inherit;
  line-height:1.2;
  white-space:nowrap;
  transition:border-color .15s ease, background .15s ease, box-shadow .15s ease;
  box-sizing:border-box;
}
button.actionLinkBtn{
  cursor:pointer;
  -webkit-appearance:none;
  appearance:none;
}
a.actionLinkBtn:hover,
button.actionLinkBtn:hover{
  border-color:var(--accent, #2563eb);
  background:color-mix(in oklab, var(--accent, #2563eb) 14%, var(--panel2, #f1f5f9));
}
a.actionLinkBtn:focus-visible,
button.actionLinkBtn:focus-visible{
  outline:2px solid var(--accent, #2563eb);
  outline-offset:2px;
}
a.actionLinkBtn .adminToolbarIcon,
button.actionLinkBtn .adminToolbarIcon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  line-height:0;
  color:var(--link, var(--accent, #2563eb));
}
a.actionLinkBtn .adminToolbarIcon svg,
button.actionLinkBtn .adminToolbarIcon svg{
  display:block;
  vertical-align:middle;
}
a.actionLinkBtn span,
button.actionLinkBtn span{
  color:var(--text, #0f172a);
  line-height:1.2;
  display:inline-flex;
  align-items:center;
}


.actionRow{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.coverActions.actionRow,
.coverActions .actionRow{
  flex-wrap:nowrap;
}
.coverActions .coverActionsForm{
  margin:0;
  flex-wrap:nowrap;
}
/* Одинаковая высота: кнопка выбора файла и кнопка «Убрать обложку» */
.coverActions .fileInputTrigger.coverTrigger,
.coverActions .copyBtn{
  min-height:38px;
  box-sizing:border-box;
  line-height:1.25;
  display:inline-flex;
  align-items:center;
}
.coverActions .fileInputTrigger.coverTrigger{
  padding:8px 14px;
  font-size:12px;
}
.coverActions .copyBtn{
  padding:8px 14px;
  font-size:12px;
}
.coverActions > .iconBtn.contentListRowIconBtn{
  flex-shrink:0;
  width:38px;
  height:38px;
  min-width:38px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  box-sizing:border-box;
}

.coverGalleryDialog{
  width:min(96vw, 1100px);
  max-width:100%;
  height:min(90vh, 900px);
  max-height:100%;
  padding:0;
  border:none;
  border-radius:12px;
  background:var(--panel, #1e293b);
  color:var(--text, #e2e8f0);
  box-shadow:0 25px 50px -12px rgba(0,0,0,0.5);
}
.coverGalleryDialog::backdrop{
  background:rgba(0,0,0,0.55);
}
.coverGalleryDialog__shell{
  position:relative;
  width:100%;
  height:100%;
  min-height:min(85vh, 820px);
  display:flex;
  flex-direction:column;
}
.coverGalleryDialog__close{
  position:absolute;
  top:8px;
  right:8px;
  z-index:2;
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:0;
  padding:0;
  border-radius:8px;
}
.coverGalleryDialog__closeIcon,
.coverGalleryDialog__closeIcon .adminToolbarIcon,
.coverGalleryDialog__closeIcon .adminToolbarIcon svg{
  display:block;
}
.coverGalleryDialog__iframe{
  flex:1;
  width:100%;
  min-height:0;
  border:0;
  border-radius:12px;
  background:var(--bg, #0f172a);
}


.coverTogglesStrip{
  display:flex;
  flex-wrap:nowrap;
  align-items:stretch;
  gap:6px;
  /* margin-bottom:12px; — убрано: отступ задаётся соседними блоками легенды */
}
.coverTogglesStrip .coverInPostToggleRow{
  margin-bottom:0;
  flex:1 1 0;
  min-width:0;
}
.coverTogglesStrip .coverInPostToggleRow .powerToggle.coverInPostPowerToggle{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  justify-content:space-between;
  gap:6px;
  padding:5px 8px;
  border-radius:8px;
}
.coverTogglesStrip .coverInPostToggleRow .powerToggle.coverInPostPowerToggle .powerToggle-caption{
  min-width:0;
  overflow:hidden;
}
.coverTogglesStrip .coverInPostToggleRow .powerToggle.coverInPostPowerToggle .powerToggle-textOff{
  display:block;
  max-width:100%;
  font-size:11px;
  overflow:hidden;
  text-overflow:ellipsis;
}
.coverTogglesStrip .coverInPostToggleRow .powerToggle.coverInPostPowerToggle .powerToggle-textOn{
  max-width:100%;
  font-size:11px;
  overflow:hidden;
  text-overflow:ellipsis;
}
/* Иначе display:block выше сильнее глобального .powerToggle input:checked … .powerToggle-textOff{display:none} — видны оба подписи */
.coverTogglesStrip .coverInPostToggleRow .powerToggle.coverInPostPowerToggle input:checked + .powerToggle-caption .powerToggle-textOff{
  display:none;
}
.coverTogglesStrip .coverInPostToggleRow .powerToggle.coverInPostPowerToggle input:checked + .powerToggle-caption .powerToggle-textOn{
  display:block;
}
.coverTogglesStrip .coverInPostToggleRow .powerToggle.coverInPostPowerToggle .powerToggle-track{
  width:34px;
  height:18px;
  flex-shrink:0;
}
.coverTogglesStrip .coverInPostToggleRow .powerToggle.coverInPostPowerToggle .powerToggle-thumb{
  top:2px;
  left:2px;
  width:12px;
  height:12px;
}
.coverTogglesStrip .coverInPostToggleRow .powerToggle.coverInPostPowerToggle input:checked ~ .powerToggle-track .powerToggle-thumb{
  transform:translateX(18px);
}


/* Скрытый file input, триггер — кнопка «•••» в стиле сайта */
.fileInputWrap{
  display:inline-flex;
  align-items:center;
  gap:0;
}
.fileInputWrap input[type="file"]{
  position:absolute;
  width:0;
  height:0;
  opacity:0;
  overflow:hidden;
  clip:rect(0,0,0,0);
  pointer-events:none;
}
.fileInputWrap .fileInputTrigger{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:36px;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid var(--line, #ddd);
  background:var(--panel, #f5f5f5);
  color:var(--muted, #666);
  font-size:14px;
  cursor:pointer;
  font-family:inherit;
}
.fileInputWrap .fileInputTrigger:hover{
  background:var(--panel2, #eef2ff);
  color:var(--text, #111);
  border-color:var(--accent, #2563eb);
}
.fileInputWrap:focus-within .fileInputTrigger{
  outline:2px solid var(--accent, #2563eb);
  outline-offset:2px;
}

/* Сетка форм в админке */
.formGrid{
  display:grid;
  gap:12px;
  grid-template-columns:minmax(0, 1fr);
}
.formGrid label:not(.hvUiToggle):not(.hvUiInput):not(.hvUiDateTime){
  display:flex;
  flex-direction:row;
  gap:4px;
  font-size:13px;
}
.formGrid .label{
  font-size:12px;
  color:var(--muted, #666);
}
/* Подписи полей в карточке «Публикация» вне .formGrid (напр. Канон) */
.pubCardBody .label{
  font-size:12px;
  color:var(--muted, #666);
}
.pubCardBody label{
  font-size:13px;
}

.formGrid input[type="text"],
.formGrid input[type="number"],
.formGrid textarea{
  border-radius:10px;
  border:1px solid var(--line, #ddd);
  padding:8px 10px;
  background:var(--panel2, #f9fafb);
  color:var(--text, #111);
  font-size:13px;
}

/* Лид / анонс: 3–4 строки по умолчанию, без высоты основного тела */
textarea.textareaLead{
  width:100%;
  box-sizing:border-box;
  min-height:calc(4 * 1.45em + 18px);
  max-height:16rem;
  line-height:1.45;
  resize:vertical;
  font-family:var(--sans, system-ui);
  font-size:13px;
  border-radius:10px;
  border:1px solid var(--line, #ddd);
  padding:8px 10px;
  background:var(--panel2, #f9fafb);
  color:var(--text, #111);
  outline:none;
}
.formGrid textarea.textareaLead{
  align-self:stretch;
}
.formGrid label.inline{
  flex-direction:row;
  align-items:center;
}
.formGrid label.inline input[type="checkbox"]{
  margin-right:6px;
}

/* Заголовок строки в таблицах (например, Content/Plugins list) */
.rowTitle{
  font-size:13px;
  font-weight:500;
}

/* Тоггл-кнопка (checkbox как кнопка) */
.pillToggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.pillToggle input{
  display:none;
}
.pillToggle span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--line, #334155);
  font-size:12px;
  color:var(--muted, #9ca3af);
  background:var(--panel2, #020617);
  cursor:pointer;
}
.pillToggle input:checked + span{
  background:var(--accent, #2563eb);
  color:#f9fafb;
  border-color:var(--accent, #2563eb);
}

/* доступность: подпись только для скринридеров */
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Редактор материала: форма «тег + кнопка» в узкой колонке */
.contentEditTagsForm{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:stretch;
}
.contentEditTagsForm select.copyBtn:not(.hvUiSelect){
  min-width:0;
  width:100%;
  box-sizing:border-box;
}
.contentEditTagsPills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

/* Карточка «Публикация»: дата/время — скругление как у селектов, одна высота, текст по центру */
.formGrid.pubDateTimeGrid{
  gap:6px;
}
.pubDateTimeGrid label.pubDateTimeLabel{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.pubDateTimeLabel .label{
  font-size:13px;
}
.pubDateTimeLabel--noLabel{
  gap:0;
}
.pubDateTimeInput{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  height:36px;
  min-height:36px;
  max-height:36px;
  margin:0;
  padding:0 8px;
  border-radius:5px;
  border:1px solid var(--line, #ddd);
  background-color:var(--panel2, #f9fafb);
  color:var(--text, #111);
  font-size:15px;
  text-align:center;
  outline:none;
  accent-color:var(--accent, #2563eb);
  font-family:inherit;
  line-height:1.2;
}
.pubDateTimeInput:focus,
.pubDateTimeInput:focus-visible{
  outline:none;
  border-color:var(--accent, #2563eb);
}
/* Chromium: центрирование сегментов даты/времени */
.pubDateTimeInput::-webkit-datetime-edit{
  margin:0 auto;
}
.pubDateTimeInput::-webkit-datetime-edit-fields-wrapper{
  display:flex;
  justify-content:center;
  align-items:center;
  height:100%;
  padding:0 2px;
}
.pubDateTimeInput::-webkit-calendar-picker-indicator{
  margin-left:2px;
  cursor:pointer;
  opacity:0.85;
}

/* hv-datetime.ejs — компактный режим (плотные формы, админка и витрина при shared-ui) */
.dateTimeMoment--compact.pubDateTimeGrid label.pubDateTimeLabel{
  gap:2px;
}
.dateTimeMoment--compact .pubDateTimeLabel .label{
  font-size:11px;
  line-height:1.25;
}
.dateTimeMoment--compact .pubDateTimeInput{
  height:var(--hv-control-compact-h);
  min-height:var(--hv-control-compact-h);
  max-height:var(--hv-control-compact-h);
  padding:0 var(--hv-control-compact-px);
  font-size:var(--hv-control-compact-fs);
  line-height:var(--hv-control-compact-lh);
  border-radius:var(--hv-control-compact-radius);
  box-sizing:border-box;
}
.dateTimeMoment--compact .pubDateTimeInput::-webkit-datetime-edit-fields-wrapper{
  padding:0 1px;
}

/* Карточка «Публикация»: поля в форме, одна строка действий — приоритет, закрепить, сохранить, удалить */
.pubToolbar{
  display:flex;
  flex-direction:column;
  gap:0;
}
.pubToolbarActionsRow{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  gap:8px;
  margin-top:10px;
  width:100%;
}
/* основная кнопка публикации тянется на свободную ширину между пином и удалением */
.pubToolbarActionsRow > .iconBtn.iconBtnWithLabel,
.pubToolbarActionsRow > button.hvIconTextBtn[type="submit"]{
  flex:1;
  min-width:0;
  justify-content:center;
}
.pubToolbarDelete{
  margin:0;
  padding:0;
  flex-shrink:0;
  display:inline-flex;
}
.pubToolbarDelete button{
  margin:0;
}

.priorityCompact{
  display:flex;
  align-items:center;
  flex-shrink:0;
}
.priorityCompact-input{
  box-sizing:border-box;
  width:36px;
  height:var(--hv-control-compact-h);
  min-height:var(--hv-control-compact-h);
  padding:0 3px;
  text-align:center;
  border-radius:var(--hv-control-compact-radius);
  border:1px solid var(--line, #334155);
  background:var(--panel2, #020617);
  color:var(--text, #e2e8f0);
  font-size:var(--hv-control-compact-fs);
  font-variant-numeric:tabular-nums;
  line-height:var(--hv-control-compact-lh);
  -moz-appearance:textfield;
}
.priorityCompact-input::-webkit-outer-spin-button,
.priorityCompact-input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}

.iconPinToggle{
  position:relative;
  display:inline-flex;
  flex-shrink:0;
  cursor:pointer;
}
.iconPinToggle input{
  position:absolute;
  opacity:0;
  width:0;
  height:0;
}
.iconPinToggle-face{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:var(--hv-control-compact-h);
  height:var(--hv-control-compact-h);
  min-width:var(--hv-control-compact-h);
  min-height:var(--hv-control-compact-h);
  border-radius:var(--hv-control-compact-radius);
  border:1px solid var(--line, #334155);
  background:var(--panel2, #020617);
}
.iconPinToggle-face .adminToolbarIcon svg{
  width:var(--hv-control-compact-icon);
  height:var(--hv-control-compact-icon);
}
.iconPinToggle input:checked + .iconPinToggle-face{
  border-color:var(--accent, #2563eb);
  background:color-mix(in oklab, var(--accent, #2563eb) 18%, var(--panel2, #020617));
}
.iconPinToggle input:focus-visible + .iconPinToggle-face{
  outline:2px solid var(--accent, #2563eb);
  outline-offset:2px;
}

.pubPinFieldset{
  border:none;
  margin:0;
  padding:0;
  min-width:0;
}
.pubPinFieldset__legend{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
}
.pubPinFieldset__row{
  gap:4px;
  flex-wrap:nowrap;
}
.contentEditPinBtn--mirror .adminToolbarIcon{
  transform:scaleX(-1);
}

.iconBtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  padding:0;
  border-radius:10px;
  flex-shrink:0;
  color:var(--muted, #64748b);
}
.iconBtn.iconBtnWithLabel{
  width:auto;
  min-height:36px;
  height:36px;
  padding:0 12px 0 10px;
  gap:8px;
}
.iconBtnLabel{
  font-size:12px;
  font-weight:600;
  color:var(--text, #e5e7eb);
  white-space:nowrap;
}
.iconBtn img,
.iconBtn svg{
  display:block;
  flex-shrink:0;
}
.iconBtn img{
  width:22px;
  height:22px;
  object-fit:contain;
}
/* Адрес материала: иконка как в SVG (18px), рамка вплотную — без раздувания базового .iconBtn 36px */
.iconBtn.contentPermalinkEditIconBtn{
  width:auto;
  height:auto;
  min-width:0;
  min-height:0;
  padding:2px;
  border-radius:6px;
  border:1px solid var(--line, #334155);
  background:var(--panel2, #0f172a);
  color:var(--muted, #94a3b8);
}
.iconBtn.contentPermalinkEditIconBtn:hover{
  color:var(--text, #e2e8f0);
  border-color:var(--muted, #64748b);
}
.iconBtnPrimary{
  border-color:var(--accent, #2563eb);
  background:color-mix(in oklab, var(--accent, #2563eb) 22%, var(--panel2, #020617));
  color:var(--muted, #64748b);
}
.iconBtnPrimary .iconBtnLabel{
  color:var(--text, #e5e7eb);
}
.iconBtnPrimary .adminToolbarIcon{
  color:var(--accent, #2563eb);
}
.iconBtnDanger{
  border-color:var(--bad, #dc2626);
  background:rgba(220,38,38,0.1);
  color:var(--bad, #dc2626);
}
.iconBtnDanger img{
  width:22px;
  height:22px;
}
.iconBtnDanger .adminToolbarIcon{
  color:var(--bad, #dc2626);
}
.iconBtnDanger .iconBtnLabel{
  color:var(--bad, #dc2626);
}

.pluginInstanceRule{
  margin:18px 0;
  border:0;
  border-top:1px solid var(--line, #334155);
}
.pluginInstanceDeleteForm{
  display:flex;
  justify-content:flex-end;
  margin:0;
}
/* Плагин: слот, порядок и переключатель в одну строку */
.pluginInstanceMetaRow{
  display:grid;
  grid-template-columns:minmax(0, 1.55fr) minmax(5.5rem, 6.5rem) minmax(11rem, auto);
  gap:12px;
  align-items:end;
}
@media (max-width:720px){
  .pluginInstanceMetaRow{
    grid-template-columns:1fr;
    align-items:stretch;
  }
}
.pluginInstanceMetaField{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
  font-size:13px;
}
.pluginInstanceMetaField--toggle{
  justify-content:flex-end;
}

/*
 * POWER-TOGGLE — переиспользуемый переключатель (подпись слева + слайдер).
 * Разметка: views/partials/hv-power-toggle.ejs
 * Порядок внутри label: input → .powerToggle-caption → .powerToggle-track (селекторы :checked завязаны на порядок).
 */
.powerToggle{
  position:relative;
  display:inline-flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  gap:12px;
  cursor:pointer;
  user-select:none;
  margin:0;
  padding:10px 14px;
  border-radius:12px;
  border:1px solid var(--line, #334155);
  background:color-mix(in oklab, var(--panel2, #0f172a) 100%, transparent);
  box-sizing:border-box;
  max-width:100%;
  transition:border-color .15s ease, box-shadow .15s ease;
}
/* Тоггл в сетке: подпись и трек в одну строку */
.formGrid label.powerToggle{
  flex-direction:row;
  flex-wrap:nowrap;
  display:inline-flex;
  align-items:center;
  gap:12px;
}
.powerToggle:hover{
  border-color:color-mix(in oklab, var(--accent, #60a5fa) 40%, var(--line, #334155));
  box-shadow:0 1px 0 rgba(255,255,255,.04);
}
.powerToggle input{
  position:absolute;
  opacity:0;
  width:0;
  height:0;
  pointer-events:none;
}
.powerToggle-track{
  position:relative;
  width:52px;
  height:28px;
  flex-shrink:0;
  border-radius:999px;
  background:color-mix(in oklab, var(--muted, #64748b) 55%, var(--panel2, #0f172a));
  border:1px solid var(--line, #334155);
  transition:background .2s ease, border-color .2s ease;
}
.powerToggle-thumb{
  position:absolute;
  top:2px;
  left:2px;
  width:22px;
  height:22px;
  border-radius:50%;
  background:#f8fafc;
  box-shadow:0 1px 4px rgba(0,0,0,.28);
  transition:transform .2s ease;
}
.powerToggle input:focus-visible ~ .powerToggle-track{
  outline:2px solid var(--accent, #2563eb);
  outline-offset:2px;
}
/* Вкл. без модификатора accent (accent: false | "mixed" | "legacy") — смесь синего и зелёного */
.powerToggle input:checked ~ .powerToggle-track{
  background:color-mix(in oklab, var(--accent, #2563eb) 65%, var(--good, #16a34a));
  border-color:var(--accent, #2563eb);
}
.powerToggle input:checked ~ .powerToggle-track .powerToggle-thumb{
  transform:translateX(26px);
}
.powerToggle-caption{
  display:flex;
  flex-direction:row;
  align-items:center;
  line-height:1.2;
  min-width:0;
  flex:0 1 auto;
}
.powerToggle-textOn{
  display:none;
  font-weight:700;
  font-size:14px;
  color:color-mix(in oklab, var(--good, #22c55e) 92%, var(--text, #e5e7eb));
  white-space:nowrap;
}
.powerToggle-textOff{
  font-weight:600;
  font-size:14px;
  color:var(--muted, #94a3b8);
  white-space:nowrap;
}
.powerToggle input:checked + .powerToggle-caption .powerToggle-textOff{
  display:none;
}
.powerToggle input:checked + .powerToggle-caption .powerToggle-textOn{
  display:block;
}

/* Компактный режим — partial hv-power-toggle.ejs: size: "compact" или compact: true */
.powerToggle.powerToggle--compact{
  gap:var(--hv-control-compact-gap);
  padding:var(--hv-control-compact-py) var(--hv-control-compact-px);
  min-height:var(--hv-control-compact-h);
  border-radius:var(--hv-control-compact-radius);
}
.powerToggle.powerToggle--compact .powerToggle-track{
  width:32px;
  height:16px;
  box-sizing:border-box;
  overflow:hidden;
}
.powerToggle.powerToggle--compact .powerToggle-thumb{
  top:50%;
  left:2px;
  width:12px;
  height:12px;
  transform:translateY(-50%);
}
.powerToggle.powerToggle--compact input:checked ~ .powerToggle-track .powerToggle-thumb{
  transform:translate(14px, -50%);
}
.powerToggle.powerToggle--compact .powerToggle-textOff,
.powerToggle.powerToggle--compact .powerToggle-textOn{
  font-size:var(--hv-control-compact-fs);
  line-height:var(--hv-control-compact-lh);
  font-weight:600;
}
.powerToggle.powerToggle--disabled{
  opacity:0.55;
  pointer-events:none;
  cursor:not-allowed;
}

/* Включено: чистый акцент по partial hv-power-toggle.ejs — accent: "blue" | "green" | "red" (по умолчанию blue) */
.powerToggle.powerToggle--accent-blue input:checked ~ .powerToggle-track{
  background:color-mix(in oklab, var(--accent, #2563eb) 68%, var(--panel2, #0f172a));
  border-color:color-mix(in oklab, var(--accent, #2563eb) 80%, var(--line, #334155));
}
.powerToggle.powerToggle--accent-blue input:checked + .powerToggle-caption .powerToggle-textOn{
  color:color-mix(in oklab, var(--accent, #93c5fd) 88%, var(--text, #e5e7eb));
}
.powerToggle.powerToggle--accent-green input:checked ~ .powerToggle-track{
  background:color-mix(in oklab, var(--good, #16a34a) 62%, var(--panel2, #0f172a));
  border-color:color-mix(in oklab, var(--good, #16a34a) 78%, var(--line, #334155));
}
.powerToggle.powerToggle--accent-green input:checked + .powerToggle-caption .powerToggle-textOn{
  color:color-mix(in oklab, var(--good, #86efac) 88%, var(--text, #e5e7eb));
}
.powerToggle.powerToggle--accent-red input:checked ~ .powerToggle-track{
  background:color-mix(in oklab, var(--bad, #dc2626) 52%, var(--panel2, #0f172a));
  border-color:color-mix(in oklab, var(--bad, #dc2626) 72%, var(--line, #334155));
}
.powerToggle.powerToggle--accent-red input:checked + .powerToggle-caption .powerToggle-textOn{
  color:color-mix(in oklab, var(--bad, #fca5a5) 85%, var(--text, #e5e7eb));
}

/* иконка «кнопки» не в .iconBtn — наследует цвет темы */
.iconPinToggle-face .adminToolbarIcon{
  color:var(--muted, #64748b);
  display:block;
}
.iconPinToggle input:checked + .iconPinToggle-face .adminToolbarIcon{
  color:var(--accent, #2563eb);
}

/* Лента карточек на главной: placeholder рендерится как <img src="...svg">, не <svg> — стили для img */
.feedCardPlaceholder{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--panel2, #f1f5f9);
}
.feedCardPlaceholder img{
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0.7;
}

/* Блоки с логами/аудитом */
.prebox{
  white-space:pre-wrap;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(15,23,42,0.7);
  border:1px solid var(--line, #1f2937);
}

/* Лента новостей на главной */
.newsFeed{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:12px 14px 16px;
}
.newsCard{
  display:flex;
  gap:14px;
  text-decoration:none;
  color:inherit;
}
.newsCardImage{
  flex:0 0 140px;
  max-width:140px;
  border-radius:10px;
  overflow:hidden;
  background:var(--panel2, #f1f5f9);
}
.newsCardImage img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  display:block;
}
.newsCardBody{
  flex:1;
  min-width:0;
}
.newsCardMeta{
  font-size:13px;
  color:var(--muted, #9ca3af);
  margin-bottom:4px;
}
.newsCardTitle{
  margin:0 0 6px;
  font-size:22px;
  font-weight:700;
  line-height:1.3;
}
.newsCardTitle a{
  color:inherit;
  text-decoration:none;
  border-bottom:none;
}
.newsCardExcerpt{
  margin:0;
  font-size:15px;
  line-height:1.6;
  color:var(--muted, #475569);
}
.newsCard-featured{
  flex-direction:row;
}
.newsCard-featured .newsCardImage{
  flex-basis:220px;
  max-width:220px;
  height:140px;
}
.newsCard:not(.newsCard-featured) .newsCardImage{
  height:96px;
}
@media (max-width: 720px){
  .newsCard,
  .newsCard-featured{
    flex-direction:column;
  }
  .newsCardImage,
  .newsCard-featured .newsCardImage{
    flex-basis:auto;
    max-width:100%;
    height:180px;
  }
  .newsCardTitle{
    font-size:19px;
  }
  .newsCardExcerpt{
    font-size:14px;
  }
}

/* Сетка main + сайдбары: и публичный shell, и админка (content-edit и т.д.) */
.grid{
  display:grid;
  gap:2px;
  align-items:start;
}
.colMain{ min-width: 0; }
.colSide{ min-width: 0; }

/* Внутри colMain: узкие колонки у текста (не глобальные layout_sidebar) */
.colMainInner {
  display: grid;
  gap: 12px;
  align-items: start;
  min-width: 0;
}
.colMainPrimary {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.colMainAside--bodyLeft,
.colMainAside--bodyRight {
  min-width: 0;
}
.colMainInner--bodyAsideRight {
  grid-template-columns: minmax(0, 1fr) minmax(0, 280px);
}
.colMainInner--bodyAsideLeft {
  grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
}
.colMainInner--bodyAsidesBoth {
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr) minmax(0, 220px);
}
@media (max-width: 900px) {
  .colMainInner--bodyAsideRight,
  .colMainInner--bodyAsideLeft,
  .colMainInner--bodyAsidesBoth {
    grid-template-columns: 1fr;
  }
  .colMainInner--bodyAsideLeft .colMainPrimary {
    order: 1;
  }
  .colMainInner--bodyAsideLeft .colMainAside--bodyLeft {
    order: 2;
  }
  .colMainInner--bodyAsideRight .colMainPrimary {
    order: 1;
  }
  .colMainInner--bodyAsideRight .colMainAside--bodyRight {
    order: 2;
  }
  .colMainInner--bodyAsidesBoth .colMainPrimary {
    order: 1;
  }
  .colMainInner--bodyAsidesBoth .colMainAside--bodyLeft {
    order: 2;
  }
  .colMainInner--bodyAsidesBoth .colMainAside--bodyRight {
    order: 3;
  }
}

.grid-right-side{
  grid-template-columns: 1fr minmax(0, 320px);
}
.grid-left-side{
  grid-template-columns: minmax(0, 320px) 1fr;
}
.grid-both-sides{
  grid-template-columns: minmax(0, 320px) 1fr minmax(0, 320px);
}

.grid-full{
  grid-template-columns: 1fr;
}
.grid-full .colMain{
  grid-column: 1 / -1;
}
.grid-full .colSide{
  display:none;
}

/* Один colMain без colSide: не оставлять шаблон 320px|1fr|320px — иначе центр сжимается в левую дорожку. */
.grid > .colMain:only-child {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
/* Только публичный shell: без colSide* — одна колонка. Админка (/admin/content) тоже .grid-right-side, но aside без --right не должна ломаться глобально. */
main.siteMain .grid-both-sides:not(:has(> .colSide)),
main.siteMain .grid-left-side:not(:has(> .colSide--left)),
main.siteMain .grid-right-side:not(:has(> .colSide--right)) {
  grid-template-columns: 1fr;
}

@media (max-width: 980px){
  .grid-right-side,
  .grid-left-side,
  .grid-both-sides{
    grid-template-columns: 1fr;
  }
  .grid > .colMain {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
  }
  main.siteMain .grid > .colSide,
  main.siteMain .colSide.colSide--left,
  main.siteMain .colSide.colSide--right {
    display: none !important;
  }
  .colMain{
    order: 1;
  }
}

/* Узкий shell по классу html (дублирует vitrine.css — сетка без привязки только к @media). */
html.hv-shell--narrow .grid-right-side,
html.hv-shell--narrow .grid-left-side,
html.hv-shell--narrow .grid-both-sides {
  grid-template-columns: 1fr;
}
html.hv-shell--narrow .grid > .colMain {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
html.hv-shell--narrow main.siteMain .grid > .colSide,
html.hv-shell--narrow main.siteMain .colSide.colSide--left,
html.hv-shell--narrow main.siteMain .colSide.colSide--right {
  display: none !important;
}

/* Узкий shell: см. vitrine.css @media (max-width: 980px) и html.hv-shell--narrow — корень и main.siteMain. */
