:root {
  color-scheme: dark;
  --bg: #000;
  --panel: #15171c;
  --panel-2: #1f2229;
  --text: #f4f6fb;
  --muted: #a8adb8;
  --line: #30343d;
  --accent: #ff3d4f;
  --accent-2: #36d399;
  --danger: #ff6b6b;
  --verify-check: #041014;
  --button-bg: linear-gradient(135deg, #ff3d4f, #c9182b);
  --button-border: #ff6977;
  --button-text: #fff;
}

:root[data-theme="light"] {
  color-scheme: dark;
  --bg: #061014;
  --panel: rgba(7, 24, 30, .88);
  --panel-2: rgba(12, 43, 50, .86);
  --text: #f5fffb;
  --muted: #b4d8d2;
  --line: rgba(138, 255, 220, .24);
  --accent: #22f0aa;
  --accent-2: #48b9ff;
  --danger: #d92d20;
  --verify-check: #fff;
  --button-bg: linear-gradient(135deg, #19d99b, #168cff);
  --button-border: rgba(34, 240, 170, .75);
  --button-text: #041014;
}

:root[data-theme="south"] {
  color-scheme: dark;
  --bg: #120712;
  --panel: rgba(31, 8, 30, .88);
  --panel-2: rgba(55, 17, 48, .86);
  --text: #fff8fc;
  --muted: #f0bfdc;
  --line: rgba(255, 137, 206, .25);
  --accent: #ff4fb3;
  --accent-2: #ffb347;
  --danger: #ff6b6b;
  --verify-check: #fff;
  --button-bg: linear-gradient(135deg, #ff4fb3, #ffb347);
  --button-border: rgba(255, 137, 206, .72);
  --button-text: #190711;
}

:root[data-theme="east"] {
  color-scheme: dark;
  --bg: #071018;
  --panel: rgba(7, 25, 36, .9);
  --panel-2: rgba(10, 45, 60, .86);
  --text: #f4fbff;
  --muted: #b9d9f2;
  --line: rgba(113, 201, 255, .26);
  --accent: #35c8ff;
  --accent-2: #8fffca;
  --danger: #ff6b6b;
  --verify-check: #fff;
  --button-bg: linear-gradient(135deg, #35c8ff, #8fffca);
  --button-border: rgba(113, 201, 255, .72);
  --button-text: #03131a;
}

:root[data-theme="west"] {
  color-scheme: dark;
  --bg: #100b05;
  --panel: rgba(35, 18, 8, .9);
  --panel-2: rgba(59, 29, 11, .86);
  --text: #fffaf0;
  --muted: #f3d5a8;
  --line: rgba(255, 195, 112, .26);
  --accent: #ffb13d;
  --accent-2: #ff6f59;
  --danger: #ff6b6b;
  --verify-check: #fff;
  --button-bg: linear-gradient(135deg, #ffb13d, #ff6f59);
  --button-border: rgba(255, 195, 112, .72);
  --button-text: #180b03;
}

* { box-sizing: border-box; }
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  font-family: Roboto, Arial, "Helvetica Neue", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  font-size: 14px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:root[data-theme="light"] body {
  background:
    linear-gradient(135deg, rgba(30, 255, 177, .26), transparent 34%),
    linear-gradient(215deg, rgba(72, 185, 255, .22), transparent 38%),
    linear-gradient(340deg, rgba(182, 84, 255, .18), transparent 42%),
    #061014;
  background-attachment: fixed;
}

:root[data-theme="south"] body {
  background:
    linear-gradient(145deg, rgba(255, 79, 179, .26), transparent 34%),
    linear-gradient(235deg, rgba(255, 179, 71, .2), transparent 38%),
    linear-gradient(20deg, rgba(130, 91, 255, .2), transparent 44%),
    #120712;
  background-attachment: fixed;
}

:root[data-theme="east"] body {
  background:
    linear-gradient(125deg, rgba(53, 200, 255, .25), transparent 36%),
    linear-gradient(225deg, rgba(143, 255, 202, .18), transparent 40%),
    linear-gradient(350deg, rgba(95, 135, 255, .18), transparent 44%),
    #071018;
  background-attachment: fixed;
}

:root[data-theme="west"] body {
  background:
    linear-gradient(135deg, rgba(255, 177, 61, .24), transparent 34%),
    linear-gradient(245deg, rgba(255, 111, 89, .2), transparent 40%),
    linear-gradient(350deg, rgba(121, 73, 255, .15), transparent 44%),
    #100b05;
  background-attachment: fixed;
}

body::before {
  content: none;
}

html.is-installed-app,
html.is-installed-app body {
  min-height: var(--app-height, 100dvh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

a { color: inherit; text-decoration: none; }
h1,
h2,
h3,
strong {
  font-weight: 500;
}
main { min-height: calc(100vh - 52px); }
html.is-installed-app main {
  min-height: calc(var(--app-height, 100dvh) - 52px);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 8px clamp(12px, 2vw, 28px);
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
html.is-installed-app .topbar {
  padding-top: max(8px, env(safe-area-inset-top));
}

:root[data-theme="light"] .topbar,
:root[data-theme="south"] .topbar,
:root[data-theme="east"] .topbar,
:root[data-theme="west"] .topbar {
  background: rgba(4, 18, 24, .92);
}

:root[data-theme="light"] .side-drawer,
:root[data-theme="south"] .side-drawer,
:root[data-theme="east"] .side-drawer,
:root[data-theme="west"] .side-drawer {
  background: rgba(4, 18, 24, .98);
  color: var(--text);
}

:root[data-theme="light"] .side-drawer a.active,
:root[data-theme="light"] .side-drawer a:hover,
:root[data-theme="south"] .side-drawer a.active,
:root[data-theme="south"] .side-drawer a:hover,
:root[data-theme="east"] .side-drawer a.active,
:root[data-theme="east"] .side-drawer a:hover,
:root[data-theme="west"] .side-drawer a.active,
:root[data-theme="west"] .side-drawer a:hover {
  background: rgba(138, 255, 220, .14);
}

.menu-toggle {
  display: none;
  gap: 4px;
  place-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}
.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;
  width: auto;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  position: relative;
}
.brand-mark {
  display: block;
  position: relative;
  width: 64px;
  height: 44px;
  flex: 0 0 64px;
  border-radius: 0;
  padding: 0;
  background: url("/assets/pv-brand-icon.png") center / contain no-repeat;
}
.brand-name {
  display: none;
  color: var(--text);
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}
.brand-letter {
  display: none;
  position: absolute;
  left: 7px;
  color: #ff465a;
  font-family: Roboto, Arial, "Helvetica Neue", sans-serif;
  font-size: 8px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  text-shadow:
    0 1px 2px rgba(0,0,0,.95),
    0 0 8px rgba(255,61,79,.68);
}
.brand-p { top: 7px; }
.brand-v { bottom: 7px; }
.brand:hover {
  transform: none;
  box-shadow: none;
}
nav,
.auth {
  min-width: 0;
  white-space: nowrap;
}
nav {
  display: flex;
  gap: 6px;
  flex: 1;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
nav a, .ghost, .button, .nav-refresh {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(12, 20, 34, .74);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.desktop-nav {
  display: none;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}
.story-top-add {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent), transparent 86%);
  color: var(--text);
}
.story-top-add:hover {
  background: color-mix(in srgb, var(--accent), transparent 72%);
}
.story-top-add svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}
.audio-open-top::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 3v11.3A3.5 3.5 0 1 1 15 11.2V7l-6 1.2v8.1A3.5 3.5 0 1 1 7 13.2V6l10-2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 3v11.3A3.5 3.5 0 1 1 15 11.2V7l-6 1.2v8.1A3.5 3.5 0 1 1 7 13.2V6l10-2Z'/%3E%3C/svg%3E");
}
.video-open-top::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6.5A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5v11a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 4 17.5v-11Zm6 2.4v6.2l5.2-3.1L10 8.9Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6.5A2.5 2.5 0 0 1 6.5 4h11A2.5 2.5 0 0 1 20 6.5v11a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 4 17.5v-11Zm6 2.4v6.2l5.2-3.1L10 8.9Z'/%3E%3C/svg%3E");
}
.top-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.top-icon:hover {
  background: color-mix(in srgb, var(--text), transparent 90%);
}
.top-icon::before {
  content: "";
  width: 24px;
  height: 24px;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.top-search::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.7 4a6.7 6.7 0 1 0 0 13.4 6.7 6.7 0 0 0 0-13.4Zm0 2.2a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9Zm5.4 9 4.2 4.2-1.6 1.6-4.2-4.2 1.6-1.6Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.7 4a6.7 6.7 0 1 0 0 13.4 6.7 6.7 0 0 0 0-13.4Zm0 2.2a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9Zm5.4 9 4.2 4.2-1.6 1.6-4.2-4.2 1.6-1.6Z'/%3E%3C/svg%3E");
}
.top-bell::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a2.8 2.8 0 0 0 2.7-2h-5.4A2.8 2.8 0 0 0 12 22ZM5 17h14l-1.8-2.7V10a5.2 5.2 0 0 0-4-5.1V3a1.2 1.2 0 0 0-2.4 0v1.9a5.2 5.2 0 0 0-4 5.1v4.3L5 17Zm2.8-2 .9-1.3V10a3.3 3.3 0 0 1 6.6 0v3.7l.9 1.3H7.8Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 22a2.8 2.8 0 0 0 2.7-2h-5.4A2.8 2.8 0 0 0 12 22ZM5 17h14l-1.8-2.7V10a5.2 5.2 0 0 0-4-5.1V3a1.2 1.2 0 0 0-2.4 0v1.9a5.2 5.2 0 0 0-4 5.1v4.3L5 17Zm2.8-2 .9-1.3V10a3.3 3.3 0 0 1 6.6 0v3.7l.9 1.3H7.8Z'/%3E%3C/svg%3E");
}
.top-more::before {
  width: 22px;
  height: 22px;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.4 13.5c.1-.5.1-1 0-1.5l2-1.5-2-3.5-2.4 1c-.4-.3-.8-.6-1.3-.8L15.4 4h-6l-.3 3.2c-.5.2-.9.5-1.3.8l-2.4-1-2 3.5 2 1.5a7.7 7.7 0 0 0 0 1.5l-2 1.5 2 3.5 2.4-1c.4.3.8.6 1.3.8l.3 3.2h6l.3-3.2c.5-.2.9-.5 1.3-.8l2.4 1 2-3.5-2-1.5ZM12.4 16a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19.4 13.5c.1-.5.1-1 0-1.5l2-1.5-2-3.5-2.4 1c-.4-.3-.8-.6-1.3-.8L15.4 4h-6l-.3 3.2c-.5.2-.9.5-1.3.8l-2.4-1-2 3.5 2 1.5a7.7 7.7 0 0 0 0 1.5l-2 1.5 2 3.5 2.4-1c.4.3.8.6 1.3.8l.3 3.2h6l.3-3.2c.5-.2.9-.5 1.3-.8l2.4 1 2-3.5-2-1.5ZM12.4 16a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z'/%3E%3C/svg%3E");
}
.top-dot {
  position: absolute;
  top: 7px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff0033;
  border: 2px solid var(--bg);
}
.search-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 320;
  width: min(100vw, 520px);
  padding: max(18px, env(safe-area-inset-top)) 18px 18px;
  background: #0f0f0f;
  color: #fff;
  transform: translateX(-105%);
  transition: transform .2s ease;
}
.search-open .search-drawer {
  transform: translateX(0);
}
.search-backdrop {
  position: fixed;
  inset: 0;
  z-index: 310;
  display: none;
  background: rgba(0,0,0,.46);
}
.search-open .search-backdrop {
  display: block;
}
.search-drawer-form {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
}
.search-drawer-form input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #2a2a2a;
  color: #fff;
  font-size: 15px;
}
.search-drawer-form input::placeholder {
  color: #aaa;
}
.search-back,
.search-mic {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
}
.search-mic {
  background: #2a2a2a;
}
.search-back::before,
.search-mic::before {
  content: "";
  width: 24px;
  height: 24px;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.search-back::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 11v2H7.8l5.6 5.6L12 20 4 12l8-8 1.4 1.4L7.8 11H20Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 11v2H7.8l5.6 5.6L12 20 4 12l8-8 1.4 1.4L7.8 11H20Z'/%3E%3C/svg%3E");
}
.search-mic::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.9V21h2v-3.1a7 7 0 0 0 6-6.9h-2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 14a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v6a3 3 0 0 0 3 3Zm5-3a5 5 0 0 1-10 0H5a7 7 0 0 0 6 6.9V21h2v-3.1a7 7 0 0 0 6-6.9h-2Z'/%3E%3C/svg%3E");
}
nav a.active, .button {
  background: var(--button-bg);
  border-color: var(--button-border);
  color: var(--button-text);
}
.nav-refresh {
  white-space: nowrap;
}
nav a::before,
.auth .ghost::before,
.auth .button::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  background: currentColor;
  opacity: .94;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}
nav a:nth-child(1)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11.4 12 4l9 7.4v8.1c0 .8-.7 1.5-1.5 1.5H15v-6H9v6H4.5c-.8 0-1.5-.7-1.5-1.5v-8.1Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 11.4 12 4l9 7.4v8.1c0 .8-.7 1.5-1.5 1.5H15v-6H9v6H4.5c-.8 0-1.5-.7-1.5-1.5v-8.1Z'/%3E%3C/svg%3E");
}
nav a:nth-child(2)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5C4 4.7 4.7 4 5.5 4h13c.8 0 1.5.7 1.5 1.5v13c0 .8-.7 1.5-1.5 1.5h-13C4.7 20 4 19.3 4 18.5v-13Zm6 3v7l6-3.5-6-3.5Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5C4 4.7 4.7 4 5.5 4h13c.8 0 1.5.7 1.5 1.5v13c0 .8-.7 1.5-1.5 1.5h-13C4.7 20 4 19.3 4 18.5v-13Zm6 3v7l6-3.5-6-3.5Z'/%3E%3C/svg%3E");
}
nav a:nth-child(3)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2 5 13h6l-2 9 9-13h-6l1-7Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2 5 13h6l-2 9 9-13h-6l1-7Z'/%3E%3C/svg%3E");
}
nav a:nth-child(4)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 6.5A3.5 3.5 0 1 1 15 6.5 3.5 3.5 0 0 1 8 6.5Zm-4 12C4 15.5 6.7 13 10.5 13S17 15.5 17 18.5V20H4v-1.5Zm12.3-5.2c2.4.5 3.7 2.3 3.7 4.4V20h-2v-1.5c0-2.1-.7-3.9-1.7-5.2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 6.5A3.5 3.5 0 1 1 15 6.5 3.5 3.5 0 0 1 8 6.5Zm-4 12C4 15.5 6.7 13 10.5 13S17 15.5 17 18.5V20H4v-1.5Zm12.3-5.2c2.4.5 3.7 2.3 3.7 4.4V20h-2v-1.5c0-2.1-.7-3.9-1.7-5.2Z'/%3E%3C/svg%3E");
}
nav a:nth-child(5)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 4h14c.8 0 1.5.7 1.5 1.5v13c0 .8-.7 1.5-1.5 1.5H5c-.8 0-1.5-.7-1.5-1.5v-13C3.5 4.7 4.2 4 5 4Zm2 4v2h10V8H7Zm0 4v2h6v-2H7Zm8.2.2 2.8 1.6-2.8 1.6v-3.2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 4h14c.8 0 1.5.7 1.5 1.5v13c0 .8-.7 1.5-1.5 1.5H5c-.8 0-1.5-.7-1.5-1.5v-13C3.5 4.7 4.2 4 5 4Zm2 4v2h10V8H7Zm0 4v2h6v-2H7Zm8.2.2 2.8 1.6-2.8 1.6v-3.2Z'/%3E%3C/svg%3E");
}
nav a:nth-child(6)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5C4 4.7 4.7 4 5.5 4h13c.8 0 1.5.7 1.5 1.5v9c0 .8-.7 1.5-1.5 1.5H9l-5 4V5.5Zm4 3v2h8v-2H8Zm0 4v2h5v-2H8Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5.5C4 4.7 4.7 4 5.5 4h13c.8 0 1.5.7 1.5 1.5v9c0 .8-.7 1.5-1.5 1.5H9l-5 4V5.5Zm4 3v2h8v-2H8Zm0 4v2h5v-2H8Z'/%3E%3C/svg%3E");
}
nav a:nth-child(7)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8 14 5l3-.5 1.4 2.5-2 2.2c.1.5.1 1 0 1.6l2 2.2-1.4 2.5-3-.5-2 2.2-2-2.2-3 .5L5.6 13l2-2.2c-.1-.5-.1-1 0-1.6L5.6 7 7 4.5l3 .5 2-2.2ZM12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8 14 5l3-.5 1.4 2.5-2 2.2c.1.5.1 1 0 1.6l2 2.2-1.4 2.5-3-.5-2 2.2-2-2.2-3 .5L5.6 13l2-2.2c-.1-.5-.1-1 0-1.6L5.6 7 7 4.5l3 .5 2-2.2ZM12 8a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z'/%3E%3C/svg%3E");
}
.auth .ghost::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 4h8c.8 0 1.5.7 1.5 1.5v13c0 .8-.7 1.5-1.5 1.5h-8v-3h6.5V7H10V4Zm-1 4 5 4-5 4v-3H3v-2h6V8Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 4h8c.8 0 1.5.7 1.5 1.5v13c0 .8-.7 1.5-1.5 1.5h-8v-3h6.5V7H10V4Zm-1 4 5 4-5 4v-3H3v-2h6V8Z'/%3E%3C/svg%3E");
}
.auth .button::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5.5A3.5 3.5 0 1 1 16 5.5 3.5 3.5 0 0 1 9 5.5ZM4 19c0-3.3 3-6 7-6 1.3 0 2.5.3 3.5.8A5.7 5.7 0 0 0 13 18c0 .7.1 1.4.4 2H4v-1Zm14-5v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5.5A3.5 3.5 0 1 1 16 5.5 3.5 3.5 0 0 1 9 5.5ZM4 19c0-3.3 3-6 7-6 1.3 0 2.5.3 3.5.8A5.7 5.7 0 0 0 13 18c0 .7.1 1.4.4 2H4v-1Zm14-5v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2Z'/%3E%3C/svg%3E");
}
.auth {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 0 0 auto;
}

.mobile-bottom-nav {
  display: none;
}
.bottom-nav-item {
  position: relative;
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
  line-height: 1.1;
}
.mobile-bottom-nav .bottom-nav-item,
.mobile-bottom-nav .bottom-nav-item.active,
.mobile-bottom-nav .bottom-nav-item:hover {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.mobile-bottom-nav .bottom-nav-item::before {
  content: none;
  display: none;
}
.bottom-nav-item em {
  display: block;
  overflow: hidden;
  max-width: 100%;
  color: inherit;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bottom-nav-item .bottom-icon {
  display: block;
  width: 26px;
  height: 26px;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.bottom-nav-item[data-bottom-icon="home"] .bottom-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 3 3 10.4V21h6.8v-6h4.4v6H21V10.4L12 3Zm0 2.6 7 5.8V19h-2.8v-6H7.8v6H5v-7.6l7-5.8Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 3 3 10.4V21h6.8v-6h4.4v6H21V10.4L12 3Zm0 2.6 7 5.8V19h-2.8v-6H7.8v6H5v-7.6l7-5.8Z'/%3E%3C/svg%3E");
}
.bottom-nav-item[data-bottom-icon="stories"] .bottom-icon,
.stories-mark {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill-rule='evenodd' d='M24 5c6-3 13 1 13 8v8l8-5c7-4 15 1 15 9 0 3-2 6-5 8L44 39l11 6c7 4 7 14 0 18l-11 6c-6 3-13-1-13-8v-8l-8 5c-7 4-15-1-15-9 0-3 2-6 5-8l11-6-11-6c-7-4-7-14 0-18L24 5Zm1 8-9 5c-2 1-2 4 0 5l20 12-20 12c-2 1-2 4 0 5 1 1 3 1 4 0l19-11v20c0 2 2 3 4 2l9-5c2-1 2-4 0-5L32 41l20-12c2-1 2-4 0-5-1-1-3-1-4 0L29 35V15c0-2-2-3-4-2Z' transform='translate(0 -5)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill-rule='evenodd' d='M24 5c6-3 13 1 13 8v8l8-5c7-4 15 1 15 9 0 3-2 6-5 8L44 39l11 6c7 4 7 14 0 18l-11 6c-6 3-13-1-13-8v-8l-8 5c-7 4-15-1-15-9 0-3 2-6 5-8l11-6-11-6c-7-4-7-14 0-18L24 5Zm1 8-9 5c-2 1-2 4 0 5l20 12-20 12c-2 1-2 4 0 5 1 1 3 1 4 0l19-11v20c0 2 2 3 4 2l9-5c2-1 2-4 0-5L32 41l20-12c2-1 2-4 0-5-1-1-3-1-4 0L29 35V15c0-2-2-3-4-2Z' transform='translate(0 -5)'/%3E%3C/svg%3E");
}
.bottom-nav-item[data-bottom-icon="subscriptions"] .bottom-icon {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M5 5h12.5A2.5 2.5 0 0 1 20 7.5v8a2.5 2.5 0 0 1-2.5 2.5H5a2.5 2.5 0 0 1-2.5-2.5v-8A2.5 2.5 0 0 1 5 5Zm0 2v9h12.5a.5.5 0 0 0 .5-.5v-8a.5.5 0 0 0-.5-.5H5Zm4 2.2v4.6l4-2.3-4-2.3ZM7 2h12.5A2.5 2.5 0 0 1 22 4.5V14h-2V4.5a.5.5 0 0 0-.5-.5H7V2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M5 5h12.5A2.5 2.5 0 0 1 20 7.5v8a2.5 2.5 0 0 1-2.5 2.5H5a2.5 2.5 0 0 1-2.5-2.5v-8A2.5 2.5 0 0 1 5 5Zm0 2v9h12.5a.5.5 0 0 0 .5-.5v-8a.5.5 0 0 0-.5-.5H5Zm4 2.2v4.6l4-2.3-4-2.3ZM7 2h12.5A2.5 2.5 0 0 1 22 4.5V14h-2V4.5a.5.5 0 0 0-.5-.5H7V2Z'/%3E%3C/svg%3E");
}
.bottom-nav-item[data-bottom-icon="subscriptions"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: calc(50% + 8px);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff0033;
}
.bottom-create {
  display: grid;
}
.bottom-create .bottom-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text), transparent 90%);
  -webkit-mask-image: none;
  mask-image: none;
}
.bottom-create::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 36px;
  font-weight: 300;
  line-height: 1;
}
.bottom-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: visible;
  background: var(--panel-2);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}
.bottom-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.bottom-you .avatar-verify-badge {
  width: 10px;
  height: 10px;
  flex-basis: 10px;
  top: 0;
  right: 0;
  transform: translate(12%, -12%);
}

.profile-menu {
  position: relative;
  z-index: 120;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}
.profile-button {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 42px;
  height: 42px;
  min-width: 42px;
  max-width: 42px;
  flex: 0 0 42px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-weight: 700;
  overflow: visible;
  line-height: 1;
}
.profile-avatar-frame {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  clip-path: circle(50% at 50% 50%);
  background: transparent;
}
.profile-avatar-frame img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center center;
  border-radius: 50%;
  background: transparent;
}
.profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: none;
  min-width: 260px;
  max-height: calc(100vh - 72px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 20px 44px rgba(0,0,0,.42);
  z-index: 420;
}
.profile-dropdown.is-open {
  display: grid;
  gap: 10px;
}
.profile-dropdown small,
.profile-dropdown label {
  color: var(--muted);
}
.profile-dropdown .checkbox-line {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}
.profile-dropdown .checkbox-line input {
  width: auto;
  margin: 0;
}
.profile-dropdown a {
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.profile-dropdown a.button {
  padding: 9px 10px;
  border-top: 1px solid #ff6977;
}
.profile-preview {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--text);
  font-size: 32px;
  font-weight: 700;
  overflow: visible;
}
.profile-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-editor {
  position: relative;
  display: inline-grid;
  place-items: center;
  margin: 6px 0 14px;
}
.avatar-crop-preview {
  width: 132px;
  height: 132px;
  overflow: hidden;
}
.avatar-crop-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: center;
  border-radius: 0;
  will-change: transform;
}
.avatar-crop-preview canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}
.avatar-crop-preview.is-empty span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.avatar-crop-controls {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
}
.avatar-crop-controls label {
  display: grid;
  gap: 6px;
}

.side-drawer {
  position: fixed;
  top: 58px;
  left: 0;
  bottom: 0;
  z-index: 380;
  width: min(320px, 86vw);
  padding: 14px;
  overflow-y: auto;
  transform: translateX(-105%);
  transition: transform .18s ease;
  border-right: 1px solid var(--line);
  background: rgba(0,0,0,.96);
}
.drawer-open .side-drawer {
  transform: translateX(0);
}
.drawer-backdrop {
  position: fixed;
  inset: 58px 0 0;
  z-index: 360;
  display: none;
  background: rgba(0,0,0,.45);
}
.drawer-open .drawer-backdrop {
  display: block;
}
.side-drawer a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 10px;
  border-radius: 8px;
}
.side-drawer a.active,
.side-drawer a:hover {
  background: var(--panel-2);
}
.drawer-refresh {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  padding: 9px 10px;
  border-radius: 8px;
}
.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
.drawer-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
button { cursor: pointer; font: inherit; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
  gap: 22px;
  padding: clamp(24px, 5vw, 62px) clamp(16px, 4vw, 56px);
  align-items: center;
}
.hero-cinema {
  min-height: 0;
  grid-template-columns: minmax(320px, 1.05fr) minmax(420px, .95fr);
  gap: 10px;
  padding: 10px clamp(10px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(10,12,16,.94), rgba(8,9,11,.86)),
    linear-gradient(135deg, rgba(255,61,79,.08), transparent 44%);
}
.hero h1 {
  max-width: 620px;
  margin: 0 0 12px;
  font-size: clamp(24px, 3.6vw, 44px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}
.hero p { max-width: 580px; color: var(--muted); font-size: 15px; }
.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 620px;
  margin: 18px 0 0;
}
.hero-compact-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: stretch;
  min-width: 0;
}
.hero-compact-actions .hero-search {
  margin-top: 0;
  flex: 1 1 320px;
  max-width: none;
  min-width: 220px;
}
.hero-compact-actions .actions {
  margin: 0;
  gap: 6px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}
.hero-compact-actions .actions > .button,
.upload-cta {
  min-height: 44px;
}
.upload-cta {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 210px;
  max-width: 260px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 20, 34, .74);
  color: var(--text);
  line-height: 1.12;
}
.upload-cta strong,
.upload-cta small {
  display: block;
  white-space: normal;
}
.upload-cta strong {
  font-size: 12px;
  font-weight: 800;
}
.upload-cta small {
  color: var(--muted);
  font-size: 11px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  text-transform: uppercase;
  font-weight: 500;
  font-size: 11px;
}
.hero-panel, .panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.88);
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
  padding: 22px;
}
.hero-panel.platform-card {
  display: none;
  grid-template-columns: minmax(190px, .75fr) minmax(250px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  box-shadow: none;
  background: rgba(15, 18, 26, .82);
}
.platform-card {
  display: grid;
  gap: 18px;
}
.hero-panel.platform-card > strong {
  font-size: 13px;
  line-height: 1.2;
}
.hero-panel.platform-card > p {
  display: none;
}
.mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}
.hero-panel .mini-stats {
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 6px;
}
.stat-card {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 9, 11, .58);
}
.hero-panel .stat-card {
  min-height: 48px;
  padding: 8px 10px;
  gap: 2px;
}
.stat-card strong {
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}
.hero-panel .stat-card strong {
  font-size: 16px;
}
.hero-panel .stat-card span {
  font-size: 11px;
}
.stat-card span,
.stat-card small {
  color: var(--muted);
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.pager {
  justify-content: center;
  align-items: center;
  margin-top: 18px;
}
.sort-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 0;
}
.sort-actions .muted {
  font-size: 13px;
  line-height: 1.2;
}
.sort-actions .button,
.sort-actions .ghost {
  min-height: 32px;
  padding: 7px 11px;
}
.sort-menu {
  position: relative;
  display: inline-flex;
  max-width: 100%;
}
.sort-menu summary {
  list-style: none;
}
.sort-menu summary::-webkit-details-marker {
  display: none;
}
.sort-menu-button {
  min-height: 34px;
  padding: 7px 11px;
  white-space: nowrap;
}
.sort-menu-button::after {
  content: "▾";
  font-size: 11px;
  opacity: .72;
}
.sort-menu-button span {
  color: var(--muted);
  font-size: 12px;
}
.sort-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 35;
  display: grid;
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 16, 22, .98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .38);
}
.sort-menu-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
}
.sort-menu-panel a:hover,
.sort-menu-panel a.is-active {
  background: color-mix(in srgb, var(--accent), transparent 84%);
}
.sort-menu-panel a.is-active::after {
  content: "✓";
  color: var(--accent);
  font-weight: 800;
}
.compact-head {
  align-items: center;
  flex-wrap: wrap;
}
.stories-strip {
  padding-top: 10px;
  padding-bottom: 8px;
}
.stories-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: thin;
}
.story-bubble {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 76px;
  min-width: 76px;
  color: var(--text);
  text-decoration: none;
}
.story-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent), transparent 16%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel), var(--text) 4%);
  color: var(--text);
  font-weight: 800;
}
.story-bubble.is-seen .story-ring {
  border-color: color-mix(in srgb, var(--muted), transparent 55%);
}
.story-create-bubble .story-ring {
  border-style: dashed;
  font-size: 24px;
}
.story-ring img,
.story-ring video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-name {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.story-name .name-with-badge {
  max-width: 100%;
  justify-content: center;
}
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}
.story-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.story-card .story-bubble {
  width: 100%;
}
.story-card .story-ring {
  width: 86px;
  height: 86px;
}
.story-create-form,
.story-reply-form {
  display: grid;
  gap: 10px;
}
.story-create-page {
  max-width: 980px;
  margin-inline: auto;
}
.story-source-tools {
  max-width: 520px;
  margin-inline: auto;
}
.story-source-actions {
  justify-content: center;
}
.story-record-actions[hidden],
.story-record-actions [hidden],
.story-record-timer[hidden] {
  display: none !important;
}
.story-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  justify-items: center;
}
.story-editor-preview {
  display: grid;
  gap: 10px;
  width: min(390px, 100%);
}
.story-editor-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 1px solid color-mix(in srgb, var(--line), #fff 10%);
  border-radius: 18px;
  background: #07090f;
  box-shadow: 0 22px 60px rgba(0,0,0,.24);
  touch-action: none;
}
.story-editor-stage video,
.story-editor-stage img,
.story-editor-empty {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-editor-empty {
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--text), transparent 50%);
  font-size: 52px;
  font-weight: 900;
}
.story-editor-hint {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.34);
  color: rgba(255,255,255,.84);
  text-align: center;
  font-size: 13px;
  pointer-events: none;
}
.story-editor-form.has-media .story-editor-hint {
  top: auto;
  bottom: 78px;
  transform: none;
}
.story-editor-main-tools {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  width: calc(100% - 28px);
  transform: translateX(-50%);
}
.story-editor-main-tools .ghost {
  min-height: 34px;
  border-color: rgba(255,255,255,.18);
  background: rgba(0,0,0,.42);
  color: #fff;
  backdrop-filter: blur(10px);
}
.story-editor-text {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  max-width: calc(100% - 28px);
  padding: 4px 8px;
  color: #fff;
  line-height: 1.12;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,.58);
  touch-action: none;
  user-select: none;
  cursor: move;
  overflow-wrap: anywhere;
}
.story-editor-text.is-selected,
.story-editor-link.is-selected,
.story-editor-sticker.is-selected {
  outline: 2px solid rgba(49,230,199,.9);
  outline-offset: 4px;
}
.story-editor-text.is-selected::after,
.story-editor-link.is-selected::after,
.story-editor-sticker.is-selected::after {
  content: "";
  position: absolute;
  right: -9px;
  bottom: -9px;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #31e6c7;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.story-editor-text[data-backdrop="1"] {
  border-radius: 8px;
  background: rgba(0,0,0,.46);
}
.story-editor-final {
  display: grid;
  gap: 10px;
  width: min(520px, 100%);
  min-width: 0;
}
.story-editor-overlay-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 68px;
  z-index: 20;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  background: rgba(5,8,14,.72);
  color: #fff;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0,0,0,.32);
}
.story-editor-overlay-panel[hidden] {
  display: none;
}
.story-editor-overlay-panel textarea,
.story-editor-overlay-panel input {
  min-height: 38px;
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.12);
  color: #fff;
}
.story-editor-overlay-panel textarea::placeholder,
.story-editor-overlay-panel input::placeholder {
  color: rgba(255,255,255,.64);
}
.story-font-palette,
.story-color-palette,
.story-overlay-actions,
.story-sticker-picker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.story-font-palette button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #fff;
  cursor: pointer;
}
.story-color-palette button {
  width: 26px;
  height: 26px;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 999px;
  background: var(--swatch);
  cursor: pointer;
}
.story-swatch-accent {
  background: linear-gradient(135deg, #31e6c7, #7c5cff) !important;
}
.story-sticker-picker button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #fff;
  cursor: pointer;
}
.story-sticker-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}
.story-sticker,
.story-editor-sticker {
  position: absolute;
  left: var(--story-sticker-x, 50%);
  top: var(--story-sticker-y, 50%);
  z-index: 7;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  filter: drop-shadow(0 3px 12px rgba(0,0,0,.48));
  transform: translate(-50%, -50%) scale(var(--story-sticker-scale, 1));
  transform-origin: center;
  cursor: move;
  pointer-events: auto;
  touch-action: none;
}
.story-sticker-icon {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.story-editor-link {
  position: absolute;
  z-index: 9;
  bottom: auto;
  transform-origin: center;
  touch-action: none;
  cursor: move;
}
.story-segment-editor {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}
.story-segment-sliders {
  display: grid;
  gap: 8px;
}
.story-segment-list {
  display: grid;
  gap: 6px;
}
.story-segment-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.story-segment-chip span {
  flex: 1 1 150px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.story-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.story-editor-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}
.story-link-error {
  margin: -4px 0 0;
  color: var(--danger);
  font-size: 12px;
}
.story-viewer-page {
  position: fixed;
  inset: 0;
  z-index: 520;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(0,0,0,.88);
}
.story-viewer {
  width: min(480px, 100%);
  max-height: calc(100dvh - 28px);
  display: grid;
  gap: 10px;
  color: #fff;
}
.story-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
  gap: 4px;
}
.story-progress span {
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,.34);
}
.story-progress span.is-active {
  background: #fff;
}
.story-view-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.story-view-head span {
  min-width: 0;
}
.story-view-head small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.story-view-avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}
.story-view-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  background: #000;
}
.story-nav-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.story-view-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-text-only {
  background:
    radial-gradient(circle at 20% 12%, rgba(69, 191, 98, .34), transparent 30%),
    linear-gradient(145deg, #101827, #17151f 54%, #07110e);
}
.story-overlay-text {
  position: absolute;
  left: 14px;
  right: 14px;
  color: var(--story-text-color);
  font-family: var(--story-text-font);
  font-size: var(--story-text-size);
  font-weight: var(--story-text-weight);
  line-height: 1.16;
  text-align: var(--story-text-align);
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
  word-break: break-word;
}
.story-overlay-text[data-position="custom"] {
  left: var(--story-text-x, 50%);
  right: auto;
  top: var(--story-text-y, 50%);
  max-width: calc(100% - 28px);
  transform: translate(-50%, -50%);
}
.story-overlay-text[data-backdrop="1"] {
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,.46);
}
.story-overlay-text[data-position="top"] {
  top: 10%;
}
.story-overlay-text[data-position="center"] {
  top: 50%;
  transform: translateY(-50%);
}
.story-overlay-text[data-position="bottom"] {
  bottom: 12%;
}
.story-link-button {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  max-width: calc(100% - 28px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  gap: 7px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #101010;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.24);
}
.story-link-icon {
  width: 17px;
  height: 17px;
  fill: currentColor;
  flex: 0 0 17px;
}
.story-description {
  margin: 0;
  color: var(--muted);
}
.story-view-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
body.story-modal-open {
  overflow: hidden;
}
.pv-story-viewer {
  backdrop-filter: blur(10px);
}
.pv-story-backdrop {
  position: fixed;
  inset: 0;
}
.pv-story-shell {
  position: relative;
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  display: grid;
  gap: 10px;
  outline: 0;
}
.story-view-stage.pv-story-frame {
  width: min(100%, 430px);
  max-height: min(780px, calc(100dvh - 112px));
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 18px;
  background: #050608;
  box-shadow: 0 22px 80px rgba(0,0,0,.48);
  isolation: isolate;
}
.pv-story-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.pv-story-shade {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  pointer-events: none;
}
.pv-story-shade-top {
  top: 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(0,0,0,.66), transparent);
}
.pv-story-shade-bottom {
  bottom: 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(0,0,0,.72), transparent);
}
.pv-story-progress {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 12px;
  right: 12px;
  z-index: 9;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(18px, 1fr);
  gap: 5px;
}
.pv-story-progress-segment {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.3);
}
.pv-story-progress-segment i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #fff;
}
.pv-story-progress-segment.is-complete i {
  width: 100%;
}
.pv-story-progress-segment.is-active i {
  transition: width .16s linear;
}
.story-view-head.pv-story-header {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 22px);
  left: 12px;
  right: 12px;
  z-index: 10;
  color: #fff;
}
.pv-story-author {
  overflow: hidden;
}
.pv-story-author .name-with-badge,
.pv-story-author small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pv-story-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pv-story-icon-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(0,0,0,.34);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.pv-story-icon-button:hover,
.pv-story-icon-button:focus-visible,
.pv-story-icon-button.is-active {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.pv-story-icon-button svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}
.pv-story-icon-button span {
  font-size: 12px;
  font-weight: 800;
}
.pv-story-like-form {
  margin: 0;
}
.pv-story-like-form .pv-story-icon-button {
  width: auto;
  padding: 0 10px;
}
.pv-story-menu {
  position: relative;
}
.pv-story-menu summary {
  list-style: none;
}
.pv-story-menu summary::-webkit-details-marker {
  display: none;
}
.pv-story-menu-panel {
  position: absolute;
  top: 42px;
  right: 0;
  z-index: 20;
  min-width: 190px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(10,12,18,.94);
  box-shadow: 0 18px 50px rgba(0,0,0,.38);
}
.pv-story-menu-panel a,
.pv-story-menu-panel button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  color: #fff;
  text-decoration: none;
}
.pv-story-menu-panel form {
  margin: 0;
}
.pv-story-notice {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 72px);
  left: 12px;
  right: 12px;
  z-index: 10;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 12px;
}
.pv-story-tap-zone {
  position: absolute;
  top: 82px;
  bottom: 104px;
  z-index: 3;
  width: 42%;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.pv-story-tap-prev {
  left: 0;
}
.pv-story-tap-next {
  right: 0;
}
.pv-story-tap-zone:disabled {
  cursor: default;
}
.pv-story-text {
  z-index: 6;
}
.pv-story-frame .story-overlay-text[data-position="top"] {
  top: 18%;
}
.pv-story-frame .story-overlay-text[data-position="bottom"] {
  bottom: 24%;
}
.pv-story-bottom {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 8;
  display: grid;
  justify-items: center;
  gap: 10px;
  pointer-events: none;
}
.pv-story-bottom > * {
  pointer-events: auto;
}
.story-link-button.pv-story-link {
  position: absolute;
  left: var(--story-link-x, 50%);
  top: var(--story-link-y, 82%);
  bottom: auto;
  z-index: 8;
  transform: translate(-50%, -50%) scale(var(--story-link-scale, 1));
  max-width: 100%;
  min-height: 38px;
  padding-inline: 16px;
}
.pv-story-description {
  max-width: 100%;
  margin: 0;
  color: rgba(255,255,255,.88);
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,.58);
}
.story-view-actions.pv-story-actions {
  justify-content: center;
}
.pv-story-report-shortcut {
  display: none;
}
.pv-story-play-fallback {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  border: 0;
  background: rgba(0,0,0,.42);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.pv-story-play-fallback[hidden] {
  display: none;
}
.pv-story-play-fallback svg {
  width: 42px;
  height: 42px;
  fill: currentColor;
}
.pv-story-reply-panel {
  display: grid;
  gap: 8px;
  color: #fff;
}
.pv-story-reply-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.pv-story-login-reply {
  justify-self: center;
}
.pv-story-counters {
  margin: 0;
  text-align: center;
}
.story-replies {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}
.story-reply-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}
.story-reply-row span {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.story-reply-row small {
  color: var(--muted);
}
.story-reply-row em {
  overflow-wrap: anywhere;
  font-style: normal;
}
.like-user-list {
  display: grid;
  gap: 8px;
}
.like-user-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.like-user-row .channel-avatar {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}
.like-user-row small {
  color: var(--muted);
}
.chip-row {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 13px;
}
.chip.is-active {
  background: var(--text);
  color: var(--bg);
}
.feed-chip-row {
  position: sticky;
  top: 58px;
  z-index: 9;
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 6px clamp(10px, 3vw, 28px);
  overflow-x: auto;
  white-space: nowrap;
  background: var(--bg);
  scrollbar-width: none;
}
.feed-chip-row::-webkit-scrollbar {
  display: none;
}
.feed-chip-row .chip {
  min-height: 26px;
  padding: 0 11px;
  border-radius: 8px;
  background: #222;
  color: #f6f6f6;
  font-size: 12px;
  font-weight: 500;
}
.feed-chip-row .chip.is-active {
  background: #fff;
  color: #0f0f0f;
}
.chip-compass {
  width: 36px;
  min-width: 36px;
  padding: 0;
  justify-content: center;
}
.chip-compass::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M24 4a20 20 0 1 0 0 40 20 20 0 0 0 0-40Zm0 4a16 16 0 1 1 0 32 16 16 0 0 1 0-32Zm8.8 7.2-5.4 12.2-12.2 5.4 5.4-12.2 12.2-5.4Zm-9 8.6-1.9 4.3 4.3-1.9 1.9-4.3-4.3 1.9Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath d='M24 4a20 20 0 1 0 0 40 20 20 0 0 0 0-40Zm0 4a16 16 0 1 1 0 32 16 16 0 0 1 0-32Zm8.8 7.2-5.4 12.2-12.2 5.4 5.4-12.2 12.2-5.4Zm-9 8.6-1.9 4.3 4.3-1.9 1.9-4.3-4.3 1.9Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.shorts-section-head {
  align-items: center;
}
.shorts-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.shorts-title h2 {
  font-size: 24px;
  font-weight: 800;
}
.shorts-mark {
  display: inline-block;
  width: 34px;
  height: 34px;
  background: #ff0033;
}
.section-kebab {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: var(--text);
}
.section-kebab::before {
  content: "";
  width: 24px;
  height: 24px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.section-kebab:hover {
  background: color-mix(in srgb, var(--text), transparent 90%);
}
.section { padding: 18px clamp(12px, 3vw, 40px); }
.hero-cinema + .section {
  padding-top: 14px;
}
.section h1, .section h2 { margin-top: 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head h1,
.section-head h2,
.section-head p {
  margin: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px 14px;
}
.youtube-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.shorts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  align-items: start;
}
.shorts-grid .video-card {
  max-width: 260px;
}
.shorts-grid .poster {
  aspect-ratio: 9 / 16;
}
.shorts-view {
  height: calc(100vh - 58px);
  overflow-y: auto;
  display: block;
  padding: 0;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.shorts-shell {
  width: min(100%, 820px);
  min-height: calc(100vh - 58px);
  margin: 0 auto;
  padding: 18px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 44px minmax(280px, 430px) 86px;
  gap: 14px;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.short-player-card {
  position: relative;
  width: min(420px, calc((100dvh - 96px) * 9 / 16), 100%);
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 18px 52px rgba(0,0,0,.28);
}
.short-video,
.short-embed {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: calc(100vh - 110px);
  object-fit: cover;
  background: #000;
}
.short-player-card .short-video,
.short-player-card .short-embed {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: inherit;
}
.short-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, .88) 28%, rgba(2, 6, 23, .94));
  transition: opacity .18s ease, transform .18s ease;
}
.short-sound-hint {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  z-index: 3;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(0,0,0,.62);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  transition: opacity .18s ease, transform .18s ease;
}
.short-sound-hint.is-hidden,
.short-feed-item.is-idle .short-sound-hint {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}
.short-like-burst {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.94);
  opacity: 0;
  pointer-events: none;
  transform: scale(.78);
}
.short-like-burst svg {
  width: 82px;
  height: 82px;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,.45));
  fill: currentColor;
}
.short-like-burst.is-visible {
  animation: like-burst .72s ease-out;
}
.short-manage-menu {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
}
.short-manage-menu summary,
.card-kebab-menu summary {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(8, 12, 20, .72);
  color: #fff;
  cursor: pointer;
  list-style: none;
  backdrop-filter: blur(10px);
}
.short-manage-menu summary::-webkit-details-marker,
.card-kebab-menu summary::-webkit-details-marker {
  display: none;
}
.short-manage-menu summary::before,
.card-kebab-menu summary::before {
  content: "⋮";
  font-size: 24px;
  line-height: 1;
}
.short-manage-panel,
.card-kebab-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  display: grid;
  min-width: 150px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(7, 11, 18, .96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .45);
}
.short-manage-panel a,
.short-manage-panel button,
.card-kebab-panel a,
.card-kebab-panel button,
.card-kebab-panel label {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 9px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  text-align: left;
}
.short-manage-panel a:hover,
.short-manage-panel button:hover,
.card-kebab-panel a:hover,
.card-kebab-panel button:hover,
.card-kebab-panel label:hover {
  background: rgba(255, 255, 255, .08);
}
.short-manage-panel form,
.card-kebab-panel form {
  margin: 0;
}
@keyframes like-burst {
  0% { opacity: 0; transform: scale(.72); }
  18% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(1.32); }
}
.short-caption span,
.short-caption p {
  margin: 0;
  color: rgba(248, 250, 252, .82);
  font-size: 13px;
}
.short-caption p {
  white-space: pre-wrap;
}
.short-actions {
  display: grid;
  gap: 8px;
  justify-items: center;
  transition: opacity .18s ease, transform .18s ease;
}
.short-quality-tools {
  width: 100%;
  justify-content: center;
  padding: 0;
}
.short-quality-control {
  display: grid;
  gap: 4px;
  justify-items: center;
  color: rgba(248, 250, 252, .9);
  font-size: 11px;
}
.short-quality-control .quality-select {
  min-width: 74px;
  width: 74px;
  padding: 6px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  font-size: 11px;
  backdrop-filter: blur(10px);
}
.short-feed-item.is-idle .short-caption,
.short-feed-item.is-idle .short-actions,
.short-feed-item.is-idle .short-nav {
  opacity: 0;
  pointer-events: none;
}
.short-feed-item.is-idle .short-caption {
  transform: translateY(10px);
}
.short-nav {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 800;
}
.short-comments-panel {
  position: absolute;
  right: 88px;
  bottom: 18px;
  z-index: 8;
  width: min(420px, calc(100vw - 36px));
  max-height: min(70vh, 620px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 12, 18, .96);
  box-shadow: 0 24px 70px rgba(0,0,0,.45);
}
.short-comments-panel[hidden] {
  display: none;
}
.short-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.short-comments-body {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}
.short-comments-list {
  display: grid;
  gap: 0;
}
.video-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  content-visibility: auto;
  contain-intrinsic-size: 320px 260px;
}
.video-card-body {
  display: grid;
  gap: 4px;
  padding: 0 4px;
}
.card-kebab-menu {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
}
.card-menu-check {
  gap: 8px;
}
.card-menu-check input {
  width: auto;
}
.video-queue-button {
  min-height: 32px;
  font-size: 12px;
}
.video-card > .video-queue-button {
  justify-self: start;
  margin: -4px 4px 0;
}
.video-card-compact > .video-queue-button {
  width: 100%;
  margin: 0;
  font-size: 11px;
}
.bulk-video-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}
.notification-list {
  display: grid;
  gap: 10px;
}
.notification-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
}
.notification-row.is-unread {
  border-color: rgba(255, 45, 85, .55);
  background: color-mix(in srgb, var(--panel), var(--accent) 9%);
}
.notification-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}
.notification-check {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
}
.notification-check.is-pending {
  color: var(--muted);
}
.notification-check.is-read {
  color: #39d98a;
  border-color: rgba(57, 217, 138, .45);
  background: rgba(57, 217, 138, .11);
}
.video-title {
  font-weight: 500;
  line-height: 1.28;
  font-size: 13px;
}
.video-channel {
  color: var(--muted);
  font-weight: 400;
}
.video-owner-line,
.music-owner-line,
.comment-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.video-owner-line > span:last-child,
.music-owner-line > span:last-child,
.comment-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.video-owner-avatar,
.music-owner-avatar,
.comment-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  font-size: 12px;
}
.video-owner-avatar .avatar-verify-badge,
.music-owner-avatar .avatar-verify-badge,
.comment-avatar .avatar-verify-badge {
  width: 11px;
  height: 11px;
  flex-basis: 11px;
  top: 0;
  right: 0;
  transform: translate(12%, -12%);
}
.name-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  vertical-align: middle;
}
.verify-badge {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
  text-shadow: none;
  overflow: visible;
}
.verify-badge-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.verify-badge-seal {
  fill: #45bf62;
}
.verify-badge-check {
  fill: none;
  stroke: #fff;
  stroke-width: 8.5;
  stroke-linecap: butt;
  stroke-linejoin: miter;
}
.verify-badge-green {
  background: transparent;
  color: transparent;
}
.verify-badge-green .verify-badge-seal {
  fill: #45bf62;
}
.verify-badge-blue .verify-badge-seal,
.verify-badge-red .verify-badge-seal {
  fill: #16a7df;
}
.verify-badge-yellow .verify-badge-seal {
  fill: #f5c542;
}
.verify-badge-blue,
.verify-badge-red,
.verify-badge-yellow {
  background: transparent;
  color: transparent;
}
.register-page {
  display: grid;
  gap: 18px;
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}
.verification-info-block {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.verification-info-head {
  display: grid;
  gap: 8px;
  max-width: 860px;
}
.verification-info-head h2,
.verification-benefits h3,
.verification-info-card h3 {
  margin: 0;
}
.verification-info-head p,
.verification-benefits p,
.verification-info-card p {
  margin: 0;
  color: var(--muted);
}
.verification-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.verification-info-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.035);
  border-radius: 8px;
}
.verification-info-icon .verify-badge {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}
.verification-info-card strong {
  color: var(--text);
}
.verification-benefits {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(30, 210, 168, 0.35);
  background: rgba(30, 210, 168, 0.08);
  border-radius: 8px;
}
.avatar-verify-badge {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(16%, -16%);
  width: 15px;
  height: 15px;
  flex-basis: 15px;
  border: 0;
  font-size: 0;
  z-index: 6;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
  pointer-events: none;
}
.channel-avatar .avatar-verify-badge,
.profile-button > .avatar-verify-badge,
.profile-preview ~ .avatar-verify-badge {
  top: 0;
  right: 0;
  transform: translate(16%, -16%);
}
.channel-avatar-large .avatar-verify-badge,
.avatar-editor > .avatar-verify-badge {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
  font-size: 0;
  top: 3px;
  right: 3px;
  transform: none;
}
.video-meta,
.video-card span,
.muted {
  color: var(--muted);
}
.me-page {
  display: grid;
  gap: 22px;
  padding: 28px clamp(16px, 4vw, 42px) 10px;
}
.me-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.me-avatar {
  width: 96px;
  height: 96px;
  flex-basis: 96px;
  font-size: 32px;
}
.me-avatar .avatar-verify-badge {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
  top: 4px;
  right: 4px;
  transform: none;
}
.me-head h1 {
  margin: 0 0 4px;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.1;
}
.me-channel-link {
  display: inline-flex;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 600;
}
.me-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.me-quick-list {
  display: grid;
  gap: 4px;
  max-width: 520px;
}
.me-quick-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.subscription-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #050915;
  border: 1px solid var(--line);
}
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-preview {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #050915;
  margin: 12px 0 18px;
}
.cover-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.poster-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 500;
}
.video-card-short .poster-empty {
  color: transparent;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,61,79,.22), transparent 34%),
    linear-gradient(180deg, #080808, #020202);
}
.video-card-short .poster-empty::before {
  content: "";
  display: block;
  width: 72%;
  aspect-ratio: 1.45;
  background: url("/assets/pv-brand-icon.png") center / contain no-repeat;
  opacity: .9;
}
.play-chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0,0,0,.78);
  color: #fff;
}
.video-card-compact {
  grid-template-columns: 138px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}
.video-card-compact .poster {
  width: 138px;
  border-radius: 5px;
}
.video-card-compact .play-chip {
  display: none;
}
.video-card-compact .video-card-body {
  gap: 0;
  align-self: start;
  padding: 0 24px 0 0;
}
.video-card-compact .video-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.18;
}
.compact-channel-chip {
  position: absolute;
  right: 4px;
  bottom: 4px;
  max-width: calc(100% - 8px);
  overflow: hidden;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
.video-card-short .poster {
  aspect-ratio: 9 / 16;
}
.video-card-short .play-chip {
  display: inline-grid;
  width: auto;
  min-width: 46px;
  height: 24px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  background: rgba(255, 30, 66, .92);
}
.video-card-compact.video-card-short {
  grid-template-columns: 74px minmax(0, 1fr);
}
.video-card-compact.video-card-short .poster {
  width: 74px;
  aspect-ratio: 9 / 16;
}
.continuation-section {
  margin: 18px 0;
}
.continuation-section h2 {
  margin-top: 0;
}
.continuation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px 12px;
}
.narrow { max-width: 520px; margin: 40px auto; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: var(--muted); font-weight: 500; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #0b1220;
  color: var(--text);
  font: inherit;
}
:root[data-theme="light"] input,
:root[data-theme="light"] textarea,
:root[data-theme="light"] select,
:root[data-theme="south"] input,
:root[data-theme="south"] textarea,
:root[data-theme="south"] select,
:root[data-theme="east"] input,
:root[data-theme="east"] textarea,
:root[data-theme="east"] select,
:root[data-theme="west"] input,
:root[data-theme="west"] textarea,
:root[data-theme="west"] select {
  background: rgba(4, 15, 20, .9);
  color: var(--text);
}
textarea { min-height: 130px; resize: vertical; }
hr { border: 0; border-top: 1px solid var(--line); width: 100%; margin: 18px 0; }
.notice {
  border: 1px solid #79651c;
  background: #2a230c;
  border-radius: 8px;
  padding: 12px;
}
.searchbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 760px;
  margin: 0 0 24px;
}
.hero-search {
  position: relative;
}
.suggest-box {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: none;
  z-index: 40;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0,0,0,.34);
}
.suggest-box.is-open {
  display: grid;
}
.suggest-box button {
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}
.suggest-box button:hover {
  background: var(--panel-2);
}
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.channel-card,
.channel-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 23, 28, .8);
}
.channel-card {
  content-visibility: auto;
  contain-intrinsic-size: 280px 74px;
}
.channel-card span:last-child,
.channel-line span {
  display: grid;
  gap: 4px;
}
.channel-card small,
.channel-line span {
  color: var(--muted);
}
.channel-avatar {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3d4f, #2b2d35);
  font-weight: 500;
  overflow: visible;
}
.channel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.channel-card .verify-badge,
.channel-line .verify-badge {
  display: inline-block;
  gap: 0;
}
.channel-avatar-large {
  width: 92px;
  height: 92px;
  font-size: 30px;
}
.admin-user-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.admin-user-avatar {
  width: 36px;
  height: 36px;
}
.admin-user-list,
.subscription-list {
  display: grid;
  gap: 6px;
}
.admin-user-card,
.subscription-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel), transparent 8%);
}
.admin-user-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
}
.admin-user-card summary::-webkit-details-marker {
  display: none;
}
.admin-user-card summary::after {
  content: "Открыть";
  color: var(--muted);
  font-size: 12px;
}
.admin-user-card[open] summary::after {
  content: "Скрыть";
}
.admin-user-stats {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.admin-user-stats span {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--panel-2);
}
.admin-user-controls {
  display: grid;
  gap: 10px;
  padding: 0 10px 10px 56px;
}
.admin-user-controls .inline-form {
  margin: 0;
}
.admin-user-status-form,
.admin-user-message-form,
.settings-form {
  display: grid;
  gap: 12px;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.settings-grid .panel {
  margin: 0;
}
.account-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.account-status-pill.is-active {
  color: #66f0b5;
  border-color: rgba(102, 240, 181, .45);
  background: rgba(102, 240, 181, .1);
}
.account-status-pill.is-suspicious {
  color: #7dd3fc;
  border-color: rgba(125, 211, 252, .5);
  background: rgba(125, 211, 252, .12);
}
.account-status-pill.is-blocked {
  color: #ffd166;
  border-color: rgba(255, 209, 102, .48);
  background: rgba(255, 209, 102, .11);
}
.account-status-pill.is-deleted {
  color: #ff8f8f;
  border-color: rgba(255, 143, 143, .48);
  background: rgba(255, 143, 143, .11);
}
.admin-security-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-2), transparent 22%);
}
.admin-security-box h3 {
  margin: 0;
  font-size: 15px;
}
.admin-security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.admin-security-grid span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, .12);
}
.admin-security-grid strong,
.admin-security-grid small {
  min-width: 0;
  overflow-wrap: anywhere;
}
.admin-user-technical {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.admin-user-technical summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}
.admin-user-technical p {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}
.admin-users-compact {
  font-size: 13px;
}
.admin-users-compact .section-head,
.admin-users-compact .compact-head {
  gap: 8px;
}
.admin-bulk-actions {
  position: sticky;
  top: 62px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 8px 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel), transparent 2%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
}
.admin-users-compact .admin-user-card summary {
  min-height: 40px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 6px 8px;
}
.admin-users-compact .admin-user-card summary::after {
  font-size: 11px;
}
.admin-users-compact .admin-user-line {
  gap: 7px;
}
.admin-users-compact .admin-user-line > span:not(.channel-avatar):not(.admin-user-select-lock) {
  min-width: 0;
}
.admin-users-compact .admin-user-line strong,
.admin-users-compact .admin-user-line small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-users-compact .admin-user-avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}
.admin-user-select,
.admin-user-select-lock {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
.admin-user-select-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
}
.admin-users-compact .admin-user-stats {
  gap: 4px;
  font-size: 11px;
}
.admin-users-compact .admin-user-stats span {
  padding: 2px 6px;
  min-height: 20px;
}
.admin-user-details-compact {
  gap: 6px;
  padding: 0 8px 8px 38px;
}
.admin-compact-meta,
.admin-compact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.admin-compact-meta span {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
.admin-compact-notice {
  margin: 0;
  padding: 7px 8px;
  font-size: 12px;
}
.admin-compact-section {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--panel-2), transparent 35%);
  padding: 0;
}
.admin-compact-section > summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.admin-compact-section > summary::-webkit-details-marker {
  display: none;
}
.admin-compact-section[open] > summary {
  border-bottom: 1px solid var(--line);
}
.admin-compact-section > *:not(summary) {
  margin: 7px 8px;
}
.admin-compact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 5px;
}
.admin-compact-field {
  display: grid;
  min-width: 0;
  gap: 1px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, .09);
}
.admin-compact-field strong {
  font-size: 10.5px;
  color: var(--muted);
}
.admin-compact-field small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--text);
}
.admin-compact-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 0;
}
.admin-users-compact input,
.admin-users-compact select,
.admin-users-compact button,
.admin-users-compact .button,
.admin-users-compact .ghost {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}
.admin-users-compact .admin-compact-form input,
.admin-users-compact .admin-compact-form select {
  width: auto;
  min-width: 150px;
  max-width: 260px;
}
.admin-compact-input {
  flex: 1 1 220px;
}
.admin-compact-textarea,
.admin-users-compact textarea {
  min-height: 44px;
  max-height: 72px;
  padding: 6px 8px;
  font-size: 12px;
}
.admin-danger-zone {
  border-color: rgba(255, 93, 93, .42);
}
.admin-delete-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  margin: 10px 0;
}
.admin-delete-summary span {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-2);
}
.admin-delete-confirm-form {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}
.admin-message-list {
  display: grid;
  gap: 8px;
}
.admin-message {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-2), transparent 20%);
}
.admin-message p {
  margin: 0;
  white-space: pre-wrap;
}
.subscription-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 60px;
  padding: 7px 10px;
}
.subscription-main {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.subscription-main span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.subscription-main strong,
.subscription-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subscription-main small {
  color: var(--muted);
}
.subscription-avatar {
  width: 48px;
  height: 48px;
}
.subscription-button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  white-space: nowrap;
}
.music-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr));
  align-items: start;
}
.music-card {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 420px) max-content;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.music-row.is-private {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}
.music-cover {
  display: none;
}
.music-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}
.music-owner-avatar {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  font-size: 10px;
}
.music-owner-avatar .avatar-verify-badge {
  width: 8px;
  height: 8px;
  flex-basis: 8px;
}
.music-identity > span {
  display: grid;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
}
.music-identity strong,
.music-identity small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-identity strong {
  font-size: 13px;
  line-height: 1.15;
}
.music-identity small {
  font-size: 11px;
}
.music-identity .name-with-badge {
  max-width: 100%;
  min-width: 0;
}
.music-status-pill {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-player-wrap {
  display: grid;
  gap: 0;
  min-width: 0;
  justify-items: stretch;
}
.music-player-wrap p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.music-player,
.music-body audio {
  width: 100%;
  min-width: 260px;
  max-width: 420px;
  height: 32px;
}
.music-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: max-content;
  margin-top: 0;
  flex-wrap: nowrap;
}
.music-visibility-form {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.music-visibility-form select {
  width: 98px;
  min-width: 88px;
  height: 30px;
  padding: 0 24px 0 8px;
  font-size: 12px;
}
.audio-moderation-actions,
.music-review-note {
  grid-column: 1 / -1;
}
.audio-moderation-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.audio-reject-form {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.audio-reject-form input {
  width: min(260px, 54vw);
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}
.audio-icon-action,
.floating-audio-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 8px;
  font-size: 0;
  line-height: 1;
}
.ui-icon {
  display: block;
  width: 17px;
  height: 17px;
  fill: currentColor;
}
.floating-audio-panel .floating-audio-icon {
  font-size: 12px;
}
.floating-audio-controls .floating-audio-icon {
  width: 28px;
  font-size: 11px;
}
.floating-audio-head-actions .floating-audio-icon {
  width: 30px;
  height: 30px;
  min-height: 30px;
  font-size: 17px;
  background: color-mix(in srgb, var(--text) 9%, transparent);
}
.music-visibility-form {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.music-visibility-form select {
  min-height: 28px;
  max-width: 86px;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 11px;
}
.audio-moderation-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.audio-reject-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.audio-reject-form input {
  min-height: 30px;
  max-width: 220px;
  padding: 0 8px;
  font-size: 12px;
}
.music-review-note {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--danger);
  font-size: 12px;
}
.story-camera-tools {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel), var(--text) 3%);
}
.story-camera-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.story-camera-actions .ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.story-camera-preview {
  width: 100%;
  max-height: 360px;
  border-radius: 8px;
  background: #050505;
  object-fit: contain;
}
.admin-story-list {
  display: grid;
  gap: 10px;
}
.admin-story-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) minmax(260px, auto);
  align-items: center;
  gap: 12px;
}
.admin-story-preview .story-bubble {
  width: 88px;
  min-width: 88px;
}
.admin-story-preview .story-ring {
  width: 64px;
  height: 64px;
}
.admin-story-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.admin-story-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}
.admin-story-actions input {
  min-height: 30px;
  max-width: 180px;
  padding: 0 8px;
}
.floating-audio-player {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 72px 12px 88px;
  pointer-events: none;
  touch-action: auto;
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
}
.floating-audio-player *,
.floating-audio-player *::before,
.floating-audio-player *::after {
  user-select: none;
  -webkit-user-select: none;
  caret-color: transparent;
}
.floating-audio-player.is-closed,
.floating-audio-player.is-closed .floating-audio-panel {
  pointer-events: none;
}
.floating-audio-bubble,
.floating-audio-player.is-closed .floating-audio-bubble,
.floating-audio-player.is-closed .floating-audio-panel {
  display: none !important;
}
.floating-audio-bubble {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--accent) 58%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 88%, var(--accent) 12%);
  color: var(--text);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .28);
  cursor: pointer;
  pointer-events: auto;
  overflow: hidden;
  padding: 0;
}
.floating-audio-bubble-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #001018;
}
.floating-audio-bubble-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(0, 16, 24, .74);
  color: #fff;
}
.floating-audio-bubble-play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}
.floating-audio-bubble-play.is-playing::before {
  content: "II";
  width: auto;
  height: auto;
  margin-left: 0;
  border: 0;
  font-size: 9px;
  font-weight: 800;
}
.floating-audio-panel {
  width: min(320px, calc(100vw - 24px));
  max-height: min(470px, calc(100vh - 128px));
  overflow: hidden;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel) 96%, #000 4%);
  box-shadow: 0 20px 54px rgba(0, 0, 0, .34);
  pointer-events: auto;
}
.floating-audio-panel[hidden] {
  display: none;
}
.floating-audio-head,
.floating-audio-controls,
.floating-audio-time,
.floating-audio-queue-row {
  display: flex;
  align-items: center;
}
.floating-audio-head {
  justify-content: space-between;
  gap: 6px;
  cursor: default;
  min-height: 30px;
}
.floating-audio-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.floating-audio-head strong,
.floating-audio-now span,
.floating-audio-queue-row strong,
.floating-audio-queue-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.floating-audio-head span,
.floating-audio-time,
.floating-audio-queue-row small {
  color: var(--muted);
  font-size: 11px;
}
.floating-audio-head-actions {
  display: inline-flex;
  gap: 4px;
  flex: 0 0 auto;
}
.floating-audio-now {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}
.floating-audio-progress,
.floating-audio-volume {
  width: 100%;
  min-width: 0;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
  touch-action: none;
  --range-progress: 0%;
}
.floating-audio-progress::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0 var(--range-progress), color-mix(in srgb, var(--line) 82%, #fff 18%) var(--range-progress) 100%);
}
.floating-audio-progress::-moz-range-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0 var(--range-progress), color-mix(in srgb, var(--line) 82%, #fff 18%) var(--range-progress) 100%);
}
.floating-audio-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -5px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--panel) 88%, #000 12%);
}
.floating-audio-progress::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--panel) 88%, #000 12%);
}
.floating-audio-time {
  justify-content: space-between;
  margin-top: -6px;
}
.floating-audio-controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
}
.floating-audio-play {
  width: 34px;
  min-height: 28px;
  padding: 0;
}
.floating-audio-icon.is-active {
  color: #001018;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
}
.floating-audio-volume-wrap {
  position: relative;
  display: inline-grid;
}
.floating-audio-volume-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: none;
  grid-template-rows: 28px 118px;
  place-items: center;
  gap: 7px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel) 96%, #000 4%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .32);
  touch-action: none;
}
.floating-audio-volume-wrap.is-open .floating-audio-volume-popover {
  display: grid;
}
.floating-audio-volume {
  width: 28px;
  height: 112px;
  min-width: 28px;
  writing-mode: vertical-lr;
  direction: rtl;
}
.floating-audio-volume::-webkit-slider-runnable-track {
  width: 6px;
  height: 112px;
  border-radius: 999px;
  background: linear-gradient(0deg, var(--accent) 0 var(--range-progress), color-mix(in srgb, var(--line) 82%, #fff 18%) var(--range-progress) 100%);
}
.floating-audio-volume::-moz-range-track {
  width: 6px;
  height: 112px;
  border-radius: 999px;
  background: linear-gradient(0deg, var(--accent) 0 var(--range-progress), color-mix(in srgb, var(--line) 82%, #fff 18%) var(--range-progress) 100%);
}
.floating-audio-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin-left: -5px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--panel) 88%, #000 12%);
}
.floating-audio-volume::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--panel) 88%, #000 12%);
}
.floating-audio-queue {
  display: grid;
  gap: 5px;
  max-height: 144px;
  overflow: auto;
  padding-right: 2px;
}
.floating-audio-queue-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.floating-audio-queue-row.is-current {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.floating-audio-queue-row > span {
  display: grid;
  min-width: 0;
}
.floating-audio-queue-play {
  width: 28px;
  min-height: 28px;
  padding: 0;
}
.floating-video-player {
  position: fixed;
  inset: 0;
  z-index: 1195;
  display: grid;
  place-items: center;
  padding: 72px 12px 88px;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.floating-video-player.is-closed,
.floating-video-player:not(.is-expanded) {
  pointer-events: none;
}
.floating-video-panel {
  width: min(760px, calc(100vw - 24px));
  max-height: min(82vh, 720px);
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel) 97%, #000 3%);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .38);
  pointer-events: auto;
}
.floating-video-panel[hidden] {
  display: none;
}
.floating-video-head,
.floating-video-controls,
.floating-video-queue-row,
.floating-video-now {
  display: flex;
  align-items: center;
}
.floating-video-head,
.floating-video-now {
  justify-content: space-between;
  gap: 10px;
}
.floating-video-head > div,
.floating-video-queue-row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.floating-video-head span,
.floating-video-queue-row small {
  color: var(--muted);
  font-size: 12px;
}
.floating-video-head-actions,
.floating-video-controls {
  display: inline-flex;
  gap: 6px;
}
.floating-video-screen {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 52vh;
  border-radius: 8px;
  background: #000;
}
.floating-video-now span,
.floating-video-queue-row strong,
.floating-video-queue-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.floating-video-play {
  width: 42px;
  min-height: 32px;
  padding: 0;
}
.floating-video-icon {
  width: 34px;
  min-height: 32px;
  padding: 0;
}
.floating-video-queue {
  display: grid;
  gap: 6px;
  max-height: 150px;
  overflow: auto;
}
.floating-video-queue-row {
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
}
.floating-video-queue-row.is-current {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
}
.channel-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 42px clamp(16px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}
.channel-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 500;
}
.channel-hero p {
  max-width: 800px;
}
.split, .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.studio-library {
  display: grid;
  gap: 16px;
  margin: 22px 0;
}
.studio-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.studio-hub-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 132px;
  color: var(--text);
  text-decoration: none;
}
.studio-hub-card strong {
  font-size: 18px;
}
.studio-hub-card span {
  color: var(--text);
  font-size: 14px;
}
.studio-hub-card small {
  color: var(--muted);
  line-height: 1.45;
}
.studio-stat-link {
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.studio-stat-link:hover {
  border-color: color-mix(in srgb, var(--accent) 68%, var(--line));
  transform: translateY(-1px);
}
.studio-upload-grid {
  align-items: start;
}
.studio-upload-section {
  padding: 0;
  overflow: hidden;
}
.studio-upload-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}
.studio-upload-section > summary::-webkit-details-marker {
  display: none;
}
.studio-upload-section > summary span {
  font-weight: 800;
}
.studio-upload-section > summary small {
  color: var(--muted);
}
.studio-upload-section > summary::after {
  content: "+";
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
}
.studio-upload-section[open] > summary::after {
  content: "-";
}
.studio-upload-body {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
}
.studio-upload-section textarea {
  min-height: 86px;
  resize: none;
  overflow: hidden;
}
.studio-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.studio-section-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.studio-video-list {
  display: grid;
  border-top: 1px solid var(--line);
}
.studio-video-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.studio-video-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.studio-video-main a {
  color: var(--text);
  min-width: 0;
}
.studio-video-main strong,
.studio-video-main small {
  overflow-wrap: anywhere;
}
.studio-video-main small {
  color: var(--muted);
}
.channel-assign-form {
  display: flex;
  align-items: end;
  gap: 8px;
  margin: 0;
}
.channel-assign-form label {
  margin: 0;
}
.channel-assign-form select {
  min-width: 160px;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.table a, .table p {
  margin: 0;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.watch {
  padding: 18px clamp(16px, 4vw, 56px);
  max-width: 1480px;
  margin: 0 auto;
}
.watch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}
.watch-main {
  min-width: 0;
}
.player-shell {
  position: relative;
  background: #000;
  border-radius: 8px;
}
.player-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0 0;
}
.quality-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.quality-select {
  width: auto;
  min-width: 120px;
  padding: 8px 10px;
}
.watch-add-control {
  position: relative;
  flex: 0 0 auto;
}
.watch-add-control summary {
  list-style: none;
}
.watch-add-control summary::-webkit-details-marker {
  display: none;
}
.watch-add-button,
.watch-add-link {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.watch-add-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, 86vw);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 96%, #000);
  box-shadow: var(--shadow);
}
.watch-add-panel form {
  display: grid;
  gap: 8px;
}
.watch-add-panel label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.watch-add-panel input,
.watch-add-panel select {
  min-height: 32px;
  padding: 6px 8px;
}
.pika-watermark {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 12px;
}
.pika-watermark::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: url("/assets/pv-brand-icon.png") center / cover no-repeat;
}
#pika-player, .embed, .processing {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
}

iframe.embed,
.external-embed {
  display: block;
  border: 0;
  overflow: hidden;
  scrollbar-width: none;
}

.external-embed::-webkit-scrollbar {
  display: none;
}

.external-frame {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.external-frame > iframe.external-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.player-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.player-demo-box {
  display: grid;
  gap: 10px;
}

.player-demo-stage {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.player-demo-stage.is-short {
  width: min(100%, 360px);
  margin: 0 auto;
  aspect-ratio: 9 / 16;
}

.player-demo-stage.is-video {
  aspect-ratio: 16 / 9;
}

.player-demo-stage .external-frame,
.player-demo-stage iframe,
.player-demo-stage video {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

.player-demo-stage video {
  display: block;
  object-fit: contain;
  background: #000;
}

.player-demo-empty {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 220px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.player-demo-log {
  min-height: 76px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0,0,0,.28);
  color: var(--muted);
  white-space: pre-wrap;
}

.security-lab-page code {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(148, 163, 184, .14);
  color: var(--text);
}

.security-lab-console {
  display: grid;
  gap: 12px;
}

.security-lab-domain-admin {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, .22);
}

.security-lab-domain-admin h2 {
  margin: 0 0 6px;
}

.security-lab-domain-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.security-lab-domain-form .checkbox-line {
  grid-column: 1 / -1;
}

.security-lab-domain-list {
  display: grid;
  gap: 8px;
}

.security-lab-domain-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 8px;
}

.security-lab-domain-row strong,
.security-lab-domain-row small {
  display: block;
  min-width: 0;
}

.security-lab-domain-row small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-lab-domain-row .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.security-lab-domain-editor {
  grid-column: 1 / -1;
}

.security-lab-domain-editor summary {
  width: max-content;
  cursor: pointer;
  color: var(--accent);
}

.security-lab-domain-edit-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 8px;
}

.security-lab-notice {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(34, 197, 94, .32);
  border-radius: 8px;
  background: rgba(34, 197, 94, .08);
}

.security-lab-notice p {
  margin: 0;
  color: var(--muted);
}

.security-lab-notice .ghost {
  justify-self: start;
}

.security-lab-notice small {
  color: var(--muted);
}

.security-lab-form {
  display: grid;
  gap: 12px;
}

.security-lab-form textarea {
  min-height: 92px;
}

.security-lab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.security-lab-flow {
  display: grid;
  grid-template-columns: 1fr 28px 1fr;
  gap: 10px;
  align-items: center;
}

.security-lab-flow span {
  display: grid;
  min-height: 42px;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel), var(--text) 4%);
  text-align: center;
  font-weight: 800;
}

.security-lab-flow b {
  color: var(--accent);
  text-align: center;
}

.security-lab-report {
  display: grid;
  gap: 8px;
}

.security-lab-report-card {
  display: grid;
  grid-template-columns: minmax(0, 160px) auto;
  gap: 6px 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 23, 42, .28);
}

.security-lab-report-card span {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, .14);
  color: var(--accent);
  font-weight: 800;
}

.security-lab-report-card p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.security-lab-table {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.security-lab-table-head,
.security-lab-table-row {
  display: grid;
  grid-template-columns: 80px 190px minmax(260px, 1fr) 150px;
  gap: 10px;
  align-items: center;
  min-width: 780px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.security-lab-table-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.security-lab-table-row.is-selected {
  border-color: rgba(34, 197, 94, .55);
  background: rgba(34, 197, 94, .08);
}

.security-lab-table a,
.security-lab-url-row a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--accent);
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.security-lab-url-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.security-lab-url-list h3 {
  margin: 8px 0 2px;
}

.security-lab-url-row {
  display: grid;
  grid-template-columns: 38px minmax(120px, 260px) minmax(260px, 1fr) 76px;
  gap: 8px;
  align-items: center;
  min-width: 760px;
  padding: 7px 9px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 8px;
  font-size: 13px;
}

.security-lab-player {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.security-lab-player video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.security-lab-log {
  min-height: 260px;
  max-height: 520px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
  background: rgba(0, 0, 0, .32);
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .player-demo-grid,
  .security-lab-grid {
    grid-template-columns: 1fr;
  }

  .security-lab-flow {
    grid-template-columns: 1fr;
  }

  .security-lab-domain-form {
    grid-template-columns: 1fr;
  }

  .security-lab-domain-edit-form {
    grid-template-columns: 1fr;
  }
}

.player-shell {
  overflow: hidden;
}
.watch-stats-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 10px 0 8px;
}
.watch-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  margin: -4px 0 16px;
}
.watch-stats-actions .watch-meta {
  margin: 0;
  font-size: 13px;
  white-space: nowrap;
}
.watch-stats-actions .watch-actions {
  margin: 0;
  overflow: visible;
}
.watch-main > h1 {
  margin: 8px 0 6px;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.14;
}
.creator-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 10px;
}
.comments-panel {
  margin: 8px 0 12px;
}
.watch-comments-collapsed {
  padding: 10px 12px;
}
.watch-comments-collapsed > summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}
.watch-comments-collapsed > summary::-webkit-details-marker {
  display: none;
}
.watch-comments-collapsed > summary::after {
  content: "Показать";
  float: right;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.watch-comments-collapsed[open] > summary::after {
  content: "Скрыть";
}
.watch-comments-collapsed .comment-form {
  margin-top: 8px;
}
.watch-comments-collapsed textarea {
  min-height: 48px;
}
.watch-comments-collapsed .comments {
  margin-top: 6px;
}
.watch-subscribe-form {
  margin-left: auto;
}
.watch-subscribe-button {
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  white-space: nowrap;
}
.creator-name {
  font-weight: 500;
}
.description-panel {
  margin: 8px 0;
  padding: 12px;
}
.continuation-section {
  margin: 8px 0 10px;
  padding: 12px;
}
.description-panel a,
.short-caption a {
  color: #7dd3fc;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.watch-side {
  display: grid;
  align-content: start;
  gap: 14px;
}
.watch-side h2 {
  margin: 0;
}
.side-section {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.side-list {
  display: grid;
  gap: 8px;
  max-height: min(68vh, 760px);
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}
.watch-side .video-card-compact .card-kebab-menu {
  top: 0;
  right: 0;
}
.watch-side .video-card-compact .card-kebab-menu summary {
  width: 24px;
  height: 24px;
  background: transparent;
}
.watch-side .video-card-compact .card-kebab-menu summary::before {
  font-size: 18px;
}
.trim-row {
  align-items: end;
}
.trim-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.trim-preview video {
  width: min(100%, 520px);
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
  object-fit: contain;
}
.trim-preview-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.poster-frame-tools {
  display: grid;
  gap: 10px;
  max-width: min(100%, 520px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}
.poster-frame-tools label {
  display: grid;
  gap: 6px;
}
.poster-frame-tools canvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050505;
}
.poster-frame-picker {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}
.poster-frame-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
  object-fit: contain;
}
.embed { display: block; }
.processing {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.comments article {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.telegram-login {
  display: grid;
  gap: 10px;
  justify-items: start;
}
.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.row-actions form {
  display: inline;
}
.row-actions .reject-video-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.row-actions .reject-video-form input {
  width: 190px;
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}
.source-preview-panel {
  position: relative;
  display: inline-block;
}
.source-preview-panel summary {
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  list-style: none;
  cursor: pointer;
  color: var(--text);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  font-size: 13px;
}
.source-preview-panel summary::-webkit-details-marker {
  display: none;
}
.source-preview-panel video {
  position: absolute;
  z-index: 90;
  right: 0;
  top: calc(100% + 8px);
  width: min(520px, 84vw);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
  box-shadow: var(--shadow);
}
.row-actions button,
.row-actions a {
  padding: 7px 10px;
  font-size: 13px;
}
.compact-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.file-manager-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.file-manager-path span {
  color: var(--muted);
  word-break: break-all;
}
.file-manager-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.file-manager-controls form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
}
.file-manager-table {
  margin-top: 14px;
}
.file-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.status-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}
.process-gauges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}
.gauge-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.gauge-ring {
  --value: 0;
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--panel) 58%, transparent 59%),
    conic-gradient(var(--accent) calc(var(--value) * 1%), rgba(255,255,255,.12) 0);
}
.gauge-ring span {
  color: var(--text);
  font-weight: 800;
}
.gauge-card div:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.gauge-card div:last-child span,
.gauge-card small {
  color: var(--muted);
}
.maintenance-table {
  margin-top: 12px;
  max-height: 520px;
  overflow: auto;
}
.maintenance-table .admin-row:first-child {
  border-top: 0;
}
.maintenance-table strong {
  overflow-wrap: anywhere;
}
.maintenance-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}
.file-manager-note {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: -4px 0 18px;
}
.file-manager-note span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.03);
}
.file-manager-note small {
  color: var(--muted);
  line-height: 1.4;
}
.admin-maintenance-actions form {
  display: inline;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 13px;
}
.code-preview {
  max-height: 70vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0,0,0,.35);
  color: var(--text);
  white-space: pre-wrap;
}
.error-text {
  display: block;
  margin-top: 4px;
  color: #ffb3b3;
}
.danger {
  border-color: rgba(255, 107, 107, .65);
  color: #ffd6d6;
}
.video-manager {
  margin: 18px 0;
}
.video-manager .row-actions {
  margin-top: 10px;
}
.watch-actions {
  display: flex;
  justify-content: flex-start;
  margin: 8px 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.watch-actions::-webkit-scrollbar,
.watch-utility-actions::-webkit-scrollbar {
  display: none;
}
.reaction-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  margin: 0;
}
.reaction-bar form {
  display: inline;
}
.reaction-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(255, 214, 74, .35);
  border-radius: 999px;
  background: rgba(255, 214, 74, .08);
  color: #ffd84a;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.reaction-button:hover {
  border-color: rgba(255, 214, 74, .75);
  background: rgba(255, 214, 74, .16);
}
.reaction-icon {
  display: inline-flex;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}
.reaction-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.reaction-icon-down svg {
  transform: rotate(180deg);
  transform-origin: 50% 50%;
}
.reaction-count {
  min-width: 1ch;
  text-align: left;
}
.active-reaction {
  border-color: #ffcc23;
  color: #ffcc23;
  background: rgba(255, 204, 35, .2);
}
.reaction-button:disabled,
.comment-form button:disabled,
.upload-form button:disabled {
  opacity: .65;
  cursor: wait;
}
.form-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.support-list {
  display: grid;
  gap: 12px;
}
.support-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}
.support-item p {
  margin: 0;
  white-space: pre-wrap;
}
.upload-progress {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.watch-utility-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 14px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.watch-pill {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
}
.upload-form.is-uploading {
  opacity: .92;
}
.upload-form.is-uploading input:disabled,
.upload-form.is-uploading textarea:disabled,
.upload-form.is-uploading select:disabled {
  cursor: wait;
  opacity: .72;
}
.upload-progress-bar {
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
}
.upload-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2fb7ff, #ff3d4f);
  transition: width .2s ease;
}
.upload-progress p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.upload-file-list {
  display: grid;
  gap: 8px;
}
.upload-file-row {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}
.upload-file-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.upload-file-meta strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-file-meta small {
  flex: 0 0 auto;
  color: var(--muted);
}
.upload-file-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.upload-stop {
  justify-self: start;
  color: #ffd84a;
  border-color: rgba(255, 216, 74, .45);
}
.watch form[action$="/like"] {
  display: none;
}
.video-admin-table .admin-row {
  align-items: start;
}
.video-admin-table .row-actions {
  justify-content: flex-end;
}

:root[data-theme="light"] .hero-cinema {
  background: rgba(7, 28, 33, .78);
}
:root[data-theme="light"] .panel,
:root[data-theme="light"] .hero-panel,
:root[data-theme="light"] .channel-card,
:root[data-theme="light"] .channel-line,
:root[data-theme="light"] .music-card,
:root[data-theme="light"] .support-item,
:root[data-theme="light"] .gauge-card,
:root[data-theme="light"] .file-manager-controls form,
:root[data-theme="light"] .file-manager-note span,
:root[data-theme="light"] .stat-card,
:root[data-theme="light"] .status-pill,
:root[data-theme="light"] .bulk-title-list,
:root[data-theme="light"] .admin-user-card,
:root[data-theme="light"] .subscription-row {
  background: rgba(7, 24, 30, .88);
  color: var(--text);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .2);
}
:root[data-theme="light"] nav a,
:root[data-theme="light"] .ghost,
:root[data-theme="light"] .nav-refresh {
  border-color: rgba(138, 255, 220, .32);
  background: rgba(8, 34, 40, .82);
  color: var(--text);
}
:root[data-theme="light"] .button,
:root[data-theme="light"] nav a.active {
  border-color: rgba(34, 240, 170, .75);
  background: linear-gradient(135deg, #19d99b, #168cff);
  color: #041014;
}
:root[data-theme="light"] input,
:root[data-theme="light"] textarea,
:root[data-theme="light"] select,
:root[data-theme="light"] .search-drawer-form input {
  border-color: rgba(138, 255, 220, .34);
  background: rgba(3, 18, 24, .86);
  color: var(--text);
}
:root[data-theme="light"] input::placeholder,
:root[data-theme="light"] textarea::placeholder {
  color: rgba(220, 255, 246, .58);
}
:root[data-theme="light"] select option {
  background: #061014;
  color: var(--text);
}
:root[data-theme="light"] .muted,
:root[data-theme="light"] .video-meta,
:root[data-theme="light"] .video-channel,
:root[data-theme="light"] .stat-card span,
:root[data-theme="light"] .stat-card small,
:root[data-theme="light"] label {
  color: var(--muted);
}
:root[data-theme="light"] .eyebrow {
  color: #5ef4c5;
}
:root[data-theme="light"] .gauge-ring {
  background:
    radial-gradient(circle at center, rgba(8, 28, 36, .96) 58%, transparent 59%),
    conic-gradient(var(--accent-2) calc(var(--value) * 1%), rgba(242, 255, 251, .13) 0);
}
:root[data-theme="light"] .feed-chip-row {
  background: rgba(6, 16, 20, .9);
}
:root[data-theme="light"] .feed-chip-row .chip {
  border: 1px solid rgba(138, 255, 220, .2);
  background: rgba(12, 43, 50, .88);
  color: var(--text);
}
:root[data-theme="light"] .feed-chip-row .chip.is-active {
  background: #f5fffb;
  color: #061014;
}
:root[data-theme="light"] .section-kebab:hover,
:root[data-theme="light"] .top-icon:hover {
  background: rgba(138, 255, 220, .14);
}
@media (max-width: 800px) {
  .topbar {
    align-items: center;
    flex-direction: row;
    gap: 6px;
  }
  .brand {
    width: 66px;
    height: 46px;
  }
  .topbar nav a,
  .topbar .auth > .ghost,
  .topbar .auth > .button {
    padding: 6px;
    font-size: 0;
  }
  .topbar nav a::before,
  .topbar .auth > .ghost::before,
  .topbar .auth > .button::before {
    margin: 0;
  }
  .hero { grid-template-columns: 1fr; }
  .hero-cinema {
    padding: 8px;
  }
  .hero-compact-actions {
    flex-wrap: wrap;
  }
  .hero-compact-actions .hero-search {
    flex-basis: 100%;
    min-width: 0;
  }
  .hero-compact-actions .actions {
    width: 100%;
    overflow-x: auto;
  }
  .hero-panel.platform-card {
    grid-template-columns: 1fr;
    padding: 8px;
  }
  .hero-panel .mini-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero-search,
  .watch-grid,
  .searchbar {
    grid-template-columns: 1fr;
  }
  .watch-side {
    order: 2;
  }
  .creator-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .video-card-compact {
    grid-template-columns: 132px minmax(0, 1fr);
  }
  .video-card-compact .poster {
    width: 132px;
  }
  .video-card-compact.video-card-short {
    grid-template-columns: 74px minmax(0, 1fr);
  }
  .video-card-compact.video-card-short .poster {
    width: 74px;
  }
  .channel-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .auth {
    justify-content: flex-end;
  }
  .profile-dropdown {
    right: 0;
    max-width: calc(100vw - 20px);
  }
  .admin-row { grid-template-columns: 1fr; }
  .studio-section-head,
  .studio-video-row,
  .channel-assign-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .studio-section-head {
    display: grid;
  }
  .channel-assign-form {
    display: grid;
  }
  .channel-assign-form select,
  .channel-assign-form button {
    width: 100%;
  }
}

@media (max-width: 800px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  main,
  .section,
  .watch,
  .watch-main,
  .watch-side,
  .panel,
  .hero,
  .hero-cinema,
  .searchbar,
  .hero-search,
  .split,
  .cards,
  .grid,
  .youtube-grid,
  .shorts-grid,
  .channel-grid,
  form,
  input,
  textarea,
  select {
    max-width: 100%;
    min-width: 0;
  }

  .topbar {
    width: 100%;
    max-width: 100vw;
    padding: 6px 8px;
    overflow: visible;
  }

  nav {
    flex: 1 1 auto;
    min-width: 0;
    gap: 4px;
  }

  .topbar nav a {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    height: 34px;
    padding: 6px 9px;
    font-size: 12px;
  }

  .topbar nav a::before {
    display: none;
  }

  .auth {
    flex: 0 0 auto;
    max-width: 46vw;
    overflow: visible;
  }

  .profile-menu {
    position: static;
  }

  .profile-button {
    touch-action: manipulation;
  }

  .profile-dropdown {
    position: fixed;
    top: calc(52px + env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    left: auto;
    width: min(320px, calc(100vw - 16px));
    min-width: 0;
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 64px - env(safe-area-inset-bottom));
    z-index: 420;
  }

  .auth .ghost,
  .auth .button,
  .actions .ghost,
  .actions .button,
  .row-actions .ghost,
  .row-actions .button,
  form .ghost,
  form .button,
  .telegram-login .ghost,
  .telegram-login .button,
  .upload-form button {
    width: auto;
    min-width: 0;
    min-height: 36px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.15;
    white-space: normal;
  }

  .panel .button,
  .panel .ghost,
  .upload-form .button,
  .upload-form button,
  .comment-form .button,
  .comment-form button,
  .row-actions .button,
  .row-actions .ghost,
  .telegram-login .button,
  .telegram-login .ghost {
    font-size: 13px;
    line-height: 1.2;
    color: var(--text);
  }

  .searchbar .button,
  .hero-search .button {
    width: 100%;
    font-size: 13px;
  }

  .actions {
    gap: 8px;
    margin-top: 14px;
  }

  .watch {
    width: 100%;
    padding: 0 0 18px;
  }

  .watch-grid {
    gap: 14px;
  }

  .watch-main > h1,
  .watch-stats-actions,
  .watch-meta,
  .watch-actions,
  .watch-utility-actions,
  .creator-row,
  .description-panel,
  .comments,
  .watch-side {
    padding-left: 12px;
    padding-right: 12px;
  }

  .player-shell {
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
  }

  #pika-player,
  .embed,
  .processing {
    width: 100%;
    max-width: 100%;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .player-tools {
    padding: 8px 12px 0;
    justify-content: flex-start;
  }

  .watch-actions {
    justify-content: flex-start;
    margin: 8px 0 12px;
  }

  .watch-subscribe-form {
    width: 100%;
    margin-left: 0;
  }

  .watch-subscribe-button {
    width: 100%;
  }

  .reaction-bar {
    gap: 8px;
  }

  .reaction-button {
    min-width: 42px;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  .reaction-icon {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
  }

  .quality-select {
    width: 100%;
  }

  .quality-control {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .panel {
    padding: 14px;
  }

  .narrow {
    width: calc(100% - 20px);
    margin: 16px auto;
  }

  .section {
    padding-left: 10px;
    padding-right: 10px;
  }

  .grid,
  .youtube-grid {
    grid-template-columns: 1fr;
  }

  .shorts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .shorts-grid .video-card {
    max-width: none;
  }

  .shorts-view {
    height: calc(100vh - 48px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 0;
  }

  .shorts-shell {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    min-height: calc(100vh - 48px);
    padding: 0;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .short-player-card {
    width: 100vw;
    max-width: 100vw;
    height: calc(100vh - 48px);
    aspect-ratio: auto;
    overflow: hidden;
    border-radius: 0;
    background: #000;
    box-shadow: none;
  }

  .short-video,
  .short-embed {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    object-fit: cover;
  }

  .short-caption {
    right: 76px;
    bottom: 14px;
    padding: 10px;
  }

  .short-actions {
    position: absolute;
    right: 10px;
    bottom: 92px;
    z-index: 3;
  }

  .short-actions .reaction-button {
    width: 46px;
    height: 38px;
    padding: 0 6px;
    background: rgba(15, 23, 42, .72);
    backdrop-filter: blur(10px);
  }

  .short-actions .compact-action {
    width: 46px;
    min-height: 34px;
    padding: 7px;
    font-size: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, .72);
  }

  .short-actions .compact-action::before {
    content: "Ком.";
    font-size: 11px;
  }

  .short-quality-control span {
    display: none;
  }

  .short-quality-control .quality-select {
    width: 54px;
    min-width: 54px;
    padding: 7px 4px;
    font-size: 10px;
  }

  .short-comments-panel {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-height: 56vh;
  }

  .short-nav {
    display: none;
  }

  .video-card-compact {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .video-card-compact .poster {
    width: 116px;
  }

  .video-card-compact.video-card-short {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .video-card-compact.video-card-short .poster {
    width: 68px;
  }

  .music-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
  }

  .music-player-wrap {
    grid-column: 1 / -1;
  }

  .music-player {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: 26px;
  }

  .music-actions {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
    min-width: 0;
    max-width: 42vw;
    overflow-x: auto;
  }
  .music-visibility-form select {
    width: 84px;
  }

  .audio-moderation-actions,
  .music-review-note {
    grid-column: 1 / -1;
  }
  .story-editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .story-editor-preview {
    width: min(320px, 100%);
    margin-inline: auto;
  }
  .story-viewer-page {
    padding: 0;
  }
  .story-viewer {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    align-content: center;
    padding: 8px;
  }
  .pv-story-shell {
    width: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: 0;
  }
  .story-view-stage,
  .story-view-stage.pv-story-frame {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }
  .pv-story-progress {
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    left: 10px;
    right: 10px;
  }
  .story-view-head.pv-story-header {
    top: calc(env(safe-area-inset-top, 0px) + 20px);
    left: 10px;
    right: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .pv-story-header-actions {
    gap: 4px;
  }
  .pv-story-icon-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }
  .pv-story-bottom {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 74px);
    left: 10px;
    right: 10px;
  }
  .pv-story-tap-zone {
    top: calc(env(safe-area-inset-top, 0px) + 74px);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 128px);
  }
  .pv-story-reply-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    z-index: 540;
  }
  .pv-story-replies,
  .pv-story-counters {
    display: none;
  }
  .pv-story-reply-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 6px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    background: rgba(0,0,0,.34);
    backdrop-filter: blur(10px);
  }
  .pv-story-reply-form input {
    min-height: 34px;
    border: 0;
    background: transparent;
    color: #fff;
  }
  .pv-story-reply-form input::placeholder {
    color: rgba(255,255,255,.72);
  }

  .admin-story-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-story-actions {
    justify-content: flex-start;
  }

  .admin-user-card summary,
  .subscription-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .admin-user-stats {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .admin-user-controls {
    padding: 0 10px 10px;
  }

  .subscription-button {
    width: 100%;
  }

  .row-actions {
    width: 100%;
    align-items: stretch;
  }

  .row-actions a,
  .row-actions button,
  .row-actions form {
    width: 100%;
  }

  .upload-progress,
  .upload-progress-bar {
    width: 100%;
  }

  main {
    padding-bottom: calc(54px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 58px;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 0;
  }

  .brand {
    width: auto;
    height: 46px;
    min-width: 0;
    flex: 0 0 auto;
    gap: 0;
  }

  .brand-mark {
    width: 66px;
    height: 46px;
    flex-basis: 66px;
  }

  .brand-name {
    display: none;
    overflow: hidden;
    max-width: 132px;
    font-size: 22px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-nav {
    display: none;
  }

  .top-actions {
    gap: 4px;
    margin-left: 0;
  }

  .top-icon {
    width: 36px;
    height: 36px;
  }

  .audio-open-top {
    width: 36px;
    min-height: 36px;
    padding: 0;
    font-size: 0;
  }

  .audio-open-top::before {
    line-height: 1;
  }

  .top-icon::before {
    width: 25px;
    height: 25px;
  }

  .top-more {
    display: inline-grid;
  }

  .auth {
    max-width: none;
  }

  .profile-menu,
  .profile-button {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    min-width: 36px;
    max-width: 36px;
  }

  .profile-button {
    border: 0;
  }

  .feed-chip-row {
    top: 58px;
    padding: 6px 10px 7px;
    gap: 7px;
  }

  .feed-chip-row .chip {
    min-height: 26px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 12px;
  }

  .chip-compass {
    width: 36px;
    min-width: 36px;
  }

  .home-feed .hero-cinema {
    display: none;
  }

  .home-feed .section {
    padding: 14px 14px 22px;
  }

  .home-feed .section-head {
    margin-bottom: 12px;
  }

  .home-shorts-section {
    padding-top: 12px;
  }

  .shorts-title h2 {
    font-size: 24px;
  }

  .shorts-mark {
    width: 35px;
    height: 35px;
  }

  .home-shorts-section .shorts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .home-shorts-section .shorts-grid .video-card {
    position: relative;
    display: block;
    max-width: none;
    overflow: hidden;
    border-radius: 8px;
    background: #050505;
  }

  .home-shorts-section .shorts-grid .poster {
    display: block;
    aspect-ratio: 9 / 16;
    border: 0;
    border-radius: 8px;
    background: #050505;
  }

  .home-shorts-section .shorts-grid .poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.78));
    pointer-events: none;
  }

  .home-shorts-section .shorts-grid .play-chip {
    top: 8px;
    right: 8px;
    bottom: auto;
    width: 28px;
    min-width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 999px;
    background: rgba(0,0,0,.46);
    color: transparent;
    font-size: 0;
  }

  .home-shorts-section .shorts-grid .play-chip::before {
    content: "";
    width: 18px;
    height: 18px;
    background: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 6a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .home-shorts-section .shorts-grid .video-card-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 0 12px 12px;
    color: #fff;
  }

  .home-shorts-section .shorts-grid .video-title {
    display: -webkit-box;
    overflow: hidden;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.12;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .home-shorts-section .shorts-grid .video-owner-line {
    display: none;
  }

  .home-video-section .grid,
  .home-video-section .youtube-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .home-video-section .video-card {
    gap: 10px;
  }

  .home-video-section .poster {
    border: 0;
    border-radius: 0;
    margin-left: -14px;
    margin-right: -14px;
    width: calc(100% + 28px);
  }

  .home-video-section .video-card-body {
    padding: 0;
  }

  .home-video-section .video-title {
    font-size: 17px;
    font-weight: 600;
  }

  .home-video-section .video-owner-line {
    align-items: center;
  }

  .home-video-section .video-owner-avatar {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 220;
    display: grid;
    grid-template-columns: repeat(5, minmax(58px, 1fr));
    align-items: center;
    justify-items: stretch;
    justify-content: center;
    width: auto;
    max-width: none;
    box-sizing: border-box;
    overflow: visible;
    min-height: calc(50px + env(safe-area-inset-bottom));
    padding:
      3px max(10px, env(safe-area-inset-right))
      max(3px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, .94);
    backdrop-filter: blur(18px);
  }

  :root[data-theme="light"] .mobile-bottom-nav,
  :root[data-theme="south"] .mobile-bottom-nav,
  :root[data-theme="east"] .mobile-bottom-nav,
  :root[data-theme="west"] .mobile-bottom-nav {
    background: rgba(4, 18, 24, .94);
  }

  .bottom-nav-item {
    justify-self: stretch;
    width: 100%;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
  }

  .bottom-nav-item em {
    width: 100%;
    max-width: 68px;
    text-align: center;
    overflow: visible;
    text-overflow: clip;
  }

  .bottom-nav-item .bottom-icon {
    width: 22px;
    height: 22px;
  }

  .bottom-nav-item.active {
    font-weight: 800;
  }

  .bottom-create .bottom-icon {
    justify-self: center;
    width: 42px;
    height: 42px;
    background: color-mix(in srgb, var(--text), transparent 90%);
  }

  .bottom-create::after {
    font-size: 31px;
  }

  .bottom-avatar {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .bottom-you .avatar-verify-badge {
    width: 9px;
    height: 9px;
    flex-basis: 9px;
    top: 0;
    right: 0;
    transform: translate(12%, -12%);
  }

  .search-drawer {
    width: 100vw;
    padding: max(18px, env(safe-area-inset-top)) 16px 16px;
  }

  .search-drawer-form {
    grid-template-columns: 30px minmax(0, 1fr) 40px;
    gap: 8px;
  }

  .search-drawer-form input {
    height: 38px;
    font-size: 14px;
  }

  .me-page {
    padding: 22px 18px 8px;
    gap: 18px;
  }

  .me-head {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
  }

  .me-avatar {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
    font-size: 24px;
  }

  .me-head h1 {
    font-size: 24px;
  }

  .me-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subscription-strip {
    grid-template-columns: 1fr;
  }
}

.bulk-title-list {
  display: none;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
}

.bulk-title-list.is-active {
  display: grid;
}

.bulk-title-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.bulk-title-row span {
  color: var(--muted);
  font-size: 12px;
}

.bulk-title-row input {
  width: 100%;
}

.bulk-title-row small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  word-break: break-word;
}

.external-preview {
  margin: 10px 0 14px;
}

.external-preview-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.42);
}

.external-preview-card img,
.external-preview-empty {
  width: 132px;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
  background: #050b16;
}

.external-preview-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.external-preview-card strong,
.external-preview-card span,
.external-preview-card small {
  display: block;
  min-width: 0;
}

.external-preview-card small {
  margin-top: 4px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .verification-info-grid {
    grid-template-columns: 1fr;
  }

  .verification-info-card {
    min-height: auto;
  }
}

@media (max-width: 420px) {
  .register-page {
    width: min(100%, calc(100vw - 20px));
    padding: 12px 0 90px;
  }

  .verification-info-block {
    padding: 16px;
  }

  .verification-info-grid {
    grid-template-columns: 1fr;
  }

  .verification-info-card {
    min-height: auto;
  }

  .menu-toggle,
  .profile-menu,
  .profile-button {
    width: 36px;
    height: 36px;
  }

  .brand {
    width: auto;
    height: 46px;
  }

  .brand-name {
    display: none;
    max-width: 108px;
    font-size: 20px;
  }

  .profile-menu {
    flex-basis: 36px;
  }

  .profile-button {
    min-width: 36px;
    max-width: 36px;
    flex-basis: 36px;
  }

  nav a {
    flex-basis: 32px;
    width: 32px;
    min-width: 32px;
  }

  .auth {
    max-width: 52vw;
  }

  .auth .ghost,
  .auth .button {
    padding: 8px;
    font-size: 11px;
  }
}

.pv-chat-button {
  text-decoration: none;
}

.pv-chat-button::before {
  content: none;
}

.pv-chat-button > svg,
.pv-chat-icon svg,
.pv-chat-plus svg,
.pv-chat-mic svg,
.pv-chat-back svg,
.pv-chat-message-actions svg,
.pv-chat-document svg,
.pv-chat-location svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.pv-chat-badge,
.pv-chat-row-badge {
  position: absolute;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: var(--button-text);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--bg);
}

.pv-chat-badge {
  top: 1px;
  right: 1px;
}

.pv-chat-page {
  width: min(1280px, calc(100vw - 28px));
  height: calc(100vh - 118px);
  min-height: 620px;
  margin: 18px auto 96px;
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(4, 9, 13, .7);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .26);
}

.pv-chat-sidebar,
.pv-chat-thread {
  min-width: 0;
  min-height: 0;
}

.pv-chat-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel), transparent 8%);
}

.pv-chat-sidebar-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.pv-chat-sidebar-head h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.pv-chat-sidebar-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.pv-chat-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 10px 12px 0;
}

.pv-chat-tabs button {
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.pv-chat-tabs button.is-active {
  border-color: var(--line);
  background: color-mix(in srgb, var(--accent), transparent 88%);
  color: var(--text);
}

.pv-chat-connection {
  margin: 8px 12px 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(255, 255, 255, .035);
}

.pv-chat-connection.is-online {
  border-color: color-mix(in srgb, #23c55e, transparent 55%);
  color: color-mix(in srgb, #23c55e, #fff 25%);
}

.pv-chat-connection.is-syncing,
.pv-chat-connection.is-checking {
  border-color: color-mix(in srgb, var(--accent), transparent 48%);
  color: var(--text);
}

.pv-chat-connection.is-reconnecting,
.pv-chat-connection.is-server-slow,
.pv-chat-connection.is-offline {
  border-color: color-mix(in srgb, var(--danger), transparent 45%);
  color: color-mix(in srgb, var(--danger), #fff 24%);
}

.pv-chat-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
}

.pv-chat-search input,
.pv-chat-input-wrap textarea,
.pv-chat-modal-card textarea {
  width: 100%;
  min-width: 0;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, .25);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}

.pv-chat-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px;
}

.pv-chat-list-row {
  position: relative;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 9px;
  color: var(--text);
  cursor: pointer;
}

.pv-chat-list-row:hover,
.pv-chat-list-row.is-active,
.pv-chat-list-row:focus-visible {
  border-color: var(--line);
  background: rgba(255, 255, 255, .05);
  outline: none;
}

.pv-chat-avatar,
.pv-chat-peer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 900;
}

.pv-chat-avatar img,
.pv-chat-peer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pv-chat-user-line {
  display: block;
  min-width: 0;
}

.pv-chat-user-line strong {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-chat-user-line small {
  display: block;
  min-width: 0;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-chat-user-badge {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border-radius: 50%;
  position: relative;
  background: #4aa3ff;
}

.pv-chat-user-badge::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.pv-chat-user-badge-green {
  background: #23c55e;
}

.pv-chat-user-badge-yellow {
  background: #f8c33b;
}

.pv-chat-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.pv-chat-row-actions .button,
.pv-chat-row-actions .ghost {
  padding: 7px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.pv-chat-row-badge {
  position: static;
  box-shadow: none;
}

.pv-chat-thread {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 24%), rgba(0, 0, 0, .18);
}

.pv-chat-thread-head {
  min-height: 70px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel), transparent 16%);
}

.pv-chat-back {
  display: none;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
}

.pv-chat-mobile-close {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  place-items: center;
  cursor: pointer;
}

.pv-chat-back::before,
.pv-chat-plus::before,
.pv-chat-mic::before,
.pv-chat-icon::before {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.pv-chat-back::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 5 8.5 12l7 7-1.5 1.5L5.5 12 14 3.5 15.5 5Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 5 8.5 12l7 7-1.5 1.5L5.5 12 14 3.5 15.5 5Z'/%3E%3C/svg%3E");
}

.pv-chat-peer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pv-chat-thread-actions,
.pv-chat-message-actions,
.pv-chat-composer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pv-chat-icon,
.pv-chat-plus,
.pv-chat-mic {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  cursor: pointer;
}

.pv-chat-icon:disabled,
.pv-chat-plus:disabled,
.pv-chat-mic:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.pv-chat-icon::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.5 15.5 0 0 0 6.6 6.6l2.2-2.2c.3-.3.8-.4 1.2-.2 1.3.4 2.7.7 4.1.7.7 0 1.3.6 1.3 1.3v3.5c0 .7-.6 1.3-1.3 1.3C10.4 21.8 2.2 13.6 2.2 3.3 2.2 2.6 2.8 2 3.5 2H7c.7 0 1.3.6 1.3 1.3 0 1.4.2 2.8.7 4.1.1.4 0 .9-.3 1.2l-2.1 2.2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.5 15.5 0 0 0 6.6 6.6l2.2-2.2c.3-.3.8-.4 1.2-.2 1.3.4 2.7.7 4.1.7.7 0 1.3.6 1.3 1.3v3.5c0 .7-.6 1.3-1.3 1.3C10.4 21.8 2.2 13.6 2.2 3.3 2.2 2.6 2.8 2 3.5 2H7c.7 0 1.3.6 1.3 1.3 0 1.4.2 2.8.7 4.1.1.4 0 .9-.3 1.2l-2.1 2.2Z'/%3E%3C/svg%3E");
}

.pv-chat-icon-video::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h10a2 2 0 0 1 2 2v1.6l4-2.6v10l-4-2.6V16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h10a2 2 0 0 1 2 2v1.6l4-2.6v10l-4-2.6V16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E");
}

.pv-chat-icon-menu::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 10a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm7 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm7 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 10a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm7 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm7 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z'/%3E%3C/svg%3E");
}

.pv-chat-plus::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6V5Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 5h2v6h6v2h-6v6h-2v-6H5v-2h6V5Z'/%3E%3C/svg%3E");
}

.pv-chat-mic::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a3 3 0 0 1 3 3v6a3 3 0 0 1-6 0V6a3 3 0 0 1 3-3Zm6 8a6 6 0 0 1-12 0H4a8 8 0 0 0 7 7.9V22h2v-3.1a8 8 0 0 0 7-7.9h-2Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a3 3 0 0 1 3 3v6a3 3 0 0 1-6 0V6a3 3 0 0 1 3-3Zm6 8a6 6 0 0 1-12 0H4a8 8 0 0 0 7 7.9V22h2v-3.1a8 8 0 0 0 7-7.9h-2Z'/%3E%3C/svg%3E");
}

.pv-chat-mic.is-recording {
  color: var(--danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger), transparent 76%);
}

.pv-chat-incoming-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent-2), transparent 88%);
}

.pv-chat-incoming-actions[hidden],
.pv-chat-plus-menu[hidden],
.pv-chat-reply-preview[hidden],
.pv-chat-typing[hidden],
.pv-chat-toast[hidden] {
  display: none !important;
}

.pv-chat-messages {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pv-chat-message {
  display: flex;
  max-width: 78%;
}

.pv-chat-message.is-mine {
  margin-left: auto;
  justify-content: flex-end;
}

.pv-chat-message.is-other {
  margin-right: auto;
}

.pv-chat-bubble {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, .06);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}

.pv-chat-message.is-mine .pv-chat-bubble {
  background: color-mix(in srgb, var(--accent), transparent 78%);
  border-color: color-mix(in srgb, var(--accent), transparent 50%);
}

.pv-chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pv-chat-message-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.pv-chat-delivery-status {
  color: color-mix(in srgb, var(--accent), #fff 20%);
}

.pv-chat-message-actions {
  gap: 4px;
  margin-top: 6px;
  opacity: 0;
  transition: opacity .15s ease;
}

.pv-chat-bubble:hover .pv-chat-message-actions,
.pv-chat-bubble:focus-within .pv-chat-message-actions {
  opacity: 1;
}

.pv-chat-message-actions .ghost {
  padding: 4px 7px;
  border-radius: 8px;
  font-size: 11px;
}

.pv-chat-message-actions svg {
  width: 14px;
  height: 14px;
  margin-right: 3px;
}

.pv-chat-quoted {
  width: 100%;
  display: block;
  margin: 0 0 8px;
  padding: 7px 8px;
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: rgba(0, 0, 0, .2);
  color: var(--muted);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pv-chat-media-preview {
  max-width: min(320px, 72vw);
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  padding: 0;
  background: #05080c;
  color: inherit;
  cursor: zoom-in;
}

.pv-chat-image-preview {
  line-height: 0;
}

.pv-chat-attachment-image,
.pv-chat-attachment-video,
.pv-chat-preview-media {
  display: block;
  width: auto;
  max-width: min(320px, 72vw);
  max-height: 360px;
  border-radius: 14px;
  object-fit: cover;
  background: #05080c;
}

.pv-chat-attachment-video {
  width: min(320px, 72vw);
  object-fit: contain;
}

.pv-chat-open-media {
  width: 100%;
  margin-top: 6px;
  justify-content: center;
}

.pv-chat-voice-bubble {
  display: flex;
  align-items: center;
  max-width: min(300px, 72vw);
}

.pv-chat-attachment-audio,
.pv-chat-attachment audio {
  width: min(300px, 72vw);
  max-width: 100%;
}

.pv-chat-document,
.pv-chat-location {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
}

.pv-chat-location {
  flex-wrap: wrap;
}

.pv-chat-location a {
  color: var(--accent-2);
}

.pv-chat-system-message {
  color: var(--muted);
}

.pv-chat-empty {
  margin: auto;
  color: var(--muted);
  text-align: center;
  padding: 22px;
}

.pv-chat-typing {
  padding: 0 18px 8px;
  color: var(--muted);
  font-size: 12px;
}

.pv-chat-composer {
  position: relative;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel), transparent 12%);
}

.pv-chat-input-wrap {
  flex: 1;
  min-width: 0;
}

.pv-chat-input-wrap textarea {
  max-height: 130px;
  display: block;
}

.pv-chat-reply-preview {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, .22);
  color: var(--muted);
  font-size: 12px;
}

.pv-chat-plus-menu {
  position: absolute;
  left: 12px;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel), #000 10%);
  box-shadow: 0 20px 46px rgba(0, 0, 0, .35);
}

.pv-chat-plus-menu button {
  width: 100%;
  display: block;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.pv-chat-plus-menu button:hover {
  background: rgba(255, 255, 255, .06);
}

.pv-chat-modal,
.pv-call-modal,
.pv-call-screen {
  position: fixed;
  inset: 0;
  z-index: 4500;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(10px);
}

.pv-chat-modal[hidden],
.pv-call-modal[hidden],
.pv-call-screen[hidden] {
  display: none;
}

.pv-chat-modal-card,
.pv-call-card {
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel), #000 8%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .45);
}

.pv-chat-modal-card h2,
.pv-call-card h2 {
  margin: 0;
  font-size: 22px;
}

.pv-chat-lightbox {
  position: relative;
  display: grid;
  place-items: center;
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
}

.pv-chat-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(0,0,0,.62);
  color: #fff;
  cursor: pointer;
}

.pv-chat-lightbox-media {
  display: block;
  max-width: calc(100vw - 36px);
  max-height: calc(100vh - 72px);
  border-radius: 14px;
  object-fit: contain;
  background: #02050a;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}

.pv-chat-voice-recording,
.pv-chat-voice-preview {
  justify-items: stretch;
}

.pv-chat-voice-timer {
  display: block;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--danger), transparent 45%);
  border-radius: 14px;
  color: var(--danger);
  font-size: 28px;
  text-align: center;
  background: color-mix(in srgb, var(--danger), transparent 90%);
}

.pv-chat-file-name {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-wrap: anywhere;
}

.pv-chat-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 5000;
  transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 24px));
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel), #000 10%);
  color: var(--text);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
}

.pv-chat-toast.danger {
  border-color: color-mix(in srgb, var(--danger), transparent 35%);
}

.pv-call-remote {
  width: min(780px, calc(100vw - 64px));
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  object-fit: cover;
  background: #02050a;
}

.pv-call-remote.is-audio-only,
.pv-call-local.is-audio-only {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pv-call-video-placeholder {
  width: min(780px, calc(100vw - 64px));
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent), transparent 62%), #02050a);
  color: var(--muted);
  font-weight: 800;
}

.pv-call-card {
  width: min(820px, calc(100vw - 28px));
}

.pv-call-card.is-audio {
  width: min(420px, calc(100vw - 28px));
  text-align: center;
}

.pv-call-status {
  margin: 0;
  color: var(--muted);
}

.pv-call-audio-visual {
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent), transparent 52%), rgba(0,0,0,.22));
  font-weight: 900;
}

.pv-call-local {
  width: 150px;
  aspect-ratio: 9 / 16;
  justify-self: end;
  margin-top: -170px;
  margin-right: 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  object-fit: cover;
  background: #02050a;
}

.pv-call-local-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.pv-call-debug {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  background: rgba(0, 0, 0, .18);
}

.pv-call-debug summary {
  cursor: pointer;
}

.pv-call-debug pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.pv-call-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

@media (max-width: 860px) {
  .pv-chat-page {
    position: fixed;
    inset: 0;
    z-index: 4200;
    width: 100vw;
    height: var(--pv-app-height, 100vh);
    max-height: var(--pv-app-height, 100vh);
    height: 100dvh;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border: 0;
    border-radius: 0;
    grid-template-columns: 1fr;
  }

  .pv-chat-sidebar {
    border-right: 0;
    min-height: 0;
    overflow: hidden;
  }

  .pv-chat-thread {
    display: none;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  }

  .pv-chat-page.is-thread-open .pv-chat-sidebar {
    display: none;
  }

  .pv-chat-page.is-thread-open .pv-chat-thread {
    display: grid;
  }

  .pv-chat-back {
    display: inline-grid;
    place-items: center;
  }

  .pv-chat-mobile-close {
    display: inline-grid;
  }

  .pv-chat-sidebar-head {
    grid-template-columns: 1fr;
  }

  .pv-chat-add-contact {
    justify-self: start;
  }

  .pv-chat-message {
    max-width: 90%;
  }

  .pv-chat-media-preview,
  .pv-chat-attachment-image,
  .pv-chat-attachment-video,
  .pv-chat-voice-bubble,
  .pv-chat-attachment-audio {
    max-width: min(280px, 72vw);
  }

  .pv-chat-attachment-video,
  .pv-chat-attachment-audio {
    width: min(280px, 72vw);
  }

  .pv-chat-message-actions {
    opacity: 1;
  }

  .pv-chat-composer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .pv-chat-input-wrap textarea {
    max-height: 84px;
  }

  .pv-chat-send {
    padding: 10px 11px;
    font-size: 12px;
  }

  .pv-call-local {
    width: 96px;
    margin-top: -112px;
  }

  .pv-call-card {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .pv-call-remote,
  .pv-call-video-placeholder {
    width: 100%;
    max-height: 58vh;
  }
}

@media (max-width: 520px) {
  .pv-chat-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pv-chat-tabs button {
    padding: 8px 4px;
    font-size: 11px;
  }

  .pv-chat-thread-head {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    padding: 10px;
  }

  .pv-chat-thread-actions {
    gap: 5px;
  }

  .pv-chat-icon,
  .pv-chat-plus,
  .pv-chat-mic {
    width: 36px;
    height: 36px;
  }

  .pv-chat-composer {
    gap: 6px;
  }

  .pv-chat-plus-menu {
    left: 8px;
    width: min(220px, calc(100vw - 20px));
  }
}

@media (max-width: 860px) {
  .pv-chat-page {
    inset:
      max(6px, env(safe-area-inset-top, 0px))
      max(6px, env(safe-area-inset-right, 0px))
      max(24px, calc(env(safe-area-inset-bottom, 0px) + 14px))
      max(6px, env(safe-area-inset-left, 0px));
    width: auto;
    height: auto;
    max-height: calc(var(--pv-app-height, 100vh) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 36px);
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 36px);
    border: 1px solid var(--line);
    border-radius: 16px;
  }

  .pv-chat-sidebar-head {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    padding: 10px 10px 8px;
  }

  .pv-chat-sidebar-head h1 {
    font-size: 22px;
  }

  .pv-chat-sidebar-head p {
    display: none;
  }

  .pv-chat-add-contact {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

  .pv-chat-tabs {
    padding: 6px 8px 0;
  }

  .pv-chat-tabs button {
    padding: 7px 4px;
  }

  .pv-chat-connection {
    margin: 6px 8px 0;
    padding: 5px 7px;
    font-size: 11px;
  }

  .pv-chat-search {
    gap: 6px;
    padding: 8px;
  }

  .pv-chat-search input,
  .pv-chat-input-wrap textarea {
    padding: 8px 9px;
    border-radius: 10px;
  }

  .pv-chat-list {
    padding: 6px;
  }

  .pv-chat-list-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 7px;
    border-radius: 12px;
  }

  .pv-chat-avatar,
  .pv-chat-peer-avatar {
    width: 38px;
    height: 38px;
  }

  .pv-chat-thread-head {
    min-height: 52px;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 6px;
    padding: 7px 8px;
  }

  .pv-chat-back,
  .pv-chat-mobile-close,
  .pv-chat-icon,
  .pv-chat-plus,
  .pv-chat-mic {
    width: 34px;
    height: 34px;
  }

  .pv-chat-back::before,
  .pv-chat-plus::before,
  .pv-chat-mic::before,
  .pv-chat-icon::before {
    width: 19px;
    height: 19px;
  }

  .pv-chat-peer {
    gap: 7px;
  }

  .pv-chat-thread-actions {
    gap: 4px;
  }

  .pv-chat-messages {
    padding: 8px 8px 6px;
    gap: 7px;
  }

  .pv-chat-message {
    max-width: 92%;
  }

  .pv-chat-bubble {
    border-radius: 14px;
    padding: 8px 9px;
  }

  .pv-chat-composer {
    gap: 5px;
    bottom: 10px;
    padding: 6px 8px 8px;
  }

  .pv-chat-input-wrap textarea {
    min-height: 32px;
    max-height: 68px;
    line-height: 1.25;
  }

  .pv-chat-send {
    min-height: 32px;
    padding: 7px 9px;
  }

  .pv-chat-plus-menu {
    bottom: calc(100% + 6px);
  }
}

@media (max-width: 390px) {
  .pv-chat-page {
    inset:
      max(5px, env(safe-area-inset-top, 0px))
      max(5px, env(safe-area-inset-right, 0px))
      max(28px, calc(env(safe-area-inset-bottom, 0px) + 16px))
      max(5px, env(safe-area-inset-left, 0px));
    border-radius: 14px;
  }

  .pv-chat-sidebar-head {
    padding: 8px;
  }

  .pv-chat-add-contact {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pv-chat-thread-head {
    min-height: 48px;
    padding: 6px;
  }

  .pv-chat-back,
  .pv-chat-mobile-close,
  .pv-chat-icon,
  .pv-chat-plus,
  .pv-chat-mic {
    width: 32px;
    height: 32px;
  }

  .pv-chat-composer {
    bottom: 12px;
    padding: 5px 6px 7px;
  }

  .pv-chat-input-wrap textarea {
    min-height: 31px;
    padding: 7px 8px;
  }

  .pv-chat-send {
    min-height: 31px;
    padding: 7px 8px;
  }
}
