/* =========================================================
   NOIR — аккаунты, профиль, поддержка и админ-панель
   Без backdrop-filter и бесконечных анимаций больших слоёв.
   ========================================================= */

/* ---------- Общие мелочи ---------- */
.btn-danger { color: #fff; background: linear-gradient(135deg, #ff6b57, #d93a2b); box-shadow: 0 14px 30px -14px rgba(217, 58, 43, .8), inset 0 1px 0 rgba(255, 255, 255, .25); padding: 0 20px; }
.btn.sm.btn-danger, .btn.sm.btn-ghost { padding: 0 16px; }
.btn-ghost svg { width: 17px; height: 17px; }
.btn.btn-ghost { gap: 8px; }
.btn.danger { color: var(--bad); }
.btn.warn { color: var(--mid); }
.btn.busy { pointer-events: none; opacity: .7; }
.btn.busy .ic-circle svg { animation: spin .8s linear infinite; }
.btn:disabled { opacity: .55; pointer-events: none; }
.icon-btn.danger:hover { color: var(--bad); }
.link-btn { font-size: 13px; font-weight: 700; color: var(--accent); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px rgb(255 122 69 / .2); flex: none; }
.muted { color: var(--muted); }

.role-badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border-radius: 99px; font-size: 11.5px; font-weight: 800; letter-spacing: .02em; color: var(--rc); background: color-mix(in srgb, var(--rc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--rc) 32%, transparent); white-space: nowrap; }
.role-badge svg { width: 13px; height: 13px; }
.role-badge.sm { height: 20px; font-size: 10.5px; padding: 0 7px 0 5px; }
.role-badge.sm svg { width: 11px; height: 11px; }

.seg a.seg-a { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: color .4s var(--ease-out); }
.seg a.seg-a svg { width: 16px; height: 16px; }
.seg a.seg-a:hover { color: var(--text); }
.seg a.seg-a.on { color: var(--accent-ink); }
.seg a.seg-a .dot { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; }
.seg button em { margin-left: 6px; font-style: normal; font-size: 11px; opacity: .7; }
.seg button:disabled { opacity: .35; pointer-events: none; }

.gate { text-align: center; display: grid; justify-items: center; min-height: 70vh; align-content: center; }
.gate .lead { margin-inline: auto; }
.gate .btn { margin-top: 28px; }

/* ---------- Аккаунт в шапке ---------- */
.acct { display: flex; align-items: center; gap: 6px; }
.acct-login { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 12px; border-radius: 99px; font-size: 14px; font-weight: 700; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 65%, var(--accent-2))); box-shadow: 0 10px 24px -12px rgb(var(--tint) / .8), inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform .5s var(--ease-spring), box-shadow .3s; }
.acct-login svg { width: 18px; height: 18px; }
.acct-login:active { transform: scale(.95); }
.acct-me { position: relative; width: 42px; height: 42px; border-radius: 50%; padding: 2px; background: var(--surface); box-shadow: 0 0 0 2px var(--rc), var(--hi); transition: transform .5s var(--ease-spring), box-shadow .3s; }
.acct-me img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.acct-me:hover { transform: scale(1.06); }
.acct-me:active { transform: scale(.94); }
.acct-bell { overflow: visible; }
.acct-dot { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: #fff; background: var(--accent-2); box-shadow: 0 0 0 2px var(--elev); transform: scale(0); transition: transform .5s var(--ease-spring); }
.acct-dot.on { transform: scale(1); }
.acct-dot.bump { animation: bump .5s var(--ease-spring); }
@media (max-width: 560px) {
  .acct-login span { display: none; }
  .acct-login { width: 42px; padding: 0; justify-content: center; }
  .island .sound-toggle { display: none; }
}

.acct-panel { position: fixed; z-index: 90; width: min(330px, calc(100vw - 24px)); padding: 8px; border-radius: 24px; background: var(--elev); border: 1px solid var(--line-2); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .7), var(--hi); transform-origin: top right; transform: translateY(-8px) scale(.96); opacity: 0; visibility: hidden; transition: transform .45s var(--ease-spring), opacity .25s, visibility 0s .45s; }
.acct-panel.open { transform: none; opacity: 1; visibility: visible; transition: transform .45s var(--ease-spring), opacity .25s; }
.am-head { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--surface); }
.am-head img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.am-head > span { display: grid; gap: 3px; justify-items: start; min-width: 0; }
.am-head b { font: 600 15px var(--font-display); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.am-head small { font-size: 12.5px; color: var(--muted); }
.acct-menu nav { display: grid; gap: 2px; padding: 8px 0; margin: 6px 0; border-block: 1px solid var(--line); }
.acct-menu nav a, .am-out { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 14px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; width: 100%; }
.acct-menu nav a svg, .am-out svg { width: 18px; height: 18px; }
.acct-menu nav a:hover, .am-out:hover { background: var(--surface-2); color: var(--text); }
.acct-menu nav a em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--faint); }
.acct-menu nav a em svg { width: 15px; }
.acct-menu .am-admin { color: var(--accent); background: rgb(var(--tint) / .08); }
.acct-menu .am-admin:hover { background: rgb(var(--tint) / .16); color: var(--accent); }
.am-out:hover { color: var(--bad); }

.nf-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; }
.nf-head b { font: 600 15px var(--font-display); }
.nf-head button { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.nf-head button:hover { color: var(--bad); }
.nf-list { max-height: min(460px, 70vh); overflow-y: auto; display: grid; gap: 2px; }
.nf-item { display: flex; gap: 12px; padding: 12px 10px; border-radius: 16px; transition: background .2s; }
.nf-item:hover { background: var(--surface-2); }
.nf-item.new { background: rgb(var(--tint) / .07); }
.nf-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); color: var(--accent); }
.nf-item.new .nf-ic { background: var(--accent); color: var(--accent-ink); }
.nf-ic svg { width: 18px; }
.nf-t { display: grid; gap: 3px; min-width: 0; }
.nf-t b { font-size: 13.5px; line-height: 1.35; }
.nf-t small { font-size: 12.5px; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.nf-t time { font-size: 11.5px; color: var(--faint); }
.nf-empty { display: grid; justify-items: center; gap: 8px; padding: 30px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.nf-empty svg { width: 30px; color: var(--faint); }
.nf-empty .spinner { opacity: 1; }
.acct-panel.static { position: relative; transform: none; opacity: 1; visibility: visible; width: 100%; box-shadow: var(--hi); }

/* Пункты аккаунта в мобильном меню */
.menu-overlay a.mm-acct { font-size: clamp(24px, 7vw, 40px); color: var(--muted); }
.menu-overlay a.mm-acct small svg { width: 20px; height: 20px; }

/* ---------- Окно входа ---------- */
.auth { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; visibility: hidden; transition: visibility 0s .5s; }
.auth.open { visibility: visible; transition: none; }
.auth-scrim { position: absolute; inset: 0; background: rgba(4, 4, 6, .8); opacity: 0; transition: opacity .45s var(--ease-out); }
:root[data-theme="light"] .auth-scrim, :root[data-theme="light"] .dlg-scrim { background: rgba(240, 235, 225, .86); }
.auth.open .auth-scrim { opacity: 1; }
.auth-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); width: min(940px, 100%); max-height: calc(100dvh - 32px); overflow: auto; border-radius: 34px; background: var(--elev); border: 1px solid var(--line-2); box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .8), var(--hi); transform: translateY(26px) scale(.96); opacity: 0; transition: transform .7s var(--ease-spring), opacity .35s; }
.auth.open .auth-card { transform: none; opacity: 1; }
.auth-side { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; padding: 34px; color: #f4efe6; background: radial-gradient(120% 90% at 10% 0%, #3a2610 0%, #16110b 45%, #0b0a09 100%); }
.auth-side-glow { position: absolute; width: 420px; height: 420px; right: -160px; bottom: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 181, 74, .35), transparent 65%); pointer-events: none; }
.auth-side-glow::after { content: ''; position: absolute; inset: 70px; border-radius: 50%; border: 1px dashed rgba(245, 181, 74, .35); }
.auth-side-top { display: flex; align-items: center; gap: 10px; font: 600 15px var(--font-display); letter-spacing: .32em; }
.auth-side-top .logo-mark { color: #f4efe6; }
.auth-side h2 { margin: 0 0 24px; font: 500 clamp(28px, 3.4vw, 40px)/1.05 var(--font-display); letter-spacing: -.04em; }
.auth-side h2 em { font-style: normal; color: #f5b54a; }
.auth-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.auth-side li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: rgba(244, 239, 230, .78); }
.auth-side li svg { flex: none; width: 34px; height: 34px; padding: 8px; border-radius: 12px; background: rgba(245, 181, 74, .14); color: #f5b54a; }
.auth-side-foot { position: relative; margin: 0; font-size: 12px; color: rgba(244, 239, 230, .45); }
.auth-main { position: relative; padding: 30px clamp(22px, 4vw, 44px) 34px; display: grid; align-content: start; gap: 22px; }
.auth-x { position: absolute; top: 18px; right: 18px; }
.auth-seg { justify-self: start; }
.auth-form { display: grid; gap: 14px; }
.auth-form h3 { margin: 6px 0 0; font: 500 30px/1.1 var(--font-display); letter-spacing: -.035em; }
.auth-form > p.muted { margin: -6px 0 6px; font-size: 14.5px; }
.auth-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.auth-owner { display: flex; gap: 12px; align-items: flex-start; margin: -4px 0 6px; padding: 14px; border-radius: 16px; background: rgb(var(--tint) / .1); border: 1px solid rgb(var(--tint) / .3); font-size: 13.5px; line-height: 1.5; }
.auth-owner svg { flex: none; width: 22px; color: var(--accent); }
.auth-err { min-height: 0; margin: 0; font-size: 13.5px; font-weight: 600; color: var(--bad); }
.auth-err:empty { display: none; }
.auth-submit { justify-self: stretch; justify-content: space-between; margin-top: 4px; }
.auth-alt { margin: 4px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.auth-alt button { font-weight: 700; color: var(--accent); }
.auth-alt button:disabled { opacity: .4; }
.auth-hint { margin: -4px 0 0; font-size: 12.5px; color: var(--faint); text-align: center; }

/* Поле с плавающей подписью */
.field { position: relative; display: block; }
.field input { width: 100%; height: 58px; padding: 22px 46px 6px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); font-size: 15px; font-weight: 600; outline: none; transition: border-color .3s, box-shadow .4s var(--ease-out), background .3s; }
.field input:focus { border-color: rgb(var(--tint) / .6); box-shadow: 0 0 0 4px rgb(var(--tint) / .12); background: var(--surface-2); }
.field-l { position: absolute; left: 17px; top: 19px; font-size: 15px; color: var(--muted); pointer-events: none; transform-origin: left top; transition: transform .35s var(--ease-out), color .3s; }
.field input:focus + .field-l, .field input:not(:placeholder-shown) + .field-l { transform: translateY(-10px) scale(.76); color: var(--accent); }
.field-h { position: absolute; right: 16px; top: 21px; font-size: 12px; color: var(--faint); pointer-events: none; transition: opacity .3s; }
.field input:focus ~ .field-h, .field input:not(:placeholder-shown) ~ .field-h { opacity: 0; }
.field:has(.f-eye) .field-h { right: 50px; }
.f-eye { position: absolute; right: 10px; top: 13px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--faint); transition: color .2s, background .2s; }
.f-eye svg { width: 18px; }
.f-eye:hover, .f-eye.on { color: var(--accent); background: var(--surface-2); }
.pw-meter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; align-items: center; gap: 6px; margin-top: -4px; }
.pw-meter i { height: 4px; border-radius: 4px; background: var(--surface-2); transition: background .4s; }
.pw-meter span { min-width: 90px; text-align: right; font-size: 12px; font-weight: 700; color: var(--muted); }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--bad); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: var(--mid); }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: var(--good); }
.pw-meter[data-s="4"] i { background: var(--good); }
@media (max-width: 760px) {
  .auth-card { grid-template-columns: minmax(0, 1fr); border-radius: 28px; }
  .auth-side { display: none; }
  .auth-row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Диалоги ---------- */
.dlg { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.dlg-scrim { position: absolute; inset: 0; background: rgba(4, 4, 6, .78); opacity: 0; transition: opacity .35s; }
.dlg.open .dlg-scrim { opacity: 1; }
.dlg-card { position: relative; width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 28px; border-radius: 30px; background: var(--elev); border: 1px solid var(--line-2); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .8), var(--hi); transform: translateY(20px) scale(.95); opacity: 0; transition: transform .55s var(--ease-spring), opacity .25s; }
.dlg-card.wide, .dlg.wide .dlg-card { width: min(640px, 100%); }
.dlg.open .dlg-card { transform: none; opacity: 1; }
.dlg-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 18px; background: rgb(var(--tint) / .14); color: var(--accent); margin-bottom: 16px; }
.dlg-ic svg { width: 24px; }
.dlg-ic.danger { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.dlg-card h3 { margin: 0; font: 500 22px/1.2 var(--font-display); letter-spacing: -.03em; }
.dlg-card > p { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.dlg-form { display: grid; gap: 14px; margin-top: 18px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.dlg-form .dlg-actions { margin-top: 6px; }
.dlg-err { margin: 0; color: var(--bad); font-size: 13px; font-weight: 600; }
.dlg-err:empty { display: none; }
.dlg-f { display: grid; gap: 7px; min-width: 0; }
.dlg-f > span { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .01em; }
.dlg-f input, .dlg-f textarea, .dlg-f select, .a-select, .h-row-fields input, .src-row input, .fe-media-item input {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); font: 600 14.5px var(--font); color: var(--text); outline: none; transition: border-color .3s, box-shadow .3s, background .3s;
}
.dlg-f textarea { resize: vertical; line-height: 1.55; font-weight: 500; }
.dlg-f input[type=color] { padding: 4px; height: 46px; cursor: var(--cur-hover); }
.dlg-f input:focus, .dlg-f textarea:focus, .dlg-f select:focus, .a-select:focus, .h-row-fields input:focus, .src-row input:focus, .fe-media-item input:focus { border-color: rgb(var(--tint) / .6); box-shadow: 0 0 0 4px rgb(var(--tint) / .12); background: var(--surface-2); }
select.a-select, .dlg-f select { appearance: none; padding-right: 38px; cursor: var(--cur-hover); background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.a-select option { background: var(--elev); color: var(--text); }
/* Выбор карточками (type: 'choice' в formBox) */
.dlg-choices { display: grid; gap: 8px; }
.dlg-choice { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface); cursor: var(--cur-hover); transition: border-color .25s, background .25s, transform .4s var(--ease-spring); }
.dlg-choice:hover { background: var(--surface-2); }
.dlg-choice:active { transform: scale(.98); }
.dlg-choice input { position: absolute; opacity: 0; pointer-events: none; }
.dlg-choice-ic { flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); transition: background .25s, color .25s; }
.dlg-choice-ic svg { width: 20px; }
.dlg-choice-t { flex: 1; display: grid; gap: 2px; min-width: 0; }
.dlg-choice-t b { font-size: 15px; color: var(--text); }
.dlg-choice-t small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.dlg-choice-dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); transition: border-color .25s, box-shadow .25s; }
.dlg-choice:has(input:checked) { border-color: rgb(var(--tint) / .6); background: rgb(var(--tint) / .08); }
.dlg-choice:has(input:checked) .dlg-choice-ic { background: var(--accent); color: var(--accent-ink); }
.dlg-choice:has(input:checked) .dlg-choice-dot { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--elev), inset 0 0 0 10px var(--accent); }
.dlg-choice:has(input:focus-visible) { outline: 2px solid rgb(var(--tint) / .6); outline-offset: 2px; }
/* Системные выпадающие списки — в цветах темы (иначе в тёмной теме белый фон и светлый текст) */
select option, select optgroup { background: var(--elev); color: var(--text); }
:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
.dlg-radios { display: grid; gap: 6px; }
.dlg-radio { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); cursor: var(--cur-hover); font-weight: 600; font-size: 14px; transition: border-color .2s, background .2s; }
.dlg-radio input { accent-color: var(--accent); width: 16px; height: 16px; }
.dlg-radio:has(input:checked) { border-color: rgb(var(--tint) / .5); background: rgb(var(--tint) / .07); }
.dlg-sw { margin: 2px 0; }
.dlg-secret { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 10px 10px 16px; border-radius: 16px; background: var(--surface-2); border: 1px dashed rgb(var(--tint) / .5); }
.dlg-secret code { flex: 1; font: 700 20px ui-monospace, Consolas, monospace; letter-spacing: .06em; color: var(--accent); user-select: all; overflow-wrap: anywhere; }

/* ---------- Объявление, техработы ---------- */
.announce { position: fixed; left: max(20px, env(safe-area-inset-left, 0px)); bottom: calc(var(--sab) + 20px); z-index: 70; display: flex; align-items: center; gap: 12px; max-width: min(480px, calc(100vw - 40px)); padding: 12px 12px 12px 14px; border-radius: 22px; background: var(--elev); border: 1px solid var(--line-2); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7), var(--hi); transform: translateY(30px); opacity: 0; transition: transform .7s var(--ease-spring), opacity .4s; }
.announce.in { transform: none; opacity: 1; }
.announce p { margin: 0; flex: 1; font-size: 14px; line-height: 1.45; }
.an-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: rgb(var(--tint) / .15); color: var(--accent); }
.an-ic svg { width: 19px; }
.announce.warn .an-ic { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.announce.promo { border-color: rgb(var(--tint) / .4); }
.an-link { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--accent); }
.an-link svg { width: 15px; }
.an-x { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--faint); }
.an-x:hover { background: var(--surface-2); color: var(--text); }
.an-x svg { width: 15px; }
@media (max-width: 600px) { .announce { left: 12px; right: 12px; bottom: calc(var(--sab) + 84px); max-width: none; flex-wrap: wrap; } }

.maint { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; text-align: center; background: radial-gradient(80% 60% at 50% 0%, rgb(var(--tint) / .14), transparent 70%), var(--bg); }
.maint-core { display: grid; justify-items: center; }
.maint-reel .logo-mark { width: 84px; height: 84px; color: var(--text); }
.maint .display { font-size: clamp(40px, 8vw, 90px); }
.maint .lead { margin-inline: auto; }
.maint .btn { margin-top: 30px; }

/* ---------- Страница фильма ---------- */
.mv-actions .admin-edit { color: var(--accent); }
.draft-note { display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 0; padding: 8px 14px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--mid); background: color-mix(in srgb, var(--mid) 12%, transparent); }
.draft-note svg { width: 16px; }
.voice-pick { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; }
.voice-l { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.voice-l svg { width: 17px; color: var(--accent); }

.avatar.img { object-fit: cover; padding: 0; background: var(--surface-2); }
.c-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-who b { font-size: 15px; }
.c-len { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.c-len.near { color: var(--mid); }
.c-form-bottom .c-len + .btn { margin-left: 0; }
a.c-name { font-weight: 700; font-size: 15px; transition: color .2s; }
a.c-name:hover { color: var(--accent); }
.c-more { margin-left: auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--faint); transition: background .2s, color .2s; }
.c-more:hover { background: var(--surface-2); color: var(--text); }
.c-more svg { width: 18px; }
.c-item.pinned { background: linear-gradient(90deg, rgb(var(--tint) / .06), transparent 60%); border-radius: 18px; padding-inline: 14px; }
.c-item.is-hidden > .c-body > .c-text { opacity: .5; }
.pill-tag.pin-tag { color: var(--accent); border-color: rgb(var(--tint) / .35); }
.pill-tag.warn-tag { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.c-gate .bezel-core { display: flex; align-items: center; gap: 16px; padding: 20px; flex-wrap: wrap; }
.c-gate .bezel-core > div { flex: 1; min-width: 220px; }
.c-gate b { font-size: 15.5px; }
.c-gate p { margin: 4px 0 0; font-size: 14px; }
.c-gate-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: rgb(var(--tint) / .14); color: var(--accent); flex: none; }
.c-gate-ic svg { width: 22px; }
.c-gate.warn .c-gate-ic { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.c-menu { position: fixed; z-index: 80; min-width: 220px; padding: 6px; border-radius: 18px; background: var(--elev); border: 1px solid var(--line-2); box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .7); transform: scale(.95); opacity: 0; transform-origin: top right; transition: transform .35s var(--ease-spring), opacity .2s; }
.c-menu.open { transform: none; opacity: 1; }
.c-menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.c-menu button svg { width: 17px; }
.c-menu button:hover { background: var(--surface-2); color: var(--text); }
.c-menu button.danger:hover { color: var(--bad); }

/* ---------- Профиль ---------- */
.pf-hero { position: relative; padding-top: clamp(120px, 13vw, 160px); }
.pf-cover { position: absolute; inset: 0 0 auto; height: 420px; overflow: hidden; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, transparent 100%); }
.pf-cover img { width: 100%; height: 100%; object-fit: cover; opacity: .28; transform: scale(1.4); }
.pf-head { position: relative; display: flex; align-items: flex-end; gap: clamp(18px, 3vw, 32px); flex-wrap: wrap; }
.pf-ava { position: relative; flex: none; width: clamp(110px, 12vw, 148px); aspect-ratio: 1; border-radius: 50%; padding: 4px; background: var(--bg); box-shadow: 0 0 0 3px var(--rc), 0 30px 60px -20px rgba(0, 0, 0, .7); }
.pf-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.pf-ava-edit { position: absolute; inset: 4px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; opacity: 0; transition: opacity .3s; }
.pf-ava-edit svg { width: 28px; }
.pf-ava:hover .pf-ava-edit { opacity: 1; }
.pf-online { position: absolute; right: 10%; bottom: 10%; width: 18px; height: 18px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px var(--bg); }
.pf-id { flex: 1; min-width: 260px; }
.pf-name { margin: 12px 0 0; font: 500 clamp(34px, 5vw, 64px)/1 var(--font-display); letter-spacing: -.045em; overflow-wrap: anywhere; }
.pf-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 14px 0 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.pf-sub > span { display: inline-flex; align-items: center; gap: 6px; }
.pf-sub > span svg { width: 15px; }
.pf-on { color: var(--good); }
.pf-bio { margin: 12px 0 0; max-width: 620px; color: var(--muted); line-height: 1.6; }
.pf-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-stats { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 34px; }
.pf-stat { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.pf-stat-ic { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; background: rgb(var(--tint) / .12); color: var(--accent); }
.pf-stat-ic svg { width: 19px; }
.pf-stat b { font: 600 22px/1.1 var(--font-display); letter-spacing: -.03em; }
.pf-stat small { font-size: 12.5px; color: var(--muted); }
.pf-tabs { position: sticky; top: calc(var(--sat) + 78px); z-index: 20; margin-top: 30px; }
.pf-seg { max-width: 100%; background: var(--elev); box-shadow: var(--shadow-soft); }
.pf-body { margin-top: 28px; min-height: 40vh; }
.pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pf-card { padding: 22px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); min-width: 0; display: grid; align-content: start; gap: 14px; }
.pf-card.wide { grid-column: span 2; }
.pf-card.danger { border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.pf-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pf-card-h.big { margin: 40px 0 20px; }
.pf-card-h h2 { display: flex; align-items: center; gap: 8px; margin: 0; font: 500 19px var(--font-display); letter-spacing: -.02em; }
.pf-card-h.big h2 { font-size: 26px; }
.pf-card-h h2 svg { width: 19px; color: var(--accent); }
.pf-card-h a { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--accent); }
.pf-card-h a svg { width: 15px; }
.pf-none { margin: 0; font-size: 14px; }
.pf-alert { display: flex; gap: 8px; align-items: center; margin: 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--mid) 12%, transparent); color: var(--mid); font-size: 13.5px; font-weight: 600; }
.pf-alert svg { width: 17px; flex: none; }
.pf-continue { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pf-cont { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--surface-2); }
.pf-cont img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.pf-cont:hover img { transform: scale(1.05); }
.pf-cont::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .85), transparent 65%); }
.pf-cont-t { position: absolute; z-index: 1; left: 14px; right: 50px; bottom: 12px; display: grid; color: #fff; }
.pf-cont-t b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-cont-t small { font-size: 12px; opacity: .7; }
.pf-cont-play { position: absolute; z-index: 1; right: 12px; bottom: 12px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #1c1306; }
.pf-cont-play svg { width: 15px; }
.pf-rlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pf-rlist a { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 14px; transition: background .2s; }
.pf-rlist a:hover { background: var(--surface-2); }
.pf-rlist img, .pf-noimg { flex: none; width: 34px; height: 50px; border-radius: 8px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--faint); }
.pf-noimg svg { width: 18px; }
.pf-rlist span { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-rlist b, .pf-score { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font: 600 14px var(--font-display); }
.sc-hi { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.sc-mid { background: color-mix(in srgb, var(--mid) 18%, transparent); color: var(--mid); }
.sc-lo { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.pf-dl { margin: 0; display: grid; gap: 10px; }
.pf-dl > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.pf-dl > div:last-child { border: 0; padding: 0; }
.pf-dl dt { color: var(--muted); }
.pf-dl dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.pf-card .btn { justify-self: start; }
.pf-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pf-rows a { display: flex; align-items: center; gap: 14px; padding: 8px 12px 8px 8px; border-radius: 16px; transition: background .2s; }
.pf-rows a:hover { background: var(--surface); }
.pf-rows img { flex: none; width: 40px; height: 58px; border-radius: 9px; object-fit: cover; }
.pf-rows .pf-noimg { width: 40px; height: 58px; }
.pf-row-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.pf-row-t b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-row-t small { font-size: 12.5px; color: var(--muted); }
.pf-go { color: var(--faint); }
.pf-go svg { width: 18px; }
.pf-stars { display: flex; gap: 3px; }
.pf-stars i { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-2); }
.pf-stars i.on { background: var(--accent); }
.pf-rate-sum { display: flex; align-items: flex-end; gap: 30px; margin-bottom: 24px; padding: 22px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.pf-avg { display: flex; align-items: center; gap: 14px; }
.pf-avg b { font: 500 56px/1 var(--font-display); letter-spacing: -.05em; color: var(--accent); }
.pf-avg small { font-size: 13px; color: var(--muted); }
.pf-dist { flex: 1; min-width: 260px; height: 90px; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; align-items: end; }
.pf-bar { height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 6px; text-align: center; }
.pf-bar i { align-self: end; height: max(4px, var(--h)); border-radius: 6px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 50%, transparent)); }
.pf-bar span { font-size: 11px; color: var(--faint); }
.pf-comments { display: grid; gap: 10px; }
.pf-com { display: grid; gap: 8px; padding: 16px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s; }
.pf-com:hover { border-color: rgb(var(--tint) / .35); }
.pf-com.is-hidden { opacity: .6; }
.pf-com-film { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.pf-com-film svg { width: 15px; color: var(--accent); }
.pf-com-film b { color: var(--text); }
.pf-com-film time { margin-left: auto; font-size: 12px; color: var(--faint); }
.pf-com p { margin: 0; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.pf-com-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--faint); }
.pf-com-meta svg { width: 14px; }
.pf-com-meta span { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.pf-com-meta em { margin-left: 8px; font-style: normal; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); }
.pf-com-meta em.warn { color: var(--bad); }
.pf-sessions, .pf-logins { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pf-sessions li { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: var(--surface-2); }
.pf-sessions li > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pf-sessions b { font-size: 14px; }
.pf-sessions small { font-size: 12px; color: var(--muted); }
.pf-sessions em { font-style: normal; color: var(--good); font-weight: 700; }
.pf-dev { font-size: 22px; width: 40px; text-align: center; }
.pf-logins li { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pf-logins time { color: var(--faint); font-size: 12.5px; white-space: nowrap; }
.st-form { max-width: 720px; }
.st-ava { display: flex; align-items: center; gap: 18px; }
.st-ava img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.st-ava > div { display: grid; gap: 4px; }
.st-ava-btns { display: flex; gap: 8px; margin-top: 6px; }
.st-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1000px) { .pf-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pf-card.wide { grid-column: 1 / -1; } }
@media (max-width: 680px) {
  .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .pf-tabs { top: 70px; }
  .pf-seg a.seg-a span { display: none; }
  .pf-seg a.seg-a { padding: 0 14px; }
  .pf-seg a.seg-a.on span { display: inline; }
  .pf-stars { display: none; }
}

/* ---------- Поддержка (зритель) ---------- */
.sp { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.sp-list { display: grid; gap: 6px; position: sticky; top: calc(var(--sat) + 150px); }
.sp-new { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; border-radius: 16px; font-weight: 700; color: var(--accent); border: 1px dashed rgb(var(--tint) / .45); transition: background .2s; }
.sp-new svg { width: 18px; }
.sp-new:hover, .sp-new.on { background: rgb(var(--tint) / .08); }
.sp-item { display: grid; gap: 8px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.sp-item:hover { border-color: var(--line-2); }
.sp-item.on { border-color: rgb(var(--tint) / .5); background: rgb(var(--tint) / .06); }
.sp-item-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.sp-item-top b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-item-bot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-item-bot small { font-size: 12px; color: var(--faint); }
.sp-main { min-width: 0; padding: 26px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); min-height: 420px; }
.sp-pick { height: 100%; min-height: 360px; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; color: var(--muted); }
.sp-pick svg { width: 40px; color: var(--faint); }
.sp-pick p { margin: 0; }
.sp-form { display: grid; gap: 16px; max-width: 680px; }
.sp-hero { display: flex; gap: 16px; align-items: center; }
.sp-hero h2 { margin: 0; font: 500 26px var(--font-display); letter-spacing: -.03em; }
.sp-hero p { margin: 4px 0 0; }
.sp-hero-ic { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 20px; background: rgb(var(--tint) / .14); color: var(--accent); }
.sp-hero-ic svg { width: 28px; }
.sp-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-flex; align-items: center; height: 38px; padding: 0 15px; border-radius: 99px; font-size: 13.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); background: var(--surface); cursor: var(--cur-hover); transition: all .25s; }
.chip-radio input:checked + span { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.chip-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sp-form .btn { justify-self: start; }
.t-status { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .02em; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.t-status.s-open { background: color-mix(in srgb, var(--accent-2) 16%, transparent); color: var(--accent-2); }
.t-status.s-progress { background: color-mix(in srgb, #60a5fa 16%, transparent); color: #60a5fa; }
.t-status.s-waiting { background: color-mix(in srgb, var(--mid) 16%, transparent); color: var(--mid); }
.t-status.s-closed { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.tk { display: grid; gap: 18px; }
.tk-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.tk-id { font-size: 12px; font-weight: 700; color: var(--faint); letter-spacing: .04em; }
.tk-head h2 { margin: 4px 0 0; font: 500 22px/1.2 var(--font-display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.tk-head-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tk-msgs { display: grid; gap: 14px; max-height: 56vh; overflow-y: auto; padding-right: 6px; }
.tk-msg { display: flex; gap: 10px; align-items: flex-end; max-width: 86%; }
.tk-msg > img { flex: none; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.tk-msg.me { margin-left: auto; flex-direction: row-reverse; }
.tk-bubble { padding: 12px 16px; border-radius: 20px 20px 20px 6px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.tk-msg.me .tk-bubble { border-radius: 20px 20px 6px 20px; background: rgb(var(--tint) / .12); border-color: rgb(var(--tint) / .25); }
.tk-msg.internal .tk-bubble { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--mid) 10%, transparent) 0 10px, transparent 10px 20px); border: 1px dashed color-mix(in srgb, var(--mid) 45%, transparent); }
.tk-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.tk-who em { font-style: normal; font-weight: 700; color: var(--accent); }
.tk-msg.internal .tk-who em { color: var(--mid); }
.tk-who time { color: var(--faint); }
.tk-bubble p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.tk-reply { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.tk-reply textarea { width: 100%; min-height: 70px; resize: vertical; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg); outline: none; line-height: 1.55; }
.tk-reply textarea:focus { border-color: rgb(var(--tint) / .55); box-shadow: 0 0 0 4px rgb(var(--tint) / .12); }
.tk-reply .btn { justify-self: end; }
.tk-reply-opts { display: flex; gap: 18px; flex-wrap: wrap; }
.tk-rate { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: rgb(var(--tint) / .07); font-size: 14px; font-weight: 600; }
.tk-stars { display: flex; gap: 4px; }
.tk-stars button { width: 32px; height: 32px; display: grid; place-items: center; color: var(--faint); transition: transform .4s var(--ease-spring), color .2s; }
.tk-stars button svg { width: 22px; }
.tk-stars button:hover, .tk-stars button.on { color: var(--accent); transform: scale(1.12); }
.tk-stars button.on svg { fill: currentColor; }
@media (max-width: 860px) { .sp { grid-template-columns: minmax(0, 1fr); } .sp-list { position: static; } .sp-main { padding: 18px; } .tk-msg { max-width: 100%; } }

/* =========================================================
   Админ-панель
   ========================================================= */
body[data-page="admin"] .footer { display: none; }
.adm { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(18px, 2.4vw, 34px); max-width: 1560px; margin: 0 auto; padding: 108px var(--pad-r) 60px var(--pad-l); min-height: 100vh; }
.adm-side { position: sticky; top: calc(var(--sat) + 100px); align-self: start; display: grid; gap: 14px; max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: none; }
.adm-side::-webkit-scrollbar { display: none; }
.adm-me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s; }
.adm-me:hover { border-color: var(--line-2); }
.adm-me img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.adm-me > span { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.adm-me b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.adm-nav { display: grid; gap: 2px; padding: 6px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.adm-nav a { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: 15px; font-size: 14px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s; }
.adm-nav a svg { width: 18px; height: 18px; flex: none; }
.adm-nav a:hover { background: var(--surface-2); color: var(--text); }
.adm-nav a.on { color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--accent-2))); box-shadow: 0 10px 24px -12px rgb(var(--tint) / .8); }
.adm-nav a em { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; display: grid; place-items: center; border-radius: 99px; font-style: normal; font-size: 11px; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.adm-nav a em.hot { background: var(--accent-2); color: #fff; }
.adm-nav a.on em { background: rgba(0, 0, 0, .18); color: var(--accent-ink); }
.adm-side-foot { display: grid; gap: 8px; }
.adm-live { display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 12.5px; color: var(--muted); }
.adm-live i, .live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }
.adm-back { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.adm-back svg { width: 17px; }
.adm-back:hover { color: var(--text); background: var(--surface); }
.adm-main { min-width: 0; }
.adm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.adm-head h1 { margin: 12px 0 0; font: 500 clamp(30px, 3.6vw, 46px)/1 var(--font-display); letter-spacing: -.045em; }
.adm-head p { margin: 8px 0 0; font-size: 14.5px; }
.adm-head-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.a-toolbar > * { max-width: 100%; }
@media (max-width: 1020px) {
  .adm { grid-template-columns: minmax(0, 1fr); padding-top: 96px; }
  .adm-side { min-width: 0; }
  .adm-side { position: sticky; top: calc(var(--sat) + 74px); z-index: 15; max-height: none; overflow: visible; display: block; }
  .adm-me, .adm-side-foot { display: none; }
  .adm-nav { display: flex; overflow-x: auto; scrollbar-width: none; background: var(--elev); box-shadow: var(--shadow-soft); }
  .adm-nav::-webkit-scrollbar { display: none; }
  .adm-nav a { flex: none; }
}

/* Карточки, сетки, KPI */
.a-card { min-width: 0; padding: 20px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); }
.a-card.is-warn { border-color: color-mix(in srgb, var(--mid) 45%, transparent); background: color-mix(in srgb, var(--mid) 5%, var(--surface)); }
.a-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.a-card-h h3 { display: flex; align-items: center; gap: 8px; margin: 0; font: 500 17px var(--font-display); letter-spacing: -.02em; }
.a-card-h h3 svg { width: 18px; color: var(--accent); }
.a-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--accent); }
.a-link svg { width: 15px; }
.a-sub { margin: 18px 0 10px; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.a-note { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; }
.a-grid { display: grid; gap: 16px; min-width: 0; }
.a-grid.g-main { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
.a-grid.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.a-grid.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.a-card.wide { grid-column: 1 / -1; }
@media (max-width: 1200px) { .a-grid.g-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 900px) { .a-grid.g-main, .a-grid.g-3, .a-grid.g-2 { grid-template-columns: minmax(0, 1fr); } }

.a-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1500px) { .a-kpis:not(.compact) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .a-kpis:not(.compact) { grid-template-columns: repeat(2, minmax(0, 1fr)); } .a-kpi-v { font-size: 24px; } }
.a-kpi { position: relative; overflow: hidden; display: grid; gap: 6px; padding: 18px 18px 46px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); transition: border-color .25s, transform .5s var(--ease-spring); }
a.a-kpi:hover { border-color: rgb(var(--tint) / .4); transform: translateY(-2px); }
.a-kpi-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.a-kpi-h .live-dot { margin-left: auto; }
.a-kpi-ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: rgb(var(--tint) / .12); color: var(--accent); }
.a-kpi-ic svg { width: 16px; }
.a-kpi-v { font: 600 30px/1.1 var(--font-display); letter-spacing: -.04em; }
.a-kpi-s { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.a-kpi-s .warn { color: var(--bad); }
.a-spark { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 38px; }
.a-delta { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.a-delta.up { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.a-delta.down { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.a-kpis.compact { grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)); }
.a-mini { display: grid; gap: 2px; padding: 14px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.a-mini span { color: var(--accent); }
.a-mini span svg { width: 17px; }
.a-mini b { font: 600 18px var(--font-display); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-mini small { font-size: 12px; color: var(--muted); }

/* График */
.a-chart { position: relative; height: 260px; }
.a-chart.sm { height: 180px; }
.lc { position: relative; height: 100%; }
.lc-svg { width: 100%; height: 100%; overflow: visible; }
.lc-grid line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.lc-grid text, .lc-x text { fill: var(--faint); font-size: 11px; font-family: var(--font); }
.lc-line { vector-effect: non-scaling-stroke; }
.lc-cross { stroke: var(--line-2); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.lc-dot { stroke: var(--elev); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.lc-tip { position: absolute; top: 4px; left: 0; min-width: 150px; padding: 10px 12px; border-radius: 14px; background: var(--elev); border: 1px solid var(--line-2); box-shadow: var(--shadow-soft); font-size: 12.5px; display: grid; gap: 4px; pointer-events: none; opacity: 0; transition: opacity .2s; }
.lc-tip.on { opacity: 1; }
.lc-tip span { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.lc-tip i { width: 8px; height: 8px; border-radius: 50%; }
.lc-tip b { color: var(--text); }

/* Кольцевые диаграммы */
.a-donut { display: flex; align-items: center; gap: 16px; }
.a-donut svg { flex: none; width: 108px; height: 108px; transform: none; }
.a-donut circle { transition: stroke-dasharray .8s var(--ease-out); }
.a-donut text { fill: var(--text); font: 600 7px var(--font-display); }
.a-donut text.sm { fill: var(--faint); font: 600 3.2px var(--font); }
.a-donut ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex: 1; min-width: 0; }
.a-donut li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.a-donut li i { flex: none; width: 9px; height: 9px; border-radius: 3px; }
.a-donut li span { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-aud { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.a-aud > div { padding: 12px; border-radius: 16px; background: var(--surface-2); text-align: center; }
.a-aud b { display: block; font: 600 22px var(--font-display); }
.a-aud small { font-size: 11.5px; color: var(--muted); }

/* Списки на обзоре */
.a-online-list, .a-people, .a-feed, .a-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.a-online-list { max-height: 270px; overflow-y: auto; }
.a-online-list li { display: flex; align-items: center; gap: 10px; padding: 7px 4px; }
.a-online-list img, .a-guest { flex: none; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.a-guest { display: grid; place-items: center; background: var(--surface-2); color: var(--faint); }
.a-guest svg { width: 17px; }
.a-online-list li > span { flex: 1; min-width: 0; display: grid; }
.a-online-list b { font-size: 13.5px; }
.a-online-list small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-online-list em { font-style: normal; }
.a-top a { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: 14px; transition: background .2s; }
.a-top a:hover { background: var(--surface-2); }
.a-top-n { width: 18px; font: 600 14px var(--font-display); color: var(--faint); text-align: center; }
.a-top img, .a-top-ph { flex: none; width: 34px; height: 50px; border-radius: 8px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; }
.a-top-ph svg { width: 16px; color: var(--faint); }
.a-top-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.a-top-t b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-top-t small { font-size: 11.5px; color: var(--muted); }
/* Страны */
.a-geo { margin-bottom: 18px; }
.a-geo .a-card-h h3 svg { width: 18px; vertical-align: -3px; margin-right: 4px; }
.a-geo-rows { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.a-geo-rows li { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 14px; }
.a-geo-rows li:hover { background: var(--surface-2); }
.a-geo-n { width: 18px; text-align: center; font: 600 13px var(--font-display); color: var(--muted); }
.a-geo-cc { flex: none; width: 40px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font: 700 12px var(--font-display); letter-spacing: .06em; }
.a-geo-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.a-geo-t b { font-size: 14px; }
.a-geo-t small { font-size: 12px; color: var(--muted); }
.a-geo-p { font: 600 14px var(--font-display); min-width: 44px; text-align: right; }
.a-geo-more { margin-top: 10px; }
.a-top-bar { display: block; height: 3px; border-radius: 3px; background: var(--surface-2); position: relative; overflow: hidden; }
.a-top-bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.a-people a, .a-people-row { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 14px; transition: background .2s; }
.a-people a:hover { background: var(--surface-2); }
.a-people-v { margin-left: auto; display: grid; justify-items: end; text-align: right; }
.a-people-v b { font-size: 13.5px; }
.a-people-v small { font-size: 11.5px; color: var(--muted); }
.a-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.a-user img { flex: none; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.a-user > span { display: grid; min-width: 0; }
.a-user b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-user small { font-size: 12px; color: var(--muted); }
.a-feed li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; font-size: 13.5px; line-height: 1.45; }
.a-feed li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.a-feed small { display: block; font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.a-feed-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.a-feed-ic svg { width: 15px; }
.a-feed-ic.t-auth { color: #60a5fa; } .a-feed-ic.t-user { color: var(--accent-2); } .a-feed-ic.t-role { color: #a78bfa; }
.a-feed-ic.t-film, .a-feed-ic.t-home { color: var(--accent); } .a-feed-ic.t-comment { color: #8bd3c7; } .a-feed-ic.t-settings { color: var(--mid); }
.a-empty { display: grid; justify-items: center; gap: 8px; padding: 30px 16px; text-align: center; color: var(--muted); font-size: 13.5px; }
.a-empty svg { width: 30px; color: var(--faint); }
.a-empty p { margin: 0; max-width: 420px; line-height: 1.5; }

/* Панель инструментов, поиск, таблица */
.a-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.a-search { flex: 1; min-width: 200px; position: relative; display: flex; align-items: center; }
.a-search svg { position: absolute; left: 14px; width: 18px; color: var(--faint); pointer-events: none; }
.a-search input { width: 100%; height: 46px; padding: 0 14px 0 42px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); font: 600 14px var(--font); outline: none; transition: border-color .3s, box-shadow .3s; }
.a-search input:focus { border-color: rgb(var(--tint) / .6); box-shadow: 0 0 0 4px rgb(var(--tint) / .12); }
.a-search.big input { height: 54px; font-size: 15px; }
.a-toolbar .a-select { width: auto; min-height: 46px; border-radius: 99px; }
.a-count { margin: -4px 0 -6px; font-size: 13px; }
.a-table-wrap { overflow-x: auto; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.a-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.a-table th { position: sticky; top: 0; padding: 12px 14px; text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); background: var(--elev); border-bottom: 1px solid var(--line); white-space: nowrap; }
.a-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.a-table tr:last-child td { border-bottom: 0; }
.a-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.a-table.users tbody tr { cursor: var(--cur-hover); transition: background .15s; }
.a-table.users tbody tr:hover, .a-table.users tbody tr:focus-visible { background: var(--surface-2); outline: none; }
.a-table .go { color: var(--faint); width: 30px; }
.a-table .go svg { width: 16px; }
.a-plus { margin-left: 6px; font-size: 11px; font-weight: 800; color: var(--accent); }
.a-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.a-pill svg { width: 13px; }
.a-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.a-pill.good { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.a-pill.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.a-pill.warn { color: var(--mid); background: color-mix(in srgb, var(--mid) 14%, transparent); }

/* Карточка пользователя */
.u-hero { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.u-ava { position: relative; flex: none; width: 96px; height: 96px; border-radius: 50%; padding: 3px; background: var(--bg); box-shadow: 0 0 0 3px var(--rc); }
.u-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.u-on { position: absolute; right: 4px; bottom: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--elev); }
.u-id { flex: 1; min-width: 240px; }
.u-id h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; font: 500 28px/1.1 var(--font-display); letter-spacing: -.035em; }
.u-id > p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.u-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.u-ban { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: 13px; color: var(--bad); }
.u-ban svg { width: 15px; }
.u-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; flex-basis: 100%; padding-top: 16px; border-top: 1px solid var(--line); }
.u-role { display: grid; gap: 4px; min-width: 190px; }
.u-role span { font-size: 11.5px; font-weight: 700; color: var(--faint); }
.u-role .a-select { min-height: 44px; border-radius: 99px; }
.u-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.u-perms span { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; font-size: 13px; color: var(--faint); background: var(--surface-2); }
.u-perms span svg { width: 15px; flex: none; }
.u-perms span.on { color: var(--text); }
.u-perms span.on svg { color: var(--good); }
.u-perms em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 800; color: var(--accent); }
.u-tabs { margin-bottom: 16px; }
.u-favs { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.u-favs a { aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.u-favs img { width: 100%; height: 100%; object-fit: cover; }

/* Права */
.perm-list { display: grid; gap: 6px; margin-top: 16px; }
.perm { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--line); cursor: var(--cur-hover); transition: border-color .2s, background .2s; }
.perm input { position: absolute; opacity: 0; pointer-events: none; }
.perm-box { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-2); color: transparent; transition: all .2s; }
.perm-box svg { width: 14px; }
.perm input:checked ~ .perm-box { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.perm:has(input:checked) { border-color: rgb(var(--tint) / .4); background: rgb(var(--tint) / .05); }
.perm.role, .perm.na { cursor: default; }
.perm.role .perm-box { background: var(--surface-2) !important; border-color: var(--line-2) !important; color: var(--muted) !important; }
.perm.role { background: var(--surface) !important; border-color: var(--line) !important; }
.perm.na { opacity: .45; }
.perm-t { display: grid; font-size: 14px; font-weight: 600; }
.perm-t small { font-size: 11.5px; font-weight: 500; color: var(--faint); }

/* Роли */
.r-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.r-card { display: grid; gap: 10px; align-content: start; padding: 18px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--rc); }
.r-card-h { display: flex; align-items: center; gap: 8px; }
.r-card-h b { font: 600 16px var(--font-display); letter-spacing: -.02em; }
.r-card-h em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--faint); }
.r-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 25%, transparent); }
.r-card p { margin: 0; min-height: 2.8em; font-size: 13px; color: var(--muted); line-height: 1.45; }
.r-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--faint); }
.r-meta span { display: inline-flex; align-items: center; gap: 4px; }
.r-meta svg { width: 14px; }
.r-act { display: flex; gap: 6px; align-items: center; }
.a-table.matrix td, .a-table.matrix th { text-align: center; }
.a-table.matrix td:first-child, .a-table.matrix th:first-child { text-align: left; white-space: normal; min-width: 240px; }
.a-table.matrix td:first-child b { display: block; font-size: 13.5px; }
.a-table.matrix td:first-child small { font-size: 11px; color: var(--faint); font-family: ui-monospace, Consolas, monospace; }
.a-table.matrix th .r-dot { margin-right: 6px; width: 8px; height: 8px; }
.mx button, .mx span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: var(--faint); }
.mx button { border: 1.5px dashed var(--line-2); transition: all .2s; }
.mx button:hover { border-color: var(--accent); }
.mx.on button, .mx.on span { color: var(--accent-ink); background: var(--accent); border: 0; }
.mx.on span { background: color-mix(in srgb, var(--accent) 70%, var(--surface-2)); }
.mx svg { width: 15px; }

/* Фильмы */
.f-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.f-card { display: grid; grid-template-rows: auto 1fr auto; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s; }
.f-card:hover { border-color: var(--line-2); }
.f-card.draft { border-style: dashed; }
.f-poster { position: relative; aspect-ratio: 2 / 3; background: var(--surface-2); display: grid; place-items: center; color: var(--faint); }
.f-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.f-poster > span:first-child svg { width: 40px; }
.f-state { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 11px; font-weight: 800; background: rgba(10, 10, 12, .78); color: #7fd8a4; }
.f-card.draft .f-state { color: #f5c84a; }
.f-state svg { width: 13px; }
.f-info { display: grid; gap: 4px; padding: 14px; align-content: start; }
.f-info b { font-size: 14.5px; }
.f-info small { font-size: 12px; color: var(--muted); }
.f-act { display: flex; gap: 6px; padding: 0 14px 14px; }
.f-act .icon-btn { width: 36px; height: 36px; }
.f-act .icon-btn svg { width: 16px; }
.f-empty { display: grid; justify-items: center; gap: 4px; padding: 20px; border-radius: 26px; border: 1px dashed var(--line-2); }
.fe { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.fe-form { display: grid; gap: 16px; min-width: 0; }
.fe-side { position: sticky; top: calc(var(--sat) + 100px); display: grid; gap: 12px; }
.fe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fe-grid .span2 { grid-column: 1 / -1; }
.fe-form .a-card > .dlg-f + .dlg-f { margin-top: 12px; }
.fe-genres { display: flex; flex-wrap: wrap; gap: 6px; }
.fe-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.fe-media-item { position: relative; display: grid; gap: 6px; align-content: start; padding: 12px; border-radius: 20px; background: var(--surface-2); overflow: hidden; }
.fe-media-item b { font-size: 13.5px; }
.fe-media-item small { font-size: 11.5px; }
.fe-media-item input { min-height: 38px; padding: 8px 12px; font-size: 12.5px; border-radius: 12px; }
.fe-media-btns { display: flex; gap: 6px; align-items: center; }
.fe-media-btns .icon-btn { width: 36px; height: 36px; }
.fe-thumb { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--bg); color: var(--faint); }
.fe-thumb.poster { aspect-ratio: 2 / 3; max-height: 220px; }
.fe-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fe-thumb.logo img { object-fit: contain; padding: 10px; }
.fe-thumb svg { width: 30px; }
.fe-prog { position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p, 0) * 100%); background: var(--accent); transition: width .2s; }
.fe-media-item.busy { opacity: .75; pointer-events: none; }
.fe-trailer { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.fe-trailer .grow { flex: 1; min-width: 240px; }
.fe-yt { width: 160px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--faint); }
.fe-yt img { width: 100%; height: 100%; object-fit: cover; }
.fe-yt svg { width: 30px; }
.src-rows { display: grid; gap: 8px; margin-bottom: 14px; }
.src-row { position: relative; display: grid; grid-template-columns: auto minmax(120px, .7fr) minmax(0, 1.6fr) auto auto auto; gap: 8px; align-items: center; padding: 8px; border-radius: 16px; background: var(--surface-2); overflow: hidden; }
.src-grip { display: grid; place-items: center; width: 34px; color: var(--accent); }
.src-grip svg { width: 18px; }
.src-row input { min-height: 40px; padding: 8px 12px; border-radius: 12px; font-size: 13px; }
.src-row .icon-btn { width: 38px; height: 38px; }
.src-row .icon-btn svg { width: 16px; }
.src-prog { display: none; grid-column: 1 / -1; position: relative; height: 22px; border-radius: 8px; background: var(--bg); overflow: hidden; font-style: normal; }
.src-prog b { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .25s; }
.src-prog em { position: relative; display: block; text-align: center; font: 700 11px/22px var(--font); font-style: normal; color: var(--text); }
.src-row.busy .src-prog { display: block; }
.src-row.busy .icon-btn { pointer-events: none; opacity: .4; }
.fe-prev { padding: 0; overflow: hidden; }
.fe-prev-bd { aspect-ratio: 16 / 9; background: var(--surface-2); }
.fe-prev-bd img { width: 100%; height: 100%; object-fit: cover; }
.fe-prev-row { display: flex; gap: 12px; padding: 0 16px 16px; margin-top: -40px; position: relative; }
.fe-prev-poster { flex: none; width: 84px; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: var(--elev); border: 2px solid var(--elev); display: grid; place-items: center; color: var(--faint); box-shadow: var(--shadow-soft); }
.fe-prev-poster img { width: 100%; height: 100%; object-fit: cover; }
.fe-prev-poster svg { width: 26px; }
.fe-prev-t { display: grid; gap: 3px; align-content: end; padding-top: 44px; min-width: 0; }
.fe-prev-t b { font: 600 16px/1.2 var(--font-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.fe-prev-t small, .fe-prev-t span { font-size: 12px; color: var(--muted); }
.fe-prev-t em { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); }
.fe-prev-t em svg { width: 12px; }
.fe-pub { display: grid; gap: 12px; }
.fe-pub .btn { justify-content: space-between; }
.fe-pub .btn.sm { justify-content: center; }
.fe-note { display: flex; gap: 8px; margin: 0; font-size: 12px; line-height: 1.5; }
.fe-note svg { flex: none; width: 15px; color: var(--accent); }
.ov-head { display: flex; gap: 16px; align-items: center; }
.ov-head img { width: 70px; border-radius: 12px; }
.ov-head h3 { margin: 6px 0 4px; font: 500 22px var(--font-display); letter-spacing: -.03em; }
.ov-head p { margin: 0; font-size: 13px; }
@media (max-width: 1100px) { .fe { grid-template-columns: minmax(0, 1fr); } .fe-side { position: static; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 700px) {
  .fe-grid { grid-template-columns: minmax(0, 1fr); }
  .fe-side { grid-template-columns: minmax(0, 1fr); }
  .src-row { grid-template-columns: auto minmax(0, 1fr) auto auto auto; }
  .src-row .src-url { grid-column: 1 / -1; grid-row: 2; }
}

/* Выбор фильма */
.picker .dlg-card { display: grid; gap: 14px; }
.pk-list { display: grid; gap: 4px; max-height: 52vh; overflow-y: auto; }
.pk-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; transition: background .2s; }
.pk-item:hover { background: var(--surface-2); }
.pk-item img, .pk-item .pf-noimg { width: 40px; height: 60px; border-radius: 8px; object-fit: cover; flex: none; }
.pk-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pk-item .a-user img { width: 36px; height: 36px; border-radius: 50%; }
.pk-t b { font-size: 14px; }
.pk-t small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Главная */
.h-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.h-thumb { position: relative; flex: none; width: 128px; display: grid; gap: 6px; }
.h-strip.hero .h-thumb { width: 220px; }
.h-thumb > img, .h-thumb > span:first-child { width: 100%; aspect-ratio: 2 / 3; border-radius: 14px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--faint); }
.h-strip.hero .h-thumb > img, .h-strip.hero .h-thumb > span:first-child { aspect-ratio: 16 / 9; }
.h-thumb > b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-thumb-act { position: absolute; top: 6px; left: 6px; right: 6px; display: flex; justify-content: space-between; opacity: 0; transition: opacity .2s; }
.h-thumb:hover .h-thumb-act, .h-thumb:focus-within .h-thumb-act { opacity: 1; }
.h-thumb-act button { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(10, 10, 12, .82); color: #fff; }
.h-thumb-act button svg { width: 14px; }
.h-thumb-act button[data-rm]:hover { background: var(--bad); }
@media (hover: none) { .h-thumb-act { opacity: 1; } }
/* Ряд «Новинки и популярное» */
.h-thumb > .h-pos { position: absolute; left: 6px; bottom: 30px; display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px; border-radius: 999px; background: rgba(10, 10, 12, .82); color: #fff; font: 600 12px/1 var(--font-display); }
.h-thumb > .h-pos svg { width: 11px; }
.h-thumb.is-pinned > img { outline: 2px solid var(--accent); outline-offset: -2px; }
.h-thumb.is-pinned > .h-pos { background: var(--accent); color: #111; }
.h-thumb-act button[data-f-pin].on { background: var(--accent); color: #111; }
.h-thumb-act button[data-f-rm]:hover { background: var(--bad); }
.h-f-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin: 4px 0 14px; }
.h-f-fields select { min-height: 42px; }
.h-f-size { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.h-f-size input { width: 80px; }
.h-hidden { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; }
.h-hidden .chip svg { width: 12px; }
.h-row-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; flex: 1; min-width: 260px; }
.h-row-fields input { min-height: 42px; }
.h-row-fields .h-title { font: 600 15px var(--font-display); }
.h-row-act { display: flex; gap: 6px; align-items: center; }
.h-row-act .icon-btn { width: 38px; height: 38px; }
.h-row-act .icon-btn svg { width: 16px; }
.h-row-act [data-row-mv="-1"] svg { transform: rotate(90deg); }
.h-row-act [data-row-mv="1"] svg { transform: rotate(90deg); }
.h-new { display: flex; align-items: center; justify-content: center; gap: 10px; height: 64px; border-radius: 22px; border: 1.5px dashed var(--line-2); font-weight: 700; color: var(--muted); transition: border-color .2s, color .2s, background .2s; }
.h-new svg { width: 18px; }
.h-new:hover { border-color: var(--accent); color: var(--accent); background: rgb(var(--tint) / .05); }

/* Модерация */
.m-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.m-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.m-item.is-reported { border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.m-item.is-hidden { opacity: .72; }
.m-film { width: 46px; height: 68px; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--faint); }
.m-film img { width: 100%; height: 100%; object-fit: cover; }
.m-film svg { width: 18px; }
.m-body header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.m-body time { color: var(--faint); font-size: 12px; }
.m-author { display: inline-flex; align-items: center; gap: 8px; }
.m-author img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.m-author:hover b { color: var(--accent); }
.m-body p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.m-reply { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; font-style: normal; font-size: 12px; color: var(--faint); }
.m-reply svg { width: 13px; }
.m-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.m-act { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; max-width: 300px; }
.m-act .icon-btn { width: 38px; height: 38px; }
.m-act .icon-btn svg { width: 16px; }
@media (max-width: 760px) { .m-item { grid-template-columns: auto minmax(0, 1fr); } .m-act { grid-column: 1 / -1; justify-content: flex-start; max-width: none; } }

/* Поддержка (сотрудник) */
.hd { display: grid; grid-template-columns: 320px minmax(0, 1fr) 260px; gap: 14px; align-items: start; }
.hd:not(:has(.hd-info)) { grid-template-columns: 320px minmax(0, 1fr); }
.hd-list { position: sticky; top: calc(var(--sat) + 100px); display: grid; gap: 10px; max-height: calc(100vh - 120px); grid-template-rows: auto auto minmax(0, 1fr); }
.hd-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.hd-filters button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); }
.hd-filters button em { font-style: normal; font-size: 11px; opacity: .7; }
.hd-filters button.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.hd-items { display: grid; gap: 6px; overflow-y: auto; align-content: start; padding-right: 4px; }
.hd-item { position: relative; display: flex; gap: 10px; padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line); transition: border-color .2s, background .2s; }
.hd-item.p-high { border-left-color: var(--mid); }
.hd-item.p-urgent { border-left-color: var(--bad); }
.hd-item.on { background: rgb(var(--tint) / .07); border-color: rgb(var(--tint) / .45); }
.hd-item > img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.hd-item-t { display: grid; gap: 4px; min-width: 0; flex: 1; }
.hd-item-t b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-item-t small { font-size: 11.5px; color: var(--faint); }
.hd-item-tags { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hd-item .dot { position: absolute; top: 12px; right: 12px; }
.prio { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.prio.p-low { color: var(--muted); background: var(--surface-2); }
.prio.p-high { color: var(--mid); background: color-mix(in srgb, var(--mid) 14%, transparent); }
.prio.p-urgent { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.hd-asg img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; display: block; }
.hd-main { min-width: 0; padding: 22px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); min-height: 480px; }
.hd-info { position: sticky; top: calc(var(--sat) + 100px); display: grid; gap: 12px; padding: 18px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); }
.hd-user { display: grid; justify-items: center; gap: 6px; text-align: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hd-user img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.hd-user small { font-size: 12px; color: var(--muted); }
.hd-user .btn { margin-top: 6px; }
.hd-info .a-select { min-height: 42px; font-size: 13px; }
.hd-canned { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 1280px) { .hd { grid-template-columns: 280px minmax(0, 1fr); } .hd-info { grid-column: 1 / -1; position: static; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } .hd-user { border: 0; } }
@media (max-width: 860px) { .hd, .hd:not(:has(.hd-info)) { grid-template-columns: minmax(0, 1fr); } .hd-list { position: static; max-height: 420px; } }

/* Рассылка, журнал, настройки */
.nt-form { display: grid; gap: 14px; align-content: start; }
.nt-form .btn { justify-self: start; }
.au-list { display: grid; gap: 2px; }
.au-day { margin: 18px 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.au-day:first-child { margin-top: 0; }
.au-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; font-size: 13.5px; }
.au-item:hover { background: var(--surface); }
.au-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.au-t a { font-weight: 700; }
.au-t a:hover { color: var(--accent); }
.au-item code { font-size: 11px; color: var(--faint); font-family: ui-monospace, Consolas, monospace; }
.au-item time { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .au-item code { display: none; } }
.st-grid .a-card { display: grid; gap: 14px; align-content: start; }
.st-grid .a-card-h { margin-bottom: 0; }
.st-sw span small { display: block; font-size: 12px; font-weight: 500; color: var(--faint); margin-top: 2px; }
.st-sw { align-items: flex-start; }
.st-sw .switch-track { flex: none; margin-top: 1px; }
.st-grid .btn { justify-self: start; }

/* Светлая тема: плотнее фоны карточек */
:root[data-theme="light"] .a-card, :root[data-theme="light"] .a-kpi, :root[data-theme="light"] .pf-card, :root[data-theme="light"] .adm-nav, :root[data-theme="light"] .adm-me,
:root[data-theme="light"] .sp-main, :root[data-theme="light"] .hd-main, :root[data-theme="light"] .hd-info, :root[data-theme="light"] .m-item, :root[data-theme="light"] .r-card,
:root[data-theme="light"] .f-card, :root[data-theme="light"] .pf-stat, :root[data-theme="light"] .a-table-wrap, :root[data-theme="light"] .a-mini { background: var(--elev); }
:root[data-theme="light"] .f-state { background: rgba(255, 255, 255, .9); color: var(--good); }
:root[data-theme="light"] .auth-side { color: #f4efe6; }

/* ---------- Телефон: текст в кнопках и плашках не переносится и не вылезает ---------- */
.btn, .chip, .a-pill, .role-badge, .pill-tag, .t-status, .prio, .link-more, .pf-card-h a, .a-link, .acct-login, .adm-nav a, .seg button, .seg a, .an-link, .link-btn { white-space: nowrap; }
.pf-stat b, .a-kpi-v, .a-mini b { white-space: nowrap; }
.pf-stat small, .a-kpi-h, .a-mini small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-stat > b, .pf-stat > small { min-width: 0; }
@media (max-width: 680px) {
  .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 24px; }
  .pf-stat { padding: 12px; column-gap: 10px; border-radius: 18px; }
  .pf-stat-ic { width: 34px; height: 34px; border-radius: 12px; }
  .pf-stat-ic svg { width: 16px; }
  .pf-stat b { font-size: 18px; }
  .pf-stat small { font-size: 11.5px; }
  .pf-card { padding: 16px; border-radius: 22px; }
  .pf-card-h h2 { font-size: 17px; }
  .pf-card-h.big h2 { font-size: 21px; }
  .pf-head-actions { width: 100%; }
  .pf-head-actions .btn { flex: 1; justify-content: center; }
  .pf-name { font-size: 34px; }
  .a-card { padding: 16px; border-radius: 22px; }
  .a-kpi { padding: 14px 14px 40px; border-radius: 20px; }
  .a-kpi-h { font-size: 12px; }
  .adm-head h1 { font-size: 30px; }
  .adm-head-act { width: 100%; }
  .adm-head-act .btn { flex: 1; justify-content: center; }
  .u-actions .btn { flex: 1 1 calc(50% - 4px); justify-content: center; padding: 0 10px; font-size: 13px; }
  .u-role { flex: 1 1 100%; }
  .f-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .f-act { flex-wrap: wrap; padding: 0 10px 10px; }
  .f-info { padding: 10px; }
  .r-act .btn { padding: 0 12px; }
  .m-act .btn { flex: 1; justify-content: center; }
  .tk-head-r .btn, .sp-form .btn, .nt-form .btn { width: 100%; justify-content: center; }
  .tk-reply .btn { justify-self: stretch; justify-content: center; }
  .dlg-actions .btn { flex: 1; justify-content: center; }
  .dlg-card { padding: 22px; border-radius: 26px; }
  .pk-acts { width: 100%; }
  .pk-acts .btn { flex: 1; justify-content: center; }
  .pk-item { flex-wrap: wrap; }
  .c-gate .btn { width: 100%; justify-content: center; }
  .c-form-bottom .btn { margin-left: auto; }
  .h-row-act { width: 100%; }
  .h-row-act .btn { flex: 1; justify-content: center; }
  .st-actions .btn, .st-ava-btns .btn { flex: 1; justify-content: center; }
  .announce p { font-size: 13px; }
}
@media (max-width: 380px) {
  .pf-stat { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  .pf-stat-ic { grid-row: auto; }
  .btn.sm { font-size: 13px; }
}
@media (max-width: 680px) { .pf-stat:last-child:nth-child(odd) { grid-column: 1 / -1; } }
@media (max-width: 680px) { .u-actions .btn svg { display: none; } .u-actions .btn { gap: 0; } }
@media (max-width: 680px) { .adm-head-act .btn .ic-circle, .pf-head-actions .btn .ic-circle, .u-actions .btn .ic-circle { display: none; } .adm-head-act .btn, .pf-head-actions .btn { padding: 0 14px; } }
@media (max-width: 680px) { .adm-head-act .btn svg, .pf-head-actions .btn svg { display: none; } .adm-head-act .btn, .pf-head-actions .btn { gap: 0; font-size: 13.5px; } }
[data-src-up-move] svg { transform: rotate(90deg); }

/* Карточки ролей: кнопки ровным рядом внутри карточки */
.r-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.r-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.r-card p { min-height: 0; flex: 1; }
.r-act { display: grid; grid-template-columns: minmax(0, 1fr) repeat(var(--n, 0), 38px); gap: 6px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.r-act:has([data-edit]) { --n: 1; }
.r-act:has([data-del]) { --n: 2; }
.r-act .btn.sm { height: 38px; min-width: 0; padding: 0 10px; gap: 6px; font-size: 13px; justify-content: center; }
.r-act .btn.sm svg { width: 15px; height: 15px; flex: none; }
.r-act .icon-btn { width: 38px; height: 38px; justify-self: end; }
.r-act .icon-btn svg { width: 16px; height: 16px; }
.r-act [data-edit]:hover { color: var(--accent); }
.r-act [data-del]:hover { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.r-card-h b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-card-h em { flex: none; }
.r-card-h { flex-wrap: wrap; row-gap: 2px; } .r-card-h b { white-space: normal; overflow: visible; }

/* ---------- Диагностика пользователя (поддержка) ---------- */
.dg { display: grid; gap: 14px; }
.dg-ok { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--good) 12%, transparent); color: var(--good); font-weight: 600; font-size: 14px; }
.dg-ok svg { width: 16px; flex: none; }
.dg-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.dg-issues li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; }
.dg-issues li svg { width: 15px; flex: none; }
.dg-issues li.bad { background: color-mix(in srgb, var(--bad) 13%, transparent); color: var(--bad); }
.dg-issues li.warn { background: color-mix(in srgb, var(--mid) 13%, transparent); color: var(--mid); }
.dg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.dg-grid section { padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.dg-grid h4 { margin: 0 0 10px; font: 600 13px var(--font-display); letter-spacing: .02em; }
.dg-grid dl { margin: 0; display: grid; gap: 8px; }
.dg-grid dl > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.dg-grid dt { color: var(--muted); }
.dg-grid dd { margin: 0; text-align: right; font-weight: 600; min-width: 0; white-space: nowrap; }
.dg-grid dd code { white-space: normal; }
.dg-good { color: var(--good); }
.dg-bad { color: var(--bad); }
.dg code { font-size: 12px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); overflow-wrap: anywhere; }
.dg-plays, .dg-errors { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.dg-plays li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface); }
.dg-pl-ic { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.dg-pl-ic svg { width: 13px; }
.dg-plays li.ok .dg-pl-ic { background: color-mix(in srgb, var(--good) 16%, transparent); color: var(--good); }
.dg-plays li.fail .dg-pl-ic { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.dg-pl-t { display: grid; gap: 2px; min-width: 0; }
.dg-pl-t b { font-size: 13.5px; }
.dg-pl-t small { font-size: 12px; color: var(--muted); }
.dg-errors li { display: grid; gap: 3px; padding: 8px 10px; border-radius: 12px; background: var(--surface); }
.dg-errors small { font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
/* Блок в обращении */
.tk-diag { margin: 0 0 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.tk-diag > summary { list-style: none; cursor: var(--cur-hover); display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 13.5px; }
.tk-diag > summary::-webkit-details-marker { display: none; }
.tk-diag > summary svg { width: 17px; flex: none; }
.tk-diag > summary span { margin-left: auto; color: var(--muted); font-size: 12.5px; text-align: right; }
.tk-diag.bad > summary span { color: var(--bad); }
.tk-diag.warn > summary span { color: var(--mid); }
.tk-diag.ok > summary span { color: var(--good); }
.tk-diag[open] { padding-bottom: 14px; }
.tk-diag > .dg, .tk-diag > .a-link { margin: 0 16px; }
.tk-diag > .a-link { display: inline-flex; margin-top: 12px; }
/* ---------- Друзья ---------- */
.pf-grid.fr { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.fr-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.fr-list li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; transition: background .2s; }
.fr-list li:hover { background: var(--surface-2); }
.fr-list li.muted { padding: 8px 12px; }
.fr-ava { position: relative; flex: none; width: 44px; height: 44px; }
.fr-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.fr-ava i { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2.5px var(--elev); }
.fr-t { flex: 1; min-width: 0; display: grid; gap: 2px; color: inherit; text-decoration: none; }
.fr-t a { color: inherit; text-decoration: none; }
.fr-t b { font-size: 14.5px; }
.fr-t small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-t small a { color: var(--accent); }
.fr-on { color: var(--good); }
.fr-q { margin-top: 4px; }
.fr-priv { display: grid; gap: 14px; margin: 6px 0 10px; }
.fr-priv .switch > span:last-child { display: grid; gap: 2px; }
.fr-priv small { font-size: 12px; font-weight: 500; }
.fr-now { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.fr-now a:not(.btn) { color: var(--accent); }
/* Друзья сейчас — в Кинозале */
.friends-now { margin-bottom: 40px; }
.fn-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.fn-list > p { grid-column: 1 / -1; margin: 0; }
.fn-list > p a { color: var(--accent); }
.fn-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
/* Комнаты: доступ и отметки */
.room-access { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 6px 0 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.room-access.ro { padding: 0 14px; color: var(--muted); }
.room-access svg { width: 15px; color: var(--accent); }
/* Доступ к комнате: кнопка в стиле остальных + своё меню */
.ra { position: relative; }
.ra-btn { gap: 8px; padding: 0 14px 0 16px; }
.ra-cur { display: inline-flex; align-items: center; gap: 8px; }
.ra-cur svg { width: 17px; height: 17px; color: var(--accent); }
.ra-arr { display: grid; place-items: center; width: 18px; font-style: normal; opacity: .6; transition: transform .4s var(--ease-spring), opacity .2s; }
.ra-arr svg { width: 14px; height: 14px; transform: rotate(-90deg); }
.ra.open .ra-arr { transform: rotate(180deg); opacity: 1; }
.ra.open .ra-btn { border-color: rgb(var(--tint) / .45); }
.ra-pop { position: absolute; top: calc(100% + 10px); left: 0; z-index: 40; width: 320px; max-width: calc(100vw - 32px); padding: 10px; border-radius: 22px; background: var(--elev); border: 1px solid var(--line-2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6), var(--hi); opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top left; transition: opacity .2s, transform .35s var(--ease-spring), visibility 0s .35s; }
.ra.open .ra-pop { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .35s var(--ease-spring); }
.ra-h { display: block; margin: 4px 8px 8px; font: 600 13px var(--font-display); color: var(--muted); }
.ra-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 14px; background: transparent; color: var(--text); text-align: left; cursor: var(--cur-hover, pointer); transition: background .2s; }
.ra-opt:hover { background: var(--surface-2); }
.ra-opt.on { background: rgb(var(--tint) / .1); }
.ra-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); color: var(--muted); transition: background .2s, color .2s; }
.ra-ic svg { width: 18px; height: 18px; }
.ra-opt.on .ra-ic { background: linear-gradient(135deg, #f5b54a, #ff7a45); color: #1c1306; }
.ra-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ra-t b { font-size: 14px; }
.ra-t small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.ra-ok { flex: none; font-style: normal; color: var(--accent); opacity: 0; transform: scale(.5); transition: opacity .2s, transform .35s var(--ease-spring); }
.ra-ok svg { width: 16px; height: 16px; }
.ra-opt.on .ra-ok { opacity: 1; transform: none; }
.room-tags { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; }
.room-tags em { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 99px; font-style: normal; font-size: 11.5px; font-weight: 700; color: #1c1306; background: #f5b54a; }
.room-tags em svg { width: 12px; }
/* Настройки → Соцсети */
.st-socials { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 6px; }
.st-social { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.st-social:focus-within { border-color: rgb(var(--tint) / .55); }
.st-social-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.st-social-ic svg { width: 18px; height: 18px; }
.st-social-f { flex: 1; min-width: 0; display: grid; gap: 2px; }
.st-social-f small { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.st-social-f input { width: 100%; height: 26px; padding: 0; border: 0; background: transparent; color: var(--text); font: 500 14px var(--font); outline: none; }
/* «Хочу посмотреть» — статус фильма */
.wl-st { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 28px; padding: 0 11px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.wl-st svg { width: 13px; }
.wl-st.ok { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.wl-st.soon { color: var(--accent); background: rgb(var(--tint) / .12); }
.wl-st.wait { color: var(--muted); background: var(--surface-2); }
/* ---------- Достижения ---------- */
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 30px; }
.ach { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); opacity: .6; transition: transform .35s var(--ease-spring), opacity .2s; }
.ach:hover { transform: translateY(-2px); opacity: .85; }
.ach.got { opacity: 1; border-color: rgb(var(--tint) / .4); background: linear-gradient(135deg, rgb(var(--tint) / .12), transparent 70%), var(--surface); }
.ach-ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); color: var(--faint); }
.ach.got .ach-ic { background: linear-gradient(135deg, #f5b54a, #ff7a45); color: #1c1306; box-shadow: 0 8px 20px -10px rgba(245, 181, 74, .8); }
.ach-ic svg { width: 20px; }
.ach-t { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ach-t b { font-size: 14px; }
.ach-t small { font-size: 12px; color: var(--muted); }
.ach-bar { display: block; height: 4px; border-radius: 4px; background: var(--surface-2); position: relative; overflow: hidden; }
.ach-bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 4px; background: var(--accent); }
/* ---------- «Твой год в кино» ---------- */
.pf-wrapped { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding: 16px 20px; border-radius: 22px; color: var(--text); border: 1px solid rgb(var(--tint) / .35); background: radial-gradient(120% 160% at 0% 0%, rgba(245, 181, 74, .22), transparent 55%), radial-gradient(120% 160% at 100% 100%, rgba(255, 122, 69, .18), transparent 55%), var(--surface); transition: transform .35s var(--ease-spring), border-color .2s; }
.pf-wrapped:hover { transform: translateY(-2px); border-color: rgb(var(--tint) / .6); }
.pf-wrapped > span:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: 3px; }
.pf-wrapped b { font: 600 17px var(--font-display, Unbounded, sans-serif); }
.pf-wrapped small { color: var(--muted); font-size: 13px; }
.pfw-ic { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: linear-gradient(135deg, #f5b54a, #ff7a45); color: #1c1306; }
.pfw-ic svg, .pfw-go svg { width: 20px; }
.pfw-go { flex: none; color: var(--accent); }
.wr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 110px; padding-bottom: 40px; }
.wr-stage { position: relative; width: min(400px, calc(100vw - 32px)); aspect-ratio: 9 / 16; border-radius: 28px; overflow: hidden; background: #0b0a09; box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08); user-select: none; touch-action: manipulation; cursor: pointer; }
.wr-cards, .wr-card { position: absolute; inset: 0; width: 100%; height: 100%; }
.wr-card { opacity: 0; transform: scale(1.04); transition: opacity .45s ease, transform .7s var(--ease-smooth, ease); }
.wr-card.on { opacity: 1; transform: none; }
.wr-bars { position: absolute; z-index: 3; top: 12px; left: 14px; right: 14px; display: flex; gap: 5px; }
.wr-bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .25); overflow: hidden; position: relative; }
.wr-bars i::after { content: ''; position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: #fff; }
.wr-bars i.done::after { transform: none; }
.wr-bars i.run::after { animation: wrBar var(--d, 6s) linear forwards; }
.wr-stage.paused .wr-bars i.run::after { animation-play-state: paused; }
@keyframes wrBar { to { transform: none; } }
.wr-nav { position: absolute; z-index: 3; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; color: #fff; background: rgba(0, 0, 0, .35); backdrop-filter: blur(8px); opacity: 0; transition: opacity .2s; cursor: pointer; }
.wr-nav svg { width: 18px; }
.wr-nav.prev { left: 10px; }
.wr-nav.next { right: 10px; }
.wr-nav.next svg { transform: scaleX(-1); }
.wr-stage:hover .wr-nav { opacity: 1; }
.wr-loading, .wr-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 30px; text-align: center; color: #f4efe9; }
.wr-empty svg { width: 40px; color: #f5b54a; }
.wr-empty b { font: 600 20px var(--font-display, Unbounded, sans-serif); }
.wr-empty p { margin: 0; color: rgba(244, 239, 233, .7); font-size: 14px; }
.wr-side { display: grid; gap: 16px; align-content: start; padding-top: 10px; }
.wr-side .eyebrow { justify-self: start; }
.wr-side h1 { margin: 0; font: 600 clamp(30px, 4vw, 48px)/1.1 var(--font-display, Unbounded, sans-serif); }
.wr-side > p { margin: 0; max-width: 520px; }
.wr-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.wr-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.wr-thumb { display: grid; gap: 6px; justify-items: center; padding: 0; border: 0; background: none; color: var(--muted); font: 600 12px var(--font); cursor: pointer; }
.wr-thumb canvas { width: 66px; height: 117px; border-radius: 10px; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .2s, transform .3s var(--ease-spring); }
.wr-thumb:hover canvas { transform: translateY(-2px); }
.wr-thumb.on { color: var(--text); }
.wr-thumb.on canvas { outline-color: var(--accent); }
.wr-note { font-size: 12.5px; max-width: 520px; }
@media (max-width: 860px) {
  .wr { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 24px; padding-top: 90px; }
  .wr-side { justify-items: center; text-align: center; }
  .wr-side .eyebrow { justify-self: center; }
  .wr-thumbs, .wr-actions { justify-content: center; }
}