:root {
  color-scheme: dark;
  --black: #000000;
  --white: #ffffff;
  --accent-line: #202020;
  --accent-content: #e856a8;
  --accent-on-content: #ffffff;
  --accent-on-line: #ffffff;
  --pink: var(--accent-content);
  --pink-ink: var(--accent-on-content);
  --gray: #7a7a7a;
  --glass-bg: rgba(18, 18, 24, 0.72);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
  --tg-viewport-height: 100dvh;
  --tg-mini-top-offset: 0px;
  --tg-mini-bottom-offset: 0px;
  --browser-viewport-height: 100dvh;
  --browser-viewport-offset-top: 0px;
  --auth-keyboard-inset: 0px;
  --browser-safe-top: env(safe-area-inset-top, 0px);
  --browser-safe-bottom: env(safe-area-inset-bottom, 0px);
  --browser-chrome-top: max(var(--browser-safe-top), var(--browser-viewport-offset-top, 0px));
  --app-top-inset: var(--browser-safe-top);
  --app-bottom-inset: 0px;
  --app-ui-bottom-inset: var(--browser-safe-bottom);
  --sidebar-width: 360px;
  --folder-rail-width: 72px;
  --sidebar-topics-rail-width: 68px;
  --sidebar-compact-width: 85px;
}

* {
  box-sizing: border-box;
}

html {
  background: #000000;
}

html.telegram-mini-app,
html.telegram-mini-app body {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html.standalone-app,
html.standalone-app body {
  position: fixed;
  top: var(--browser-viewport-offset-top, 0px);
  left: 0;
  right: 0;
  width: 100%;
  height: var(--browser-viewport-height, 100dvh);
  overflow: hidden;
  overscroll-behavior: none;
}

html.telegram-mini-app .app-loading-screen {
  min-height: var(--tg-viewport-height, 100dvh);
}

html.telegram-mini-app {
  --app-top-inset: var(--tg-mini-top-offset);
  --app-bottom-inset: var(--tg-mini-bottom-offset);
  --app-ui-bottom-inset: var(--tg-mini-bottom-offset);
}

html.telegram-mini-app .telegram-shell {
  box-sizing: border-box;
  height: 100%;
  min-height: 0;
  padding-top: var(--tg-mini-top-offset);
}

html.telegram-mini-app-fullscreen .telegram-shell {
  /* Keep notch / Dynamic Island clearance in fullscreen Mini Apps. */
  padding-top: var(--tg-mini-top-offset);
  height: 100%;
  min-height: 0;
}

html.telegram-mini-app-fullscreen .sidebar,
html.telegram-mini-app-fullscreen .workspace {
  height: 100%;
  min-height: 0;
}

[hidden] {
  display: none !important;
}

*:focus {
  outline: none;
}

*:focus-visible {
  outline: 1px solid var(--accent-line);
  outline-offset: 2px;
}

body {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: #000000;
  color: var(--white);
  font-family: "Comfortaa", system-ui, sans-serif;
  font-weight: 300;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: text;
  user-select: text;
}

body::before {
  content: none;
}

.app-loading-screen {
  --app-loading-logo-size: min(425px, 88vw);
  --app-loading-line: #e856a8;
  --app-loading-content: #ffffff;
  font-family: "Comfortaa", system-ui, sans-serif;
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  align-content: center;
  background: #000;
  opacity: 1;
  transition: opacity 220ms ease;
  overflow: hidden;
  isolation: isolate;
}

.app-loading-screen::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(82vw, 920px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 45%, rgba(255, 168, 219, 0.48) 0 10%, rgba(225, 80, 169, 0.38) 26%, rgba(132, 50, 190, 0.22) 48%, rgba(225, 80, 169, 0.08) 67%, transparent 78%);
  filter: blur(92px);
  transform: translate(-50%, -50%);
  opacity: 1;
}

.app-loading-screen > * {
  position: relative;
  z-index: 1;
}

html.app-ready .app-loading-screen,
body.app-ready .app-loading-screen {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.app-loading-logo {
  width: var(--app-loading-logo-size);
  height: var(--app-loading-logo-size);
  object-fit: contain;
  mix-blend-mode: screen;
  background: transparent;
}

.app-loading-title {
  display: block;
  justify-self: center;
  width: auto;
  max-width: calc(100vw - 32px);
  padding-inline: max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  box-sizing: border-box;
  margin-top: -68px;
  color: var(--app-loading-content);
  font-family: inherit;
  font-size: min(64px, calc((100vw - 56px) / 6));
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 10px 34px rgba(225, 80, 169, 0.44);
}

.app-loading-spinner {
  width: 68px;
  height: 68px;
  margin-top: 24px;
  border-radius: 50%;
  background:
    conic-gradient(
      from -90deg,
      rgba(255, 255, 255, 0.14) 0deg,
      rgba(255, 255, 255, 0.14) 108deg,
      var(--app-loading-line) 360deg
    );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 0);
  animation: app-loading-spin 760ms linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .app-loading-screen,
  .app-loading-spinner {
    transition: none;
    animation-duration: 1.8s;
  }
}

@keyframes app-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

input,
textarea,
[contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}

@media (min-width: 901px) {
  button,
  label,
  span,
  strong,
  small,
  p,
  h1,
  h2,
  h3,
  dt,
  dd {
    -webkit-user-select: text;
    user-select: text;
  }
}

a {
  color: var(--pink);
}

body.app-locked,
body.no-telegram-session {
  overflow-y: auto;
}

.telegram-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: 100vw;
  height: 100dvh;
  min-height: 100vh;
  background: var(--black);
}

body.has-folder-rail .telegram-shell {
  grid-template-columns: var(--folder-rail-width) var(--sidebar-width) minmax(0, 1fr);
}

html:not(.app-ready) .telegram-shell,
body:not(.app-ready) .telegram-shell {
  opacity: 0;
  visibility: hidden;
}

.app-locked .telegram-shell,
.no-telegram-session .telegram-shell {
  grid-template-columns: 1fr;
  height: auto;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 18% 12%, rgba(232, 86, 168, 0.22), transparent 34%),
    radial-gradient(circle at 86% 82%, rgba(124, 58, 237, 0.16), transparent 38%),
    linear-gradient(145deg, #050505 0%, #111018 48%, #000000 100%);
}

.app-locked .sidebar,
.no-telegram-session .sidebar {
  width: 100vw;
  height: auto;
  min-height: 100dvh;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  grid-template-rows: auto auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.app-locked .sidebar-body,
.no-telegram-session .sidebar-body,
.app-locked .sidebar-chats,
.no-telegram-session .sidebar-chats {
  overflow: visible;
  min-height: auto;
}

.app-locked .sidebar-head,
.no-telegram-session .sidebar-head {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 10px;
  border-bottom: 0;
  background: transparent;
}

.app-locked .sidebar-title-row,
.no-telegram-session .sidebar-title-row {
  grid-template-columns: minmax(0, 1fr);
}

.app-locked .search-box,
.no-telegram-session .search-box {
  display: none;
}

.app-locked .sidebar-title-row .icon-button,
.no-telegram-session .sidebar-title-row .icon-button {
  display: none !important;
}

.app-locked .sidebar-list,
.no-telegram-session .sidebar-list {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 0 0 24px;
  background: transparent;
  overflow: visible;
  min-height: auto;
  height: auto;
}

.app-locked .workspace,
.app-locked .bottom-nav,
.no-telegram-session .workspace,
.no-telegram-session .bottom-nav {
  display: none;
}

.sidebar {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 58px;
  min-width: 0;
  min-height: 0;
  height: 100dvh;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--black);
  backdrop-filter: none;
  border-right: 1px solid var(--accent-line);
}

.sidebar:has(.voul-functions.open),
.sidebar:has(.voul-functions:hover),
.sidebar:has(.voul-functions:focus-within) {
  /* Keep menu unclipped, but do not raise the whole sidebar above body modals. */
  overflow: visible;
}

.sidebar-resize-handle {
  position: absolute;
  top: 0;
  right: -3px;
  z-index: 5;
  width: 6px;
  height: 100%;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
}

.sidebar-resize-handle::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: transparent;
  transition: background 0.15s;
}

.sidebar-resize-handle:hover::after,
.sidebar-resize-handle.is-dragging::after {
  background: var(--accent-line);
}

body.sidebar-resizing {
  cursor: ew-resize;
  user-select: none;
}

body.sidebar-resizing .sidebar-resize-handle {
  cursor: ew-resize;
}

.app-locked .sidebar-resize-handle,
.no-telegram-session .sidebar-resize-handle,
body:not(.sidebar-chats-mode) .sidebar-resize-handle {
  display: none;
}

.sidebar-list .item-unread-avatar,
.sidebar-list .item-unread-group-avatar {
  display: none;
}

body.sidebar-compact .sidebar {
  grid-template-rows: auto minmax(0, 1fr);
}

body.sidebar-compact .bottom-nav {
  display: none;
}

body.sidebar-compact .sidebar-head {
  gap: 4px;
  min-width: 0;
  padding: 12px 8px 5px;
  overflow: visible;
}

body.sidebar-compact .sidebar-title-row {
  position: relative;
  z-index: 2;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    "voul voul voul"
    "create archive settings";
  gap: 4px;
  align-items: stretch;
}

body.sidebar-compact #listTitle {
  display: none;
}

body.sidebar-compact .session-lost-label {
  display: none;
}

body.sidebar-compact .sync-label {
  margin-left: 4px;
  font-size: 10px;
}

body.sidebar-compact .voul-functions {
  position: relative;
  left: auto;
  grid-area: voul;
  width: 100%;
  transform: none;
}

body.sidebar-compact .extensions-toggle {
  width: 100%;
  min-height: 30px;
  padding: 0 6px;
  font-size: 0;
}

body.sidebar-compact .extensions-toggle span {
  display: none;
}

body.sidebar-compact .extensions-toggle-logo {
  margin: 0 auto;
}

body.sidebar-compact .sidebar-title-row .icon-button {
  width: 100%;
  height: 36px;
  min-width: 0;
  font-size: 16px;
}

body.sidebar-compact #createToggle,
body.sidebar-compact #archiveToggle {
  justify-self: stretch;
}

body.sidebar-compact #createToggle {
  grid-area: create;
  grid-column: auto;
}

body.sidebar-compact #archiveToggle {
  grid-area: archive;
  grid-column: auto;
}

body.sidebar-compact .app-settings-toggle {
  grid-area: settings;
  grid-column: auto;
}

body.sidebar-compact .search-box {
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 32px;
  padding: 0 8px;
  font-size: 12px;
}

body.sidebar-compact .search-box input {
  min-height: 28px;
  font-size: 11px;
}

body.sidebar-compact .search-box input::placeholder {
  font-size: 11px;
}

body.sidebar-compact .story-strip {
  gap: 6px;
  padding: 0;
}

body.sidebar-compact .story-button {
  width: 46px;
  min-width: 46px;
}

body.sidebar-compact .story-button .item-avatar {
  width: 40px;
  height: 40px;
}

body.sidebar-compact .story-button small {
  font-size: 9px;
}

body.sidebar-compact .app-settings-toggle[hidden] {
  display: none;
}

body.sidebar-compact .sidebar-title-row:has(.app-settings-toggle[hidden]) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "voul voul"
    "create archive";
}

body.sidebar-compact .voul-functions-menu {
  left: 0;
  width: 220px;
  transform: translate(0, -4px);
}

body.sidebar-compact .voul-functions:hover .voul-functions-menu,
body.sidebar-compact .voul-functions.open .voul-functions-menu,
body.sidebar-compact .voul-functions:focus-within .voul-functions-menu {
  transform: translate(0, 0);
}

body.sidebar-compact .sidebar-scroll-top {
  right: 6px;
  bottom: 12px;
}

body.sidebar-compact .sidebar-list > .list-item,
body.sidebar-compact .pinned-chats-group .list-item {
  grid-template-columns: var(--chat-avatar-size);
  justify-items: start;
  gap: 0;
  min-height: 66px;
  height: 66px;
  padding-block: 0;
  contain-intrinsic-size: 66px;
}

body.sidebar-compact .sidebar-list .item-meta,
body.sidebar-compact .sidebar-list .item-time,
body.sidebar-compact .sidebar-list .list-item > .item-unread,
body.sidebar-compact .sidebar-list .list-item > .item-unread-group {
  display: none;
}

body.sidebar-compact .sidebar-list .item-pin {
  display: grid;
  top: 2px;
  left: 0;
}

body.sidebar-compact .sidebar-list .item-avatar-wrap,
body.sidebar-compact .sidebar-list .item-avatar {
  justify-self: start;
}

body.sidebar-compact .pinned-chats-group {
  margin: 0;
  border-radius: 0;
  background: transparent;
}

body.sidebar-compact .account-list-row {
  grid-template-columns: 1fr;
}

body.sidebar-compact .account-row-settings,
body.sidebar-compact .account-row-drag-handle,
body.sidebar-compact .account-groups,
body.sidebar-compact .calls-tabs,
body.sidebar-compact .add-account-button,
body.sidebar-compact .empty-list {
  display: none;
}

body.sidebar-compact .sidebar-list .item-unread-avatar {
  position: absolute;
  right: 1px;
  bottom: 1px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 20px;
  max-width: 56px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--accent-on-content);
  font-size: 10px;
  line-height: 1;
}

body.sidebar-compact .sidebar-list .item-unread-group-avatar {
  position: absolute;
  right: 1px;
  bottom: 1px;
  z-index: 3;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}

body.sidebar-compact .sidebar-list .item-unread-group-avatar .item-unread-avatar {
  position: static;
  flex: 0 0 auto;
}

body.sidebar-compact .sidebar-list .item-unread-ninja-avatar {
  min-width: 20px;
  max-width: 56px;
  height: 20px;
  padding: 0 5px;
  border-width: 2px;
  border-radius: 999px;
  font-size: 10px;
}

body.sidebar-compact .sidebar-list .item-unread-avatar.muted,
body.sidebar-compact .sidebar-list .list-item.muted .item-unread-avatar {
  background: var(--gray);
  color: var(--black);
}

body.forum-topics-compact .sidebar-chats {
  display: none;
}

body.forum-topics-compact .sidebar-body {
  grid-template-columns: minmax(0, 1fr);
}

body.forum-topics-visible .forum-topics-compact,
body.forum-topics-compact .forum-topics-compact {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  max-width: var(--sidebar-topics-rail-width);
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid rgba(232, 86, 168, 0.35);
  background: rgba(0, 0, 0, 0.28);
}

body.forum-topics-visible:not(.forum-topics-compact) .forum-topics-compact {
  grid-column: 1;
  grid-row: 1;
  grid-template-rows: minmax(0, 1fr);
}

body.forum-topics-visible:not(.forum-topics-compact) .forum-topics-compact-close {
  display: none;
}

body.forum-topics-compact .forum-topics-compact-close {
  flex: 0 0 auto;
  width: 100%;
  height: 36px;
  margin: 0;
  border-radius: 0;
  font-size: 18px;
  line-height: 1;
}

body.forum-topics-visible .forum-topics-compact-list,
body.forum-topics-compact .forum-topics-compact-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 0;
}

body.forum-topics-visible .forum-topic-emoji-item,
body.forum-topics-compact .forum-topic-emoji-item {
  --chat-avatar-size: 57px;
  position: relative;
  display: grid;
  grid-template-columns: var(--chat-avatar-size);
  justify-items: center;
  align-items: center;
  width: 100%;
  min-height: 66px;
  height: 66px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  transition: background 0.18s ease;
  content-visibility: auto;
  contain-intrinsic-size: 66px;
  overflow: hidden;
}

body.forum-topics-visible .forum-topic-emoji-item:hover,
body.forum-topics-compact .forum-topic-emoji-item:hover {
  background: rgba(255, 255, 255, 0.09);
}

body.forum-topics-visible .forum-topic-emoji-item.active,
body.forum-topics-compact .forum-topic-emoji-item.active {
  background: rgba(255, 255, 255, 0.17);
}

body.forum-topics-visible .forum-topic-emoji-wrap,
body.forum-topics-compact .forum-topic-emoji-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--chat-avatar-size);
  height: var(--chat-avatar-size);
  justify-self: center;
}

body.forum-topics-visible .forum-topic-emoji,
body.forum-topics-compact .forum-topic-emoji {
  display: grid;
  place-items: center;
  width: var(--chat-avatar-size);
  height: var(--chat-avatar-size);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 28px;
  line-height: 1;
}

body.forum-topics-visible .forum-topic-emoji-item .item-unread-avatar,
body.forum-topics-compact .forum-topic-emoji-item .item-unread-avatar {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 20px;
  max-width: 56px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--accent-on-content);
  font-size: 10px;
  line-height: 1;
}

body.forum-topics-visible .forum-topic-emoji-item .item-unread-group-avatar,
body.forum-topics-compact .forum-topic-emoji-item .item-unread-group-avatar {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 3;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  max-width: calc(100% - 4px);
  overflow: hidden;
  justify-content: flex-end;
  pointer-events: none;
}

body.forum-topics-visible .forum-topic-emoji-item .item-unread-group-avatar .item-unread-avatar,
body.forum-topics-compact .forum-topic-emoji-item .item-unread-group-avatar .item-unread-avatar {
  position: static;
  flex: 0 0 auto;
}

body.forum-topics-visible .forum-topic-emoji-item .item-unread-ninja-avatar,
body.forum-topics-compact .forum-topic-emoji-item .item-unread-ninja-avatar {
  min-width: 20px;
  max-width: 56px;
  height: 20px;
  padding: 0 5px;
  border-width: 2px;
  border-radius: 999px;
  font-size: 10px;
}

body.forum-topics-visible .forum-topic-emoji-item.muted .item-unread-avatar,
body.forum-topics-visible .forum-topic-emoji-item .item-unread-avatar.muted,
body.forum-topics-compact .forum-topic-emoji-item.muted .item-unread-avatar,
body.forum-topics-compact .forum-topic-emoji-item .item-unread-avatar.muted {
  background: var(--gray);
  color: var(--black);
}

body.forum-topics-compact .sidebar-scroll-top {
  bottom: 12px;
}

body.sidebar-compact.forum-topics-visible .telegram-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

body.sidebar-compact.forum-topics-visible .sidebar-body {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar-head {
  position: relative;
  z-index: 30;
  display: grid;
  gap: 6px;
  padding: 16px 8px 5px 14px;
  background: var(--black);
  backdrop-filter: none;
  border-bottom: 0;
  overflow: visible;
}

.sidebar-title-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px 38px;
  gap: 4px;
  align-items: center;
}

.voul-functions {
  position: absolute;
  left: calc(50% - 66px);
  z-index: 1;
  width: 132px;
}

.voul-functions.open,
.voul-functions:hover,
.voul-functions:focus-within {
  z-index: 50;
}

.voul-functions::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 10px;
}

.extensions-toggle {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
}

.extensions-toggle-logo {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.extensions-toggle:hover {
  color: var(--pink);
}

.extensions-toggle.tap-animate {
  animation: none !important;
}

.voul-functions-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 60;
  display: grid;
  gap: 4px;
  width: 220px;
  padding: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background: var(--glass-bg);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

/* Wide sidebar: center the dropdown in the left column width. */
body:not(.sidebar-compact) .sidebar-title-row .voul-functions-menu:not(.is-placed) {
  left: calc(50% - min(110px, calc((var(--sidebar-width) - 24px) / 2)));
  width: min(220px, calc(var(--sidebar-width) - 24px));
  transform: translateY(-4px);
}

body:not(.sidebar-compact) .voul-functions:hover .voul-functions-menu:not(.is-placed),
body:not(.sidebar-compact) .voul-functions.open .voul-functions-menu:not(.is-placed),
body:not(.sidebar-compact) .voul-functions:focus-within .voul-functions-menu:not(.is-placed) {
  transform: translateY(0);
}

.voul-functions:hover .voul-functions-menu:not(.is-placed),
.voul-functions.open .voul-functions-menu:not(.is-placed),
.voul-functions:focus-within .voul-functions-menu:not(.is-placed),
.voul-functions-menu.is-placed {
  opacity: 1;
  pointer-events: auto;
}

.voul-functions:hover .voul-functions-menu:not(.is-placed),
.voul-functions.open .voul-functions-menu:not(.is-placed),
.voul-functions:focus-within .voul-functions-menu:not(.is-placed) {
  transform: translate(-50%, 0);
}

.voul-functions-menu.is-placed {
  position: fixed;
  transform: none;
  margin: 0;
}

.voul-functions-menu.voul-functions-menu-portal {
  position: fixed;
  z-index: 100075;
}

.voul-functions-ninja-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 0 4px 0 8px;
}

.voul-functions-ninja-label {
  color: var(--white);
  font-size: 11px;
  white-space: nowrap;
}

.voul-functions-info-btn {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--gray);
  border-radius: 50%;
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-style: italic;
  font-weight: 600;
  line-height: 1;
}

.voul-functions-info-btn:hover,
.voul-functions-info-btn:focus-visible {
  border-color: var(--gray);
  color: var(--white);
}

.ninja-mode-info-panel {
  position: relative;
  width: min(420px, 100%);
  padding: 20px 22px 22px;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background: var(--glass-bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.10);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: blur(28px) saturate(145%);
}

.ninja-mode-info-panel > .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.ninja-mode-info-panel h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.ninja-mode-info-panel p {
  margin: 0 0 10px;
  color: var(--gray);
  font-size: 13px;
  line-height: 1.45;
}

.ninja-mode-info-panel p:last-child {
  margin-bottom: 0;
}

.ninja-mode-info-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  text-decoration: underline;
}

.ninja-mode-info-link:hover,
.ninja-mode-info-link:focus-visible {
  color: var(--white);
}

.ninja-mode-info-subscribe {
  margin-top: 14px;
  font-size: 14px;
}

.ninja-mode-info-dismiss {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--accent-line);
  color: var(--gray);
  cursor: pointer;
  font-size: 12px;
}

.ninja-mode-info-dismiss input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--pink);
  cursor: pointer;
}

.voul-functions-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px;
  align-items: center;
}

.voul-functions-menu button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  text-align: left;
}

.voul-functions-menu .voul-functions-item > button[data-voul-function] {
  width: 100%;
  min-width: 0;
}

.voul-functions-menu .voul-functions-item.is-open > button[data-voul-function],
.voul-functions-menu button[data-voul-function].is-open {
  background: rgba(232, 86, 168, 0.22);
  color: var(--pink);
}

.voul-functions-menu .voul-functions-item-bold,
.voul-functions-menu .voul-functions-item-bold strong {
  font-weight: 700;
}

.voul-functions-menu .voul-functions-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  text-align: center;
  color: var(--gray);
  opacity: 0.85;
}

.voul-functions-menu button:hover,
.voul-functions-menu button:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.voul-functions-link-btn:hover,
.voul-functions-link-btn:focus-visible {
  opacity: 1;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--black);
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.icon-button:hover {
  transform: translateY(-1px) scale(1.015);
  background: rgba(255, 255, 255, 0.06);
}

.icon-button.active {
  border-color: var(--gray);
  color: var(--pink);
}

.app-settings-toggle {
  grid-column: 3;
  justify-self: end;
  border-color: transparent;
  background: transparent;
  color: var(--white);
  font-size: 20px;
}

#createToggle {
  grid-column: 2;
  color: var(--white);
}

#archiveToggle {
  grid-column: 3;
}

#listTitle {
  display: flex;
  min-width: 0;
  align-items: center;
  white-space: nowrap;
}

.app-settings-toggle:hover {
  border-color: transparent;
  color: var(--pink);
  background: rgba(255, 255, 255, 0.06);
}

h1,
h2,
p {
  margin: 0;
  font-weight: 300;
}

h1 {
  font-size: 20px;
}

.sync-label {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 6px;
  align-items: center;
  margin-left: 8px;
  color: var(--gray);
  font-size: 12px;
  vertical-align: middle;
}

.session-lost-label {
  display: inline-block;
  max-width: 170px;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 69, 58, 0.18);
  color: #ff8a80;
  font-size: 11px;
  line-height: 1.2;
  vertical-align: middle;
}

.sync-label::after {
  content: "";
  width: 10px;
  height: 10px;
  border: 1px solid var(--gray);
  border-top-color: var(--accent-line);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes message-local-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

#status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

body.chat-open #status.error {
  position: fixed;
  left: 50%;
  bottom: 78px;
  z-index: 120;
  width: max-content;
  max-width: min(92vw, 420px);
  height: auto;
  padding: 10px 14px;
  overflow: visible;
  clip-path: none;
  white-space: normal;
  text-align: center;
  border: 1px solid var(--pink);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.92);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  transform: translateX(-50%);
  pointer-events: none;
}

#activeSubtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gray);
  font-size: 12px;
}

.search-box {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--pink);
  font-size: 14px;
}

.search-box input {
  width: 100%;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  outline: none;
  font: inherit;
}

.search-modes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  overflow: hidden;
}

.search-modes[hidden] {
  display: none;
}

.search-modes button {
  min-height: 28px;
  border: 0;
  border-right: 1px solid var(--accent-line);
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
}

.search-modes button:last-child {
  border-right: 0;
}

.search-modes button.active {
  color: var(--pink);
}

.search-box input::placeholder {
  color: var(--white);
}

.sidebar-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 0;
  background: transparent;
}

.sidebar-body {
  position: relative;
  z-index: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

body.forum-topics-visible:not(.forum-topics-compact) .sidebar-body {
  grid-template-columns: var(--sidebar-topics-rail-width) minmax(0, 1fr);
}

body.forum-topics-visible:not(.forum-topics-compact) .sidebar-chats {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar-chats {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.sidebar-chats > .sidebar-list {
  min-height: 0;
  height: 100%;
}

.sidebar-topics {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
}

.sidebar-topics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px 8px 12px;
  border-bottom: 1px solid rgba(232, 86, 168, 0.22);
}

.sidebar-topics-head strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-topics-close {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  font-size: 18px;
  line-height: 1;
}

.topics-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 0;
}

.topic-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 74px;
  padding: 9px 10px 9px 8px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--white);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background 0.18s ease;
  content-visibility: auto;
  contain-intrinsic-size: 74px;
}

.topic-item:hover {
  background: rgba(255, 255, 255, 0.09);
}

.topic-item.active {
  background: rgba(255, 255, 255, 0.17);
}

.topic-item-icons {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  min-height: 50px;
  align-self: stretch;
}

.topic-item-pin {
  position: absolute;
  top: 0;
  left: 50%;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  color: var(--gray);
  opacity: 0.72;
  transform: translateX(-50%) scaleX(-1);
  pointer-events: none;
}

.topic-item-emoji {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 18px;
  line-height: 1;
}

.topic-item-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.topic-item-meta strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-item-meta small {
  overflow: hidden;
  color: var(--gray);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-item-meta small.topic-item-sender {
  color: rgba(255, 255, 255, 0.72);
}

.topic-item .item-unread {
  right: 8px;
  bottom: 9px;
}

.topic-item .item-unread-group {
  right: 8px;
  bottom: 9px;
  max-width: calc(100% - 40px);
}

body.forum-topics-collapsed .list-item.forum-chat-active .item-avatar-wrap .item-unread-avatar {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 20px;
  max-width: 56px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--accent-on-content);
  font-size: 10px;
  line-height: 1;
}

body.forum-topics-collapsed .list-item.forum-chat-active.muted .item-avatar-wrap .item-unread-avatar {
  background: var(--gray);
  color: var(--black);
}

body.forum-topics-collapsed .list-item.forum-chat-active .item-avatar-wrap .item-unread-group-avatar {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 3;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}

body.forum-topics-collapsed .list-item.forum-chat-active .item-avatar-wrap .item-unread-group-avatar .item-unread-avatar {
  position: static;
  flex: 0 0 auto;
}

body.forum-topics-collapsed .list-item.forum-chat-active .item-avatar-wrap .item-unread-ninja-avatar {
  min-width: 20px;
  max-width: 56px;
  height: 20px;
  padding: 0 5px;
  border-width: 2px;
  border-radius: 999px;
  font-size: 10px;
}

body.forum-topics-collapsed .list-item.forum-chat-active > .item-unread,
body.forum-topics-collapsed .list-item.forum-chat-active > .item-unread-group {
  display: none;
}

body.forum-topics-visible .list-item.forum-chat-active .item-avatar-wrap .item-unread-avatar,
body.forum-topics-visible .list-item.forum-chat-active .item-avatar-wrap .item-unread-group-avatar {
  display: none;
}

.sidebar-scroll-top {
  position: absolute;
  right: 12px;
  bottom: 70px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--black);
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 23px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.sidebar-scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.sidebar-scroll-top:hover {
  border-color: var(--gray);
  color: var(--gray);
}

.story-strip {
  display: flex;
  gap: 10px;
  min-width: 0;
  padding: 2px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.story-strip[hidden] {
  display: none;
}

.story-strip::-webkit-scrollbar {
  display: none;
}

.story-button {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 58px;
  min-width: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
}

.story-button small {
  overflow: hidden;
  width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gray);
  font-size: 10px;
  text-align: center;
}

.story-add-button .item-avatar {
  border: 1px solid var(--accent-line);
  color: var(--pink);
}

.app-account-panel {
  display: grid;
  gap: 8px;
  margin: 8px 12px 4px;
  padding: 12px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px var(--glass-border);
  backdrop-filter: blur(24px) saturate(140%);
}

.app-account-title {
  color: var(--white) !important;
  font-size: 13px;
}

.app-premium-offer {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.app-premium-offer strong {
  color: var(--white);
  font-size: 13px;
}

.app-premium-offer span {
  color: var(--gray);
  font-size: 11px;
}

.app-premium-offer button {
  justify-self: start;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.app-account-panel input {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--white) 8%, transparent);
  color: var(--white);
  padding: 0 12px;
  font: inherit;
}

.app-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-account-saved {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.app-account-switcher-section {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.app-account-switcher-label {
  color: var(--gray);
  font-size: 10px;
}

.app-account-switcher-row {
  display: flex;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 0 3px;
  scrollbar-width: none;
}

.app-account-switcher-row::-webkit-scrollbar {
  display: none;
}

.app-account-saved button {
  flex: 0 0 auto;
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border-color: var(--glass-border);
  color: var(--white);
  background: transparent;
}

.app-account-saved button.active {
  border-color: var(--accent-line);
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.app-account-saved button.app-account-unavailable:disabled {
  opacity: 1;
  color: var(--white);
  border-color: var(--glass-border);
  background: transparent;
}

.app-account-saved button.app-account-admin-switch {
  border-color: rgba(255, 196, 77, 0.45);
  cursor: pointer;
}

.app-account-saved button.app-account-admin-balance {
  flex: 0 0 auto;
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border-color: rgba(120, 220, 140, 0.45);
  color: #d8ffd8;
  background: rgba(80, 180, 100, 0.12);
  margin-bottom: 0;
}

.app-account-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.app-account-saved button.app-account-admin-vault {
  flex: 0 0 auto;
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border-color: rgba(120, 180, 255, 0.45);
  color: #d8ecff;
  background: rgba(80, 140, 220, 0.12);
}

.app-account-saved button.app-account-admin-market {
  flex: 0 0 auto;
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border-color: rgba(120, 220, 170, 0.45);
  color: #d4ffe9;
  background: rgba(60, 170, 120, 0.14);
}

.admin-vault-mode-row {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}

.admin-vault-mode-row label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.35;
}

.admin-market-pool-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.admin-market-pool-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
}

.admin-market-pool-list button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
}

.admin-vault-hint {
  margin: 12px 0 0;
  opacity: 0.7;
  font-size: 12px;
  line-height: 1.35;
}

.admin-vault-lead {
  margin: 0 0 10px;
  opacity: 0.85;
  font-size: 13px;
  line-height: 1.35;
}

.admin-vault-file {
  margin-top: 10px;
}

.app-account-saved button.app-account-admin-discount {
  flex: 0 0 auto;
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border-color: rgba(255, 196, 77, 0.45);
  color: #ffe8b0;
  background: rgba(255, 196, 77, 0.12);
  margin-bottom: 6px;
  margin-right: 6px;
}

.app-account-saved button.app-account-admin-api {
  flex: 0 0 auto;
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border-color: rgba(180, 140, 255, 0.45);
  color: #e8dcff;
  background: rgba(140, 100, 220, 0.12);
  margin-bottom: 6px;
  margin-right: 6px;
}

.admin-discount-actions {
  display: grid;
  gap: 8px;
}

.admin-discount-clear {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--gray);
  font: inherit;
  cursor: pointer;
}

.admin-discount-clear:disabled {
  opacity: 0.6;
  cursor: default;
}

.admin-balance-panel {
  width: min(420px, calc(100vw - 24px));
}

.admin-balance-body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.admin-balance-field {
  display: grid;
  gap: 6px;
}

.admin-balance-field span {
  color: var(--gray);
  font-size: 12px;
}

.admin-balance-field input,
.admin-balance-field select {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  padding: 0 12px;
}

.admin-balance-current {
  display: flex;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

.admin-balance-tabs {
  display: flex;
  gap: 8px;
}

.admin-balance-tabs button {
  flex: 1;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--white);
}

.admin-balance-tabs button.active {
  border-color: var(--accent-line);
  background: rgba(255, 255, 255, 0.14);
}

.admin-balance-submit {
  min-height: 42px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, #4f8cff, #6f5bff);
  color: #fff;
  font-weight: 600;
}

.admin-balance-submit:disabled {
  opacity: 0.6;
}

.app-account-saved button.active:disabled {
  opacity: 1;
  border-color: var(--accent-line);
  background: rgba(255, 255, 255, 0.14);
}

.app-account-saved .app-account-add {
  width: 34px;
  padding: 0;
  border-color: var(--accent-line);
  color: var(--white);
  font-size: 20px;
  line-height: 1;
}

.app-account-actions button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pink) 22%, transparent);
  color: var(--white);
  padding: 0 12px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.auth-screen {
  position: relative;
  display: grid;
  gap: 20px;
  min-height: calc(100dvh - 112px);
  align-content: center;
  padding: 344px 0 max(30px, env(safe-area-inset-bottom));
}

.auth-screen-brand {
  position: absolute;
  top: 18px;
  left: 0;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  min-width: 0;
}

.auth-screen-logo {
  width: 266px;
  height: 266px;
  object-fit: contain;
  background: transparent;
  transform: translateY(16%);
}

.auth-screen-brand-title {
  padding-bottom: 0;
  color: var(--white);
  font-size: clamp(42px, 8vw, 64px);
  font-weight: 400;
  line-height: 1;
  text-shadow: 0 10px 30px rgba(225, 80, 169, 0.42);
}

.auth-hero {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.auth-hero h2 {
  white-space: normal;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 1.08;
}

.auth-hero p {
  max-width: 680px;
  color: var(--gray);
  font-size: 14px;
  line-height: 1.7;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.auth-grid-single {
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
}

.auth-card {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 430px;
  padding: 18px;
  border: 0;
  border-radius: 34px;
  background: color-mix(in srgb, var(--glass-bg) 84%, transparent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(28px) saturate(150%);
}

.auth-card.auth-card-plain {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.auth-card.disabled {
  opacity: 0.62;
}

.auth-card header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.auth-card header:not(:has(> span)) {
  grid-template-columns: minmax(0, 1fr);
}

.auth-card header > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pink) 24%, transparent);
  color: var(--pink);
}

.auth-card h3 {
  margin: 0;
  font-weight: 300;
  font-size: 18px;
}

.auth-card p,
.auth-current-account small {
  color: var(--gray);
  font-size: 12px;
}

.auth-card-body {
  display: grid;
  gap: 12px;
}

.auth-card .settings-form,
.auth-card .settings-stack {
  gap: 10px;
}

.auth-card input,
.auth-card select,
.auth-card textarea {
  min-height: 46px;
  border-radius: 23px;
}

.auth-card .attach-wrapper,
.auth-card .attach-button {
  min-height: 46px;
  border-radius: 23px;
}

.auth-card button {
  min-height: 42px;
}

.auth-recovery-field {
  min-height: 64px;
  padding: 12px 14px;
  line-height: 1.35;
  resize: none;
  white-space: normal;
}

.phone-field-wrap {
  position: relative;
  display: block;
}

.phone-field-guide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.22);
  font: inherit;
  font-weight: 300;
  white-space: pre;
  pointer-events: none;
  overflow: hidden;
}

.phone-field-wrap input.phone-field-input {
  position: relative;
  z-index: 1;
  background: transparent;
}

.auth-card .phone-field-guide {
  min-height: 46px;
  border-radius: 23px;
}

.password-eye-wrap {
  position: relative;
  display: block;
}

.password-eye-wrap input {
  width: 100%;
  padding-right: 56px;
}

.password-eye-button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #1c1b21;
  border-radius: 8px;
  background: #1c1b22;
  color: var(--pink);
  outline: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  font-size: 17px;
  transition: color 0.18s ease;
}

.password-eye-button svg {
  display: block;
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.password-eye-button:hover,
.password-eye-button:focus-visible {
  outline: 0 !important;
  box-shadow: none !important;
  border-color: #1c1b21;
  background: #1c1b22;
  transform: translateY(-50%) !important;
}

.password-eye-wrap:has(input:-webkit-autofill) .password-eye-button,
.password-eye-wrap:has(input:-webkit-autofill) .password-eye-button:hover,
.password-eye-wrap:has(input:-webkit-autofill) .password-eye-button:focus-visible {
  border-color: #faffbd;
  background: #faffbd;
}

.password-eye-button.active {
  color: var(--pink);
}

.password-eye-button.tap-animate {
  animation: none !important;
}

.password-eye-wrap:has(.password-eye-button:focus-visible),
.password-eye-wrap:has(.password-eye-button:active) {
  outline: 0 !important;
  box-shadow: none !important;
}

.field-error,
.password-eye-wrap:has(.field-error) input {
  border-color: #ff453a !important;
  box-shadow: 0 0 0 3px rgba(255, 69, 58, 0.14);
}

.field-error-text {
  margin-top: -4px;
  padding: 0 10px;
  color: #ff8a80;
  font-size: 11px;
  line-height: 1.35;
}

.char-counter {
  justify-self: end;
  margin-top: -8px;
  padding: 0 8px;
  color: var(--gray);
  font-size: 11px;
  text-align: right;
}

.auth-current-account {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-support-button {
  width: max-content;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--pink) 18%, transparent);
  color: var(--white);
  cursor: pointer;
  font: inherit;
}

.support-badge-anchor {
  position: relative;
}

.support-admin-badge {
  position: absolute;
  right: -7px;
  bottom: -7px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--black);
  border-radius: 999px;
  background: var(--pink);
  color: var(--accent-on-content);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.support-admin-badge.wide {
  min-width: 22px;
}

.support-admin-badge[hidden] {
  display: none;
}

.account-groups {
  position: sticky;
  top: -6px;
  z-index: 2;
  display: flex;
  gap: 7px;
  padding: 8px 10px;
  overflow-x: auto;
  background: transparent;
  backdrop-filter: blur(18px) saturate(140%);
}

.account-group-add,
.account-group-tab,
.account-group-settings,
.add-account-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.account-group-add,
.account-group-tab.active,
.account-group-settings,
.add-account-button {
  color: var(--pink);
}

.account-group-add {
  color: var(--white);
}

.account-group-tab.active {
  background: transparent;
  color: var(--pink);
}

.account-group-settings {
  width: 44px;
  min-height: 38px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.chat-folder-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  height: 100dvh;
  padding: 8px 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 12, 0.92);
}

.chat-folder-rail[hidden] {
  display: none !important;
}

.chat-folder-rail-settings {
  display: grid;
  place-items: center;
  width: 48px;
  height: 44px;
  margin: 0 auto 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  font-size: 18px;
}

.chat-folder-rail-settings:hover,
.chat-folder-rail-settings:focus-visible {
  color: var(--pink);
  background: rgba(255, 255, 255, 0.06);
}

.chat-folder-rail-list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  padding: 2px 0 8px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.chat-folder-rail-item {
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.chat-folder-rail-square {
  --folder-accent: var(--pink);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 5px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
  word-break: break-word;
  overflow: hidden;
  transition: background 0.15s ease, color 0.15s ease;
}

.chat-folder-rail-item:hover .chat-folder-rail-square,
.chat-folder-rail-item:focus-visible .chat-folder-rail-square {
  background: rgba(255, 255, 255, 0.08);
}

.chat-folder-rail-item.active .chat-folder-rail-square {
  color: var(--folder-accent, var(--pink));
  background: rgba(232, 86, 168, 0.14);
}

.chat-folder-rail-square-add {
  color: var(--pink);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.chat-folder-rail-item-add:hover .chat-folder-rail-square-add,
.chat-folder-rail-item-add:focus-visible .chat-folder-rail-square-add {
  background: rgba(232, 86, 168, 0.1);
}

.chat-folder-icon {
  --folder-accent: var(--pink);
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 44px;
  border-radius: 12px;
  color: var(--gray);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.chat-folder-icon-svg {
  width: 24px;
  height: 24px;
  display: block;
}

.chat-folder-icon:not(.chat-folder-icon-all) {
  color: var(--folder-accent);
}

.chat-folder-icon.active,
.chat-folder-settings-item.active .chat-folder-icon {
  background: rgba(232, 86, 168, 0.16);
  box-shadow: inset 0 0 0 1px rgba(232, 86, 168, 0.35);
}

.chat-folder-settings-item:hover .chat-folder-icon,
.chat-folder-settings-item:focus-visible .chat-folder-icon {
  background: rgba(255, 255, 255, 0.08);
}

.chat-folder-icon-glyph {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-size: 11px;
  line-height: 1;
}

.chat-folder-settings-modal {
  width: min(980px, 96vw);
  max-height: min(90vh, 860px);
}

.chat-folder-settings-panel {
  display: grid;
  grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  height: 100%;
  max-height: calc(min(90vh, 860px) - 68px);
  overflow: hidden;
}

.chat-folder-settings-list {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-folder-settings-items {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 0;
  padding: 8px;
  overflow-y: auto;
}

.chat-folder-settings-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.chat-folder-settings-item .chat-folder-icon {
  width: 36px;
  height: 34px;
  border-radius: 10px;
}

.chat-folder-settings-item .chat-folder-icon-svg {
  width: 18px;
  height: 18px;
}

.chat-folder-settings-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-folder-settings-item.active,
.chat-folder-settings-item:hover,
.chat-folder-settings-item:focus-visible {
  background: rgba(232, 86, 168, 0.12);
}

.chat-folder-settings-add {
  margin: 8px;
  min-height: 40px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: transparent;
  color: var(--pink);
  cursor: pointer;
  font: inherit;
}

.chat-folder-editor {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.chat-folder-editor-scroll {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  max-height: 100%;
  padding: 12px 14px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-folder-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.chat-folder-type-button {
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  line-height: 1.2;
  text-align: left;
}

.chat-folder-type-button:hover,
.chat-folder-type-button:focus-visible {
  border-color: var(--accent-line);
}

.chat-folder-chat-section {
  display: grid;
  gap: 8px;
}

.chat-folder-chat-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-folder-chat-section-head .settings-section-title {
  margin: 0;
}

.chat-folder-chat-count {
  color: var(--gray);
  font-size: 12px;
}

.chat-folder-chat-search {
  margin: 0;
}

.chat-folder-chat-list {
  display: grid;
  gap: 10px;
  min-height: 180px;
  max-height: min(34vh, 340px);
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.chat-folder-chat-row {
  display: grid;
  grid-template-columns: 28px 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--white);
  font-size: 13px;
  cursor: pointer;
}

.chat-folder-chat-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.chat-folder-chat-row input {
  width: 18px;
  min-height: 18px;
  padding: 0;
  justify-self: center;
  accent-color: var(--pink);
}

.item-avatar.chat-folder-chat-avatar {
  width: 46px;
  height: 46px;
  min-width: 46px;
  min-height: 46px;
  font-size: 16px;
}

.chat-folder-chat-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
  align-content: center;
}

.chat-folder-chat-meta strong,
.chat-folder-chat-meta small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-folder-chat-meta strong {
  font-weight: 400;
}

.chat-folder-chat-meta .premium-name {
  display: flex;
  align-items: center;
  min-width: 0;
}

.chat-folder-chat-meta small {
  color: var(--gray);
  font-size: 11px;
  line-height: 1.3;
}

.chat-folder-chat-empty {
  padding: 18px 12px;
  color: var(--gray);
  font-size: 13px;
  text-align: center;
}

.chat-folder-color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-folder-color-swatch {
  width: 28px;
  height: 28px;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
}

.chat-folder-color-swatch.active {
  border-color: var(--white);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45);
}

.chat-folder-invite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

@media (max-width: 900px) {
  body.has-folder-rail .telegram-shell {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .chat-folder-rail {
    display: none !important;
  }

  .chat-folder-settings-panel {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .chat-folder-settings-list {
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .chat-folder-chat-list {
    max-height: min(42vh, 360px);
  }
}

.account-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: stretch;
  width: 100%;
  margin: 2px 0;
  overflow: hidden;
  border-radius: 12px;
  background: transparent;
  transition: background 0.18s ease;
}

.account-list-row[hidden] {
  display: none;
}

.account-list-row .list-item {
  min-width: 0;
  background: transparent;
}

.account-list-row.active {
  background: rgba(255, 255, 255, 0.17);
}

.account-list-row.active .list-item,
.account-list-row.active .account-row-settings,
.account-list-row.active .account-row-drag-handle {
  background: transparent;
}

.account-row-drag-handle {
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 3px;
  align-self: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--gray);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.account-row-drag-handle:active {
  cursor: grabbing;
  background: transparent;
}

.account-row-drag-handle span {
  display: block;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.account-list-row.is-dragging {
  opacity: 0.55;
}

.account-list-row.drag-over-before {
  box-shadow: inset 0 2px 0 var(--pink);
}

.account-list-row.drag-over-after {
  box-shadow: inset 0 -2px 0 var(--pink);
}

.account-row-settings {
  display: grid;
  place-items: center;
  align-self: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  margin-right: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  transition: color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.account-row-settings:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: scale(1.02) rotate(4deg);
}

.add-account-button {
  position: sticky;
  bottom: 4px;
  width: calc(100% - 28px);
  margin: 10px 14px 4px;
  background: rgba(28, 27, 34, 0.94);
}

.list-item {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 74px;
  padding: 9px 14px;
  border: 0;
  background: rgba(0, 0, 0, 0.38);
  color: var(--white);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  content-visibility: auto;
  contain-intrinsic-size: 74px;
}

.list-item-shift-animating {
  z-index: 2;
  will-change: transform;
}

.list-item-promote-pending {
  visibility: hidden;
  pointer-events: none;
}

.list-item-promote-enter {
  will-change: transform, opacity;
}

button.tap-animate {
  animation: press-pop 0.28s cubic-bezier(0.2, 1.4, 0.34, 1);
}

.list-item:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--white);
}

.list-item.active,
.account-list-row.active {
  background: rgba(255, 255, 255, 0.17);
  color: var(--white);
}

.account-list-row .list-item.active {
  background: transparent;
}

.pinned-chats-group {
  position: relative;
  margin: 3px 0 5px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  overflow: visible;
}

.item-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
}

.item-pin {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: var(--gray);
  opacity: 0.72;
  pointer-events: none;
  transform: rotate(30deg);
  transform-origin: center;
}

.pinned-chats-group .list-item .item-pin {
  top: 2px;
  left: 0;
  transform: rotate(30deg);
  transform-origin: center;
}

.pinned-chats-group .list-item {
  background: transparent;
}

.pinned-chats-group .list-item:hover:not(.active) {
  background: rgba(255, 255, 255, 0.045);
}

.pinned-chats-group .list-item.active {
  background: rgba(255, 255, 255, 0.1);
}

.pinned-chats-reorder-panel {
  width: min(420px, calc(100vw - 24px));
  max-height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
}

.pinned-chats-reorder-hint {
  margin: 0 0 12px;
  padding: 0 4px;
  color: var(--gray);
  font-size: 13px;
  line-height: 1.4;
}

.pinned-chats-reorder-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: auto;
  min-height: 0;
  padding-bottom: 4px;
}

.pinned-chats-reorder-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 6px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.pinned-chats-reorder-item:hover {
  background: transparent;
}

.pinned-chats-reorder-item.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.pinned-chats-reorder-avatar,
.pinned-chats-reorder-item .item-avatar {
  width: 44px;
  height: 44px;
}

.pinned-chats-reorder-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 560;
}

.list-item.no-session-access,
.list-item.deleted,
.account-list-row:has(.list-item.no-session-access) {
  background: rgba(255, 0, 0, 0.28);
}

.list-item.no-session-access:hover,
.list-item.no-session-access.active,
.list-item.deleted:hover,
.list-item.deleted.active,
.account-list-row:has(.list-item.no-session-access:hover),
.account-list-row:has(.list-item.no-session-access.active) {
  background: rgba(255, 0, 0, 0.36);
}

.account-list-row:has(.list-item.no-session-access) .list-item {
  background: transparent;
}

.item-avatar,
.avatar {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 50%;
  background: var(--black);
  color: var(--gray);
  font-size: 18px;
  font-weight: 400;
  position: relative;
}

/* Telegram-style letter placeholders: vertical gradient by peer id % 7 */
.item-avatar.avatar-placeholder,
.avatar.avatar-placeholder,
.sender-avatar.avatar-placeholder {
  isolation: isolate;
  background: linear-gradient(180deg, var(--avatar-from, #72d5fd) 0%, var(--avatar-to, #2a9ef1) 100%);
  color: #fff;
  font-weight: 600;
}

.list-item.active .item-avatar.avatar-placeholder,
.avatar.avatar-placeholder {
  color: #fff;
}

.item-avatar.avatar-placeholder.story-ring,
.avatar.avatar-placeholder.story-ring,
.sender-avatar.avatar-placeholder.story-ring {
  background:
    repeating-conic-gradient(
      var(--story-color) 0 calc((360deg / var(--story-count, 1)) - var(--story-gap)),
      transparent calc((360deg / var(--story-count, 1)) - var(--story-gap)) calc(360deg / var(--story-count, 1))
    );
}

.item-avatar.avatar-placeholder.story-single,
.avatar.avatar-placeholder.story-single,
.sender-avatar.avatar-placeholder.story-single {
  background: conic-gradient(var(--story-color) 0 360deg);
}

.item-avatar.avatar-placeholder.story-ring::before,
.avatar.avatar-placeholder.story-ring::before,
.sender-avatar.avatar-placeholder.story-ring::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--avatar-from, #72d5fd) 0%, var(--avatar-to, #2a9ef1) 100%);
  z-index: -1;
  pointer-events: none;
}

.item-avatar.story-ring,
.avatar.story-ring,
.sender-avatar.story-ring {
  --story-color: var(--gray);
  --story-gap: 7deg;
  padding: 3px;
  background:
    repeating-conic-gradient(
      var(--story-color) 0 calc((360deg / var(--story-count, 1)) - var(--story-gap)),
      transparent calc((360deg / var(--story-count, 1)) - var(--story-gap)) calc(360deg / var(--story-count, 1))
    );
}

.item-avatar.story-single,
.avatar.story-single,
.sender-avatar.story-single {
  background: conic-gradient(var(--story-color) 0 360deg);
}

.item-avatar.story-unread,
.avatar.story-unread,
.sender-avatar.story-unread {
  --story-color: #7a7a7a;
}

.story-button .item-avatar.story-unread {
  --story-color: #7a7a7a;
}

.story-button .item-avatar.story-fresh,
.item-avatar.story-fresh,
.avatar.story-fresh,
.sender-avatar.story-fresh {
  --story-color: #a2ff93;
}

.list-item.active .item-avatar:not(.avatar-placeholder),
.avatar:not(.avatar-placeholder) {
  color: var(--gray);
}

.avatar {
  width: 46px;
  height: 46px;
}

.item-avatar img,
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-list > .list-item,
.pinned-chats-group .list-item {
  --chat-avatar-size: 57px;
  grid-template-columns: var(--chat-avatar-size) minmax(0, 1fr);
  min-height: 66px;
  height: 66px;
  padding-block: 0;
  contain-intrinsic-size: 66px;
}

.sidebar-list > .list-item .item-avatar,
.pinned-chats-group .list-item .item-avatar,
.sidebar-list > .list-item .item-avatar-wrap,
.pinned-chats-group .item-avatar-wrap {
  width: var(--chat-avatar-size);
  height: var(--chat-avatar-size);
  justify-self: start;
}

.sidebar-list > .list-item.online .item-avatar::after,
.sidebar-list > .list-item.typing .item-avatar::after,
.pinned-chats-group .list-item.online .item-avatar::after,
.pinned-chats-group .list-item.typing .item-avatar::after {
  right: 1px;
  bottom: 1px;
  width: 12px;
  height: 12px;
}

.list-item.online .item-avatar::after,
.list-item.typing .item-avatar::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--black);
  border-radius: 50%;
  background: #34c759;
}

.list-item.typing .item-avatar::after {
  animation: presence-pulse 1.1s ease-in-out infinite;
}

.item-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding-right: 58px;
}

.item-meta strong,
.item-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 300;
}

.item-meta strong {
  font-size: 15px;
}

.item-meta small {
  color: var(--white);
  font-size: 12px;
}

.item-meta small.item-preview-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.item-folder-badge {
  flex: 0 0 auto;
  max-width: 46%;
  padding: 2px 7px;
  border-radius: 7px;
  background: var(--folder-accent, var(--pink));
  color: var(--folder-on-accent, var(--accent-on-content));
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-preview-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item.active .item-meta small {
  color: var(--gray);
}

.list-item.active .item-meta small .item-preview-text {
  color: var(--gray);
}

.item-unread {
  position: absolute;
  right: 14px;
  bottom: 9px;
  display: grid;
  place-items: center;
  min-width: 24px;
  max-width: 72px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--accent-on-content);
  overflow: hidden;
  font-size: 10px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-unread-group {
  position: absolute;
  right: 14px;
  bottom: 9px;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.item-unread-group .item-unread {
  position: static;
  flex: 0 0 auto;
}

.item-unread-ninja {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  min-width: 24px;
  max-width: 72px;
  height: 22px;
  padding: 0 7px;
  border: 2px solid var(--pink);
  border-radius: 999px;
  background: transparent;
  color: var(--pink);
  overflow: hidden;
  font-size: 10px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-unread-ninja.muted,
.list-item.muted .item-unread-ninja,
.topic-item.muted .item-unread-ninja {
  border-color: var(--gray);
  color: var(--gray);
}

.item-time {
  position: absolute;
  top: 10px;
  right: 14px;
  max-width: 54px;
  overflow: hidden;
  color: var(--gray);
  font-size: 10px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-unread.muted,
.list-item.muted .item-unread {
  background: var(--gray);
  color: var(--black);
}

.empty-list,
.empty-chat {
  padding: 18px 14px;
  color: var(--gray);
  font-size: 13px;
}

.message-list:has(.bot-empty-intro)::before {
  display: none;
}

.empty-chat.bot-empty-intro {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 28px 24px 40px;
  text-align: center;
  color: var(--gray);
}

.bot-empty-intro-media {
  width: min(280px, 72vw);
  max-width: 100%;
}

.bot-empty-intro-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(320px, 42vh);
  object-fit: contain;
  border-radius: 12px;
}

.bot-empty-intro-text {
  max-width: min(360px, 92%);
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: rgba(255, 255, 255, 0.72);
}

.server-error-main {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 24px;
}

.server-error-card {
  display: grid;
  gap: 12px;
  width: min(420px, 100%);
  padding: 18px;
  border: 1px solid rgba(255, 69, 58, 0.38);
  border-radius: 18px;
  background: rgba(255, 69, 58, 0.08);
  color: var(--white);
}

.server-error-card.compact {
  margin: 10px 12px;
  padding: 14px;
}

.server-error-card strong {
  color: #ff8a80;
  font-size: 15px;
}

.server-error-card p {
  color: var(--gray);
  font-size: 13px;
  line-height: 1.45;
}

.server-error-card button {
  justify-self: start;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 138, 128, 0.52);
  border-radius: 999px;
  background: rgba(255, 69, 58, 0.14);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  border-top: 1px solid var(--accent-line);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px) saturate(140%);
}

.bottom-nav button {
  border: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 14px;
  font-weight: 300;
  cursor: pointer;
}

.bottom-nav button + button {
  border-left: 1px solid var(--accent-line);
}

.bottom-nav button.active {
  color: var(--pink);
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 25px;
  line-height: 1;
}

.nav-icon-phone {
  width: 28px;
  height: 28px;
  margin: auto;
  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='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1C10.61 21 3 13.39 3 4c0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%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='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1C10.61 21 3 13.39 3 4c0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.nav-icon-chat {
  position: relative;
  width: 27px;
  height: 19px;
  margin: auto;
  border: 0;
  border-radius: 8px;
  background: currentColor;
}

.nav-icon-chat::before {
  content: "";
  position: absolute;
  left: 5px;
  bottom: -5px;
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 0 0 0 3px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  transform: none;
}

.nav-icon-lines {
  position: relative;
  width: 24px;
  height: 16px;
  margin: auto;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.nav-icon-lines::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  border-top: 2px solid currentColor;
  transform: translateY(-50%);
}

.calls-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 42px;
  margin: 6px 10px 8px;
  padding: 4px;
  border-radius: 999px;
  background: #1c1b22;
  overflow: hidden;
}

.calls-tabs::before {
  content: "";
  position: absolute;
  inset: 4px auto 4px 4px;
  width: calc(50% - 4px);
  border: 1px solid var(--accent-content);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-content) 24%, transparent);
  transform: translateX(calc(var(--calls-tab-index, 0) * 100%));
  transition: transform 220ms ease;
  pointer-events: none;
}

.calls-tabs button {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.calls-tabs button.active {
  background: transparent;
  color: var(--white);
}

.call-list-item.missed .call-item-meta strong {
  color: #ff6b63;
}

.call-list-item {
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 78px;
  cursor: pointer;
}

.call-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  justify-self: start;
}

.call-list-item .item-avatar {
  width: 54px;
  height: 54px;
  min-width: 54px;
  min-height: 54px;
  justify-self: start;
}

.call-list-item .call-item-meta {
  display: grid;
  gap: 3px;
  align-content: center;
  min-width: 0;
  padding-right: 58px;
}

.call-list-item .call-item-meta strong,
.call-list-item .call-item-meta small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-list-item .call-item-meta strong {
  font-size: 15px;
  font-weight: 500;
}

.call-list-item .call-item-meta .premium-name {
  display: flex;
  align-items: center;
  min-width: 0;
}

.call-list-item .call-meta-username,
.call-list-item .call-meta-id {
  color: var(--gray);
  font-size: 12px;
  line-height: 1.3;
}

.call-list-item .call-meta-id {
  font-size: 11px;
  opacity: 0.88;
}

.call-direction-icon {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--black);
  border-radius: 50%;
  background: #1c1b22;
  color: #7dcea0;
}

.call-direction-icon svg {
  width: 14px;
  height: 14px;
  overflow: visible;
}

.call-direction-icon.outgoing {
  color: #7dcea0;
}

.call-direction-icon.incoming {
  color: #7dcea0;
}

.call-direction-icon.missed {
  color: #ff6b63;
}

.call-list-item .item-time {
  right: 42px;
  max-width: 72px;
  white-space: normal;
  line-height: 1.2;
  text-align: right;
}

.call-save-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  overflow: visible;
}

.call-save-button:hover,
.call-save-button:focus-visible {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.call-save-button-unavailable {
  opacity: 0.42;
  color: var(--gray);
}

.call-save-button-unavailable::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 50%;
  border-top: 2px solid currentColor;
  transform: rotate(-38deg);
  pointer-events: none;
}

.call-save-button-unavailable:hover,
.call-save-button-unavailable:focus-visible {
  color: #ff8a84;
  background: rgba(255, 107, 99, 0.08);
}

.workspace {
  position: relative;
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  height: 100dvh;
  min-height: 100vh;
  background: var(--black);
}

.chat-drop-overlay {
  position: absolute;
  inset: 70px 10px 10px;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 2px dashed rgba(255, 255, 255, 0.24);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.58);
  color: var(--white);
  font-size: 15px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.chat-drop-overlay.active {
  opacity: 1;
}

.chat-drop-overlay[hidden] {
  display: none !important;
}

.chat-head {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 0;
  height: 100%;
  padding: 12px 18px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(18px) saturate(140%);
  /* Line via shadow so border-box height stays 70px for the 46px avatar + 12px padding. */
  border-bottom: none;
  box-shadow: inset 0 -1px 0 var(--accent-line);
}

.chat-head > .avatar {
  align-self: center;
  justify-self: center;
  width: 46px;
  height: 46px;
  margin: 0;
  flex-shrink: 0;
}

.chat-head:has(.chat-profile-button:not(:disabled)) {
  cursor: pointer;
}

.chat-head:has(.chat-profile-button:not(:disabled)) .avatar {
  cursor: pointer;
}

.chat-back-button {
  display: none;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 30px;
}

.chat-profile-button {
  display: grid;
  gap: 2px;
  align-content: center;
  align-self: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--white);
  text-align: left;
  cursor: pointer;
}

.chat-profile-button #activeTitle {
  line-height: 1.15;
}

.chat-profile-button #activeSubtitle {
  line-height: 1.2;
}

.chat-profile-button:disabled {
  cursor: default;
}

.chat-my-org-notice {
  display: none !important;
}

.message-row.with-my-org-notice {
  align-items: flex-start;
  gap: 10px;
}

.message-row.with-my-org-notice .message-stack {
  flex: 0 1 auto;
  max-width: min(72%, calc(100% - 150px));
}

.message-my-org-notice {
  flex: 0 1 min(38vw, 320px);
  align-self: center;
  display: grid;
  gap: 4px;
  min-width: 132px;
  max-width: min(38vw, 320px);
  padding: 8px 10px;
  border: 1px solid #ff4d4f;
  border-radius: 10px;
  background: rgba(60, 10, 12, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 77, 79, 0.25) inset;
}

.message-my-org-notice strong {
  color: #ff7a7c;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.message-my-org-notice p {
  margin: 0;
  color: #ffd5d5;
  font-size: 11px;
  line-height: 1.28;
}

@media (max-width: 720px) {
  .message-row.with-my-org-notice {
    flex-wrap: wrap;
  }

  .message-row.with-my-org-notice .message-stack {
    max-width: 100%;
  }

  .message-my-org-notice {
    flex: 1 1 100%;
    max-width: 100%;
    margin-left: 0;
  }
}

.message-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overflow-anchor: none;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  padding: 18px 18px 2px;
  background: var(--black);
}

/* Push short chats to the bottom without creating scrollable space below the last message. */
.message-list::before {
  content: "";
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  pointer-events: none;
}

.message-list * {
  overflow-anchor: none;
}

.messages-older-loader {
  align-self: center;
  padding: 8px 12px 12px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.2;
}

.messages-older-loader.loading {
  opacity: 0.85;
}

.message-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.message-row.local-message-enter .message-stack {
  animation: message-local-enter 220ms cubic-bezier(0.18, 0.82, 0.28, 1) both;
  transform-origin: 100% 100%;
}

@media (prefers-reduced-motion: reduce) {
  .message-row.local-message-enter .message-stack {
    animation: none;
  }
}

.message-row.selection-mode {
  cursor: pointer;
}

.message-row.selected .message {
  box-shadow: 0 0 0 2px rgba(232, 86, 168, 0.45);
}

.message-row.selected .message-system-action {
  box-shadow: 0 0 0 2px rgba(232, 86, 168, 0.45);
}

.message-select-check {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0 6px 6px 0;
  padding: 0;
  accent-color: var(--pink);
  cursor: pointer;
}

.message-row.out.selection-mode {
  justify-content: space-between;
}

.message-row.out.selection-mode .message-select-check {
  order: 0;
}

.message-row.out.selection-mode .message-stack {
  order: 1;
  margin-left: auto;
}

.message-row.in {
  justify-content: flex-start;
}

.message-row.out {
  justify-content: flex-end;
}

.message-list.channel-chat .message-row.out {
  justify-content: flex-start;
}

.message-list.channel-chat .message-row.out.selection-mode {
  justify-content: flex-start;
}

.message-list.channel-chat .message-row.out.selection-mode .message-stack {
  order: unset;
  margin-left: 0;
}

.message-row.system-action-row {
  justify-content: center;
}

.message-row.system-action-row.selection-mode {
  gap: 8px;
}

.message-system-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(520px, 92%);
  padding: 5px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--gray);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}

.message-system-action small {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 11px;
}

.message-row.with-sender .message-stack {
  max-width: min(620px, calc(78% - 40px));
}

.message-stack {
  display: grid;
  gap: 5px;
  width: fit-content;
  max-width: min(620px, 78%);
  overflow: visible;
}

.message-stack:has(.message-buttons) {
  max-width: min(620px, 100%);
}

.message-stack:has(.message-buttons) > .message {
  width: 100%;
}

.message-selection-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.message-selection-toolbar strong {
  color: var(--gray);
  font-size: 12px;
  white-space: nowrap;
}

.message-selection-toolbar button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.message-selection-toolbar button:disabled {
  opacity: 0.45;
  cursor: default;
}

.message-selection-toolbar .selection-forward-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  transform: rotate(-45deg);
}

.sender-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--black);
  color: var(--gray);
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  position: relative;
}

.sender-avatar-spacer {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  pointer-events: none;
}

.sender-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.unread-divider {
  align-self: center;
  margin: 8px 0;
  padding: 5px 12px;
  border: 1px solid var(--gray);
  border-radius: 999px;
  color: var(--gray);
  font-size: 12px;
}

.date-divider {
  border-color: var(--glass-border);
  color: var(--text-muted);
}

.message {
  --nft-preview-width: 180px;
  --message-border-color: var(--accent-line);
  max-width: 100%;
  position: relative;
  padding: 4px 8px;
  border: 1px solid var(--message-border-color);
  border-top-width: 1.5px;
  border-radius: 14px;
  background: transparent;
  color: var(--white);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.32;
  cursor: pointer;
}

.message.nft-link-preview-message {
  width: min(calc(var(--nft-preview-width) + 18px), 100%);
}

.message.media-only.normal,
.message.media-only.deleted,
.message.media-only.edited_new,
.message.media-only.edited_old {
  padding: 0;
  border: 1px solid var(--message-border-color);
  border-top-width: 1.5px;
  background: transparent;
  overflow: hidden;
}

.message.visual-media-only {
  width: fit-content;
  max-width: min(420px, 100%);
}

.message.sticker-message.normal {
  padding: 2px;
  border-color: transparent;
  background: transparent;
  overflow: visible;
}

.message.sticker-message.media-only {
  padding: 2px;
}

.message.media-caption {
  width: fit-content;
  max-width: 100%;
  padding: 0 0 4px;
  overflow: hidden;
}

.reply-marker {
  --reply-marker-gap: 7px;
  display: block;
  width: 100%;
  margin: 0 0 var(--reply-marker-gap);
  padding: 1px 0 1px 8px;
  border: 0;
  border-left: 2px solid var(--gray);
  background: transparent;
  color: var(--gray);
  cursor: pointer;
  font: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message.media-caption .reply-marker {
  width: calc(100% - 16px);
  margin: 8px 8px var(--reply-marker-gap);
}

.message > .reply-marker + * {
  margin-top: 0;
}

.message.media-caption > .reply-marker + .message-text {
  padding-top: 0;
}

.reply-marker:hover {
  color: var(--white);
  border-left-color: var(--accent-line);
}

.message-media {
  display: block;
  width: auto;
  max-width: min(420px, 100%);
  height: auto;
  max-height: 420px;
  border-radius: 10px;
  object-fit: contain;
  cursor: pointer;
  background: transparent;
}

.message-media.loading-media:not(.sticker-media) {
  width: min(420px, 100%);
  height: min(320px, 54vh);
}

.video-note-media,
.message.video-note-message .message-media.video-note-media {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--black);
}

.message.video-note-message .video-note-player {
  --video-note-size: min(240px, 64vw);
  width: var(--video-note-size);
  height: var(--video-note-size);
}

.message.video-note-message .video-note-player.expanded {
  --video-note-size: min(360px, calc(100vw - 48px), calc(100dvh - 190px));
}

.message-stack:has(.video-note-player.expanded) {
  max-width: min(620px, calc(100vw - 24px));
}

.message-row.with-sender .message-stack:has(.video-note-player.expanded) {
  max-width: min(620px, calc(100% - 44px));
}

.message.video-note-message.media-only.normal {
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.message.out.video-note-message,
.message.out.video-note-message.media-only,
.message.out.video-note-message.media-only.normal,
.message.out.video-note-message.visual-media-only {
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.message.out.video-note-message .video-note-time {
  color: var(--white);
}

.message.out.video-note-message.visual-media-only .message-meta {
  color: var(--accent-content);
}

.message.video-note-message .visual-media-frame {
  width: fit-content;
  max-width: 100%;
  border-radius: 0;
  overflow: visible;
}

.message.video-note-message:not(.sticker-message) .visual-media-frame .message-media {
  border-radius: 50%;
}

.album-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  width: min(360px, 100%);
  overflow: hidden;
  border-radius: 10px;
}

.album-media-grid.count-1 {
  grid-template-columns: 1fr;
  width: min(420px, 100%);
}

.album-media-grid.count-2 {
  width: min(340px, 100%);
}

.album-media-grid.count-2.vertical-mixed {
  grid-template-columns: 1fr;
  width: min(300px, 100%);
}

.album-media-grid.count-2.vertical-mixed .album-media-tile:first-child {
  aspect-ratio: 3 / 4;
}

.album-media-grid.count-2.vertical-mixed .album-media-tile:last-child {
  aspect-ratio: 16 / 9;
}

.album-media-grid.count-3 {
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.album-media-grid.count-3 .album-media-tile:first-child {
  grid-row: 1 / 3;
}

.album-media-grid.count-4 {
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.album-media-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.58);
  color: var(--white);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}

.message.visual-media-only .album-media-grid {
  border-radius: 10px;
}

.album-media-tile {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  cursor: pointer;
}

.album-media-tile.selected::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent-content);
  pointer-events: none;
}

.album-media-check {
  position: absolute;
  left: 7px;
  bottom: 7px;
  z-index: 2;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--accent-content);
  cursor: pointer;
}

.album-media-tile .message-media {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  object-fit: cover;
}

.message-media.small-source {
  width: min(260px, 68vw);
  min-width: min(260px, 68vw);
  image-rendering: auto;
}

.sticker-media {
  width: 132px;
  max-width: min(160px, 42vw);
  max-height: 160px;
  min-height: 132px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

.sticker-lottie {
  display: block;
  height: 132px;
}

.sticker-lottie svg {
  display: block;
  width: 100%;
  height: 100%;
}

.message.sticker-message .message-media {
  border-radius: 0;
}

.sticker-fallback {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 1px solid var(--gray);
  border-radius: 18px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.045);
  font-size: 34px;
}

.message.media-caption:not(.sticker-message) .message-media:not(audio) {
  width: 100%;
  max-width: 100%;
  border-radius: 0 0 10px 10px;
  object-fit: contain;
  object-position: center;
}

.message.media-only:not(.sticker-message) .message-media:not(audio) {
  border-radius: 0 0 10px 10px;
}

.visual-media-frame {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  border-radius: 0;
}

.message:not(.sticker-message) .visual-media-frame {
  border-radius: 0 0 10px 10px;
}

.visual-media-frame .message-media {
  max-width: 100%;
  border-radius: 0;
}

.message:not(.sticker-message) .visual-media-frame .message-media {
  border-radius: 0 0 10px 10px;
}

.message.video-note-message {
  --video-note-size: min(240px, 64vw);
  width: fit-content;
  max-width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}

.message.video-note-message.media-caption {
  border-radius: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.message.video-note-message.media-only {
  padding: 0;
}

.message.video-note-message.media-caption .video-note-player {
  margin: 0 auto;
}

.message.video-note-message.media-caption .message-text {
  padding: 4px 8px 0;
}

audio.message-media {
  width: 100%;
  height: 42px;
  min-height: 0;
  max-height: none;
  cursor: default;
}

.voice-message-player.archived .voice-message-play {
  opacity: 0.72;
  cursor: default;
}

.voice-message-player.archived .voice-message-waveform {
  opacity: 0.85;
}

.media-archive-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 120px;
  min-height: 88px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(127, 127, 127, 0.12);
  color: var(--text-secondary, #8e8e93);
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
}

.media-archive-placeholder.self-destruct {
  border: 1px dashed rgba(255, 149, 0, 0.45);
}

.ephemeral-media-block {
  position: relative;
  display: block;
  width: 100%;
  max-width: min(420px, 100%);
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(127, 127, 127, 0.1);
  cursor: pointer;
}

.ephemeral-media-block.self-destruct {
  border: 1px dashed rgba(255, 149, 0, 0.45);
}

.ephemeral-media-block.voice,
.ephemeral-media-block.video-note {
  min-width: 220px;
}

.ephemeral-media-block.video-note {
  width: 168px;
  border-radius: 999px;
}

.message.media-only:not(.sticker-message) .ephemeral-media-block {
  border-radius: 0 0 10px 10px;
}

.message:not(.sticker-message) .visual-media-frame .ephemeral-media-block {
  border-radius: 0 0 10px 10px;
}

.ephemeral-media-overlay-type {
  display: block;
  font-size: 14px;
  color: var(--text-primary, #fff);
}

.ephemeral-media-block .message-media {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 420px;
  border-radius: inherit;
  object-fit: cover;
}

.message.media-only:not(.sticker-message) .ephemeral-media-block .message-media,
.message:not(.sticker-message) .visual-media-frame .ephemeral-media-block .message-media {
  border-radius: 0 0 10px 10px;
}

.ephemeral-media-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 160px;
  padding: 18px 16px;
  text-align: center;
  color: var(--text-secondary, #8e8e93);
}

.ephemeral-media-overlay-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 149, 0, 0.16);
  color: #ff9500;
  font-size: 12px;
  font-weight: 600;
}

.ephemeral-media-with-caption {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
}

.message-row.in .ephemeral-media-with-caption {
  justify-self: flex-start;
  flex-direction: row;
}

.message-row.out .ephemeral-media-with-caption {
  justify-self: flex-end;
  flex-direction: row-reverse;
}

.message-list.channel-chat .message-row.out .ephemeral-media-with-caption {
  justify-self: flex-start;
  flex-direction: row;
}

.ephemeral-media-caption {
  flex: 0 1 132px;
  max-width: 148px;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--glass-border, rgba(255, 255, 255, 0.12)) 80%, transparent);
  border-radius: 10px;
  background: rgba(20, 20, 22, 0.72);
  color: var(--text-secondary, #8e8e93);
  font-size: 11px;
  line-height: 1.35;
}

.ephemeral-media-caption-promo {
  margin: 0;
}

.ephemeral-media-caption-subscribe {
  display: inline-block;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-content, #e856a8);
  font-size: 11px;
  line-height: 1.3;
  cursor: pointer;
}

.album-media-tile .ephemeral-media-block {
  width: 100%;
  height: 100%;
  min-height: 72px;
  border-radius: 10px;
}

.album-media-tile .ephemeral-media-overlay {
  min-height: 72px;
  padding: 10px;
}

.ephemeral-media-info-panel {
  width: min(420px, calc(100vw - 28px));
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: var(--panel-bg, #1c1c1e);
  color: var(--text-primary, #fff);
}

.ephemeral-media-info-panel h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.ephemeral-media-info-text {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
}

.ephemeral-media-info-subscribe {
  margin: 0 0 12px;
}

.ephemeral-media-info-dismiss {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-secondary, #8e8e93);
}

.ephemeral-media-info-open {
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--accent-content, #0a84ff);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.media-archive-placeholder-badge {
  display: block;
  font-size: 12px;
  opacity: 0.88;
}

.album-media-tile .media-archive-placeholder {
  width: 100%;
  height: 100%;
  min-height: 72px;
  border-radius: 10px;
}

.video-note-player-shell.archived {
  cursor: default;
}

.video-note-player-shell.archived .video-note-media-wrap {
  background: rgba(127, 127, 127, 0.14);
}

.voice-message-player {
  display: grid;
  grid-template-columns: 42px minmax(132px, 164px);
  align-items: center;
  gap: 4px;
  width: min(218px, calc(100vw - 90px));
  min-height: 64px;
  padding: 7px 7px 11px;
  border-radius: 14px;
  background: transparent;
}

.voice-message-play {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent-content);
  color: var(--accent-on-content);
  cursor: pointer;
}

.voice-message-play::before {
  content: "▶";
  position: relative;
  z-index: 1;
  display: block;
  margin-left: 2px;
  color: currentColor;
  font-family: "Arial Rounded MT Bold", Arial, sans-serif;
  font-size: 17px;
  line-height: 1;
}

.voice-message-play.playing::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-left: 0;
  border-radius: 0;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 5px 16px no-repeat,
    linear-gradient(currentColor, currentColor) 11px 0 / 5px 16px no-repeat;
}

.voice-message-play.not-loaded::before {
  content: "↓";
  margin-left: 0;
  font-size: 16px;
  font-weight: 900;
  transform: scale(1.15, 0.82);
}

.voice-message-play.loading::before {
  content: "×";
  margin-left: 0;
  font-size: 25px;
  transform: translateY(-1px);
}

.voice-message-load-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  pointer-events: none;
  animation: voice-message-load-spin 900ms linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
}

@keyframes voice-message-load-spin {
  to {
    transform: rotate(1turn);
  }
}

.voice-message-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  grid-template-rows: 25px auto;
  column-gap: 6px;
  align-content: center;
  row-gap: 2px;
  min-width: 0;
  min-height: 42px;
}

.voice-message-waveform {
  display: flex;
  grid-column: 1;
  grid-row: 1;
  align-items: end;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
  height: 25px;
  cursor: pointer;
}

.voice-message-waveform i {
  flex: 1 1 1px;
  min-width: 1px;
  max-width: 3px;
  height: max(3px, calc(var(--voice-level) * 0.68px));
  max-height: 23px;
  border-radius: 999px;
  background: var(--gray);
}

.voice-message-waveform i.played {
  background: var(--accent-content);
}

.voice-message-duration {
  grid-column: 1;
  grid-row: 2;
  min-width: 34px;
  color: var(--accent-content);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.voice-message-transcript {
  display: grid;
  grid-column: 2;
  grid-row: 1 / -1;
  place-items: center;
  align-self: center;
  justify-self: end;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--accent-content);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.voice-message-transcript.active {
  border: 1px solid var(--accent-line);
  color: var(--white);
}

.voice-message-transcript.loading {
  animation: voice-transcript-pulse 900ms ease-in-out infinite alternate;
}

.voice-message-transcript-text {
  margin: -2px 9px 8px 57px;
  padding-top: 7px;
  border-top: 1px solid color-mix(in srgb, var(--accent-line) 40%, transparent);
  color: var(--white);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

@keyframes voice-transcript-pulse {
  to {
    opacity: 0.42;
  }
}

.voice-message-audio {
  display: none;
}

.message:has(.voice-message-player) {
  padding: 0;
  border-color: var(--message-border-color);
  border-radius: 14px;
  background: transparent;
}

.message-stack:has(audio.message-media) {
  width: min(340px, 78%);
}

.message:has(audio.message-media) {
  width: 100%;
}

.message-link-preview {
  display: block;
  width: min(180px, 100%);
  margin: 6px 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--gray);
  border-radius: 8px;
  background: var(--black);
  color: var(--white);
  text-align: left;
  text-decoration: none;
}

.message-link-preview img {
  display: block;
  width: 100%;
  max-height: 110px;
  object-fit: cover;
}

.message-link-preview span {
  display: block;
  padding: 6px 8px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-link-preview.message-link-preview-nft {
  --nft-preview-inset: 8px;
  width: min(var(--nft-preview-width), 100%);
  margin: 6px 0 0;
  padding: var(--nft-preview-inset) var(--nft-preview-inset) 0;
  border: 0;
  background: transparent;
}

.message-link-preview.message-link-preview-nft img {
  width: 100%;
  max-height: none;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
}

.message-link-preview.message-link-preview-nft span {
  padding: var(--nft-preview-inset);
}

.telegram-link-preview-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
  width: min(360px, 100%);
  margin: 7px 0 0;
  padding: 9px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--pink) 8%, var(--black));
  color: var(--white);
  cursor: pointer;
  font: inherit;
  text-align: left;
  white-space: normal;
}

.telegram-link-preview-card:hover {
  background: color-mix(in srgb, var(--pink) 14%, var(--black));
}

.telegram-link-preview-card.loading,
.telegram-link-preview-card.error {
  color: var(--gray);
}

.telegram-link-preview-details {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.telegram-link-preview-details strong,
.telegram-link-preview-details small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.telegram-link-preview-details strong {
  color: var(--white);
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
}

.telegram-link-preview-details small {
  color: var(--gray);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.telegram-link-preview-details .telegram-link-preview-about {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.telegram-link-preview-avatar {
  width: 58px;
  height: 58px;
  justify-self: end;
  font-size: 20px;
}

.message.media-caption audio.message-media,
.message.media-only audio.message-media {
  width: min(320px, 100%);
}

.file-message {
  display: block;
  max-width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--gray);
  border-radius: 8px;
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-text {
  margin-top: 0;
  padding-right: 46px;
}

.message-text a {
  color: var(--pink);
  text-decoration: underline;
}

.premium-emoji {
  display: inline-grid;
  place-items: center;
  min-width: 1.1em;
  color: var(--white);
  text-shadow: 0 0 8px var(--pink);
  vertical-align: -0.08em;
}

.premium-emoji-inline,
.premium-emoji-status {
  width: 1.25em;
  height: 1.25em;
  min-width: 1.25em;
  line-height: 1;
  text-shadow: none;
  overflow: hidden;
  vertical-align: -0.2em;
}

.premium-emoji-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.premium-emoji-lottie {
  display: inline-grid;
  place-items: center;
}

.premium-emoji-lottie svg {
  display: block;
  width: 100%;
  height: 100%;
}

.premium-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  vertical-align: baseline;
}

.premium-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.premium-name-badge {
  flex: 0 0 auto;
  font-size: 0.92em;
  line-height: 1;
  width: 1.15em;
  height: 1.15em;
  min-width: 1.15em;
}

.voulgram-name-badge {
  width: 14px;
  height: 14px;
  min-width: 14px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.message-text:first-child {
  margin-top: 0;
}

.message.media-caption .message-text {
  width: 100%;
  padding: 4px 6px 0;
  line-height: 1.24;
}

.message-meta {
  float: right;
  margin: 3px 0 0 8px;
  color: var(--gray);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.message.out .message-meta {
  color: var(--accent-content);
}

.message.normal:not(.media-caption):not(.media-only):not(.visual-media-only) .message-meta {
  position: absolute;
  right: 8px;
  bottom: 4px;
  float: none;
  margin: 0;
}

.message-read-icon.read {
  position: relative;
  display: inline-block;
  width: calc(1ch + 4px);
  height: 1em;
  color: inherit;
  vertical-align: baseline;
}

.message-read-icon.read::before,
.message-read-icon.read::after {
  content: "✓";
  position: absolute;
  top: 0;
  left: 0;
  line-height: inherit;
}

.message-read-icon.read::after {
  left: 4px;
}

.message-send-spinner {
  display: inline-block;
  width: 9px;
  height: 9px;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 720ms linear infinite;
  vertical-align: -1px;
}

.message-send-cancel {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin: -3px 0 -3px 1px;
  padding: 0;
  border: 1px solid color-mix(in srgb, currentColor 42%, transparent);
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  vertical-align: -3px;
}

.message-send-cancel:hover {
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.message-send-failed {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin: -2px 0 -2px 1px;
  border-radius: 50%;
  background: #e53935;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  vertical-align: -2px;
}

.message.out.failed-send {
  cursor: pointer;
}

.message.media-caption .message-meta {
  padding-right: 8px;
}

.message.visual-media-only .message-meta {
  position: absolute;
  right: 8px;
  bottom: 7px;
  padding: 3px 5px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--white);
}

.message.channel-post.has-comments {
  padding-bottom: 0;
}

.message.channel-post.has-comments .message-comments-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: calc(100% + 16px);
  margin: 6px -8px 0;
  padding: 8px 10px;
  border: 0;
  border-top: 1px solid var(--accent-line);
  border-radius: 0 0 13px 13px;
  background: transparent;
  color: var(--gray);
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
  clear: both;
  text-align: left;
}

.message.channel-post.has-comments .message-comments-label {
  min-width: 0;
}

.message.channel-post.has-comments .message-comments-arrow {
  flex: 0 0 auto;
  color: var(--gray);
  font-size: 20px;
  line-height: 1;
}

.message.channel-post.has-comments.media-only,
.message.channel-post.has-comments.media-caption {
  overflow: hidden;
}

.message.channel-post.has-comments.visual-media-only .message-comments-bar {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.message.channel-post.has-comments.visual-media-only .message-meta {
  bottom: auto;
}

.message.invoice-message {
  min-width: 220px;
  max-width: min(360px, 100%);
}

.message-invoice-card {
  display: grid;
  gap: 4px;
}

.message-invoice-title {
  color: var(--accent-content);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.message-invoice-description {
  color: var(--white);
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.message.invoice-message .message-meta {
  margin-top: 2px;
}

.message-buttons {
  display: grid;
  justify-self: stretch;
  gap: 5px;
  clear: both;
  width: 100%;
  margin-top: 0;
}

.message-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 100%;
  margin-top: -3px;
  clear: both;
  position: relative;
  z-index: 1;
}

.reaction-pill {
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--gray);
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.reaction-pill.mine {
  background: var(--pink);
  color: var(--accent-on-content);
}

.reaction-picker {
  display: grid;
  grid-template-columns: repeat(8, 34px);
  gap: 4px;
  max-width: min(310px, calc(100vw - 20px));
  padding: 4px;
}

.reaction-picker-menu {
  min-width: 0;
  padding: 8px;
}

.reaction-picker-menu-full {
  width: min(320px, calc(100vw - 20px));
  padding: 8px;
}

.reaction-picker-full {
  display: grid;
  gap: 8px;
  width: 100%;
}

.reaction-picker-search {
  width: 100%;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--gray);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font: inherit;
  font-size: 14px;
}

.reaction-picker-search::placeholder {
  color: var(--gray);
}

.reaction-picker-search:focus {
  outline: none;
  border-color: var(--pink);
}

.reaction-picker-scroll {
  max-height: min(340px, calc(100vh - 120px));
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-color: var(--pink) rgba(255, 255, 255, 0.08);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.reaction-picker-scroll::-webkit-scrollbar {
  width: 8px;
}

.reaction-picker-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.reaction-picker-scroll::-webkit-scrollbar-thumb {
  background: var(--pink);
  border-radius: 999px;
}

.reaction-picker-all {
  max-width: none;
  width: 100%;
  grid-template-columns: repeat(auto-fill, minmax(34px, 34px));
  justify-content: start;
}

.reaction-picker-empty {
  grid-column: 1 / -1;
  padding: 16px 8px;
  color: var(--gray);
  font-size: 13px;
  text-align: center;
}

.reaction-picker button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  font-size: 20px;
}

.pinned-message {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 10px;
  justify-self: stretch;
  min-height: 52px;
  padding: 9px 16px;
  border: 0;
  border-bottom: 1px solid var(--accent-line);
  border-right: 3px solid var(--pink);
  background: rgba(0, 0, 0, 0.9);
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  text-align: right;
  backdrop-filter: blur(16px);
}

.pinned-message-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pinned-message-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--pink);
  transform: rotate(30deg);
  transform-origin: center;
}

.message-button-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(max-content, 1fr);
  gap: 5px;
}

.message-buttons.capped .message-button-row {
  grid-auto-columns: minmax(0, 1fr);
}

.message-button-row button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #170f0f;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-button-row button.colored {
  border-color: #170f0f;
  background: color-mix(in srgb, var(--message-button-color) 16%, var(--black));
  color: var(--message-button-text-color, var(--message-button-color));
}

.message-button-row button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.message-button-row button.loading {
  filter: saturate(0.7);
}

.message.in {
  justify-self: flex-start;
}

.message.out {
  justify-self: flex-end;
}

.message-list.channel-chat .message.out {
  justify-self: flex-start;
}

.message.deleted {
  --message-border-color: #ff3b30;
  border-color: var(--message-border-color);
  box-shadow: 0 0 0 1px rgba(255, 59, 48, 0.3);
}

.message.edited_old {
  --message-border-color: #ff9500;
  border-color: var(--message-border-color);
}

.message.edited_new {
  --message-border-color: #34c759;
  border-color: var(--message-border-color);
}

.message.highlight {
  box-shadow: 0 0 0 2px var(--white);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 6px;
  align-items: end;
  padding: 0 14px 8px;
  border-top: 0;
  background: rgba(0, 0, 0, 0.86);
}

.chat-form:has(.mini-app-button:not([hidden])) {
  grid-template-columns: 48px minmax(0, 1fr) 48px;
}

.chat-form .compose-state,
.chat-form .attachment-preview {
  grid-column: 1 / -1;
}

.chat-form textarea {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
  min-height: 48px;
  max-height: 150px;
  padding-right: 104px;
  border-radius: 24px;
  line-height: 1.35;
  box-sizing: border-box;
  field-sizing: fixed;
  vertical-align: bottom;
}

.chat-form .gift-panel-button {
  grid-column: 1;
  grid-row: 2;
  z-index: 2;
  justify-self: end;
  align-self: end;
  margin-right: 54px;
  margin-bottom: 0;
}

.chat-form .chat-attach-wrapper {
  grid-column: 1;
  grid-row: 2;
  z-index: 2;
  justify-self: end;
  align-self: end;
  margin-right: 2px;
}

.chat-form > button[type="submit"],
.chat-form > #sendButton {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  position: relative;
  z-index: 7;
  pointer-events: auto;
}

.chat-form > #sendButton[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.chat-form:has(> #sendButton:not([hidden])) > .media-record-control {
  display: none !important;
  pointer-events: none !important;
}

.chat-form .media-record-control {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  align-self: end;
  z-index: 5;
}

.chat-form:has(.mini-app-button:not([hidden])) .media-record-control {
  grid-column: 3;
}

.chat-form .voice-record-button {
  grid-column: 2;
  grid-row: 2;
}

.chat-form:has(.mini-app-button:not([hidden])) .mini-app-button {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
}

.chat-form:has(.mini-app-button:not([hidden])) textarea {
  grid-column: 2;
}

.chat-form:has(.mini-app-button:not([hidden])) .chat-attach-wrapper {
  grid-column: 2;
}

.chat-form:has(.mini-app-button:not([hidden])) .gift-panel-button {
  grid-column: 2;
}

.chat-form:has(.mini-app-button:not([hidden])) > button[type="submit"],
.chat-form:has(.mini-app-button:not([hidden])) > #sendButton {
  grid-column: 3;
}

.chat-form:has(.mini-app-button:not([hidden])) .media-record-control {
  grid-column: 3;
}

.chat-form:has(.mini-app-button:not([hidden])) .voice-record-button {
  grid-column: 3;
}

.chat-form .blocked-unblock {
  grid-column: 1 / -1;
}

.mini-app-button {
  position: relative;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
  line-height: 1;
}

.mini-app-button::before,
.mini-app-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  transform: translate(-50%, -50%);
}

.mini-app-button.mini-app-button-link::before {
  width: 17px;
  height: 17px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: translate(-48%, -52%);
}

.mini-app-button.mini-app-button-link::after {
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-52%, -45%) rotate(-45deg);
  transform-origin: center;
}

.mini-app-button.mini-app-button-webapp::before {
  width: 23px;
  height: 19px;
  border: 2px solid currentColor;
  border-top-width: 6px;
  border-radius: 4px;
  transform: translate(-50%, -50%);
}

.mini-app-button[hidden] {
  display: none;
}

.chat-form.blocked {
  grid-template-columns: 1fr;
}

.chat-form.readonly-channel {
  grid-template-columns: 1fr;
}

.chat-form.blocked textarea,
.chat-form.blocked .attachment-preview,
.chat-form.blocked .attach-wrapper,
.chat-form.blocked .gift-panel-button,
.chat-form.blocked .media-record-control,
.chat-form.blocked .voice-record-button,
.chat-form.blocked .mini-app-button,
.chat-form.blocked > button[type="submit"],
.chat-form.blocked > #sendButton,
.chat-form.readonly-channel textarea,
.chat-form.readonly-channel .attachment-preview,
.chat-form.readonly-channel .attach-wrapper,
.chat-form.readonly-channel .gift-panel-button,
.chat-form.readonly-channel .media-record-control,
.chat-form.readonly-channel .voice-record-button,
.chat-form.readonly-channel .mini-app-button,
.chat-form.readonly-channel > button[type="submit"],
.chat-form.readonly-channel > #sendButton {
  display: none;
}

.readonly-channel-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.readonly-channel-actions[hidden] {
  display: none;
}

.channel-subscribe-button,
.readonly-notify-button {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-content);
  transform: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}

.channel-subscribe-button[hidden],
.readonly-notify-button[hidden] {
  display: none;
}

.blocked-unblock {
  width: 100%;
  transform: none;
}

.readonly-notify-button {
  flex: 0 1 auto;
  max-width: 38%;
  border-color: var(--gray);
  color: var(--gray);
}

.readonly-notify-button.readonly-notify-button-alone {
  flex: 1 1 auto;
  max-width: none;
  width: 100%;
}

@media (max-width: 520px) {
  .readonly-channel-actions {
    flex-wrap: wrap;
  }

  .channel-subscribe-button,
  .readonly-notify-button {
    flex: 1 1 calc(50% - 4px);
    max-width: none;
  }

  .readonly-notify-button {
    flex-basis: 100%;
  }
}

.compose-state {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--gray);
  border-radius: 8px;
  color: var(--gray);
  font-size: 12px;
}

.compose-state[hidden] {
  display: none;
}

.compose-state span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 8px 10px;
  border: 1px solid var(--gray);
  border-radius: 8px;
  background: var(--black);
}

.attachment-preview[hidden] {
  display: none;
}

.attachment-preview-list {
  display: flex;
  gap: 6px;
  max-width: 180px;
  overflow-x: auto;
  scrollbar-width: none;
}

.attachment-preview-list::-webkit-scrollbar {
  display: none;
}

.attachment-thumb,
.attachment-file-icon {
  flex: 0 0 54px;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--gray);
  border-radius: 8px;
  color: var(--gray);
  font-size: 11px;
  overflow: hidden;
}

.attachment-thumb img,
.attachment-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.attachment-meta strong,
.attachment-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 300;
}

.attachment-meta small {
  color: var(--gray);
  font-size: 12px;
}

.attachment-remove {
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
}

button,
input,
select,
textarea {
  border-radius: 18px;
  font: inherit;
  font-weight: 300;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--accent-line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--white);
  outline: none;
}

textarea {
  width: 100%;
  min-height: 48px;
  max-height: 190px;
  resize: none;
  overflow-y: auto;
  padding: 12px 14px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--white);
  outline: none;
}

#chatInput,
.chat-form textarea#chatInput {
  min-height: 48px;
  max-height: 150px;
  overflow-y: hidden;
  border-radius: 24px;
  line-height: 1.35;
  box-sizing: border-box;
  transition: height 0.12s ease;
}

#chatInput.is-expanded,
.chat-form textarea#chatInput.is-expanded {
  /* Keep the same corner radius as the single-line pill; taller = rounded rectangle. */
  border-radius: 24px;
}

input:focus,
textarea:focus {
  border-color: var(--gray);
}

.chat-form button,
.attach-button {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--pink);
  font: inherit;
  font-size: 13px;
  font-weight: 300;
  cursor: pointer;
}

.chat-form > button[type="submit"],
.chat-form > #sendButton,
.media-record-control,
.voice-record-button,
.chat-attach-wrapper,
.chat-attach-wrapper .attach-button {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  padding: 0;
}

.chat-form > button[type="submit"],
.chat-form > #sendButton {
  font-size: 22px;
  line-height: 1;
}

.media-record-control {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 0;
  overflow: visible;
  align-self: end;
}

.media-record-control[hidden] {
  display: none !important;
}

.media-record-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 48px;
  height: 48px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--accent-line);
  box-shadow: none;
  transition: height 0.18s ease;
  z-index: 6;
}

.media-record-control:hover .media-record-panel {
  border-color: var(--gray);
}

.media-record-control.recording .media-record-panel {
  height: 144px;
  background: rgba(0, 0, 0, 0.86);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.media-record-control:not(.recording) .media-record-pause-btn,
.media-record-control:not(.recording) .media-record-stop-btn {
  display: none;
}

.media-record-panel-btn {
  flex: 1 1 48px;
  width: 48px;
  min-height: 48px;
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  place-content: center;
}

.media-record-panel-btn + .media-record-panel-btn {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.media-record-pause-btn::before,
.media-record-stop-btn::before,
.video-circle-flip-btn::before,
.video-circle-torch-btn::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
}

.media-record-pause-btn::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 5h4v14H6zm8 0h4v14h-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='M6 5h4v14H6zm8 0h4v14h-4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.media-record-control.paused .media-record-pause-btn::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 5v14l11-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='M8 5v14l11-7z'/%3E%3C/svg%3E");
}

.media-record-stop-btn::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='6' width='12' height='12' rx='1'/%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%3Crect x='6' y='6' width='12' height='12' rx='1'/%3E%3C/svg%3E") center / contain no-repeat;
  color: #ff3b30;
}

.voice-record-button {
  font-size: 0;
  line-height: 0;
  touch-action: none;
  user-select: none;
  place-items: center;
  place-content: center;
}

.voice-record-icon {
  grid-area: 1 / 1;
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
}

.voice-record-icon-mic {
  display: block;
  -webkit-mask: 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 1 0-6 0v6a3 3 0 0 0 3 3zm5-3a1 1 0 0 0-1 1 5 5 0 0 1-10 0 1 1 0 1 0-2 0 7 7 0 0 0 6 6.92V20a1 1 0 1 0 2 0v-1.08A7 7 0 0 0 19 12a1 1 0 0 0-1-1z'/%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 14a3 3 0 0 0 3-3V5a3 3 0 1 0-6 0v6a3 3 0 0 0 3 3zm5-3a1 1 0 0 0-1 1 5 5 0 0 1-10 0 1 1 0 1 0-2 0 7 7 0 0 0 6 6.92V20a1 1 0 1 0 2 0v-1.08A7 7 0 0 0 19 12a1 1 0 0 0-1-1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.voice-record-icon-video {
  display: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 3a7 7 0 1 1 0 14 7 7 0 0 1 0-14zm0 2.2a4.8 4.8 0 1 0 0 9.6 4.8 4.8 0 0 0 0-9.6z'/%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 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 3a7 7 0 1 1 0 14 7 7 0 0 1 0-14zm0 2.2a4.8 4.8 0 1 0 0 9.6 4.8 4.8 0 0 0 0-9.6z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.media-record-control.mode-video .voice-record-icon-mic {
  display: none;
}

.media-record-control.mode-video .voice-record-icon-video {
  display: block;
}

.voice-record-button.recording {
  border-color: #ff3b30;
  color: #ff3b30;
  animation: voice-record-pulse 1s ease-in-out infinite;
}

@keyframes voice-record-pulse {
  50% {
    opacity: 0.55;
  }
}

.chat-form > button[type="submit"],
.chat-form > #sendButton {
  transform: rotate(-45deg);
}

.attach-wrapper {
  position: relative;
  min-height: 48px;
}

.chat-attach-wrapper {
  overflow: hidden;
}

.attach-wrapper .attach-button {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.chat-attach-wrapper .attach-button {
  font-size: 24px;
  line-height: 1;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.attach-wrapper input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 48px;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.chat-form button:hover,
.attach-button:hover,
.attach-wrapper:hover .attach-button {
  border-color: var(--gray);
  color: var(--gray);
}

.chat-form .compose-state button {
  width: 26px;
  height: 26px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 16px;
}

.scroll-bottom {
  position: absolute;
  right: 22px;
  bottom: 82px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--black);
  color: var(--pink);
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
}

.scroll-bottom.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-bottom:hover {
  border-color: var(--gray);
  color: var(--gray);
}

.channel-message-button {
  position: absolute;
  left: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--black);
  color: var(--pink);
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
  z-index: 3;
}

.channel-message-button[hidden] {
  display: none !important;
}

.channel-message-button::before {
  content: "";
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H5.2L4 17.2V4h16z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H5.2L4 17.2V4h16z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.channel-message-button.channel-posts-button::before {
  width: 20px;
  height: 20px;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14zm-7-2 5-5-1.4-1.4L12 14.2 8.4 10.6 7 12z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14zm-7-2 5-5-1.4-1.4L12 14.2 8.4 10.6 7 12z'/%3E%3C/svg%3E");
}

.channel-message-button:hover {
  border-color: var(--gray);
  color: var(--gray);
}

.workspace:has(.channel-message-button:not([hidden])) .chat-form {
  padding-left: 62px;
}

.error {
  color: var(--pink);
}

.message-menu {
  position: fixed;
  z-index: 60;
  display: grid;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(24px) saturate(145%);
}

.message-menu.above-floating-panels {
  z-index: 100050;
}

.message-menu[hidden] {
  display: none;
}

.message-menu button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  text-align: left;
  cursor: pointer;
}

.message-menu button:hover {
  color: var(--pink);
}

.message-menu button:disabled {
  color: var(--gray);
  cursor: default;
  opacity: 0.55;
}

.message-menu button:disabled:hover {
  color: var(--gray);
}

.search-popup {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: start center;
  padding: 96px 18px 18px;
  background: rgba(0, 0, 0, 0.54);
  backdrop-filter: blur(18px) saturate(145%);
}

.search-popup[hidden] {
  display: none;
}

.search-popup-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(520px, 100%);
  max-height: min(520px, calc(100dvh - 130px));
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(26px) saturate(145%);
  overflow: hidden;
}

.search-popup-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--accent-line);
}

.search-popup-head button {
  width: 38px;
  height: 38px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 20px;
}

.legal-consent {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
}

.legal-consent-panel {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid rgba(232, 86, 168, 0.34);
  border-radius: 18px;
  background: rgba(20, 20, 24, 0.74);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.74);
}

.legal-consent-panel p {
  color: var(--gray);
  line-height: 1.55;
}

.legal-links {
  display: grid;
  gap: 8px;
}

.legal-links a {
  color: var(--pink);
}

.legal-consent-panel button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(232, 86, 168, 0.86);
  color: var(--white);
  cursor: pointer;
  font: inherit;
}

.search-popup-list {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 0;
  padding: 8px 0;
  overflow-y: auto;
}

.search-popup-controls {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--glass-border);
}

.search-popup-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.search-popup-modes[hidden] {
  display: none;
}

.search-popup-modes button {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
}

.search-popup-modes button.active {
  background: rgba(232, 86, 168, 0.22);
  color: var(--pink);
}

.search-popup-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 70px;
  padding: 9px 14px;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.search-popup-item:hover {
  color: var(--gray);
}

.search-popup-section-title {
  padding: 8px 12px 5px;
  color: var(--gray);
  font-size: 11px;
  text-transform: uppercase;
}

.recent-search-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 4px 10px;
}

.recent-search-chat {
  grid-column: 1 / -1;
  grid-row: 1 / 3;
  align-items: start;
  min-height: 50px;
  padding: 0 4px;
}

.recent-search-chat .search-popup-meta {
  align-self: start;
  gap: 2px;
  padding-top: 1px;
}

.recent-search-chat .search-popup-meta strong,
.recent-search-chat .search-popup-meta small {
  line-height: 1.05;
}

.recent-search-chat .search-popup-meta small {
  font-size: 11px;
}

.recent-search-query {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-column: 2;
  grid-row: 2;
  align-items: center;
  gap: 8px;
  z-index: 1;
  width: 100%;
  min-height: 22px;
  padding: 0 10px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.recent-search-item:not(:has(.recent-search-chat)) .recent-search-query {
  grid-column: 1 / -1;
}

.recent-search-query:hover {
  background: rgba(255, 255, 255, 0.08);
}

.recent-search-query-icon {
  display: grid;
  place-items: center;
  color: var(--pink);
  font-size: 13px;
  line-height: 1;
}

.recent-search-query-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--pink);
  font-size: 11px;
  font-weight: 500;
}

.recent-search-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--accent-content);
  font-size: 20px;
}

.search-popup-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.search-popup-meta strong,
.search-popup-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 300;
}

.search-popup-meta small {
  color: var(--gray);
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  /* Above sidebar VOUL chrome (head/menu) and default message-menu (60). */
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(22px) saturate(150%);
}

.modal[hidden] {
  display: none;
}

#profileModal.profile-modal-floating {
  z-index: 80;
}

.media-viewer-modal {
  z-index: 120;
  padding: 0;
  background: var(--black);
  /* Avoid backdrop-filter containing-block quirks that break fixed controls. */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.media-viewer-controls {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.media-viewer-modal .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 51;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  color: var(--white);
  pointer-events: auto;
  cursor: pointer;
}

.media-viewer-modal .modal-close.tap-animate,
.media-viewer-modal .modal-close:active {
  animation: none !important;
  transform: none !important;
}

.modal-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(760px, 100%);
  min-height: 0;
  max-height: min(820px, 92vh);
  border: 1px solid var(--glass-border);
  border-radius: 28px;
  background: var(--glass-bg);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(28px) saturate(145%);
  overflow: hidden;
}

#sessionSettingsModal .modal-panel {
  width: min(760px, 100%);
}

.modal-head {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  padding: 16px 58px;
  border-bottom: 1px solid var(--accent-line);
}

.profile-photo-head {
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  padding-top: 46px;
}

#profilePrevPhoto {
  grid-column: 1;
}

#profilePhoto {
  grid-column: 2;
  cursor: zoom-in;
}

#profileNextPhoto {
  grid-column: 3;
}

.modal-head button,
.modal-close {
  min-height: 38px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  padding: 0;
}

.profile-photo {
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(250px, 46vw);
  height: min(250px, 46vw);
  border: 0;
  border-radius: 12px;
  color: var(--gray);
  font-size: 42px;
  overflow: hidden;
  cursor: pointer;
}

.profile-photo-counter {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
  min-width: 42px;
  padding: 4px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--white);
  font-size: 12px;
  text-align: center;
  pointer-events: none;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.danger-action {
  border-color: #ff3b30;
  color: #ff3b30;
}

.media-viewer-modal.story-viewer-mode .media-viewer-content {
  padding: 0;
  overflow: hidden;
}

.story-viewer {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  background: var(--black);
}

.story-viewer-progress {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  gap: 4px;
}

.story-viewer-progress-segment {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.story-viewer-progress-segment.done,
.story-viewer-progress-segment.active {
  background: rgba(255, 255, 255, 0.95);
}

.story-viewer-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 28px 16px 12px;
}

.story-viewer-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.story-viewer-archive-button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: var(--white);
  font-size: 16px;
}

.story-viewer-archive-button:hover {
  color: var(--pink);
  border-color: rgba(232, 79, 174, 0.45);
}

.story-button.story-archived {
  opacity: 0.72;
}

.story-button.story-archived .item-avatar {
  position: relative;
}

.story-button.story-archived .item-avatar::after {
  content: "▱";
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  color: var(--white);
  font-size: 9px;
  line-height: 1;
}

.story-viewer-author-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 16px;
}

.story-viewer-author-avatar img {
  border-radius: 50%;
}

.story-viewer-author-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.story-viewer-author-text strong {
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-viewer-author-text small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-viewer-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.story-viewer-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 34%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.story-viewer-zone:disabled {
  cursor: default;
}

.story-viewer-zone-prev {
  left: 0;
}

.story-viewer-zone-next {
  right: 0;
}

.story-viewer-media-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0 12px;
}

.story-viewer-media {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: calc(100dvh - 170px);
  object-fit: contain;
}

.story-viewer-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 100%);
  color: var(--white);
  font-size: 15px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  pointer-events: none;
}

.story-viewer-avatar {
  display: grid;
  place-items: center;
  width: min(280px, 62vw);
  height: min(280px, 62vw);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gray);
  font-size: 68px;
  overflow: hidden;
}

.story-viewer-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 28px;
  object-fit: cover;
}

.story-viewer-footer {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px 14px calc(14px + env(safe-area-inset-bottom, 0px));
}

.story-viewer-reply-form {
  display: grid;
}

.story-viewer-reply-input {
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font: inherit;
  font-size: 15px;
}

.story-viewer-reply-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.story-viewer-reply-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.story-viewer-reaction-button {
  display: grid;
  place-items: center;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.story-viewer-reaction-button:active {
  transform: scale(0.96);
}

.media-viewer-modal.story-viewer-mode .modal-close {
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 10px;
  z-index: 51;
}

.profile-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.profile-title-row h2 {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
}

.profile-menu-button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
}

.profile-menu-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.profile-body {
  display: grid;
  gap: 14px;
  align-content: start;
  grid-auto-rows: max-content;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  max-width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

.profile-fields {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  font-size: 13px;
}

.profile-fields dt {
  color: var(--gray);
}

.profile-fields dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.profile-fields a,
.profile-body a,
.profile-tab-content a {
  color: var(--pink);
}

.profile-personal-channel {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 9px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--white);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.profile-tabs {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 4px;
  gap: 2px;
  border: 0;
  border-radius: 999px;
  background: #1c1b22;
  overflow: hidden;
}

.profile-tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(
    (100% - 8px - (var(--profile-tab-count, 4) - 1) * 2px)
    / var(--profile-tab-count, 4)
  );
  border: 1px solid var(--accent-content);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-content) 24%, transparent);
  transform: translateX(calc(var(--profile-tab-index, 0) * (100% + 2px)));
  transition: transform 240ms ease, width 240ms ease;
  pointer-events: none;
}

.profile-tabs button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 1 1 0;
  min-width: 0;
  min-height: 34px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-tabs button:last-child {
  border-right: 0;
}

.profile-tabs button.active {
  background: transparent;
  color: var(--white);
  box-shadow: none;
}

.profile-audience-tabs {
  margin-bottom: 12px;
}

.profile-tab-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.profile-tab-content.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.profile-tab-content.gift-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  overflow: visible;
}

.gift-tile {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  aspect-ratio: 4 / 3;
  min-width: 0;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--gift-center) 68%, var(--accent-line));
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 42%, var(--gift-center), var(--gift-edge) 78%);
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  animation: gift-tile-enter 420ms cubic-bezier(.2, .8, .2, 1) both;
}

.gift-tile.ordinary-gift,
.gift-detail-panel.ordinary-gift .gift-detail-hero {
  --gift-center: #000;
  --gift-edge: #000;
  background: #000;
}

.gift-tile.ordinary-gift .gift-pattern,
.gift-detail-panel.ordinary-gift .gift-pattern {
  display: none;
}

.gift-giver-avatar {
  position: absolute;
  z-index: 4;
  top: 7px;
  left: 7px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: #17171b;
  color: #fff;
  font-size: 10px;
  overflow: hidden;
}

.gift-giver-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-hidden-mark {
  position: absolute;
  z-index: 5;
  top: 7px;
  left: 7px;
  width: 20px;
  height: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 50% / 60%;
  filter: drop-shadow(0 1px 4px #000);
}

.gift-hidden-mark::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
}

.gift-hidden-mark::after {
  content: "";
  position: absolute;
  top: 6px;
  left: -2px;
  width: 24px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.95);
  transform: rotate(-38deg);
  transform-origin: center;
}

.ordinary-gift .gift-hidden-mark {
  left: 39px;
}

.hidden-gift {
  opacity: 0.62;
}

.gift-tile:nth-child(2n) {
  animation-delay: 45ms;
}

.gift-tile:nth-child(3n) {
  animation-delay: 90ms;
}

.gift-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0.36;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, var(--gift-pattern, rgba(255,255,255,.18)) 0 6%, transparent 7%),
    radial-gradient(circle at 70% 34%, var(--gift-pattern, rgba(255,255,255,.18)) 0 5%, transparent 6%),
    radial-gradient(circle at 40% 76%, var(--gift-pattern, rgba(255,255,255,.18)) 0 6%, transparent 7%);
  background-size: 54px 54px;
}

.gift-pattern-grid {
  position: absolute;
  inset: -7%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 4px 7px;
  opacity: 0.42;
  transform: scale(1.08);
  color: var(--gift-pattern, rgba(255, 255, 255, 0.55));
}

.gift-pattern-grid-simple {
  inset: -4%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  opacity: 0.34;
  transform: scale(1.04);
}

.gift-pattern-grid-simple .gift-pattern-cell:nth-child(n + 5):nth-child(-n + 8) {
  transform: none;
}

.gift-pattern-grid-simple .gift-pattern-cell:nth-child(even) {
  transform: translateX(18%);
}

.gift-pattern-cell {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  color: inherit;
}

.gift-pattern-cell:nth-child(n + 5):nth-child(-n + 8) {
  transform: translateX(50%);
}

.gift-pattern-cell svg,
.gift-pattern-cell img,
.gift-pattern-cell video {
  width: 58% !important;
  height: 58% !important;
  object-fit: contain;
  opacity: 0.88;
}

.gift-pattern-cell svg {
  width: 100% !important;
  height: 100% !important;
  /* Match Telegram: symbol stickers tinted by backdrop pattern color */
  color: inherit;
  filter: opacity(0.95);
}

.gift-lottie-model {
  display: block;
  width: 70%;
  height: 70%;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.28));
  animation: gift-art-arrive 560ms cubic-bezier(.16, .84, .28, 1) both;
}

.gift-lottie-model svg {
  width: 100% !important;
  height: 100% !important;
}

.gift-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 0;
}

.gift-art img,
.gift-art video,
.gift-detail-art img,
.gift-detail-art video {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.28));
  animation: gift-art-arrive 560ms cubic-bezier(.16, .84, .28, 1) both;
}

.gift-fallback {
  color: color-mix(in srgb, var(--gift-center) 30%, #fff);
  font-size: 54px;
  line-height: 1;
}

.gift-label {
  position: relative;
  z-index: 2;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gift-pin {
  position: absolute;
  z-index: 3;
  top: 7px;
  left: 7px;
  color: #fff;
  font-size: 16px;
}

.gift-pin-toggle {
  position: absolute;
  z-index: 3;
  top: 6px;
  right: 6px;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 8px;
  background: rgba(10, 9, 13, 0.54);
  color: #fff;
  font: inherit;
  font-size: 9px;
  cursor: pointer;
}

.gift-detail-panel {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(760px, calc(100vh - 24px));
  padding: 14px;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background: #0d0c11;
  overflow-y: auto;
  animation: gift-detail-enter 360ms cubic-bezier(.18, .8, .24, 1) both;
}

.gift-detail-panel > .modal-close {
  z-index: 8;
  top: 12px;
  right: 12px;
}

.gift-detail-panel > .gift-detail-chrome-btn.modal-close,
.gift-detail-panel > .gift-detail-chrome-btn.gift-detail-actions {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(12, 11, 16, 0.72);
  color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gift-detail-panel > .gift-detail-chrome-btn.modal-close {
  font-size: 22px;
  line-height: 1;
  color: #fff;
}

.gift-detail-actions {
  position: absolute;
  z-index: 6;
  top: 12px;
  right: 52px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
}

.gift-detail-buy-row {
  margin-top: 2px;
}

.gift-detail-buy-row .telegram-market-price {
  justify-content: center;
}

.gift-detail-buy-row .telegram-market-cart-btn {
  width: 28px;
  height: 28px;
}

.gift-detail-buy-row .telegram-market-cart-btn svg {
  width: 13px;
  height: 13px;
}

.gift-actions-menu {
  position: fixed;
  z-index: 100020;
  display: grid;
  min-width: 230px;
  padding: 5px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: #151419;
  box-shadow: var(--glass-shadow);
}

.gift-actions-menu button {
  min-height: 38px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  text-align: left;
}

.gift-actions-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-content);
}

.settings-profile-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 14px;
}

.settings-profile-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.settings-profile-controls .active {
  border-color: var(--accent-content);
  color: var(--accent-content);
}

.settings-gift-grid,
.gift-replace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.settings-gift-tile {
  min-height: 118px;
}

.settings-gift-grid.reorder-mode .gift-tile.pinned {
  cursor: grab;
  animation: gift-order-shake 520ms ease-in-out infinite alternate;
}

.settings-gift-grid.reorder-mode .gift-tile.pinned:nth-child(even) {
  animation-direction: alternate-reverse;
}

.settings-gift-grid .gift-tile.dragging {
  cursor: grabbing;
  opacity: 0.48;
}

.gift-replace-panel {
  display: grid;
  gap: 12px;
  width: min(430px, calc(100vw - 24px));
  padding: 16px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: #0d0c11;
}

.gift-replace-panel h3,
.gift-replace-panel p {
  margin: 0;
}

.gift-replace-panel p {
  color: var(--gray);
  font-size: 12px;
}

.gift-replace-item {
  min-height: 86px;
  padding: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: radial-gradient(circle at 50% 42%, #513064, #17131e 78%);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  animation: gift-order-shake 520ms ease-in-out infinite alternate;
}

@keyframes gift-order-shake {
  from {
    transform: rotate(-1.5deg);
  }
  to {
    transform: rotate(1.5deg);
  }
}

.gift-detail-modal.closing .gift-detail-panel {
  animation: gift-detail-exit 220ms cubic-bezier(.55, .06, .68, .19) both;
}

.gift-detail-modal {
  z-index: 130;
}

.gift-detail-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 42%, var(--gift-center), var(--gift-edge) 78%);
  overflow: hidden;
}

.gift-detail-panel.nft-gift .gift-detail-hero {
  width: 100%;
  margin: 0;
  border-radius: 20px;
  /* Avoid dark letterbox around the gift preview. */
  background: var(--gift-center, #2a2433);
}

.gift-detail-panel.nft-gift.gift-detail-external .gift-detail-hero,
.gift-detail-panel.nft-gift.gift-detail-animating .gift-detail-hero {
  background: var(--gift-center, #2a2433);
}

.gift-detail-panel.nft-gift .gift-detail-art .gift-lottie-model,
.gift-detail-panel.nft-gift .gift-detail-art > img,
.gift-detail-panel.nft-gift .gift-detail-art > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.gift-detail-art .gift-lottie-model,
.gift-detail-art > img,
.gift-detail-art > video {
  width: 88%;
  height: 88%;
}

.bot-start-button {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}

.chat-form.bot-needs-start > :not(.bot-start-button):not(.compose-state) {
  display: none !important;
}

.bot-start-button:disabled {
  opacity: 0.5;
  cursor: wait;
}

@media (max-width: 620px) {
  .profile-tab-content.gift-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .gift-tile {
    padding: 5px;
  }

  .gift-label {
    font-size: 9px;
  }
}

.gift-detail-art {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.gift-detail-panel h3 {
  margin: 0;
  color: var(--white);
  font-size: 19px;
  font-weight: 400;
}

.gift-owner-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

button.gift-owner-card:hover,
button.gift-owner-card:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.gift-owner-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: #202027;
  color: var(--accent-content);
}

.gift-owner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gift-owner-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.gift-owner-copy strong,
.gift-owner-copy span,
.gift-owner-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gift-owner-copy strong {
  color: var(--gray);
  font-size: 11px;
  font-weight: 300;
}

.gift-owner-copy small {
  color: var(--gray);
  font-size: 11px;
}

.gift-properties {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  color: var(--white);
  font-size: 12px;
}

.gift-properties dt {
  color: var(--gray);
}

.gift-properties dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@keyframes gift-tile-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gift-art-arrive {
  from {
    opacity: 0;
    transform: scale(.72) rotate(-7deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes gift-detail-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gift-detail-exit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(16px) scale(.96);
  }
}

.media-tile-wrap {
  display: grid;
  gap: 0;
  min-width: 0;
  background: var(--black);
}

.media-tile {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--black);
  overflow: hidden;
  cursor: pointer;
}

.media-tile img,
.media-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-tile-duration {
  position: absolute;
  left: 5px;
  bottom: 5px;
  min-width: 0;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 1px 2px #000;
  pointer-events: none;
}

.profile-item {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 9px 0;
  color: var(--white);
  font-size: 13px;
  overflow: hidden;
}

.profile-group-item {
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.profile-group-item .item-avatar {
  width: 42px;
  height: 42px;
}

.profile-item-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.profile-item strong,
.profile-item small {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.message-sender-name {
  display: block;
  max-width: 100%;
  margin: 0 8px 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-sender-name.premium-name,
.participant-row strong.premium-name,
.forward-item strong.premium-name {
  display: inline-flex;
}

.message-sender-name:disabled {
  color: var(--accent-content);
  cursor: default;
  opacity: 1;
}

.message-forwarded-sender {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  max-width: 100%;
  margin: 6px 6px 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gray);
  cursor: default;
  font: inherit;
  font-size: 11px;
  line-height: 1.2;
  text-align: left;
}

.message-forwarded-sender.clickable {
  color: var(--accent-content);
  cursor: pointer;
}

.message-forwarded-avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  background: #1c1b22;
  color: currentColor;
  font-size: 9px;
}

.message-forwarded-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-forwarded-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message:has(.voice-message-player) > .message-sender-name {
  margin: 6px 8px 0;
}

.message.visual-media-only > .message-sender-name,
.message.media-only > .message-sender-name {
  position: relative;
  z-index: 3;
  margin: 5px 7px 2px;
}

.profile-action,
.settings-form button,
.forward-item {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #1c1b22;
  border-radius: 8px;
  background: #1c1b22;
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.settings-form button:disabled {
  color: var(--gray);
  opacity: 0.55;
  cursor: not-allowed;
}

.settings-form button:not(:disabled) {
  color: var(--pink);
  opacity: 1;
  cursor: pointer;
}

.profile-action {
  justify-self: start;
}

.profile-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 2px;
}

.profile-edit-actions .profile-action {
  justify-self: auto;
}

.profile-photo.has-accent-fallback {
  color: #fff;
  background: var(--profile-accent, var(--black));
}

.profile-accent-picker {
  display: grid;
  gap: 12px;
}

.profile-accent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-accent-swatch {
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  background: var(--swatch, #8e8e93);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.profile-accent-swatch.active {
  border-color: var(--pink);
}

.profile-accent-note {
  margin: 0;
  color: var(--gray);
  font-size: 12px;
  line-height: 1.4;
}

.profile-name-edit-body {
  display: grid;
  gap: 10px;
}

.profile-name-edit-body label {
  display: grid;
  gap: 6px;
  color: var(--gray);
  font-size: 12px;
}

.profile-name-edit-body input {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font: inherit;
}

.media-viewer-panel {
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  background: var(--black);
  overflow: hidden;
}

.media-viewer-content {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 56px 16px 16px;
  overflow: auto;
  /* Let close/nav controls above receive clicks; re-enable on media itself. */
  pointer-events: none;
}

.media-viewer-content .viewer-media,
.media-viewer-content .viewer-download-button,
.media-viewer-content .viewer-action-bar,
.media-viewer-content .viewer-action-button,
.media-viewer-content .viewer-video-restart,
.media-viewer-content .viewer-video-hud-btn,
.media-viewer-content .viewer-video-tool-btn,
.media-viewer-content .viewer-video-menu,
.media-viewer-content .viewer-video-progress,
.media-viewer-content .viewer-lottie-sticker,
.media-viewer-content img,
.media-viewer-content video,
.media-viewer-content button,
.media-viewer-content a {
  pointer-events: auto;
}

.media-viewer-arrow {
  position: absolute;
  top: 50%;
  z-index: 51;
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: auto;
}

.media-viewer-arrow.tap-animate,
.media-viewer-arrow:active {
  animation: none !important;
  transform: translateY(-50%) !important;
}

.media-viewer-arrow-prev {
  left: 18px;
}

.media-viewer-arrow-next {
  right: 18px;
}

.media-viewer-arrow[hidden] {
  display: none !important;
}

.viewer-media-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  margin: 0;
  gap: 14px;
}

.viewer-counter {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  min-width: 46px;
  padding: 5px 12px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--white);
  font-size: 13px;
  text-align: center;
  pointer-events: none;
}

.viewer-download-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--pink);
  cursor: pointer;
  font-size: 13px;
}

.viewer-action-bar {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: calc(100vw - 180px);
}

.viewer-action-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.viewer-action-button.danger {
  border-color: #ff3b30;
  color: #ff3b30;
}

.viewer-media-wrap.has-caption {
  justify-content: flex-start;
}

.viewer-sticker-wrap .viewer-media {
  max-width: min(320px, calc(100vw - 32px));
  max-height: min(320px, calc(100dvh - 72px));
}

.viewer-lottie-sticker {
  display: block;
  width: min(320px, calc(100vw - 32px));
  height: min(320px, calc(100dvh - 72px));
}

.viewer-lottie-sticker svg {
  display: block;
  width: 100%;
  height: 100%;
}

.viewer-media {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 72px);
  object-fit: contain;
  border: 0;
  border-radius: 0;
}

.viewer-media.small-source {
  width: min(480px, calc(100vw - 80px));
  min-width: min(480px, calc(100vw - 80px));
}

.message:has(.voice-message-player) .message-meta {
  position: absolute;
  right: 8px;
  bottom: 2px;
  color: var(--gray);
}

.viewer-caption {
  width: min(720px, calc(100vw - 32px));
  padding: 0 0 18px;
  color: var(--white);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .media-viewer-arrow-prev {
    left: 8px;
  }

  .media-viewer-arrow-next {
    right: 8px;
  }
}

.small-panel {
  width: min(520px, 100%);
}

.modal-panel.delete-choice {
  width: min(320px, 100%);
}

.modal-panel:has(.group-settings-form) {
  width: min(430px, 100%);
}

.field-label {
  display: grid;
  gap: 6px;
  color: var(--gray);
  font-size: 12px;
}

.color-input-row input {
  width: 76px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
  background: var(--black);
  overflow: hidden;
}

.group-accent-colors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.group-accent-colors .color-input-row {
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.group-accent-colors .color-input-row input {
  width: 52px;
  min-height: 30px;
}

.saved-palette-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.saved-palette-head .settings-section-title {
  margin: 0;
}

.saved-palette-hint {
  margin-top: -6px;
}

.group-auto-save-status {
  min-height: 15px;
  margin-top: -6px;
  color: var(--gray);
  text-align: right;
}

.group-picker-panel {
  display: flex;
  flex-direction: column;
  width: min(420px, calc(100vw - 32px));
  height: auto;
  max-height: min(820px, 92vh);
  overflow: hidden;
}

.group-picker-panel .settings-head {
  flex: 0 0 auto;
}

.group-picker-panel .settings-head h2 {
  max-width: calc(100% - 56px);
}

.group-picker-list {
  display: grid;
  gap: 10px;
  flex: 1 1 auto;
  align-content: start;
  min-height: 0;
  padding: 16px 18px 20px;
  overflow-x: hidden;
  overflow-y: auto;
}

.group-picker-item {
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  line-height: 1.2;
}

.group-picker-item:hover {
  border-color: var(--accent-line);
  color: var(--pink);
}

.color-input-row input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-input-row input::-webkit-color-swatch {
  border: 0;
  border-radius: 999px;
}

#supportText {
  border-radius: 18px;
}

.settings-head {
  position: relative;
  padding: 18px;
  border-bottom: 1px solid var(--glass-border);
}

.settings-head .modal-close {
  z-index: 2;
}

.settings-head h2 {
  max-width: calc(100% - 210px);
}

.app-auth-head {
  display: grid;
  gap: 8px;
  padding: 18px 60px 18px 18px;
}

.app-auth-brand {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
}

.app-auth-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  background: transparent;
}

.app-auth-brand-title {
  padding-bottom: 7px;
  color: var(--white);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  text-shadow: 0 8px 24px rgba(225, 80, 169, 0.38);
}

#appAuthTitle:empty {
  display: none;
}

.session-account-balances {
  position: absolute;
  top: 18px;
  right: 68px;
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: min(42%, 260px);
  min-height: 38px;
  overflow: hidden;
  color: var(--accent-content);
  font-size: 13px;
  white-space: nowrap;
}

.session-account-balances:empty {
  display: none;
}

.session-account-balances span,
.session-account-balances button {
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--accent-content);
  overflow: hidden;
  text-overflow: ellipsis;
  font: inherit;
}

.session-account-balances button {
  cursor: pointer;
}

.settings-form {
  display: grid;
  gap: 10px;
  padding: 18px;
  min-height: 0;
  overflow-y: auto;
}

.modal-panel > .auth-mode-toggle {
  margin: 14px 18px 0;
}

.forgot-password-button {
  min-height: 24px !important;
  width: max-content;
  justify-self: start;
  padding: 0 4px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--pink) !important;
  font-size: 12px;
}

.recovery-confirm-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.recovery-confirm-row[hidden] {
  display: none;
}

.app-account-settings-body {
  display: grid;
  gap: 16px;
  padding: 18px;
  overflow-y: auto;
}

.app-settings-account-select {
  display: grid;
  gap: 6px;
  color: var(--gray);
  font-size: 12px;
}

.app-settings-account-select select {
  min-height: 38px;
  border-radius: 8px;
}

.app-settings-menu {
  padding: 0;
}

.app-settings-section {
  display: grid;
  gap: 8px;
}

.app-settings-section h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--white);
}

.app-settings-list {
  display: grid;
  gap: 8px;
}

.app-settings-row,
.app-settings-empty {
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--white) 7%, transparent);
  color: var(--white);
}

.app-settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
}

.app-settings-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.app-settings-row-main strong,
.app-settings-row-main span,
.app-settings-row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-settings-row span,
.app-settings-row small,
.app-settings-empty {
  color: var(--gray);
  font-size: 12px;
}

.app-settings-finish-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.app-settings-finish-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.app-settings-empty.error {
  color: #ff8b82;
}

.settings-form[hidden] {
  display: none;
}

.settings-profile-preview {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px 0 14px;
}

.settings-current-avatar {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid var(--gray);
  border-radius: 50%;
  color: var(--white);
  font-size: 24px;
  overflow: hidden;
  cursor: zoom-in;
}

.settings-current-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-profile-preview strong,
.settings-profile-preview small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 300;
}

.settings-profile-preview small {
  margin-top: 4px;
  color: var(--gray);
  font-size: 12px;
}

.settings-stack {
  display: grid;
  gap: 10px;
}

.form-hint {
  min-height: 18px;
  color: var(--gray);
  font-size: 12px;
  line-height: 1.45;
}

.form-hint.error {
  color: #ff8fbb;
}

.telegram-actions-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--gray);
  font-size: 12px;
  line-height: 1.35;
}

.telegram-actions-consent input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent-content);
}

.transfer-keep-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.transfer-keep-row input {
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  accent-color: var(--pink);
}

.settings-stack[hidden] {
  display: none;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  overflow: hidden;
}

#addAccountForm .segmented {
  grid-template-columns: 1fr 1fr 1fr;
}

#addAccountForm .segmented button {
  font-size: 13px;
  padding: 8px 6px;
}

.login-qr-frame {
  display: grid;
  place-items: center;
  padding: 12px;
  border-radius: 12px;
  background: transparent;
}

.login-qr-image {
  width: min(220px, 100%);
  height: auto;
  display: block;
  border-radius: 8px;
}

.segmented button {
  border: 0;
  border-right: 1px solid var(--accent-line);
  border-radius: 0;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button.active {
  color: var(--white);
  background: rgba(232, 86, 168, 0.16);
}

.telegram-settings-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.telegram-settings-list h3 {
  margin: 10px 0 0;
  color: var(--gray);
  font-size: 12px;
  font-weight: 300;
  text-transform: uppercase;
}

.telegram-settings-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--white);
  text-align: left;
}

.telegram-settings-list .settings-row-value {
  color: var(--gray);
}

.settings-detail {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  min-height: 0;
  overflow-y: auto;
}

.settings-detail[hidden] {
  display: none;
}

.settings-back {
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--pink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.settings-detail h3 {
  margin: 0;
  color: var(--white);
  font-size: 20px;
  font-weight: 300;
}

.ton-balance-row .ton-balance-value {
  color: var(--accent-content);
  font-size: 18px;
  font-weight: 400;
  white-space: nowrap;
}

.ton-balance-input {
  width: 138px;
  text-align: right;
}

.settings-detail-body {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.settings-text-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--white);
  font: inherit;
  resize: vertical;
}

.settings-link-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.settings-link-row:disabled {
  cursor: default;
  opacity: 0.58;
}

.settings-row-actions {
  display: flex;
  gap: 6px;
}

.icon-action {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: transparent;
  color: var(--accent-content);
  font: inherit;
  cursor: pointer;
}

.stars-filter {
  position: relative;
  justify-self: end;
  color: var(--white);
}

.stars-filter summary {
  min-width: 112px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  color: var(--accent-content);
  cursor: pointer;
  list-style: none;
  text-align: center;
}

.stars-filter summary::-webkit-details-marker {
  display: none;
}

.stars-filter-menu {
  position: absolute;
  z-index: 12;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: 190px;
  padding: 6px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: #17161c;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
}

.stars-filter-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 0 7px;
  cursor: pointer;
}

.stars-filter-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.stars-filter-check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--gray);
  border-radius: 5px;
}

.stars-filter-option input:checked + .stars-filter-check {
  border-color: var(--accent-content);
  background: color-mix(in srgb, var(--accent-content) 28%, transparent);
}

.stars-filter-option input:checked + .stars-filter-check::before {
  content: "✓";
  color: var(--accent-content);
  font-size: 13px;
}

.stars-transaction-list {
  display: grid;
}

.stars-transaction {
  grid-template-columns: 34px 34px minmax(0, 1fr) auto;
  cursor: default;
}

.stars-transaction[tabindex] {
  cursor: pointer;
}

.stars-transaction-gift,
.stars-transaction-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: #1c1b22;
  color: var(--accent-content);
  font-size: 11px;
  line-height: 1;
}

.stars-transaction-gift {
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--accent-line) 42%, transparent);
}

.stars-transaction-gift.clickable,
.stars-transaction-avatar.clickable {
  cursor: pointer;
}

.stars-transaction-gift.clickable:hover,
.stars-transaction-avatar.clickable:hover {
  border-color: color-mix(in srgb, var(--accent-line) 72%, transparent);
}

.stars-transaction-gift img,
.stars-transaction-gift video,
.stars-transaction-gift .gift-lottie-model,
.stars-transaction-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stars-transaction-gift .gift-lottie-model {
  transform: scale(1.25);
}

.stars-transaction-gift-fallback {
  color: var(--accent-content);
}

.stars-transaction-modal {
  backdrop-filter: blur(12px);
}

.stars-transaction-panel {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(460px, calc(100vw - 28px));
  padding: 22px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: rgba(15, 14, 19, 0.96);
  color: var(--white);
}

.stars-transaction-detail-head {
  display: grid;
  grid-template-columns: 42px 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding-right: 42px;
}

.stars-transaction-detail-head .stars-transaction-gift,
.stars-transaction-detail-head .stars-transaction-avatar {
  width: 40px;
  height: 40px;
}

.stars-transaction-detail-head h3 {
  margin: 0;
  overflow: hidden;
  font-size: 20px;
  font-weight: 300;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stars-transaction-details {
  display: grid;
  grid-template-columns: minmax(96px, auto) minmax(0, 1fr);
  gap: 9px 14px;
  margin: 0;
}

.stars-transaction-details dt {
  color: var(--gray);
}

.stars-transaction-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.stars-transaction-meta {
  display: inline;
}

.stars-meta-action {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.stars-meta-action.copy,
.stars-meta-action.gift,
.stars-meta-action.detail {
  color: var(--accent-content);
}

.stars-meta-action.profile {
  color: var(--white);
}

.stars-meta-action:hover {
  text-decoration: underline;
}

.stars-transaction-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stars-income {
  color: #75d59a;
  white-space: nowrap;
}

.stars-expense {
  color: #ff8fbb;
  white-space: nowrap;
}

.settings-section {
  display: grid;
  gap: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
}

.settings-section-title {
  margin: 12px 0 6px;
  color: var(--gray);
  font-size: 12px;
  font-weight: 300;
  text-transform: uppercase;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 54px;
  padding: 8px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-language-row {
  cursor: pointer;
}

.settings-language-check {
  color: var(--accent-content);
  font-size: 16px;
  font-weight: 600;
}

.settings-row strong,
.settings-row small {
  display: block;
  min-width: 0;
  font-weight: 300;
}

.settings-row small {
  margin-top: 3px;
  color: var(--gray);
  font-size: 12px;
}

.settings-row-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.settings-drilldown {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--black);
  color: var(--pink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.settings-drilldown:hover,
.settings-drilldown:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

.privacy-exception-list {
  max-height: 320px;
  overflow-y: auto;
}

.chat-settings-panel {
  width: min(760px, 100%);
}

.chat-settings-form {
  grid-template-columns: 1fr;
}

.chat-settings-toggles,
.chat-settings-rights,
.group-member-list {
  display: grid;
  gap: 4px;
}

/* Must beat later .check-row (2-col) so meta stays right of the avatar. */
.check-row.group-member-row {
  grid-template-columns: 28px 42px minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 6px 0;
  background: transparent;
}

.check-row.group-member-row.current {
  margin: 0;
  padding: 6px 0;
  border-radius: 0;
  background: transparent;
}

.group-member-avatar {
  width: 42px;
  height: 42px;
  font-size: 15px;
}

.group-member-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.group-member-meta strong,
.group-member-meta small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-member-meta strong {
  font-weight: 400;
}

.group-member-meta small {
  color: var(--gray);
  font-size: 12px;
  line-height: 1.25;
}

.group-member-drag-handle,
.group-member-drag-spacer {
  width: 34px;
  height: 34px;
  justify-self: end;
}

.settings-form button.group-member-drag-handle,
.group-member-drag-handle {
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 3px;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--gray);
  box-shadow: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.settings-form button.group-member-drag-handle:not(:disabled),
.group-member-drag-handle:active {
  background: transparent;
  color: var(--gray);
  opacity: 1;
  cursor: grabbing;
}

.group-member-drag-handle span {
  display: block;
  width: 14px;
  height: 2px;
  margin: 0;
  border-radius: 999px;
  background: currentColor;
}

.group-member-row.is-dragging {
  opacity: 0.55;
}

.group-member-row.drag-over-before {
  box-shadow: inset 0 2px 0 var(--pink);
}

.group-member-row.drag-over-after {
  box-shadow: inset 0 -2px 0 var(--pink);
}

.settings-note,
.unsupported-list {
  margin: 0;
  color: var(--gray);
  font-size: 12px;
  line-height: 1.45;
}

.unsupported-list {
  padding-left: 18px;
}

.participant-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.participant-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 40px;
}

.participant-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  overflow: hidden;
}

.participant-row strong,
.participant-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 300;
}

.participant-row small {
  color: var(--gray);
  font-size: 12px;
}

.participant-row strong.premium-name {
  display: inline-flex;
}

.inline-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.settings-choice {
  min-width: 112px;
  max-width: min(220px, 42vw);
  padding: 8px 10px;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--black);
  color: var(--white);
  outline: none;
}

.wide-action {
  width: 100%;
  justify-content: center;
}

.settings-action {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--black);
  color: var(--pink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.telegram-settings-panel {
  width: min(720px, 100%);
  max-height: min(880px, 94vh);
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--black);
}

.telegram-channel-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.telegram-channel-nav {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 120px;
  align-items: center;
  min-height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid var(--accent-line);
  background: var(--black);
}

.telegram-channel-nav h2 {
  margin: 0;
  color: var(--white);
  text-align: center;
  font-size: 20px;
  font-weight: 400;
}

.telegram-nav-back,
.telegram-nav-done {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: #2ea7ff;
  font: inherit;
  font-size: 18px;
  text-align: left;
  cursor: pointer;
}

.telegram-nav-done {
  text-align: right;
}

.telegram-channel-body {
  min-height: 0;
  padding: 16px 20px 28px;
  overflow-y: auto;
  background: var(--black);
}

.telegram-channel-body[hidden],
.telegram-subscreen[hidden],
.telegram-card[hidden] {
  display: none;
}

.telegram-subscreen {
  min-height: 0;
  padding: 16px 20px 28px;
  overflow-y: auto;
  background: var(--black);
}

.telegram-info-card,
.telegram-card,
.telegram-delete-channel {
  border-radius: 8px;
  background: var(--black);
}

.telegram-info-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px 28px;
}

.telegram-avatar-picker {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: #e48dff;
  overflow: hidden;
  cursor: pointer;
}

.telegram-avatar-picker input {
  display: none;
}

.telegram-avatar-preview {
  color: var(--white);
  font-size: 34px;
  font-weight: 600;
}

.telegram-info-fields {
  display: grid;
  gap: 0;
  min-width: 0;
}

.telegram-info-fields input,
.telegram-info-fields textarea {
  border: 0;
  border-bottom: 1px solid #283848;
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font-size: 17px;
}

.telegram-info-fields textarea {
  min-height: 46px;
  max-height: 120px;
  padding-left: 12px;
}

.telegram-help {
  margin: 8px 28px 22px;
  color: #b7c5d4;
  font-size: 15px;
  line-height: 1.35;
}

.telegram-card {
  display: grid;
  gap: 0;
  margin-top: 18px;
  padding: 0 28px;
  border: 1px solid rgba(232, 86, 168, 0.5);
}

.telegram-subscreen .telegram-card:first-child {
  margin-top: 0;
}

.telegram-subtitle {
  margin: 28px 28px 8px;
  color: #b7c5d4;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.telegram-subnote {
  margin-top: 10px;
}

.telegram-settings-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(232, 86, 168, 0.34);
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.telegram-settings-row:last-child {
  border-bottom: 0;
}

.telegram-row-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--white);
  font-size: 18px;
}

.telegram-row-icon.blue { background: #168cff; }
.telegram-row-icon.purple { background: #b052d6; }
.telegram-row-icon.orange { background: #ff9500; }
.telegram-row-icon.cyan { background: #42b9e8; }
.telegram-row-icon.red { background: #ff375f; }
.telegram-row-icon.green { background: #32d74b; }

.telegram-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.telegram-row-main strong,
.telegram-row-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
}

.telegram-row-main strong {
  font-size: 18px;
}

.telegram-row-main small,
.telegram-row-value,
.muted-row .telegram-row-main strong {
  color: #b7c5d4;
}

.telegram-settings-row input,
.telegram-settings-row select {
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b7c5d4;
}

.telegram-settings-row input[type="checkbox"] {
  width: 42px;
  accent-color: var(--pink);
}

.telegram-row-with-switch {
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

.telegram-premium-pill {
  padding: 4px 8px;
  border-radius: 7px;
  background: #a95df2;
  color: var(--white);
  font-size: 13px;
  white-space: nowrap;
}

.telegram-color-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pink);
}

.telegram-inline-check {
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 52px;
  border-bottom: 1px solid #283848;
  font-size: 16px;
}

.telegram-people-card {
  padding-top: 14px;
  padding-bottom: 14px;
}

.telegram-blue-action {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: #2ea7ff;
  font: inherit;
  font-size: 17px;
  text-align: left;
  cursor: pointer;
}

.telegram-delete-channel {
  width: 100%;
  min-height: 58px;
  margin-top: 22px;
  padding: 0 28px;
  border: 1px solid rgba(255, 59, 48, 0.7);
  color: #ff5b57;
  font: inherit;
  font-size: 18px;
  text-align: left;
  cursor: pointer;
}

.telegram-picker-card {
  gap: 10px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.telegram-picker-card input[type="search"],
.telegram-picker-card > input,
.telegram-card > input,
.telegram-card > select {
  min-height: 40px;
  border-color: var(--accent-line);
  background: var(--black);
  color: var(--white);
}

.telegram-picker-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
}

.telegram-picker-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.telegram-picker-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--pink);
}

.telegram-color-grid,
.telegram-reaction-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 10px;
  padding: 14px 0;
}

.telegram-color-grid button,
.telegram-reaction-grid button {
  min-height: 42px;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  font: inherit;
}

.color-preset-grid {
  display: grid;
  grid-template-columns: repeat(5, 34px);
  gap: 8px;
  justify-content: center;
  padding: 2px 0 4px;
}

.accent-palette-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  justify-content: flex-start;
  width: 100%;
  min-height: 42px;
  height: auto;
  margin: 0;
  padding: 2px 0 8px;
  box-sizing: border-box;
}

.suggested-accent-palettes {
  margin: 4px 0 0;
  padding-bottom: 14px;
}

.saved-palettes-title {
  margin-top: 8px;
  clear: both;
  position: relative;
  z-index: 1;
}

.accent-palette-grid.empty {
  display: grid;
}

.accent-palette-grid.empty::after {
  content: "Пока нет сохранённых сочетаний";
  grid-column: 1 / -1;
  color: var(--gray);
  font-size: 11px;
}

.accent-palette-add {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-content);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.accent-palette-add:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  transform: translateY(-1px);
}

.color-preset {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 42%),
    var(--preset-color);
  color: transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.accent-palette-preset {
  --preset-color: var(--preset-content-color);
  position: relative;
  width: 42px;
  height: 42px;
  min-height: 42px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(
    to bottom right,
    var(--preset-content-color) 0 49%,
    var(--preset-line-color) 51% 100%
  );
}

.accent-palette-preset::after {
  content: none;
}

.accent-palette-preset:hover {
  box-shadow: 0 8px 22px color-mix(in srgb, var(--preset-content-color) 38%, transparent);
}

@media (max-width: 520px) {
  .group-accent-colors {
    grid-template-columns: 1fr;
  }
}

.color-preset:hover {
  transform: translateY(-1px) scale(1.02);
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--preset-color) 38%, transparent);
}

.telegram-color-grid button::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--swatch);
  vertical-align: -2px;
}

.telegram-reaction-grid button.active {
  background: var(--pink);
}

.settings-switch {
  position: relative;
  width: 50px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #29333d;
  cursor: pointer;
}

.settings-switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  transition: transform 0.18s ease;
}

.settings-switch.active {
  background: var(--pink);
}

.settings-switch.active::after {
  background: var(--accent-on-content);
  transform: translateX(22px);
}

.settings-switch.voul-ninja-switch {
  width: 50px;
  aspect-ratio: 2 / 1;
  height: auto;
  flex-shrink: 0;
  box-sizing: border-box;
  border: 1px solid var(--pink);
  background: #29333d;
  padding: 0;
  min-height: 0;
}

.settings-switch.voul-ninja-switch::after {
  top: 50%;
  left: 1px;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
}

.settings-switch.voul-ninja-switch.active {
  border-color: var(--pink);
  background: var(--pink);
}

.settings-switch.voul-ninja-switch.active::after {
  background: var(--accent-on-content);
  transform: translateY(-50%) translateX(29px);
}

.settings-inline-check {
  display: grid;
  grid-template-columns: 18px max-content;
  gap: 7px;
  align-items: center;
  justify-self: end;
  color: var(--gray);
  font-size: 11px;
  white-space: nowrap;
}

.settings-inline-check input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--pink);
}

#addAccountGroupCreate {
  min-height: 38px;
  color: var(--pink);
}

.check-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 36px;
  color: var(--white);
  font-size: 13px;
}

.check-row.current {
  margin: 0 -8px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
}

.check-row input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.mini-app-modal {
  padding: 20px;
  place-items: center;
}

.mini-app-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(920px, 100%);
  height: min(820px, calc(100dvh - 40px));
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  background: rgba(18, 18, 24, 0.66);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(26px) saturate(145%);
  overflow: hidden;
}

.mini-app-panel iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--black);
}

.mini-app-fallback {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--accent-line);
  color: var(--gray);
  font-size: 12px;
}

.mini-app-fallback[hidden] {
  display: none;
}

.mini-app-fallback button {
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--pink);
  cursor: pointer;
  font: inherit;
}

.delete-choice-body {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 18px;
}

.delete-choice-body.delete-choice-stack {
  grid-auto-flow: row;
  grid-auto-columns: unset;
  padding: 0;
}

.delete-choice-body button {
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  line-height: 1.2;
}

.confirm-choice-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.confirm-choice-body p {
  margin: 0;
  color: var(--gray);
  line-height: 1.45;
  word-break: break-word;
}

.settings-avatar {
  width: 160px;
}

.danger-button {
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--gray);
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

#settingsLogout.danger-button {
  border: 1px solid var(--accent-line);
}

.danger-button:hover {
  border-color: #ff3b30;
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.12);
}

.device-exit-button {
  min-height: 54px;
  margin-top: 16px;
  border-color: #ff3b30;
  background: rgba(255, 59, 48, 0.16);
  color: #ff3b30;
  font-size: 16px;
}

.device-exit-button:hover {
  background: rgba(255, 59, 48, 0.26);
  color: #ffb1aa;
}

.settings-stack.collapsed input {
  display: none;
}

.support-file-picker {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  color: var(--pink);
  cursor: pointer;
  font-size: 12px;
}

.support-file-picker input {
  display: none;
}

.support-file-summary {
  color: var(--gray);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.support-thread {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
}

.support-message {
  display: grid;
  gap: 4px;
  max-width: 84%;
  padding: 9px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.support-message.user {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: color-mix(in srgb, var(--pink) 28%, rgba(255, 255, 255, 0.06));
}

.support-message.admin {
  justify-self: start;
  border-bottom-left-radius: 6px;
}

.support-message-meta {
  justify-self: end;
  color: var(--gray);
  font-size: 10px;
  line-height: 1;
}

.support-attachments {
  display: grid;
  gap: 6px;
}

.support-attachment-preview {
  display: block;
  max-width: min(220px, 100%);
  max-height: 160px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
}

.support-attachment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--white);
  cursor: pointer;
  font-size: 11px;
  text-align: left;
}

.support-attachment span:nth-child(2) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-attachment small {
  color: var(--gray);
}

.support-attachment-icon {
  color: var(--pink);
}

.support-empty {
  padding: 10px;
  color: var(--gray);
  font-size: 12px;
  text-align: center;
}

.search-popup-empty {
  width: calc(100% - 24px);
  margin-left: auto;
  padding: 18px 14px;
  color: var(--gray);
  font-size: 13px;
  text-align: right;
}

.modal-panel,
.profile-panel,
.context-menu,
.search-popup {
  background-color: rgba(18, 18, 24, 0.66);
  backdrop-filter: blur(26px) saturate(145%);
}

.extensions-modal {
  z-index: 35;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

.extensions-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(360px, calc(100vw - 32px));
  height: min(540px, calc(100dvh - 32px));
  min-width: 360px;
  min-height: 540px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  aspect-ratio: auto;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  background: rgba(12, 11, 16, 0.62);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(28px) saturate(145%);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

/* VOUL floating tabs should not cast long outer shadows. */
.extensions-modal .extensions-panel {
  box-shadow: none !important;
}

.conference-capture-target {
  isolation: isolate !important;
}

.extensions-panel.paired-window-move {
  transition: left 200ms ease, top 200ms ease;
}

.extensions-panel.is-window-interacting {
  transition: none !important;
}

.extensions-panel.is-window-interacting iframe {
  pointer-events: none;
}

.subscriptions-modal {
  z-index: 36;
}

.subscriptions-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.extensions-head {
  position: relative;
  z-index: 9;
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 6px 54px;
  border-bottom: 1px solid var(--accent-line);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.extensions-head:active {
  cursor: grabbing;
}

.extensions-head h2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
}

.extensions-head-logo {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  object-fit: cover;
  flex: 0 0 auto;
}

.extensions-window-controls {
  position: absolute;
  left: 14px;
  top: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(-50%);
  pointer-events: auto;
}

.extensions-window-control {
  position: relative;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.24);
  border-radius: 50%;
  cursor: pointer;
  font: inherit;
}

.extensions-window-close {
  background: #ff5f57;
}

.extensions-window-expand {
  background: #28c840;
}

.extensions-window-control::before,
.extensions-window-control::after {
  content: "";
  position: absolute;
  opacity: 0;
  transition: opacity 120ms ease;
}

.extensions-window-controls:hover .extensions-window-control::before,
.extensions-window-controls:hover .extensions-window-control::after {
  opacity: 1;
}

.extensions-window-close::before,
.extensions-window-close::after {
  width: 7px;
  height: 1.5px;
  border-radius: 999px;
  background: #6e1e1b;
}

.extensions-window-close::before {
  transform: rotate(45deg);
}

.extensions-window-close::after {
  transform: rotate(-45deg);
}

.extensions-window-expand::before,
.extensions-window-expand::after {
  width: 4.5px;
  height: 4.5px;
  border-color: #0b5f1d;
  border-style: solid;
}

.extensions-window-expand::before {
  top: 2px;
  right: 2px;
  border-width: 1.5px 1.5px 0 0;
}

.extensions-window-expand::after {
  bottom: 2px;
  left: 2px;
  border-width: 0 0 1.5px 1.5px;
}

.extensions-close {
  position: absolute;
  top: 11px;
  right: 12px;
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: transparent;
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 23px;
}

.extensions-billing-toggle {
  position: absolute;
  top: 5px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 20px;
}

.extensions-billing-toggle:hover {
  background: rgba(255, 255, 255, 0.07);
}

.nft-market-toggle {
  gap: 5px;
  left: calc(50% - 98px);
  width: 64px;
  max-width: 64px;
}

.gift-panel-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 0;
}

.gift-panel-button:hover,
.gift-panel-button:active,
.gift-panel-button:focus,
.gift-panel-button:focus-visible {
  border: 0;
  background: none;
  color: var(--accent-content);
  outline: 0;
  box-shadow: none;
}

#giftPanelButton,
#giftPanelButton:hover,
#giftPanelButton:active,
#giftPanelButton:focus,
#giftPanelButton:focus-visible {
  border: 0 !important;
  background: none !important;
  color: var(--accent-content) !important;
}

.gift-panel-button::before {
  content: "";
  width: 20px;
  height: 20px;
  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='M20 7h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.3 0-2.32.84-3 2-.68-1.16-1.7-2-3-2-1.66 0-3 1.34-3 3 0 .35.07.69.18 1H4c-1.1 0-2 .9-2 2v2h20V9c0-1.1-.9-2-2-2ZM9 5c.6 0 1.16.63 1.58 2H9c-.55 0-1-.45-1-1s.45-1 1-1Zm6 0c.55 0 1 .45 1 1s-.45 1-1 1h-1.58C13.84 5.63 14.4 5 15 5ZM3 12v7c0 1.1.9 2 2 2h6v-9H3Zm10 9h6c1.1 0 2-.9 2-2v-7h-8v9Z'/%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='M20 7h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.3 0-2.32.84-3 2-.68-1.16-1.7-2-3-2-1.66 0-3 1.34-3 3 0 .35.07.69.18 1H4c-1.1 0-2 .9-2 2v2h20V9c0-1.1-.9-2-2-2ZM9 5c.6 0 1.16.63 1.58 2H9c-.55 0-1-.45-1-1s.45-1 1-1Zm6 0c.55 0 1 .45 1 1s-.45 1-1 1h-1.58C13.84 5.63 14.4 5 15 5ZM3 12v7c0 1.1.9 2 2 2h6v-9H3Zm10 9h6c1.1 0 2-.9 2-2v-7h-8v9Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mini-app-modal .mini-app-panel {
  width: min(440px, calc(100vw - 24px));
  height: min(620px, calc(100vh - 24px));
  min-width: 440px;
  min-height: 620px;
  aspect-ratio: auto;
}

.nft-market-panel,
.gift-panel {
  width: min(360px, calc(100vw - 32px));
  height: min(540px, calc(100dvh - 32px));
  aspect-ratio: auto;
}

.mini-app-panel iframe {
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0 0 28px 28px;
  background: #000;
}

.mini-app-fallback {
  display: grid;
  gap: 10px;
  padding: 12px;
  color: var(--gray);
  font-size: 12px;
}

.mini-app-fallback button,
.nft-market-actions button,
.gift-panel-actions button {
  min-height: 38px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.nft-market-body,
.gift-panel-body {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.nft-market-body {
  padding: 0 12px 14px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.nft-market-load-more {
  margin: 10px 0 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.nft-market-scroll-top {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(12, 11, 16, 0.88);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.nft-market-scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.nft-market-scroll-top:hover {
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.nft-market-panel .extensions-head {
  padding-right: 148px;
}

.nft-market-head-actions {
  position: absolute;
  top: 50%;
  right: 12px;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  transform: translateY(-50%);
}

.nft-market-head-actions button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.nft-market-head-actions #nftMarketWallet {
  font-size: 18px;
  line-height: 1;
}

.nft-market-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  margin: 0 -14px 0;
  padding: 10px 14px 8px;
  background: rgba(12, 11, 16, 0.98);
  border-bottom: 1px solid var(--glass-border);
  overflow: visible;
}

.nft-market-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  overflow: visible;
}

.nft-filter {
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.nft-filter > button {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  width: 100%;
  min-height: 34px;
  padding: 3px 10px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.nft-filter > button span {
  color: var(--white);
  font-size: 9px;
  line-height: 1;
}

.nft-filter > button strong {
  min-width: 0;
  overflow: hidden;
  color: var(--gray);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nft-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  display: none;
  width: min(220px, calc(100vw - 40px));
  max-height: 260px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: rgba(18, 18, 24, 0.98);
  box-shadow: var(--glass-shadow);
  /* Don't expand parent layout when the menu opens. */
  margin: 0;
}

/* Right-side filters open leftward so the panel stays inside the market window. */
.nft-filter[data-nft-filter-box="backdrop"] .nft-filter-menu,
.nft-filter[data-nft-filter-box="symbol"] .nft-filter-menu {
  left: auto;
  right: 0;
}

.nft-filter.open .nft-filter-menu {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.nft-filter-menu input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--glass-border);
  outline: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 12px;
  padding: 10px 12px;
}

.nft-filter-options {
  display: grid;
  overflow: auto;
  padding: 5px;
}

.nft-filter-options button {
  display: grid;
  grid-template-columns: 16px 28px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  min-height: 30px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  text-align: left;
}

.nft-filter-options button span {
  visibility: hidden;
  color: var(--accent-content);
  font-size: 12px;
}

.nft-filter-options button i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  font-style: normal;
}

.nft-filter-options button i:empty::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-content);
  opacity: 0.75;
}

.nft-filter-options button i.nft-filter-swatch-empty::before {
  content: none;
}

.nft-filter-options button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nft-filter-options button b {
  min-width: 0;
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nft-filter-options button.selected {
  color: var(--accent-content);
}

.nft-filter-options button.selected span {
  visibility: visible;
}

.nft-filter-options button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nft-market-select {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--white);
  font: inherit;
  font-size: 12px;
}

.nft-market-actions,
.gift-panel-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.nft-market-actions {
  grid-template-columns: 1fr 1fr;
}

.nft-market-actions [data-market-wallet] {
  grid-column: 1 / -1;
}

.gift-panel-actions {
  grid-template-columns: 1fr;
}

.nft-market-auth-status {
  color: var(--gray);
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}

.nft-market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--nft-card-size, 156px), var(--nft-card-size, 156px)));
  gap: 10px;
  justify-content: start;
}

.nft-market-grid.telegram-market-grid {
  /* Fixed card size: default panel (~360px) fits 3; wider → more columns. */
  --nft-card-size: 100px;
  --nft-grid-gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(var(--nft-card-size), var(--nft-card-size)));
  justify-content: center;
  justify-items: center;
  align-items: start;
  gap: var(--nft-grid-gap);
  overflow: visible;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

.nft-market-grid.telegram-market-grid > .telegram-market-card {
  width: var(--nft-card-size);
  max-width: var(--nft-card-size);
  box-sizing: border-box;
}

.nft-market-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.nft-market-card-art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-content);
  font-size: 18px;
}

.nft-market-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nft-market-owner {
  position: absolute;
  z-index: 2;
  top: 6px;
  left: 6px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  max-width: calc(100% - 12px);
  padding: 4px 6px 4px 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  color: #fff;
  backdrop-filter: blur(10px);
}

.nft-market-owner-avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  background: #24212b;
  color: var(--accent-content);
  font-size: 10px;
}

.nft-market-owner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nft-market-owner-copy {
  display: grid;
  min-width: 0;
  line-height: 1.05;
}

.nft-market-owner-copy strong,
.nft-market-owner-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nft-market-owner-copy strong {
  color: #fff;
  font-size: 10px;
  font-weight: 500;
}

.nft-market-owner-copy small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 8px;
}

.nft-market-card .nft-market-owner-copy strong {
  color: #fff;
  font-size: 10px;
  font-weight: 500;
}

.nft-market-card .nft-market-owner-copy small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 8px;
}

.telegram-market-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  gap: 6px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  min-width: 0;
  position: relative;
  z-index: 0;
}

.telegram-market-card:hover,
.telegram-market-card:focus-visible {
  z-index: 2;
}

.telegram-market-card-owner {
  display: none;
}

.telegram-market-owner-badge {
  position: absolute;
  z-index: 4;
  top: 6px;
  left: 6px;
  display: inline-flex;
  align-items: flex-start;
  gap: 3px;
  max-width: calc(100% - 28px);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  overflow: visible;
}

.telegram-market-source-badge {
  pointer-events: none;
}

.telegram-market-source-avatar {
  background: #111113;
}

.telegram-market-source-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.telegram-market-owner-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  background: #111113;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.telegram-market-owner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.telegram-market-owner-avatar > span {
  display: grid;
  place-items: center;
}

.telegram-market-owner-name {
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
  margin-top: 1px;
  margin-left: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-align: left;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.nft-market-card-art.telegram-market-art {
  --gift-art-radius: 16px;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--gift-art-radius);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, var(--gift-center, #6c3bb0), var(--gift-edge, #17131e) 76%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.telegram-market-art-clip {
  display: none;
}

.telegram-market-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 1;
  pointer-events: none;
  background: transparent;
}

.telegram-pattern-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: 1;
  pointer-events: none;
}

.telegram-market-art .gift-pattern-grid {
  display: none;
}

.telegram-market-art img,
.telegram-market-art video,
.telegram-market-art .gift-lottie-model,
.telegram-market-fallback {
  position: relative;
  z-index: 1;
}

.telegram-market-model {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/*
  Telegram Unique Gift number: flat corner ribbon clipped by the
  card's rounded overflow (wrapped band, not a floating pill).
*/
.telegram-market-number {
  position: absolute;
  z-index: 5;
  top: 11px;
  right: -20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 14px;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: color-mix(in srgb, var(--gift-center, #6c3bb0) 70%, var(--gift-edge, #3f6b3a) 30%);
  color: var(--gift-text, #fff);
  font-size: 8px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transform: rotate(45deg);
  transform-origin: center center;
  box-shadow: none;
  pointer-events: none;
}

/* MRKT: yellow ribbon like the MRKT brand mark. */
.telegram-market-card-mrkt .telegram-market-number,
.telegram-market-number-mrkt {
  background: #ffe600;
  color: #111113;
}

.telegram-market-model img,
.telegram-market-model video,
.telegram-market-model .gift-lottie-model {
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.32));
}

.telegram-market-art > img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.32));
}

/* Portal / MRKT: preview is a full composite (backdrop + model), fill the card. */
.telegram-market-card-external .telegram-market-pattern {
  display: none;
}

.telegram-market-card-external .telegram-market-model img,
.telegram-market-card-external .telegram-market-model video,
.telegram-market-card-external .telegram-market-art > img,
.telegram-market-card-external .telegram-market-art > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.gift-detail-panel.gift-detail-external .gift-pattern {
  display: none;
}

.gift-detail-panel.gift-detail-external .gift-detail-art > img,
.gift-detail-panel.gift-detail-external .gift-detail-art > video,
.gift-detail-panel.gift-detail-external .gift-detail-art > .gift-lottie-model,
.gift-detail-panel.nft-gift.gift-detail-animating .gift-detail-art > img,
.gift-detail-panel.nft-gift.gift-detail-animating .gift-detail-art > video,
.gift-detail-panel.nft-gift.gift-detail-animating .gift-detail-art > .gift-lottie-model {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  animation: none;
}

/* Empty pattern layer must not paint CSS-dot placeholders over the gift. */
.gift-detail-hero > .gift-pattern:not(:has(*)) {
  background: none !important;
  opacity: 1;
}

.gift-detail-panel.nft-gift:not(.gift-detail-external) .gift-detail-hero > .gift-pattern {
  background: none;
}

.telegram-market-fallback {
  color: var(--accent-content);
  font-size: 46px;
  line-height: 1;
}

.telegram-market-card-title {
  display: block;
  min-width: 0;
  padding: 0 2px;
}

.telegram-market-card-title strong {
  display: block;
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegram-market-card-title small {
  display: none;
}

.telegram-market-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  padding: 0 2px;
}

.telegram-market-attrs i {
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--gray);
  font-size: 9px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegram-market-buy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.telegram-market-price {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--pink);
  border: none;
  color: var(--accent-on-content);
  white-space: nowrap;
  overflow: hidden;
}

.telegram-market-cart-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #16151a;
  color: #fff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.telegram-market-cart-btn:hover,
.telegram-market-cart-btn:focus-visible {
  filter: brightness(1.18);
}

.telegram-market-cart-btn.in-cart {
  background: #1f1e24;
  color: var(--pink);
}

.telegram-market-cart-btn svg {
  display: block;
  width: 11px;
  height: 11px;
}

.nft-market-head-actions #nftMarketCart {
  position: relative;
  color: var(--accent-content);
}

.nft-market-head-actions #nftMarketCart.has-items,
.nft-market-head-actions #nftMarketCart.active {
  color: var(--pink);
}

.nft-market-cart-count {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--pink);
  color: var(--accent-on-content);
  font-size: 8px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

.nft-market-cart-view {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 0;
}

.nft-market-cart-view .nft-market-cart-grid {
  justify-content: start;
  justify-items: start;
  align-content: start;
}

.nft-market-cart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.nft-market-cart-toolbar strong {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

.nft-market-cart-back {
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 6px 10px;
}

.nft-market-cart-list {
  display: grid;
  gap: 8px;
}

.nft-market-cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.nft-market-cart-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.nft-market-cart-copy strong,
.nft-market-cart-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nft-market-cart-copy strong {
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.nft-market-cart-copy small {
  color: var(--gray);
  font-size: 11px;
}

.nft-market-cart-remove {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  line-height: 1;
}

.telegram-market-price-main {
  color: var(--accent-on-content);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  flex: 0 0 auto;
}

.telegram-market-price-ton {
  color: color-mix(in srgb, var(--accent-on-content) 86%, transparent);
  font-size: 8px;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nft-market-card strong,
.nft-market-card small,
.nft-market-card em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nft-market-card strong {
  font-size: 12px;
}

.nft-market-card small {
  color: var(--gray);
  font-size: 10px;
}

.nft-market-card em {
  color: var(--accent-content);
  font-style: normal;
  font-size: 11px;
}

.nft-market-empty {
  padding: 18px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  color: var(--gray);
  text-align: center;
}

.nft-market-empty.loading {
  border: 0;
  background: transparent;
}

.gift-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gift-panel-item {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 112px;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--white);
  cursor: pointer;
  font: inherit;
}

.gift-panel-item span {
  font-size: 30px;
}

.gift-panel-item small {
  color: var(--accent-content);
}

.regular-star-gifts-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.regular-star-gift {
  min-height: 142px;
  padding: 10px;
  align-content: center;
}

.regular-star-gift:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.regular-star-gift strong {
  max-width: 100%;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
}

.gift-panel-regular-art {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
}

.gift-panel-regular-art img,
.gift-panel-regular-art video,
.gift-panel-regular-art .gift-lottie-model {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.gift-panel-subscription-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gift-panel-nft-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gift-panel-nft-tile {
  grid-template-rows: minmax(0, 1fr) auto auto;
  aspect-ratio: auto;
  min-height: 168px;
  cursor: default;
}

.gift-panel-nft-tile .gift-label {
  position: static;
  margin-top: 4px;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}

.gift-panel-transfer {
  display: block;
  width: calc(100% - 12px);
  margin: 6px auto 8px;
  min-height: 30px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.gift-panel-transfer:hover,
.gift-panel-transfer:focus-visible {
  background: rgba(255, 255, 255, 0.05);
}

.gift-panel-transfer:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gift-panel-empty {
  padding: 18px 8px;
  color: var(--gray);
  font-size: 13px;
  text-align: center;
}

.gift-panel-empty.loading {
  opacity: 0.8;
}

.gift-panel-hint {
  margin: 0;
  padding: 0 4px;
  color: var(--gray);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.gift-panel-content {
  display: grid;
  gap: 12px;
  min-height: 0;
}

.gift-send-modal {
  z-index: 2200;
}

.gift-send-panel {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(360px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  background: var(--panel);
  color: var(--white);
  box-shadow: var(--floating-shadow);
}

.gift-send-panel h3 {
  margin: 0;
  padding-right: 30px;
  font-size: 18px;
  line-height: 1.25;
}

.gift-caption-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font: inherit;
  resize: vertical;
}

.gift-toggle-row {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--accent-content);
  font-size: 13px;
}

.gift-payment-box {
  display: grid;
  gap: 10px;
}

.extensions-billing-panel {
  position: absolute;
  top: 50px;
  right: 12px;
  bottom: 14px;
  z-index: 12;
  display: grid;
  align-content: start;
  gap: 12px;
  width: min(280px, calc(100% - 24px));
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--accent-line);
  border-radius: 18px;
  background: rgba(12, 11, 16, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.subscriptions-body {
  position: static;
  inset: auto;
  z-index: auto;
  width: auto;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.subscriptions-body .extensions-billing-head {
  grid-template-columns: minmax(0, 1fr);
}

.subscriptions-body .extensions-billing-offers {
  grid-template-columns: 1fr;
}

.billing-subscription-status {
  display: grid;
  gap: 4px;
  margin-bottom: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.billing-subscription-status strong {
  color: var(--white);
  font-size: 16px;
  line-height: 1.3;
}

.billing-subscription-status small {
  color: var(--gray);
  font-size: 12px;
  line-height: 1.35;
}

.billing-subscription-status.inactive {
  border-style: dashed;
  opacity: 0.92;
}

.billing-purchase-success {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 36px 18px 12px;
  text-align: center;
  animation: billing-purchase-success-enter 420ms ease both;
}

.billing-purchase-success strong {
  color: var(--white);
  font-size: 22px;
}

.billing-purchase-success p {
  margin: 0;
  color: var(--white);
  font-size: 15px;
}

.billing-purchase-success small {
  color: var(--gray);
  font-size: 12px;
}

.billing-purchase-success .billing-pay-button {
  margin-top: 10px;
  width: min(100%, 280px);
}

.billing-purchase-success-mark {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
}

.billing-purchase-success-mark svg {
  overflow: visible;
}

.billing-purchase-success-ring {
  fill: none;
  stroke: #34c759;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 201;
  stroke-dashoffset: 201;
  animation: billing-success-ring 560ms ease forwards 80ms;
}

.billing-purchase-success-check {
  fill: none;
  stroke: #34c759;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: billing-success-check 420ms ease forwards 320ms;
}

@keyframes billing-purchase-success-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes billing-success-ring {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes billing-success-check {
  to {
    stroke-dashoffset: 0;
  }
}

.extensions-billing-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 4px 10px;
  align-items: center;
}

.extensions-billing-head strong {
  color: var(--white);
  font-size: 17px;
}

.extensions-billing-head small {
  grid-column: 1;
  color: var(--gray);
  font-size: 11px;
}

.extensions-billing-head button {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 20px;
}

.extensions-billing-offers,
.extensions-wallets,
.extensions-payment-actions {
  display: grid;
  gap: 8px;
}

.extensions-billing-offers {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.extensions-plan-card,
.extensions-wallets button,
.extensions-payment-actions button,
.billing-currencies button,
.billing-pay-button {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.extensions-plan-card.active,
.extensions-wallets button.active,
.billing-currencies button.active {
  border-color: var(--accent-line);
  color: var(--accent-content);
}

.extensions-plan-card span,
.extensions-plan-card small,
.extensions-billing-label,
.extensions-billing-note {
  color: var(--gray);
  font-size: 11px;
}

.extensions-plan-card strong {
  font-size: 15px;
}

.plan-title-wrap {
  position: relative;
  display: inline-block;
  padding-right: 0.2em;
  padding-bottom: 0.55em;
}

.plan-title-name {
  display: inline;
}

.plan-discount-badge {
  position: absolute;
  right: 0;
  bottom: 0;
  transform: translate(100%, 0);
  margin-left: 2px;
  font-size: 10px;
  line-height: 1;
  font-weight: 600;
  color: var(--accent-content);
  white-space: nowrap;
}

.ninja-mode-info-link .plan-title-wrap {
  padding-bottom: 0.45em;
}

.extensions-plan-prices {
  display: grid;
  gap: 3px;
  color: var(--gray);
  font-size: 11px;
}

.extensions-plan-prices b {
  color: var(--white);
  font-weight: 500;
}

.extensions-plan-features {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.billing-back-button {
  justify-self: start;
  min-height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.billing-plan-detail {
  display: grid;
  gap: 10px;
}

.billing-plan-detail-card {
  cursor: default;
}

.billing-checkout {
  display: grid;
  gap: 12px;
}

.billing-checkout[hidden] {
  display: none;
}

.billing-promo-box {
  display: grid;
  gap: 6px;
}

.billing-promo-box > span {
  color: var(--gray);
  font-size: 11px;
}

.billing-promo-row {
  display: flex;
  gap: 8px;
}

.billing-promo-row input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  padding: 10px 12px;
  font: inherit;
}

.billing-promo-row button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.billing-promo-ok {
  color: #3ecf8e;
}

.billing-promo-error {
  color: #ff7b72;
}

.referral-modal {
  z-index: 36;
}

.referral-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.referral-body {
  position: static;
  inset: auto;
  z-index: auto;
  display: grid;
  gap: 14px;
  align-content: start;
  width: auto;
  min-height: 0;
  padding: 16px 18px 20px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(232, 86, 168, 0.14), transparent 55%),
    transparent;
  box-shadow: none;
}

.referral-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(232, 86, 168, 0.22), rgba(255, 255, 255, 0.03) 55%),
    rgba(255, 255, 255, 0.03);
}

.referral-hero-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.referral-kicker,
.referral-section-head span,
.referral-empty-note {
  color: var(--gray);
  font-size: 12px;
  line-height: 1.35;
}

.referral-earned {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--white);
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.referral-earned small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 600;
}

.referral-hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.4;
}

.referral-hero-rate {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1px solid rgba(232, 86, 168, 0.4);
  background: rgba(232, 86, 168, 0.18);
  color: #ffb6de;
  font-size: 18px;
  font-weight: 700;
}

.referral-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.referral-stat-card {
  display: grid;
  gap: 4px;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.referral-stat-card b {
  color: var(--white);
  font-size: 20px;
  line-height: 1.15;
}

.referral-stat-card small,
.referral-rate-card small {
  color: var(--gray);
  font-size: 11px;
  line-height: 1.3;
}

.referral-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.referral-section-head {
  display: grid;
  gap: 2px;
}

.referral-section-head strong,
.referral-subsection-title {
  color: var(--white);
  font-size: 15px;
  line-height: 1.3;
}

.referral-rate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.referral-rate-card {
  display: grid;
  gap: 4px;
  padding: 14px 12px;
  border: 1px solid rgba(232, 86, 168, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(232, 86, 168, 0.1), rgba(255, 255, 255, 0.03));
}

.referral-rate-card b {
  color: #f3a8d0;
  font-size: 20px;
  line-height: 1.15;
}

.referral-rate-card.is-plus {
  border-color: rgba(232, 86, 168, 0.32);
  background: linear-gradient(180deg, rgba(232, 86, 168, 0.2), rgba(255, 255, 255, 0.03));
}

.referral-rate-card.is-plus b {
  color: #ffb6de;
}

.referral-rate-card.is-premium {
  border-color: rgba(232, 86, 168, 0.48);
  background: linear-gradient(180deg, rgba(232, 86, 168, 0.32), rgba(255, 255, 255, 0.03));
}

.referral-rate-card.is-premium b {
  color: #ffcce8;
}

.referral-share-text {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  color: inherit;
  padding: 12px 14px;
  font: inherit;
  line-height: 1.45;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.referral-share-text.is-copied-flash,
.referral-link-chip.is-copied-flash {
  animation: referral-copied-flash 720ms ease;
}

.referral-primary-btn,
.referral-secondary-btn,
.referral-ghost-btn,
.referral-danger-btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease, opacity 140ms ease, box-shadow 180ms ease;
}

.referral-share-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.referral-share-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.referral-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(232, 86, 168, 0.28);
  border-radius: 12px;
  background: rgba(232, 86, 168, 0.14);
  color: #ffb6de;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.referral-icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(232, 86, 168, 0.22);
  border-color: rgba(232, 86, 168, 0.42);
}

.referral-icon-btn:active {
  transform: scale(0.96);
}

.referral-icon-btn svg {
  display: block;
  flex: 0 0 auto;
}

.referral-forward-account-modal {
  z-index: 80;
}

.referral-forward-account-panel {
  width: min(420px, calc(100vw - 24px));
}

.referral-forward-account-body {
  display: grid;
  gap: 10px;
  padding: 12px 14px 16px;
  max-height: min(60vh, 420px);
  overflow: auto;
}

.referral-forward-account-list {
  display: grid;
  gap: 8px;
}

.referral-forward-account-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--white);
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background 140ms ease, border-color 140ms ease;
}

.referral-forward-account-item:hover,
.referral-forward-account-item.active {
  border-color: rgba(232, 86, 168, 0.42);
  background: rgba(232, 86, 168, 0.12);
}

.referral-forward-account-item .item-avatar {
  width: 42px;
  height: 42px;
}

.referral-forward-account-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.referral-forward-account-copy strong,
.referral-forward-account-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-forward-account-copy small {
  color: var(--gray);
  font-size: 12px;
}

.referral-forward-account-empty {
  margin: 8px 0 0;
  color: var(--white);
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
}

.referral-forward-account-empty-hint {
  margin: 0 0 8px;
  color: var(--gray);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.referral-primary-btn {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: linear-gradient(180deg, #f06bbb, #e856a8);
  color: #fff;
}

.referral-primary-btn .referral-copy-label {
  display: inline-block;
}

.referral-primary-btn.is-copied {
  background: linear-gradient(180deg, #f58dcb, #e856a8);
  box-shadow: 0 0 0 1px rgba(255, 182, 222, 0.35), 0 10px 24px rgba(232, 86, 168, 0.28);
  animation: referral-copy-success 720ms cubic-bezier(0.2, 1.2, 0.34, 1);
}

.referral-primary-btn.is-copied .referral-copy-label {
  animation: referral-copy-label-pop 420ms ease;
}

.referral-primary-btn:hover,
.referral-secondary-btn:hover,
.referral-ghost-btn:hover {
  transform: translateY(-1px);
}

.referral-secondary-btn {
  width: 100%;
  background: rgba(232, 86, 168, 0.16);
  color: #ffb6de;
  border: 1px solid rgba(232, 86, 168, 0.28);
}

.referral-ghost-btn {
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.referral-danger-btn {
  background: rgba(255, 90, 90, 0.14);
  color: #ff9b9b;
}

@keyframes referral-copy-success {
  0% { transform: scale(1); }
  35% { transform: scale(0.96); }
  70% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes referral-copy-label-pop {
  0% { opacity: 0; transform: translateY(4px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes referral-copied-flash {
  0% {
    border-color: rgba(232, 86, 168, 0.55);
    box-shadow: 0 0 0 0 rgba(232, 86, 168, 0.35);
    background: rgba(232, 86, 168, 0.12);
  }
  100% {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 0 transparent;
    background: rgba(0, 0, 0, 0.22);
  }
}

.referral-link-list {
  display: grid;
  gap: 8px;
}

.referral-link-chip {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.referral-link-chip:hover {
  background: rgba(255, 255, 255, 0.07);
}

.referral-link-chip span {
  color: var(--gray);
  font-size: 11px;
}

.referral-link-chip code {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.referral-admin,
.referral-admin-settings,
.referral-promo-form,
.referral-promo-list {
  display: grid;
  gap: 12px;
}

.referral-admin-settings-grid,
.referral-promo-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.referral-admin-settings label,
.referral-promo-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--gray);
}

.referral-span-2 {
  grid-column: 1 / -1;
}

.referral-admin-settings input,
.referral-promo-form input,
.referral-promo-form select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  padding: 10px 12px;
  font: inherit;
}

.referral-promo-enabled {
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.86) !important;
}

.referral-promo-actions,
.referral-promo-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.referral-promo-row {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.referral-promo-row-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.referral-promo-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.referral-promo-row-top b {
  color: var(--white);
  font-size: 14px;
  word-break: break-word;
}

.referral-promo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.referral-promo-meta span,
.referral-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--gray);
  font-size: 11px;
  line-height: 1.2;
}

.referral-status-pill.is-on {
  background: rgba(232, 86, 168, 0.18);
  color: #ffb6de;
}

.referral-status-pill.is-off {
  background: rgba(255, 90, 90, 0.16);
  color: #ff9b9b;
}

.referral-status-pill.is-idle {
  background: rgba(255, 196, 86, 0.16);
  color: #ffd27a;
}

@media (max-width: 720px) {
  .referral-stats-grid,
  .referral-rate-grid,
  .referral-admin-settings-grid,
  .referral-promo-form-grid {
    grid-template-columns: 1fr;
  }

  .referral-hero {
    grid-template-columns: 1fr;
  }

  .referral-hero-rate {
    width: 64px;
    height: 64px;
  }
}

.billing-payment-method-label {
  color: var(--gray);
  font-size: 11px;
}

.billing-payment-method-value {
  font-weight: 600;
  font-size: 14px;
}

.billing-payment-method-button {
  flex: 1 1 0;
}

.billing-payment-method-button.active {
  color: var(--white);
}

.billing-open-balance-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.billing-open-balance-button:hover {
  background: rgba(255, 255, 255, 0.09);
}

.billing-open-balance-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.billing-open-balance-icons .billing-pay-icon {
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
}

.billing-periods {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.billing-periods::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: calc(3px + var(--billing-period-index, 0) * ((100% - 6px) / 4));
  width: calc((100% - 6px) / 4);
  border: 1px solid var(--accent-line);
  border-radius: 15px;
  transition: left 180ms ease;
}

.billing-period-button {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
}

.billing-period-button small {
  color: var(--gray);
  font-size: 10px;
}

.billing-period-button.active,
.billing-period-button.active strong,
.billing-period-button.active small {
  color: var(--accent-content);
}

.billing-add-wallet-button {
  min-height: 42px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-content);
  color: var(--accent-on-content);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-align: center;
}

.billing-amount-box {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.billing-amount-box span,
.billing-amount-box small {
  color: var(--gray);
  font-size: 11px;
}

.billing-amount-box strong {
  color: var(--white);
  font-size: 18px;
  font-weight: 500;
}

.billing-currency-select {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--accent-content);
  font: inherit;
  font-size: 12px;
}

.billing-stars-checkout {
  display: grid;
  gap: 12px;
}

.billing-stars-summary,
.billing-stars-invoice {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.billing-stars-summary strong {
  color: var(--accent-content);
  font-size: 18px;
  font-weight: 500;
}

.billing-stars-summary small,
.billing-stars-invoice small,
.billing-stars-invoice > span {
  color: var(--gray);
  font-size: 11px;
}

.billing-stars-groups {
  margin: 0;
  padding: 0;
  border: 0;
}

.billing-stars-account-list {
  display: grid;
  gap: 8px;
}

.billing-stars-empty {
  padding: 16px;
  color: var(--gray);
  text-align: center;
  font-size: 12px;
}

.billing-stars-account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(124px, 0.62fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.billing-stars-account-row.selected {
  border-color: var(--accent-line);
}

.billing-stars-account {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.billing-stars-account .item-avatar {
  width: 38px;
  height: 38px;
}

.billing-stars-amount {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 6px;
  align-items: center;
}

.billing-stars-amount input {
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--white);
  font: inherit;
  font-size: 12px;
}

.billing-stars-amount span {
  color: var(--gray);
  font-size: 11px;
  white-space: nowrap;
}

.billing-stars-amount button {
  grid-column: 1 / -1;
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.billing-stars-amount button:disabled,
.billing-stars-confirm:disabled {
  opacity: 0.45;
  cursor: default;
}

.billing-stars-invoice-controls {
  display: grid;
  grid-template-columns: minmax(118px, 0.82fr) minmax(0, 1fr);
  gap: 8px;
}

.billing-stars-invoice-sender {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
}

.billing-stars-invoice-sender > span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
}

.billing-stars-invoice-amount-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.billing-stars-invoice-amount-controls input {
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--white);
  font: inherit;
  font-size: 12px;
}

.billing-stars-invoice-amount-controls button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  white-space: nowrap;
}

.billing-stars-invoice-controls select,
.billing-stars-invoice-controls input {
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--white);
  font: inherit;
  font-size: 12px;
}

.billing-stars-invoice-controls button {
  grid-column: 1 / -1;
  min-height: 38px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.subscriptions-panel .extensions-head {
  z-index: 12;
  padding: 7px 7px 7px 54px;
  overflow: visible;
}

.subscriptions-panel .extensions-head h2 {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  max-width: none;
  margin: 0;
  overflow: visible;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}

.subscriptions-panel .extensions-head-logo {
  flex-shrink: 0;
}

.subscriptions-head-balance {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 12;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  transform: none;
  pointer-events: auto;
}

.subscriptions-head-balance button {
  position: relative;
  z-index: 12;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 28px;
  white-space: nowrap;
  pointer-events: auto;
}

#subscriptionsTonBalance {
  margin-left: 0;
}

.voul-balance-topup-controls-single {
  grid-template-columns: minmax(0, 1fr);
}

.voul-balance-body .billing-stars-invoice-controls select,
.voul-balance-body .billing-stars-invoice-controls input {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  background: transparent;
}

.voul-balance-body .billing-stars-invoice-sender > span {
  color: rgba(255, 255, 255, 0.55);
}

.voul-balance-body .billing-stars-invoice-controls button {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.billing-stars-account-row.status-pending,
.billing-stars-invoice-row.status-pending,
.voul-balance-operation.status-pending {
  border-color: #f5c542;
  box-shadow: inset 0 0 0 1px rgba(245, 197, 66, 0.35);
}

.billing-stars-account-row.status-paid,
.billing-stars-invoice-row.status-paid,
.voul-balance-operation.status-completed {
  border-color: #3ecf6d;
  box-shadow: inset 0 0 0 1px rgba(62, 207, 109, 0.35);
}

.billing-stars-account-row.status-declined,
.billing-stars-invoice-row.status-declined,
.voul-balance-operation.status-declined {
  border-color: #ff5f57;
  box-shadow: inset 0 0 0 1px rgba(255, 95, 87, 0.35);
}

.billing-stars-invoice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.billing-stars-invoice-row strong {
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
}

.billing-stars-invoice-row small {
  color: var(--gray);
  font-size: 11px;
}

.billing-stars-invoice-amount {
  color: var(--accent-content);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.voul-balance-modal {
  z-index: 37;
}

.voul-balance-panel {
  grid-template-rows: auto minmax(0, 1fr);
  isolation: isolate;
}

.voul-balance-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.voul-balance-glow-blob {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(48px);
  opacity: 0.55;
}

.voul-balance-glow-a {
  top: -90px;
  left: -100px;
  width: 280px;
  height: 260px;
  background: radial-gradient(
    circle,
    rgba(232, 86, 168, 0.42) 0%,
    rgba(232, 86, 168, 0.16) 45%,
    transparent 70%
  );
}

.voul-balance-glow-b {
  top: 22%;
  right: -110px;
  width: 260px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(232, 86, 168, 0.36) 0%,
    rgba(232, 86, 168, 0.12) 48%,
    transparent 70%
  );
}

.voul-balance-panel > .extensions-head,
.voul-balance-panel > .voul-balance-body {
  position: relative;
  z-index: 1;
}

.voul-balance-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  padding: 16px 14px 14px;
  overflow: auto;
}

.voul-balance-tabs {
  margin-bottom: 2px;
}

.voul-balance-hero {
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 28px 14px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.voul-balance-hero.tonkeeper-like {
  padding-top: 36px;
  padding-bottom: 8px;
}

.voul-balance-hero-label {
  color: var(--gray);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.voul-balance-hero strong {
  color: var(--white);
  font-size: clamp(48px, 12vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.voul-balance-hero small {
  color: var(--gray);
  font-size: 13px;
}

.voul-balance-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 8px 0 4px;
}

.voul-balance-plus {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff82c4 0%, #e856a8 100%);
  color: #fff;
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(232, 86, 168, 0.35);
}

.voul-balance-plus:active {
  transform: scale(0.96);
}

.voul-balance-refresh {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  cursor: pointer;
}

.voul-balance-refresh:hover,
.voul-balance-refresh:focus-visible {
  border-color: color-mix(in srgb, var(--pink) 55%, transparent);
  background: color-mix(in srgb, var(--pink) 18%, transparent);
  outline: none;
}

.voul-balance-refresh:active {
  transform: scale(0.96);
}

.voul-balance-refresh.is-spinning svg {
  animation: voul-balance-refresh-spin 0.8s linear infinite;
}

@keyframes voul-balance-refresh-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.voul-balance-back {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--accent-content);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.voul-balance-topup-menu,
.voul-balance-flow {
  display: grid;
  gap: 14px;
  min-height: 100%;
  align-content: start;
}

.voul-balance-topup-menu h3,
.voul-balance-flow h3 {
  margin: 0;
  color: var(--white);
  font-size: 22px;
  font-weight: 600;
}

.voul-balance-topup-options {
  display: grid;
  gap: 10px;
}

.voul-balance-topup-option {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  text-align: left;
  cursor: pointer;
}

.voul-balance-topup-option:active {
  background: rgba(255, 255, 255, 0.08);
}

.voul-balance-flow-hint,
.voul-balance-transfer-card p,
.voul-balance-transfer-card small {
  margin: 0;
  color: var(--gray);
  font-size: 13px;
  line-height: 1.45;
}

.voul-balance-transfer-card {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 18px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.voul-balance-network {
  color: var(--gray);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.voul-balance-qr {
  width: min(220px, 70vw);
  height: auto;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
}

.voul-balance-copy-chip {
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--white);
  font: inherit;
  font-size: 13px;
  word-break: break-all;
  cursor: pointer;
}

.voul-balance-copy-chip.accent {
  border-color: color-mix(in srgb, var(--pink) 55%, transparent);
  background: color-mix(in srgb, var(--pink) 16%, transparent);
  color: #ff82c4;
  font-size: 16px;
  font-weight: 600;
}

.voul-balance-field {
  display: grid;
  gap: 8px;
  color: var(--gray);
  font-size: 12px;
}

.voul-balance-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--white);
  font: inherit;
  font-size: 18px;
}

.voul-balance-wallet-section {
  display: grid;
  gap: 16px;
  align-content: start;
}

.voul-balance-connect-wallet {
  width: 100%;
  min-height: 52px;
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff82c4 0%, #e856a8 100%);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(232, 86, 168, 0.28);
}

.voul-balance-connect-wallet:active {
  transform: scale(0.985);
}

.voul-balance-connecting {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 22px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.voul-balance-connecting strong {
  color: var(--white);
  font-size: 16px;
}

.voul-balance-connecting small {
  color: var(--gray);
  font-size: 13px;
  line-height: 1.4;
}

.voul-balance-connecting-actions {
  display: grid;
  gap: 8px;
  width: min(100%, 320px);
  margin-top: 4px;
}

.voul-balance-connecting-actions button {
  min-height: 40px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.voul-balance-connecting-actions .billing-stars-primary {
  border: 0;
  background: var(--pink);
  color: var(--accent-on-content);
}

.voul-balance-connecting-actions .billing-stars-secondary {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--accent-content, #fff);
}

.voul-balance-connect-qr {
  width: min(220px, 70vw);
  height: auto;
  margin: 8px auto 0;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
}

.voul-balance-connect-qr-pending {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: var(--gray);
  font-size: 13px;
}

.voul-balance-connecting .voul-balance-copy-connect-link {
  margin-top: 4px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--accent-content, #fff);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.voul-balance-connecting small b {
  color: var(--white);
  font-weight: 600;
}

.voul-balance-manual-wallet {
  display: grid;
  gap: 6px;
  width: min(100%, 320px);
  margin-top: 8px;
  text-align: left;
}

.voul-balance-manual-wallet > span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
}

.voul-balance-manual-wallet-input {
  min-height: 40px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--white);
  font: inherit;
  font-size: 12px;
}

.voul-balance-connected-wallet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.voul-balance-wallet-address {
  overflow: hidden;
  color: var(--white);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.voul-balance-wallet-trash {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 80, 80, 0.12);
  color: #ff8f8f;
  cursor: pointer;
}

.voul-balance-wallet-trash:hover,
.voul-balance-wallet-trash:focus-visible {
  background: rgba(255, 80, 80, 0.2);
}

.voul-balance-pay-amount {
  display: grid;
  gap: 8px;
}

.voul-balance-amount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.voul-balance-amount-row input {
  border-radius: 14px;
}

.voul-balance-amount-currency {
  min-width: 72px;
  padding: 12px 10px;
  border: 1px solid color-mix(in srgb, var(--pink) 55%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--pink) 18%, transparent);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.voul-balance-amount-currency:hover,
.voul-balance-amount-currency:focus-visible {
  border-color: color-mix(in srgb, var(--pink) 80%, transparent);
  background: color-mix(in srgb, var(--pink) 28%, transparent);
  outline: none;
}

.voul-balance-amount-currency:active {
  transform: scale(0.97);
}

.voul-balance-convert-hint {
  color: var(--gray);
  font-size: 13px;
}

.voul-balance-topup {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.voul-balance-topup > span {
  color: var(--gray);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.voul-balance-topup .billing-stars-invoice {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.voul-balance-topup .billing-stars-account-row,
.voul-balance-topup .billing-stars-invoice-row {
  border: 0;
  border-radius: 0;
  background: none;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.voul-balance-topup .billing-stars-account-row:last-child,
.voul-balance-topup .billing-stars-invoice-row:last-child {
  border-bottom: 0;
}

.voul-balance-topup .billing-stars-account-row.status-pending,
.voul-balance-topup .billing-stars-invoice-row.status-pending,
.voul-balance-topup .billing-stars-account-row.status-paid,
.voul-balance-topup .billing-stars-invoice-row.status-paid,
.voul-balance-topup .billing-stars-account-row.status-declined,
.voul-balance-topup .billing-stars-invoice-row.status-declined {
  box-shadow: none;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.voul-balance-topup .billing-stars-account-row.status-pending,
.voul-balance-topup .billing-stars-invoice-row.status-pending {
  border-left: 2px solid #f5c542;
  padding-left: 8px;
}

.voul-balance-topup .billing-stars-account-row.status-paid,
.voul-balance-topup .billing-stars-invoice-row.status-paid {
  border-left: 2px solid #3ecf6d;
  padding-left: 8px;
}

.voul-balance-topup .billing-stars-account-row.status-declined,
.voul-balance-topup .billing-stars-invoice-row.status-declined {
  border-left: 2px solid #ff5f57;
  padding-left: 8px;
}

.voul-balance-topup-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.voul-balance-topup-controls button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 20px;
}

.voul-balance-topup-controls input {
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 16px;
}

.voul-balance-topup-controls input:focus {
  outline: none;
  border-bottom-color: var(--accent-line);
}

.voul-balance-subscription {
  padding: 0 0 0 10px;
  border: 0;
  border-left: 2px solid #3ecf6d;
  border-radius: 0;
  background: none;
  color: #9ef0b8;
  font-size: 12px;
}

.voul-balance-operations {
  display: grid;
  gap: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.voul-balance-operations > span {
  color: var(--gray);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.voul-balance-operation {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.voul-balance-operation:last-child {
  border-bottom: 0;
}

.voul-balance-operation.status-pending,
.voul-balance-operation.status-completed,
.voul-balance-operation.status-declined {
  box-shadow: none;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.voul-balance-operation.status-pending {
  border-left: 2px solid #f5c542;
  padding-left: 10px;
}

.voul-balance-operation.status-completed {
  border-left: 2px solid #3ecf6d;
  padding-left: 10px;
}

.voul-balance-operation.status-declined {
  border-left: 2px solid #ff5f57;
  padding-left: 10px;
}

.voul-balance-operation.clickable {
  cursor: pointer;
}

.voul-balance-operation.clickable:hover {
  background: rgba(255, 255, 255, 0.03);
}

.voul-balance-pay-invoice-head small + small {
  margin-top: 2px;
}

.voul-balance-operation strong {
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
}

.voul-balance-operation small {
  color: var(--gray);
  font-size: 11px;
}

.voul-balance-operation-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.voul-balance-operation-amount {
  color: var(--accent-content);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.voul-balance-pay-invoice-head {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 8px 0 4px;
  text-align: center;
}

.voul-balance-pay-invoice-head strong {
  color: var(--white);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}

.voul-balance-pay-invoice-head small {
  color: var(--gray);
  font-size: 12px;
}

.voul-balance-pay-invoice .billing-stars-invoice {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.voul-balance-invoice-message {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--gray);
  font-family: inherit;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.voul-balance-invoice-payers {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.voul-balance-invoice-payers > span {
  color: var(--gray);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.voul-balance-invoice-payer-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.voul-balance-invoice-payer-row strong {
  color: var(--white);
  font-weight: 500;
}

.voul-balance-invoice-error {
  padding: 8px 10px;
  border-left: 2px solid #ff5f57;
  color: #ffb4b0;
  font-size: 12px;
}

.voul-balance-payment-messages {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.voul-balance-payment-messages > span {
  color: var(--gray);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.voul-balance-payment-message {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.voul-balance-payment-message strong {
  color: var(--white);
  font-size: 13px;
  font-weight: 500;
}

.voul-balance-payment-message small {
  color: var(--gray);
  font-size: 11px;
  white-space: pre-wrap;
}

.billing-connected-wallet {
  display: grid;
  grid-template-columns: 28px minmax(0, auto) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.billing-wallet-avatar-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.billing-wallet-avatar-button:hover .wallet-logo {
  box-shadow: 0 0 0 1px rgba(232, 86, 168, 0.45);
}

.billing-wallet-remove-button {
  border: 0;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.nft-market-head-actions #nftMarketWallet.connected {
  width: 28px;
  height: 28px;
  padding: 0;
  overflow: hidden;
}

.nft-market-head-actions #nftMarketWallet.connected img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.billing-connected-wallet[hidden] {
  display: none;
}

.billing-connected-wallet strong,
.billing-connected-wallet code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.billing-connected-wallet strong {
  color: var(--white);
  font-size: 12px;
  font-weight: 500;
}

.billing-connected-wallet code {
  color: var(--gray);
  font-family: inherit;
  font-size: 11px;
}

.billing-connected-wallet button {
  border: 0;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.billing-wallet-overlay {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(16px);
}

.billing-wallet-dialog {
  position: relative;
  width: min(520px, calc(100vw - 36px));
  max-height: min(76vh, 620px);
  overflow: auto;
  padding: 42px 18px 18px;
  border: 1px solid var(--accent-line);
  border-radius: 22px;
  background: rgba(12, 11, 16, 0.82);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
}

.billing-wallet-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 20px;
  line-height: 1;
}

.billing-wallet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.billing-wallet-option {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 6px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  text-align: center;
}

.billing-wallet-option:hover {
  background: rgba(255, 255, 255, 0.075);
}

.billing-wallet-option-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.045));
  color: var(--accent-content);
  font-size: 18px;
  font-weight: 600;
}

.billing-wallet-option-logo img,
.wallet-logo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.billing-currencies {
  display: grid;
  gap: 8px;
}

.extensions-wallets button {
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
}

.wallet-logo {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-content);
}

.billing-autopay {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--gray);
  font-size: 12px;
}

.billing-autopay input {
  accent-color: var(--accent-content);
}

.billing-pay-button {
  place-items: center;
  min-height: 44px;
  border: 0;
  border-color: transparent;
  background: linear-gradient(135deg, #ff82c4 0%, #e856a8 100%);
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 24px rgba(232, 86, 168, 0.28);
}

.extensions-billing-note {
  margin: 0;
  line-height: 1.45;
}

.extensions-resize-handle {
  position: absolute;
  z-index: 8;
  touch-action: none;
}

.extensions-resize-n,
.extensions-resize-s {
  right: 18px;
  left: 18px;
  height: 14px;
}

.extensions-resize-n {
  top: 0;
  cursor: ns-resize;
}

.extensions-resize-s {
  bottom: 0;
  cursor: ns-resize;
}

.extensions-resize-e,
.extensions-resize-w {
  top: 18px;
  bottom: 18px;
  width: 14px;
}

.extensions-resize-e {
  right: 0;
  cursor: ew-resize;
}

.extensions-resize-w {
  left: 0;
  cursor: ew-resize;
}

.extensions-resize-ne,
.extensions-resize-se,
.extensions-resize-sw,
.extensions-resize-nw {
  z-index: 10;
  width: 18px;
  height: 18px;
}

.extensions-resize-ne {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}

.subscriptions-panel .extensions-resize-ne,
.subscriptions-panel .extensions-resize-n {
  right: 72px;
}

.subscriptions-panel .extensions-resize-e {
  top: 42px;
}

.extensions-resize-se {
  right: 0;
  bottom: 0;
  cursor: nwse-resize;
}

.extensions-resize-sw {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
}

.extensions-resize-nw {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}

.extensions-tabs {
  position: relative;
  display: flex;
  min-height: 46px;
  margin: 14px 16px 8px;
  padding: 4px;
  border-radius: 999px;
  background: #1c1b22;
}

.extensions-tabs::before {
  content: "";
  position: absolute;
  inset: 4px auto 4px 4px;
  width: calc(50% - 4px);
  border: 1px solid var(--accent-content);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-content) 24%, transparent);
  transform: translateX(calc(var(--extension-tab-index, 0) * 100%));
  transition: transform 240ms ease;
}

.extensions-tabs button {
  position: relative;
  z-index: 1;
  flex: 1;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.extensions-tabs button.active {
  color: var(--white);
}

.extensions-body {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 8px 16px 20px;
}

.extensions-loading,
.extensions-empty {
  padding: 28px 8px;
  color: var(--gray);
  font-size: 13px;
  text-align: center;
}

.extension-list {
  display: grid;
}

.extension-list-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 10px 4px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.extension-list-logo {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
}

.extension-list-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.extension-list-copy strong,
.extension-list-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.extension-list-copy strong {
  font-size: 13px;
}

.extension-list-copy small {
  color: var(--gray);
  font-size: 10px;
}

.extension-list-price {
  color: var(--pink);
  font-size: 12px;
  white-space: nowrap;
}

.chat-broadcasts-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(360px, calc(100vw - 32px));
  height: min(540px, calc(100dvh - 32px));
}

.chat-broadcasts-panel .extensions-head h2 {
  justify-self: center;
  max-width: calc(100% - 132px);
  text-align: center;
}

.chat-broadcasts-tabs {
  margin: 10px 12px 0;
}

.chat-broadcasts-body {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.chat-broadcasts-add-button {
  position: absolute;
  top: 5px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 20px;
  line-height: 1;
}

.chat-broadcasts-add-button:hover {
  background: rgba(255, 255, 255, 0.07);
}

@media (max-width: 900px) {
  .chat-broadcasts-add-button {
    right: 58px;
  }
}

.chat-broadcast-create {
  min-height: 36px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.chat-broadcast-create:disabled {
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--gray);
  cursor: default;
}

.chat-broadcast-chat-list,
.chat-broadcast-list,
.chat-broadcast-foreign-list {
  display: grid;
  gap: 6px;
}

.chat-broadcast-chat-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 62px;
  padding: 8px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.chat-broadcast-chat-row:disabled {
  cursor: default;
}

.chat-broadcast-chat-row:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.08);
}

.chat-broadcast-avatar-wrap {
  position: relative;
  width: 44px;
  height: 44px;
}

.chat-broadcast-avatar {
  width: 44px;
  height: 44px;
  font-size: 15px;
}

.chat-broadcast-count {
  position: absolute;
  left: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #0c0b10;
  border-radius: 999px;
  background: var(--accent-content);
  color: var(--accent-on-content);
  font-size: 10px;
  line-height: 1;
}

.chat-broadcast-chat-meta,
.chat-broadcast-item-main,
.chat-broadcast-detail-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chat-broadcast-chat-meta strong,
.chat-broadcast-chat-meta small,
.chat-broadcast-item-main strong,
.chat-broadcast-item-main small,
.chat-broadcast-detail-copy strong,
.chat-broadcast-detail-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-broadcast-chat-meta strong,
.chat-broadcast-item-main strong,
.chat-broadcast-detail-copy strong {
  font-size: 13px;
  font-weight: 400;
}

.chat-broadcast-chat-meta small,
.chat-broadcast-item-main small,
.chat-broadcast-detail-copy small {
  color: var(--gray);
  font-size: 11px;
}

.chat-broadcast-detail-head {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-broadcast-create-head {
  grid-template-columns: 34px minmax(0, 1fr);
}

.chat-broadcast-create-list {
  display: grid;
  gap: 8px;
}

.chat-broadcast-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.chat-broadcast-create-row .chat-broadcast-chat-row {
  min-width: 0;
}

.chat-broadcast-back,
.chat-broadcast-icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
}

.chat-broadcast-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 62px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.chat-broadcast-item-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.chat-broadcast-foreign-row {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.chat-broadcast-foreign-title,
.chat-broadcast-accepted-label {
  padding: 0 8px;
  color: var(--gray);
  font-size: 11px;
}

.chat-broadcast-accepted-label {
  color: var(--accent-content);
}

.chat-broadcast-invite-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.chat-broadcast-invite-actions button {
  min-height: 34px;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.chat-broadcast-add {
  border: 1px solid var(--accent-line);
  color: var(--accent-content);
}

.chat-broadcast-reject {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--gray);
}

.chat-broadcast-settings-panel {
  width: min(460px, 100%);
}

.chat-broadcast-settings-form {
  overflow: auto;
  padding-right: 2px;
}

.chat-broadcast-settings-inline {
  max-height: none;
}

.chat-broadcast-settings-head {
  grid-template-columns: 34px minmax(0, 1fr);
}

.chat-broadcast-option-card,
.chat-broadcast-connected-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.chat-broadcast-option-toggle {
  margin: 0;
  align-items: center;
}

.chat-broadcast-option-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.chat-broadcast-option-content.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.chat-broadcast-connected-box strong {
  font-size: 12px;
  font-weight: 400;
}

.chat-broadcast-connected-list {
  display: grid;
  gap: 6px;
  color: var(--gray);
  font-size: 11px;
}

.chat-broadcast-date-field {
  position: relative;
}

.chat-broadcast-date-button {
  width: 100%;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.chat-broadcast-calendar {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(39, 37, 48, 0.98), rgba(22, 20, 28, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.chat-broadcast-calendar[hidden] {
  display: none;
}

.chat-broadcast-calendar-head,
.chat-broadcast-calendar-weekdays,
.chat-broadcast-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: center;
  text-align: center;
}

.chat-broadcast-calendar-head {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
}

.chat-broadcast-calendar-head strong {
  font-size: 13px;
  font-weight: 500;
  text-transform: capitalize;
}

.chat-broadcast-calendar-head button,
.chat-broadcast-calendar-grid button {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  font: inherit;
}

.chat-broadcast-calendar-head button {
  width: 32px;
  height: 32px;
  color: var(--accent-content);
  font-size: 20px;
}

.chat-broadcast-calendar-weekdays {
  color: var(--gray);
  font-size: 10px;
}

.chat-broadcast-calendar-grid {
  gap: 4px;
}

.chat-broadcast-calendar-grid button {
  aspect-ratio: 1;
  min-width: 0;
  font-size: 12px;
}

.chat-broadcast-calendar-grid button.today {
  box-shadow: inset 0 0 0 1px rgba(232, 86, 168, 0.55);
}

.chat-broadcast-calendar-grid button.selected {
  background: var(--accent-content);
  color: var(--accent-on-content);
}

.chat-broadcast-settings-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.chat-broadcast-delete {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: transparent;
  color: #ff8ea8;
  cursor: pointer;
  font: inherit;
}

.chat-broadcast-audience-section {
  min-width: 0;
}

.chat-broadcast-audience-section .chat-folder-chat-section-head:has(.chat-folder-chat-count:only-child) {
  justify-content: flex-end;
}

.chat-broadcast-option-content .chat-folder-chat-list {
  min-height: 160px;
  max-height: min(28vh, 280px);
}

.extension-detail {
  display: grid;
  gap: 14px;
}

.extension-back {
  justify-self: start;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

.extension-detail h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 400;
}

.extension-carousel {
  display: grid;
  gap: 9px;
  overflow: hidden;
  touch-action: pan-y;
}

.extension-carousel-viewport {
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.extension-carousel-track {
  display: flex;
  gap: 12px;
  width: 100%;
  min-width: 0;
  transition: transform 420ms cubic-bezier(0.22, 0.75, 0.22, 1);
}

.extension-carousel-slide {
  flex: 0 0 min(82%, 320px);
  width: min(82%, 320px);
  min-width: 0;
  max-width: 320px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.extension-carousel-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.extension-carousel-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  min-height: 12px;
}

.extension-carousel-dot {
  position: relative;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.extension-carousel-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray);
  transform: translate(-50%, -50%);
  transition: width 180ms ease, height 180ms ease, background 180ms ease;
}

.extension-carousel-dot.active::before {
  width: 10px;
  height: 10px;
  background: var(--pink);
}

.extension-purchase-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.extension-install-button {
  min-height: 42px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: transparent;
  color: var(--pink);
  cursor: pointer;
  font: inherit;
}

.extension-rating-block {
  display: grid;
  gap: 4px;
  justify-items: end;
}

.extension-rating-line {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12px;
}

.extension-stars {
  position: relative;
  width: 78px;
  color: #34313a;
  letter-spacing: 1px;
  white-space: nowrap;
}

.extension-stars-fill {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  color: #a864ed;
  white-space: nowrap;
}

.extension-users {
  color: var(--gray);
  font-size: 10px;
}

.extension-description {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.extension-app {
  display: grid;
  gap: 14px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.extension-app h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
}

.extension-config-form,
.extension-group-form {
  display: grid;
  gap: 9px;
}

.extension-config-form input,
.extension-group-form input,
.extension-group-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--gray);
  border-radius: 10px;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 11px;
}

.extension-config-form button,
.extension-group-form button,
.extension-group-actions button {
  min-height: 38px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: transparent;
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
}

.extension-account-picker {
  display: grid;
  gap: 5px;
  max-height: 170px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}

.extension-account-picker label {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 30px;
  font-size: 11px;
}

.extension-account-picker input {
  min-height: 0;
  accent-color: var(--pink);
}

.extension-groups {
  display: grid;
  gap: 8px;
}

.extension-group-item {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.extension-group-item small {
  color: var(--gray);
  font-size: 10px;
  line-height: 1.4;
}

.extension-group-actions {
  display: flex;
  gap: 7px;
}

.extension-group-actions button {
  flex: 1;
}

@keyframes press-pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(0.985);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes presence-pulse {
  0%,
  100% {
    transform: scale(0.88);
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.5);
  }
  50% {
    transform: scale(1.25);
    box-shadow: 0 0 0 7px rgba(52, 199, 89, 0);
  }
}

.forward-list {
  display: grid;
  gap: 6px;
  max-height: 420px;
  overflow-y: auto;
}

.forward-head-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.forward-select-button,
.forward-done-button {
  min-width: 82px;
  height: 38px;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.forward-head-actions .modal-close {
  position: static;
  flex: 0 0 38px;
}

.forward-done-button:disabled {
  color: var(--gray);
  cursor: default;
}

.forward-head-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-right: 150px;
}

.forward-head-copy h2 {
  margin: 0;
}

.forward-author-toggle {
  width: max-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-content);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  text-align: left;
}

.forward-author-toggle.active {
  color: var(--gray);
}

#forwardModal .settings-head:has(.forward-done-button:not([hidden])) .forward-head-copy {
  padding-right: 240px;
}

@media (max-width: 520px) {
  #forwardModal .settings-head {
    min-height: 104px;
  }

  #forwardModal .forward-head-copy,
  #forwardModal .settings-head:has(.forward-done-button:not([hidden])) .forward-head-copy {
    padding-right: 0;
  }

  #forwardModal .forward-head-actions {
    left: 18px;
    top: 58px;
    justify-content: flex-end;
  }

  #forwardModal .forward-select-button,
  #forwardModal .forward-done-button {
    min-width: 74px;
    padding-inline: 12px;
  }
}

.forward-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  color: var(--white);
  text-align: left;
}

.forward-item.selection-mode {
  grid-template-columns: 20px 44px minmax(0, 1fr);
}

.forward-item.selected {
  border-color: var(--accent-line);
  background: #29282e;
}

.forward-item-check {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent-content);
  pointer-events: none;
}

.forward-item-copy {
  min-width: 0;
}

.forward-item .item-avatar {
  width: 42px;
  height: 42px;
}

.forward-item strong,
.forward-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 300;
}

.forward-item strong.premium-name {
  display: inline-flex;
}

.profile-item small {
  color: var(--gray);
}

@media (max-width: 900px) {
  * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }

  .message-text,
  .message-text *,
  .profile-body,
  .profile-body *,
  .profile-tab-content,
  .profile-tab-content * {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
  }

  html {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body {
    position: fixed;
    top: var(--browser-viewport-offset-top, 0px);
    left: 0;
    right: 0;
    width: 100%;
    height: var(--browser-viewport-height, 100dvh);
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.app-locked,
  body.no-telegram-session {
    overflow: hidden;
    height: var(--browser-viewport-height, 100dvh);
    min-height: 0;
  }

  .extensions-modal {
    padding: 0;
  }

  .extensions-panel {
    top: var(--browser-chrome-top) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: auto !important;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
    transform: none !important;
    padding-bottom: 0;
  }

  .telegram-mini-app .extensions-panel {
    top: var(--app-top-inset) !important;
    height: auto;
    padding-bottom: var(--app-bottom-inset);
  }

  .extensions-head {
    cursor: default;
  }

  .extensions-window-controls {
    display: none;
  }

  .extensions-billing-toggle {
    right: 58px;
  }

  .extensions-billing-panel {
    inset: 52px 10px 10px;
    width: auto;
    border-radius: 18px;
  }

  .subscriptions-body {
    position: static;
    inset: auto;
    width: auto;
    border: 0;
    border-radius: 0;
  }

  .extensions-close {
    display: grid;
  }

  .subscriptions-panel .extensions-head {
    padding-right: 54px;
  }

  .subscriptions-head-balance {
    right: 54px;
    top: 7px;
  }

  .extensions-resize-handle {
    display: none;
  }

  .telegram-mini-app .telegram-shell {
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    margin-top: 0;
    padding-top: var(--tg-mini-top-offset);
  }

  .telegram-mini-app-fullscreen .telegram-shell {
    margin-top: 0;
    padding-top: var(--tg-mini-top-offset);
    height: 100%;
    min-height: 0;
  }

  .telegram-mini-app-fullscreen .sidebar,
  .telegram-mini-app-fullscreen .workspace {
    height: 100%;
    min-height: 0;
  }

  .telegram-mini-app-fullscreen .extensions-panel {
    top: var(--app-top-inset) !important;
    height: auto;
    padding-bottom: var(--app-bottom-inset);
  }

  .telegram-mini-app .sidebar,
  .telegram-mini-app .workspace {
    height: 100%;
    min-height: 0;
  }

  .telegram-mini-app .sidebar {
    grid-template-rows: auto minmax(0, 1fr) calc(58px + var(--app-ui-bottom-inset));
  }

  .telegram-mini-app.app-locked .sidebar,
  .telegram-mini-app.no-telegram-session .sidebar {
    grid-template-rows: auto auto;
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .telegram-mini-app.app-locked .sidebar-body,
  .telegram-mini-app.no-telegram-session .sidebar-body,
  .telegram-mini-app.app-locked .sidebar-chats,
  .telegram-mini-app.no-telegram-session .sidebar-chats {
    overflow: visible;
    min-height: auto;
  }

  .telegram-mini-app.app-locked .telegram-shell,
  .telegram-mini-app.no-telegram-session .telegram-shell {
    height: var(--tg-viewport-height);
    min-height: 0;
    padding-top: var(--tg-mini-top-offset);
    overflow: hidden;
  }

  .telegram-mini-app .sidebar-head {
    padding-top: 12px;
  }

  .telegram-mini-app.app-locked .sidebar-head,
  .telegram-mini-app.no-telegram-session .sidebar-head {
    padding-top: max(8px, 4px);
  }

  .telegram-mini-app .chat-head {
    padding-top: 12px;
  }

  .telegram-mini-app .story-strip {
    margin-top: 0;
  }

  .telegram-mini-app .bottom-nav {
    align-items: center;
    padding-bottom: var(--app-ui-bottom-inset);
  }

  .telegram-mini-app .scroll-bottom {
    bottom: calc(82px + var(--app-ui-bottom-inset));
  }

  .telegram-mini-app .channel-message-button {
    bottom: calc(8px + var(--app-ui-bottom-inset));
  }

  .telegram-mini-app .modal {
    padding-top: calc(24px + var(--app-top-inset));
    padding-bottom: calc(24px + var(--app-bottom-inset));
  }

  .telegram-mini-app .media-viewer-modal {
    padding-top: var(--app-top-inset);
    padding-bottom: var(--app-bottom-inset);
  }

  .telegram-mini-app .media-viewer-modal .modal-close {
    top: calc(16px + var(--app-top-inset));
  }

  .telegram-mini-app .search-popup {
    padding-top: calc(96px + var(--app-top-inset));
    padding-bottom: calc(18px + var(--app-bottom-inset));
  }

  .telegram-shell {
    box-sizing: border-box;
    grid-template-columns: 1fr;
    height: 100%;
    min-height: 0;
    padding-top: var(--app-top-inset);
  }

  .sidebar {
    grid-template-rows: auto minmax(0, 1fr) calc(58px + var(--app-ui-bottom-inset));
    height: 100%;
    min-height: 0;
    border-right: 0;
  }

  .sidebar-resize-handle {
    display: none;
  }

  body.sidebar-compact .bottom-nav {
    display: grid;
  }

  body.sidebar-compact .sidebar {
    grid-template-rows: auto minmax(0, 1fr) calc(58px + var(--app-ui-bottom-inset));
  }

  body.sidebar-compact .sidebar-head,
  body.sidebar-compact .sidebar-title-row,
  body.sidebar-compact .search-box,
  body.sidebar-compact .sidebar-list .item-meta,
  body.sidebar-compact .sidebar-list .item-time,
  body.sidebar-compact .sidebar-list .list-item > .item-unread,
  body.sidebar-compact .sidebar-list .list-item > .item-unread-group {
    display: revert;
  }

  body.sidebar-compact .sidebar-list .item-unread-avatar {
    display: none;
  }

  body.sidebar-compact .sidebar-list > .list-item,
  body.sidebar-compact .pinned-chats-group .list-item {
    grid-template-columns: var(--chat-avatar-size) minmax(0, 1fr);
    justify-items: stretch;
    min-height: 66px;
    height: 66px;
    padding-block: 0;
  }

  body.sidebar-compact .account-row-settings,
  body.sidebar-compact .account-row-drag-handle,
  body.sidebar-compact .account-groups,
  body.sidebar-compact .calls-tabs,
  body.sidebar-compact .add-account-button,
  body.sidebar-compact .empty-list {
    display: revert;
  }

  .workspace {
    display: none;
    height: 100%;
    min-height: 0;
  }

  .bottom-nav {
    position: relative;
    z-index: 2;
    align-items: center;
    padding-bottom: var(--app-ui-bottom-inset);
  }

  .scroll-bottom {
    bottom: calc(82px + var(--app-ui-bottom-inset));
  }

  .channel-message-button {
    bottom: calc(8px + var(--app-ui-bottom-inset));
  }

  .chat-form {
    padding: 0 8px calc(8px + var(--app-ui-bottom-inset));
    grid-template-columns: minmax(0, 1fr) 48px;
  }

  body.chat-open .sidebar {
    display: none;
  }

  body.chat-open .workspace {
    display: grid;
  }

  body.chat-open .chat-head {
    grid-template-columns: 38px 46px minmax(0, 1fr) auto;
  }

  body.chat-open .chat-back-button {
    display: grid;
  }

  .workspace:has(.channel-message-button:not([hidden])) .chat-form {
    padding-left: 56px;
  }

  .chat-form:has(.mini-app-button:not([hidden])) {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }

  .profile-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .profile-tabs::-webkit-scrollbar {
    display: none;
  }

  .app-locked .sidebar-head,
  .no-telegram-session .sidebar-head,
  .app-locked .sidebar-list,
  .no-telegram-session .sidebar-list {
    width: min(100vw - 20px, 680px);
  }

  .app-locked .sidebar-head,
  .no-telegram-session .sidebar-head {
    padding: 4px 0 0;
    min-height: 0;
  }

  .app-locked #listTitle:empty,
  .no-telegram-session #listTitle:empty {
    display: none;
  }

  .app-locked .telegram-shell,
  .no-telegram-session .telegram-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .app-locked .sidebar,
  .no-telegram-session .sidebar {
    grid-template-rows: auto auto;
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0;
  }

  .app-locked .sidebar-body,
  .no-telegram-session .sidebar-body,
  .app-locked .sidebar-chats,
  .no-telegram-session .sidebar-chats {
    overflow: visible;
    min-height: auto;
  }

  .app-locked .sidebar-list,
  .no-telegram-session .sidebar-list {
    overflow: visible;
    min-height: auto;
    height: auto;
    padding-bottom: 12px;
  }

  .auth-screen {
    min-height: 0;
    align-content: start;
    gap: clamp(8px, 2.5vw, 14px);
    padding:
      8px
      0
      calc(12px + var(--auth-keyboard-inset, 0px));
  }

  .telegram-mini-app .auth-screen {
    /* Shell already applies --tg-mini-top-offset; avoid double inset. */
    padding-top: 8px;
  }

  .auth-screen-brand {
    position: relative;
    top: auto;
    left: 0;
    gap: clamp(2px, 1vw, 8px);
    width: 100%;
    max-width: 100%;
    margin-bottom: clamp(8px, 3vw, 18px);
    overflow: hidden;
  }

  .auth-screen-logo {
    flex: 0 0 auto;
    width: clamp(112px, 40vw, 180px);
    height: clamp(112px, 40vw, 180px);
    margin-right: clamp(-22px, -5vw, -10px);
    transform: translateY(8%);
  }

  .auth-screen-brand-title {
    flex: 1 1 0;
    min-width: 0;
    padding-bottom: 0;
    overflow: hidden;
    font-size: clamp(20px, 5.5vw, 34px);
    line-height: 1;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }

  .auth-grid-single {
    grid-template-columns: 1fr;
  }

  .auth-card {
    min-height: 0;
    border-radius: 26px;
    padding: 14px;
  }

  .auth-card h3 {
    font-size: clamp(15px, 4vw, 17px);
  }

  .auth-card p,
  .auth-card .auth-current-account small {
    font-size: clamp(10px, 2.8vw, 12px);
    line-height: 1.45;
  }

  .auth-card header > span {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .auth-card header {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
  }

  .auth-card header:not(:has(> span)) {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-hero h2 {
    font-size: 28px;
  }
}

.video-note-player {
  position: relative;
  width: min(240px, 64vw);
  height: min(240px, 64vw);
  margin: 0 auto;
  cursor: pointer;
  overflow: visible;
  transform-origin: center;
  transition: width 190ms ease, height 190ms ease, filter 190ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.video-note-player.playing,
.video-note-player.scrubbing {
  z-index: 4;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.32));
}

.video-note-player-shell {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.video-note-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  transform-origin: center;
  transform-box: fill-box;
  overflow: visible;
  transform: rotate(-90deg);
}

.video-note-ring-track {
  fill: none;
  stroke: transparent;
  stroke-width: 2;
  pointer-events: none;
}

.video-note-ring-progress {
  fill: none;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 2;
  stroke-linecap: butt;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.55));
  pointer-events: none;
  transition: stroke-dashoffset 0.08s linear;
}

.video-note-ring-hit-area {
  fill: none;
  stroke: transparent;
  stroke-width: 18;
  cursor: grab;
  pointer-events: stroke;
}

.video-note-player.scrubbing .video-note-ring-hit-area {
  cursor: grabbing;
}

.message.out.video-note-message .video-note-ring-progress {
  stroke: var(--accent-content);
}

.video-note-player-shell.unplayed .video-note-ring-progress {
  stroke-dashoffset: 295.31;
}

.video-note-media-wrap {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  overflow: hidden;
  clip-path: circle(50% at 50% 50%);
  background: var(--black);
}

.video-note-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.video-note-player-shell.loading .video-note-ring-progress {
  opacity: 0;
}

.video-note-load-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  animation: voice-message-load-spin 900ms linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 0);
}

.video-note-load-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  color: var(--white);
  pointer-events: none;
}

.video-note-load-overlay::before {
  content: "×";
  font-family: "Arial Rounded MT Bold", Arial, sans-serif;
  font-size: clamp(28px, 18vw, 52px);
  line-height: 1;
  transform: translateY(-1px);
}

.video-note-time {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  pointer-events: none;
}

.message.video-note-message.visual-media-only .message-meta {
  right: 0;
  bottom: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--gray);
}

.message.video-note-message .video-note-player {
  margin: 0;
}

.attachment-thumb.video-note-thumb {
  border-radius: 50%;
}

.attachment-thumb.video-note-thumb video {
  object-fit: cover;
}

.attachment-meta small.video-note-badge {
  color: var(--accent-content);
}

.video-note-editor-modal .video-note-editor-panel {
  width: min(420px, calc(100vw - 24px));
}

.video-note-editor-body {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.video-note-editor-viewport {
  position: relative;
  width: min(320px, calc(100vw - 72px));
  height: min(320px, calc(100vw - 72px));
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #111;
  touch-action: none;
}

.video-note-editor-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.video-note-editor-stage video {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  pointer-events: none;
}

.video-note-editor-mask {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

.video-note-editor-zoom {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.video-note-editor-zoom input[type="range"] {
  width: 100%;
}

.video-note-editor-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.video-note-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.video-note-editor-actions .primary {
  background: var(--accent-content);
  color: var(--accent-on-content);
  border: 0;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
}

.video-note-editor-actions button:not(.primary) {
  background: transparent;
  border: 1px solid var(--gray);
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
}

.viewer-media-wrap.viewer-video-note-wrap {
  width: min(360px, 86vw);
  height: min(360px, 86vw);
  border-radius: 50%;
  overflow: hidden;
}

.viewer-media-wrap.viewer-video-note-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewer-video-stage {
  position: relative;
  display: inline-grid;
  place-items: center;
  max-width: 100%;
  line-height: 0;
  background: #000;
}

.viewer-video-stage.is-native-fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  place-items: center;
}

.viewer-video-stage.is-native-fullscreen .viewer-media {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
}

.viewer-video-stage .viewer-media {
  grid-area: 1 / 1;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 72px);
}

.viewer-video-restart {
  grid-area: 1 / 1;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.viewer-video-restart[hidden] {
  display: none !important;
}

.viewer-video-restart svg {
  width: 34px;
  height: 34px;
}

.viewer-video-restart:hover {
  background: rgba(232, 86, 168, 0.88);
}

.viewer-video-chrome {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.viewer-video-chrome[hidden] {
  display: none !important;
}

.viewer-video-hud {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.viewer-video-hud-btn,
.viewer-video-tool-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 18, 18, 0.42);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  font: inherit;
  line-height: 0;
  transition: transform 0.12s ease, background 0.12s ease;
}

.viewer-video-hud-btn svg,
.viewer-video-tool-btn svg {
  width: 34px;
  height: 34px;
  display: block;
}

.viewer-video-seek-glyph {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
}

.viewer-video-seek-glyph svg {
  width: 34px;
  height: 34px;
}

.viewer-video-seek-num {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  pointer-events: none;
}

.viewer-video-hud-toggle {
  width: 96px;
  height: 96px;
}

.viewer-video-hud-toggle svg {
  width: 42px;
  height: 42px;
}

.viewer-video-hud-btn:hover,
.viewer-video-hud-btn:focus-visible,
.viewer-video-tool-btn:hover,
.viewer-video-tool-btn:focus-visible {
  background: rgba(232, 86, 168, 0.72);
  transform: scale(1.04);
}

.viewer-video-hud-btn:active,
.viewer-video-tool-btn:active {
  transform: scale(0.97);
}

.viewer-video-bottom {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  z-index: 21;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.viewer-video-time {
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  pointer-events: none;
}

.viewer-video-progress {
  pointer-events: auto;
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: rgba(170, 170, 170, 0.55);
  overflow: hidden;
  cursor: pointer;
}

.viewer-video-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--pink);
}

.viewer-video-tool-btn {
  width: 40px;
  height: 40px;
}

.viewer-video-tool-btn svg {
  width: 20px;
  height: 20px;
}

.viewer-video-menu {
  position: absolute;
  right: 16px;
  bottom: 68px;
  z-index: 22;
  min-width: 220px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(18, 18, 18, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  color: #fff;
  pointer-events: auto;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

.viewer-video-menu[hidden] {
  display: none !important;
}

.viewer-video-menu-label {
  margin: 0 0 8px;
  font-size: 12px;
  opacity: 0.8;
}

.viewer-video-menu-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.viewer-video-menu-chip,
.viewer-video-menu-item {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
}

.viewer-video-menu-chip {
  padding: 6px 10px;
}

.viewer-video-menu-chip.active {
  background: var(--pink);
  color: var(--accent-on-content);
}

.viewer-video-menu-item {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: left;
}

.viewer-video-menu-item:disabled {
  opacity: 0.45;
  cursor: default;
}

.viewer-video-menu-item:not(:disabled):hover,
.viewer-video-menu-chip:hover {
  background: rgba(232, 86, 168, 0.75);
}

.viewer-video-stage.is-native-fullscreen .viewer-video-chrome {
  z-index: 30;
}

.pip-video-holder {
  position: fixed;
  left: -120vw;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.chat-video-shell {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  line-height: 0;
  overflow: hidden;
}

.message.media-caption:not(.sticker-message) .chat-video-shell,
.message.media-only:not(.sticker-message) .chat-video-shell,
.message:not(.sticker-message) .visual-media-frame .chat-video-shell {
  width: 100%;
  border-radius: 0 0 10px 10px;
}

.chat-video-shell .message-media,
.chat-video-shell .chat-video-media {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: inherit;
}

.chat-video-poster {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  background: #000;
  border-radius: inherit;
}

.chat-video-poster[hidden] {
  display: none !important;
}

.chat-video-shell.has-visible-poster .chat-video-media {
  opacity: 0;
}

.video-note-poster {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
}

.video-note-poster[hidden] {
  display: none !important;
}

.album-video-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-video-chrome {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 28px 10px 8px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.55) 100%);
}

.chat-video-time {
  align-self: flex-start;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.chat-video-progress {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(160, 160, 160, 0.85);
  overflow: hidden;
}

.chat-video-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--pink);
}
.video-circle-recorder {
  --video-circle-size: min(
    calc(100vw - 80px),
    calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 168px)
  );
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.video-circle-recorder[hidden] {
  display: none !important;
}

.video-circle-preview-shell {
  width: var(--video-circle-size);
  height: var(--video-circle-size);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
  background: #000;
  pointer-events: none;
}

.video-circle-preview-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scaleX(var(--video-circle-mirror, 1));
}

.video-circle-side-controls {
  position: absolute;
  right: max(18px, calc(50% - var(--video-circle-size) / 2 - 58px));
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
}

.video-circle-flip-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.video-circle-flip-hint {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.2;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  pointer-events: none;
}

.video-circle-flip-hint[hidden] {
  display: none !important;
}

.video-circle-tool-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.video-circle-flip-btn::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 12c0 1.66 1.34 3 3 3 1.31 0 2.42-.84 2.83-2H17v2c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1h-4c-.55 0-1 .45-1 1s.45 1 1 1h2.17A2.99 2.99 0 0 0 12 14a3 3 0 0 0-3-3H7V9c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1h4c.55 0 1-.45 1-1z'/%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='M9 12c0 1.66 1.34 3 3 3 1.31 0 2.42-.84 2.83-2H17v2c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1h-4c-.55 0-1 .45-1 1s.45 1 1 1h2.17A2.99 2.99 0 0 0 12 14a3 3 0 0 0-3-3H7V9c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1h4c.55 0 1-.45 1-1z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.video-circle-torch-btn::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 2v2.07A7 7 0 0 0 5 11v1H3v2h2v1a7 7 0 0 0 4 6.93V22h2v-1.07A7 7 0 0 0 15 15v-1h2v-2h-2v-1a7 7 0 0 0-4-6.93V2H9zm2 4.56A5 5 0 0 1 14 11v1h1v2h-1v1a5 5 0 0 1-4 4.9V6.56z'/%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='M9 2v2.07A7 7 0 0 0 5 11v1H3v2h2v1a7 7 0 0 0 4 6.93V22h2v-1.07A7 7 0 0 0 15 15v-1h2v-2h-2v-1a7 7 0 0 0-4-6.93V2H9zm2 4.56A5 5 0 0 1 14 11v1h1v2h-1v1a5 5 0 0 1-4 4.9V6.56z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.video-circle-torch-btn.active {
  color: #ffd60a;
  background: rgba(255, 214, 10, 0.2);
}

/* ===== Conferences ===== */
.conferences-modal {
  z-index: 36;
}

.conference-dom-capture-host {
  position: fixed;
  left: 0;
  top: 0;
  width: 2px;
  height: 2px;
  overflow: hidden;
  opacity: 0.02;
  pointer-events: none;
  z-index: 0;
}

.conference-dom-capture-canvas {
  display: block;
}

.conference-capture-preview {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
  pointer-events: none;
}

.conference-room-stage[data-layout="grid"] .conference-tile,
.conference-room-stage:not([data-layout]) .conference-tile {
  width: 100% !important;
  height: 100% !important;
  min-width: 0;
  min-height: 0;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  align-self: stretch;
  justify-self: stretch;
}

.conference-room-stage[data-layout="grid"] .conference-tile.is-screen-share,
.conference-room-stage:not([data-layout]) .conference-tile.is-screen-share {
  justify-self: stretch;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.conference-room-stage[data-layout="grid"] .conference-tile video,
.conference-room-stage[data-layout="grid"] .conference-tile .conference-capture-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.conference-room-stage[data-layout="grid"] .conference-tile.is-screen-share video,
.conference-room-stage[data-layout="grid"] .conference-tile.is-screen-share .conference-capture-preview {
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.conference-room-stage[data-layout="grid"].has-pinned-demo .conference-tile.is-pinned {
  order: -1;
  grid-column: 1;
  grid-row: 1;
}

/* Video frame hugs the picture; label/mic sit on the video corners. */
.conference-tile-frame {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: transparent;
}

.conference-tile[data-kind="camera"] .conference-tile-frame {
  /* JS sizes the frame to the camera picture; do not stretch to the grid cell
     or mic/label sit beside the video and radius clips the empty cell, not the feed. */
  flex: 0 0 auto;
  max-width: 100%;
  max-height: 100%;
}

.conference-tile.is-screen-share .conference-tile-frame {
  position: relative;
  inset: auto;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
}

.conference-tile-frame > video,
.conference-tile-frame > canvas.conference-capture-preview,
.conference-tile-frame > canvas.conference-dom-capture-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.conference-room-stage[data-layout="grid"] .conference-tile[data-kind="camera"],
.conference-room-stage:not([data-layout]) .conference-tile[data-kind="camera"] {
  position: relative;
  z-index: 1;
  margin: 0;
  justify-self: stretch;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  border-radius: 0;
  background: transparent !important;
  border-color: transparent;
  box-shadow: none;
}

/* Frame is sized in JS to the camera picture; cover fills the rounded box. */
.conference-room-stage[data-layout="grid"] .conference-tile[data-kind="camera"] video,
.conference-room-stage:not([data-layout]) .conference-tile[data-kind="camera"] video {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  background: transparent !important;
  border-radius: inherit;
}

.conference-tile .conference-tile-label,
.conference-tile-label,
.conference-tile.is-screen-share .conference-tile-label,
.conference-tile-frame > .conference-tile-label {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  z-index: 5;
  margin: 0 !important;
  padding: 6px 10px 7px;
  border-radius: 0;
  background: none;
  font-size: 0.75em;
  line-height: 1.2;
  color: #fff;
  pointer-events: none;
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.95),
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 1px rgba(0, 0, 0, 1);
  white-space: normal;
}

.conference-tile .conference-tile-label.is-strip-label,
.conference-tile.is-screen-share .conference-tile-label.is-strip-label {
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conferences-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.conferences-body {
  position: static;
  inset: auto;
  z-index: auto;
  display: grid;
  gap: 10px;
  align-content: start;
  width: auto;
  min-height: 0;
  padding: 12px 14px 16px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(232, 86, 168, 0.16), transparent 55%),
    transparent;
  box-shadow: none;
}

.conferences-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.conferences-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
  padding: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.conferences-tab {
  flex: 1;
  border: 0;
  border-radius: 9px;
  padding: 7px 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.conferences-tab.is-active {
  background: var(--pink, #e856a8);
  color: #fff;
  box-shadow: 0 6px 16px rgba(232, 86, 168, 0.28);
}

.conferences-primary-btn,
.conferences-secondary-btn,
.conferences-danger-btn,
.conferences-back,
.conferences-chip-btn {
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.conferences-primary-btn {
  background: var(--pink, #e856a8);
  color: #fff;
  box-shadow: 0 8px 18px rgba(232, 86, 168, 0.28);
}

.conferences-secondary-btn,
.conferences-chip-btn {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
}

.conferences-danger-btn {
  background: rgba(220, 60, 80, 0.16);
  color: #ff6b63;
}

.conferences-back {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.conferences-list,
.conferences-recordings-list {
  display: grid;
  gap: 8px;
}

.conferences-card,
.conferences-recording-card,
.conferences-hero,
.conferences-section {
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(232, 86, 168, 0.14), rgba(255, 255, 255, 0.03) 58%),
    rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 11px 12px;
  color: inherit;
  font: inherit;
}

.conferences-card {
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease;
}

.conferences-card:hover {
  border-color: rgba(232, 86, 168, 0.45);
  transform: translateY(-1px);
}

.conferences-card-top,
.conferences-form-head,
.conferences-section-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.conferences-form-head {
  justify-content: flex-start;
  margin-bottom: 2px;
}

.conferences-form-head h3,
.conferences-section-head strong {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.conferences-card-meta,
.conferences-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.35;
}

.conferences-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.conferences-badge.is-live {
  background: rgba(232, 86, 168, 0.22);
  color: var(--pink, #e856a8);
}

.conferences-form,
.conferences-detail,
.conferences-recordings {
  display: grid;
  gap: 8px;
}

.conferences-field {
  display: grid;
  gap: 4px;
}

.conferences-field > span,
.conferences-section-head span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.conferences-field input,
.conferences-field textarea,
.conferences-field select,
.conferences-schedule-row input,
.conferences-picker-search {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 11px;
  padding: 8px 10px;
  color: inherit;
  font: inherit;
  font-size: 13px;
}

.conferences-fieldset,
.conferences-section {
  display: grid;
  gap: 6px;
}

.conferences-fieldset {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px;
  margin: 0;
  background: rgba(255, 255, 255, 0.03);
}

.conferences-fieldset legend {
  padding: 0 4px;
  color: var(--pink, #e856a8);
  font-size: 12px;
  font-weight: 700;
}

.conferences-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.conferences-check-row label,
.conferences-admin-perms label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.86);
}

.conferences-check-row input[type="checkbox"],
.conferences-check-row input[type="radio"],
.conferences-admin-perms input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 14px;
  accent-color: var(--pink, #e856a8);
  cursor: pointer;
}

.conferences-schedule-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.conferences-form-actions,
.conferences-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.conferences-desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.35;
}

.conferences-picker {
  display: grid;
  gap: 6px;
}

.conferences-picker-summary .conferences-secondary-btn {
  justify-self: start;
}

.conferences-picker-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 0;
}

.conferences-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(232, 86, 168, 0.18);
  color: var(--pink, #e856a8);
  font-size: 12px;
}

.conferences-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.conferences-picker-list {
  display: grid;
  gap: 2px;
  max-height: 168px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.16);
}

.conferences-picker-list.is-modal {
  max-height: min(42dvh, 360px);
}

.conferences-picker-manual {
  display: flex;
  gap: 6px;
  align-items: center;
}

.conferences-picker-manual .conferences-picker-search {
  flex: 1;
}

.conference-user-picker-modal {
  display: grid;
  place-items: center;
  z-index: 12010;
  background: rgba(0, 0, 0, 0.55);
}

.conference-user-picker-modal[hidden] {
  display: none !important;
}

.conference-user-picker-panel {
  width: min(480px, calc(100vw - 24px));
  max-height: min(820px, calc(100dvh - 24px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(232, 86, 168, 0.18), transparent 55%),
    rgba(16, 14, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.conference-user-picker-body {
  padding: 12px 16px;
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
}

.conference-user-picker-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.conferences-picker-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
}

.conferences-picker-row:hover,
.conferences-picker-row.is-on {
  background: rgba(232, 86, 168, 0.14);
}

.conferences-picker-row strong,
.conferences-picker-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conferences-picker-row strong {
  font-size: 13px;
}

.conferences-picker-row small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.conferences-picker-empty,
.conferences-notice {
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(232, 86, 168, 0.12);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.conferences-admin-card {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.14);
  display: grid;
  gap: 6px;
}

.conferences-admin-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.conferences-admin-perms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 8px;
}

.conferences-owner-card {
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(232, 86, 168, 0.22), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(232, 86, 168, 0.28);
  font-size: 12px;
}

.conferences-recording-card video,
.conferences-recording-poster {
  width: 100%;
  max-height: 220px;
  border-radius: 10px;
  background: #111;
  margin-top: 6px;
  object-fit: contain;
  display: block;
}

.conferences-recording-player {
  position: relative;
  margin-top: 6px;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  min-height: 140px;
}

.conferences-recording-player video,
.conferences-recording-player .conferences-recording-poster {
  margin-top: 0;
  max-height: 220px;
  min-height: 140px;
}

.conferences-recording-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
}

.conferences-recording-play:hover {
  background: rgba(232, 86, 168, 0.75);
}

.conferences-recording-play.is-loading {
  opacity: 0.6;
  cursor: wait;
}

.conferences-recording-duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  pointer-events: none;
}

.conference-room-modal {
  z-index: 40;
  background: transparent;
  pointer-events: none;
}

.conference-room-modal > .conference-room-panel {
  pointer-events: auto;
}

.conference-room-panel {
  grid-template-rows: auto minmax(0, 1fr);
  width: min(920px, calc(100vw - 32px));
  height: min(620px, calc(100dvh - 32px));
  min-width: 420px;
  min-height: 420px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  background:
    radial-gradient(200% 130% at 0% 0%, rgba(232, 86, 168, 0.14), transparent 74%),
    radial-gradient(190% 125% at 100% 0%, rgba(232, 86, 168, 0.15), transparent 76%),
    radial-gradient(160% 90% at 50% 100%, rgba(232, 86, 168, 0.1), transparent 70%),
    rgba(12, 11, 16, 0.72);
}

/* One continuous glow layer for the whole window — avoids seams between head/stage/aside. */
.conference-room-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 100% 70% at 0% 0%, rgba(232, 86, 168, 0.2), transparent 72%),
    radial-gradient(ellipse 110% 75% at 100% 0%, rgba(232, 86, 168, 0.22), transparent 74%),
    radial-gradient(ellipse 120% 85% at 50% 100%, rgba(232, 86, 168, 0.16), transparent 76%),
    radial-gradient(ellipse 90% 70% at 100% 100%, rgba(232, 86, 168, 0.14), transparent 72%);
}

.conference-room-panel > * {
  position: relative;
  z-index: 1;
}

.conference-room-panel > .conference-room-controls,
.conference-room-panel > .conference-leave-corner,
.conference-room-panel > .conference-settings-corner {
  position: absolute;
  z-index: 40;
}

.conference-leave-corner.conference-ctrl-btn,
.conference-settings-corner.conference-ctrl-btn {
  z-index: 45 !important;
}

.conference-room-panel > .extensions-resize-handle {
  position: absolute;
  z-index: 20;
  pointer-events: auto;
}

.conference-room-panel > .extensions-resize-n,
.conference-room-panel > .extensions-resize-s {
  height: 14px;
}

.conference-room-panel > .extensions-resize-s {
  /* Full bottom edge; controls/settings/leave stay above via higher z-index. */
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: auto;
  cursor: ns-resize;
  z-index: 25;
}

.conference-room-panel > .extensions-resize-se,
.conference-room-panel > .extensions-resize-sw {
  pointer-events: auto;
  z-index: 26;
  width: 22px;
  height: 22px;
}

.conference-room-panel > .extensions-resize-e,
.conference-room-panel > .extensions-resize-w {
  width: 10px;
  bottom: 18px;
}

.conference-room-panel:fullscreen,
.conference-room-modal:fullscreen .conference-room-panel,
.conference-room-panel.expanded {
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
  left: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: #07060a !important;
  box-shadow: none !important;
  border: 0 !important;
}

.conference-room-panel.expanded::before,
.conference-room-panel:fullscreen::before,
.conference-room-modal:fullscreen .conference-room-panel::before {
  background:
    radial-gradient(ellipse 80% 50% at 8% 0%, rgba(232, 86, 168, 0.2), transparent 74%),
    radial-gradient(ellipse 90% 55% at 100% 0%, rgba(232, 86, 168, 0.22), transparent 76%),
    radial-gradient(ellipse 110% 70% at 50% 100%, rgba(232, 86, 168, 0.18), transparent 78%),
    radial-gradient(ellipse 85% 65% at 92% 100%, rgba(232, 86, 168, 0.15), transparent 74%),
    radial-gradient(ellipse 60% 45% at 85% 100%, rgba(124, 58, 237, 0.1), transparent 70%);
}

.conference-room-panel.expanded .conference-room-body,
.conference-room-panel:fullscreen .conference-room-body,
.conference-room-modal:fullscreen .conference-room-panel .conference-room-body {
  background: transparent;
}

.conference-room-panel.expanded .conference-room-stage,
.conference-room-panel:fullscreen .conference-room-stage,
.conference-room-modal:fullscreen .conference-room-panel .conference-room-stage {
  background: transparent;
}

.conference-room-panel.expanded .conference-people-aside,
.conference-room-panel:fullscreen .conference-people-aside,
.conference-room-modal:fullscreen .conference-room-panel .conference-people-aside {
  border-left-color: rgba(255, 255, 255, 0.05);
  background: transparent;
}

.conference-room-panel.expanded .conference-room-head,
.conference-room-panel:fullscreen .conference-room-head,
.conference-room-modal:fullscreen .conference-room-panel .conference-room-head {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.conference-room-panel.expanded .conference-room-controls,
.conference-room-panel:fullscreen .conference-room-controls,
.conference-room-modal:fullscreen .conference-room-panel .conference-room-controls {
  background: transparent;
  border-top: 0;
}

.conference-room-panel.expanded .extensions-resize-handle {
  display: none !important;
}

.conference-room-head {
  padding-inline: 54px 72px;
  background: transparent;
}

.conference-room-head h2 {
  gap: 8px;
  min-width: 0;
}

.conference-room-head h2 strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conference-room-meta {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 600;
}

.conference-room-head-actions {
  position: absolute;
  right: 8px;
  top: 50%;
  display: flex;
  gap: 4px;
  transform: translateY(-50%);
  z-index: 5;
}

.conference-room-panel > .extensions-close {
  display: none !important;
}

.conference-live-session-banner {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(232, 86, 168, 0.12);
  border: 1px solid rgba(232, 86, 168, 0.28);
}

.conference-live-session-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.conference-live-session-banner .primary,
.conference-live-session-banner .secondary {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

.conference-live-session-banner .primary {
  background: var(--pink, #e856a8);
  color: #fff;
}

.conference-live-session-banner .secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 100%;
}

.conference-live-session-note {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.conferences-invite-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.conferences-invite-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.conferences-invite-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.conferences-invite-url {
  width: 100%;
  font-size: 11px;
  word-break: break-all;
  color: var(--pink, #e856a8);
}

.conferences-invite-slug {
  display: grid;
  gap: 6px;
}

.conferences-invite-slug-prefix {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  word-break: break-all;
}

.conferences-invite-slug input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 11px;
  padding: 8px 10px;
  color: inherit;
  font: inherit;
  font-size: 13px;
}

.conference-invite-modal {
  display: grid;
  place-items: center;
  z-index: 12000;
  background: rgba(0, 0, 0, 0.55);
}

.conference-invite-modal[hidden] {
  display: none !important;
}

.conference-invite-panel {
  width: min(460px, calc(100vw - 24px));
  max-height: min(780px, calc(100dvh - 24px));
  overflow: auto;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(232, 86, 168, 0.18), transparent 55%),
    rgba(16, 14, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.conference-invite-body {
  padding: 12px 16px 18px;
  display: grid;
  gap: 12px;
}

.conference-invite-price-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.conference-invite-price-card strong {
  font-size: 18px;
}

.conference-invite-price-card small {
  color: rgba(255, 255, 255, 0.65);
}

.conference-invite-actions {
  display: grid;
  gap: 8px;
}

.conference-invite-actions button {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  cursor: pointer;
}

.conference-invite-actions .primary {
  background: var(--pink, #e856a8);
  color: #fff;
}

.conference-invite-actions .secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.conference-invite-topup {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 180, 64, 0.12);
  border: 1px solid rgba(255, 180, 64, 0.28);
}

.conference-room-popout {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--pink, #e856a8);
  cursor: pointer;
  font: inherit;
}

.conference-room-popout:hover {
  background: rgba(232, 86, 168, 0.14);
}

.conference-room-popout-icon {
  font-size: 15px;
  line-height: 1;
}

.conference-room-popout-tip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(20, 16, 22, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 120ms ease, transform 120ms ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.conference-room-popout:hover .conference-room-popout-tip,
.conference-room-popout:focus-visible .conference-room-popout-tip {
  opacity: 1;
  transform: translateY(0);
}

.conference-room-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 72px;
}

.conference-room-body.people-collapsed {
  grid-template-columns: minmax(0, 1fr) 0;
}

.conference-room-body.people-collapsed .conference-people-aside {
  display: none;
}

.conference-room-body.people-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.conference-room-body.people-hidden .conference-people-aside {
  display: none;
}

.conference-room-body.people-hidden .conference-people-toggle-head {
  display: none;
}

.conference-room-main {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.conference-room-stage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--conf-cols, 3), minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  padding-bottom: 10px;
  overflow: auto;
  align-content: start;
  background: transparent;
}

.conference-room-stage[data-layout="grid"] {
  grid-template-columns: repeat(var(--conf-cols, 3), minmax(0, 1fr));
  grid-template-rows: none;
  grid-auto-rows: calc((100% - 24px) / 2);
  justify-content: stretch;
  align-content: start;
  justify-items: stretch;
  align-items: stretch;
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px;
  padding-bottom: 8px;
}

.conference-room-stage[data-layout="grid"] .conference-tile {
  min-height: 0;
}

.conference-room-stage[data-layout="grid"][data-grid-rows="1"] {
  grid-auto-rows: calc(100% - 16px);
}

.conference-room-stage[data-layout="single"] {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
  align-content: stretch;
  padding: 8px;
  padding-bottom: 8px;
}

.conference-room-stage[data-layout="spotlight"],
.conference-room-stage[data-layout="speaker"] {
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  grid-template-rows: minmax(0, 1fr) 96px;
  grid-auto-columns: 132px;
  align-content: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px;
  padding-bottom: 8px;
}

.conference-room-stage[data-layout="single"] .conference-tile.is-layout-focus,
.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-focus,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-focus {
  grid-column: 1 / -1;
  grid-row: 1;
  aspect-ratio: auto !important;
  min-height: 0;
  height: 100%;
  width: 100%;
  max-height: none;
}

.conference-room-stage[data-layout="single"] .conference-tile.is-layout-focus video,
.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-focus video,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-focus video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.conference-room-stage[data-layout="single"] .conference-tile.is-layout-hidden {
  display: none !important;
}

.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-strip,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-strip {
  grid-row: 2;
  min-height: 88px;
  aspect-ratio: 16 / 10;
}

.conference-room-stage:empty::before {
  content: "Видео участников появится здесь";
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  grid-column: 1 / -1;
  min-height: 160px;
}

.conference-people-aside {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
}

.conference-people-toggle-head {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--pink, #e856a8);
  cursor: pointer;
  font: inherit;
}

.conference-people-toggle-head svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.conference-people-toggle-head:hover,
.conference-people-toggle-head[aria-pressed="true"] {
  background: rgba(232, 86, 168, 0.14);
}

.conference-room-body.people-collapsed .conference-people-aside {
  opacity: 0.92;
}

.conference-people-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 8px;
  overflow: auto;
}

.conference-room-body.people-collapsed .conference-people-list {
  display: none;
}

.conference-people-list:empty::before {
  content: "Участники";
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  text-align: center;
  margin-top: 12px;
}

.conference-chat-preview {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 4;
  width: min(340px, calc(100% - 76px));
  max-height: 140px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(10, 10, 14, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.conference-chat-preview[hidden] {
  display: none !important;
}

.conference-chat-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.conference-chat-preview-head strong {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.86);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conference-chat-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(232, 86, 168, 0.18);
  color: var(--pink, #e856a8);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex: 0 0 auto;
}

.conference-chat-open-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.conference-chat-open-btn:hover {
  background: rgba(232, 86, 168, 0.28);
}

.conference-chat-preview-list {
  overflow: auto;
  padding: 6px 8px 8px;
  display: grid;
  gap: 4px;
  align-content: end;
}

.conference-chat-preview-item {
  display: grid;
  gap: 1px;
  font-size: 11px;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.82);
}

.conference-chat-preview-item .sender {
  color: var(--pink, #e856a8);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conference-chat-preview-item .text {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  opacity: 0.92;
}

.conference-chat-preview-empty {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  padding: 8px 2px;
}

.conference-leave-corner {
  position: absolute !important;
  right: 12px;
  bottom: 12px;
  z-index: 8;
}

.conference-settings-corner {
  position: absolute !important;
  left: 12px;
  bottom: 12px;
  z-index: 40;
}

.conference-room-panel > .conference-settings-corner {
  position: absolute !important;
  z-index: 80 !important;
}

.conference-local-cam-pip,
#conferenceLocalCamPip {
  display: none !important;
}

.conference-media-prompt-modal {
  z-index: 120070;
  display: grid;
  place-items: center;
  pointer-events: auto;
  background: rgba(6, 5, 10, 0.55);
}

.conference-media-prompt {
  width: min(420px, calc(100vw - 32px));
  padding: 18px 18px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(232, 86, 168, 0.16), transparent 70%),
    rgba(18, 16, 24, 0.94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  color: #fff;
}

.conference-media-prompt h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 650;
}

.conference-media-prompt p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.4;
}

.conference-media-prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.conference-ctrl-btn.is-media-blocked {
  opacity: 0.55;
}

.conference-ctrl-btn.is-media-blocked::after {
  content: "";
  position: absolute;
  inset: 18% 14%;
  border-top: 2px solid rgba(255, 90, 110, 0.95);
  transform: rotate(-28deg);
  pointer-events: none;
}

.conference-media-hint {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  line-height: 1.3;
}

.conference-media-settings-modal {
  pointer-events: none;
}

.conference-media-settings-modal > .conference-media-settings-panel {
  pointer-events: auto;
}

.conference-media-settings-panel {
  width: min(420px, calc(100vw - 32px));
  height: min(620px, calc(100dvh - 32px));
  min-width: 320px;
  min-height: 480px;
  grid-template-rows: auto minmax(0, 1fr);
}

.conference-media-settings-panel.expanded {
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0 !important;
  left: 0 !important;
  top: 0 !important;
  transform: none !important;
}

.conference-media-settings-body {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px 16px 18px;
  overflow: auto;
}

.conference-media-field {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
}

.conference-media-field select {
  width: 100%;
  min-height: 36px;
  border-radius: 12px;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  padding: 0 10px;
}

.conference-media-preview-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 10;
}

.conference-media-preview-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111;
}

.conference-media-preview-wrap.is-mirrored video,
.conference-tile.is-mirrored > .conference-tile-frame > video {
  transform: scaleX(-1);
}

.conference-media-mirror-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.conference-media-secondary[aria-pressed="true"] {
  background: rgba(232, 86, 168, 0.22);
  border-color: rgba(232, 86, 168, 0.55);
}

.conference-media-meter {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.conference-media-meter i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2ecc71, #e856a8);
}

.conference-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.conference-media-secondary {
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 12px;
  padding: 0 14px;
  min-height: 36px;
  cursor: pointer;
}

.conference-person.has-video .conference-person-avatar {
  box-shadow: 0 0 0 1.5px rgba(232, 86, 168, 0.55);
}

.conference-person {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  min-width: 0;
  transition: border-color 120ms ease, background 120ms ease;
}

.conference-person.is-speaking {
  border-color: #2ecc71;
  background: rgba(46, 204, 113, 0.12);
  box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.25);
}

.conference-person-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--pink, #e856a8);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.conference-person-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.conference-person-flags {
  margin-left: auto;
  display: flex;
  gap: 3px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
}

.conference-tile {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #1c1520;
  min-height: 140px;
  aspect-ratio: 16 / 10;
  /* Fixed width so speaking / pin rings never shift layout size. */
  border: 3px solid transparent;
  box-shadow: none;
  cursor: pointer;
}

.conference-tile[data-kind="camera"] {
  background: transparent !important;
  overflow: visible;
}

.conference-tile[data-kind="camera"] video {
  background: transparent !important;
  border-radius: 16px;
}

.conference-tile.is-screen-share {
  background: #0c0b10;
  min-height: 160px;
  border: 3px solid transparent;
}

.conference-tile.is-screen-share.is-portrait {
  justify-self: center;
  width: auto;
}

.conference-tile.is-speaking {
  border-color: #2ecc71;
  box-shadow: 0 0 14px rgba(46, 204, 113, 0.35);
}

.conference-tile-mic,
.conference-tile-frame > .conference-tile-mic {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(10, 8, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.conference-tile-mic[hidden] {
  display: none !important;
}

.conference-tile-mic svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.conference-tile-mic.is-muted {
  color: #ff6b81;
  border-color: rgba(255, 107, 129, 0.45);
}

.conference-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.conference-tile[data-kind="camera"] video {
  background: transparent;
  border-radius: 16px;
}

.conference-tile.is-screen-share video {
  object-fit: contain;
  object-position: center;
}

.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-focus,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-focus,
.conference-room-stage[data-layout="single"] .conference-tile.is-layout-focus {
  max-height: none;
  max-width: none;
  height: 100%;
  width: 100%;
  min-height: 0;
  justify-self: stretch;
  align-self: stretch;
  aspect-ratio: auto !important;
  background: transparent;
}

.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-focus:not(.is-screen-share),
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-focus:not(.is-screen-share),
.conference-room-stage[data-layout="single"] .conference-tile.is-layout-focus:not(.is-screen-share) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-strip:not(.is-screen-share),
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-strip:not(.is-screen-share) {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-focus.is-screen-share,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-focus.is-screen-share,
.conference-room-stage[data-layout="single"] .conference-tile.is-layout-focus.is-screen-share {
  max-height: none;
  max-width: none !important;
  height: 100%;
  width: 100%;
  justify-self: stretch;
  align-self: stretch;
  aspect-ratio: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-focus.is-screen-share video,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-focus.is-screen-share video,
.conference-room-stage[data-layout="single"] .conference-tile.is-layout-focus.is-screen-share video,
.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-focus.is-screen-share .conference-capture-preview,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-focus.is-screen-share .conference-capture-preview,
.conference-room-stage[data-layout="single"] .conference-tile.is-layout-focus.is-screen-share .conference-capture-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.conference-room-stage[data-layout="single"] .conference-tile.is-layout-focus video,
.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-focus video,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-focus video {
  background: transparent;
}

.conference-room-stage[data-layout="single"] .conference-tile.is-layout-focus:not(.is-screen-share) video,
.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-focus:not(.is-screen-share) video,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-focus:not(.is-screen-share) video,
.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-strip:not(.is-screen-share) video,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-strip:not(.is-screen-share) video {
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  max-height: none;
  object-fit: fill;
  object-position: center;
  background: transparent !important;
  border-radius: inherit;
}

.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-focus:not(.is-screen-share) .conference-tile-frame,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-focus:not(.is-screen-share) .conference-tile-frame,
.conference-room-stage[data-layout="single"] .conference-tile.is-layout-focus:not(.is-screen-share) .conference-tile-frame,
.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-strip:not(.is-screen-share) .conference-tile-frame,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-strip:not(.is-screen-share) .conference-tile-frame {
  flex: 0 0 auto;
}

.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-strip.is-screen-share,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-strip.is-screen-share {
  max-height: 104px;
  max-width: none;
}

.conference-demo-context-menu {
  position: fixed;
  z-index: 200000;
  min-width: 220px;
  padding: 6px;
  border-radius: 16px;
  background: var(--glass-bg, rgba(18, 16, 22, 0.96));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  box-shadow: var(--glass-shadow, 0 16px 40px rgba(0, 0, 0, 0.45));
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  display: grid;
  gap: 2px;
}

.conference-demo-context-menu[hidden] {
  display: none !important;
}

.conference-demo-context-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  text-align: left;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.conference-demo-context-menu button:hover {
  background: rgba(232, 86, 168, 0.18);
}

.extensions-panel.is-floating-pinned > .extensions-head,
.conference-room-panel.is-floating-pinned > .extensions-head {
  box-shadow: inset 0 -2px 0 rgba(232, 86, 168, 0.55);
}

.conference-demo-tab-panel.is-floating-pinned {
  outline: 2px solid rgba(232, 86, 168, 0.55);
  outline-offset: -2px;
}

.conference-volume-control {
  display: grid;
  gap: 6px;
  padding: 8px 10px 10px;
  margin-bottom: 2px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.conference-volume-control[hidden] {
  display: none !important;
}

.conference-volume-control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  line-height: 1.2;
}

.conference-volume-value {
  color: rgba(255, 255, 255, 0.62);
  font-variant-numeric: tabular-nums;
  min-width: 3.2em;
  text-align: right;
}

.conference-volume-slider {
  --vol-pct: 50%;
  --vol-thumb: 14px;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 16px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.conference-volume-slider:focus {
  outline: none;
}

.conference-volume-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(232, 86, 168, 0.28);
}

.conference-volume-slider:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(232, 86, 168, 0.28);
}

.conference-volume-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    #e856a8 0%,
    #e856a8 var(--vol-pct),
    rgba(255, 255, 255, 0.14) var(--vol-pct),
    rgba(255, 255, 255, 0.14) 100%
  );
}

.conference-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--vol-thumb);
  height: var(--vol-thumb);
  margin-top: -4px;
  border: 0;
  border-radius: 50%;
  background: #e856a8;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.conference-volume-slider::-moz-range-track {
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.conference-volume-slider::-moz-range-progress {
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: #e856a8;
}

.conference-volume-slider::-moz-range-thumb {
  width: var(--vol-thumb);
  height: var(--vol-thumb);
  border: 0;
  border-radius: 50%;
  background: #e856a8;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.conference-peer-context-menu {
  min-width: 200px;
}

.conference-demo-tab-modal {
  pointer-events: none;
}

.conference-demo-tab-modal.is-above-conference {
  /* Inline z-index from raiseModalToFront keeps it above the room. */
}

.conference-demo-tab-modal > .conference-demo-tab-panel {
  pointer-events: auto;
}

.conference-demo-tab-panel {
  --demo-frame-color: var(--pink);
  /* Never use the shared 50%/50% + translate centering — it fights drag math. */
  top: 0;
  left: 0;
  transform: none;
  width: min(720px, calc(100vw - 32px));
  height: auto;
  min-width: 280px;
  min-height: 220px;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  aspect-ratio: var(--demo-aspect, 16 / 9);
  grid-template-rows: minmax(0, 1fr);
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  border: 0;
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  cursor: default;
  box-sizing: border-box;
  padding: 0;
  gap: 0;
  position: fixed;
  overscroll-behavior: contain;
}

.conference-demo-tab-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Above .conference-demo-tab-label (z-index 5) so its bottom gradient
     does not darken the pink/green frame along the bottom edge. */
  z-index: 6;
  border-radius: inherit;
  border: 2px solid var(--demo-frame-color);
  pointer-events: none;
  box-sizing: border-box;
}

.conference-demo-tab-panel.is-speaking {
  --demo-frame-color: #2ecc71;
}

.conference-demo-tab-panel.is-window-interacting,
.conference-demo-tab-panel.is-window-interacting .conference-demo-tab-body {
  cursor: grabbing;
}

.conference-demo-tab-body {
  min-height: 0;
  margin: 0;
  padding: 0;
  background: #000;
  display: grid;
  position: relative;
  overflow: hidden;
  border-radius: inherit;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.conference-demo-tab-body video,
.conference-demo-tab-body .conference-demo-tab-canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  object-position: center;
  background: transparent;
  border-radius: inherit;
  pointer-events: none;
}

.conference-demo-tab-body .conference-demo-tab-canvas {
  display: block;
}

.conference-demo-tab-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  margin: 0;
  padding: 6px 10px 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.95),
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 1px rgba(0, 0, 0, 1);
}

.conference-tile-label {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  margin: 0;
  padding: 6px 10px 7px;
  border-radius: 0;
  background: none;
  font-size: 0.75em;
  line-height: 1.2;
  color: #fff;
  pointer-events: none;
  text-shadow:
    0 0 4px rgba(0, 0, 0, 0.95),
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 0 1px rgba(0, 0, 0, 1);
}

.conference-tile[data-kind="camera"] .conference-tile-label {
  /* Clear the bottom-left mic badge. */
  padding-left: 44px;
}

.conference-tile-label.is-strip-label {
  left: 4px;
  right: 4px;
  bottom: 4px;
  padding: 2px 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 8px);
  box-sizing: border-box;
}

.conference-tile-pin {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 6;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(12, 11, 16, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  color: #fff;
}

.conference-tile-pin[hidden] {
  display: none !important;
}

.conference-tile-pin svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.conference-tile.is-pinned {
  /* Pin is shown via badge only — no pink frame around demos by default. */
  box-shadow: none;
}

.conference-remote-audio-host {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

.conference-room-stage[data-layout="spotlight"] .conference-tile.is-layout-strip .conference-tile-label.is-strip-label,
.conference-room-stage[data-layout="speaker"] .conference-tile.is-layout-strip .conference-tile-label.is-strip-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.floating-tabs-restore-modal {
  z-index: 120000;
}

.floating-tabs-restore-hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.35;
}

.floating-tabs-restore-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 2px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.floating-tabs-restore-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--pink, #e856a8);
  cursor: pointer;
}

.conference-room-controls {
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  padding: 12px 64px 14px;
  border-top: 0;
  background: transparent;
  pointer-events: auto;
}

.conference-ctrl-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}

.conference-ctrl-btn {
  position: relative;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  background: var(--glass-bg, rgba(18, 16, 22, 0.96));
  box-shadow: var(--glass-shadow, 0 16px 40px rgba(0, 0, 0, 0.45));
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  transition: transform 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  pointer-events: auto;
}

.conference-ctrl-btn::before {
  content: none;
}

.conference-ctrl-btn::after {
  content: none;
}

.conference-ctrl-btn svg {
  position: relative;
  z-index: 2;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.conference-ctrl-btn:hover {
  background: rgba(232, 86, 168, 0.18);
  border-color: var(--glass-border, rgba(255, 255, 255, 0.1));
}

.conference-ctrl-btn:active {
  transform: scale(0.94);
}

.conference-ctrl-btn[aria-pressed="false"] {
  background: var(--glass-bg, rgba(18, 16, 22, 0.96));
  color: rgba(255, 255, 255, 0.92);
}

.conference-ctrl-btn[aria-pressed="false"]::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: #ff453a;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -50%) rotate(-42deg);
  pointer-events: none;
  z-index: 3;
}

.conference-ctrl-btn[aria-pressed="true"] {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.9);
  color: #1c1c1e;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.22),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.conference-ctrl-btn[aria-pressed="true"]::after {
  content: none;
}

.conference-ctrl-btn[aria-pressed="true"]:hover {
  background: #f2f2f7;
  color: #1c1c1e;
}

.conference-ctrl-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.conference-ctrl-danger {
  background: #ff3b30;
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow:
    0 4px 14px rgba(255, 59, 48, 0.35),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.conference-ctrl-danger:hover {
  background: #ff5248;
  color: #fff;
}

.conference-ctrl-danger::after {
  content: none !important;
}

.conference-leave-corner.conference-ctrl-btn {
  width: 50px;
  height: 50px;
}

.conference-popup-menu,
.conference-screen-menu,
.conference-layout-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  min-width: 220px;
  max-width: min(280px, 82vw);
  max-height: min(420px, 70vh);
  overflow: auto;
  padding: 6px;
  border-radius: 24px;
  pointer-events: auto;
  background: var(--glass-bg, rgba(18, 16, 22, 0.96));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  box-shadow: var(--glass-shadow, 0 16px 40px rgba(0, 0, 0, 0.45));
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  z-index: 12;
  display: grid;
  gap: 2px;
}

.conference-screen-menu.has-flyout {
  display: block;
  width: max-content;
  min-width: 220px;
  max-width: min(280px, 82vw);
  max-height: none;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.conference-screen-menu-main,
.conference-menu-flyout-panel {
  display: grid;
  gap: 2px;
  min-width: 220px;
  max-width: min(280px, 82vw);
  max-height: min(420px, 70vh);
  overflow: auto;
  padding: 6px;
  border-radius: 24px;
  background: var(--glass-bg, rgba(18, 16, 22, 0.96));
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
  box-shadow: var(--glass-shadow, 0 16px 40px rgba(0, 0, 0, 0.45));
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.conference-screen-menu-main {
  position: relative;
  width: 220px;
}

.conference-menu-flyout-panel {
  position: absolute;
  left: calc(100% + 4px);
  bottom: 0;
  z-index: 13;
  display: none;
  width: 220px;
  pointer-events: auto;
}

.conference-screen-menu.flyout-open .conference-menu-flyout-panel {
  display: grid;
}

.conference-menu-flyout {
  position: relative;
}

.conference-menu-flyout::after {
  content: "";
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 100%;
  width: 16px;
}

.conference-menu-flyout-trigger {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.conference-menu-flyout-chevron {
  opacity: 0.7;
  font-size: 16px;
  line-height: 1;
}

.conference-screen-menu.flyout-open .conference-menu-flyout-trigger,
.conference-menu-flyout:hover .conference-menu-flyout-trigger {
  background: rgba(232, 86, 168, 0.18);
}

.conference-popup-menu[hidden],
.conference-screen-menu[hidden],
.conference-layout-menu[hidden] {
  display: none !important;
}

.conference-popup-menu button,
.conference-screen-menu button,
.conference-layout-menu button {
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  text-align: left;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.conference-popup-menu button:hover,
.conference-screen-menu button:hover,
.conference-layout-menu button:hover,
.conference-popup-menu button.is-active,
.conference-layout-menu button.is-active {
  background: rgba(232, 86, 168, 0.18);
}

.conference-popup-menu button.is-open,
.conference-screen-menu button.is-open {
  background: rgba(232, 86, 168, 0.22);
  color: var(--pink, #e856a8);
}

.conference-popup-menu .is-danger,
.conference-screen-menu .is-danger {
  color: #ff8a97;
}

.conference-menu-sep {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 4px 2px;
}

.conference-layout-cols {
  display: grid;
  gap: 6px;
  padding: 6px 8px 4px;
}

.conference-layout-cols > span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.conference-layout-cols-btns {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}

.conference-layout-cols-btns button {
  min-height: 28px !important;
  padding: 0 !important;
  text-align: center !important;
  border-radius: 10px !important;
}

.conference-identity-modal {
  display: grid;
  place-items: center;
  z-index: 12000;
  background: rgba(0, 0, 0, 0.55);
}

.conference-identity-modal[hidden] {
  display: none !important;
}

.conference-identity-panel {
  width: min(440px, calc(100vw - 24px));
  max-height: min(720px, calc(100dvh - 24px));
  overflow: auto;
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(232, 86, 168, 0.18), transparent 55%),
    rgba(16, 14, 20, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.conference-identity-body {
  padding: 12px 16px 18px;
  display: grid;
  gap: 12px;
}

.conference-identity-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.conference-identity-tabs button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.conference-identity-tabs button.is-active {
  background: var(--pink, #e856a8);
}

.conference-identity-list {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
}

.conference-identity-option {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.conference-identity-option.is-selected,
.conference-identity-option:hover {
  background: rgba(232, 86, 168, 0.2);
}

.conference-identity-option img,
.conference-identity-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.conference-identity-option small {
  display: block;
  opacity: 0.65;
  font-size: 12px;
}

.conference-identity-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.conference-identity-actions button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
}

.conference-identity-actions .primary {
  background: var(--pink, #e856a8);
  color: #fff;
}

.conference-identity-actions .secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.conference-person {
  cursor: default;
}

.conference-person.is-profile-link {
  cursor: pointer;
}

.conference-person-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  flex: 0 0 auto;
}

.conference-person.no-avatar .conference-person-avatar,
.conference-person-avatar[hidden] {
  display: none !important;
}

.conferences-create-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--pink, #e856a8);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(232, 86, 168, 0.28);
  flex: 0 0 auto;
}

@media (max-width: 720px) {
  .conferences-schedule-row,
  .conferences-admin-perms {
    grid-template-columns: 1fr;
  }

  .conference-room-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .conference-room-body.people-collapsed {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
  }

  .conference-room-body.people-hidden {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
  }

  .conference-people-aside {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .conference-people-list {
    border-left: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    max-height: 120px;
  }

  .conference-chat-preview {
    max-height: 110px;
    width: min(280px, calc(100% - 70px));
  }

  .conference-person {
    flex: 1 1 120px;
  }
}

.chat-call-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 6px;
}

.chat-call-actions[hidden] {
  display: none !important;
}

.chat-call-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--pink, #ff7ab8);
  cursor: pointer;
}

.chat-call-button svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.chat-call-button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.chat-call-modal .chat-call-panel {
  width: min(420px, calc(100vw - 32px));
}

.chat-call-body {
  display: grid;
  gap: 14px;
  padding: 4px 4px 8px;
}

.chat-call-desc {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
}

.chat-call-via-list {
  display: grid;
  gap: 10px;
}

.chat-call-via-btn {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.chat-call-via-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 122, 184, 0.45);
}

.chat-call-via-btn strong {
  font-size: 1.05rem;
}

.chat-call-via-btn span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.9rem;
  line-height: 1.35;
}

.chat-call-incoming-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.conference-record-btn svg {
  fill: currentColor;
}

.conference-record-btn[aria-pressed="true"] {
  color: #ff3b30 !important;
  border-color: rgba(255, 59, 48, 0.45) !important;
}

.conference-record-btn.is-recording {
  animation: chat-call-record-pulse 1.2s ease-in-out infinite;
}

@keyframes chat-call-record-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(255, 59, 48, 0); }
}
