/* =====================================================================
   x-live · ui2.css  (2.1.0)
   Новая мобильная нижняя панель + лист «Ещё», экран «Люди» (по алфавиту),
   полоса «друзья в сети» над лентой, баннер приглашения в эфир и общая
   полировка. Загружается ПОСЛЕ style/extra/theme.css и опирается на их
   токены (--bg --ink --muted --line --panel --glass --accent --accent-ink),
   поэтому одинаково работает во всех темах.
   ===================================================================== */

:root {
  --ok: #22c55e;
  --ok-soft: rgba(34, 197, 94, .18);
  --live: #ff3b4e;
  --radius: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------------------------------------------------------------------
   Нижняя панель (только телефон). Старый .sidebar на телефоне скрыт:
   вместо девяти иконок — пять вкладок и лист «Ещё».
   --------------------------------------------------------------------- */
.tabbar, .more-sheet { display: none; }

@media (max-width: 760px) {
  .sidebar { display: none !important; }
  .app-shell { display: block; }
  .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }
  #toast { bottom: calc(92px + env(safe-area-inset-bottom)) !important; }

  .tabbar {
    display: grid;
    grid-template-columns: 1fr 1fr 78px 1fr 1fr;
    align-items: stretch;
    position: fixed;
    left: 10px; right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 40;
    height: 64px;
    padding: 0 4px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 26px;
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    backdrop-filter: blur(20px) saturate(1.5);
    box-shadow: 0 12px 36px rgba(0, 0, 0, .2), 0 1px 0 rgba(255, 255, 255, .08) inset;
  }
  .tab {
    appearance: none; -webkit-appearance: none;
    border: 0; background: transparent; color: var(--muted);
    display: grid; justify-items: center; align-content: center; gap: 4px;
    padding: 8px 0 7px;
    font: 700 10.5px/1 Manrope, system-ui, sans-serif;
    letter-spacing: .15px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    transition: color .2s;
  }
  .tab svg { width: 23px; height: 23px; display: block; transition: transform .25s var(--ease); }
  .tab-ico { position: relative; display: grid; place-items: center; }
  .tab.active { color: var(--ink); }
  .tab.active svg { transform: translateY(-1px) scale(1.08); }
  .tab.active:not(.tab-create)::after {
    content: ''; position: absolute; top: 6px; left: 50%; width: 18px; height: 3px;
    margin-left: -9px; border-radius: 3px; background: var(--accent);
  }
  .tab:active svg { transform: scale(.9); }

  /* Центральная кнопка «Создать» приподнята над панелью. */
  .tab-create { align-content: center; justify-items: center; padding: 0; color: var(--accent-ink); }
  .tab-create .plus {
    width: 54px; height: 46px; border-radius: 18px;
    display: grid; place-items: center;
    background: var(--accent); color: var(--accent-ink);
    transform: translateY(-14px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .28), 0 0 0 5px var(--bg);
    transition: transform .25s var(--ease), box-shadow .25s;
  }
  .tab-create .plus svg { width: 24px; height: 24px; stroke-width: 2.4; }
  .tab-create:active .plus { transform: translateY(-12px) scale(.94); }

  /* Бейджи и «живая» точка */
  .tab-badge {
    position: absolute; top: -7px; left: calc(50% + 5px);
    min-width: 17px; height: 17px; padding: 0 5px;
    border-radius: 99px; background: var(--ok); color: #04210f;
    font: 800 10px/17px Manrope, sans-serif; font-style: normal; text-align: center;
    box-shadow: 0 0 0 2px var(--panel);
  }
  .tab-badge.hidden, .tab-dot { display: none; }
  .tab-dot.on {
    display: block; position: absolute; top: -3px; left: calc(50% + 7px);
    width: 9px; height: 9px; border-radius: 50%; background: var(--live);
    box-shadow: 0 0 0 2px var(--panel);
    animation: xl-pulse 1.6s ease-in-out infinite;
  }

  /* Лист «Ещё» */
  .more-sheet { display: block; position: fixed; inset: 0; z-index: 60; pointer-events: none; }
  .more-backdrop {
    position: absolute; inset: 0; background: rgba(0, 0, 0, .46);
    opacity: 0; transition: opacity .28s;
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  }
  .more-panel {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: var(--bg); color: var(--ink);
    border: 1px solid var(--line); border-bottom: 0;
    border-radius: 28px 28px 0 0;
    padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(105%);
    transition: transform .34s var(--ease);
    box-shadow: 0 -24px 60px rgba(0, 0, 0, .3);
    max-height: 86vh; overflow-y: auto;
  }
  .more-sheet.open { pointer-events: auto; }
  .more-sheet.open .more-backdrop { opacity: 1; }
  .more-sheet.open .more-panel { transform: none; }
  body.sheet-open { overflow: hidden; }
  .more-grip { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 2px auto 14px; }
}

.sheet-me {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px; margin-bottom: 14px; text-align: left;
  border: 1px solid var(--line); border-radius: 18px; background: var(--glass); color: var(--ink);
  font: 600 13px Manrope, sans-serif;
}
.sheet-me b { display: block; font: 800 15px Manrope, sans-serif; }
.sheet-me small { color: var(--muted); font-weight: 600; }
.sheet-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 800 15px Manrope, sans-serif;
}
.more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.more-item {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 8px;
  min-height: 82px; padding: 12px 4px 10px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--glass); color: var(--ink);
  font: 700 11px/1.15 Manrope, sans-serif; text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s, background .2s;
}
.more-item svg { width: 24px; height: 24px; }
.more-item:active { transform: scale(.95); }
.more-item.active { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.more-item em {
  position: absolute; top: 6px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: var(--live); color: #fff; font: 800 10px/18px Manrope, sans-serif; font-style: normal;
}
.more-item em.hidden { display: none; }
.more-link { display: block; margin: 16px 0 0; text-align: center; color: var(--muted); font: 600 12px Manrope, sans-serif; text-decoration: underline; text-underline-offset: 3px; }

@keyframes xl-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .65; } }

/* ---------------------------------------------------------------------
   Полоса «друзья в сети» над лентой
   --------------------------------------------------------------------- */
.online-strip {
  display: flex; align-items: center; gap: 14px;
  max-width: 572px; margin: 10px auto 0; padding: 10px 14px;
  overflow-x: auto; scrollbar-width: none;
  border: 1px solid var(--line); border-radius: 20px; background: var(--glass);
}
.online-strip::-webkit-scrollbar { display: none; }
.online-strip.hidden { display: none; }
.strip-title { flex: none; font: 800 9.5px/1.25 "DM Mono","JetBrains Mono", monospace; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); max-width: 58px; }
.strip-item { flex: none; display: grid; justify-items: center; gap: 5px; border: 0; background: none; color: var(--ink); padding: 0; -webkit-tap-highlight-color: transparent; }
.strip-item small { font: 600 10.5px Manrope, sans-serif; max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.strip-item .pavatar { width: 46px; height: 46px; }
.strip-all { flex: none; align-self: center; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 999px; padding: 7px 12px; font: 700 12px Manrope, sans-serif; }
@media (max-width: 760px) { .online-strip { margin: 8px 10px 0; max-width: none; } }

/* ---------------------------------------------------------------------
   Экран «Люди»
   --------------------------------------------------------------------- */
.people-wrap { max-width: 760px; margin: 0 auto; padding: 34px 20px 48px; }
.people-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding: 0 0 16px; }
.people-sub { display: block; margin-top: 6px; color: var(--muted); font: 600 13px Manrope, sans-serif; }

.presence-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 10px 8px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass); color: var(--ink);
  font: 700 12px Manrope, sans-serif; cursor: pointer;
}
.pt-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); transition: .2s; }
.pt-switch { position: relative; width: 36px; height: 21px; border-radius: 99px; background: var(--line); transition: background .2s; }
.pt-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); transition: transform .22s var(--ease); }
.presence-toggle.on .pt-dot { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.presence-toggle.on .pt-switch { background: var(--ok); }
.presence-toggle.on .pt-switch::after { transform: translateX(15px); }

.people-tools { display: grid; gap: 10px; padding: 4px 0 12px; }
.people-search {
  display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--glass); color: var(--muted);
}
.people-search svg { width: 18px; height: 18px; flex: none; }
.people-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: 600 14px Manrope, sans-serif; }
.people-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ok-soft); }

.people-filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.people-filters::-webkit-scrollbar { display: none; }
.pf {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font: 700 12.5px Manrope, sans-serif; white-space: nowrap;
  transition: background .2s, color .2s;
}
.pf b { font: 600 11px "DM Mono","JetBrains Mono", monospace; opacity: .8; }
.pf.active { background: var(--accent); color: var(--accent-ink); border-color: transparent; }

.only-online { display: inline-flex; align-items: center; gap: 9px; justify-self: start; color: var(--muted); font: 700 12.5px Manrope, sans-serif; cursor: pointer; }
.only-online input { position: absolute; opacity: 0; pointer-events: none; }
.oo-box { width: 20px; height: 20px; border-radius: 7px; border: 1.5px solid var(--line); display: grid; place-items: center; transition: .2s; }
.only-online input:checked + .oo-box { background: var(--ok); border-color: var(--ok); }
.only-online input:checked + .oo-box::after { content: ''; width: 5px; height: 9px; border: solid #04210f; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.only-online input:focus-visible + .oo-box { outline: 2px solid var(--accent); outline-offset: 2px; }

.people-body { position: relative; }
.people-list { padding-right: 26px; }
.pgroup { margin-top: 4px; scroll-margin-top: 76px; }
.pletter {
  position: sticky; top: 64px; z-index: 3; margin: 0; padding: 8px 12px;
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg); color: var(--muted); border-bottom: 1px solid var(--line);
  font: 800 12px/1 "DM Mono","JetBrains Mono", monospace; letter-spacing: 2px;
}
.pletter small { font: 600 10.5px "DM Mono","JetBrains Mono", monospace; letter-spacing: 0; opacity: .7; }

.prow { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 2px; border-radius: 18px; transition: background .15s; }
.prow:hover { background: var(--glass); }
.prow-open {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  padding: 7px 8px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; border-radius: 14px;
}
.pavatar {
  position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
  font: 800 15px Manrope, sans-serif; background-size: cover; background-position: center;
}
.pdot { position: absolute; right: -1px; bottom: -1px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--bg); background: var(--muted); display: none; }
.pdot.on { display: block; background: var(--ok); box-shadow: 0 0 0 0 var(--ok-soft); animation: xl-online 2.4s ease-out infinite; }
@keyframes xl-online { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }
.pavatar.tier-vip { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #e2b856; }
.pavatar.tier-partner { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #a46bff, 0 0 14px rgba(164, 107, 255, .55); }
.pmain { display: grid; gap: 2px; min-width: 0; }
.pmain b { display: flex; align-items: center; gap: 6px; font: 800 14.5px/1.2 Manrope, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phandle { color: var(--muted); font: 600 12px Manrope, sans-serif; }
.pstatus { color: var(--muted); font: 600 11.5px Manrope, sans-serif; }
.pstatus.on { color: var(--ok); }
.pbadge { flex: none; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font: 800 10px/1 Manrope, sans-serif; font-style: normal; }
.pbadge.ver { background: var(--accent); color: var(--accent-ink); }
.pbadge.vip { background: linear-gradient(135deg, #f6dc8c, #c9962b); color: #2a1c02; }
.pbadge.partner { background: linear-gradient(135deg, #ff4fd8, #7c5cff); color: #fff; }

.pacts { display: flex; gap: 6px; flex: none; }
.pacts button {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 13px; background: transparent; color: var(--ink);
  transition: background .2s, color .2s, transform .12s;
}
.pacts button svg { width: 18px; height: 18px; }
.pacts button:hover { background: var(--accent); color: var(--accent-ink); }
.pacts button:active { transform: scale(.92); }
@media (max-width: 760px) { .pacts button[data-p-act="invite"] { display: none; } }

.people-empty { text-align: center; padding: 44px 14px; color: var(--muted); font: 600 14px/1.5 Manrope, sans-serif; }

/* Быстрый переход по буквам */
.alpha-rail {
  position: fixed; right: 4px; top: 52%; transform: translateY(-50%); z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  max-height: 72vh; overflow-y: auto; scrollbar-width: none; padding: 6px 0;
  border-radius: 99px; background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.alpha-rail::-webkit-scrollbar { display: none; }
.alpha-rail:empty { display: none; }
.alpha-rail button { border: 0; background: none; color: var(--muted); font: 800 10.5px/1 "DM Mono","JetBrains Mono", monospace; padding: 4px 7px; cursor: pointer; }
.alpha-rail button:hover, .alpha-rail button:active { color: var(--ink); transform: scale(1.35); }
#people-view:not(.active) .alpha-rail { display: none; }
@media (max-width: 760px) { .people-wrap { padding: 20px 12px 24px; } .alpha-rail { right: 2px; } .people-list { padding-right: 24px; } .pletter { top: 56px; } }

/* ---------------------------------------------------------------------
   Баннер «зовут в эфир»
   --------------------------------------------------------------------- */
.invite-banner {
  position: fixed; left: 50%; top: 14px; z-index: 90; width: min(94vw, 420px);
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 20px;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
  transform: translate(-50%, -150%); opacity: 0; transition: transform .4s var(--ease), opacity .3s;
}
.invite-banner.show { transform: translate(-50%, 0); opacity: 1; }
.inv-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--live); animation: xl-pulse 1.4s infinite; }
.inv-text { flex: 1; min-width: 0; display: grid; gap: 2px; font: 600 13px Manrope, sans-serif; }
.inv-text b { font-weight: 800; }
.inv-text small { color: var(--muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-go { border: 0; border-radius: 12px; padding: 9px 16px; background: var(--accent); color: var(--accent-ink); font: 800 13px Manrope, sans-serif; }
.inv-x { border: 0; background: none; color: var(--muted); font-size: 22px; line-height: 1; padding: 4px 6px; }

/* ---------------------------------------------------------------------
   Общая полировка
   --------------------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
.nav-item { border-radius: 12px; }
.nav-item em { font-family: Manrope, sans-serif; font-weight: 800; }
#people-badge:not(.hidden) { background: var(--ok); color: #04210f; }

@media (prefers-reduced-motion: reduce) {
  .tab-dot.on, .pdot.on, .inv-dot { animation: none; }
  .more-panel, .more-backdrop, .invite-banner { transition: none; }
}

/* Подсказка поверх сцены эфира (например, «видео-места заняты») */
.rtc-note {
  position: absolute; left: 50%; bottom: 14px; z-index: 6; transform: translateX(-50%);
  width: min(92%, 440px); padding: 10px 14px; border-radius: 14px; text-align: center;
  background: rgba(10, 10, 12, .78); color: #fff; border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font: 600 12.5px/1.4 Manrope, system-ui, sans-serif; pointer-events: none;
}

/* Светлый «бумажный» отблеск body:before из style.css на тёмных темах превращался в серое пятно
   в левом верхнем углу: на тёмных палитрах делаем его еле заметным. */
html[data-theme="midnight"] body:before,
html[data-theme="neon"] body:before,
html[data-theme="berry"] body:before {
  background: linear-gradient(120deg, rgba(255, 255, 255, .045), transparent 40%);
}

/* ---------------------------------------------------------------------
   Экран звонка: «Принять» был кружком 58 px с подписью, вылезавшей под красную «Отклонить»
   (на телефоне нажатие на «Принять» попадало в «Отклонить»). Обе кнопки — нормальные таблетки рядом.
   --------------------------------------------------------------------- */
#call-overlay .call-buttons { gap: 16px; flex-wrap: wrap; padding: 0 16px; }
#call-overlay .call-buttons button { height: 62px; min-width: 62px; border-radius: 31px; font: 800 16px Manrope, system-ui, sans-serif; }
#call-overlay .call-buttons #call-accept { width: auto; min-width: 132px; padding: 0 28px; background: #22c55e; color: #04210f; }
#call-overlay .call-buttons #call-end { width: auto; min-width: 132px; padding: 0 28px; background: #ef4444; color: #fff; font-size: 16px; }
#call-overlay .call-buttons #call-mute, #call-overlay .call-buttons #call-cam { width: 62px; padding: 0; font-size: 22px; }
#call-overlay .call-buttons #call-mute.off, #call-overlay .call-buttons #call-cam.off { background: rgba(255, 255, 255, .28); text-decoration: line-through; }
#call-overlay .call-avatar { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); animation: xl-ring 1.8s ease-out infinite; }
@keyframes xl-ring { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .5); } 70%, 100% { box-shadow: 0 0 0 26px rgba(34, 197, 94, 0); } }
@media (prefers-reduced-motion: reduce) { #call-overlay .call-avatar { animation: none; } }

/* ---------------------------------------------------------------------
   Эфирная: чужие видео не зеркалим (зеркалилось всё подряд — надписи в кадре были задом наперёд;
   зеркало нужно только своему превью), а подпись «Эфир не запущен / Нажмите «Начать эфир»»
   во время эфира превращается в компактную плашку LIVE сверху и не лежит поверх плиток.
   --------------------------------------------------------------------- */
.stream-frame video.guest-video, .stream-frame video.host-remote { transform: none; }
.stage.is-live .live-overlay {
  left: 50%; right: auto; top: 12px; bottom: auto; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; max-width: 58%;
  padding: 5px 12px; border-radius: 999px; background: rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-shadow: none; pointer-events: none;
}
.stage.is-live .live-overlay small { display: none; }
.stage.is-live .live-overlay b { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage.is-live .live-overlay .live-pill { font-size: 10px; }
@media (max-width: 760px) { .content { padding-bottom: calc(120px + env(safe-area-inset-bottom)) !important; } }

/* ---------------------------------------------------------------------
   «+»: выбор, что создать — слева «Загрузить», справа «LIVE» (как в TikTok)
   --------------------------------------------------------------------- */
.create-sheet { position: fixed; inset: 0; z-index: 62; pointer-events: none; display: block; }
.create-sheet .more-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .46); opacity: 0; transition: opacity .28s; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.create-panel {
  position: absolute; left: 0; right: 0; bottom: 0; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0;
  padding: 10px 18px calc(26px + env(safe-area-inset-bottom));
  transform: translateY(105%); transition: transform .34s var(--ease); box-shadow: 0 -24px 60px rgba(0, 0, 0, .3);
}
.create-sheet.open { pointer-events: auto; }
.create-sheet.open .more-backdrop { opacity: 1; }
.create-sheet.open .create-panel { transform: none; }
.create-panel .more-grip { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 2px auto 12px; }
.create-kicker { text-align: center; margin: 0 0 14px; font: 800 10.5px "DM Mono","JetBrains Mono", monospace; letter-spacing: 2px; color: var(--muted); }
.create-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.create-opt {
  display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 132px; padding: 14px 6px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--glass); color: var(--ink); text-align: center;
  -webkit-tap-highlight-color: transparent; transition: transform .15s;
}
.create-opt svg { width: 30px; height: 30px; }
.create-opt b { font: 800 15px Manrope, system-ui, sans-serif; }
.create-opt small { font: 600 10.5px/1.25 Manrope, system-ui, sans-serif; color: var(--muted); }
.create-opt:active { transform: scale(.96); }
.create-opt.live { background: linear-gradient(135deg, #ff3b4e, #ff2d86); color: #fff; border-color: transparent; box-shadow: 0 12px 28px rgba(255, 59, 78, .35); }
.create-opt.live small { color: rgba(255, 255, 255, .88); }
@media (min-width: 761px) {
  .create-panel { left: 50%; right: auto; bottom: auto; top: 50%; width: min(560px, 92vw); border-radius: 28px; border-bottom: 1px solid var(--line);
    transform: translate(-50%, -44%) scale(.96); opacity: 0; transition: transform .3s var(--ease), opacity .25s; }
  .create-sheet.open .create-panel { transform: translate(-50%, -50%); opacity: 1; }
  .create-panel .more-grip { display: none; }
}
@media (prefers-reduced-motion: reduce) { .create-panel, .create-sheet .more-backdrop { transition: none; } }

/* ---------------------------------------------------------------------
   Контраст на тёмных темах
   — включённый тумблер в настройках был фиксированно чёрным (#111) и сливался с тёмным фоном: теперь цвет акцента темы;
   — плавающая нижняя панель на светлых темах просвечивала тёмное видео ленты, и подписи вкладок терялись: фон плотнее;
   — заголовки групп подарков были 9 px.
   --------------------------------------------------------------------- */
.switch2 { background: var(--line); }
@supports (color: color-mix(in srgb, red, blue)) { .switch2 { background: color-mix(in srgb, var(--ink) 24%, transparent); } }
.switch2.on { background: var(--accent); }
.switch2.on:after { background: var(--accent-ink); }
.gift-group-title { font-size: 10.5px; letter-spacing: .06em; color: var(--ink); opacity: .72; }
@media (max-width: 760px) {
  .tabbar { background: var(--bg); }
  @supports (color: color-mix(in srgb, red, blue)) { .tabbar { background: color-mix(in srgb, var(--bg) 92%, transparent); } }
  .tab { color: color-mix(in srgb, var(--ink) 62%, var(--bg)); }
}

/* ---------------------------------------------------------------------
   Рамки плиток эфира (как в TikTok): неон, радуга, сердца, огонь, а также «Золото» (VIP) и «Голограмма» (партнёр).
   Кольцо рисуется градиентом с маской поверх плитки — видео и подписи не смещаются.
   Угловой значок снизу справа: сверху справа у плитки меню участника.
   --------------------------------------------------------------------- */
:is(.stream-frame, .frame-swatch)[data-frame] { --fw: 3px; --fd: 4s; --frame-bg: none; --frame-glow: transparent; }
:is(.stream-frame, .frame-swatch)[data-frame="neon"] { --frame-bg: linear-gradient(135deg, #00f0ff, #7a5cff, #ff2bd6, #7a5cff, #00f0ff); --frame-glow: rgba(0, 240, 255, .6); --fd: 5s; }
:is(.stream-frame, .frame-swatch)[data-frame="rainbow"] { --frame-bg: linear-gradient(90deg, #ff3b3b, #ffb300, #ffee33, #37e06b, #27c7ff, #7a5cff, #ff3bd0, #ff3b3b); --frame-glow: rgba(255, 255, 255, .35); --fd: 3.5s; }
:is(.stream-frame, .frame-swatch)[data-frame="hearts"] { --frame-bg: linear-gradient(135deg, #ff7eb6, #ff2d6f, #ffb3d1, #ff2d6f, #ff7eb6); --frame-glow: rgba(255, 45, 111, .55); --fd: 4.5s; }
:is(.stream-frame, .frame-swatch)[data-frame="fire"] { --frame-bg: linear-gradient(0deg, #ff2d00, #ff8a00, #ffd23f, #ff8a00, #ff2d00); --frame-glow: rgba(255, 110, 0, .6); --fd: 1.8s; }
:is(.stream-frame, .frame-swatch)[data-frame="gold"] { --frame-bg: linear-gradient(135deg, #7a5a14, #f7e08a, #c9a227, #fff3b8, #a67c00, #7a5a14); --frame-glow: rgba(247, 200, 80, .5); --fw: 4px; --fd: 3s; }
:is(.stream-frame, .frame-swatch)[data-frame="holo"] { --frame-bg: linear-gradient(120deg, #7df9ff, #c4a3ff, #ffb3e6, #9dffd6, #7df9ff); --frame-glow: rgba(160, 140, 255, .6); --fw: 4px; --fd: 3s; }
:is(.stream-frame, .frame-swatch)[data-frame]:not([data-frame="none"])::after {
  content: ""; position: absolute; inset: 0; z-index: 6; border-radius: inherit; padding: var(--fw); pointer-events: none;
  background: var(--frame-bg); background-size: 200% 200%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: xl-frame-flow var(--fd) linear infinite;
}
.stream-frame[data-frame]:not([data-frame="none"]) { box-shadow: 0 0 14px var(--frame-glow); animation: xl-frame-glow var(--fd) ease-in-out infinite; }
@keyframes xl-frame-flow { to { background-position: 200% 200%; } }
@keyframes xl-frame-glow { 0%, 100% { box-shadow: 0 0 8px var(--frame-glow); } 50% { box-shadow: 0 0 26px var(--frame-glow); } }
.frame-badge { position: absolute; left: 50%; bottom: 9px; transform: translateX(-50%); z-index: 7; font-style: normal; font-size: 15px; line-height: 1; padding: 4px 6px; border-radius: 999px; background: rgba(0, 0, 0, .5); backdrop-filter: blur(6px); pointer-events: none; }

/* Панель плитки стала из трёх кнопок: на телефоне кнопки компактнее, плашка LIVE уже, а меню гостя «⋮» ниже панели (раньше панель его перекрывала). */
.stream-frame.guest .frame-menu { top: 46px; }
.stage.is-live .live-overlay b { min-width: 0; }
.stage.is-live .live-overlay .live-pill { flex: none; white-space: nowrap; }
@media (max-width: 760px) {
  .live-layout-tools { gap: 4px; }
  .live-layout-tools .layout-btn { width: 28px; height: 28px; border-radius: 8px; }
  .stage.is-live .live-overlay { max-width: calc(100% - 216px); }
}

/* Выбор рамки */
.frame-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 4px; }
.frame-opt { display: grid; justify-items: center; gap: 6px; padding: 10px 4px 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink); cursor: pointer; font: 800 11.5px Manrope, system-ui, sans-serif; overflow-wrap: anywhere; transition: transform .15s var(--ease); }
.frame-opt:active { transform: scale(.96); }
.frame-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.frame-opt small { font: 600 10px Manrope, system-ui, sans-serif; color: var(--muted); min-height: 12px; }
.frame-swatch { position: relative; display: grid; place-items: center; width: 54px; height: 72px; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, #2c2c2c, #0d0d0d); font-size: 20px; color: #fff; }
.frame-swatch i { position: relative; z-index: 7; font-style: normal; }
.frame-swatch[data-frame="none"] { background: transparent; border: 1.5px dashed var(--line); color: var(--muted); }
.frame-opt.locked .frame-swatch { filter: saturate(.75); }
.frame-hint { margin: 8px 2px 0; font: 600 11px/1.4 Manrope, system-ui, sans-serif; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  :is(.stream-frame, .frame-swatch)[data-frame]::after, .stream-frame[data-frame] { animation: none; }
}
