/* ============================================================
   BOSFOR CMS — Soft studio console
   Comfortable light admin; self-hosted fonts only.
   ============================================================ */

@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/manrope-400-cyr.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('fonts/manrope-400-lat.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/manrope-500-cyr.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('fonts/manrope-500-lat.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/manrope-600-cyr.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('fonts/manrope-600-lat.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/manrope-700-cyr.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('fonts/manrope-700-lat.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face { font-family: 'Bodoni Moda'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/bodoni-500-latin.woff2') format('woff2'); }
@font-face { font-family: 'Bodoni Moda'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/bodoni-600-latin.woff2') format('woff2'); }

:root {
  --bg: #f3f2ef;
  --surface: #ffffff;
  --surface-2: #f8f7f4;
  --ink: #1c1b19;
  --ink-soft: rgba(28, 27, 25, 0.72);
  --muted: rgba(28, 27, 25, 0.52);
  --faint: rgba(28, 27, 25, 0.32);
  --line: rgba(28, 27, 25, 0.1);
  --line-strong: rgba(28, 27, 25, 0.16);
  /* нейтральный акцент выделения / ссылок / фокуса */
  --accent: #1c1b19;
  --accent-soft: rgba(28, 27, 25, 0.08);
  --accent-hover: #000000;
  /* красный — только важное: удаление, ошибки, критичные статусы */
  --danger: #b83a22;
  --danger-soft: rgba(184, 58, 34, 0.12);
  --danger-hover: #9a2f1c;
  --ok: #3d7a4a;
  --ok-bg: #eaf4ec;
  --warn: #9a7a28;
  --warn-bg: #f8f1dd;
  --err-bg: #f8eae6;
  --side: #eceae5;
  --side-w: 252px;
  --hover: rgba(28, 27, 25, 0.06);
  --hover-soft: rgba(28, 27, 25, 0.04);
  --overlay: rgba(28, 27, 25, 0.35);
  --elev: 0 1px 2px rgba(28, 27, 25, 0.05);
  --panel-shadow: 0 1px 2px rgba(28, 27, 25, 0.04), 0 8px 24px rgba(28, 27, 25, 0.06);
  --radius: 10px;
  --radius-lg: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(28, 27, 25, 0.04), 0 8px 24px rgba(28, 27, 25, 0.06);
  --shadow-lg: 0 8px 40px rgba(28, 27, 25, 0.16);
  --font: 'Manrope', system-ui, sans-serif;
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-preview: 'Bodoni Moda', Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --topbar-h: 64px;
  /* фон под PNG/WebP с прозрачностью — белое и чёрное читаются */
  --alpha-preview: #9a9a9a;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0e0e0f;
  --surface: #18181a;
  --surface-2: #141415;
  --alpha-preview: #6a6a6c;
  --ink: #e6e4df;
  --ink-soft: rgba(230, 228, 223, 0.78);
  --muted: rgba(230, 228, 223, 0.52);
  --faint: rgba(230, 228, 223, 0.34);
  --line: rgba(230, 228, 223, 0.1);
  --line-strong: rgba(230, 228, 223, 0.18);
  --accent: #eceae5;
  --accent-soft: rgba(230, 228, 223, 0.12);
  --accent-hover: #ffffff;
  --danger: #d45238;
  --danger-soft: rgba(212, 82, 56, 0.18);
  --danger-hover: #e86a4e;
  --ok: #6bb57a;
  --ok-bg: #15241a;
  --warn: #d4b45a;
  --warn-bg: #2a2414;
  --err-bg: #2a1614;
  --side: #121214;
  --hover: rgba(255, 255, 255, 0.06);
  --hover-soft: rgba(255, 255, 255, 0.04);
  --overlay: rgba(0, 0, 0, 0.55);
  --elev: 0 1px 2px rgba(0, 0, 0, 0.45);
  --panel-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

html[data-theme="dark"] .st--in-production { background: #2a2214; }
html[data-theme="dark"] .st--coming-soon { background: #1e1828; }
html[data-theme="dark"] .st--now-showing { background: #2a1814; }
html[data-theme="dark"] .st--streaming { background: #142018; }
html[data-theme="dark"] .st--archived { background: #1c1c1c; }
html[data-theme="dark"] .sub-st--pending { background: #2a2214; }
html[data-theme="dark"] .sub-st--active,
html[data-theme="dark"] .sub-st--already { background: #142018; }
html[data-theme="dark"] .sub-st--local,
html[data-theme="dark"] .sub-st--unsubscribed { background: #1c1c1c; }
html[data-theme="dark"] .sub-st--error { background: #2a1814; }
html[data-theme="dark"] .sub-st--invited { background: #1e1828; }
html[data-theme="dark"] .btn-home.is-on {
  border-color: #2f9d5b66;
  background: #142018;
  color: #8fd4a2;
}
html[data-theme="dark"] .topbar {
  background: rgba(14, 14, 15, 0.92);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  font-weight: 400;
}
::selection { background: var(--ink); color: var(--surface); }
a { color: var(--ink-soft); text-decoration: none; }
a:hover { color: var(--accent-hover); }
input, textarea, select, button { font: inherit; color: inherit; accent-color: var(--accent); }
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: transparent;
}
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@keyframes cmsIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes cmsFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================= layout ================= */
.layout { display: flex; align-items: stretch; min-height: 100vh; }
.side-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 40;
  background: var(--overlay);
  -webkit-tap-highlight-color: transparent;
}
body.nav-open .side-backdrop {
  display: block;
  animation: cmsFade .2s var(--ease);
}

.topbar {
  display: none;
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  background: rgba(243, 242, 239, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__menu {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; line-height: 1;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.topbar__title {
  margin: 0;
  padding: 0 56px;
  max-width: 100%;
  font-family: inherit;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side {
  width: var(--side-w);
  flex: 0 0 var(--side-w);
  position: sticky; top: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--side);
  border-right: 1px solid var(--line);
  z-index: 50;
  overflow: hidden;
}
.side__brand {
  padding: 28px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 0 0 auto;
  overflow: visible;
  position: relative;
  z-index: 2;
}
.side__brand-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.side__brand img {
  display: block;
  width: 33%;
  max-width: 72px;
  height: auto;
  flex: 0 0 auto;
}
/* SVG белый: на светлой теме сайдбара — тёмный, на тёмной — как есть */
html[data-theme="light"] .side__brand img {
  filter: invert(1);
}
.side__date {
  position: relative;
  z-index: 2;
  overflow: visible;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}
.side__date strong {
  font-weight: 650;
  color: var(--ink-soft);
}
.side__date-link {
  position: relative;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  transition: color .15s ease, border-color .15s ease;
}
.side__date-link:hover,
.side__date-link:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--ink);
  outline: none;
}
.side__date-link strong {
  color: inherit;
  font-weight: 650;
}
.side__date-link[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  top: auto;
  transform: translateX(-50%) translateY(-4px);
  z-index: 80;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.side__date-link[data-tip]:hover::after,
.side__date-link[data-tip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.side__site {
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  box-sizing: border-box;
  text-decoration: none;
  padding: 7px 11px;
  font-size: 12.5px;
  white-space: nowrap;
}
.side__nav {
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.nav-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border: none; border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px; font-weight: 500;
  cursor: pointer; text-align: left;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.nav-btn:hover { background: var(--hover); color: inherit; }
.nav-btn.is-act {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--elev);
}
.nav-btn .n-count { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.nav-btn.is-act .n-count { color: var(--ink-soft); }
.nav-btn .n-hot {
  font-size: 11.5px; font-weight: 600;
  color: var(--danger);
  background: var(--danger-soft);
  padding: 2px 8px; border-radius: 999px;
}
.nav-btn.is-act .n-hot { color: var(--danger); }
.side__divider { border: 0; border-top: 1px solid var(--line); margin: 10px 8px; }
.side__label {
  padding: 10px 14px 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
}
.nav-btn.is-off { color: var(--muted); }
.nav-btn.is-off:hover { color: var(--ink-soft); background: var(--hover-soft); }
.nav-btn--sub {
  padding-left: 28px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.nav-btn--sub .n-count { font-size: 12px; }
.side__foot {
  margin-top: auto;
  flex: 0 0 auto;
  padding: 16px 20px max(22px, env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 28px;
}
.theme-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.theme-switch__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.theme-switch__btn svg {
  width: 18px;
  height: 18px;
  display: block;
}
.theme-switch__btn:hover {
  color: var(--ink);
  background: var(--hover);
}
.theme-switch__btn.is-act {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--panel-shadow);
}
html[data-theme-pref="light"] .theme-switch__btn[data-theme-set="light"],
html[data-theme-pref="auto"] .theme-switch__btn[data-theme-set="auto"],
html[data-theme-pref="dark"] .theme-switch__btn[data-theme-set="dark"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--panel-shadow);
}
.side__acc {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}
.side__acc-meta { min-width: 0; }
.side__name {
  font-size: 14.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side__role {
  font-size: 12.5px; line-height: 1.45; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side__acc-cfg {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  color: var(--ink);
  text-decoration: none;
  transform: none;
}
.side__acc-cfg:active,
.side__acc-cfg:focus {
  outline: none;
  transform: none;
}
@media (hover: hover) and (pointer: fine) {
  .btn-sq.side__acc-cfg:hover,
  .btn-sq.side__acc-cfg.is-act {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--surface);
  }
}
.btn-sq.side__acc-cfg.is-act {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}
.side__acc-cfg-ico {
  display: block;
  width: 20px;
  height: 20px;
  pointer-events: none;
}
.side__foot .btn-outline { align-self: stretch; }
.avatar--sm {
  width: 36px; height: 36px;
  font-size: 12px;
}

.main {
  flex: 1; min-width: 0;
  padding: 36px 44px 100px;
  display: flex; flex-direction: column; align-items: stretch;
}
.screen {
  max-width: 1180px;
  width: 100%;
  animation: cmsIn .4s var(--ease) both;
}
.screen--narrow { max-width: 980px; }
.screen--form { max-width: 760px; }
.screen + .screen { margin-top: 40px; }

/* ================= page chrome ================= */
.kicker {
  font-size: 12.5px; font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}
h1.serif, h1.page-title {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}
h1.serif--sm, h1.page-title--sm { font-size: clamp(24px, 2.6vw, 30px); }
/* карточки фильма/товара — тот же кегль, что у разделов; только обрезка длинных названий */
h1.serif--ed, h1.page-title--ed {
  font-size: clamp(28px, 3.2vw, 36px);
  line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.headrow {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}
/* после backlink — тот же низ, что у разделов; сверху только зазор от ссылки */
.headrow--loose { padding: 0 0 22px; }
.headrow--noborder { border-bottom: none; padding-bottom: 14px; }
.headrow__title { min-width: 0; }
.headrow__title > h1.page-title:first-child { margin-top: 0; }
.headrow__side {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  justify-content: flex-end;
}
.headrow__sep {
  display: inline-block;
  width: 1px;
  height: 22px;
  margin: 0 6px;
  background: var(--line-strong);
  flex: 0 0 auto;
}
.headrow--film-ed {
  align-items: center;
}
.headrow--film-ed .headrow__side {
  gap: 10px;
  align-items: center;
}
.headrow--film-ed .headrow__side > form {
  display: flex;
  margin: 0;
}
.headrow--film-ed .btn-primary { margin-left: 0; }
.headrow--film-ed .headrow__side > .btn-outline {
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
}
.film-ed__heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  min-width: 0;
}
.film-ed__heading .page-title--ed {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
}
.film-ed__head-home {
  flex: 0 0 auto;
  margin: 0;
  display: flex;
}
.backlink {
  border: none; background: transparent; padding: 0;
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  margin-bottom: 8px;
}
.backlink:hover { color: var(--accent); }
.toolbar {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin: 18px 0 20px;
}
.toolbar--catalog {
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 24px;
}
.toolbar--catalog .search {
  flex: 0 1 280px;
  min-width: 200px;
  max-width: 320px;
}
.toolbar--catalog .cat-filters {
  flex: 1 1 320px;
  margin: 0;
  min-width: 0;
}
.summary-tiles { margin-bottom: 0; }
.headrow + .summary-section { margin-top: 24px; }
.summary-section + .summary-section {
  margin-top: 0;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.summary-section__label {
  padding: 0 2px 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  user-select: none;
}
.search {
  flex: 1; min-width: 180px; max-width: 360px;
  position: relative;
}
.search__inp {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 11px 14px 11px 42px;
  font-size: 14px;
}
.search::before {
  content: "⌕";
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 20px; font-weight: 600; line-height: 1;
  pointer-events: none;
}
.cat-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
}
.cat-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.cat-filter:hover { border-color: var(--line-strong); background: var(--hover-soft); }
.cat-filter.is-act {
  border-color: var(--ink-soft);
  background: var(--surface-2);
  box-shadow: var(--elev);
}
.cat-filter__n {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.cat-filter.is-act .cat-filter__n { color: var(--ink-soft); }
.cat-filter-div {
  width: 1px;
  height: 24px;
  background: var(--line);
  margin: 0 2px;
}
.cat-filters__status { min-width: 180px; }
.cat-filters__status .sel { width: 100%; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.seg {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
}
.seg .tab {
  border: none; border-radius: calc(var(--radius) - 3px);
  background: transparent;
  padding: 8px 14px;
}
.seg .tab.is-act {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--elev);
}

/* ================= buttons ================= */
.tab {
  display: inline-flex; align-items: center;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.tab:hover { border-color: var(--faint); color: inherit; }
.tab.is-act {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 8px;
  padding: 10px 16px;
  border: none; border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--surface);
  font-family: inherit;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--surface); }
.btn-primary--flat { margin-left: 0; }
.btn-primary.is-saving,
.btn-primary:disabled.is-saving {
  opacity: 0.92;
  cursor: wait;
  pointer-events: none;
  gap: 8px;
}
.btn-primary.is-saving::before {
  content: "";
  width: 14px; height: 14px;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: libSpin .7s linear infinite;
}
html[data-theme="dark"] .btn-primary.is-saving::before {
  border-color: rgba(14, 14, 15, 0.35);
  border-top-color: currentColor;
}
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: inherit;
  font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  color: var(--ink);
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.btn-outline:hover { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn-outline--red:hover { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn-outline.is-saving,
.btn-outline:disabled.is-saving {
  opacity: 0.85;
  cursor: wait;
  pointer-events: none;
  gap: 8px;
}
.btn-outline.is-saving::before {
  content: "";
  width: 14px; height: 14px;
  flex: none;
  border: 2px solid color-mix(in srgb, var(--ink) 25%, transparent);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: libSpin .7s linear infinite;
}
.film-ed.is-copying-en { cursor: wait; }
.btn-dashed {
  padding: 9px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: inherit;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  color: var(--ink-soft);
}
.btn-dashed:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-del {
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 12.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
}
.btn-del:hover, .btn-del.is-armed {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--surface);
}
.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s, color .18s, border-color .18s;
}
.btn-home__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #8a857a;
  flex: 0 0 auto;
}
.btn-home:hover { border-color: var(--ink-soft); color: var(--ink); }
.btn-home.is-on {
  border-color: #2f9d5b66;
  background: #eef8f2;
  color: #1f6b3a;
}
.btn-home.is-on .btn-home__dot {
  background: #2f9d5b;
  box-shadow: 0 0 0 3px #2f9d5b22;
}
.chk-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.chk-home input { width: 16px; height: 16px; }
.btn-sq {
  width: 34px; height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  text-decoration: none;
  color: inherit;
  transform: none;
}
@media (hover: hover) and (pointer: fine) {
  .btn-sq:hover { background: var(--accent); color: var(--surface); border-color: var(--accent); }
}
.btn-sq--26 { width: 30px; height: 30px; font-size: 12px; }
button[disabled], .is-demo button, .is-demo select, .is-demo input {
  cursor: not-allowed !important; opacity: .55; pointer-events: none;
}

/* ================= status ================= */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  white-space: nowrap;
  background: var(--surface);
}
.dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.st--in-production { border-color: #c77c1e44; background: #fbf6ec; } .st--in-production .dot { background: #c77c1e; }
.st--coming-soon   { border-color: #7d46c944; background: #f5f0fb; } .st--coming-soon .dot   { background: #7d46c9; }
.st--now-showing   { border-color: #b83a2244; background: #fbf0ed; } .st--now-showing .dot   { background: #b83a22; }
.st--streaming     { border-color: #2f9d5b44; background: #eef8f2; } .st--streaming .dot     { background: #2f9d5b; }
.st--archived      { border-color: #8a857a44; background: #f3f2ef; } .st--archived .dot      { background: #8a857a; }
.dot--in-production { background: #c77c1e; } .dot--coming-soon { background: #7d46c9; }
.dot--now-showing { background: #b83a22; } .dot--streaming { background: #2f9d5b; } .dot--archived { background: #8a857a; }

/* ================= forms ================= */
.lbl {
  display: block;
  font-size: 13px; font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.inp, .sel, .txt {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.35;
  min-height: 44px;
  box-sizing: border-box;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.inp:hover, .sel:hover, .txt:hover { border-color: var(--faint); }
.sel {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%237a746c' d='M1.1 1.4 6 6.3l4.9-4.9 1.1 1.1L6 8.5 0 2.5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  padding-right: 34px;
  cursor: pointer;
}
.sel--add,
select.add-select {
  border-style: dashed;
  color: var(--ink-soft);
}
.sel--add:hover,
select.add-select:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.txt { line-height: 1.55; resize: vertical; min-height: 2.8em; }
.txt--sm {
  padding: 9px 12px;
  font-size: 14px;
  min-height: 40px;
  line-height: 1.45;
}
.txt--sm.js-autosize { min-height: 40px; }
.inp--sm {
  padding: 9px 12px;
  font-size: 14px;
  min-height: 40px;
}
.field-note, .sect-note {
  font-size: 13px; line-height: 1.5;
  color: var(--muted);
}
.field-note { margin-top: 6px; }
.sect-title {
  font-size: 15px; font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 14px;
  padding: 0;
  border: none;
}
.sect-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.sect-head .sect-title { margin: 0; }
.sect-head .js-copy-film-en {
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 600;
}
.sub-title {
  font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.sub-title--rule {
  margin: 24px 0 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
.span2 { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.check-row {
  display: flex; gap: 28px; flex-wrap: wrap; padding-top: 4px;
}
.check-row label {
  display: flex; align-items: center; gap: 9px;
  font-size: 14px; cursor: pointer;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.panel + .panel, .sect + .sect { margin-top: 16px; }
.sect {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.sect__note { margin: -4px 0 14px; }
.list-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.flash {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  border: 1px solid #79a86d;
  background: var(--ok-bg);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink);
}
.flash__body { flex: 1; min-width: 0; }
.flash__invite { margin-top: 10px; }
.flash__invite .btn-outline { padding: 6px 11px; font-size: 12.5px; font-weight: 600; }
.flash__x {
  border: none; background: transparent;
  color: var(--muted); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 0 2px;
}
.flash__x:hover { color: var(--ink); }
.flash--err { background: var(--err-bg); border-color: var(--danger); }
.flash--warn { background: var(--warn-bg); border-color: var(--warn); }
.flash--top {
  position: sticky;
  top: 12px;
  z-index: 20;
  margin: 0 0 18px;
}
.demo-note {
  margin-top: 20px;
  font-size: 13.5px; line-height: 1.55;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface-2);
}
.version-tag { color: var(--muted); }

/* ================= dashboard ================= */
.dash-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 28px;
  margin-top: 24px;
  align-items: start;
}
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.catalog-note { margin: 0 0 20px; }
.fcard {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  display: flex; flex-direction: column;
  color: inherit;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.fcard:hover {
  border-color: var(--line-strong);
  color: inherit;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.fcard.is-filtered-out { display: none; }
.fcard img {
  display: block; width: 100%; height: 148px;
  object-fit: cover;
  background: #2a2926;
}
.fcard__noimg {
  width: 100%; height: 148px;
  background: linear-gradient(145deg, #2a2926, #1c1b19);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.28); font-size: 13px; font-weight: 500;
}
.fcard__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.fcard__title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  white-space: pre-line;
}
.fcard__home {
  display: inline-block;
  margin-left: 6px;
  color: #2f9d5b;
  font-size: 14px;
  font-weight: 600;
  vertical-align: 1px;
}
.fcard.is-home { border-color: #2f9d5b44; }
.fcard__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fcard__meta > span:first-child { font-size: 12.5px; color: var(--muted); }
.fcard__acts { display: flex; gap: 6px; border-top: 1px solid var(--line); padding-top: 9px; }

.rail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.rail--formats { margin-top: 16px; }
.dot--format { background: var(--ink-soft); }
.rail-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.rail-head > span:first-child { font-size: 14.5px; font-weight: 650; }
.rail-head > span:last-child { font-size: 13px; color: var(--muted); }
.rail-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--line);
}
.rail-row:last-of-type { border-bottom: none; }
a.rail-row--link {
  text-decoration: none;
  color: inherit;
  margin: 0 -6px;
  padding: 12px 8px;
  border-radius: var(--radius);
  transition: background .15s var(--ease);
}
a.rail-row--link:hover { background: var(--hover-soft); color: inherit; }
a.rail-row--link:active { background: var(--hover); }
.rail-row > span:nth-child(2) { flex: 1; font-size: 14px; font-weight: 500; }
.rail-row .rail-n {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.rail-row .rail-n.is-zero { color: var(--faint); }
.blackbox {
  margin-top: 16px;
  border: none;
  border-radius: var(--radius-lg);
  background: #1c1b19;
  color: #f5f3ee;
  padding: 18px 20px;
}
.blackbox__lbl { font-size: 12.5px; font-weight: 500; color: rgba(245, 243, 238, 0.55); }
.blackbox__txt { font-size: 14px; line-height: 1.55; margin-top: 8px; color: rgba(245, 243, 238, 0.9); }
.blackbox a { color: rgba(245, 243, 238, 0.88); }
.blackbox a:hover { color: #fff; }
html[data-theme="dark"] .blackbox {
  background: #080809;
  box-shadow: inset 0 0 0 1px var(--line);
}
.empty-note {
  padding: 48px 20px;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
}

/* ================= tables / rows ================= */
.table-wrap { margin-top: 16px; }
.frow-head, .frow {
  display: grid;
  grid-template-columns: 48px minmax(160px,1.8fr) 56px minmax(90px,130px) minmax(120px,150px) minmax(90px,1fr) auto;
  gap: 14px; align-items: center;
}
.frow-head {
  padding: 10px 16px;
  font-size: 12.5px; font-weight: 500;
  color: var(--muted);
}
.frow-head .col-end, .frow .col-end { text-align: right; }
.frow {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  cursor: pointer; color: inherit;
  transition: background .15s var(--ease);
}
.frow:hover { background: var(--surface-2); color: inherit; }
.frow__link { color: inherit; min-width: 0; }
.frow img, .swatch {
  display: block; width: 48px; height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.swatch {
  background: linear-gradient(145deg, #2a2926, #1c1b19);
  outline: none;
}
.frow__cell { min-width: 0; }
.frow__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.frow__latin {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
}
.frow__meta { font-size: 13.5px; color: var(--ink-soft); }
.frow__meta--ellip {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.frow__acts { display: flex; gap: 6px; justify-content: flex-end; }

/* ================= film editor ================= */
.ed-layout {
  display: grid;
  grid-template-columns: 168px minmax(0,1fr) 320px;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}
.ed-layout--2 {
  grid-template-columns: 168px minmax(0,1fr);
}
.ed-toc-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 24px;
  align-self: start;
}
.ed-toc {
  position: static;
  top: auto;
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.film-ed__archive-bar {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 0 2px;
}
.film-ed__archive-bar--toc {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0;
  margin-top: 20px;
}
.film-ed__archive-bar form { margin: 0; }
.film-ed__archive-bar--toc form {
  width: 100%;
  display: flex;
  justify-content: center;
}
.film-ed__archive-muted {
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  line-height: 1.35;
  transition: color .15s var(--ease);
}
.film-ed__archive-muted:hover { color: var(--ink-soft); }
.film-ed__archive-muted--danger:hover { color: var(--danger); }
.ed-toc a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  transition: background .15s var(--ease), color .15s var(--ease);
}
.ed-toc a:hover { color: var(--ink); background: var(--surface-2); }
.ed-toc a.is-act {
  color: var(--ink);
  background: var(--accent-soft);
  font-weight: 600;
}
.ed-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 320px;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}
.ed-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ed-main { min-width: 0; }
.row-3 { display: grid; grid-template-columns: 170px 1fr 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.row-3--link {
  grid-template-columns: 28px 170px 1fr 34px;
}
.row-3.credit-row {
  grid-template-columns: 28px minmax(0, 1fr) 34px 34px;
}
.row-3.credit-row > input[type="hidden"] { display: none !important; }
.credit-group {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
}
.credit-role {
  min-width: 0;
}
.credit-role > .sel,
.credit-role > .vocab-dd,
.credit-role > [data-credit-role-en] {
  width: 100%;
  min-width: 0;
}
.credit-names { min-width: 0; }
.credit-grip {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.row-press { display: grid; grid-template-columns: 28px 1fr 180px 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.footer-row {
  display: grid;
  grid-template-columns: 28px minmax(120px, 1fr) minmax(140px, 1.6fr) 34px;
  gap: 8px; margin-bottom: 8px; align-items: center;
}
.footer-row__label {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.team-row {
  display: grid;
  grid-template-columns: 28px 56px minmax(140px, 1fr) minmax(140px, 1.2fr) 34px;
  gap: 8px 10px;
  margin-bottom: 12px;
  align-items: center;
}
.team-row--add {
  margin-bottom: 0;
}
.team-row--add > .js-add {
  grid-column: 5;
  justify-self: stretch;
}
.team-row__names,
.team-row__roles {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.team-row .path-pick--avatar-sm {
  width: 56px;
  height: 56px;
  margin: 0 8px 0 0;
}
.team-row .path-pick--avatar-sm .path-pick__btn {
  width: 56px;
  height: 56px;
  min-height: 56px;
  border-radius: 50%;
}
.team-row .path-pick--avatar-sm .path-pick__btn.has-img img {
  border-radius: 50%;
}
.team-row .path-pick--avatar-sm .path-pick__clear {
  top: -4px;
  right: -4px;
}
.footer-row .check-inline {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); white-space: nowrap; cursor: pointer;
}
.footer-row .check-inline input[type="checkbox"] { margin: 0; }
.row-award {
  --award-block: 120px;
  display: grid;
  grid-template-columns: 28px var(--award-block) minmax(0, 1fr) 34px;
  gap: 8px 10px;
  margin-bottom: 22px;
  align-items: center;
}
.row-award > input[type="hidden"] { display: none !important; }
.award-grip {
  color: var(--faint);
  font-size: 14px;
  text-align: center;
  cursor: grab;
  user-select: none;
  line-height: 1;
}
.award-media {
  min-width: 0;
  height: var(--award-block);
}
.award-copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  height: var(--award-block);
}
.award-copy > .txt {
  flex: 1 1 0;
  min-height: 0 !important;
  height: auto;
  resize: none;
  overflow: auto;
}
.award-fest-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 6px;
  align-items: stretch;
  flex: 1 1 0;
  min-height: 0;
}
.award-fest-row .txt {
  min-height: 0 !important;
  height: 100%;
  resize: none;
  overflow: auto;
}
.award-fest-row .award-year {
  width: 100%;
  min-height: 0 !important;
  height: 100%;
  box-sizing: border-box;
}
.award-img-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--award-block);
  height: var(--award-block);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #0e0e0f; /* чёрный фон — белые лавры читаются */
  overflow: hidden;
}
.award-img-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
  background: #0e0e0f;
}
.award-img-preview img:hover {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}
.award-img-preview .shot__del {
  top: 4px;
  right: 4px;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.award-img-preview:hover .shot__del,
.award-img-preview:focus-within .shot__del {
  opacity: 1;
  pointer-events: auto;
}
.award-add { margin-top: 4px; }
.laurel-slot { position: relative; display: inline-block; }

.media-slot { margin-bottom: 8px; }
.media-slot__filled { position: relative; display: block; }
.media-slot--poster { width: 100%; max-width: 100%; }
.media-slot__filled .media-cover,
.media-slot__filled .media-poster,
.media-slot__filled .media-video { margin-bottom: 0; }
.media-slot__filled .shot__del {
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.media-slot__filled:hover .shot__del,
.media-slot__filled:focus-within .shot__del {
  opacity: 1;
  pointer-events: auto;
}
.shot .shot__del {
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.shot:hover .shot__del,
.shot:focus-within .shot__del {
  opacity: 1;
  pointer-events: auto;
}

.media-cover, .media-cover-empty {
  display: block; width: 100%; height: 110px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  margin-bottom: 8px; cursor: pointer;
}
.media-cover { background: var(--alpha-preview); }
.media-cover-empty {
  border-style: dashed;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  background: var(--surface-2);
  font-family: inherit;
}
.media-cover-empty:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.media-poster {
  display: block; width: 100%; height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover; object-position: top;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  margin-bottom: 8px; cursor: pointer;
  background: var(--alpha-preview);
}
.media-poster-empty {
  width: 100%;
  aspect-ratio: 2 / 3;
  min-height: 0;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 14px;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px; cursor: pointer;
  background: var(--surface-2);
  font-family: inherit;
}
.media-poster-empty:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.media-video {
  width: 100%; height: 68px;
  background: var(--ink); color: var(--surface);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px; margin-bottom: 8px;
  border: none; border-radius: var(--radius);
  cursor: pointer;
}
.media-video span:first-child { font-size: 16px; line-height: 1; }
.media-video span:last-child {
  font-size: 13px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-video-empty {
  width: 100%; height: 68px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  background: var(--surface-2);
  font-family: inherit;
}
.media-video-empty:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.shots { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.shot { position: relative; display: block; }
[data-path-shots] .shot { cursor: pointer; }
.shot img {
  display: block; width: 176px; height: 110px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--alpha-preview);
}
.shot__del, .shot__mv {
  position: absolute;
  width: 24px; height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 11px; line-height: 1;
  cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}
.shot__del { top: -8px; right: -8px; }
.shot__del:hover { background: var(--danger); color: var(--surface); border-color: var(--danger); }
.shot__mv { bottom: -8px; }
.shot__mv:hover { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.shot__mv--l { left: -8px; } .shot__mv--r { right: -8px; }
.shot-add {
  display: flex; align-items: center; justify-content: center;
  width: 176px; height: 110px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  font-size: 22px; color: var(--muted);
  cursor: pointer; background: var(--surface-2);
}
.shot-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.award-laurel {
  display: block; width: 96px; height: 48px;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--ink);
  cursor: pointer;
}
.award-laurel-empty {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  border: 0;
  border-radius: 0;
  font-size: 12px; font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer; text-align: center;
  background: transparent;
  font-family: inherit;
}
.award-laurel-empty:hover { color: #fff; }
.ed-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; }
.prev-card {
  position: relative;
  min-height: 400px; padding: 24px;
  display: flex; flex-direction: column;
  border: none; border-radius: var(--radius-lg);
  background: #1c1b19; color: #f3f2ef;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.prev-card.has-cover {
  background-image: var(--prev-cover);
}
.prev-card.has-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.45) 48%,
    rgba(0, 0, 0, 0.28) 100%
  );
  pointer-events: none;
}
html[data-theme="dark"] .prev-card {
  background-color: #0a0a0b;
  color: #e6e4df;
}
.prev-card__top,
.prev-card__bottom {
  position: relative;
  z-index: 1;
}
.prev-card__top {
  display: flex; justify-content: space-between;
  font-size: 12px; font-weight: 500;
  opacity: .7;
}
.prev-card__bottom { margin-top: auto; }
.prev-card__title {
  font-family: var(--font-preview);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.05;
  white-space: pre-line;
}
.prev-card__meta { font-size: 12.5px; opacity: .7; margin-top: 10px; }
.prev-card__log { font-size: 14px; line-height: 1.55; opacity: .88; margin-top: 14px; }
.ed-side img.side-cover {
  display: block; width: 100%; height: 118px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.product-prev {
  display: block; width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.product-prev-empty {
  width: 100%; aspect-ratio: 1 / 1; height: auto;
  border-radius: var(--radius);
}
.product-prev-meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.product-prev-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.product-prev-price { font-size: 14px; white-space: nowrap; font-weight: 600; }
.product-prev-flags { font-size: 12.5px; color: var(--muted); }
.trailer-link {
  font-size: 13.5px; font-weight: 500;
  color: var(--ink);
}
.trailer-link:hover { color: var(--accent-hover); }
.color-dots { display: flex; gap: 8px; align-items: center; }
.color-dots input[type="color"] {
  width: 44px; height: 34px; padding: 2px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.upload-hidden { display: none; }
.save-bar {
  position: sticky; bottom: 0; z-index: 10;
  background: linear-gradient(transparent, var(--bg) 40%);
  padding: 22px 0 4px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.panel .save-bar {
  position: static;
  background: none;
  padding: 22px 0 0;
}

/* ================= vitrina ================= */
.vitrina-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 0;
  align-items: start;
}
.vitrina-stats .rail--formats { margin-top: 0; }
.vitrina-page-note { margin: 0 0 16px; }
.vitrina-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.vitrina-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.vitrina-block__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.vitrina-sub {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}
.vitrina-sub:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}
.vitrina-sub__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  flex-wrap: wrap;
}
.vitrina-sub__head .vitrina-sub__title { margin: 0; }
.vitrina-sub__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.ed-main > .panel .feed-row {
  background: transparent;
  box-shadow: none;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 18px 0;
}
.ed-main > .panel .feed-row:last-of-type {
  border-bottom: none;
}
.ed-main > .panel .feed-row__grip { margin-top: 22px; }
.ed-main > .panel .drag-row {
  background: transparent;
  box-shadow: none;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 0;
  margin-bottom: 0;
}
.ed-main > .panel .drag-row:last-of-type {
  border-bottom: none;
}
.feed-form { margin-top: 8px; }
.feed-form__note { margin: 0 0 16px; }
.feed-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.feed-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: grab;
}
.feed-row:hover { border-color: var(--line-strong); }
.feed-row.dragging { opacity: .45; }
.feed-row__grip {
  color: var(--faint);
  font-size: 14px;
  text-align: center;
  margin-top: 28px;
  user-select: none;
}
.feed-row__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.feed-row__top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 16px;
  align-items: start;
}
.feed-row__type {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feed-row__rm { margin-top: 26px; }
.feed-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.ed-main > .v-block:first-child { margin-top: 0; }
.v-block:first-of-type { margin-top: 24px; }
.ed-main > .v-block:first-of-type { margin-top: 0; }
.ed-main > .v-block + .v-block { margin-top: 16px; }
.settings-ed #settingsForm > .v-block + .v-block { margin-top: 16px; }
.settings-ed #settingsForm > .v-block:first-of-type { margin-top: 0; }
.settings-ed .ed-main > form + .v-block,
.settings-ed #team { margin-top: 24px; }
.drag-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px; align-items: center;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: grab;
  box-shadow: var(--elev);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.drag-row:hover { border-color: var(--line-strong); }
.drag-row.dragging { opacity: .4; }
.drag-row__grip { color: var(--faint); font-size: 14px; text-align: center; }
.drag-row__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
[data-cat-pick] {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
[data-cat-pick] [data-cat-list]:empty + .sel--add {
  margin-top: 0;
}
[data-cat-add]:not(:has(option[value]:not([value=""]):not([disabled]))) {
  display: none;
}

/* ================= shop ================= */
.prow-head, .prow {
  display: grid;
  grid-template-columns: 18px 48px minmax(160px,2fr) minmax(80px,110px) minmax(56px,72px) minmax(64px,80px);
  gap: 14px; align-items: center;
}
.prow-head {
  padding: 10px 16px;
  font-size: 12.5px; font-weight: 500;
  color: var(--muted);
}
.prow {
  position: relative;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: inherit;
  cursor: pointer;
}
.prow:hover { background: var(--surface-2); }
.prow__grip {
  position: relative;
  z-index: 1;
  color: var(--faint);
  font-size: 14px;
  text-align: center;
  cursor: grab;
  user-select: none;
  line-height: 1;
}
.prow__go { color: inherit; text-decoration: none; min-width: 0; }
.prow__go:hover { color: inherit; }
.prow__go--cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}
.prow img {
  display: block; width: 48px; height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.prow__main { min-width: 0; }
.prow__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.prow__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.prow__film { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.prow__ext {
  color: var(--accent);
  font-weight: 650;
}
.prow__price { font-size: 14px; white-space: nowrap; font-weight: 600; }
.prow__stock,
.prow__sold {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.prow__copy-ico {
  display: block;
  width: 14px;
  height: 14px;
}
.prow .js-copy-link {
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}
.prow .js-copy-link::before {
  content: "";
  position: absolute;
  inset: -12px;
}
.prow .js-copy-link.is-ok {
  border-color: var(--ok);
  color: var(--ok);
  background: var(--ok-bg);
}
.prow__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 12px; font-weight: 500;
  background: var(--surface-2);
}
.chip--drop { border-color: rgba(184, 58, 34, 0.35); color: var(--danger); background: var(--danger-soft); }
.stock-low { color: var(--danger); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.tile {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.tile--hot { border-color: transparent; background: var(--ink); color: var(--surface); }
html[data-theme="dark"] .tile--hot .tile__lbl,
html[data-theme="dark"] .tile--hot .tile__sub { color: rgba(14, 14, 15, 0.55); }

.tile__lbl { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.tile--hot .tile__lbl { color: rgba(245, 243, 238, 0.55); }
.tile__val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.1;
  margin-top: 8px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.tile__sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.tile--hot .tile__sub { color: rgba(245, 243, 238, 0.6); }
.orow-head, .orow {
  display: grid;
  grid-template-columns: 76px 82px minmax(120px,1.2fr) minmax(140px,1.6fr) minmax(80px,100px) minmax(100px,130px) auto;
  gap: 14px; align-items: center;
}
.orow-head {
  padding: 12px 16px 8px;
  font-size: 12.5px; font-weight: 500;
  color: var(--muted);
}
.orow { padding: 14px 16px; border-top: 1px solid var(--line); }
.orow__num { font-size: 13.5px; font-weight: 600; }
.orow__date { font-size: 13px; color: var(--muted); }
.orow__who { min-width: 0; }
.orow__name { display: block; font-size: 14px; font-weight: 500; }
.orow__email { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.orow__items { font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.orow__sum { font-size: 14px; text-align: right; white-space: nowrap; font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

.sub-search {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-top: 18px;
}
.sub-search input[type="search"] {
  flex: 1; min-width: 180px; max-width: 360px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; font: inherit; background: var(--surface);
}
.uni-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.uni-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: #8a857a;
}
.uni-status.is-on { color: #1f6b3a; }
.uni-status.is-on .uni-status__dot { background: #2f9d5b; box-shadow: 0 0 0 3px #2f9d5b22; }
.uni-status.is-off { color: #9a3a28; }
.uni-status.is-off .uni-status__dot { background: #b83a22; box-shadow: 0 0 0 3px #b83a2222; }
.srow-head, .srow {
  display: grid;
  grid-template-columns: minmax(180px,1.6fr) 148px 64px minmax(120px,1fr) auto;
  gap: 14px; align-items: center;
}
.srow-head--club, .srow--club {
  grid-template-columns: minmax(120px,1fr) minmax(160px,1.4fr) 148px minmax(100px,.9fr) auto;
}
.srow-head {
  padding: 12px 16px 8px;
  font-size: 12.5px; font-weight: 500;
  color: var(--muted);
}
.srow { padding: 14px 16px; border-top: 1px solid var(--line); }
.srow__email { min-width: 0; font-size: 14px; font-weight: 500; word-break: break-all; }
.srow__email a { color: inherit; text-decoration: none; }
.srow__email a:hover { text-decoration: underline; }
.srow__name { min-width: 0; font-size: 14px; font-weight: 500; }
.srow__date { font-size: 13px; color: var(--muted); }
.srow__lang { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.srow__acts { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn-confirm {
  margin-left: 0;
  padding: 7px 12px;
  font-size: 12.5px;
}
.btn-del-x {
  color: var(--ink-soft);
}
.btn-del-x:hover,
.btn-del-x.is-armed {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--surface);
}
.empty-hint { padding: 28px 16px; color: var(--muted); font-size: 14px; }
.sub-st--pending { border-color: #c77c1e44; background: #fbf6ec; } .sub-st--pending .dot { background: #c77c1e; }
.sub-st--invited { border-color: #7d46c944; background: #f5f0fb; } .sub-st--invited .dot { background: #7d46c9; }
.sub-st--active { border-color: #2f9d5b44; background: #eef8f2; } .sub-st--active .dot { background: #2f9d5b; }
.sub-st--already { border-color: #2f9d5b44; background: #eef8f2; } .sub-st--already .dot { background: #2f9d5b; }
.sub-st--local { border-color: #8a857a44; background: #f3f2ef; } .sub-st--local .dot { background: #8a857a; }
.sub-st--error { border-color: #b83a2244; background: #fbf0ed; } .sub-st--error .dot { background: #b83a22; }
.sub-st--unsubscribed { border-color: #8a857a44; background: #f3f2ef; } .sub-st--unsubscribed .dot { background: #8a857a; }

/* ================= settings ================= */
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin-top: 14px; }
.folder {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 18px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 12px;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.folder:hover { border-color: var(--line-strong); background: var(--surface); color: inherit; transform: translateY(-1px); }
.folder__kind { font-size: 12px; font-weight: 500; color: var(--muted); }
.folder__name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.folder__foot { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 16px; }
.mcard {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.mcard img { display: block; width: 100%; height: 118px; object-fit: cover; }
.mcard__video {
  width: 100%; height: 118px;
  background: var(--ink); color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.mcard__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.mcard__name { font-size: 13.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.mcard__meta { font-size: 12px; color: var(--muted); }
.team-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.urow-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.urow {
  display: grid;
  grid-template-columns: 44px 1.2fr 1.4fr 160px;
  gap: 14px; align-items: center;
  padding: 16px 18px;
}
.urow--view { border-bottom: none; }
.urow--edit {
  grid-template-columns: 44px 1fr;
  align-items: start;
  padding: 18px 20px 14px;
}
.urow-edit__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  align-items: end;
}
.urow-edit__act { display: flex; align-items: end; }
.urow-pw {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  margin: 0;
  flex: 1 1 280px;
  min-width: 0;
}
.urow-reset {
  margin: 0;
  flex: 0 0 auto;
}
.urow-acts {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: end;
  padding: 14px 20px 18px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.urow-acts__gap {
  width: 40px;
  height: 1px;
}
.urow-acts__main {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.urow-acts__save {
  margin-left: auto;
}
.urow-del { flex: 0 0 auto; margin: 0; }
.team-add {
  margin-top: 18px;
}
.team-add .urow-edit__fields { margin-top: 12px; }
.account-panel__head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.account-pw {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.urow__name { display: block; font-size: 14.5px; font-weight: 600; }
.urow__user { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.urow__email { font-size: 13.5px; color: var(--ink-soft); }
.urow__role { font-size: 13px; font-weight: 500; color: var(--muted); }
.avatar {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--ink); color: var(--surface);
  font-size: 13px; font-weight: 600;
}
.rolecards { margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.rolecard {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.rolecard__lbl { font-size: 14px; font-weight: 650; }
.rolecard__desc { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin-top: 8px; }
.role-help { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.role-help p + p { margin-top: 7px; }
.role-help strong { color: var(--ink); }
.danger {
  margin-top: 36px;
  border: 1px solid color-mix(in srgb, var(--danger) 28%, transparent);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: var(--err-bg);
}
.danger__lbl { font-size: 13.5px; font-weight: 650; color: var(--danger); }
.danger__txt { font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); margin-top: 6px; }

/* ================= publish ================= */
.flash + .v-block { margin-top: 24px; }
.diff-list {
  margin: 10px 0 0;
  padding: 16px 18px 16px 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  font-size: 14.5px;
  line-height: 1.7;
  box-shadow: var(--shadow);
}
.publish-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.publish-actions--top { margin-top: 20px; margin-bottom: 8px; }
.flash + .publish-actions--top { margin-top: 20px; }
.publish-actions--top + .v-block { margin-top: 16px; }
.publish-help { max-width: 520px; margin-top: 28px; }

.pub-diff {
  list-style: none;
  margin: 0;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  line-height: 1.45;
  max-height: 420px;
  overflow: auto;
}
.pub-diff__group { margin-top: 14px; }
.pub-diff__group:first-child { margin-top: 0; }
.pub-diff__group-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0 0 6px 2px;
}
.pub-diff__group-title--add { color: #1f7a3a; }
.pub-diff__group-title--chg { color: #c56a1a; }
.pub-diff__group-title--del { color: var(--danger); }
.pub-diff--nested,
.pub-hist__body .pub-diff {
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  max-height: none;
}
.pub-hist__body {
  padding: 16px 14px 14px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.pub-hist__body .pub-diff__group { margin-top: 14px; }
.pub-hist__body .pub-diff__group:first-child { margin-top: 0; }
.pub-diff__row {
  display: block;
  padding: 7px 4px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.pub-diff__row + .pub-diff__row { border-top: 1px solid var(--line); }
.pub-diff__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pub-diff__line { display: block; word-break: break-word; }
.pub-diff__path { color: var(--ink-soft); }
.pub-diff__val { color: var(--ink); font-weight: 700; }
.pub-diff__action { font-weight: 700; }
.pub-diff__row--add .pub-diff__val,
.pub-diff__row--add .pub-diff__action { color: #1f7a3a; }
.pub-diff__row--del .pub-diff__val,
.pub-diff__row--del .pub-diff__action { color: var(--danger); }
.pub-diff__row--chg .pub-diff__new { color: #c56a1a; }
.pub-diff__old { text-decoration: line-through; opacity: .78; font-weight: 700; }
.pub-diff__arrow { margin: 0 6px; color: var(--muted); font-weight: 500; }
.pub-diff__tech {
  display: block;
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
}

.pub-hist { margin-top: 32px; }
.pub-hist__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.pub-hist__item {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pub-hist__sum {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px 4px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  min-height: 52px;
  box-sizing: border-box;
}
.pub-hist__sum::-webkit-details-marker { display: none; }
.pub-hist__sum::marker { content: ""; }
.pub-hist__count { font-weight: 650; color: var(--ink); white-space: nowrap; }
.pub-hist__date,
.pub-hist__time { color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pub-hist__sep { color: var(--muted); margin: 0 2px; user-select: none; }
.pub-hist__who { color: var(--ink-soft); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-hist__chev {
  margin-left: auto;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.pub-hist__chev::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform .15s var(--ease);
}
.pub-hist__sum:hover .pub-hist__chev {
  background: var(--hover);
  border-color: var(--faint);
  color: var(--ink);
}
.pub-hist__item[open] > .pub-hist__sum .pub-hist__chev {
  background: var(--hover);
  border-color: var(--faint);
  color: var(--ink);
}
.pub-hist__item[open] > .pub-hist__sum .pub-hist__chev::before {
  transform: translateY(2px) rotate(225deg);
}
.pub-hist__empty {
  padding: 12px 14px 14px;
  font-size: 13.5px;
  color: var(--muted);
  background: var(--surface-2);
}

.info-tip {
  position: relative;
}
.info-tip__btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  box-shadow: var(--shadow);
  padding: 0;
  font: inherit;
}
.info-tip__glyph {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  color: inherit;
  pointer-events: none;
}
.info-tip__btn:hover,
.info-tip:focus-within .info-tip__btn {
  border-color: var(--faint);
  color: var(--ink);
  background: var(--surface-2);
}
.info-tip__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: min(340px, calc(100vw - 48px));
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .15s var(--ease), transform .15s var(--ease), visibility .15s;
}
.info-tip:hover .info-tip__panel,
.info-tip:focus-within .info-tip__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.info-tip__title {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 6px;
}
.info-tip__txt {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .pub-hist__sum {
    flex-wrap: wrap;
    min-height: 0;
  }
  .pub-hist__chev { margin-left: auto; }
}

/* ================= login ================= */
.login {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background: #0a0a0b;
}
/* VHS stack: desktop only — mobile keeps flat dark bg */
.login__slides,
.login__fx {
  display: none;
}
.login__card {
  position: relative;
  z-index: 3;
  width: min(400px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: #161616;
  color: #e8e8e8;
  padding: 36px 32px 32px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}
.login__card .lbl { color: rgba(255, 255, 255, 0.48); }
.login__card .inp {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e8e8e8;
}
.login__card .inp:focus {
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
}
.login__card img {
  display: block;
  width: 72%;
  max-width: 240px;
  height: auto;
  margin: 0 auto;
  color: #e8e8e8;
}
.login__card .btn-primary {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  background: #2a2a2a;
  color: #e8e8e8;
}
.login__card .btn-primary:hover {
  background: #484848;
  color: #f2f2f2;
}
.login__card .flash { margin: 0; }
.login__hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
}
.login__card a.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

@media (min-width: 861px) {
  .login__slides {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    filter: grayscale(1) contrast(1.08) brightness(0.92);
    animation: loginFlicker 4.5s steps(2) infinite;
  }
  .login__slide {
    position: absolute;
    inset: -4%;
    background-color: #0a0a0b;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.16);
    transition: opacity 1.8s ease;
    will-change: opacity, transform;
  }
  .login__slide.is-on {
    opacity: 1;
    animation: loginKen 5.2s linear forwards;
  }
  @keyframes loginKen {
    from { transform: scale(1.04); }
    to { transform: scale(1.16); }
  }
  @keyframes loginFlicker {
    0%, 92%, 100% { filter: grayscale(1) contrast(1.08) brightness(0.92); }
    93% { filter: grayscale(1) contrast(1.2) brightness(1.05); }
    95% { filter: grayscale(1) contrast(0.95) brightness(0.8); }
    97% { filter: grayscale(1) contrast(1.12) brightness(0.96); }
  }

  .login__fx {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
  }
  .login__noise {
    position: absolute;
    inset: -60%;
    width: 220%;
    height: 220%;
    background-image: url("/static/login-grain.png?v=1");
    background-size: 140px 140px;
    background-repeat: repeat;
    opacity: 0.48;
    mix-blend-mode: overlay;
    animation: loginGrain 0.45s steps(10) infinite;
  }
  .login__scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0) 0,
      rgba(0, 0, 0, 0) 2px,
      rgba(0, 0, 0, 0.28) 2px,
      rgba(0, 0, 0, 0.28) 3px
    );
    opacity: 0.55;
    mix-blend-mode: multiply;
    animation: loginScan 0.12s linear infinite;
  }
  .login__tear {
    position: absolute;
    left: -8%;
    width: 116%;
    height: 11%;
    top: 0;
    background:
      linear-gradient(180deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 35%,
        rgba(0, 0, 0, 0.55) 50%,
        rgba(255, 255, 255, 0.08) 65%,
        transparent 100%);
    mix-blend-mode: soft-light;
    opacity: 0;
    filter: blur(0.4px);
    animation: loginTear 6.5s steps(1, end) infinite;
  }
  .login__veil {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 9, 0.48);
  }
  .login__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(
      ellipse 70% 60% at 50% 45%,
      transparent 35%,
      rgba(0, 0, 0, 0.35) 70%,
      rgba(0, 0, 0, 0.72) 100%
    );
  }
  @keyframes loginGrain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -7%); }
    20% { transform: translate(6%, -3%); }
    30% { transform: translate(-4%, 6%); }
    40% { transform: translate(7%, 2%); }
    50% { transform: translate(-6%, 5%); }
    60% { transform: translate(3%, -6%); }
    70% { transform: translate(-2%, 7%); }
    80% { transform: translate(5%, -4%); }
    90% { transform: translate(-7%, 3%); }
  }
  @keyframes loginScan {
    from { transform: translateY(0); }
    to { transform: translateY(3px); }
  }
  @keyframes loginTear {
    0%, 84%, 100% {
      opacity: 0;
      transform: translate3d(0, 12vh, 0) skewX(0deg);
    }
    85% {
      opacity: 0.9;
      transform: translate3d(4%, 28vh, 0) skewX(-12deg);
    }
    87% {
      opacity: 1;
      transform: translate3d(-5%, 52vh, 0) skewX(9deg);
    }
    89% {
      opacity: 0.75;
      transform: translate3d(3%, 71vh, 0) skewX(-6deg);
    }
    91% {
      opacity: 0;
      transform: translate3d(0, 88vh, 0) skewX(0deg);
    }
  }

  .login__card {
    border-color: rgba(230, 228, 223, 0.12);
    background: rgba(18, 18, 20, 0.78);
    backdrop-filter: blur(16px) saturate(1.1);
    -webkit-backdrop-filter: blur(16px) saturate(1.1);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  }
}

@media (min-width: 861px) and (prefers-reduced-motion: reduce) {
  .login__slide { transition: none; animation: none !important; }
  .login__slides,
  .login__noise,
  .login__scan,
  .login__tear { animation: none !important; }
}

/* ================= library modal ================= */
.lib-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--overlay);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: cmsFade .2s var(--ease);
}
.lib-page {
  display: block;
  margin: 0;
}
.lib-page .lib-head { display: none; }
.lib-panel {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  width: min(960px, 100%);
  max-height: 86vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: cmsIn .28s var(--ease) both;
}
.lib-busy {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 27, 25, 0.42);
  backdrop-filter: blur(2px);
}
.lib-busy[hidden] { display: none !important; }
.lib-busy__card {
  width: min(280px, 82%);
  padding: 22px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.lib-busy__spin {
  width: 28px; height: 28px;
  margin: 0 auto 12px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: libSpin .7s linear infinite;
}
@keyframes libSpin { to { transform: rotate(360deg); } }
.lib-busy__txt {
  font-size: 14px;
  font-weight: 550;
  color: var(--ink);
  margin-bottom: 12px;
}
.lib-busy__bar {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.lib-busy__bar > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--ink);
  transition: width .15s linear;
}
.lib-panel--page {
  width: 100%;
  max-height: none;
  min-height: min(70vh, 720px);
  box-shadow: none;
  animation: none;
}
.lib-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.lib-title { font-size: 15px; font-weight: 650; }
.lib-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.lib-crumb { font-size: 13px; font-weight: 500; color: var(--muted); }
.lib-toolbar__right { display: inline-flex; gap: 6px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.lib-folder-inp { width: 150px; }
.lib-upl { cursor: pointer; }
.lib-grid {
  position: relative;
  overflow: auto;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  align-content: start;
  min-height: 220px;
}
.lib-grid.is-file-drop::after {
  content: "Зона Drag & Drop";
  position: absolute;
  inset: 10px;
  z-index: 4;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  border-radius: var(--radius);
  border: 2px dashed var(--ink);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.02em;
  pointer-events: none;
}
html[data-theme="dark"] .lib-grid.is-file-drop::after {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}
.lib-grid--folders { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.lib-folder {
  position: relative;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 8px;
  font-family: inherit;
  transition: border-color .15s var(--ease);
}
.lib-folder--del { padding-right: 40px; }
.lib-folder:hover { border-color: var(--line-strong); background: var(--surface); }
.lib-folder:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lib-folder__del {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  pointer-events: auto;
  color: var(--ink-soft);
}
.lib-folder__del:hover,
.lib-folder__del:focus-visible {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--surface);
}
.lib-folder__kind { font-size: 12px; font-weight: 500; color: var(--muted); }
.lib-folder__name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 17px;
  line-height: 1.15;
  color: var(--ink);
}
.lib-folder__count { font-size: 12.5px; color: var(--muted); }
.lib-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex; flex-direction: column; gap: 6px;
  padding-bottom: 10px;
  cursor: pointer; text-align: left;
  font-family: inherit;
  overflow: hidden;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.lib-item:hover { border-color: var(--line-strong); }
.lib-item.is-sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.lib-item img {
  display: block; width: 100%; height: 100px; object-fit: cover;
  background: var(--alpha-preview);
}
.lib-item__video {
  width: 100%; height: 100px;
  background: var(--ink); color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.lib-item__name {
  font-size: 12.5px; line-height: 1.35; font-weight: 500;
  padding: 0 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lib-item__meta { font-size: 11.5px; color: var(--muted); padding: 0 10px; }
.lib-item__check {
  position: absolute; top: 8px; left: 8px;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--accent); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1;
  box-shadow: var(--shadow);
}
.lib-empty {
  grid-column: 1 / -1;
  padding: 48px 0;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
}
.lib-selbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px; font-weight: 500;
}
.lib-selbar__right { display: inline-flex; gap: 6px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.lib-move-pop {
  position: fixed; inset: 0; z-index: 120;
  background: var(--overlay);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: cmsFade .2s var(--ease);
}
.lib-move-pop[hidden] { display: none; }
.lib-move-pop__panel {
  width: min(420px, 100%);
  max-height: min(72vh, 560px);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: cmsIn .24s var(--ease) both;
}
.lib-move-pop__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.lib-move-pop__title { font-size: 15px; font-weight: 650; }
.lib-move-pop__nav {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.lib-move-pop__list {
  overflow: auto;
  padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
  min-height: 160px;
}
.lib-move-pop__item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  font-family: inherit;
  font-size: 14px; font-weight: 500;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.lib-move-pop__item:hover {
  background: var(--surface);
  border-color: var(--line);
}
.lib-move-pop__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-move-pop__meta { flex: 0 0 auto; font-size: 12.5px; color: var(--muted); }
.lib-move-pop__empty {
  padding: 28px 12px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}
.lib-move-pop__foot {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.lib-move-pop__foot .btn-primary { width: 100%; }
.lib-move-pop__foot .btn-primary:disabled {
  opacity: .55;
  cursor: default;
}

/* ---- video crop dialog ---- */
.lib-crop-pop {
  position: fixed; inset: 0; z-index: 130;
  background: var(--overlay);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: cmsFade .2s var(--ease);
}
.lib-crop-pop[hidden] { display: none; }
.lib-crop-pop__panel {
  width: min(920px, 100%);
  max-height: min(92vh, 860px);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: cmsIn .24s var(--ease) both;
}
.lib-crop-pop__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.lib-crop-pop__title { font-size: 15px; font-weight: 650; }
.lib-crop-pop__stage {
  position: relative;
  margin: 16px;
  background: #0a0a0a;
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
  user-select: none;
  touch-action: none;
}
.lib-crop-pop__video {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(62vh, 560px);
  background: #000;
  pointer-events: none;
}
.lib-crop-pop__video[hidden] { display: none; }
.lib-crop-box {
  position: absolute;
  box-sizing: border-box;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  cursor: move;
}
.lib-crop-box[hidden] { display: none; }
.lib-crop-handle {
  position: absolute;
  width: 12px; height: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 2px;
  z-index: 2;
}
.lib-crop-handle[data-h="nw"] { left: -6px; top: -6px; cursor: nwse-resize; }
.lib-crop-handle[data-h="ne"] { right: -6px; top: -6px; cursor: nesw-resize; }
.lib-crop-handle[data-h="sw"] { left: -6px; bottom: -6px; cursor: nesw-resize; }
.lib-crop-handle[data-h="se"] { right: -6px; bottom: -6px; cursor: nwse-resize; }
.lib-crop-handle--edge {
  width: 14px; height: 14px;
  border-radius: 999px;
}
.lib-crop-handle[data-h="n"] { left: 50%; top: -7px; margin-left: -7px; cursor: ns-resize; }
.lib-crop-handle[data-h="s"] { left: 50%; bottom: -7px; margin-left: -7px; cursor: ns-resize; }
.lib-crop-handle[data-h="e"] { right: -7px; top: 50%; margin-top: -7px; cursor: ew-resize; }
.lib-crop-handle[data-h="w"] { left: -7px; top: 50%; margin-top: -7px; cursor: ew-resize; }
.lib-crop-pop__hint {
  margin: 0 16px 12px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}
.lib-crop-pop__foot {
  display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  flex: 0 0 auto;
}

[data-sortable] {
  touch-action: pan-y;
}
body.is-dragging,
body.is-dragging [data-sortable] {
  touch-action: none;
}
[data-sortable] [data-id] { cursor: grab; }
[data-sortable] [data-id]:active { cursor: grabbing; }
.drag-ghost {
  position: fixed; z-index: 300; margin: 0; pointer-events: none;
  box-shadow: var(--shadow-lg);
  transform: rotate(1.2deg) scale(1.02); opacity: .97;
  background: var(--surface);
  border-radius: var(--radius-lg);
  transition: none; animation: none;
}
.drag-src { opacity: .3; outline: 2px dashed var(--faint); outline-offset: 2px; border-radius: var(--radius); }
body.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
body.is-dragging * { cursor: grabbing !important; }

/* ================= path-pick ================= */
.path-pick { position: relative; display: flex; flex-direction: column; gap: 6px; }
.path-pick__btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 80px; padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  font-family: inherit;
  font-size: 13px; font-weight: 500;
  color: var(--muted); cursor: pointer;
}
.path-pick__btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.path-pick__btn.has-img { padding: 0; border-style: solid; min-height: 96px; overflow: hidden; }
.path-pick__btn.has-img img { display: block; width: 100%; height: 96px; object-fit: cover; }
.path-pick__btn--lg {
  min-height: 0;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 280px;
}
.path-pick__btn--lg.has-img {
  min-height: 0;
}
.path-pick__btn--lg.has-img img {
  height: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.path-pick__clear {
  top: 8px;
  right: 8px;
  z-index: 3;
  opacity: 0;
  /* Кнопка внутри превью: иначе при выезде за край hover срывается и ✕ не кликается. */
  pointer-events: none;
}
.path-pick.has-img .path-pick__clear {
  pointer-events: auto;
}
.path-pick.has-img:hover .path-pick__clear,
.path-pick.has-img:focus-within .path-pick__clear,
.path-pick.has-img .path-pick__clear:focus {
  opacity: 1;
}
.path-pick__meta { font-size: 12px; color: var(--muted); word-break: break-all; }
.banner-row-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ================= banner constructor ================= */
.ctor-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: var(--overlay);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: cmsFade .2s var(--ease);
}
.ctor-overlay[hidden] { display: none !important; }
.ctor-panel {
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: cmsIn .28s var(--ease) both;
}
.ctor-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1;
}
.ctor-head .sect-title { margin: 0; }
.ctor-body { padding: 18px 20px 8px; }
.ctor-label {
  font-size: 13px; font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.ctor-label--spaced { margin-top: 22px; }
.ctor-build { display: grid; grid-template-columns: 160px 1fr; gap: 14px; align-items: start; }
.ctor-corners { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ctor-corner {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 88px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface);
}
.ctor-corner__lab { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.ctor-corner__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ctor-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 5px 10px;
  font-size: 12.5px; font-weight: 500;
}
.ctor-chip button {
  border: 0; background: transparent; cursor: pointer; padding: 0;
  font-size: 12px; line-height: 1; color: var(--muted);
}
.ctor-chip button:hover { color: var(--accent); }
.ctor-corner__add { width: 100%; padding: 7px 8px; font-size: 13px; }
.ctor-preview {
  position: relative; width: 100%; aspect-ratio: 21 / 9;
  background: var(--ink); overflow: hidden; margin-bottom: 8px;
  border-radius: var(--radius);
}
.ctor-preview__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ctor-preview__corner {
  position: absolute; z-index: 2; max-width: 42%;
  display: flex; flex-direction: column; gap: 8px; color: #fff;
  padding: clamp(14px, 2.2vw, 28px);
}
.ctor-preview__corner--tl { top: 0; left: 0; align-items: flex-start; text-align: left; }
.ctor-preview__corner--tr { top: 0; right: 0; align-items: flex-end; text-align: right; }
.ctor-preview__corner--bl { bottom: 0; left: 0; align-items: flex-start; text-align: left; }
.ctor-preview__corner--br { bottom: 0; right: 0; align-items: flex-end; text-align: right; }
.ctor-pv-status { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.ctor-pv-title {
  font-family: var(--font-preview);
  font-weight: 500;
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.02;
}
.ctor-pv-year, .ctor-pv-genre, .ctor-pv-format {
  font-size: 12px; font-weight: 500; opacity: .8;
}
.ctor-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  position: sticky; bottom: 0;
}

/* ================= responsive / mobile ================= */
@media (max-width: 1200px) {
  .ed-layout { grid-template-columns: minmax(0,1fr) 280px; }
  .ed-layout--2 { grid-template-columns: minmax(0,1fr); }
  .ed-toc-col { display: none; }
  .film-ed__archive-bar:not(.film-ed__archive-bar--toc) {
    display: flex;
    margin: -8px 0 4px;
  }
}

@media (max-width: 1080px) {
  .main { padding: 28px 24px 90px; }
  .dash-grid, .ed-grid, .ed-layout { grid-template-columns: 1fr; }
  .ed-side { position: static; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .g2 { grid-template-columns: 1fr; }
  .g3 { grid-template-columns: 1fr; }
  .rolecards { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .vitrina-stats { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .topbar { display: flex; }
  .side {
    position: fixed;
    left: 0; top: 0;
    transform: translateX(-105%);
    transition: transform .28s var(--ease);
    box-shadow: var(--shadow-lg);
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
  }
  body.nav-open .side { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .side__brand { padding: 20px 16px 14px; gap: 10px; }
  .side__foot { gap: 18px; padding: 12px 16px max(16px, env(safe-area-inset-bottom, 0px)); }
  .side__acc-cfg {
    width: 44px;
    height: 44px;
  }
  .main { padding: 20px 16px 80px; }
  .headrow { flex-direction: column; align-items: stretch; gap: 14px; }
  .headrow__side { justify-content: flex-start; flex-wrap: wrap; }
  .frow-head, .prow-head, .orow-head { display: none; }
  .frow, .prow, .orow {
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 14px;
  }
  .frow > :nth-child(n+3),
  .prow > :nth-child(n+3),
  .orow > :nth-child(n+3) {
    grid-column: 2;
  }
  .prow {
    grid-template-columns: 18px 48px 1fr;
  }
  .prow > :nth-child(n+3) {
    grid-column: 3;
  }
  .srow-head { display: none; }
  .srow {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
  }
  .srow__date, .srow__lang { grid-column: 1; }
  .frow__acts, .prow .frow__acts, .orow .frow__acts, .srow .frow__acts {
    justify-content: flex-start;
    margin-top: 4px;
  }
  .urow {
    grid-template-columns: 44px 1fr;
    gap: 12px;
  }
  .urow > :nth-child(n+3) { grid-column: 2; }
  .urow-edit__fields { grid-template-columns: 1fr; }
  .urow-acts {
    grid-template-columns: 1fr;
    padding: 12px 16px 16px;
  }
  .urow-acts__gap { display: none; }
  .urow-pw {
    grid-template-columns: 1fr;
    flex: 1 1 100%;
  }
  .tiles { grid-template-columns: 1fr 1fr; }
  .feed-row {
    grid-template-columns: 28px 1fr auto;
  }
  .feed-row__top {
    grid-template-columns: 1fr;
  }
  .row-3, .row-press {
    grid-template-columns: 28px 1fr 34px;
  }
  .row-press > .inp { grid-column: 2; }
  .row-press > .inp + .inp { grid-column: 2; }
  .row-press > .award-grip { grid-row: 1 / span 2; align-self: start; margin-top: 10px; }
  .row-press > .js-del { grid-row: 1 / span 2; align-self: start; }
  .row-3--link > .sel,
  .row-3--link > .vocab-dd,
  .row-3--link > .inp { grid-column: 2; }
  .row-3--link > .award-grip { grid-row: 1 / span 2; align-self: start; margin-top: 10px; }
  .row-3--link > .js-del { grid-row: 1 / span 2; align-self: start; }
  .footer-row {
    grid-template-columns: 28px 1fr 34px;
  }
  .footer-row .award-grip { grid-row: 1 / span 3; }
  .footer-row .js-del { grid-row: 1 / span 3; align-self: start; }
  .footer-row .check-inline { grid-column: 2; }
  .tap-link-rows--studio .footer-row {
    grid-template-columns: 28px 40px 1fr 34px;
  }
  .tap-link-rows--studio .footer-row .tap-studio-icon-wrap {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
  .tap-link-rows--studio .footer-row .tap-link-label,
  .tap-link-rows--studio .footer-row .tap-link-href { grid-column: 3; }
  .tap-link-rows--studio .footer-row .js-del { grid-column: 4; }
  .team-row {
    grid-template-columns: 28px 56px 1fr 34px;
  }
  .team-row .award-grip { grid-row: 1 / span 3; align-self: start; margin-top: 10px; }
  .team-row .js-del { grid-row: 1 / span 3; align-self: start; }
  .team-row__names,
  .team-row__roles { grid-column: 3; }
  .team-row--add > .js-add { grid-column: 4; }
  .credit-group {
    grid-template-columns: minmax(0, 1fr);
  }
  .credit-role { margin-bottom: 8px; }
  .row-3.credit-row {
    grid-template-columns: 28px 1fr 40px 40px;
  }
  .row-3.credit-row > .credit-grip { grid-column: 1; grid-row: 1; }
  .row-3.credit-row > .inp { grid-column: 2; }
  .row-3.credit-row > .js-credit-add-name { grid-column: 3; grid-row: 1; }
  .row-3.credit-row > .js-del { grid-column: 4; grid-row: 1; }
  .lib-overlay, .ctor-overlay { padding: 12px; align-items: flex-end; }
  .lib-panel, .ctor-panel {
    width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .lib-panel--page {
    max-height: none;
    min-height: 60vh;
    border-radius: var(--radius-lg);
  }
  .ctor-build { grid-template-columns: 1fr; }
  .ctor-corners { grid-template-columns: 1fr; }
  .save-bar {
    background: linear-gradient(transparent, var(--bg) 28%);
    padding-bottom: 12px;
  }
  .btn-primary, .btn-outline, .btn-dashed, .tab {
    min-height: 40px;
  }
  .btn-sq { width: 40px; height: 40px; }
}

.ed-lang--toc {
  position: static;
  margin: 0 0 8px;
  padding: 0 0 8px;
  background: none;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.seg--toc { width: 100%; }
.seg--toc .tab { flex: 1; justify-content: center; }
.ed-lang__copy {
  margin: 0;
  width: 100%;
}
.ed-lang__copy .btn-outline {
  width: 100%;
  justify-content: center;
  padding: 8px 10px;
  font-size: 12.5px;
}

/* когда TOC скрыт — показать язык над контентом */
.ed-lang--bar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: none;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  padding: 12px 0;
  background: linear-gradient(var(--bg) 60%, transparent);
}
.ed-lang--bar .seg { background: var(--surface); box-shadow: var(--shadow); }
.ed-lang .tab {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.film-ed[data-film-lang="ru"] .lang-en { display: none !important; }
.film-ed[data-film-lang="en"] .lang-ru { display: none !important; }
.film-ed[data-film-lang="en"] .row-3.credit-row {
  grid-template-columns: 28px minmax(0, 1fr);
}
.product-ed[data-product-lang="ru"] .lang-en { display: none !important; }
.product-ed[data-product-lang="en"] .lang-ru { display: none !important; }
.settings-ed[data-settings-lang="ru"] .lang-en { display: none !important; }
.settings-ed[data-settings-lang="en"] .lang-ru { display: none !important; }
.vitrina-ed[data-vitrina-lang="ru"] .lang-en { display: none !important; }
.vitrina-ed[data-vitrina-lang="en"] .lang-ru { display: none !important; }

.taplink-ed[data-taplink-lang="ru"] .lang-en { display: none !important; }
.taplink-ed[data-taplink-lang="en"] .lang-ru { display: none !important; }
.tap-link-label { display: grid; gap: 0; min-width: 0; }
.kicker a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
.kicker a:hover { opacity: 0.7; }

.settings-ed .headrow__side .ed-lang { display: flex; }
.settings-ed .headrow__side .ed-lang .seg {
  background: var(--surface);
  box-shadow: var(--shadow);
}
.settings-ed .headrow__side .ed-lang .tab,
.settings-ed .ed-lang--toc .tab {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.settings-ed .headrow__side .ed-lang .tab.is-act,
.settings-ed .ed-lang--toc .tab.is-act {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--elev);
}
.vitrina-ed .ed-lang--toc .tab {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.vitrina-ed .ed-lang--toc .tab.is-act {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--elev);
}
.product-ed .ed-lang--bar-always { display: flex; }
.product-ed .headrow__side .ed-lang { display: flex; }
.product-ed .headrow__side .ed-lang .seg {
  background: var(--surface-2);
  box-shadow: none;
}
.product-ed .headrow__side .ed-lang .tab {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.product-ed .headrow__side .ed-lang .tab.is-act {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--elev);
}
.product-ed .product-ed__archive-bar,
.product-ed__archive-bar {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  padding: 0;
}
.product-ed__archive-bar--below {
  margin: 18px 0 0;
}
.product-ed__archive-actions {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: center;
}
.product-ed__archive-actions form { margin: 0; }
.product-ed__added {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}
.product-ed[data-archived="1"] .page-title--ed { opacity: .55; }
.film-ed[data-film-lang="en"] [data-credit-role-en][readonly],
.film-ed[data-film-lang="en"] .inp--ru-lock:disabled,
.settings-ed[data-settings-lang="en"] .inp--ru-lock:disabled {
  color: var(--ink);
  background: var(--surface-2);
  cursor: default;
}
.film-ed[data-film-lang="en"] .inp--ru-lock:disabled:placeholder-shown,
.settings-ed[data-settings-lang="en"] .inp--ru-lock:disabled:placeholder-shown {
  color: var(--muted);
  font-style: normal;
}
@media (max-width: 1200px) {
  .ed-lang--bar { display: flex; }
}
@media (max-width: 860px) {
  .ed-lang--bar { top: var(--topbar-h); }
}

.vocab-row { display: flex; gap: 8px; align-items: stretch; }
.vocab-row .sel { flex: 1; min-width: 0; }
.vocab-row .btn-outline { flex: 0 0 auto; }
.vocab-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.multi-pick {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.multi-pick__item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: 13.5px; font-weight: 500;
  user-select: none;
  transition: border-color .15s var(--ease), background .15s var(--ease), color .15s var(--ease);
}
.multi-pick__item:hover { border-color: var(--faint); }
.multi-pick__item:has(input:checked) {
  border-color: var(--ink);
  background: var(--accent-soft);
  color: var(--ink);
}
.multi-pick__item:has(input:disabled) { opacity: .7; cursor: default; }
.multi-pick__item input { margin: 0; accent-color: var(--accent); }
.multi-pick__add {
  display: inline-flex; align-items: center;
  padding: 8px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-60);
  cursor: pointer;
  font: inherit;
  font-size: 13.5px; font-weight: 500;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.multi-pick__add:hover { border-color: var(--faint); color: var(--ink); }

.pick-stack { display: flex; flex-direction: column; gap: 8px; }
.pick-stack__chosen { display: flex; flex-direction: column; gap: 6px; }
.pick-stack__chosen:empty { display: none; }
.pick-stack__row {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 8px;
  align-items: center;
}
.pick-stack__row > input[type="hidden"] { display: none !important; }
.pick-stack__label {
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}
.pick-stack__row .btn-sq { flex: 0 0 auto; }

.field-title { min-width: 0; }
.field-year { width: 120px; flex: 0 0 120px; }
.runtime-fields {
  display: flex;
  align-items: center;
  gap: 8px;
}
.runtime-fields__num {
  width: 72px;
  flex: 0 0 72px;
  text-align: center;
  -moz-appearance: textfield;
}
.runtime-fields__num::-webkit-outer-spin-button,
.runtime-fields__num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.runtime-fields__unit {
  color: var(--ink-60);
  font-size: 13.5px;
  font-weight: 500;
  min-width: 1em;
}
.title-year-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.title-year-row .field-title { flex: 1; min-width: 0; }
@media (min-width: 721px) {
  .sect#sec-main .g2 {
    grid-template-columns: 1fr 1fr;
  }
}

.media-hero {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 260px);
  gap: 20px;
  align-items: stretch;
}
.media-hero__left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.media-hero__block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.media-hero__block > .lbl,
.media-hero__poster > .lbl {
  margin: 0;
  min-height: 1.25em;
  line-height: 1.25;
}
.media-hero__left .media-slot { margin-bottom: 0; }
.media-hero__left .media-cover,
.media-hero__left .media-cover-empty {
  height: 110px;
  margin-bottom: 0;
}
.media-hero__poster {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
}
.media-hero__poster-lang {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.media-hero__poster .media-slot {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0;
}
.media-hero__poster .media-slot__filled {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
/* постер на всю высоту: обложка + видео + трейлер */
.media-hero__poster .media-poster,
.media-hero__poster .media-poster-empty {
  width: 100%;
  flex: 1;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: top;
  margin-bottom: 0;
}
.media-stills { margin-top: 20px; }

.txt.js-autosize { overflow: hidden; min-height: 2.8em; }

@media (max-width: 860px) {
  .media-hero { grid-template-columns: 1fr; }
  .media-hero__poster .media-poster,
  .media-hero__poster .media-poster-empty {
    max-width: 260px;
    min-height: 360px;
    aspect-ratio: 2 / 3;
    flex: none;
  }
  .row-award { grid-template-columns: 28px 1fr 34px; }
  .row-award > .award-media,
  .row-award > .award-copy { grid-column: 2; }
  .row-award > .btn-sq { grid-column: 3; grid-row: 1; }
  .award-img-preview { width: 100%; max-width: 160px; }
  .sect#sec-main .g2 { grid-template-columns: 1fr; }
  .title-year-row { flex-direction: column; }
  .field-year { width: 100%; flex: none; }
}

/* ================= Taplink ================= */
.path-pick--avatar {
  position: relative;
  width: fit-content;
}
.path-pick--avatar .path-pick__meta { display: none; }
.path-pick--avatar .path-pick__btn {
  width: 72px;
  height: 72px;
  min-height: 72px;
  padding: 0;
  border-radius: 50%;
  border: 1px dashed var(--line, rgba(14,13,11,.28));
  background: var(--surface-2, #eceae4);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.path-pick--avatar .path-pick__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.path-pick--avatar .path-pick__btn.has-img {
  border-style: solid;
  border-color: rgba(14,13,11,.18);
  background: #ddd;
}
.path-pick--avatar .path-pick__btn.has-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.path-pick--avatar.is-fallback .path-pick__btn.has-img {
  border-style: dashed;
  opacity: 0.92;
}
.path-pick--avatar .path-pick__clear {
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 2;
}
.path-pick--avatar-lg .path-pick__btn {
  width: 88px;
  height: 88px;
  min-height: 88px;
}
.path-pick--avatar-sm {
  width: 62px;
  height: 78px;
}
.path-pick--avatar-sm .path-pick__btn {
  width: 62px;
  height: 78px;
  min-height: 78px;
  border-radius: 11px;
  font-size: 18px;
}
.path-pick--avatar-sm .path-pick__btn.has-img img {
  border-radius: 11px;
}
.path-pick--avatar-sm .path-pick__clear {
  top: -6px;
  right: -8px;
  width: 22px;
  height: 22px;
  font-size: 10px;
}
.tap-studio {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 18px;
  align-items: start;
  margin-bottom: 16px;
}
.tap-studio__fields { display: grid; gap: 10px; }

.tap-preview { display: flex; flex-direction: column; gap: 6px; }
.tap-chip {
  display: grid; grid-template-columns: 140px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 12px; border: 1px solid rgba(14,13,11,.18); background: #faf7f0; font-size: 11.5px;
}
.tap-chip--sm { grid-template-columns: 1fr auto; }
.tap-chip__lbl { font-weight: 600; }
.tap-chip__url { color: rgba(14,13,11,.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.tap-chip__src { font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: rgba(14,13,11,.4); }
.tap-film {
  margin-bottom: 10px;
  border: 1px solid rgba(14,13,11,.22);
  background: #faf7f0;
  padding: 12px 12px 10px;
}
.tap-film__head {
  display: grid;
  grid-template-columns: 24px 62px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}
.tap-film__meta { min-width: 0; }
.tap-film__title { font-family: "Bodoni Moda", serif; font-size: 18px; line-height: 1.15; }
.tap-film__sub { font-size: 10.5px; color: rgba(14,13,11,.5); margin-top: 2px; }
.tap-film__body {
  display: grid;
  gap: 12px;
  padding: 12px 0 4px 96px;
  min-width: 0;
}
.tap-film__links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(14,13,11,.12); }
.tap-film__online-lbl { width: 100%; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: rgba(14,13,11,.45); margin-top: 4px; }
.tap-link-rows .footer-row {
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1.8fr) 34px;
}
.tap-film .tap-link-rows .footer-row {
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1.4fr) 34px;
}
.tap-link-rows--studio .footer-row {
  grid-template-columns: 28px 40px minmax(110px, 1fr) minmax(150px, 1.8fr) 34px;
}
.tap-studio-icon-wrap { position: relative; width: 40px; height: 40px; }
.tap-studio-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #111;
  color: #f2f2f2;
  display: grid;
  place-items: center;
  flex: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.tap-studio-icon[data-studio-icon-static] { pointer-events: none; cursor: default; }
.tap-studio-icon:hover,
.tap-studio-icon:focus-visible {
  outline: 2px solid var(--accent, #c4a574);
  outline-offset: 2px;
}
.tap-studio-icon[data-studio-icon-static]:hover,
.tap-studio-icon[data-studio-icon-static]:focus-visible { outline: none; }
.tap-studio-icon svg { display: block; }
.tap-studio-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.tap-studio-icon-menu {
  position: fixed;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(4, 40px);
  gap: 8px;
  padding: 10px;
  background: var(--surface, #fff);
  color: #f2f2f2;
  border: 1px solid var(--line, rgba(14,13,11,.16));
  border-radius: 16px;
  box-shadow: var(--shadow, 0 12px 32px rgba(0,0,0,.16));
}
.tap-studio-icon-menu[hidden] { display: none; }
.tap-studio-icon--opt.is-act {
  outline: 2px solid var(--accent, #c4a574);
  outline-offset: 2px;
}
.tap-studio-icon-menu__lib {
  grid-column: 1 / -1;
  margin-top: 2px;
  height: 34px;
  border: 1px dashed var(--line, rgba(14,13,11,.28));
  border-radius: 10px;
  background: var(--surface-2, #eceae4);
  color: var(--ink, #0e0d0b);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.tap-studio-icon-menu__lib:hover,
.tap-studio-icon-menu__lib.is-act {
  border-style: solid;
  border-color: var(--accent, #c4a574);
  color: var(--accent, #c4a574);
}
.tap-email-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
}
.tap-studio .path-pick--logo.is-fallback .path-pick__btn.has-img {
  border-style: solid;
  opacity: 1;
  background: #fff;
}
.tap-studio .path-pick--logo .path-pick__btn.has-img {
  background: #fff;
}
.tap-studio .path-pick--logo .path-pick__btn.has-img img {
  object-fit: cover;
}
html[data-theme="dark"] .tap-film,
html[data-theme="dark"] .tap-chip { background: var(--surface-2); border-color: var(--line); }


.tap-link-href { display: grid; gap: 0; min-width: 0; }
.taplink-ed[data-taplink-lang="en"] .inp--ru-lock:disabled {
  opacity: 0.85;
  cursor: not-allowed;
  background: var(--surface-2, #eceae4);
}
@media (max-width: 860px) {
  .tap-film__head {
    grid-template-columns: 24px 48px minmax(0, 1fr) auto;
  }
  .tap-film .path-pick--avatar-sm,
  .tap-film .path-pick--avatar-sm .path-pick__btn {
    width: 48px;
    height: 60px;
    min-height: 60px;
  }
  .tap-film__body {
    padding-left: 0;
  }
  .tap-film .tap-link-rows .footer-row {
    grid-template-columns: 28px minmax(0, 1fr) 34px;
  }
  .tap-film .tap-link-rows .footer-row .tap-link-label,
  .tap-film .tap-link-rows .footer-row .tap-link-href { grid-column: 2; }
  .tap-film .tap-link-rows .footer-row .js-del { grid-column: 3; }
}

/* ================= vocab dropdowns (pencil + drag order) ================= */
.vocab-dd {
  position: relative;
  width: 100%;
  min-width: 0;
}
.vocab-dd__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0 !important;
  pointer-events: none;
  min-height: 0 !important;
}
button.vocab-dd__btn {
  font: inherit;
  color: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}
button.vocab-dd__btn.is-open {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.vocab-dd-pop {
  position: fixed;
  z-index: 95;
  max-height: min(360px, 70vh);
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  box-sizing: border-box;
}
.vocab-dd-pop[hidden] { display: none; }
.vocab-dd-pop__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vocab-dd-pop__row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 34px;
  gap: 4px;
  align-items: center;
}
.vocab-dd-pop__grip {
  justify-self: center;
  color: var(--ink-60);
}
.vocab-dd-pop__pick {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.vocab-dd-pop__pick:hover:not(:disabled) {
  background: var(--surface);
}
.vocab-dd-pop__pick.is-act {
  background: var(--accent-soft);
}
.vocab-dd-pop__pick:disabled {
  opacity: .45;
  cursor: default;
}
.vocab-dd-pop__edit {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-60);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.vocab-dd-pop__edit:hover {
  background: var(--surface);
  color: var(--ink);
}
.vocab-dd-pop__add {
  display: block;
  width: 100%;
  min-height: 38px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
}
.vocab-dd-pop__add:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.vocab-edit-pop {
  position: fixed;
  inset: 0;
  z-index: 125;
  background: var(--overlay);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: cmsFade .2s var(--ease);
}
.vocab-edit-pop[hidden] { display: none; }
.vocab-edit-pop__panel {
  width: min(420px, 100%);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: cmsIn .24s var(--ease) both;
}
.vocab-edit-pop__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.vocab-edit-pop__title { font-size: 15px; font-weight: 650; }
.vocab-edit-pop__body { padding: 16px; }
.vocab-edit-pop__foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}
.vocab-edit-pop__foot .btn-primary,
.vocab-edit-pop__foot .btn-outline { min-width: 120px; }
#vocabEditId[readonly] {
  color: var(--ink-60);
  background: var(--surface-2, #eceae4);
}
@media (max-width: 720px) {
  .vocab-edit-pop { padding: 12px; align-items: flex-end; }
  .vocab-edit-pop__panel {
    width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}
