:root { --tt-red: var(--hot, #fe2c55); }
/* =====================================================================
   x-live · tiktok.css (2.4.0) — оформление «как в TikTok».
   Подключается последним. Всё под html.tt, поэтому перекрывает старые слои
   (style / extra / theme / ui2), не трогая их.
   ===================================================================== */
html.tt { --tt-red: var(--hot, #fe2c55); --tt-cyan: #25f4ee; --tt-bar: 56px; }
html.tt .tt-hidden { display: none !important; }
html.tt .tt-live-btn, html.tt .tt-search-btn { display: none; }

/* ---------------------------------------------------------------------
   Нижняя панель (телефон): ровная полоса во всю ширину, как в TikTok
   --------------------------------------------------------------------- */
@media (max-width: 760px) {
  html.tt .tabbar {
    left: 0; right: 0; bottom: 0; height: calc(var(--tt-bar) + env(safe-area-inset-bottom));
    padding: 0 4px env(safe-area-inset-bottom); border: 0; border-top: 1px solid var(--line); border-radius: 0;
    grid-template-columns: repeat(2, 1fr) 72px repeat(2, 1fr);
    background: var(--bg); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  html.tt .tab { padding: 6px 0 4px; gap: 3px; font: 600 10px/1 Manrope, system-ui, sans-serif; color: var(--muted); }
  html.tt .tab svg { width: 25px; height: 25px; }
  html.tt .tab.active { color: var(--ink); font-weight: 800; }
  html.tt .tab.active svg { transform: none; stroke-width: 2.3; }
  html.tt .tab.active:not(.tab-create)::after { display: none; }
  /* «+» — белая пилюля с бирюзовым и красным краем */
  html.tt .tab-create .plus {
    position: relative; width: 46px; height: 30px; margin: 0; transform: none; border-radius: 9px; display: grid; place-items: center;
    background: var(--ink); color: var(--bg); box-shadow: -3px 0 0 var(--tt-cyan), 3px 0 0 var(--tt-red); border: 0;
  }
  html.tt .tab-create .plus svg { width: 20px; height: 20px; stroke-width: 2.6; }
  html.tt .content { padding-bottom: calc(var(--tt-bar) + 16px + env(safe-area-inset-bottom)) !important; }
  html.tt #toast { bottom: calc(var(--tt-bar) + 18px + env(safe-area-inset-bottom)) !important; }

  /* на ленте и в эфире панель тёмная, как в TikTok */
  html.tt body.tt-feed .tabbar, html.tt body.live-cinema .tabbar { background: #000; border-top-color: rgba(255, 255, 255, .12); }
  html.tt body.tt-feed .tab, html.tt body.live-cinema .tab { color: rgba(255, 255, 255, .62); }
  html.tt body.tt-feed .tab.active, html.tt body.live-cinema .tab.active { color: #fff; }
  html.tt body.tt-feed .tab-create .plus, html.tt body.live-cinema .tab-create .plus { background: #fff; color: #000; }
}

/* ---------------------------------------------------------------------
   Лента на телефоне: во весь экран, по одному видео, свайп вверх/вниз
   --------------------------------------------------------------------- */
@media (max-width: 760px) {
  html.tt body.tt-feed { background: #000; overflow: hidden; overscroll-behavior: none; }
  html.tt body.tt-feed .content { padding: 0 !important; }
  html.tt body.tt-feed #online-strip { display: none !important; }
  html.tt body.tt-feed #feed-view.view.active { animation: none; }
  html.tt body.tt-feed #feed {
    position: fixed; inset: 0 0 calc(var(--tt-bar) + env(safe-area-inset-bottom)) 0; z-index: 1;
    max-width: none; margin: 0; padding: 0; overflow-y: auto; overflow-x: hidden;
    scroll-snap-type: y mandatory; overscroll-behavior: contain; background: #000; scrollbar-width: none;
  }
  html.tt body.tt-feed #feed::-webkit-scrollbar { display: none; }
  html.tt body.tt-feed #feed .post {
    position: relative; display: block; height: 100%; min-height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0;
    scroll-snap-align: start; scroll-snap-stop: always; background: #000; overflow: hidden;
    /* Каждый пост — отдельный слой: ролик предыдущего поста не может
       «просочиться» поверх следующего при инерционной прокрутке. */
    isolation: isolate; contain: paint;
  }
  html.tt body.tt-feed #feed .post + .post { margin-top: 0; }
  html.tt body.tt-feed #feed .post > .avatar,
  html.tt body.tt-feed #feed .post-head,
  html.tt body.tt-feed #feed .post .actions,
  html.tt body.tt-feed #feed .media .play,
  html.tt body.tt-feed #feed .media-footer .views { display: none !important; }
  html.tt body.tt-feed #feed .post-main { position: absolute; inset: 0; }
  html.tt body.tt-feed #feed .media {
    position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; margin: 0;
    border-radius: 0; box-shadow: none; border: 0; background: #000;
  }
  html.tt body.tt-feed #feed .media::before { border-radius: 0; }
  html.tt body.tt-feed #feed .media::after { background: linear-gradient(0deg, rgba(0, 0, 0, .62), transparent 34%), linear-gradient(180deg, rgba(0, 0, 0, .38), transparent 18%); }
  html.tt body.tt-feed #feed .media-video { object-fit: cover; }
  html.tt body.tt-feed #feed .media-img { object-fit: cover; }
  html.tt body.tt-feed #feed .media-video.tt-wide { object-fit: contain; }

  /* правая колонка: аватар с «+», лайк, комментарии, сохранить, поделиться, диск */
  html.tt body.tt-feed #feed .rail { right: 8px; bottom: 96px; gap: 16px; z-index: 4; }
  html.tt body.tt-feed #feed .rail-btn { font-size: 0; gap: 4px; min-width: 52px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); }
  html.tt body.tt-feed #feed .rail-btn small { font: 700 12px/1.1 Manrope, system-ui, sans-serif; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); letter-spacing: 0; }
  html.tt body.tt-feed #feed .rail-btn .tt-ico svg { width: 36px; height: 36px; fill: #fff; display: block; }
  html.tt body.tt-feed #feed .rail-btn[data-tt="like"].liked .tt-ico svg { fill: var(--tt-red); }
  html.tt body.tt-feed #feed .rail-btn[data-tt="save"].saved .tt-ico svg { fill: #ffc53d; }
  html.tt body.tt-feed #feed .rail-btn:active .tt-ico { transform: scale(.88); }
  html.tt body.tt-feed #feed .rail-btn[data-profile] { margin-bottom: 6px; }
  html.tt body.tt-feed #feed .rail-btn > b {
    width: 48px; height: 48px; font-size: 16px; border: 2px solid #fff; background: #222; overflow: visible;
  }
  html.tt body.tt-feed #feed .rail-btn > b img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
  html.tt body.tt-feed #feed .rail-btn > b > i {
    width: 20px; height: 20px; right: 50%; margin-right: -10px; bottom: -10px; background: var(--tt-red); font-size: 15px; line-height: 20px; border: 0;
  }

  /* подпись снизу слева */
  html.tt body.tt-feed #feed .post-copy {
    position: absolute; z-index: 4; left: 12px; right: 84px; bottom: 54px; margin: 0; padding: 0;
    color: #fff; font: 500 14.5px/1.4 Manrope, system-ui, sans-serif; text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; pointer-events: auto;
  }
  html.tt body.tt-feed #feed .post-copy b { display: block; margin-bottom: 4px; color: #fff; font: 800 16px/1.2 Manrope, system-ui, sans-serif; }
  html.tt body.tt-feed #feed .post-copy .hashtag, html.tt body.tt-feed #feed .post-copy .mention { color: #fff; font-weight: 800; background: none; border: 0; padding: 0; }
  html.tt body.tt-feed #feed .media-footer { left: 12px; right: 84px; bottom: 16px; z-index: 4; }
  html.tt body.tt-feed #feed .sound-chip {
    max-width: 100%; background: transparent; border: 0; padding: 0; color: #fff; font: 600 13px Manrope, system-ui, sans-serif;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
  }
  html.tt body.tt-feed #feed .sound-chip .mini-disc { background: none; border: 0; width: auto; height: auto; margin-right: 6px; animation: none; }
  /* вращающийся диск с аватаром автора — внизу справа */
  html.tt body.tt-feed #feed .tt-disc {
    position: absolute; z-index: 4; right: 14px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%;
    display: grid; place-items: center; overflow: hidden; color: #fff; font: 800 13px Manrope, system-ui, sans-serif;
    background: radial-gradient(circle, #555 0 22%, #111 23% 100%); border: 8px solid #1d1d1d; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12);
    animation: tt-spin 5s linear infinite; pointer-events: none;
  }
  html.tt body.tt-feed #feed .tt-disc img { width: 100%; height: 100%; object-fit: cover; }
  @keyframes tt-spin { to { transform: rotate(360deg); } }
  /* значок паузы / звука после касания */
  html.tt body.tt-feed #feed .tt-tap { position: absolute; left: 50%; top: 50%; z-index: 5; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; display: grid; place-items: center; }
  html.tt body.tt-feed #feed .tt-tap::before { color: #fff; font: 800 34px/1 Manrope, system-ui, sans-serif; }
  html.tt body.tt-feed #feed .tt-tap[data-kind="pause"]::before { content: '❚❚'; font-size: 28px; }
  html.tt body.tt-feed #feed .tt-tap[data-kind="play"]::before { content: '▶'; padding-left: 6px; }
  html.tt body.tt-feed #feed .tt-tap[data-kind="sound"]::before { content: '🔊'; font-size: 32px; }
  html.tt body.tt-feed #feed .tt-tap.show { animation: tt-tap .9s ease-out 1 forwards; }
  @keyframes tt-tap { 0% { opacity: 0; transform: scale(.7); } 15% { opacity: 1; transform: scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: scale(1.12); } }

  /* шапка поверх видео: LIVE · Подписки | Для вас · поиск */
  html.tt body.tt-feed .topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0;
    display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; gap: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent); border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  html.tt body.tt-feed .topbar .search, html.tt body.tt-feed .topbar .theme-toggle, html.tt body.tt-feed .topbar .profile-dot { display: none !important; }
  html.tt body.tt-feed .topbar .feed-switch { grid-column: 2; justify-self: center; display: flex; gap: 18px; background: none; border: 0; padding: 0; }
  html.tt body.tt-feed .topbar .feed-switch .switch {
    background: none; border: 0; padding: 6px 0; color: rgba(255, 255, 255, .7); font: 700 16.5px Manrope, system-ui, sans-serif; position: relative; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); box-shadow: none;
  }
  html.tt body.tt-feed .topbar .feed-switch .switch.active { color: #fff; font-weight: 800; }
  html.tt body.tt-feed .topbar .feed-switch .switch.active::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 26px; height: 3px; margin-left: -13px; border-radius: 2px; background: #fff; }
  html.tt body.tt-feed .tt-live-btn, html.tt body.tt-feed .tt-search-btn { display: inline-flex; }
  html.tt .tt-live-btn {
    grid-column: 1; justify-self: start; position: relative; align-items: center; justify-content: center; height: 30px; padding: 0 8px; border-radius: 7px;
    border: 2px solid #fff; background: transparent; color: #fff; font: 900 12px/1 Manrope, system-ui, sans-serif; letter-spacing: .5px; cursor: pointer;
  }
  html.tt .tt-live-btn.on { border-color: var(--tt-red); background: var(--tt-red); animation: tt-livepulse 1.8s ease-in-out infinite; }
  html.tt .tt-live-btn em { position: absolute; top: -8px; right: -9px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #fff; color: var(--tt-red); font: 900 11px/18px Manrope, system-ui, sans-serif; font-style: normal; }
  html.tt .tt-live-btn em.hidden { display: none; }
  @keyframes tt-livepulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--tt-red) 25%, transparent); } }
  html.tt .tt-search-btn { grid-column: 3; justify-self: end; width: 40px; height: 40px; align-items: center; justify-content: center; border: 0; background: none; color: #fff; cursor: pointer; }
  html.tt .tt-search-btn svg { width: 26px; height: 26px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
  html.tt body.tt-feed .empty-view, html.tt body.tt-feed #feed > p { color: #fff; padding: 120px 24px; text-align: center; }
}

/* ---------------------------------------------------------------------
   Компьютер: лента — вертикальный плеер по центру, кнопки справа от него
   --------------------------------------------------------------------- */
@media (min-width: 761px) {
  html.tt #feed { max-width: 640px; margin: 0 auto; }
  html.tt #feed .post { grid-template-columns: 56px 1fr; }
  html.tt #feed .media { max-width: 420px; aspect-ratio: 9 / 16; max-height: calc(100vh - 150px); border-radius: 14px; }
  html.tt #feed .rail-btn { font-size: 0; }
  html.tt #feed .rail-btn small { font: 700 11.5px/1.1 Manrope, system-ui, sans-serif; }
  html.tt #feed .rail-btn .tt-ico svg { width: 30px; height: 30px; fill: #fff; display: block; }
  html.tt #feed .rail-btn[data-tt="like"].liked .tt-ico svg { fill: var(--tt-red); }
  html.tt #feed .rail-btn[data-tt="save"].saved .tt-ico svg { fill: #ffc53d; }
  html.tt #feed .tt-disc, html.tt #feed .tt-tap { display: none; }
}

/* ---------------------------------------------------------------------
   Вкладка «Эфиры»: витрина идущих эфиров (плитки)
   --------------------------------------------------------------------- */
html.tt .live-hub { display: none; }
html.tt #live-view.tt-hub .live-hub { display: block; }
html.tt #live-view.tt-hub .live-studio { display: none; }
html.tt .hub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 4px 14px; }
html.tt .hub-head h1 { margin: 0; font: 900 30px/1 Manrope, system-ui, sans-serif; letter-spacing: -.5px; display: flex; align-items: center; gap: 10px; }
html.tt .hub-head h1 i { font-style: normal; font: 900 12px/1 Manrope, system-ui, sans-serif; color: #fff; background: var(--tt-red); padding: 5px 7px; border-radius: 6px; letter-spacing: .6px; }
html.tt .hub-head small { display: block; margin-top: 6px; color: var(--muted); font: 600 13px Manrope, system-ui, sans-serif; }
html.tt .hub-go {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--tt-red); color: #fff; font: 800 14px Manrope, system-ui, sans-serif; box-shadow: 0 8px 22px color-mix(in srgb, var(--tt-red) 35%, transparent);
}
html.tt .hub-go::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .3); }
html.tt .hub-go:active { transform: scale(.97); }
html.tt .hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 761px) { html.tt .hub-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; } }
html.tt .hub-tile {
  position: relative; display: block; aspect-ratio: 3 / 4.6; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer; text-align: left; color: #fff;
  background: radial-gradient(120% 80% at 50% 18%, hsl(var(--h) 70% 42%), hsl(calc(var(--h) + 40) 60% 18%) 60%, #0b0b0b);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}
html.tt .hub-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .78), transparent 46%), linear-gradient(180deg, rgba(0, 0, 0, .35), transparent 24%); pointer-events: none; }
html.tt .hub-tile:active { transform: scale(.98); }
html.tt .hub-top { position: absolute; z-index: 2; top: 8px; left: 8px; right: 8px; display: flex; justify-content: space-between; align-items: center; }
html.tt .hub-live { background: var(--tt-red); color: #fff; font: 900 10.5px/1 Manrope, system-ui, sans-serif; letter-spacing: .5px; padding: 4px 6px; border-radius: 5px; }
html.tt .hub-viewers { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 999px; background: rgba(0, 0, 0, .45); font: 700 11px/1 Manrope, system-ui, sans-serif; }
html.tt .hub-viewers svg { width: 13px; height: 13px; fill: #fff; }
html.tt .hub-av { position: absolute; z-index: 1; left: 50%; top: 40%; width: 76px; height: 76px; margin: -38px 0 0 -38px; display: grid; place-items: center; }
html.tt .hub-av b { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .35); border: 2px solid #fff; font: 900 22px Manrope, system-ui, sans-serif; }
html.tt .hub-ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--tt-red); animation: tt-ring 1.6s ease-out infinite; }
@keyframes tt-ring { 0% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1.32); opacity: 0; } }
html.tt .hub-guests { position: absolute; z-index: 2; left: 50%; top: calc(40% + 46px); transform: translateX(-50%); white-space: nowrap; font: 700 11px Manrope, system-ui, sans-serif; background: rgba(0, 0, 0, .45); padding: 3px 8px; border-radius: 999px; }
html.tt .hub-meta { position: absolute; z-index: 2; left: 10px; right: 10px; bottom: 10px; display: grid; gap: 3px; }
html.tt .hub-meta b { font: 800 14px/1.2 Manrope, system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.tt .hub-meta small { font: 500 12px/1.3 Manrope, system-ui, sans-serif; opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html.tt .hub-ok { font-style: normal; display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; background: var(--tt-cyan); color: #000; font-size: 9px; vertical-align: 1px; }
html.tt .hub-mine { position: absolute; z-index: 2; left: 8px; right: 8px; top: 34px; text-align: center; font: 800 11px Manrope, system-ui, sans-serif; background: color-mix(in srgb, var(--tt-red) 90%, transparent); border-radius: 6px; padding: 4px; }
html.tt .hub-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 6px; padding: 56px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 16px; }
html.tt .hub-empty b { color: var(--ink); font: 800 17px Manrope, system-ui, sans-serif; }
html.tt .hub-empty-ico { color: var(--tt-red); font-size: 26px; animation: tt-livepulse 1.8s ease-in-out infinite; }
/* студия: кнопка «‹» назад к витрине */
html.tt .hub-back { display: none; }
html.tt #live-view.tt-studio .hub-back {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-right: 10px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--panel); color: var(--ink); font: 700 24px/1 Manrope, system-ui, sans-serif; cursor: pointer; flex: none;
}
html.tt #live-view.tt-studio .live-heading { display: flex; align-items: center; }
html.tt #live-view.tt-studio .live-heading > div:first-of-type { flex: 1; }

/* ---------------------------------------------------------------------
   Профиль: по центру, как в TikTok
   --------------------------------------------------------------------- */
html.tt .profile-topbar { display: none; }
@media (max-width: 760px) {
  html.tt body[data-tt-view="profile"] .topbar { display: none; }
  html.tt .profile-topbar {
    display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: calc(48px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 4px 0;
    position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  html.tt .profile-topbar b { grid-column: 2; text-align: center; font: 800 16px Manrope, system-ui, sans-serif; color: var(--ink); }
  html.tt .tt-menu-btn { grid-column: 3; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--ink); cursor: pointer; }
  html.tt .tt-menu-btn svg { width: 24px; height: 24px; }
  html.tt #profile-view .profile-panel { padding: 0; border: 0; background: none; box-shadow: none; }
  html.tt #profile-view .profile-cover { display: none; }
  html.tt #profile-view .profile-info { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 18px 16px 10px; position: static; margin: 0; }
  html.tt #profile-view .profile-info .avatar.large { width: 96px; height: 96px; font-size: 34px; margin: 0; position: static; transform: none; border: 0; }
  html.tt #profile-view #profile-name { order: 1; margin: 2px 0 0; font: 800 17px Manrope, system-ui, sans-serif; letter-spacing: 0; }
  html.tt #profile-view .stats { order: 2; display: grid; grid-template-columns: repeat(3, auto); gap: 0; justify-content: center; margin: 6px 0 2px; }
  html.tt #profile-view .stats b { display: grid; justify-items: center; gap: 2px; padding: 0 16px; font: 500 12.5px Manrope, system-ui, sans-serif; color: var(--muted); position: relative; cursor: pointer; }
  html.tt #profile-view .stats b + b::before { content: ''; position: absolute; left: 0; top: 25%; height: 50%; width: 1px; background: var(--line); }
  html.tt #profile-view .stats b span { font: 800 17px Manrope, system-ui, sans-serif; color: var(--ink); }
  html.tt #profile-view .profile-actions { order: 3; display: flex; gap: 6px; justify-content: center; margin: 6px 0 0; position: static; }
  html.tt #profile-view .profile-actions button { height: 42px; padding: 0 22px; border-radius: 6px; border: 0; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); font: 700 14px Manrope, system-ui, sans-serif; }
  html.tt #profile-view #profile-bio { order: 4; margin: 4px 0 0; font: 500 13.5px/1.4 Manrope, system-ui, sans-serif; color: var(--ink); max-width: 320px; }
  html.tt #profile-view .profile-tabs { display: grid; grid-template-columns: repeat(4, 1fr); margin: 8px 0 0; border-bottom: 1px solid var(--line); position: sticky; top: calc(48px + env(safe-area-inset-top)); z-index: 4; background: var(--bg); gap: 0; padding: 0; }
  html.tt #profile-view .profile-tabs button { height: 44px; border: 0; background: none; color: var(--muted); font: 700 13px Manrope, system-ui, sans-serif; position: relative; padding: 0; border-radius: 0; }
  html.tt #profile-view .profile-tabs button.active { color: var(--ink); }
  html.tt #profile-view .profile-tabs button.active::after { content: ''; position: absolute; left: 25%; right: 25%; bottom: -1px; height: 2px; background: var(--ink); }
  html.tt #profile-view .profile-posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5px; padding: 0; margin: 0; }
  html.tt #profile-view .mini-post { aspect-ratio: 3 / 4; border-radius: 0; min-height: 0; margin: 0; }
  html.tt #profile-view .mini-post::after { content: attr(data-likes); position: absolute; left: 6px; bottom: 5px; z-index: 3; color: #fff; font: 700 12px Manrope, system-ui, sans-serif; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
  html.tt #profile-view .saved-empty, html.tt #profile-view .profile-posts > p { grid-column: 1 / -1; padding: 40px 20px; text-align: center; color: var(--muted); }
}
html.tt .live-hub { padding: 4px 14px 24px; }
@media (min-width: 761px) { html.tt .live-hub { padding: 18px 28px 40px; max-width: 1100px; } }

/* правки по первому просмотру: лента была сеткой (два видео на экран), диск уезжал влево, мини-диск закрывал название звука */
@media (max-width: 760px) {
  html.tt body.tt-feed #feed { display: block; }
  html.tt body.tt-feed #feed .tt-disc { left: auto; top: auto; }
  html.tt body.tt-feed #feed .sound-chip .mini-disc { display: none; }
  html.tt body.tt-feed #feed .sound-chip::before { content: '♫'; margin-right: 6px; }
  html.tt body:not(.tt-feed) .topbar .feed-switch { display: none; }
}

/* ---------------------------------------------------------------------
   Эфир во весь экран: шапка как в TikTok —
   ряд 1: «‹» · LIVE + название · «в эфире / зрители»;  ряд 2: кнопки эфира;
   раскладки — только у ведущего; мини-плитки гостей ниже шапки.
   --------------------------------------------------------------------- */
html.tt #live-view.cinema .live-heading > div:not(.live-status), html.tt #live-view.cinema .hub-back { display: none !important; }
html.tt #live-view.cinema .live-heading { top: calc(10px + env(safe-area-inset-top)); padding: 0 10px; }
html.tt #live-view.cinema .live-status { min-height: 40px; display: grid; align-content: center; }
html.tt #live-view.cinema .live-overlay {
  left: 58px; right: auto; top: calc(10px + env(safe-area-inset-top)); transform: none; max-width: calc(100% - 200px);
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px 0 10px;
}
html.tt #live-view.cinema .live-overlay b { display: block !important; font: 800 13px Manrope, system-ui, sans-serif; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.tt #live-view.cinema .live-overlay .live-pill { flex: none; background: var(--tt-red); color: #fff; padding: 3px 6px; border-radius: 5px; font: 900 10px/1 Manrope, system-ui, sans-serif; letter-spacing: .4px; }
html.tt #live-view.cinema .live-overlay .live-pill::first-letter { color: #fff; }
/* Узкий телефон: название эфира не влезает между «LIVE» и счётчиком и
   обрезается до «Э…». Оставляем только красный бейдж LIVE. */
@media (max-width: 400px) {
  html.tt #live-view.cinema .live-overlay b { display: none !important; }
  html.tt #live-view.cinema .live-overlay { padding-right: 9px; max-width: none; }
}
html.tt #live-view.cinema #live-stage .live-primary {
  top: calc(58px + env(safe-area-inset-top)); left: 10px; max-width: calc(100% - 20px);
  flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px;
}
html.tt #live-view.cinema #live-stage.spectating .live-layout-tools { display: none; }
/* Раскладки — один цельный сегмент-переключатель, а не четыре отдельных
   квадрата, висящих под счётчиком зрителей. */
html.tt #live-view.cinema .live-layout-tools {
  top: calc(106px + env(safe-area-inset-top)); right: 10px; gap: 2px;
  padding: 4px; border-radius: 13px;
  background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
html.tt #live-view.cinema .live-layout-tools .layout-btn {
  width: 30px; height: 30px; border-radius: 9px;
  background: transparent; border: 0;
}
html.tt #live-view.cinema .live-layout-tools .layout-btn:hover { background: rgba(255,255,255,.16); }
html.tt #live-view.cinema .live-layout-tools .layout-btn.active { background: #fe2c55; }
html.tt #live-view.cinema .stage-grid.tiktok > .tile-strip { top: calc(150px + env(safe-area-inset-top)); }
html.tt #live-view.cinema #live-stage.spectating .stage-grid.tiktok > .tile-strip { top: calc(106px + env(safe-area-inset-top)); }
html.tt #live-view.cinema .rtc-audio-btn { bottom: auto; top: 44%; }

/* ---------------------------------------------------------------------
   Телефон: у каждого раздела свой заголовок, общая шапка — только на ленте и в «Интересном»
   --------------------------------------------------------------------- */
html.tt .tt-back { display: none; }
@media (max-width: 760px) {
  html.tt body:not(.tt-feed):not([data-tt-view="explore"]) .topbar { display: none; }
  html.tt body:not(.tt-feed):not([data-tt-view="explore"]) .content { padding-top: env(safe-area-inset-top); }
  html.tt .tt-back {
    display: inline-grid; place-items: center; width: 38px; height: 38px; margin-right: 6px; padding: 0 2px 3px 0; border: 0; border-radius: 50%;
    background: none; color: var(--ink); font: 600 30px/1 Manrope, system-ui, sans-serif; cursor: pointer; flex: none;
  }
  /* Входящие */
  html.tt #inbox-view .inbox-panel { padding: 0 0 20px; border: 0; background: none; box-shadow: none; }
  /* Шапка «Входящих»: обычный поток, без sticky. Липкая шапка при прокрутке
     наезжала на фильтры — теперь строки физически не пересекаются. */
  html.tt #inbox-view .studio-head {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px 8px; margin: 0;
    background: var(--bg);
  }
  html.tt #inbox-view .studio-head > div:first-child { flex: 1 1 auto; min-width: 0; }
  html.tt #inbox-view .studio-head p { display: none; }
  html.tt #inbox-view .studio-head h1 { margin: 0; font: 900 clamp(20px, 6.2vw, 24px)/1.15 Manrope, system-ui, sans-serif; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.tt #inbox-view .head-actions { flex: 0 0 auto; display: flex; align-items: center; flex-wrap: nowrap; gap: 4px; }
  html.tt #inbox-view .head-actions .outline { min-height: 32px; padding: 0 8px; border: 0; background: none; color: var(--muted); font: 700 12.5px Manrope, system-ui, sans-serif; }
  html.tt #inbox-view .head-actions .outline.tt-ii { min-height: 46px; width: 100%; }
  html.tt #inbox-view .head-actions .outline.tt-ii span { font: 800 10px Manrope, system-ui, sans-serif; color: inherit; }
  html.tt .notif-tabs { padding: 0 12px; margin: 4px 0 6px; gap: 6px; border: 0; overflow-x: auto; scrollbar-width: none; }
  html.tt .notif-tabs .ntab { border: 0; border-radius: 999px; padding: 7px 14px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); font: 700 12.5px Manrope, system-ui, sans-serif; white-space: nowrap; }
  html.tt .notif-tabs .ntab.active { background: var(--ink); color: var(--bg); }
  html.tt .notif-tabs .ntab::after { display: none; }
  html.tt #inbox-list { padding: 0 8px; }
  html.tt #inbox-list .notice { border: 0; border-radius: 12px; background: none; padding: 10px 8px; }
  html.tt #inbox-list .notice.unread { background: color-mix(in srgb, var(--tt-red) 7%, transparent); }
}
html.tt .tt-inbox-links { display: grid; gap: 2px; padding: 4px 8px 8px; }
html.tt .tt-il { display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; padding: 8px; border: 0; border-radius: 12px; background: none; color: var(--ink); cursor: pointer; }
html.tt .tt-il:active { background: color-mix(in srgb, var(--ink) 7%, transparent); }
html.tt .tt-il-ico { grid-row: 1 / 3; position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; }
html.tt .tt-il-ico svg { width: 24px; height: 24px; }
html.tt .tt-il-ico em { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--tt-red); color: #fff; font: 800 10.5px/18px Manrope, system-ui, sans-serif; font-style: normal; border: 2px solid var(--bg); }
html.tt .tt-il-ico em.hidden { display: none; }
html.tt .tt-il b { font: 800 15px Manrope, system-ui, sans-serif; align-self: end; }
html.tt .tt-il small { font: 500 12.5px Manrope, system-ui, sans-serif; color: var(--muted); align-self: start; }
@media (min-width: 761px) { html.tt .tt-inbox-links { grid-template-columns: repeat(3, 1fr); padding: 0 0 14px; } }
/* Сообщения и Люди: заголовок с «‹» */
@media (max-width: 760px) {
  html.tt #messages-view .dm-head { display: flex; align-items: center; gap: 4px; padding: 10px 12px 6px; }
  html.tt #messages-view .dm-head p { display: none; }
  html.tt #messages-view .dm-head h1 { margin: 0; flex: 1; font: 900 22px Manrope, system-ui, sans-serif; }
  html.tt #people-view .people-head { display: flex; align-items: center; flex-wrap: wrap; }
}

/* Эфир: заявки «проситься в эфир» — тёмная карточка поверх видео; подпись «ВЕДУЩИЙ» на главном кадре не нужна */
html.tt #live-view.cinema .seat-requests { background: rgba(14, 14, 16, .82); border: 1px solid rgba(255, 255, 255, .14); color: #fff; border-radius: 16px; padding: 12px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
html.tt #live-view.cinema .seat-requests .sr-head b { color: #fff; font: 800 14px Manrope, system-ui, sans-serif; }
html.tt #live-view.cinema .seat-requests .sr-head small { color: #fff; background: var(--tt-red); border-radius: 999px; padding: 1px 7px; font-weight: 800; }
html.tt #live-view.cinema .seat-requests .sr-row { border-top-color: rgba(255, 255, 255, .12); }
html.tt #live-view.cinema .seat-requests .sr-who b { color: #fff; }
html.tt #live-view.cinema .seat-requests .sr-who small { color: rgba(255, 255, 255, .65); }
html.tt #live-view.cinema .seat-requests .sr-btn { border-radius: 999px; min-height: 36px; padding: 0 14px; border: 0; }
html.tt #live-view.cinema .seat-requests .sr-btn.ok { background: var(--tt-red); color: #fff; }
html.tt #live-view.cinema .seat-requests .sr-btn.no { background: rgba(255, 255, 255, .16); color: #fff; }
html.tt #live-view.cinema .stage-grid > .stream-frame.host > .speaker-tag, html.tt #live-view.cinema .stage-grid > .stream-frame.big > .speaker-tag { display: none; }
@media (max-width: 760px) {
  html.tt #people-view .people-head { display: flex; align-items: center; justify-content: flex-start; gap: 6px; text-align: left; padding: 10px 12px 4px; }
  html.tt #people-view .people-head p { display: none; }
  html.tt #people-view .people-head > div { text-align: left; }
  html.tt #people-view .people-head h1 { margin: 0; font: 900 22px Manrope, system-ui, sans-serif; }
}

/* ---------------------------------------------------------------------
   2.4.1 — окна на телефоне: сплошные «шторки» снизу, как в TikTok
   (комментарии, поделиться, публикация, звук, профиль автора, эффекты, списки)
   --------------------------------------------------------------------- */
@media (max-width: 760px) {
  html.tt dialog#comments-modal, html.tt dialog#share-modal, html.tt dialog#create-modal, html.tt dialog#profile-edit-modal,
  html.tt dialog#sound-modal, html.tt dialog#user-modal, html.tt dialog#effect-modal, html.tt dialog#relations-modal {
    margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh; padding: 0; overflow: visible;
  }
  html.tt dialog#comments-modal[open], html.tt dialog#share-modal[open], html.tt dialog#create-modal[open], html.tt dialog#profile-edit-modal[open],
  html.tt dialog#sound-modal[open], html.tt dialog#user-modal[open], html.tt dialog#effect-modal[open], html.tt dialog#relations-modal[open] { animation: tt-sheet .26s cubic-bezier(.2, .9, .3, 1); }
  @keyframes tt-sheet { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
  html.tt dialog::backdrop { background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: none; backdrop-filter: none; }
  html.tt .comments-card, html.tt .share-card, html.tt #create-modal .modal-card, html.tt #profile-edit-modal .modal-card,
  html.tt #sound-modal .sound-card, html.tt .user-card, html.tt .fx-modal, html.tt .relations-card {
    width: 100%; max-width: none; margin: 0; border: 0; border-radius: 16px 16px 0 0; background: var(--bg); color: var(--ink);
    -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 -8px 30px rgba(0, 0, 0, .18);
    padding: 26px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 92dvh; overflow-y: auto; position: relative;
  }
  /* полоска-ручка сверху и крестик в круге */
  html.tt .comments-card::before, html.tt .share-card::before, html.tt #create-modal .modal-card::before, html.tt #profile-edit-modal .modal-card::before,
  html.tt #sound-modal .sound-card::before, html.tt .user-card::before, html.tt .fx-modal::before, html.tt .relations-card::before {
    content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 22%, transparent);
  }
  html.tt dialog .icon-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 0; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); font-size: 20px; line-height: 1; z-index: 3; }
  html.tt dialog .modal-card > p, html.tt dialog .comments-card > p, html.tt dialog .share-card > p, html.tt dialog .fx-modal > p { display: none; }

  /* комментарии: заголовок по центру, список, поле ввода внизу */
  html.tt .comments-card { display: flex; flex-direction: column; height: 72dvh; padding-bottom: 0; }
  html.tt .comments-card h2 { margin: 0 0 6px; text-align: center; font: 800 14px Manrope, system-ui, sans-serif; }
  html.tt .comments-card .comments-list { flex: 1; max-height: none; overflow-y: auto; padding: 0 2px; }
  html.tt .comments-card .comment { border: 0; padding: 10px 0; font: 500 13.5px/1.4 Manrope, system-ui, sans-serif; }
  html.tt .comments-card .comment-input {
    position: sticky; bottom: 0; margin: 0 -16px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 8px;
    background: var(--bg); border-top: 1px solid var(--line); display: flex; align-items: center;
  }
  html.tt .comments-card .comment-input input { flex: 1; height: 40px; border-radius: 999px; border: 0; padding: 0 16px; background: color-mix(in srgb, var(--ink) 7%, transparent); font: 500 14px Manrope, system-ui, sans-serif; }
  html.tt .comments-card .comment-input button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--tt-red); color: #fff; font-size: 18px; flex: none; }

  /* поделиться: заголовок, круглые цветные значки */
  html.tt .share-card h2 { margin: 0 0 4px; text-align: center; font: 800 14px Manrope, system-ui, sans-serif; padding: 0 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.tt .share-card .share-grid { grid-template-columns: repeat(4, 1fr); gap: 14px 6px; margin: 14px 0 6px; }
  html.tt .share-card .share-opt { color: var(--ink); font: 600 11px Manrope, system-ui, sans-serif; }
  html.tt .share-card .share-opt i { width: 52px; height: 52px; font-size: 21px; background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink); }
  html.tt .share-card [data-share-action="copy"] i { background: #2f88ff; color: #fff; }
  html.tt .share-card [data-share-action="wa"] i { background: #25d366; color: #fff; }
  html.tt .share-card [data-share-action="tg"] i { background: #29a9eb; color: #fff; }
  html.tt .share-card [data-share-action="vk"] i { background: #0077ff; color: #fff; }
  html.tt .share-card [data-share-action="msg"] i { background: var(--tt-red); color: #fff; }
  html.tt .share-card [data-share-action="repost"] i { background: #ffc53d; color: #111; }
  html.tt .share-card [data-share-action="delete"] i, html.tt .share-card [data-share-action="report"] i { background: color-mix(in srgb, #ff3b5c 14%, transparent); color: #ff3b5c; }

  /* публикация */
  html.tt #create-modal .modal-card h2 { margin: 0 0 12px; font: 900 20px Manrope, system-ui, sans-serif; text-align: center; }
  html.tt #create-modal .dropzone { border-radius: 14px; border-style: dashed; min-height: 150px; }
  html.tt #create-modal .publish { border-radius: 10px; background: var(--tt-red); color: #fff; border: 0; height: 50px; font: 800 16px Manrope, system-ui, sans-serif; }
}

/* ---------------------------------------------------------------------
   2.4.1 — студия перед эфиром на телефоне: камера во весь экран, название, большая красная кнопка
   --------------------------------------------------------------------- */
html.tt .tt-title-field { display: none; }
@media (max-width: 760px) {
  html.tt body.tt-studio-on { overflow: hidden; }
  html.tt body.tt-studio-on .tabbar { display: none; }
  /* как у полноэкранного эфира: фиксируем сам раздел (у .view есть анимация с transform — внутри неё fixed не работает) */
  html.tt #live-view.tt-studio { position: fixed; inset: 0; z-index: 70; background: #000; animation: none; transform: none; }
  html.tt #live-view.tt-studio .live-studio { position: absolute; inset: 0; margin: 0; padding: 0; max-width: none; background: #000; overflow: hidden; }
  html.tt dialog .icon-close:focus:not(:focus-visible), html.tt dialog .icon-close:focus { outline: none; }
  html.tt #live-view.tt-studio .live-heading { position: absolute; z-index: 6; top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px; margin: 0; padding: 0; }
  html.tt #live-view.tt-studio .live-heading > div:not(.live-status), html.tt #live-view.tt-studio .live-status { display: none; }
  html.tt #live-view.tt-studio .hub-back { background: rgba(0, 0, 0, .45); color: #fff; border-color: rgba(255, 255, 255, .3); }
  html.tt #live-view.tt-studio #live-stage { position: absolute; inset: 0; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: #000; }
  html.tt #live-view.tt-studio .stage-grid { height: 100%; min-height: 0; border-radius: 0; }
  html.tt #live-view.tt-studio .stream-frame { border-radius: 0; }
  html.tt #live-view.tt-studio .live-layout-tools, html.tt #live-view.tt-studio .live-overlay, html.tt #live-view.tt-studio .rtc-diag-link,
  html.tt #live-view.tt-studio .speaker-tag, html.tt #live-view.tt-studio .live-chat, html.tt #live-view.tt-studio .invite-guest,
  html.tt #live-view.tt-studio .seat-requests, html.tt #live-view.tt-studio .staff-bar { display: none !important; }
  html.tt #live-view.tt-studio .tt-title-field {
    display: grid; gap: 4px; position: absolute; z-index: 6; top: calc(64px + env(safe-area-inset-top)); left: 12px; right: 12px; padding: 12px 14px; border-radius: 14px;
    background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff;
  }
  html.tt .tt-title-field small { font: 700 11px Manrope, system-ui, sans-serif; opacity: .75; letter-spacing: .3px; }
  html.tt .tt-title-field input { border: 0; background: none; color: #fff; font: 800 17px Manrope, system-ui, sans-serif; padding: 0; outline: none; }
  html.tt .tt-title-field input::placeholder { color: rgba(255, 255, 255, .6); }
  html.tt #live-view.tt-studio .live-bottom { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; margin: 0; padding: 14px 14px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(0, 0, 0, .7), transparent); display: block; }
  html.tt #live-view.tt-studio .live-actions { display: grid; gap: 12px; width: 100%; }
  html.tt #live-view.tt-studio .live-tools { display: flex; justify-content: center; gap: 22px; }
  html.tt #live-view.tt-studio .live-control { width: 56px; height: 56px; min-height: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; padding: 0; }
  html.tt #live-view.tt-studio .live-control span { display: none; }
  html.tt #live-view.tt-studio .live-control svg { width: 24px; height: 24px; }
  html.tt #live-view.tt-studio .live-primary { display: grid; }
  /* 2.6.9: в студии панель кнопок приклеена к низу экрана, а меню «Ещё»
     на телефоне раскрывалось вниз — пункты «Рамка плитки» и «Реакция»
     оставались за краем. Всегда раскрываем вверх, как в полном эфире. */
  html.tt #live-view.tt-studio .live-menu {
    left: auto; right: 0; top: auto; bottom: calc(100% + 8px);
    max-height: 46dvh; overflow-y: auto;
  }
  html.tt #live-view.tt-studio .start-live { height: 54px; border-radius: 12px; border: 0; background: var(--tt-red); color: #fff; font: 900 17px Manrope, system-ui, sans-serif; box-shadow: 0 10px 28px color-mix(in srgb, var(--tt-red) 40%, transparent); }
}

/* «Интересное» — поиск в сером «пилюле», вкладки-пилюли */
@media (max-width: 760px) {
  html.tt body[data-tt-view="explore"] .topbar { display: flex; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; height: auto; background: var(--bg); border: 0; box-shadow: none; }
  html.tt body[data-tt-view="explore"] .topbar .search { flex: 1; height: 40px; border: 0; border-radius: 8px; padding: 0 12px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
  html.tt body[data-tt-view="explore"] .topbar .theme-toggle, html.tt body[data-tt-view="explore"] .topbar .profile-dot { display: none; }
  html.tt #explore-view .view-heading { padding: 8px 14px 4px; }
  html.tt #explore-view .view-heading > p { display: none; }
  html.tt #explore-view .view-heading h1 { font: 900 24px Manrope, system-ui, sans-serif; margin: 0 0 10px; }
  html.tt #explore-view .xtabs { display: flex; gap: 6px; border: 0; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
  html.tt #explore-view .xtab { border: 0; border-radius: 999px; padding: 7px 14px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); font: 700 12.5px Manrope, system-ui, sans-serif; white-space: nowrap; }
  html.tt #explore-view .xtab.active { background: var(--ink); color: var(--bg); }
  html.tt #explore-view .xtab::after { display: none; }
}
@media (max-width: 760px) {
  html.tt #live-view.tt-studio .live-actions { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 14px; width: 100% !important; }
  html.tt #live-view.tt-studio .live-primary { display: grid !important; width: 100%; gap: 10px; }
  html.tt #live-view.tt-studio .live-primary .start-live { width: 100%; }
}

/* ---------------------------------------------------------------------
   2.4.2 — плашка звонка во время эфира, окошко видеопроверки для персонала,
   объяснение «ждём видеопроверку» для нового пользователя
   --------------------------------------------------------------------- */
.call-quiet, .tt-verify-banner {
  position: fixed; z-index: 120; left: 50%; top: calc(10px + env(safe-area-inset-top)); width: min(440px, calc(100vw - 20px));
  transform: translate(-50%, -140%); transition: transform .32s cubic-bezier(.2, .9, .3, 1); display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 12px; border-radius: 18px; background: rgba(18, 18, 22, .94); color: #fff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .1);
}
.call-quiet.show, .tt-verify-banner.show { transform: translate(-50%, 0); }
.cq-ico, .tvb-ico { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: rgba(255, 255, 255, .12); animation: tt-livepulse 1.4s ease-in-out infinite; }
.cq-txt, .tvb-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cq-txt b, .tvb-txt b { font: 800 14px Manrope, system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cq-txt small, .tvb-txt small { font: 600 11.5px Manrope, system-ui, sans-serif; opacity: .75; }
.cq-btn { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; color: #fff; font: 800 18px/1 Manrope, system-ui, sans-serif; cursor: pointer; }
.cq-btn.ok { background: #22c55e; }
.cq-btn.no { background: #ef4444; }
.tvb-call { flex: none; height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--tt-red); color: #fff; font: 800 13px Manrope, system-ui, sans-serif; cursor: pointer; }
.tvb-x { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.tt-pending { display: flex; gap: 10px; align-items: flex-start; margin: 10px auto 0; padding: 12px 14px; max-width: 420px; border-radius: 14px; text-align: left;
  background: color-mix(in srgb, #ffb800 14%, transparent); border: 1px solid color-mix(in srgb, #ffb800 35%, transparent); color: var(--ink); }
.tt-pending > span:first-child { font-size: 20px; line-height: 1.1; }
.tt-pending b { display: block; font: 800 14px Manrope, system-ui, sans-serif; }
.tt-pending small { display: block; margin-top: 2px; font: 500 12.5px/1.4 Manrope, system-ui, sans-serif; color: var(--muted); }
#inbox-view .tt-pending { margin: 8px 12px 4px; max-width: none; }
#profile-view .tt-pending { order: 5; }

/* ===================== 2.4.3 · большие подарки (giftfx.js) ===================== */
#tt-gs { position: fixed; inset: 0; z-index: 112; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s linear .25s; }
#tt-gs.on { opacity: 1; visibility: visible; transition: opacity .25s ease; }
#tt-gs canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#tt-gs .tt-gs-cap { position: absolute; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 13%); display: grid; justify-items: center; gap: 6px; text-align: center; padding: 0 16px; opacity: 0; }
#tt-gs .tt-gs-cap b { font: 900 clamp(30px, 9vw, 64px)/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .04em; color: #fff; text-shadow: 0 0 18px var(--c, #ffd34d), 0 0 42px var(--c, #ffd34d), 0 3px 0 rgba(0, 0, 0, .35); }
#tt-gs .tt-gs-cap small { font: 700 15px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif; color: #fff; background: rgba(0, 0, 0, .42); padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(6px); max-width: 92vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tt-gs .tt-gs-cap small:empty { display: none; }
#tt-gs .tt-gs-cap.show { animation: tt-gs-cap 4.6s cubic-bezier(.2, .9, .25, 1.2) .5s both; }
@keyframes tt-gs-cap { 0% { opacity: 0; transform: scale(.4) translateY(20px); } 12% { opacity: 1; transform: scale(1.12); } 20% { transform: scale(1); } 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06) translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { #tt-gs .tt-gs-cap.show { animation: none; opacity: 1; } }
/* дорогие подарки в панели: подсветка «большая анимация» */
html.tt .gift-btn.fx { position: relative; }
html.tt .gift-btn.fx::after { content: 'FX'; position: absolute; top: 2px; right: 3px; font: 800 8px/1 system-ui, sans-serif; color: #111; background: linear-gradient(90deg, #ffd34d, #ff6bd6); border-radius: 4px; padding: 2px 3px; }

/* ===================== 2.4.3 · изменение голоса (voicefx.js) ===================== */
.tt-voice { position: fixed; inset: 0; z-index: 130; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s; }
.tt-voice.open { opacity: 1; visibility: visible; transition: opacity .2s ease; }
.tt-voice-card { width: min(520px, 100%); background: #161823; color: #fff; border-radius: 18px 18px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateY(30px); transition: transform .25s cubic-bezier(.2, .9, .3, 1); box-shadow: 0 -10px 40px rgba(0, 0, 0, .4); }
.tt-voice.open .tt-voice-card { transform: none; }
.tt-voice-head { display: flex; align-items: center; justify-content: space-between; }
.tt-voice-head b { font: 800 17px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; }
.tt-voice-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.tt-voice-note { margin: 4px 0 12px; color: rgba(255, 255, 255, .62); font-size: 13px; }
.tt-voice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tt-voice-grid button { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border: 2px solid transparent; border-radius: 14px; background: rgba(255, 255, 255, .07); color: #fff; cursor: pointer; min-height: 78px; }
.tt-voice-grid button span { font-size: 28px; line-height: 1; }
.tt-voice-grid button small { font: 600 11.5px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; text-align: center; color: rgba(255, 255, 255, .85); overflow-wrap: anywhere; }
.tt-voice-grid button[aria-pressed="true"] { border-color: var(--tt-red); background: color-mix(in srgb, var(--tt-red) 16%, transparent); }
.tt-voice-try { width: 100%; margin-top: 14px; height: 46px; border: 0; border-radius: 12px; background: var(--tt-red); color: #fff; font: 800 15px system-ui, -apple-system, "Segoe UI", sans-serif; cursor: pointer; }
.tt-voice-try:disabled { opacity: .75; }
#live-voice .tt-voice-emo { font-size: 18px; width: 24px; text-align: center; }
#live-voice small { margin-left: auto; color: var(--tt-red); font-weight: 700; }
#call-overlay .call-buttons #call-voice { width: 62px; padding: 0; font-size: 22px; position: relative; }
#call-overlay .call-buttons #call-mute.hidden ~ #call-voice { display: none; }
#call-voice .tt-voice-ind { position: absolute; right: -2px; top: -2px; font-size: 15px; font-style: normal; display: none; }
#call-voice .tt-voice-ind.on { display: block; }
@media (max-width: 380px) { #call-overlay .call-buttons #call-voice { width: 52px; } }
/* эффекты камеры в видеозвонке */
#call-overlay .call-buttons #call-fx { width: 62px; padding: 0; font-size: 22px; }
#call-overlay .call-buttons #call-fx.on { background: color-mix(in srgb, var(--tt-red) 55%, transparent); }
#call-overlay .call-buttons #call-cam.hidden ~ #call-fx { display: none; }
#call-overlay[data-kind="verify"] .call-buttons #call-fx, #call-overlay[data-kind="verify"] .call-buttons #call-voice { display: none; }
#call-overlay .fx-tray { z-index: 20; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
#call-fx .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 380px) { #call-overlay .call-buttons #call-fx { width: 52px; } }

/* ===================== 2.4.3 · разделы с «‹ Заголовок», входящие, эфир глазами зрителя ===================== */
html.tt .tt-topnav { display: none; }
@media (max-width: 760px) {
  html.tt .tt-topnav {
    display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; position: sticky; top: 0; z-index: 6;
    height: 50px; padding: 0 4px; margin: 0 0 4px; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  html.tt .tt-topnav .tt-back { margin: 0; }
  html.tt .tt-topnav b { text-align: center; font: 800 16.5px/1 Manrope, system-ui, sans-serif; color: var(--ink); }
  html.tt #following-view .view-heading { padding-top: 10px; }
  html.tt #following-view .view-heading > p, html.tt #following-view .view-heading > h1 { display: none; }
  html.tt #studio-view .studio-head > div, html.tt #settings-view .studio-head > div { display: none; }
  html.tt #settings-view .studio-head { display: none; }
  html.tt #studio-view .studio-head { justify-content: flex-end; margin: 0 0 8px; }
  html.tt #studio-view .studio-panel, html.tt #settings-view .settings-panel { padding-top: 6px; }
  /* входящие: время отдельно, серым, через точку */
  html.tt #inbox-list .notice > div { min-width: 0; }
  html.tt #inbox-list .notice > div > span { margin-right: 4px; }
  html.tt #inbox-list .notice > div > small { color: var(--muted); white-space: nowrap; }
  html.tt #inbox-list .notice > div > small::before { content: '· '; }
  html.tt #inbox-list .notice.unread { background: color-mix(in srgb, var(--tt-red) 4%, transparent); }
}
/* эфир: ✕ «выйти» справа сверху у зрителя, «Выйти из чужого эфира» больше не нужна */
html.tt .tt-live-x { display: none; }
html.tt #live-view.cinema.tt-watching .tt-live-x {
  display: grid; place-items: center; position: absolute; z-index: 30; top: calc(12px + env(safe-area-inset-top)); right: 10px;
  width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .35); color: #fff; font: 700 17px/1 system-ui, sans-serif; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
html.tt #live-view.cinema.tt-watching .live-heading { padding-right: 52px; }
html.tt #live-view.cinema.tt-watching #start-live { display: none !important; }
html.tt #live-view.cinema.tt-watching .live-status { background: rgba(0, 0, 0, .35); border-radius: 999px; padding: 0 12px; min-height: 36px; }
html.tt #live-view.cinema.tt-watching .live-status #live-state { display: none; }
html.tt #live-view.cinema.tt-watching .live-status #viewer-count { font: 700 12px/1 Manrope, system-ui, sans-serif; color: #fff; }
html.tt #live-view.cinema.tt-watching .live-status #viewer-count::before { content: '👁 '; }
html.tt #live-view .live-status .tt-like-n { font: 700 11px/1 Manrope, system-ui, sans-serif; font-style: normal; color: #ff9db4; margin-top: 3px; }
html.tt #live-view .live-status .tt-like-n:empty { display: none; }
/* зритель без места на сцене: камера и микрофон не нужны; «Проситься в эфир» — заметная */
html.tt #live-view.cinema.tt-viewer #toggle-mic, html.tt #live-view.cinema.tt-viewer #toggle-camera { display: none; }
html.tt #live-view.cinema.tt-watching #request-seat:not(.hidden) {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--tt-red) 92%, transparent); color: #fff; font: 800 12.5px Manrope, system-ui, sans-serif;
}
html.tt #live-view.cinema.tt-watching #request-seat:not(.hidden)::before { content: '🙋'; }
/* Вход персонала на сцену — сразу на экране эфира, без поиска шторки. */
html.tt #live-view.cinema.tt-watching .live-primary .staff-enter:not(.hidden) {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--tt-red) 92%, transparent); color: #fff; font: 800 12.5px Manrope, system-ui, sans-serif;
}
html.tt #live-view.cinema.tt-watching #staff-enter-hidden:not(.hidden) {
  background: rgba(139, 92, 246, .94);
}
/* сердечки по тапу */
html.tt .tt-likes { position: absolute; inset: 0; z-index: 25; pointer-events: none; overflow: hidden; }
html.tt .tt-heart { position: absolute; font-style: normal; font-size: 26px; line-height: 1; transform: translate(-50%, -50%); animation: tt-heart-up 1.6s ease-out forwards; }
html.tt .tt-heart.big { font-size: 74px; animation: tt-heart-pop .85s cubic-bezier(.2, .9, .3, 1.3) forwards; filter: drop-shadow(0 4px 14px color-mix(in srgb, var(--tt-red) 55%, transparent)); }
@keyframes tt-heart-up { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.5); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% - 220px)) rotate(var(--rot, 0deg)) scale(.9); } }
@keyframes tt-heart-pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(var(--rot, 0deg)); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(var(--rot, 0deg)); } 45% { transform: translate(-50%, -50%) scale(.95) rotate(var(--rot, 0deg)); } 100% { opacity: 0; transform: translate(-50%, -90%) scale(1.25) rotate(var(--rot, 0deg)); } }
@media (prefers-reduced-motion: reduce) { html.tt .tt-heart, html.tt .tt-heart.big { animation-duration: .4s; } }

/* ===================== 2.4.3 · чужой профиль (лист пользователя) ===================== */
html.tt .user-card { text-align: center; }
html.tt .user-card .tt-uc-handle { display: block; margin: 2px 0 0; color: var(--muted); font: 600 13px/1.3 Manrope, system-ui, sans-serif; }
html.tt .user-card #user-avatar { position: relative; }
html.tt .user-card #user-avatar.tt-ring { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5.5px var(--tt-red); }
html.tt .user-card .tt-uc-live { display: block; margin: -12px auto 8px; position: relative; z-index: 2; border: 0; border-radius: 5px; padding: 3px 8px; background: var(--tt-red); color: #fff; font: 900 10.5px/1.1 Manrope, system-ui, sans-serif; letter-spacing: .5px; cursor: pointer; }
html.tt .user-card .tt-uc-live.hidden { display: none; }
html.tt .user-card #user-bio:empty { display: none; }
html.tt .user-card .ustats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 300px; margin: 12px auto 14px; gap: 0; }
html.tt .user-card .ustats > div { display: grid; gap: 2px; position: relative; }
html.tt .user-card .ustats > div + div::before { content: ''; position: absolute; left: 0; top: 25%; height: 50%; width: 1px; background: var(--line); }
html.tt .user-card .ustats b { font: 800 17px/1.1 Manrope, system-ui, sans-serif; color: var(--ink); }
html.tt .user-card .ustats span { font: 500 12px/1.2 Manrope, system-ui, sans-serif; color: var(--muted); }
html.tt .user-card .tt-uc-actions { display: flex; gap: 8px; justify-content: center; margin: 0 auto 14px; max-width: 320px; }
html.tt .user-card .tt-uc-actions > button { flex: 1; min-height: 44px; margin: 0; border: 0; border-radius: 8px; font: 800 15px Manrope, system-ui, sans-serif; cursor: pointer; }
html.tt .user-card #user-follow { background: var(--tt-red); color: #fff; }
html.tt .user-card #user-follow.following, html.tt .user-card #user-follow:disabled { background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink); }
html.tt .user-card .tt-uc-msg { background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--ink); }
html.tt .user-card .tt-uc-msg.hidden { display: none; }
html.tt .user-card .tt-uc-tabs { border-bottom: 1px solid var(--line); margin: 0 -16px 2px; padding: 0 0 8px; }
html.tt .user-card .tt-uc-tabs b { display: inline-block; padding: 0 18px 7px; border-bottom: 2px solid var(--ink); margin-bottom: -9px; font: 800 13.5px Manrope, system-ui, sans-serif; }
html.tt .user-card .tt-uc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; margin: 0 -16px; }
html.tt .user-card .tt-uc-grid .mini-post { position: relative; aspect-ratio: 3 / 4; min-height: 0; background: var(--bg, #222); background: var(--bg); overflow: hidden; cursor: pointer; border-radius: 0; }
html.tt .user-card .tt-uc-grid .mini-post::before { content: ''; position: absolute; inset: 0; background: var(--bg); }
html.tt .user-card .tt-uc-grid .mini-post .mini-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
html.tt .user-card .tt-uc-grid .mini-post::after { content: attr(data-likes); position: absolute; left: 6px; bottom: 5px; color: #fff; font: 700 11.5px Manrope, system-ui, sans-serif; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
html.tt .user-card .tt-uc-empty { grid-column: 1 / -1; padding: 26px 10px; color: var(--muted); font-size: 13px; }
@media (min-width: 761px) { html.tt .user-card { width: min(460px, calc(100vw - 32px)); max-height: 86vh; overflow-y: auto; } html.tt .user-card .tt-uc-grid, html.tt .user-card .tt-uc-tabs { margin-left: -30px; margin-right: -30px; } }
/* зритель: точка «в эфире» лишняя рядом с 👁; лист профиля на компьютере — сплошной фон и круглый ✕ */
html.tt #live-view.cinema.tt-watching .live-status > span { display: none; }
@media (min-width: 761px) {
  html.tt .user-card { background: var(--bg); color: var(--ink); border: 0; border-radius: 16px; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
  html.tt #user-modal .icon-close { width: 34px; height: 34px; top: 12px; right: 12px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); font-size: 20px; display: grid; place-items: center; }
}
/* чат на телефоне: пока пишете — кнопки фото/голоса/подарка прячутся, поле во всю ширину (как в TikTok) */
@media (max-width: 760px) {
  html.tt .conv-input .ci-field { min-width: 0; flex: 1 1 auto; }
  html.tt .conv-input #dm-text { min-width: 0; width: 100%; }
  html.tt .conv-input .ci-row:has(#dm-text:not(:placeholder-shown)) > [data-dm-pickphoto],
  html.tt .conv-input .ci-row:has(#dm-text:not(:placeholder-shown)) > [data-dm-voice],
  html.tt .conv-input .ci-row:has(#dm-text:not(:placeholder-shown)) > [data-dm-tray="gift"] { display: none; }
}
@media (max-width: 420px) {
  html.tt .conv-input .ci-row { gap: 2px; }
  html.tt .conv-input .ci-row > .ci-ic { width: 34px; }
  html.tt .conv-input .ci-field .ci-ic.in { width: 30px; }
  html.tt .conv-input .ci-field { padding: 0 2px 0 4px; }
}

/* ===================== 2.4.4 · «Интересное»: хэштеги строками, сетка популярных видео ===================== */
html.tt .tt-explore-wrap.hidden { display: none; }
html.tt .tt-explore-wrap h3 { margin: 18px 0 8px; font: 800 16px Manrope, system-ui, sans-serif; color: var(--ink); }
html.tt .tt-explore-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
@media (min-width: 761px) { html.tt .tt-explore-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; } html.tt .tt-explore-grid .mini-post { border-radius: 8px; } }
html.tt .tt-explore-grid .mini-post { position: relative; aspect-ratio: 3 / 4; min-height: 0; overflow: hidden; cursor: pointer; background: var(--bg); border-radius: 4px; }
html.tt .tt-explore-grid .mini-post .mini-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
html.tt .tt-explore-grid .mini-post::after { content: attr(data-likes); position: absolute; left: 6px; bottom: 5px; z-index: 2; color: #fff; font: 700 11.5px Manrope, system-ui, sans-serif; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
html.tt .tt-explore-grid .tt-eg-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 18px 6px 22px; background: linear-gradient(transparent, rgba(0, 0, 0, .55)); color: #fff; font: 600 11px/1.25 Manrope, system-ui, sans-serif; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html.tt .tt-explore-grid .tt-eg-cap:empty { display: none; }
@media (max-width: 760px) {
  html.tt #explore-view .trend-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
  html.tt #explore-view .trend {
    display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left;
    min-height: 0; padding: 10px 2px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none !important; color: var(--ink) !important; box-shadow: none;
  }
  html.tt #explore-view .trend::before { content: '#'; grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ink) 8%, transparent); font: 800 19px/1 Manrope, system-ui, sans-serif; }
  html.tt #explore-view .trend > small:first-child { grid-column: 3; grid-row: 1 / 3; margin: 0; padding: 3px 7px; border-radius: 4px; background: color-mix(in srgb, var(--tt-red) 12%, transparent); color: var(--tt-red); font: 800 10px/1 Manrope, system-ui, sans-serif; letter-spacing: .2px; }
  html.tt #explore-view .trend > b { grid-column: 2; margin: 0; font: 800 15px/1.2 Manrope, system-ui, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.tt #explore-view .trend > small:last-child { grid-column: 2; margin: 1px 0 0; color: var(--muted); font: 500 12px/1.2 Manrope, system-ui, sans-serif; }
}
html.tt .tt-explore-grid .mini-post::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 55%; z-index: 1; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); pointer-events: none; }
html.tt .tt-explore-grid .tt-eg-cap { display: block; padding: 0 6px; bottom: 22px; background: none; max-height: 2.5em; line-height: 1.25; overflow: hidden; z-index: 2; }

/* ===================== 2.4.4 · лента на компьютере: автор и подпись над видео, видео целиком в экране ===================== */
@media (min-width: 761px) {
  html.tt #feed .post-main { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
  html.tt #feed .post-head { order: 0; width: min(420px, calc((100vh - 230px) * 9 / 16)); max-width: 100%; }
  html.tt #feed .post-copy { order: 1; margin: 2px 0 10px; width: min(420px, calc((100vh - 230px) * 9 / 16)); max-width: 100%; }
  html.tt #feed .media { order: 2; height: min(calc(100vh - 230px), 746px); width: auto; aspect-ratio: 9 / 16; max-height: none; max-width: 100%; }
  html.tt #feed .media-video.tt-wide { object-fit: contain; background: #000; }
  html.tt #feed .post-main > .actions { display: none; }   /* те же кнопки уже есть справа на видео; Дуэт/Стич/Эффект — в «Поделиться» */
}

/* ===================== 2.4.5 · экран «Начать эфир» ===================== */
/* До старта раскладка не на что влиять — на сцене один кадр ведущего.
   Панель раскладок появляется вместе с эфиром, а не чёрной полосой на старте. */
html.tt #live-view.tt-studio #live-stage:not(.is-live) .live-layout-tools { display: none; }
/* лоток эффектов должен лежать поверх нижних кнопок (иначе фильтры не нажимаются) */
html.tt #live-view.tt-studio #live-stage:has(#fx-tray.open) { z-index: 20; }
html.tt #live-view.tt-studio .fx-tray { z-index: 30; bottom: calc(12px + env(safe-area-inset-bottom)); max-height: 46dvh; overflow-y: auto; }

/* ===================== 2.4.6 · лента: шапка меньше, кнопки ближе к краю, подпись мельче (по фото с телефона) ===================== */
@media (max-width: 760px) {
  html.tt body.tt-feed .topbar { height: calc(44px + env(safe-area-inset-top)); grid-template-columns: 50px 1fr 50px; padding: env(safe-area-inset-top) 10px 0; }
  html.tt body.tt-feed .topbar .feed-switch { gap: 14px; }
  html.tt body.tt-feed .topbar .feed-switch .switch { font-size: 14.5px; padding: 5px 0; }
  html.tt body.tt-feed .topbar .feed-switch .switch.active::after { width: 22px; margin-left: -11px; height: 2.5px; }
  html.tt .tt-live-btn { height: 24px; padding: 0 6px; border-width: 1.5px; border-radius: 6px; font-size: 10.5px; }
  html.tt .tt-search-btn { width: 34px; height: 34px; }
  html.tt .tt-search-btn svg { width: 22px; height: 22px; }
  html.tt body.tt-feed #feed .rail { right: 2px; }
  html.tt body.tt-feed #feed .rail-btn { min-width: 48px; }
  html.tt body.tt-feed #feed .post-copy { right: 72px; font-size: 13px; line-height: 1.35; bottom: 50px; }
  html.tt body.tt-feed #feed .post-copy b { font-size: 14.5px; margin-bottom: 3px; }
  html.tt body.tt-feed #feed .media-footer { right: 72px; bottom: 14px; }
  html.tt body.tt-feed #feed .sound-chip { font-size: 12px; }
  html.tt body.tt-feed #feed .tt-disc { right: 8px; width: 40px; height: 40px; border-width: 7px; }
}

/* ===================== 2.4.6 · «Входящие»: значки в шапке, цветные уведомления ===================== */
/* Четыре действия шапки — подписанные плитки во всю ширину, а не безымянные
   кружки: «Чаты», «Люди», «Прочитано», «Очистить» понятны без догадок. */
/* Жёсткая сетка в один столбец: заголовок и ряд значков — разные строки,
   поэтому они физически не могут наехать друг на друга ни в одной теме. */
html.tt #inbox-view .studio-head { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; row-gap: 8px; align-items: start; }
html.tt #inbox-view .studio-head > div:first-child { min-width: 0; }
html.tt #inbox-view .head-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; }
html.tt .tt-inbox-icons { display: contents; }
/* inset сбрасывает старое .outline { top:20px } из style.css: без этого
   «Прочитано» и «Очистить» съезжали вниз на 20 px и прятались под фильтрами. */
html.tt .tt-ii { position: relative; inset: auto !important; width: 100%; height: 46px; flex: none; min-height: 0 !important; padding: 4px 2px !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0 !important; border-radius: 12px;
  background: color-mix(in srgb, var(--c, var(--ink)) 12%, transparent) !important; color: var(--c, var(--ink)) !important; cursor: pointer; font-size: 10px !important; font-weight: 800; line-height: 1; white-space: nowrap; }
html.tt .tt-ii svg { width: 18px; height: 18px; flex: none; }
html.tt .tt-ii span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
html.tt .tt-ii em { position: absolute; top: 3px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--tt-red); color: #fff; font: 800 10px/16px Manrope, system-ui, sans-serif; font-style: normal; text-align: center; }
html.tt .tt-ii em.hidden { display: none; }
html.tt .tt-ii-read { --c: #10b981; }
html.tt .tt-ii-clear { --c: #94a3b8; }
html.tt #inbox-view .notif-tabs .ntab[data-ntab="like"].active { background: var(--tt-red); color: #fff; }
html.tt #inbox-view .notif-tabs .ntab[data-ntab="comment"].active { background: #25a3f4; color: #fff; }
html.tt #inbox-view .notif-tabs .ntab[data-ntab="follow"].active { background: #20c4d8; color: #fff; }
html.tt #inbox-list { display: grid; gap: 2px; }
html.tt .tt-nf { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 8px 9px 10px; border-radius: 14px; cursor: pointer;
  background: color-mix(in srgb, var(--nc) 4%, transparent); }
html.tt .tt-nf.unread { background: color-mix(in srgb, var(--nc) 11%, transparent); }
html.tt .tt-nf.unread::before { content: ''; position: absolute; left: 3px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--nc); }
html.tt .tt-nf:active { transform: scale(.99); }
html.tt .tt-nf-av { position: relative; width: 48px; height: 48px; }
html.tt .tt-nf-av > .avatar, html.tt .tt-nf-av > span:first-child { width: 48px !important; height: 48px !important; border-radius: 50%; }
html.tt .tt-nf-av.two > .avatar:first-child, html.tt .tt-nf-av.two > span:first-child { width: 38px !important; height: 38px !important; }
html.tt .tt-nf-av2 { position: absolute; right: 0; bottom: 0; }
html.tt .tt-nf-av2 > * { width: 34px !important; height: 34px !important; border: 2px solid var(--bg); border-radius: 50%; }
html.tt .tt-nf-badge { position: absolute; right: -3px; bottom: -3px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--nc); color: #fff; border: 2px solid var(--bg); font-style: normal; z-index: 2; }
html.tt .tt-nf-badge svg { width: 12px; height: 12px; }
html.tt .tt-nf-body { min-width: 0; }
html.tt .tt-nf-body p { margin: 0; font: 500 13.5px/1.3 Manrope, system-ui, sans-serif; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
html.tt .tt-nf-body p b { font-weight: 800; }
html.tt .tt-nf-body p span { color: color-mix(in srgb, var(--ink) 78%, transparent); }
html.tt .tt-nf-body small { display: block; margin-top: 2px; color: var(--muted); font: 600 11.5px Manrope, system-ui, sans-serif; }
html.tt .tt-nf-fb { border: 0; border-radius: 6px; padding: 7px 12px; background: var(--tt-red); color: #fff; font: 800 12.5px Manrope, system-ui, sans-serif; cursor: pointer; }
html.tt .tt-nf-mutual { padding: 6px 10px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 8%, transparent); font: 700 12px Manrope, system-ui, sans-serif; color: var(--ink); }
html.tt .tt-nf-x { border: 0; background: none; color: var(--muted); width: 28px; height: 28px; font-size: 13px; cursor: pointer; }
html.tt .tt-nf-empty { display: grid; justify-items: center; gap: 4px; padding: 44px 12px; text-align: center; color: var(--muted); font-size: 13px; }
html.tt .tt-nf-empty b { color: var(--ink); font-size: 15px; }
html.tt .tt-nf-staff { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; width: 100%; margin: 0 0 6px; padding: 10px 12px; border: 0; border-radius: 14px; text-align: left; cursor: pointer;
  background: linear-gradient(90deg, rgba(245, 158, 11, .18), rgba(245, 158, 11, .06)); color: var(--ink); }
html.tt .tt-nf-staff .tt-nf-badge { position: static; width: 38px; height: 38px; --nc: #f59e0b; background: #f59e0b; border: 0; }
html.tt .tt-nf-staff .tt-nf-badge svg { width: 20px; height: 20px; }
html.tt .tt-nf-staff b { display: block; font: 800 14px Manrope, system-ui, sans-serif; }
html.tt .tt-nf-staff small { color: var(--muted); font-size: 12px; }
html.tt .tt-nf-staff em { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: #f59e0b; color: #fff; font: 900 13px/26px Manrope, system-ui, sans-serif; font-style: normal; text-align: center; }

/* ===================== 2.4.6 · персонал в эфире: 🛡 и 👻 ===================== */
html.tt .tt-staff-btn, html.tt .tt-ghost-chip { display: none; }
html.tt #live-view.cinema.tt-watching.tt-staff .tt-staff-btn {
  display: inline-flex; align-items: center; gap: 5px; position: absolute; z-index: 30; right: 10px; top: calc(56px + env(safe-area-inset-top));
  height: 32px; padding: 0 11px 0 8px; border: 0; border-radius: 999px; background: rgba(245, 158, 11, .92); color: #fff;
  font: 800 11.5px Manrope, system-ui, sans-serif; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
html.tt #live-view.cinema.tt-watching.tt-staff .tt-staff-btn span { font-size: 14px; line-height: 1; }
html.tt #live-view.cinema.tt-watching.tt-ghost .tt-ghost-chip { display: none !important; }
/* Служебная полоса со сцены убрана: действия — в шторке 🛡 «Модерация»
   (ui2.css скрывает .staff-bar в полноэкранном эфире). */
html.tt #live-view.cinema.tt-watching.tt-ghost .live-chat-input { opacity: .55; }
html.tt #live-view.cinema.tt-watching.tt-ghost #request-seat { display: none !important; }
html.tt .tt-hub-ghost { display: none; }
html.tt.tt-is-staff .tt-hub-ghost {
  display: flex; align-items: center; gap: 8px; margin: 0 4px 12px; padding: 8px 14px; border: 1.5px dashed color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 999px;
  background: none; color: var(--ink); font: 800 13px Manrope, system-ui, sans-serif; cursor: pointer;
}
html.tt.tt-is-staff .tt-hub-ghost small { color: var(--muted); font-weight: 600; font-size: 11px; }
html.tt.tt-is-staff .tt-hub-ghost.on { border-style: solid; border-color: #8b5cf6; background: rgba(139, 92, 246, .14); color: #7c3aed; }
html.tt.tt-is-staff .tt-hub-ghost.on::after { content: 'ВКЛ'; margin-left: auto; padding: 2px 7px; border-radius: 6px; background: #8b5cf6; color: #fff; font-size: 10.5px; }
.tt-staff-sheet .tt-st-card { max-height: 86dvh; overflow-y: auto; }
/* Крестик не уезжает при прокрутке длинной шторки — закрыть можно всегда. */
.tt-st-card .tt-voice-head { position: sticky; top: 0; z-index: 2; margin: -14px -16px 6px; padding: 14px 16px 8px; background: #161823; }
.tt-st-card .tt-st-state { margin: 0 0 4px; font: 800 12px Manrope, system-ui, sans-serif; letter-spacing: .2px; color: rgba(255, 255, 255, .74); }
.tt-st-card .tt-st-state.is-hidden { color: #c4b5fd; }
.tt-st-ghost { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; padding: 12px; border-radius: 14px; background: rgba(139, 92, 246, .16); cursor: pointer; }
.tt-st-ghost span { flex: 1; display: grid; gap: 3px; }
.tt-st-ghost b { font: 800 15px Manrope, system-ui, sans-serif; }
.tt-st-ghost small { color: rgba(255, 255, 255, .7); font-size: 12px; line-height: 1.35; }
.tt-st-ghost input { width: 46px; height: 26px; accent-color: #8b5cf6; flex: none; }
.tt-st-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.tt-st-acts button { flex: 1 1 140px; min-height: 42px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #fff; font: 800 13.5px Manrope, system-ui, sans-serif; cursor: pointer; }
.tt-st-acts button.danger { background: rgba(239, 68, 68, .85); }
.tt-st-card h4 { margin: 14px 0 6px; font: 800 13px Manrope, system-ui, sans-serif; color: rgba(255, 255, 255, .7); text-transform: uppercase; letter-spacing: .4px; }
.tt-st-list { display: grid; gap: 4px; }
.tt-st-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 10px; background: rgba(255, 255, 255, .04); }
.tt-st-row > .avatar, .tt-st-row > span:first-child { width: 36px !important; height: 36px !important; border-radius: 50%; }
.tt-st-row b { display: block; font: 700 13.5px Manrope, system-ui, sans-serif; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-st-row small { color: rgba(255, 255, 255, .55); font-size: 11.5px; }
.tt-st-row button { width: 36px; height: 36px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 15px; cursor: pointer; }
.tt-st-row button.danger { background: rgba(239, 68, 68, .25); }
/* «Принять» / «Отклонить» в очереди заявок — с текстом, а не 36-пиксельные значки. */
.tt-st-row button[data-seat-act] { width: auto; min-width: 34px; padding: 0 10px; font: 800 12px Manrope, system-ui, sans-serif; }
.tt-st-row button[data-seat-act="accept"] { background: rgba(34, 197, 94, .3); }
.tt-st-empty { margin: 4px 2px; color: rgba(255, 255, 255, .5); font-size: 12.5px; }

/* Перемотка видео в ленте: тонкая полоса по нижнему краю кадра, утолщается при касании. */
#feed .feed-seek { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 5; cursor: pointer; touch-action: none; background: rgba(255, 255, 255, .22); transition: height .15s ease; }
#feed .feed-seek i { display: block; height: 100%; width: 0; border-radius: 0 3px 3px 0; background: #fff; transition: width .12s linear; }
#feed .feed-seek.active { height: 9px; }
#feed .feed-seek.active i { transition: none; }
/* На телефоне #feed заканчивается вплотную к нижней панели: полоса у самого
   края попадала под «+», он перехватывал касание и лента закрывалась.
   Поднимаем её над панелью и добавляем невидимую зону захвата. */
@media (max-width: 760px) {
  html.tt body.tt-feed #feed .feed-seek { bottom: 10px; height: 4px; z-index: 6; border-radius: 2px; }
  html.tt body.tt-feed #feed .feed-seek.active { height: 11px; }
}
#feed .feed-seek::before { content: ''; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }

/* Подпись плитки — ник участника, без «ГОСТЬ N»: длинный ник обрезаем многоточием. */
.speaker-tag { max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
